Drops all objects (tables, views, procedures, triggers, ...) in the configured schemas.
> gradle flywayClean
| Parameter | 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 | Case-sensitive list of schemas managed by Flyway. The schemas will be cleaned in the order of this list. |
| callbacks | NO | 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. |
flyway {
driver = 'org.hsqldb.jdbcDriver'
url = 'jdbc:hsqldb:file:/db/flyway_sample;shutdown=true'
user = 'SA'
password = 'mySecretPwd'
schemas = ['schema1', 'schema2', 'schema3']
callbacks = ['com.mycompany.proj.CustomCallback', 'com.mycompany.proj.AnotherCallback']
skipDefaultCallbacks = false
cleanDisabled = false
}
> gradle flywayClean -i Cleaned database schema 'PUBLIC' (execution time 00:00.016s)