feat(db): add deleted_at to board_images

This commit is contained in:
psychedelicious 2023-06-22 10:42:30 +10:00
parent d3e6f0130c
commit 6ee0e197bb

View File

@ -95,6 +95,8 @@ class SqliteBoardImageRecordStorage(BoardImageRecordStorageBase):
updated_at DATETIME NOT NULL DEFAULT(STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')),
-- enforce one-to-many relationship between boards and images using PK
-- (we can extend this to many-to-many later)
-- Soft delete, currently unused
deleted_at DATETIME,
PRIMARY KEY (image_name),
FOREIGN KEY (board_id) REFERENCES boards (board_id) ON DELETE CASCADE,
FOREIGN KEY (image_name) REFERENCES images (image_name) ON DELETE CASCADE