SplitTableSplit table on two tables (with surrogate key only). Sample Code Block |
---|
<changeSet author="Tomek" id="0">
<createTable tableName="TABLE1">
<column name="one" type="integer"></column>
<column name="two" type="varchar(10)"></column>
<column name="three" type="number"></column>
<column name="four" type="number"></column>
</createTable>
</changeSet>
<changeSet author="tomek" id="1" context="transition">
<ora:splitTable primaryKeyColumnName="three_id"
splitTableName="TABLE1"
newTableName="TABLE2"
columnNameList="three,four"/>
</changeSet>
|
Available Attributes splitTableName | Name of the split table [required] | splitTableSchemaName | Name of the split table schema | newTableName | Name of the new table [required] | newTableSchemaName | Name of the new table schema | columnNameList | List of column to move to the second table [required] | primaryKeyColumnName | Name of primary key column in new table (only surrogate key) [required] |
Automatic Rollback Support : NORolling Upgrade Support : YESsplitTable tag supports rolling upgrades through changeSet contexts. There are 3 available contexts: - basic - no context, refeactoring without rolling upgrade
- transition - move database to transition state (two version of aplication work on the same database)
- resulting - move databese to resulting (final) state from transition state
WARNING- Liquibase 2.0 doesn't support numeric precission(e.g. NUMBER(10,3)).
- createTrigger extension is needed.
NOTE"rolling upgrade" - the process of incrementally taking down parts of the system for upgrade, without affecting the overall functionality. (http://en.wikipedia.org/wiki/Downtime) |