diff --git a/db/ddlutils/oracle/functions/register_migration_script.sql b/db/ddlutils/oracle/functions/register_migration_script.sql new file mode 100644 index 0000000000..027a10095a --- /dev/null +++ b/db/ddlutils/oracle/functions/register_migration_script.sql @@ -0,0 +1,47 @@ +CREATE OR REPLACE FUNCTION register_migration_script +( + p_script IN VARCHAR2 +) +RETURN VARCHAR2 +IS + PRAGMA AUTONOMOUS_TRANSACTION; + v_return VARCHAR2(255); + v_scriptid INTEGER; +BEGIN + v_return := p_script || ' successfully registered'; + UPDATE AD_System + SET LastMigrationScriptApplied=p_script + WHERE LastMigrationScriptApplied