diff options
| author | ilotterytea <iltsu@alright.party> | 2025-04-16 23:06:19 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-04-16 23:06:19 +0500 |
| commit | 149a19f32b3e8f5259a3cea002dbef31a7280c7c (patch) | |
| tree | 33c60712efea1d12f6d9af64a93dbc1ab385818e /migrations | |
| parent | d8142b4e20408e403a8e2b5706ed954bff37102f (diff) | |
upd: events table
Diffstat (limited to 'migrations')
| -rw-r--r-- | migrations/2024-05-11T02-53-05_init/up.sql | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/migrations/2024-05-11T02-53-05_init/up.sql b/migrations/2024-05-11T02-53-05_init/up.sql index 1a23ff9..2d4d8c2 100644 --- a/migrations/2024-05-11T02-53-05_init/up.sql +++ b/migrations/2024-05-11T02-53-05_init/up.sql @@ -43,14 +43,10 @@ CREATE TABLE IF NOT EXISTS "actions" ( CREATE TABLE IF NOT EXISTS "events" ( "id" SERIAL NOT NULL UNIQUE PRIMARY KEY, "channel_id" INTEGER NOT NULL REFERENCES "channels"("id") ON DELETE CASCADE, - "target_alias_id" INTEGER, - "custom_alias_id" VARCHAR, + "name" VARCHAR NOT NULL, "event_type" INTEGER NOT NULL, "flags" INTEGER[] NOT NULL DEFAULT ARRAY[]::INTEGER[], - "message" VARCHAR NOT NULL, - - CONSTRAINT check_target_alias_id CHECK (("target_alias_id" IS NULL AND "custom_alias_id" IS NOT NULL) OR ("target_alias_id" IS NOT NULL AND "custom_alias_id" IS NULL)), - CONSTRAINT check_event_type CHECK (("target_alias_id" IS NOT NULL AND "event_type" != 99) OR ("custom_alias_id" IS NOT NULL AND "event_type" = 99)) + "message" VARCHAR NOT NULL ); CREATE TABLE IF NOT EXISTS "event_subscriptions" ( |
