Skip to content

Commit

Permalink
[O] Fix crash due to duplicate keys in maimai2_user_item
Browse files Browse the repository at this point in the history
  • Loading branch information
hykilpikonna committed Feb 10, 2024
1 parent bb39027 commit 126546a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Fixes crashes due to duplicate keys in maimai2_user_item
alter table maimai2_user_item
add constraint maimai2_user_item_pk
unique (item_kind, item_id, user_id);
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Fixes crashes due to duplicate keys in maimai2_user_item
alter table maimai2_user_item
add constraint maimai2_user_item_pk
unique (item_kind, item_id, user_id);
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE UNIQUE INDEX maimai2_user_item_pk ON maimai2_user_item(item_kind, item_id, user_id);

0 comments on commit 126546a

Please sign in to comment.