A simple project to understand and explore database migration concepts and implementation. This project serves as a learning exercise to dive deeper into how database schema changes are managed and versioned.
- How to implement SQL-based migrations
- Version control for database schemas
- Checksum implementation for file integrity
- Transaction handling in migrations
- Database connectivity and operations
-
Migration files are stored in
src/main/resources/migrations/following the pattern:V{version}__{description}.sqlExample:
V1__create_users.sql -
To build:
./gradlew build
-
To run:
java -jar build/libs/simple-db-migrator-1.0-SNAPSHOT.jar <jdbc-url> <username> <password>