<?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"
        xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
        xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd
        http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
    <changeSet id="1" author="dollyratanghayra">
        <sql dbms="mysql" endDelimiter=";;" splitStatements="true" stripComments="true">
            USE art_relations_log;;
            DROP TABLE IF EXISTS art_relations_log.release_subgenre_log;;

            CREATE TABLE release_subgenre_log (
                log_timestamp timestamp NULL DEFAULT NULL,
                log_action enum('insert','update','delete') DEFAULT NULL,
                id int(10) unsigned NOT NULL,
                upc bigint(20) unsigned DEFAULT NULL,
                subgenre_id smallint(5) unsigned NOT NULL,
                release_id int(11) unsigned NOT NULL,
                KEY id (id),
                KEY release_id (release_id),
                KEY subgenre_id (subgenre_id),
                KEY upc (upc)
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='audit log for release_subgenre table';;
        </sql>
        <rollback>
            <sql dbms="mysql" endDelimiter=";;" splitStatements="true" stripComments="true">
                USE art_relations_log;;
                DROP TABLE IF EXISTS art_relations_log.release_subgenre_log;;
            </sql>
        </rollback>
    </changeSet>
</databaseChangeLog>
