mult1mate\crontab\DbHelper::tableTaskRunsSql PHP Method

tableTaskRunsSql() public static method

returns query for TaskRunInterface table
public static tableTaskRunsSql ( ) : string
return string
    public static function tableTaskRunsSql()
    {
        return "CREATE TABLE `task_runs` (\n        `task_run_id` INT(11) NOT NULL AUTO_INCREMENT,\n        `task_id` SMALLINT(6) NOT NULL,\n        `status` ENUM('started','completed','error') DEFAULT NULL,\n        `execution_time` DECIMAL(6,2) NOT NULL DEFAULT '0.00',\n        `ts` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\n        `output` TEXT,\n        PRIMARY KEY (`task_run_id`),\n        KEY `task_id` (`task_id`), KEY `ts` (`ts`)\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::tableTaskRunsSql