Merge pull request 'feature/event_scoped_admin' (#13) from feature/event_scoped_admin into dev

Reviewed-on: https://gitea.quo.ar/tbianchini/shopit-back/pulls/13
This commit is contained in:
2026-10-01 12:49:21 +00:00
26 changed files with 837 additions and 102 deletions

View File

@@ -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
{
public function up(): void
{
Schema::table('users', function (Blueprint $table): void {
$table->foreignId('event_id')
->nullable()
->after('tenant_codigo')
->constrained('events')
->cascadeOnUpdate()
->restrictOnDelete();
});
}
public function down(): void
{
Schema::table('users', function (Blueprint $table): void {
$table->dropForeign(['event_id']);
$table->dropColumn('event_id');
});
}
};