<?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="nlevkovich">
        <sql dbms="mysql" endDelimiter=";;" splitStatements="true" stripComments="true">
            ALTER TABLE `art_relations`.`product_physical`
            ADD COLUMN `box_lot` INT(4) UNSIGNED NULL DEFAULT NULL AFTER `initial_stock`,
            ADD COLUMN `start_date` DATE NULL DEFAULT NULL AFTER `pricing`,
            ADD COLUMN `end_date` DATE NULL DEFAULT NULL AFTER `start_date`,
            ADD COLUMN `discount` DECIMAL(3,2) UNSIGNED NULL DEFAULT NULL AFTER `end_date`,
            ADD COLUMN `individual` ENUM('Y', 'N') NULL DEFAULT NULL AFTER `discount`,
            ADD COLUMN `explicit` ENUM('Y', 'N') NULL DEFAULT NULL AFTER `individual`,
            ADD COLUMN `exportable` ENUM('Y', 'N') NULL DEFAULT NULL AFTER `explicit`;;
        </sql>
        <rollback>
            ALTER TABLE `art_relations`.`product_physical`
            DROP COLUMN `exportable`,
            DROP COLUMN `explicit`,
            DROP COLUMN `discount`,
            DROP COLUMN `individual`,
            DROP COLUMN `end_date`,
            DROP COLUMN `start_date`,
            DROP COLUMN `box_lot`;;
        </rollback>
    </changeSet>
</databaseChangeLog>
