← Data Manipulation Circumflex ORM Documentation

Exporting Database Schema

Database schema scripts are generated with DDLUnit. You can use this class to create and drop database objects programmatically:

val ddl = new DDLUnit(Country, City)
// drop objects
ddl.DROP
// create objects
ddl.CREATE
// drop and then create objects
ddl.DROP_CREATE

DDLUnit creates objects in the following order:

Respectively, drop script works with objects in a reverse order.

After the execution, DDLUnit produces messages.

You can also setup maven-cx-plugin to export the schema for your Maven project within a build profile. Read more on Circumflex Maven Plugin page.

← Data Manipulation Circumflex ORM Documentation