0
votes

WE have flyway integrated with Redshift and we are using this as a simple java main program to run all our schema migrations. We also use the info command to print the current version of the database, However this command successfully runs or at least appears to run but does not print the version number. We have version 4.2 of the flyway jar. What is that we may be missing? Thanks

1

1 Answers

2
votes

To manually recreate what the info command line option does in java code you can copy what its implementation does (from the source):

MigrationInfoDumper.dumpToAsciiTable(flyway.info().all())

An example from the docs is shown below:

+-------------+------------------------+---------------------+---------+
| Version     | Description            | Installed on        | State   |
+-------------+------------------------+---------------------+---------+
| 1           | Initial structure      |                     | Pending |
| 1.1         | Populate table         |                     | Pending |
| 1.3         | And his brother        |                     | Pending |
+-------------+------------------------+---------------------+---------+