- Notifications
You must be signed in to change notification settings - Fork19
Fork of Liquibase MS SqlServer Extensions extension.
License
sabomichal/liquibase-mssql
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Fork of Liquibase MS SqlServer Extensions extension -https://liquibase.jira.com/wiki/display/CONTRIB/MS+SqlServer+Extensions.Pull requests welcome.
This fork adds following functionality:
- it is Liquibase 3.x ready (currently supported version: 3.4.2)
- supports stored procedures drop
- wraps flagged calls toloadData with "set identity insert on" and "set identity insert off" - see sample
- wraps flagged calls toinsert with "set identity insert on" and "set identity insert off" - see sample
- adds support to createIndex for specifying included columns and fill-factor
- adds support to addPrimaryKey for specifying fill-factor
To use, simply include the liquibase-mssql.jar file in your classpath. And add the ext namespace to your xml root node:
<databaseChangeLogxmlns="http://www.liquibase.org/xml/ns/dbchangelog"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
Extends insert data changeset with identityInsertEnabled property.
identityInsertEnabled - boolean - when set to true, allows explicit values to be inserted into the identity column of a table.
<databaseChangeLogxmlns="http://www.liquibase.org/xml/ns/dbchangelog"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd"><changeSetid="00000000000001"author="author"><createTabletableName="person"><columnname="id"autoIncrement="true"type="BIGINT"><constraintsnullable="false"primaryKey="true"primaryKeyName="pk_person_id"/></column><columnname="address"type="varchar(255)"/></createTable><ext:inserttableName="person"identityInsertEnabled="true"><columnname="id"valuenumeric="100" /><columnname="address"value="thing" /></ext:insert></changeSet></databaseChangeLog>
Extends load data changeset with identityInsertEnabled property.
identityInsertEnabled - boolean - when set to true, allows explicit values to be inserted into the identity column of a table.
...<ext:loadDataencoding="UTF-8"file="classpath:config/liquibase/persons.csv"separator=";"tableName="person"identityInsertEnabled="true" />...
Extends create index change with includedColumns and fillFactor properties. Properties clustered and descending are supported.
includedColumns - string - columns to be included in index (comma separated if multiple)
fillFactor - int (1 to 100) - specifies a percentage that indicates how full the Database Engine should make the leaf level of each index page during index creation or rebuild
...<ext:createIndexindexName="IDX_first_name"tableName="person"includedColumns="id, last_name, dob"fillFactor="50"> <columnname="first_name" /></ext:createIndex>...
Extends add primary key change with fillFactor property
fillFactor - int (1 to 100) - specifies a percentage that indicates how full the Database Engine should make the leaf level of each index page during index creation or rebuild
...<ext:addPrimaryKeycolumnNames="id"constraintName="pk_mytable_id"tableName="mytable"fillFactor="70" />...
Changes identity column check not to use global tables to enable usage of multiple Liquibase instances simultaneously with the same database (but with different schemas)
About
Fork of Liquibase MS SqlServer Extensions extension.
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors6
Uh oh!
There was an error while loading.Please reload this page.