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

10 lines
340 B
SQL

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