Convert Serie and SeriePunkt from data class to regular class, implement manual copy, equals, hashCode, and toString methods for JPA compliance, adjust column mappings, and add Flyway migration for database schema creation.
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
CREATE TABLE serien (
|
||||
id VARCHAR(36) PRIMARY KEY,
|
||||
name VARCHAR(255) NOT NULL,
|
||||
beschreibung TEXT,
|
||||
reglement_typ VARCHAR(50) NOT NULL,
|
||||
streichresultate_count INTEGER NOT NULL DEFAULT 0,
|
||||
bindungstyp VARCHAR(50) NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE serie_bewerbe (
|
||||
serie_id VARCHAR(36) NOT NULL,
|
||||
bewerb_id VARCHAR(36) NOT NULL,
|
||||
PRIMARY KEY (serie_id, bewerb_id),
|
||||
CONSTRAINT fk_serie FOREIGN KEY (serie_id) REFERENCES serien(id) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
CREATE TABLE serie_punkte (
|
||||
id VARCHAR(36) PRIMARY KEY,
|
||||
serie_id VARCHAR(36) NOT NULL,
|
||||
reiter_id VARCHAR(36) NOT NULL,
|
||||
pferd_id VARCHAR(36) NOT NULL,
|
||||
bewerb_id VARCHAR(36) NOT NULL,
|
||||
punkte DOUBLE PRECISION NOT NULL,
|
||||
platzierung INTEGER NOT NULL,
|
||||
CONSTRAINT fk_serie_punkte FOREIGN KEY (serie_id) REFERENCES serien(id) ON DELETE CASCADE
|
||||
);
|
||||
Reference in New Issue
Block a user