Initial commit of the L'Ami Fiduciaire SaaS platform built on Laravel 12, Vue 3, Inertia.js 2, and Tailwind CSS 4. Story 0.1 (rename folders to declarations in database) is implemented and code-reviewed: migration, rollback, and 6 Pest tests all passing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
50 lines
1.5 KiB
PHP
50 lines
1.5 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('folders', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->foreignId('workspace_id')->constrained()->cascadeOnDelete();
|
|
$table->foreignId('client_id')->constrained()->cascadeOnDelete();
|
|
$table->foreignId('created_by')->nullable()->constrained('users')->nullOnDelete();
|
|
|
|
$table->string('title');
|
|
$table->string('type');
|
|
$table->unsignedSmallInteger('period_year')->nullable();
|
|
$table->unsignedTinyInteger('period_month')->nullable();
|
|
$table->unsignedTinyInteger('period_quarter')->nullable();
|
|
|
|
$table->date('due_date')->nullable();
|
|
$table->string('status');
|
|
$table->string('priority')->nullable();
|
|
|
|
$table->foreignId('assigned_to')->nullable()->constrained('users')->nullOnDelete();
|
|
$table->timestamp('validated_at')->nullable();
|
|
$table->timestamp('closed_at')->nullable();
|
|
|
|
$table->text('notes_internal')->nullable();
|
|
$table->text('notes_client')->nullable();
|
|
|
|
$table->timestamps();
|
|
$table->softDeletes();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('folders');
|
|
}
|
|
};
|