[AB-263] adding stricter not null checks to database, disabling updates/inserts for created and updated columns to only rely on triggers

This commit is contained in:
Sheldan
2021-05-23 14:17:03 +02:00
parent 04a7cfafd7
commit 13a6e1fdca
145 changed files with 1204 additions and 350 deletions

View File

@@ -11,24 +11,20 @@
<column name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true" primaryKeyName="mod_mail_message_pkey"/>
</column>
<column name="created_message_in_dm" type="BIGINT" >
<constraints nullable="true"/>
</column>
<column name="created_message_in_channel" type="BIGINT" >
<constraints nullable="true"/>
</column>
<column name="created_message_in_dm" type="BIGINT" />
<column name="created_message_in_channel" type="BIGINT" />
<column name="server_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="anonymous" type="BOOLEAN">
<constraints nullable="true"/>
<constraints nullable="false"/>
</column>
<column name="created" type="TIMESTAMP WITHOUT TIME ZONE">
<constraints nullable="true"/>
<constraints nullable="false"/>
</column>
<column name="updated" type="TIMESTAMP WITHOUT TIME ZONE"/>
<column name="dm_channel" type="BOOLEAN">
<constraints nullable="true"/>
<constraints nullable="false"/>
</column>
<column name="author_user_in_server_id" type="BIGINT">
<constraints nullable="false"/>

View File

@@ -12,7 +12,7 @@
<constraints nullable="false" primaryKey="true" primaryKeyName="mod_mail_role_pkey"/>
</column>
<column name="created" type="TIMESTAMP WITHOUT TIME ZONE">
<constraints nullable="true"/>
<constraints nullable="false"/>
</column>
<column name="updated" type="TIMESTAMP WITHOUT TIME ZONE"/>
<column name="role_id" type="BIGINT">

View File

@@ -12,7 +12,7 @@
<constraints nullable="false" primaryKey="true" primaryKeyName="mod_mail_subscriber_pkey"/>
</column>
<column name="created" type="TIMESTAMP WITHOUT TIME ZONE">
<constraints nullable="true"/>
<constraints nullable="false"/>
</column>
<column name="updated" type="TIMESTAMP WITHOUT TIME ZONE"/>
<column name="user_in_server_id" type="BIGINT">

View File

@@ -11,15 +11,13 @@
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true" primaryKeyName="mod_mail_thread_pkey"/>
</column>
<column name="closed" type="TIMESTAMP WITHOUT TIME ZONE">
<constraints nullable="true"/>
</column>
<column name="closed" type="TIMESTAMP WITHOUT TIME ZONE"/>
<column name="created" type="TIMESTAMP WITHOUT TIME ZONE">
<constraints nullable="true"/>
<constraints nullable="false"/>
</column>
<column name="updated" type="TIMESTAMP WITHOUT TIME ZONE"/>
<column name="state" type="VARCHAR(255)">
<constraints nullable="true"/>
<constraints nullable="false"/>
</column>
<column name="channel_id" type="BIGINT">
<constraints nullable="false"/>