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

            DROP TABLE IF EXISTS `ROLLBACK-DISTRO-1303_youtube_channel_video_status`;;

            CREATE TABLE `ROLLBACK-DISTRO-1303_youtube_channel_video_status`
            SELECT * FROM youtube_channel_video_status
            WHERE youtube_video_id IN ('hqUlsVUeQMo', 'bQ1ANGmWGYM', 'S77k7OakHDU', 'var-UhsnG_4', 'gp-G59Obgg4', 'vrX634rao0Q', 'SJurkvqlK_g', 't2h2kyk7sfY', 'ezwmYk2VlwQ', 'XZAkTBiarEI', 'nPUJuycIcyQ', 'fnwA57Kcx8I', 'qu0q0Pr3gwA', 'i8t5OZayFVE', 'aWlazEAU1Vg', 'oSpMue1lAD8', 'IV8wHXa1kvo', 'vMkbBftjsI0', 'ratuVEpjt6o', 'UvPD8czgB9g', 'gPh_AsHBD3w', 'TgcXCHUcvNw', 'isDOUmO9v0A', 'pGF8UpD38Ds', 'jCooVvYj1W4', 'TjeJXJFTJFI', 'WbkzbaxYS2s', 'qjbrmuz6REY', 'j4CTpytgNpg', 'Zq75Hn2QFSc', 'XWngRN0UHaA', 'oD-E1oYvKdI', 'tQ1dwUAM3T4', 'fEtr0-vOUN8');;

            DELETE yt.* FROM youtube_channel_video_status yt
            INNER JOIN `ROLLBACK-DISTRO-1303_youtube_channel_video_status` rp1303 ON rp1303.youtube_video_id = yt.youtube_video_id;;
        </sql>
        <rollback>
            <sql dbms="mysql" endDelimiter=";;" splitStatements="true" stripComments="true">
                USE art_relations;;
                
                INSERT INTO youtube_channel_video_status
                SELECT * FROM `ROLLBACK-DISTRO-1303_youtube_channel_video_status`;;
            </sql>
        </rollback>
    </changeSet>
</databaseChangeLog>
