<?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="snaidu">
        <sql dbms="mysql" endDelimiter=";;" splitStatements="true" stripComments="false">

            DROP TABLE IF EXISTS `ROLLBACK-DIS-304-youtube_channel_video_status`;;

            CREATE TABLE `ROLLBACK-DIS-304-youtube_channel_video_status`
            SELECT * FROM youtube_channel_video_status
            WHERE youtube_video_id IN ('kK2ZEX2MCGM', '2V_nKaHEnbo', '2HEsevGMK_M', '2e3S_vjtyAs', 'Yv6BOMaG5Ec', '9Tgs_7OnPDM', 'rxBlFuxurno', 'fQ29V_7ipCQ', 'e_DXahptzxo', '1BtCpv-BJNU', 'WRLwjHcYqWI', 'H4ZDSigJFTY', 'qyExwVVpcbA', '_xJzlqQ7mKY', 'asYO7ibtmak', 'kK2ZEX2MCGM', '2V_nKaHEnbo', '2HEsevGMK_M', '2e3S_vjtyAs', 'Yv6BOMaG5Ec', '9Tgs_7OnPDM', 'rxBlFuxurno', 'fQ29V_7ipCQ', 'e_DXahptzxo', '1BtCpv-BJNU', 'WRLwjHcYqWI', 'H4ZDSigJFTY', 'qyExwVVpcbA', '_xJzlqQ7mKY', 'asYO7ibtmak', 'hMlyI0vlFnU', 'YXXNSuJdkqk', '-Jk9k1fwzVs', 'oUHmccnNwW0', 'OeEIxZf6D68', 'oU0se5aDUD0', 'kA24EFANw6U');;

            DELETE yt.* FROM youtube_channel_video_status yt
            INNER JOIN `ROLLBACK-DIS-304-youtube_channel_video_status` rb ON rb.youtube_video_id = yt.youtube_video_id;;
        </sql>
        <rollback>
            <sql dbms="mysql" endDelimiter=";;" splitStatements="true" stripComments="true">

                INSERT INTO youtube_channel_video_status
                SELECT * FROM `ROLLBACK-DIS-304-youtube_channel_video_status`;;

                DROP TABLE `ROLLBACK-DIS-304-youtube_channel_video_status`;;
            </sql>
        </rollback>
    </changeSet>
</databaseChangeLog>
