diff options
| author | ilotterytea <iltsu@alright.party> | 2024-12-13 23:50:45 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2024-12-13 23:50:45 +0500 |
| commit | 2d40d39264de4eed0bdb9e8e0117a8c1e2f199d3 (patch) | |
| tree | 890df967067371cd5ddb7b83d733db875a253e7a /migrations | |
| parent | ad05411350f1152cc3c86cebb5b8492d34507b33 (diff) | |
feat: now you can listen to github
Diffstat (limited to 'migrations')
| -rw-r--r-- | migrations/2024-12-13T21-55-38_github_support/down.sql | 6 | ||||
| -rw-r--r-- | migrations/2024-12-13T21-55-38_github_support/up.sql | 6 |
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 |
