|
@@ -0,0 +1,30 @@
|
|
|
|
|
+<?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::table('treasury_launches', function (Blueprint $table) {
|
|
|
|
|
+ // Movimentação manual simples (entrada/saída) lança em um único banco e,
|
|
|
|
|
+ // no franqueador, sem unidade nem plano de contas (CB021 ainda pendente).
|
|
|
|
|
+ $table->foreignId('unit_id')->nullable()->change();
|
|
|
|
|
+ $table->foreignId('financial_plan_account_id')->nullable()->change();
|
|
|
|
|
+ $table->foreignId('from_account_id')->nullable()->change();
|
|
|
|
|
+ $table->foreignId('to_account_id')->nullable()->change();
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public function down(): void
|
|
|
|
|
+ {
|
|
|
|
|
+ Schema::table('treasury_launches', function (Blueprint $table) {
|
|
|
|
|
+ $table->foreignId('unit_id')->nullable(false)->change();
|
|
|
|
|
+ $table->foreignId('financial_plan_account_id')->nullable(false)->change();
|
|
|
|
|
+ $table->foreignId('from_account_id')->nullable(false)->change();
|
|
|
|
|
+ $table->foreignId('to_account_id')->nullable(false)->change();
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+};
|