Scalr\Upgrade\Updates\Update20160212110643::run1 PHP Метод

run1() защищенный Метод

protected run1 ( $stage )
    protected function run1($stage)
    {
        if ($this->hasTable('scripting_log')) {
            $this->db->Execute("RENAME TABLE scripting_log TO orchestration_log");
        }
        $this->console->out("Creating new table orchestration_log_manual_scripts ...");
        $this->db->Execute("\n            CREATE TABLE IF NOT EXISTS orchestration_log_manual_scripts (\n                `id` INT(11) NOT NULL AUTO_INCREMENT COMMENT 'Id',\n                `orchestration_log_id` INT(11) NULL COMMENT 'Orchestration log id',\n                `execution_id` VARCHAR(75) NOT NULL COMMENT 'The Execution id',\n                `server_id` VARCHAR(36) NOT NULL COMMENT 'The server id',\n                `user_id` INT(11) NULL COMMENT 'The user id',\n                `user_email` VARCHAR(100) NULL COMMENT 'The user email',\n                `added` datetime DEFAULT NULL COMMENT 'The created date',\n                PRIMARY KEY (`id`),\n                INDEX `idx_orchestration_log_id` (`orchestration_log_id`),\n                INDEX `idx_execution_id` (`execution_id`),\n                INDEX `idx_server_id` (`server_id`),\n                INDEX `idx_added` (`added`))\n            ENGINE = InnoDB DEFAULT CHARSET=latin1\n            COMMENT = 'User data for orchestration log'\n        ");
        if ($this->container->config->defined('scalr.crontab.services.rotate.keep.scalr.scripting_log')) {
            $this->console->warning('Scripting log has been renamed to Orchestration log and config section scalr.crontab.services.rotate.keep.scalr.scripting_log should also be renamed.');
        }
    }