20221223124141_add_contact_fields_to_location_table.php 479 B

1234567891011121314
  1. <?php
  2. declare(strict_types=1);
  3. use Phinx\Migration\AbstractMigration;
  4. final class AddContactFieldsToLocationTable extends AbstractMigration {
  5. public function change(): void {
  6. $this->table("location")
  7. ->addColumn("contact_name", "string", ["null" => true, "after" => "email"])
  8. ->addColumn("contact_phone", "string", ["null" => true, "after" => "contact_name"])
  9. ->addColumn("contact_email", "string", ["null" => true, "after" => "contact_phone"])
  10. ->update();
  11. }
  12. }