diff --git a/database/migrations/2024_07_03_135202_add_mailbox_id_column_to_customers_table.php b/database/migrations/2024_07_03_135202_add_mailbox_id_column_to_customers_table.php
index 9411efb..2070170 100644
--- a/database/migrations/2024_07_03_135202_add_mailbox_id_column_to_customers_table.php
+++ b/database/migrations/2024_07_03_135202_add_mailbox_id_column_to_customers_table.php
@@ -7,6 +7,7 @@
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
+use Symfony\Component\Console\Output\ConsoleOutput;
use MillionsMissingFrance\FreescoutRestrictedCustomers\Customer;
class AddMailboxIdColumnToCustomersTable extends Migration {
@@ -31,10 +32,13 @@ class AddMailboxIdColumnToCustomersTable extends Migration {
->onDelete('cascade');
});
// Link Customers to Mailboxes, through their Conversation information.
+ $output = new ConsoleOutput();
+ $output->writeln('Linking existing Customers to Mailboxes, it might take a couple minutes…');
$customers = Customer::all();
$customers->each(function ($customer) {
$customer->linkToMailboxThroughConversations();
});
+ $output->writeln('Linking existing Customers to Mailboxes done.');
}
/**