<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.1.xsd">

    <!-- first include parameter values -->
    <include file="acm-database-changelog-properties.xml" relativeToChangelogFile="true"/>

    <!-- sequences are core objects with no dependencies, so they should be next. -->
    <includeAll path="classpath*:/com/armedia/acm/ddl/sequences" relativeToChangelogFile="false"/>
    <includeAll path="classpath*:/ddl/sequences" relativeToChangelogFile="false"/>

    <!-- tables next... The table changelogs can include indexes and primary keys,
         but should not include foreign keys. Check constraints can be either in the table DDL
         or the constraint ddl.
    -->
    <includeAll path="classpath*:/com/armedia/acm/ddl/tables" relativeToChangelogFile="false"/>
    <includeAll path="classpath*:/ddl/tables" relativeToChangelogFile="false"/>

    <!-- then constraints.  Foreign key constraint changelogs should go in these folders. -->
    <includeAll path="classpath*:/com/armedia/acm/ddl/constraints" relativeToChangelogFile="false"/>
    <includeAll path="classpath*:/ddl/constraints" relativeToChangelogFile="false"/>

    <!-- insertion logs: lookup table insertion logs-->
    <!--<includeAll path="classpath*:/com/armedia/acm/ddl/lookupTableInserts"  relativeToChangelogFile="false"/>-->

    <!-- packages before triggers, since triggers can call packages. Note we have some Oracle specific
         assumptions here.  When we support other databases we will have to configure Spring to load a
         database-specific changelog file. -->
    <includeAll path="classpath*:/com/armedia/acm/ddl/packageSpecs" relativeToChangelogFile="false"/>
    <includeAll path="classpath*:/ddl/packageSpecs" relativeToChangelogFile="false"/>

    <includeAll path="classpath*:/com/armedia/acm/ddl/packageBodies" relativeToChangelogFile="false"/>
    <includeAll path="classpath*:/ddl/packageBodies" relativeToChangelogFile="false"/>

    <!-- then triggers.  -->
    <includeAll path="classpath*:/com/armedia/acm/ddl/triggers" relativeToChangelogFile="false"/>
    <includeAll path="classpath*:/ddl/triggers" relativeToChangelogFile="false"/>

    <!-- data maintenance SQL scripts -->
    <includeAll path="classpath*:/com/armedia/acm/ddl/sql" relativeToChangelogFile="false"/>
    <includeAll path="classpath*:/ddl/sql" relativeToChangelogFile="false"/>

    <!-- drop constraints, triggers, columns should be executed after SQL scripts used for data migration -->
    <includeAll path="classpath*:/com/armedia/acm/ddl/drops" relativeToChangelogFile="false"/>
    <includeAll path="classpath*:/ddl/drops" relativeToChangelogFile="false"/>

    <!-- drop tables... needs to be last... in case any existing tables are dropped, when changelogs in constraint
         or trigger folders referred to them.  -->
    <includeAll path="classpath*:/com/armedia/acm/ddl/dropTables" relativeToChangelogFile="false"/>
    <includeAll path="classpath*:/ddl/dropTables" relativeToChangelogFile="false"/>

    <!-- other types of database objects can be included here as the need arises.
         NOTE: Liquibase fails if it finds no objects.  So only add more object type patterns when
         you need to create them.
    -->
    <includeAll path="classpath*:/com/armedia/acm/dml" relativeToChangelogFile="false"/>
    <includeAll path="classpath*:/dml" relativeToChangelogFile="false"/>

</databaseChangeLog>

