mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-03-03 23:31:24 +00:00
[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:
@@ -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}.
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user