<?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">
            CREATE TABLE IF NOT EXISTS `youtube_report_generation_log` (
                `request_report_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
                `search_params` TEXT NOT NULL,
                `report_type` ENUM('Asset', 'Claims/UGC') NOT NULL,
                `report_status` ENUM('queued', 'generating', 'complete', 'error') NOT NULL,
                `user_id` INT(11) UNSIGNED DEFAULT NULL,
                `label_id` INT(11) UNSIGNED DEFAULT NULL,
                `date_added` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
                `last_updated` TIMESTAMP NULL DEFAULT NULL,
                `file_name` VARCHAR(255),
                `file_path` TEXT DEFAULT NULL,
                PRIMARY KEY (`request_report_id`)
            ) ENGINE=INNODB DEFAULT CHARSET=utf8;;

        </sql>
        <rollback>
            <sql dbms="mysql" endDelimiter=";;" splitStatements="true" stripComments="true">
                DROP TABLE IF EXISTS `youtube_report_generation_log`;;
            </sql>
        </rollback>
    </changeSet>
</databaseChangeLog>
