Files
Neo-ZQYY/scripts/README.md

38 lines
1.6 KiB
Markdown
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.
# scripts/
## 作用说明
运维与构建脚本目录,存放项目级的审计工具、日常运维、一次性迁移等脚本。
## 内部结构
```
scripts/
├── audit/ # 审计工具
│ └── gen_audit_dashboard.py # 审计一览表生成(扫描 docs/audit/changes/
├── ops/ # 日常运维
│ ├── start-admin.ps1 # 一键启动管理后台(后端 + 前端)
│ ├── init_databases.py # 初始化 etl_feiqiu / zqyy_app DDL + 种子
│ └── clone_to_test_db.py # 正式库 → 测试库完整镜像
├── migrate/ # 一次性迁移LLZQ-test → etl_feiqiu
│ ├── migrate_data.py # 跨库 COPY 数据迁移
│ ├── migrate_finalize.py # 物化视图 + ANALYZE + 验证
│ ├── migrate_fix_remaining.py# 修复部分导入的重复键
│ ├── fix_remaining.py # 补执行失败的 DDL/种子
│ ├── fix_schema_refs.py # 批量替换运行时旧 schema 引用
│ └── batch_schema_rename.py # 批量 schema 重命名billiards_xxx → xxx
└── README.md
```
## 说明
- `audit/` — 审计工具脚本(审计一览表生成等)
- `ops/` — 可反复使用的运维脚本
- `migrate/` — 从旧库搬迁到新库的一次性脚本,迁移完成后仅保留备查
- 脚本运行产生的临时输出文件统一放在项目根目录 `tmp/`(已被 .gitignore 忽略)
## Roadmap
- 补充 CI/CD 辅助脚本lint、test、build
- 补充数据库备份/恢复脚本