restore acore_auth

This commit is contained in:
2026-10-04 20:21:28 +04:00
parent b9f2a6da1e
commit 88af380cab
12 changed files with 887 additions and 6 deletions
@@ -0,0 +1,27 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('users', function (Blueprint $table): void {
// Accounts created by the old game server may have no email.
$table->string('email')->nullable()->change();
});
}
public function down(): void
{
if (DB::table('users')->whereNull('email')->exists()) {
throw new RuntimeException('Fill missing user emails before rolling back this migration.');
}
Schema::table('users', function (Blueprint $table): void {
$table->string('email')->nullable(false)->change();
});
}
};