Commit 13298e6d authored by Mikołaj Wawrzyniak's avatar Mikołaj Wawrzyniak

Merge branch 'remove-bio-html-column-from-user-details-table' into 'master'

Remove bio_html and cached_markdown_version from user_details

See merge request gitlab-org/gitlab!71663
parents 39f1497c c045bb54
......@@ -4,7 +4,7 @@ class UserDetail < ApplicationRecord
extend ::Gitlab::Utils::Override
include IgnorableColumns
ignore_columns %i[bio_html cached_markdown_version], remove_with: '13.6', remove_after: '2021-10-22'
ignore_columns %i[bio_html cached_markdown_version], remove_with: '14.5', remove_after: '2021-10-22'
REGISTRATION_OBJECTIVE_PAIRS = { basics: 0, move_repository: 1, code_storage: 2, exploring: 3, ci: 4, other: 5, joining_team: 6 }.freeze
......
# frozen_string_literal: true
class RemoveBioHtmlFromUserDetails < Gitlab::Database::Migration[1.0]
enable_lock_retries!
def change
remove_column :user_details, :bio_html, :text, null: true
remove_column :user_details, :cached_markdown_version, :integer, null: true
end
end
88f8e8391a480450a3d76d98f089e1e2287048007d0ecdcbd0799c9cc021481f
\ No newline at end of file
......@@ -19845,8 +19845,6 @@ CREATE TABLE user_details (
user_id bigint NOT NULL,
job_title character varying(200) DEFAULT ''::character varying NOT NULL,
bio character varying(255) DEFAULT ''::character varying NOT NULL,
bio_html text,
cached_markdown_version integer,
webauthn_xid text,
other_role text,
provisioned_by_group_id bigint,
......@@ -5,7 +5,6 @@ module API
class User < UserBasic
include UsersHelper
include TimeZoneHelper
include ActionView::Helpers::SanitizeHelper
expose :created_at, if: ->(user, opts) { Ability.allowed?(opts[:current_user], :read_user_profile, user) }
expose :bio, :location, :public_email, :skype, :linkedin, :twitter, :website_url, :organization, :job_title, :pronouns
......@@ -19,13 +18,6 @@ module API
expose :following, if: ->(user, opts) { Ability.allowed?(opts[:current_user], :read_user_profile, user) } do |user|
user.followees.size
end
# This is only for multi version compatibility reasons, as we removed user.bio_html
# to be removed in 14.4
expose :bio_html do |user|
strip_tags(user.bio)
end
expose :local_time do |user|
local_time(user.timezone)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment