feat(Users): Ajoute d'un champs level dans la table Users
This commit is contained in:
parent
2e6754bb1c
commit
9d7191e94d
|
|
@ -27,6 +27,7 @@ class User extends Authenticatable
|
|||
'password',
|
||||
'role',
|
||||
'xp',
|
||||
'level',
|
||||
'avatar_uri',
|
||||
'participations',
|
||||
'victories'
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
});
|
||||
}
|
||||
};
|
||||
Loading…
Reference in New Issue