handle db update

This commit is contained in:
Jonathan Labreuille
2016-12-05 13:14:12 +01:00
parent 9b44becc7d
commit 3d24f0c77b
2 changed files with 19 additions and 19 deletions

View File

@ -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();
}