38 lines
1.9 KiB
XML
38 lines
1.9 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="orion" id="20180505_000000-0">
|
||
|
<createTable tableName="file">
|
||
|
<column name="id" type="integer">
|
||
|
<constraints nullable="false"/>
|
||
|
</column>
|
||
|
<column name="name" type="varchar(255)"/>
|
||
|
<column name="size" type="bigint"/>
|
||
|
<column name="create_date" type="timestamp"/>
|
||
|
<column name="data" type="bytea"/>
|
||
|
<column name="version" type="integer"/>
|
||
|
</createTable>
|
||
|
<addPrimaryKey columnNames="id" constraintName="pk_file" tableName="file"/>
|
||
|
</changeSet>
|
||
|
<changeSet author="orion" id="20180505_000000-1">
|
||
|
<createTable tableName="paper">
|
||
|
<column name="id" type="integer">
|
||
|
<constraints nullable="false"/>
|
||
|
</column>
|
||
|
<column name="title" type="varchar(255)"/>
|
||
|
<column name="status" type="varchar(255)"/>
|
||
|
<column name="create_date" type="timestamp"/>
|
||
|
<column name="update_date" type="timestamp"/>
|
||
|
<column name="comment" type="varchar(255)"/>
|
||
|
<column name="locked" type="boolean"/>
|
||
|
<column name="file_id" type="integer"/>
|
||
|
<column name="version" type="integer"/>
|
||
|
</createTable>
|
||
|
<addPrimaryKey columnNames="id" constraintName="pk_paper" tableName="paper"/>
|
||
|
<addForeignKeyConstraint baseTableName="paper" baseColumnNames="file_id"
|
||
|
constraintName="fk_paper_file" referencedTableName="file"
|
||
|
referencedColumnNames="id"/>
|
||
|
</changeSet>
|
||
|
</databaseChangeLog>
|