mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
Add thesis status column for two-phase commit lifecycle tracking
This commit is contained in:
14
app/migrations/applied/039_add_thesis_status.sql
Normal file
14
app/migrations/applied/039_add_thesis_status.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
-- 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.
|
||||
Reference in New Issue
Block a user