<?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="jamesc">
        <sql dbms="mysql" endDelimiter=";;" splitStatements="true" stripComments="true">
            <![CDATA[
                INSERT INTO red_essential_label_mapping
                (vendor_id, company_name, red_essential_label_code, red_essential_label_name)
                SELECT m.vendor_id, v.company, m.red_essential_label_code, m.red_essential_label_name
                FROM (
                  SELECT 26108 AS vendor_id, 'E501' AS red_essential_label_code, 'Undead Collective' AS red_essential_label_name
                ) AS m
                JOIN vendor AS v USING (vendor_id)
                ;;
            ]]>
        </sql>
        <rollback>
            <sql dbms="mysql" endDelimiter=";;" splitStatements="true" stripComments="true">
                <![CDATA[
                    DELETE FROM red_essential_label_mapping
                    WHERE vendor_id IN (
                    26108
                    )
                    ;;
                ]]>
            </sql>
        </rollback>
    </changeSet>
</databaseChangeLog>
