Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Corrupted Database V7 Frantically panicking :O

on 8/10/16, 6:24 AM 155 views

I'm in a right pickle! Following a Base upgrade.

Following a base upgrade - database has been corrupted, then to make things worse, the database backups have been missed

Anyone any ideas where to go,

Where to start?

Is their a tool to check your db?

Know anyone!

IntegrityError: insert or update on table "wkf_workitem" violates foreign key constraint "wkf_workitem_inst_id_fkey"
DETAIL:  Key (inst_id)=(11789) is not present in table "wkf_instance".

Many thank Pawan - I think your spot on.

It appears 100s of records have been lost.

We have decided to bite the bullet and re-enter a lot of data into our last backup :( A lot of midnight oil for me :(

on 8/10/16, 12:42 PM

thats nice.. atleast you got u save some of ur data!! your "midnight oil" got worth ;)

on 8/11/16, 12:55 PM


| 4 3 5
Hyderabad, India

On 8/10/16, 8:26 AM

suppose "inst_id" is primary key in XYZ table.

what has happend is, the records from your XYZ table( whose foriegn key is "inst_id") has been deleted which is leading to inconsistency of data, 
For the easyness you can go with new DB, but as u want to stick with current ,so 2 possible things what u can do is:

1) create records with the id showing in error (in this case 11789) in table XYZ

2) delete the records where inst_id is the id showing in error(in this case 11789) using "delete from wkf_instance where inst_id = 11789"

This issue will keep on coming until u remove all the inconsistent data

Hope this help!!

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 8/10/16, 6:24 AM
Seen: 155 times
Last updated: 8/10/16, 12:42 PM