Skip to content

Commit

Permalink
car table
Browse files Browse the repository at this point in the history
  • Loading branch information
stazrouti committed Sep 16, 2024
1 parent 9d5cef9 commit 104eb16
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(): void
{
Schema::create('cars', function (Blueprint $table) {
$table->id();
$table->string('Name'); // Car make, e.g., Toyota
$table->string('Model'); // Car model, e.g., Corolla
$table->string('Year'); // Year of manufacture
$table->string('Doors'); // Number of doors
$table->string('AC'); // Air conditioning (Yes/No)
$table->string('Transmission'); // Transmission type (Manual/Automatic)
$table->string('Fuel'); // Fuel type (Petrol/Diesel)
$table->decimal('Price_per_day', 8, 2); // Rental price per day
$table->string('Status'); // Car status (Available, Rented, Maintenance)
$table->timestamps();
});

}

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

0 comments on commit 104eb16

Please sign in to comment.