mult1mate\crontab\DbHelper::tableTasksSql PHP Method

tableTasksSql() public static method

returns query for TaskInterface table
public static tableTasksSql ( ) : string
return string
    public static function tableTasksSql()
    {
        return "CREATE TABLE `tasks` (\n        `task_id` SMALLINT(6) NOT NULL AUTO_INCREMENT,\n        `time` VARCHAR(64) NOT NULL,\n        `command` VARCHAR(256) NOT NULL,\n        `status` ENUM('active','inactive','deleted') DEFAULT 'active',\n        `comment` VARCHAR(256) DEFAULT NULL,\n        `ts` TIMESTAMP NOT NULL DEFAULT 0,\n        `ts_updated` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\n        PRIMARY KEY (`task_id`)\n        ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8";
    }

Usage Example

 public function up()
 {
     $this->db->createCommand(\mult1mate\crontab\DbHelper::tableTasksSql())->execute();
     $this->db->createCommand(\mult1mate\crontab\DbHelper::tableTaskRunsSql())->execute();
 }
All Usage Examples Of mult1mate\crontab\DbHelper::tableTasksSql