Context
Issue originally raised on stackoverflow as a question.
It would be useful to be able to initialize a database with multiple startup scripts. In most projects that I've worked on, there are multiple onboarding scripts (database, schema, data, test-data etc). As such, when provisioning a new database using testcontainers for an integration test, it'd be helpful to be able to execute all of these scripts on startup without needing to merge them into a single script.
Suggestion
An additional API in JdbcDatabaseContainer
/**
* Execute each script in the order of which they're provided
*/
public SELF withInitScript(String... initScriptPaths) {
// ...
}
An additional consideration for this API might be the result of 2127
Context
Issue originally raised on stackoverflow as a question.
It would be useful to be able to initialize a database with multiple startup scripts. In most projects that I've worked on, there are multiple onboarding scripts (database, schema, data, test-data etc). As such, when provisioning a new database using testcontainers for an integration test, it'd be helpful to be able to execute all of these scripts on startup without needing to merge them into a single script.
Suggestion
An additional API in
JdbcDatabaseContainerAn additional consideration for this API might be the result of 2127