Skip to content

Instantly share code, notes, and snippets.

@ljnelson
Created October 18, 2014 18:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ljnelson/d4266aba928fc0c6367a to your computer and use it in GitHub Desktop.
Save ljnelson/d4266aba928fc0c6367a to your computer and use it in GitHub Desktop.
name-jpa example for Liquibase blog post
<?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"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.2.xsd"
logicalFilePath="name-jpa">
<changeSet logicalFilePath="name-jpa" id="Initial changeSet" author="ljnelson">
<empty/>
</changeSet>
<changeSet logicalFilePath="name-jpa" id="NAME table creation" author="ljnelson">
<createTable tableName="NAME">
<column name="ID" type="BIGINT">
<constraints primaryKey="true" primaryKeyName="PK_NAME"/>
</column>
<column name="VERSION" type="SMALLINT" defaultValueNumeric="1">
<constraints nullable="false"/>
</column>
<column name="TYPE" type="NVARCHAR(40)">
<constraints nullable="false"/>
</column>
<column name="VALUE" type="NVARCHAR(40)">
<constraints nullable="false"/>
</column>
<column name="PERSON_ID" type="BIGINT">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
</databaseChangeLog>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment