mirror of
https://github.com/discourse/discourse.git
synced 2025-02-06 11:28:18 +00:00
* FEATURE: Do not delete invite if link was copied * FIX: Show error to user if invite redeeming fails The error was only displayed to console. * UX: Better placement of bulk buttons Destroy all expired invites should be on the expired tab, not pending. * FIX: Ensure invited_groups is unique per invite and group * FIX: Do not refresh topic list if title unchanged * FIX: Do not close modal on enter This intereferes with the group and topic chooser. Wrapping everything in a form disables this behavior. * FIX: Move link and email options outside advanced section * FIX: Do not close modal if saving a link invite User may still want to copy the link.
16 lines
380 B
Ruby
16 lines
380 B
Ruby
# frozen_string_literal: true
|
|
|
|
class AddUniqueIndexToInvitedGroups < ActiveRecord::Migration[6.0]
|
|
def change
|
|
execute <<~SQL
|
|
DELETE FROM invited_groups a
|
|
USING invited_groups b
|
|
WHERE a.id < b.id
|
|
AND a.invite_id = b.invite_id
|
|
AND a.group_id = b.group_id
|
|
SQL
|
|
|
|
add_index :invited_groups, [:group_id, :invite_id], unique: true
|
|
end
|
|
end
|