createTable('product', [ 'id' => $this->primaryKey(), 'status' => $this->boolean(), 'sort' => $this->smallInteger(), 'sku' =>$this->string(255), 'image_id' => $this->integer(), ]); $this->addForeignKey( 'fk-product-image_id', 'product', 'image_id', 'ImageManager', 'id', 'CASCADE' ); } /** * @inheritdoc */ public function down() { $this->dropForeignKey( 'fk-product-image_id', 'product' ); $this->dropTable('product'); } }