Skip to Content
Menu
This question has been flagged
3 Replies
41172 Rodiniai

I want to remove _sql_constraints (database level).

For example in account_invoice.py there is a constraints on number field. Now I want to remove it.

Can anyone have idea how to deal with this?

Thank you.

Portretas
Atmesti
Best Answer

you could remove it using psql command. for example if you have the following constraint

_sql_constraints = [
('phone_company_unique', 'unique(type,phone)', 'The phone unique among companies!')
]

you could use:

ALTER TABLE res_partner DROP CONSTRAINT res_company_phone_company_unique;

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
2
kov. 15
10172
0
gruod. 24
9401
3
rugs. 24
21490
5
gruod. 24
52793
4
liep. 24
10461