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
Hello, I created an SQLite database following these tutorials for a console .net core app and works like a charm with child classes and I really love all these coding advances.
I have a doubt trying to upgrade the SQLite database based on models:
1.- I create my models
2.- I use Add-Migration MyFirstMigration
3.- db.Database.Migrate(); add all the data and save changes
4.- I update the model with more properties.
5.- What exactly do I have to do now to update the SQLite database? delete migrations folder? add-migration again? Update-Database? and in code what do I have to call to create new columns?
I have tried to understand and try several ways keeping the current data but I cannot make it work.
Really thank you, it is a real advance for my apps. (A really cool new one for UWP soon :)).
(meanwhile it is effortless to upgrade it in an SQLite editor, but would be great to understand for more complex scenarios).
Activity
nomadstudioapp commentedon Dec 9, 2016
https://docs.microsoft.com/en-us/ef/core/get-started/full-dotnet/new-db
Hello, I created an SQLite database following these tutorials for a console .net core app and works like a charm with child classes and I really love all these coding advances.
I have a doubt trying to upgrade the SQLite database based on models:
1.- I create my models
2.- I use Add-Migration MyFirstMigration
3.- db.Database.Migrate(); add all the data and save changes
4.- I update the model with more properties.
5.- What exactly do I have to do now to update the SQLite database? delete migrations folder? add-migration again? Update-Database? and in code what do I have to call to create new columns?
I have tried to understand and try several ways keeping the current data but I cannot make it work.
Really thank you, it is a real advance for my apps. (A really cool new one for UWP soon :)).
(meanwhile it is effortless to upgrade it in an SQLite editor, but would be great to understand for more complex scenarios).
rowanmiller commentedon Feb 1, 2017
Consolidating with #204
bricelam commentedon Nov 10, 2017
Reopening since I'm closing #204 without this.