New to data migrations and entity framework. I have inherited a project which uses this. I have a field in a table which is used as a flag and is updated using a trigger on the table. I would like to access this field in my web project. I have added the property to the model but when I build and run the project I get the following 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 think I need to go Package Manager Console and run Add-Migration 'MigrationName'
I don't know the correct way to do this so that:
- The existing data is retained
Can any one point me in the right direction of how to do this or the correct terminology to do a google search for an answer?