fix(deploy): add V2 consulting columns in full-reset
- Add SQL to create consulting_stage, consulting_state, collected_info, recommended_programs, conversion_path, device_info columns - Runs after migration step in full-reset to ensure V2 features work Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
15ff2f1c3c
commit
90917b3ac8
11
deploy.sh
11
deploy.sh
|
|
@ -971,6 +971,17 @@ do_full_reset() {
|
|||
sleep 5 # 等待数据库完全初始化
|
||||
do_db migrate
|
||||
|
||||
# 7.1 添加 V2 咨询流程所需的数据库列
|
||||
log_step "添加 V2 咨询流程数据库列..."
|
||||
docker exec -i iconsulting-postgres psql -U postgres -d iconsulting -c "
|
||||
ALTER TABLE conversations ADD COLUMN IF NOT EXISTS consulting_stage VARCHAR(30) DEFAULT 'greeting';
|
||||
ALTER TABLE conversations ADD COLUMN IF NOT EXISTS consulting_state JSONB;
|
||||
ALTER TABLE conversations ADD COLUMN IF NOT EXISTS collected_info JSONB;
|
||||
ALTER TABLE conversations ADD COLUMN IF NOT EXISTS recommended_programs TEXT[];
|
||||
ALTER TABLE conversations ADD COLUMN IF NOT EXISTS conversion_path VARCHAR(30);
|
||||
ALTER TABLE conversations ADD COLUMN IF NOT EXISTS device_info JSONB;
|
||||
" 2>/dev/null && log_success "V2 数据库列已添加" || log_warning "V2 数据库列添加跳过"
|
||||
|
||||
# 8. 启动所有后端服务
|
||||
log_step "启动后端服务..."
|
||||
do_start backend docker
|
||||
|
|
|
|||
Loading…
Reference in New Issue