=== Investor cluster (3 rows) ===
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'cluster@example.com' for key 'investors_email_unique' (Connection: mysql, Host: 127.0.0.1, Port: 3306, Database: angels_dev, SQL: insert into `investors` (`monday_item_id`, `group_id`, `email`, `phone_number`, `investor_bio`, `source`, `is_active`, `last_synced_at`, `updated_at`, `created_at`) values (8400000002, 13, cluster@example.com, +966 500111111, old bio from archive, monday, 1, 2026-09-29 21:47:11, 2026-09-29 21:47:11, 2026-09-29 21:47:11))
Illuminate\Database\Connection->runQueryCallback(string, array, object(Closure))Illuminate\Database\Connection->runQueryCallback(string, array, object(Closure))Illuminate\Database\Connection->run(string, array, object(Closure))Illuminate\Database\MySqlConnection->insert(string, array, string)Illuminate\Database\Query\Processors\MySqlProcessor->processInsertGetId(object(Illuminate\Database\Query\Builder), string, array, string)Illuminate\Database\Query\Builder->insertGetId(array, string)Illuminate\Database\Eloquent\Builder->__call(string, array)Illuminate\Database\Eloquent\Model->insertAndSetId(object(Illuminate\Database\Eloquent\Builder), array)Illuminate\Database\Eloquent\Model->performInsert(object(Illuminate\Database\Eloquent\Builder))Illuminate\Database\Eloquent\Model->save()Illuminate\Database\Eloquent\Builder->Illuminate\Database\Eloquent\{closure}(object(App\Models\Investor))tap(object(App\Models\Investor), object(Closure))Illuminate\Database\Eloquent\Builder->create(array)Illuminate\Database\Eloquent\Model->forwardCallTo(object(Illuminate\Database\Eloquent\Builder), string, array)Illuminate\Database\Eloquent\Model->__call(string, array)Illuminate\Database\Eloquent\Model::__callStatic(string, array)98 'is_active' => true,99 'last_synced_at' => now(),100]);101102// Row B: same email as A, archive group → low priority103$b = Investor::create([104 'monday_item_id' => $baseMid + 2,105 'group_id' => $archiveGroup->id,106 'name' => 'Alice (archive)',107 'email' => 'cluster@example.com', // ← bridges to A by email108 'phone_number' => '+966 500111111',109 'investor_bio' => 'old bio from archive', // low priority, should NOT overwrite if canonical has a value110 'source' => Investor::SOURCE_MONDAY,111 'is_active' => true,112 'last_synced_at' => now(),113]);114115select * from `groups` where `type` = 'investor' and `name` not like '%archive%' and `name` not like '%rejected%' and `groups`.`deleted_at` is null limit 1select * from `groups` where `type` = 'investor' and `name` like '%archive%' and `groups`.`deleted_at` is null limit 1select * from `groups` where `type` = 'investor' and `name` like '%rejected%' and `groups`.`deleted_at` is null limit 1select * from `groups` where `type` = 'startup' and `name` not like '%archive%' and `name` not like '%rejected%' and `groups`.`deleted_at` is null limit 1select * from `groups` where `type` = 'startup' and `name` like '%archive%' and `groups`.`deleted_at` is null limit 1delete from `investors` where `monday_item_id` >= 8400000000delete from `startups` where `monday_item_id` >= 8400000000select * from `label_options` where exists (select * from `labels` where `label_options`.`label_id` = `labels`.`id` and `type` = 'investor' and `key` = 'sector' and `labels`.`deleted_at` is null) and `label_options`.`deleted_at` is null limit 1select * from `label_options` where exists (select * from `labels` where `label_options`.`label_id` = `labels`.`id` and `type` = 'investor' and `key` = 'preferred_stage' and `labels`.`deleted_at` is null) and `label_options`.`deleted_at` is null limit 1select * from `label_options` where exists (select * from `labels` where `label_options`.`label_id` = `labels`.`id` and `type` = 'startup' and `key` = 'geographic_focus' and `labels`.`deleted_at` is null) and `label_options`.`deleted_at` is null limit 1insert into `investors` (`monday_item_id`, `group_id`, `email`, `phone_number`, `investor_bio`, `source`, `is_active`, `last_synced_at`, `updated_at`, `created_at`) values (8400000001, 10, 'cluster@example.com', '+966 500111000', NULL, 'monday', 1, '2026-09-29 21:47:11', '2026-09-29 21:47:11', '2026-09-29 21:47:11')