mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-18 15:48:22 +00:00
Remove unused filtered_languages
column (#18533)
* Remove unused `filtered_languages` column Fixes #18522 * Fix tests
This commit is contained in:
parent
fbcbf7898f
commit
e34dd3644c
|
@ -26,7 +26,6 @@
|
|||
# otp_required_for_login :boolean default(FALSE), not null
|
||||
# last_emailed_at :datetime
|
||||
# otp_backup_codes :string is an Array
|
||||
# filtered_languages :string default([]), not null, is an Array
|
||||
# account_id :bigint(8) not null
|
||||
# disabled :boolean default(FALSE), not null
|
||||
# moderator :boolean default(FALSE), not null
|
||||
|
@ -48,6 +47,7 @@ class User < ApplicationRecord
|
|||
current_sign_in_ip
|
||||
last_sign_in_ip
|
||||
skip_sign_in_token
|
||||
filtered_languages
|
||||
)
|
||||
|
||||
include Settings::Extend
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class RemoveFilteredLanguagesFromUsers < ActiveRecord::Migration[6.1]
|
||||
disable_ddl_transaction!
|
||||
|
||||
def change
|
||||
safety_assured do
|
||||
remove_column :users, :filtered_languages, :string, array: true, default: [], null: false
|
||||
end
|
||||
end
|
||||
end
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 2022_04_29_101850) do
|
||||
ActiveRecord::Schema.define(version: 2022_05_27_114923) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
@ -983,7 +983,6 @@ ActiveRecord::Schema.define(version: 2022_04_29_101850) do
|
|||
t.boolean "otp_required_for_login", default: false, null: false
|
||||
t.datetime "last_emailed_at"
|
||||
t.string "otp_backup_codes", array: true
|
||||
t.string "filtered_languages", default: [], null: false, array: true
|
||||
t.bigint "account_id", null: false
|
||||
t.boolean "disabled", default: false, null: false
|
||||
t.boolean "moderator", default: false, null: false
|
||||
|
|
|
@ -3,7 +3,7 @@ require 'rails_helper'
|
|||
describe Settings::Preferences::OtherController do
|
||||
render_views
|
||||
|
||||
let(:user) { Fabricate(:user, filtered_languages: []) }
|
||||
let(:user) { Fabricate(:user, chosen_languages: []) }
|
||||
|
||||
before do
|
||||
sign_in user, scope: :user
|
||||
|
|
Loading…
Reference in a new issue