<?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-3.5.xsd">
    <!--
        Added the constraints for entity TBActivityType.
    -->
    <changeSet id="20200817073345-2" author="jhipster">

        <addForeignKeyConstraint baseColumnNames="deleted_by"
                                 baseTableName="tb_activity_type"
                                 constraintName="fk_tb_activity_type_deleted_by_id"
                                 referencedColumnNames="id"
                                 referencedTableName="tb_detail_user"/>

        <addForeignKeyConstraint baseColumnNames="created_by"
                                 baseTableName="tb_activity_type"
                                 constraintName="fk_tb_activity_type_created_by_id"
                                 referencedColumnNames="id"
                                 referencedTableName="tb_detail_user"/>

        <addForeignKeyConstraint baseColumnNames="modified_by"
                                 baseTableName="tb_activity_type"
                                 constraintName="fk_tb_activity_type_modified_by_id"
                                 referencedColumnNames="id"
                                 referencedTableName="tb_detail_user"/>

        <addForeignKeyConstraint baseColumnNames="customer_id"
                                 baseTableName="tb_activity_type"
                                 constraintName="fk_tbactivity_type_customer_id"
                                 referencedColumnNames="id"
                                 referencedTableName="tb_customer"/>

    </changeSet>
</databaseChangeLog>
