<?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="npatel">
        <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 (8952015, 8881798, 8752227, 7284157, 8810828, 7322756, 7322832, 8951221);;
        DELETE al.* FROM asset_location al WHERE al.asset_id IN (8952015, 8881798, 8752227, 7284157, 8810828, 7322756, 7322832, 8951221);;
        DELETE FROM sync_queue WHERE asset_id IN (8952015, 8881798, 8752227, 7284157, 8810828, 7322756, 7322832, 8951221);;
        DELETE FROM asset WHERE asset_id IN (8952015, 8881798, 8752227, 7284157, 8810828, 7322756, 7322832, 8951221);;

        </sql>
            
        <rollback>
            <sql dbms="mysql" endDelimiter=";;" splitStatements="true" stripComments="true">
                
         <!--  8 assets -->
        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('7284157',NULL,NULL,'888831147459','500','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('7322756',NULL,NULL,'888608557207','500','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('7322832',NULL,NULL,'888608557214','500','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('8752227',NULL,NULL,'888608465700','500','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('8810828',NULL,NULL,'888608465700','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('8881798',NULL,NULL,'888003973084','500','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('8952015',NULL,NULL,'886445152869','500','8','1','1','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('8951221',NULL,NULL,'889845026730','500','1','0','0','0');;
        
        <!-- 11rows -->
        INSERT INTO asset_location (asset_location_id, asset_id, storage_drive_id, status, upload_date, last_modified, error_log) VALUES('13447318','7284157','211','Y','2014-06-18 13:07:37','2014-06-18 13:07:38',NULL);;
        INSERT INTO asset_location (asset_location_id, asset_id, storage_drive_id, status, upload_date, last_modified, error_log) VALUES('13448396','7284157','228','Y','2014-06-18 14:06:44','2014-06-18 14:06:44',NULL);;
        INSERT INTO asset_location (asset_location_id, asset_id, storage_drive_id, status, upload_date, last_modified, error_log) VALUES('16279967','8752227','238','Y','2015-04-20 13:28:03','2015-04-20 13:28:03','Attempt #: 4| [2015-04-17 14:02:12]	8752227:caption	Failure while copying data');;
        INSERT INTO asset_location (asset_location_id, asset_id, storage_drive_id, status, upload_date, last_modified, error_log) VALUES('16462728','8752227','173','Y','2015-04-20 12:59:43','2015-04-20 12:59:44',NULL);;
        INSERT INTO asset_location (asset_location_id, asset_id, storage_drive_id, status, upload_date, last_modified, error_log) VALUES('16358382','8810828','238','Y','2015-04-27 15:26:48','2015-04-27 15:26:48',NULL);;
        INSERT INTO asset_location (asset_location_id, asset_id, storage_drive_id, status, upload_date, last_modified, error_log) VALUES('16462724','8810828','175','Y','2015-04-20 12:59:01','2015-04-22 07:32:42',NULL);;
        INSERT INTO asset_location (asset_location_id, asset_id, storage_drive_id, status, upload_date, last_modified, error_log) VALUES('16463379','8881798','213','Y','2015-04-20 15:55:24','2015-04-20 15:55:25',NULL);;
        INSERT INTO asset_location (asset_location_id, asset_id, storage_drive_id, status, upload_date, last_modified, error_log) VALUES('16464067','8881798','237','Y','2015-04-20 17:24:32','2015-04-20 17:24:32',NULL);;
        INSERT INTO asset_location (asset_location_id, asset_id, storage_drive_id, status, upload_date, last_modified, error_log) VALUES('16587571','8952015','242','Y','2015-05-07 15:57:01','2015-05-13 10:32:34',NULL);;
        INSERT INTO asset_location (asset_location_id, asset_id, storage_drive_id, STATUS, upload_date, last_modified, error_log) VALUES('16586178','8951221','174','Y','2015-05-07 13:25:40','2015-05-07 13:24:48',NULL);;
        INSERT INTO asset_location (asset_location_id, asset_id, storage_drive_id, STATUS, upload_date, last_modified, error_log) VALUES('16586401','8951221','238','Y','2015-05-07 13:48:06','2015-05-07 13:48:06',NULL);;


        <!-- 11rows -->
        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('119296608','13448396','888831147459_16624181.scc',NULL,'b04fa64e738c89172946ce0cc06ab32e','250567',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('155179173','16279967','888608465700_15740631.scc',NULL,'50040d1476a9e74b5a14496c8f70c309','96867',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('157267495','16462728','888608465700_15740631.scc',NULL,'50040d1476a9e74b5a14496c8f70c309','96867',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('156038382','16358382','888608465700_15740631_en-US.itt',NULL,'6fbcc7b28f3284ca5338739d622eb8b3','2340',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('156763100','16358382','888608465700_15740631_en.itt',NULL,'c3a2369adc7b58b8b84532dd5f9b01f4','2340',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('157267470','16462724','888608465700_15740631_en.itt',NULL,'c3a2369adc7b58b8b84532dd5f9b01f4','2340',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('157273216','16463379','888003973084_15066582.scc',NULL,'b4a2bb5b59f2f69a2dc388741b27f528','154812',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('157279242','16464067','888003973084_15066582.scc',NULL,'b4a2bb5b59f2f69a2dc388741b27f528','154812',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('159030850','16587571','886445152869_19521635.scc',NULL,'d07c4b57af9696293539ba61c508f5af','161082',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('158678871','16586178','889845026730_19793814.scc',NULL,'891e018429fb3c32e5d91bdaab1f9fea','242692',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('158684452','16586401','889845026730_19793814.scc',NULL,'891e018429fb3c32e5d91bdaab1f9fea','242692',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);;

            </sql>
        </rollback>
    </changeSet>
</databaseChangeLog>


