Changeset View
Changeset View
Standalone View
Standalone View
src/database/migrations/2020_02_24_095604_create_changelogs_table.php
- This file was added.
<?php | |||||
use Illuminate\Support\Facades\Schema; | |||||
use Illuminate\Database\Schema\Blueprint; | |||||
use Illuminate\Database\Migrations\Migration; | |||||
// phpcs:ignore | |||||
class CreateChangelogsTable extends Migration | |||||
{ | |||||
/** | |||||
* Run the migrations. | |||||
* | |||||
* @return void | |||||
*/ | |||||
public function up() | |||||
{ | |||||
Schema::create( | |||||
'changelogs', | |||||
function (Blueprint $table) { | |||||
$table->bigIncrements('id'); | |||||
$table->string('entitlement_id', 36); | |||||
$table->timestamps(); | |||||
$table->softDeletes(); | |||||
$table->foreign('entitlement_id')->references('id') | |||||
->on('entitlements')->onDelete('cascade'); | |||||
} | |||||
); | |||||
} | |||||
/** | |||||
* Reverse the migrations. | |||||
* | |||||
* @return void | |||||
*/ | |||||
public function down() | |||||
{ | |||||
Schema::dropIfExists('changelogs'); | |||||
} | |||||
} |