-
Notifications
You must be signed in to change notification settings - Fork 25
Preparing the Database
##Migrating the database
To apply pending migrations, from the petstore-infrastructure module, run:
mvn initialize db-migration:migrate
To migrate a database other than the default one, use a different build profile using the -P option with maven.
To recreate the database entirely by dropping all tables and re-applying migrations, from the petstore-infrastructure module, run:
mvn initialize db-migration:reset
To recreate a database other than the default one, use a different build profile using the -P option with maven.
In order to populate a database with test data when manually testing the application, from the petstore-infrastructure module, run:
mvn initialize sql:execute
This executes all SQL scripts found under directory /petstore-infrastructure/src/main/scripts/seeds/ on the database associated with the active profile.