Skip to content

Commit

Permalink
391 drop enums, update types from enum to text, add constraints
Browse files Browse the repository at this point in the history
 - in capital-project-fund
 - in capital-commitment-fund

Closes #391
  • Loading branch information
horatiorosa committed Dec 5, 2024
1 parent 1641ee3 commit 273fc6d
Show file tree
Hide file tree
Showing 5 changed files with 1,177 additions and 23 deletions.
5 changes: 5 additions & 0 deletions db/migration/0019_fast_stephen_strange.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ALTER TABLE "capital_commitment_fund" ALTER COLUMN "capital_fund_category" SET DATA TYPE text;--> statement-breakpoint
ALTER TABLE "capital_project_fund" ALTER COLUMN "capital_fund_category" SET DATA TYPE text;--> statement-breakpoint
ALTER TABLE "capital_commitment_fund" ADD CONSTRAINT "capital_commitment_fund_capital_fund_category" CHECK ("capital_commitment_fund"."capital_fund_category" IN ('city-non-exempt', 'city-exempt', 'city-cost', 'non-city-state', 'non-city-federal', 'non-city-other', 'non-city-cost', 'total'));--> statement-breakpoint
ALTER TABLE "capital_project_fund" ADD CONSTRAINT "capital_project_fund_capital_fund_category" CHECK ("capital_project_fund"."capital_fund_category" IN ('city-non-exempt', 'city-exempt', 'city-cost', 'non-city-state', 'non-city-federal', 'non-city-other', 'non-city-cost', 'total'));--> statement-breakpoint
DROP TYPE "public"."capital_fund_category";
Loading

0 comments on commit 273fc6d

Please sign in to comment.