feat(Users): Ajoute d'un champs level dans la table Users

This commit is contained in:
NathanCorberan 2026-01-07 10:25:22 +01:00
parent 2e6754bb1c
commit 9d7191e94d
2 changed files with 29 additions and 0 deletions

View File

@ -27,6 +27,7 @@ class User extends Authenticatable
'password', 'password',
'role', 'role',
'xp', 'xp',
'level',
'avatar_uri', 'avatar_uri',
'participations', 'participations',
'victories' 'victories'

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
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('users', function (Blueprint $table) {
$table->unsignedInteger('level')->default(1);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('level');
});
}
};