%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/diaspora/api/database/migrations/
Upload File :
Create Path :
Current File : /var/www/html/diaspora/api/database/migrations/2019_06_11_173709_create_kkd_sections_table.php

<?php

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

class CreateKkdSectionsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('kkd_sections', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('order')
                  ->unique();
            $table->boolean('is_visible')
                  ->default(false);
            $table->timestamps();
        });

        Schema::create('kkd_section_translations', function (Blueprint $table) {
            $table->increments('id');
            $table->bigInteger('kkd_section_id')
                  ->unsigned();
            $table->string('title');
            $table->longText('description');
            $table->string('locale')
                  ->index();
            $table->unique(['kkd_section_id', 'locale']);
            $table->foreign('kkd_section_id')
                  ->references('id')
                  ->on('kkd_sections')
                  ->onDelete('cascade');
        });
    }

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

Zerion Mini Shell 1.0