ng-tracker/src/main/resources/db/changelog-20190402_000000-schema.xml
2019-04-11 22:37:32 +04:00

27 lines
1.5 KiB
XML

<?xml version="1.1" 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-3.1.xsd">
<changeSet author="tanya" id="20190402_000000-1">
<addColumn tableName="grants">
<column name="leader_id" type="integer"></column>
</addColumn>
<addForeignKeyConstraint baseTableName="grants" baseColumnNames="leader_id"
constraintName="fk_grants_leader_id" referencedTableName="users"
referencedColumnNames="id"/>
</changeSet>
<changeSet author="tanya" id="20190402_000000-2">
<createTable tableName="grants_authors">
<column name="grant_id" type="integer"/>
<column name="authors_id" type="integer"/>
</createTable>
<addForeignKeyConstraint baseTableName="grants_authors" baseColumnNames="grant_id"
constraintName="fk_grants_grants_authors" referencedTableName="grants"
referencedColumnNames="id"/>
<addForeignKeyConstraint baseTableName="grants_authors" baseColumnNames="authors_id"
constraintName="fk_user_grants_authors" referencedTableName="users"
referencedColumnNames="id"/>
</changeSet>
</databaseChangeLog>