feat: breathing exercise & profile

This commit is contained in:
2025-08-24 19:50:16 +03:30
parent 0e49229621
commit abb53ed969
6 changed files with 133 additions and 1 deletions
@@ -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()
{
Schema::create('breathing_exercises', function (Blueprint $table) {
$table->id();
$table->foreignId('user_id')->constrained()->onDelete('cascade');
$table->string('subject');
$table->integer('duration'); // duration in seconds or minutes
$table->timestamp('created_at')->nullable(); // if null = now
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('breathing_exercises');
}
};
@@ -0,0 +1,29 @@
<?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()
{
Schema::table('users', function (Blueprint $table) {
$table->integer('xp')->default(0);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
//
});
}
};