add soft delete with trash page and group photo chronology with styling
This commit is contained in:
+12
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user