started on the 2 step register process

This commit is contained in:
2025-10-04 18:52:44 +03:00
parent d1bc362fab
commit 76cfd9fee6
6 changed files with 366 additions and 39 deletions
@@ -0,0 +1,41 @@
<?php
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->unsignedTinyInteger('age')->nullable()->after('email_verified_at');
$table->decimal('weight_kg', 5, 2)->nullable()->after('age');
$table->decimal('height_cm', 5, 2)->nullable()->after('weight_kg');
$table->string('fitness_level', 20)->nullable()->after('height_cm'); // beginner, intermediate, advanced
$table->string('goal', 50)->nullable()->after('fitness_level'); // strength, endurance, weight_loss, hypertrophy, mobility, etc
$table->text('health_notes')->nullable()->after('goal'); // health conditions / injuries
$table->text('available_equipment')->nullable()->after('health_notes');
$table->unsignedTinyInteger('days_per_week')->nullable()->after('available_equipment');
$table->unsignedSmallInteger('minutes_per_session')->nullable()->after('days_per_week');
$table->index(['fitness_level', 'goal']);
});
}
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->dropIndex(['fitness_level', 'goal']);
$table->dropColumn([
'age',
'weight_kg',
'height_cm',
'fitness_level',
'goal',
'health_notes',
'available_equipment',
'days_per_week',
'minutes_per_session',
]);
});
}
};