<?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="pshrivastava">
        <sql dbms="mysql" endDelimiter=";;" splitStatements="true" stripComments="true">
           USE art_relations_log;;
           CREATE TABLE product_physical_log (
             log_timestamp TIMESTAMP NULL DEFAULT NULL,
             log_action ENUM('insert','update','delete') DEFAULT NULL,
             id INT(11) UNSIGNED NOT NULL,
             release_id INT(11) UNSIGNED NOT NULL,
             packaging_id TINYINT(3) DEFAULT NULL,
             exclusive_for VARCHAR(128) DEFAULT NULL,
             initial_stock INT(11) DEFAULT NULL,
             box_lot INT(4) UNSIGNED DEFAULT NULL,
             pricing TEXT,
             end_date DATE DEFAULT NULL,
             discount TEXT,
             individual ENUM('Y','N') DEFAULT NULL,
             explicit ENUM('Y','N') DEFAULT NULL,
             exportable ENUM('Y','N') DEFAULT NULL,
             units_per_set TINYINT(3) UNSIGNED DEFAULT NULL,
             wholesale_price DECIMAL(6,2) UNSIGNED DEFAULT NULL,
             KEY (id)
           )ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='audit log for product_physical table';;
        </sql>
        <rollback>
            <sql dbms="mysql" endDelimiter=";;" splitStatements="true" stripComments="true">
            USE art_relations_log;;
            DROP TABLE IF EXISTS product_physical_log;;
            </sql>
        </rollback>
    </changeSet>
</databaseChangeLog>
