[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">
<constraints nullable="false"/>
</column>
<column name="reason" type="VARCHAR(255)">
<column name="reason" type="VARCHAR(2048)">
<constraints nullable="false"/>
</column>
<column name="warn_date" type="TIMESTAMP WITHOUT TIME ZONE">

View File

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