45 lines
2.5 KiB
XML
45 lines
2.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="orion" id="20181030_000000-1">
|
|
<createTable tableName="timeline">
|
|
<column name="id" type="integer">
|
|
<constraints nullable="false"/>
|
|
</column>
|
|
<column name="version" type="integer"/>
|
|
</createTable>
|
|
<addPrimaryKey columnNames="id" constraintName="pk_timeline" tableName="timeline"/>
|
|
</changeSet>
|
|
<changeSet author="orion" id="20181030_000000-4">
|
|
<createTable tableName="event">
|
|
<column name="id" type="integer">
|
|
<constraints nullable="false"/>
|
|
</column>
|
|
<column name="title" type="varchar(255)"/>
|
|
<column name="create_date" type="timestamp"/>
|
|
<column name="execute_date" type="timestamp"/>
|
|
<column name="update_date" type="timestamp"/>
|
|
<column name="description" type="varchar(255)"/>
|
|
<column name="timeline_id" type="integer"/>
|
|
<column name="version" type="integer"/>
|
|
</createTable>
|
|
<addPrimaryKey columnNames="id" constraintName="pk_event" tableName="event"/>
|
|
<addForeignKeyConstraint baseTableName="event" baseColumnNames="timeline_id"
|
|
constraintName="fk_event_timeline" referencedTableName="timeline"
|
|
referencedColumnNames="id"/>
|
|
</changeSet>
|
|
<changeSet author="orion" id="20181030_000000-5">
|
|
<createTable tableName="event_recipients">
|
|
<column name="event_id" type="integer"/>
|
|
<column name="recipients_id" type="integer"/>
|
|
</createTable>
|
|
<addForeignKeyConstraint baseTableName="event_recipients" baseColumnNames="event_id"
|
|
constraintName="fk_event_event_recipients" referencedTableName="event"
|
|
referencedColumnNames="id"/>
|
|
<addForeignKeyConstraint baseTableName="event_recipients" baseColumnNames="recipients_id"
|
|
constraintName="fk_user_event_recipients" referencedTableName="users"
|
|
referencedColumnNames="id"/>
|
|
</changeSet>
|
|
</databaseChangeLog>
|