mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
15 lines
644 B
SQL
15 lines
644 B
SQL
-- 039: Add a status column to theses to track submission lifecycle
|
|
--
|
|
-- Lifecycle:
|
|
-- draft — thesis row created, file operations not yet completed (or failed)
|
|
-- active — all file operations succeeded, submission is complete
|
|
--
|
|
-- Separate from is_published (visibility). The admin can filter drafts
|
|
-- to find orphaned/broken submissions and the cleanup-drafts job targets
|
|
-- status='draft' rows older than a threshold.
|
|
|
|
ALTER TABLE theses ADD COLUMN status TEXT NOT NULL DEFAULT 'active';
|
|
|
|
-- Existing theses already have files → they are active.
|
|
-- New theses start as draft and are promoted to active after file ops succeed.
|