Documentation Home
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" 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.5.xsd http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
    <changeSet author="jfischer" id="1">
        <createTable tableName="BLC_AUDIT_HEADER">
            <column name="AUDIT_HEADER_ID" type="BIGINT">
                <constraints nullable="false"/>
            </column>
            <column name="USER_ID" type="BIGINT"/>
            <column name="USER_DESCRIPTION" type="VARCHAR(255)"/>
            <column name="USER_TYPE" type="VARCHAR(255)"/>
            <column name="MASQ_USER_ID" type="BIGINT"/>
            <column name="MASQ_USER_DESCRIPTION" type="VARCHAR(255)"/>
            <column name="MASQ_USER_TYPE" type="VARCHAR(255)"/>
            <column name="USER_IP_ADDRESS" type="VARCHAR(255)"/>
            <column name="NODE_TYPE" type="VARCHAR(255)"/>
            <column name="NODE_IP_ADDRESS" type="VARCHAR(255)"/>
            <column name="EVENT_TIME" type="TIMESTAMP"/>
            <column name="ITEM_TYPE" type="VARCHAR(255)"/>
            <column name="ITEM_SHORT_TYPE" type="VARCHAR(255)"/>
            <column name="ITEM_TABLE" type="VARCHAR(255)"/>
            <column name="ITEM_ID" type="VARCHAR(255)"/>
            <column name="ITEM_OPERATION_TYPE" type="VARCHAR(255)"/>
            <column name="SITE_DISC" type="BIGINT"/>
        </createTable>
    </changeSet>
    <changeSet author="jfischer" id="2">
        <addPrimaryKey columnNames="AUDIT_HEADER_ID" constraintName="PRIMARY" tableName="BLC_AUDIT_HEADER"/>
    </changeSet>
    <changeSet author="jfischer" id="3">
        <createIndex indexName="AUDIT_USER_ID_IDX" tableName="BLC_AUDIT_HEADER">
            <column name="USER_ID"/>
        </createIndex>
        <createIndex indexName="AUDIT_DESC_IDX" tableName="BLC_AUDIT_HEADER">
            <column name="USER_DESCRIPTION"/>
        </createIndex>
        <createIndex indexName="AUDIT_USER_TYPE_IDX" tableName="BLC_AUDIT_HEADER">
            <column name="USER_TYPE"/>
        </createIndex>
        <createIndex indexName="AUDIT_MASQ_USER_ID_IDX" tableName="BLC_AUDIT_HEADER">
            <column name="MASQ_USER_ID"/>
        </createIndex>
        <createIndex indexName="AUDIT_MASQ_DESC_IDX" tableName="BLC_AUDIT_HEADER">
            <column name="MASQ_USER_DESCRIPTION"/>
        </createIndex>
        <createIndex indexName="AUDIT_MASQ_USER_TYPE_IDX" tableName="BLC_AUDIT_HEADER">
            <column name="MASQ_USER_TYPE"/>
        </createIndex>
        <createIndex indexName="AUDIT_ITEM_SHORT_TYPE_IDX" tableName="BLC_AUDIT_HEADER">
            <column name="ITEM_SHORT_TYPE"/>
        </createIndex>
        <createIndex indexName="AUDIT_ITEM_TABLE_IDX" tableName="BLC_AUDIT_HEADER">
            <column name="ITEM_TABLE"/>
        </createIndex>
        <createIndex indexName="AUDIT_ITEM_ID_IDX" tableName="BLC_AUDIT_HEADER">
            <column name="ITEM_ID"/>
        </createIndex>
    </changeSet>
    <changeSet author="jfischer" id="4">
        <createTable tableName="BLC_AUDIT_HEADER_ATTRIBUTE">
            <column name="AUDIT_HEADER_ATTRIBUTE_ID" type="BIGINT">
                <constraints nullable="false"/>
            </column>
            <column name="NAME" type="VARCHAR(255)"/>
            <column name="VALUE" type="VARCHAR(255)"/>
            <column name="AUDIT_HEADER_ID" type="BIGINT"/>
        </createTable>
    </changeSet>
    <changeSet author="jfischer" id="5">
        <addPrimaryKey columnNames="AUDIT_HEADER_ATTRIBUTE_ID" constraintName="PRIMARY" tableName="BLC_AUDIT_HEADER_ATTRIBUTE"/>
    </changeSet>
    <changeSet author="jfischer" id="6">
        <addForeignKeyConstraint baseColumnNames="AUDIT_HEADER_ID" baseTableName="BLC_AUDIT_HEADER_ATTRIBUTE" constraintName="FKAUDITHEADERATTR" deferrable="false" initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION" referencedColumnNames="AUDIT_HEADER_ID" referencedTableName="BLC_AUDIT_HEADER"/>
    </changeSet>
    <changeSet author="jfischer" id="7">
        <createTable tableName="BLC_AUDIT_ITEM">
            <column name="AUDIT_ITEM_ID" type="BIGINT">
                <constraints nullable="false"/>
            </column>
            <column name="ITEM_PROPERTY" type="VARCHAR(255)"/>
            <column name="ITEM_COLUMN" type="VARCHAR(255)"/>
            <column name="AUDIT_HEADER_ID" type="BIGINT"/>
            <column name="HIT_COUNT" type="BIGINT"/>
            <column name="TYPE_DISC" type="VARCHAR(31)"/>
            <column name="SITE_DISC" type="BIGINT"/>
            <column name="ITEM_SANITIZED" type="CHAR(1)"/>
        </createTable>
    </changeSet>
    <changeSet author="jfischer" id="8">
        <addPrimaryKey columnNames="AUDIT_ITEM_ID" constraintName="PRIMARY" tableName="BLC_AUDIT_ITEM"/>
    </changeSet>
    <changeSet author="jfischer" id="9">
        <createIndex indexName="AUDIT_ITEM_PROPERTY_IDX" tableName="BLC_AUDIT_ITEM">
            <column name="ITEM_PROPERTY"/>
        </createIndex>
        <createIndex indexName="AUDIT_ITEM_COLUMN_IDX" tableName="BLC_AUDIT_ITEM">
            <column name="ITEM_COLUMN"/>
        </createIndex>
    </changeSet>
    <changeSet author="jfischer" id="10">
        <addForeignKeyConstraint baseColumnNames="AUDIT_HEADER_ID" baseTableName="BLC_AUDIT_ITEM" constraintName="FKAUDITHEADERITEM" deferrable="false" initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION" referencedColumnNames="AUDIT_HEADER_ID" referencedTableName="BLC_AUDIT_HEADER"/>
    </changeSet>
    <changeSet author="jfischer" id="11">
        <createTable tableName="BLC_AUDIT_ITEM_ATTRIBUTE">
            <column name="AUDIT_ITEM_ATTRIBUTE_ID" type="BIGINT">
                <constraints nullable="false"/>
            </column>
            <column name="NAME" type="VARCHAR(255)"/>
            <column name="VALUE" type="VARCHAR(255)"/>
            <column name="AUDIT_ITEM_ID" type="BIGINT"/>
        </createTable>
    </changeSet>
    <changeSet author="jfischer" id="12">
        <addPrimaryKey columnNames="AUDIT_ITEM_ATTRIBUTE_ID" constraintName="PRIMARY" tableName="BLC_AUDIT_ITEM_ATTRIBUTE"/>
    </changeSet>
    <changeSet author="jfischer" id="13">
        <addForeignKeyConstraint baseColumnNames="AUDIT_ITEM_ID" baseTableName="BLC_AUDIT_ITEM_ATTRIBUTE" constraintName="FKAUDITITEMATTR" deferrable="false" initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION" referencedColumnNames="AUDIT_ITEM_ID" referencedTableName="BLC_AUDIT_ITEM"/>
    </changeSet>
    <changeSet author="jfischer" id="14">
        <createTable tableName="BLC_AUDIT_VALUE_CHUNK">
            <column name="AUDIT_VALUE_CHUNK_ID" type="BIGINT">
                <constraints nullable="false"/>
            </column>
            <column name="CHUNK" type="VARCHAR(255)"/>
            <column name="AUDIT_ITEM_ID" type="BIGINT"/>
        </createTable>
    </changeSet>
    <changeSet author="jfischer" id="15">
        <addPrimaryKey columnNames="AUDIT_VALUE_CHUNK_ID" constraintName="PRIMARY" tableName="BLC_AUDIT_VALUE_CHUNK"/>
    </changeSet>
    <changeSet author="jfischer" id="16">
        <addForeignKeyConstraint baseColumnNames="AUDIT_ITEM_ID" baseTableName="BLC_AUDIT_VALUE_CHUNK" constraintName="FKAUDITITEMCHUNK" deferrable="false" initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION" referencedColumnNames="AUDIT_ITEM_ID" referencedTableName="BLC_AUDIT_ITEM"/>
    </changeSet>
    <changeSet author="jfischer" id="17">
        <createTable tableName="BLC_AUDIT_VALUE_CHUNK_BEFORE">
            <column name="AUDIT_VALUE_CHUNK_BEFORE_ID" type="BIGINT">
                <constraints nullable="false"/>
            </column>
            <column name="CHUNK" type="VARCHAR(255)"/>
            <column name="AUDIT_ITEM_ID" type="BIGINT"/>
        </createTable>
    </changeSet>
    <changeSet author="jfischer" id="18">
        <addPrimaryKey columnNames="AUDIT_VALUE_CHUNK_BEFORE_ID" constraintName="PRIMARY" tableName="BLC_AUDIT_VALUE_CHUNK_BEFORE"/>
    </changeSet>
    <changeSet author="jfischer" id="19">
        <addForeignKeyConstraint baseColumnNames="AUDIT_ITEM_ID" baseTableName="BLC_AUDIT_VALUE_CHUNK_BEFORE" constraintName="FKAUDITITEMCHUNKBEFORE" deferrable="false" initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION" referencedColumnNames="AUDIT_ITEM_ID" referencedTableName="BLC_AUDIT_ITEM"/>
    </changeSet>
    <changeSet author="jfischer" id="20">
        <createTable tableName="BLC_AUDIT_VALUE_CHUNK_AFTER">
            <column name="AUDIT_VALUE_CHUNK_AFTER_ID" type="BIGINT">
                <constraints nullable="false"/>
            </column>
            <column name="CHUNK" type="VARCHAR(255)"/>
            <column name="AUDIT_ITEM_ID" type="BIGINT"/>
        </createTable>
    </changeSet>
    <changeSet author="jfischer" id="21">
        <addPrimaryKey columnNames="AUDIT_VALUE_CHUNK_AFTER_ID" constraintName="PRIMARY" tableName="BLC_AUDIT_VALUE_CHUNK_AFTER"/>
    </changeSet>
    <changeSet author="jfischer" id="22">
        <addForeignKeyConstraint baseColumnNames="AUDIT_ITEM_ID" baseTableName="BLC_AUDIT_VALUE_CHUNK_AFTER" constraintName="FKAUDITITEMCHUNKAFTER" deferrable="false" initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION" referencedColumnNames="AUDIT_ITEM_ID" referencedTableName="BLC_AUDIT_ITEM"/>
    </changeSet>
</databaseChangeLog>