Ebean has the ability to generate and execute
CREATE ALL and
DROP ALL DDL
scripts which create all the tables. These are typically used when running tests and frequently these tests
run against H2 database rather than the target Postgres/Oracle/MySql/SQL Server ... database.
That is, when running a test or suite of tests the DB is created entirely from scratch.
When running a test or suite of tests the DB is created entirely from scratch
Usually you set both
ebean.ddl.run to true in the
test-ebean.properties (which is in src/test/resources) and in this way the
DDL is only generated and executed when running tests.
DB Migration is different in that
DIFF DDL scripts are generated for the changes to the model
DIFF DDL scripts can be applied to the target Postgres/Oracle/MySql/SQL Server ... database and
Liquibase is used to apply those DDL changes.