-- Migration: 010_add_soft_delete
-- Description: 为人员、站点、工作记录添加逻辑删除字段
-- Date: 2026-08-01

ALTER TABLE people ADD COLUMN deleted_at TEXT;
ALTER TABLE stations ADD COLUMN deleted_at TEXT;
ALTER TABLE work_records ADD COLUMN deleted_at TEXT;
ALTER TABLE work_records ADD COLUMN attachments TEXT;
ALTER TABLE work_records ADD COLUMN created_at TEXT;
UPDATE work_records SET created_at = datetime('now', 'localtime') WHERE created_at IS NULL;
