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
f945c6da
Commit
f945c6da
authored
Jan 08, 2021
by
Adam Davies
Committed by
Kerri Miller
Jan 08, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unnecessary use of freeze
parent
501c6240
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
31 additions
and
26 deletions
+31
-26
changelogs/unreleased/31343-remove-more-unnecessary-freeze.yml
...elogs/unreleased/31343-remove-more-unnecessary-freeze.yml
+5
-0
db/migrate/20190709220143_add_index_to_issues_relative_position.rb
...e/20190709220143_add_index_to_issues_relative_position.rb
+1
-1
db/migrate/20191118182722_add_index_to_environments_on_project_id_state_environment_type.rb
...x_to_environments_on_project_id_state_environment_type.rb
+2
-2
db/migrate/20191121161018_add_project_id_name_version_package_type_index_to_packages_packages.rb
...d_name_version_package_type_index_to_packages_packages.rb
+1
-1
db/migrate/20191129144631_add_index_to_resource_group_id.rb
db/migrate/20191129144631_add_index_to_resource_group_id.rb
+1
-1
db/migrate/20191214175727_add_indexes_to_deployments_on_project_id_and_ref.rb
...75727_add_indexes_to_deployments_on_project_id_and_ref.rb
+1
-1
db/migrate/20200115135234_add_group_index_and_fk_to_import_failures.rb
...200115135234_add_group_index_and_fk_to_import_failures.rb
+1
-1
db/migrate/20200117112554_update_project_index_to_import_failures.rb
...20200117112554_update_project_index_to_import_failures.rb
+2
-2
db/migrate/20200221144534_drop_activate_prometheus_services_background_jobs.rb
...4534_drop_activate_prometheus_services_background_jobs.rb
+2
-2
db/migrate/20200528054112_add_index_to_package_name.rb
db/migrate/20200528054112_add_index_to_package_name.rb
+1
-1
db/migrate/20200826092324_add_projects_index_on_import_type_creator_id_created_at.rb
...dd_projects_index_on_import_type_creator_id_created_at.rb
+1
-1
db/migrate/20201005092709_remove_compliance_frameworks_group_id_fk.rb
...0201005092709_remove_compliance_frameworks_group_id_fk.rb
+1
-1
db/migrate/20201014205300_drop_backfill_jira_tracker_deployment_type_jobs.rb
...205300_drop_backfill_jira_tracker_deployment_type_jobs.rb
+2
-2
db/post_migrate/20190402224749_schedule_merge_request_assignees_migration_progress_check.rb
...edule_merge_request_assignees_migration_progress_check.rb
+1
-1
db/post_migrate/20190506135400_schedule_sync_issuables_state_id_where_nil.rb
...90506135400_schedule_sync_issuables_state_id_where_nil.rb
+2
-2
db/post_migrate/20190611161642_add_index_to_events_and_audit_events_created_at_author_id.rb
..._index_to_events_and_audit_events_created_at_author_id.rb
+3
-3
db/post_migrate/20191030223057_backfill_version_author_and_created_at.rb
.../20191030223057_backfill_version_author_and_created_at.rb
+1
-1
db/post_migrate/20191104142124_nullify_users_role.rb
db/post_migrate/20191104142124_nullify_users_role.rb
+1
-1
db/post_migrate/20200207185149_schedule_fix_orphan_promoted_issues.rb
...ate/20200207185149_schedule_fix_orphan_promoted_issues.rb
+1
-1
db/post_migrate/20200217225719_schedule_migrate_security_scans.rb
...migrate/20200217225719_schedule_migrate_security_scans.rb
+1
-1
No files found.
changelogs/unreleased/31343-remove-more-unnecessary-freeze.yml
0 → 100644
View file @
f945c6da
---
title
:
Remove unnecessary use of .freeze
merge_request
:
51073
author
:
Adam Davies @adamd92
type
:
other
db/migrate/20190709220143_add_index_to_issues_relative_position.rb
View file @
f945c6da
...
...
@@ -8,7 +8,7 @@ class AddIndexToIssuesRelativePosition < ActiveRecord::Migration[5.1]
disable_ddl_transaction!
INDEX_NAME
=
'index_issues_on_project_id_and_state_and_rel_position_and_id'
.
freeze
INDEX_NAME
=
'index_issues_on_project_id_and_state_and_rel_position_and_id'
def
up
add_concurrent_index
:issues
,
[
:project_id
,
:state
,
:relative_position
,
:id
],
order:
{
id: :desc
},
name:
INDEX_NAME
...
...
db/migrate/20191118182722_add_index_to_environments_on_project_id_state_environment_type.rb
View file @
f945c6da
...
...
@@ -4,8 +4,8 @@ class AddIndexToEnvironmentsOnProjectIdStateEnvironmentType < ActiveRecord::Migr
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
OLD_INDEX_NAME
=
'index_environments_on_project_id_and_state'
.
freeze
NEW_INDEX_NAME
=
'index_environments_on_project_id_state_environment_type'
.
freeze
OLD_INDEX_NAME
=
'index_environments_on_project_id_and_state'
NEW_INDEX_NAME
=
'index_environments_on_project_id_state_environment_type'
disable_ddl_transaction!
...
...
db/migrate/20191121161018_add_project_id_name_version_package_type_index_to_packages_packages.rb
View file @
f945c6da
...
...
@@ -4,7 +4,7 @@ class AddProjectIdNameVersionPackageTypeIndexToPackagesPackages < ActiveRecord::
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
INDEX_NAME
=
'idx_packages_packages_on_project_id_name_version_package_type'
.
freeze
INDEX_NAME
=
'idx_packages_packages_on_project_id_name_version_package_type'
disable_ddl_transaction!
...
...
db/migrate/20191129144631_add_index_to_resource_group_id.rb
View file @
f945c6da
...
...
@@ -4,7 +4,7 @@ class AddIndexToResourceGroupId < ActiveRecord::Migration[5.2]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
INDEX_NAME
=
'index_for_resource_group'
.
freeze
INDEX_NAME
=
'index_for_resource_group'
disable_ddl_transaction!
...
...
db/migrate/20191214175727_add_indexes_to_deployments_on_project_id_and_ref.rb
View file @
f945c6da
...
...
@@ -4,7 +4,7 @@ class AddIndexesToDeploymentsOnProjectIdAndRef < ActiveRecord::Migration[5.2]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
INDEX_NAME
=
'partial_index_deployments_for_project_id_and_tag'
.
freeze
INDEX_NAME
=
'partial_index_deployments_for_project_id_and_tag'
disable_ddl_transaction!
...
...
db/migrate/20200115135234_add_group_index_and_fk_to_import_failures.rb
View file @
f945c6da
...
...
@@ -4,7 +4,7 @@ class AddGroupIndexAndFkToImportFailures < ActiveRecord::Migration[5.2]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
GROUP_INDEX
=
'index_import_failures_on_group_id_not_null'
.
freeze
GROUP_INDEX
=
'index_import_failures_on_group_id_not_null'
disable_ddl_transaction!
...
...
db/migrate/20200117112554_update_project_index_to_import_failures.rb
View file @
f945c6da
...
...
@@ -5,8 +5,8 @@ class UpdateProjectIndexToImportFailures < ActiveRecord::Migration[5.2]
# Set this constant to true if this migration requires downtime.
DOWNTIME
=
false
PROJECT_INDEX_OLD
=
'index_import_failures_on_project_id'
.
freeze
PROJECT_INDEX_NEW
=
'index_import_failures_on_project_id_not_null'
.
freeze
PROJECT_INDEX_OLD
=
'index_import_failures_on_project_id'
PROJECT_INDEX_NEW
=
'index_import_failures_on_project_id_not_null'
disable_ddl_transaction!
...
...
db/migrate/20200221144534_drop_activate_prometheus_services_background_jobs.rb
View file @
f945c6da
...
...
@@ -2,8 +2,8 @@
class
DropActivatePrometheusServicesBackgroundJobs
<
ActiveRecord
::
Migration
[
6.0
]
DOWNTIME
=
false
DROPPED_JOB_CLASS
=
'ActivatePrometheusServicesForSharedClusterApplications'
.
freeze
QUEUE
=
'background_migration'
.
freeze
DROPPED_JOB_CLASS
=
'ActivatePrometheusServicesForSharedClusterApplications'
QUEUE
=
'background_migration'
def
up
sidekiq_queues
.
each
do
|
queue
|
...
...
db/migrate/20200528054112_add_index_to_package_name.rb
View file @
f945c6da
...
...
@@ -7,7 +7,7 @@ class AddIndexToPackageName < ActiveRecord::Migration[6.0]
disable_ddl_transaction!
INDEX_NAME
=
'package_name_index'
.
freeze
INDEX_NAME
=
'package_name_index'
def
up
add_concurrent_index
(
:packages_packages
,
:name
,
name:
INDEX_NAME
)
...
...
db/migrate/20200826092324_add_projects_index_on_import_type_creator_id_created_at.rb
View file @
f945c6da
...
...
@@ -4,7 +4,7 @@ class AddProjectsIndexOnImportTypeCreatorIdCreatedAt < ActiveRecord::Migration[6
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
INDEX_NAME
=
'index_imported_projects_on_import_type_creator_id_created_at'
.
freeze
INDEX_NAME
=
'index_imported_projects_on_import_type_creator_id_created_at'
disable_ddl_transaction!
...
...
db/migrate/20201005092709_remove_compliance_frameworks_group_id_fk.rb
View file @
f945c6da
...
...
@@ -4,7 +4,7 @@ class RemoveComplianceFrameworksGroupIdFk < ActiveRecord::Migration[6.0]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
INDEX_NAME
=
'index_compliance_management_frameworks_on_group_id_and_name'
.
freeze
INDEX_NAME
=
'index_compliance_management_frameworks_on_group_id_and_name'
class
TmpComplianceFramework
<
ActiveRecord
::
Base
self
.
table_name
=
'compliance_management_frameworks'
...
...
db/migrate/20201014205300_drop_backfill_jira_tracker_deployment_type_jobs.rb
View file @
f945c6da
...
...
@@ -2,8 +2,8 @@
class
DropBackfillJiraTrackerDeploymentTypeJobs
<
ActiveRecord
::
Migration
[
6.0
]
DOWNTIME
=
false
DROPPED_JOB_CLASS
=
'BackfillJiraTrackerDeploymentType'
.
freeze
QUEUE
=
'background_migration'
.
freeze
DROPPED_JOB_CLASS
=
'BackfillJiraTrackerDeploymentType'
QUEUE
=
'background_migration'
def
up
sidekiq_queues
.
each
do
|
queue
|
...
...
db/post_migrate/20190402224749_schedule_merge_request_assignees_migration_progress_check.rb
View file @
f945c6da
...
...
@@ -3,7 +3,7 @@
class
ScheduleMergeRequestAssigneesMigrationProgressCheck
<
ActiveRecord
::
Migration
[
5.0
]
include
Gitlab
::
Database
::
MigrationHelpers
MIGRATION
=
'MergeRequestAssigneesMigrationProgressCheck'
.
freeze
MIGRATION
=
'MergeRequestAssigneesMigrationProgressCheck'
DOWNTIME
=
false
...
...
db/post_migrate/20190506135400_schedule_sync_issuables_state_id_where_nil.rb
View file @
f945c6da
...
...
@@ -20,8 +20,8 @@ class ScheduleSyncIssuablesStateIdWhereNil < ActiveRecord::Migration[5.1]
#
BATCH_SIZE
=
5000
DELAY_INTERVAL
=
120
.
seconds
.
to_i
ISSUES_MIGRATION
=
'SyncIssuesStateId'
.
freeze
MERGE_REQUESTS_MIGRATION
=
'SyncMergeRequestsStateId'
.
freeze
ISSUES_MIGRATION
=
'SyncIssuesStateId'
MERGE_REQUESTS_MIGRATION
=
'SyncMergeRequestsStateId'
disable_ddl_transaction!
...
...
db/post_migrate/20190611161642_add_index_to_events_and_audit_events_created_at_author_id.rb
View file @
f945c6da
...
...
@@ -7,9 +7,9 @@ class AddIndexToEventsAndAuditEventsCreatedAtAuthorId < ActiveRecord::Migration[
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
INDEX_NAME
=
'analytics_index_%s_on_created_at_and_author_id'
.
freeze
EVENTS_INDEX_NAME
=
(
INDEX_NAME
%
'events'
)
.
freeze
AUDIT_EVENTS_INDEX_NAME
=
(
INDEX_NAME
%
'audit_events'
)
.
freeze
INDEX_NAME
=
'analytics_index_%s_on_created_at_and_author_id'
EVENTS_INDEX_NAME
=
(
INDEX_NAME
%
'events'
)
AUDIT_EVENTS_INDEX_NAME
=
(
INDEX_NAME
%
'audit_events'
)
disable_ddl_transaction!
...
...
db/post_migrate/20191030223057_backfill_version_author_and_created_at.rb
View file @
f945c6da
...
...
@@ -2,7 +2,7 @@
class
BackfillVersionAuthorAndCreatedAt
<
ActiveRecord
::
Migration
[
5.2
]
DOWNTIME
=
false
MIGRATION
=
'BackfillVersionDataFromGitaly'
.
freeze
MIGRATION
=
'BackfillVersionDataFromGitaly'
BATCH_SIZE
=
500
disable_ddl_transaction!
...
...
db/post_migrate/20191104142124_nullify_users_role.rb
View file @
f945c6da
...
...
@@ -4,7 +4,7 @@ class NullifyUsersRole < ActiveRecord::Migration[5.2]
include
Gitlab
::
Database
::
MigrationHelpers
disable_ddl_transaction!
INDEX_NAME
=
'partial_index_users_updated_at_for_cleaning_mistaken_values'
.
freeze
INDEX_NAME
=
'partial_index_users_updated_at_for_cleaning_mistaken_values'
DOWNTIME
=
false
...
...
db/post_migrate/20200207185149_schedule_fix_orphan_promoted_issues.rb
View file @
f945c6da
...
...
@@ -5,7 +5,7 @@ class ScheduleFixOrphanPromotedIssues < ActiveRecord::Migration[5.2]
DOWNTIME
=
false
BATCH_SIZE
=
100
BACKGROUND_MIGRATION
=
'FixOrphanPromotedIssues'
.
freeze
BACKGROUND_MIGRATION
=
'FixOrphanPromotedIssues'
disable_ddl_transaction!
...
...
db/post_migrate/20200217225719_schedule_migrate_security_scans.rb
View file @
f945c6da
...
...
@@ -6,7 +6,7 @@ class ScheduleMigrateSecurityScans < ActiveRecord::Migration[5.2]
DOWNTIME
=
false
INTERVAL
=
2
.
minutes
.
to_i
BATCH_SIZE
=
10_000
MIGRATION
=
'MigrateSecurityScans'
.
freeze
MIGRATION
=
'MigrateSecurityScans'
disable_ddl_transaction!
...
...
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