Migration Troubles with Sql Server 2019

I have tried using migrations with sql serve 2019 and have run into several issues. All of this was tested via a unit test.

  1. 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).
  2. 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.
  3. 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
  1. I’ve changed Log to a text column in this commit, now available from latest v6.4.1+ on MyGet.

  2. How did you run the migration task to get the License Exception?

  3. Will need a repro to diagnose the transaction error issue.

1 Like
  1. I have 10 classes that I was creating and it triggered the license error message.
  2. I will try to repro the issue soon.