I'm building my first N2 site, mostly by copying bits and pieces from the N2 Dinamico site and the MVC example site. I'm adding two properties to my ContentPage
class:
[EditableText]
[Persistable(Length = 1024)] // to minimize select+1
public virtual string Summary { get; set; }
[EditableMediaUpload]
[Persistable(Length = 256)] // to minimize select+1
public virtual string Icon { get; set; }
The Persistable
attribute will store the new field in its own column, rather than as a name/value pair that page properties typically use. The Intellisense hint on that attribute says "Adding this attribute to an existing system requires the database to be updated." And that sounds true, because when I try to launch the site I get a message that the Summary column name is invalid.
How do I update the database schema to add the Summary column? I can delete the whole database and let N2 recreate it, but that will get annoying once there's some real data in it. I can't see how to make N2 update the schema for me.