feat: add statts
This commit is contained in:
parent
46090d4f08
commit
93705103df
|
|
@ -25,7 +25,10 @@ class User extends Authenticatable
|
||||||
'username',
|
'username',
|
||||||
'email',
|
'email',
|
||||||
'password',
|
'password',
|
||||||
'role'
|
'role',
|
||||||
|
'xp',
|
||||||
|
'participations',
|
||||||
|
'victories'
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
<?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->integer('xp')->default(0);
|
||||||
|
$table->integer('participations')->default(0);
|
||||||
|
$table->integer('victories')->default(0);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('users', function (Blueprint $table) {
|
||||||
|
//
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
@ -64,6 +64,19 @@ services:
|
||||||
echo '✅ Migrations applied.';
|
echo '✅ Migrations applied.';
|
||||||
"
|
"
|
||||||
|
|
||||||
|
phpmyadmin:
|
||||||
|
image: phpmyadmin:latest
|
||||||
|
restart: unless-stopped
|
||||||
|
depends_on:
|
||||||
|
- mysql
|
||||||
|
ports:
|
||||||
|
- "8888:80"
|
||||||
|
environment:
|
||||||
|
PMA_HOST: mysql
|
||||||
|
PMA_PORT: 3306
|
||||||
|
PMA_USER: "${DB_USERNAME}"
|
||||||
|
PMA_PASSWORD: "${DB_PASSWORD}"
|
||||||
|
|
||||||
mysql:
|
mysql:
|
||||||
image: mysql:8.0
|
image: mysql:8.0
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
@ -77,15 +90,7 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- "3308:3306" # Optionnel, pour accès externe à MySQL
|
- "3308:3306" # Optionnel, pour accès externe à MySQL
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test:
|
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost", "-p${MYSQL_ROOT_PASSWORD}" ]
|
||||||
[
|
|
||||||
"CMD",
|
|
||||||
"mysqladmin",
|
|
||||||
"ping",
|
|
||||||
"-h",
|
|
||||||
"localhost",
|
|
||||||
"-p${MYSQL_ROOT_PASSWORD}",
|
|
||||||
]
|
|
||||||
interval: 5s
|
interval: 5s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 10
|
retries: 10
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue