# QFQ tables: Filename has to start with 'qfq' and end with '.sql'
#
CREATE TABLE IF NOT EXISTS `Cron`
(
    `id`            INT(11)                     NOT NULL AUTO_INCREMENT,
    `grId`          INT(11)                     NOT NULL DEFAULT 0,
    `xId`           INT(11)                     NOT NULL DEFAULT 0,
    `type`          ENUM ('mail','website')     NOT NULL DEFAULT 'website',
    `lastRun`       DATETIME                    NOT NULL DEFAULT '0000-00-00 00:00:00',
    `lastStatus`    TEXT                        NOT NULL DEFAULT '',
    `nextRun`       DATETIME                    NOT NULL DEFAULT '0000-00-00 00:00:00',
    `frequency`     VARCHAR(32)                 NOT NULL DEFAULT '',
    `inProgress`    DATETIME                    NOT NULL DEFAULT '0000-00-00 00:00:00',
    `status`        ENUM ('enable','disable')   NOT NULL DEFAULT 'enable',
    `sql1`          TEXT                        NOT NULL DEFAULT '',
    `content`       TEXT                        NOT NULL DEFAULT '',
    `comment`       TEXT                        NOT NULL DEFAULT '',
    `outputFile`    VARCHAR(255)                NOT NULL DEFAULT '',
    `outputMode`    ENUM ('overwrite','append') NOT NULL DEFAULT 'append',
    `outputPattern` VARCHAR(255)                NOT NULL DEFAULT '',
    `autoGenerated` ENUM ('yes','no')           NOT NULL DEFAULT 'no',
    `modified`      DATETIME                    NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
    `created`       DATETIME                    NOT NULL DEFAULT current_timestamp(),
    PRIMARY KEY (`id`)
)
    ENGINE = InnoDB
    DEFAULT CHARSET = utf8
    AUTO_INCREMENT = 0;
