Files
gitlab-notification/src/main/resources/liquibase/change-set/v1.4.0.xml
2020-03-31 21:44:57 +03:00

54 lines
2.2 KiB
XML

<databaseChangeLog
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
<changeSet id="create-table-comments" author="upagge">
<createTable tableName="comment">
<column name="id" type="int" autoIncrement="true">
<constraints primaryKey="true"/>
</column>
<column name="url" type="varchar(300)"/>
<column name="telegram" type="integer"/>
<column name="date" type="datetime"/>
</createTable>
</changeSet>
<changeSet id="create-table-comment-tree" author="upagge">
<createTable tableName="comment_tree">
<column name="parent_id" type="int">
<constraints foreignKeyName="fk_parent_id_from_comment_id" references="comment(id)" nullable="false"/>
</column>
<column name="child_id" type="int">
<constraints foreignKeyName="fk_child_id_from_comment_id" references="comment(id)" nullable="false"/>
</column>
</createTable>
<addPrimaryKey tableName="comment_tree" columnNames="parent_id, child_id"/>
</changeSet>
<changeSet id="drop-table" author="upagge">
<dropTable tableName="tech_info"/>
</changeSet>
<changeSet id="dropForeignKeyConstraint-comment" author="upagge">
<dropForeignKeyConstraint baseTableName="comment_tree" constraintName="fk_child_id_from_comment_id"/>
</changeSet>
<changeSet id="modifyDataType-date-up-pr" author="upagge">
<modifyDataType catalogName="pg_catalog"
columnName="create_date"
newDataType="datetime"
schemaName="public"
tableName="pull_request"/>
</changeSet>
<changeSet id="modifyDataType-date-create-pr" author="upagge">
<modifyDataType catalogName="pg_catalog"
columnName="update_date"
newDataType="datetime"
schemaName="public"
tableName="pull_request"/>
</changeSet>
</databaseChangeLog>