Skip to content

Commit

Permalink
feat: add Waste and Manufacturing to Sector table
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-warren authored and Sepehr-Sobhani committed Jul 4, 2023
1 parent 99b9d3d commit b3b2e89
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
9 changes: 6 additions & 3 deletions schema/deploy/tables/sector_001.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
-- Deploy cif:tables/sector_001 to pg

BEGIN;
begin;

-- XXX Add DDLs here.
insert into cif.sector (sector_name)
values
('Waste'),
('Manufacturing');

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

BEGIN;
begin;

-- XXX Add DDLs here.
delete from cif.sector where sector_name = 'Waste';
delete from cif.sector where sector_name = 'Manufacturing';

COMMIT;
commit;
16 changes: 13 additions & 3 deletions schema/verify/tables/sector_001.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
-- Verify cif:tables/sector_001 on pg

BEGIN;
begin;

-- XXX Add verifications here.
select pg_catalog.has_table_privilege('cif.sector', 'select');

ROLLBACK;
-- cif_internal Grants
select cif_private.verify_grant('select', 'sector', 'cif_internal');
select cif_private.verify_grant('update', 'sector', 'cif_internal');
select cif_private.verify_grant('insert', 'sector', 'cif_internal');

-- cif_admin Grants
select cif_private.verify_grant('select', 'sector', 'cif_admin');
select cif_private.verify_grant('insert', 'sector', 'cif_admin');
select cif_private.verify_grant('update', 'sector', 'cif_admin');

rollback;

0 comments on commit b3b2e89

Please sign in to comment.