Removes Team User Column & Refreshes Users Migration

Fuck it, we're in development.
This commit is contained in:
Refringe 2024-06-20 12:12:34 -04:00
parent 121d26d5e4
commit a0b0dd0841
Signed by: Refringe
SSH Key Fingerprint: SHA256:t865XsQpfTeqPRBMN2G6+N8wlDjkgUCZF3WGW6O9N/k
4 changed files with 2 additions and 30 deletions

View File

@ -28,7 +28,6 @@ class UserFactory extends Factory
'remember_token' => Str::random(10),
'user_role_id' => null,
'profile_photo_path' => null,
'current_team_id' => null,
];
}

View File

@ -1,5 +1,6 @@
<?php
use App\Models\UserRole;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
@ -18,8 +19,8 @@ return new class extends Migration
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->foreignIdFor(UserRole::class)->nullable()->default(null)->constrained('user_roles');
$table->rememberToken();
$table->foreignId('current_team_id')->nullable();
$table->string('profile_photo_path', 2048)->nullable();
$table->timestamps();
});

View File

@ -1,28 +0,0 @@
<?php
use App\Models\UserRole;
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->foreignIdFor(UserRole::class)
->nullable()
->after('remember_token')
->constrained()
->cascadeOnUpdate()
->nullOnDelete();
});
}
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->dropForeign(['user_role_id']);
});
}
};