You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
slms/scripts/reset_database.bat

31 lines
647 B

@echo off
chcp 65001 >nul
echo ========================================
echo SLMS 数据库重置脚本
echo ========================================
echo.
echo ⚠️ 警告:此操作将清空所有数据!
echo.
pause
set JAVA_HOME=E:\2025-2026\GitAIOps\jdk
set PATH=%JAVA_HOME%\bin;%PATH%
echo.
echo 正在编译项目...
call mvn clean compile -q
if %errorlevel% neq 0 (
echo 编译失败!
pause
exit /b 1
)
echo.
echo 正在重置数据库...
call mvn exec:java -Dexec.mainClass="com.smartlibrary.InitDatabase" -Dexec.args="--reset" -Dexec.cleanupDaemonThreads=false -q
echo.
echo 数据库重置完成!
echo.
pause