Skip to content

Commit

Permalink
fix typo in trigger name, update 2.0 migration with that, and docs fo…
Browse files Browse the repository at this point in the history
…r guidance
  • Loading branch information
leondutoit committed Feb 12, 2021
1 parent d1530a7 commit b5279f3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
24 changes: 20 additions & 4 deletions mgrt/1.5-to-2.0.sql
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
/*
-- using install.sh
-- replace functions
-- modify audit tables
-- define organisational tables
export SUPERUSER=
export DBOWNER=
export DBNAME=
export DBHOST=
./install.sh --only-replace-functions --setup
# saying yes to all
psql -U $DBOWNER -h $BHOST -d $DBNAME -f mgrt/1.5-to-2.0.sql
./install.sh --setup
# defining the institutional tabless
*/

-- drop constraints
alter table users drop constraint users_user_group_posix_gid_check;
Expand All @@ -23,3 +34,8 @@ create trigger capabilities_http_grants_audit after update or insert or delete o
-- (to not be affected by session-speifics)
alter table audit_log_objects alter column event_time set default current_timestamp;
alter table audit_log_relations alter column event_time set default current_timestamp;

-- fix typo
drop trigger apabilities_http_grants_correct_names_allowed on capabilities_http_grants;
create trigger capabilities_http_grants_correct_names_allowed before insert or update on capabilities_http_grants
for each row execute procedure ensure_correct_capability_names_allowed();
2 changes: 1 addition & 1 deletion src/capabilities.sql
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ create or replace function ensure_correct_capability_names_allowed()
return new;
end;
$$ language plpgsql;
create trigger apabilities_http_grants_correct_names_allowed before insert or update on capabilities_http_grants
create trigger capabilities_http_grants_correct_names_allowed before insert or update on capabilities_http_grants
for each row execute procedure ensure_correct_capability_names_allowed();


Expand Down

0 comments on commit b5279f3

Please sign in to comment.