getEnvironment() == "thetool") { $table = $this->table('WarehouseOffer'); if (!$table->hasColumn('validity')) { $table->addColumn('validity', 'integer', [ 'null' => true, 'default' => null, 'after' => 'status', ]); $table->update(); } } } public function down(): void { if ($this->getEnvironment() == "thetool") { $table = $this->table('WarehouseOffer'); if ($table->hasColumn('validity')) { $table->removeColumn('validity'); $table->update(); } } } }