<?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('shop_deliveries', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('sale_channel_id')->nullable()->index('sale_channel_id');
            $table->unsignedTinyInteger('active')->nullable()->index('active');
            $table->unsignedTinyInteger('is_public')->nullable();
            $table->unsignedTinyInteger('at_house')->nullable();
            $table->string('name', 50)->nullable();
            $table->text('description')->nullable();
            $table->string('address')->nullable();
            $table->string('address2')->nullable();
            $table->string('zipcode', 50)->nullable();
            $table->string('city')->nullable();
            $table->string('country', 50)->nullable();
            $table->dateTime('event_date_begin')->nullable();
            $table->dateTime('event_date_end')->nullable();
            $table->dateTime('created_by')->nullable();
            $table->dateTime('updated_by')->nullable();
            $table->dateTime('deleted_by')->nullable();
            $table->timestamps();
            $table->softDeletes();
        });
    }

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