lots of progress

This commit is contained in:
2025-04-12 17:18:33 +03:00
parent 8d230e8e67
commit 3d4260d57e
44 changed files with 2590 additions and 2883 deletions
@@ -0,0 +1,34 @@
<?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::create('reviews', function (Blueprint $table) {
$table->id();
$table->foreignId('user_id')->constrained()->onDelete('cascade');
$table->foreignId('game_id')->constrained()->onDelete('cascade');
$table->text('content');
$table->boolean('recommended');
$table->integer('rating')->unsigned()->between(1, 10);
$table->timestamps();
$table->unique(['user_id', 'game_id']);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('reviews');
}
};