Add rudimentary logger
[MAILPOET-570]
This commit is contained in:
@ -85,6 +85,7 @@ class Database {
|
||||
$statistics_unsubscribes = Env::$db_prefix . 'statistics_unsubscribes';
|
||||
$statistics_forms = Env::$db_prefix . 'statistics_forms';
|
||||
$mapping_to_external_entities = Env::$db_prefix . 'mapping_to_external_entities';
|
||||
$log = Env::$db_prefix . 'log';
|
||||
|
||||
define('MP_SETTINGS_TABLE', $settings);
|
||||
define('MP_SEGMENTS_TABLE', $segments);
|
||||
@ -110,6 +111,7 @@ class Database {
|
||||
define('MP_STATISTICS_UNSUBSCRIBES_TABLE', $statistics_unsubscribes);
|
||||
define('MP_STATISTICS_FORMS_TABLE', $statistics_forms);
|
||||
define('MP_MAPPING_TO_EXTERNAL_ENTITIES_TABLE', $mapping_to_external_entities);
|
||||
define('MP_LOG_TABLE', $log);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -435,10 +435,12 @@ class Migrator {
|
||||
|
||||
function log() {
|
||||
$attributes = [
|
||||
'id BIGINT unsigned NOT NULL AUTO_INCREMENT,',
|
||||
'name VARCHAR(255),',
|
||||
'level INTEGER,',
|
||||
'message LONGTEXT,',
|
||||
'time TIMESTAMP DEFAULT CURRENT_TIMESTAMP',
|
||||
'created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP',
|
||||
'PRIMARY KEY (id),',
|
||||
];
|
||||
return $this->sqlify(__FUNCTION__, $attributes);
|
||||
}
|
||||
|
Reference in New Issue
Block a user