documentation/Reference/Commands/Clean.md
Drops all objects in the configured schemas. If Flyway automatically created them, then the schemas themselves will be dropped when cleaning.
Do not use against your production DB!
Flyway has some default configuration to try and save you from accidents, but it can't interactively ask you if you really intended to do this.
flyway clean
mvn flyway:clean
Note that default phase is pre-integration-test.
gradle flywayClean
Universal commandline parameters are listed here.
All relevant configuration settings are listed here. The settings from these sections can be set as parameters on the clean command:
It is also possible to set environment settings as parameters.
All parameters are optional, although a target environment must be configured or passed in.
{
"schemasCleaned": [
"public"
],
"schemasDropped": [],
"flywayVersion": "{{ site.flywayVersion }}",
"database": "testdb",
"warnings": [],
"operation": "clean"
}
This command can produce the following error codes: