|
@@ -0,0 +1,26 @@
|
|
|
|
|
+<?php
|
|
|
|
|
+
|
|
|
|
|
+use Illuminate\Database\Migrations\Migration;
|
|
|
|
|
+use Illuminate\Database\Schema\Blueprint;
|
|
|
|
|
+use Illuminate\Support\Facades\Schema;
|
|
|
|
|
+
|
|
|
|
|
+return new class extends Migration
|
|
|
|
|
+{
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Guarda o id do webhook criado na conta Asaas da unidade, para evitar
|
|
|
|
|
+ * duplicação e permitir remoção quando a chave é limpa.
|
|
|
|
|
+ */
|
|
|
|
|
+ public function up(): void
|
|
|
|
|
+ {
|
|
|
|
|
+ Schema::table('unit_payment_accounts', function (Blueprint $table) {
|
|
|
|
|
+ $table->string('asaas_webhook_id')->nullable()->after('asaas_api_key');
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public function down(): void
|
|
|
|
|
+ {
|
|
|
|
|
+ Schema::table('unit_payment_accounts', function (Blueprint $table) {
|
|
|
|
|
+ $table->dropColumn('asaas_webhook_id');
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+};
|