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

@@ -23,8 +23,7 @@ begin;
-- to include the name.
-- insert_host_catalog_subtype() is a before insert trigger
-- function for subtypes of host_catalog
create or replace function insert_host_catalog_subtype()
returns trigger
create or replace function insert_host_catalog_subtype() returns trigger
as $$
begin
insert into host_catalog
@@ -44,8 +43,7 @@ begin;
-- base table for host catalog to contain the updated names for each host catalog
-- in order to enforce uniqueness across all host catalogs, regardless of subtype,
-- in a given scope.
create function update_host_catalog_subtype()
returns trigger
create function update_host_catalog_subtype() returns trigger
as $$
begin
update host_catalog set name = new.name where public_id = new.public_id and new.name != name;