Untitled
unknown
plain_text
4 years ago
1.0 kB
39
Indexable
<?php use App\Models\Management\Timezone; use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateBlockedUserTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('blocked_user', function (Blueprint $table) { $table->integer('id', true); $table->integer('user_id')->index(); $table->integer('blocked_id')->index(); $table->timestamps(); }); Schema::table('review', function (Blueprint $table) { $table->foreign('user_id')->references('id')->on('users'); $table->foreign('blocked_id')->references('id')->on('users'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('blocked_user'); } }
Editor is loading...