Skip to content

Remove room index option for winners#17

Merged
getBoolean merged 1 commit into
prodfrom
master
May 31, 2026
Merged

Remove room index option for winners#17
getBoolean merged 1 commit into
prodfrom
master

Conversation

@getBoolean
Copy link
Copy Markdown
Owner

No description provided.

@getBoolean getBoolean enabled auto-merge May 31, 2026 05:20
@getBoolean getBoolean merged commit 3f9827e into prod May 31, 2026
5 checks passed
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5a2c4cdb7b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@@ -0,0 +1,3 @@
DROP INDEX `event_winner_event_id_room_index_user_id_unique`;--> statement-breakpoint
CREATE UNIQUE INDEX `event_winner_event_id_user_id_unique` ON `event_winner` (`event_id`,`user_id`);--> statement-breakpoint
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Deduplicate winners before adding unique index

This migration fails on any existing database where the same user was declared a winner for multiple rooms in the same event, which the previous (event_id, room_index, user_id) unique constraint explicitly allowed. When such rows exist, CREATE UNIQUE INDEX ... (event_id, user_id) raises a uniqueness error before room_index is dropped, so the bot cannot migrate/start for those guilds; add a data-migration step to collapse or delete duplicates before creating the new unique index.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant