FEATURE: Make experimental hashtag autocomplete default for new sites (#19681)

This feature is stable enough now to make it the default going forward
for new sites. Existing sites that have not yet set enable_experimental_hashtag_autocomplete
to `true` will have it set to `false` for their site settings, which was the old default.

c.f https://meta.discourse.org/t/hashtags-are-getting-a-makeover/248866
This commit is contained in:
Martin Brennan
2023-01-05 08:44:58 +10:00
committed by GitHub
parent 16b9165630
commit c2013865d7
3 changed files with 20 additions and 2 deletions

View File

@@ -0,0 +1,15 @@
# frozen_string_literal: true
class MakeExperimentalHashtagFeatureDefaultForNewSites < ActiveRecord::Migration[7.0]
def up
execute(<<~SQL)
INSERT INTO site_settings (name, data_type, value, created_at, updated_at)
VALUES ('enable_experimental_hashtag_autocomplete', 5, 'f', now(), now())
ON CONFLICT DO NOTHING
SQL
end
def down
raise ActiveRecord::IrreversibleMigration
end
end