1
0
mirror of https://github.com/civsocit/olgram.git synced 2025-07-13 00:33:26 +00:00
olgram/olgram/migrations/models/17_20240112045126_update.sql
2024-01-12 22:35:01 +04:00

11 lines
368 B
SQL

-- upgrade --
CREATE TABLE IF NOT EXISTS "bot_second_message" (
"id" SERIAL NOT NULL PRIMARY KEY,
"locale" VARCHAR(5) NOT NULL,
"text" TEXT NOT NULL,
"bot_id" INT NOT NULL REFERENCES "bot" ("id") ON DELETE CASCADE,
CONSTRAINT "uid_bot_second__bot_id_432892" UNIQUE ("bot_id", "locale")
);
-- downgrade --
DROP TABLE IF EXISTS "bot_second_message";