first commit
This commit is contained in:
12
migrations/000003_drop_screened_consistent_check.down.sql
Normal file
12
migrations/000003_drop_screened_consistent_check.down.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
-- Restores the constraint dropped by 000003.
|
||||
--
|
||||
-- NOTE: this will FAIL on any database holding the seeded demo dataset, because
|
||||
-- that data is what the constraint rejects. That is the point of dropping it.
|
||||
-- Roll back only on a database whose applications satisfy the predicate.
|
||||
|
||||
SET search_path = public;
|
||||
|
||||
ALTER TABLE public.job_applications
|
||||
ADD CONSTRAINT job_applications_screened_consistent CHECK (
|
||||
status = 'applied' OR screened_at IS NOT NULL OR ai_score = 0
|
||||
);
|
||||
Reference in New Issue
Block a user