mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-07-16 13:55:21 +00:00
Laravel foreignId() creates BIGINT UNSIGNED columns, but users.id and companies.id use increments() (INT UNSIGNED). MySQL 8 rejects foreign keys when referencing and referenced column types differ (error 3780). Use unsignedInteger for impersonation_logs admin_id/user_id and for company_invitations company_id, user_id, and invited_by. Keep foreignId for role_id since roles.id is bigIncrements. This fixes upgrades from v2 on MySQL when running v3.0 migrations. Made-with: Cursor