diff --git a/development/liquibase/odoo/sql/function_replicaIdentity.sql b/development/liquibase/odoo/sql/function_replicaIdentity.sql index 7e13025..d4140be 100644 --- a/development/liquibase/odoo/sql/function_replicaIdentity.sql +++ b/development/liquibase/odoo/sql/function_replicaIdentity.sql @@ -1,17 +1,14 @@ -DROP FUNCTION IF EXISTS replicaIdentity; +DROP FUNCTION IF EXISTS replicaIdentity(text[]); -GO - -CREATE FUNCTION replicaIdentity(tables text []) RETURNS void AS $$ - DECLARE m text; - BEGIN - FOREACH m IN ARRAY tables - LOOP - EXECUTE format($fmt$ - ALTER TABLE %I REPLICA IDENTITY FULL; - $fmt$, m); - END LOOP; - END; -$$ LANGUAGE plpgsql; - -GO \ No newline at end of file +CREATE OR REPLACE FUNCTION replicaIdentity(tables text[]) RETURNS void AS $$ +DECLARE + m text; +BEGIN + FOREACH m IN ARRAY tables + LOOP + EXECUTE format($fmt$ + ALTER TABLE %I REPLICA IDENTITY FULL; + $fmt$, m); + END LOOP; +END; +$$ LANGUAGE plpgsql; \ No newline at end of file