mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-02 21:13:57 +00:00
Simplify entity relationship and enforce foreign key constraints
Removed the resetStoredObject() method call from StoredObject, adjusted the storedObjectId column in the stored_object_version table to be NOT NULL, and moved the association setup of the StoredObject entity directly into the constructor in StoredObjectVersion. This ensures that every StoredObjectVersion has a valid StoredObject and maintains database integrity.
This commit is contained in:
@@ -28,7 +28,7 @@ final class Version20240709102730 extends AbstractMigration
|
||||
<<<'SQL'
|
||||
CREATE TABLE chill_doc.stored_object_version (
|
||||
id INT NOT NULL,
|
||||
stored_object_id INT DEFAULT NULL,
|
||||
stored_object_id INT NOT NULL,
|
||||
version INT DEFAULT 0 NOT NULL,
|
||||
filename TEXT NOT NULL,
|
||||
iv JSON NOT NULL,
|
||||
|
Reference in New Issue
Block a user