File: /var/www/html/orbidirectory.com/database/migrations/2024_06_13_132223_create_vehicles_table.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(): void
{
Schema::create('vehicles', function (Blueprint $table) {
$table->id();
$table->unsignedInteger('transporter_id');
$table->unsignedInteger('make_id');
$table->unsignedInteger('model_id');
$table->unsignedInteger('vehicle_type_id');
$table->year('model_year');
$table->enum('fuel_type', ['Patrol', 'Diesel', 'CNG', 'Electric', 'Hybrid']);
$table->enum('transmission_type', ['Manual', 'Automatic']);
$table->enum('service_type', ['Passenger', 'Goods Transport']);
$table->integer('seating_capacity');
$table->string('license_plate');
$table->text('description');
$table->boolean('is_verified')->default(0)->comment('0:No, 1:Yes');
$table->tinyInteger('status')->default(1)->comment('0:Active, 1:Inactive, 2: Banned');
$table->text('inactive_reason')->nullable()->comment('Inactive or Banned Reason');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('vehicles');
}
};