<?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"
        xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
        http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">

    <changeSet id="027-add-released-status-to-production-orders" author="effigenix" dbms="postgresql">
        <sql>ALTER TABLE production_orders DROP CONSTRAINT chk_production_order_status;</sql>
        <sql>ALTER TABLE production_orders ADD CONSTRAINT chk_production_order_status CHECK (status IN ('PLANNED', 'RELEASED', 'IN_PROGRESS', 'COMPLETED', 'CANCELLED'));</sql>
    </changeSet>

    <changeSet id="027-add-released-status-to-production-orders" author="effigenix" dbms="h2">
        <sql>ALTER TABLE production_orders DROP CONSTRAINT IF EXISTS chk_production_order_status;</sql>
        <sql>ALTER TABLE production_orders ADD CONSTRAINT chk_production_order_status CHECK (status IN ('PLANNED', 'RELEASED', 'IN_PROGRESS', 'COMPLETED', 'CANCELLED'));</sql>
    </changeSet>

</databaseChangeLog>
