Custom unique index

I used unique().on() before but now i need custom constraints generating sql similar like:
CREATE UNIQUE INDEX unique_combination ON linked_items (
LEAST(column1, column2),
GREATEST(column2, column1)
)
CREATE UNIQUE INDEX unique_combination ON linked_items (
LEAST(column1, column2),
GREATEST(column2, column1)
)
can i do this in the schema? would rather not edit the generated sql file
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?