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

            INSERT INTO rating_advisory_system
                (system, video_type, `type`, `code`, description) 
            VALUES 
                ('kh-movies','film','rating','R-18','Restricted. Under 18 requires a parent or guardian'),
                ('kh-movies','film','rating','NC-15','Adult. Children under 15 not admitted'),
                ('tw-movies','film','rating','輔15級','Parental guidance. Not permitted for children under 15'),
                ('ua-movies','film','rating','12+','Children under 12 are prohibited'),
                ('vn-movies','film','rating','P','P rating'),
                ('vn-movies','film','rating','C13','Restricted to customers 13 years or older'),
                ('vn-movies','film','rating','C18','Restricted to customers 18 years or older');;

        </sql>
        <rollback>
            <sql dbms="mysql" endDelimiter=";;" splitStatements="true" stripComments="true">
                DELETE FROM rating_advisory_system WHERE system = 'kh-movies' AND video_type = 'film' AND `code` IN ('R-18', 'NC-15');;
                DELETE FROM rating_advisory_system WHERE system = 'tw-movies' AND video_type = 'film' AND `code` = '輔15級';;
                DELETE FROM rating_advisory_system WHERE system = 'ua-movies' AND video_type = 'film' AND `code` = '12+';;
                DELETE FROM rating_advisory_system WHERE system = 'vn-movies' AND video_type = 'film' AND `code` IN ('P', 'C13', 'C18');;
            </sql>
        </rollback>
    </changeSet>
</databaseChangeLog>
