Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove _sql_constraints

I want to remove _sql_constraints.

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 it?

Thank you.

like image 480
Sudhir Arya Avatar asked Mar 11 '13 09:03

Sudhir Arya


1 Answers

You can remove your constraint using following query.

SELECT *
FROM information_schema.constraint_table_usage
WHERE table_name = 'account_invoice';

ALTER TABLE account_invoice DROP CONSTRAINT account_invoice_number_uniq;
like image 177
user1576199 Avatar answered Sep 21 '22 11:09

user1576199