İçereği Atla
Menü
Bu soru işaretlendi
3 Cevaplar
40833 Görünümler

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
Vazgeç
En İyi Yanıt

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
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Mar 15
9939
0
Ara 24
9118
3
Eyl 24
21133
5
Ara 24
52261
4
Tem 24
10170