<?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="anevrekar">
        <sql dbms="mysql" endDelimiter=";;" splitStatements="true" stripComments="true">
            ALTER TABLE release_approval_comments
            ADD COLUMN release_approval_id INT(10) UNSIGNED AFTER release_status_id,
            ADD CONSTRAINT `FK_approval_comments_approval_id` FOREIGN KEY (release_approval_id) 
            REFERENCES release_approval_queue(release_approval_id);;
        </sql>
        <rollback>
            ALTER TABLE release_approval_comments DROP FOREIGN KEY `FK_approval_comments_approval_id`;;
            ALTER TABLE release_approval_comments DROP COLUMN release_approval_id;;
        </rollback>
    </changeSet>
</databaseChangeLog>
