Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upCreating initial database from multiple SQL files #228
Comments
|
@bartoszmajsak something for Arquillian Persistence Extension? |
|
Yeah we can use APE for that. @coderoute how about working together on this sample? |
|
@bartoszmajsak let me know what you need. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When creating a Java EE application with integration tests, a database often needs to be bootstrapped. Current examples seem to use a single SQL file referenced from persistence.xml using the javax.persistence.schema-generation.create-script-source property.
However, in practice database schema evolves and it is a common practice to apply these changes to production environments using a series of SQL files representing each change (e.g., using c5-db-migration plugin). Maintaining different SQLs for test purposes and another for production purposes is obviously redundant and error prone. Thus, I will like to see an example a JavaEE app that can populate a test/in-memory database using such list of SQL files.