Files
Website/database/migrations/2023_05_08_021929_update_users_table.php

35 lines
808 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->string('first_name')->default('')->change();
$table->string('last_name')->default('')->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('users', function (Blueprint $table) {
$table->string('first_name')->nullable(false)->change();
$table->string('last_name')->nullable(false)->change();
});
}
};