2018-12-08 23:53:38 +04:00
|
|
|
<?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">
|
2018-12-11 15:08:35 +04:00
|
|
|
<createTable tableName="project">
|
|
|
|
<column name="id" type="integer">
|
|
|
|
<constraints nullable="false"/>
|
|
|
|
</column>
|
|
|
|
<column name="title" type="varchar(255)"/>
|
|
|
|
<column name="version" type="integer"/>
|
|
|
|
</createTable>
|
|
|
|
<addPrimaryKey columnNames="id" constraintName="pk_project" tableName="project"/>
|
|
|
|
</changeSet>
|
|
|
|
|
|
|
|
|
|
|
|
<changeSet author="tanya" id="20181208_000000-2">
|
2018-12-08 23:53:38 +04:00
|
|
|
<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"/>
|
2018-12-11 15:08:35 +04:00
|
|
|
<column name="file_id" type="integer"/>
|
2018-12-08 23:53:38 +04:00
|
|
|
<column name="applicationFileName" type="varchar(255)">
|
|
|
|
<constraints nullable="true"/>
|
|
|
|
</column>
|
2018-12-11 15:08:35 +04:00
|
|
|
<column name="version" type="integer"/>
|
2018-12-08 23:53:38 +04:00
|
|
|
</createTable>
|
|
|
|
<addPrimaryKey columnNames="id" constraintName="pk_grant" tableName="grant"/>
|
|
|
|
<addForeignKeyConstraint baseTableName="grant" baseColumnNames="project_id"
|
2018-12-11 15:08:35 +04:00
|
|
|
constraintName="fk_grant_project_id" referencedTableName="project"
|
|
|
|
referencedColumnNames="id"/>
|
|
|
|
<addForeignKeyConstraint baseTableName="grant" baseColumnNames="file_id"
|
|
|
|
constraintName="fk_grant_file_id" referencedTableName="file"
|
2018-12-08 23:53:38 +04:00
|
|
|
referencedColumnNames="id"/>
|
|
|
|
</changeSet>
|
2018-12-11 15:08:35 +04:00
|
|
|
|
|
|
|
<changeSet author="orion" id="20181211_000000-3">
|
2018-12-08 23:53:38 +04:00
|
|
|
<createTable tableName="deadline">
|
|
|
|
<column name="id" type="integer">
|
|
|
|
<constraints nullable="false"/>
|
|
|
|
</column>
|
2018-12-11 15:08:35 +04:00
|
|
|
<column name="date" type="timestamp"/>
|
|
|
|
<column name="description" type="varchar(255)"/>
|
|
|
|
<column name="project_id" type="integer"/>
|
2018-12-08 23:53:38 +04:00
|
|
|
<column name="grant_id" type="integer"/>
|
2018-12-11 15:08:35 +04:00
|
|
|
<column name="paper_id" type="integer"/>
|
|
|
|
<column name="version" type="integer"/>
|
2018-12-08 23:53:38 +04:00
|
|
|
</createTable>
|
|
|
|
<addPrimaryKey columnNames="id" constraintName="pk_deadline" tableName="deadline"/>
|
2018-12-11 15:08:35 +04:00
|
|
|
<addForeignKeyConstraint baseTableName="deadline" baseColumnNames="project_id"
|
|
|
|
constraintName="fk_deadline_project_id" referencedTableName="project"
|
|
|
|
referencedColumnNames="id"/>
|
2018-12-08 23:53:38 +04:00
|
|
|
<addForeignKeyConstraint baseTableName="deadline" baseColumnNames="grant_id"
|
2018-12-11 15:08:35 +04:00
|
|
|
constraintName="fk_deadline_grant_id" referencedTableName="grant"
|
|
|
|
referencedColumnNames="id"/>
|
|
|
|
<addForeignKeyConstraint baseTableName="deadline" baseColumnNames="paper_id"
|
|
|
|
constraintName="fk_deadline_paper_id" referencedTableName="paper"
|
2018-12-08 23:53:38 +04:00
|
|
|
referencedColumnNames="id"/>
|
|
|
|
</changeSet>
|
|
|
|
</databaseChangeLog>
|