46 lines
2.4 KiB
XML
46 lines
2.4 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="20181208_000000-1">
|
||
|
<createTable tableName="grant">
|
||
|
<column name="id" type="integer">
|
||
|
<constraints nullable="false"/>
|
||
|
</column>
|
||
|
<column name="title" type="varchar(255)"/>
|
||
|
<column name="status" type="varchar(255)"/>
|
||
|
<column name="deadline_date" type="timestamp"/>
|
||
|
<column name="comment" type="varchar(255)"/>
|
||
|
<column name="project_id" type="integer"/>
|
||
|
<column name="applicationFileName" type="varchar(255)">
|
||
|
<constraints nullable="true"/>
|
||
|
</column>
|
||
|
</createTable>
|
||
|
<addPrimaryKey columnNames="id" constraintName="pk_grant" tableName="grant"/>
|
||
|
<addForeignKeyConstraint baseTableName="grant" baseColumnNames="project_id"
|
||
|
constraintName="fk_project_project_id" referencedTableName="project"
|
||
|
referencedColumnNames="id"/>
|
||
|
</changeSet>
|
||
|
<changeSet author="tanya" id="20181208_000000-2">
|
||
|
<createTable tableName="project">
|
||
|
<column name="id" type="integer">
|
||
|
<constraints nullable="false"/>
|
||
|
</column>
|
||
|
<column name="title" type="varchar(255)"/>
|
||
|
</createTable>
|
||
|
<addPrimaryKey columnNames="id" constraintName="pk_project" tableName="project"/>
|
||
|
</changeSet>
|
||
|
<changeSet author="tanya" id="20181208_000000-3">
|
||
|
<createTable tableName="deadline">
|
||
|
<column name="id" type="integer">
|
||
|
<constraints nullable="false"/>
|
||
|
</column>
|
||
|
<column name="grant_id" type="integer"/>
|
||
|
</createTable>
|
||
|
<addPrimaryKey columnNames="id" constraintName="pk_deadline" tableName="deadline"/>
|
||
|
<addForeignKeyConstraint baseTableName="deadline" baseColumnNames="grant_id"
|
||
|
constraintName="fk_grant_grant_id" referencedTableName="grant"
|
||
|
referencedColumnNames="id"/>
|
||
|
</changeSet>
|
||
|
</databaseChangeLog>
|