20220625113254_add_address_table.php 771 B

1234567891011121314151617181920
  1. <?php
  2. declare(strict_types=1);
  3. use Phinx\Migration\AbstractMigration;
  4. final class AddAddressTable extends AbstractMigration {
  5. public function change(): void {
  6. $this->table("address", ["signed" => false, "collation" => "utf8mb4_general_ci"])
  7. ->addColumn("address_1", "string", ["null" => true])
  8. ->addColumn("address_2", "string", ["null" => true])
  9. ->addColumn("city", "string", ["null" => true])
  10. ->addColumn("county", "string", ["null" => true])
  11. ->addColumn("postal_code", "string", ["null" => true])
  12. ->addColumn("state", "string", ["null" => true])
  13. ->addColumn("country", "string", ["limit" => 2, "null" => true])
  14. ->addColumn("latitude", "double", ["null" => true])
  15. ->addColumn("longitude", "double", ["null" => true])
  16. ->create();
  17. }
  18. }