diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-30 15:07:51 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-30 15:07:51 +0000 |
commit | 4e9acbfba3682c552b3de707c535e6257ef41054 (patch) | |
tree | 8b1fd5f89ad3f1be68d8944815b13bb7d498e4a6 /db | |
parent | 506d6dcd7c787ba71a8a53102f3d4fdb6adcfa5e (diff) | |
download | gitlab-ce-4e9acbfba3682c552b3de707c535e6257ef41054.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
30 files changed, 49 insertions, 27 deletions
diff --git a/db/migrate/20180102220145_add_pages_https_only_to_projects.rb b/db/migrate/20180102220145_add_pages_https_only_to_projects.rb index 75488f57fa9..7bd646cd5fd 100644 --- a/db/migrate/20180102220145_add_pages_https_only_to_projects.rb +++ b/db/migrate/20180102220145_add_pages_https_only_to_projects.rb @@ -4,6 +4,6 @@ class AddPagesHttpsOnlyToProjects < ActiveRecord::Migration[4.2] DOWNTIME = false def change - add_column :projects, :pages_https_only, :boolean + add_column :projects, :pages_https_only, :boolean # rubocop:disable Migration/AddColumnsToWideTables end end diff --git a/db/migrate/20180228172924_add_include_private_contributions_to_users.rb b/db/migrate/20180228172924_add_include_private_contributions_to_users.rb index 7921d3a14b6..58e50b2ee74 100644 --- a/db/migrate/20180228172924_add_include_private_contributions_to_users.rb +++ b/db/migrate/20180228172924_add_include_private_contributions_to_users.rb @@ -2,6 +2,6 @@ class AddIncludePrivateContributionsToUsers < ActiveRecord::Migration[4.2] DOWNTIME = false def change - add_column :users, :include_private_contributions, :boolean + add_column :users, :include_private_contributions, :boolean # rubocop:disable Migration/AddColumnsToWideTables end end diff --git a/db/migrate/20180503141722_add_remote_mirror_available_overridden_to_projects.rb b/db/migrate/20180503141722_add_remote_mirror_available_overridden_to_projects.rb index 1d99d46b7d6..aa3d9a804ab 100644 --- a/db/migrate/20180503141722_add_remote_mirror_available_overridden_to_projects.rb +++ b/db/migrate/20180503141722_add_remote_mirror_available_overridden_to_projects.rb @@ -6,7 +6,7 @@ class AddRemoteMirrorAvailableOverriddenToProjects < ActiveRecord::Migration[4.2 disable_ddl_transaction! def up - add_column(:projects, :remote_mirror_available_overridden, :boolean) unless column_exists?(:projects, :remote_mirror_available_overridden) + add_column(:projects, :remote_mirror_available_overridden, :boolean) unless column_exists?(:projects, :remote_mirror_available_overridden) # rubocop:disable Migration/AddColumnsToWideTables end def down diff --git a/db/migrate/20180722103201_add_private_profile_to_users.rb b/db/migrate/20180722103201_add_private_profile_to_users.rb index c8d917065bb..63b7a631fc8 100644 --- a/db/migrate/20180722103201_add_private_profile_to_users.rb +++ b/db/migrate/20180722103201_add_private_profile_to_users.rb @@ -5,6 +5,6 @@ class AddPrivateProfileToUsers < ActiveRecord::Migration[4.2] DOWNTIME = false def change - add_column :users, :private_profile, :boolean + add_column :users, :private_profile, :boolean # rubocop:disable Migration/AddColumnsToWideTables end end diff --git a/db/migrate/20180814153625_add_commit_email_to_users.rb b/db/migrate/20180814153625_add_commit_email_to_users.rb index 98bafc14a03..303be9b2312 100644 --- a/db/migrate/20180814153625_add_commit_email_to_users.rb +++ b/db/migrate/20180814153625_add_commit_email_to_users.rb @@ -27,7 +27,11 @@ class AddCommitEmailToUsers < ActiveRecord::Migration[4.2] # comments: # disable_ddl_transaction! + # rubocop:disable Migration/AddLimitToStringColumns + # rubocop:disable Migration/AddColumnsToWideTables def change - add_column :users, :commit_email, :string # rubocop:disable Migration/AddLimitToStringColumns + add_column :users, :commit_email, :string end + # rubocop:enable Migration/AddLimitToStringColumns + # rubocop:enable Migration/AddColumnsToWideTables end diff --git a/db/migrate/20180924190739_add_scheduled_at_to_ci_builds.rb b/db/migrate/20180924190739_add_scheduled_at_to_ci_builds.rb index cd2f8b59d41..04a784a0c90 100644 --- a/db/migrate/20180924190739_add_scheduled_at_to_ci_builds.rb +++ b/db/migrate/20180924190739_add_scheduled_at_to_ci_builds.rb @@ -4,6 +4,6 @@ class AddScheduledAtToCiBuilds < ActiveRecord::Migration[4.2] DOWNTIME = false def change - add_column :ci_builds, :scheduled_at, :datetime_with_timezone + add_column :ci_builds, :scheduled_at, :datetime_with_timezone # rubocop:disable Migration/AddColumnsToWideTables end end diff --git a/db/migrate/20181019032408_add_repositories_table.rb b/db/migrate/20181019032408_add_repositories_table.rb index dd510b44084..5ee31b37b66 100644 --- a/db/migrate/20181019032408_add_repositories_table.rb +++ b/db/migrate/20181019032408_add_repositories_table.rb @@ -9,7 +9,7 @@ class AddRepositoriesTable < ActiveRecord::Migration[4.2] t.string :disk_path, null: false, index: { unique: true } # rubocop:disable Migration/AddLimitToStringColumns end - add_column :projects, :pool_repository_id, :bigint + add_column :projects, :pool_repository_id, :bigint # rubocop:disable Migration/AddColumnsToWideTables add_index :projects, :pool_repository_id, where: 'pool_repository_id IS NOT NULL' end end diff --git a/db/migrate/20181116141504_add_encrypted_runners_token_to_projects.rb b/db/migrate/20181116141504_add_encrypted_runners_token_to_projects.rb index 3083dff49b8..f6986fcdfeb 100644 --- a/db/migrate/20181116141504_add_encrypted_runners_token_to_projects.rb +++ b/db/migrate/20181116141504_add_encrypted_runners_token_to_projects.rb @@ -5,7 +5,11 @@ class AddEncryptedRunnersTokenToProjects < ActiveRecord::Migration[4.2] DOWNTIME = false + # rubocop:disable Migration/AddColumnsToWideTables + # rubocop:disable Migration/AddLimitToStringColumns def change - add_column :projects, :runners_token_encrypted, :string # rubocop:disable Migration/AddLimitToStringColumns + add_column :projects, :runners_token_encrypted, :string end + # rubocop:enable Migration/AddColumnsToWideTables + # rubocop:enable Migration/AddLimitToStringColumns end diff --git a/db/migrate/20181129104854_add_token_encrypted_to_ci_builds.rb b/db/migrate/20181129104854_add_token_encrypted_to_ci_builds.rb index 62a7421eae0..097cc59bcdc 100644 --- a/db/migrate/20181129104854_add_token_encrypted_to_ci_builds.rb +++ b/db/migrate/20181129104854_add_token_encrypted_to_ci_builds.rb @@ -5,7 +5,11 @@ class AddTokenEncryptedToCiBuilds < ActiveRecord::Migration[5.0] DOWNTIME = false + # rubocop:disable Migration/AddColumnsToWideTables + # rubocop:disable Migration/AddLimitToStringColumns def change - add_column :ci_builds, :token_encrypted, :string # rubocop:disable Migration/AddLimitToStringColumns + add_column :ci_builds, :token_encrypted, :string end + # rubocop:enable Migration/AddColumnsToWideTables + # rubocop:enable Migration/AddLimitToStringColumns end diff --git a/db/migrate/20181203002526_add_project_bfg_object_map_column.rb b/db/migrate/20181203002526_add_project_bfg_object_map_column.rb index 5e6d416895c..d8c4fe1ecf6 100644 --- a/db/migrate/20181203002526_add_project_bfg_object_map_column.rb +++ b/db/migrate/20181203002526_add_project_bfg_object_map_column.rb @@ -3,7 +3,11 @@ class AddProjectBfgObjectMapColumn < ActiveRecord::Migration[5.0] DOWNTIME = false + # rubocop:disable Migration/AddColumnsToWideTables + # rubocop:disable Migration/AddLimitToStringColumns def change - add_column :projects, :bfg_object_map, :string # rubocop:disable Migration/AddLimitToStringColumns + add_column :projects, :bfg_object_map, :string end + # rubocop:enable Migration/AddColumnsToWideTables + # rubocop:enable Migration/AddLimitToStringColumns end diff --git a/db/migrate/20190312071108_add_detected_repository_languages_to_projects.rb b/db/migrate/20190312071108_add_detected_repository_languages_to_projects.rb index 5ce0ca19888..82e7ec851c9 100644 --- a/db/migrate/20190312071108_add_detected_repository_languages_to_projects.rb +++ b/db/migrate/20190312071108_add_detected_repository_languages_to_projects.rb @@ -7,6 +7,6 @@ class AddDetectedRepositoryLanguagesToProjects < ActiveRecord::Migration[5.0] DOWNTIME = false def change - add_column :projects, :detected_repository_languages, :boolean + add_column :projects, :detected_repository_languages, :boolean # rubocop:disable Migration/AddColumnsToWideTables end end diff --git a/db/migrate/20190419121952_add_bridged_pipeline_id_to_bridges.rb b/db/migrate/20190419121952_add_bridged_pipeline_id_to_bridges.rb index fac556c1897..efb59403df3 100644 --- a/db/migrate/20190419121952_add_bridged_pipeline_id_to_bridges.rb +++ b/db/migrate/20190419121952_add_bridged_pipeline_id_to_bridges.rb @@ -10,6 +10,6 @@ class AddBridgedPipelineIdToBridges < ActiveRecord::Migration[5.0] DOWNTIME = false def change - add_column :ci_builds, :upstream_pipeline_id, :integer + add_column :ci_builds, :upstream_pipeline_id, :integer # rubocop:disable Migration/AddColumnsToWideTables end end diff --git a/db/migrate/20190715215532_add_project_emails_disabled.rb b/db/migrate/20190715215532_add_project_emails_disabled.rb index 536ea34c0fb..72dba82ef1c 100644 --- a/db/migrate/20190715215532_add_project_emails_disabled.rb +++ b/db/migrate/20190715215532_add_project_emails_disabled.rb @@ -4,6 +4,6 @@ class AddProjectEmailsDisabled < ActiveRecord::Migration[5.2] DOWNTIME = false def change - add_column :projects, :emails_disabled, :boolean + add_column :projects, :emails_disabled, :boolean # rubocop:disable Migration/AddColumnsToWideTables end end diff --git a/db/migrate/20190722104947_add_static_object_token_to_users.rb b/db/migrate/20190722104947_add_static_object_token_to_users.rb index 6ef85d9acaa..180e6a30b04 100644 --- a/db/migrate/20190722104947_add_static_object_token_to_users.rb +++ b/db/migrate/20190722104947_add_static_object_token_to_users.rb @@ -9,7 +9,7 @@ class AddStaticObjectTokenToUsers < ActiveRecord::Migration[5.2] disable_ddl_transaction! def up - add_column :users, :static_object_token, :string, limit: 255 + add_column :users, :static_object_token, :string, limit: 255 # rubocop:disable Migration/AddColumnsToWideTables end def down diff --git a/db/migrate/20190820163320_add_first_last_name_to_user.rb b/db/migrate/20190820163320_add_first_last_name_to_user.rb index 0ea465fc2e2..62bd1443b9d 100644 --- a/db/migrate/20190820163320_add_first_last_name_to_user.rb +++ b/db/migrate/20190820163320_add_first_last_name_to_user.rb @@ -7,8 +7,10 @@ class AddFirstLastNameToUser < ActiveRecord::Migration[5.2] # Set this constant to true if this migration requires downtime. DOWNTIME = false + # rubocop:disable Migration/AddColumnsToWideTables def change add_column(:users, :first_name, :string, null: true, limit: 255) add_column(:users, :last_name, :string, null: true, limit: 255) end + # rubocop:enable Migration/AddColumnsToWideTables end diff --git a/db/migrate/20190911115056_add_projects_max_pages_size.rb b/db/migrate/20190911115056_add_projects_max_pages_size.rb index 175c66953ed..70812e31ab8 100644 --- a/db/migrate/20190911115056_add_projects_max_pages_size.rb +++ b/db/migrate/20190911115056_add_projects_max_pages_size.rb @@ -4,6 +4,6 @@ class AddProjectsMaxPagesSize < ActiveRecord::Migration[5.2] DOWNTIME = false def change - add_column :projects, :max_pages_size, :integer + add_column :projects, :max_pages_size, :integer # rubocop:disable Migration/AddColumnsToWideTables end end diff --git a/db/migrate/20190911115207_add_projects_max_artifacts_size.rb b/db/migrate/20190911115207_add_projects_max_artifacts_size.rb index 41cab7e5282..cd4574ad9c8 100644 --- a/db/migrate/20190911115207_add_projects_max_artifacts_size.rb +++ b/db/migrate/20190911115207_add_projects_max_artifacts_size.rb @@ -4,6 +4,6 @@ class AddProjectsMaxArtifactsSize < ActiveRecord::Migration[5.2] DOWNTIME = false def change - add_column :projects, :max_artifacts_size, :integer + add_column :projects, :max_artifacts_size, :integer # rubocop:disable Migration/AddColumnsToWideTables end end diff --git a/db/migrate/20190912223232_add_role_to_users.rb b/db/migrate/20190912223232_add_role_to_users.rb index afbd78ed509..a6405ab896d 100644 --- a/db/migrate/20190912223232_add_role_to_users.rb +++ b/db/migrate/20190912223232_add_role_to_users.rb @@ -7,6 +7,6 @@ class AddRoleToUsers < ActiveRecord::Migration[5.2] DOWNTIME = false def change - add_column :users, :role, :smallint + add_column :users, :role, :smallint # rubocop:disable Migration/AddColumnsToWideTables end end diff --git a/db/migrate/20190924124627_add_pull_mirror_branch_prefix_to_projects.rb b/db/migrate/20190924124627_add_pull_mirror_branch_prefix_to_projects.rb index b9f729d7d66..f1af925c421 100644 --- a/db/migrate/20190924124627_add_pull_mirror_branch_prefix_to_projects.rb +++ b/db/migrate/20190924124627_add_pull_mirror_branch_prefix_to_projects.rb @@ -4,6 +4,6 @@ class AddPullMirrorBranchPrefixToProjects < ActiveRecord::Migration[5.2] DOWNTIME = false def change - add_column :projects, :pull_mirror_branch_prefix, :string, limit: 50 + add_column :projects, :pull_mirror_branch_prefix, :string, limit: 50 # rubocop:disable Migration/AddColumnsToWideTables end end diff --git a/db/migrate/20191003161031_add_mark_for_deletion_to_projects.rb b/db/migrate/20191003161031_add_mark_for_deletion_to_projects.rb index 86d581a4383..12f17c849aa 100644 --- a/db/migrate/20191003161031_add_mark_for_deletion_to_projects.rb +++ b/db/migrate/20191003161031_add_mark_for_deletion_to_projects.rb @@ -4,8 +4,10 @@ class AddMarkForDeletionToProjects < ActiveRecord::Migration[5.2] # Set this constant to true if this migration requires downtime. DOWNTIME = false + # rubocop:disable Migration/AddColumnsToWideTables def change add_column :projects, :marked_for_deletion_at, :date add_column :projects, :marked_for_deletion_by_user_id, :integer end + # rubocop:enable Migration/AddColumnsToWideTables end diff --git a/db/migrate/20191017094449_add_remove_source_branch_after_merge_to_projects.rb b/db/migrate/20191017094449_add_remove_source_branch_after_merge_to_projects.rb index 021bf7d9870..d4f84b066a3 100644 --- a/db/migrate/20191017094449_add_remove_source_branch_after_merge_to_projects.rb +++ b/db/migrate/20191017094449_add_remove_source_branch_after_merge_to_projects.rb @@ -8,7 +8,7 @@ class AddRemoveSourceBranchAfterMergeToProjects < ActiveRecord::Migration[5.1] DOWNTIME = false def up - add_column :projects, :remove_source_branch_after_merge, :boolean + add_column :projects, :remove_source_branch_after_merge, :boolean # rubocop:disable Migration/AddColumnsToWideTables end def down diff --git a/db/migrate/20191115114032_add_processed_to_ci_builds.rb b/db/migrate/20191115114032_add_processed_to_ci_builds.rb index f6f8f5e85d6..6fece99cb02 100644 --- a/db/migrate/20191115114032_add_processed_to_ci_builds.rb +++ b/db/migrate/20191115114032_add_processed_to_ci_builds.rb @@ -4,6 +4,6 @@ class AddProcessedToCiBuilds < ActiveRecord::Migration[5.2] DOWNTIME = false def change - add_column :ci_builds, :processed, :boolean + add_column :ci_builds, :processed, :boolean # rubocop:disable Migration/AddColumnsToWideTables end end diff --git a/db/migrate/20191129144630_add_resource_group_id_to_ci_builds.rb b/db/migrate/20191129144630_add_resource_group_id_to_ci_builds.rb index 2e696c32e7e..245df7fdcf3 100644 --- a/db/migrate/20191129144630_add_resource_group_id_to_ci_builds.rb +++ b/db/migrate/20191129144630_add_resource_group_id_to_ci_builds.rb @@ -3,6 +3,7 @@ class AddResourceGroupIdToCiBuilds < ActiveRecord::Migration[5.2] DOWNTIME = false + # rubocop:disable Migration/AddColumnsToWideTables def up unless column_exists?(:ci_builds, :resource_group_id) add_column :ci_builds, :resource_group_id, :bigint @@ -12,6 +13,7 @@ class AddResourceGroupIdToCiBuilds < ActiveRecord::Migration[5.2] add_column :ci_builds, :waiting_for_resource_at, :datetime_with_timezone end end + # rubocop:enable Migration/AddColumnsToWideTables def down if column_exists?(:ci_builds, :resource_group_id) diff --git a/db/migrate/20191208110214_add_suggestion_commit_message_to_projects.rb b/db/migrate/20191208110214_add_suggestion_commit_message_to_projects.rb index c4344cf212c..cb897edde8e 100644 --- a/db/migrate/20191208110214_add_suggestion_commit_message_to_projects.rb +++ b/db/migrate/20191208110214_add_suggestion_commit_message_to_projects.rb @@ -4,6 +4,6 @@ class AddSuggestionCommitMessageToProjects < ActiveRecord::Migration[5.2] DOWNTIME = false def change - add_column :projects, :suggestion_commit_message, :string, limit: 255 + add_column :projects, :suggestion_commit_message, :string, limit: 255 # rubocop:disable Migration/AddColumnsToWideTables end end diff --git a/db/migrate/20191223124940_add_scheduling_type_to_ci_builds.rb b/db/migrate/20191223124940_add_scheduling_type_to_ci_builds.rb index 0cb42cdc328..bb849aa8a95 100644 --- a/db/migrate/20191223124940_add_scheduling_type_to_ci_builds.rb +++ b/db/migrate/20191223124940_add_scheduling_type_to_ci_builds.rb @@ -6,6 +6,6 @@ class AddSchedulingTypeToCiBuilds < ActiveRecord::Migration[5.2] DOWNTIME = false def change - add_column :ci_builds, :scheduling_type, :integer, limit: 2 + add_column :ci_builds, :scheduling_type, :integer, limit: 2 # rubocop:disable Migration/AddColumnsToWideTables end end diff --git a/db/migrate/20200103195205_add_autoclose_referenced_issues_to_projects.rb b/db/migrate/20200103195205_add_autoclose_referenced_issues_to_projects.rb index ac1aa2276fc..db473434205 100644 --- a/db/migrate/20200103195205_add_autoclose_referenced_issues_to_projects.rb +++ b/db/migrate/20200103195205_add_autoclose_referenced_issues_to_projects.rb @@ -4,6 +4,6 @@ class AddAutocloseReferencedIssuesToProjects < ActiveRecord::Migration[5.2] DOWNTIME = false def change - add_column :projects, :autoclose_referenced_issues, :boolean + add_column :projects, :autoclose_referenced_issues, :boolean # rubocop:disable Migration/AddColumnsToWideTables end end diff --git a/db/migrate/20200304085423_add_user_type.rb b/db/migrate/20200304085423_add_user_type.rb index 355a16897f4..3c20f2d26d8 100644 --- a/db/migrate/20200304085423_add_user_type.rb +++ b/db/migrate/20200304085423_add_user_type.rb @@ -7,7 +7,7 @@ class AddUserType < ActiveRecord::Migration[6.0] def up with_lock_retries do - add_column :users, :user_type, :integer, limit: 2 + add_column :users, :user_type, :integer, limit: 2 # rubocop:disable Migration/AddColumnsToWideTables end end diff --git a/db/post_migrate/20190424134256_drop_projects_ci_id.rb b/db/post_migrate/20190424134256_drop_projects_ci_id.rb index 44e8f316393..223e9fd4a94 100644 --- a/db/post_migrate/20190424134256_drop_projects_ci_id.rb +++ b/db/post_migrate/20190424134256_drop_projects_ci_id.rb @@ -23,7 +23,7 @@ class DropProjectsCiId < ActiveRecord::Migration[5.1] def down unless column_exists?(:projects, :ci_id) - add_column :projects, :ci_id, :integer + add_column :projects, :ci_id, :integer # rubocop:disable Migration/AddColumnsToWideTables end unless index_exists?(:projects, :ci_id) diff --git a/db/post_migrate/20190511144331_remove_users_support_type.rb b/db/post_migrate/20190511144331_remove_users_support_type.rb index 32df33432b9..e72fbb229b8 100644 --- a/db/post_migrate/20190511144331_remove_users_support_type.rb +++ b/db/post_migrate/20190511144331_remove_users_support_type.rb @@ -17,7 +17,7 @@ class RemoveUsersSupportType < ActiveRecord::Migration[5.1] end def down - add_column :users, :support_bot, :boolean + add_column :users, :support_bot, :boolean # rubocop:disable Migration/AddColumnsToWideTables add_concurrent_index :users, :support_bot add_concurrent_index :users, :state, diff --git a/db/post_migrate/20191015154408_drop_merge_requests_require_code_owner_approval_from_projects.rb b/db/post_migrate/20191015154408_drop_merge_requests_require_code_owner_approval_from_projects.rb index a1d763b7ed1..f31471c2891 100644 --- a/db/post_migrate/20191015154408_drop_merge_requests_require_code_owner_approval_from_projects.rb +++ b/db/post_migrate/20191015154408_drop_merge_requests_require_code_owner_approval_from_projects.rb @@ -15,7 +15,7 @@ class DropMergeRequestsRequireCodeOwnerApprovalFromProjects < ActiveRecord::Migr end def down - add_column :projects, :merge_requests_require_code_owner_approval, :boolean + add_column :projects, :merge_requests_require_code_owner_approval, :boolean # rubocop:disable Migration/AddColumnsToWideTables add_concurrent_index( :projects, |