<?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-000173-api-key-add-foreignKey-constraint-service-account-id.xml">

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

  <!-- FK for usr_id -->
  <changeSet author="appian" id="000173.0.0">
    <comment>Foreign Key FROM api_key.serv_acct_id TO usr.id</comment>
    <addForeignKeyConstraint
      constraintName="api_key_serviceAccountId_fk"
      baseTableName="api_key"
      baseColumnNames="serv_acct_id"
      referencedTableName="usr"
      referencedColumnNames="id"/>
  </changeSet>

</databaseChangeLog>
