I'm trying to deploy a database to a Windows Server machine.
The database is a SQL Server LocalDB. When I deploy it to a Windows machine, everything works correctly. When I try to deploy the same database, but to a Windows Server machine, everything is also ok, DB is created, but when I try to work with this database (Get account user data), I got an error:
Unable to update database to match the current model because there are pending changes and automatic migration is disabled. Either write the pending model changes to a code-based migration or enable automatic migration. Set DbMigrationsConfiguration.AutomaticMigrationsEnabled to true to enable automatic migration."
I guess changing AutomaticMigrationsEnabled
to true is not a solution, as after trying to make it I got the other errors.
Also, when I use SQL Server Express Database, everything works without any issues. The issue is only when I use LocalDB together with a Windows Server.
Are there any ways to solve this issue?