Files
ai_english/serve/run_migration.bat
2025-11-17 14:09:17 +08:00

20 lines
549 B
Batchfile
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
REM 执行数据库迁移脚本 - 添加is_favorite字段
echo 正在执行数据库迁移...
echo.
REM 使用Docker容器中的MySQL执行
docker exec -i ai_english_learning-mysql-1 mysql -uroot -proot ai_english_learning < migrations\add_is_favorite_to_user_word_progress.sql
if %ERRORLEVEL% EQU 0 (
echo.
echo ✅ 迁移成功完成!
echo is_favorite字段已添加到ai_user_word_progress表
) else (
echo.
echo ❌ 迁移失败,请检查错误信息
echo 提示确保Docker容器正在运行
)
pause