20221223124955_add_contact_fields_to_document_table.php 479 B

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