<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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-2.0.xsd"
                   logicalFilePath="db-changelog-000194-remove-transient-fields.xml">

  <changeSet author="appian" id="tag-000193">
    <tagDatabase tag="000193"/>
  </changeSet>

  <changeSet author="appian" id="000194.1.0">
    <comment>Drop source_env_uuid column</comment>
    <dropColumn tableName="deployment" columnName="source_env_uuid"/>
  </changeSet>

  <changeSet author="appian" id="000194.1.1">
    <comment>Drop target_env_uuid column</comment>
    <dropColumn tableName="deployment" columnName="target_env_uuid"/>
  </changeSet>

  <changeSet author="appian" id="000194.1.2">
    <comment>Create new column remote_env_id</comment>
    <addColumn tableName="deployment">
      <column name="remote_env_id" type="${longType}" defaultValue="-1">
        <constraints nullable="false"/>
      </column>
    </addColumn>
  </changeSet>

  <changeSet author="appian" id="000194.1.3">
    <comment>Create new column export_log_doc</comment>
    <addColumn tableName="deployment">
      <column name="export_log_doc" type="${longType}"/>
    </addColumn>
  </changeSet>

</databaseChangeLog>
