diff --git a/app/models/account.rb b/app/models/account.rb index 9f5d2422d7..8164df116a 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -51,7 +51,7 @@ # reviewed_at :datetime # requested_review_at :datetime # group_allow_private_message :boolean -# searchability :integer default(0), not null +# searchability :integer default("private"), not null # class Account < ApplicationRecord diff --git a/db/migrate/20230405121625_add_searchability_to_accounts.rb b/db/migrate/20230405121625_add_searchability_to_accounts.rb index 9af68545e3..758d052993 100644 --- a/db/migrate/20230405121625_add_searchability_to_accounts.rb +++ b/db/migrate/20230405121625_add_searchability_to_accounts.rb @@ -1,5 +1,5 @@ class AddSearchabilityToAccounts < ActiveRecord::Migration[6.1] def change - add_column :accounts, :searchability, :integer, null: false, default: 3 + add_column :accounts, :searchability, :integer, null: false, default: 0 end end diff --git a/db/migrate/20230406041523_change_searchability_default_value.rb b/db/migrate/20230406041523_change_searchability_default_value.rb new file mode 100644 index 0000000000..b3ca38387c --- /dev/null +++ b/db/migrate/20230406041523_change_searchability_default_value.rb @@ -0,0 +1,5 @@ +class ChangeSearchabilityDefaultValue < ActiveRecord::Migration[6.1] + def change + change_column_default :accounts, :searchability, from: 0, to: 2 + end +end diff --git a/db/schema.rb b/db/schema.rb index ad81bd6a00..57541246c3 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2023_04_05_121625) do +ActiveRecord::Schema.define(version: 2023_04_06_041523) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -188,7 +188,7 @@ ActiveRecord::Schema.define(version: 2023_04_05_121625) do t.datetime "reviewed_at" t.datetime "requested_review_at" t.boolean "group_allow_private_message" - t.integer "searchability", default: 0, null: false + t.integer "searchability", default: 2, null: false t.index "(((setweight(to_tsvector('simple'::regconfig, (display_name)::text), 'A'::\"char\") || setweight(to_tsvector('simple'::regconfig, (username)::text), 'B'::\"char\")) || setweight(to_tsvector('simple'::regconfig, (COALESCE(domain, ''::character varying))::text), 'C'::\"char\")))", name: "search_index", using: :gin t.index "lower((username)::text), COALESCE(lower((domain)::text), ''::text)", name: "index_accounts_on_username_and_domain_lower", unique: true t.index ["moved_to_account_id"], name: "index_accounts_on_moved_to_account_id", where: "(moved_to_account_id IS NOT NULL)"