Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e8cd2f6e
Commit
e8cd2f6e
authored
Aug 24, 2020
by
Adam Hegyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove users.bio column
parent
1b66190c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
46 additions
and
3 deletions
+46
-3
changelogs/unreleased/226989-remove-users-bio-column.yml
changelogs/unreleased/226989-remove-users-bio-column.yml
+5
-0
db/post_migrate/20200824130028_remove_index_on_users_bio.rb
db/post_migrate/20200824130028_remove_index_on_users_bio.rb
+20
-0
db/post_migrate/20200824130447_remove_users_bio_column.rb
db/post_migrate/20200824130447_remove_users_bio_column.rb
+19
-0
db/schema_migrations/20200824130028
db/schema_migrations/20200824130028
+1
-0
db/schema_migrations/20200824130447
db/schema_migrations/20200824130447
+1
-0
db/structure.sql
db/structure.sql
+0
-3
No files found.
changelogs/unreleased/226989-remove-users-bio-column.yml
0 → 100644
View file @
e8cd2f6e
---
title
:
Remove unused users.bio database column
merge_request
:
40269
author
:
type
:
other
db/post_migrate/20200824130028_remove_index_on_users_bio.rb
0 → 100644
View file @
e8cd2f6e
# frozen_string_literal: true
class
RemoveIndexOnUsersBio
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
BACKGROUND_MIGRATION_CLASS
=
'MigrateUsersBioToUserDetails'
INDEX_NAME
=
'tmp_idx_on_user_id_where_bio_is_filled'
disable_ddl_transaction!
def
up
Gitlab
::
BackgroundMigration
.
steal
(
BACKGROUND_MIGRATION_CLASS
)
remove_concurrent_index_by_name
(
:users
,
INDEX_NAME
)
end
def
down
add_concurrent_index
:users
,
:id
,
where:
"(COALESCE(bio, '') IS DISTINCT FROM '')"
,
name:
INDEX_NAME
end
end
db/post_migrate/20200824130447_remove_users_bio_column.rb
0 → 100644
View file @
e8cd2f6e
# frozen_string_literal: true
class
RemoveUsersBioColumn
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
def
up
with_lock_retries
do
remove_column
:users
,
:bio
end
end
def
down
with_lock_retries
do
add_column
:users
,
:bio
,
:string
# rubocop: disable Migration/AddColumnsToWideTables
end
end
end
db/schema_migrations/20200824130028
0 → 100644
View file @
e8cd2f6e
891f1660592c4443aeced7594cea391066cc79b54b40c67a8c973eb6959bf6f1
\ No newline at end of file
db/schema_migrations/20200824130447
0 → 100644
View file @
e8cd2f6e
e6dcd20fe77c443999aa2373e0acdd77eb68c3a6f0d6d65e86b7f85ac97ddb9a
\ No newline at end of file
db/structure.sql
View file @
e8cd2f6e
...
...
@@ -16114,7 +16114,6 @@ CREATE TABLE public.users (
skype
character
varying
DEFAULT
''
::
character
varying
NOT
NULL
,
linkedin
character
varying
DEFAULT
''
::
character
varying
NOT
NULL
,
twitter
character
varying
DEFAULT
''
::
character
varying
NOT
NULL
,
bio
character
varying
,
failed_attempts
integer
DEFAULT
0
,
locked_at
timestamp
without
time
zone
,
username
character
varying
,
...
...
@@ -21115,8 +21114,6 @@ CREATE INDEX terraform_states_verification_failure_partial ON public.terraform_s
CREATE
INDEX
tmp_build_stage_position_index
ON
public
.
ci_builds
USING
btree
(
stage_id
,
stage_idx
)
WHERE
(
stage_idx
IS
NOT
NULL
);
CREATE
INDEX
tmp_idx_on_user_id_where_bio_is_filled
ON
public
.
users
USING
btree
(
id
)
WHERE
((
COALESCE
(
bio
,
''
::
character
varying
))::
text
IS
DISTINCT
FROM
''
::
text
);
CREATE
INDEX
tmp_index_for_email_unconfirmation_migration
ON
public
.
emails
USING
btree
(
id
)
WHERE
(
confirmed_at
IS
NOT
NULL
);
CREATE
UNIQUE
INDEX
unique_merge_request_metrics_by_merge_request_id
ON
public
.
merge_request_metrics
USING
btree
(
merge_request_id
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment