Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating initial database from multiple SQL files #228

Open
coderoute opened this issue Jun 12, 2014 · 3 comments
Open

Creating initial database from multiple SQL files #228

coderoute opened this issue Jun 12, 2014 · 3 comments

Comments

@coderoute
Copy link

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.

@aslakknutsen
Copy link
Member

@bartoszmajsak something for Arquillian Persistence Extension?

@bartoszmajsak
Copy link
Contributor

Yeah we can use APE for that. @coderoute how about working together on this sample?

@coderoute
Copy link
Author

@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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants