Options

Same migrations after baselines

I have encountered a peculiar issue in Flyway Desktop that I cannot seem to explain. I created a new project from a DEV database, imported the changes into the project using the "Schema model" tab, and then generated a baseline script in the "Generate migrations" tab. I also created and linked an empty shadow database.

However, after the script was generated, I see many objects listed as changes in the tab, even though they are included in the baseline script. Could someone please explain this to me? Many thanks in advance.

Answers

  • Options
    Hi @clinke

    Can I ask what database did you generate the baseline script against, was it the same database you've set as your development database?

    If you're using say your production database, which is typical as the source for your baseline script, I would expect this behaviour if there are different changes from the schema model from your development database

    Kind regards

    Dan Calver | Redgate Software
    Have you visited our 
    Help Center?

  • Options
    clinkeclinke Posts: 18 Bronze 1
    edited October 25, 2023 12:15PM
    Hello Dan,

    yes, I'm using the same database. We only deliver template databases to our customers, therefore there is no "real" production database.
  • Options
    Hi @clinke

    Thanks for confirming, in that case, was the schema model captured, then were there changes made to the database before the baseline was done? That's all I can think would prompt there to be migration changes

    Kind regards

    Dan Calver | Redgate Software
    Have you visited our 
    Help Center?

  • Options
    clinkeclinke Posts: 18 Bronze 1
    Hello Dan,

    no, I've immediately generated the first migration after capturing schme model. I now created the baseline script using SQL Compare and added it to the Flyway project. Then, everything worked fine.
    I was not able to reproduce the issue in a new small project. Unfortunately, our database is very big, so I cannot provide it as an example.
  • Options
    Hi @clinke

    That's really strange, I've not had any luck with trying to reproduce using multiple databases

    If you was able to reproduce with the database, you could share in a direct ticket as a schema only copy

    Kind regards

    Dan Calver | Redgate Software
    Have you visited our 
    Help Center?

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file