{"id":18966942,"url":"https://github.com/link-intersystems/dbunit-migration-maven-plugin","last_synced_at":"2026-07-02T11:34:26.904Z","repository":{"id":50585335,"uuid":"519534580","full_name":"link-intersystems/dbunit-migration-maven-plugin","owner":"link-intersystems","description":"A maven plugin to migrate dbunit data sets via flyway with support from testcontainers.","archived":false,"fork":false,"pushed_at":"2023-07-11T06:47:36.000Z","size":1313,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-27T02:40:14.391Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/link-intersystems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-07-30T14:13:55.000Z","updated_at":"2022-08-01T11:15:45.000Z","dependencies_parsed_at":"2024-11-08T14:41:11.160Z","dependency_job_id":"0a36be01-7137-40a3-98fe-2dbd93f03b35","html_url":"https://github.com/link-intersystems/dbunit-migration-maven-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/link-intersystems/dbunit-migration-maven-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/link-intersystems%2Fdbunit-migration-maven-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/link-intersystems%2Fdbunit-migration-maven-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/link-intersystems%2Fdbunit-migration-maven-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/link-intersystems%2Fdbunit-migration-maven-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/link-intersystems","download_url":"https://codeload.github.com/link-intersystems/dbunit-migration-maven-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/link-intersystems%2Fdbunit-migration-maven-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35045923,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-02T02:00:06.368Z","response_time":173,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-08T14:39:09.662Z","updated_at":"2026-07-02T11:34:26.879Z","avatar_url":"https://github.com/link-intersystems.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Maven Site](https://img.shields.io/badge/Maven-Site-brightgreen)](https://link-intersystems.github.io/dbunit-migration-maven-plugin/)\n[![Maven Central](https://img.shields.io/maven-central/v/com.link-intersystems.dbunit.maven/dbunit-migration-maven-plugin)](https://mvnrepository.com/artifact/com.link-intersystems.dbunit.maven)\n![Java CI with Maven](https://github.com/link-intersystems/dbunit-migration-maven-plugin/workflows/Java%20CI%20with%20Maven/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/github/link-intersystems/dbunit-migration-maven-plugin/badge.svg?branch=master)](https://coveralls.io/github/link-intersystems/dbunit-migration-maven-plugin?branch=master)\n[![Open Issues](https://img.shields.io/github/issues/link-intersystems/dbunit-migration-maven-plugin)](https://github.com/link-intersystems/dbunit-migration-maven-plugin/issues)\n\n\nThe dbunit-migration-maven-plugin is a tool to migrate a collection of [DBUnit](http://dbunit.sourceforge.net/) data set files from one database schema\nversion to another with the use of [Flyway](https://flywaydb.org/) and [testcontainers](https://www.testcontainers.org/).\n\nThe overall process the plugin implements is:\n\n1. Start a clean database with testcontainers.\n2. Use Flyway to migrate the database to the version the data set files are based on.\n3. Load a data set from a DBUnit file into the database.\n4. Let Flyway migrate the database to a target version.\n5. Use DBUnit to extract the database to a DBunit data set file.\n6. Repeat for all data set files.\n\n## Run\n\nRun the plugin with\n\n```\nmvn com.link-intersystems.dbunit.maven:dbunit-migration-maven-plugin:1.0.3:flyway-migrate.\n```\n\nThe plugin will output the files it migrates.\n\n```shell\n[info] Detected 4 data set resources to migrate\n[info] ♻︎ Start migration '...\\src\\test\\resources\\flat\\tiny-sakila-flat-column-sensing.xml'\n[info] ✔︎ Migrated '...\\target\\flat\\tiny-sakila-flat-column-sensing.xml'\n[info] ♻︎ Start migration '...\\src\\test\\resources\\flat\\tiny-sakila-flat.xml'\n[info] ✔︎ Migrated '...\\target\\flat\\tiny-sakila-flat.xml'\n[info] ♻︎ Start migration '...\\src\\test\\resources\\tiny-sakila-csv'\n[info] ✔︎ Migrated '...\\target\\tiny-sakila-csv'\n[info] ♻︎ Start migration '...\\src\\test\\resources\\xml\\tiny-sakila.xml'\n[info] ✔︎ Migrated '...\\target\\xml\\tiny-sakila.xml'\n[info] Migrated 4 data set resources \n```\n\n## Minimal Plugin Configuration\n\nThis minimal plugin configuration will pick up all data sets under `${project.basedir}/src/test/resources`\nthat are based on flyway version 1 and migrate them to `${project.build.directory}`. The source directory structure will\nbe maintained.\n\n```\n\u003cbuild\u003e\n    \u003cplugins\u003e\n        \u003cplugin\u003e\n            \u003cgroupId\u003ecom.link-intersystems.dbunit.maven\u003c/groupId\u003e\n            \u003cartifactId\u003edbunit-migration-maven-plugin\u003c/artifactId\u003e\n            \u003cversion\u003eRELEASE\u003c/version\u003e\n            \u003cconfiguration\u003e\n                \u003cflyway\u003e\n                    \u003csourceVersion\u003e1\u003c/sourceVersion\u003e\n                \u003c/flyway\u003e\n                \u003ctestcontainers\u003e\n                    \u003c!-- ls-dbunit-testcontainers ships with support for postgres and mysql --\u003e\n                    \u003c!-- If you need to use another container please read the Complete Plugin Configuration section. --\u003e\n                    \u003cimage\u003epostgres:latest\u003c/image\u003e\n                \u003c/testcontainers\u003e\n            \u003c/configuration\u003e\n        \u003c/plugin\u003e\n    \u003c/plugins\u003e\n\u003c/build\u003e\n```\n\n## Complete Plugin Configuration\n\nThe next section shows you all possible configuration options.\n\n```\n\u003cbuild\u003e\n    \u003cplugins\u003e\n        \u003cplugin\u003e\n            \u003cgroupId\u003ecom.link-intersystems.dbunit.maven\u003c/groupId\u003e\n            \u003cartifactId\u003edbunit-migration-maven-plugin\u003c/artifactId\u003e\n            \u003cversion\u003eRELEASE\u003c/version\u003e\n            \u003cconfiguration\u003e\n                \u003cflyway\u003e\n                    \u003csourceVersion\u003e1\u003c/sourceVersion\u003e\n                    \u003ctargetVersion\u003e2\u003c/targetVersion\u003e\n\t\t\t        \u003clocations\u003e\n\t\t\t\t\t    \u003clocation\u003e${project.basedir}/src/main/resources/db/migration\u003c/location\u003e\n\t\t\t\t\t\u003c/locations\u003e\n                    \u003cplaceholders\u003e\n                        \u003cnew_first_name_column_name\u003efirstname\u003c/new_first_name_column_name\u003e\n                        \u003cnew_last_name_column_name\u003e\n                            lastname\n                        \u003c/new_last_name_column_name\u003e\n                    \u003c/placeholders\u003e\n                \u003c/flyway\u003e\n                \u003cdataSets\u003e\n                    \u003ccolumnSensing\u003etrue\u003c/columnSensing\u003e \u003c!-- Turns on column sensing for flat xml data sets --\u003e\n                    \u003ccharset\u003eUTF-8\u003c/charset\u003e \u003c!-- the charset used to read text based data sets --\u003e\n                    \n                    \u003c!-- the data sets to migrate --\u003e \n                    \u003cresources\u003e\n                        \u003cresource\u003esrc/test/resources/tiny-sakila-csv\u003c/resource\u003e\n                        \u003cresource\u003eglob:**/*.xml\u003c/resource\u003e\n                        \u003cresource\u003eglob:*.xml\u003c/resource\u003e\n                        \u003cresource\u003eglob:**/*.xls\u003c/resource\u003e\n                        \u003cresource\u003eglob:*.xls\u003c/resource\u003e\n                    \u003c/resources\u003e\n                    \n                    \u003c!-- ensure the table order for the data sets if foreign key constrains make trouble  --\u003e\n                    \u003ctableOrder\u003e\n                        \u003ctableorder\u003elanguage\u003c/tableorder\u003e\n                        \u003ctableorder\u003efilm\u003c/tableorder\u003e\n                        \u003ctableorder\u003eactor\u003c/tableorder\u003e\n                        \u003ctableorder\u003efilm_actor\u003c/tableorder\u003e\n                    \u003c/tableOrder\u003e\n                \u003c/dataSets\u003e\n                \u003ctestcontainers\u003e\n                    \u003c!-- configure an arbitary jdbc container that is not supported out of the box --\u003e\n                    \u003ccontainerConfig\u003e\n                        \u003cdataSource\u003e\n                            \u003c!-- you can use placeholders enclosed in {{PLACEHOLDER}} to access values that the container provides --\u003e\n                            \u003cdriverClassName\u003eorg.postgresql.Driver\u003c/driverClassName\u003e\n                            \u003cjdbcUrl\u003ejdbc:postgresql://{{host}}:{{port}}/{{env.POSTGRES_DB}}?loggerLevel=OFF\u003c/jdbcUrl\u003e\n                            \u003cusername\u003e{{env.POSTGRES_USER}}\u003c/username\u003e\n                            \u003cpassword\u003e{{env.POSTGRES_PASSWORD}}\u003c/password\u003e\n                            \u003ctestQueryString\u003eSELECT 1\u003c/testQueryString\u003e\n                        \u003c/dataSource\u003e\n                        \u003cdockerContainer\u003e\n                            \u003cexposedPort\u003e5432\u003c/exposedPort\u003e\n                            \u003cenv\u003e\n                                \u003cPOSTGRES_DB\u003etest\u003c/POSTGRES_DB\u003e\n                                \u003cPOSTGRES_USER\u003etest\u003c/POSTGRES_USER\u003e\n                                \u003cPOSTGRES_PASSWORD\u003etest\u003c/POSTGRES_PASSWORD\u003e\n                            \u003c/env\u003e\n                            \u003ccommand\u003e\n                                \u003cvalue\u003epostgres\u003c/value\u003e\n                                \u003cvalue\u003e-c \u003c/value\u003e\n                                \u003cvalue\u003efsync=off\u003c/value\u003e\n                            \u003c/command\u003e\n                        \u003c/dockerContainer\u003e\n                        \u003cdbunitConfigProperties\u003e\n                            \u003c!-- DBUnit configuration properties --\u003e\n                            \u003cproperty\u003e\n                                \u003cname\u003ehttp://www.dbunit.org/properties/datatypeFactory\u003c/name\u003e\n                                \u003cvalue\u003eorg.dbunit.ext.postgresql.PostgresqlDataTypeFactory\u003c/value\u003e\n                            \u003c/property\u003e\n                        \u003c/dbunitConfigProperties\u003e\n                    \u003c/containerConfig\u003e\n                \u003c/testcontainers\u003e\n            \u003c/configuration\u003e\n        \u003c/plugin\u003e\n    \u003c/plugins\u003e\n\u003c/build\u003e\n```\n\nAlternatively you can implement your own container support by implementing an \n`com.link_intersystems.dbunit.testcontainers.DatabaseContainerSupportProvider` \nand putting it on the classpath. It is registered using a `META-INF/services/com.link_intersystems.dbunit.testcontainers.DatabaseContainerSupportProvider`\nfile. \n\ndbunit testcontainers comes with support for postgres and mysql.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flink-intersystems%2Fdbunit-migration-maven-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flink-intersystems%2Fdbunit-migration-maven-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flink-intersystems%2Fdbunit-migration-maven-plugin/lists"}