<?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=" rsatsangi">
        <sql dbms="mysql" endDelimiter=";;" splitStatements="true" stripComments="true">
            <![CDATA[
            CREATE TABLE `distribution_format` (
              `distribution_format_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
              `name` varchar(128) NOT NULL,
              `display_flag` enum('Y','N') DEFAULT 'Y',
              `context_type` enum('physical', 'digital') DEFAULT 'physical',
              PRIMARY KEY (`distribution_format_id`)
            ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='Holds distribution format names';;


            INSERT INTO `distribution_format` (`distribution_format_id`, `name`, `display_flag`)
            VALUES
                (1, 'DIGITAL', 'Y'),
                (2, 'CD', 'Y'),
                (3, 'LP', 'Y'),
                (4, 'DVD', 'Y'),
                (5, '3CD + DVD', 'Y'),
                (6, '2LP', 'Y'),
                (7, 'Blu Ray', 'Y'),
                (8, '4CD', 'Y'),
                (9, 'BOX SET', 'Y'),
                (10, 'Cassette', 'Y'),
                (11, '4CD BOXSET', 'Y'),
                (12, '2CD', 'Y'),
                (13, 'BOX SET - 2CD, DVD & LP', 'Y'),
                (14, '12\" + 7\"', 'Y'),
                (15, 'DVD+BLU RAY + CD', 'Y'),
                (16, 'CD+DVD', 'Y'),
                (17, '7\"', 'Y'),
                (18, '12\"', 'Y'),
                (19, 'LP+CD', 'Y'),
                (20, '2CD + 3 x 7\" Vinyl', 'Y'),
                (21, 'Book', 'Y'),
                (22, '10\"', 'Y'),
                (23, 'LP BOXSET', 'Y'),
                (24, '2CD + DVD', 'Y'),
                (25, '3CD', 'Y'),
                (26, 'CD + TSHIRT + WRISTBAND', 'Y'),
                (27, 'CD + T Shirt + Merch', 'Y'),
                (28, 'CD + BOOK', 'Y'),
                (29, '8CD', 'Y'),
                (30, '4LP', 'Y'),
                (31, '2DVD + CD', 'Y'),
                (32, 'Book and 10\"', 'Y'),
                (33, 'BLU RAY + 2 DVD', 'Y'),
                (34, 'LP + 12\"', 'Y'),
                (35, 'LP + 7\"', 'Y'),
                (36, '3LP', 'Y'),
                (37, 'Book + 7\"', 'Y'),
                (38, 'Picture Disc Vinyl', 'Y'),
                (39, '2LP + 10\"', 'Y'),
                (40, 'DVD', 'Y'),
                (41, 'DVD+CD', 'Y'),
                (42, 'Blu-Ray+CD', 'Y'),
                (43, '5CD + DVD', 'Y'),
                (44, '2x10\"', 'Y'),
                (45, '4CD + DVD', 'Y'),
                (46, 'CD + T Shirt', 'Y'),
                (47, '7\" Flexi', 'Y'),
                (48, '5CD', 'Y'),
                (49, 'USB Lighter Sleeve', 'Y'),
                (50, 'DVD + T-Shirt', 'Y'),
                (51, '6CD', 'Y'),
                (52, '2x12\"', 'Y'),
                (53, '3x12\"', 'Y'),
                (54, 'DVD + 2CD', 'Y'),
                (55, '7\" +CD', 'Y'),
                (56, '3 x Cassette', 'Y');;

            UPDATE `distribution_format` SET `context_type` = 'digital' WHERE distribution_format_id = 1 LIMIT 1;;
        ]]>
        </sql>
        <rollback>
            DROP TABLE IF EXISTS `distribution_format`;;
        </rollback>
    </changeSet>
</databaseChangeLog>
