mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-07-16 22:05:20 +00:00
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).