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

        DELETE ald.* FROM asset_location_detail ald INNER JOIN asset_location al ON ald.asset_location_id = al.asset_location_id 
        WHERE al.asset_id IN (9062070, 9131531, 9037131);;
        DELETE al.* FROM asset_location al WHERE al.asset_id IN (9062070, 9131531, 9037131);;
        DELETE FROM sync_queue WHERE asset_id IN (9062070, 9131531, 9037131);;
        DELETE FROM asset WHERE asset_id IN (9062070, 9131531, 9037131);;

        </sql>

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

            INSERT INTO asset (asset_id, parent_asset_id, link_for_asset_id, upc, asset_type_id, original_physical_location, cd, track_id, clip_number) VALUES(9037131, NULL, NULL, 889176619137, 504, 1, 0, 0, 0);;
            INSERT INTO asset (asset_id, parent_asset_id, link_for_asset_id, upc, asset_type_id, original_physical_location, cd, track_id, clip_number) VALUES(9062070, NULL, NULL, 889176619137, 503, 1, 0, 0, 0);;
            INSERT INTO asset (asset_id, parent_asset_id, link_for_asset_id, upc, asset_type_id, original_physical_location, cd, track_id, clip_number) VALUES(9131531, NULL, NULL, 889176619137, 501, 1, 0, 0, 0);;

            INSERT INTO asset_location (asset_location_id, asset_id, storage_drive_id, status, upload_date, last_modified, error_log) values(16729219, 9037131, 238, 'N', '2015-05-27 15:06:45', '2015-06-01 16:04:48', NULL);;
            INSERT INTO asset_location (asset_location_id, asset_id, storage_drive_id, status, upload_date, last_modified, error_log) values(16969179, 9131531, 212, 'Y', '2015-06-01 16:41:27', '2015-06-01 16:40:45', NULL);;
            INSERT INTO asset_location (asset_location_id, asset_id, storage_drive_id, status, upload_date, last_modified, error_log) values(16970414, 9131531, 237, 'Y', '2015-06-01 17:14:47', '2015-06-01 17:14:47', NULL);;

            INSERT INTO asset_location_detail (asset_location_detail_id, asset_location_id, filename, duration, md5_hash, file_size, width, height, aspect_ratio, bit_rate, frame_rate, audio_channels, video_format, video_codec, qc_status) values(160185026, 16729219, '889176619137_19185327_en-US.srt', NULL, '1f205107aa636766eedd61481aabccbd', 27169, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);;
            INSERT INTO asset_location_detail (asset_location_detail_id, asset_location_id, filename, duration, md5_hash, file_size, width, height, aspect_ratio, bit_rate, frame_rate, audio_channels, video_format, video_codec, qc_status) values(162776544, 16969179, '889176619137_19185327_en-US.itt', NULL, '737e9c06cc9f6b2fc5e31121b5af2df3', 35533, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);;
            INSERT INTO asset_location_detail (asset_location_detail_id, asset_location_id, filename, duration, md5_hash, file_size, width, height, aspect_ratio, bit_rate, frame_rate, audio_channels, video_format, video_codec, qc_status) values(162789703, 16970414, '889176619137_19185327_en-US.itt', NULL, '737e9c06cc9f6b2fc5e31121b5af2df3', 35533, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);;
            </sql>
        </rollback>
    </changeSet>
</databaseChangeLog>
