From 2d40d39264de4eed0bdb9e8e0117a8c1e2f199d3 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Fri, 13 Dec 2024 23:50:45 +0500 Subject: feat: now you can listen to github --- migrations/2024-12-13T21-55-38_github_support/down.sql | 6 ++++++ migrations/2024-12-13T21-55-38_github_support/up.sql | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 migrations/2024-12-13T21-55-38_github_support/down.sql create mode 100644 migrations/2024-12-13T21-55-38_github_support/up.sql (limited to 'migrations') diff --git a/migrations/2024-12-13T21-55-38_github_support/down.sql b/migrations/2024-12-13T21-55-38_github_support/down.sql new file mode 100644 index 0000000..dd5c51e --- /dev/null +++ b/migrations/2024-12-13T21-55-38_github_support/down.sql @@ -0,0 +1,6 @@ +-- Your SQL goes here +ALTER TABLE "events" DROP CONSTRAINT check_event_type; +ALTER TABLE "events" ADD 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) +); \ No newline at end of file diff --git a/migrations/2024-12-13T21-55-38_github_support/up.sql b/migrations/2024-12-13T21-55-38_github_support/up.sql new file mode 100644 index 0000000..666d774 --- /dev/null +++ b/migrations/2024-12-13T21-55-38_github_support/up.sql @@ -0,0 +1,6 @@ +-- Your SQL goes here +ALTER TABLE "events" DROP CONSTRAINT check_event_type; +ALTER TABLE "events" ADD CONSTRAINT check_event_type CHECK ( + ("target_alias_id" IS NOT NULL AND "event_type" < 10) + OR ("custom_alias_id" IS NOT NULL AND "event_type" >= 10) +); \ No newline at end of file -- cgit v1.2.3