
CREATE TABLE IF NOT EXISTS ApplicationFrameworkSettings (
    MaxTaskTime     INT DEFAULT 60,
    MaxTasksRunning INT DEFAULT 2,
    LastTaskRunAt   DATETIME
);

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

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

