max / makenotwork
| 1 | -- Items can be unlisted (hidden from project page, accessible via bundle or direct URL) |
| 2 | items ADD COLUMN listed BOOLEAN NOT NULL DEFAULT true; |
| 3 | |
| 4 | -- Bundle contents: which items are included in a bundle-type item |
| 5 | ( |
| 6 | bundle_id UUID NOT NULL REFERENCES items(id) ON DELETE CASCADE, |
| 7 | item_id UUID NOT NULL REFERENCES items(id) ON DELETE CASCADE, |
| 8 | sort_order INT NOT NULL DEFAULT 0, |
| 9 | added_at TIMESTAMPTZ NOT NULL DEFAULT NOW, |
| 10 | PRIMARY KEY (bundle_id, item_id), |
| 11 | CHECK (bundle_id != item_id) |
| 12 | ); |
| 13 | |
| 14 | ON bundle_items(item_id); |
| 15 |