summaryrefslogtreecommitdiff
path: root/migrations/2024-12-13T21-55-38_github_support
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2024-12-13 23:50:45 +0500
committerilotterytea <iltsu@alright.party>2024-12-13 23:50:45 +0500
commit2d40d39264de4eed0bdb9e8e0117a8c1e2f199d3 (patch)
tree890df967067371cd5ddb7b83d733db875a253e7a /migrations/2024-12-13T21-55-38_github_support
parentad05411350f1152cc3c86cebb5b8492d34507b33 (diff)
feat: now you can listen to github
Diffstat (limited to 'migrations/2024-12-13T21-55-38_github_support')
-rw-r--r--migrations/2024-12-13T21-55-38_github_support/down.sql6
-rw-r--r--migrations/2024-12-13T21-55-38_github_support/up.sql6
2 files changed, 12 insertions, 0 deletions
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