Ability to drop a column

Apr 2, 2014 at 9:57 AM
Edited Apr 2, 2014 at 9:58 AM
If I have an entity defined as:
    [Entity(KeyScheme = KeyScheme.Identity)]
    public class Book
        [Field(IsPrimaryKey = true)]
        public int BookID { get; set; }

        [Field(AllowsNulls = false)]
        public int AuthorID { get; set; }

        public string Title { get; set; }
...then I later update the entity schema and remove the AuthorID field, the CreateOrUpdateStore() function does not drop the column from an existing database.

As the AuthorID field does not allow null values, when I add an entity with the new schema I get an exception reporting that the AuthorID column cannot be null.

Is there a way to drop columns automatically? And drop tables?
Apr 2, 2014 at 10:10 AM
I've just come across the DropTable() function. Is there anything similar for columns?
Apr 2, 2014 at 10:43 AM
No, there's no way to drop a column via the ORM. Most data engines won't let you remove a column from a table once the table has data in it.
Marked as answer by BoroDrummer on 4/2/2014 at 5:56 AM
Apr 2, 2014 at 12:56 PM
Ok, thanks for the quick reply :)