Premier commit
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<?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');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user