mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-13 03:26:31 +00:00
[AB-161] fixed composite foreign keys for multiple tables
This commit is contained in:
@@ -8,9 +8,7 @@
|
||||
http://www.liquibase.org/xml/ns/pro ../../dbchangelog-3.8.xsd" >
|
||||
<changeSet author="Sheldan" id="mute-table">
|
||||
<createTable tableName="mute">
|
||||
<column autoIncrement="true" name="id" type="BIGINT">
|
||||
<constraints nullable="false" primaryKey="true" primaryKeyName="mute_pkey"/>
|
||||
</column>
|
||||
<column name="id" type="BIGINT" />
|
||||
<column name="created" type="TIMESTAMP WITHOUT TIME ZONE"/>
|
||||
<column name="reason" type="VARCHAR(255)"/>
|
||||
<column name="trigger_key" type="VARCHAR(255)"/>
|
||||
@@ -32,6 +30,7 @@
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</createTable>
|
||||
<addPrimaryKey columnNames="server_id, id" tableName="mute" constraintName="pk_mute" validate="true"/>
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="Sheldan" id="mute-fk_mute_channel">
|
||||
|
||||
@@ -8,9 +8,7 @@
|
||||
http://www.liquibase.org/xml/ns/pro ../../dbchangelog-3.8.xsd" >
|
||||
<changeSet author="Sheldan" id="user_note-table">
|
||||
<createTable tableName="user_note">
|
||||
<column autoIncrement="true" name="id" type="BIGINT">
|
||||
<constraints nullable="false" primaryKey="true" primaryKeyName="user_note_pkey"/>
|
||||
</column>
|
||||
<column autoIncrement="true" name="id" type="BIGINT" />
|
||||
<column name="created" type="TIMESTAMP WITHOUT TIME ZONE"/>
|
||||
<column name="note" type="VARCHAR(2000)"/>
|
||||
<column name="note_user" type="BIGINT">
|
||||
@@ -20,6 +18,7 @@
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</createTable>
|
||||
<addPrimaryKey columnNames="server_id, id" tableName="user_note" constraintName="pk_user_note" validate="true"/>
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="Sheldan" id="user_note-fk_user_note_user">
|
||||
|
||||
@@ -8,9 +8,7 @@
|
||||
http://www.liquibase.org/xml/ns/pro ../../dbchangelog-3.8.xsd" >
|
||||
<changeSet author="Sheldan" id="warning-table">
|
||||
<createTable tableName="warning">
|
||||
<column autoIncrement="true" name="id" type="BIGINT">
|
||||
<constraints nullable="false" primaryKey="true" primaryKeyName="warning_pkey"/>
|
||||
</column>
|
||||
<column autoIncrement="true" name="id" type="BIGINT" />
|
||||
<column name="created" type="TIMESTAMP WITHOUT TIME ZONE"/>
|
||||
<column name="decay_date" type="TIMESTAMP WITHOUT TIME ZONE"/>
|
||||
<column name="decayed" type="BOOLEAN"/>
|
||||
@@ -27,9 +25,9 @@
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</createTable>
|
||||
<addPrimaryKey columnNames="server_id, id" tableName="warning" constraintName="pk_warning" validate="true"/>
|
||||
</changeSet>
|
||||
|
||||
|
||||
<changeSet author="Sheldan" id="warning-fk_warning_warned_user">
|
||||
<addForeignKeyConstraint baseColumnNames="warned_user_id" baseTableName="warning" constraintName="fk_warning_warned_user" deferrable="false" initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION" referencedColumnNames="user_in_server_id" referencedTableName="user_in_server" validate="true"/>
|
||||
</changeSet>
|
||||
|
||||
Reference in New Issue
Block a user