Want to deploy your JVM, Node.js and Go apps effortlessly to AWS? Try our service Boxfuse

Command-line: clean

Drops all objects (tables, views, procedures, triggers, ...) in the configured schemas.
The schemas are cleaned in the order specified by the schemas property.

clean

Usage

> flyway [options] clean

Options

Option Required Default Description
url YES The jdbc url to use to connect to the database
driver NO Auto-detected based on url The fully qualified classname of the jdbc driver to use to connect to the database
user NO The user to use to connect to the database
password NO The password to use to connect to the database
schemas NO default schema of the connection Comma-separated case-sensitive list of schemas managed by Flyway.
The schemas will be cleaned in the order of this list.
jarDirs NO <install-dir>/jars Comma-separated list of directories containing JDBC drivers and Java-based migrations
callbacks NO Comma-separated list of fully qualified class names of FlywayCallback implementations to use to hook into the Flyway lifecycle.
skipDefaultCallbacks NO false Whether default built-in callbacks (sql) should be skipped. If true, only custom callbacks are used.
cleanDisabled NO false Whether to disable clean. This is especially useful for production environments where running clean can be quite a career limiting move.

Sample configuration

flyway.driver=org.hsqldb.jdbcDriver
flyway.url=jdbc:hsqldb:file:/db/flyway_sample
flyway.user=SA
flyway.password=mySecretPwd
flyway.schemas=schema1,schema2,schema3
flyway.callbacks=com.mycomp.project.CustomCallback,com.mycomp.project.AnotherCallback
flyway.skipDefaultCallbacks=false
flyway.cleanDisabled=false

Sample output

> flyway clean

Flyway 4.2.0 by Boxfuse

Cleaned database schema 'PUBLIC' (execution time 00:00.014s)

Command-line: info