Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
3 Replies
41728 Tampilan

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
Buang
Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
2
Mar 15
10622
1
Agu 25
4901
0
Des 24
9913
3
Sep 24
22239
5
Des 24
53789