diff options
| author | Vo Minh Thu <vmt@openerp.com> | 2012-06-01 17:34:49 +0200 |
|---|---|---|
| committer | Vo Minh Thu <vmt@openerp.com> | 2012-06-01 17:34:49 +0200 |
| commit | eadd5e0a0a6aa8babfbedce91f28f9701c2812ea (patch) | |
| tree | 7690176f14b54b3383345a992ca93d1cb4ae11e1 /openerp/addons/base/base.sql | |
| parent | d790650bfb703ba30a7abde8d4d3d111034fbbb5 (diff) | |
[IMP] uninstall: use a dedicated table for many2many relationships instead of overlaoding ir.model.data.
bzr revid: vmt@openerp.com-20120601153449-uj2sl7qjzz3s7xnj
Diffstat (limited to 'openerp/addons/base/base.sql')
| -rw-r--r-- | openerp/addons/base/base.sql | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/openerp/addons/base/base.sql b/openerp/addons/base/base.sql index a227007353c..0a8f50c24bf 100644 --- a/openerp/addons/base/base.sql +++ b/openerp/addons/base/base.sql @@ -347,9 +347,8 @@ CREATE TABLE ir_model_data ( res_id integer, primary key(id) ); --- Records foreign keys and constraints --- installed by a module (so they can be removed them when the module is --- uninstalled).: +-- Records foreign keys and constraints installed by a module (so they can be +-- removed them when the module is uninstalled): -- - for a foreign key: type 'f', -- - for a constraint: type 'u'. CREATE TABLE ir_model_constraint ( @@ -366,6 +365,21 @@ CREATE TABLE ir_model_constraint ( name character varying(128) NOT NULL ); +-- Records relation tables (i.e. implementing many2many) installed by a module +-- (so they can be removed them when the module is uninstalled). +CREATE TABLE ir_model_relation ( + id serial NOT NULL, + create_uid integer, + create_date timestamp without time zone, + write_date timestamp without time zone, + write_uid integer, + date_init timestamp without time zone, + date_update timestamp without time zone, + module integer NOT NULL references ir_module_module on delete restrict, + model integer NOT NULL references ir_model on delete restrict, + name character varying(128) NOT NULL +); + --------------------------------- -- Users --------------------------------- |
