createTable('seo_dynamic', [ 'seo_dynamic_id' => $this->primaryKey(), 'seo_category_id' => $this->integer(), 'name' => $this->string(200), 'action' => $this->string(200), 'fields' => $this->string(), 'title' => $this->string(), 'h1' => $this->string(), 'description' => $this->string(), 'seo_text' => $this->text(), 'status' => $this->smallInteger() ]); $this->addForeignKey('seo_category_seo_dynamic_fk', 'seo_dynamic', 'seo_category_id', 'seo_category', 'seo_category_id', 'CASCADE', 'CASCADE'); } /** * @inheritdoc */ public function down() { $this->dropForeignKey('seo_category_seo_dynamic_fk', '{{%seo_dynamic}}'); $this->dropTable('seo_dynamic'); } }