<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('addresses', function (Blueprint $table) {
            $table->id();
            $table->string('shopify_gid', 100)->unique()->nullable();

            $table->string('name', 255);
            $table->string('address1', 255);
            $table->string('address2', 255)->nullable();
            $table->string('city', 100)->nullable();
            $table->string('country_code', 4);
            $table->string('zip', 100)->nullable();
            $table->string('phone', 50)->nullable();

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('addresses');
    }
};
