When generating an update of db
that results in possible loss of data efcore
shows alert:
An operation was scaffolded that may result in the loss of data. Please review the migration for accuracy.
(In this specific case a table field has been removed)
When this occurs the db
structure is not changed.
To get around this situation I remove all generated migrations
and generate a new one, with this, the new structure is generated successfully.
(As the application is not in production, so far I was not worried about re-creating db
)
I would like to know the correct way to solve this type of problem, ie to force update of the table even knowing the data loss. Or if there is a better way to solve this kind of situation.