Skip to content

Commit

Permalink
chore: changing unused column type to allow db version migration
Browse files Browse the repository at this point in the history
  • Loading branch information
pbastia committed Dec 13, 2024
1 parent 9af9008 commit a71c9d3
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 0 deletions.
8 changes: 8 additions & 0 deletions schema/deploy/tables/form_002.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-- Deploy cif:tables/form_002 to pg

begin;

alter table cif.form
alter column json_schema_generator type varchar(10000);

commit;
8 changes: 8 additions & 0 deletions schema/revert/tables/form_002.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-- Revert cif:tables/form_002 from pg

begin;

-- No reverting json_schema_generator back to regprocedure. Cannot change varchar back to regprocedure without error.
-- Table will be dropped in original revert file.

commit;
2 changes: 2 additions & 0 deletions schema/sqitch.plan
Original file line number Diff line number Diff line change
Expand Up @@ -378,3 +378,5 @@ mutations/commit_form_change [mutations/[email protected]] 2023-11-22T19
tables/funding_stream_rfp_002 2024-05-28T22:41:57Z Brianna Cerkiewicz <briannacerkiewicz@pop-os> # Add 2024 funding streams values to funding_stream_rfp table
@1.17.1 2024-06-03T23:17:40Z Pierre Bastianelli <[email protected]> # release v1.17.1
@1.17.2 2024-08-08T20:46:52Z Sepehr Sobhani <[email protected]> # release v1.17.2

tables/form_002 [tables/form_001] 2024-12-13T19:25:15Z Pierre Bastianelli <[email protected]> # dropping regprocedure type for column in favour of varchar to allow postgres version upgrade
15 changes: 15 additions & 0 deletions schema/verify/tables/form_002.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
-- Verify cif:tables/form_002 on pg

begin;

-- Assess that the table exists with the right privileges

select pg_catalog.has_table_privilege('cif.form', 'select');

-- cif_internal Grants
select cif_private.verify_grant('select', 'form', 'cif_internal');

-- cif_admin Grants
select cif_private.verify_grant('select', 'form', 'cif_admin');

rollback;

0 comments on commit a71c9d3

Please sign in to comment.