{"id":25720146,"url":"https://github.com/gregwhitaker/dbmigrator","last_synced_at":"2026-05-12T12:11:09.599Z","repository":{"id":82732491,"uuid":"314066623","full_name":"gregwhitaker/dbmigrator","owner":"gregwhitaker","description":"Template project for creating a Flyway database migrator.","archived":false,"fork":false,"pushed_at":"2021-05-20T18:48:28.000Z","size":122,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-25T17:41:34.647Z","etag":null,"topics":["database-migration","flyway","flyway-migrations","postgresql","sql","template"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gregwhitaker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-18T21:50:33.000Z","updated_at":"2021-05-20T21:28:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"5eac146d-9ea6-48f8-8840-7c6eba0a312b","html_url":"https://github.com/gregwhitaker/dbmigrator","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/gregwhitaker/dbmigrator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregwhitaker%2Fdbmigrator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregwhitaker%2Fdbmigrator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregwhitaker%2Fdbmigrator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregwhitaker%2Fdbmigrator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gregwhitaker","download_url":"https://codeload.github.com/gregwhitaker/dbmigrator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregwhitaker%2Fdbmigrator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32938177,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-12T09:19:52.626Z","status":"ssl_error","status_checked_at":"2026-05-12T09:17:33.438Z","response_time":102,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database-migration","flyway","flyway-migrations","postgresql","sql","template"],"created_at":"2025-02-25T17:36:40.559Z","updated_at":"2026-05-12T12:11:09.594Z","avatar_url":"https://github.com/gregwhitaker.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dbmigrator\nUtility for managing database migration scripts and versioning.\n\n## Project Structure\nMigrations are stored in the following directories (please refer to the links below for more information):\n\n* [Flyway Script Migrations](/src/main/resources/db) - Migration scripts both universal and environment-specific.\n* [Flyway Java Migrations](/src/main/java/db/migration) - Java-based migrations.\n\n## Development\nCommon tasks for developing and testing migrations locally are detailed below:\n\n### Adding New Script Migration\nRun the following command to create a new script migration:\n\n    ./gradlew createMigrationScript --type=\"{migration type}\" --ver=\"{version}\" --desc=\"{description}\"\n    \nExample:\n\n    ./gradlew createMigrationScript --type=\"V\" --ver=\"1.0.21\" --desc=\"Add Table Foo\"\n    \nThe newly created script can be found in the script migration directory (`src/main/resources/db/migration`).\n\nIf you wish to create an environment-specific migration script, simply include the optional `--env` parameter:\n\n    ./gradlew createMigrationScript --type=\"{migration type}\" --ver=\"{version}\" --desc=\"{description}\" --env=\"{environment}\"\n    \nExample:\n\n    ./gradlew createMigrationScript --type=\"V\" --ver=\"1.0.21\" --desc=\"Add Table Foo\" --env=\"test\"\n\nThe newly created script can be found in the test script migration directory (`src/main/resources/db/migration-env/test`).\n\n### Adding New Java Migration\nRun the following command to create a new Java migration:\n\n    ./gradlew createMigrationClass --type=\"{migration type}\" --ver=\"{version}\" --desc=\"{description}\"\n    \nExample:\n\n    ./gradlew createMigrationClass --type=\"V\" --ver=\"1.0.21\" --desc=\"Add Table Foo\"\n    \nThe newly created class can be found in the java migration package (`src/main/java/db/migration`).\n\n### Building\nRun the following command to build the application:\n\n    ./gradlew clean build\n\nRun the following command to build the application as a Docker image (Executable Jar):\n\n    ./gradlew clean buildImage\n    \nRun the following command to build the application as a Docker image (Spring Boot):\n\n    ./gradlew clean buildBootImage\n\n### Running Migrations Locally\nThe project is configured to use Docker Compose for testing migrations locally and there are a number of Gradle tasks\nprovided to make the task easy.\n\n#### Migrate Database\nRun the following command to execute the database migration:\n\n    ./gradlew migrateDb\n\n#### Delete Database    \nRun the following command to delete the database:\n\n    ./gradlew cleanDb\n    \n#### Delete Database and Run Migration\nRun the following command to delete the database and rerun the migration:\n\n    ./gradlew cleanMigrateDb\n    \n#### Delete Database and Mounted Data Volumes\nThe MySQL container makes use of volumes to store data across container invocations. Run the following command to delete\nthe database, the associated data volumes, and start with a fresh instance:\n\n    ./gradlew killDb\n\n## Integration Testing\nThe project contains a set of integration tests for validating the database schema post migration. Run the following command\nto execute the integration tasks locally:\n\n    ./gradlew clean build integrationTest\n    \nFor more information on adding integration tests, please refer to the [Integration Test Documentation](/src/integration/README.md).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregwhitaker%2Fdbmigrator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregwhitaker%2Fdbmigrator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregwhitaker%2Fdbmigrator/lists"}