Office Liquibase Stored Proc

I read the best practices of educational program, especially for managing stored procedures:

Manage stored procedures. Try to keep a separate change log for stored procedures and use runOnChange = "true". This flag causes LiquiBase to check whether a change set has been changed. If so, Liquibase performs the change again.

What do they mean by "maintaining a separate change log for stored procedures"?

I usually have a catalog of releases related changes. Each change file is contained in master.xml.

What will be the directory structure following their advice?

+4
source share
1 answer

What we do is something like this:

\---liquibase
    |   changelog.xml
    |   procedures.xml
    |   
    +---procedures
            procedure_one.sql
            procedure_two.sql

changelog.xml procedures.xml. procedures.xml - :

<changeSet author="arthur" id="1" runOnChange="true" runInTransaction="true">
    <sqlFile path="procedures/procedure_one.sql"
             encoding="UTF-8"
             relativeToChangelogFile="true"
             endDelimiter=";"
             splitStatements="true"/>

</changeSet>

<changeSet author="arthur" id="2" runOnChange="true" runInTransaction="true">
    <sqlFile path="procedures/procedure_two.sql"
             encoding="UTF-8"
             relativeToChangelogFile="true"
             endDelimiter=";"
             splitStatements="true"/>

</changeSet>

, runInTransaction="true" , DDL.

SQL script create or replace. , create or replace, () drop procedure; create procedure ....

( includeAll) , (, ).

, SQL script changeSet procedures.xml

+6

Source: https://habr.com/ru/post/1657444/


All Articles