Commit 6671369b authored by Mahmoud Aglan's avatar Mahmoud Aglan

Fix seeder: users table has no branch_id column

The seeder was trying to set branch_id on the user, but that column
doesn't exist on the users table (it's on participants/payments).
Removed the branch assignment and unused Branch import.
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent 6079ab5d
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
namespace Database\Seeders; namespace Database\Seeders;
use App\Domain\Identity\Models\Branch;
use App\Domain\Identity\Models\Role; use App\Domain\Identity\Models\Role;
use App\Domain\Shared\Models\Academy; use App\Domain\Shared\Models\Academy;
use App\Models\User; use App\Models\User;
...@@ -61,12 +60,9 @@ public function run(): void ...@@ -61,12 +60,9 @@ public function run(): void
->where('slug', 'academy_owner') ->where('slug', 'academy_owner')
->first(); ->first();
$branch = Branch::where('academy_id', $academy->id)->first();
$admin->update([ $admin->update([
'role_id' => $ownerRole?->id ?? $admin->role_id, 'role_id' => $ownerRole?->id ?? $admin->role_id,
'is_super_admin' => true, 'is_super_admin' => true,
'branch_id' => $branch?->id ?? $admin->branch_id,
]); ]);
if ($ownerRole && !$admin->roles()->where('role_id', $ownerRole->id)->exists()) { if ($ownerRole && !$admin->roles()->where('role_id', $ownerRole->id)->exists()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment