Files
BRISTO/database/migrations/2026_02_07_095423_create_contracts_table.php
jeremy bayse 89a369964d Premier commit
2026-02-09 11:27:21 +01:00

38 lines
1.1 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('contracts', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('reference')->unique()->nullable();
$table->string('provider');
$table->string('status')->default('draft'); // active, expired, pending, cancelled
$table->date('start_date');
$table->date('end_date')->nullable();
$table->decimal('amount', 10, 2)->nullable();
$table->string('currency', 3)->default('EUR');
$table->text('notes')->nullable();
$table->string('type')->default('other'); // microsoft_365, domain, software, fiber, other
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('contracts');
}
};