OXYGENHUB
◆ v0.9.6 oxygenhub / crates / hub / migrations / 0093_card_archive.sql
605 B · SQL · last changed Board cards can be archived, by hand or by age (refs #293) 11 days ago source blame history raw
439ecd87 Andy McCall ↶ 1
-- Archived board cards (oxygenhub#293): off the board, kept, found with
2
-- the board's archive view and restorable. NULL while on the board.
3
ALTER TABLE project_cards ADD COLUMN archived_ms INTEGER;
4
-- When a card joined its column, so a column's cards can be archived some
5
-- days after they reached it (Done after 14 days).
6
ALTER TABLE project_cards ADD COLUMN moved_ms INTEGER NOT NULL DEFAULT 0;
7
UPDATE project_cards SET moved_ms = created_ms;
8
-- A column whose cards are archived this many days after they joined it;
9
-- NULL never.
10
ALTER TABLE project_columns ADD COLUMN archive_after_days INTEGER;