Chaban33
Chaban33

Reputation: 1382

Override SQL constraint

res.currency.rate has this original constraint

CONSTRAINT res_currency_rate_currency_uniq UNIQUE (name)

can I override it somehow to make it a unique name for each currency and not unique name per all table

Upvotes: 4

Views: 1205

Answers (1)

Akshay
Akshay

Reputation: 649

Use this:

 _sql_constraints = [('res_currency_uni1ue', 'CHECK(1=1)', 'This is unique!')]

Upvotes: 3

Related Questions