Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
3 Antworten
41255 Ansichten

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.

Avatar
Verwerfen
Beste Antwort

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;

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
2
März 15
10239
0
Dez. 24
9461
3
Sept. 24
21614
5
Dez. 24
52918
4
Juli 24
10572