db = 'db'; parent::init(); } public function safeUp() { $tableOptions = 'ENGINE=InnoDB'; $this->createTable( '{{%inquirer_question}}', [ 'id'=> $this->primaryKey()->unsigned(), 'text'=> $this->text()->notNull(), 'active'=> "enum('Y', 'N') NOT NULL DEFAULT 'Y' COMMENT 'доступна'", 'show'=> "enum('Y', 'N') NOT NULL DEFAULT 'Y' COMMENT 'показывать на главной'", 'dt_cr'=> $this->datetime()->notNull()->defaultExpression("CURRENT_TIMESTAMP"), 'dt_pub'=> $this->datetime()->notNull()->defaultExpression("CURRENT_TIMESTAMP"), 'dt_end'=> $this->datetime()->notNull()->defaultExpression("CURRENT_TIMESTAMP"), ],$tableOptions ); } public function safeDown() { $this->dropTable('{{%inquirer_question}}'); } }