New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[10.0] missing foreign keys #18880
Comments
Could we have a review on this. I made additionnal tests and comparison on the same machine
I tested with a odoo v9 to create a fresh DB and there was FK in the tables.
yet no FK in the tables. The behaviour is not the same as the v9. Is there any kind of deferred operations in transactions? |
$ psql --version
psql (PostgreSQL) 9.6.3
$ python2 -c "import psycopg2; print psycopg2.__version__"
2.7.3 (dt dec pq3 ext lo64)
10c=# \d ir_ui_view
Table "public.ir_ui_view"
Column | Type | Modifiers
---------------+-----------------------------+---------------------------------------------------------
id | integer | not null default nextval('ir_ui_view_id_seq'::regclass)
create_date | timestamp without time zone |
write_date | timestamp without time zone |
write_uid | integer |
field_parent | character varying |
inherit_id | integer |
model_data_id | integer |
priority | integer | not null
type | character varying |
arch_db | text |
create_uid | integer |
key | character varying |
active | boolean |
arch_fs | character varying |
name | character varying | not null
mode | character varying | not null
model | character varying |
Indexes:
"ir_ui_view_pkey" PRIMARY KEY, btree (id)
"ir_ui_view_inherit_id_index" btree (inherit_id)
"ir_ui_view_model_index" btree (model)
"ir_ui_view_model_type_inherit_id" btree (model, inherit_id)
Check constraints:
"ir_ui_view_inheritance_mode" CHECK (mode::text <> 'extension'::text OR inherit_id IS NOT NULL)
Foreign-key constraints:
"ir_ui_view_create_uid_fkey" FOREIGN KEY (create_uid) REFERENCES res_users(id) ON DELETE SET NULL
"ir_ui_view_inherit_id_fkey" FOREIGN KEY (inherit_id) REFERENCES ir_ui_view(id) ON DELETE RESTRICT
"ir_ui_view_model_data_id_fkey" FOREIGN KEY (model_data_id) REFERENCES ir_model_data(id) ON DELETE SET NULL
"ir_ui_view_write_uid_fkey" FOREIGN KEY (write_uid) REFERENCES res_users(id) ON DELETE SET NULL
Referenced by:
.... Sorry but I have foreign key on all my databases. |
I also checked my "older version" of db created in v10 and I have some with foreign keys in it. |
@mart-e , you're right, I'm suspecting additionnal repos and let you know |
Hi @mart-e , this one was tricky but really don't seems to be an Odoo core one but a conflict with an OCA repos |
Thank you for the update, don't worry, we have not removed the foreign key 😉 |
Impacted versions:
Latest git pulled on the community edition
Steps to reproduce:
create a fresh deb
Current behavior:
in the tables (ir_ui_view) no more foreign key is referenced for inherit_id
Expected behavior:
Foreign keys to be kept
The text was updated successfully, but these errors were encountered: