Files
scrum-poker-internal/database/migrations/2026_08_14_164132_create_rooms_table.php
2026-08-15 13:35:46 +02:00

34 lines
886 B
PHP

<?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('rooms', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->string('title', 100)->nullable();
$table->json('deck_config');
$table->string('join_code', 6)->unique();
$table->unsignedInteger('current_round')->default(1);
$table->timestamp('revealed_at')->nullable();
$table->unsignedBigInteger('state_version')->default(1);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('rooms');
}
};