Skip to content

Migrations and existing databases #91

Open

Description

Activity

  1. nomadstudioapp commented on Dec 9, 2016

    @nomadstudioapp

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

  2. rowanmiller commented on Feb 1, 2017

    @rowanmiller
    ContributorAuthor

    Consolidating with #204

  3. bricelam commented on Nov 10, 2017

    @bricelam
    Contributor

    Reopening since I'm closing #204 without this.

  4. added this to the Backlog milestone on Dec 18, 2017
  5. modified the milestone: Backlog on Aug 28, 2019
  6. removed their assignment
    on Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions