feat(db): 新增 pipeline_session_settings 会话级项目设置表
多tab独立会话的项目上下文按 (user_id, session_id) 存储,UNIQUE(user_id,session_id)
This commit is contained in:
parent
8e6510b775
commit
74c4568157
@ -120,6 +120,20 @@ CREATE TABLE IF NOT EXISTS sd_work_envs (
|
||||
UNIQUE KEY `uk_owner` (`owner_type`,`owner_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
""",
|
||||
"""
|
||||
CREATE TABLE IF NOT EXISTS pipeline_session_settings (
|
||||
`id` varchar(32) NOT NULL,
|
||||
`session_id` varchar(64) NOT NULL,
|
||||
`user_id` varchar(32) NOT NULL,
|
||||
`current_project_id` varchar(32) NOT NULL DEFAULT '',
|
||||
`current_iteration_id` varchar(32) NOT NULL DEFAULT '',
|
||||
`created_at` datetime NOT NULL DEFAULT current_timestamp(),
|
||||
`updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_user_session` (`user_id`,`session_id`),
|
||||
KEY `idx_session` (`session_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
""",
|
||||
]
|
||||
|
||||
# v2 引擎列迁移(原 init.py::_init_v2_tables 启动时 ALTER 迁移,现迁到部署期,information_schema 幂等)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user