add soft delete with trash page and group photo chronology with styling

This commit is contained in:
dev
2026-09-06 13:51:47 +03:00
parent 05c2b86144
commit 410cd5eadf
9 changed files with 594 additions and 45 deletions
+12
View File
@@ -17,6 +17,7 @@ CREATE TABLE IF NOT EXISTS entries (
group_id INT NOT NULL REFERENCES groups(id),
description TEXT NOT NULL,
photo_path VARCHAR(255),
deleted_at TIMESTAMPTZ,
created_at TIMESTAMPTZ DEFAULT now()
);
@@ -45,6 +46,17 @@ INSERT INTO groups (name) VALUES
('Advanced')
ON CONFLICT (name) DO NOTHING;
CREATE TABLE IF NOT EXISTS group_photos (
id SERIAL PRIMARY KEY,
group_id INT NOT NULL REFERENCES groups(id) ON DELETE CASCADE,
photo_path VARCHAR(255) NOT NULL,
caption TEXT,
taken_at DATE,
created_at TIMESTAMPTZ DEFAULT now()
);
CREATE INDEX IF NOT EXISTS idx_group_photos_group_id ON group_photos(group_id);
CREATE TABLE IF NOT EXISTS project_files (
id SERIAL PRIMARY KEY,
entry_id INT NOT NULL REFERENCES entries(id) ON DELETE CASCADE,