[AB-103] adding triggers to update created and updating attributes on tables

fixing error handling in installer
merging change sets to larger operations
adding check constraints
fixing suggestion id handling
applying naming conventions to various columns
adding indices to tables
adding user in server and user locking
This commit is contained in:
Sheldan
2021-02-07 03:06:48 +01:00
parent dac3b0887f
commit 038d5c3832
126 changed files with 1416 additions and 986 deletions

View File

@@ -78,19 +78,9 @@ public class TrackedEmote implements Serializable, Fakeable {
@Column(name = "created")
private Instant created;
@PrePersist
private void onInsert() {
this.created = Instant.now();
}
@Column(name = "updated")
private Instant updated;
@PreUpdate
private void onUpdate() {
this.updated = Instant.now();
}
/**
* Some emotes are build on demand, and do not necessarily be persisted. This happens when the emote is being used as a
* {@link dev.sheldan.abstracto.core.command.config.Parameter}.

View File

@@ -5,6 +5,7 @@ import lombok.*;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import javax.persistence.*;
import java.time.Instant;
/**
* An actual instance which has been used on a certain date with a certain amount.
@@ -43,4 +44,10 @@ public class UsedEmote {
*/
@Column(name = "amount")
private Long amount;
@Column(name = "created")
private Instant created;
@Column(name = "updated")
private Instant updated;
}