<?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 UserProfile.
    -->
    <changeSet id="20181217184612-2" author="jhipster">
        
        <addForeignKeyConstraint baseColumnNames="user_id"
                                 baseTableName="user_profile"
                                 constraintName="fk_user_profile_user_id"
                                 referencedColumnNames="id"
                                 referencedTableName="jhi_user"/>

        <addForeignKeyConstraint baseColumnNames="employer_id"
                                 baseTableName="user_profile"
                                 constraintName="fk_user_profile_employer_id"
                                 referencedColumnNames="id"
                                 referencedTableName="employer"/>

        <addForeignKeyConstraint baseColumnNames="cohort_id"
                                 baseTableName="user_profile"
                                 constraintName="fk_user_profile_cohort_id"
                                 referencedColumnNames="id"
                                 referencedTableName="cohort"/>

    </changeSet>
</databaseChangeLog>
