Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
3 Odpovědi
41874 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
bře 15
10770
1
srp 25
5034
0
pro 24
10014
3
zář 24
22375
5
pro 24
54035