Flyway

Command Line Exit Codes

Here are some helpful links to work with the exit codes in your deployment pipelines better.

Flyway Command Line Error Codes

When Flyway commands fail, they throw an exception with a message to help you identify the problem. They also contain an error code which users of the API or those who have enabled machine readable output can inspect and handle accordingly. Below are details of each error code under the command that causes it along with a suggested solution.  Learn more.

Schema Compare for Oracle Command Line Exit Codes

Exit codes of 0 and 61 are both successful:

0 =  No differences found between source and target.

61 = Differences found between source and target.

Another exit code to note is:
63 = Deployment warnings above threshold. Deployment aborted.  Deployment warnings are raised if there may be data loss and more.

See the complete list of Schema Compare for Oracle exit codes. 

SQL Compare Command Line Exit Codes

SQL Compare will exit with a 0 if the command completed successfully and differences are found.  Note the following codes, which you may want to handle differently:

  • 61 - Deployment warnings
    SQL Compare encountered serious warnings that apply to the deployment.
    If you're using SQL Compare, you can ignore these warnings by specifying /AbortOnWarnings:None
    For more information about /AbortOnWarnings, see Switches used in the command line.

  • 63 - Databases identical
    The databases being compared are identical or no objects have been included.
    To suppress this error use /Include:Identical

See the complete list of SQL Compare exit codes.

Note

Some CI/CD systems have a way to fail the step and stop the next step from processing if the exit code is not 0, which usually means success. 

In Azure DevOps, the "Fail on standard error" option can be configured under the Advanced options.  Here's an example to help check the Schema Compare for Oracle exit code and change it in a step.

Checking Exit Code

# exit code of 61 (differences in source/target schemas) is not actually an error, but ends up being treated like one -- so adding logic to ignore that
If ($lastExitCode == 61) {
   exit 0
}

Didn't find what you were looking for?