-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add funding_status_description via migration with metadata permission…
… update
- Loading branch information
1 parent
76ee8be
commit 51afa71
Showing
4 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
moped-database/migrations/1735340549358_add-funding-status-description/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
-- Remove the funding_status_description column | ||
ALTER TABLE "public"."moped_fund_status" | ||
DROP COLUMN "funding_status_description"; |
14 changes: 14 additions & 0 deletions
14
moped-database/migrations/1735340549358_add-funding-status-description/up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
ALTER TABLE "public"."moped_fund_status" | ||
ADD COLUMN "funding_status_description" text NULL; | ||
|
||
COMMENT ON COLUMN "public"."moped_fund_status"."funding_status_description" IS 'Description of the funding status'; | ||
|
||
UPDATE "public"."moped_fund_status" | ||
SET "funding_status_description" = CASE "funding_status_name" | ||
WHEN 'Tentative' THEN 'In conversation about possible funding commitment' | ||
WHEN 'Confirmed' THEN 'Commitment to funding' | ||
WHEN 'Available' THEN 'Funding is available, e.g. private developer' | ||
WHEN 'Funding setup requested' THEN NULL | ||
WHEN 'Set up' THEN 'Funding has been set up in eCAPRIS; has FDU' | ||
ELSE "funding_status_description" | ||
END; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters