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