From 236b4853915b8aae8b55d0d0da9f9be20be2a33f Mon Sep 17 00:00:00 2001 From: stazrouti Date: Thu, 19 Sep 2024 22:53:51 +0100 Subject: [PATCH] create reservation table --- ...09_19_214951_create_reservations_table.php | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 rental-car-backend/database/migrations/2024_09_19_214951_create_reservations_table.php diff --git a/rental-car-backend/database/migrations/2024_09_19_214951_create_reservations_table.php b/rental-car-backend/database/migrations/2024_09_19_214951_create_reservations_table.php new file mode 100644 index 0000000..c918316 --- /dev/null +++ b/rental-car-backend/database/migrations/2024_09_19_214951_create_reservations_table.php @@ -0,0 +1,37 @@ +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'); + } +};