Database migrations are written in Go. Use as CLI or import as a library. Migrate reads migrations from sources and applies them in correct order to a database. Drivers are "dumb", migrate glues everything together and makes sure the logic is bulletproof. (Keeps the drivers lightweight, too.) Database drivers don't assume things or try to correct user input. When in doubt, fail. Package migrate reads migrations from sources and runs them against databases. Sources are defined by the `source.Driver` and databases by the `database.Driver` interface. The driver interfaces are kept "dump", all migration logic is kept in this package.
Features
- Database connection strings are specified via URLs
- Any reserved URL characters need to be escaped
- Source drivers read migrations from local or remote sources
- Simple wrapper around this library
- Handles ctrl+c (SIGINT) gracefully
- No config search paths, no config files, no magic ENV var injections
License
MIT LicenseFollow migrate
Other Useful Business Software
Stay in Flow. Let Zenflow Handle the Heavy Lifting.
Zenflow is your engineering control center, turning specs into shipped features. Parallel agents handle coding, testing, and refactoring with real repo context. Multi-agent workflows remove bottlenecks and automate routine work so developers stay focused and in flow.
Rate This Project
Login To Rate This Project
User Reviews
Be the first to post a review of migrate!