flyway clean is not dropping scheduler jobs or programs

I recently added a scheduler job and program to my development schema. When I tried to refresh the schema, I did a flyway clean, and then a flyway migrate.

I got the following error:

ERROR: Found non-empty schema "TESTDATA" without metadata table! Use init() or set initOnMigrate to true to initialize the metadata table.

When I dropped the job and program by hand, I was then able to run migrate again.

I've been using flyway for a while, and it's always been very straightforward - but I'm not sure how to convince it to properly clean my schema, now that I have an overnight batch job.

Note: I see the option -initOnMigrate, but this causes me two problems:

<ol> <li>I have a lot of batch files which would be sensitive to trying to add another runline option.</li> <li>I use flyway both to update existing schemas and to refresh schemas from scratch. If I need to modify the job or program, I could only include initOnMigrate (and have it bomb on the update), or not include it, and have it bomb on refresh (my current problem).</li> </ol>

Thank you


You can work around this by implementing FlywayCallback.afterClean() and do the cleanup yourself.

Also, please file an issue in the issue tracker so we can fix this in time for 3.1.


  • Mail arrives in spam
  • Chrome firing onClick when space typed in contenteditable button
  • How read between delimiters in php DOM of a XML file?
  • How to make a UserDetailsManager available as a bean
  • Setting a relative path to sqlite database with Delphi and Firedac
  • Adding a new element into the DOM with angularjs does not initiate it
  • Localization issue Xcode
  • Parse Framework with Swift
  • Connect Node.js with Oracle on Windows platform
  • Zend framework 2 : Add different authentication adapter for two different modules
  • Using an STL Iterator without initialising it
  • when does setTimeout start executing in a inline
  • Unix Network Programming Clarification
  • Lua: Line breaks in strings
  • Google map in top corner left
  • How do I formally document a C# Attribute in UML?
  • Is there a way to save the selected text and highlight it again once the page is refreshed?
  • Zurb Foundation _global.scss meta styles for js?
  • Android activity accessing service's static reference before the service is ready
  • D3 nodes and links from JSON with nested arrays of children
  • Pass value from viewmodel to script in zk
  • Read text file and split every line in MSBuild
  • SSO with signing and signature validation doesn't work
  • Eraser for UIBezierPath
  • Delete MySQLi record without showing the id in the URL
  • Unanticipated behavior
  • Compare two NSDates in iPhone
  • How to format a variable of double type
  • Comma separated Values
  • Load html files in TinyMce
  • How to set the response of a form post action to a iframe source?
  • Trying to get generic when generic is not available
  • Change div Background jquery
  • File not found error Google Drive API
  • Qt: Run a script BEFORE make
  • sending mail using smtp is too slow
  • Busy indicator not showing up in wpf window [duplicate]
  • reshape alternating columns in less time and using less memory
  • Why is Django giving me: 'first_name' is an invalid keyword argument for this function?
  • How can I use `wmic` in a Windows PE script?