- Implements open tracking

This commit is contained in:
Vlad
2016-04-19 20:59:27 -04:00
parent 15cf087d40
commit 45b933d635
7 changed files with 47 additions and 40 deletions

View File

@@ -26,6 +26,7 @@ class Migrator {
'forms',
'statistics_newsletters',
'statistics_clicks',
'statistics_opens'
);
}
@@ -293,6 +294,20 @@ class Migrator {
return $this->sqlify(__FUNCTION__, $attributes);
}
function statistics_opens() {
$attributes = array(
'id mediumint(9) NOT NULL AUTO_INCREMENT,',
'newsletter_id mediumint(9) NOT NULL,',
'subscriber_id mediumint(9) NOT NULL,',
'queue_id mediumint(9) NOT NULL,',
'created_at TIMESTAMP NOT NULL DEFAULT 0,',
'deleted_at TIMESTAMP NULL DEFAULT NULL,',
'updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,',
'PRIMARY KEY (id)',
);
return $this->sqlify(__FUNCTION__, $attributes);
}
private function sqlify($model, $attributes) {
$table = $this->prefix . $model;