style(sql): make migrations more greppable

This commit is contained in:
Michael Gaffney committed 2022-08-08 18:17:57 -04:00
1 parent 02dd28f587
commit ac6f14a37f
77 files changed
+553 -1458

No files matched your search

@@ -1,7 +1,6 @@
begin;
create domain wt_plugin_id as text
not null
create domain wt_plugin_id as text not null
check(
length(trim(value)) > 10 or value = 'pi_system'
);
@@ -11,7 +10,6 @@ begin;
create table plugin (
public_id wt_plugin_id primary key
);
comment on table plugin is
'plugin is a table where each row represents a unique plugin registered with Boundary.';
@@ -22,9 +20,7 @@ begin;
create trigger immutable_columns before update on plugin
for each row execute procedure immutable_columns('public_id');
create or replace function
disallow_system_plugin_deletion()
returns trigger
create or replace function disallow_system_plugin_deletion() returns trigger
as $$
begin
if old.public_id = 'pi_system' then