新增曾用名

This commit is contained in:
pllx
2026-05-19 18:01:47 +08:00
parent 74e4803bc2
commit 3c7cefe447
7 changed files with 47 additions and 4 deletions
@@ -0,0 +1,28 @@
<?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('previous_name', 50)->nullable()->after('username')->comment('曾用名');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('previous_name');
});
}
};