ramadanproject/database/migrations/2026_01_03_000002_create_reservations_table.php
Ahmed Darrazi 45a147253c
Some checks failed
tests / ci (push) Failing after 6m13s
linter / quality (pull_request) Failing after 58s
linter / quality (push) Failing after 1m19s
tests / ci (pull_request) Failing after 5m28s
feat(public-grid): add QA, quickstart, decision docs; scheduler docs; ignore files; tasks updates; run pint
2026-01-03 04:56:12 +01:00

31 lines
837 B
PHP

<?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::create('reservations', function (Blueprint $table) {
$table->id();
$table->unsignedInteger('x');
$table->unsignedInteger('y');
$table->unsignedInteger('w');
$table->unsignedInteger('h');
$table->string('status')->default('held');
$table->unsignedBigInteger('user_id')->nullable();
$table->dateTime('reserved_until')->nullable();
$table->timestamps();
$table->index(['x', 'y']);
});
}
public function down(): void
{
Schema::dropIfExists('reservations');
}
};