Move dynamic segment filters table from Premium plugin
[MAILPOET-2382]
This commit is contained in:
committed by
Jack Kitterhing
parent
c59c13f5e2
commit
e5e85344da
@@ -47,6 +47,7 @@ class Database {
|
||||
define('MP_STATS_NOTIFICATIONS_TABLE', Env::$db_prefix . 'stats_notifications');
|
||||
define('MP_USER_FLAGS_TABLE', Env::$db_prefix . 'user_flags');
|
||||
define('MP_FEATURE_FLAGS_TABLE', Env::$db_prefix . 'feature_flags');
|
||||
define('MP_DYNAMIC_SEGMENTS_FILTERS_TABLE', Env::$db_prefix . 'dynamic_segment_filters');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -50,6 +50,7 @@ class Migrator {
|
||||
'log',
|
||||
'user_flags',
|
||||
'feature_flags',
|
||||
'dynamic_segment_filters',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -537,6 +538,19 @@ class Migrator {
|
||||
return $this->sqlify(__FUNCTION__, $attributes);
|
||||
}
|
||||
|
||||
function dynamicSegmentFilters() {
|
||||
$attributes = [
|
||||
'id int(11) unsigned NOT NULL AUTO_INCREMENT,',
|
||||
'segment_id int(11) unsigned NOT NULL,',
|
||||
'created_at timestamp NULL,',
|
||||
'updated_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,',
|
||||
'filter_data longblob,',
|
||||
'PRIMARY KEY (id),',
|
||||
'KEY segment_id (segment_id)',
|
||||
];
|
||||
return $this->sqlify(__FUNCTION__, $attributes);
|
||||
}
|
||||
|
||||
private function sqlify($model, $attributes) {
|
||||
$table = $this->prefix . Helpers::camelCaseToUnderscore($model);
|
||||
|
||||
|
Reference in New Issue
Block a user