Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
3 Odpowiedzi
41821 Widoki

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.

Awatar
Odrzuć
Najlepsza odpowiedź

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;

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
mar 15
10704
1
sie 25
4977
0
gru 24
9981
3
wrz 24
22340
5
gru 24
53937