handle db update
This commit is contained in:
@ -1,23 +1,20 @@
|
||||
<?php
|
||||
namespace MailPoet\Config;
|
||||
use \MailPoet\Config\Migrator;
|
||||
use \MailPoet\Config\Populator;
|
||||
|
||||
if(!defined('ABSPATH')) exit;
|
||||
|
||||
class Activator {
|
||||
function __construct() {
|
||||
}
|
||||
|
||||
function activate() {
|
||||
static function activate() {
|
||||
$migrator = new Migrator();
|
||||
$migrator->up();
|
||||
|
||||
$populator = new Populator();
|
||||
$populator->up();
|
||||
|
||||
update_option('mailpoet_db_version', Env::$version);
|
||||
}
|
||||
|
||||
function deactivate() {
|
||||
static function deactivate() {
|
||||
$migrator = new Migrator();
|
||||
$migrator->down();
|
||||
}
|
||||
|
Reference in New Issue
Block a user