Alter table

Issue #101 invalid
Antonio Scardigno created an issue

How can i do an alter table? I've thonked it is auto when i call CreateTable<MyObj>() but it doesn't work.

For example i've a class

[Table("MyClass")]
public class MyClass
{
    public string prop{ get; set; }
}

than i create table so:

dbConnection.CreateTable<MyClass>();

than i chang class so

[Table("MyClass")]
public class MyClass
{
    public string prop{ get; set; }        
    public string otherProp{ get; set; } //<---- added this
}

than my table isn't update with new prop.

how can i do that?

Comments (2)

  1. Martin Kuckert

    This is no issue with SqliteNet Extensions because CreateTable is a method of the underlying Sqlite package. As far as I can see CreateTable should add new columns as far as you added properties.

  2. Log in to comment