| 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 | project_cards ADD COLUMN archived_ms BIGINT; |
| 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 | project_cards ADD COLUMN moved_ms BIGINT 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 | project_columns ADD COLUMN archive_after_days BIGINT; |