latest working update

This commit is contained in:
ghassan committed 2026-04-16 19:42:37 +03:00
1 parent ba453d7b82
commit eb0d79d503
8 files changed
+592 -20

No files matched your search

@@ -0,0 +1,27 @@
<?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) {
$table->foreignId('parking_lot_id')
->nullable()
->after('role')
->constrained('parking_lots')
->nullOnDelete();
});
}
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->dropForeignIdFor(\App\Models\ParkingLot::class);
$table->dropColumn('parking_lot_id');
});
}
};