38 lines
1.3 KiB
PHP
38 lines
1.3 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('proposal_openings', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->foreignId('tenant_id')->constrained()->restrictOnDelete();
|
|
$table->foreignId('requisition_id')->constrained()->restrictOnDelete();
|
|
$table->foreignId('created_by')->constrained('users')->restrictOnDelete();
|
|
$table->unsignedInteger('revision');
|
|
$table->dateTime('opened_at');
|
|
$table->string('timezone', 64);
|
|
$table->dateTime('submission_deadline')->nullable();
|
|
$table->string('reference', 150);
|
|
$table->string('location', 300);
|
|
$table->text('reason');
|
|
$table->text('notes')->nullable();
|
|
$table->json('participants');
|
|
$table->json('annexes');
|
|
$table->json('snapshot');
|
|
$table->string('basis_hash', 64);
|
|
$table->timestamp('created_at');
|
|
$table->unique(['requisition_id', 'revision']);
|
|
});
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
throw new LogicException('Preservar as actas e as suas versões.');
|
|
}
|
|
};
|