-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdb.sql
More file actions
31 lines (28 loc) · 995 Bytes
/
db.sql
File metadata and controls
31 lines (28 loc) · 995 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
* SQL for Tasks table for version 1.1+.
*/
CREATE TABLE IF NOT EXISTS `tasks` (
`task_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`route` varchar(50) NOT NULL,
`uri` text NOT NULL,
`active` tinyint(1) unsigned NOT NULL DEFAULT '1',
`priority` tinyint(2) unsigned NOT NULL DEFAULT '5',
`recurring` int(8) unsigned NOT NULL COMMENT 'Time delay between recurring',
`pid` smallint(5) unsigned NOT NULL,
`created` int(10) unsigned NOT NULL,
`nextrun` int(10) unsigned NOT NULL,
`lastrun` int(10) unsigned NOT NULL,
`fail_on_error` tinyint(1) unsigned NOT NULL DEFAULT '0',
`failed` int(10) unsigned NOT NULL,
`failed_msg` text NOT NULL,
PRIMARY KEY (`task_id`),
KEY `nextrun` (`nextrun`),
KEY `active` (`active`),
KEY `pid` (`pid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
/*
* Upgrades if running 1.0
*/
ALTER TABLE `tasks` DROP `running`;
ALTER TABLE `tasks` ADD `pid` SMALLINT( 5 ) UNSIGNED NOT NULL AFTER `recurring` ,
ADD INDEX ( `pid` );