[Bucardo-general] Tables with no primary key.

Periko Support pheriko.support at gmail.com
Mon Oct 24 17:20:49 UTC 2016


No plans for this year to upgrade to Odoo8, but I will add those key,
thanks Greg.

On Fri, Oct 21, 2016 at 8:15 PM, Greg Sabino Mullane <greg at endpoint.com> wrote:
> On Fri, Oct 21, 2016 at 11:29:22AM -0700, Periko Support wrote:
>> In odoo 7 db, we have this tables without pkey:
>>
>> public.ir_model_relation
>> public.wkf_witm_trans
> ...
>> I ask to our developers if we can add pkey to those tables, but they
>> didn't want to touch them because they are odoo internal tables.
>>
>> Someone in the past with this issue?
>>
>> I want to add pkey but don't know if this will affect odoo operation,
>> those tables are empty.
>
> It should be fine to add a primary key and a unique index to those tables,
> as more recent versions of Odoo already contain them. Here are the
> definitions:
>
> ALTER TABLE ir_model_relation
>     ADD CONSTRAINT ir_model_relation_pkey PRIMARY KEY (id);
>
> ALTER TABLE wkf_witm_trans
>     ADD CONSTRAINT wkf_witm_trans_inst_id_trans_id_key UNIQUE (inst_id, trans_id);
>
> Upgrading to Odoo 8 will also provide those changes, although that may
> be a little more involved than running those two statemnts. :)
>
> --
> Greg Sabino Mullane greg at endpoint.com
> End Point Corporation
> PGP Key: 2529 DF6A B8F7 9407 E944  45B4 BC9B 9067 1496 4AC8


More information about the Bucardo-general mailing list