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