48 lines
1.6 KiB
PHP
48 lines
1.6 KiB
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('vehicle', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->string('placa')->unique()->nullable();
|
|
$table->string('niv')->unique()->nullable();
|
|
$table->string('marca')->nullable();
|
|
$table->string('linea')->nullable();
|
|
$table->string('sublinea')->nullable();
|
|
$table->string('modelo')->nullable();
|
|
$table->string('color')->nullable();
|
|
$table->string('numero_motor')->nullable();
|
|
$table->string('clase_veh')->nullable();
|
|
$table->string('tipo_servicio')->nullable();
|
|
$table->string('rfv')->unique()->nullable();
|
|
$table->string('rfc')->nullable();
|
|
$table->string('ofcexpedicion')->nullable();
|
|
$table->date('fechaexpedicion')->nullable();
|
|
$table->string('tipo_veh')->nullable();
|
|
$table->string('numptas')->nullable();
|
|
$table->string('observac')->nullable();
|
|
$table->string('cve_vehi')->nullable();
|
|
$table->string('tipo_mov')->nullable();
|
|
$table->foreignId('owner_id')->nullable()->constrained('owners')->nullOnDelete();
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('vehicle');
|
|
}
|
|
};
|