Files
magic-project/database/migrations/2025_08_03_192706_change_users.php
T

33 lines
948 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.
*/
public function up(): void
{
Schema::table('users', function (Blueprint $table) {
$table->string('name', 255)->nullable()->default(NULL)->change();
$table->string('email', 255)->nullable()->default(NULL)->change();
$table->string('password', 255)->nullable()->default(NULL)->change();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->string('name', 255)->nullable(false)->change();
$table->string('email', 255)->nullable(false)->change();
$table->string('password', 255)->nullable(false)->change();
});
}
};