Share your experience with Database DevOps by taking part in the 2021 State of Database DevOps survey Take the survey
Drops all objects (tables, views, procedures, triggers, …) in the configured schemas.
The schemas are cleaned in the order specified by the
> flyway [options] clean
|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|
|connectRetries||NO||0||The maximum number of retries when attempting to connect to the database. After each failed attempt, Flyway will wait 1 second before attempting to connect again, up to the maximum number of times specified by connectRetries.|
|initSql||NO||none||The SQL statements to run to initialize a new database connection immediately after opening it.|
|defaultSchema||NO||The default schema for the database connection||The default schema managed by Flyway. This schema name is case-sensitive.
|schemas||NO||The default schema for the database connection||Comma-separated list of schemas managed by Flyway. These schema names are case-sensitive.
|color||NO||n/a||(Command line flag only) Whether to colorize output. If set to 'auto', will print color if a console is detected. Defaults to 'auto'. (always, never, or auto)|
|jarDirs||NO||Comma-separated list of directories containing JDBC drivers and Java-based migrations|
|callbacks||NO||Comma-separated list of fully qualified class names of Callback 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.|
|validateMigrationNaming||NO||false||Whether to ignore migration files whose names do not match the naming conventions.
If false, files with invalid names are ignored and Flyway continues normally. If true, Flyway fails fast and lists the offending files.
|workingDirectory||NO||default for client||The working directory to consider when dealing with relative paths for both config files and locations.|
|licenseKey||NO||none||Your Flyway license key (FL01...). Not yet a Flyway Pro or Enterprise Edition customer? Request your Flyway trial license key to try out Flyway Pro and Enterprise Edition features free for 30 days.|
flyway.driver=org.hsqldb.jdbcDriver flyway.url=jdbc:hsqldb:file:/db/flyway_sample flyway.user=SA flyway.password=mySecretPwd flyway.connectRetries=10 flyway.initSql=SET ROLE 'myuser' flyway.schemas=schema1,schema2,schema3 flyway.callbacks=com.mycomp.project.CustomCallback,com.mycomp.project.AnotherCallback flyway.skipDefaultCallbacks=false flyway.cleanDisabled=false flyway.workingDirectory=C:/myProject
> flyway clean Flyway 7.3.0 by Redgate Cleaned database schema 'PUBLIC' (execution time 00:00.014s)