Skip to content

Creating initial database from multiple SQL files #228

Open
@coderoute

Description

@coderoute

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions