liquibase.examples.xml.example-changelog.xml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of liquibase-core Show documentation
Show all versions of liquibase-core Show documentation
Liquibase is a tool for managing and executing database changes.
The newest version!
<?xml version="1.0" encoding="UTF-8"?> <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:pro="http://www.liquibase.org/xml/ns/pro" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd http://www.liquibase.org/xml/ns/pro http://www.liquibase.org/xml/ns/pro/liquibase-pro-latest.xsd "> <changeSet id="1" author="your.name" labels="example-label" context="example-context"> <comment>example-comment</comment> <createTable tableName="person"> <column name="id" type="int" autoIncrement="true"> <constraints primaryKey="true" nullable="false"/> </column> <column name="name" type="varchar(50)"> <constraints nullable="false"/> </column> <column name="address1" type="varchar(50)"/> <column name="address2" type="varchar(50)"/> <column name="city" type="varchar(30)"/> </createTable> </changeSet> <changeSet id="2" author="your.name" labels="example-label" context="example-context"> <comment>example-comment</comment> <createTable tableName="company"> <column name="id" type="int" autoIncrement="true"> <constraints primaryKey="true" nullable="false"/> </column> <column name="name" type="varchar(50)"> <constraints nullable="false"/> </column> <column name="address1" type="varchar(50)"/> <column name="address2" type="varchar(50)"/> <column name="city" type="varchar(30)"/> </createTable> </changeSet> <changeSet id="3" author="other.dev" labels="example-label" context="example-context"> <comment>example-comment</comment> <addColumn tableName="person"> <column name="country" type="varchar(2)"/> </addColumn> </changeSet> </databaseChangeLog>