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
62812393
Commit
62812393
authored
Jan 21, 2021
by
Tiger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add `namespaces` to wide tables
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/52153
parent
15953728
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
23 additions
and
22 deletions
+23
-22
db/migrate/20190225152525_add_auto_dev_ops_enabled_to_namespaces.rb
.../20190225152525_add_auto_dev_ops_enabled_to_namespaces.rb
+1
-1
db/migrate/20190606014128_add_last_ci_minutes_notification_at_to_namespaces.rb
...4128_add_last_ci_minutes_notification_at_to_namespaces.rb
+1
-1
db/migrate/20190621022810_add_last_ci_minutes_usage_notification_level_to_namespaces.rb
...last_ci_minutes_usage_notification_level_to_namespaces.rb
+1
-1
db/migrate/20190626175626_add_group_creation_level_to_namespaces.rb
.../20190626175626_add_group_creation_level_to_namespaces.rb
+1
-1
db/migrate/20190715215549_add_group_emails_disabled.rb
db/migrate/20190715215549_add_group_emails_disabled.rb
+1
-1
db/migrate/20190911115109_add_namespaces_max_pages_size.rb
db/migrate/20190911115109_add_namespaces_max_pages_size.rb
+1
-1
db/migrate/20190911115222_add_namespaces_max_artifacts_size.rb
...grate/20190911115222_add_namespaces_max_artifacts_size.rb
+1
-1
db/migrate/20191114132259_add_mentions_disabled_to_namespaces.rb
...ate/20191114132259_add_mentions_disabled_to_namespaces.rb
+1
-1
db/migrate/20200207062728_add_default_branch_protection_to_namespaces.rb
...0207062728_add_default_branch_protection_to_namespaces.rb
+1
-1
db/migrate/20200304124406_add_unlock_membership_to_ldap_of_groups.rb
...20200304124406_add_unlock_membership_to_ldap_of_groups.rb
+1
-1
db/migrate/20200323075043_add_max_personal_access_token_lifetime_to_namespaces.rb
...3_add_max_personal_access_token_lifetime_to_namespaces.rb
+1
-1
db/migrate/20200407120000_add_push_rule_id_to_groups.rb
db/migrate/20200407120000_add_push_rule_id_to_groups.rb
+1
-1
db/migrate/20200424102023_add_shared_runners_enabled_and_override_to_namespaces.rb
..._add_shared_runners_enabled_and_override_to_namespaces.rb
+2
-2
db/migrate/20200609012539_add_traversal_ids_to_namespaces.rb
db/migrate/20200609012539_add_traversal_ids_to_namespaces.rb
+1
-1
db/migrate/20200701190523_add_delayed_project_removal_to_namespaces.rb
...200701190523_add_delayed_project_removal_to_namespaces.rb
+1
-1
db/migrate/20210121093618_remove_repository_read_only_to_groups.rb
...e/20210121093618_remove_repository_read_only_to_groups.rb
+1
-1
db/post_migrate/20200408132152_remove_namespaces_trial_ends_on.rb
...migrate/20200408132152_remove_namespaces_trial_ends_on.rb
+1
-1
db/post_migrate/20200424043515_drop_namespaces_plan_id.rb
db/post_migrate/20200424043515_drop_namespaces_plan_id.rb
+1
-1
rubocop/migration_helpers.rb
rubocop/migration_helpers.rb
+4
-3
No files found.
db/migrate/20190225152525_add_auto_dev_ops_enabled_to_namespaces.rb
View file @
62812393
...
...
@@ -4,6 +4,6 @@ class AddAutoDevOpsEnabledToNamespaces < ActiveRecord::Migration[5.0]
DOWNTIME
=
false
def
change
add_column
:namespaces
,
:auto_devops_enabled
,
:boolean
add_column
:namespaces
,
:auto_devops_enabled
,
:boolean
# rubocop:disable Migration/AddColumnsToWideTables
end
end
db/migrate/20190606014128_add_last_ci_minutes_notification_at_to_namespaces.rb
View file @
62812393
...
...
@@ -7,6 +7,6 @@ class AddLastCiMinutesNotificationAtToNamespaces < ActiveRecord::Migration[5.1]
DOWNTIME
=
false
def
change
add_column
:namespaces
,
:last_ci_minutes_notification_at
,
:datetime_with_timezone
add_column
:namespaces
,
:last_ci_minutes_notification_at
,
:datetime_with_timezone
# rubocop:disable Migration/AddColumnsToWideTables
end
end
db/migrate/20190621022810_add_last_ci_minutes_usage_notification_level_to_namespaces.rb
View file @
62812393
...
...
@@ -4,6 +4,6 @@ class AddLastCiMinutesUsageNotificationLevelToNamespaces < ActiveRecord::Migrati
DOWNTIME
=
false
def
change
add_column
:namespaces
,
:last_ci_minutes_usage_notification_level
,
:integer
add_column
:namespaces
,
:last_ci_minutes_usage_notification_level
,
:integer
# rubocop:disable Migration/AddColumnsToWideTables
end
end
db/migrate/20190626175626_add_group_creation_level_to_namespaces.rb
View file @
62812393
...
...
@@ -6,7 +6,7 @@ class AddGroupCreationLevelToNamespaces < ActiveRecord::Migration[5.1]
DOWNTIME
=
false
def
up
add_column
(
:namespaces
,
:subgroup_creation_level
,
:integer
)
add_column
(
:namespaces
,
:subgroup_creation_level
,
:integer
)
# rubocop:disable Migration/AddColumnsToWideTables
change_column_default
(
:namespaces
,
:subgroup_creation_level
,
::
Gitlab
::
Access
::
MAINTAINER_SUBGROUP_ACCESS
)
...
...
db/migrate/20190715215549_add_group_emails_disabled.rb
View file @
62812393
...
...
@@ -4,6 +4,6 @@ class AddGroupEmailsDisabled < ActiveRecord::Migration[5.2]
DOWNTIME
=
false
def
change
add_column
:namespaces
,
:emails_disabled
,
:boolean
add_column
:namespaces
,
:emails_disabled
,
:boolean
# rubocop:disable Migration/AddColumnsToWideTables
end
end
db/migrate/20190911115109_add_namespaces_max_pages_size.rb
View file @
62812393
...
...
@@ -4,6 +4,6 @@ class AddNamespacesMaxPagesSize < ActiveRecord::Migration[5.2]
DOWNTIME
=
false
def
change
add_column
:namespaces
,
:max_pages_size
,
:integer
add_column
:namespaces
,
:max_pages_size
,
:integer
# rubocop:disable Migration/AddColumnsToWideTables
end
end
db/migrate/20190911115222_add_namespaces_max_artifacts_size.rb
View file @
62812393
...
...
@@ -4,6 +4,6 @@ class AddNamespacesMaxArtifactsSize < ActiveRecord::Migration[5.2]
DOWNTIME
=
false
def
change
add_column
:namespaces
,
:max_artifacts_size
,
:integer
add_column
:namespaces
,
:max_artifacts_size
,
:integer
# rubocop:disable Migration/AddColumnsToWideTables
end
end
db/migrate/20191114132259_add_mentions_disabled_to_namespaces.rb
View file @
62812393
...
...
@@ -4,6 +4,6 @@ class AddMentionsDisabledToNamespaces < ActiveRecord::Migration[5.2]
DOWNTIME
=
false
def
change
add_column
:namespaces
,
:mentions_disabled
,
:boolean
add_column
:namespaces
,
:mentions_disabled
,
:boolean
# rubocop:disable Migration/AddColumnsToWideTables
end
end
db/migrate/20200207062728_add_default_branch_protection_to_namespaces.rb
View file @
62812393
...
...
@@ -7,7 +7,7 @@ class AddDefaultBranchProtectionToNamespaces < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_column
:namespaces
,
:default_branch_protection
,
:integer
,
limit:
2
add_column
:namespaces
,
:default_branch_protection
,
:integer
,
limit:
2
# rubocop:disable Migration/AddColumnsToWideTables
end
end
...
...
db/migrate/20200304124406_add_unlock_membership_to_ldap_of_groups.rb
View file @
62812393
...
...
@@ -7,7 +7,7 @@ class AddUnlockMembershipToLdapOfGroups < ActiveRecord::Migration[5.2]
def
up
with_lock_retries
do
add_column
(
:namespaces
,
:unlock_membership_to_ldap
,
:boolean
)
add_column
(
:namespaces
,
:unlock_membership_to_ldap
,
:boolean
)
# rubocop:disable Migration/AddColumnsToWideTables
end
end
...
...
db/migrate/20200323075043_add_max_personal_access_token_lifetime_to_namespaces.rb
View file @
62812393
...
...
@@ -7,7 +7,7 @@ class AddMaxPersonalAccessTokenLifetimeToNamespaces < ActiveRecord::Migration[6.
def
up
with_lock_retries
do
add_column
:namespaces
,
:max_personal_access_token_lifetime
,
:integer
add_column
:namespaces
,
:max_personal_access_token_lifetime
,
:integer
# rubocop:disable Migration/AddColumnsToWideTables
end
end
...
...
db/migrate/20200407120000_add_push_rule_id_to_groups.rb
View file @
62812393
...
...
@@ -7,7 +7,7 @@ class AddPushRuleIdToGroups < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_column
:namespaces
,
:push_rule_id
,
:bigint
add_column
:namespaces
,
:push_rule_id
,
:bigint
# rubocop:disable Migration/AddColumnsToWideTables
end
end
...
...
db/migrate/20200424102023_add_shared_runners_enabled_and_override_to_namespaces.rb
View file @
62812393
...
...
@@ -7,8 +7,8 @@ class AddSharedRunnersEnabledAndOverrideToNamespaces < ActiveRecord::Migration[6
def
up
with_lock_retries
do
add_column
:namespaces
,
:shared_runners_enabled
,
:boolean
,
default:
true
,
null:
false
add_column
:namespaces
,
:allow_descendants_override_disabled_shared_runners
,
:boolean
,
default:
false
,
null:
false
add_column
:namespaces
,
:shared_runners_enabled
,
:boolean
,
default:
true
,
null:
false
# rubocop:disable Migration/AddColumnsToWideTables
add_column
:namespaces
,
:allow_descendants_override_disabled_shared_runners
,
:boolean
,
default:
false
,
null:
false
# rubocop:disable Migration/AddColumnsToWideTables
end
end
...
...
db/migrate/20200609012539_add_traversal_ids_to_namespaces.rb
View file @
62812393
...
...
@@ -7,7 +7,7 @@ class AddTraversalIdsToNamespaces < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_column
:namespaces
,
:traversal_ids
,
:integer
,
array:
true
,
default:
[],
null:
false
add_column
:namespaces
,
:traversal_ids
,
:integer
,
array:
true
,
default:
[],
null:
false
# rubocop:disable Migration/AddColumnsToWideTables
end
end
...
...
db/migrate/20200701190523_add_delayed_project_removal_to_namespaces.rb
View file @
62812393
...
...
@@ -7,7 +7,7 @@ class AddDelayedProjectRemovalToNamespaces < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_column
:namespaces
,
:delayed_project_removal
,
:boolean
,
default:
false
,
null:
false
add_column
:namespaces
,
:delayed_project_removal
,
:boolean
,
default:
false
,
null:
false
# rubocop:disable Migration/AddColumnsToWideTables
end
end
...
...
db/migrate/20210121093618_remove_repository_read_only_to_groups.rb
View file @
62812393
...
...
@@ -16,7 +16,7 @@ class RemoveRepositoryReadOnlyToGroups < ActiveRecord::Migration[6.0]
def
down
unless
column_exists?
(
:namespaces
,
:repository_read_only
)
with_lock_retries
do
add_column
:namespaces
,
:repository_read_only
,
:boolean
,
default:
false
,
null:
false
add_column
:namespaces
,
:repository_read_only
,
:boolean
,
default:
false
,
null:
false
# rubocop:disable Migration/AddColumnsToWideTables
end
end
end
...
...
db/post_migrate/20200408132152_remove_namespaces_trial_ends_on.rb
View file @
62812393
...
...
@@ -18,7 +18,7 @@ class RemoveNamespacesTrialEndsOn < ActiveRecord::Migration[6.0]
def
down
unless
column_exists?
(
:namespaces
,
:trial_ends_on
)
with_lock_retries
do
add_column
:namespaces
,
:trial_ends_on
,
:datetime_with_timezone
add_column
:namespaces
,
:trial_ends_on
,
:datetime_with_timezone
# rubocop:disable Migration/AddColumnsToWideTables
end
end
...
...
db/post_migrate/20200424043515_drop_namespaces_plan_id.rb
View file @
62812393
...
...
@@ -16,7 +16,7 @@ class DropNamespacesPlanId < ActiveRecord::Migration[6.0]
def
down
unless
column_exists?
(
:namespaces
,
:plan_id
)
with_lock_retries
do
add_column
:namespaces
,
:plan_id
,
:integer
add_column
:namespaces
,
:plan_id
,
:integer
# rubocop:disable Migration/AddColumnsToWideTables
end
end
...
...
rubocop/migration_helpers.rb
View file @
62812393
...
...
@@ -7,11 +7,12 @@ module RuboCop
plan_limits
]
.
freeze
# Tables with large number of columns (> 50 on GitLab.com as of 0
3/2020
)
# Tables with large number of columns (> 50 on GitLab.com as of 0
1/2021
)
WIDE_TABLES
=
%i[
users
projects
ci_builds
namespaces
projects
users
]
.
freeze
# List of helpers that add new columns, either directly (ADD_COLUMN_METHODS)
...
...
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