I am having a simple project where I use initially SQL Server as backend with EF Core and Code-First approach (following this tutorial: https://learn.microsoft.com/en-us/ef/core/get-started/aspnetcore/new-db)
Now I want to switch the implementation to SQLite. I thought I could just run the initial migration for database creation from SQL Server and apply it to SQLite. Seems it doesn't work correctly: eg. auto-increment on primary key is not applied, then I see some inconsistencies (sqlite complaining about 'int'
which should be 'INTEGER'
), etc.
So, does this mean that migrations are back-end dependent? If yes, shouldn't they be created in a nested folder then (eg. ./Migrations/SQLServer
)?
Could anybody explain a bit more how this works?
Note: Sorry, I am new to EF Code-First and migrations... thank you!