summaryrefslogtreecommitdiff
path: root/migrations/2024-12-13T21-55-38_github_support/up.sql
blob: 666d774e8b52d3daccc8e4cb0d9b4294ab589a98 (plain)
1
2
3
4
5
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)
);