66 lines
3.5 KiB
XML
66 lines
3.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="20181208_000000-1">
|
|
<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">
|
|
<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="file_id" type="integer"/>
|
|
<column name="applicationFileName" type="varchar(255)">
|
|
<constraints nullable="true"/>
|
|
</column>
|
|
<column name="version" type="integer"/>
|
|
</createTable>
|
|
<addPrimaryKey columnNames="id" constraintName="pk_grant" tableName="grant"/>
|
|
<addForeignKeyConstraint baseTableName="grant" baseColumnNames="project_id"
|
|
constraintName="fk_grant_project_id" referencedTableName="project"
|
|
referencedColumnNames="id"/>
|
|
<addForeignKeyConstraint baseTableName="grant" baseColumnNames="file_id"
|
|
constraintName="fk_grant_file_id" referencedTableName="file"
|
|
referencedColumnNames="id"/>
|
|
</changeSet>
|
|
|
|
<changeSet author="orion" id="20181211_000000-3">
|
|
<createTable tableName="deadline">
|
|
<column name="id" type="integer">
|
|
<constraints nullable="false"/>
|
|
</column>
|
|
<column name="date" type="timestamp"/>
|
|
<column name="description" type="varchar(255)"/>
|
|
<column name="project_id" type="integer"/>
|
|
<column name="grant_id" type="integer"/>
|
|
<column name="paper_id" type="integer"/>
|
|
<column name="version" type="integer"/>
|
|
</createTable>
|
|
<addPrimaryKey columnNames="id" constraintName="pk_deadline" tableName="deadline"/>
|
|
<addForeignKeyConstraint baseTableName="deadline" baseColumnNames="project_id"
|
|
constraintName="fk_deadline_project_id" referencedTableName="project"
|
|
referencedColumnNames="id"/>
|
|
<addForeignKeyConstraint baseTableName="deadline" baseColumnNames="grant_id"
|
|
constraintName="fk_deadline_grant_id" referencedTableName="grant"
|
|
referencedColumnNames="id"/>
|
|
<addForeignKeyConstraint baseTableName="deadline" baseColumnNames="paper_id"
|
|
constraintName="fk_deadline_paper_id" referencedTableName="paper"
|
|
referencedColumnNames="id"/>
|
|
</changeSet>
|
|
</databaseChangeLog>
|