<?xml version="1.0" encoding="utf-8"?>
<databaseChangeLog
    xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
    xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
    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-latest.xsd
                        http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
    <!--
        Added the constraints for entity InputDataUpload.
    -->
    <changeSet id="20241015092807-2" author="jhipster">

        <addForeignKeyConstraint baseColumnNames="period_id"
                                 baseTableName="input_data_upload"
                                 constraintName="fk_input_data_upload__period_id"
                                 referencedColumnNames="id"
                                 referencedTableName="period"
                                 />

        <addForeignKeyConstraint baseColumnNames="period_version_id"
                                 baseTableName="input_data_upload"
                                 constraintName="fk_input_data_upload__period_version_id"
                                 referencedColumnNames="id"
                                 referencedTableName="period_version"
                                 />

        <addForeignKeyConstraint baseColumnNames="owner_id"
                                 baseTableName="input_data_upload"
                                 constraintName="fk_input_data_upload__owner_id"
                                 referencedColumnNames="id"
                                 referencedTableName="organization"
                                 />
    </changeSet>
</databaseChangeLog>
