Changeset View
Changeset View
Standalone View
Standalone View
src/database/migrations/2020_02_11_110959_add_deleted_at.php
- This file was added.
<?php | |||||
use Illuminate\Support\Facades\Schema; | |||||
use Illuminate\Database\Schema\Blueprint; | |||||
use Illuminate\Database\Migrations\Migration; | |||||
class AddDeletedAt extends Migration | |||||
{ | |||||
/** | |||||
* Run the migrations. | |||||
* | |||||
* @return void | |||||
*/ | |||||
public function up() | |||||
{ | |||||
Schema::table( | |||||
'domains', | |||||
function (Blueprint $table) { | |||||
$table->softDeletes(); | |||||
} | |||||
); | |||||
Schema::table( | |||||
'users', | |||||
function (Blueprint $table) { | |||||
$table->softDeletes(); | |||||
} | |||||
); | |||||
} | |||||
/** | |||||
* Reverse the migrations. | |||||
* | |||||
* @return void | |||||
*/ | |||||
public function down() | |||||
{ | |||||
Schema::table( | |||||
'domains', | |||||
function (Blueprint $table) { | |||||
$table->dropColumn(['deleted_at']); | |||||
} | |||||
); | |||||
Schema::table( | |||||
'users', | |||||
function (Blueprint $table) { | |||||
$table->dropColumn(['deleted_at']); | |||||
} | |||||
); | |||||
} | |||||
} |