# 脚本目录 ## 🛠️ 脚本列表 ``` scripts/ ├── init-production-db.sh # 生产数据库初始化 ├── production-db-setup.sh # 数据库配置 ├── production-migrate.sh # 生产环境迁移 └── test-migration.sh # 测试迁移 ``` ## 🎯 脚本用途 | 脚本 | 用途 | |---|---| | `init-production-db.sh` | 首次部署数据库 | | `production-migrate.sh` | 执行数据库迁移 | | `test-migration.sh` | 本地测试迁移 | ## 🚀 使用方式 ```bash # 生产环境初始化 ./scripts/init-production-db.sh # 执行迁移 ./scripts/production-migrate.sh up # 测试迁移 ./scripts/test-migration.sh ``` ## ⚠️ 注意事项 - 生产脚本需要数据库连接权限 - 迁移前建议备份数据 - 本地测试使用SQLite