Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
3 Respostas
41202 Visualizações

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
Cancelar
Melhor resposta

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
2
mar. 15
10192
0
dez. 24
9425
3
set. 24
21536
5
dez. 24
52831
4
jul. 24
10511