You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I work on wpf project and ef core 2 with sqlite db
I create my class models and use context.Database.EnsureCreated() method, so my database created on runtime.
If I add new column to my model and write context.Database.Migrate() and run my app, I get error no such column 'newColumn'.
The text was updated successfully, but these errors were encountered:
@usapop you cannot use both EnsureCreated and migrations in the same application. EnsureCreated is generally meant only for prototyping purposes, production applications should use Migrations; after adding a new column, you need to generate a new migration, and then apply that change to your database.
Hi,
I work on wpf project and ef core 2 with sqlite db
I create my class models and use context.Database.EnsureCreated() method, so my database created on runtime.
If I add new column to my model and write context.Database.Migrate() and run my app, I get error no such column 'newColumn'.
The text was updated successfully, but these errors were encountered: