<?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 Photo.
    -->
    <changeSet id="20190102220100-2" author="jhipster">
        
        <addForeignKeyConstraint baseColumnNames="post_id"
                                 baseTableName="photo"
                                 constraintName="fk_photo_post_id"
                                 referencedColumnNames="id"
                                 referencedTableName="post"/>

        <addForeignKeyConstraint baseColumnNames="photos_id"
                                 baseTableName="photo_album"
                                 constraintName="fk_photo_album_photos_id"
                                 referencedColumnNames="id"
                                 referencedTableName="photo"/>
        <addForeignKeyConstraint baseColumnNames="albums_id"
                                 baseTableName="photo_album"
                                 constraintName="fk_photo_album_albums_id"
                                 referencedColumnNames="id"
                                 referencedTableName="album"/>
        
    </changeSet>
</databaseChangeLog>
