New constraint on ir_model_data causes errors
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
Fix Released
|
High
|
Anup(SerpentCS) |
Bug Description
The new constraint in base: unique (name,module) on ir_model_data causes the following error when performing an update on an allready existing database:
[2009-06-30 15:10:07,681] INFO:init:module base: creating or updating database tables
[2009-06-30 15:10:08,464] DEBUG:sql:bad query: alter table "ir_model_data" add constraint "ir_model_
[2009-06-30 15:10:08,465] DEBUG:sql:[01]: index "ir_model_
[2009-06-30 15:10:08,465] DEBUG:sql:[02]: DETAIL: De tabel bevat gedupliceerde waarden.
[2009-06-30 15:10:08,465] WARNING:orm:[01]: unable to add 'unique(name, module)' constraint on table ir_model_data !
[2009-06-30 15:10:08,465] WARNING:orm:[02]: If you want to have it, you should update the records and execute manually:
[2009-06-30 15:10:08,465] WARNING:orm:[03]: ALTER table ir_model_data ADD CONSTRAINT ir_model_
I have the following (name,module) combinations that are not unique! Checked a few databases and it always applies...
-------
field_
field_
field_
field_
field_
field_
field_
field_
field_
Question 1: Is the new constraint a valid one?
Question 2: If yes, how to fix the error condition?
Related branches
Changed in openobject-server: | |
status: | New → Confirmed |
Changed in openobject-server: | |
importance: | Undecided → High |
Changed in openobject-server: | |
assignee: | nobody → Anup (Open ERP) (ach-openerp) |
status: | Confirmed → In Progress |
When creating a new database, I see the same logs:
[2009-06-30 15:31:02,457] DEBUG:orm:creating new column translate of table ir_model_fields data_module_ name_uniq" unique(name, module) data_module_ name_uniq" kon niet worden aangemaakt data_module_ name_uniq unique(name, module)
[2009-06-30 15:31:02,720] DEBUG:sql:bad query: alter table "ir_model_data" add constraint "ir_model_
[2009-06-30 15:31:02,720] DEBUG:sql:[01]: index "ir_model_
[2009-06-30 15:31:02,721] DEBUG:sql:[02]: DETAIL: De tabel bevat gedupliceerde waarden.
[2009-06-30 15:31:02,721] WARNING:orm:[01]: unable to add 'unique(name, module)' constraint on table ir_model_data !
[2009-06-30 15:31:02,721] WARNING:orm:[02]: If you want to have it, you should update the records and execute manually:
[2009-06-30 15:31:02,721] WARNING:orm:[03]: ALTER table ir_model_data ADD CONSTRAINT ir_model_