table('Pop'); if (!$table->hasColumn('zip')) { $table->addColumn('zip', 'string', ['null' => true, 'limit' => 10, 'after' => 'location']); } if (!$table->hasColumn('city')) { $table->addColumn('city', 'string', ['null' => true, 'limit' => 255, 'after' => 'zip']); } if (!$table->hasColumn('street')) { $table->addColumn('street', 'string', ['null' => true, 'limit' => 255, 'after' => 'city']); } if (!$table->hasColumn('number')) { $table->addColumn('number', 'string', ['null' => true, 'limit' => 20, 'after' => 'street']); } $table->update(); } public function down(): void { $table = $this->table('Pop'); $table->removeColumn('zip') ->removeColumn('city') ->removeColumn('street') ->removeColumn('number') ->update(); } }