peixue-dev/Archive/peidu-temp-files/scripts/执行-添加order_id字段.bat

28 lines
643 B
Batchfile
Raw 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
chcp 65001 >nul
echo ========================================
echo 为打卡记录表添加 order_id 字段
echo ========================================
echo.
echo 正在执行SQL脚本...
mysql -u root -p123456 peixue < "%~dp0add_order_id_to_checkin_2026-01-23.sql"
if %errorlevel% equ 0 (
echo.
echo ✅ SQL脚本执行成功
echo.
echo 已完成以下操作:
echo 1. 检查并添加 order_id 字段
echo 2. 添加索引 idx_order_id
echo 3. 关联现有数据的 order_id
echo.
) else (
echo.
echo ❌ SQL脚本执行失败
echo 错误代码: %errorlevel%
echo.
)
pause