Files
app3/database/migrations/2025_12_30_231102_create_bookings_table.php
2026-01-26 09:06:06 +00:00

36 lines
894 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()
{
Schema::create('bookings', function (Blueprint $table) {
$table->id();
$table->foreignId('room_type_id')->constrained()->onDelete('cascade');
$table->date('check_in');
$table->date('check_out');
$table->string('guest_name');
$table->string('guest_email');
$table->string('guest_phone')->nullable();
$table->boolean('is_confirmed')->default(false);
$table->decimal('total_price', 10, 2)->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('bookings');
}
};