Code Analysis for State-based deployments

This is currently a work in progress.  Please email us if you're interested in using code analysis for state-based deployments.



  1. Use flyway prepare to generate your deployment script:
    1. flyway prepare -source=schemaModel -target=Prod

    This defaults to adding a D__deployment.sql file into a deployments folder in your current directory.


  2. Run flyway check -code to run static code analysis checks against the generated deployment script:
    1. cd deployments
    2.  
    3. rename D__deployment.sql V001_deployment.sql
    4.  
    5. flyway check -code -environment=development -locations=deployments
    6.  
    7. rename V001__deployment.sql D_deployment.sql

    Note: Currently the flyway check -code command only works on Versioned Migration Scripts that begin with V, which is why we temporarily rename the file.  Please email us so we can prioritize a change to remove this temporary step.



Didn't find what you were looking for?