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

            INSERT INTO encoding_profile (profile_type, description, format) VALUES ('video', 'InDemand Movies and TV', 'mov');;
            SET @last_id_in_encoding_profile_video = LAST_INSERT_ID();;

            INSERT INTO encoding_profile (profile_type, description, format) VALUES ('trailer', 'InDemand Movies trailer', 'mov');;
            SET @last_id_in_encoding_profile_trailer = LAST_INSERT_ID();;

            INSERT INTO video_encoding_profile( encoding_profile_id, description, format, aspect_ratio, resolution, video_source, extension, encoding_engine) VALUES
            ( @last_id_in_encoding_profile_video, "InDemand Movies and TV", "mov", "4:3","ANY", "334","mov","compressor" ),
            ( @last_id_in_encoding_profile_video, "InDemand Movies and TV", "mov", "4:2","ANY", "334","mov","compressor" ),
            ( @last_id_in_encoding_profile_video, "InDemand Movies and TV", "mov", "5:2","ANY", "334","mov","compressor" ),
            ( @last_id_in_encoding_profile_video, "InDemand Movies and TV", "mov", "5:3","ANY", "334","mov","compressor" ),
            ( @last_id_in_encoding_profile_video, "InDemand Movies and TV", "mov", "8:3","ANY", "334","mov","compressor" ),
            ( @last_id_in_encoding_profile_video, "InDemand Movies and TV", "mov", "8:5","ANY", "334","mov","compressor" ),
            ( @last_id_in_encoding_profile_video, "InDemand Movies and TV", "mov", "10:7","ANY", "334","mov","compressor" ),
            ( @last_id_in_encoding_profile_video, "InDemand Movies and TV", "mov", "16:9","ANY", "334","mov","compressor" ),
            ( @last_id_in_encoding_profile_video, "InDemand Movies and TV", "mov", "20:7","ANY", "334","mov","compressor" ),
            ( @last_id_in_encoding_profile_video, "InDemand Movies and TV", "mov", "20:9","ANY", "334","mov","compressor" ),
            ( @last_id_in_encoding_profile_video, "InDemand Movies and TV", "mov", "20:11","ANY", "334","mov","compressor" ),
            ( @last_id_in_encoding_profile_video, "InDemand Movies and TV", "mov", "20:13","ANY", "334","mov","compressor" ),
            ( @last_id_in_encoding_profile_video, "InDemand Movies and TV", "mov", "40:17","ANY", "334","mov","compressor" ),
            ( @last_id_in_encoding_profile_video, "InDemand Movies and TV", "mov", "40:19","ANY", "334","mov","compressor" ),
            ( @last_id_in_encoding_profile_video, "InDemand Movies and TV", "mov", "40:21","ANY", "334","mov","compressor" ),
            ( @last_id_in_encoding_profile_video, "InDemand Movies and TV", "mov", "40:23","ANY", "334","mov","compressor" ),
            ( @last_id_in_encoding_profile_video, "InDemand Movies and TV", "mov", "40:27","ANY", "334","mov","compressor" ),
            ( @last_id_in_encoding_profile_video, "InDemand Movies and TV", "mov", "40:29","ANY", "334","mov","compressor" ),
            ( @last_id_in_encoding_profile_video, "InDemand Movies and TV", "mov", "1.85:1","ANY", "334","mov","compressor" ),
            ( @last_id_in_encoding_profile_trailer, "InDemand Movies trailer", "mov", "4:3","ANY", "335","mov","compressor" ),
            ( @last_id_in_encoding_profile_trailer, "InDemand Movies trailer", "mov", "4:2","ANY", "335","mov","compressor" ),
            ( @last_id_in_encoding_profile_trailer, "InDemand Movies trailer", "mov", "5:2","ANY", "335","mov","compressor" ),
            ( @last_id_in_encoding_profile_trailer, "InDemand Movies trailer", "mov", "5:3","ANY", "335","mov","compressor" ),
            ( @last_id_in_encoding_profile_trailer, "InDemand Movies trailer", "mov", "8:3","ANY", "335","mov","compressor" ),
            ( @last_id_in_encoding_profile_trailer, "InDemand Movies trailer", "mov", "8:5","ANY", "335","mov","compressor" ),
            ( @last_id_in_encoding_profile_trailer, "InDemand Movies trailer", "mov", "10:7","ANY", "335","mov","compressor" ),
            ( @last_id_in_encoding_profile_trailer, "InDemand Movies trailer", "mov", "16:9","ANY", "335","mov","compressor" ),
            ( @last_id_in_encoding_profile_trailer, "InDemand Movies trailer", "mov", "20:7","ANY", "335","mov","compressor" ),
            ( @last_id_in_encoding_profile_trailer, "InDemand Movies trailer", "mov", "20:9","ANY", "335","mov","compressor" ),
            ( @last_id_in_encoding_profile_trailer, "InDemand Movies trailer", "mov", "20:11","ANY", "335","mov","compressor" ),
            ( @last_id_in_encoding_profile_trailer, "InDemand Movies trailer", "mov", "20:13","ANY", "335","mov","compressor" ),
            ( @last_id_in_encoding_profile_trailer, "InDemand Movies trailer", "mov", "40:17","ANY", "335","mov","compressor" ),
            ( @last_id_in_encoding_profile_trailer, "InDemand Movies trailer", "mov", "40:19","ANY", "335","mov","compressor" ),
            ( @last_id_in_encoding_profile_trailer, "InDemand Movies trailer", "mov", "40:21","ANY", "335","mov","compressor" ),
            ( @last_id_in_encoding_profile_trailer, "InDemand Movies trailer", "mov", "40:23","ANY", "335","mov","compressor" ),
            ( @last_id_in_encoding_profile_trailer, "InDemand Movies trailer", "mov", "40:27","ANY", "335","mov","compressor" ),
            ( @last_id_in_encoding_profile_trailer, "InDemand Movies trailer", "mov", "40:29","ANY", "335","mov","compressor" ),
            ( @last_id_in_encoding_profile_trailer, "InDemand Movies trailer", "mov", "1.85:1","ANY", "335","mov","compressor" );;


        </sql>
        <rollback>
            <sql dbms="mysql" endDelimiter=";;" splitStatements="true" stripComments="true">

                DELETE FROM video_encoding_profile WHERE description = "InDemand Movies and TV" AND format = "mov" AND video_source = "334";;
                DELETE FROM video_encoding_profile WHERE description = "InDemand Movies trailer" AND format = "mov" AND video_source = "335";;
                DELETE FROM encoding_profile WHERE profile_type = "video" AND description = "InDemand Movies and TV" AND format = "mov";;
                DELETE FROM encoding_profile WHERE profile_type = "trailer" AND description = "InDemand Movies trailer" AND format = "mov";;

            </sql>
        </rollback>
    </changeSet>
</databaseChangeLog>
