Importing from Source Control for Oracle via the command line

The flyway-dev CLI is an internal component that performs some of the tasks that are surfaced in Flyway Desktop. It is currently available as Preview Software for users to trial and provide feedback.  The command syntax is likely to change in 2024 when we hope to release a fully supported command line with similar capabilities.  Learn more about Preview Software

In addition to using Flyway Desktop's user interface, it is possible to import Source Control for Oracle projects via the command line.

As with the Flyway Desktop approach, there are two options, importing to a new folder or importing in place.

Using this command line in a loop allows for bulk import of Source Control for Oracle projects.

Note that as database passwords are stored encrypted, these are not read and imported for the development database. This can either be added to the connection information in the settings, using an appropriate form of secret storage, or provided over the command line as needed.

Importing to a new folder

Importing to a new folder leaves the original Source Control for Oracle project unchanged, so it is a safe operation.

However, because it is a new folder, if it is committed, your version control history will start afresh.

flyway-dev import-project --import-type SourceControlForOracle --database-type Oracle --source-path <path to Source Control for Oracle project folder> --destination-path <file path where the new flyway.toml file should be created>

Importing in place

Upgrading a Source Control for Oracle project to a Flyway Desktop project in place modifies and deletes the existing files, such that it will no longer be a valid Source Control for Oracle project.

As such, it is advised that the project is up to date in your version control system or otherwise backed up before proceeding.

The benefit of upgrading the project in place is that git version control history will be preserved for your schema files.

flyway-dev import-project --import-type SourceControlForOracle --database-type Oracle --source-path <path to Source Control for Oracle  project folder> --replace-existing-project

Didn't find what you were looking for?