0

When I baseline an existing SQL Server schema everything works fine except the installed_by column in the migration_history table is set to null. Performing subsequent migrations populates the installed_by as expected. Url is identical between the both baseline and migrate commands.

Jim
  • 692
  • 7
  • 15
  • Specifically `installed_by` gets set to the literal string `N'null'` as opposed to the `null` value. Other issues with Baselines in the `flyway_schema_history` table are that the `checksum` is set to the `null` value and the `execution_time` gets set to `0`. We're currently working with Redgate team on Flyway Desktop issues and have found them to be very responsive. My recommendation would be to approach your Redgate rep. (or the [flyway](https://github.com/flyway/flyway) project in particular) and file a bug report to get things fixed. – AlwaysLearning Sep 06 '22 at 23:54
  • 1
    Actually, I just had a "derp" moment about that... In Flyway the baseline is capturing the existing state of the database schema so it doesn't have any of information available to answer the questions of `installed_by` and `execution_time`. But I still think it should be recording the `checksum` value of the baseline file that it generated to detect if there are any subsequent changes made before a migration. And consistent usage of `null` vs. `N'null'` wouldn't hurt. – AlwaysLearning Sep 07 '22 at 01:14
  • I submitted a request to redgate asking why and they are looking at it. Thank you for the response. I still think the installed_by can be set to the same value if the command was a migrate, still has to connect to the database to create the migration_history table. I will post what their response is. – Jim Sep 07 '22 at 19:51

0 Answers0