Files
InvoiceShelf/database
Darko Gjorgjijoski a2aa74aa8a fix(migrations): align ai_conversations company_id/user_id with INT pk (#683)
Follow-up to #618. The ai_conversations table (added after #618) used
foreignId() (BIGINT) for company_id/user_id, which mismatches the INT
UNSIGNED users.id / companies.id and breaks MySQL FK creation (error 3780)
on the v2->v3 upgrade. Use plain unsignedInteger, matching the codebase's
no-DB-FK convention for these columns. conversation_id stays foreignId — it
references the BIGINT ai_conversations.id and its delete cascade is intentional
(and covered by AiChatFlowTest).
2026-06-12 15:19:21 +02:00
..
2019-11-11 12:16:00 +05:30