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

            SET @release_id = (SELECT release_id FROM releases where upc = '5060243321282' LIMIT 1);;

            UPDATE releases SET 
                product_code = 'ACPV1503',
                distribution_format_id = 6,
                new_release = 'Catalog',
                format = 'Full Length',
                description = "Paul Hartnoll (Orbital) is 8:58. Featuring a very impressive cast list of Robert Smith, Lianne Hall, Lisa Knapp, Ed Harcourt, The Unthanks and Fable.  After a very successful reunion in 2008 that included sell out tours, headline appearances at festivals around the world, special guest Matt Smith as Doctor Who at Glastonbury, the Paralympics opening ceremony with Professor Stephen Hawking, and not forgetting the highly- acclaimed album 'Wonky', brothers Paul and Phil Hartnoll have decided to bring down the curtain on Orbital's remarkable 25 year career.   And move on he certainly has. Paul Hartnoll has recorded his new album '8:58,'    The title of the album '8:58' comes from Paul's fascination with the theme of time. 'I've always had a thing for clocks and for time as a powerful force - but also the way it oppresses you,' explains Paul. 'It's one of those things I keep coming back to. For me, 8:58 is a moment of choice. It's almost 9 o'clock. Are you going to school? Are you going to this job you hate? Everybody faces that decision now and again. 8:58 am is when you've got to make up your mind.'   As Cillian Murphy says at the very beginning of '8:58': brace yourself for freedom. Now."
            WHERE release_id = @release_id;;

            INSERT INTO product_physical(
                release_id,
                individual,
                units_per_set,
                explicit,
                packaging_id,
                initial_stock,
                wholesale_price,
                pline
            )
            VALUES (
                @release_id,
                'N',
                2,
                'N',
                12,
                1500,
                11.99,
                '2015 ACP Recordings'
            );;

            INSERT INTO mkt_program_info (
                mkt_program_id,
                info_for,
                info_for_id,
                attachment,
                scope,
                description,
                client
            )
            VALUES (
                12,
                'release',
                @release_id,
                'N',
                'internal_only',
                'LIVE DATES MAY 2015 Saturday 9 Glasgow O2 ABC Sunday 10 Manchester Ritz Monday 11 Norwich UEA Tuesday 12 Oxford O2 Academy Wednesday 13 Bristol O2 Academy Thursday 14 London O2 Shepherds Bush Empire 6 music session confirmed on Tuesday 31st March w/Lauren Laverne',
                'alw'
            );;
        </sql>
        <rollback>
            USE art_relations;;

            SET @release_id = (SELECT release_id FROM releases where upc = '5060243321282' LIMIT 1);;

            UPDATE releases SET 
                product_code = Null,
                distribution_format_id = 1,
                new_release = 'New',
                description = '',
                format = 'Full Length'
            WHERE release_id = @release_id;;

            DELETE FROM product_physical WHERE release_id = @release_id;;

            DELETE FROM mkt_program_info WHERE info_for_id = @release_id;;
        </rollback>
    </changeSet>
</databaseChangeLog>
