Flyway

Importing from SQL Source Control

We hope to make the transition from SQL Source Control to Flyway as easy as possible.  We'll keep all your settings (comparison options, filters, static data configuration) and your Git history.  Read more about why we're moving to Flyway and its benefits.  If you have any questions, get in touch with our Database DevOps Team.  

Before importing your project, make sure you have a backup of your local repo.  

After importing, you should no longer use SQL Source Control to capture changes on your development database. 

If you are using Pre & Post Deployment scripts in SQL Source Control, please get in touch with our development team.


Team Leader

  1. Communicate upgrading to Flyway with your team.  Only one person will import the SQL Source Control project into Flyway.

  2. Make sure everyone has committed and pushed any of their outstanding database changes into the remote Git repository.

  3. Pull all the latest changes from the remote repository to a local repository on disk.  If there are any changes, apply them to your development database to make sure your environment is up to date.

  4. Tag or create a branch of the state of the repository at this point in case you need to revert back.

  5. In SQL Source Control, go to the Setup tab and copy the repository folder.


    1. Note: This only works for Git.  If you are using Subversion or Team Foundation System Version Control, then you'll need to get the repository path from Under the hood > Open working base.  Learn more about Working with other version control systems.


  6. Install Flyway Desktop on your desktop (developer's machine).

  7. Launch Flyway Desktop from the Start Menu and click Import project... 


  8. Choose SQL Source Control, paste the directory you just copied into the Project folder, and click Import.  Agree to the confirmation prompt by clicking Import again.


  9. Confirm your development database connection details and click Test and save.  For more information. see configuring your development database.  


  10. You're now on the Schema model tab.  This compares the objects and static data from the Development Database to the Schema model folder on disk.  If your database was in synch with your repository, then you won't see any changes.
  11. Expand the Version Control side panel.  You may see a lot of added/deleted files.  This is just how Git works.  After entering a commit message (e.g., Converted to Flyway), Commit, and Push the changes to the remote repository.  You should be able to see all the history of the objects in the schema-model folder in Git.

  

    1. To see all the history for an object, you may need to show the rename history.  In Azure DevOps, this is called Show rename history.


Other team members

  1. Install Flyway Desktop on your desktop (developer's machine).

  2. Launch Flyway Desktop from the Start Menu and click Open project... > From VCS.


  3. Navigate to the remote repository and select the project folder that contains the flyway.toml settings.

  4. You may be prompted to setup your development database connection details.

  5. You can start making changes on your development database and then come back and refresh the Schema model view to save any changes to your database objects.  Then use the Version Control side panel to commit and push these changes.   

  6. Learn more about working with Flyway Desktop.


Using SQL Source Control after importing

You should not use SQL Source Control on a project that has been imported into Flyway.  If the project was imported in place, then any user that gets the latest changes in SQL Source Control from the remote repository will see the following message in SQL Source Control:


If you are trying to use SQL Source Control and Flyway together, please get in touch with our Database DevOps Team so we can understand what you're trying to do and why as we continue to improve Flyway. 

Any Questions?

If you have any questions about transitioning to Flyway from SQL Source Control, please get in touch with our Database DevOps Team.



Didn't find what you were looking for?