[AB-284] resizing warn length and changing default date behaviour for mute

This commit is contained in:
Sheldan
2021-06-02 00:36:36 +02:00
parent 7fdb87ef1f
commit 793a1c3657
2 changed files with 4 additions and 2 deletions

View File

@@ -19,7 +19,7 @@
<column name="decayed" type="BOOLEAN"> <column name="decayed" type="BOOLEAN">
<constraints nullable="false"/> <constraints nullable="false"/>
</column> </column>
<column name="reason" type="VARCHAR(255)"> <column name="reason" type="VARCHAR(2048)">
<constraints nullable="false"/> <constraints nullable="false"/>
</column> </column>
<column name="warn_date" type="TIMESTAMP WITHOUT TIME ZONE"> <column name="warn_date" type="TIMESTAMP WITHOUT TIME ZONE">

View File

@@ -97,8 +97,10 @@ public class Mute implements Serializable {
@PrePersist @PrePersist
private void onInsert() { private void onInsert() {
if(muteDate == null) {
this.muteDate = Instant.now(); this.muteDate = Instant.now();
} }
}
@Column(name = "updated", insertable = false, updatable = false) @Column(name = "updated", insertable = false, updatable = false)
private Instant updated; private Instant updated;