changelogs in XML Format

Liquibase supports XML as a format for storing your changelog files. There is more information about the XML format in the FAQ

XSD support

XSD schema definitions are available for each Liquibase version. Since there are no changelog format changes in patch versions, there are only xsd files that correspond to major.minor versions.

See the XML Schema Definitions topic for more information.

Liquibase extension XSDs

If you use a Liquibase extension that includes additional change tags, check the extension documentation to find out if they provide a XSD. If they do not, you can use the xsd at dbchangelog-ext.xsd which allows any nested tag and attribute.




<?xml version="1.0" encoding="UTF-8"?>  


        <runningAs  username="liquibase"/>  

    <changeSet  id="1"  author="nvoxland">  
        <createTable  tableName="person">  
            <column  name="id"  type="int"  autoIncrement="true">  
                <constraints  primaryKey="true"  nullable="false"/>  
            <column  name="firstname"  type="varchar(50)"/>  
            <column  name="lastname"  type="varchar(50)">  
                <constraints  nullable="false"/>  
            <column  name="state"  type="char(2)"/>  

    <changeSet  id="2"  author="nvoxland">  
        <addColumn  tableName="person">  
            <column  name="username"  type="varchar(8)"/>  
    <changeSet  id="3"  author="nvoxland">  
            existingTableName="person"  existingColumnName="state"  
            newTableName="state"  newColumnName="id"  newColumnDataType="char(2)"/>  


Related Links