Initial backend upload

هذا الالتزام موجود في:
Abdul Kareem
2026-02-16 01:57:33 +03:00
التزام 34e152fd90
109 ملفات معدلة مع 14546 إضافات و0 حذوفات

عرض الملف

@@ -0,0 +1,29 @@
<?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) {
// نحذف name الافتراضي
$table->dropColumn('name');
// نضيف الحقول تبع مشروعنا
$table->string('first_name')->after('id');
$table->string('last_name')->after('first_name');
$table->string('phone')->unique()->after('email');
});
}
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->string('name');
$table->dropColumn(['first_name', 'last_name', 'phone']);
});
}
};