Files
dsi-commander/database/migrations/2026_04_02_000003_create_fournisseurs_table.php

36 lines
1.2 KiB
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('fournisseurs', function (Blueprint $table) {
$table->id();
$table->string('nom');
$table->string('raison_sociale')->nullable();
$table->string('siret', 14)->nullable();
$table->text('adresse')->nullable();
$table->string('code_postal', 10)->nullable();
$table->string('ville')->nullable();
$table->string('telephone', 20)->nullable();
$table->string('email')->nullable();
$table->string('contact_commercial')->nullable();
$table->string('email_commercial')->nullable();
$table->string('telephone_commercial', 20)->nullable();
$table->string('site_web')->nullable();
$table->text('notes')->nullable();
$table->boolean('active')->default(true);
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('fournisseurs');
}
};