<?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="aakashpatkar">
        <sql dbms="mysql" endDelimiter=";;" splitStatements="true" stripComments="true">
            <![CDATA[
                INSERT INTO release_manual_adjustment
                    (date_created, created_by, category_id, release_id, amount, currencies_id, description, vendor_manual_adjustment_id)
                VALUES
                    ('2016-04-26 10:30:33', '261', '63', '1854298', -314.600000, '1', 'Life Animated - American Airlines', '266184'),
                    ('2016-04-26 10:30:33', '261', '63', '1854298', -281.100000, '1', 'Life Animated - JetBlue', '266184'),
                    ('2016-04-26 10:30:33', '261', '63', '1854298', -600.000000, '1', 'Life, Animated - Dick Clark Productions, screening', '266184'),
                    ('2016-04-26 10:30:33', '261', '63', '1854298', -8000.000000, '1', 'Life, Animated - Strategy PR Consulting, publicity', '266184');;

                UPDATE manual_adjustment
                    SET amount = -9195.700000, amount_in_original_currency = -9195.700000, category_id = '65', `comment` = 'Expenses (4)'
                WHERE id = 266184;;

                DELETE FROM manual_adjustment WHERE id IN (266185, 266186, 266187);;
            ]]>
        </sql>
        <rollback>
            <sql dbms="mysql" endDelimiter=";;" splitStatements="true" stripComments="true">
                <![CDATA[
                    DELETE FROM release_manual_adjustment WHERE vendor_manual_adjustment_id = 266184;;

                    UPDATE manual_adjustment
                        SET amount = -314.600000, amount_in_original_currency = -314.600000, category_id = '63', `comment` = 'Life Animated - American Airlines', updated_timestamp = '2016-04-26 10:30:33'
                    WHERE id = 266184;;

                    INSERT INTO manual_adjustment
                        (id, parent_type, parent_id, date_added, created_by, amount, `comment`, category_id, adjust_for_period_id, apply_to_period_id, currencies_id, amount_in_original_currency, updated_timestamp)
                    VALUES
                        ('266185', 'vendor', '25371', '2016-04-26 10:30:33', '261', -281.100000, 'Life Animated - JetBlue', '63', '207', '207', '1', '-281.100000', '2016-04-26 10:30:33'),
                        ('266186', 'vendor', '25371', '2016-04-26 10:30:33', '261', -600.000000, 'Life, Animated - Dick Clark Productions, screening', '63', '207', '207', '1', '-600.000000', '2016-04-26 10:30:33'),
                        ('266187', 'vendor', '25371', '2016-04-26 10:30:33', '261', -8000.000000, 'Life, Animated - Strategy PR Consulting, publicity', '63', '207', '207', '1', '-8000.000000', '2016-04-26 10:30:33');;
                ]]>
            </sql>
        </rollback>
    </changeSet>
    <changeSet id="2" author="aakashpatkar">
        <sql dbms="mysql" endDelimiter=";;" splitStatements="true" stripComments="true">
            <![CDATA[
                INSERT INTO release_manual_adjustment
                    (date_created, created_by, category_id, release_id, amount, currencies_id, description, vendor_manual_adjustment_id)
                VALUES
                    ('2016-05-23 12:34:32', '261', '60', '1854298', -612.500000, '1', 'Life, Animated - The Cutting Room Inc, audio commentary', '274245'),
                    ('2016-05-23 12:34:32', '261', '63', '1854298', -5000.000000, '1', 'Life, Animated - 360 Communications, grass roots outreach', '274245'),
                    ('2016-05-23 12:34:32', '261', '63', '1854298', -7500.000000, '1', 'Life, Animated - Cinetic Media, marketing', '274245'),
                    ('2016-05-23 12:34:32', '261', '63', '1854298', -25750.000000, '1', 'Life, Animated - Allied Integrated Marketing, publicity', '274245'),
                    ('2016-05-23 12:36:42', '261', '63', '1854298', -7500.000000, '1', 'Life, Animated - Cinetic Media, marketing services', '274245');;

                UPDATE manual_adjustment
                    SET amount = -46362.500000, amount_in_original_currency = -46362.500000, category_id = '65', `comment` = 'Expenses (5)'
                WHERE id = 274245;;

                DELETE FROM manual_adjustment WHERE id IN (274246, 274247, 274248, 274263);;
            ]]>
        </sql>
        <rollback>
            <sql dbms="mysql" endDelimiter=";;" splitStatements="true" stripComments="true">
                <![CDATA[
                    DELETE FROM release_manual_adjustment WHERE vendor_manual_adjustment_id = 274245;;

                    UPDATE manual_adjustment
                        SET amount = -612.500000, amount_in_original_currency = -612.500000, category_id = '60', `comment` = 'Life, Animated - The Cutting Room Inc, audio commentary', updated_timestamp = '2016-05-23 12:34:32'
                    WHERE id = 274245;;

                    INSERT INTO manual_adjustment
                        (id, parent_type, parent_id, date_added, created_by, amount, `comment`, category_id, adjust_for_period_id, apply_to_period_id, currencies_id, amount_in_original_currency, updated_timestamp)
                    VALUES
                        ('274246', 'vendor', '25371', '2016-05-23 12:34:32', '261', -5000.000000, 'Life, Animated - 360 Communications, grass roots outreach', '63', '208', '208', '1', '-5000.000000', '2016-05-23 12:34:32'),
                        ('274247', 'vendor', '25371', '2016-05-23 12:34:32', '261',-7500.000000, 'Life, Animated - Cinetic Media, marketing', '63', '208', '208', '1', '-7500.000000', '2016-05-23 12:34:32'),
                        ('274248', 'vendor', '25371', '2016-05-23 12:34:32', '261', -25750.000000, 'Life, Animated - Allied Integrated Marketing, publicity', '63', '208', '208', '1', '-25750.000000', '2016-05-23 12:34:32'),
                        ('274263', 'vendor', '25371', '2016-05-23 12:36:42', '261', -7500.000000, 'Life, Animated - Cinetic Media, marketing services', '63', '208', '208', '1', '-7500.000000', '2016-05-23 12:36:42');;
                ]]>
            </sql>
        </rollback>
    </changeSet>
    <changeSet id="3" author="aakashpatkar">
        <sql dbms="mysql" endDelimiter=";;" splitStatements="true" stripComments="true">
            <![CDATA[
                INSERT INTO release_manual_adjustment
                    (date_created, created_by, category_id, release_id, amount, currencies_id, description, vendor_manual_adjustment_id)
                VALUES
                   ('2016-08-25 12:19:13', '261', '60', '1856301', -1072.000000, '1', 'Ghost Team - Gravillis, Creative Art Design', '284383'),
                   ('2016-08-25 12:19:13', '261', '60', '1856301', -1500.000000, '1', 'Ghost Team - Gravillis, Creative Art Design', '284383'),
                   ('2016-08-25 12:19:13', '261', '59', '1856301', -100.000000, '1', 'Ghost Team - Deluxe Digital Cinema, mastering', '284383'),
                   ('2016-08-25 12:19:13', '261', '61', '1856301', -2571.000000, '1', 'Ghost Team - Digital Printing, posters', '284383'),
                   ('2016-08-25 12:19:13', '261', '1', '1856301', -1500.000000, '1', 'Ghost Team - Orpheum Enterprises Detriot, 4-wall', '284383'),
                   ('2016-08-25 12:19:13', '261', '59', '1856301', -9250.000000, '1', 'Ghost Team - Cinedigm VPF, 4-wall', '284383'),
                   ('2016-08-25 12:19:13', '261', '62', '1856301', -4064.580000, '1', 'Ghost Team - S. Callan Advertising Co, newspaper advertising', '284383'),
                   ('2016-08-25 12:19:13', '261', '1', '1856301', -7000.000000, '1', 'Ghost Team - The Logan Theatre, 4-wall', '284383'),
                   ('2016-08-25 12:19:13', '261', '61', '1856301', -8750.000000, '1', 'Ghost Team - Toy Box Entertainment, trailer', '284383'),
                   ('2016-08-25 12:19:13', '261', '1', '1856301', -421.180000, '1', 'Ghost Team - British Board of Film Classification', '284383'),
                   ('2016-08-25 12:19:13', '261', '1', '1856301', -849.140000, '1', 'Ghost Team - Australian Government, film rating', '284383'),
                   ('2016-08-25 12:19:13', '261', '1', '1856301', -10.660000, '1', 'Ghost Team - New Zealand Film & Video Labling, film rating', '284383');;

                UPDATE manual_adjustment
                    SET amount = -37088.560000, amount_in_original_currency = -37088.560000, category_id = '65', `comment` = 'Expenses (12)'
                WHERE id = 284383;;

                DELETE FROM manual_adjustment
                    WHERE id IN (284384, 284385, 284386, 284387, 284388, 284389, 284390, 284391, 284392, 284393, 284394);;
            ]]>
        </sql>
        <rollback>
            <sql dbms="mysql" endDelimiter=";;" splitStatements="true" stripComments="true">
                <![CDATA[
                    DELETE FROM release_manual_adjustment WHERE vendor_manual_adjustment_id = 284383;;

                    UPDATE manual_adjustment
                        SET amount = -1072.000000, amount_in_original_currency = -1072.000000, category_id = '60', `comment` = 'Ghost Team - Gravillis, Creative Art Design', updated_timestamp = '2016-08-25 12:19:13'
                    WHERE id = 284383;;

                    INSERT INTO manual_adjustment
                        (id, parent_type, parent_id, date_added, created_by, amount, `comment`, category_id, adjust_for_period_id, apply_to_period_id, currencies_id, amount_in_original_currency, updated_timestamp)
                    VALUES
                        ('284384', 'vendor', '25375', '2016-08-25 12:19:13', '261', -1500.000000, 'Ghost Team - Gravillis, Creative Art Design', '60', '211', '211', '1', '-1500.000000', '2016-08-25 12:19:13'),
                        ('284385', 'vendor', '25375', '2016-08-25 12:19:13', '261', -100.000000, 'Ghost Team - Deluxe Digital Cinema, mastering', '59', '211', '211', '1', '-100.000000', '2016-08-25 12:19:13'),
                        ('284386', 'vendor', '25375', '2016-08-25 12:19:13', '261', -2571.000000, 'Ghost Team - Digital Printing, posters', '61', '211', '211', '1', '-2571.000000', '2016-08-25 12:19:13'),
                        ('284387', 'vendor', '25375', '2016-08-25 12:19:13', '261', -1500.000000, 'Ghost Team - Orpheum Enterprises Detriot, 4-wall', '1', '211', '211', '1', '-1500.000000', '2016-08-25 12:19:13'),
                        ('284388', 'vendor', '25375', '2016-08-25 12:19:13', '261', -9250.000000, 'Ghost Team - Cinedigm VPF, 4-wall', '59', '211', '211', '1', '-9250.000000', '2016-08-25 12:19:13'),
                        ('284389', 'vendor', '25375', '2016-08-25 12:19:13', '261', -4064.580000, 'Ghost Team - S. Callan Advertising Co, newspaper advertising', '62', '211', '211', '1', '-4064.580000', '2016-08-25 12:19:13'),
                        ('284390', 'vendor', '25375', '2016-08-25 12:19:13', '261', -7000.000000, 'Ghost Team - The Logan Theatre, 4-wall', '1', '211', '211', '1', '-7000.000000', '2016-08-25 12:19:13'),
                        ('284391', 'vendor', '25375', '2016-08-25 12:19:13', '261', -8750.000000, 'Ghost Team - Toy Box Entertainment, trailer', '61', '211', '211', '1', '-8750.000000', '2016-08-25 12:19:13'),
                        ('284392', 'vendor', '25375', '2016-08-25 12:19:13', '261', -421.180000, 'Ghost Team - British Board of Film Classification', '1', '211', '211', '1', '-421.180000', '2016-08-25 12:19:13'),
                        ('284393', 'vendor', '25375', '2016-08-25 12:19:13', '261', -849.140000, 'Ghost Team - Australian Government, film rating', '1', '211', '211', '1', '-849.140000', '2016-08-25 12:19:13'),
                        ('284394', 'vendor', '25375', '2016-08-25 12:19:13', '261', -10.660000, 'Ghost Team - New Zealand Film & Video Labling, film rating', '1', '211', '211', '1', '-10.660000', '2016-08-25 12:19:13');;
                ]]>
            </sql>
        </rollback>
    </changeSet>
    <changeSet id="4" author="aakashpatkar">
        <sql dbms="mysql" endDelimiter=";;" splitStatements="true" stripComments="true">
            <![CDATA[
                INSERT INTO release_manual_adjustment
                    (date_created, created_by, category_id, release_id, amount, currencies_id, description, vendor_manual_adjustment_id)
                VALUES
                    ('2016-08-25 12:19:13', '261', '60', '1896226', -1072.000000, '1', 'Neruda - Gravillis, Creative Art Design', '284411'),
                    ('2016-08-25 12:19:13', '261', '60', '1896226', -1500.000000, '1', 'Neruda - Gravillis, Creative Art Design', '284411'),
                    ('2016-08-25 12:19:13', '261', '60', '1896226', -3254.900000, '1', 'Neruda - Gravillis, Creative Art Design', '284411'),
                    ('2016-08-25 12:19:13', '261', '1', '1896226', -3000.000000, '1', 'Neruda - MPAA', '284411');;

                UPDATE manual_adjustment
                    SET amount = -8826.900000, amount_in_original_currency = -8826.900000, category_id = '65', `comment` = 'Expenses (4)'
                WHERE id = 284411;;

                DELETE FROM manual_adjustment WHERE id IN (284412, 284413, 284414);;
            ]]>
        </sql>
        <rollback>
            <sql dbms="mysql" endDelimiter=";;" splitStatements="true" stripComments="true">
                <![CDATA[
                    DELETE FROM release_manual_adjustment WHERE vendor_manual_adjustment_id = 284411;;

                    UPDATE manual_adjustment
                        SET amount = -1072.000000, amount_in_original_currency = -1072.000000, category_id = '60', `comment` = 'Neruda - Gravillis, Creative Art Design', updated_timestamp = '2016-08-25 12:19:13'
                    WHERE id = 284411;;

                    INSERT INTO manual_adjustment
                        (id, parent_type, parent_id, date_added, created_by, amount, `comment`, category_id, adjust_for_period_id, apply_to_period_id, currencies_id, amount_in_original_currency, updated_timestamp)
                    VALUES
                        ('284412', 'vendor', '25462', '2016-08-25 12:19:13', '261', -1500.000000, 'Neruda - Gravillis, Creative Art Design', '60', '211', '211', '1', '-1500.000000', '2016-08-25 12:19:13'),
                        ('284413', 'vendor', '25462', '2016-08-25 12:19:13', '261', -3254.900000, 'Neruda - Gravillis, Creative Art Design', '60', '211', '211', '1', '-3254.900000', '2016-08-25 12:19:13'),
                        ('284414', 'vendor', '25462', '2016-08-25 12:19:13', '261', -3000.000000, 'Neruda - MPAA', '1', '211', '211', '1', '-3000.000000', '2016-08-25 12:19:13');;
                ]]>
            </sql>
        </rollback>
    </changeSet>
</databaseChangeLog>
