- Adds queue management and supervisor. Issue #227

This commit is contained in:
MrCasual
2015-11-20 16:18:58 -05:00
parent 556a170903
commit 25b51d0446
7 changed files with 199 additions and 17 deletions

View File

@ -21,6 +21,7 @@ class Migrator {
'subscriber_custom_field',
'newsletter_option_fields',
'newsletter_option',
'queue',
'forms'
);
}
@ -199,6 +200,21 @@ class Migrator {
return $this->sqlify(__FUNCTION__, $attributes);
}
function queue() {
$attributes = array(
'id mediumint(9) NOT NULL AUTO_INCREMENT,',
'newsletter_id mediumint(9) NOT NULL,',
'subscribers longtext,',
'total mediumint(9) NOT NULL DEFAULT 0,',
'processed mediumint(9) NOT NULL DEFAULT 0,',
'created_at TIMESTAMP NOT NULL DEFAULT 0,',
'updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,',
'deleted_at TIMESTAMP NULL DEFAULT NULL,',
'PRIMARY KEY (id)',
);
return $this->sqlify(__FUNCTION__, $attributes);
}
function forms() {
$attributes = array(
'id mediumint(9) NOT NULL AUTO_INCREMENT,',