Skip to content

Commit

Permalink
Check contraints for capital project fund stage
Browse files Browse the repository at this point in the history
Replace the enum with a check constraint for stage table in capital
project fund table

closes #388
  • Loading branch information
TangoYankee committed Dec 2, 2024
1 parent 41af1e4 commit 1641ee3
Show file tree
Hide file tree
Showing 4 changed files with 1,165 additions and 6 deletions.
3 changes: 3 additions & 0 deletions db/migration/0018_acoustic_solo.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ALTER TABLE "capital_project_fund" ALTER COLUMN "stage" SET DATA TYPE text;--> statement-breakpoint
ALTER TABLE "capital_project_fund" ADD CONSTRAINT "capital_project_fund_stage_options" CHECK ("capital_project_fund"."stage" IN ('adopt', 'allocate', 'commit', 'spent'));--> statement-breakpoint
DROP TYPE "public"."capital_project_fund_stage";
Loading

0 comments on commit 1641ee3

Please sign in to comment.