SeAT - forum: Integrity constraint violation errors on baremetal - Page 1

Clarynaa 4 Jan 2026 06:52
Hi there, I'm seeing this error many times as of today. Many jobs succeed however character contracts and character notifications seem to fail with similar errors (I dont have enough room on this post to post the errors for notifications). Data is anonymized. Any ideas how to fix?
 SQLSTATE: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`seat`.`character_contracts`, CONSTRAINT `character_contracts_character_id_foreign` FOREIGN KEY (`character_id`) REFERENCES `character_infos` (`character_id`) ON DELETE CASCADE ON UPDATE NO ACTION) (Connection: mysql, SQL: insert into `character_contracts` (`character_id`, `contract_id`, `updated_at`, `created_at`) values (######, #######, 2026-01-04 05:01:11, 2026-01-04 05:01:11)) {"exception":"[object] (Illuminate\\Database\\QueryException(code: 23000): SQLSTATE: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`seat`.`character_contracts`, CONSTRAINT `character_contracts_character_id_foreign` FOREIGN KEY (`character_id`) REFERENCES `character_infos` (`character_id`) ON DELETE CASCADE ON UPDATE NO ACTION) (Connection: mysql, SQL: insert into `character_contracts` (`character_id`, `contract_id`, `updated_at`, `created_at`) values (#######, ########, 2026-01-04 05:01:11, 2026-01-04 05:01:11)) at /var/www/seat/vendor/laravel/framework/src/Illuminate/Database/Connection.php:829) 
Integrity constraint violation errors on baremetal
FremontDango 4 Jan 2026 08:13
tbh it might be bad idea to enforce foreign key because the ingestion of the data is not ordered