<?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">
            USE art_relations;;

            ALTER TABLE artist_yt_delivery_settings
                ADD channel_id VARCHAR(50) DEFAULT NULL COMMENT 'YouTube Channel ID',
                ADD yt_channel_type ENUM('name', 'id') DEFAULT 'name' NOT NULL COMMENT 'Defines the Channel Type used in the channel_name column.';;
        </sql>
        <rollback>
            <sql dbms="mysql" endDelimiter=";;" splitStatements="true" stripComments="true">

                USE art_relations;;
                
                ALTER TABLE artist_yt_delivery_settings
                    DROP COLUMN channel_id,
                    DROP COLUMN yt_channel_type;;
            </sql>
        </rollback>
    </changeSet>
</databaseChangeLog>
