Skip to content

Instantly share code, notes, and snippets.

@stingh711
Created March 22, 2012 10:11
Show Gist options
  • Save stingh711/2157546 to your computer and use it in GitHub Desktop.
Save stingh711/2157546 to your computer and use it in GitHub Desktop.
Liquibase change log
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">
<changeSet author="sting (generated)" id="1307605540491-1">
<createTable tableName="ADDRESSES">
<column name="ID" type="INT">
<constraints nullable="false" primaryKey="true" primaryKeyName="CONSTRAINT_D"/>
</column>
<column name="NAME" type="VARCHAR(255)"/>
</createTable>
</changeSet>
<changeSet author="sting (generated)" id="1307605540491-2">
<createTable tableName="PERSON">
<column name="ID" type="INT">
<constraints nullable="false" primaryKey="true" primaryKeyName="CONSTRAINT_8"/>
</column>
<column name="NAME" type="VARCHAR(255)"/>
<column name="ADDRESS_ID" type="INT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
<changeSet author="sting (generated)" id="1307605540491-3">
<addForeignKeyConstraint baseColumnNames="ADDRESS_ID" baseTableName="PERSON" baseTableSchemaName="PUBLIC" constraintName="CONSTRAINT_8C" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ID" referencedTableName="ADDRESSES" referencedTableSchemaName="PUBLIC" referencesUniqueColumn="false"/>
</changeSet>
</databaseChangeLog>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment