<?php


// Migration (Schema): database/migrations/2025_09_10_000000_create_car_brands_table.php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;


class CreateCarBrandsTable extends Migration
{
public function up()
{
Schema::create('car_brands', function (Blueprint $table) {
$table->id();
$table->string('brand_name', 100);
$table->string('country', 50);
$table->string('parent_company', 100)->nullable();
$table->enum('type', ['Popular', 'Luxo', 'Esportivo', 'Elétrico'])->default('Popular');
$table->timestamps();


$table->unique(['brand_name', 'country']);
});
}


public function down()
{
Schema::dropIfExists('car_brands');
}
}