<?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="vpatel">
        <sql dbms="mysql" endDelimiter=";;" splitStatements="true" stripComments="true">
            USE `art_relations_log`;;

            DROP TABLE IF EXISTS `art_relations_log`.`mkt_priority_log`;;

            CREATE TABLE `mkt_priority_log` (
            `log_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
            `log_timestamp` timestamp NULL DEFAULT NULL,
            `log_action` enum('insert','update','delete') DEFAULT NULL,
            `id` mediumint(8) unsigned NOT NULL COMMENT 'Primary Key.',
            `upc` bigint(20) unsigned NOT NULL COMMENT 'Foreign key to releases table.',
            `priority` enum('a','b') NOT NULL DEFAULT 'b' COMMENT 'Marketing priority number of the release.',
            `country_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Foreign key to country table.',
            `release_id` int(11) unsigned NOT NULL DEFAULT '0',
            PRIMARY KEY (`log_id`),
            KEY `mkt_priority_id` (`id`),
            KEY `upc` (`upc`)
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='changelog for mkt_priority table';;
        </sql>
        <rollback>
            <sql dbms="mysql" endDelimiter=";;" splitStatements="true" stripComments="true">
                DROP TABLE IF EXISTS `art_relations_log`.`mkt_priority_log`;;
            </sql>
        </rollback>
    </changeSet>
    <changeSet id="2" author="vpatel">
        <sql dbms="mysql" endDelimiter=";;" splitStatements="true" stripComments="true">
            USE `art_relations_log`;;

            DROP TABLE IF EXISTS `art_relations_log`.`track_instant_grat_log`;;

            CREATE TABLE `track_instant_grat_log` (
            `log_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
            `log_timestamp` timestamp NULL DEFAULT NULL,
            `log_action` enum('insert','update','delete') DEFAULT NULL,
            `id` int(10) unsigned NOT NULL,
            `customer_master_master_id` smallint(5) unsigned DEFAULT NULL,
            `unique_track_id` int(10) unsigned DEFAULT NULL,
            `active` enum('Y','N') DEFAULT 'Y',
            `date` datetime DEFAULT NULL,
            `added_by_user_id` int(10) DEFAULT NULL,
            `added_by_user_type` enum('oa','alw') DEFAULT 'oa',
            `date_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
            PRIMARY KEY (`log_id`),
            KEY `FK_id` (`id`),
            KEY `FK_track_instant_grat_cmm` (`customer_master_master_id`),
            KEY `FK_track_instant_grat` (`unique_track_id`)
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='changelog for track_instant_grat table';;
        </sql>
        <rollback>
            <sql dbms="mysql" endDelimiter=";;" splitStatements="true" stripComments="true">
                DROP TABLE IF EXISTS `art_relations_log`.`track_instant_grat_log`;;
            </sql>
        </rollback>
    </changeSet>
</databaseChangeLog>
