<?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-000171-api-key-add-created-by.xml">

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

  <changeSet author="appian" id="000171.0.0">
    <comment>Create new column service account id</comment>
    <addColumn tableName="api_key">
      <column name="serv_acct_id" type="${longType}" />
    </addColumn>
  </changeSet>

  <changeSet author="appian" id="000171.0.1">
    <addNotNullConstraint tableName="api_key" columnName="serv_acct_id" columnDataType="${longType}" />
  </changeSet>

</databaseChangeLog>
