yeet name_first and name_last from users table

This commit is contained in:
Matthew Penner 2021-07-28 21:31:00 -06:00
parent f1be653486
commit bf9dfa87da
20 changed files with 144 additions and 82 deletions

View file

@ -0,0 +1,29 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class YeetNamesFromUsersTable extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn(['name_first', 'name_last']);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->string('name_first')->after('email')->nullable();
$table->string('name_last')->after('name_first')->nullable();
});
}
}