Table of Contents |
---|
...
- Open a project
- Click the Settings tab
- Open the Change Log Property Substitution section.
- Click Manage Properties.
Add or edit property keys and values, along with the contexts and labels to use to determine when to apply the property substitution.
Info title Note Property statements that use the same name and value must also have a context or label set to differentiate them. That difference expresses the conditions where each value is used.
You cannot create more than one property setting for the same condition (contexts and labels settings).
- If you provided values for Substitution Mode and Target, you must also select Reverse Substitute During diffChangelog for the project. See the section "Reverse Substitute During diffChangelog Option".
- Click Save.
...
The property
seq.incrementBy
is set in the changelog. Note that substitution mode set toalways
andtarget
is specified.
Using the GUI:
Property appearance in the changelog:Code Block <property name="seq.minValueincrementBy" value="2" context="REF" appdba:substitutionMode="always" appdaba:target=\createSequence\@incrementBy/>
- Reverse Substitute During diffChangelog project setting is enabled.
A script in the ddl folder contains the following code for creating a sequence. It uses the property
${seq.incrementBy
} rather than a literal value, because you want to use a different value for different Datical contexts.Code Block CREATE SEQUENCE century_years MINVALUE 1 MAXVALUE 100 START WITH 1 INCREMENT BY ${seq.incrementBy} CACHE 20;
When the script is packaged, the property is evaluated during packaging to
seq.incrementBy
, which is set in the property to 2. The resulting changesetCode Block <changeSet author="datical" context="REF" created="Thu Sep 20 09:09:34 CDT 2018" id="create_seq_REF" objectQuotingStrategy="QUOTE_ALL_OBJECTS"> <createSequence cacheSize="20" incrementBy="2" maxValue="100" minValue="1" sequenceName="century_years" startValue="1"/> </changeSet>
During reverse substitution, the property expression
${seq.minValueincrementBy}
is re-substituted forREF
for the value "2" that was placed in the changeset. The changeset includes the following string:Code Block incrementBy=${seq.incrementBy}
...
- How To: Configure a Project Using Oracle Schemas for DBdefs
- Video 12 "Introduction to Subtitution Properties": How Liquibase Enterprise (fka DaticalDB) Works