Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrations and existing databases #91

Open
rowanmiller opened this issue Dec 10, 2015 · 3 comments
Open

Migrations and existing databases #91

rowanmiller opened this issue Dec 10, 2015 · 3 comments

Comments

@rowanmiller
Copy link
Contributor

Something like https://msdn.microsoft.com/en-us/data/dn579398

@juanpaexpedite
Copy link

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).

@natemcmaster natemcmaster mentioned this issue Feb 1, 2017
7 tasks
@rowanmiller
Copy link
Contributor Author

Consolidating with #204

@bricelam
Copy link
Contributor

Reopening since I'm closing #204 without this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants