arcos-backend/database/migrations/2025_12_20_143000_create_detections_table.php

36 lines
892 B
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('detections', function (Blueprint $table) {
$table->id();
// Datos del vehículo detectado
$table->string('epc');
$table->string('vin')->nullable();
$table->string('placa')->nullable();
$table->string('marca')->nullable();
$table->string('modelo')->nullable();
$table->string('color')->nullable();
$table->timestamp('fecha_deteccion')->useCurrent();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('detections');
}
};