feat: add age and status

This commit is contained in:
2026-06-10 11:46:28 +03:30
parent 80ba523f92
commit 66e759f03a
2 changed files with 45 additions and 1 deletions
@@ -0,0 +1,26 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('users', function (Blueprint $table) {
if (!Schema::hasColumn('users', 'age')) {
$table->unsignedTinyInteger('age')->nullable()->after('birthday');
}
});
}
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
if (Schema::hasColumn('users', 'age')) {
$table->dropColumn('age');
}
});
}
};