Database migration and comparison tool by ph4n4n
# Install
npm install andb-core
# Basic usage
andb export -t tables
andb compare -f functions
andb migrate:new -p procedures
- ✅ Database Export - Tables, Procedures, Functions, Triggers
- ✅ Environment Comparison - Compare between DEV/STAGE/PROD
- ✅ Migration Tools - New/Update/Remove objects
- ✅ Script Generator - Auto-generate npm scripts
- ✅ Multi-Environment - Support DEV/PROD workflows (extensible)
- 📖 CLI Usage - Complete CLI commands
- 📖 Script Generator - Auto-generate npm scripts
- 📖 Integration Guide - Programmatic usage
- 📖 Examples - Ready-to-use examples, please check QUICKSTART guild
- 📖 Hướng dẫn CLI - Lệnh CLI đầy đủ
- 📖 Script Generator - Tự động sinh npm scripts
- 📖 Hướng dẫn tích hợp - Sử dụng programmatic
- 📖 Ví dụ - Ví dụ sẵn sàng sử dụng, xem QUICKSTART để thấy rõ hơn
Auto-generate npm scripts for your workflow:
# Generate with default config
npm run generate
# Custom environments
ANDB_ENVIRONMENTS="DEV,STAGE,PROD" npm run generate
# Generated scripts
npm run export:dev:fn # Export functions from DEV
npm run compare:prod:sp # Compare procedures in PROD
npm run migrate:stage:new # Migrate new objects to STAGE
📖 Documentation: GENERATOR.md | GENERATOR_EN.md
andb-core/
├── core/ # Core functionality
├── examples/ # Integration examples
├── docs/ # Documentation
├── scripts/ # CLI scripts
└── test/ # Test files
# .env
DEV_DB_HOST=localhost
DEV_DB_NAM
68AE
E=dev_database
DEV_DB_USER=root
DEV_DB_PASS=password
PROD_DB_HOST=prod-server.com
PROD_DB_NAME=prod_database
PROD_DB_USER=prod_user
PROD_DB_PASS=prod_password
# 💡 Extend with more environments
# STAGE_DB_HOST=stage-server.com
# STAGE_DB_NAME=stage_database
# STAGE_DB_USER=stage_user
# STAGE_DB_PASS=stage_password
📦 <environment>
├── 📂 <schema>
│ ├── 📂 current-ddl
├── functions.list
├── procedures.list
├── tables.list
└── triggers.list
│ ├── ⚙️ functions
│ ├── 🔧 procedures
│ ├── 📊 tables
│ └── 🔄 triggers
└── 📂 backup/
└── 📅 <date>/
- Fork the repository
- Create feature branch
- Commit changes
- Push to branch
- Create Pull Request
MIT License - see LICENSE file
ph4n4n