discourse/db/fixtures/003_flags.rb
Krzysztof Kotlarek 4b1e017722
FIX: move something else flag to the bottom (#27366)
The mistake was made when flags were moved to the database. The `notify_moderators` (something else) flag should be the last position on the list.

This commit contains 3 changes:
- update fixtures order;
- remove position and enable from fixtures (they can be overridden by admin and we don't want seed to restore them);
- migration to fix data if the order was not changed by admin.
2024-06-06 15:45:30 +10:00

60 lines
1.2 KiB
Ruby

# frozen_string_literal: true
Flag.seed do |s|
s.id = 6
s.name = "notify_user"
s.notify_type = false
s.auto_action_type = false
s.custom_type = true
s.applies_to = %w[Post Chat::Message]
end
Flag.seed do |s|
s.id = 3
s.name = "off_topic"
s.notify_type = true
s.auto_action_type = true
s.custom_type = false
s.applies_to = %w[Post Chat::Message]
end
Flag.seed do |s|
s.id = 4
s.name = "inappropriate"
s.notify_type = true
s.auto_action_type = true
s.custom_type = false
s.applies_to = %w[Post Topic Chat::Message]
end
Flag.seed do |s|
s.id = 8
s.name = "spam"
s.notify_type = true
s.auto_action_type = true
s.custom_type = false
s.applies_to = %w[Post Topic Chat::Message]
end
Flag.seed do |s|
s.id = 10
s.name = "illegal"
s.notify_type = true
s.auto_action_type = false
s.custom_type = true
s.applies_to = %w[Post Topic Chat::Message]
end
Flag.seed do |s|
s.id = 7
s.name = "notify_moderators"
s.notify_type = true
s.auto_action_type = false
s.custom_type = true
s.applies_to = %w[Post Topic Chat::Message]
end
Flag.unscoped.seed do |s|
s.id = 9
s.name = "needs_approval"
s.notify_type = false
s.auto_action_type = false
s.custom_type = false
s.score_type = true
s.applies_to = %w[]
end