database/migrations/2012_01_01_000001_create_keylists_tables.php
public function up()
    {
        Schema::create('keytypes', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name', 50);
            $table->longText('description')->nullable();
            $table->longText('extended_data')->nullable();
            $table->string('created_by')->nullable();
            $table->string('updated_by')->nullable();
            $table->timestamps();
            $table->softDeletes();

            $table->unique('name');
        });

        Schema::create('keyvalues', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('keytype_id')->unsigned();
            $table->string('keyvalue', 255);
            $table->string('keyname', 255);
            $table->longText('description')->nullable();
            $table->longText('extended_data')->nullable();
            $table->string('created_by')->nullable();
            $table->string('updated_by')->nullable();
            $table->timestamps();
            $table->softDeletes();

            $table->unique(['keytype_id', 'keyvalue']);

            $table->foreign('keytype_id')
                ->references('id')->on('keytypes')
                ->onDelete('cascade')
                ->onUpdate('cascade');
        });
    }
public function up()
    {
        Schema::create('keytypes', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name', 50);
            $table->longText('description')->nullable();
            $table->longText('extended_data')->nullable();
            $table->string('created_by')->nullable();
            $table->string('updated_by')->nullable();
            $table->timestamps();
            $table->softDeletes();

            $table->unique('name');
        });

        Schema::create('keyvalues', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('keytype_id')->unsigned();
            $table->string('keyvalue', 255);
            $table->string('keyname', 255);
            $table->longText('description')->nullable();
            $table->longText('extended_data')->nullable();
            $table->string('created_by')->nullable();
            $table->string('updated_by')->nullable();
            $table->timestamps();
            $table->softDeletes();

            $table->unique(['keytype_id', 'keyvalue']);

            $table->foreign('keytype_id')
                ->references('id')->on('keytypes')
                ->onDelete('cascade')
                ->onUpdate('cascade');
        });
    }
Run the migrations.

@return void