SOLVED problem after restore: there is no primary key for referenced table "res_users"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
Incomplete
|
Low
|
OpenERP's Framework R&D |
Bug Description
Hi, my installation: Ubu 10.4, pg 8.4 openerp 6.0.3 updated from launchpad.
I usually use auto_backup but I try also with save DB in GTK menu (for daily backup).
I try a restore (with u all after restore) on other server (ubu 10.4, pg 8.4, openerp 6.0.3 updated with same module in addons folder) I'm able to log in and use it but if I try all new module installation this is my error:
ProgrammingError: there is no primary key for referenced table "res_users"
I try also reindex from psql original DB, "backup-
This problem occurs 4 times for me, till now I correct restoring an old DB or delete if is a testing db, but I open this bug because I wont' figure if I can restore DB in production environment...
Thanks, if other information are request, please ask, I do much test operations :)
all server log:
Environment Information :
System : Linux-2.
OS Name : posix
Distributor ID: Ubuntu
Description: Ubuntu 11.04
Release: 11.04
Codename: natty
Operating System Release : 2.6.38-12-generic
Operating System Version : #51-Ubuntu SMP Wed Sep 28 14:27:32 UTC 2011
Operating System Architecture : 64bit
Operating System Locale : it_IT.UTF8
Python Version : 2.7.1+
OpenERP-Client Version : 6.0.3
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
File "/home/
result = ExportService.
File "/home/
res = fn(db, uid, *params)
File "/home/
return f(self, dbname, *args, **kwargs)
File "/home/
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/
return getattr(object, method)(cr, uid, *args, **kw)
File "/home/
_db, pool = pooler.
File "/home/
return get_db_
File "/home/
addons.
File "/home/
processed_
File "/home/
init_
File "/home/
result = obj._auto_init(cr, {'module': module_name})
File "/home/
cr.
File "/home/
return f(self, *args, **kwargs)
File "/home/
res = self._obj.
ProgrammingError: there is no primary key for referenced table "res_users"
summary: |
- problem after restore: there is no primary key for referenced table - "res_users" + SOLVED problem after restore: there is no primary key for referenced + table "res_users" |
for workaroud I try via psql in restored DB:
ALTER TABLE res_user ADD PRIMARY KEY (id);
I see that the primary key is back but this procedure I'll need to do for all the tables that I find without.
what's going wrong in my backup procedure, is better use pg_dump / pg_restore?
Thanks