13 lines
496 B
MySQL
13 lines
496 B
MySQL
|
|
-- Central solution management: reversible archiving without losing case history.
|
||
|
|
ALTER TABLE sag_solutions
|
||
|
|
ADD COLUMN IF NOT EXISTS deleted_at TIMESTAMP,
|
||
|
|
ADD COLUMN IF NOT EXISTS deleted_by_user_id INTEGER;
|
||
|
|
|
||
|
|
CREATE INDEX IF NOT EXISTS idx_sag_solutions_management
|
||
|
|
ON sag_solutions(deleted_at, approval_status, visibility, updated_at DESC);
|
||
|
|
|
||
|
|
ALTER TABLE knowledge_articles
|
||
|
|
ADD COLUMN IF NOT EXISTS archived_at TIMESTAMP,
|
||
|
|
ADD COLUMN IF NOT EXISTS archived_by_user_id INTEGER;
|
||
|
|
|