I have tried using migrations with sql serve 2019 and have run into several issues. All of this was tested via a unit test.
- The Log column is not large enough, just creating 10 tables exceeded the VARCHAR(8000) size. I worked around this by setting it manually to VARCHAR(MAX).
- The license manager complained about using more than 10 tables. First I tried setting the appsetting but that did not work. I had to use the Licensing.RegisterLicense() method for it to proceed. Would be nice to not have to provide the key in multiple places.
- I would get this generic error: This SqlTransaction has completed; it is no longer usable. After debugging the Migrator code, I determined that I was not creating/dropping my tables in the proper order however when the exception handler tried to rollback the transaction it would then throw another error, which is why I didn’t see the original error. See Line 426 of Migrator.cs