
ALTER TABLE MetadataFields CHANGE COLUMN FieldType FieldType 
        ENUM("Text", "Number", "Date", "TimeStamp", "Paragraph", "Flag", 
        "Tree", "ControlledName", "Option", "User", "Still Image", "File", "Url");

CREATE TABLE IF NOT EXISTS PluginInfo (
    PluginId    INT NOT NULL AUTO_INCREMENT,
    BaseName    TEXT,
    Version     TEXT,
    Enabled     INT DEFAULT 1,
    INDEX       (PluginId)
);

CREATE TABLE IF NOT EXISTS TaskQueue (
    TaskId      INT NOT NULL AUTO_INCREMENT,
    Callback    TEXT,
    Parameters  TEXT,
    Priority    INT,
    INDEX       (TaskId)
);

CREATE TABLE IF NOT EXISTS PeriodicEvents (
    Signature   TEXT,
    LastRun     DATETIME
);

