<?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="rajan-sharma">
        <sql dbms="mysql" endDelimiter=";;" splitStatements="true" stripComments="true">
        <![CDATA[
            UPDATE release_rating_advisory_system
                SET rating_advisory_system_id = 625
                    WHERE rating_advisory_system_id = 624;;
            DELETE FROM rating_advisory_system WHERE rating_advisory_system_id=624;;
        ]]>
        </sql>
        <rollback>
            <![CDATA[
                INSERT INTO rating_advisory_system(system, video_type, type, code, description)
                    VALUES("ph-movies", "film", "rating", "PG-13", "Parental Guidance");;
                UPDATE release_rating_advisory_system
                    SET rating_advisory_system_id = LAST_INSERT_ID()
                        WHERE release_rating_advisory_system_id IN (364421,397916,432732,470813,472186,474694,474764,476906,478163,478500,478644);;
            ]]>
        </rollback>
    </changeSet>
</databaseChangeLog>
