You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Forceres You can use unique constraints in the on_conflict target argument as described here, but you need to add unique=True to each separate column in the table definition. The issue with adding a composite unique constraint to multiple columns at once will be resolved by this PR. For now, the workaround is to use raw sql (in migrations or script) to add a composite unique constraint, as described here.
@Forceres You can use unique constraints in the on_conflict target argument as described here, but you need to add unique=True to each separate column in the table definition. The issue with adding a composite unique constraint to multiple columns at once will be resolved by this PR. For now, the workaround is to use raw sql (in migrations or script) to add a composite unique constraint, as described here.
Yeah, made compound indexes via raw SQL (not a good approach)
Is here a way to create compound unique indexes and use them in insert.on_conflict(target=unique_constraint)?
The text was updated successfully, but these errors were encountered: