44 lines
1.9 KiB
PHP
44 lines
1.9 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('scadenze', function (Blueprint $table): void {
|
|
$table->id();
|
|
$table->unsignedInteger('legacy_id')->nullable()->unique();
|
|
$table->foreignId('stabile_id')->nullable()->constrained('stabili')->nullOnDelete();
|
|
$table->string('codice_stabile_legacy', 20)->nullable()->index();
|
|
$table->string('descrizione_sintetica')->nullable();
|
|
$table->date('data_scadenza')->nullable()->index();
|
|
$table->time('ora_scadenza')->nullable();
|
|
$table->string('natura', 20)->nullable()->index();
|
|
$table->string('natura_label', 120)->nullable();
|
|
$table->string('gestione_tipo', 20)->nullable();
|
|
$table->unsignedInteger('num_assemblea')->nullable();
|
|
$table->unsignedInteger('numero_straordinaria')->nullable();
|
|
$table->string('anno', 20)->nullable();
|
|
$table->unsignedInteger('rata')->nullable();
|
|
$table->string('fatto', 20)->nullable();
|
|
$table->string('tipo_riga', 60)->nullable();
|
|
$table->unsignedBigInteger('rif_f24')->nullable();
|
|
$table->decimal('importo_f24', 12, 2)->nullable();
|
|
$table->boolean('richiede_pop_up')->default(false);
|
|
$table->unsignedInteger('giorni_anticipo')->nullable();
|
|
$table->date('popup_dal')->nullable();
|
|
$table->string('calendar_event_id')->nullable()->index();
|
|
$table->timestamp('calendar_synced_at')->nullable();
|
|
$table->json('legacy_payload')->nullable();
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('scadenze');
|
|
}
|
|
}; |