mirror of
https://github.com/discourse/discourse.git
synced 2026-08-07 13:19:19 +08:00
A handful of old migrations unconditionally inserted site_settings or groups rows that fresh installs already get from YAML defaults or seed fixtures. This change gates each on `Migration::Helpers.new_site?` (or drops the redundant insert entirely) so a fresh `db:migrate` leaves no application-level rows behind: - `add_revoked_at_to_api_key.rb` no longer inserts `api_key_last_used_epoch`; `db/fixtures/990_settings.rb` now seeds it via `SiteSetting.api_key_last_used_epoch ||= Time.now`. - `fill_personal_message_enabled_groups_based_on_deprecated_settings.rb` is gated; fresh installs use the YAML default. - `ensure_anonymous_and_logged_in_users_auto_groups.rb` drops the `INSERT INTO groups (4, 5, ...)` block — `Group.ensure_automatic_groups!` in `db/fixtures/002_groups.rb` creates them. The legacy-group rename portion still runs unconditionally (no-op on fresh installs anyway). - chat `add_threads_enabled_site_setting.rb` is gated and the unconditional `SiteSetting.chat_threads_enabled = false` is replaced with a raw `INSERT ... ON CONFLICT DO NOTHING` per the migration skill. - discourse-assign `set_assign_allowed_on_groups_default.rb` is gated; the YAML `default` is bumped from `""` to `"3"` (`Group::AUTO_GROUPS[:staff]`) so fresh installs match what the migration would have written. Extracted from https://github.com/discourse/discourse/pull/39788.
57 lines
1.3 KiB
YAML
Vendored
57 lines
1.3 KiB
YAML
Vendored
discourse_assign:
|
|
assign_enabled:
|
|
default: false
|
|
client: true
|
|
assigns_by_staff_mention: false
|
|
unassign_creates_tracking_post: true
|
|
assigns_public:
|
|
default: false
|
|
client: true
|
|
assign_self_regex: ""
|
|
assign_other_regex: ""
|
|
unassign_on_close: false
|
|
unassign_on_group_archive: false
|
|
reassign_on_open: false
|
|
invite_on_assign: false
|
|
assigns_user_url_path:
|
|
client: true
|
|
default: "/u/{username}/activity/assigned"
|
|
assign_mailer:
|
|
default: "never"
|
|
enum: "AssignMailerSiteSettings"
|
|
remind_assigns_frequency:
|
|
client: true
|
|
enum: "RemindAssignsFrequencySiteSettings"
|
|
default: 0
|
|
pending_assign_reminder_threshold:
|
|
client: true
|
|
default: 2
|
|
min: 1
|
|
max_assigned_topics:
|
|
client: true
|
|
default: 10
|
|
min: 1
|
|
assign_allowed_on_groups:
|
|
client: true
|
|
type: group_list
|
|
list_type: compact
|
|
default: "3"
|
|
allow_any: false
|
|
refresh: true
|
|
enable_assign_status:
|
|
default: false
|
|
client: true
|
|
assign_statuses:
|
|
client: true
|
|
type: list
|
|
default: "New|In Progress|Done"
|
|
allow_any: true
|
|
validator: AssignStatusesValidator
|
|
ignore_solved_topics_in_assigned_reminder:
|
|
default: false
|
|
assignment_status_on_solve:
|
|
type: string
|
|
default: ""
|
|
assignment_status_on_unsolve:
|
|
type: string
|
|
default: ""
|