Drops all objects (tables, views, procedures, triggers, …) in the configured schemas.
The schemas are cleaned in the order specified by the schemas
and defaultSchema
property.
> flyway [options] clean
See configuration for a full list of supported configuration parameters.
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.jdbcProperties.myProperty=value
> flyway clean Flyway 9.8.1 by Redgate Cleaned database schema 'PUBLIC' (execution time 00:00.014s)
> flyway clean -outputType=json { "schemasCleaned": [ "public" ], "schemasDropped": [], "flywayVersion": "9.8.1", "database": "testdb", "warnings": [], "operation": "clean" }