Last post Jul 19, 2020 10:25 AM by PatriceSc
Jul 19, 2020 07:12 AM|hanidraidi|LINK
I tried using the same migration set for multiple database providers, and that worked out with
.net core 2, and in .net core 3 and ef core 3, it does not work as it adds a .hasColumnType() to migration Design class for each migration, and the column type varies from database provider to another, which makes the migration fail when trying to apply it
at a different database from the one it was used in the dbcontext when creating the migration.
Is there a way to use same migration set for different database providers in .net core 3, or this feature is no longer available?
Jul 19, 2020 10:25 AM|PatriceSc|LINK
So as pointed by the link you posted you could perhaps use the ActiveProvider property to define the type name to use. You could also double check if the provider changed as my understanding is that you had the same column type previously and it is not any
more the case now ???
Always try to be as explicit as possible ie include the error message, the line that fails and here the db provider you are using. Then someone interested could this a try.
Else you can get help only from someone who recognized a problem he already had (it can still turn out not to be same problem in some cases).