SQLite-Net Extensions - Does CreateTable Modify Existing Tables?

I use SQLite-net with TwinCoders NuGet for extension methods in the MvvmCross Xamarin project. I want the database to remain updated, even if I will modify the models in the future.

My question is: if I use the CreateTable function to create a model-based SQLite table, and the database already exists on the tablet / phone, but it has a different structure (let's say that the table does not have a column, was added in the last update), will this function to modify an existing table? Thank!

+4
source share
2 answers

. , , .

- :

:

class Model {
    int Id { get; set; }
    string Date { get; set; }
}

:

class Model {
    int Id { get; set; }
    string Dates { get; set; }
}

- Id , Dates, .

, .

: , SQLite-Net, - , .

0

! SQLite-Net . "ALTER DROP COLUMN" "ALTER RENAME COLUMN" SQLite :

  • , ,
  • , ,

, , (), , .

+2

All Articles