xTuple.com xTupleU Blog & News Customer Support

Bug in 4.11.2 api.vendor?

I’m doing a full data migration from QuickBooks Enterprise to PostBooks. Whether importing using the CSVImport or using my other tools, the error result is the same…

ERROR Record 1: ERROR: insert or update on table “vendinfo” violates foreign key constraint “vendinfo_vend_accnt_id_fkey”
DETAIL: Key (vend_accnt_id)=(-1) is not present in table “accnt”.
(23503) QPSQL: Unable to create query

However, the same file/data imports fine in 4.11.1 and for my migration project I’ll revert back to that release and then see what happens if I rev to 4.11.2 after finishing the import/migration. I compared api.vendor between 4.11.1 and 4.11.2 and it looks like xTuple made some peculiar revisions on the INSERT rule. Before importing vendors, has something changed and do I need to pre-populate some other tables first?

We have been tightening up and improving the database schema which means removing the use of ‘-1’ and adding foreign keys to several tables. The error you are hitting looks like a new foreign key added. The INSERT rule should have been updated to also reflect this change.

Please consider adding a bug issue so the team can look into the problem and find an appropriate solution. This will likely be a database fix so can be retroactively applied to the version being used.

I will go ahead and do that. Thank you.