Skip to content

Commit

Permalink
create reservation table
Browse files Browse the repository at this point in the history
  • Loading branch information
stazrouti committed Sep 19, 2024
1 parent f78246a commit 236b485
Showing 1 changed file with 37 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?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('reservations', function (Blueprint $table) {
$table->id();
$table->date('pickup_date');
$table->date('dropoff_date');
$table->string('pickup_location');
$table->string('dropoff_location');
$table->foreignId('car_id')->constrained()->onDelete('cascade');
$table->string('first_name');
$table->string('last_name');
$table->string('phone_number');
$table->string('email');
$table->text('address');
$table->timestamps();
});
}

/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('reservations');
}
};

0 comments on commit 236b485

Please sign in to comment.