%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/shaban/duassis/api/database/migrations/
Upload File :
Create Path :
Current File : //var/www/html/shaban/duassis/api/database/migrations/2020_02_12_182236_create_addresses_table.php

<?php

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

class CreateAddressesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('addresses', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->morphs('model');
            $table->unsignedBigInteger('country_id')
                  ->nullable()
                  ->index();
            $table->foreign('country_id')
                  ->references('id')
                  ->on('countries');
            $table->text('city');
            $table->string('street');
            $table->decimal('latitude', 8, 6)
                  ->nullable();
            $table->decimal('longitude', 9,6)
                  ->nullable();
            $table->timestamps();
        });
    }

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

Zerion Mini Shell 1.0