© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•3y ago•
4 replies
eatmoose

bug: three column unique index no change never detected

ex:
  uniqueReactPerPost: unique('post_id_reaction_user_id').on(
      postId,
      reaction,
      reactorId,
    ),
  uniqueReactPerPost: unique('post_id_reaction_user_id').on(
      postId,
      reaction,
      reactorId,
    ),

the above index will be ran, but if you run it again, it'll prompt you to truncate the table, and if you chose not to, it'll run sucessfully but will drop -> then recreates.

orm latest,
pg 15
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Upsert with multi-column unique index?
Drizzle TeamDTDrizzle Team / help
3y ago
Set unique index length
Drizzle TeamDTDrizzle Team / help
3y ago
Index column sort
Drizzle TeamDTDrizzle Team / help
2y ago
Generated Column Unique Constraint
Drizzle TeamDTDrizzle Team / help
10mo ago