ALTER TABLE ccdi_project
    MODIFY COLUMN status CHAR(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0'
        COMMENT '项目状态：0-进行中，1-已完成，2-已归档，3-打标中，4-打标失败，5-已删除';

INSERT INTO sys_dict_data (
    dict_sort,
    dict_label,
    dict_value,
    dict_type,
    css_class,
    list_class,
    is_default,
    status,
    create_by,
    create_time,
    remark
)
SELECT
    6,
    '已删除',
    '5',
    'ccdi_project_status',
    '',
    'danger',
    'N',
    '0',
    'admin',
    NOW(),
    '项目逻辑删除状态'
WHERE NOT EXISTS (
    SELECT 1
    FROM sys_dict_data
    WHERE dict_type = 'ccdi_project_status'
      AND dict_value = '5'
);

UPDATE sys_role
SET remark = '可查看全部项目，可删除和恢复全部项目，其他操作由后端项目归属校验控制',
    update_by = 'admin',
    update_time = NOW()
WHERE role_key = 'manager';
