Edit File: 2023_10_19_105746_create_contact_replays_table.php
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateContactReplaysTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('contact_replays', function (Blueprint $table) { $table->id(); $table -> unsignedBigInteger( 'contact_id' ) -> unsigned() -> index(); $table -> foreign( 'contact_id' ) -> references( 'id' ) -> on( 'contacts' )-> onDelete( 'cascade' ); $table->text('replay'); $table->integer('replayer_id')->unsigned(); $table->string('replayer_type'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('contact_replays'); } }
Back to File Manager