kindergarten_java/lesingle-edu-reading-platform-backend/clean-flyway.ps1
En 40589f59e7 chore: 重命名项目目录
前后端目录重命名:
- reading-platform-java/ → lesingle-edu-reading-platform-backend/
- reading-platform-frontend/ → lesingle-edu-reading-platform-frontend/

更新相关文件:
- 所有 shell 脚本中的目录引用
- pom.xml 和 application.yml 中的项目名称
- package.json 中的项目名称
- .claude/CLAUDE.md 中的路径引用
- README 文档中的路径引用
2026-03-26 11:31:47 +08:00

32 lines
1013 B
PowerShell
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.

# 清理 Flyway 迁移历史的 PowerShell 脚本
# 使用 MySQL Connector/NET 执行 SQL
$mysqlExe = "C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql.exe"
# 如果 mysql.exe 不存在,尝试其他常见路径
if (!(Test-Path $mysqlExe)) {
$mysqlExe = "C:\Program Files\MySQL\MySQL Workbench 8.0\mysql.exe"
}
if (!(Test-Path $mysqlExe)) {
Write-Host "未找到 MySQL 客户端,请手动执行以下 SQL"
Write-Host ""
Write-Host "USE reading_platform;"
Write-Host "DROP TABLE IF EXISTS flyway_schema_history;"
Write-Host ""
exit 1
}
Write-Host "正在清理 Flyway 迁移历史..."
Write-Host "MySQL 路径:$mysqlExe"
$sql = "USE reading_platform; DROP TABLE IF EXISTS flyway_schema_history; SELECT '清理完成' AS status;"
& $mysqlExe -h 8.148.151.56 -u root -p"reading_platform_pwd" -e $sql
if ($LASTEXITCODE -eq 0) {
Write-Host "清理成功!" -ForegroundColor Green
} else {
Write-Host "清理失败,请检查数据库连接" -ForegroundColor Red
}