Flyway

Personal Access Tokens

Introduction

Flyway can be authorized non-interactively by specifying the email and token parameters for PATs.

Example: Authorizing Flyway with PATs

Let's assume we have just installed Flyway and want to use the Flyway Pipelines.  First, we must generate our PAT. We can do this by visiting the Personal Access Tokens page on the Redgate identity provider website and clicking on the "New Token" button. Be sure to save your token in a secure place because once they are generated, they cannot be viewed in full again.

We can then specify our Redgate email and PAT using the email and token configuration parameters on the commandline, in the TOML configuration file, or the FLYWAY_EMAIL and FLYWAY_TOKEN environment variables. For this example, we'll use the TOML configuration file:

[flyway]
email = "foo.bar@red-gate.com"
token = "1234ABCD"

Now, we can use Flyway normally and Flyway will automatically authorize itself.

That's all there is to it! Using PATs, we have successfully authorized Flyway  without needing to run the auth command.

Summary

In this brief tutorial we saw how to:

  • Use PATs to authorize Flyway to use the Flyway Pipelines

Didn't find what you were looking for?