summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml5
-rw-r--r--app/assets/javascripts/badges/components/badge.vue8
-rw-r--r--app/assets/javascripts/blob/file_template_mediator.js2
-rw-r--r--app/assets/javascripts/ci_variable_list/ajax_variable_list.js2
-rw-r--r--app/assets/javascripts/cycle_analytics/components/limit_warning_component.vue7
-rw-r--r--app/assets/javascripts/diffs/components/app.vue55
-rw-r--r--app/assets/javascripts/diffs/components/commit_item.vue4
-rw-r--r--app/assets/javascripts/diffs/components/commit_widget.vue2
-rw-r--r--app/assets/javascripts/diffs/components/compare_versions.vue27
-rw-r--r--app/assets/javascripts/diffs/components/diff_file_header.vue18
-rw-r--r--app/assets/javascripts/ide/stores/actions/file.js4
-rw-r--r--app/assets/javascripts/ide/stores/actions/merge_request.js6
-rw-r--r--app/assets/javascripts/ide/stores/actions/project.js2
-rw-r--r--app/assets/javascripts/ide/stores/actions/tree.js2
-rw-r--r--app/assets/javascripts/ide/stores/modules/pipelines/actions.js6
-rw-r--r--app/assets/javascripts/labels.js2
-rw-r--r--app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_machine_type_dropdown.vue2
-rw-r--r--app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_project_id_dropdown.vue2
-rw-r--r--app/assets/javascripts/vue_shared/components/time_ago_tooltip.vue10
-rw-r--r--app/assets/stylesheets/pages/diff.scss22
-rw-r--r--app/assets/stylesheets/pages/issuable.scss1
-rw-r--r--app/assets/stylesheets/pages/merge_requests.scss1
-rw-r--r--app/models/concerns/blocks_json_serialization.rb2
-rw-r--r--app/models/namespace.rb2
-rw-r--r--app/services/commits/commit_patch_service.rb2
-rw-r--r--app/services/merge_requests/build_service.rb1
-rw-r--r--app/services/notification_service.rb2
-rw-r--r--app/views/profiles/personal_access_tokens/index.html.haml2
-rw-r--r--changelogs/unreleased/46950-systemcheck-ruby-version.yml5
-rw-r--r--changelogs/unreleased/54201-update-rack-to-2-0-6.yml5
-rw-r--r--changelogs/unreleased/fj-47494-upgrade-git-to-2-18-0.yml5
-rw-r--r--changelogs/unreleased/gt-use-gl-tooltip-directive.yml5
-rw-r--r--changelogs/unreleased/mr-file-tree-commit.yml5
-rw-r--r--changelogs/unreleased/mr-origin-23218.yml5
-rw-r--r--changelogs/unreleased/mr-sticky-headers.yml5
-rw-r--r--changelogs/unreleased/sh-fix-issue-51220.yml5
-rw-r--r--changelogs/unreleased/zj-improve-gitaly-pb.yml5
-rw-r--r--config/application.rb3
-rw-r--r--config/boot.rb2
-rw-r--r--db/migrate/20140313092127_init_schema.rb2
-rw-r--r--db/migrate/20140407135544_fix_namespaces.rb2
-rw-r--r--db/migrate/20140414131055_change_state_to_allow_empty_merge_request_diffs.rb2
-rw-r--r--db/migrate/20140416074002_add_index_on_iid.rb2
-rw-r--r--db/migrate/20140416185734_index_on_current_sign_in_at.rb2
-rw-r--r--db/migrate/20140428105831_add_notes_index_updated_at.rb2
-rw-r--r--db/migrate/20140502115131_add_repo_size_to_db.rb2
-rw-r--r--db/migrate/20140502125220_migrate_repo_size.rb2
-rw-r--r--db/migrate/20140611135229_add_position_to_merge_request.rb2
-rw-r--r--db/migrate/20140625115202_create_users_star_projects.rb2
-rw-r--r--db/migrate/20140729134820_create_labels.rb2
-rw-r--r--db/migrate/20140729140420_create_label_links.rb2
-rw-r--r--db/migrate/20140729145339_migrate_project_tags.rb2
-rw-r--r--db/migrate/20140729152420_migrate_taggable_labels.rb2
-rw-r--r--db/migrate/20140730111702_add_index_to_labels.rb2
-rw-r--r--db/migrate/20140903115954_migrate_to_new_shell.rb2
-rw-r--r--db/migrate/20140907220153_serialize_service_properties.rb2
-rw-r--r--db/migrate/20140914113604_add_members_table.rb2
-rw-r--r--db/migrate/20140914145549_migrate_to_new_members_model.rb2
-rw-r--r--db/migrate/20140914173417_remove_old_member_tables.rb2
-rw-r--r--db/migrate/20141006143943_move_slack_service_to_webhook.rb2
-rw-r--r--db/migrate/20141007100818_add_visibility_level_to_snippet.rb2
-rw-r--r--db/migrate/20141118150935_add_audit_event.rb2
-rw-r--r--db/migrate/20141121133009_add_timestamps_to_members.rb2
-rw-r--r--db/migrate/20141121161704_add_identity_table.rb2
-rw-r--r--db/migrate/20141126120926_add_merge_request_rebase_enabled_to_projects.rb2
-rw-r--r--db/migrate/20141205134006_add_locked_at_to_merge_request.rb2
-rw-r--r--db/migrate/20141216155758_create_doorkeeper_tables.rb2
-rw-r--r--db/migrate/20141217125223_add_owner_to_application.rb2
-rw-r--r--db/migrate/20141223135007_add_import_data_to_project_table.rb2
-rw-r--r--db/migrate/20141226080412_add_developers_can_push_to_protected_branches.rb2
-rw-r--r--db/migrate/20150108073740_create_application_settings.rb2
-rw-r--r--db/migrate/20150116234544_add_home_page_url_for_application_settings.rb2
-rw-r--r--db/migrate/20150116234545_add_gitlab_access_token_to_user.rb2
-rw-r--r--db/migrate/20150125163100_add_default_branch_protection_setting.rb2
-rw-r--r--db/migrate/20150205211843_add_timestamps_to_identities.rb2
-rw-r--r--db/migrate/20150206181414_add_index_to_created_at.rb2
-rw-r--r--db/migrate/20150206222854_add_notification_email_to_user.rb2
-rw-r--r--db/migrate/20150209222013_add_missing_index.rb2
-rw-r--r--db/migrate/20150211172122_add_template_to_service.rb2
-rw-r--r--db/migrate/20150211174341_allow_null_in_services_project_id.rb2
-rw-r--r--db/migrate/20150213104043_add_twitter_sharing_enabled_to_application_settings.rb2
-rw-r--r--db/migrate/20150213114800_add_hide_no_password_to_user.rb2
-rw-r--r--db/migrate/20150213121042_add_password_automatically_set_to_user.rb2
-rw-r--r--db/migrate/20150217123345_add_bitbucket_access_token_and_secret_to_user.rb2
-rw-r--r--db/migrate/20150219004514_add_events_to_services.rb2
-rw-r--r--db/migrate/20150223022001_set_missing_last_activity_at.rb2
-rw-r--r--db/migrate/20150225065047_add_note_events_to_services.rb2
-rw-r--r--db/migrate/20150301014758_add_restricted_visibility_levels_to_application_settings.rb2
-rw-r--r--db/migrate/20150306023106_fix_namespace_duplication.rb2
-rw-r--r--db/migrate/20150306023112_add_unique_index_to_namespace.rb2
-rw-r--r--db/migrate/20150310194358_add_version_check_to_application_settings.rb2
-rw-r--r--db/migrate/20150313012111_create_subscriptions_table.rb2
-rw-r--r--db/migrate/20150320234437_add_location_to_user.rb2
-rw-r--r--db/migrate/20150324155957_set_incorrect_assignee_id_to_null.rb2
-rw-r--r--db/migrate/20150327122227_add_public_to_key.rb2
-rw-r--r--db/migrate/20150327150017_add_import_data_to_project.rb2
-rw-r--r--db/migrate/20150327223628_add_devise_two_factor_to_users.rb2
-rw-r--r--db/migrate/20150328132231_add_max_attachment_size_to_application_settings.rb2
-rw-r--r--db/migrate/20150331183602_add_devise_two_factor_backupable_to_users.rb2
-rw-r--r--db/migrate/20150406133311_add_invite_data_to_member.rb2
-rw-r--r--db/migrate/20150411000035_fix_identities.rb2
-rw-r--r--db/migrate/20150411180045_rename_buildbox_service.rb2
-rw-r--r--db/migrate/20150413192223_add_public_email_to_users.rb2
-rw-r--r--db/migrate/20150417121913_create_project_import_data.rb2
-rw-r--r--db/migrate/20150417122318_remove_import_data_from_project.rb2
-rw-r--r--db/migrate/20150421120000_remove_periods_at_ends_of_usernames.rb2
-rw-r--r--db/migrate/20150423033240_add_default_project_visibililty_to_application_settings.rb2
-rw-r--r--db/migrate/20150425164646_gitlab_change_collation_for_tag_names.acts_as_taggable_on_engine.rb2
-rw-r--r--db/migrate/20150425164647_remove_duplicate_tags.rb2
-rw-r--r--db/migrate/20150425164648_add_missing_unique_indices.acts_as_taggable_on_engine.rb2
-rw-r--r--db/migrate/20150425164649_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb2
-rw-r--r--db/migrate/20150425164650_add_missing_taggable_index.acts_as_taggable_on_engine.rb2
-rw-r--r--db/migrate/20150425164651_change_collation_for_tag_names.acts_as_taggable_on_engine.rb2
-rw-r--r--db/migrate/20150425173433_add_default_snippet_visibility_to_app_settings.rb2
-rw-r--r--db/migrate/20150429002313_remove_abandoned_group_members_records.rb2
-rw-r--r--db/migrate/20150502064022_add_restricted_signup_domains_to_application_settings.rb2
-rw-r--r--db/migrate/20150509180749_convert_legacy_reference_notes.rb2
-rw-r--r--db/migrate/20150516060434_add_note_events_to_web_hooks.rb2
-rw-r--r--db/migrate/20150529111607_add_user_oauth_applications_to_application_settings.rb2
-rw-r--r--db/migrate/20150529150354_add_after_sign_out_path_for_application_settings.rb2
-rw-r--r--db/migrate/20150609141121_add_session_expire_delay_for_application_settings.rb2
-rw-r--r--db/migrate/20150610065936_add_dashboard_to_users.rb2
-rw-r--r--db/migrate/20150620233230_add_default_otp_required_for_login_value.rb2
-rw-r--r--db/migrate/20150713160110_add_project_view_to_users.rb2
-rw-r--r--db/migrate/20150717130904_add_commits_count_to_project.rb2
-rw-r--r--db/migrate/20150730122406_add_updated_by_to_issuables_and_notes.rb2
-rw-r--r--db/migrate/20150806104937_create_abuse_reports.rb2
-rw-r--r--db/migrate/20150812080800_add_settings_import_sources.rb2
-rw-r--r--db/migrate/20150814065925_remove_oauth_tokens_from_users.rb2
-rw-r--r--db/migrate/20150817163600_deduplicate_user_identities.rb2
-rw-r--r--db/migrate/20150818213832_add_sent_notifications.rb2
-rw-r--r--db/migrate/20150824002011_add_enable_ssl_verification.rb2
-rw-r--r--db/migrate/20150826001931_add_ci_tables.rb2
-rw-r--r--db/migrate/20150827121444_add_fast_forward_option_to_project.rb2
-rw-r--r--db/migrate/20150902001023_add_template_to_label.rb2
-rw-r--r--db/migrate/20150914215247_add_ci_tags.rb2
-rw-r--r--db/migrate/20150915001905_enable_ssl_verification_by_default.rb2
-rw-r--r--db/migrate/20150916000405_enable_ssl_verification_for_web_hooks.rb2
-rw-r--r--db/migrate/20150916114643_add_help_page_text_to_application_settings.rb2
-rw-r--r--db/migrate/20150916145038_add_index_for_committed_at_and_id.rb2
-rw-r--r--db/migrate/20150918084513_add_ci_enabled_to_application_settings.rb2
-rw-r--r--db/migrate/20150918161719_remove_invalid_milestones_from_merge_requests.rb2
-rw-r--r--db/migrate/20150920010715_add_consumed_timestep_to_users.rb2
-rw-r--r--db/migrate/20150920161119_add_line_code_to_sent_notification.rb2
-rw-r--r--db/migrate/20150924125150_add_project_id_to_ci_commit.rb2
-rw-r--r--db/migrate/20150924125436_migrate_project_id_for_ci_commits.rb2
-rw-r--r--db/migrate/20150930001110_merge_request_error_field.rb2
-rw-r--r--db/migrate/20150930095736_add_null_to_name_for_ci_projects.rb2
-rw-r--r--db/migrate/20150930110012_add_group_share_lock.rb2
-rw-r--r--db/migrate/20151002112914_add_stage_idx_to_builds.rb2
-rw-r--r--db/migrate/20151002121400_add_index_for_builds.rb2
-rw-r--r--db/migrate/20151002122929_add_ref_and_tag_to_builds.rb2
-rw-r--r--db/migrate/20151002122943_migrate_ref_and_tag_to_build.rb2
-rw-r--r--db/migrate/20151005075649_add_user_id_to_build.rb2
-rw-r--r--db/migrate/20151005150751_add_layout_option_for_users.rb2
-rw-r--r--db/migrate/20151005162154_remove_ci_enabled_from_application_settings.rb2
-rw-r--r--db/migrate/20151007120511_namespaces_projects_path_lower_indexes.rb2
-rw-r--r--db/migrate/20151008110232_add_users_lower_username_email_indexes.rb2
-rw-r--r--db/migrate/20151008123042_add_type_and_description_to_builds.rb2
-rw-r--r--db/migrate/20151008130321_migrate_name_to_description_for_builds.rb2
-rw-r--r--db/migrate/20151008143519_add_admin_notification_email_setting.rb2
-rw-r--r--db/migrate/20151012173029_set_jira_service_api_url.rb2
-rw-r--r--db/migrate/20151013092124_add_artifacts_file_to_builds.rb2
-rw-r--r--db/migrate/20151016131433_add_ci_projects_gl_project_id_index.rb2
-rw-r--r--db/migrate/20151016195451_add_ci_builds_and_projects_indexes.rb2
-rw-r--r--db/migrate/20151016195706_add_notes_line_code_index.rb2
-rw-r--r--db/migrate/20151019111551_fix_build_tags.rb2
-rw-r--r--db/migrate/20151019111703_fail_build_without_names.rb2
-rw-r--r--db/migrate/20151020145526_add_services_template_index.rb2
-rw-r--r--db/migrate/20151020173516_ci_limits_to_mysql.rb2
-rw-r--r--db/migrate/20151020173906_add_ci_builds_index_for_status.rb2
-rw-r--r--db/migrate/20151023112551_fail_build_with_empty_name.rb2
-rw-r--r--db/migrate/20151023144219_remove_satellites.rb2
-rw-r--r--db/migrate/20151026182941_add_project_path_index.rb2
-rw-r--r--db/migrate/20151028152939_add_merge_when_build_succeeds_to_merge_request.rb2
-rw-r--r--db/migrate/20151103001141_add_public_to_group.rb2
-rw-r--r--db/migrate/20151103133339_add_shared_runners_setting.rb2
-rw-r--r--db/migrate/20151103134857_create_lfs_objects.rb2
-rw-r--r--db/migrate/20151103134958_create_lfs_objects_projects.rb2
-rw-r--r--db/migrate/20151104105513_add_file_to_lfs_objects.rb2
-rw-r--r--db/migrate/20151105094515_create_releases.rb2
-rw-r--r--db/migrate/20151106000015_add_is_award_to_notes.rb2
-rw-r--r--db/migrate/20151109100728_add_max_artifacts_size_to_application_settings.rb2
-rw-r--r--db/migrate/20151109134526_add_issues_state_index.rb2
-rw-r--r--db/migrate/20151109134916_add_projects_visibility_level_index.rb2
-rw-r--r--db/migrate/20151110125604_add_import_error_to_project.rb2
-rw-r--r--db/migrate/20151114113410_add_index_for_lfs_oid_and_size.rb2
-rw-r--r--db/migrate/20151116144118_add_unique_for_lfs_oid_index.rb2
-rw-r--r--db/migrate/20151118162244_add_projects_public_index.rb2
-rw-r--r--db/migrate/20151201203948_raise_hook_url_limit.rb2
-rw-r--r--db/migrate/20151203162133_add_hide_project_limit_to_users.rb2
-rw-r--r--db/migrate/20151203162134_add_build_events_to_services.rb2
-rw-r--r--db/migrate/20151209144329_migrate_ci_web_hooks.rb2
-rw-r--r--db/migrate/20151209145909_migrate_ci_emails.rb2
-rw-r--r--db/migrate/20151210030143_add_unlock_token_to_user.rb2
-rw-r--r--db/migrate/20151210072243_add_runners_registration_token_to_application_settings.rb2
-rw-r--r--db/migrate/20151210125232_migrate_ci_slack_service.rb2
-rw-r--r--db/migrate/20151210125927_migrate_ci_hip_chat_service.rb2
-rw-r--r--db/migrate/20151210125928_add_ci_to_project.rb2
-rw-r--r--db/migrate/20151210125929_add_project_id_to_ci.rb2
-rw-r--r--db/migrate/20151210125930_migrate_ci_to_project.rb2
-rw-r--r--db/migrate/20151210125931_add_index_to_ci_tables.rb2
-rw-r--r--db/migrate/20151210125932_drop_null_for_ci_tables.rb2
-rw-r--r--db/migrate/20151215132013_add_pages_size_to_application_settings.rb2
-rw-r--r--db/migrate/20151218154042_add_tfa_to_application_settings.rb2
-rw-r--r--db/migrate/20151221234414_add_tfa_additional_fields.rb2
-rw-r--r--db/migrate/20151224123230_rename_emojis.rb2
-rw-r--r--db/migrate/20151228111122_remove_public_from_namespace.rb2
-rw-r--r--db/migrate/20151228150906_influxdb_settings.rb2
-rw-r--r--db/migrate/20151228175719_add_recaptcha_to_application_settings.rb2
-rw-r--r--db/migrate/20151229102248_influxdb_udp_port_setting.rb2
-rw-r--r--db/migrate/20151229112614_influxdb_remote_database_setting.rb2
-rw-r--r--db/migrate/20151230132518_add_artifacts_metadata_to_ci_build.rb2
-rw-r--r--db/migrate/20151231152326_add_akismet_to_application_settings.rb2
-rw-r--r--db/migrate/20151231202530_remove_alert_type_from_broadcast_messages.rb2
-rw-r--r--db/migrate/20160106162223_add_index_milestones_title.rb2
-rw-r--r--db/migrate/20160106164438_remove_influxdb_credentials.rb2
-rw-r--r--db/migrate/20160109054846_create_spam_logs.rb2
-rw-r--r--db/migrate/20160113111034_add_metrics_sample_interval.rb2
-rw-r--r--db/migrate/20160118155830_add_sentry_to_application_settings.rb2
-rw-r--r--db/migrate/20160118232755_add_ip_blocking_settings_to_application_settings.rb2
-rw-r--r--db/migrate/20160119111158_add_services_category.rb2
-rw-r--r--db/migrate/20160119112418_add_services_default.rb2
-rw-r--r--db/migrate/20160119145451_add_ldap_email_to_users.rb2
-rw-r--r--db/migrate/20160120172143_add_base_commit_sha_to_merge_request_diffs.rb2
-rw-r--r--db/migrate/20160121030729_add_email_author_in_body_to_application_settings.rb2
-rw-r--r--db/migrate/20160122185421_add_pending_delete_to_project.rb2
-rw-r--r--db/migrate/20160128212447_remove_ip_blocking_settings_from_application_settings.rb2
-rw-r--r--db/migrate/20160128233227_change_lfs_objects_size_column.rb2
-rw-r--r--db/migrate/20160129135155_remove_dot_atom_path_ending_of_projects.rb2
-rw-r--r--db/migrate/20160129155512_add_merge_commit_sha_to_merge_requests.rb2
-rw-r--r--db/migrate/20160202091601_add_erasable_to_ci_build.rb2
-rw-r--r--db/migrate/20160202164642_add_allow_guest_to_access_builds_project.rb2
-rw-r--r--db/migrate/20160204144558_add_real_size_to_merge_request_diffs.rb2
-rw-r--r--db/migrate/20160209130428_add_index_to_snippet.rb2
-rw-r--r--db/migrate/20160210105555_create_pages_domain.rb2
-rw-r--r--db/migrate/20160212123307_create_tasks.rb2
-rw-r--r--db/migrate/20160217100506_add_description_to_label.rb2
-rw-r--r--db/migrate/20160217174422_add_note_to_tasks.rb2
-rw-r--r--db/migrate/20160220123949_rename_tasks_to_todos.rb2
-rw-r--r--db/migrate/20160222153918_create_appearances_ce.rb2
-rw-r--r--db/migrate/20160223192159_add_confidential_to_issues.rb2
-rw-r--r--db/migrate/20160225090018_add_delete_at_to_issues.rb2
-rw-r--r--db/migrate/20160225101956_add_delete_at_to_merge_requests.rb2
-rw-r--r--db/migrate/20160226114608_add_trigram_indexes_for_searching.rb2
-rw-r--r--db/migrate/20160227120001_add_event_field_for_web_hook.rb2
-rw-r--r--db/migrate/20160227120047_add_event_to_services.rb2
-rw-r--r--db/migrate/20160229193553_add_main_language_to_repository.rb2
-rw-r--r--db/migrate/20160301124843_add_visibility_level_to_groups.rb2
-rw-r--r--db/migrate/20160301174731_add_fingerprint_index.rb2
-rw-r--r--db/migrate/20160302151724_add_import_credentials_to_project_import_data.rb2
-rw-r--r--db/migrate/20160302152808_remove_wrong_import_url_from_projects.rb2
-rw-r--r--db/migrate/20160305220806_remove_expires_at_from_snippets.rb2
-rw-r--r--db/migrate/20160307221555_disallow_blank_line_code_on_note.rb2
-rw-r--r--db/migrate/20160308212903_add_default_group_visibility_to_application_settings.rb2
-rw-r--r--db/migrate/20160309140734_fix_todos.rb2
-rw-r--r--db/migrate/20160310124959_add_due_date_to_issues.rb2
-rw-r--r--db/migrate/20160310185910_add_external_flag_to_users.rb2
-rw-r--r--db/migrate/20160314094147_add_priority_to_label.rb2
-rw-r--r--db/migrate/20160314114439_add_requested_at_to_members.rb2
-rw-r--r--db/migrate/20160314143402_projects_add_pushes_since_gc.rb2
-rw-r--r--db/migrate/20160315135439_project_add_repository_check.rb2
-rw-r--r--db/migrate/20160316123110_ci_runners_token_index.rb2
-rw-r--r--db/migrate/20160316192622_change_target_id_to_null_on_todos.rb2
-rw-r--r--db/migrate/20160316204731_add_commit_id_to_todos.rb2
-rw-r--r--db/migrate/20160317092222_add_moved_to_to_issue.rb2
-rw-r--r--db/migrate/20160320204112_index_namespaces_on_visibility_level.rb2
-rw-r--r--db/migrate/20160324020319_remove_todos_for_deleted_issues.rb2
-rw-r--r--db/migrate/20160328112808_create_notification_settings.rb2
-rw-r--r--db/migrate/20160328115649_migrate_new_notification_setting.rb2
-rw-r--r--db/migrate/20160328121138_add_notification_setting_index.rb2
-rw-r--r--db/migrate/20160329144452_add_index_on_pending_delete_projects.rb2
-rw-r--r--db/migrate/20160331133914_remove_todos_for_deleted_merge_requests.rb2
-rw-r--r--db/migrate/20160331223143_remove_twitter_sharing_enabled_from_application_settings.rb2
-rw-r--r--db/migrate/20160407120251_add_images_enabled_for_project.rb2
-rw-r--r--db/migrate/20160412140240_add_repository_checks_enabled_setting.rb2
-rw-r--r--db/migrate/20160412173416_add_fields_to_ci_commit.rb2
-rw-r--r--db/migrate/20160412173417_update_ci_commit.rb2
-rw-r--r--db/migrate/20160412173418_add_ci_commit_indexes.rb2
-rw-r--r--db/migrate/20160413115152_add_token_to_web_hooks.rb2
-rw-r--r--db/migrate/20160415062917_create_personal_access_tokens.rb2
-rw-r--r--db/migrate/20160415133440_add_shared_runners_text_to_application_settings.rb2
-rw-r--r--db/migrate/20160416180807_add_award_emoji.rb2
-rw-r--r--db/migrate/20160416182152_convert_award_note_to_emoji_award.rb2
-rw-r--r--db/migrate/20160419120017_add_metrics_packet_size.rb2
-rw-r--r--db/migrate/20160419122101_add_only_allow_merge_if_build_succeeds_to_projects.rb2
-rw-r--r--db/migrate/20160421130527_disable_repository_checks.rb2
-rw-r--r--db/migrate/20160425045124_create_u2f_registrations.rb2
-rw-r--r--db/migrate/20160504091942_add_disabled_oauth_sign_in_sources_to_application_settings.rb2
-rw-r--r--db/migrate/20160504112519_add_run_untagged_to_ci_runner.rb2
-rw-r--r--db/migrate/20160508194200_remove_wall_enabled_from_projects.rb2
-rw-r--r--db/migrate/20160508202603_add_head_commit_id_to_merge_request_diffs.rb2
-rw-r--r--db/migrate/20160508215820_add_type_to_notes.rb2
-rw-r--r--db/migrate/20160508215920_add_positions_to_diff_notes.rb2
-rw-r--r--db/migrate/20160508221410_set_type_on_legacy_diff_notes.rb2
-rw-r--r--db/migrate/20160509091049_add_locked_to_ci_runner.rb2
-rw-r--r--db/migrate/20160509201028_add_health_check_access_token_to_application_settings.rb2
-rw-r--r--db/migrate/20160516174813_add_send_user_confirmation_email_to_application_settings.rb2
-rw-r--r--db/migrate/20160516224534_add_start_commit_id_to_merge_request_diffs.rb2
-rw-r--r--db/migrate/20160518200441_add_artifacts_expire_date_to_ci_builds.rb2
-rw-r--r--db/migrate/20160519203051_add_developers_can_merge_to_protected_branches.rb2
-rw-r--r--db/migrate/20160522215720_add_note_type_and_position_to_sent_notification.rb2
-rw-r--r--db/migrate/20160525205328_remove_main_language_from_projects.rb2
-rw-r--r--db/migrate/20160527020117_remove_notification_settings_for_deleted_projects.rb2
-rw-r--r--db/migrate/20160528043124_add_users_state_index.rb2
-rw-r--r--db/migrate/20160530150109_add_container_registry_token_expire_delay_to_application_settings.rb2
-rw-r--r--db/migrate/20160603075128_add_has_external_issue_tracker_to_projects.rb2
-rw-r--r--db/migrate/20160603180330_remove_duplicated_notification_settings.rb2
-rw-r--r--db/migrate/20160603182247_add_index_to_notification_settings.rb2
-rw-r--r--db/migrate/20160608155312_add_after_sign_up_text_to_application_settings.rb2
-rw-r--r--db/migrate/20160608195742_add_repository_storage_to_projects.rb2
-rw-r--r--db/migrate/20160608211215_add_user_default_external_to_application_settings.rb2
-rw-r--r--db/migrate/20160610140403_remove_notification_setting_not_null_constraints.rb2
-rw-r--r--db/migrate/20160610194713_remove_deprecated_issues_tracker_columns_from_projects.rb2
-rw-r--r--db/migrate/20160610201627_migrate_users_notification_level.rb2
-rw-r--r--db/migrate/20160610204157_add_deployments.rb2
-rw-r--r--db/migrate/20160610204158_add_environments.rb2
-rw-r--r--db/migrate/20160610211845_add_environment_to_builds.rb2
-rw-r--r--db/migrate/20160610301627_remove_notification_level_from_users.rb2
-rw-r--r--db/migrate/20160614182521_add_repository_storage_to_application_settings.rb2
-rw-r--r--db/migrate/20160615142710_add_index_on_requested_at_to_members.rb2
-rw-r--r--db/migrate/20160615173316_add_enabled_git_access_protocols_to_application_settings.rb2
-rw-r--r--db/migrate/20160615191922_set_missing_stage_on_ci_builds.rb2
-rw-r--r--db/migrate/20160616084004_change_project_of_environment.rb2
-rw-r--r--db/migrate/20160616102642_remove_duplicated_keys.rb2
-rw-r--r--db/migrate/20160616103005_remove_keys_fingerprint_index_if_exists.rb2
-rw-r--r--db/migrate/20160616103948_add_unique_index_to_keys_fingerprint.rb2
-rw-r--r--db/migrate/20160617301627_add_events_to_notification_settings.rb2
-rw-r--r--db/migrate/20160620115026_add_index_on_runners_locked.rb2
-rw-r--r--db/migrate/20160621123729_add_rebase_commit_sha_to_merge_requests.rb2
-rw-r--r--db/migrate/20160628085157_add_artifacts_size_to_ci_builds.rb2
-rw-r--r--db/migrate/20160629025435_add_column_in_progress_merge_commit_sha_to_merge_requests.rb2
-rw-r--r--db/migrate/20160703180340_add_index_on_award_emoji_user_and_name.rb2
-rw-r--r--db/migrate/20160705054938_add_protected_branches_push_access.rb2
-rw-r--r--db/migrate/20160705054952_add_protected_branches_merge_access.rb2
-rw-r--r--db/migrate/20160705055254_move_from_developers_can_merge_to_protected_branches_merge_access.rb2
-rw-r--r--db/migrate/20160705055308_move_from_developers_can_push_to_protected_branches_push_access.rb2
-rw-r--r--db/migrate/20160705055809_remove_developers_can_push_from_protected_branches.rb2
-rw-r--r--db/migrate/20160705055813_remove_developers_can_merge_from_protected_branches.rb2
-rw-r--r--db/migrate/20160705163108_remove_requesters_that_are_owners.rb2
-rw-r--r--db/migrate/20160707104333_add_lock_to_issuables.rb2
-rw-r--r--db/migrate/20160712171823_remove_award_emojis_with_no_user.rb2
-rw-r--r--db/migrate/20160713200638_add_repository_read_only_to_projects.rb2
-rw-r--r--db/migrate/20160713205315_add_domain_blacklist_to_application_settings.rb2
-rw-r--r--db/migrate/20160713222618_add_usage_ping_to_application_settings.rb2
-rw-r--r--db/migrate/20160715132507_add_user_id_to_pipeline.rb2
-rw-r--r--db/migrate/20160715134306_add_index_for_pipeline_user_id.rb2
-rw-r--r--db/migrate/20160715154212_add_request_access_enabled_to_projects.rb2
-rw-r--r--db/migrate/20160715204316_add_request_access_enabled_to_groups.rb2
-rw-r--r--db/migrate/20160715230841_rename_application_settings_restricted_signup_domains.rb2
-rw-r--r--db/migrate/20160716115710_add_when_and_yaml_variables_to_ci_builds.rb2
-rw-r--r--db/migrate/20160716115711_add_queued_at_to_ci_builds.rb2
-rw-r--r--db/migrate/20160718153603_add_has_external_wiki_to_projects.rb2
-rw-r--r--db/migrate/20160721081015_drop_and_readd_has_external_wiki_in_projects.rb2
-rw-r--r--db/migrate/20160722221922_nullify_blank_type_on_notes.rb2
-rw-r--r--db/migrate/20160724205507_add_resolved_to_notes.rb2
-rw-r--r--db/migrate/20160725083350_add_external_url_to_enviroments.rb2
-rw-r--r--db/migrate/20160725104020_merge_request_diff_remove_uniq.rb2
-rw-r--r--db/migrate/20160725104452_merge_request_diff_add_index.rb2
-rw-r--r--db/migrate/20160727163552_create_user_agent_details.rb2
-rw-r--r--db/migrate/20160727191041_create_boards.rb2
-rw-r--r--db/migrate/20160727193336_create_lists.rb2
-rw-r--r--db/migrate/20160728081025_add_pipeline_events_to_web_hooks.rb2
-rw-r--r--db/migrate/20160728103734_add_pipeline_events_to_services.rb2
-rw-r--r--db/migrate/20160729173930_remove_project_id_from_spam_logs.rb2
-rw-r--r--db/migrate/20160801163421_add_expires_at_to_member.rb2
-rw-r--r--db/migrate/20160801163709_add_submitted_as_ham_to_spam_logs.rb2
-rw-r--r--db/migrate/20160802010328_remove_builds_enable_index_on_projects.rb2
-rw-r--r--db/migrate/20160803161903_add_unique_index_to_lists_label_id.rb2
-rw-r--r--db/migrate/20160804142904_add_ci_config_file_to_project.rb2
-rw-r--r--db/migrate/20160804150737_add_timestamps_to_members_again.rb2
-rw-r--r--db/migrate/20160805041956_add_deleted_at_to_namespaces.rb2
-rw-r--r--db/migrate/20160808085531_add_token_to_build.rb2
-rw-r--r--db/migrate/20160808085602_add_index_for_build_token.rb2
-rw-r--r--db/migrate/20160810102349_remove_ci_runner_trigram_indexes.rb2
-rw-r--r--db/migrate/20160810142633_remove_redundant_indexes.rb2
-rw-r--r--db/migrate/20160811172945_add_can_push_to_keys.rb2
-rw-r--r--db/migrate/20160816161312_add_column_name_to_u2f_registrations.rb2
-rw-r--r--db/migrate/20160817133006_add_koding_to_application_settings.rb2
-rw-r--r--db/migrate/20160817154936_add_discussion_ids_to_notes.rb2
-rw-r--r--db/migrate/20160818205718_add_expires_at_to_project_group_links.rb2
-rw-r--r--db/migrate/20160819221631_add_index_to_note_discussion_id.rb2
-rw-r--r--db/migrate/20160819221833_reset_diff_note_discussion_id_because_it_was_calculated_wrongly.rb2
-rw-r--r--db/migrate/20160819232256_add_incoming_email_token_to_users.rb2
-rw-r--r--db/migrate/20160823081327_change_merge_error_to_text.rb2
-rw-r--r--db/migrate/20160823083941_add_column_scopes_to_personal_access_tokens.rb2
-rw-r--r--db/migrate/20160823213309_add_lfs_enabled_to_projects.rb2
-rw-r--r--db/migrate/20160824103857_drop_unused_ci_tables.rb2
-rw-r--r--db/migrate/20160824124900_add_table_issue_metrics.rb2
-rw-r--r--db/migrate/20160825052008_add_table_merge_request_metrics.rb2
-rw-r--r--db/migrate/20160827011312_ensure_lock_version_has_no_default.rb2
-rw-r--r--db/migrate/20160829114652_add_markdown_cache_columns.rb2
-rw-r--r--db/migrate/20160830203109_add_confidential_issues_events_to_web_hooks.rb2
-rw-r--r--db/migrate/20160830211132_add_confidential_issues_events_to_services.rb2
-rw-r--r--db/migrate/20160830232601_change_lock_version_not_null.rb2
-rw-r--r--db/migrate/20160831214002_create_project_features.rb2
-rw-r--r--db/migrate/20160831214543_migrate_project_features.rb2
-rw-r--r--db/migrate/20160831223750_remove_features_enabled_from_projects.rb2
-rw-r--r--db/migrate/20160901141443_set_confidential_issues_events_on_webhooks.rb2
-rw-r--r--db/migrate/20160901213340_add_lfs_enabled_to_namespaces.rb2
-rw-r--r--db/migrate/20160902122721_drop_gitorious_field_from_application_settings.rb2
-rw-r--r--db/migrate/20160907131111_add_environment_type_to_environments.rb2
-rw-r--r--db/migrate/20160913162434_remove_projects_pushes_since_gc.rb2
-rw-r--r--db/migrate/20160913212128_change_artifacts_size_column.rb2
-rw-r--r--db/migrate/20160914131004_only_allow_merge_if_all_discussions_are_resolved.rb2
-rw-r--r--db/migrate/20160915042921_create_merge_requests_closing_issues.rb2
-rw-r--r--db/migrate/20160919144305_add_type_to_labels.rb2
-rw-r--r--db/migrate/20160919145149_add_group_id_to_labels.rb2
-rw-r--r--db/migrate/20160920160832_add_index_to_labels_title.rb2
-rw-r--r--db/migrate/20160926145521_add_organization_to_user.rb2
-rw-r--r--db/migrate/20161006104309_add_state_to_environment.rb2
-rw-r--r--db/migrate/20161007073613_create_user_activities.rb2
-rw-r--r--db/migrate/20161007133303_precalculate_trending_projects.rb2
-rw-r--r--db/migrate/20161010142410_create_project_authorizations.rb2
-rw-r--r--db/migrate/20161012180455_add_repository_access_level_to_project_feature.rb2
-rw-r--r--db/migrate/20161014173530_create_label_priorities.rb2
-rw-r--r--db/migrate/20161017091941_add_authorized_projects_populated_to_users.rb2
-rw-r--r--db/migrate/20161017095000_add_properties_to_deployment.rb2
-rw-r--r--db/migrate/20161017125927_add_unique_index_to_labels.rb2
-rw-r--r--db/migrate/20161018024215_migrate_labels_priority.rb2
-rw-r--r--db/migrate/20161018024550_remove_priority_from_labels.rb2
-rw-r--r--db/migrate/20161018124658_make_project_owners_masters.rb2
-rw-r--r--db/migrate/20161019190736_migrate_sidekiq_queues_from_default.rb2
-rw-r--r--db/migrate/20161019213545_generate_project_feature_for_projects.rb2
-rw-r--r--db/migrate/20161020075734_default_request_access_groups.rb2
-rw-r--r--db/migrate/20161020075830_default_request_access_projects.rb2
-rw-r--r--db/migrate/20161020083353_add_pipeline_id_to_merge_request_metrics.rb2
-rw-r--r--db/migrate/20161020180657_add_minimum_key_length_to_application_settings.rb2
-rw-r--r--db/migrate/20161021114307_add_lock_version_to_build_and_pipelines.rb2
-rw-r--r--db/migrate/20161024042317_migrate_mailroom_queue_from_default.rb2
-rw-r--r--db/migrate/20161025231710_migrate_jira_to_gem.rb2
-rw-r--r--db/migrate/20161031155516_add_housekeeping_to_application_settings.rb2
-rw-r--r--db/migrate/20161031171301_add_project_id_to_subscriptions.rb2
-rw-r--r--db/migrate/20161031174110_migrate_subscriptions_project_id.rb2
-rw-r--r--db/migrate/20161031181638_add_unique_index_to_subscriptions.rb2
-rw-r--r--db/migrate/20161103171205_rename_repository_storage_column.rb2
-rw-r--r--db/migrate/20161103191444_add_sidekiq_throttling_to_application_settings.rb2
-rw-r--r--db/migrate/20161106185620_add_project_import_data_project_index.rb2
-rw-r--r--db/migrate/20161113184239_create_user_chat_names_table.rb2
-rw-r--r--db/migrate/20161114024742_add_coverage_regex_to_builds.rb2
-rw-r--r--db/migrate/20161115173905_add_start_date_to_milestones.rb2
-rw-r--r--db/migrate/20161117114805_remove_undeleted_groups.rb2
-rw-r--r--db/migrate/20161118183841_add_commit_events_to_services.rb2
-rw-r--r--db/migrate/20161124111390_add_parent_id_to_namespace.rb2
-rw-r--r--db/migrate/20161124111395_add_index_to_parent_id.rb2
-rw-r--r--db/migrate/20161124111402_add_routes_table.rb2
-rw-r--r--db/migrate/20161124141322_migrate_process_commit_worker_jobs.rb2
-rw-r--r--db/migrate/20161128095517_add_in_reply_to_discussion_id_to_sent_notifications.rb2
-rw-r--r--db/migrate/20161128142110_remove_unnecessary_indexes.rb2
-rw-r--r--db/migrate/20161128161412_add_html_emails_enabled_to_application_settings.rb2
-rw-r--r--db/migrate/20161130095245_fill_routes_table.rb2
-rw-r--r--db/migrate/20161130101252_fill_projects_routes_table.rb2
-rw-r--r--db/migrate/20161201001911_add_plant_uml_url_to_application_settings.rb2
-rw-r--r--db/migrate/20161201155511_create_project_statistics.rb2
-rw-r--r--db/migrate/20161201160452_migrate_project_statistics.rb2
-rw-r--r--db/migrate/20161202152031_remove_duplicates_from_routes.rb2
-rw-r--r--db/migrate/20161202152035_add_index_to_routes.rb2
-rw-r--r--db/migrate/20161206003819_add_plant_uml_enabled_to_application_settings.rb2
-rw-r--r--db/migrate/20161206153749_remove_uniq_path_index_from_namespace.rb2
-rw-r--r--db/migrate/20161206153751_add_path_index_to_namespace.rb2
-rw-r--r--db/migrate/20161206153753_remove_uniq_name_index_from_namespace.rb2
-rw-r--r--db/migrate/20161206153754_add_name_index_to_namespace.rb2
-rw-r--r--db/migrate/20161207231620_fixup_environment_name_uniqueness.rb2
-rw-r--r--db/migrate/20161207231621_create_environment_name_unique_index.rb2
-rw-r--r--db/migrate/20161207231626_add_environment_slug.rb2
-rw-r--r--db/migrate/20161209153400_add_unique_index_for_environment_slug.rb2
-rw-r--r--db/migrate/20161209165216_create_doorkeeper_openid_connect_tables.rb2
-rw-r--r--db/migrate/20161212142807_add_lower_path_index_to_routes.rb2
-rw-r--r--db/migrate/20161213172958_change_slack_service_to_slack_notification_service.rb2
-rw-r--r--db/migrate/20161220141214_remove_dot_git_from_group_names.rb2
-rw-r--r--db/migrate/20161221152132_add_last_used_at_to_key.rb2
-rw-r--r--db/migrate/20161223034433_add_estimate_to_issuables_ce.rb2
-rw-r--r--db/migrate/20161223034646_create_timelogs_ce.rb2
-rw-r--r--db/migrate/20161226122833_remove_dot_git_from_usernames.rb2
-rw-r--r--db/migrate/20161227192806_rename_slack_and_mattermost_notification_services.rb2
-rw-r--r--db/migrate/20161228124936_change_expires_at_to_date_in_personal_access_tokens.rb2
-rw-r--r--db/migrate/20161228135550_add_impersonation_to_personal_access_tokens.rb2
-rw-r--r--db/migrate/20170120131253_create_chat_teams.rb2
-rw-r--r--db/migrate/20170121123724_add_index_to_ci_builds_for_status_runner_id_and_type.rb2
-rw-r--r--db/migrate/20170121130655_add_index_to_ci_runners_for_is_shared.rb2
-rw-r--r--db/migrate/20170124174637_add_foreign_keys_to_timelogs.rb2
-rw-r--r--db/migrate/20170124193147_add_two_factor_columns_to_namespaces.rb2
-rw-r--r--db/migrate/20170124193205_add_two_factor_columns_to_users.rb2
-rw-r--r--db/migrate/20170126174819_add_terminal_max_session_time_to_application_settings.rb2
-rw-r--r--db/migrate/20170127032550_remove_backlog_lists_from_boards.rb2
-rw-r--r--db/migrate/20170130204620_add_index_to_project_authorizations.rb2
-rw-r--r--db/migrate/20170130221926_create_uploads.rb2
-rw-r--r--db/migrate/20170131221752_add_relative_position_to_issues.rb2
-rw-r--r--db/migrate/20170204172458_add_name_to_route.rb2
-rw-r--r--db/migrate/20170204181513_add_index_to_labels_for_type_and_project.rb2
-rw-r--r--db/migrate/20170206071414_add_recaptcha_verified_to_spam_logs.rb2
-rw-r--r--db/migrate/20170206115204_add_column_ghost_to_users.rb2
-rw-r--r--db/migrate/20170210062829_add_index_to_labels_for_title_and_project.rb2
-rw-r--r--db/migrate/20170210075922_add_index_to_ci_trigger_requests_for_commit_id.rb2
-rw-r--r--db/migrate/20170210103609_add_index_to_user_agent_detail.rb2
-rw-r--r--db/migrate/20170210131347_add_unique_ips_limit_to_application_settings.rb2
-rw-r--r--db/migrate/20170214084746_add_default_artifacts_expiration_to_application_settings.rb2
-rw-r--r--db/migrate/20170216135621_add_index_for_latest_successful_pipeline.rb2
-rw-r--r--db/migrate/20170216141440_drop_index_for_builds_project_status.rb2
-rw-r--r--db/migrate/20170217132157_rename_merge_when_build_succeeds.rb2
-rw-r--r--db/migrate/20170217151947_rename_only_allow_merge_if_build_succeeds.rb2
-rw-r--r--db/migrate/20170217151948_add_owner_id_to_triggers.rb2
-rw-r--r--db/migrate/20170217151949_add_description_to_triggers.rb2
-rw-r--r--db/migrate/20170222111732_create_gpg_keys.rb2
-rw-r--r--db/migrate/20170222143317_drop_ci_projects.rb2
-rw-r--r--db/migrate/20170222143500_remove_old_project_id_columns.rb2
-rw-r--r--db/migrate/20170222143603_rename_gl_project_id_to_project_id.rb2
-rw-r--r--db/migrate/20170301101006_add_ci_runner_namespaces.rb2
-rw-r--r--db/migrate/20170301125302_add_printing_merge_request_link_enabled_to_project.rb2
-rw-r--r--db/migrate/20170301195939_rename_ci_commits_to_ci_pipelines.rb2
-rw-r--r--db/migrate/20170301205639_remove_unused_ci_tables_and_columns.rb2
-rw-r--r--db/migrate/20170305180853_add_auto_cancel_pending_pipelines_to_project.rb2
-rw-r--r--db/migrate/20170305203726_add_owner_id_foreign_key.rb2
-rw-r--r--db/migrate/20170307125949_add_last_activity_on_to_users.rb2
-rw-r--r--db/migrate/20170309173138_create_protected_tags.rb2
-rw-r--r--db/migrate/20170312114329_add_auto_canceled_by_id_to_pipeline.rb2
-rw-r--r--db/migrate/20170312114529_add_auto_canceled_by_id_foreign_key_to_pipeline.rb2
-rw-r--r--db/migrate/20170313213916_add_index_to_user_ghost.rb2
-rw-r--r--db/migrate/20170314082049_create_system_note_metadata.rb2
-rw-r--r--db/migrate/20170315174634_revert_add_notified_of_own_activity_to_users.rb2
-rw-r--r--db/migrate/20170315194013_add_closed_at_to_issues.rb2
-rw-r--r--db/migrate/20170316061730_readd_notified_of_own_activity_to_users.rb2
-rw-r--r--db/migrate/20170316163845_move_uploads_to_system_dir.rb2
-rw-r--r--db/migrate/20170317203554_index_routes_path_for_like.rb2
-rw-r--r--db/migrate/20170320173259_migrate_assignees.rb2
-rw-r--r--db/migrate/20170322013926_create_container_repository.rb2
-rw-r--r--db/migrate/20170327091750_add_created_at_index_to_deployments.rb2
-rw-r--r--db/migrate/20170328010804_add_uuid_to_application_settings.rb2
-rw-r--r--db/migrate/20170329095325_add_ref_to_triggers.rb2
-rw-r--r--db/migrate/20170329095907_create_ci_trigger_schedules.rb2
-rw-r--r--db/migrate/20170329124448_add_polling_interval_multiplier_to_application_settings.rb2
-rw-r--r--db/migrate/20170330141723_disable_invalid_service_templates2.rb2
-rw-r--r--db/migrate/20170402231018_remove_index_for_users_current_sign_in_at.rb2
-rw-r--r--db/migrate/20170404163427_add_trigger_id_foreign_key.rb2
-rw-r--r--db/migrate/20170405080720_add_import_jid_to_projects.rb2
-rw-r--r--db/migrate/20170406114958_add_auto_canceled_by_id_to_ci_builds.rb2
-rw-r--r--db/migrate/20170406115029_add_auto_canceled_by_id_foreign_key_to_ci_builds.rb2
-rw-r--r--db/migrate/20170407114956_add_ref_to_ci_trigger_schedule.rb2
-rw-r--r--db/migrate/20170407122426_add_active_to_ci_trigger_schedule.rb2
-rw-r--r--db/migrate/20170407135259_add_foreigh_key_trigger_requests_trigger.rb2
-rw-r--r--db/migrate/20170407140450_add_index_to_next_run_at_and_active.rb2
-rw-r--r--db/migrate/20170410133135_add_version_field_to_markdown_cache.rb2
-rw-r--r--db/migrate/20170413035209_add_preferred_language_to_users.rb2
-rw-r--r--db/migrate/20170418103908_delete_orphan_notification_settings.rb2
-rw-r--r--db/migrate/20170419001229_add_index_to_system_note_metadata.rb2
-rw-r--r--db/migrate/20170421102337_remove_nil_type_services.rb2
-rw-r--r--db/migrate/20170423064036_add_index_on_ci_builds_updated_at.rb2
-rw-r--r--db/migrate/20170424095707_add_index_on_ci_builds_user_id.rb2
-rw-r--r--db/migrate/20170424142900_add_index_to_web_hooks_type.rb2
-rw-r--r--db/migrate/20170425112128_create_pipeline_schedules_table.rb2
-rw-r--r--db/migrate/20170425112628_remove_foreigh_key_ci_trigger_schedules.rb2
-rw-r--r--db/migrate/20170425114731_add_pipeline_schedule_id_to_pipelines.rb2
-rw-r--r--db/migrate/20170426175636_fill_missing_uuid_on_application_settings.rb2
-rw-r--r--db/migrate/20170426181740_add_index_on_ci_runners_contacted_at.rb2
-rw-r--r--db/migrate/20170427103502_create_web_hook_logs.rb2
-rw-r--r--db/migrate/20170427215854_create_redirect_routes.rb2
-rw-r--r--db/migrate/20170428064307_add_column_delete_error_to_projects.rb2
-rw-r--r--db/migrate/20170502065653_make_auto_cancel_pending_pipelines_on_by_default.rb2
-rw-r--r--db/migrate/20170502135553_create_index_ci_pipelines_auto_canceled_by_id.rb2
-rw-r--r--db/migrate/20170502140503_create_index_ci_builds_auto_canceled_by_id.rb2
-rw-r--r--db/migrate/20170503004125_add_last_repository_updated_at_to_projects.rb2
-rw-r--r--db/migrate/20170503004425_add_index_to_last_repository_updated_at_on_projects.rb2
-rw-r--r--db/migrate/20170503004426_add_retried_to_ci_build.rb2
-rw-r--r--db/migrate/20170503021915_add_last_edited_at_and_last_edited_by_id_to_issues.rb2
-rw-r--r--db/migrate/20170503022548_add_last_edited_at_and_last_edited_by_id_to_merge_requests.rb2
-rw-r--r--db/migrate/20170503023315_add_repository_update_events_to_web_hooks.rb2
-rw-r--r--db/migrate/20170503114228_add_description_to_snippets.rb2
-rw-r--r--db/migrate/20170503140201_reschedule_project_authorizations.rb2
-rw-r--r--db/migrate/20170503140202_turn_nested_groups_into_regular_groups_for_mysql.rb2
-rw-r--r--db/migrate/20170503184421_add_index_to_redirect_routes.rb2
-rw-r--r--db/migrate/20170503185032_index_redirect_routes_path_for_like.rb2
-rw-r--r--db/migrate/20170504102911_add_clientside_sentry_to_application_settings.rb2
-rw-r--r--db/migrate/20170504182103_add_index_project_group_links_group_id.rb2
-rw-r--r--db/migrate/20170506085040_add_index_to_pipeline_pipeline_schedule_id.rb2
-rw-r--r--db/migrate/20170506091344_add_foreign_key_to_pipeline_schedules.rb2
-rw-r--r--db/migrate/20170506185517_add_foreign_key_pipeline_schedules_and_pipelines.rb2
-rw-r--r--db/migrate/20170507205316_add_head_pipeline_id_to_merge_requests.rb2
-rw-r--r--db/migrate/20170508153950_add_not_null_contraints_to_ci_variables.rb2
-rw-r--r--db/migrate/20170508190732_add_foreign_key_to_ci_variables.rb2
-rw-r--r--db/migrate/20170511082759_rename_web_hooks_build_events_to_job_events.rb2
-rw-r--r--db/migrate/20170511083824_rename_services_build_events_to_job_events.rb2
-rw-r--r--db/migrate/20170516153305_migrate_assignee_to_separate_table.rb2
-rw-r--r--db/migrate/20170516183131_add_indices_to_issue_assignees.rb2
-rw-r--r--db/migrate/20170519102115_add_prometheus_settings_to_metrics_settings.rb2
-rw-r--r--db/migrate/20170521184006_add_change_position_to_notes.rb2
-rw-r--r--db/migrate/20170523091700_add_rss_token_to_users.rb2
-rw-r--r--db/migrate/20170523121229_create_conversational_development_index_metrics.rb2
-rw-r--r--db/migrate/20170524125940_add_source_to_ci_pipeline.rb2
-rw-r--r--db/migrate/20170524161101_add_protected_to_ci_variables.rb2
-rw-r--r--db/migrate/20170525130346_create_group_variables_table.rb2
-rw-r--r--db/migrate/20170525130758_add_foreign_key_to_group_variables.rb2
-rw-r--r--db/migrate/20170525132202_create_pipeline_stages.rb2
-rw-r--r--db/migrate/20170525174156_create_feature_tables.rb2
-rw-r--r--db/migrate/20170526185602_add_stage_id_to_ci_builds.rb2
-rw-r--r--db/migrate/20170530130129_project_foreign_keys_with_cascading_deletes.rb2
-rw-r--r--db/migrate/20170531180233_add_authorized_keys_enabled_to_application_settings.rb2
-rw-r--r--db/migrate/20170531202042_rename_users_ldap_email_to_external_email.rb2
-rw-r--r--db/migrate/20170601163708_add_artifacts_store_to_ci_build.rb2
-rw-r--r--db/migrate/20170602154736_add_help_page_hide_commercial_content_to_application_settings.rb2
-rw-r--r--db/migrate/20170602154813_add_help_page_support_url_to_application_settings.rb2
-rw-r--r--db/migrate/20170603200744_add_email_provider_to_users.rb2
-rw-r--r--db/migrate/20170606154216_add_notification_setting_columns.rb2
-rw-r--r--db/migrate/20170608152747_prepare_events_table_for_push_events_migration.rb2
-rw-r--r--db/migrate/20170608152748_create_push_event_payloads_tables.rb2
-rw-r--r--db/migrate/20170608171156_create_merge_request_diff_files.rb2
-rw-r--r--db/migrate/20170613154149_create_gpg_signatures.rb2
-rw-r--r--db/migrate/20170616133147_create_merge_request_diff_commits.rb2
-rw-r--r--db/migrate/20170619144837_add_index_for_head_pipeline_merge_request.rb2
-rw-r--r--db/migrate/20170620064728_create_ci_pipeline_schedule_variables.rb2
-rw-r--r--db/migrate/20170620065449_add_foreign_key_to_ci_pipeline_schedule_variables.rb2
-rw-r--r--db/migrate/20170622130029_correct_protected_branches_foreign_keys.rb2
-rw-r--r--db/migrate/20170622132212_add_foreign_key_for_merge_request_diffs.rb2
-rw-r--r--db/migrate/20170622135451_rename_duplicated_variable_key.rb2
-rw-r--r--db/migrate/20170622135628_add_environment_scope_to_ci_variables.rb2
-rw-r--r--db/migrate/20170622135728_add_unique_constraint_to_ci_variables.rb2
-rw-r--r--db/migrate/20170622162730_add_ref_fetched_to_merge_request.rb2
-rw-r--r--db/migrate/20170623080805_remove_ci_variables_project_id_index.rb2
-rw-r--r--db/migrate/20170629171610_rename_application_settings_signin_enabled_to_password_authentication_enabled.rb2
-rw-r--r--db/migrate/20170703102400_add_stage_id_foreign_key_to_builds.rb2
-rw-r--r--db/migrate/20170706151212_add_performance_bar_allowed_group_id_to_application_settings.rb2
-rw-r--r--db/migrate/20170707183807_add_group_id_to_milestones.rb2
-rw-r--r--db/migrate/20170707184243_add_group_milestone_id_indexes.rb2
-rw-r--r--db/migrate/20170707184244_remove_wrong_versions_from_schema_versions.rb2
-rw-r--r--db/migrate/20170710083355_clean_stage_id_reference_migration.rb2
-rw-r--r--db/migrate/20170711145320_add_status_to_ci_stages.rb2
-rw-r--r--db/migrate/20170713104829_add_foreign_key_to_merge_requests.rb2
-rw-r--r--db/migrate/20170717074009_move_system_upload_folder.rb2
-rw-r--r--db/migrate/20170717200542_add_trusted_column_to_oauth_applications.rb2
-rw-r--r--db/migrate/20170720111708_add_lock_version_to_ci_stages.rb2
-rw-r--r--db/migrate/20170720122741_create_user_custom_attributes.rb2
-rw-r--r--db/migrate/20170720130522_create_ci_pipeline_variables.rb2
-rw-r--r--db/migrate/20170720130749_add_foreign_key_to_ci_pipeline_variables.rb2
-rw-r--r--db/migrate/20170724214302_add_lower_path_index_to_redirect_routes.rb2
-rw-r--r--db/migrate/20170725145659_add_binary_to_merge_request_diff_files.rb2
-rw-r--r--db/migrate/20170727123534_add_index_on_events_project_id_id.rb2
-rw-r--r--db/migrate/20170731175128_add_percentages_to_conv_dev.rb2
-rw-r--r--db/migrate/20170731183033_add_merge_jid_to_merge_requests.rb2
-rw-r--r--db/migrate/20170802013652_add_storage_fields_to_project.rb2
-rw-r--r--db/migrate/20170803130232_reorganise_issues_indexes_for_faster_sorting.rb2
-rw-r--r--db/migrate/20170807071105_add_hashed_storage_to_settings.rb2
-rw-r--r--db/migrate/20170809133343_add_broadcast_messages_index.rb2
-rw-r--r--db/migrate/20170809134534_add_broadcast_message_not_null_constraints.rb2
-rw-r--r--db/migrate/20170809142252_cleanup_appearances_schema.rb2
-rw-r--r--db/migrate/20170809161910_add_project_export_enabled_to_application_settings.rb2
-rw-r--r--db/migrate/20170815221154_add_discussion_locked_to_issuable.rb2
-rw-r--r--db/migrate/20170816133938_add_access_level_to_ci_runners.rb2
-rw-r--r--db/migrate/20170816133940_add_protected_to_ci_builds.rb2
-rw-r--r--db/migrate/20170816143940_add_protected_to_ci_pipelines.rb2
-rw-r--r--db/migrate/20170816153940_add_index_on_ci_builds_protected.rb2
-rw-r--r--db/migrate/20170816234252_add_theme_id_to_users.rb2
-rw-r--r--db/migrate/20170817123339_add_verification_status_to_gpg_signatures.rb2
-rw-r--r--db/migrate/20170820100558_correct_protected_tags_foreign_keys.rb2
-rw-r--r--db/migrate/20170820120108_create_user_synced_attributes_metadata.rb2
-rw-r--r--db/migrate/20170824101926_add_auto_devops_enabled_to_application_settings.rb2
-rw-r--r--db/migrate/20170824162758_allow_appearances_description_html_null.rb2
-rw-r--r--db/migrate/20170825015534_add_file_store_to_lfs_objects.rb2
-rw-r--r--db/migrate/20170825104051_migrate_issues_to_ghost_user.rb2
-rw-r--r--db/migrate/20170825154015_resolve_outdated_diff_discussions.rb2
-rw-r--r--db/migrate/20170827123848_add_index_on_merge_request_diff_commit_sha.rb2
-rw-r--r--db/migrate/20170828093725_create_project_auto_dev_ops.rb2
-rw-r--r--db/migrate/20170828135939_migrate_user_external_mail_data.rb2
-rw-r--r--db/migrate/20170830125940_add_failure_reason_to_ci_builds.rb2
-rw-r--r--db/migrate/20170830130119_steal_remaining_event_migration_jobs.rb2
-rw-r--r--db/migrate/20170830131015_swap_event_migration_tables.rb2
-rw-r--r--db/migrate/20170831092813_add_config_source_to_pipelines.rb2
-rw-r--r--db/migrate/20170901071411_add_foreign_key_to_issue_author.rb2
-rw-r--r--db/migrate/20170904092148_add_email_confirmation.rb2
-rw-r--r--db/migrate/20170905112933_add_resolved_by_push_to_notes.rb2
-rw-r--r--db/migrate/20170906133745_add_runners_token_to_groups.rb2
-rw-r--r--db/migrate/20170909090114_add_email_confirmation_index.rb2
-rw-r--r--db/migrate/20170909150936_add_spent_at_to_timelogs.rb2
-rw-r--r--db/migrate/20170912113435_clean_stages_statuses_migration.rb2
-rw-r--r--db/migrate/20170913131410_environments_project_id_not_null.rb2
-rw-r--r--db/migrate/20170914135630_add_index_for_recent_push_events.rb2
-rw-r--r--db/migrate/20170918072948_create_job_artifacts.rb2
-rw-r--r--db/migrate/20170918072949_add_file_store_job_artifacts.rb2
-rw-r--r--db/migrate/20170918111708_create_project_custom_attributes.rb2
-rw-r--r--db/migrate/20170918140927_create_group_custom_attributes.rb2
-rw-r--r--db/migrate/20170918222253_reorganize_deployments_indexes.rb2
-rw-r--r--db/migrate/20170918223303_add_deployments_index_for_last_deployment.rb2
-rw-r--r--db/migrate/20170919211300_remove_temporary_ci_builds_index.rb2
-rw-r--r--db/migrate/20170921115009_add_project_repository_storage_index.rb2
-rw-r--r--db/migrate/20170924094327_create_gcp_clusters.rb2
-rw-r--r--db/migrate/20170925184228_add_favicon_to_appearances.rb2
-rw-r--r--db/migrate/20170927095921_add_ci_builds_index_for_jobscontroller.rb2
-rw-r--r--db/migrate/20170927122209_add_partial_index_for_labels_template.rb2
-rw-r--r--db/migrate/20170927161718_create_gpg_key_subkeys.rb2
-rw-r--r--db/migrate/20170928100231_add_composite_index_on_merge_requests_merge_commit_sha.rb2
-rw-r--r--db/migrate/20170928124105_create_fork_networks.rb2
-rw-r--r--db/migrate/20170928133643_create_fork_network_members.rb2
-rw-r--r--db/migrate/20170929080234_add_failure_reason_to_pipelines.rb2
-rw-r--r--db/migrate/20170929131201_populate_fork_networks.rb2
-rw-r--r--db/migrate/20171004121444_make_sure_fast_forward_option_exists.rb2
-rw-r--r--db/migrate/20171006090001_create_ci_build_trace_sections.rb2
-rw-r--r--db/migrate/20171006090010_add_build_foreign_key_to_ci_build_trace_sections.rb2
-rw-r--r--db/migrate/20171006090100_create_ci_build_trace_section_names.rb2
-rw-r--r--db/migrate/20171006091000_add_name_foreign_key_to_ci_build_trace_sections.rb2
-rw-r--r--db/migrate/20171006220837_add_global_rate_limits_to_application_settings.rb2
-rw-r--r--db/migrate/20171012101043_add_circuit_breaker_properties_to_application_settings.rb2
-rw-r--r--db/migrate/20171012125712_migrate_user_authentication_token_to_personal_access_token.rb2
-rw-r--r--db/migrate/20171013094327_create_new_clusters_architectures.rb2
-rw-r--r--db/migrate/20171017145932_add_new_circuitbreaker_settings_to_application_settings.rb2
-rw-r--r--db/migrate/20171019141859_fix_dev_timezone_schema.rb2
-rw-r--r--db/migrate/20171025110159_add_latest_merge_request_diff_id_to_merge_requests.rb2
-rw-r--r--db/migrate/20171031100710_create_clusters_kubernetes_helm_apps.rb2
-rw-r--r--db/migrate/20171101130535_add_gitaly_timeout_properties_to_application_settings.rb2
-rw-r--r--db/migrate/20171103000000_set_uploads_path_size_for_mysql.rb2
-rw-r--r--db/migrate/20171106101200_create_clusters_kubernetes_ingress_apps.rb2
-rw-r--r--db/migrate/20171106132212_issues_confidential_not_null.rb2
-rw-r--r--db/migrate/20171106133143_rename_application_settings_password_authentication_enabled_to_password_authentication_enabled_for_web.rb2
-rw-r--r--db/migrate/20171106133911_add_password_authentication_enabled_for_git_to_application_settings.rb2
-rw-r--r--db/migrate/20171106135924_issues_milestone_id_foreign_key.rb2
-rw-r--r--db/migrate/20171106150657_issues_updated_by_id_foreign_key.rb2
-rw-r--r--db/migrate/20171106151218_issues_moved_to_id_foreign_key.rb2
-rw-r--r--db/migrate/20171106155656_turn_issues_due_date_index_to_partial_index.rb2
-rw-r--r--db/migrate/20171106171453_add_timezone_to_issues_closed_at.rb2
-rw-r--r--db/migrate/20171114150259_merge_requests_author_id_foreign_key.rb2
-rw-r--r--db/migrate/20171114160005_merge_requests_assignee_id_foreign_key.rb2
-rw-r--r--db/migrate/20171114160904_merge_requests_updated_by_id_foreign_key.rb2
-rw-r--r--db/migrate/20171114161720_merge_requests_merge_user_id_foreign_key.rb2
-rw-r--r--db/migrate/20171114161914_merge_requests_source_project_id_foreign_key.rb2
-rw-r--r--db/migrate/20171114162227_merge_requests_milestone_id_foreign_key.rb2
-rw-r--r--db/migrate/20171115164540_populate_merge_requests_latest_merge_request_diff_id_take_two.rb2
-rw-r--r--db/migrate/20171116135628_add_environment_scope_to_clusters.rb2
-rw-r--r--db/migrate/20171121135738_clean_up_from_merge_request_diffs_and_commits.rb2
-rw-r--r--db/migrate/20171121144800_ci_pipelines_index_on_project_id_ref_status_id.rb2
-rw-r--r--db/migrate/20171122131600_add_new_project_guidelines_to_appearances.rb2
-rw-r--r--db/migrate/20171123094802_add_circuitbreaker_check_interval_to_application_settings.rb2
-rw-r--r--db/migrate/20171124125042_add_default_values_to_merge_request_states.rb2
-rw-r--r--db/migrate/20171124125748_populate_missing_merge_request_statuses.rb2
-rw-r--r--db/migrate/20171124132536_make_merge_request_statuses_not_null.rb2
-rw-r--r--db/migrate/20171127151038_add_events_related_columns_to_merge_request_metrics.rb2
-rw-r--r--db/migrate/20171204204233_add_permanent_to_redirect_route.rb2
-rw-r--r--db/migrate/20171206221519_add_permanent_index_to_redirect_route.rb2
-rw-r--r--db/migrate/20171207185153_add_merge_request_state_index.rb2
-rw-r--r--db/migrate/20171211145425_add_can_push_to_deploy_keys_projects.rb2
-rw-r--r--db/migrate/20171212203433_create_clusters_applications_prometheus.rb2
-rw-r--r--db/migrate/20171214144320_add_store_column_to_uploads.rb2
-rw-r--r--db/migrate/20171215113714_populate_can_push_from_deploy_keys_projects.rb2
-rw-r--r--db/migrate/20171216111734_clean_up_for_members.rb2
-rw-r--r--db/migrate/20171216112339_add_foreign_key_for_members.rb2
-rw-r--r--db/migrate/20171220191323_add_index_on_namespaces_lower_name.rb2
-rw-r--r--db/migrate/20171222115326_add_confidential_note_events_to_web_hooks.rb2
-rw-r--r--db/migrate/20171222183504_add_jobs_cache_index_to_project.rb2
-rw-r--r--db/migrate/20171229225929_change_user_project_limit_not_null_and_remove_default.rb2
-rw-r--r--db/migrate/20171230123729_add_rebase_commit_sha_to_merge_requests_ce.rb2
-rw-r--r--db/migrate/20180101160629_create_prometheus_metrics.rb2
-rw-r--r--db/migrate/20180101160630_change_project_id_for_prometheus_metrics.rb2
-rw-r--r--db/migrate/20180102220145_add_pages_https_only_to_projects.rb2
-rw-r--r--db/migrate/20180103123548_add_confidential_note_events_to_services.rb2
-rw-r--r--db/migrate/20180105212544_add_commits_count_to_merge_request_diff.rb2
-rw-r--r--db/migrate/20180109183319_change_default_value_for_pages_https_only.rb2
-rw-r--r--db/migrate/20180113220114_rework_redirect_routes_indexes.rb2
-rw-r--r--db/migrate/20180115201419_add_index_updated_at_to_issues.rb2
-rw-r--r--db/migrate/20180116193854_create_lfs_file_locks.rb2
-rw-r--r--db/migrate/20180119135717_add_uploader_index_to_uploads.rb2
-rw-r--r--db/migrate/20180119160751_optimize_ci_job_artifacts.rb2
-rw-r--r--db/migrate/20180122162010_add_auto_devops_domain_to_application_settings.rb2
-rw-r--r--db/migrate/20180125214301_create_user_callouts.rb2
-rw-r--r--db/migrate/20180129193323_add_uploads_builder_context.rb2
-rw-r--r--db/migrate/20180201102129_add_unique_constraint_to_trending_projects_project_id.rb2
-rw-r--r--db/migrate/20180201110056_add_foreign_keys_to_todos.rb2
-rw-r--r--db/migrate/20180201145907_migrate_remaining_issues_closed_at.rb2
-rw-r--r--db/migrate/20180206200543_reset_events_primary_key_sequence.rb2
-rw-r--r--db/migrate/20180208183958_schedule_populate_untracked_uploads_if_needed.rb2
-rw-r--r--db/migrate/20180209165249_add_closed_by_to_issues.rb2
-rw-r--r--db/migrate/20180212030105_add_external_ip_to_clusters_applications_ingress.rb2
-rw-r--r--db/migrate/20180213131630_add_partial_index_to_projects_for_index_only_scans.rb2
-rw-r--r--db/migrate/20180214093516_create_badges.rb2
-rw-r--r--db/migrate/20180214155405_create_clusters_applications_runners.rb2
-rw-r--r--db/migrate/20180215181245_users_name_lower_index.rb2
-rw-r--r--db/migrate/20180216120000_add_pages_domain_verification.rb2
-rw-r--r--db/migrate/20180216120010_add_pages_domain_verified_at_index.rb2
-rw-r--r--db/migrate/20180216120020_allow_domain_verification_to_be_disabled.rb2
-rw-r--r--db/migrate/20180216120030_add_pages_domain_enabled_until.rb2
-rw-r--r--db/migrate/20180216120040_add_pages_domain_enabled_until_index.rb2
-rw-r--r--db/migrate/20180216120050_pages_domains_verification_grace_period.rb2
-rw-r--r--db/migrate/20180219153455_add_maximum_timeout_to_ci_runners.rb2
-rw-r--r--db/migrate/20180221151752_add_allow_maintainer_to_push_to_merge_requests.rb2
-rw-r--r--db/migrate/20180222043024_add_ip_address_to_runner.rb2
-rw-r--r--db/migrate/20180223120443_create_user_interacted_projects_table.rb2
-rw-r--r--db/migrate/20180223144945_add_allow_local_requests_from_hooks_and_services_to_application_settings.rb2
-rw-r--r--db/migrate/20180226050030_add_checksum_to_ci_job_artifacts.rb2
-rw-r--r--db/migrate/20180227182112_add_group_id_to_boards_ce.rb2
-rw-r--r--db/migrate/20180228172924_add_include_private_contributions_to_users.rb2
-rw-r--r--db/migrate/20180301010859_create_ci_builds_metadata_table.rb2
-rw-r--r--db/migrate/20180302152117_ensure_foreign_keys_on_clusters_applications.rb2
-rw-r--r--db/migrate/20180305095250_create_internal_ids_table.rb2
-rw-r--r--db/migrate/20180305144721_add_privileged_to_runner.rb2
-rw-r--r--db/migrate/20180306134842_add_missing_indexes_acts_as_taggable_on_engine.rb2
-rw-r--r--db/migrate/20180308052825_add_section_name_id_index_on_ci_build_trace_sections.rb2
-rw-r--r--db/migrate/20180308125206_add_user_internal_regex_to_application_setting.rb2
-rw-r--r--db/migrate/20180309121820_reschedule_commits_count_for_merge_request_diff.rb2
-rw-r--r--db/migrate/20180309160427_add_partial_indexes_on_todos.rb2
-rw-r--r--db/migrate/20180319190020_create_deploy_tokens.rb2
-rw-r--r--db/migrate/20180320182229_add_indexes_for_user_activity_queries.rb2
-rw-r--r--db/migrate/20180323150945_add_push_to_merge_request_to_notification_settings.rb2
-rw-r--r--db/migrate/20180326202229_create_ci_build_trace_chunks.rb2
-rw-r--r--db/migrate/20180327101207_remove_index_from_events_table.rb2
-rw-r--r--db/migrate/20180330121048_add_issue_due_to_notification_settings.rb2
-rw-r--r--db/migrate/20180403035759_create_project_ci_cd_settings.rb2
-rw-r--r--db/migrate/20180405142733_create_project_deploy_tokens.rb2
-rw-r--r--db/migrate/20180406204716_add_limits_ci_build_trace_chunks_raw_data_for_mysql.rb2
-rw-r--r--db/migrate/20180408143354_rename_users_rss_token_to_feed_token.rb2
-rw-r--r--db/migrate/20180413022611_create_missing_namespace_for_internal_users.rb2
-rw-r--r--db/migrate/20180416155103_add_further_scope_columns_to_internal_id_table.rb2
-rw-r--r--db/migrate/20180417090132_add_index_constraints_to_internal_id_table.rb2
-rw-r--r--db/migrate/20180417101040_add_tmp_stage_priority_index_to_ci_builds.rb2
-rw-r--r--db/migrate/20180417101940_add_index_to_ci_stage.rb2
-rw-r--r--db/migrate/20180418053107_add_index_to_ci_job_artifacts_file_store.rb2
-rw-r--r--db/migrate/20180420010016_add_pipeline_build_foreign_key.rb2
-rw-r--r--db/migrate/20180420010616_cleanup_build_stage_migration.rb2
-rw-r--r--db/migrate/20180423204600_add_pages_access_level_to_project_feature.rb2
-rw-r--r--db/migrate/20180424090541_add_enforce_terms_to_application_settings.rb2
-rw-r--r--db/migrate/20180424134533_create_application_setting_terms.rb2
-rw-r--r--db/migrate/20180424160449_add_pipeline_iid_to_ci_pipelines.rb2
-rw-r--r--db/migrate/20180425075446_create_term_agreements.rb2
-rw-r--r--db/migrate/20180425131009_assure_commits_count_for_merge_request_diff.rb2
-rw-r--r--db/migrate/20180425205249_add_index_constraints_to_pipeline_iid.rb2
-rw-r--r--db/migrate/20180426102016_add_accepted_term_to_users.rb2
-rw-r--r--db/migrate/20180430101916_add_runner_type_to_ci_runners.rb2
-rw-r--r--db/migrate/20180502122856_create_project_mirror_data.rb2
-rw-r--r--db/migrate/20180503131624_create_remote_mirrors.rb2
-rw-r--r--db/migrate/20180503141722_add_remote_mirror_available_overridden_to_projects.rb2
-rw-r--r--db/migrate/20180503150427_add_index_to_namespaces_runners_token.rb2
-rw-r--r--db/migrate/20180503175053_ensure_missing_columns_to_project_mirror_data.rb2
-rw-r--r--db/migrate/20180503175054_add_indexes_to_project_mirror_data.rb2
-rw-r--r--db/migrate/20180503193542_add_indexes_to_remote_mirror.rb2
-rw-r--r--db/migrate/20180503193953_add_mirror_available_to_application_settings.rb2
-rw-r--r--db/migrate/20180503200320_enable_prometheus_metrics_by_default.rb2
-rw-r--r--db/migrate/20180504195842_project_name_lower_index.rb2
-rw-r--r--db/migrate/20180508055821_make_remote_mirrors_disabled_by_default.rb2
-rw-r--r--db/migrate/20180508100222_add_not_null_constraint_to_project_mirror_data_foreign_key.rb2
-rw-r--r--db/migrate/20180508102840_add_unique_constraint_to_project_mirror_data_project_id_index.rb2
-rw-r--r--db/migrate/20180508135515_set_runner_type_not_null.rb2
-rw-r--r--db/migrate/20180511090724_add_index_on_ci_runners_runner_type.rb2
-rw-r--r--db/migrate/20180511131058_create_clusters_applications_jupyter.rb2
-rw-r--r--db/migrate/20180515005612_add_squash_to_merge_requests.rb2
-rw-r--r--db/migrate/20180515121227_create_notes_diff_files.rb2
-rw-r--r--db/migrate/20180517082340_add_not_null_constraints_to_project_authorizations.rb2
-rw-r--r--db/migrate/20180523042841_rename_merge_requests_allow_maintainer_to_push.rb2
-rw-r--r--db/migrate/20180524132016_merge_requests_target_id_iid_state_partial_index.rb2
-rw-r--r--db/migrate/20180529093006_ensure_remote_mirror_columns.rb2
-rw-r--r--db/migrate/20180530135500_add_index_to_stages_position.rb2
-rw-r--r--db/migrate/20180531185349_add_repository_languages.rb2
-rw-r--r--db/migrate/20180531220618_change_default_value_for_dsa_key_restriction.rb2
-rw-r--r--db/migrate/20180601213245_add_deploy_strategy_to_project_auto_devops.rb2
-rw-r--r--db/migrate/20180607071808_add_push_events_branch_filter_to_web_hooks.rb2
-rw-r--r--db/migrate/20180608091413_add_group_to_todos.rb2
-rw-r--r--db/migrate/20180608110058_rename_merge_requests_allow_collaboration.rb2
-rw-r--r--db/migrate/20180612103626_add_columns_for_helm_tiller_certificates.rb2
-rw-r--r--db/migrate/20180613081317_create_ci_builds_runner_session.rb2
-rw-r--r--db/migrate/20180625113853_create_import_export_uploads.rb2
-rw-r--r--db/migrate/20180626125654_add_index_on_deployable_for_deployments.rb2
-rw-r--r--db/migrate/20180628124813_alter_web_hook_logs_indexes.rb4
-rw-r--r--db/migrate/20180629153018_create_site_statistics.rb2
-rw-r--r--db/migrate/20180702124358_remove_orphaned_routes.rb2
-rw-r--r--db/migrate/20180702134423_generate_missing_routes.rb2
-rw-r--r--db/migrate/20180704204006_add_hide_third_party_offers_to_application_settings.rb2
-rw-r--r--db/migrate/20180705160945_add_file_format_to_ci_job_artifacts.rb2
-rw-r--r--db/migrate/20180710162338_add_foreign_key_from_notification_settings_to_users.rb2
-rw-r--r--db/migrate/20180711103851_drop_duplicate_protected_tags.rb2
-rw-r--r--db/migrate/20180711103922_add_protected_tags_index.rb2
-rw-r--r--db/migrate/20180713092803_create_user_statuses.rb2
-rw-r--r--db/migrate/20180717125853_remove_restricted_todos.rb2
-rw-r--r--db/migrate/20180718005113_add_instance_statistics_visibility_to_application_setting.rb2
-rw-r--r--db/migrate/20180720023512_add_receive_max_input_size_to_application_settings.rb2
-rw-r--r--db/migrate/20180722103201_add_private_profile_to_users.rb2
-rw-r--r--db/migrate/20180723135214_add_web_ide_client_side_preview_enabled_to_application_settings.rb2
-rw-r--r--db/migrate/20180726172057_create_resource_label_events.rb2
-rw-r--r--db/migrate/20180807153545_remove_redundant_status_index_on_ci_builds.rb2
-rw-r--r--db/migrate/20180808162000_add_user_show_add_ssh_key_message_to_application_settings.rb2
-rw-r--r--db/migrate/20180813101999_change_default_of_auto_devops_instance_wide.rb2
-rw-r--r--db/migrate/20180813102000_enable_auto_devops_instance_wide_for_everyone.rb2
-rw-r--r--db/migrate/20180814153625_add_commit_email_to_users.rb2
-rw-r--r--db/migrate/20180815040323_add_authorization_type_to_cluster_platforms_kubernetes.rb2
-rw-r--r--db/migrate/20180815160409_add_file_location_to_ci_job_artifacts.rb2
-rw-r--r--db/migrate/20180815170510_add_partial_index_to_ci_builds_artifacts_file.rb2
-rw-r--r--db/migrate/20180815175440_add_index_on_list_type.rb2
-rw-r--r--db/migrate/20180831164904_fix_prometheus_metric_query_limits.rb2
-rw-r--r--db/migrate/20180831164905_add_common_to_prometheus_metrics.rb2
-rw-r--r--db/migrate/20180831164907_add_index_on_common_for_prometheus_metrics.rb2
-rw-r--r--db/migrate/20180831164908_add_identifier_to_prometheus_metric.rb2
-rw-r--r--db/migrate/20180831164909_add_index_for_identifier_to_prometheus_metric.rb2
-rw-r--r--db/migrate/20180831164910_import_common_metrics.rb2
-rw-r--r--db/migrate/20180901171833_add_project_config_source_status_index_to_pipeline.rb2
-rw-r--r--db/migrate/20180901200537_add_resource_label_event_reference_fields.rb2
-rw-r--r--db/migrate/20180906101639_add_user_ping_consent_to_application_settings.rb2
-rw-r--r--db/migrate/20180907015926_add_legacy_abac_to_cluster_providers_gcp.rb2
-rw-r--r--db/migrate/20180910115836_add_attr_encrypted_columns_to_web_hook.rb2
-rw-r--r--db/migrate/20180910153412_add_token_digest_to_personal_access_tokens.rb2
-rw-r--r--db/migrate/20180910153413_add_index_to_token_digest_on_personal_access_tokens.rb2
-rw-r--r--db/migrate/20180912111628_add_knative_application.rb2
-rw-r--r--db/migrate/20180916011959_add_index_pipelines_project_id_source.rb2
-rw-r--r--db/migrate/20180924141949_add_diff_max_patch_bytes_to_application_settings.rb2
-rw-r--r--db/migrate/20180924190739_add_scheduled_at_to_ci_builds.rb2
-rw-r--r--db/migrate/20180924201039_add_partial_index_to_scheduled_at.rb2
-rw-r--r--db/migrate/20180925200829_create_user_preferences.rb2
-rw-r--r--db/migrate/20180927073410_add_index_to_project_deploy_tokens_deploy_token_id.rb2
-rw-r--r--db/migrate/20181002172433_remove_restricted_todos_with_cte.rb2
-rw-r--r--db/migrate/20181005110927_add_index_to_lfs_objects_file_store.rb2
-rw-r--r--db/migrate/20181005125926_add_index_to_uploads_store.rb2
-rw-r--r--db/migrate/20181009190428_create_clusters_kubernetes_namespaces.rb2
-rw-r--r--db/migrate/20181010235606_create_board_project_recent_visits.rb2
-rw-r--r--db/migrate/20181014203236_create_cluster_groups.rb2
-rw-r--r--db/migrate/20181015155839_add_finished_at_to_deployments.rb2
-rw-r--r--db/migrate/20181016141739_add_status_to_deployments.rb2
-rw-r--r--db/migrate/20181016152238_create_board_group_recent_visits.rb2
-rw-r--r--db/migrate/20181017001059_add_cluster_type_to_clusters.rb2
-rw-r--r--db/migrate/20181019032400_add_shards_table.rb2
-rw-r--r--db/migrate/20181019032408_add_repositories_table.rb2
-rw-r--r--db/migrate/20181019105553_add_projects_pool_repository_id_foreign_key.rb2
-rw-r--r--db/migrate/20181022135539_add_index_on_status_to_deployments.rb2
-rw-r--r--db/migrate/20181023104858_add_archive_builds_duration_to_application_settings.rb2
-rw-r--r--db/migrate/20181023144439_add_partial_index_for_legacy_successful_deployments.rb2
-rw-r--r--db/migrate/20181025115728_add_private_commit_email_hostname_to_application_settings.rb2
-rw-r--r--db/migrate/20181026143227_migrate_snippets_access_level_default_value.rb2
-rw-r--r--db/migrate/20181030154446_add_missing_indexes_for_foreign_keys.rb2
-rw-r--r--db/migrate/20181031190558_drop_fk_gcp_clusters_table.rb2
-rw-r--r--db/migrate/20181031190559_drop_gcp_clusters_table.rb2
-rw-r--r--db/migrate/20181101144347_add_index_for_stuck_mr_query.rb2
-rw-r--r--db/migrate/20181106135939_add_index_to_deployments.rb2
-rw-r--r--db/migrate/20181112103239_drop_default_value_on_status_deployments.rb2
-rw-r--r--db/migrate/gpg_keys_limits_to_mysql.rb2
-rw-r--r--db/migrate/limits_ci_build_trace_chunks_raw_data_for_mysql.rb2
-rw-r--r--db/migrate/limits_to_mysql.rb2
-rw-r--r--db/migrate/markdown_cache_limits_to_mysql.rb2
-rw-r--r--db/migrate/merge_request_diff_file_limits_to_mysql.rb2
-rw-r--r--db/migrate/prometheus_metrics_limits_to_mysql.rb2
-rw-r--r--db/optional_migrations/composite_primary_keys.rb2
-rw-r--r--db/post_migrate/20160824121037_change_personal_access_tokens_default_back_to_empty_array.rb2
-rw-r--r--db/post_migrate/20161011222551_remove_inactive_jira_service_properties.rb2
-rw-r--r--db/post_migrate/20161109150329_fix_project_records_with_invalid_visibility.rb2
-rw-r--r--db/post_migrate/20161128170531_drop_user_activities_table.rb2
-rw-r--r--db/post_migrate/20161221140236_remove_unneeded_services.rb2
-rw-r--r--db/post_migrate/20161221153951_rename_reserved_project_names.rb2
-rw-r--r--db/post_migrate/20170104150317_requeue_pending_delete_projects.rb2
-rw-r--r--db/post_migrate/20170106142508_fill_authorized_projects.rb2
-rw-r--r--db/post_migrate/20170106172224_remove_project_authorizations_id_column.rb2
-rw-r--r--db/post_migrate/20170131214021_reset_users_authorized_projects_populated.rb2
-rw-r--r--db/post_migrate/20170206040400_remove_inactive_default_email_services.rb2
-rw-r--r--db/post_migrate/20170206101007_remove_trackable_columns_from_timelogs.rb2
-rw-r--r--db/post_migrate/20170206101030_validate_foreign_keys_on_timelogs.rb2
-rw-r--r--db/post_migrate/20170209140523_validate_foreign_keys_on_oauth_openid_requests.rb2
-rw-r--r--db/post_migrate/20170211073944_disable_invalid_service_templates.rb2
-rw-r--r--db/post_migrate/20170214111112_delete_deprecated_gitlab_ci_service.rb2
-rw-r--r--db/post_migrate/20170215200045_remove_theme_id_from_users.rb2
-rw-r--r--db/post_migrate/20170301205640_migrate_build_events_to_pipeline_events.rb2
-rw-r--r--db/post_migrate/20170306170512_migrate_legacy_manual_actions.rb2
-rw-r--r--db/post_migrate/20170309171644_reset_relative_position_for_issue.rb2
-rw-r--r--db/post_migrate/20170313133418_rename_more_reserved_project_names.rb2
-rw-r--r--db/post_migrate/20170317162059_update_upload_paths_to_system.rb2
-rw-r--r--db/post_migrate/20170324160416_migrate_user_activities_to_users_last_activity_on.rb2
-rw-r--r--db/post_migrate/20170404170532_remove_notes_original_discussion_id.rb2
-rw-r--r--db/post_migrate/20170406111121_clean_upload_symlinks.rb2
-rw-r--r--db/post_migrate/20170406142253_migrate_user_project_view.rb2
-rw-r--r--db/post_migrate/20170408033905_remove_old_cache_directories.rb2
-rw-r--r--db/post_migrate/20170412174900_rename_reserved_dynamic_paths.rb2
-rw-r--r--db/post_migrate/20170425121605_migrate_trigger_schedules_to_pipeline_schedules.rb2
-rw-r--r--db/post_migrate/20170425130047_drop_ci_trigger_schedules_table.rb2
-rw-r--r--db/post_migrate/20170502070007_enable_auto_cancel_pending_pipelines_for_all.rb2
-rw-r--r--db/post_migrate/20170502101023_cleanup_namespaceless_pending_delete_projects.rb2
-rw-r--r--db/post_migrate/20170503004427_update_retried_for_ci_build.rb2
-rw-r--r--db/post_migrate/20170503120310_remove_users_authorized_projects_populated.rb2
-rw-r--r--db/post_migrate/20170508170547_add_head_pipeline_for_each_merge_request.rb2
-rw-r--r--db/post_migrate/20170510101043_add_foreign_key_on_pipeline_schedule_owner.rb2
-rw-r--r--db/post_migrate/20170511100900_cleanup_rename_web_hooks_build_events_to_job_events.rb2
-rw-r--r--db/post_migrate/20170511101000_cleanup_rename_services_build_events_to_job_events.rb2
-rw-r--r--db/post_migrate/20170516165238_cleanup_trigger_for_issues.rb2
-rw-r--r--db/post_migrate/20170516181025_add_constraints_to_issue_assignees_table.rb2
-rw-r--r--db/post_migrate/20170518200835_rename_users_with_renamed_namespace.rb2
-rw-r--r--db/post_migrate/20170518231126_fix_wrongly_renamed_routes.rb2
-rw-r--r--db/post_migrate/20170523073948_remove_assignee_id_from_issue.rb2
-rw-r--r--db/post_migrate/20170523083112_migrate_old_artifacts.rb2
-rw-r--r--db/post_migrate/20170525140254_rename_all_reserved_paths_again.rb2
-rw-r--r--db/post_migrate/20170526185842_migrate_pipeline_stages.rb2
-rw-r--r--db/post_migrate/20170526185858_create_index_in_pipeline_stages.rb2
-rw-r--r--db/post_migrate/20170526185901_remove_stage_id_index_from_builds.rb2
-rw-r--r--db/post_migrate/20170526185921_migrate_build_stage_reference.rb2
-rw-r--r--db/post_migrate/20170526190000_migrate_build_stage_reference_again.rb2
-rw-r--r--db/post_migrate/20170531203055_cleanup_users_ldap_email_rename.rb2
-rw-r--r--db/post_migrate/20170606202615_move_appearance_to_system_dir.rb2
-rw-r--r--db/post_migrate/20170607121233_convert_custom_notification_settings_to_columns.rb2
-rw-r--r--db/post_migrate/20170609183112_remove_position_from_issuables.rb2
-rw-r--r--db/post_migrate/20170612071012_move_personal_snippets_files.rb2
-rw-r--r--db/post_migrate/20170613111224_clean_appearance_symlinks.rb2
-rw-r--r--db/post_migrate/20170621102400_add_stage_id_index_to_builds.rb2
-rw-r--r--db/post_migrate/20170627101016_schedule_event_migrations.rb2
-rw-r--r--db/post_migrate/20170628080858_migrate_stage_id_reference_in_background.rb2
-rw-r--r--db/post_migrate/20170629180131_cleanup_application_settings_signin_enabled_rename.rb2
-rw-r--r--db/post_migrate/20170703130158_schedule_merge_request_diff_migrations.rb2
-rw-r--r--db/post_migrate/20170711145558_migrate_stages_statuses.rb2
-rw-r--r--db/post_migrate/20170717111152_cleanup_move_system_upload_folder_symlink.rb2
-rw-r--r--db/post_migrate/20170717150329_enqueue_migrate_system_uploads_to_new_folder.rb2
-rw-r--r--db/post_migrate/20170719150301_merge_issuable_reopened_into_opened_state.rb2
-rw-r--r--db/post_migrate/20170728101014_remove_events_from_notification_settings.rb2
-rw-r--r--db/post_migrate/20170803090603_calculate_conv_dev_index_percentages.rb2
-rw-r--r--db/post_migrate/20170807160457_remove_locked_at_column_from_merge_requests.rb2
-rw-r--r--db/post_migrate/20170807190736_move_personal_snippet_files_into_correct_folder.rb2
-rw-r--r--db/post_migrate/20170815060945_remove_duplicate_mr_events.rb2
-rw-r--r--db/post_migrate/20170816102555_cleanup_nonexisting_namespace_pending_delete_projects.rb2
-rw-r--r--db/post_migrate/20170822101017_migrate_pipeline_sidekiq_queues.rb2
-rw-r--r--db/post_migrate/20170828170502_post_deploy_migrate_user_external_mail_data.rb2
-rw-r--r--db/post_migrate/20170828170513_remove_user_email_provider_column.rb2
-rw-r--r--db/post_migrate/20170828170516_remove_user_external_mail_columns.rb2
-rw-r--r--db/post_migrate/20170830084744_destroy_gpg_signatures.rb2
-rw-r--r--db/post_migrate/20170830150306_drop_events_for_migration_table.rb2
-rw-r--r--db/post_migrate/20170831195038_remove_valid_signature_from_gpg_signatures.rb2
-rw-r--r--db/post_migrate/20170907170235_delete_conflicting_redirect_routes.rb2
-rw-r--r--db/post_migrate/20170913180600_fix_projects_without_project_feature.rb2
-rw-r--r--db/post_migrate/20170921101004_normalize_ldap_extern_uids.rb2
-rw-r--r--db/post_migrate/20170926150348_schedule_merge_request_diff_migrations_take_two.rb2
-rw-r--r--db/post_migrate/20170927112318_update_legacy_diff_notes_type_for_import.rb2
-rw-r--r--db/post_migrate/20170927112319_update_notes_type_for_import.rb2
-rw-r--r--db/post_migrate/20171005130944_schedule_create_gpg_key_subkeys_from_gpg_keys.rb2
-rw-r--r--db/post_migrate/20171012150314_remove_user_authentication_token.rb2
-rw-r--r--db/post_migrate/20171013104327_migrate_gcp_clusters_to_new_clusters_architectures.rb2
-rw-r--r--db/post_migrate/20171026082505_schedule_merge_request_latest_merge_request_diff_id_migrations.rb2
-rw-r--r--db/post_migrate/20171101134435_remove_ref_fetched_from_merge_requests.rb2
-rw-r--r--db/post_migrate/20171103140253_track_untracked_uploads.rb2
-rw-r--r--db/post_migrate/20171106133144_cleanup_application_settings_password_authentication_enabled_rename.rb2
-rw-r--r--db/post_migrate/20171106154015_remove_issues_branch_name.rb2
-rw-r--r--db/post_migrate/20171106180641_cleanup_add_timezone_to_issues_closed_at.rb2
-rw-r--r--db/post_migrate/20171114104051_remove_empty_fork_networks.rb2
-rw-r--r--db/post_migrate/20171121160421_remove_merge_request_diff_st_commits_and_st_diffs.rb2
-rw-r--r--db/post_migrate/20171123101020_update_circuitbreaker_defaults.rb2
-rw-r--r--db/post_migrate/20171123101046_remove_old_circuitbreaker_config.rb2
-rw-r--r--db/post_migrate/20171124095655_add_index_on_merge_request_diffs_merge_request_id_and_id.rb2
-rw-r--r--db/post_migrate/20171124100152_remove_index_on_merge_request_diffs_merge_request_diff_id.rb2
-rw-r--r--db/post_migrate/20171124104327_migrate_kubernetes_service_to_new_clusters_architectures.rb2
-rw-r--r--db/post_migrate/20171124150326_reschedule_fork_network_creation.rb2
-rw-r--r--db/post_migrate/20171128214150_schedule_populate_merge_request_metrics_with_events_data.rb2
-rw-r--r--db/post_migrate/20171205190711_reschedule_fork_network_creation_caller.rb2
-rw-r--r--db/post_migrate/20171207150300_remove_project_labels_group_id_copy.rb2
-rw-r--r--db/post_migrate/20171207150343_remove_soft_removed_objects.rb2
-rw-r--r--db/post_migrate/20171207150344_remove_deleted_at_columns.rb2
-rw-r--r--db/post_migrate/20171213160445_migrate_github_importer_advance_stage_sidekiq_queue.rb2
-rw-r--r--db/post_migrate/20171215121205_post_populate_can_push_from_deploy_keys_projects.rb2
-rw-r--r--db/post_migrate/20171215121259_remove_can_push_from_keys.rb2
-rw-r--r--db/post_migrate/20171219121201_normalize_extern_uid_from_identities.rb2
-rw-r--r--db/post_migrate/20171221140220_schedule_issues_closed_at_type_change.rb2
-rw-r--r--db/post_migrate/20180104131052_schedule_set_confidential_note_events_on_webhooks.rb2
-rw-r--r--db/post_migrate/20180119121225_remove_redundant_pipeline_stages.rb2
-rw-r--r--db/post_migrate/20180122154930_schedule_set_confidential_note_events_on_services.rb2
-rw-r--r--db/post_migrate/20180202111106_remove_project_labels_group_id.rb2
-rw-r--r--db/post_migrate/20180204200836_change_author_id_to_not_null_in_todos.rb2
-rw-r--r--db/post_migrate/20180212101828_add_tmp_partial_null_index_to_builds.rb2
-rw-r--r--db/post_migrate/20180212101928_schedule_build_stage_migration.rb2
-rw-r--r--db/post_migrate/20180212102028_remove_tmp_partial_null_index_from_builds.rb2
-rw-r--r--db/post_migrate/20180216121020_fill_pages_domain_verification_code.rb2
-rw-r--r--db/post_migrate/20180216121030_enqueue_verify_pages_domain_workers.rb2
-rw-r--r--db/post_migrate/20180220150310_remove_empty_extern_uid_auth0_identities.rb2
-rw-r--r--db/post_migrate/20180223124427_build_user_interacted_projects_table.rb6
-rw-r--r--db/post_migrate/20180301084653_change_project_namespace_id_not_null.rb2
-rw-r--r--db/post_migrate/20180305100050_remove_permanent_from_redirect_routes.rb2
-rw-r--r--db/post_migrate/20180306074045_migrate_create_trace_artifact_sidekiq_queue.rb2
-rw-r--r--db/post_migrate/20180306164012_add_path_index_to_redirect_routes.rb2
-rw-r--r--db/post_migrate/20180307012445_migrate_update_head_pipeline_for_merge_request_sidekiq_queue.rb2
-rw-r--r--db/post_migrate/20180405101928_reschedule_builds_stages_migration.rb2
-rw-r--r--db/post_migrate/20180408143355_cleanup_users_rss_token_rename.rb2
-rw-r--r--db/post_migrate/20180409170809_populate_missing_project_ci_cd_settings.rb2
-rw-r--r--db/post_migrate/20180420080616_schedule_stages_index_migration.rb2
-rw-r--r--db/post_migrate/20180424151928_fill_file_store.rb2
-rw-r--r--db/post_migrate/20180430143705_backfill_runner_type_for_ci_runners_post_migrate.rb2
-rw-r--r--db/post_migrate/20180502134117_migrate_import_attributes_data_from_projects_to_project_mirror_data.rb2
-rw-r--r--db/post_migrate/20180507083701_set_minimal_project_build_timeout.rb2
-rw-r--r--db/post_migrate/20180511174224_add_unique_constraint_to_project_features_project_id.rb2
-rw-r--r--db/post_migrate/20180512061621_add_not_null_constraint_to_project_features_project_id.rb2
-rw-r--r--db/post_migrate/20180514161336_remove_gemnasium_service.rb2
-rw-r--r--db/post_migrate/20180521162137_migrate_remaining_mr_metrics_populating_background_migration.rb2
-rw-r--r--db/post_migrate/20180523125103_cleanup_merge_requests_allow_maintainer_to_push_rename.rb2
-rw-r--r--db/post_migrate/20180529152628_schedule_to_archive_legacy_traces.rb2
-rw-r--r--db/post_migrate/20180603190921_migrate_object_storage_upload_sidekiq_queue.rb2
-rw-r--r--db/post_migrate/20180604123514_cleanup_stages_position_migration.rb2
-rw-r--r--db/post_migrate/20180608201435_cleanup_merge_requests_allow_collaboration_rename.rb2
-rw-r--r--db/post_migrate/20180619121030_enqueue_delete_diff_files_workers.rb2
-rw-r--r--db/post_migrate/20180629191052_add_partial_index_to_projects_for_last_repository_check_at.rb2
-rw-r--r--db/post_migrate/20180702120647_enqueue_fix_cross_project_label_links.rb2
-rw-r--r--db/post_migrate/20180704145007_update_project_indexes.rb2
-rw-r--r--db/post_migrate/20180706223200_populate_site_statistics.rb2
-rw-r--r--db/post_migrate/20180723130817_delete_inconsistent_internal_id_records.rb2
-rw-r--r--db/post_migrate/20180809195358_migrate_null_wiki_access_levels.rb2
-rw-r--r--db/post_migrate/20180816161409_migrate_legacy_artifacts_to_job_artifacts.rb2
-rw-r--r--db/post_migrate/20180816193530_rename_login_root_namespaces.rb2
-rw-r--r--db/post_migrate/20180826111825_recalculate_site_statistics.rb2
-rw-r--r--db/post_migrate/20180906051323_remove_orphaned_label_links.rb2
-rw-r--r--db/post_migrate/20180913051323_consume_remaining_diff_files_deletion_jobs.rb2
-rw-r--r--db/post_migrate/20180913142237_schedule_digest_personal_access_tokens.rb2
-rw-r--r--db/post_migrate/20180914162043_encrypt_web_hooks_columns.rb2
-rw-r--r--db/post_migrate/20180914201132_remove_sidekiq_throttling_from_application_settings.rb2
-rw-r--r--db/post_migrate/20180916014356_populate_external_pipeline_source.rb2
-rw-r--r--db/post_migrate/20180917172041_remove_wikis_count_from_site_statistics.rb2
-rw-r--r--db/post_migrate/20181008145341_steal_encrypt_columns.rb2
-rw-r--r--db/post_migrate/20181008145359_remove_web_hooks_token_and_url.rb2
-rw-r--r--db/post_migrate/20181008200441_remove_circuit_breaker.rb2
-rw-r--r--db/post_migrate/20181013005024_remove_koding_from_application_settings.rb2
-rw-r--r--db/post_migrate/20181014121030_enqueue_redact_links.rb2
-rw-r--r--db/post_migrate/20181022173835_enqueue_populate_cluster_kubernetes_namespace.rb2
-rw-r--r--db/post_migrate/20181030135124_fill_empty_finished_at_in_deployments.rb2
-rw-r--r--db/post_migrate/20181105201455_steal_fill_store_upload.rb2
-rw-r--r--db/post_migrate/20181107054254_remove_restricted_todos_again.rb2
-rw-r--r--doc/api/issues.md2
-rw-r--r--doc/ci/yaml/README.md4
-rw-r--r--doc/development/README.md2
-rw-r--r--doc/development/contributing/style_guides.md3
-rw-r--r--doc/development/documentation/index.md3
-rw-r--r--doc/development/fe_guide/components.md4
-rw-r--r--doc/development/ui_guide.md110
-rw-r--r--doc/development/ux_guide/animation.md68
-rw-r--r--doc/development/ux_guide/basics.md81
-rw-r--r--doc/development/ux_guide/components.md386
-rw-r--r--doc/development/ux_guide/copy.md203
-rw-r--r--doc/development/ux_guide/features.md56
-rw-r--r--doc/development/ux_guide/illustrations.md87
-rw-r--r--doc/development/ux_guide/index.md69
-rw-r--r--doc/development/ux_guide/principles.md20
-rw-r--r--doc/development/ux_guide/resources.md20
-rw-r--r--doc/development/ux_guide/surfaces.md46
-rw-r--r--doc/development/ux_guide/tips.md43
-rw-r--r--doc/development/ux_guide/users.md309
-rw-r--r--doc/install/database_mysql.md9
-rw-r--r--doc/install/installation.md2
-rw-r--r--doc/integration/shibboleth.md170
-rw-r--r--doc/ssh/README.md2
-rw-r--r--doc/update/6.x-or-7.x-to-7.14.md2
-rw-r--r--doc/user/discussions/img/index_notes_filters.pngbin0 -> 21284 bytes
-rw-r--r--doc/user/discussions/index.md20
-rw-r--r--doc/user/project/integrations/discord_notifications.md2
-rw-r--r--doc/user/project/merge_requests/index.md2
-rw-r--r--doc/workflow/repository_mirroring.md2
-rw-r--r--generator_templates/active_record/migration/create_table_migration.rb2
-rw-r--r--generator_templates/active_record/migration/migration.rb2
-rw-r--r--generator_templates/rails/post_deployment_migration/migration.rb2
-rw-r--r--lib/gitlab/ci/status/build/scheduled.rb2
-rw-r--r--lib/gitlab/gfm/uploads_rewriter.rb2
-rw-r--r--lib/gitlab/git/blob.rb2
-rw-r--r--lib/gitlab/git/repository.rb8
-rw-r--r--lib/gitlab/gitaly_client.rb134
-rw-r--r--lib/gitlab/i18n/po_linter.rb2
-rw-r--r--lib/gitlab/import/merge_request_creator.rb8
-rw-r--r--lib/peek/views/gitaly.rb1
-rw-r--r--lib/rails4_migration_version.rb16
-rw-r--r--lib/system_check/app/git_version_check.rb2
-rw-r--r--lib/system_check/app/ruby_version_check.rb2
-rw-r--r--locale/gitlab.pot81
-rw-r--r--qa/Gemfile.lock4
-rw-r--r--qa/qa/fixtures/auto_devops_rack/Gemfile.lock4
-rw-r--r--qa/qa/runtime/env.rb8
-rw-r--r--qa/qa/runtime/namespace.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb2
-rw-r--r--rubocop/cop/safe_params.rb34
-rw-r--r--rubocop/rubocop.rb1
-rw-r--r--scripts/frontend/prettier.js2
-rwxr-xr-xscripts/trigger-build1
-rw-r--r--spec/controllers/projects/blob_controller_spec.rb2
-rw-r--r--spec/features/issues/gfm_autocomplete_spec.rb54
-rw-r--r--spec/features/merge_request/user_assigns_themselves_spec.rb2
-rw-r--r--spec/features/merge_request/user_resolves_diff_notes_and_discussions_resolve_spec.rb2
-rw-r--r--spec/features/merge_request/user_sees_versions_spec.rb2
-rw-r--r--spec/features/projects/jobs_spec.rb2
-rw-r--r--spec/features/projects/wiki/user_creates_wiki_page_spec.rb2
-rw-r--r--spec/features/projects/wiki/user_updates_wiki_page_spec.rb298
-rw-r--r--spec/features/projects/wiki/user_views_wiki_page_spec.rb224
-rw-r--r--spec/finders/pipeline_schedules_finder_spec.rb2
-rw-r--r--spec/fixtures/emails/paragraphs.eml2
-rw-r--r--spec/initializers/secret_token_spec.rb2
-rw-r--r--spec/javascripts/diffs/components/app_spec.js40
-rw-r--r--spec/javascripts/diffs/components/compare_versions_spec.js21
-rw-r--r--spec/javascripts/ide/components/ide_spec.js2
-rw-r--r--spec/javascripts/ide/stores/actions/file_spec.js4
-rw-r--r--spec/javascripts/ide/stores/actions/merge_request_spec.js6
-rw-r--r--spec/javascripts/ide/stores/actions/tree_spec.js2
-rw-r--r--spec/javascripts/ide/stores/modules/branches/actions_spec.js2
-rw-r--r--spec/javascripts/ide/stores/modules/merge_requests/actions_spec.js2
-rw-r--r--spec/javascripts/ide/stores/modules/pipelines/actions_spec.js6
-rw-r--r--spec/javascripts/issue_show/components/edited_spec.js10
-rw-r--r--spec/javascripts/vue_shared/components/time_ago_tooltip_spec.js13
-rw-r--r--spec/lib/banzai/filter/absolute_link_filter_spec.rb2
-rw-r--r--spec/lib/extracts_path_spec.rb26
-rw-r--r--spec/lib/gitlab/auth/o_auth/user_spec.rb2
-rw-r--r--spec/lib/gitlab/ci/build/policy/changes_spec.rb2
-rw-r--r--spec/lib/gitlab/ci/config/external/file/local_spec.rb2
-rw-r--r--spec/lib/gitlab/ci/pipeline/expression/lexeme/string_spec.rb2
-rw-r--r--spec/lib/gitlab/contributions_calendar_spec.rb2
-rw-r--r--spec/lib/gitlab/cross_project_access/check_info_spec.rb4
-rw-r--r--spec/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_namespaces_spec.rb2
-rw-r--r--spec/lib/gitlab/diff/file_collection/merge_request_diff_spec.rb14
-rw-r--r--spec/lib/gitlab/diff/inline_diff_marker_spec.rb2
-rw-r--r--spec/lib/gitlab/email/reply_parser_spec.rb2
-rw-r--r--spec/lib/gitlab/git/blob_spec.rb12
-rw-r--r--spec/lib/gitlab/git/commit_spec.rb194
-rw-r--r--spec/lib/gitlab/git/merge_base_spec.rb2
-rw-r--r--spec/lib/gitlab/git/tag_spec.rb30
-rw-r--r--spec/lib/gitlab/git/tree_spec.rb14
-rw-r--r--spec/lib/gitlab/gitaly_client_spec.rb126
-rw-r--r--spec/lib/gitlab/multi_collection_paginator_spec.rb2
-rw-r--r--spec/models/ci/build_trace_chunk_spec.rb4
-rw-r--r--spec/models/list_spec.rb4
-rw-r--r--spec/models/merge_request_spec.rb62
-rw-r--r--spec/models/project_wiki_spec.rb250
-rw-r--r--spec/models/repository_spec.rb372
-rw-r--r--spec/models/wiki_page_spec.rb280
-rw-r--r--spec/policies/ci/pipeline_schedule_policy_spec.rb4
-rw-r--r--spec/policies/project_policy_spec.rb2
-rw-r--r--spec/rubocop/cop/safe_params_spec.rb39
-rw-r--r--spec/services/merge_requests/build_service_spec.rb34
-rw-r--r--spec/services/merge_requests/merge_when_pipeline_succeeds_service_spec.rb2
-rw-r--r--spec/services/users/set_status_service_spec.rb2
-rw-r--r--spec/support/gitaly.rb16
-rw-r--r--spec/support/import_export/export_file_helper.rb2
1210 files changed, 2448 insertions, 4201 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index bb37b60b8f3..617c5c084b7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -619,6 +619,11 @@ gitlab:assets:compile:
paths:
- webpack-report/
- public/assets/
+ only:
+ - branches@gitlab-org/gitlab-ce
+ - branches@gitlab-org/gitlab-ee
+ - tags@gitlab-org/gitlab-ce
+ - tags@gitlab-org/gitlab-ee
tags:
- gitlab-org-delivery
- high-cpu
diff --git a/app/assets/javascripts/badges/components/badge.vue b/app/assets/javascripts/badges/components/badge.vue
index ae6029142fe..ae2916e3a3b 100644
--- a/app/assets/javascripts/badges/components/badge.vue
+++ b/app/assets/javascripts/badges/components/badge.vue
@@ -1,17 +1,15 @@
<script>
import Icon from '~/vue_shared/components/icon.vue';
-import Tooltip from '~/vue_shared/directives/tooltip';
-import { GlLoadingIcon } from '@gitlab/ui';
+import { GlLoadingIcon, GlTooltipDirective } from '@gitlab/ui';
export default {
name: 'Badge',
components: {
Icon,
- Tooltip,
GlLoadingIcon,
},
directives: {
- Tooltip,
+ GlTooltip: GlTooltipDirective,
},
props: {
imageUrl: {
@@ -93,7 +91,7 @@ export default {
<button
v-show="hasError"
- v-tooltip
+ v-gl-tooltip.hover
:title="s__('Badges|Reload badge image')"
class="btn btn-transparent btn-sm text-primary"
type="button"
diff --git a/app/assets/javascripts/blob/file_template_mediator.js b/app/assets/javascripts/blob/file_template_mediator.js
index addacf29f1e..106fe2e0cef 100644
--- a/app/assets/javascripts/blob/file_template_mediator.js
+++ b/app/assets/javascripts/blob/file_template_mediator.js
@@ -124,7 +124,7 @@ export default class FileTemplateMediator {
selectTemplateFile(selector, query, data) {
selector.renderLoading();
- // in case undo menu is already already there
+ // in case undo menu is already there
this.destroyUndoMenu();
this.fetchFileTemplate(selector.config.type, query, data)
.then(file => {
diff --git a/app/assets/javascripts/ci_variable_list/ajax_variable_list.js b/app/assets/javascripts/ci_variable_list/ajax_variable_list.js
index c7a917457f3..dffabbfe1b8 100644
--- a/app/assets/javascripts/ci_variable_list/ajax_variable_list.js
+++ b/app/assets/javascripts/ci_variable_list/ajax_variable_list.js
@@ -84,7 +84,7 @@ export default class AjaxVariableList {
.catch(() => {
loadingIcon.classList.toggle('hide', true);
this.variableList.toggleEnableRow(true);
- Flash(s__('CiVariable|Error occured while saving variables'));
+ Flash(s__('CiVariable|Error occurred while saving variables'));
});
}
diff --git a/app/assets/javascripts/cycle_analytics/components/limit_warning_component.vue b/app/assets/javascripts/cycle_analytics/components/limit_warning_component.vue
index 16bc900867a..ff0f352b333 100644
--- a/app/assets/javascripts/cycle_analytics/components/limit_warning_component.vue
+++ b/app/assets/javascripts/cycle_analytics/components/limit_warning_component.vue
@@ -1,9 +1,9 @@
<script>
-import tooltip from '../../vue_shared/directives/tooltip';
+import { GlTooltipDirective } from '@gitlab/ui';
export default {
directives: {
- tooltip,
+ GlTooltip: GlTooltipDirective,
},
props: {
count: {
@@ -16,13 +16,12 @@ export default {
<template>
<span v-if="count === 50" class="events-info float-right">
<i
- v-tooltip
+ v-gl-tooltip
:title="
n__('Limited to showing %d event at most', 'Limited to showing %d events at most', 50)
"
class="fa fa-warning"
aria-hidden="true"
- data-placement="top"
>
</i>
{{ n__('Showing %d event', 'Showing %d events', 50) }}
diff --git a/app/assets/javascripts/diffs/components/app.vue b/app/assets/javascripts/diffs/components/app.vue
index 0b7838292b2..22da38ce7a5 100644
--- a/app/assets/javascripts/diffs/components/app.vue
+++ b/app/assets/javascripts/diffs/components/app.vue
@@ -55,8 +55,6 @@ export default {
diffViewType: state => state.diffs.diffViewType,
mergeRequestDiffs: state => state.diffs.mergeRequestDiffs,
mergeRequestDiff: state => state.diffs.mergeRequestDiff,
- latestVersionPath: state => state.diffs.latestVersionPath,
- startVersion: state => state.diffs.startVersion,
commit: state => state.diffs.commit,
targetBranchName: state => state.diffs.targetBranchName,
renderOverflowWarning: state => state.diffs.renderOverflowWarning,
@@ -75,24 +73,6 @@ export default {
path: '',
};
},
- notAllCommentsDisplayed() {
- if (this.commit) {
- return __('Only comments from the following commit are shown below');
- } else if (this.startVersion) {
- return __(
- "Not all comments are displayed because you're comparing two versions of the diff.",
- );
- }
- return __(
- "Not all comments are displayed because you're viewing an old version of the diff.",
- );
- },
- showLatestVersion() {
- if (this.commit) {
- return __('Show latest version of the diff');
- }
- return __('Show latest version');
- },
canCurrentUserFork() {
return this.currentUser.can_fork === true && this.currentUser.can_create_merge_request;
},
@@ -184,10 +164,8 @@ export default {
<div v-if="isLoading" class="loading"><gl-loading-icon /></div>
<div v-else id="diffs" :class="{ active: shouldShow }" class="diffs tab-pane">
<compare-versions
- v-if="showCompareVersions"
:merge-request-diffs="mergeRequestDiffs"
:merge-request-diff="mergeRequestDiff"
- :start-version="startVersion"
:target-branch="targetBranch"
/>
@@ -200,33 +178,22 @@ export default {
/>
<div
- v-if="commit || startVersion || (mergeRequestDiff && !mergeRequestDiff.latest)"
- class="mr-version-controls"
- >
- <div class="content-block comments-disabled-notif clearfix">
- <i class="fa fa-info-circle"></i> {{ notAllCommentsDisplayed }}
- <div class="pull-right">
- <a :href="latestVersionPath" class="btn btn-sm"> {{ showLatestVersion }} </a>
- </div>
- </div>
- </div>
-
- <commit-widget v-if="commit" :commit="commit" />
-
- <div
:data-can-create-note="getNoteableData.current_user.can_create_note"
class="files d-flex prepend-top-default"
>
<div v-show="showTreeList" class="diff-tree-list"><tree-list /></div>
- <div v-if="diffFiles.length > 0" class="diff-files-holder">
- <diff-file
- v-for="file in diffFiles"
- :key="file.newPath"
- :file="file"
- :can-current-user-fork="canCurrentUserFork"
- />
+ <div class="diff-files-holder">
+ <commit-widget v-if="commit" :commit="commit" />
+ <template v-if="diffFiles.length > 0">
+ <diff-file
+ v-for="file in diffFiles"
+ :key="file.newPath"
+ :file="file"
+ :can-current-user-fork="canCurrentUserFork"
+ />
+ </template>
+ <no-changes v-else />
</div>
- <no-changes v-else />
</div>
</div>
</div>
diff --git a/app/assets/javascripts/diffs/components/commit_item.vue b/app/assets/javascripts/diffs/components/commit_item.vue
index 560b8695144..ebc4a83af4d 100644
--- a/app/assets/javascripts/diffs/components/commit_item.vue
+++ b/app/assets/javascripts/diffs/components/commit_item.vue
@@ -1,5 +1,4 @@
<script>
-import tooltip from '~/vue_shared/directives/tooltip';
import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue';
import Icon from '~/vue_shared/components/icon.vue';
import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
@@ -21,9 +20,6 @@ import CommitPipelineStatus from '~/projects/tree/components/commit_pipeline_sta
*
*/
export default {
- directives: {
- tooltip,
- },
components: {
UserAvatarLink,
Icon,
diff --git a/app/assets/javascripts/diffs/components/commit_widget.vue b/app/assets/javascripts/diffs/components/commit_widget.vue
index 3fb11813d68..d45f91c7023 100644
--- a/app/assets/javascripts/diffs/components/commit_widget.vue
+++ b/app/assets/javascripts/diffs/components/commit_widget.vue
@@ -28,7 +28,7 @@ export default {
</script>
<template>
- <div class="info-well prepend-top-default">
+ <div class="info-well w-100">
<div class="well-segment">
<ul class="blob-commit-info">
<commit-item :commit="commit" />
diff --git a/app/assets/javascripts/diffs/components/compare_versions.vue b/app/assets/javascripts/diffs/components/compare_versions.vue
index 99061c3bc92..f75345d31f8 100644
--- a/app/assets/javascripts/diffs/components/compare_versions.vue
+++ b/app/assets/javascripts/diffs/components/compare_versions.vue
@@ -1,6 +1,6 @@
<script>
import { mapActions, mapGetters, mapState } from 'vuex';
-import Tooltip from '@gitlab/ui/dist/directives/tooltip';
+import { GlTooltipDirective, GlLink, GlButton } from '@gitlab/ui';
import { __ } from '~/locale';
import { getParameterValues, mergeUrlParams } from '~/lib/utils/url_utility';
import Icon from '~/vue_shared/components/icon.vue';
@@ -10,9 +10,11 @@ export default {
components: {
CompareVersionsDropdown,
Icon,
+ GlLink,
+ GlButton,
},
directives: {
- Tooltip,
+ GlTooltip: GlTooltipDirective,
},
props: {
mergeRequestDiffs: {
@@ -21,12 +23,8 @@ export default {
},
mergeRequestDiff: {
type: Object,
- required: true,
- },
- startVersion: {
- type: Object,
required: false,
- default: null,
+ default: () => ({}),
},
targetBranch: {
type: Object,
@@ -35,7 +33,7 @@ export default {
},
},
computed: {
- ...mapState('diffs', ['commit', 'showTreeList']),
+ ...mapState('diffs', ['commit', 'showTreeList', 'startVersion', 'latestVersionPath']),
...mapGetters('diffs', ['isInlineView', 'isParallelView', 'hasCollapsedFile']),
comparableDiffs() {
return this.mergeRequestDiffs.slice(1);
@@ -75,7 +73,7 @@ export default {
<div class="mr-version-controls">
<div class="mr-version-menus-container content-block">
<button
- v-tooltip.hover
+ v-gl-tooltip.hover
type="button"
class="btn btn-default append-right-8 js-toggle-tree-list"
:class="{
@@ -102,7 +100,18 @@ export default {
class="mr-version-compare-dropdown"
/>
</div>
+ <div v-else-if="commit">
+ {{ __('Viewing commit') }}
+ <gl-link :href="commit.commit_url" class="monospace">{{ commit.short_id }}</gl-link>
+ </div>
<div class="inline-parallel-buttons d-none d-md-flex ml-auto">
+ <gl-button
+ v-if="commit || startVersion"
+ :href="latestVersionPath"
+ class="append-right-8 js-latest-version"
+ >
+ {{ __('Show latest version') }}
+ </gl-button>
<a v-show="hasCollapsedFile" class="btn btn-default append-right-8" @click="expandAllFiles">
{{ __('Expand all') }}
</a>
diff --git a/app/assets/javascripts/diffs/components/diff_file_header.vue b/app/assets/javascripts/diffs/components/diff_file_header.vue
index 07e37582963..f75a01b023b 100644
--- a/app/assets/javascripts/diffs/components/diff_file_header.vue
+++ b/app/assets/javascripts/diffs/components/diff_file_header.vue
@@ -1,10 +1,11 @@
<script>
import _ from 'underscore';
import { mapActions, mapGetters } from 'vuex';
+import { polyfillSticky } from '~/lib/utils/sticky';
import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
import Icon from '~/vue_shared/components/icon.vue';
import FileIcon from '~/vue_shared/components/file_icon.vue';
-import Tooltip from '~/vue_shared/directives/tooltip';
+import { GlTooltipDirective } from '@gitlab/ui';
import { truncateSha } from '~/lib/utils/text_utility';
import { __, s__, sprintf } from '~/locale';
import EditButton from './edit_button.vue';
@@ -17,7 +18,7 @@ export default {
FileIcon,
},
directives: {
- Tooltip,
+ GlTooltip: GlTooltipDirective,
},
props: {
discussionPath: {
@@ -116,6 +117,9 @@ export default {
return `\`${this.diffFile.file_path}\``;
},
},
+ mounted() {
+ polyfillSticky(this.$refs.header);
+ },
methods: {
...mapActions('diffs', ['toggleFileDiscussions']),
handleToggleFile(e, checkTarget) {
@@ -161,23 +165,21 @@ export default {
/>
<span v-if="diffFile.renamed_file">
<strong
- v-tooltip
+ v-gl-tooltip
:title="diffFile.old_path"
class="file-title-name"
- data-container="body"
v-html="diffFile.old_path_html"
></strong>
<strong
- v-tooltip
+ v-gl-tooltip
:title="diffFile.new_path"
class="file-title-name"
- data-container="body"
v-html="diffFile.new_path_html"
></strong>
</span>
- <strong v-else v-tooltip :title="filePath" class="file-title-name" data-container="body">
+ <strong v-else v-gl-tooltip :title="filePath" class="file-title-name" data-container="body">
{{ filePath }}
</strong>
</a>
@@ -233,7 +235,7 @@ export default {
<a
v-if="diffFile.external_url"
- v-tooltip
+ v-gl-tooltip.hover
:href="diffFile.external_url"
:title="`View on ${diffFile.formatted_external_url}`"
target="_blank"
diff --git a/app/assets/javascripts/ide/stores/actions/file.js b/app/assets/javascripts/ide/stores/actions/file.js
index a297740bd5f..e74b880e02c 100644
--- a/app/assets/javascripts/ide/stores/actions/file.js
+++ b/app/assets/javascripts/ide/stores/actions/file.js
@@ -82,7 +82,7 @@ export const getFileData = (
.catch(() => {
commit(types.TOGGLE_LOADING, { entry: file });
dispatch('setErrorMessage', {
- text: __('An error occured whilst loading the file.'),
+ text: __('An error occurred whilst loading the file.'),
action: payload =>
dispatch('getFileData', payload).then(() => dispatch('setErrorMessage', null)),
actionText: __('Please try again'),
@@ -124,7 +124,7 @@ export const getRawFileData = ({ state, commit, dispatch, getters }, { path }) =
})
.catch(() => {
dispatch('setErrorMessage', {
- text: __('An error occured whilst loading the file content.'),
+ text: __('An error occurred whilst loading the file content.'),
action: payload =>
dispatch('getRawFileData', payload).then(() => dispatch('setErrorMessage', null)),
actionText: __('Please try again'),
diff --git a/app/assets/javascripts/ide/stores/actions/merge_request.js b/app/assets/javascripts/ide/stores/actions/merge_request.js
index 8404c6d4f72..18c24369996 100644
--- a/app/assets/javascripts/ide/stores/actions/merge_request.js
+++ b/app/assets/javascripts/ide/stores/actions/merge_request.js
@@ -25,7 +25,7 @@ export const getMergeRequestData = (
})
.catch(() => {
dispatch('setErrorMessage', {
- text: __('An error occured whilst loading the merge request.'),
+ text: __('An error occurred whilst loading the merge request.'),
action: payload =>
dispatch('getMergeRequestData', payload).then(() =>
dispatch('setErrorMessage', null),
@@ -58,7 +58,7 @@ export const getMergeRequestChanges = (
})
.catch(() => {
dispatch('setErrorMessage', {
- text: __('An error occured whilst loading the merge request changes.'),
+ text: __('An error occurred whilst loading the merge request changes.'),
action: payload =>
dispatch('getMergeRequestChanges', payload).then(() =>
dispatch('setErrorMessage', null),
@@ -92,7 +92,7 @@ export const getMergeRequestVersions = (
})
.catch(() => {
dispatch('setErrorMessage', {
- text: __('An error occured whilst loading the merge request version data.'),
+ text: __('An error occurred whilst loading the merge request version data.'),
action: payload =>
dispatch('getMergeRequestVersions', payload).then(() =>
dispatch('setErrorMessage', null),
diff --git a/app/assets/javascripts/ide/stores/actions/project.js b/app/assets/javascripts/ide/stores/actions/project.js
index 2cb08ab2945..b65f631c99c 100644
--- a/app/assets/javascripts/ide/stores/actions/project.js
+++ b/app/assets/javascripts/ide/stores/actions/project.js
@@ -103,7 +103,7 @@ export const createNewBranchFromDefault = ({ state, dispatch, getters }, branch)
})
.catch(() => {
dispatch('setErrorMessage', {
- text: __('An error occured creating the new branch.'),
+ text: __('An error occurred creating the new branch.'),
action: payload => dispatch('createNewBranchFromDefault', payload),
actionText: __('Please try again'),
actionPayload: branch,
diff --git a/app/assets/javascripts/ide/stores/actions/tree.js b/app/assets/javascripts/ide/stores/actions/tree.js
index 9288bbe32f5..de5f6050074 100644
--- a/app/assets/javascripts/ide/stores/actions/tree.js
+++ b/app/assets/javascripts/ide/stores/actions/tree.js
@@ -76,7 +76,7 @@ export const getFiles = ({ state, commit, dispatch }, { projectId, branchId } =
dispatch('showBranchNotFoundError', branchId);
} else {
dispatch('setErrorMessage', {
- text: __('An error occured whilst loading all the files.'),
+ text: __('An error occurred whilst loading all the files.'),
action: payload =>
dispatch('getFiles', payload).then(() => dispatch('setErrorMessage', null)),
actionText: __('Please try again'),
diff --git a/app/assets/javascripts/ide/stores/modules/pipelines/actions.js b/app/assets/javascripts/ide/stores/modules/pipelines/actions.js
index ea2525a2f0e..51cf4dede42 100644
--- a/app/assets/javascripts/ide/stores/modules/pipelines/actions.js
+++ b/app/assets/javascripts/ide/stores/modules/pipelines/actions.js
@@ -28,7 +28,7 @@ export const receiveLatestPipelineError = ({ commit, dispatch }, err) => {
dispatch(
'setErrorMessage',
{
- text: __('An error occured whilst fetching the latest pipeline.'),
+ text: __('An error occurred whilst fetching the latest pipeline.'),
action: () =>
dispatch('forcePipelineRequest').then(() =>
dispatch('setErrorMessage', null, { root: true }),
@@ -84,7 +84,7 @@ export const receiveJobsError = ({ commit, dispatch }, stage) => {
dispatch(
'setErrorMessage',
{
- text: __('An error occured whilst loading the pipelines jobs.'),
+ text: __('An error occurred whilst loading the pipelines jobs.'),
action: payload =>
dispatch('fetchJobs', payload).then(() =>
dispatch('setErrorMessage', null, { root: true }),
@@ -123,7 +123,7 @@ export const receiveJobTraceError = ({ commit, dispatch }) => {
dispatch(
'setErrorMessage',
{
- text: __('An error occured whilst fetching the job trace.'),
+ text: __('An error occurred whilst fetching the job trace.'),
action: () =>
dispatch('fetchJobTrace').then(() => dispatch('setErrorMessage', null, { root: true })),
actionText: __('Please try again'),
diff --git a/app/assets/javascripts/labels.js b/app/assets/javascripts/labels.js
index 2bc09237495..cd8cf0d354c 100644
--- a/app/assets/javascripts/labels.js
+++ b/app/assets/javascripts/labels.js
@@ -22,7 +22,7 @@ export default class Labels {
updateColorPreview() {
const previewColor = $('input#label_color').val();
return $('div.label-color-preview').css('background-color', previewColor);
- // Updates the the preview color with the hex-color input
+ // Updates the preview color with the hex-color input
}
// Updates the preview color with a click on a suggested color
diff --git a/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_machine_type_dropdown.vue b/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_machine_type_dropdown.vue
index 78f085e5312..21095fcba16 100644
--- a/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_machine_type_dropdown.vue
+++ b/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_machine_type_dropdown.vue
@@ -47,7 +47,7 @@ export default {
errorMessage() {
return sprintf(
s__(
- 'ClusterIntegration|An error occured while trying to fetch zone machine types: %{error}',
+ 'ClusterIntegration|An error occurred while trying to fetch zone machine types: %{error}',
),
{ error: this.gapiError },
);
diff --git a/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_project_id_dropdown.vue b/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_project_id_dropdown.vue
index 8e51dd352c7..056584c8865 100644
--- a/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_project_id_dropdown.vue
+++ b/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_project_id_dropdown.vue
@@ -93,7 +93,7 @@ export default {
}
return sprintf(
- s__('ClusterIntegration|An error occured while trying to fetch your projects: %{error}'),
+ s__('ClusterIntegration|An error occurred while trying to fetch your projects: %{error}'),
{ error: this.gapiError },
);
},
diff --git a/app/assets/javascripts/vue_shared/components/time_ago_tooltip.vue b/app/assets/javascripts/vue_shared/components/time_ago_tooltip.vue
index a01c5be98e3..8bcad7ac765 100644
--- a/app/assets/javascripts/vue_shared/components/time_ago_tooltip.vue
+++ b/app/assets/javascripts/vue_shared/components/time_ago_tooltip.vue
@@ -1,5 +1,5 @@
<script>
-import tooltip from '../directives/tooltip';
+import { GlTooltipDirective } from '@gitlab/ui';
import timeagoMixin from '../mixins/timeago';
import '../../lib/utils/datetime_utility';
@@ -9,7 +9,7 @@ import '../../lib/utils/datetime_utility';
export default {
directives: {
- tooltip,
+ GlTooltip: GlTooltipDirective,
},
mixins: [timeagoMixin],
props: {
@@ -17,13 +17,11 @@ export default {
type: String,
required: true,
},
-
tooltipPlacement: {
type: String,
required: false,
default: 'top',
},
-
cssClass: {
type: String,
required: false,
@@ -34,11 +32,9 @@ export default {
</script>
<template>
<time
- v-tooltip
+ v-gl-tooltip="{ placement: tooltipPlacement }"
:class="cssClass"
:title="tooltipTitle(time)"
- :data-placement="tooltipPlacement"
- data-container="body"
v-text="timeFormated(time)"
>
</time>
diff --git a/app/assets/stylesheets/pages/diff.scss b/app/assets/stylesheets/pages/diff.scss
index 0163c795074..715af4aa4ba 100644
--- a/app/assets/stylesheets/pages/diff.scss
+++ b/app/assets/stylesheets/pages/diff.scss
@@ -6,6 +6,28 @@
.file-title-flex-parent {
cursor: pointer;
+ @media (min-width: map-get($grid-breakpoints, md)) {
+ position: -webkit-sticky;
+ position: sticky;
+ top: 92px;
+ z-index: 102;
+
+ &::before {
+ content: '';
+ position: absolute;
+ top: -1px;
+ left: -10px;
+ width: 10px;
+ height: calc(100% + 1px);
+ background: $white-light;
+ border-right: 1px solid $border-color;
+ }
+ }
+
+ .with-performance-bar & {
+ top: 127px;
+ }
+
a:hover {
text-decoration: none;
}
diff --git a/app/assets/stylesheets/pages/issuable.scss b/app/assets/stylesheets/pages/issuable.scss
index 415583cc1c7..78c5ae9ae63 100644
--- a/app/assets/stylesheets/pages/issuable.scss
+++ b/app/assets/stylesheets/pages/issuable.scss
@@ -22,7 +22,6 @@
.detail-page-header,
.page-content-header,
.commit-box,
- .info-well,
.commit-ci-menu,
.files-changed-inner,
.limited-header-width,
diff --git a/app/assets/stylesheets/pages/merge_requests.scss b/app/assets/stylesheets/pages/merge_requests.scss
index fa6afbf81de..b075009b57c 100644
--- a/app/assets/stylesheets/pages/merge_requests.scss
+++ b/app/assets/stylesheets/pages/merge_requests.scss
@@ -717,6 +717,7 @@
.mr-version-menus-container {
display: flex;
align-items: center;
+ flex-wrap: wrap;
padding: 16px;
z-index: 199;
white-space: nowrap;
diff --git a/app/models/concerns/blocks_json_serialization.rb b/app/models/concerns/blocks_json_serialization.rb
index d346da1ba4b..18c00532d78 100644
--- a/app/models/concerns/blocks_json_serialization.rb
+++ b/app/models/concerns/blocks_json_serialization.rb
@@ -3,7 +3,7 @@
# Overrides `as_json` and `to_json` to raise an exception when called in order
# to prevent accidentally exposing attributes
#
-# Not that that would ever happen... but just in case.
+# Not that would ever happen... but just in case.
module BlocksJsonSerialization
extend ActiveSupport::Concern
diff --git a/app/models/namespace.rb b/app/models/namespace.rb
index 4a6627d3ca1..11b03846f0b 100644
--- a/app/models/namespace.rb
+++ b/app/models/namespace.rb
@@ -190,7 +190,7 @@ class Namespace < ActiveRecord::Base
.base_and_ancestors
end
- # returns all ancestors upto but excluding the the given namespace
+ # returns all ancestors upto but excluding the given namespace
# when no namespace is given, all ancestors upto the top are returned
def ancestors_upto(top = nil)
Gitlab::GroupHierarchy.new(self.class.where(id: id))
diff --git a/app/services/commits/commit_patch_service.rb b/app/services/commits/commit_patch_service.rb
index 9253cfaac20..49113c3c691 100644
--- a/app/services/commits/commit_patch_service.rb
+++ b/app/services/commits/commit_patch_service.rb
@@ -7,7 +7,7 @@ module Commits
# - user: `User` that will be the committer
# - params:
# - branch_name: `String` the branch that will be committed into
- # - start_branch: `String` the branch that will will started from
+ # - start_branch: `String` the branch that will be started from
# - patches: `Gitlab::Git::Patches::Collection` that contains the patches
def initialize(*args)
super
diff --git a/app/services/merge_requests/build_service.rb b/app/services/merge_requests/build_service.rb
index 6c69452e2ab..36767621d74 100644
--- a/app/services/merge_requests/build_service.rb
+++ b/app/services/merge_requests/build_service.rb
@@ -10,6 +10,7 @@ module MergeRequests
# TODO: this should handle all quick actions that don't have side effects
# https://gitlab.com/gitlab-org/gitlab-ce/issues/53658
merge_quick_actions_into_params!(merge_request, only: [:target_branch])
+ merge_request.merge_params['force_remove_source_branch'] = params.delete(:force_remove_source_branch) if params.has_key?(:force_remove_source_branch)
merge_request.assign_attributes(params)
merge_request.author = current_user
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb
index fb9c18ea75d..5904bfbf88d 100644
--- a/app/services/notification_service.rb
+++ b/app/services/notification_service.rb
@@ -50,7 +50,7 @@ class NotificationService
# Always notify the user about gpg key added
#
- # This is a security email so it will be sent even if the user user disabled
+ # This is a security email so it will be sent even if the user disabled
# notifications
def new_gpg_key(gpg_key)
if gpg_key.user&.can?(:receive_notifications)
diff --git a/app/views/profiles/personal_access_tokens/index.html.haml b/app/views/profiles/personal_access_tokens/index.html.haml
index c1e1eaff942..4c18398e3dc 100644
--- a/app/views/profiles/personal_access_tokens/index.html.haml
+++ b/app/views/profiles/personal_access_tokens/index.html.haml
@@ -26,7 +26,7 @@
%h4.prepend-top-0
Feed token
%p
- Your feed token is used to authenticate you when your RSS reader loads a personalized RSS feed or when when your calendar application loads a personalized calendar, and is included in those feed URLs.
+ Your feed token is used to authenticate you when your RSS reader loads a personalized RSS feed or when your calendar application loads a personalized calendar, and is included in those feed URLs.
%p
It cannot be used to access any other data.
.col-lg-8.feed-token-reset
diff --git a/changelogs/unreleased/46950-systemcheck-ruby-version.yml b/changelogs/unreleased/46950-systemcheck-ruby-version.yml
new file mode 100644
index 00000000000..e556e14223b
--- /dev/null
+++ b/changelogs/unreleased/46950-systemcheck-ruby-version.yml
@@ -0,0 +1,5 @@
+---
+title: 'SystemCheck: Use a more reliable way to detect current Ruby version'
+merge_request: 23291
+author:
+type: changed
diff --git a/changelogs/unreleased/54201-update-rack-to-2-0-6.yml b/changelogs/unreleased/54201-update-rack-to-2-0-6.yml
new file mode 100644
index 00000000000..020b2bc0957
--- /dev/null
+++ b/changelogs/unreleased/54201-update-rack-to-2-0-6.yml
@@ -0,0 +1,5 @@
+---
+title: Update rack to 2.0.6 (for QA environments)
+merge_request: 23171
+author: Takuya Noguchi
+type: security
diff --git a/changelogs/unreleased/fj-47494-upgrade-git-to-2-18-0.yml b/changelogs/unreleased/fj-47494-upgrade-git-to-2-18-0.yml
new file mode 100644
index 00000000000..0f01552ff7e
--- /dev/null
+++ b/changelogs/unreleased/fj-47494-upgrade-git-to-2-18-0.yml
@@ -0,0 +1,5 @@
+---
+title: Upgrade minimum required Git version to 2.18.0
+merge_request: 22803
+author:
+type: other
diff --git a/changelogs/unreleased/gt-use-gl-tooltip-directive.yml b/changelogs/unreleased/gt-use-gl-tooltip-directive.yml
new file mode 100644
index 00000000000..91fdb73e3c6
--- /dev/null
+++ b/changelogs/unreleased/gt-use-gl-tooltip-directive.yml
@@ -0,0 +1,5 @@
+---
+title: Replace tooltip directive with gl-tooltip diretive in badges, cycle analytics, and diffs
+merge_request: 22770
+author: George Tsiolis
+type: performance
diff --git a/changelogs/unreleased/mr-file-tree-commit.yml b/changelogs/unreleased/mr-file-tree-commit.yml
new file mode 100644
index 00000000000..e0d47e6e61f
--- /dev/null
+++ b/changelogs/unreleased/mr-file-tree-commit.yml
@@ -0,0 +1,5 @@
+---
+title: Show tree collapse button for merge request commit diffs
+merge_request:
+author:
+type: fixed
diff --git a/changelogs/unreleased/mr-origin-23218.yml b/changelogs/unreleased/mr-origin-23218.yml
new file mode 100644
index 00000000000..49867f04343
--- /dev/null
+++ b/changelogs/unreleased/mr-origin-23218.yml
@@ -0,0 +1,5 @@
+---
+title: Fix typo for scheduled pipeline
+merge_request: 23218
+author: Davy Defaud
+type: other
diff --git a/changelogs/unreleased/mr-sticky-headers.yml b/changelogs/unreleased/mr-sticky-headers.yml
new file mode 100644
index 00000000000..c20829bc2d7
--- /dev/null
+++ b/changelogs/unreleased/mr-sticky-headers.yml
@@ -0,0 +1,5 @@
+---
+title: Make diff file headers sticky
+merge_request:
+author:
+type: changed
diff --git a/changelogs/unreleased/sh-fix-issue-51220.yml b/changelogs/unreleased/sh-fix-issue-51220.yml
new file mode 100644
index 00000000000..048f58611cb
--- /dev/null
+++ b/changelogs/unreleased/sh-fix-issue-51220.yml
@@ -0,0 +1,5 @@
+---
+title: Handle force_remove_source_branch when creating merge request
+merge_request: 23281
+author:
+type: fixed
diff --git a/changelogs/unreleased/zj-improve-gitaly-pb.yml b/changelogs/unreleased/zj-improve-gitaly-pb.yml
new file mode 100644
index 00000000000..506a0303d8a
--- /dev/null
+++ b/changelogs/unreleased/zj-improve-gitaly-pb.yml
@@ -0,0 +1,5 @@
+---
+title: Show what RPC is called in the performance bar
+merge_request: 23140
+author:
+type: other
diff --git a/config/application.rb b/config/application.rb
index 921baa5d617..796aa85e113 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -26,6 +26,9 @@ module Gitlab
# setting disabled
require_dependency Rails.root.join('lib/mysql_zero_date')
+ # This can be removed when we drop support for rails 4
+ require_dependency Rails.root.join('lib/rails4_migration_version')
+
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
diff --git a/config/boot.rb b/config/boot.rb
index 1aeacdabbad..725473ac7f6 100644
--- a/config/boot.rb
+++ b/config/boot.rb
@@ -12,5 +12,5 @@ require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
begin
require 'bootsnap/setup'
rescue LoadError
- # bootsnap is optional dependency, so if we don't have it it's fine
+ # bootsnap is an optional dependency, so if we don't have it, it's fine
end
diff --git a/db/migrate/20140313092127_init_schema.rb b/db/migrate/20140313092127_init_schema.rb
index 29fb386ad76..4188599b4b4 100644
--- a/db/migrate/20140313092127_init_schema.rb
+++ b/db/migrate/20140313092127_init_schema.rb
@@ -1,4 +1,4 @@
-class InitSchema < ActiveRecord::Migration
+class InitSchema < ActiveRecord::Migration[4.2]
DOWNTIME = true
# rubocop:disable Metrics/AbcSize
diff --git a/db/migrate/20140407135544_fix_namespaces.rb b/db/migrate/20140407135544_fix_namespaces.rb
index 3d2ca5c13c4..b16d65c4b51 100644
--- a/db/migrate/20140407135544_fix_namespaces.rb
+++ b/db/migrate/20140407135544_fix_namespaces.rb
@@ -1,4 +1,4 @@
-class FixNamespaces < ActiveRecord::Migration
+class FixNamespaces < ActiveRecord::Migration[4.2]
DOWNTIME = false
def up
diff --git a/db/migrate/20140414131055_change_state_to_allow_empty_merge_request_diffs.rb b/db/migrate/20140414131055_change_state_to_allow_empty_merge_request_diffs.rb
index fb9c7a6636e..148b46f8830 100644
--- a/db/migrate/20140414131055_change_state_to_allow_empty_merge_request_diffs.rb
+++ b/db/migrate/20140414131055_change_state_to_allow_empty_merge_request_diffs.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class ChangeStateToAllowEmptyMergeRequestDiffs < ActiveRecord::Migration
+class ChangeStateToAllowEmptyMergeRequestDiffs < ActiveRecord::Migration[4.2]
def up
change_column :merge_request_diffs, :state, :string, null: true,
default: nil
diff --git a/db/migrate/20140416074002_add_index_on_iid.rb b/db/migrate/20140416074002_add_index_on_iid.rb
index 6cdaa5a3c08..c7f707ca123 100644
--- a/db/migrate/20140416074002_add_index_on_iid.rb
+++ b/db/migrate/20140416074002_add_index_on_iid.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddIndexOnIid < ActiveRecord::Migration
+class AddIndexOnIid < ActiveRecord::Migration[4.2]
def change
RemoveDuplicateIid.clean(Issue)
RemoveDuplicateIid.clean(MergeRequest, 'target_project_id')
diff --git a/db/migrate/20140416185734_index_on_current_sign_in_at.rb b/db/migrate/20140416185734_index_on_current_sign_in_at.rb
index 8c620b545bd..7dabcb937b3 100644
--- a/db/migrate/20140416185734_index_on_current_sign_in_at.rb
+++ b/db/migrate/20140416185734_index_on_current_sign_in_at.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class IndexOnCurrentSignInAt < ActiveRecord::Migration
+class IndexOnCurrentSignInAt < ActiveRecord::Migration[4.2]
def change
add_index :users, :current_sign_in_at
end
diff --git a/db/migrate/20140428105831_add_notes_index_updated_at.rb b/db/migrate/20140428105831_add_notes_index_updated_at.rb
index 0589101af93..25bdf477e24 100644
--- a/db/migrate/20140428105831_add_notes_index_updated_at.rb
+++ b/db/migrate/20140428105831_add_notes_index_updated_at.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddNotesIndexUpdatedAt < ActiveRecord::Migration
+class AddNotesIndexUpdatedAt < ActiveRecord::Migration[4.2]
def change
add_index :notes, :updated_at
end
diff --git a/db/migrate/20140502115131_add_repo_size_to_db.rb b/db/migrate/20140502115131_add_repo_size_to_db.rb
index 090b30a4f26..4cb7a01bbf2 100644
--- a/db/migrate/20140502115131_add_repo_size_to_db.rb
+++ b/db/migrate/20140502115131_add_repo_size_to_db.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddRepoSizeToDb < ActiveRecord::Migration
+class AddRepoSizeToDb < ActiveRecord::Migration[4.2]
def change
add_column :projects, :repository_size, :float, default: 0
end
diff --git a/db/migrate/20140502125220_migrate_repo_size.rb b/db/migrate/20140502125220_migrate_repo_size.rb
index ca1b054600c..a69b02cddc4 100644
--- a/db/migrate/20140502125220_migrate_repo_size.rb
+++ b/db/migrate/20140502125220_migrate_repo_size.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class MigrateRepoSize < ActiveRecord::Migration
+class MigrateRepoSize < ActiveRecord::Migration[4.2]
DOWNTIME = false
def up
diff --git a/db/migrate/20140611135229_add_position_to_merge_request.rb b/db/migrate/20140611135229_add_position_to_merge_request.rb
index 3a7d2f7c359..6ec644eecce 100644
--- a/db/migrate/20140611135229_add_position_to_merge_request.rb
+++ b/db/migrate/20140611135229_add_position_to_merge_request.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddPositionToMergeRequest < ActiveRecord::Migration
+class AddPositionToMergeRequest < ActiveRecord::Migration[4.2]
def change
add_column :merge_requests, :position, :integer, default: 0
end
diff --git a/db/migrate/20140625115202_create_users_star_projects.rb b/db/migrate/20140625115202_create_users_star_projects.rb
index d4f3fe5ac62..2237927fc78 100644
--- a/db/migrate/20140625115202_create_users_star_projects.rb
+++ b/db/migrate/20140625115202_create_users_star_projects.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class CreateUsersStarProjects < ActiveRecord::Migration
+class CreateUsersStarProjects < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20140729134820_create_labels.rb b/db/migrate/20140729134820_create_labels.rb
index 66d20e741a6..1060610b660 100644
--- a/db/migrate/20140729134820_create_labels.rb
+++ b/db/migrate/20140729134820_create_labels.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class CreateLabels < ActiveRecord::Migration
+class CreateLabels < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20140729140420_create_label_links.rb b/db/migrate/20140729140420_create_label_links.rb
index dacd9f2e4b6..b8596a44a21 100644
--- a/db/migrate/20140729140420_create_label_links.rb
+++ b/db/migrate/20140729140420_create_label_links.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class CreateLabelLinks < ActiveRecord::Migration
+class CreateLabelLinks < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20140729145339_migrate_project_tags.rb b/db/migrate/20140729145339_migrate_project_tags.rb
index 5760e4bfeaa..711a2d262aa 100644
--- a/db/migrate/20140729145339_migrate_project_tags.rb
+++ b/db/migrate/20140729145339_migrate_project_tags.rb
@@ -1,4 +1,4 @@
-class MigrateProjectTags < ActiveRecord::Migration
+class MigrateProjectTags < ActiveRecord::Migration[4.2]
def up
ActsAsTaggableOn::Tagging.where(taggable_type: 'Project', context: 'labels').update_all(context: 'tags')
end
diff --git a/db/migrate/20140729152420_migrate_taggable_labels.rb b/db/migrate/20140729152420_migrate_taggable_labels.rb
index 04cdc6beadd..a8bf8022dfc 100644
--- a/db/migrate/20140729152420_migrate_taggable_labels.rb
+++ b/db/migrate/20140729152420_migrate_taggable_labels.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class MigrateTaggableLabels < ActiveRecord::Migration
+class MigrateTaggableLabels < ActiveRecord::Migration[4.2]
def up
taggings = ActsAsTaggableOn::Tagging.where(taggable_type: ['Issue', 'MergeRequest'], context: 'labels')
taggings.find_each(batch_size: 500) do |tagging|
diff --git a/db/migrate/20140730111702_add_index_to_labels.rb b/db/migrate/20140730111702_add_index_to_labels.rb
index cc7ac1fc449..21f9dfd5d47 100644
--- a/db/migrate/20140730111702_add_index_to_labels.rb
+++ b/db/migrate/20140730111702_add_index_to_labels.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddIndexToLabels < ActiveRecord::Migration
+class AddIndexToLabels < ActiveRecord::Migration[4.2]
def change
add_index "labels", :project_id
add_index "label_links", :label_id
diff --git a/db/migrate/20140903115954_migrate_to_new_shell.rb b/db/migrate/20140903115954_migrate_to_new_shell.rb
index 04acf24284b..cc0cce483b1 100644
--- a/db/migrate/20140903115954_migrate_to_new_shell.rb
+++ b/db/migrate/20140903115954_migrate_to_new_shell.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class MigrateToNewShell < ActiveRecord::Migration
+class MigrateToNewShell < ActiveRecord::Migration[4.2]
def change
return if Rails.env.test?
diff --git a/db/migrate/20140907220153_serialize_service_properties.rb b/db/migrate/20140907220153_serialize_service_properties.rb
index c2d67fad0ab..bf94c64654b 100644
--- a/db/migrate/20140907220153_serialize_service_properties.rb
+++ b/db/migrate/20140907220153_serialize_service_properties.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class SerializeServiceProperties < ActiveRecord::Migration
+class SerializeServiceProperties < ActiveRecord::Migration[4.2]
def change
unless column_exists?(:services, :properties)
add_column :services, :properties, :text
diff --git a/db/migrate/20140914113604_add_members_table.rb b/db/migrate/20140914113604_add_members_table.rb
index 0f76bb0ef79..312ea1b94df 100644
--- a/db/migrate/20140914113604_add_members_table.rb
+++ b/db/migrate/20140914113604_add_members_table.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddMembersTable < ActiveRecord::Migration
+class AddMembersTable < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20140914145549_migrate_to_new_members_model.rb b/db/migrate/20140914145549_migrate_to_new_members_model.rb
index b4c98f016d0..22d8b3d651b 100644
--- a/db/migrate/20140914145549_migrate_to_new_members_model.rb
+++ b/db/migrate/20140914145549_migrate_to_new_members_model.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class MigrateToNewMembersModel < ActiveRecord::Migration
+class MigrateToNewMembersModel < ActiveRecord::Migration[4.2]
def up
execute "INSERT INTO members ( user_id, source_id, source_type, access_level, notification_level, type ) SELECT user_id, group_id, 'Namespace', group_access, notification_level, 'GroupMember' FROM users_groups"
execute "INSERT INTO members ( user_id, source_id, source_type, access_level, notification_level, type ) SELECT user_id, project_id, 'Project', project_access, notification_level, 'ProjectMember' FROM users_projects"
diff --git a/db/migrate/20140914173417_remove_old_member_tables.rb b/db/migrate/20140914173417_remove_old_member_tables.rb
index d2ab326ef1f..edd69caa470 100644
--- a/db/migrate/20140914173417_remove_old_member_tables.rb
+++ b/db/migrate/20140914173417_remove_old_member_tables.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class RemoveOldMemberTables < ActiveRecord::Migration
+class RemoveOldMemberTables < ActiveRecord::Migration[4.2]
DOWNTIME = false
def up
diff --git a/db/migrate/20141006143943_move_slack_service_to_webhook.rb b/db/migrate/20141006143943_move_slack_service_to_webhook.rb
index 561184615cc..1c9a1a74a4e 100644
--- a/db/migrate/20141006143943_move_slack_service_to_webhook.rb
+++ b/db/migrate/20141006143943_move_slack_service_to_webhook.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class MoveSlackServiceToWebhook < ActiveRecord::Migration
+class MoveSlackServiceToWebhook < ActiveRecord::Migration[4.2]
DOWNTIME = true
DOWNTIME_REASON = 'Move old fields "token" and "subdomain" to one single field "webhook"'
diff --git a/db/migrate/20141007100818_add_visibility_level_to_snippet.rb b/db/migrate/20141007100818_add_visibility_level_to_snippet.rb
index 0c14f75c154..9501aed8931 100644
--- a/db/migrate/20141007100818_add_visibility_level_to_snippet.rb
+++ b/db/migrate/20141007100818_add_visibility_level_to_snippet.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddVisibilityLevelToSnippet < ActiveRecord::Migration
+class AddVisibilityLevelToSnippet < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
def up
diff --git a/db/migrate/20141118150935_add_audit_event.rb b/db/migrate/20141118150935_add_audit_event.rb
index 52d70b4a0ac..1e7dba568c9 100644
--- a/db/migrate/20141118150935_add_audit_event.rb
+++ b/db/migrate/20141118150935_add_audit_event.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddAuditEvent < ActiveRecord::Migration
+class AddAuditEvent < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20141121133009_add_timestamps_to_members.rb b/db/migrate/20141121133009_add_timestamps_to_members.rb
index ef6d4dedf32..cb575fc9ed7 100644
--- a/db/migrate/20141121133009_add_timestamps_to_members.rb
+++ b/db/migrate/20141121133009_add_timestamps_to_members.rb
@@ -3,7 +3,7 @@
# became a problem after commit c8e78d972a5a628870eefca0f2ccea0199c55bda which
# was added in GitLab 7.5. With this migration we ensure that all rows in
# 'members' have at least some created_at and updated_at timestamp.
-class AddTimestampsToMembers < ActiveRecord::Migration
+class AddTimestampsToMembers < ActiveRecord::Migration[4.2]
def up
execute "UPDATE members SET created_at = NOW() WHERE created_at is NULL"
execute "UPDATE members SET updated_at = NOW() WHERE updated_at is NULL"
diff --git a/db/migrate/20141121161704_add_identity_table.rb b/db/migrate/20141121161704_add_identity_table.rb
index 5a399f0d325..92f7a568077 100644
--- a/db/migrate/20141121161704_add_identity_table.rb
+++ b/db/migrate/20141121161704_add_identity_table.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddIdentityTable < ActiveRecord::Migration
+class AddIdentityTable < ActiveRecord::Migration[4.2]
def up
create_table :identities do |t|
t.string :extern_uid
diff --git a/db/migrate/20141126120926_add_merge_request_rebase_enabled_to_projects.rb b/db/migrate/20141126120926_add_merge_request_rebase_enabled_to_projects.rb
index 3dafdf0fde4..b9d8a5cb435 100644
--- a/db/migrate/20141126120926_add_merge_request_rebase_enabled_to_projects.rb
+++ b/db/migrate/20141126120926_add_merge_request_rebase_enabled_to_projects.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddMergeRequestRebaseEnabledToProjects < ActiveRecord::Migration
+class AddMergeRequestRebaseEnabledToProjects < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20141205134006_add_locked_at_to_merge_request.rb b/db/migrate/20141205134006_add_locked_at_to_merge_request.rb
index 5aa91c7587a..6fdfb3eb974 100644
--- a/db/migrate/20141205134006_add_locked_at_to_merge_request.rb
+++ b/db/migrate/20141205134006_add_locked_at_to_merge_request.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddLockedAtToMergeRequest < ActiveRecord::Migration
+class AddLockedAtToMergeRequest < ActiveRecord::Migration[4.2]
def change
add_column :merge_requests, :locked_at, :datetime
end
diff --git a/db/migrate/20141216155758_create_doorkeeper_tables.rb b/db/migrate/20141216155758_create_doorkeeper_tables.rb
index 17e45a77291..7bd0a15e7f5 100644
--- a/db/migrate/20141216155758_create_doorkeeper_tables.rb
+++ b/db/migrate/20141216155758_create_doorkeeper_tables.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class CreateDoorkeeperTables < ActiveRecord::Migration
+class CreateDoorkeeperTables < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20141217125223_add_owner_to_application.rb b/db/migrate/20141217125223_add_owner_to_application.rb
index e5a669ab4d8..482a53f3ad5 100644
--- a/db/migrate/20141217125223_add_owner_to_application.rb
+++ b/db/migrate/20141217125223_add_owner_to_application.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddOwnerToApplication < ActiveRecord::Migration
+class AddOwnerToApplication < ActiveRecord::Migration[4.2]
def change
add_column :oauth_applications, :owner_id, :integer, null: true
add_column :oauth_applications, :owner_type, :string, null: true
diff --git a/db/migrate/20141223135007_add_import_data_to_project_table.rb b/db/migrate/20141223135007_add_import_data_to_project_table.rb
index 5db78f94cc9..516f58d645e 100644
--- a/db/migrate/20141223135007_add_import_data_to_project_table.rb
+++ b/db/migrate/20141223135007_add_import_data_to_project_table.rb
@@ -1,4 +1,4 @@
-class AddImportDataToProjectTable < ActiveRecord::Migration
+class AddImportDataToProjectTable < ActiveRecord::Migration[4.2]
def change
add_column :projects, :import_type, :string
add_column :projects, :import_source, :string
diff --git a/db/migrate/20141226080412_add_developers_can_push_to_protected_branches.rb b/db/migrate/20141226080412_add_developers_can_push_to_protected_branches.rb
index a18b2f4974d..43b7de85228 100644
--- a/db/migrate/20141226080412_add_developers_can_push_to_protected_branches.rb
+++ b/db/migrate/20141226080412_add_developers_can_push_to_protected_branches.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddDevelopersCanPushToProtectedBranches < ActiveRecord::Migration
+class AddDevelopersCanPushToProtectedBranches < ActiveRecord::Migration[4.2]
def change
add_column :protected_branches, :developers_can_push, :boolean, default: false, null: false
end
diff --git a/db/migrate/20150108073740_create_application_settings.rb b/db/migrate/20150108073740_create_application_settings.rb
index 0e4c66ca8c0..be139fee63a 100644
--- a/db/migrate/20150108073740_create_application_settings.rb
+++ b/db/migrate/20150108073740_create_application_settings.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class CreateApplicationSettings < ActiveRecord::Migration
+class CreateApplicationSettings < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20150116234544_add_home_page_url_for_application_settings.rb b/db/migrate/20150116234544_add_home_page_url_for_application_settings.rb
index aa179ce3a4d..e630e2cc878 100644
--- a/db/migrate/20150116234544_add_home_page_url_for_application_settings.rb
+++ b/db/migrate/20150116234544_add_home_page_url_for_application_settings.rb
@@ -1,4 +1,4 @@
-class AddHomePageUrlForApplicationSettings < ActiveRecord::Migration
+class AddHomePageUrlForApplicationSettings < ActiveRecord::Migration[4.2]
def change
add_column :application_settings, :home_page_url, :string
end
diff --git a/db/migrate/20150116234545_add_gitlab_access_token_to_user.rb b/db/migrate/20150116234545_add_gitlab_access_token_to_user.rb
index c28ba3197ac..673628e106b 100644
--- a/db/migrate/20150116234545_add_gitlab_access_token_to_user.rb
+++ b/db/migrate/20150116234545_add_gitlab_access_token_to_user.rb
@@ -1,4 +1,4 @@
-class AddGitlabAccessTokenToUser < ActiveRecord::Migration
+class AddGitlabAccessTokenToUser < ActiveRecord::Migration[4.2]
def change
add_column :users, :gitlab_access_token, :string
end
diff --git a/db/migrate/20150125163100_add_default_branch_protection_setting.rb b/db/migrate/20150125163100_add_default_branch_protection_setting.rb
index 7ca3116d354..f6bfa422124 100644
--- a/db/migrate/20150125163100_add_default_branch_protection_setting.rb
+++ b/db/migrate/20150125163100_add_default_branch_protection_setting.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddDefaultBranchProtectionSetting < ActiveRecord::Migration
+class AddDefaultBranchProtectionSetting < ActiveRecord::Migration[4.2]
def change
add_column :application_settings, :default_branch_protection, :integer, :default => 2
end
diff --git a/db/migrate/20150205211843_add_timestamps_to_identities.rb b/db/migrate/20150205211843_add_timestamps_to_identities.rb
index a78e28eb4eb..c535a7ec781 100644
--- a/db/migrate/20150205211843_add_timestamps_to_identities.rb
+++ b/db/migrate/20150205211843_add_timestamps_to_identities.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddTimestampsToIdentities < ActiveRecord::Migration
+class AddTimestampsToIdentities < ActiveRecord::Migration[4.2]
def change
add_timestamps(:identities)
end
diff --git a/db/migrate/20150206181414_add_index_to_created_at.rb b/db/migrate/20150206181414_add_index_to_created_at.rb
index a161fad79dc..501acd6a720 100644
--- a/db/migrate/20150206181414_add_index_to_created_at.rb
+++ b/db/migrate/20150206181414_add_index_to_created_at.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddIndexToCreatedAt < ActiveRecord::Migration
+class AddIndexToCreatedAt < ActiveRecord::Migration[4.2]
def change
add_index "users", [:created_at, :id]
add_index "members", [:created_at, :id]
diff --git a/db/migrate/20150206222854_add_notification_email_to_user.rb b/db/migrate/20150206222854_add_notification_email_to_user.rb
index ab80f7e582f..7b0c251db4f 100644
--- a/db/migrate/20150206222854_add_notification_email_to_user.rb
+++ b/db/migrate/20150206222854_add_notification_email_to_user.rb
@@ -1,4 +1,4 @@
-class AddNotificationEmailToUser < ActiveRecord::Migration
+class AddNotificationEmailToUser < ActiveRecord::Migration[4.2]
def up
add_column :users, :notification_email, :string
diff --git a/db/migrate/20150209222013_add_missing_index.rb b/db/migrate/20150209222013_add_missing_index.rb
index 18e3ac2cbbb..99544ab3928 100644
--- a/db/migrate/20150209222013_add_missing_index.rb
+++ b/db/migrate/20150209222013_add_missing_index.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddMissingIndex < ActiveRecord::Migration
+class AddMissingIndex < ActiveRecord::Migration[4.2]
def change
add_index "services", [:created_at, :id]
end
diff --git a/db/migrate/20150211172122_add_template_to_service.rb b/db/migrate/20150211172122_add_template_to_service.rb
index a3e96b25c56..dd192a0fe76 100644
--- a/db/migrate/20150211172122_add_template_to_service.rb
+++ b/db/migrate/20150211172122_add_template_to_service.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddTemplateToService < ActiveRecord::Migration
+class AddTemplateToService < ActiveRecord::Migration[4.2]
def change
add_column :services, :template, :boolean, default: false
end
diff --git a/db/migrate/20150211174341_allow_null_in_services_project_id.rb b/db/migrate/20150211174341_allow_null_in_services_project_id.rb
index 68f02812791..4c90bf9c419 100644
--- a/db/migrate/20150211174341_allow_null_in_services_project_id.rb
+++ b/db/migrate/20150211174341_allow_null_in_services_project_id.rb
@@ -1,4 +1,4 @@
-class AllowNullInServicesProjectId < ActiveRecord::Migration
+class AllowNullInServicesProjectId < ActiveRecord::Migration[4.2]
def change
change_column :services, :project_id, :integer, null: true
end
diff --git a/db/migrate/20150213104043_add_twitter_sharing_enabled_to_application_settings.rb b/db/migrate/20150213104043_add_twitter_sharing_enabled_to_application_settings.rb
index 334020376e4..7d7b9242cd6 100644
--- a/db/migrate/20150213104043_add_twitter_sharing_enabled_to_application_settings.rb
+++ b/db/migrate/20150213104043_add_twitter_sharing_enabled_to_application_settings.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddTwitterSharingEnabledToApplicationSettings < ActiveRecord::Migration
+class AddTwitterSharingEnabledToApplicationSettings < ActiveRecord::Migration[4.2]
def change
add_column :application_settings, :twitter_sharing_enabled, :boolean, default: true
end
diff --git a/db/migrate/20150213114800_add_hide_no_password_to_user.rb b/db/migrate/20150213114800_add_hide_no_password_to_user.rb
index a2af3510b9c..348c0d22aba 100644
--- a/db/migrate/20150213114800_add_hide_no_password_to_user.rb
+++ b/db/migrate/20150213114800_add_hide_no_password_to_user.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddHideNoPasswordToUser < ActiveRecord::Migration
+class AddHideNoPasswordToUser < ActiveRecord::Migration[4.2]
def change
add_column :users, :hide_no_password, :boolean, default: false
end
diff --git a/db/migrate/20150213121042_add_password_automatically_set_to_user.rb b/db/migrate/20150213121042_add_password_automatically_set_to_user.rb
index 4e84a13f0d2..d0eb753b887 100644
--- a/db/migrate/20150213121042_add_password_automatically_set_to_user.rb
+++ b/db/migrate/20150213121042_add_password_automatically_set_to_user.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddPasswordAutomaticallySetToUser < ActiveRecord::Migration
+class AddPasswordAutomaticallySetToUser < ActiveRecord::Migration[4.2]
def change
add_column :users, :password_automatically_set, :boolean, default: false
end
diff --git a/db/migrate/20150217123345_add_bitbucket_access_token_and_secret_to_user.rb b/db/migrate/20150217123345_add_bitbucket_access_token_and_secret_to_user.rb
index 23ac1b399ec..639644174ca 100644
--- a/db/migrate/20150217123345_add_bitbucket_access_token_and_secret_to_user.rb
+++ b/db/migrate/20150217123345_add_bitbucket_access_token_and_secret_to_user.rb
@@ -1,4 +1,4 @@
-class AddBitbucketAccessTokenAndSecretToUser < ActiveRecord::Migration
+class AddBitbucketAccessTokenAndSecretToUser < ActiveRecord::Migration[4.2]
def change
add_column :users, :bitbucket_access_token, :string
add_column :users, :bitbucket_access_token_secret, :string
diff --git a/db/migrate/20150219004514_add_events_to_services.rb b/db/migrate/20150219004514_add_events_to_services.rb
index 560382c3fa1..7072056adcb 100644
--- a/db/migrate/20150219004514_add_events_to_services.rb
+++ b/db/migrate/20150219004514_add_events_to_services.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddEventsToServices < ActiveRecord::Migration
+class AddEventsToServices < ActiveRecord::Migration[4.2]
def change
add_column :services, :push_events, :boolean, :default => true
add_column :services, :issues_events, :boolean, :default => true
diff --git a/db/migrate/20150223022001_set_missing_last_activity_at.rb b/db/migrate/20150223022001_set_missing_last_activity_at.rb
index 3f6d4d83474..c77ffbd4ebd 100644
--- a/db/migrate/20150223022001_set_missing_last_activity_at.rb
+++ b/db/migrate/20150223022001_set_missing_last_activity_at.rb
@@ -1,4 +1,4 @@
-class SetMissingLastActivityAt < ActiveRecord::Migration
+class SetMissingLastActivityAt < ActiveRecord::Migration[4.2]
def up
execute "UPDATE projects SET last_activity_at = updated_at WHERE last_activity_at IS NULL"
end
diff --git a/db/migrate/20150225065047_add_note_events_to_services.rb b/db/migrate/20150225065047_add_note_events_to_services.rb
index 7843cabc43b..32c538e8681 100644
--- a/db/migrate/20150225065047_add_note_events_to_services.rb
+++ b/db/migrate/20150225065047_add_note_events_to_services.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddNoteEventsToServices < ActiveRecord::Migration
+class AddNoteEventsToServices < ActiveRecord::Migration[4.2]
def change
add_column :services, :note_events, :boolean, default: true, null: false
end
diff --git a/db/migrate/20150301014758_add_restricted_visibility_levels_to_application_settings.rb b/db/migrate/20150301014758_add_restricted_visibility_levels_to_application_settings.rb
index 494c3033bff..3091790f199 100644
--- a/db/migrate/20150301014758_add_restricted_visibility_levels_to_application_settings.rb
+++ b/db/migrate/20150301014758_add_restricted_visibility_levels_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddRestrictedVisibilityLevelsToApplicationSettings < ActiveRecord::Migration
+class AddRestrictedVisibilityLevelsToApplicationSettings < ActiveRecord::Migration[4.2]
def change
add_column :application_settings, :restricted_visibility_levels, :text
end
diff --git a/db/migrate/20150306023106_fix_namespace_duplication.rb b/db/migrate/20150306023106_fix_namespace_duplication.rb
index ea53a9d71f2..49be152a75c 100644
--- a/db/migrate/20150306023106_fix_namespace_duplication.rb
+++ b/db/migrate/20150306023106_fix_namespace_duplication.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class FixNamespaceDuplication < ActiveRecord::Migration
+class FixNamespaceDuplication < ActiveRecord::Migration[4.2]
def up
#fixes path duplication
select_all('SELECT MAX(id) max, COUNT(id) cnt, path FROM namespaces GROUP BY path HAVING COUNT(id) > 1').each do |nms|
diff --git a/db/migrate/20150306023112_add_unique_index_to_namespace.rb b/db/migrate/20150306023112_add_unique_index_to_namespace.rb
index f293a9b643f..11472324cbf 100644
--- a/db/migrate/20150306023112_add_unique_index_to_namespace.rb
+++ b/db/migrate/20150306023112_add_unique_index_to_namespace.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddUniqueIndexToNamespace < ActiveRecord::Migration
+class AddUniqueIndexToNamespace < ActiveRecord::Migration[4.2]
def change
remove_index :namespaces, column: :name if index_exists?(:namespaces, :name)
remove_index :namespaces, column: :path if index_exists?(:namespaces, :path)
diff --git a/db/migrate/20150310194358_add_version_check_to_application_settings.rb b/db/migrate/20150310194358_add_version_check_to_application_settings.rb
index 5d3dae6e7d8..cc1b19f302e 100644
--- a/db/migrate/20150310194358_add_version_check_to_application_settings.rb
+++ b/db/migrate/20150310194358_add_version_check_to_application_settings.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddVersionCheckToApplicationSettings < ActiveRecord::Migration
+class AddVersionCheckToApplicationSettings < ActiveRecord::Migration[4.2]
def change
add_column :application_settings, :version_check_enabled, :boolean, default: true
end
diff --git a/db/migrate/20150313012111_create_subscriptions_table.rb b/db/migrate/20150313012111_create_subscriptions_table.rb
index a9a8435330d..37011504b49 100644
--- a/db/migrate/20150313012111_create_subscriptions_table.rb
+++ b/db/migrate/20150313012111_create_subscriptions_table.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class CreateSubscriptionsTable < ActiveRecord::Migration
+class CreateSubscriptionsTable < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20150320234437_add_location_to_user.rb b/db/migrate/20150320234437_add_location_to_user.rb
index 32731d37d75..cf273ff916e 100644
--- a/db/migrate/20150320234437_add_location_to_user.rb
+++ b/db/migrate/20150320234437_add_location_to_user.rb
@@ -1,4 +1,4 @@
-class AddLocationToUser < ActiveRecord::Migration
+class AddLocationToUser < ActiveRecord::Migration[4.2]
def change
add_column :users, :location, :string
end
diff --git a/db/migrate/20150324155957_set_incorrect_assignee_id_to_null.rb b/db/migrate/20150324155957_set_incorrect_assignee_id_to_null.rb
index 42dc8173e46..a895d5f24f5 100644
--- a/db/migrate/20150324155957_set_incorrect_assignee_id_to_null.rb
+++ b/db/migrate/20150324155957_set_incorrect_assignee_id_to_null.rb
@@ -1,4 +1,4 @@
-class SetIncorrectAssigneeIdToNull < ActiveRecord::Migration
+class SetIncorrectAssigneeIdToNull < ActiveRecord::Migration[4.2]
def up
execute "UPDATE issues SET assignee_id = NULL WHERE assignee_id = -1"
execute "UPDATE merge_requests SET assignee_id = NULL WHERE assignee_id = -1"
diff --git a/db/migrate/20150327122227_add_public_to_key.rb b/db/migrate/20150327122227_add_public_to_key.rb
index 33c20d65e03..58d8c16476f 100644
--- a/db/migrate/20150327122227_add_public_to_key.rb
+++ b/db/migrate/20150327122227_add_public_to_key.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddPublicToKey < ActiveRecord::Migration
+class AddPublicToKey < ActiveRecord::Migration[4.2]
def change
add_column :keys, :public, :boolean, default: false, null: false
end
diff --git a/db/migrate/20150327150017_add_import_data_to_project.rb b/db/migrate/20150327150017_add_import_data_to_project.rb
index 12c00339eec..5d393364ee6 100644
--- a/db/migrate/20150327150017_add_import_data_to_project.rb
+++ b/db/migrate/20150327150017_add_import_data_to_project.rb
@@ -1,4 +1,4 @@
-class AddImportDataToProject < ActiveRecord::Migration
+class AddImportDataToProject < ActiveRecord::Migration[4.2]
def change
add_column :projects, :import_data, :text
end
diff --git a/db/migrate/20150327223628_add_devise_two_factor_to_users.rb b/db/migrate/20150327223628_add_devise_two_factor_to_users.rb
index 11b026ee8f3..22202796547 100644
--- a/db/migrate/20150327223628_add_devise_two_factor_to_users.rb
+++ b/db/migrate/20150327223628_add_devise_two_factor_to_users.rb
@@ -1,4 +1,4 @@
-class AddDeviseTwoFactorToUsers < ActiveRecord::Migration
+class AddDeviseTwoFactorToUsers < ActiveRecord::Migration[4.2]
def change
add_column :users, :encrypted_otp_secret, :string
add_column :users, :encrypted_otp_secret_iv, :string
diff --git a/db/migrate/20150328132231_add_max_attachment_size_to_application_settings.rb b/db/migrate/20150328132231_add_max_attachment_size_to_application_settings.rb
index 1d161674a9a..4ce60a257cb 100644
--- a/db/migrate/20150328132231_add_max_attachment_size_to_application_settings.rb
+++ b/db/migrate/20150328132231_add_max_attachment_size_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddMaxAttachmentSizeToApplicationSettings < ActiveRecord::Migration
+class AddMaxAttachmentSizeToApplicationSettings < ActiveRecord::Migration[4.2]
def change
add_column :application_settings, :max_attachment_size, :integer, default: 10, null: false
end
diff --git a/db/migrate/20150331183602_add_devise_two_factor_backupable_to_users.rb b/db/migrate/20150331183602_add_devise_two_factor_backupable_to_users.rb
index 913958db7c5..792b98c91f0 100644
--- a/db/migrate/20150331183602_add_devise_two_factor_backupable_to_users.rb
+++ b/db/migrate/20150331183602_add_devise_two_factor_backupable_to_users.rb
@@ -1,4 +1,4 @@
-class AddDeviseTwoFactorBackupableToUsers < ActiveRecord::Migration
+class AddDeviseTwoFactorBackupableToUsers < ActiveRecord::Migration[4.2]
def change
add_column :users, :otp_backup_codes, :text
end
diff --git a/db/migrate/20150406133311_add_invite_data_to_member.rb b/db/migrate/20150406133311_add_invite_data_to_member.rb
index 63d0f184f32..eee991185ab 100644
--- a/db/migrate/20150406133311_add_invite_data_to_member.rb
+++ b/db/migrate/20150406133311_add_invite_data_to_member.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddInviteDataToMember < ActiveRecord::Migration
+class AddInviteDataToMember < ActiveRecord::Migration[4.2]
def up
add_column :members, :created_by_id, :integer
add_column :members, :invite_email, :string
diff --git a/db/migrate/20150411000035_fix_identities.rb b/db/migrate/20150411000035_fix_identities.rb
index d9051f9fffd..a449fc51ecc 100644
--- a/db/migrate/20150411000035_fix_identities.rb
+++ b/db/migrate/20150411000035_fix_identities.rb
@@ -1,4 +1,4 @@
-class FixIdentities < ActiveRecord::Migration
+class FixIdentities < ActiveRecord::Migration[4.2]
def up
# Up until now, legacy 'ldap' references in the database were charitably
# interpreted to point to the first LDAP server specified in the GitLab
diff --git a/db/migrate/20150411180045_rename_buildbox_service.rb b/db/migrate/20150411180045_rename_buildbox_service.rb
index 5a0b5d07e50..ac4ccdfb723 100644
--- a/db/migrate/20150411180045_rename_buildbox_service.rb
+++ b/db/migrate/20150411180045_rename_buildbox_service.rb
@@ -1,4 +1,4 @@
-class RenameBuildboxService < ActiveRecord::Migration
+class RenameBuildboxService < ActiveRecord::Migration[4.2]
def up
execute "UPDATE services SET type = 'BuildkiteService' WHERE type = 'BuildboxService';"
end
diff --git a/db/migrate/20150413192223_add_public_email_to_users.rb b/db/migrate/20150413192223_add_public_email_to_users.rb
index 0fed5eaf461..991f0c668c3 100644
--- a/db/migrate/20150413192223_add_public_email_to_users.rb
+++ b/db/migrate/20150413192223_add_public_email_to_users.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddPublicEmailToUsers < ActiveRecord::Migration
+class AddPublicEmailToUsers < ActiveRecord::Migration[4.2]
def change
add_column :users, :public_email, :string, default: "", null: false
end
diff --git a/db/migrate/20150417121913_create_project_import_data.rb b/db/migrate/20150417121913_create_project_import_data.rb
index c78f5fde85e..383f64fd2c6 100644
--- a/db/migrate/20150417121913_create_project_import_data.rb
+++ b/db/migrate/20150417121913_create_project_import_data.rb
@@ -1,4 +1,4 @@
-class CreateProjectImportData < ActiveRecord::Migration
+class CreateProjectImportData < ActiveRecord::Migration[4.2]
def change
create_table :project_import_data do |t|
t.references :project
diff --git a/db/migrate/20150417122318_remove_import_data_from_project.rb b/db/migrate/20150417122318_remove_import_data_from_project.rb
index 5a008218fa5..c9a225a9d17 100644
--- a/db/migrate/20150417122318_remove_import_data_from_project.rb
+++ b/db/migrate/20150417122318_remove_import_data_from_project.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class RemoveImportDataFromProject < ActiveRecord::Migration
+class RemoveImportDataFromProject < ActiveRecord::Migration[4.2]
def up
remove_column :projects, :import_data
end
diff --git a/db/migrate/20150421120000_remove_periods_at_ends_of_usernames.rb b/db/migrate/20150421120000_remove_periods_at_ends_of_usernames.rb
index 3445e9ce59e..d2e7656c9d4 100644
--- a/db/migrate/20150421120000_remove_periods_at_ends_of_usernames.rb
+++ b/db/migrate/20150421120000_remove_periods_at_ends_of_usernames.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class RemovePeriodsAtEndsOfUsernames < ActiveRecord::Migration
+class RemovePeriodsAtEndsOfUsernames < ActiveRecord::Migration[4.2]
include Gitlab::ShellAdapter
class Namespace < ActiveRecord::Base
diff --git a/db/migrate/20150423033240_add_default_project_visibililty_to_application_settings.rb b/db/migrate/20150423033240_add_default_project_visibililty_to_application_settings.rb
index 50a9b2439e0..e0f35da422a 100644
--- a/db/migrate/20150423033240_add_default_project_visibililty_to_application_settings.rb
+++ b/db/migrate/20150423033240_add_default_project_visibililty_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddDefaultProjectVisibililtyToApplicationSettings < ActiveRecord::Migration
+class AddDefaultProjectVisibililtyToApplicationSettings < ActiveRecord::Migration[4.2]
def up
add_column :application_settings, :default_project_visibility, :integer
visibility = Settings.gitlab.default_projects_features['visibility_level']
diff --git a/db/migrate/20150425164646_gitlab_change_collation_for_tag_names.acts_as_taggable_on_engine.rb b/db/migrate/20150425164646_gitlab_change_collation_for_tag_names.acts_as_taggable_on_engine.rb
index 281c88d2a7d..5b2e692eb17 100644
--- a/db/migrate/20150425164646_gitlab_change_collation_for_tag_names.acts_as_taggable_on_engine.rb
+++ b/db/migrate/20150425164646_gitlab_change_collation_for_tag_names.acts_as_taggable_on_engine.rb
@@ -1,7 +1,7 @@
# This migration is a duplicate of 20150425164651_change_collation_for_tag_names.acts_as_taggable_on_engine.rb
# It shold be applied before the index additions to ensure that `name` is case sensitive.
-class GitlabChangeCollationForTagNames < ActiveRecord::Migration
+class GitlabChangeCollationForTagNames < ActiveRecord::Migration[4.2]
def up
if ActsAsTaggableOn::Utils.using_mysql?
execute("ALTER TABLE tags MODIFY name varchar(255) CHARACTER SET utf8 COLLATE utf8_bin;")
diff --git a/db/migrate/20150425164647_remove_duplicate_tags.rb b/db/migrate/20150425164647_remove_duplicate_tags.rb
index e77623bf507..5165eb65695 100644
--- a/db/migrate/20150425164647_remove_duplicate_tags.rb
+++ b/db/migrate/20150425164647_remove_duplicate_tags.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class RemoveDuplicateTags < ActiveRecord::Migration
+class RemoveDuplicateTags < ActiveRecord::Migration[4.2]
def up
select_all("SELECT name, COUNT(id) as cnt FROM tags GROUP BY name HAVING COUNT(id) > 1").each do |tag|
tag_name = quote_string(tag["name"])
diff --git a/db/migrate/20150425164648_add_missing_unique_indices.acts_as_taggable_on_engine.rb b/db/migrate/20150425164648_add_missing_unique_indices.acts_as_taggable_on_engine.rb
index cbff98cdbc4..d1951f640bb 100644
--- a/db/migrate/20150425164648_add_missing_unique_indices.acts_as_taggable_on_engine.rb
+++ b/db/migrate/20150425164648_add_missing_unique_indices.acts_as_taggable_on_engine.rb
@@ -1,6 +1,6 @@
# rubocop:disable all
# This migration comes from acts_as_taggable_on_engine (originally 2)
-class AddMissingUniqueIndices < ActiveRecord::Migration
+class AddMissingUniqueIndices < ActiveRecord::Migration[4.2]
def self.up
add_index :tags, :name, unique: true
diff --git a/db/migrate/20150425164649_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb b/db/migrate/20150425164649_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb
index 1568d2dd4ce..b9af394f09b 100644
--- a/db/migrate/20150425164649_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb
+++ b/db/migrate/20150425164649_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb
@@ -1,6 +1,6 @@
# rubocop:disable all
# This migration comes from acts_as_taggable_on_engine (originally 3)
-class AddTaggingsCounterCacheToTags < ActiveRecord::Migration
+class AddTaggingsCounterCacheToTags < ActiveRecord::Migration[4.2]
def self.up
add_column :tags, :taggings_count, :integer, default: 0
diff --git a/db/migrate/20150425164650_add_missing_taggable_index.acts_as_taggable_on_engine.rb b/db/migrate/20150425164650_add_missing_taggable_index.acts_as_taggable_on_engine.rb
index 71f2d7f4330..f28737615d7 100644
--- a/db/migrate/20150425164650_add_missing_taggable_index.acts_as_taggable_on_engine.rb
+++ b/db/migrate/20150425164650_add_missing_taggable_index.acts_as_taggable_on_engine.rb
@@ -1,5 +1,5 @@
# This migration comes from acts_as_taggable_on_engine (originally 4)
-class AddMissingTaggableIndex < ActiveRecord::Migration
+class AddMissingTaggableIndex < ActiveRecord::Migration[4.2]
def self.up
add_index :taggings, [:taggable_id, :taggable_type, :context]
end
diff --git a/db/migrate/20150425164651_change_collation_for_tag_names.acts_as_taggable_on_engine.rb b/db/migrate/20150425164651_change_collation_for_tag_names.acts_as_taggable_on_engine.rb
index bfb06bc7cda..4c144a8693f 100644
--- a/db/migrate/20150425164651_change_collation_for_tag_names.acts_as_taggable_on_engine.rb
+++ b/db/migrate/20150425164651_change_collation_for_tag_names.acts_as_taggable_on_engine.rb
@@ -1,7 +1,7 @@
# This migration comes from acts_as_taggable_on_engine (originally 5)
# This migration is added to circumvent issue #623 and have special characters
# work properly
-class ChangeCollationForTagNames < ActiveRecord::Migration
+class ChangeCollationForTagNames < ActiveRecord::Migration[4.2]
def up
if ActsAsTaggableOn::Utils.using_mysql?
execute("ALTER TABLE tags MODIFY name varchar(255) CHARACTER SET utf8 COLLATE utf8_bin;")
diff --git a/db/migrate/20150425173433_add_default_snippet_visibility_to_app_settings.rb b/db/migrate/20150425173433_add_default_snippet_visibility_to_app_settings.rb
index 8f1b0cc8935..a3a86d26767 100644
--- a/db/migrate/20150425173433_add_default_snippet_visibility_to_app_settings.rb
+++ b/db/migrate/20150425173433_add_default_snippet_visibility_to_app_settings.rb
@@ -1,4 +1,4 @@
-class AddDefaultSnippetVisibilityToAppSettings < ActiveRecord::Migration
+class AddDefaultSnippetVisibilityToAppSettings < ActiveRecord::Migration[4.2]
def up
add_column :application_settings, :default_snippet_visibility, :integer
visibility = Settings.gitlab.default_projects_features['visibility_level']
diff --git a/db/migrate/20150429002313_remove_abandoned_group_members_records.rb b/db/migrate/20150429002313_remove_abandoned_group_members_records.rb
index 244637e1c4a..370b807dd50 100644
--- a/db/migrate/20150429002313_remove_abandoned_group_members_records.rb
+++ b/db/migrate/20150429002313_remove_abandoned_group_members_records.rb
@@ -1,4 +1,4 @@
-class RemoveAbandonedGroupMembersRecords < ActiveRecord::Migration
+class RemoveAbandonedGroupMembersRecords < ActiveRecord::Migration[4.2]
def up
execute("DELETE FROM members WHERE type = 'GroupMember' AND source_id NOT IN(\
SELECT id FROM namespaces WHERE type='Group')")
diff --git a/db/migrate/20150502064022_add_restricted_signup_domains_to_application_settings.rb b/db/migrate/20150502064022_add_restricted_signup_domains_to_application_settings.rb
index 184e2653610..df777263ecb 100644
--- a/db/migrate/20150502064022_add_restricted_signup_domains_to_application_settings.rb
+++ b/db/migrate/20150502064022_add_restricted_signup_domains_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddRestrictedSignupDomainsToApplicationSettings < ActiveRecord::Migration
+class AddRestrictedSignupDomainsToApplicationSettings < ActiveRecord::Migration[4.2]
def change
add_column :application_settings, :restricted_signup_domains, :text
end
diff --git a/db/migrate/20150509180749_convert_legacy_reference_notes.rb b/db/migrate/20150509180749_convert_legacy_reference_notes.rb
index b02605489be..a44a908c2f5 100644
--- a/db/migrate/20150509180749_convert_legacy_reference_notes.rb
+++ b/db/migrate/20150509180749_convert_legacy_reference_notes.rb
@@ -5,7 +5,7 @@
# becomes
#
# mentioned in 54f7727c850972f0401c1312a7c4a6a380de5666
-class ConvertLegacyReferenceNotes < ActiveRecord::Migration
+class ConvertLegacyReferenceNotes < ActiveRecord::Migration[4.2]
def up
execute %q{UPDATE notes SET note = trim(both '_' from note) WHERE system = true AND note LIKE '\_%\_'}
end
diff --git a/db/migrate/20150516060434_add_note_events_to_web_hooks.rb b/db/migrate/20150516060434_add_note_events_to_web_hooks.rb
index bf72e5e2e3a..ddf26240b8b 100644
--- a/db/migrate/20150516060434_add_note_events_to_web_hooks.rb
+++ b/db/migrate/20150516060434_add_note_events_to_web_hooks.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddNoteEventsToWebHooks < ActiveRecord::Migration
+class AddNoteEventsToWebHooks < ActiveRecord::Migration[4.2]
def up
add_column :web_hooks, :note_events, :boolean, default: false, null: false
end
diff --git a/db/migrate/20150529111607_add_user_oauth_applications_to_application_settings.rb b/db/migrate/20150529111607_add_user_oauth_applications_to_application_settings.rb
index 6a78294f0b2..507e905acd6 100644
--- a/db/migrate/20150529111607_add_user_oauth_applications_to_application_settings.rb
+++ b/db/migrate/20150529111607_add_user_oauth_applications_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddUserOauthApplicationsToApplicationSettings < ActiveRecord::Migration
+class AddUserOauthApplicationsToApplicationSettings < ActiveRecord::Migration[4.2]
def change
add_column :application_settings, :user_oauth_applications, :bool, default: true
end
diff --git a/db/migrate/20150529150354_add_after_sign_out_path_for_application_settings.rb b/db/migrate/20150529150354_add_after_sign_out_path_for_application_settings.rb
index 833c36de52d..f43f20def5b 100644
--- a/db/migrate/20150529150354_add_after_sign_out_path_for_application_settings.rb
+++ b/db/migrate/20150529150354_add_after_sign_out_path_for_application_settings.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddAfterSignOutPathForApplicationSettings < ActiveRecord::Migration
+class AddAfterSignOutPathForApplicationSettings < ActiveRecord::Migration[4.2]
def change
add_column :application_settings, :after_sign_out_path, :string
end
diff --git a/db/migrate/20150609141121_add_session_expire_delay_for_application_settings.rb b/db/migrate/20150609141121_add_session_expire_delay_for_application_settings.rb
index 61ff0af41f4..93959a9010f 100644
--- a/db/migrate/20150609141121_add_session_expire_delay_for_application_settings.rb
+++ b/db/migrate/20150609141121_add_session_expire_delay_for_application_settings.rb
@@ -1,4 +1,4 @@
-class AddSessionExpireDelayForApplicationSettings < ActiveRecord::Migration
+class AddSessionExpireDelayForApplicationSettings < ActiveRecord::Migration[4.2]
def change
unless column_exists?(:application_settings, :session_expire_delay)
add_column :application_settings, :session_expire_delay, :integer, default: 10080, null: false
diff --git a/db/migrate/20150610065936_add_dashboard_to_users.rb b/db/migrate/20150610065936_add_dashboard_to_users.rb
index df38472f893..a0bf5f31f00 100644
--- a/db/migrate/20150610065936_add_dashboard_to_users.rb
+++ b/db/migrate/20150610065936_add_dashboard_to_users.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddDashboardToUsers < ActiveRecord::Migration
+class AddDashboardToUsers < ActiveRecord::Migration[4.2]
def up
add_column :users, :dashboard, :integer, default: 0
end
diff --git a/db/migrate/20150620233230_add_default_otp_required_for_login_value.rb b/db/migrate/20150620233230_add_default_otp_required_for_login_value.rb
index 8eed8678b2f..4a085ff06f3 100644
--- a/db/migrate/20150620233230_add_default_otp_required_for_login_value.rb
+++ b/db/migrate/20150620233230_add_default_otp_required_for_login_value.rb
@@ -1,4 +1,4 @@
-class AddDefaultOtpRequiredForLoginValue < ActiveRecord::Migration
+class AddDefaultOtpRequiredForLoginValue < ActiveRecord::Migration[4.2]
def up
execute %q{UPDATE users SET otp_required_for_login = FALSE WHERE otp_required_for_login IS NULL}
diff --git a/db/migrate/20150713160110_add_project_view_to_users.rb b/db/migrate/20150713160110_add_project_view_to_users.rb
index 0de5a93035c..fea63576187 100644
--- a/db/migrate/20150713160110_add_project_view_to_users.rb
+++ b/db/migrate/20150713160110_add_project_view_to_users.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddProjectViewToUsers < ActiveRecord::Migration
+class AddProjectViewToUsers < ActiveRecord::Migration[4.2]
def change
add_column :users, :project_view, :integer, default: 0
end
diff --git a/db/migrate/20150717130904_add_commits_count_to_project.rb b/db/migrate/20150717130904_add_commits_count_to_project.rb
index 5799e068c69..df6c88f2961 100644
--- a/db/migrate/20150717130904_add_commits_count_to_project.rb
+++ b/db/migrate/20150717130904_add_commits_count_to_project.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddCommitsCountToProject < ActiveRecord::Migration
+class AddCommitsCountToProject < ActiveRecord::Migration[4.2]
def change
add_column :projects, :commit_count, :integer, default: 0
end
diff --git a/db/migrate/20150730122406_add_updated_by_to_issuables_and_notes.rb b/db/migrate/20150730122406_add_updated_by_to_issuables_and_notes.rb
index 78d45c7f96b..fab126c3d04 100644
--- a/db/migrate/20150730122406_add_updated_by_to_issuables_and_notes.rb
+++ b/db/migrate/20150730122406_add_updated_by_to_issuables_and_notes.rb
@@ -1,4 +1,4 @@
-class AddUpdatedByToIssuablesAndNotes < ActiveRecord::Migration
+class AddUpdatedByToIssuablesAndNotes < ActiveRecord::Migration[4.2]
def change
add_column :notes, :updated_by_id, :integer
add_column :issues, :updated_by_id, :integer
diff --git a/db/migrate/20150806104937_create_abuse_reports.rb b/db/migrate/20150806104937_create_abuse_reports.rb
index 52aed9e1d1d..be4fe8d1cfd 100644
--- a/db/migrate/20150806104937_create_abuse_reports.rb
+++ b/db/migrate/20150806104937_create_abuse_reports.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class CreateAbuseReports < ActiveRecord::Migration
+class CreateAbuseReports < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20150812080800_add_settings_import_sources.rb b/db/migrate/20150812080800_add_settings_import_sources.rb
index 07f417fa3e3..59db31c868a 100644
--- a/db/migrate/20150812080800_add_settings_import_sources.rb
+++ b/db/migrate/20150812080800_add_settings_import_sources.rb
@@ -1,7 +1,7 @@
# rubocop:disable all
require 'yaml'
-class AddSettingsImportSources < ActiveRecord::Migration
+class AddSettingsImportSources < ActiveRecord::Migration[4.2]
def change
unless column_exists?(:application_settings, :import_sources)
add_column :application_settings, :import_sources, :text
diff --git a/db/migrate/20150814065925_remove_oauth_tokens_from_users.rb b/db/migrate/20150814065925_remove_oauth_tokens_from_users.rb
index 7eaa7eda311..f0080ee0b46 100644
--- a/db/migrate/20150814065925_remove_oauth_tokens_from_users.rb
+++ b/db/migrate/20150814065925_remove_oauth_tokens_from_users.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class RemoveOauthTokensFromUsers < ActiveRecord::Migration
+class RemoveOauthTokensFromUsers < ActiveRecord::Migration[4.2]
def change
remove_column :users, :github_access_token, :string
remove_column :users, :gitlab_access_token, :string
diff --git a/db/migrate/20150817163600_deduplicate_user_identities.rb b/db/migrate/20150817163600_deduplicate_user_identities.rb
index b0cfad7d20f..973a87e07ea 100644
--- a/db/migrate/20150817163600_deduplicate_user_identities.rb
+++ b/db/migrate/20150817163600_deduplicate_user_identities.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class DeduplicateUserIdentities < ActiveRecord::Migration
+class DeduplicateUserIdentities < ActiveRecord::Migration[4.2]
def change
execute 'DROP TABLE IF EXISTS tt_migration_DeduplicateUserIdentities;'
execute 'CREATE TABLE tt_migration_DeduplicateUserIdentities AS SELECT id,provider,user_id FROM identities;'
diff --git a/db/migrate/20150818213832_add_sent_notifications.rb b/db/migrate/20150818213832_add_sent_notifications.rb
index 43e8d6a1a82..45e95a843e1 100644
--- a/db/migrate/20150818213832_add_sent_notifications.rb
+++ b/db/migrate/20150818213832_add_sent_notifications.rb
@@ -1,4 +1,4 @@
-class AddSentNotifications < ActiveRecord::Migration
+class AddSentNotifications < ActiveRecord::Migration[4.2]
def change
create_table :sent_notifications do |t|
t.references :project
diff --git a/db/migrate/20150824002011_add_enable_ssl_verification.rb b/db/migrate/20150824002011_add_enable_ssl_verification.rb
index 6e992f08834..2d877914f39 100644
--- a/db/migrate/20150824002011_add_enable_ssl_verification.rb
+++ b/db/migrate/20150824002011_add_enable_ssl_verification.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddEnableSslVerification < ActiveRecord::Migration
+class AddEnableSslVerification < ActiveRecord::Migration[4.2]
def change
add_column :web_hooks, :enable_ssl_verification, :boolean, default: false
end
diff --git a/db/migrate/20150826001931_add_ci_tables.rb b/db/migrate/20150826001931_add_ci_tables.rb
index d1f8506d1fe..aa2af44a15b 100644
--- a/db/migrate/20150826001931_add_ci_tables.rb
+++ b/db/migrate/20150826001931_add_ci_tables.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddCiTables < ActiveRecord::Migration
+class AddCiTables < ActiveRecord::Migration[4.2]
def change
create_table "ci_application_settings", force: true do |t|
t.boolean "all_broken_builds"
diff --git a/db/migrate/20150827121444_add_fast_forward_option_to_project.rb b/db/migrate/20150827121444_add_fast_forward_option_to_project.rb
index 35df121519e..bf7db2fb12b 100644
--- a/db/migrate/20150827121444_add_fast_forward_option_to_project.rb
+++ b/db/migrate/20150827121444_add_fast_forward_option_to_project.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddFastForwardOptionToProject < ActiveRecord::Migration
+class AddFastForwardOptionToProject < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20150902001023_add_template_to_label.rb b/db/migrate/20150902001023_add_template_to_label.rb
index 0f6ae8d6cc3..10769f29baa 100644
--- a/db/migrate/20150902001023_add_template_to_label.rb
+++ b/db/migrate/20150902001023_add_template_to_label.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddTemplateToLabel < ActiveRecord::Migration
+class AddTemplateToLabel < ActiveRecord::Migration[4.2]
def change
add_column :labels, :template, :boolean, default: false
end
diff --git a/db/migrate/20150914215247_add_ci_tags.rb b/db/migrate/20150914215247_add_ci_tags.rb
index b647bc9c8a2..9afa4540540 100644
--- a/db/migrate/20150914215247_add_ci_tags.rb
+++ b/db/migrate/20150914215247_add_ci_tags.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddCiTags < ActiveRecord::Migration
+class AddCiTags < ActiveRecord::Migration[4.2]
def change
create_table "ci_taggings", force: true do |t|
t.integer "tag_id"
diff --git a/db/migrate/20150915001905_enable_ssl_verification_by_default.rb b/db/migrate/20150915001905_enable_ssl_verification_by_default.rb
index 6e924262a13..ddd07179753 100644
--- a/db/migrate/20150915001905_enable_ssl_verification_by_default.rb
+++ b/db/migrate/20150915001905_enable_ssl_verification_by_default.rb
@@ -1,4 +1,4 @@
-class EnableSslVerificationByDefault < ActiveRecord::Migration
+class EnableSslVerificationByDefault < ActiveRecord::Migration[4.2]
def change
change_column :web_hooks, :enable_ssl_verification, :boolean, default: true
end
diff --git a/db/migrate/20150916000405_enable_ssl_verification_for_web_hooks.rb b/db/migrate/20150916000405_enable_ssl_verification_for_web_hooks.rb
index 90ce6c2db3d..49081c9d749 100644
--- a/db/migrate/20150916000405_enable_ssl_verification_for_web_hooks.rb
+++ b/db/migrate/20150916000405_enable_ssl_verification_for_web_hooks.rb
@@ -1,4 +1,4 @@
-class EnableSslVerificationForWebHooks < ActiveRecord::Migration
+class EnableSslVerificationForWebHooks < ActiveRecord::Migration[4.2]
def up
execute("UPDATE web_hooks SET enable_ssl_verification = true")
end
diff --git a/db/migrate/20150916114643_add_help_page_text_to_application_settings.rb b/db/migrate/20150916114643_add_help_page_text_to_application_settings.rb
index 37a27f11935..52867632880 100644
--- a/db/migrate/20150916114643_add_help_page_text_to_application_settings.rb
+++ b/db/migrate/20150916114643_add_help_page_text_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddHelpPageTextToApplicationSettings < ActiveRecord::Migration
+class AddHelpPageTextToApplicationSettings < ActiveRecord::Migration[4.2]
def change
add_column :application_settings, :help_page_text, :text
end
diff --git a/db/migrate/20150916145038_add_index_for_committed_at_and_id.rb b/db/migrate/20150916145038_add_index_for_committed_at_and_id.rb
index a18ed93cf37..bf78aacd9f4 100644
--- a/db/migrate/20150916145038_add_index_for_committed_at_and_id.rb
+++ b/db/migrate/20150916145038_add_index_for_committed_at_and_id.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddIndexForCommittedAtAndId < ActiveRecord::Migration
+class AddIndexForCommittedAtAndId < ActiveRecord::Migration[4.2]
def change
add_index :ci_commits, [:project_id, :committed_at, :id]
end
diff --git a/db/migrate/20150918084513_add_ci_enabled_to_application_settings.rb b/db/migrate/20150918084513_add_ci_enabled_to_application_settings.rb
index 6cf668a170e..153c1a798c3 100644
--- a/db/migrate/20150918084513_add_ci_enabled_to_application_settings.rb
+++ b/db/migrate/20150918084513_add_ci_enabled_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddCiEnabledToApplicationSettings < ActiveRecord::Migration
+class AddCiEnabledToApplicationSettings < ActiveRecord::Migration[4.2]
def change
add_column :application_settings, :ci_enabled, :boolean, null: false, default: true
end
diff --git a/db/migrate/20150918161719_remove_invalid_milestones_from_merge_requests.rb b/db/migrate/20150918161719_remove_invalid_milestones_from_merge_requests.rb
index 0aad6fe5e6e..52651e16324 100644
--- a/db/migrate/20150918161719_remove_invalid_milestones_from_merge_requests.rb
+++ b/db/migrate/20150918161719_remove_invalid_milestones_from_merge_requests.rb
@@ -1,4 +1,4 @@
-class RemoveInvalidMilestonesFromMergeRequests < ActiveRecord::Migration
+class RemoveInvalidMilestonesFromMergeRequests < ActiveRecord::Migration[4.2]
def up
execute("UPDATE merge_requests SET milestone_id = NULL where milestone_id NOT IN (SELECT id FROM milestones)")
end
diff --git a/db/migrate/20150920010715_add_consumed_timestep_to_users.rb b/db/migrate/20150920010715_add_consumed_timestep_to_users.rb
index c8438b3f6aa..c69944b1e94 100644
--- a/db/migrate/20150920010715_add_consumed_timestep_to_users.rb
+++ b/db/migrate/20150920010715_add_consumed_timestep_to_users.rb
@@ -1,4 +1,4 @@
-class AddConsumedTimestepToUsers < ActiveRecord::Migration
+class AddConsumedTimestepToUsers < ActiveRecord::Migration[4.2]
def change
add_column :users, :consumed_timestep, :integer
end
diff --git a/db/migrate/20150920161119_add_line_code_to_sent_notification.rb b/db/migrate/20150920161119_add_line_code_to_sent_notification.rb
index d9af4e71751..671476f0b07 100644
--- a/db/migrate/20150920161119_add_line_code_to_sent_notification.rb
+++ b/db/migrate/20150920161119_add_line_code_to_sent_notification.rb
@@ -1,4 +1,4 @@
-class AddLineCodeToSentNotification < ActiveRecord::Migration
+class AddLineCodeToSentNotification < ActiveRecord::Migration[4.2]
def change
add_column :sent_notifications, :line_code, :string
end
diff --git a/db/migrate/20150924125150_add_project_id_to_ci_commit.rb b/db/migrate/20150924125150_add_project_id_to_ci_commit.rb
index 1a761fe0f86..c9f16b0f3f9 100644
--- a/db/migrate/20150924125150_add_project_id_to_ci_commit.rb
+++ b/db/migrate/20150924125150_add_project_id_to_ci_commit.rb
@@ -1,4 +1,4 @@
-class AddProjectIdToCiCommit < ActiveRecord::Migration
+class AddProjectIdToCiCommit < ActiveRecord::Migration[4.2]
def up
add_column :ci_commits, :gl_project_id, :integer
end
diff --git a/db/migrate/20150924125436_migrate_project_id_for_ci_commits.rb b/db/migrate/20150924125436_migrate_project_id_for_ci_commits.rb
index 2be57b6062e..ff31e70874f 100644
--- a/db/migrate/20150924125436_migrate_project_id_for_ci_commits.rb
+++ b/db/migrate/20150924125436_migrate_project_id_for_ci_commits.rb
@@ -1,4 +1,4 @@
-class MigrateProjectIdForCiCommits < ActiveRecord::Migration
+class MigrateProjectIdForCiCommits < ActiveRecord::Migration[4.2]
def up
subquery = 'SELECT gitlab_id FROM ci_projects WHERE ci_projects.id = ci_commits.project_id'
execute("UPDATE ci_commits SET gl_project_id=(#{subquery}) WHERE gl_project_id IS NULL")
diff --git a/db/migrate/20150930001110_merge_request_error_field.rb b/db/migrate/20150930001110_merge_request_error_field.rb
index c2ee498ef3f..30f012b0a92 100644
--- a/db/migrate/20150930001110_merge_request_error_field.rb
+++ b/db/migrate/20150930001110_merge_request_error_field.rb
@@ -1,4 +1,4 @@
-class MergeRequestErrorField < ActiveRecord::Migration
+class MergeRequestErrorField < ActiveRecord::Migration[4.2]
def up
add_column :merge_requests, :merge_error, :string
end
diff --git a/db/migrate/20150930095736_add_null_to_name_for_ci_projects.rb b/db/migrate/20150930095736_add_null_to_name_for_ci_projects.rb
index 8d47dac6441..181f9f059ac 100644
--- a/db/migrate/20150930095736_add_null_to_name_for_ci_projects.rb
+++ b/db/migrate/20150930095736_add_null_to_name_for_ci_projects.rb
@@ -1,4 +1,4 @@
-class AddNullToNameForCiProjects < ActiveRecord::Migration
+class AddNullToNameForCiProjects < ActiveRecord::Migration[4.2]
def up
change_column_null :ci_projects, :name, true
end
diff --git a/db/migrate/20150930110012_add_group_share_lock.rb b/db/migrate/20150930110012_add_group_share_lock.rb
index 96938bf9ab6..62755765457 100644
--- a/db/migrate/20150930110012_add_group_share_lock.rb
+++ b/db/migrate/20150930110012_add_group_share_lock.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddGroupShareLock < ActiveRecord::Migration
+class AddGroupShareLock < ActiveRecord::Migration[4.2]
def change
add_column :namespaces, :share_with_group_lock, :boolean, default: false
end
diff --git a/db/migrate/20151002112914_add_stage_idx_to_builds.rb b/db/migrate/20151002112914_add_stage_idx_to_builds.rb
index 68a745ffef4..f73df9dc284 100644
--- a/db/migrate/20151002112914_add_stage_idx_to_builds.rb
+++ b/db/migrate/20151002112914_add_stage_idx_to_builds.rb
@@ -1,4 +1,4 @@
-class AddStageIdxToBuilds < ActiveRecord::Migration
+class AddStageIdxToBuilds < ActiveRecord::Migration[4.2]
def change
add_column :ci_builds, :stage_idx, :integer
end
diff --git a/db/migrate/20151002121400_add_index_for_builds.rb b/db/migrate/20151002121400_add_index_for_builds.rb
index bd945c54540..5e6f80a1d3d 100644
--- a/db/migrate/20151002121400_add_index_for_builds.rb
+++ b/db/migrate/20151002121400_add_index_for_builds.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddIndexForBuilds < ActiveRecord::Migration
+class AddIndexForBuilds < ActiveRecord::Migration[4.2]
def up
add_index :ci_builds, [:commit_id, :stage_idx, :created_at]
end
diff --git a/db/migrate/20151002122929_add_ref_and_tag_to_builds.rb b/db/migrate/20151002122929_add_ref_and_tag_to_builds.rb
index e3d2ac1cea5..ea41921b6ee 100644
--- a/db/migrate/20151002122929_add_ref_and_tag_to_builds.rb
+++ b/db/migrate/20151002122929_add_ref_and_tag_to_builds.rb
@@ -1,4 +1,4 @@
-class AddRefAndTagToBuilds < ActiveRecord::Migration
+class AddRefAndTagToBuilds < ActiveRecord::Migration[4.2]
def change
add_column :ci_builds, :tag, :boolean
add_column :ci_builds, :ref, :string
diff --git a/db/migrate/20151002122943_migrate_ref_and_tag_to_build.rb b/db/migrate/20151002122943_migrate_ref_and_tag_to_build.rb
index 52217ce5af2..b4038e6fa83 100644
--- a/db/migrate/20151002122943_migrate_ref_and_tag_to_build.rb
+++ b/db/migrate/20151002122943_migrate_ref_and_tag_to_build.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class MigrateRefAndTagToBuild < ActiveRecord::Migration
+class MigrateRefAndTagToBuild < ActiveRecord::Migration[4.2]
def change
execute('UPDATE ci_builds SET ref=(SELECT ref FROM ci_commits WHERE ci_commits.id = ci_builds.commit_id) WHERE ref IS NULL')
execute('UPDATE ci_builds SET tag=(SELECT tag FROM ci_commits WHERE ci_commits.id = ci_builds.commit_id) WHERE tag IS NULL')
diff --git a/db/migrate/20151005075649_add_user_id_to_build.rb b/db/migrate/20151005075649_add_user_id_to_build.rb
index 0f4b92b8b79..45372bf7cba 100644
--- a/db/migrate/20151005075649_add_user_id_to_build.rb
+++ b/db/migrate/20151005075649_add_user_id_to_build.rb
@@ -1,4 +1,4 @@
-class AddUserIdToBuild < ActiveRecord::Migration
+class AddUserIdToBuild < ActiveRecord::Migration[4.2]
def change
add_column :ci_builds, :user_id, :integer
end
diff --git a/db/migrate/20151005150751_add_layout_option_for_users.rb b/db/migrate/20151005150751_add_layout_option_for_users.rb
index 7e68606969f..66cba21320a 100644
--- a/db/migrate/20151005150751_add_layout_option_for_users.rb
+++ b/db/migrate/20151005150751_add_layout_option_for_users.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddLayoutOptionForUsers < ActiveRecord::Migration
+class AddLayoutOptionForUsers < ActiveRecord::Migration[4.2]
def change
add_column :users, :layout, :integer, default: 0
end
diff --git a/db/migrate/20151005162154_remove_ci_enabled_from_application_settings.rb b/db/migrate/20151005162154_remove_ci_enabled_from_application_settings.rb
index 07dba598749..a8e6e54062a 100644
--- a/db/migrate/20151005162154_remove_ci_enabled_from_application_settings.rb
+++ b/db/migrate/20151005162154_remove_ci_enabled_from_application_settings.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class RemoveCiEnabledFromApplicationSettings < ActiveRecord::Migration
+class RemoveCiEnabledFromApplicationSettings < ActiveRecord::Migration[4.2]
def change
remove_column :application_settings, :ci_enabled, :boolean, null: false, default: true
end
diff --git a/db/migrate/20151007120511_namespaces_projects_path_lower_indexes.rb b/db/migrate/20151007120511_namespaces_projects_path_lower_indexes.rb
index 38208e59804..d6c21bf8639 100644
--- a/db/migrate/20151007120511_namespaces_projects_path_lower_indexes.rb
+++ b/db/migrate/20151007120511_namespaces_projects_path_lower_indexes.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class NamespacesProjectsPathLowerIndexes < ActiveRecord::Migration
+class NamespacesProjectsPathLowerIndexes < ActiveRecord::Migration[4.2]
disable_ddl_transaction!
def up
diff --git a/db/migrate/20151008110232_add_users_lower_username_email_indexes.rb b/db/migrate/20151008110232_add_users_lower_username_email_indexes.rb
index 6080d2a0fcf..2ba1a6146e2 100644
--- a/db/migrate/20151008110232_add_users_lower_username_email_indexes.rb
+++ b/db/migrate/20151008110232_add_users_lower_username_email_indexes.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddUsersLowerUsernameEmailIndexes < ActiveRecord::Migration
+class AddUsersLowerUsernameEmailIndexes < ActiveRecord::Migration[4.2]
disable_ddl_transaction!
def up
diff --git a/db/migrate/20151008123042_add_type_and_description_to_builds.rb b/db/migrate/20151008123042_add_type_and_description_to_builds.rb
index a19eb6c6c49..309655cf195 100644
--- a/db/migrate/20151008123042_add_type_and_description_to_builds.rb
+++ b/db/migrate/20151008123042_add_type_and_description_to_builds.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddTypeAndDescriptionToBuilds < ActiveRecord::Migration
+class AddTypeAndDescriptionToBuilds < ActiveRecord::Migration[4.2]
def change
add_column :ci_builds, :type, :string
add_column :ci_builds, :target_url, :string
diff --git a/db/migrate/20151008130321_migrate_name_to_description_for_builds.rb b/db/migrate/20151008130321_migrate_name_to_description_for_builds.rb
index 306fa7092ea..f4445277a6f 100644
--- a/db/migrate/20151008130321_migrate_name_to_description_for_builds.rb
+++ b/db/migrate/20151008130321_migrate_name_to_description_for_builds.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class MigrateNameToDescriptionForBuilds < ActiveRecord::Migration
+class MigrateNameToDescriptionForBuilds < ActiveRecord::Migration[4.2]
def change
execute("UPDATE ci_builds SET type='Ci::Build' WHERE type IS NULL")
end
diff --git a/db/migrate/20151008143519_add_admin_notification_email_setting.rb b/db/migrate/20151008143519_add_admin_notification_email_setting.rb
index 0bb581efe2c..60e0986e5a8 100644
--- a/db/migrate/20151008143519_add_admin_notification_email_setting.rb
+++ b/db/migrate/20151008143519_add_admin_notification_email_setting.rb
@@ -1,4 +1,4 @@
-class AddAdminNotificationEmailSetting < ActiveRecord::Migration
+class AddAdminNotificationEmailSetting < ActiveRecord::Migration[4.2]
def change
add_column :application_settings, :admin_notification_email, :string
end
diff --git a/db/migrate/20151012173029_set_jira_service_api_url.rb b/db/migrate/20151012173029_set_jira_service_api_url.rb
index 2b6f61428c0..91cc6bbc783 100644
--- a/db/migrate/20151012173029_set_jira_service_api_url.rb
+++ b/db/migrate/20151012173029_set_jira_service_api_url.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class SetJiraServiceApiUrl < ActiveRecord::Migration
+class SetJiraServiceApiUrl < ActiveRecord::Migration[4.2]
# This migration can be performed online without errors, but some Jira API calls may be missed
# when doing so because api_url is not yet available.
diff --git a/db/migrate/20151013092124_add_artifacts_file_to_builds.rb b/db/migrate/20151013092124_add_artifacts_file_to_builds.rb
index 5a299f7b26d..3936386a2c0 100644
--- a/db/migrate/20151013092124_add_artifacts_file_to_builds.rb
+++ b/db/migrate/20151013092124_add_artifacts_file_to_builds.rb
@@ -1,4 +1,4 @@
-class AddArtifactsFileToBuilds < ActiveRecord::Migration
+class AddArtifactsFileToBuilds < ActiveRecord::Migration[4.2]
def change
add_column :ci_builds, :artifacts_file, :text
end
diff --git a/db/migrate/20151016131433_add_ci_projects_gl_project_id_index.rb b/db/migrate/20151016131433_add_ci_projects_gl_project_id_index.rb
index eb3351eb767..a9290fef11a 100644
--- a/db/migrate/20151016131433_add_ci_projects_gl_project_id_index.rb
+++ b/db/migrate/20151016131433_add_ci_projects_gl_project_id_index.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddCiProjectsGlProjectIdIndex < ActiveRecord::Migration
+class AddCiProjectsGlProjectIdIndex < ActiveRecord::Migration[4.2]
def change
add_index :ci_commits, :gl_project_id
end
diff --git a/db/migrate/20151016195451_add_ci_builds_and_projects_indexes.rb b/db/migrate/20151016195451_add_ci_builds_and_projects_indexes.rb
index 899e004d610..c8a79f25ae5 100644
--- a/db/migrate/20151016195451_add_ci_builds_and_projects_indexes.rb
+++ b/db/migrate/20151016195451_add_ci_builds_and_projects_indexes.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddCiBuildsAndProjectsIndexes < ActiveRecord::Migration
+class AddCiBuildsAndProjectsIndexes < ActiveRecord::Migration[4.2]
def change
add_index :ci_projects, :gitlab_id
add_index :ci_projects, :shared_runners_enabled
diff --git a/db/migrate/20151016195706_add_notes_line_code_index.rb b/db/migrate/20151016195706_add_notes_line_code_index.rb
index 3298630c1e8..0a3ad103009 100644
--- a/db/migrate/20151016195706_add_notes_line_code_index.rb
+++ b/db/migrate/20151016195706_add_notes_line_code_index.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddNotesLineCodeIndex < ActiveRecord::Migration
+class AddNotesLineCodeIndex < ActiveRecord::Migration[4.2]
def change
add_index :notes, :line_code
end
diff --git a/db/migrate/20151019111551_fix_build_tags.rb b/db/migrate/20151019111551_fix_build_tags.rb
index 299a24b0a7c..3c64388314d 100644
--- a/db/migrate/20151019111551_fix_build_tags.rb
+++ b/db/migrate/20151019111551_fix_build_tags.rb
@@ -1,4 +1,4 @@
-class FixBuildTags < ActiveRecord::Migration
+class FixBuildTags < ActiveRecord::Migration[4.2]
def up
execute("UPDATE taggings SET taggable_type='CommitStatus' WHERE taggable_type='Ci::Build'")
end
diff --git a/db/migrate/20151019111703_fail_build_without_names.rb b/db/migrate/20151019111703_fail_build_without_names.rb
index dcdb5d1b25d..2dc9ffa32b9 100644
--- a/db/migrate/20151019111703_fail_build_without_names.rb
+++ b/db/migrate/20151019111703_fail_build_without_names.rb
@@ -1,4 +1,4 @@
-class FailBuildWithoutNames < ActiveRecord::Migration
+class FailBuildWithoutNames < ActiveRecord::Migration[4.2]
def up
execute("UPDATE ci_builds SET status='failed' WHERE name IS NULL AND status='pending'")
end
diff --git a/db/migrate/20151020145526_add_services_template_index.rb b/db/migrate/20151020145526_add_services_template_index.rb
index 14ff07bd726..24c373855e2 100644
--- a/db/migrate/20151020145526_add_services_template_index.rb
+++ b/db/migrate/20151020145526_add_services_template_index.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddServicesTemplateIndex < ActiveRecord::Migration
+class AddServicesTemplateIndex < ActiveRecord::Migration[4.2]
def change
add_index :services, :template
end
diff --git a/db/migrate/20151020173516_ci_limits_to_mysql.rb b/db/migrate/20151020173516_ci_limits_to_mysql.rb
index 9bb960082f5..573922b851b 100644
--- a/db/migrate/20151020173516_ci_limits_to_mysql.rb
+++ b/db/migrate/20151020173516_ci_limits_to_mysql.rb
@@ -1,4 +1,4 @@
-class CiLimitsToMysql < ActiveRecord::Migration
+class CiLimitsToMysql < ActiveRecord::Migration[4.2]
def change
return unless ActiveRecord::Base.configurations[Rails.env]['adapter'] =~ /^mysql/
diff --git a/db/migrate/20151020173906_add_ci_builds_index_for_status.rb b/db/migrate/20151020173906_add_ci_builds_index_for_status.rb
index 81a31e46ff8..231fc4f2a17 100644
--- a/db/migrate/20151020173906_add_ci_builds_index_for_status.rb
+++ b/db/migrate/20151020173906_add_ci_builds_index_for_status.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddCiBuildsIndexForStatus < ActiveRecord::Migration
+class AddCiBuildsIndexForStatus < ActiveRecord::Migration[4.2]
def change
add_index :ci_builds, [:commit_id, :status, :type]
end
diff --git a/db/migrate/20151023112551_fail_build_with_empty_name.rb b/db/migrate/20151023112551_fail_build_with_empty_name.rb
index 41c0f0649cd..28f531463bc 100644
--- a/db/migrate/20151023112551_fail_build_with_empty_name.rb
+++ b/db/migrate/20151023112551_fail_build_with_empty_name.rb
@@ -1,4 +1,4 @@
-class FailBuildWithEmptyName < ActiveRecord::Migration
+class FailBuildWithEmptyName < ActiveRecord::Migration[4.2]
def up
execute("UPDATE ci_builds SET status='failed' WHERE (name IS NULL OR name='') AND status='pending'")
end
diff --git a/db/migrate/20151023144219_remove_satellites.rb b/db/migrate/20151023144219_remove_satellites.rb
index e73f300028a..2d1310b0208 100644
--- a/db/migrate/20151023144219_remove_satellites.rb
+++ b/db/migrate/20151023144219_remove_satellites.rb
@@ -1,6 +1,6 @@
require 'fileutils'
-class RemoveSatellites < ActiveRecord::Migration
+class RemoveSatellites < ActiveRecord::Migration[4.2]
def up
satellites = Gitlab.config['satellites']
return if satellites.nil?
diff --git a/db/migrate/20151026182941_add_project_path_index.rb b/db/migrate/20151026182941_add_project_path_index.rb
index 117f65c1a1b..bf0444450cd 100644
--- a/db/migrate/20151026182941_add_project_path_index.rb
+++ b/db/migrate/20151026182941_add_project_path_index.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddProjectPathIndex < ActiveRecord::Migration
+class AddProjectPathIndex < ActiveRecord::Migration[4.2]
def up
add_index :projects, :path
end
diff --git a/db/migrate/20151028152939_add_merge_when_build_succeeds_to_merge_request.rb b/db/migrate/20151028152939_add_merge_when_build_succeeds_to_merge_request.rb
index 4a989669464..5b11a430e30 100644
--- a/db/migrate/20151028152939_add_merge_when_build_succeeds_to_merge_request.rb
+++ b/db/migrate/20151028152939_add_merge_when_build_succeeds_to_merge_request.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddMergeWhenBuildSucceedsToMergeRequest < ActiveRecord::Migration
+class AddMergeWhenBuildSucceedsToMergeRequest < ActiveRecord::Migration[4.2]
def change
add_column :merge_requests, :merge_params, :text
add_column :merge_requests, :merge_when_build_succeeds, :boolean, default: false, null: false
diff --git a/db/migrate/20151103001141_add_public_to_group.rb b/db/migrate/20151103001141_add_public_to_group.rb
index ba1f7c27832..a5590bc1adc 100644
--- a/db/migrate/20151103001141_add_public_to_group.rb
+++ b/db/migrate/20151103001141_add_public_to_group.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddPublicToGroup < ActiveRecord::Migration
+class AddPublicToGroup < ActiveRecord::Migration[4.2]
def change
add_column :namespaces, :public, :boolean, default: false
end
diff --git a/db/migrate/20151103133339_add_shared_runners_setting.rb b/db/migrate/20151103133339_add_shared_runners_setting.rb
index 4231dfd5c2e..6fc845d1396 100644
--- a/db/migrate/20151103133339_add_shared_runners_setting.rb
+++ b/db/migrate/20151103133339_add_shared_runners_setting.rb
@@ -1,4 +1,4 @@
-class AddSharedRunnersSetting < ActiveRecord::Migration
+class AddSharedRunnersSetting < ActiveRecord::Migration[4.2]
def up
add_column :application_settings, :shared_runners_enabled, :boolean, default: true, null: false
end
diff --git a/db/migrate/20151103134857_create_lfs_objects.rb b/db/migrate/20151103134857_create_lfs_objects.rb
index db6fa27199b..2ba77e431a1 100644
--- a/db/migrate/20151103134857_create_lfs_objects.rb
+++ b/db/migrate/20151103134857_create_lfs_objects.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class CreateLfsObjects < ActiveRecord::Migration
+class CreateLfsObjects < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20151103134958_create_lfs_objects_projects.rb b/db/migrate/20151103134958_create_lfs_objects_projects.rb
index 5af1c39fd9c..6f8488463b0 100644
--- a/db/migrate/20151103134958_create_lfs_objects_projects.rb
+++ b/db/migrate/20151103134958_create_lfs_objects_projects.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class CreateLfsObjectsProjects < ActiveRecord::Migration
+class CreateLfsObjectsProjects < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20151104105513_add_file_to_lfs_objects.rb b/db/migrate/20151104105513_add_file_to_lfs_objects.rb
index 7c57f3f0df6..050b1e07503 100644
--- a/db/migrate/20151104105513_add_file_to_lfs_objects.rb
+++ b/db/migrate/20151104105513_add_file_to_lfs_objects.rb
@@ -1,4 +1,4 @@
-class AddFileToLfsObjects < ActiveRecord::Migration
+class AddFileToLfsObjects < ActiveRecord::Migration[4.2]
def change
add_column :lfs_objects, :file, :string
end
diff --git a/db/migrate/20151105094515_create_releases.rb b/db/migrate/20151105094515_create_releases.rb
index 34dd7a10942..4b180a59486 100644
--- a/db/migrate/20151105094515_create_releases.rb
+++ b/db/migrate/20151105094515_create_releases.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class CreateReleases < ActiveRecord::Migration
+class CreateReleases < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20151106000015_add_is_award_to_notes.rb b/db/migrate/20151106000015_add_is_award_to_notes.rb
index b463d939b78..1d866fb3213 100644
--- a/db/migrate/20151106000015_add_is_award_to_notes.rb
+++ b/db/migrate/20151106000015_add_is_award_to_notes.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddIsAwardToNotes < ActiveRecord::Migration
+class AddIsAwardToNotes < ActiveRecord::Migration[4.2]
def change
add_column :notes, :is_award, :boolean, default: false, null: false
add_index :notes, :is_award
diff --git a/db/migrate/20151109100728_add_max_artifacts_size_to_application_settings.rb b/db/migrate/20151109100728_add_max_artifacts_size_to_application_settings.rb
index 01d8c0f043e..9c14cfd4656 100644
--- a/db/migrate/20151109100728_add_max_artifacts_size_to_application_settings.rb
+++ b/db/migrate/20151109100728_add_max_artifacts_size_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddMaxArtifactsSizeToApplicationSettings < ActiveRecord::Migration
+class AddMaxArtifactsSizeToApplicationSettings < ActiveRecord::Migration[4.2]
def change
add_column :application_settings, :max_artifacts_size, :integer, default: 100, null: false
end
diff --git a/db/migrate/20151109134526_add_issues_state_index.rb b/db/migrate/20151109134526_add_issues_state_index.rb
index 7a9970e8591..c77ca90a0d6 100644
--- a/db/migrate/20151109134526_add_issues_state_index.rb
+++ b/db/migrate/20151109134526_add_issues_state_index.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddIssuesStateIndex < ActiveRecord::Migration
+class AddIssuesStateIndex < ActiveRecord::Migration[4.2]
def change
add_index :issues, :state
end
diff --git a/db/migrate/20151109134916_add_projects_visibility_level_index.rb b/db/migrate/20151109134916_add_projects_visibility_level_index.rb
index 471db437b11..1e945f0e56f 100644
--- a/db/migrate/20151109134916_add_projects_visibility_level_index.rb
+++ b/db/migrate/20151109134916_add_projects_visibility_level_index.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddProjectsVisibilityLevelIndex < ActiveRecord::Migration
+class AddProjectsVisibilityLevelIndex < ActiveRecord::Migration[4.2]
def change
add_index :projects, :visibility_level
end
diff --git a/db/migrate/20151110125604_add_import_error_to_project.rb b/db/migrate/20151110125604_add_import_error_to_project.rb
index 7fc990f8d0a..48a15ad0737 100644
--- a/db/migrate/20151110125604_add_import_error_to_project.rb
+++ b/db/migrate/20151110125604_add_import_error_to_project.rb
@@ -1,4 +1,4 @@
-class AddImportErrorToProject < ActiveRecord::Migration
+class AddImportErrorToProject < ActiveRecord::Migration[4.2]
def change
add_column :projects, :import_error, :text
end
diff --git a/db/migrate/20151114113410_add_index_for_lfs_oid_and_size.rb b/db/migrate/20151114113410_add_index_for_lfs_oid_and_size.rb
index 00a4c74ffbc..f2788117cc2 100644
--- a/db/migrate/20151114113410_add_index_for_lfs_oid_and_size.rb
+++ b/db/migrate/20151114113410_add_index_for_lfs_oid_and_size.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddIndexForLfsOidAndSize < ActiveRecord::Migration
+class AddIndexForLfsOidAndSize < ActiveRecord::Migration[4.2]
def change
add_index :lfs_objects, :oid
add_index :lfs_objects, [:oid, :size]
diff --git a/db/migrate/20151116144118_add_unique_for_lfs_oid_index.rb b/db/migrate/20151116144118_add_unique_for_lfs_oid_index.rb
index 1f192544ea1..3bfbae67119 100644
--- a/db/migrate/20151116144118_add_unique_for_lfs_oid_index.rb
+++ b/db/migrate/20151116144118_add_unique_for_lfs_oid_index.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddUniqueForLfsOidIndex < ActiveRecord::Migration
+class AddUniqueForLfsOidIndex < ActiveRecord::Migration[4.2]
def change
remove_index :lfs_objects, :oid
remove_index :lfs_objects, [:oid, :size]
diff --git a/db/migrate/20151118162244_add_projects_public_index.rb b/db/migrate/20151118162244_add_projects_public_index.rb
index 589f124c21e..3a525c69ad0 100644
--- a/db/migrate/20151118162244_add_projects_public_index.rb
+++ b/db/migrate/20151118162244_add_projects_public_index.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddProjectsPublicIndex < ActiveRecord::Migration
+class AddProjectsPublicIndex < ActiveRecord::Migration[4.2]
def change
add_index :namespaces, :public
end
diff --git a/db/migrate/20151201203948_raise_hook_url_limit.rb b/db/migrate/20151201203948_raise_hook_url_limit.rb
index 98a7fca6f6f..c1a4974b8c9 100644
--- a/db/migrate/20151201203948_raise_hook_url_limit.rb
+++ b/db/migrate/20151201203948_raise_hook_url_limit.rb
@@ -1,4 +1,4 @@
-class RaiseHookUrlLimit < ActiveRecord::Migration
+class RaiseHookUrlLimit < ActiveRecord::Migration[4.2]
def change
change_column :web_hooks, :url, :string, limit: 2000
end
diff --git a/db/migrate/20151203162133_add_hide_project_limit_to_users.rb b/db/migrate/20151203162133_add_hide_project_limit_to_users.rb
index 5dc6d8bf445..1b96a0dc550 100644
--- a/db/migrate/20151203162133_add_hide_project_limit_to_users.rb
+++ b/db/migrate/20151203162133_add_hide_project_limit_to_users.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddHideProjectLimitToUsers < ActiveRecord::Migration
+class AddHideProjectLimitToUsers < ActiveRecord::Migration[4.2]
def change
add_column :users, :hide_project_limit, :boolean, default: false
end
diff --git a/db/migrate/20151203162134_add_build_events_to_services.rb b/db/migrate/20151203162134_add_build_events_to_services.rb
index 455882e5ec0..c49604f8b61 100644
--- a/db/migrate/20151203162134_add_build_events_to_services.rb
+++ b/db/migrate/20151203162134_add_build_events_to_services.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddBuildEventsToServices < ActiveRecord::Migration
+class AddBuildEventsToServices < ActiveRecord::Migration[4.2]
def change
add_column :services, :build_events, :boolean, default: false, null: false
add_column :web_hooks, :build_events, :boolean, default: false, null: false
diff --git a/db/migrate/20151209144329_migrate_ci_web_hooks.rb b/db/migrate/20151209144329_migrate_ci_web_hooks.rb
index e1e4729f821..7562735cb1e 100644
--- a/db/migrate/20151209144329_migrate_ci_web_hooks.rb
+++ b/db/migrate/20151209144329_migrate_ci_web_hooks.rb
@@ -1,4 +1,4 @@
-class MigrateCiWebHooks < ActiveRecord::Migration
+class MigrateCiWebHooks < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
def up
diff --git a/db/migrate/20151209145909_migrate_ci_emails.rb b/db/migrate/20151209145909_migrate_ci_emails.rb
index e1d92f0157e..a1f51c55a55 100644
--- a/db/migrate/20151209145909_migrate_ci_emails.rb
+++ b/db/migrate/20151209145909_migrate_ci_emails.rb
@@ -1,4 +1,4 @@
-class MigrateCiEmails < ActiveRecord::Migration
+class MigrateCiEmails < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
def up
diff --git a/db/migrate/20151210030143_add_unlock_token_to_user.rb b/db/migrate/20151210030143_add_unlock_token_to_user.rb
index 0ea66ba65df..28b736adfb5 100644
--- a/db/migrate/20151210030143_add_unlock_token_to_user.rb
+++ b/db/migrate/20151210030143_add_unlock_token_to_user.rb
@@ -1,4 +1,4 @@
-class AddUnlockTokenToUser < ActiveRecord::Migration
+class AddUnlockTokenToUser < ActiveRecord::Migration[4.2]
def change
add_column :users, :unlock_token, :string
end
diff --git a/db/migrate/20151210072243_add_runners_registration_token_to_application_settings.rb b/db/migrate/20151210072243_add_runners_registration_token_to_application_settings.rb
index 00f88180e46..5da33149b59 100644
--- a/db/migrate/20151210072243_add_runners_registration_token_to_application_settings.rb
+++ b/db/migrate/20151210072243_add_runners_registration_token_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddRunnersRegistrationTokenToApplicationSettings < ActiveRecord::Migration
+class AddRunnersRegistrationTokenToApplicationSettings < ActiveRecord::Migration[4.2]
def change
add_column :application_settings, :runners_registration_token, :string
end
diff --git a/db/migrate/20151210125232_migrate_ci_slack_service.rb b/db/migrate/20151210125232_migrate_ci_slack_service.rb
index e6dca4c0008..72c90f92377 100644
--- a/db/migrate/20151210125232_migrate_ci_slack_service.rb
+++ b/db/migrate/20151210125232_migrate_ci_slack_service.rb
@@ -1,4 +1,4 @@
-class MigrateCiSlackService < ActiveRecord::Migration
+class MigrateCiSlackService < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
def up
diff --git a/db/migrate/20151210125927_migrate_ci_hip_chat_service.rb b/db/migrate/20151210125927_migrate_ci_hip_chat_service.rb
index 72fcebf2959..5ec0798c38f 100644
--- a/db/migrate/20151210125927_migrate_ci_hip_chat_service.rb
+++ b/db/migrate/20151210125927_migrate_ci_hip_chat_service.rb
@@ -1,4 +1,4 @@
-class MigrateCiHipChatService < ActiveRecord::Migration
+class MigrateCiHipChatService < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
def up
diff --git a/db/migrate/20151210125928_add_ci_to_project.rb b/db/migrate/20151210125928_add_ci_to_project.rb
index a9ff49a3f7e..182f1e17b9a 100644
--- a/db/migrate/20151210125928_add_ci_to_project.rb
+++ b/db/migrate/20151210125928_add_ci_to_project.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddCiToProject < ActiveRecord::Migration
+class AddCiToProject < ActiveRecord::Migration[4.2]
def change
add_column :projects, :ci_id, :integer
add_column :projects, :builds_enabled, :boolean, default: true, null: false
diff --git a/db/migrate/20151210125929_add_project_id_to_ci.rb b/db/migrate/20151210125929_add_project_id_to_ci.rb
index 84273591fa2..f5f2c353f4a 100644
--- a/db/migrate/20151210125929_add_project_id_to_ci.rb
+++ b/db/migrate/20151210125929_add_project_id_to_ci.rb
@@ -1,4 +1,4 @@
-class AddProjectIdToCi < ActiveRecord::Migration
+class AddProjectIdToCi < ActiveRecord::Migration[4.2]
def change
add_column :ci_builds, :gl_project_id, :integer
add_column :ci_runner_projects, :gl_project_id, :integer
diff --git a/db/migrate/20151210125930_migrate_ci_to_project.rb b/db/migrate/20151210125930_migrate_ci_to_project.rb
index c32c7feb193..f7573ad1a8d 100644
--- a/db/migrate/20151210125930_migrate_ci_to_project.rb
+++ b/db/migrate/20151210125930_migrate_ci_to_project.rb
@@ -1,4 +1,4 @@
-class MigrateCiToProject < ActiveRecord::Migration
+class MigrateCiToProject < ActiveRecord::Migration[4.2]
def up
migrate_project_id_for_table('ci_runner_projects')
migrate_project_id_for_table('ci_triggers')
diff --git a/db/migrate/20151210125931_add_index_to_ci_tables.rb b/db/migrate/20151210125931_add_index_to_ci_tables.rb
index d87d335cf6b..2cbc5b50538 100644
--- a/db/migrate/20151210125931_add_index_to_ci_tables.rb
+++ b/db/migrate/20151210125931_add_index_to_ci_tables.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddIndexToCiTables < ActiveRecord::Migration
+class AddIndexToCiTables < ActiveRecord::Migration[4.2]
def change
add_index :ci_builds, :gl_project_id
add_index :ci_runner_projects, :gl_project_id
diff --git a/db/migrate/20151210125932_drop_null_for_ci_tables.rb b/db/migrate/20151210125932_drop_null_for_ci_tables.rb
index e1a0a964589..b48fef4b749 100644
--- a/db/migrate/20151210125932_drop_null_for_ci_tables.rb
+++ b/db/migrate/20151210125932_drop_null_for_ci_tables.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class DropNullForCiTables < ActiveRecord::Migration
+class DropNullForCiTables < ActiveRecord::Migration[4.2]
def change
remove_index :ci_variables, :project_id
remove_index :ci_runner_projects, :project_id
diff --git a/db/migrate/20151215132013_add_pages_size_to_application_settings.rb b/db/migrate/20151215132013_add_pages_size_to_application_settings.rb
index f3a663f805b..7190d476dc7 100644
--- a/db/migrate/20151215132013_add_pages_size_to_application_settings.rb
+++ b/db/migrate/20151215132013_add_pages_size_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddPagesSizeToApplicationSettings < ActiveRecord::Migration
+class AddPagesSizeToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20151218154042_add_tfa_to_application_settings.rb b/db/migrate/20151218154042_add_tfa_to_application_settings.rb
index dd95db775c5..a981fe2720f 100644
--- a/db/migrate/20151218154042_add_tfa_to_application_settings.rb
+++ b/db/migrate/20151218154042_add_tfa_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddTfaToApplicationSettings < ActiveRecord::Migration
+class AddTfaToApplicationSettings < ActiveRecord::Migration[4.2]
def change
change_table :application_settings do |t|
t.boolean :require_two_factor_authentication, default: false
diff --git a/db/migrate/20151221234414_add_tfa_additional_fields.rb b/db/migrate/20151221234414_add_tfa_additional_fields.rb
index c16df47932f..fed734f77f4 100644
--- a/db/migrate/20151221234414_add_tfa_additional_fields.rb
+++ b/db/migrate/20151221234414_add_tfa_additional_fields.rb
@@ -1,4 +1,4 @@
-class AddTfaAdditionalFields < ActiveRecord::Migration
+class AddTfaAdditionalFields < ActiveRecord::Migration[4.2]
def change
change_table :users do |t|
t.datetime :otp_grace_period_started_at, null: true
diff --git a/db/migrate/20151224123230_rename_emojis.rb b/db/migrate/20151224123230_rename_emojis.rb
index 62d921dfdcc..f1e4b1fe181 100644
--- a/db/migrate/20151224123230_rename_emojis.rb
+++ b/db/migrate/20151224123230_rename_emojis.rb
@@ -1,5 +1,5 @@
# Migration type: online without errors (works on previous version and new one)
-class RenameEmojis < ActiveRecord::Migration
+class RenameEmojis < ActiveRecord::Migration[4.2]
def up
# Renames aliases to main names
execute("UPDATE notes SET note ='thumbsup' WHERE is_award = true AND note = '+1'")
diff --git a/db/migrate/20151228111122_remove_public_from_namespace.rb b/db/migrate/20151228111122_remove_public_from_namespace.rb
index bcb322d9cba..ad922e3fc58 100644
--- a/db/migrate/20151228111122_remove_public_from_namespace.rb
+++ b/db/migrate/20151228111122_remove_public_from_namespace.rb
@@ -1,6 +1,6 @@
# rubocop:disable all
# Migration type: online
-class RemovePublicFromNamespace < ActiveRecord::Migration
+class RemovePublicFromNamespace < ActiveRecord::Migration[4.2]
def change
remove_column :namespaces, :public, :boolean
end
diff --git a/db/migrate/20151228150906_influxdb_settings.rb b/db/migrate/20151228150906_influxdb_settings.rb
index 2e080a02e6a..8266e3c5044 100644
--- a/db/migrate/20151228150906_influxdb_settings.rb
+++ b/db/migrate/20151228150906_influxdb_settings.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class InfluxdbSettings < ActiveRecord::Migration
+class InfluxdbSettings < ActiveRecord::Migration[4.2]
def change
add_column :application_settings, :metrics_enabled, :boolean, default: false
diff --git a/db/migrate/20151228175719_add_recaptcha_to_application_settings.rb b/db/migrate/20151228175719_add_recaptcha_to_application_settings.rb
index 259fd0248d2..523f2cae092 100644
--- a/db/migrate/20151228175719_add_recaptcha_to_application_settings.rb
+++ b/db/migrate/20151228175719_add_recaptcha_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddRecaptchaToApplicationSettings < ActiveRecord::Migration
+class AddRecaptchaToApplicationSettings < ActiveRecord::Migration[4.2]
def change
change_table :application_settings do |t|
t.boolean :recaptcha_enabled, default: false
diff --git a/db/migrate/20151229102248_influxdb_udp_port_setting.rb b/db/migrate/20151229102248_influxdb_udp_port_setting.rb
index ae0499f936d..da37e3bc148 100644
--- a/db/migrate/20151229102248_influxdb_udp_port_setting.rb
+++ b/db/migrate/20151229102248_influxdb_udp_port_setting.rb
@@ -1,4 +1,4 @@
-class InfluxdbUdpPortSetting < ActiveRecord::Migration
+class InfluxdbUdpPortSetting < ActiveRecord::Migration[4.2]
def change
add_column :application_settings, :metrics_port, :integer, default: 8089
end
diff --git a/db/migrate/20151229112614_influxdb_remote_database_setting.rb b/db/migrate/20151229112614_influxdb_remote_database_setting.rb
index d2ac906ead3..5fdf4c6d4cb 100644
--- a/db/migrate/20151229112614_influxdb_remote_database_setting.rb
+++ b/db/migrate/20151229112614_influxdb_remote_database_setting.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class InfluxdbRemoteDatabaseSetting < ActiveRecord::Migration
+class InfluxdbRemoteDatabaseSetting < ActiveRecord::Migration[4.2]
def change
remove_column :application_settings, :metrics_database
end
diff --git a/db/migrate/20151230132518_add_artifacts_metadata_to_ci_build.rb b/db/migrate/20151230132518_add_artifacts_metadata_to_ci_build.rb
index 6c282fc5039..61a3d6486f3 100644
--- a/db/migrate/20151230132518_add_artifacts_metadata_to_ci_build.rb
+++ b/db/migrate/20151230132518_add_artifacts_metadata_to_ci_build.rb
@@ -1,4 +1,4 @@
-class AddArtifactsMetadataToCiBuild < ActiveRecord::Migration
+class AddArtifactsMetadataToCiBuild < ActiveRecord::Migration[4.2]
def change
add_column :ci_builds, :artifacts_metadata, :text
end
diff --git a/db/migrate/20151231152326_add_akismet_to_application_settings.rb b/db/migrate/20151231152326_add_akismet_to_application_settings.rb
index 3f52c758f9a..ef51ea03a5b 100644
--- a/db/migrate/20151231152326_add_akismet_to_application_settings.rb
+++ b/db/migrate/20151231152326_add_akismet_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddAkismetToApplicationSettings < ActiveRecord::Migration
+class AddAkismetToApplicationSettings < ActiveRecord::Migration[4.2]
def change
change_table :application_settings do |t|
t.boolean :akismet_enabled, default: false
diff --git a/db/migrate/20151231202530_remove_alert_type_from_broadcast_messages.rb b/db/migrate/20151231202530_remove_alert_type_from_broadcast_messages.rb
index 0bdd639eb21..2d8b44840f0 100644
--- a/db/migrate/20151231202530_remove_alert_type_from_broadcast_messages.rb
+++ b/db/migrate/20151231202530_remove_alert_type_from_broadcast_messages.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class RemoveAlertTypeFromBroadcastMessages < ActiveRecord::Migration
+class RemoveAlertTypeFromBroadcastMessages < ActiveRecord::Migration[4.2]
def change
remove_column :broadcast_messages, :alert_type, :integer
end
diff --git a/db/migrate/20160106162223_add_index_milestones_title.rb b/db/migrate/20160106162223_add_index_milestones_title.rb
index 9b9b6445a08..d42bddefe64 100644
--- a/db/migrate/20160106162223_add_index_milestones_title.rb
+++ b/db/migrate/20160106162223_add_index_milestones_title.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddIndexMilestonesTitle < ActiveRecord::Migration
+class AddIndexMilestonesTitle < ActiveRecord::Migration[4.2]
def change
add_index :milestones, :title
end
diff --git a/db/migrate/20160106164438_remove_influxdb_credentials.rb b/db/migrate/20160106164438_remove_influxdb_credentials.rb
index 987d75d6fda..569d5a0cf36 100644
--- a/db/migrate/20160106164438_remove_influxdb_credentials.rb
+++ b/db/migrate/20160106164438_remove_influxdb_credentials.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class RemoveInfluxdbCredentials < ActiveRecord::Migration
+class RemoveInfluxdbCredentials < ActiveRecord::Migration[4.2]
def change
remove_column :application_settings, :metrics_username, :string
remove_column :application_settings, :metrics_password, :string
diff --git a/db/migrate/20160109054846_create_spam_logs.rb b/db/migrate/20160109054846_create_spam_logs.rb
index f7103276639..dc97d03f7ff 100644
--- a/db/migrate/20160109054846_create_spam_logs.rb
+++ b/db/migrate/20160109054846_create_spam_logs.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class CreateSpamLogs < ActiveRecord::Migration
+class CreateSpamLogs < ActiveRecord::Migration[4.2]
def change
create_table :spam_logs do |t|
t.integer :user_id
diff --git a/db/migrate/20160113111034_add_metrics_sample_interval.rb b/db/migrate/20160113111034_add_metrics_sample_interval.rb
index b741f5d2c75..9c3377571aa 100644
--- a/db/migrate/20160113111034_add_metrics_sample_interval.rb
+++ b/db/migrate/20160113111034_add_metrics_sample_interval.rb
@@ -1,4 +1,4 @@
-class AddMetricsSampleInterval < ActiveRecord::Migration
+class AddMetricsSampleInterval < ActiveRecord::Migration[4.2]
def change
add_column :application_settings, :metrics_sample_interval, :integer,
default: 15
diff --git a/db/migrate/20160118155830_add_sentry_to_application_settings.rb b/db/migrate/20160118155830_add_sentry_to_application_settings.rb
index fa7ff9d9228..20f3925b964 100644
--- a/db/migrate/20160118155830_add_sentry_to_application_settings.rb
+++ b/db/migrate/20160118155830_add_sentry_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddSentryToApplicationSettings < ActiveRecord::Migration
+class AddSentryToApplicationSettings < ActiveRecord::Migration[4.2]
def change
change_table :application_settings do |t|
t.boolean :sentry_enabled, default: false
diff --git a/db/migrate/20160118232755_add_ip_blocking_settings_to_application_settings.rb b/db/migrate/20160118232755_add_ip_blocking_settings_to_application_settings.rb
index 19ea40b5547..809a6cceef5 100644
--- a/db/migrate/20160118232755_add_ip_blocking_settings_to_application_settings.rb
+++ b/db/migrate/20160118232755_add_ip_blocking_settings_to_application_settings.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddIpBlockingSettingsToApplicationSettings < ActiveRecord::Migration
+class AddIpBlockingSettingsToApplicationSettings < ActiveRecord::Migration[4.2]
def change
add_column :application_settings, :ip_blocking_enabled, :boolean, default: false
add_column :application_settings, :dnsbl_servers_list, :text
diff --git a/db/migrate/20160119111158_add_services_category.rb b/db/migrate/20160119111158_add_services_category.rb
index f77484b2f96..979a48584a9 100644
--- a/db/migrate/20160119111158_add_services_category.rb
+++ b/db/migrate/20160119111158_add_services_category.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddServicesCategory < ActiveRecord::Migration
+class AddServicesCategory < ActiveRecord::Migration[4.2]
def up
add_column :services, :category, :string, default: 'common', null: false
diff --git a/db/migrate/20160119112418_add_services_default.rb b/db/migrate/20160119112418_add_services_default.rb
index 7fa531899fe..41ba5d98afe 100644
--- a/db/migrate/20160119112418_add_services_default.rb
+++ b/db/migrate/20160119112418_add_services_default.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddServicesDefault < ActiveRecord::Migration
+class AddServicesDefault < ActiveRecord::Migration[4.2]
def up
add_column :services, :default, :boolean, default: false
diff --git a/db/migrate/20160119145451_add_ldap_email_to_users.rb b/db/migrate/20160119145451_add_ldap_email_to_users.rb
index 5b2b0bd31ca..bf8c27900b8 100644
--- a/db/migrate/20160119145451_add_ldap_email_to_users.rb
+++ b/db/migrate/20160119145451_add_ldap_email_to_users.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddLdapEmailToUsers < ActiveRecord::Migration
+class AddLdapEmailToUsers < ActiveRecord::Migration[4.2]
def up
add_column :users, :ldap_email, :boolean, default: false, null: false
diff --git a/db/migrate/20160120172143_add_base_commit_sha_to_merge_request_diffs.rb b/db/migrate/20160120172143_add_base_commit_sha_to_merge_request_diffs.rb
index d6c6aa4a4e8..9c0a91758f5 100644
--- a/db/migrate/20160120172143_add_base_commit_sha_to_merge_request_diffs.rb
+++ b/db/migrate/20160120172143_add_base_commit_sha_to_merge_request_diffs.rb
@@ -1,4 +1,4 @@
-class AddBaseCommitShaToMergeRequestDiffs < ActiveRecord::Migration
+class AddBaseCommitShaToMergeRequestDiffs < ActiveRecord::Migration[4.2]
def change
add_column :merge_request_diffs, :base_commit_sha, :string
end
diff --git a/db/migrate/20160121030729_add_email_author_in_body_to_application_settings.rb b/db/migrate/20160121030729_add_email_author_in_body_to_application_settings.rb
index 9a2570ae544..0cb1fbe8641 100644
--- a/db/migrate/20160121030729_add_email_author_in_body_to_application_settings.rb
+++ b/db/migrate/20160121030729_add_email_author_in_body_to_application_settings.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddEmailAuthorInBodyToApplicationSettings < ActiveRecord::Migration
+class AddEmailAuthorInBodyToApplicationSettings < ActiveRecord::Migration[4.2]
def change
add_column :application_settings, :email_author_in_body, :boolean, default: false
end
diff --git a/db/migrate/20160122185421_add_pending_delete_to_project.rb b/db/migrate/20160122185421_add_pending_delete_to_project.rb
index 61db852843f..8db0adc9221 100644
--- a/db/migrate/20160122185421_add_pending_delete_to_project.rb
+++ b/db/migrate/20160122185421_add_pending_delete_to_project.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddPendingDeleteToProject < ActiveRecord::Migration
+class AddPendingDeleteToProject < ActiveRecord::Migration[4.2]
def change
add_column :projects, :pending_delete, :boolean, default: false
end
diff --git a/db/migrate/20160128212447_remove_ip_blocking_settings_from_application_settings.rb b/db/migrate/20160128212447_remove_ip_blocking_settings_from_application_settings.rb
index 60ecda998dd..e76f0249ae5 100644
--- a/db/migrate/20160128212447_remove_ip_blocking_settings_from_application_settings.rb
+++ b/db/migrate/20160128212447_remove_ip_blocking_settings_from_application_settings.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class RemoveIpBlockingSettingsFromApplicationSettings < ActiveRecord::Migration
+class RemoveIpBlockingSettingsFromApplicationSettings < ActiveRecord::Migration[4.2]
def change
remove_column :application_settings, :ip_blocking_enabled, :boolean, default: false
remove_column :application_settings, :dnsbl_servers_list, :text
diff --git a/db/migrate/20160128233227_change_lfs_objects_size_column.rb b/db/migrate/20160128233227_change_lfs_objects_size_column.rb
index e7fd1f71777..65aaf2d9a0b 100644
--- a/db/migrate/20160128233227_change_lfs_objects_size_column.rb
+++ b/db/migrate/20160128233227_change_lfs_objects_size_column.rb
@@ -1,4 +1,4 @@
-class ChangeLfsObjectsSizeColumn < ActiveRecord::Migration
+class ChangeLfsObjectsSizeColumn < ActiveRecord::Migration[4.2]
def change
change_column :lfs_objects, :size, :integer, limit: 8
end
diff --git a/db/migrate/20160129135155_remove_dot_atom_path_ending_of_projects.rb b/db/migrate/20160129135155_remove_dot_atom_path_ending_of_projects.rb
index d3ea956952e..6254017615b 100644
--- a/db/migrate/20160129135155_remove_dot_atom_path_ending_of_projects.rb
+++ b/db/migrate/20160129135155_remove_dot_atom_path_ending_of_projects.rb
@@ -1,4 +1,4 @@
-class RemoveDotAtomPathEndingOfProjects < ActiveRecord::Migration
+class RemoveDotAtomPathEndingOfProjects < ActiveRecord::Migration[4.2]
include Gitlab::ShellAdapter
class ProjectPath
diff --git a/db/migrate/20160129155512_add_merge_commit_sha_to_merge_requests.rb b/db/migrate/20160129155512_add_merge_commit_sha_to_merge_requests.rb
index f0d94226514..8b84705ce7d 100644
--- a/db/migrate/20160129155512_add_merge_commit_sha_to_merge_requests.rb
+++ b/db/migrate/20160129155512_add_merge_commit_sha_to_merge_requests.rb
@@ -1,4 +1,4 @@
-class AddMergeCommitShaToMergeRequests < ActiveRecord::Migration
+class AddMergeCommitShaToMergeRequests < ActiveRecord::Migration[4.2]
def change
add_column :merge_requests, :merge_commit_sha, :string
end
diff --git a/db/migrate/20160202091601_add_erasable_to_ci_build.rb b/db/migrate/20160202091601_add_erasable_to_ci_build.rb
index 767ae160d08..214028bd8d3 100644
--- a/db/migrate/20160202091601_add_erasable_to_ci_build.rb
+++ b/db/migrate/20160202091601_add_erasable_to_ci_build.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddErasableToCiBuild < ActiveRecord::Migration
+class AddErasableToCiBuild < ActiveRecord::Migration[4.2]
def change
add_reference :ci_builds, :erased_by, references: :users, index: true
add_column :ci_builds, :erased_at, :datetime
diff --git a/db/migrate/20160202164642_add_allow_guest_to_access_builds_project.rb b/db/migrate/20160202164642_add_allow_guest_to_access_builds_project.rb
index 2c5cb307fad..542f9437911 100644
--- a/db/migrate/20160202164642_add_allow_guest_to_access_builds_project.rb
+++ b/db/migrate/20160202164642_add_allow_guest_to_access_builds_project.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddAllowGuestToAccessBuildsProject < ActiveRecord::Migration
+class AddAllowGuestToAccessBuildsProject < ActiveRecord::Migration[4.2]
def change
add_column :projects, :public_builds, :boolean, default: true, null: false
end
diff --git a/db/migrate/20160204144558_add_real_size_to_merge_request_diffs.rb b/db/migrate/20160204144558_add_real_size_to_merge_request_diffs.rb
index f996ae74dca..c1f1faf0279 100644
--- a/db/migrate/20160204144558_add_real_size_to_merge_request_diffs.rb
+++ b/db/migrate/20160204144558_add_real_size_to_merge_request_diffs.rb
@@ -1,4 +1,4 @@
-class AddRealSizeToMergeRequestDiffs < ActiveRecord::Migration
+class AddRealSizeToMergeRequestDiffs < ActiveRecord::Migration[4.2]
def change
add_column :merge_request_diffs, :real_size, :string
end
diff --git a/db/migrate/20160209130428_add_index_to_snippet.rb b/db/migrate/20160209130428_add_index_to_snippet.rb
index 4d17c3a2917..480ac193d63 100644
--- a/db/migrate/20160209130428_add_index_to_snippet.rb
+++ b/db/migrate/20160209130428_add_index_to_snippet.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddIndexToSnippet < ActiveRecord::Migration
+class AddIndexToSnippet < ActiveRecord::Migration[4.2]
def change
add_index :snippets, :updated_at
end
diff --git a/db/migrate/20160210105555_create_pages_domain.rb b/db/migrate/20160210105555_create_pages_domain.rb
index 0e8507c7e9a..a46906d64ca 100644
--- a/db/migrate/20160210105555_create_pages_domain.rb
+++ b/db/migrate/20160210105555_create_pages_domain.rb
@@ -1,4 +1,4 @@
-class CreatePagesDomain < ActiveRecord::Migration
+class CreatePagesDomain < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20160212123307_create_tasks.rb b/db/migrate/20160212123307_create_tasks.rb
index cd3ad0e4cd8..33acc8af91f 100644
--- a/db/migrate/20160212123307_create_tasks.rb
+++ b/db/migrate/20160212123307_create_tasks.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class CreateTasks < ActiveRecord::Migration
+class CreateTasks < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20160217100506_add_description_to_label.rb b/db/migrate/20160217100506_add_description_to_label.rb
index eed6d1f236a..116de8ddfa9 100644
--- a/db/migrate/20160217100506_add_description_to_label.rb
+++ b/db/migrate/20160217100506_add_description_to_label.rb
@@ -1,4 +1,4 @@
-class AddDescriptionToLabel < ActiveRecord::Migration
+class AddDescriptionToLabel < ActiveRecord::Migration[4.2]
def change
add_column :labels, :description, :string
end
diff --git a/db/migrate/20160217174422_add_note_to_tasks.rb b/db/migrate/20160217174422_add_note_to_tasks.rb
index da5cb2e05db..c2a42ce5dd8 100644
--- a/db/migrate/20160217174422_add_note_to_tasks.rb
+++ b/db/migrate/20160217174422_add_note_to_tasks.rb
@@ -1,4 +1,4 @@
-class AddNoteToTasks < ActiveRecord::Migration
+class AddNoteToTasks < ActiveRecord::Migration[4.2]
def change
add_reference :tasks, :note, index: true
end
diff --git a/db/migrate/20160220123949_rename_tasks_to_todos.rb b/db/migrate/20160220123949_rename_tasks_to_todos.rb
index 30c10d27146..0cc110a0a1a 100644
--- a/db/migrate/20160220123949_rename_tasks_to_todos.rb
+++ b/db/migrate/20160220123949_rename_tasks_to_todos.rb
@@ -1,4 +1,4 @@
-class RenameTasksToTodos < ActiveRecord::Migration
+class RenameTasksToTodos < ActiveRecord::Migration[4.2]
def change
rename_table :tasks, :todos
end
diff --git a/db/migrate/20160222153918_create_appearances_ce.rb b/db/migrate/20160222153918_create_appearances_ce.rb
index b2d5949b23f..37bbe62ad3d 100644
--- a/db/migrate/20160222153918_create_appearances_ce.rb
+++ b/db/migrate/20160222153918_create_appearances_ce.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class CreateAppearancesCe < ActiveRecord::Migration
+class CreateAppearancesCe < ActiveRecord::Migration[4.2]
def change
unless table_exists?(:appearances)
create_table :appearances do |t|
diff --git a/db/migrate/20160223192159_add_confidential_to_issues.rb b/db/migrate/20160223192159_add_confidential_to_issues.rb
index 5b99ce30e9f..ca029f12337 100644
--- a/db/migrate/20160223192159_add_confidential_to_issues.rb
+++ b/db/migrate/20160223192159_add_confidential_to_issues.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddConfidentialToIssues < ActiveRecord::Migration
+class AddConfidentialToIssues < ActiveRecord::Migration[4.2]
def change
add_column :issues, :confidential, :boolean, default: false
add_index :issues, :confidential
diff --git a/db/migrate/20160225090018_add_delete_at_to_issues.rb b/db/migrate/20160225090018_add_delete_at_to_issues.rb
index 139f911e1c9..3ae74f491f6 100644
--- a/db/migrate/20160225090018_add_delete_at_to_issues.rb
+++ b/db/migrate/20160225090018_add_delete_at_to_issues.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddDeleteAtToIssues < ActiveRecord::Migration
+class AddDeleteAtToIssues < ActiveRecord::Migration[4.2]
def change
add_column :issues, :deleted_at, :datetime
add_index :issues, :deleted_at
diff --git a/db/migrate/20160225101956_add_delete_at_to_merge_requests.rb b/db/migrate/20160225101956_add_delete_at_to_merge_requests.rb
index 4ca3f0dcdc5..ce8657ba88c 100644
--- a/db/migrate/20160225101956_add_delete_at_to_merge_requests.rb
+++ b/db/migrate/20160225101956_add_delete_at_to_merge_requests.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddDeleteAtToMergeRequests < ActiveRecord::Migration
+class AddDeleteAtToMergeRequests < ActiveRecord::Migration[4.2]
def change
add_column :merge_requests, :deleted_at, :datetime
add_index :merge_requests, :deleted_at
diff --git a/db/migrate/20160226114608_add_trigram_indexes_for_searching.rb b/db/migrate/20160226114608_add_trigram_indexes_for_searching.rb
index 7aa79bf5e02..82b54c552e0 100644
--- a/db/migrate/20160226114608_add_trigram_indexes_for_searching.rb
+++ b/db/migrate/20160226114608_add_trigram_indexes_for_searching.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddTrigramIndexesForSearching < ActiveRecord::Migration
+class AddTrigramIndexesForSearching < ActiveRecord::Migration[4.2]
disable_ddl_transaction!
def up
diff --git a/db/migrate/20160227120001_add_event_field_for_web_hook.rb b/db/migrate/20160227120001_add_event_field_for_web_hook.rb
index 89910893ee1..22bbd73114f 100644
--- a/db/migrate/20160227120001_add_event_field_for_web_hook.rb
+++ b/db/migrate/20160227120001_add_event_field_for_web_hook.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddEventFieldForWebHook < ActiveRecord::Migration
+class AddEventFieldForWebHook < ActiveRecord::Migration[4.2]
def change
add_column :web_hooks, :wiki_page_events, :boolean, default: false, null: false
end
diff --git a/db/migrate/20160227120047_add_event_to_services.rb b/db/migrate/20160227120047_add_event_to_services.rb
index fe7c54ca4eb..a3b94734ec2 100644
--- a/db/migrate/20160227120047_add_event_to_services.rb
+++ b/db/migrate/20160227120047_add_event_to_services.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddEventToServices < ActiveRecord::Migration
+class AddEventToServices < ActiveRecord::Migration[4.2]
def change
add_column :services, :wiki_page_events, :boolean, default: true
end
diff --git a/db/migrate/20160229193553_add_main_language_to_repository.rb b/db/migrate/20160229193553_add_main_language_to_repository.rb
index b5446c6a447..15f9a382802 100644
--- a/db/migrate/20160229193553_add_main_language_to_repository.rb
+++ b/db/migrate/20160229193553_add_main_language_to_repository.rb
@@ -1,4 +1,4 @@
-class AddMainLanguageToRepository < ActiveRecord::Migration
+class AddMainLanguageToRepository < ActiveRecord::Migration[4.2]
def change
add_column :projects, :main_language, :string
end
diff --git a/db/migrate/20160301124843_add_visibility_level_to_groups.rb b/db/migrate/20160301124843_add_visibility_level_to_groups.rb
index a874e6758dd..ed4bca4f1ba 100644
--- a/db/migrate/20160301124843_add_visibility_level_to_groups.rb
+++ b/db/migrate/20160301124843_add_visibility_level_to_groups.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddVisibilityLevelToGroups < ActiveRecord::Migration
+class AddVisibilityLevelToGroups < ActiveRecord::Migration[4.2]
def up
add_column :namespaces, :visibility_level, :integer, null: false, default: Gitlab::VisibilityLevel::PUBLIC
add_index :namespaces, :visibility_level
diff --git a/db/migrate/20160301174731_add_fingerprint_index.rb b/db/migrate/20160301174731_add_fingerprint_index.rb
index f2c3d1ba1ea..b13373a0468 100644
--- a/db/migrate/20160301174731_add_fingerprint_index.rb
+++ b/db/migrate/20160301174731_add_fingerprint_index.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddFingerprintIndex < ActiveRecord::Migration
+class AddFingerprintIndex < ActiveRecord::Migration[4.2]
disable_ddl_transaction!
DOWNTIME = false
diff --git a/db/migrate/20160302151724_add_import_credentials_to_project_import_data.rb b/db/migrate/20160302151724_add_import_credentials_to_project_import_data.rb
index ffcd64266e3..b0ea05bd6e1 100644
--- a/db/migrate/20160302151724_add_import_credentials_to_project_import_data.rb
+++ b/db/migrate/20160302151724_add_import_credentials_to_project_import_data.rb
@@ -1,4 +1,4 @@
-class AddImportCredentialsToProjectImportData < ActiveRecord::Migration
+class AddImportCredentialsToProjectImportData < ActiveRecord::Migration[4.2]
def change
add_column :project_import_data, :encrypted_credentials, :text
add_column :project_import_data, :encrypted_credentials_iv, :string
diff --git a/db/migrate/20160302152808_remove_wrong_import_url_from_projects.rb b/db/migrate/20160302152808_remove_wrong_import_url_from_projects.rb
index 95105118764..8a319554c28 100644
--- a/db/migrate/20160302152808_remove_wrong_import_url_from_projects.rb
+++ b/db/migrate/20160302152808_remove_wrong_import_url_from_projects.rb
@@ -2,7 +2,7 @@
# Loops through old importer projects that kept a token/password in the import URL
# and encrypts the credentials into a separate field in project#import_data
# #down method not supported
-class RemoveWrongImportUrlFromProjects < ActiveRecord::Migration
+class RemoveWrongImportUrlFromProjects < ActiveRecord::Migration[4.2]
class ProjectImportDataFake
extend AttrEncrypted
diff --git a/db/migrate/20160305220806_remove_expires_at_from_snippets.rb b/db/migrate/20160305220806_remove_expires_at_from_snippets.rb
index cac78703bc2..6835f534926 100644
--- a/db/migrate/20160305220806_remove_expires_at_from_snippets.rb
+++ b/db/migrate/20160305220806_remove_expires_at_from_snippets.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class RemoveExpiresAtFromSnippets < ActiveRecord::Migration
+class RemoveExpiresAtFromSnippets < ActiveRecord::Migration[4.2]
def change
remove_column :snippets, :expires_at, :datetime
end
diff --git a/db/migrate/20160307221555_disallow_blank_line_code_on_note.rb b/db/migrate/20160307221555_disallow_blank_line_code_on_note.rb
index 49e787d9a9a..26b65ef7037 100644
--- a/db/migrate/20160307221555_disallow_blank_line_code_on_note.rb
+++ b/db/migrate/20160307221555_disallow_blank_line_code_on_note.rb
@@ -1,4 +1,4 @@
-class DisallowBlankLineCodeOnNote < ActiveRecord::Migration
+class DisallowBlankLineCodeOnNote < ActiveRecord::Migration[4.2]
def up
execute("UPDATE notes SET line_code = NULL WHERE line_code = ''")
end
diff --git a/db/migrate/20160308212903_add_default_group_visibility_to_application_settings.rb b/db/migrate/20160308212903_add_default_group_visibility_to_application_settings.rb
index 92c0a1e088e..16053408fe0 100644
--- a/db/migrate/20160308212903_add_default_group_visibility_to_application_settings.rb
+++ b/db/migrate/20160308212903_add_default_group_visibility_to_application_settings.rb
@@ -3,7 +3,7 @@
# Sets default_visibility_level to value on settings if not restricted
# If value is restricted takes higher visibility level allowed
-class AddDefaultGroupVisibilityToApplicationSettings < ActiveRecord::Migration
+class AddDefaultGroupVisibilityToApplicationSettings < ActiveRecord::Migration[4.2]
def up
add_column :application_settings, :default_group_visibility, :integer
# Unfortunately, this can't be a `default`, since we don't want the configuration specific
diff --git a/db/migrate/20160309140734_fix_todos.rb b/db/migrate/20160309140734_fix_todos.rb
index 94fe1e4fdc3..917055f5036 100644
--- a/db/migrate/20160309140734_fix_todos.rb
+++ b/db/migrate/20160309140734_fix_todos.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class FixTodos < ActiveRecord::Migration
+class FixTodos < ActiveRecord::Migration[4.2]
def up
execute <<-SQL
DELETE FROM todos
diff --git a/db/migrate/20160310124959_add_due_date_to_issues.rb b/db/migrate/20160310124959_add_due_date_to_issues.rb
index a4eb6aaee63..8da38ea60b1 100644
--- a/db/migrate/20160310124959_add_due_date_to_issues.rb
+++ b/db/migrate/20160310124959_add_due_date_to_issues.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddDueDateToIssues < ActiveRecord::Migration
+class AddDueDateToIssues < ActiveRecord::Migration[4.2]
def change
add_column :issues, :due_date, :date
add_index :issues, :due_date
diff --git a/db/migrate/20160310185910_add_external_flag_to_users.rb b/db/migrate/20160310185910_add_external_flag_to_users.rb
index 209496dc786..768bbe4cd42 100644
--- a/db/migrate/20160310185910_add_external_flag_to_users.rb
+++ b/db/migrate/20160310185910_add_external_flag_to_users.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddExternalFlagToUsers < ActiveRecord::Migration
+class AddExternalFlagToUsers < ActiveRecord::Migration[4.2]
def change
add_column :users, :external, :boolean, default: false
end
diff --git a/db/migrate/20160314094147_add_priority_to_label.rb b/db/migrate/20160314094147_add_priority_to_label.rb
index 7fb23cba4c9..8e2aaf50109 100644
--- a/db/migrate/20160314094147_add_priority_to_label.rb
+++ b/db/migrate/20160314094147_add_priority_to_label.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddPriorityToLabel < ActiveRecord::Migration
+class AddPriorityToLabel < ActiveRecord::Migration[4.2]
def change
add_column :labels, :priority, :integer
add_index :labels, :priority
diff --git a/db/migrate/20160314114439_add_requested_at_to_members.rb b/db/migrate/20160314114439_add_requested_at_to_members.rb
index 76c8b8a1a24..e7e03f96ef8 100644
--- a/db/migrate/20160314114439_add_requested_at_to_members.rb
+++ b/db/migrate/20160314114439_add_requested_at_to_members.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/Datetime
-class AddRequestedAtToMembers < ActiveRecord::Migration
+class AddRequestedAtToMembers < ActiveRecord::Migration[4.2]
def change
add_column :members, :requested_at, :datetime
end
diff --git a/db/migrate/20160314143402_projects_add_pushes_since_gc.rb b/db/migrate/20160314143402_projects_add_pushes_since_gc.rb
index 9f8ffe073a3..e64093d39cf 100644
--- a/db/migrate/20160314143402_projects_add_pushes_since_gc.rb
+++ b/db/migrate/20160314143402_projects_add_pushes_since_gc.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class ProjectsAddPushesSinceGc < ActiveRecord::Migration
+class ProjectsAddPushesSinceGc < ActiveRecord::Migration[4.2]
def change
add_column :projects, :pushes_since_gc, :integer, default: 0
end
diff --git a/db/migrate/20160315135439_project_add_repository_check.rb b/db/migrate/20160315135439_project_add_repository_check.rb
index 8fe649246c7..c03d8bb041c 100644
--- a/db/migrate/20160315135439_project_add_repository_check.rb
+++ b/db/migrate/20160315135439_project_add_repository_check.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class ProjectAddRepositoryCheck < ActiveRecord::Migration
+class ProjectAddRepositoryCheck < ActiveRecord::Migration[4.2]
def change
add_column :projects, :last_repository_check_failed, :boolean
add_index :projects, :last_repository_check_failed
diff --git a/db/migrate/20160316123110_ci_runners_token_index.rb b/db/migrate/20160316123110_ci_runners_token_index.rb
index ff3d36d68ee..026846e6464 100644
--- a/db/migrate/20160316123110_ci_runners_token_index.rb
+++ b/db/migrate/20160316123110_ci_runners_token_index.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class CiRunnersTokenIndex < ActiveRecord::Migration
+class CiRunnersTokenIndex < ActiveRecord::Migration[4.2]
disable_ddl_transaction!
def change
diff --git a/db/migrate/20160316192622_change_target_id_to_null_on_todos.rb b/db/migrate/20160316192622_change_target_id_to_null_on_todos.rb
index 6871b3920df..488c3d4945c 100644
--- a/db/migrate/20160316192622_change_target_id_to_null_on_todos.rb
+++ b/db/migrate/20160316192622_change_target_id_to_null_on_todos.rb
@@ -1,4 +1,4 @@
-class ChangeTargetIdToNullOnTodos < ActiveRecord::Migration
+class ChangeTargetIdToNullOnTodos < ActiveRecord::Migration[4.2]
def change
change_column_null :todos, :target_id, true
end
diff --git a/db/migrate/20160316204731_add_commit_id_to_todos.rb b/db/migrate/20160316204731_add_commit_id_to_todos.rb
index d79858fc920..d1c004b2ced 100644
--- a/db/migrate/20160316204731_add_commit_id_to_todos.rb
+++ b/db/migrate/20160316204731_add_commit_id_to_todos.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddCommitIdToTodos < ActiveRecord::Migration
+class AddCommitIdToTodos < ActiveRecord::Migration[4.2]
def change
add_column :todos, :commit_id, :string
add_index :todos, :commit_id
diff --git a/db/migrate/20160317092222_add_moved_to_to_issue.rb b/db/migrate/20160317092222_add_moved_to_to_issue.rb
index 2bf549d7ecd..8d81d84fd20 100644
--- a/db/migrate/20160317092222_add_moved_to_to_issue.rb
+++ b/db/migrate/20160317092222_add_moved_to_to_issue.rb
@@ -1,4 +1,4 @@
-class AddMovedToToIssue < ActiveRecord::Migration
+class AddMovedToToIssue < ActiveRecord::Migration[4.2]
def change
add_reference :issues, :moved_to, references: :issues # rubocop:disable Migration/AddReference
end
diff --git a/db/migrate/20160320204112_index_namespaces_on_visibility_level.rb b/db/migrate/20160320204112_index_namespaces_on_visibility_level.rb
index 07ae7c95477..9692def430c 100644
--- a/db/migrate/20160320204112_index_namespaces_on_visibility_level.rb
+++ b/db/migrate/20160320204112_index_namespaces_on_visibility_level.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class IndexNamespacesOnVisibilityLevel < ActiveRecord::Migration
+class IndexNamespacesOnVisibilityLevel < ActiveRecord::Migration[4.2]
def change
unless index_exists?(:namespaces, :visibility_level)
add_index :namespaces, :visibility_level
diff --git a/db/migrate/20160324020319_remove_todos_for_deleted_issues.rb b/db/migrate/20160324020319_remove_todos_for_deleted_issues.rb
index 1fff9759d1e..a25d15a81ef 100644
--- a/db/migrate/20160324020319_remove_todos_for_deleted_issues.rb
+++ b/db/migrate/20160324020319_remove_todos_for_deleted_issues.rb
@@ -1,4 +1,4 @@
-class RemoveTodosForDeletedIssues < ActiveRecord::Migration
+class RemoveTodosForDeletedIssues < ActiveRecord::Migration[4.2]
def up
execute <<-SQL
DELETE FROM todos
diff --git a/db/migrate/20160328112808_create_notification_settings.rb b/db/migrate/20160328112808_create_notification_settings.rb
index 7d77e8004ba..db19d2e370c 100644
--- a/db/migrate/20160328112808_create_notification_settings.rb
+++ b/db/migrate/20160328112808_create_notification_settings.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class CreateNotificationSettings < ActiveRecord::Migration
+class CreateNotificationSettings < ActiveRecord::Migration[4.2]
def change
create_table :notification_settings do |t|
t.references :user, null: false
diff --git a/db/migrate/20160328115649_migrate_new_notification_setting.rb b/db/migrate/20160328115649_migrate_new_notification_setting.rb
index 3c81b2c37bf..5ba09e75145 100644
--- a/db/migrate/20160328115649_migrate_new_notification_setting.rb
+++ b/db/migrate/20160328115649_migrate_new_notification_setting.rb
@@ -5,7 +5,7 @@
# - during migration some users will receive notifications based on their global settings (project/group settings will be ignored)
# - its possible to get duplicate records for notification settings since we don't create uniq index yet
#
-class MigrateNewNotificationSetting < ActiveRecord::Migration
+class MigrateNewNotificationSetting < ActiveRecord::Migration[4.2]
def up
timestamp = Time.now.strftime('%F %T')
execute "INSERT INTO notification_settings ( user_id, source_id, source_type, level, created_at, updated_at ) SELECT user_id, source_id, source_type, notification_level, '#{timestamp}', '#{timestamp}' FROM members WHERE user_id IS NOT NULL"
diff --git a/db/migrate/20160328121138_add_notification_setting_index.rb b/db/migrate/20160328121138_add_notification_setting_index.rb
index 667270d6b04..ed82b172296 100644
--- a/db/migrate/20160328121138_add_notification_setting_index.rb
+++ b/db/migrate/20160328121138_add_notification_setting_index.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddNotificationSettingIndex < ActiveRecord::Migration
+class AddNotificationSettingIndex < ActiveRecord::Migration[4.2]
def change
add_index :notification_settings, :user_id
add_index :notification_settings, [:source_id, :source_type]
diff --git a/db/migrate/20160329144452_add_index_on_pending_delete_projects.rb b/db/migrate/20160329144452_add_index_on_pending_delete_projects.rb
index a3df8fb4e2e..15c44f74451 100644
--- a/db/migrate/20160329144452_add_index_on_pending_delete_projects.rb
+++ b/db/migrate/20160329144452_add_index_on_pending_delete_projects.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddIndexOnPendingDeleteProjects < ActiveRecord::Migration
+class AddIndexOnPendingDeleteProjects < ActiveRecord::Migration[4.2]
def change
add_index :projects, :pending_delete
end
diff --git a/db/migrate/20160331133914_remove_todos_for_deleted_merge_requests.rb b/db/migrate/20160331133914_remove_todos_for_deleted_merge_requests.rb
index 54cea964ff2..634a696377c 100644
--- a/db/migrate/20160331133914_remove_todos_for_deleted_merge_requests.rb
+++ b/db/migrate/20160331133914_remove_todos_for_deleted_merge_requests.rb
@@ -1,4 +1,4 @@
-class RemoveTodosForDeletedMergeRequests < ActiveRecord::Migration
+class RemoveTodosForDeletedMergeRequests < ActiveRecord::Migration[4.2]
def up
execute <<-SQL
DELETE FROM todos
diff --git a/db/migrate/20160331223143_remove_twitter_sharing_enabled_from_application_settings.rb b/db/migrate/20160331223143_remove_twitter_sharing_enabled_from_application_settings.rb
index dec80497fb3..6e5a748d096 100644
--- a/db/migrate/20160331223143_remove_twitter_sharing_enabled_from_application_settings.rb
+++ b/db/migrate/20160331223143_remove_twitter_sharing_enabled_from_application_settings.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class RemoveTwitterSharingEnabledFromApplicationSettings < ActiveRecord::Migration
+class RemoveTwitterSharingEnabledFromApplicationSettings < ActiveRecord::Migration[4.2]
def change
remove_column :application_settings, :twitter_sharing_enabled, :boolean
end
diff --git a/db/migrate/20160407120251_add_images_enabled_for_project.rb b/db/migrate/20160407120251_add_images_enabled_for_project.rb
index 47f0ca8e8de..2c42d89ccdf 100644
--- a/db/migrate/20160407120251_add_images_enabled_for_project.rb
+++ b/db/migrate/20160407120251_add_images_enabled_for_project.rb
@@ -1,4 +1,4 @@
-class AddImagesEnabledForProject < ActiveRecord::Migration
+class AddImagesEnabledForProject < ActiveRecord::Migration[4.2]
def change
add_column :projects, :container_registry_enabled, :boolean
end
diff --git a/db/migrate/20160412140240_add_repository_checks_enabled_setting.rb b/db/migrate/20160412140240_add_repository_checks_enabled_setting.rb
index 920d4d41110..a59563b835e 100644
--- a/db/migrate/20160412140240_add_repository_checks_enabled_setting.rb
+++ b/db/migrate/20160412140240_add_repository_checks_enabled_setting.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddRepositoryChecksEnabledSetting < ActiveRecord::Migration
+class AddRepositoryChecksEnabledSetting < ActiveRecord::Migration[4.2]
def change
add_column :application_settings, :repository_checks_enabled, :boolean, default: true
end
diff --git a/db/migrate/20160412173416_add_fields_to_ci_commit.rb b/db/migrate/20160412173416_add_fields_to_ci_commit.rb
index 00162af5cda..4b3d4e8bd30 100644
--- a/db/migrate/20160412173416_add_fields_to_ci_commit.rb
+++ b/db/migrate/20160412173416_add_fields_to_ci_commit.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddFieldsToCiCommit < ActiveRecord::Migration
+class AddFieldsToCiCommit < ActiveRecord::Migration[4.2]
def change
add_column :ci_commits, :status, :string
add_column :ci_commits, :started_at, :timestamp
diff --git a/db/migrate/20160412173417_update_ci_commit.rb b/db/migrate/20160412173417_update_ci_commit.rb
index 858faeb060e..91dd4582f7a 100644
--- a/db/migrate/20160412173417_update_ci_commit.rb
+++ b/db/migrate/20160412173417_update_ci_commit.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class UpdateCiCommit < ActiveRecord::Migration
+class UpdateCiCommit < ActiveRecord::Migration[4.2]
# This migration can be run online, but needs to be executed for the second time after restarting Unicorn workers
# Otherwise Offline migration should be used.
def change
diff --git a/db/migrate/20160412173418_add_ci_commit_indexes.rb b/db/migrate/20160412173418_add_ci_commit_indexes.rb
index 414f1f8279f..709e6b84d57 100644
--- a/db/migrate/20160412173418_add_ci_commit_indexes.rb
+++ b/db/migrate/20160412173418_add_ci_commit_indexes.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddCiCommitIndexes < ActiveRecord::Migration
+class AddCiCommitIndexes < ActiveRecord::Migration[4.2]
disable_ddl_transaction!
def change
diff --git a/db/migrate/20160413115152_add_token_to_web_hooks.rb b/db/migrate/20160413115152_add_token_to_web_hooks.rb
index f04225068cd..43fe46dfe5d 100644
--- a/db/migrate/20160413115152_add_token_to_web_hooks.rb
+++ b/db/migrate/20160413115152_add_token_to_web_hooks.rb
@@ -1,4 +1,4 @@
-class AddTokenToWebHooks < ActiveRecord::Migration
+class AddTokenToWebHooks < ActiveRecord::Migration[4.2]
def change
add_column :web_hooks, :token, :string
end
diff --git a/db/migrate/20160415062917_create_personal_access_tokens.rb b/db/migrate/20160415062917_create_personal_access_tokens.rb
index 94650026994..43599db799e 100644
--- a/db/migrate/20160415062917_create_personal_access_tokens.rb
+++ b/db/migrate/20160415062917_create_personal_access_tokens.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/Timestamps
-class CreatePersonalAccessTokens < ActiveRecord::Migration
+class CreatePersonalAccessTokens < ActiveRecord::Migration[4.2]
def change
create_table :personal_access_tokens do |t|
t.references :user, index: true, foreign_key: true, null: false
diff --git a/db/migrate/20160415133440_add_shared_runners_text_to_application_settings.rb b/db/migrate/20160415133440_add_shared_runners_text_to_application_settings.rb
index d493044c67b..e96c0591a07 100644
--- a/db/migrate/20160415133440_add_shared_runners_text_to_application_settings.rb
+++ b/db/migrate/20160415133440_add_shared_runners_text_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddSharedRunnersTextToApplicationSettings < ActiveRecord::Migration
+class AddSharedRunnersTextToApplicationSettings < ActiveRecord::Migration[4.2]
def change
add_column :application_settings, :shared_runners_text, :text
end
diff --git a/db/migrate/20160416180807_add_award_emoji.rb b/db/migrate/20160416180807_add_award_emoji.rb
index 0d252e5044e..99c984fd116 100644
--- a/db/migrate/20160416180807_add_award_emoji.rb
+++ b/db/migrate/20160416180807_add_award_emoji.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddAwardEmoji < ActiveRecord::Migration
+class AddAwardEmoji < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20160416182152_convert_award_note_to_emoji_award.rb b/db/migrate/20160416182152_convert_award_note_to_emoji_award.rb
index 50f159a80b1..af2820986f0 100644
--- a/db/migrate/20160416182152_convert_award_note_to_emoji_award.rb
+++ b/db/migrate/20160416182152_convert_award_note_to_emoji_award.rb
@@ -1,4 +1,4 @@
-class ConvertAwardNoteToEmojiAward < ActiveRecord::Migration
+class ConvertAwardNoteToEmojiAward < ActiveRecord::Migration[4.2]
disable_ddl_transaction!
def up
diff --git a/db/migrate/20160419120017_add_metrics_packet_size.rb b/db/migrate/20160419120017_add_metrics_packet_size.rb
index 78c163d62ac..16c3ebfe22b 100644
--- a/db/migrate/20160419120017_add_metrics_packet_size.rb
+++ b/db/migrate/20160419120017_add_metrics_packet_size.rb
@@ -1,4 +1,4 @@
-class AddMetricsPacketSize < ActiveRecord::Migration
+class AddMetricsPacketSize < ActiveRecord::Migration[4.2]
def change
add_column :application_settings, :metrics_packet_size, :integer, default: 1
end
diff --git a/db/migrate/20160419122101_add_only_allow_merge_if_build_succeeds_to_projects.rb b/db/migrate/20160419122101_add_only_allow_merge_if_build_succeeds_to_projects.rb
index 1716b6e8153..cf842a684a6 100644
--- a/db/migrate/20160419122101_add_only_allow_merge_if_build_succeeds_to_projects.rb
+++ b/db/migrate/20160419122101_add_only_allow_merge_if_build_succeeds_to_projects.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/UpdateLargeTable
-class AddOnlyAllowMergeIfBuildSucceedsToProjects < ActiveRecord::Migration
+class AddOnlyAllowMergeIfBuildSucceedsToProjects < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20160421130527_disable_repository_checks.rb b/db/migrate/20160421130527_disable_repository_checks.rb
index 7e65ddc45e7..8b3ce73c5e8 100644
--- a/db/migrate/20160421130527_disable_repository_checks.rb
+++ b/db/migrate/20160421130527_disable_repository_checks.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class DisableRepositoryChecks < ActiveRecord::Migration
+class DisableRepositoryChecks < ActiveRecord::Migration[4.2]
def up
change_column_default :application_settings, :repository_checks_enabled, false
execute 'UPDATE application_settings SET repository_checks_enabled = false'
diff --git a/db/migrate/20160425045124_create_u2f_registrations.rb b/db/migrate/20160425045124_create_u2f_registrations.rb
index 72cbe98ebba..9b48fc822b6 100644
--- a/db/migrate/20160425045124_create_u2f_registrations.rb
+++ b/db/migrate/20160425045124_create_u2f_registrations.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class CreateU2fRegistrations < ActiveRecord::Migration
+class CreateU2fRegistrations < ActiveRecord::Migration[4.2]
def change
create_table :u2f_registrations do |t|
t.text :certificate
diff --git a/db/migrate/20160504091942_add_disabled_oauth_sign_in_sources_to_application_settings.rb b/db/migrate/20160504091942_add_disabled_oauth_sign_in_sources_to_application_settings.rb
index facd33875ba..9a0d1a2d316 100644
--- a/db/migrate/20160504091942_add_disabled_oauth_sign_in_sources_to_application_settings.rb
+++ b/db/migrate/20160504091942_add_disabled_oauth_sign_in_sources_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddDisabledOauthSignInSourcesToApplicationSettings < ActiveRecord::Migration
+class AddDisabledOauthSignInSourcesToApplicationSettings < ActiveRecord::Migration[4.2]
def change
add_column :application_settings, :disabled_oauth_sign_in_sources, :text
end
diff --git a/db/migrate/20160504112519_add_run_untagged_to_ci_runner.rb b/db/migrate/20160504112519_add_run_untagged_to_ci_runner.rb
index 84e5e4eabe2..03ec29b9951 100644
--- a/db/migrate/20160504112519_add_run_untagged_to_ci_runner.rb
+++ b/db/migrate/20160504112519_add_run_untagged_to_ci_runner.rb
@@ -1,4 +1,4 @@
-class AddRunUntaggedToCiRunner < ActiveRecord::Migration
+class AddRunUntaggedToCiRunner < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20160508194200_remove_wall_enabled_from_projects.rb b/db/migrate/20160508194200_remove_wall_enabled_from_projects.rb
index 6792ffc957a..4edbeb09f74 100644
--- a/db/migrate/20160508194200_remove_wall_enabled_from_projects.rb
+++ b/db/migrate/20160508194200_remove_wall_enabled_from_projects.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class RemoveWallEnabledFromProjects < ActiveRecord::Migration
+class RemoveWallEnabledFromProjects < ActiveRecord::Migration[4.2]
def change
remove_column :projects, :wall_enabled, :boolean, default: true, null: false
end
diff --git a/db/migrate/20160508202603_add_head_commit_id_to_merge_request_diffs.rb b/db/migrate/20160508202603_add_head_commit_id_to_merge_request_diffs.rb
index 1c4d60e7234..ee7c9326bfe 100644
--- a/db/migrate/20160508202603_add_head_commit_id_to_merge_request_diffs.rb
+++ b/db/migrate/20160508202603_add_head_commit_id_to_merge_request_diffs.rb
@@ -1,4 +1,4 @@
-class AddHeadCommitIdToMergeRequestDiffs < ActiveRecord::Migration
+class AddHeadCommitIdToMergeRequestDiffs < ActiveRecord::Migration[4.2]
def change
add_column :merge_request_diffs, :head_commit_sha, :string
end
diff --git a/db/migrate/20160508215820_add_type_to_notes.rb b/db/migrate/20160508215820_add_type_to_notes.rb
index 58944d4e651..343743a589c 100644
--- a/db/migrate/20160508215820_add_type_to_notes.rb
+++ b/db/migrate/20160508215820_add_type_to_notes.rb
@@ -1,4 +1,4 @@
-class AddTypeToNotes < ActiveRecord::Migration
+class AddTypeToNotes < ActiveRecord::Migration[4.2]
def change
add_column :notes, :type, :string
end
diff --git a/db/migrate/20160508215920_add_positions_to_diff_notes.rb b/db/migrate/20160508215920_add_positions_to_diff_notes.rb
index 2952c25004e..e0ee03d0fb5 100644
--- a/db/migrate/20160508215920_add_positions_to_diff_notes.rb
+++ b/db/migrate/20160508215920_add_positions_to_diff_notes.rb
@@ -1,4 +1,4 @@
-class AddPositionsToDiffNotes < ActiveRecord::Migration
+class AddPositionsToDiffNotes < ActiveRecord::Migration[4.2]
def change
add_column :notes, :position, :text
add_column :notes, :original_position, :text
diff --git a/db/migrate/20160508221410_set_type_on_legacy_diff_notes.rb b/db/migrate/20160508221410_set_type_on_legacy_diff_notes.rb
index 6dd958ff4a0..567754d4f4e 100644
--- a/db/migrate/20160508221410_set_type_on_legacy_diff_notes.rb
+++ b/db/migrate/20160508221410_set_type_on_legacy_diff_notes.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class SetTypeOnLegacyDiffNotes < ActiveRecord::Migration
+class SetTypeOnLegacyDiffNotes < ActiveRecord::Migration[4.2]
def change
execute "UPDATE notes SET type = 'LegacyDiffNote' WHERE line_code IS NOT NULL"
end
diff --git a/db/migrate/20160509091049_add_locked_to_ci_runner.rb b/db/migrate/20160509091049_add_locked_to_ci_runner.rb
index 3fbaef3b7f0..e19db5a4504 100644
--- a/db/migrate/20160509091049_add_locked_to_ci_runner.rb
+++ b/db/migrate/20160509091049_add_locked_to_ci_runner.rb
@@ -1,4 +1,4 @@
-class AddLockedToCiRunner < ActiveRecord::Migration
+class AddLockedToCiRunner < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20160509201028_add_health_check_access_token_to_application_settings.rb b/db/migrate/20160509201028_add_health_check_access_token_to_application_settings.rb
index 9d729fec189..54d615f7e21 100644
--- a/db/migrate/20160509201028_add_health_check_access_token_to_application_settings.rb
+++ b/db/migrate/20160509201028_add_health_check_access_token_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddHealthCheckAccessTokenToApplicationSettings < ActiveRecord::Migration
+class AddHealthCheckAccessTokenToApplicationSettings < ActiveRecord::Migration[4.2]
def change
add_column :application_settings, :health_check_access_token, :string
end
diff --git a/db/migrate/20160516174813_add_send_user_confirmation_email_to_application_settings.rb b/db/migrate/20160516174813_add_send_user_confirmation_email_to_application_settings.rb
index 8c96353b850..9e203b97a43 100644
--- a/db/migrate/20160516174813_add_send_user_confirmation_email_to_application_settings.rb
+++ b/db/migrate/20160516174813_add_send_user_confirmation_email_to_application_settings.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddSendUserConfirmationEmailToApplicationSettings < ActiveRecord::Migration
+class AddSendUserConfirmationEmailToApplicationSettings < ActiveRecord::Migration[4.2]
def up
add_column :application_settings, :send_user_confirmation_email, :boolean, default: false
diff --git a/db/migrate/20160516224534_add_start_commit_id_to_merge_request_diffs.rb b/db/migrate/20160516224534_add_start_commit_id_to_merge_request_diffs.rb
index b7fd76ee84b..a84bfd64bda 100644
--- a/db/migrate/20160516224534_add_start_commit_id_to_merge_request_diffs.rb
+++ b/db/migrate/20160516224534_add_start_commit_id_to_merge_request_diffs.rb
@@ -1,4 +1,4 @@
-class AddStartCommitIdToMergeRequestDiffs < ActiveRecord::Migration
+class AddStartCommitIdToMergeRequestDiffs < ActiveRecord::Migration[4.2]
def change
add_column :merge_request_diffs, :start_commit_sha, :string
end
diff --git a/db/migrate/20160518200441_add_artifacts_expire_date_to_ci_builds.rb b/db/migrate/20160518200441_add_artifacts_expire_date_to_ci_builds.rb
index 8e9ab3f8acc..143b84a1662 100644
--- a/db/migrate/20160518200441_add_artifacts_expire_date_to_ci_builds.rb
+++ b/db/migrate/20160518200441_add_artifacts_expire_date_to_ci_builds.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/Datetime
-class AddArtifactsExpireDateToCiBuilds < ActiveRecord::Migration
+class AddArtifactsExpireDateToCiBuilds < ActiveRecord::Migration[4.2]
def change
add_column :ci_builds, :artifacts_expire_at, :timestamp
end
diff --git a/db/migrate/20160519203051_add_developers_can_merge_to_protected_branches.rb b/db/migrate/20160519203051_add_developers_can_merge_to_protected_branches.rb
index ac50035eba4..ba0e1654379 100644
--- a/db/migrate/20160519203051_add_developers_can_merge_to_protected_branches.rb
+++ b/db/migrate/20160519203051_add_developers_can_merge_to_protected_branches.rb
@@ -1,4 +1,4 @@
-class AddDevelopersCanMergeToProtectedBranches < ActiveRecord::Migration
+class AddDevelopersCanMergeToProtectedBranches < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160522215720_add_note_type_and_position_to_sent_notification.rb b/db/migrate/20160522215720_add_note_type_and_position_to_sent_notification.rb
index 4eef16c9408..f569fc7c73f 100644
--- a/db/migrate/20160522215720_add_note_type_and_position_to_sent_notification.rb
+++ b/db/migrate/20160522215720_add_note_type_and_position_to_sent_notification.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddNoteTypeAndPositionToSentNotification < ActiveRecord::Migration
+class AddNoteTypeAndPositionToSentNotification < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# When using the methods "add_concurrent_index" or "add_column_with_default"
diff --git a/db/migrate/20160525205328_remove_main_language_from_projects.rb b/db/migrate/20160525205328_remove_main_language_from_projects.rb
index dc4ceacddb1..81d0fb5b080 100644
--- a/db/migrate/20160525205328_remove_main_language_from_projects.rb
+++ b/db/migrate/20160525205328_remove_main_language_from_projects.rb
@@ -2,7 +2,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RemoveMainLanguageFromProjects < ActiveRecord::Migration
+class RemoveMainLanguageFromProjects < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# When using the methods "add_concurrent_index" or "add_column_with_default"
diff --git a/db/migrate/20160527020117_remove_notification_settings_for_deleted_projects.rb b/db/migrate/20160527020117_remove_notification_settings_for_deleted_projects.rb
index 7910120b4e0..c530c09859d 100644
--- a/db/migrate/20160527020117_remove_notification_settings_for_deleted_projects.rb
+++ b/db/migrate/20160527020117_remove_notification_settings_for_deleted_projects.rb
@@ -1,4 +1,4 @@
-class RemoveNotificationSettingsForDeletedProjects < ActiveRecord::Migration
+class RemoveNotificationSettingsForDeletedProjects < ActiveRecord::Migration[4.2]
def up
execute <<-SQL
DELETE FROM notification_settings
diff --git a/db/migrate/20160528043124_add_users_state_index.rb b/db/migrate/20160528043124_add_users_state_index.rb
index 6419d2ae71d..3437b35a0c0 100644
--- a/db/migrate/20160528043124_add_users_state_index.rb
+++ b/db/migrate/20160528043124_add_users_state_index.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddUsersStateIndex < ActiveRecord::Migration
+class AddUsersStateIndex < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20160530150109_add_container_registry_token_expire_delay_to_application_settings.rb b/db/migrate/20160530150109_add_container_registry_token_expire_delay_to_application_settings.rb
index e21376bd571..7b20146e21c 100644
--- a/db/migrate/20160530150109_add_container_registry_token_expire_delay_to_application_settings.rb
+++ b/db/migrate/20160530150109_add_container_registry_token_expire_delay_to_application_settings.rb
@@ -1,6 +1,6 @@
# This is ONLINE migration
-class AddContainerRegistryTokenExpireDelayToApplicationSettings < ActiveRecord::Migration
+class AddContainerRegistryTokenExpireDelayToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
def change
diff --git a/db/migrate/20160603075128_add_has_external_issue_tracker_to_projects.rb b/db/migrate/20160603075128_add_has_external_issue_tracker_to_projects.rb
index be295f0181d..a7d2d7f9952 100644
--- a/db/migrate/20160603075128_add_has_external_issue_tracker_to_projects.rb
+++ b/db/migrate/20160603075128_add_has_external_issue_tracker_to_projects.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddHasExternalIssueTrackerToProjects < ActiveRecord::Migration
+class AddHasExternalIssueTrackerToProjects < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
def change
diff --git a/db/migrate/20160603180330_remove_duplicated_notification_settings.rb b/db/migrate/20160603180330_remove_duplicated_notification_settings.rb
index fe1c863b5b9..0d8c4bf011c 100644
--- a/db/migrate/20160603180330_remove_duplicated_notification_settings.rb
+++ b/db/migrate/20160603180330_remove_duplicated_notification_settings.rb
@@ -1,4 +1,4 @@
-class RemoveDuplicatedNotificationSettings < ActiveRecord::Migration
+class RemoveDuplicatedNotificationSettings < ActiveRecord::Migration[4.2]
def up
duplicates = exec_query(%Q{
SELECT user_id, source_type, source_id
diff --git a/db/migrate/20160603182247_add_index_to_notification_settings.rb b/db/migrate/20160603182247_add_index_to_notification_settings.rb
index f6ae26d555f..cea178d555c 100644
--- a/db/migrate/20160603182247_add_index_to_notification_settings.rb
+++ b/db/migrate/20160603182247_add_index_to_notification_settings.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class AddIndexToNotificationSettings < ActiveRecord::Migration
+class AddIndexToNotificationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20160608155312_add_after_sign_up_text_to_application_settings.rb b/db/migrate/20160608155312_add_after_sign_up_text_to_application_settings.rb
index 89826fb96cb..3b3f68529a5 100644
--- a/db/migrate/20160608155312_add_after_sign_up_text_to_application_settings.rb
+++ b/db/migrate/20160608155312_add_after_sign_up_text_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddAfterSignUpTextToApplicationSettings < ActiveRecord::Migration
+class AddAfterSignUpTextToApplicationSettings < ActiveRecord::Migration[4.2]
def change
add_column :application_settings, :after_sign_up_text, :text
end
diff --git a/db/migrate/20160608195742_add_repository_storage_to_projects.rb b/db/migrate/20160608195742_add_repository_storage_to_projects.rb
index e4febd1614d..2b20c9fbd5f 100644
--- a/db/migrate/20160608195742_add_repository_storage_to_projects.rb
+++ b/db/migrate/20160608195742_add_repository_storage_to_projects.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/UpdateLargeTable
-class AddRepositoryStorageToProjects < ActiveRecord::Migration
+class AddRepositoryStorageToProjects < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20160608211215_add_user_default_external_to_application_settings.rb b/db/migrate/20160608211215_add_user_default_external_to_application_settings.rb
index 34c702e3fa6..9b5cfc67d5a 100644
--- a/db/migrate/20160608211215_add_user_default_external_to_application_settings.rb
+++ b/db/migrate/20160608211215_add_user_default_external_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddUserDefaultExternalToApplicationSettings < ActiveRecord::Migration
+class AddUserDefaultExternalToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20160610140403_remove_notification_setting_not_null_constraints.rb b/db/migrate/20160610140403_remove_notification_setting_not_null_constraints.rb
index 259abb08e47..d5301672dc5 100644
--- a/db/migrate/20160610140403_remove_notification_setting_not_null_constraints.rb
+++ b/db/migrate/20160610140403_remove_notification_setting_not_null_constraints.rb
@@ -1,4 +1,4 @@
-class RemoveNotificationSettingNotNullConstraints < ActiveRecord::Migration
+class RemoveNotificationSettingNotNullConstraints < ActiveRecord::Migration[4.2]
def up
change_column :notification_settings, :source_type, :string, null: true
change_column :notification_settings, :source_id, :integer, null: true
diff --git a/db/migrate/20160610194713_remove_deprecated_issues_tracker_columns_from_projects.rb b/db/migrate/20160610194713_remove_deprecated_issues_tracker_columns_from_projects.rb
index 21b367711c3..1ac65997403 100644
--- a/db/migrate/20160610194713_remove_deprecated_issues_tracker_columns_from_projects.rb
+++ b/db/migrate/20160610194713_remove_deprecated_issues_tracker_columns_from_projects.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/RemoveColumn
-class RemoveDeprecatedIssuesTrackerColumnsFromProjects < ActiveRecord::Migration
+class RemoveDeprecatedIssuesTrackerColumnsFromProjects < ActiveRecord::Migration[4.2]
def change
remove_column :projects, :issues_tracker, :string, default: 'gitlab', null: false
remove_column :projects, :issues_tracker_id, :string
diff --git a/db/migrate/20160610201627_migrate_users_notification_level.rb b/db/migrate/20160610201627_migrate_users_notification_level.rb
index cd8b505de9f..553b7f074f2 100644
--- a/db/migrate/20160610201627_migrate_users_notification_level.rb
+++ b/db/migrate/20160610201627_migrate_users_notification_level.rb
@@ -1,4 +1,4 @@
-class MigrateUsersNotificationLevel < ActiveRecord::Migration
+class MigrateUsersNotificationLevel < ActiveRecord::Migration[4.2]
DOWNTIME = false
# Migrates only users who changed their default notification level :participating
diff --git a/db/migrate/20160610204157_add_deployments.rb b/db/migrate/20160610204157_add_deployments.rb
index 0ee0b1f5a86..91b619e7d3d 100644
--- a/db/migrate/20160610204157_add_deployments.rb
+++ b/db/migrate/20160610204157_add_deployments.rb
@@ -1,6 +1,6 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddDeployments < ActiveRecord::Migration
+class AddDeployments < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
def change
diff --git a/db/migrate/20160610204158_add_environments.rb b/db/migrate/20160610204158_add_environments.rb
index 534a73a5fb6..55fb8b1227b 100644
--- a/db/migrate/20160610204158_add_environments.rb
+++ b/db/migrate/20160610204158_add_environments.rb
@@ -1,6 +1,6 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddEnvironments < ActiveRecord::Migration
+class AddEnvironments < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
def change
diff --git a/db/migrate/20160610211845_add_environment_to_builds.rb b/db/migrate/20160610211845_add_environment_to_builds.rb
index 990e445ac55..16d5465cafa 100644
--- a/db/migrate/20160610211845_add_environment_to_builds.rb
+++ b/db/migrate/20160610211845_add_environment_to_builds.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddEnvironmentToBuilds < ActiveRecord::Migration
+class AddEnvironmentToBuilds < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
def change
diff --git a/db/migrate/20160610301627_remove_notification_level_from_users.rb b/db/migrate/20160610301627_remove_notification_level_from_users.rb
index 356e53b4b23..93f70c476d2 100644
--- a/db/migrate/20160610301627_remove_notification_level_from_users.rb
+++ b/db/migrate/20160610301627_remove_notification_level_from_users.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/RemoveColumn
-class RemoveNotificationLevelFromUsers < ActiveRecord::Migration
+class RemoveNotificationLevelFromUsers < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
def change
diff --git a/db/migrate/20160614182521_add_repository_storage_to_application_settings.rb b/db/migrate/20160614182521_add_repository_storage_to_application_settings.rb
index 6dae91b700b..a1bc0e5cd86 100644
--- a/db/migrate/20160614182521_add_repository_storage_to_application_settings.rb
+++ b/db/migrate/20160614182521_add_repository_storage_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddRepositoryStorageToApplicationSettings < ActiveRecord::Migration
+class AddRepositoryStorageToApplicationSettings < ActiveRecord::Migration[4.2]
def change
add_column :application_settings, :repository_storage, :string, default: 'default'
end
diff --git a/db/migrate/20160615142710_add_index_on_requested_at_to_members.rb b/db/migrate/20160615142710_add_index_on_requested_at_to_members.rb
index 178e4bf5ed3..1b1dab141f8 100644
--- a/db/migrate/20160615142710_add_index_on_requested_at_to_members.rb
+++ b/db/migrate/20160615142710_add_index_on_requested_at_to_members.rb
@@ -1,5 +1,5 @@
# rubocop:disable RemoveIndex
-class AddIndexOnRequestedAtToMembers < ActiveRecord::Migration
+class AddIndexOnRequestedAtToMembers < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160615173316_add_enabled_git_access_protocols_to_application_settings.rb b/db/migrate/20160615173316_add_enabled_git_access_protocols_to_application_settings.rb
index d0e6d8d1ea1..deb4b86a2fd 100644
--- a/db/migrate/20160615173316_add_enabled_git_access_protocols_to_application_settings.rb
+++ b/db/migrate/20160615173316_add_enabled_git_access_protocols_to_application_settings.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddEnabledGitAccessProtocolsToApplicationSettings < ActiveRecord::Migration
+class AddEnabledGitAccessProtocolsToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
def change
diff --git a/db/migrate/20160615191922_set_missing_stage_on_ci_builds.rb b/db/migrate/20160615191922_set_missing_stage_on_ci_builds.rb
index c58cb957df4..11d15e7c15f 100644
--- a/db/migrate/20160615191922_set_missing_stage_on_ci_builds.rb
+++ b/db/migrate/20160615191922_set_missing_stage_on_ci_builds.rb
@@ -1,6 +1,6 @@
# rubocop:disable Migration/UpdateLargeTable
# rubocop:disable Migration/UpdateColumnInBatches
-class SetMissingStageOnCiBuilds < ActiveRecord::Migration
+class SetMissingStageOnCiBuilds < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20160616084004_change_project_of_environment.rb b/db/migrate/20160616084004_change_project_of_environment.rb
index cc1daf9b621..23914a0325a 100644
--- a/db/migrate/20160616084004_change_project_of_environment.rb
+++ b/db/migrate/20160616084004_change_project_of_environment.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class ChangeProjectOfEnvironment < ActiveRecord::Migration
+class ChangeProjectOfEnvironment < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# When using the methods "add_concurrent_index" or "add_column_with_default"
diff --git a/db/migrate/20160616102642_remove_duplicated_keys.rb b/db/migrate/20160616102642_remove_duplicated_keys.rb
index 5e41cc53e32..0b896108292 100644
--- a/db/migrate/20160616102642_remove_duplicated_keys.rb
+++ b/db/migrate/20160616102642_remove_duplicated_keys.rb
@@ -1,4 +1,4 @@
-class RemoveDuplicatedKeys < ActiveRecord::Migration
+class RemoveDuplicatedKeys < ActiveRecord::Migration[4.2]
def up
select_all("SELECT fingerprint FROM #{quote_table_name(:keys)} GROUP BY fingerprint HAVING COUNT(*) > 1").each do |row|
fingerprint = connection.quote(row['fingerprint'])
diff --git a/db/migrate/20160616103005_remove_keys_fingerprint_index_if_exists.rb b/db/migrate/20160616103005_remove_keys_fingerprint_index_if_exists.rb
index 081df23f394..afccc40cc67 100644
--- a/db/migrate/20160616103005_remove_keys_fingerprint_index_if_exists.rb
+++ b/db/migrate/20160616103005_remove_keys_fingerprint_index_if_exists.rb
@@ -1,5 +1,5 @@
# rubocop:disable RemoveIndex
-class RemoveKeysFingerprintIndexIfExists < ActiveRecord::Migration
+class RemoveKeysFingerprintIndexIfExists < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20160616103948_add_unique_index_to_keys_fingerprint.rb b/db/migrate/20160616103948_add_unique_index_to_keys_fingerprint.rb
index 76bb6a09639..d619acad3d0 100644
--- a/db/migrate/20160616103948_add_unique_index_to_keys_fingerprint.rb
+++ b/db/migrate/20160616103948_add_unique_index_to_keys_fingerprint.rb
@@ -1,5 +1,5 @@
# rubocop:disable RemoveIndex
-class AddUniqueIndexToKeysFingerprint < ActiveRecord::Migration
+class AddUniqueIndexToKeysFingerprint < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20160617301627_add_events_to_notification_settings.rb b/db/migrate/20160617301627_add_events_to_notification_settings.rb
index 609596f45e4..109817e3d8a 100644
--- a/db/migrate/20160617301627_add_events_to_notification_settings.rb
+++ b/db/migrate/20160617301627_add_events_to_notification_settings.rb
@@ -1,4 +1,4 @@
-class AddEventsToNotificationSettings < ActiveRecord::Migration
+class AddEventsToNotificationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
def change
diff --git a/db/migrate/20160620115026_add_index_on_runners_locked.rb b/db/migrate/20160620115026_add_index_on_runners_locked.rb
index 48f4495b0a4..c619dc07a91 100644
--- a/db/migrate/20160620115026_add_index_on_runners_locked.rb
+++ b/db/migrate/20160620115026_add_index_on_runners_locked.rb
@@ -2,7 +2,7 @@
# for more information on how to write migrations for GitLab.
# rubocop:disable RemoveIndex
-class AddIndexOnRunnersLocked < ActiveRecord::Migration
+class AddIndexOnRunnersLocked < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160621123729_add_rebase_commit_sha_to_merge_requests.rb b/db/migrate/20160621123729_add_rebase_commit_sha_to_merge_requests.rb
index 1222dc640a8..2d3ab4e2583 100644
--- a/db/migrate/20160621123729_add_rebase_commit_sha_to_merge_requests.rb
+++ b/db/migrate/20160621123729_add_rebase_commit_sha_to_merge_requests.rb
@@ -5,7 +5,7 @@
# into EE.
#
# See discussion at https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/3932
-class AddRebaseCommitShaToMergeRequests < ActiveRecord::Migration
+class AddRebaseCommitShaToMergeRequests < ActiveRecord::Migration[4.2]
DOWNTIME = false
def up
diff --git a/db/migrate/20160628085157_add_artifacts_size_to_ci_builds.rb b/db/migrate/20160628085157_add_artifacts_size_to_ci_builds.rb
index 61dd726fac7..60bd4c36eb6 100644
--- a/db/migrate/20160628085157_add_artifacts_size_to_ci_builds.rb
+++ b/db/migrate/20160628085157_add_artifacts_size_to_ci_builds.rb
@@ -1,4 +1,4 @@
-class AddArtifactsSizeToCiBuilds < ActiveRecord::Migration
+class AddArtifactsSizeToCiBuilds < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
def change
diff --git a/db/migrate/20160629025435_add_column_in_progress_merge_commit_sha_to_merge_requests.rb b/db/migrate/20160629025435_add_column_in_progress_merge_commit_sha_to_merge_requests.rb
index 7c5f76572ef..13e1280b71a 100644
--- a/db/migrate/20160629025435_add_column_in_progress_merge_commit_sha_to_merge_requests.rb
+++ b/db/migrate/20160629025435_add_column_in_progress_merge_commit_sha_to_merge_requests.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddColumnInProgressMergeCommitShaToMergeRequests < ActiveRecord::Migration
+class AddColumnInProgressMergeCommitShaToMergeRequests < ActiveRecord::Migration[4.2]
def change
add_column :merge_requests, :in_progress_merge_commit_sha, :string
end
diff --git a/db/migrate/20160703180340_add_index_on_award_emoji_user_and_name.rb b/db/migrate/20160703180340_add_index_on_award_emoji_user_and_name.rb
index 0c25f87dfb4..8a576b99de0 100644
--- a/db/migrate/20160703180340_add_index_on_award_emoji_user_and_name.rb
+++ b/db/migrate/20160703180340_add_index_on_award_emoji_user_and_name.rb
@@ -1,7 +1,7 @@
# rubocop:disable all
# Migration type: online without errors
-class AddIndexOnAwardEmojiUserAndName < ActiveRecord::Migration
+class AddIndexOnAwardEmojiUserAndName < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20160705054938_add_protected_branches_push_access.rb b/db/migrate/20160705054938_add_protected_branches_push_access.rb
index de3aefcb1fb..314d90efa90 100644
--- a/db/migrate/20160705054938_add_protected_branches_push_access.rb
+++ b/db/migrate/20160705054938_add_protected_branches_push_access.rb
@@ -2,7 +2,7 @@
# for more information on how to write migrations for GitLab.
# rubocop:disable Migration/Timestamps
-class AddProtectedBranchesPushAccess < ActiveRecord::Migration
+class AddProtectedBranchesPushAccess < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20160705054952_add_protected_branches_merge_access.rb b/db/migrate/20160705054952_add_protected_branches_merge_access.rb
index 9b18a2061b3..672e0e291db 100644
--- a/db/migrate/20160705054952_add_protected_branches_merge_access.rb
+++ b/db/migrate/20160705054952_add_protected_branches_merge_access.rb
@@ -2,7 +2,7 @@
# for more information on how to write migrations for GitLab.
# rubocop:disable Migration/Timestamps
-class AddProtectedBranchesMergeAccess < ActiveRecord::Migration
+class AddProtectedBranchesMergeAccess < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20160705055254_move_from_developers_can_merge_to_protected_branches_merge_access.rb b/db/migrate/20160705055254_move_from_developers_can_merge_to_protected_branches_merge_access.rb
index 1db0df92bec..1bd462cab06 100644
--- a/db/migrate/20160705055254_move_from_developers_can_merge_to_protected_branches_merge_access.rb
+++ b/db/migrate/20160705055254_move_from_developers_can_merge_to_protected_branches_merge_access.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class MoveFromDevelopersCanMergeToProtectedBranchesMergeAccess < ActiveRecord::Migration
+class MoveFromDevelopersCanMergeToProtectedBranchesMergeAccess < ActiveRecord::Migration[4.2]
DOWNTIME = true
DOWNTIME_REASON = <<-HEREDOC
We're creating a `merge_access_level` for each `protected_branch`. If a user creates a `protected_branch` while this
diff --git a/db/migrate/20160705055308_move_from_developers_can_push_to_protected_branches_push_access.rb b/db/migrate/20160705055308_move_from_developers_can_push_to_protected_branches_push_access.rb
index 5c3e189bb5b..d480dac777a 100644
--- a/db/migrate/20160705055308_move_from_developers_can_push_to_protected_branches_push_access.rb
+++ b/db/migrate/20160705055308_move_from_developers_can_push_to_protected_branches_push_access.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class MoveFromDevelopersCanPushToProtectedBranchesPushAccess < ActiveRecord::Migration
+class MoveFromDevelopersCanPushToProtectedBranchesPushAccess < ActiveRecord::Migration[4.2]
DOWNTIME = true
DOWNTIME_REASON = <<-HEREDOC
We're creating a `push_access_level` for each `protected_branch`. If a user creates a `protected_branch` while this
diff --git a/db/migrate/20160705055809_remove_developers_can_push_from_protected_branches.rb b/db/migrate/20160705055809_remove_developers_can_push_from_protected_branches.rb
index 058bd539e65..e5c9da072cf 100644
--- a/db/migrate/20160705055809_remove_developers_can_push_from_protected_branches.rb
+++ b/db/migrate/20160705055809_remove_developers_can_push_from_protected_branches.rb
@@ -2,7 +2,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RemoveDevelopersCanPushFromProtectedBranches < ActiveRecord::Migration
+class RemoveDevelopersCanPushFromProtectedBranches < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# This is only required for `#down`
diff --git a/db/migrate/20160705055813_remove_developers_can_merge_from_protected_branches.rb b/db/migrate/20160705055813_remove_developers_can_merge_from_protected_branches.rb
index d0e5da4d28b..2a623b55839 100644
--- a/db/migrate/20160705055813_remove_developers_can_merge_from_protected_branches.rb
+++ b/db/migrate/20160705055813_remove_developers_can_merge_from_protected_branches.rb
@@ -2,7 +2,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RemoveDevelopersCanMergeFromProtectedBranches < ActiveRecord::Migration
+class RemoveDevelopersCanMergeFromProtectedBranches < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# This is only required for `#down`
diff --git a/db/migrate/20160705163108_remove_requesters_that_are_owners.rb b/db/migrate/20160705163108_remove_requesters_that_are_owners.rb
index 1fca230c019..449c67e1b6a 100644
--- a/db/migrate/20160705163108_remove_requesters_that_are_owners.rb
+++ b/db/migrate/20160705163108_remove_requesters_that_are_owners.rb
@@ -1,4 +1,4 @@
-class RemoveRequestersThatAreOwners < ActiveRecord::Migration
+class RemoveRequestersThatAreOwners < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
def up
diff --git a/db/migrate/20160707104333_add_lock_to_issuables.rb b/db/migrate/20160707104333_add_lock_to_issuables.rb
index 54866d02cbc..fdc3abf46cc 100644
--- a/db/migrate/20160707104333_add_lock_to_issuables.rb
+++ b/db/migrate/20160707104333_add_lock_to_issuables.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddLockToIssuables < ActiveRecord::Migration
+class AddLockToIssuables < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160712171823_remove_award_emojis_with_no_user.rb b/db/migrate/20160712171823_remove_award_emojis_with_no_user.rb
index 8ebf1a5234d..0b553182a81 100644
--- a/db/migrate/20160712171823_remove_award_emojis_with_no_user.rb
+++ b/db/migrate/20160712171823_remove_award_emojis_with_no_user.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RemoveAwardEmojisWithNoUser < ActiveRecord::Migration
+class RemoveAwardEmojisWithNoUser < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# When using the methods "add_concurrent_index" or "add_column_with_default"
diff --git a/db/migrate/20160713200638_add_repository_read_only_to_projects.rb b/db/migrate/20160713200638_add_repository_read_only_to_projects.rb
index 8ee8b55f210..ba61bc8cbb0 100644
--- a/db/migrate/20160713200638_add_repository_read_only_to_projects.rb
+++ b/db/migrate/20160713200638_add_repository_read_only_to_projects.rb
@@ -1,4 +1,4 @@
-class AddRepositoryReadOnlyToProjects < ActiveRecord::Migration
+class AddRepositoryReadOnlyToProjects < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160713205315_add_domain_blacklist_to_application_settings.rb b/db/migrate/20160713205315_add_domain_blacklist_to_application_settings.rb
index f64dfa7675f..4b9ac12253e 100644
--- a/db/migrate/20160713205315_add_domain_blacklist_to_application_settings.rb
+++ b/db/migrate/20160713205315_add_domain_blacklist_to_application_settings.rb
@@ -2,7 +2,7 @@
# for more information on how to write migrations for GitLab.
# rubocop:disable Migration/SaferBooleanColumn
-class AddDomainBlacklistToApplicationSettings < ActiveRecord::Migration
+class AddDomainBlacklistToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# When using the methods "add_concurrent_index" or "add_column_with_default"
diff --git a/db/migrate/20160713222618_add_usage_ping_to_application_settings.rb b/db/migrate/20160713222618_add_usage_ping_to_application_settings.rb
index a7f76cc626e..7ef02316338 100644
--- a/db/migrate/20160713222618_add_usage_ping_to_application_settings.rb
+++ b/db/migrate/20160713222618_add_usage_ping_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddUsagePingToApplicationSettings < ActiveRecord::Migration
+class AddUsagePingToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160715132507_add_user_id_to_pipeline.rb b/db/migrate/20160715132507_add_user_id_to_pipeline.rb
index af0461c4daf..b1e22b1c2bb 100644
--- a/db/migrate/20160715132507_add_user_id_to_pipeline.rb
+++ b/db/migrate/20160715132507_add_user_id_to_pipeline.rb
@@ -1,4 +1,4 @@
-class AddUserIdToPipeline < ActiveRecord::Migration
+class AddUserIdToPipeline < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
def change
diff --git a/db/migrate/20160715134306_add_index_for_pipeline_user_id.rb b/db/migrate/20160715134306_add_index_for_pipeline_user_id.rb
index fec17ffb7f6..8e7ac86a8b7 100644
--- a/db/migrate/20160715134306_add_index_for_pipeline_user_id.rb
+++ b/db/migrate/20160715134306_add_index_for_pipeline_user_id.rb
@@ -1,5 +1,5 @@
# rubocop:disable RemoveIndex
-class AddIndexForPipelineUserId < ActiveRecord::Migration
+class AddIndexForPipelineUserId < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160715154212_add_request_access_enabled_to_projects.rb b/db/migrate/20160715154212_add_request_access_enabled_to_projects.rb
index 22c925799a3..96260f5fd55 100644
--- a/db/migrate/20160715154212_add_request_access_enabled_to_projects.rb
+++ b/db/migrate/20160715154212_add_request_access_enabled_to_projects.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/UpdateLargeTable
-class AddRequestAccessEnabledToProjects < ActiveRecord::Migration
+class AddRequestAccessEnabledToProjects < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20160715204316_add_request_access_enabled_to_groups.rb b/db/migrate/20160715204316_add_request_access_enabled_to_groups.rb
index 4fcb29e1325..14065434523 100644
--- a/db/migrate/20160715204316_add_request_access_enabled_to_groups.rb
+++ b/db/migrate/20160715204316_add_request_access_enabled_to_groups.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/UpdateLargeTable
-class AddRequestAccessEnabledToGroups < ActiveRecord::Migration
+class AddRequestAccessEnabledToGroups < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20160715230841_rename_application_settings_restricted_signup_domains.rb b/db/migrate/20160715230841_rename_application_settings_restricted_signup_domains.rb
index dd15704800a..6a2674fb604 100644
--- a/db/migrate/20160715230841_rename_application_settings_restricted_signup_domains.rb
+++ b/db/migrate/20160715230841_rename_application_settings_restricted_signup_domains.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RenameApplicationSettingsRestrictedSignupDomains < ActiveRecord::Migration
+class RenameApplicationSettingsRestrictedSignupDomains < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# When using the methods "add_concurrent_index" or "add_column_with_default"
diff --git a/db/migrate/20160716115710_add_when_and_yaml_variables_to_ci_builds.rb b/db/migrate/20160716115710_add_when_and_yaml_variables_to_ci_builds.rb
index 3e084023a65..d403b0a3cc9 100644
--- a/db/migrate/20160716115710_add_when_and_yaml_variables_to_ci_builds.rb
+++ b/db/migrate/20160716115710_add_when_and_yaml_variables_to_ci_builds.rb
@@ -1,4 +1,4 @@
-class AddWhenAndYamlVariablesToCiBuilds < ActiveRecord::Migration
+class AddWhenAndYamlVariablesToCiBuilds < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
def change
diff --git a/db/migrate/20160716115711_add_queued_at_to_ci_builds.rb b/db/migrate/20160716115711_add_queued_at_to_ci_builds.rb
index fd7a48d881e..2bb9a30e3a3 100644
--- a/db/migrate/20160716115711_add_queued_at_to_ci_builds.rb
+++ b/db/migrate/20160716115711_add_queued_at_to_ci_builds.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/Datetime
-class AddQueuedAtToCiBuilds < ActiveRecord::Migration
+class AddQueuedAtToCiBuilds < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160718153603_add_has_external_wiki_to_projects.rb b/db/migrate/20160718153603_add_has_external_wiki_to_projects.rb
index 55a3e954292..e3e4afaf512 100644
--- a/db/migrate/20160718153603_add_has_external_wiki_to_projects.rb
+++ b/db/migrate/20160718153603_add_has_external_wiki_to_projects.rb
@@ -1,4 +1,4 @@
-class AddHasExternalWikiToProjects < ActiveRecord::Migration
+class AddHasExternalWikiToProjects < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
def change
diff --git a/db/migrate/20160721081015_drop_and_readd_has_external_wiki_in_projects.rb b/db/migrate/20160721081015_drop_and_readd_has_external_wiki_in_projects.rb
index 58f7f2a2841..d31bbb22392 100644
--- a/db/migrate/20160721081015_drop_and_readd_has_external_wiki_in_projects.rb
+++ b/db/migrate/20160721081015_drop_and_readd_has_external_wiki_in_projects.rb
@@ -1,6 +1,6 @@
# rubocop:disable Migration/UpdateLargeTable
# rubocop:disable Migration/UpdateColumnInBatches
-class DropAndReaddHasExternalWikiInProjects < ActiveRecord::Migration
+class DropAndReaddHasExternalWikiInProjects < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20160722221922_nullify_blank_type_on_notes.rb b/db/migrate/20160722221922_nullify_blank_type_on_notes.rb
index c4b78e8e15c..83ca5c1e6ec 100644
--- a/db/migrate/20160722221922_nullify_blank_type_on_notes.rb
+++ b/db/migrate/20160722221922_nullify_blank_type_on_notes.rb
@@ -1,4 +1,4 @@
-class NullifyBlankTypeOnNotes < ActiveRecord::Migration
+class NullifyBlankTypeOnNotes < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160724205507_add_resolved_to_notes.rb b/db/migrate/20160724205507_add_resolved_to_notes.rb
index 3aca272a3f7..fc56d3b1452 100644
--- a/db/migrate/20160724205507_add_resolved_to_notes.rb
+++ b/db/migrate/20160724205507_add_resolved_to_notes.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/Datetime
-class AddResolvedToNotes < ActiveRecord::Migration
+class AddResolvedToNotes < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160725083350_add_external_url_to_enviroments.rb b/db/migrate/20160725083350_add_external_url_to_enviroments.rb
index 21a8abd310b..e060c6a8499 100644
--- a/db/migrate/20160725083350_add_external_url_to_enviroments.rb
+++ b/db/migrate/20160725083350_add_external_url_to_enviroments.rb
@@ -1,4 +1,4 @@
-class AddExternalUrlToEnviroments < ActiveRecord::Migration
+class AddExternalUrlToEnviroments < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160725104020_merge_request_diff_remove_uniq.rb b/db/migrate/20160725104020_merge_request_diff_remove_uniq.rb
index 12e11bc3fbe..d8b4696a246 100644
--- a/db/migrate/20160725104020_merge_request_diff_remove_uniq.rb
+++ b/db/migrate/20160725104020_merge_request_diff_remove_uniq.rb
@@ -2,7 +2,7 @@
# for more information on how to write migrations for GitLab.
# rubocop:disable RemoveIndex
-class MergeRequestDiffRemoveUniq < ActiveRecord::Migration
+class MergeRequestDiffRemoveUniq < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20160725104452_merge_request_diff_add_index.rb b/db/migrate/20160725104452_merge_request_diff_add_index.rb
index 60d81e0bdc0..d3369b3f961 100644
--- a/db/migrate/20160725104452_merge_request_diff_add_index.rb
+++ b/db/migrate/20160725104452_merge_request_diff_add_index.rb
@@ -1,5 +1,5 @@
# rubocop:disable RemoveIndex
-class MergeRequestDiffAddIndex < ActiveRecord::Migration
+class MergeRequestDiffAddIndex < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20160727163552_create_user_agent_details.rb b/db/migrate/20160727163552_create_user_agent_details.rb
index 3eb36f8464f..6ef54deca90 100644
--- a/db/migrate/20160727163552_create_user_agent_details.rb
+++ b/db/migrate/20160727163552_create_user_agent_details.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/Timestamps
-class CreateUserAgentDetails < ActiveRecord::Migration
+class CreateUserAgentDetails < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20160727191041_create_boards.rb b/db/migrate/20160727191041_create_boards.rb
index 9ec8df1b8e8..60ed5508b10 100644
--- a/db/migrate/20160727191041_create_boards.rb
+++ b/db/migrate/20160727191041_create_boards.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/Timestamps
-class CreateBoards < ActiveRecord::Migration
+class CreateBoards < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160727193336_create_lists.rb b/db/migrate/20160727193336_create_lists.rb
index 3fd95dc8cfc..4591c9a120f 100644
--- a/db/migrate/20160727193336_create_lists.rb
+++ b/db/migrate/20160727193336_create_lists.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/Timestamps
-class CreateLists < ActiveRecord::Migration
+class CreateLists < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160728081025_add_pipeline_events_to_web_hooks.rb b/db/migrate/20160728081025_add_pipeline_events_to_web_hooks.rb
index b800e6d7283..fc3e9f03c74 100644
--- a/db/migrate/20160728081025_add_pipeline_events_to_web_hooks.rb
+++ b/db/migrate/20160728081025_add_pipeline_events_to_web_hooks.rb
@@ -1,4 +1,4 @@
-class AddPipelineEventsToWebHooks < ActiveRecord::Migration
+class AddPipelineEventsToWebHooks < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160728103734_add_pipeline_events_to_services.rb b/db/migrate/20160728103734_add_pipeline_events_to_services.rb
index bcd24fe1566..421859ff5fd 100644
--- a/db/migrate/20160728103734_add_pipeline_events_to_services.rb
+++ b/db/migrate/20160728103734_add_pipeline_events_to_services.rb
@@ -1,4 +1,4 @@
-class AddPipelineEventsToServices < ActiveRecord::Migration
+class AddPipelineEventsToServices < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160729173930_remove_project_id_from_spam_logs.rb b/db/migrate/20160729173930_remove_project_id_from_spam_logs.rb
index baf254c3bcc..02e417e376f 100644
--- a/db/migrate/20160729173930_remove_project_id_from_spam_logs.rb
+++ b/db/migrate/20160729173930_remove_project_id_from_spam_logs.rb
@@ -2,7 +2,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RemoveProjectIdFromSpamLogs < ActiveRecord::Migration
+class RemoveProjectIdFromSpamLogs < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20160801163421_add_expires_at_to_member.rb b/db/migrate/20160801163421_add_expires_at_to_member.rb
index 8db0fc60c4b..13ca1d04658 100644
--- a/db/migrate/20160801163421_add_expires_at_to_member.rb
+++ b/db/migrate/20160801163421_add_expires_at_to_member.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddExpiresAtToMember < ActiveRecord::Migration
+class AddExpiresAtToMember < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20160801163709_add_submitted_as_ham_to_spam_logs.rb b/db/migrate/20160801163709_add_submitted_as_ham_to_spam_logs.rb
index 20a77000ba8..fde9dee980e 100644
--- a/db/migrate/20160801163709_add_submitted_as_ham_to_spam_logs.rb
+++ b/db/migrate/20160801163709_add_submitted_as_ham_to_spam_logs.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddSubmittedAsHamToSpamLogs < ActiveRecord::Migration
+class AddSubmittedAsHamToSpamLogs < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20160802010328_remove_builds_enable_index_on_projects.rb b/db/migrate/20160802010328_remove_builds_enable_index_on_projects.rb
index 6d7733762c8..4ad740e0812 100644
--- a/db/migrate/20160802010328_remove_builds_enable_index_on_projects.rb
+++ b/db/migrate/20160802010328_remove_builds_enable_index_on_projects.rb
@@ -1,5 +1,5 @@
# rubocop:disable RemoveIndex
-class RemoveBuildsEnableIndexOnProjects < ActiveRecord::Migration
+class RemoveBuildsEnableIndexOnProjects < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160803161903_add_unique_index_to_lists_label_id.rb b/db/migrate/20160803161903_add_unique_index_to_lists_label_id.rb
index 9c1511963f7..f866fe15ec1 100644
--- a/db/migrate/20160803161903_add_unique_index_to_lists_label_id.rb
+++ b/db/migrate/20160803161903_add_unique_index_to_lists_label_id.rb
@@ -1,5 +1,5 @@
# rubocop:disable RemoveIndex
-class AddUniqueIndexToListsLabelId < ActiveRecord::Migration
+class AddUniqueIndexToListsLabelId < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160804142904_add_ci_config_file_to_project.rb b/db/migrate/20160804142904_add_ci_config_file_to_project.rb
index 341ae555c1b..abd94e63db3 100644
--- a/db/migrate/20160804142904_add_ci_config_file_to_project.rb
+++ b/db/migrate/20160804142904_add_ci_config_file_to_project.rb
@@ -1,4 +1,4 @@
-class AddCiConfigFileToProject < ActiveRecord::Migration
+class AddCiConfigFileToProject < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20160804150737_add_timestamps_to_members_again.rb b/db/migrate/20160804150737_add_timestamps_to_members_again.rb
index 6691ba57fbb..4e71197b8e7 100644
--- a/db/migrate/20160804150737_add_timestamps_to_members_again.rb
+++ b/db/migrate/20160804150737_add_timestamps_to_members_again.rb
@@ -6,7 +6,7 @@
#
# Why this happened is lost in the mists of time, so repeat the SQL query
# without speculation, just in case more than one person was affected.
-class AddTimestampsToMembersAgain < ActiveRecord::Migration
+class AddTimestampsToMembersAgain < ActiveRecord::Migration[4.2]
DOWNTIME = false
def up
diff --git a/db/migrate/20160805041956_add_deleted_at_to_namespaces.rb b/db/migrate/20160805041956_add_deleted_at_to_namespaces.rb
index 404c253e18b..a0dfa3259ec 100644
--- a/db/migrate/20160805041956_add_deleted_at_to_namespaces.rb
+++ b/db/migrate/20160805041956_add_deleted_at_to_namespaces.rb
@@ -1,6 +1,6 @@
# rubocop:disable Migration/Datetime
# rubocop:disable RemoveIndex
-class AddDeletedAtToNamespaces < ActiveRecord::Migration
+class AddDeletedAtToNamespaces < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160808085531_add_token_to_build.rb b/db/migrate/20160808085531_add_token_to_build.rb
index 3ed2a103ae3..a1d8945a538 100644
--- a/db/migrate/20160808085531_add_token_to_build.rb
+++ b/db/migrate/20160808085531_add_token_to_build.rb
@@ -1,4 +1,4 @@
-class AddTokenToBuild < ActiveRecord::Migration
+class AddTokenToBuild < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20160808085602_add_index_for_build_token.rb b/db/migrate/20160808085602_add_index_for_build_token.rb
index 0446b2f2e15..22d50e4165a 100644
--- a/db/migrate/20160808085602_add_index_for_build_token.rb
+++ b/db/migrate/20160808085602_add_index_for_build_token.rb
@@ -1,5 +1,5 @@
# rubocop:disable RemoveIndex
-class AddIndexForBuildToken < ActiveRecord::Migration
+class AddIndexForBuildToken < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20160810102349_remove_ci_runner_trigram_indexes.rb b/db/migrate/20160810102349_remove_ci_runner_trigram_indexes.rb
index 0cfb637804b..738b93912b6 100644
--- a/db/migrate/20160810102349_remove_ci_runner_trigram_indexes.rb
+++ b/db/migrate/20160810102349_remove_ci_runner_trigram_indexes.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RemoveCiRunnerTrigramIndexes < ActiveRecord::Migration
+class RemoveCiRunnerTrigramIndexes < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160810142633_remove_redundant_indexes.rb b/db/migrate/20160810142633_remove_redundant_indexes.rb
index ea7d1f9a436..91f82cf9afa 100644
--- a/db/migrate/20160810142633_remove_redundant_indexes.rb
+++ b/db/migrate/20160810142633_remove_redundant_indexes.rb
@@ -2,7 +2,7 @@
# for more information on how to write migrations for GitLab.
# rubocop:disable RemoveIndex
-class RemoveRedundantIndexes < ActiveRecord::Migration
+class RemoveRedundantIndexes < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160811172945_add_can_push_to_keys.rb b/db/migrate/20160811172945_add_can_push_to_keys.rb
index 5fd303fe8fb..2e78ab0249e 100644
--- a/db/migrate/20160811172945_add_can_push_to_keys.rb
+++ b/db/migrate/20160811172945_add_can_push_to_keys.rb
@@ -1,4 +1,4 @@
-class AddCanPushToKeys < ActiveRecord::Migration
+class AddCanPushToKeys < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20160816161312_add_column_name_to_u2f_registrations.rb b/db/migrate/20160816161312_add_column_name_to_u2f_registrations.rb
index 7152bd04331..76b60787323 100644
--- a/db/migrate/20160816161312_add_column_name_to_u2f_registrations.rb
+++ b/db/migrate/20160816161312_add_column_name_to_u2f_registrations.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddColumnNameToU2fRegistrations < ActiveRecord::Migration
+class AddColumnNameToU2fRegistrations < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20160817133006_add_koding_to_application_settings.rb b/db/migrate/20160817133006_add_koding_to_application_settings.rb
index 46120652d8e..04f9d7be29b 100644
--- a/db/migrate/20160817133006_add_koding_to_application_settings.rb
+++ b/db/migrate/20160817133006_add_koding_to_application_settings.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/SaferBooleanColumn
-class AddKodingToApplicationSettings < ActiveRecord::Migration
+class AddKodingToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160817154936_add_discussion_ids_to_notes.rb b/db/migrate/20160817154936_add_discussion_ids_to_notes.rb
index 61facce665a..e735eeadac5 100644
--- a/db/migrate/20160817154936_add_discussion_ids_to_notes.rb
+++ b/db/migrate/20160817154936_add_discussion_ids_to_notes.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddDiscussionIdsToNotes < ActiveRecord::Migration
+class AddDiscussionIdsToNotes < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160818205718_add_expires_at_to_project_group_links.rb b/db/migrate/20160818205718_add_expires_at_to_project_group_links.rb
index 0ed538b0df8..06f621c6c2e 100644
--- a/db/migrate/20160818205718_add_expires_at_to_project_group_links.rb
+++ b/db/migrate/20160818205718_add_expires_at_to_project_group_links.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddExpiresAtToProjectGroupLinks < ActiveRecord::Migration
+class AddExpiresAtToProjectGroupLinks < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20160819221631_add_index_to_note_discussion_id.rb b/db/migrate/20160819221631_add_index_to_note_discussion_id.rb
index 843643c4e95..1dbc0474fd2 100644
--- a/db/migrate/20160819221631_add_index_to_note_discussion_id.rb
+++ b/db/migrate/20160819221631_add_index_to_note_discussion_id.rb
@@ -2,7 +2,7 @@
# for more information on how to write migrations for GitLab.
# rubocop:disable RemoveIndex
-class AddIndexToNoteDiscussionId < ActiveRecord::Migration
+class AddIndexToNoteDiscussionId < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160819221833_reset_diff_note_discussion_id_because_it_was_calculated_wrongly.rb b/db/migrate/20160819221833_reset_diff_note_discussion_id_because_it_was_calculated_wrongly.rb
index 0c68cf01900..61f593a52c5 100644
--- a/db/migrate/20160819221833_reset_diff_note_discussion_id_because_it_was_calculated_wrongly.rb
+++ b/db/migrate/20160819221833_reset_diff_note_discussion_id_because_it_was_calculated_wrongly.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class ResetDiffNoteDiscussionIdBecauseItWasCalculatedWrongly < ActiveRecord::Migration
+class ResetDiffNoteDiscussionIdBecauseItWasCalculatedWrongly < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160819232256_add_incoming_email_token_to_users.rb b/db/migrate/20160819232256_add_incoming_email_token_to_users.rb
index a004a3802a2..0a7190f632d 100644
--- a/db/migrate/20160819232256_add_incoming_email_token_to_users.rb
+++ b/db/migrate/20160819232256_add_incoming_email_token_to_users.rb
@@ -2,7 +2,7 @@
# for more information on how to write migrations for GitLab.
# rubocop:disable RemoveIndex
-class AddIncomingEmailTokenToUsers < ActiveRecord::Migration
+class AddIncomingEmailTokenToUsers < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20160823081327_change_merge_error_to_text.rb b/db/migrate/20160823081327_change_merge_error_to_text.rb
index 7920389cd83..23b4f35a776 100644
--- a/db/migrate/20160823081327_change_merge_error_to_text.rb
+++ b/db/migrate/20160823081327_change_merge_error_to_text.rb
@@ -1,4 +1,4 @@
-class ChangeMergeErrorToText < ActiveRecord::Migration
+class ChangeMergeErrorToText < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
diff --git a/db/migrate/20160823083941_add_column_scopes_to_personal_access_tokens.rb b/db/migrate/20160823083941_add_column_scopes_to_personal_access_tokens.rb
index 91479de840b..4c320123088 100644
--- a/db/migrate/20160823083941_add_column_scopes_to_personal_access_tokens.rb
+++ b/db/migrate/20160823083941_add_column_scopes_to_personal_access_tokens.rb
@@ -2,7 +2,7 @@
# It's easier to achieve this by adding the column with the `['api']` default, and then changing the default to
# `[]`.
-class AddColumnScopesToPersonalAccessTokens < ActiveRecord::Migration
+class AddColumnScopesToPersonalAccessTokens < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160823213309_add_lfs_enabled_to_projects.rb b/db/migrate/20160823213309_add_lfs_enabled_to_projects.rb
index c169084e976..87e6e8b6945 100644
--- a/db/migrate/20160823213309_add_lfs_enabled_to_projects.rb
+++ b/db/migrate/20160823213309_add_lfs_enabled_to_projects.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddLfsEnabledToProjects < ActiveRecord::Migration
+class AddLfsEnabledToProjects < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20160824103857_drop_unused_ci_tables.rb b/db/migrate/20160824103857_drop_unused_ci_tables.rb
index 65cf46308d9..8a207683848 100644
--- a/db/migrate/20160824103857_drop_unused_ci_tables.rb
+++ b/db/migrate/20160824103857_drop_unused_ci_tables.rb
@@ -1,4 +1,4 @@
-class DropUnusedCiTables < ActiveRecord::Migration
+class DropUnusedCiTables < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20160824124900_add_table_issue_metrics.rb b/db/migrate/20160824124900_add_table_issue_metrics.rb
index 49be8bc949b..4f34f377e22 100644
--- a/db/migrate/20160824124900_add_table_issue_metrics.rb
+++ b/db/migrate/20160824124900_add_table_issue_metrics.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
# rubocop:disable Migration/Timestamps
-class AddTableIssueMetrics < ActiveRecord::Migration
+class AddTableIssueMetrics < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20160825052008_add_table_merge_request_metrics.rb b/db/migrate/20160825052008_add_table_merge_request_metrics.rb
index 3c9dcc08190..150f698869d 100644
--- a/db/migrate/20160825052008_add_table_merge_request_metrics.rb
+++ b/db/migrate/20160825052008_add_table_merge_request_metrics.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
# rubocop:disable Migration/Timestamps
-class AddTableMergeRequestMetrics < ActiveRecord::Migration
+class AddTableMergeRequestMetrics < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20160827011312_ensure_lock_version_has_no_default.rb b/db/migrate/20160827011312_ensure_lock_version_has_no_default.rb
index 7c55bc23cf2..18c0f0be3eb 100644
--- a/db/migrate/20160827011312_ensure_lock_version_has_no_default.rb
+++ b/db/migrate/20160827011312_ensure_lock_version_has_no_default.rb
@@ -1,4 +1,4 @@
-class EnsureLockVersionHasNoDefault < ActiveRecord::Migration
+class EnsureLockVersionHasNoDefault < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160829114652_add_markdown_cache_columns.rb b/db/migrate/20160829114652_add_markdown_cache_columns.rb
index 6ad7237f4cd..b1c5e38c3c4 100644
--- a/db/migrate/20160829114652_add_markdown_cache_columns.rb
+++ b/db/migrate/20160829114652_add_markdown_cache_columns.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddMarkdownCacheColumns < ActiveRecord::Migration
+class AddMarkdownCacheColumns < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20160830203109_add_confidential_issues_events_to_web_hooks.rb b/db/migrate/20160830203109_add_confidential_issues_events_to_web_hooks.rb
index a27947212f6..771a6b84648 100644
--- a/db/migrate/20160830203109_add_confidential_issues_events_to_web_hooks.rb
+++ b/db/migrate/20160830203109_add_confidential_issues_events_to_web_hooks.rb
@@ -1,4 +1,4 @@
-class AddConfidentialIssuesEventsToWebHooks < ActiveRecord::Migration
+class AddConfidentialIssuesEventsToWebHooks < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160830211132_add_confidential_issues_events_to_services.rb b/db/migrate/20160830211132_add_confidential_issues_events_to_services.rb
index 030e7c39350..a1807264341 100644
--- a/db/migrate/20160830211132_add_confidential_issues_events_to_services.rb
+++ b/db/migrate/20160830211132_add_confidential_issues_events_to_services.rb
@@ -1,4 +1,4 @@
-class AddConfidentialIssuesEventsToServices < ActiveRecord::Migration
+class AddConfidentialIssuesEventsToServices < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160830232601_change_lock_version_not_null.rb b/db/migrate/20160830232601_change_lock_version_not_null.rb
index 01c58ed5bdc..1e34b57e53f 100644
--- a/db/migrate/20160830232601_change_lock_version_not_null.rb
+++ b/db/migrate/20160830232601_change_lock_version_not_null.rb
@@ -1,4 +1,4 @@
-class ChangeLockVersionNotNull < ActiveRecord::Migration
+class ChangeLockVersionNotNull < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160831214002_create_project_features.rb b/db/migrate/20160831214002_create_project_features.rb
index 7ac6c8ec654..e1e61c3a4a2 100644
--- a/db/migrate/20160831214002_create_project_features.rb
+++ b/db/migrate/20160831214002_create_project_features.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/Timestamps
-class CreateProjectFeatures < ActiveRecord::Migration
+class CreateProjectFeatures < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20160831214543_migrate_project_features.rb b/db/migrate/20160831214543_migrate_project_features.rb
index 79a5fb29d64..ba7ffd7c9f2 100644
--- a/db/migrate/20160831214543_migrate_project_features.rb
+++ b/db/migrate/20160831214543_migrate_project_features.rb
@@ -1,4 +1,4 @@
-class MigrateProjectFeatures < ActiveRecord::Migration
+class MigrateProjectFeatures < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
diff --git a/db/migrate/20160831223750_remove_features_enabled_from_projects.rb b/db/migrate/20160831223750_remove_features_enabled_from_projects.rb
index 9eafd8b9477..6d39d42882b 100644
--- a/db/migrate/20160831223750_remove_features_enabled_from_projects.rb
+++ b/db/migrate/20160831223750_remove_features_enabled_from_projects.rb
@@ -3,7 +3,7 @@
# for more information on how to write migrations for GitLab.
# rubocop:disable Migration/UpdateLargeTable
-class RemoveFeaturesEnabledFromProjects < ActiveRecord::Migration
+class RemoveFeaturesEnabledFromProjects < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20160901141443_set_confidential_issues_events_on_webhooks.rb b/db/migrate/20160901141443_set_confidential_issues_events_on_webhooks.rb
index f8486e3e1a6..2921bb566c9 100644
--- a/db/migrate/20160901141443_set_confidential_issues_events_on_webhooks.rb
+++ b/db/migrate/20160901141443_set_confidential_issues_events_on_webhooks.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/UpdateColumnInBatches
-class SetConfidentialIssuesEventsOnWebhooks < ActiveRecord::Migration
+class SetConfidentialIssuesEventsOnWebhooks < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160901213340_add_lfs_enabled_to_namespaces.rb b/db/migrate/20160901213340_add_lfs_enabled_to_namespaces.rb
index fd413d1ca8c..1be5f3f6ab0 100644
--- a/db/migrate/20160901213340_add_lfs_enabled_to_namespaces.rb
+++ b/db/migrate/20160901213340_add_lfs_enabled_to_namespaces.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddLfsEnabledToNamespaces < ActiveRecord::Migration
+class AddLfsEnabledToNamespaces < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160902122721_drop_gitorious_field_from_application_settings.rb b/db/migrate/20160902122721_drop_gitorious_field_from_application_settings.rb
index a80a57254dd..6c2dc58876e 100644
--- a/db/migrate/20160902122721_drop_gitorious_field_from_application_settings.rb
+++ b/db/migrate/20160902122721_drop_gitorious_field_from_application_settings.rb
@@ -1,4 +1,4 @@
-class DropGitoriousFieldFromApplicationSettings < ActiveRecord::Migration
+class DropGitoriousFieldFromApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# After the deploy the caches will be cold anyway
diff --git a/db/migrate/20160907131111_add_environment_type_to_environments.rb b/db/migrate/20160907131111_add_environment_type_to_environments.rb
index fac73753d5b..34463178fca 100644
--- a/db/migrate/20160907131111_add_environment_type_to_environments.rb
+++ b/db/migrate/20160907131111_add_environment_type_to_environments.rb
@@ -1,4 +1,4 @@
-class AddEnvironmentTypeToEnvironments < ActiveRecord::Migration
+class AddEnvironmentTypeToEnvironments < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160913162434_remove_projects_pushes_since_gc.rb b/db/migrate/20160913162434_remove_projects_pushes_since_gc.rb
index f32167037e0..51650c68170 100644
--- a/db/migrate/20160913162434_remove_projects_pushes_since_gc.rb
+++ b/db/migrate/20160913162434_remove_projects_pushes_since_gc.rb
@@ -3,7 +3,7 @@
# for more information on how to write migrations for GitLab.
# rubocop:disable Migration/UpdateLargeTable
-class RemoveProjectsPushesSinceGc < ActiveRecord::Migration
+class RemoveProjectsPushesSinceGc < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
diff --git a/db/migrate/20160913212128_change_artifacts_size_column.rb b/db/migrate/20160913212128_change_artifacts_size_column.rb
index 063bbca537c..f2c2aaff9a8 100644
--- a/db/migrate/20160913212128_change_artifacts_size_column.rb
+++ b/db/migrate/20160913212128_change_artifacts_size_column.rb
@@ -1,4 +1,4 @@
-class ChangeArtifactsSizeColumn < ActiveRecord::Migration
+class ChangeArtifactsSizeColumn < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
diff --git a/db/migrate/20160914131004_only_allow_merge_if_all_discussions_are_resolved.rb b/db/migrate/20160914131004_only_allow_merge_if_all_discussions_are_resolved.rb
index 4da5ec9bd28..81511f9861b 100644
--- a/db/migrate/20160914131004_only_allow_merge_if_all_discussions_are_resolved.rb
+++ b/db/migrate/20160914131004_only_allow_merge_if_all_discussions_are_resolved.rb
@@ -1,4 +1,4 @@
-class OnlyAllowMergeIfAllDiscussionsAreResolved < ActiveRecord::Migration
+class OnlyAllowMergeIfAllDiscussionsAreResolved < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160915042921_create_merge_requests_closing_issues.rb b/db/migrate/20160915042921_create_merge_requests_closing_issues.rb
index 10c5604bb5c..3efe8c8901b 100644
--- a/db/migrate/20160915042921_create_merge_requests_closing_issues.rb
+++ b/db/migrate/20160915042921_create_merge_requests_closing_issues.rb
@@ -2,7 +2,7 @@
# for more information on how to write migrations for GitLab.
# rubocop:disable Migration/Timestamps
-class CreateMergeRequestsClosingIssues < ActiveRecord::Migration
+class CreateMergeRequestsClosingIssues < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20160919144305_add_type_to_labels.rb b/db/migrate/20160919144305_add_type_to_labels.rb
index d08b339cd27..f897646d264 100644
--- a/db/migrate/20160919144305_add_type_to_labels.rb
+++ b/db/migrate/20160919144305_add_type_to_labels.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/UpdateColumnInBatches
-class AddTypeToLabels < ActiveRecord::Migration
+class AddTypeToLabels < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
diff --git a/db/migrate/20160919145149_add_group_id_to_labels.rb b/db/migrate/20160919145149_add_group_id_to_labels.rb
index 917c2b0c521..df11a2fc4c8 100644
--- a/db/migrate/20160919145149_add_group_id_to_labels.rb
+++ b/db/migrate/20160919145149_add_group_id_to_labels.rb
@@ -1,5 +1,5 @@
# rubocop:disable RemoveIndex
-class AddGroupIdToLabels < ActiveRecord::Migration
+class AddGroupIdToLabels < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160920160832_add_index_to_labels_title.rb b/db/migrate/20160920160832_add_index_to_labels_title.rb
index e38c655baee..e6c87836d4e 100644
--- a/db/migrate/20160920160832_add_index_to_labels_title.rb
+++ b/db/migrate/20160920160832_add_index_to_labels_title.rb
@@ -1,5 +1,5 @@
# rubocop:disable RemoveIndex
-class AddIndexToLabelsTitle < ActiveRecord::Migration
+class AddIndexToLabelsTitle < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20160926145521_add_organization_to_user.rb b/db/migrate/20160926145521_add_organization_to_user.rb
index e0bef6e7548..2d8d907591d 100644
--- a/db/migrate/20160926145521_add_organization_to_user.rb
+++ b/db/migrate/20160926145521_add_organization_to_user.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddOrganizationToUser < ActiveRecord::Migration
+class AddOrganizationToUser < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20161006104309_add_state_to_environment.rb b/db/migrate/20161006104309_add_state_to_environment.rb
index ccb546654f9..c51dada9bca 100644
--- a/db/migrate/20161006104309_add_state_to_environment.rb
+++ b/db/migrate/20161006104309_add_state_to_environment.rb
@@ -1,4 +1,4 @@
-class AddStateToEnvironment < ActiveRecord::Migration
+class AddStateToEnvironment < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20161007073613_create_user_activities.rb b/db/migrate/20161007073613_create_user_activities.rb
index 1d694e777a1..be3ecb17eef 100644
--- a/db/migrate/20161007073613_create_user_activities.rb
+++ b/db/migrate/20161007073613_create_user_activities.rb
@@ -1,4 +1,4 @@
-class CreateUserActivities < ActiveRecord::Migration
+class CreateUserActivities < ActiveRecord::Migration[4.2]
DOWNTIME = false
# This migration is a no-op. It just exists to match EE.
diff --git a/db/migrate/20161007133303_precalculate_trending_projects.rb b/db/migrate/20161007133303_precalculate_trending_projects.rb
index b324cd94268..c7a678c9d8f 100644
--- a/db/migrate/20161007133303_precalculate_trending_projects.rb
+++ b/db/migrate/20161007133303_precalculate_trending_projects.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class PrecalculateTrendingProjects < ActiveRecord::Migration
+class PrecalculateTrendingProjects < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20161010142410_create_project_authorizations.rb b/db/migrate/20161010142410_create_project_authorizations.rb
index e095ab969f8..b340a4ece19 100644
--- a/db/migrate/20161010142410_create_project_authorizations.rb
+++ b/db/migrate/20161010142410_create_project_authorizations.rb
@@ -1,4 +1,4 @@
-class CreateProjectAuthorizations < ActiveRecord::Migration
+class CreateProjectAuthorizations < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20161012180455_add_repository_access_level_to_project_feature.rb b/db/migrate/20161012180455_add_repository_access_level_to_project_feature.rb
index 7b33da3ea11..3024ea81ed8 100644
--- a/db/migrate/20161012180455_add_repository_access_level_to_project_feature.rb
+++ b/db/migrate/20161012180455_add_repository_access_level_to_project_feature.rb
@@ -1,4 +1,4 @@
-class AddRepositoryAccessLevelToProjectFeature < ActiveRecord::Migration
+class AddRepositoryAccessLevelToProjectFeature < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20161014173530_create_label_priorities.rb b/db/migrate/20161014173530_create_label_priorities.rb
index 28937c81e02..c7d60caa7d1 100644
--- a/db/migrate/20161014173530_create_label_priorities.rb
+++ b/db/migrate/20161014173530_create_label_priorities.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/Timestamps
-class CreateLabelPriorities < ActiveRecord::Migration
+class CreateLabelPriorities < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
diff --git a/db/migrate/20161017091941_add_authorized_projects_populated_to_users.rb b/db/migrate/20161017091941_add_authorized_projects_populated_to_users.rb
index 8f6be9dd677..11f4fa1a1f7 100644
--- a/db/migrate/20161017091941_add_authorized_projects_populated_to_users.rb
+++ b/db/migrate/20161017091941_add_authorized_projects_populated_to_users.rb
@@ -1,4 +1,4 @@
-class AddAuthorizedProjectsPopulatedToUsers < ActiveRecord::Migration
+class AddAuthorizedProjectsPopulatedToUsers < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20161017095000_add_properties_to_deployment.rb b/db/migrate/20161017095000_add_properties_to_deployment.rb
index f620ee0de1c..31bd4cd24ad 100644
--- a/db/migrate/20161017095000_add_properties_to_deployment.rb
+++ b/db/migrate/20161017095000_add_properties_to_deployment.rb
@@ -1,4 +1,4 @@
-class AddPropertiesToDeployment < ActiveRecord::Migration
+class AddPropertiesToDeployment < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20161017125927_add_unique_index_to_labels.rb b/db/migrate/20161017125927_add_unique_index_to_labels.rb
index fcdd79d3b02..b5326789f52 100644
--- a/db/migrate/20161017125927_add_unique_index_to_labels.rb
+++ b/db/migrate/20161017125927_add_unique_index_to_labels.rb
@@ -1,5 +1,5 @@
# rubocop:disable RemoveIndex
-class AddUniqueIndexToLabels < ActiveRecord::Migration
+class AddUniqueIndexToLabels < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
diff --git a/db/migrate/20161018024215_migrate_labels_priority.rb b/db/migrate/20161018024215_migrate_labels_priority.rb
index 22bec2382f4..3e2540c134c 100644
--- a/db/migrate/20161018024215_migrate_labels_priority.rb
+++ b/db/migrate/20161018024215_migrate_labels_priority.rb
@@ -1,4 +1,4 @@
-class MigrateLabelsPriority < ActiveRecord::Migration
+class MigrateLabelsPriority < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
diff --git a/db/migrate/20161018024550_remove_priority_from_labels.rb b/db/migrate/20161018024550_remove_priority_from_labels.rb
index bc25a43526c..e164d959bdf 100644
--- a/db/migrate/20161018024550_remove_priority_from_labels.rb
+++ b/db/migrate/20161018024550_remove_priority_from_labels.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/RemoveColumn
-class RemovePriorityFromLabels < ActiveRecord::Migration
+class RemovePriorityFromLabels < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
diff --git a/db/migrate/20161018124658_make_project_owners_masters.rb b/db/migrate/20161018124658_make_project_owners_masters.rb
index cb93b449067..132c17388dc 100644
--- a/db/migrate/20161018124658_make_project_owners_masters.rb
+++ b/db/migrate/20161018124658_make_project_owners_masters.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/UpdateColumnInBatches
-class MakeProjectOwnersMasters < ActiveRecord::Migration
+class MakeProjectOwnersMasters < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20161019190736_migrate_sidekiq_queues_from_default.rb b/db/migrate/20161019190736_migrate_sidekiq_queues_from_default.rb
index 9f502a8df73..fc6d9784638 100644
--- a/db/migrate/20161019190736_migrate_sidekiq_queues_from_default.rb
+++ b/db/migrate/20161019190736_migrate_sidekiq_queues_from_default.rb
@@ -3,7 +3,7 @@ require 'json'
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class MigrateSidekiqQueuesFromDefault < ActiveRecord::Migration
+class MigrateSidekiqQueuesFromDefault < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
diff --git a/db/migrate/20161019213545_generate_project_feature_for_projects.rb b/db/migrate/20161019213545_generate_project_feature_for_projects.rb
index 4554e14b0df..587bdf60f70 100644
--- a/db/migrate/20161019213545_generate_project_feature_for_projects.rb
+++ b/db/migrate/20161019213545_generate_project_feature_for_projects.rb
@@ -1,4 +1,4 @@
-class GenerateProjectFeatureForProjects < ActiveRecord::Migration
+class GenerateProjectFeatureForProjects < ActiveRecord::Migration[4.2]
DOWNTIME = true
DOWNTIME_REASON = <<-HEREDOC
diff --git a/db/migrate/20161020075734_default_request_access_groups.rb b/db/migrate/20161020075734_default_request_access_groups.rb
index 9721cc88724..72aec86167e 100644
--- a/db/migrate/20161020075734_default_request_access_groups.rb
+++ b/db/migrate/20161020075734_default_request_access_groups.rb
@@ -1,4 +1,4 @@
-class DefaultRequestAccessGroups < ActiveRecord::Migration
+class DefaultRequestAccessGroups < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20161020075830_default_request_access_projects.rb b/db/migrate/20161020075830_default_request_access_projects.rb
index a3a53350e8d..b457e39f838 100644
--- a/db/migrate/20161020075830_default_request_access_projects.rb
+++ b/db/migrate/20161020075830_default_request_access_projects.rb
@@ -1,4 +1,4 @@
-class DefaultRequestAccessProjects < ActiveRecord::Migration
+class DefaultRequestAccessProjects < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20161020083353_add_pipeline_id_to_merge_request_metrics.rb b/db/migrate/20161020083353_add_pipeline_id_to_merge_request_metrics.rb
index b77daf12f68..60352363e42 100644
--- a/db/migrate/20161020083353_add_pipeline_id_to_merge_request_metrics.rb
+++ b/db/migrate/20161020083353_add_pipeline_id_to_merge_request_metrics.rb
@@ -2,7 +2,7 @@
# for more information on how to write migrations for GitLab.
# rubocop:disable RemoveIndex
-class AddPipelineIdToMergeRequestMetrics < ActiveRecord::Migration
+class AddPipelineIdToMergeRequestMetrics < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20161020180657_add_minimum_key_length_to_application_settings.rb b/db/migrate/20161020180657_add_minimum_key_length_to_application_settings.rb
index 5b6079002c0..7839bee6a5b 100644
--- a/db/migrate/20161020180657_add_minimum_key_length_to_application_settings.rb
+++ b/db/migrate/20161020180657_add_minimum_key_length_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddMinimumKeyLengthToApplicationSettings < ActiveRecord::Migration
+class AddMinimumKeyLengthToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20161021114307_add_lock_version_to_build_and_pipelines.rb b/db/migrate/20161021114307_add_lock_version_to_build_and_pipelines.rb
index b47f3aa2810..e172dc3adf2 100644
--- a/db/migrate/20161021114307_add_lock_version_to_build_and_pipelines.rb
+++ b/db/migrate/20161021114307_add_lock_version_to_build_and_pipelines.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddLockVersionToBuildAndPipelines < ActiveRecord::Migration
+class AddLockVersionToBuildAndPipelines < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20161024042317_migrate_mailroom_queue_from_default.rb b/db/migrate/20161024042317_migrate_mailroom_queue_from_default.rb
index fc2e4c12b30..d27f8fc38c8 100644
--- a/db/migrate/20161024042317_migrate_mailroom_queue_from_default.rb
+++ b/db/migrate/20161024042317_migrate_mailroom_queue_from_default.rb
@@ -3,7 +3,7 @@ require 'json'
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class MigrateMailroomQueueFromDefault < ActiveRecord::Migration
+class MigrateMailroomQueueFromDefault < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
diff --git a/db/migrate/20161025231710_migrate_jira_to_gem.rb b/db/migrate/20161025231710_migrate_jira_to_gem.rb
index 870b00411d2..aa1c59ec9e6 100644
--- a/db/migrate/20161025231710_migrate_jira_to_gem.rb
+++ b/db/migrate/20161025231710_migrate_jira_to_gem.rb
@@ -1,4 +1,4 @@
-class MigrateJiraToGem < ActiveRecord::Migration
+class MigrateJiraToGem < ActiveRecord::Migration[4.2]
DOWNTIME = true
DOWNTIME_REASON = <<-HEREDOC
diff --git a/db/migrate/20161031155516_add_housekeeping_to_application_settings.rb b/db/migrate/20161031155516_add_housekeeping_to_application_settings.rb
index 5a451fb575b..963358fe3e5 100644
--- a/db/migrate/20161031155516_add_housekeeping_to_application_settings.rb
+++ b/db/migrate/20161031155516_add_housekeeping_to_application_settings.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddHousekeepingToApplicationSettings < ActiveRecord::Migration
+class AddHousekeepingToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20161031171301_add_project_id_to_subscriptions.rb b/db/migrate/20161031171301_add_project_id_to_subscriptions.rb
index 8b1c10a124f..5fd10d9b359 100644
--- a/db/migrate/20161031171301_add_project_id_to_subscriptions.rb
+++ b/db/migrate/20161031171301_add_project_id_to_subscriptions.rb
@@ -1,4 +1,4 @@
-class AddProjectIdToSubscriptions < ActiveRecord::Migration
+class AddProjectIdToSubscriptions < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20161031174110_migrate_subscriptions_project_id.rb b/db/migrate/20161031174110_migrate_subscriptions_project_id.rb
index 549145a0a65..7f4087fdcd3 100644
--- a/db/migrate/20161031174110_migrate_subscriptions_project_id.rb
+++ b/db/migrate/20161031174110_migrate_subscriptions_project_id.rb
@@ -1,4 +1,4 @@
-class MigrateSubscriptionsProjectId < ActiveRecord::Migration
+class MigrateSubscriptionsProjectId < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
diff --git a/db/migrate/20161031181638_add_unique_index_to_subscriptions.rb b/db/migrate/20161031181638_add_unique_index_to_subscriptions.rb
index f263377fbc6..23a775d6282 100644
--- a/db/migrate/20161031181638_add_unique_index_to_subscriptions.rb
+++ b/db/migrate/20161031181638_add_unique_index_to_subscriptions.rb
@@ -1,5 +1,5 @@
# rubocop:disable RemoveIndex
-class AddUniqueIndexToSubscriptions < ActiveRecord::Migration
+class AddUniqueIndexToSubscriptions < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
diff --git a/db/migrate/20161103171205_rename_repository_storage_column.rb b/db/migrate/20161103171205_rename_repository_storage_column.rb
index 93280573939..d6050500e47 100644
--- a/db/migrate/20161103171205_rename_repository_storage_column.rb
+++ b/db/migrate/20161103171205_rename_repository_storage_column.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RenameRepositoryStorageColumn < ActiveRecord::Migration
+class RenameRepositoryStorageColumn < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20161103191444_add_sidekiq_throttling_to_application_settings.rb b/db/migrate/20161103191444_add_sidekiq_throttling_to_application_settings.rb
index 522437b92b4..83c51c83509 100644
--- a/db/migrate/20161103191444_add_sidekiq_throttling_to_application_settings.rb
+++ b/db/migrate/20161103191444_add_sidekiq_throttling_to_application_settings.rb
@@ -2,7 +2,7 @@
# for more information on how to write migrations for GitLab.
# rubocop:disable Migration/SaferBooleanColumn
-class AddSidekiqThrottlingToApplicationSettings < ActiveRecord::Migration
+class AddSidekiqThrottlingToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20161106185620_add_project_import_data_project_index.rb b/db/migrate/20161106185620_add_project_import_data_project_index.rb
index b3746dc4f6c..46809ca1707 100644
--- a/db/migrate/20161106185620_add_project_import_data_project_index.rb
+++ b/db/migrate/20161106185620_add_project_import_data_project_index.rb
@@ -1,5 +1,5 @@
# rubocop:disable RemoveIndex
-class AddProjectImportDataProjectIndex < ActiveRecord::Migration
+class AddProjectImportDataProjectIndex < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20161113184239_create_user_chat_names_table.rb b/db/migrate/20161113184239_create_user_chat_names_table.rb
index 7bead07fd76..0031ca66afe 100644
--- a/db/migrate/20161113184239_create_user_chat_names_table.rb
+++ b/db/migrate/20161113184239_create_user_chat_names_table.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/Timestamps
-class CreateUserChatNamesTable < ActiveRecord::Migration
+class CreateUserChatNamesTable < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20161114024742_add_coverage_regex_to_builds.rb b/db/migrate/20161114024742_add_coverage_regex_to_builds.rb
index 88aa5d52b39..631968b4aee 100644
--- a/db/migrate/20161114024742_add_coverage_regex_to_builds.rb
+++ b/db/migrate/20161114024742_add_coverage_regex_to_builds.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddCoverageRegexToBuilds < ActiveRecord::Migration
+class AddCoverageRegexToBuilds < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20161115173905_add_start_date_to_milestones.rb b/db/migrate/20161115173905_add_start_date_to_milestones.rb
index 413733b8db7..847c4f0bebb 100644
--- a/db/migrate/20161115173905_add_start_date_to_milestones.rb
+++ b/db/migrate/20161115173905_add_start_date_to_milestones.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddStartDateToMilestones < ActiveRecord::Migration
+class AddStartDateToMilestones < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20161117114805_remove_undeleted_groups.rb b/db/migrate/20161117114805_remove_undeleted_groups.rb
index 29040583aa2..0a4fe1c05b7 100644
--- a/db/migrate/20161117114805_remove_undeleted_groups.rb
+++ b/db/migrate/20161117114805_remove_undeleted_groups.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RemoveUndeletedGroups < ActiveRecord::Migration
+class RemoveUndeletedGroups < ActiveRecord::Migration[4.2]
DOWNTIME = false
def up
diff --git a/db/migrate/20161118183841_add_commit_events_to_services.rb b/db/migrate/20161118183841_add_commit_events_to_services.rb
index 4f9b5dd2281..0eb08915118 100644
--- a/db/migrate/20161118183841_add_commit_events_to_services.rb
+++ b/db/migrate/20161118183841_add_commit_events_to_services.rb
@@ -1,4 +1,4 @@
-class AddCommitEventsToServices < ActiveRecord::Migration
+class AddCommitEventsToServices < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20161124111390_add_parent_id_to_namespace.rb b/db/migrate/20161124111390_add_parent_id_to_namespace.rb
index a6fa1b70a9d..67f6aee2b9c 100644
--- a/db/migrate/20161124111390_add_parent_id_to_namespace.rb
+++ b/db/migrate/20161124111390_add_parent_id_to_namespace.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddParentIdToNamespace < ActiveRecord::Migration
+class AddParentIdToNamespace < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20161124111395_add_index_to_parent_id.rb b/db/migrate/20161124111395_add_index_to_parent_id.rb
index 065643e058d..d7a51ec905a 100644
--- a/db/migrate/20161124111395_add_index_to_parent_id.rb
+++ b/db/migrate/20161124111395_add_index_to_parent_id.rb
@@ -2,7 +2,7 @@
# for more information on how to write migrations for GitLab.
# rubocop:disable RemoveIndex
-class AddIndexToParentId < ActiveRecord::Migration
+class AddIndexToParentId < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20161124111402_add_routes_table.rb b/db/migrate/20161124111402_add_routes_table.rb
index f5241d906d1..36f49ef8c97 100644
--- a/db/migrate/20161124111402_add_routes_table.rb
+++ b/db/migrate/20161124111402_add_routes_table.rb
@@ -2,7 +2,7 @@
# for more information on how to write migrations for GitLab.
# rubocop:disable Migration/Timestamps
-class AddRoutesTable < ActiveRecord::Migration
+class AddRoutesTable < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20161124141322_migrate_process_commit_worker_jobs.rb b/db/migrate/20161124141322_migrate_process_commit_worker_jobs.rb
index 1eb6a8fa5df..0772821210c 100644
--- a/db/migrate/20161124141322_migrate_process_commit_worker_jobs.rb
+++ b/db/migrate/20161124141322_migrate_process_commit_worker_jobs.rb
@@ -1,4 +1,4 @@
-class MigrateProcessCommitWorkerJobs < ActiveRecord::Migration
+class MigrateProcessCommitWorkerJobs < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
class Repository
diff --git a/db/migrate/20161128095517_add_in_reply_to_discussion_id_to_sent_notifications.rb b/db/migrate/20161128095517_add_in_reply_to_discussion_id_to_sent_notifications.rb
index d56d83ca1d3..a2971486014 100644
--- a/db/migrate/20161128095517_add_in_reply_to_discussion_id_to_sent_notifications.rb
+++ b/db/migrate/20161128095517_add_in_reply_to_discussion_id_to_sent_notifications.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddInReplyToDiscussionIdToSentNotifications < ActiveRecord::Migration
+class AddInReplyToDiscussionIdToSentNotifications < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20161128142110_remove_unnecessary_indexes.rb b/db/migrate/20161128142110_remove_unnecessary_indexes.rb
index 699a9368eb3..b6c6e303ec7 100644
--- a/db/migrate/20161128142110_remove_unnecessary_indexes.rb
+++ b/db/migrate/20161128142110_remove_unnecessary_indexes.rb
@@ -2,7 +2,7 @@
# for more information on how to write migrations for GitLab.
# rubocop:disable RemoveIndex
-class RemoveUnnecessaryIndexes < ActiveRecord::Migration
+class RemoveUnnecessaryIndexes < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20161128161412_add_html_emails_enabled_to_application_settings.rb b/db/migrate/20161128161412_add_html_emails_enabled_to_application_settings.rb
index 38f5781745b..63139eb97bd 100644
--- a/db/migrate/20161128161412_add_html_emails_enabled_to_application_settings.rb
+++ b/db/migrate/20161128161412_add_html_emails_enabled_to_application_settings.rb
@@ -2,7 +2,7 @@
# for more information on how to write migrations for GitLab.
# rubocop:disable Migration/SaferBooleanColumn
-class AddHtmlEmailsEnabledToApplicationSettings < ActiveRecord::Migration
+class AddHtmlEmailsEnabledToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20161130095245_fill_routes_table.rb b/db/migrate/20161130095245_fill_routes_table.rb
index c3536d6d911..712be187c7c 100644
--- a/db/migrate/20161130095245_fill_routes_table.rb
+++ b/db/migrate/20161130095245_fill_routes_table.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class FillRoutesTable < ActiveRecord::Migration
+class FillRoutesTable < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
diff --git a/db/migrate/20161130101252_fill_projects_routes_table.rb b/db/migrate/20161130101252_fill_projects_routes_table.rb
index 56ba6fcdbe3..1900d6c8013 100644
--- a/db/migrate/20161130101252_fill_projects_routes_table.rb
+++ b/db/migrate/20161130101252_fill_projects_routes_table.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class FillProjectsRoutesTable < ActiveRecord::Migration
+class FillProjectsRoutesTable < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
diff --git a/db/migrate/20161201001911_add_plant_uml_url_to_application_settings.rb b/db/migrate/20161201001911_add_plant_uml_url_to_application_settings.rb
index b8d8742ae40..79558a6b3b9 100644
--- a/db/migrate/20161201001911_add_plant_uml_url_to_application_settings.rb
+++ b/db/migrate/20161201001911_add_plant_uml_url_to_application_settings.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddPlantUmlUrlToApplicationSettings < ActiveRecord::Migration
+class AddPlantUmlUrlToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20161201155511_create_project_statistics.rb b/db/migrate/20161201155511_create_project_statistics.rb
index 26e6d3623eb..6dcb5adb82b 100644
--- a/db/migrate/20161201155511_create_project_statistics.rb
+++ b/db/migrate/20161201155511_create_project_statistics.rb
@@ -1,4 +1,4 @@
-class CreateProjectStatistics < ActiveRecord::Migration
+class CreateProjectStatistics < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20161201160452_migrate_project_statistics.rb b/db/migrate/20161201160452_migrate_project_statistics.rb
index a547409aaa5..42c5be07e83 100644
--- a/db/migrate/20161201160452_migrate_project_statistics.rb
+++ b/db/migrate/20161201160452_migrate_project_statistics.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/RemoveColumn
-class MigrateProjectStatistics < ActiveRecord::Migration
+class MigrateProjectStatistics < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
diff --git a/db/migrate/20161202152031_remove_duplicates_from_routes.rb b/db/migrate/20161202152031_remove_duplicates_from_routes.rb
index d73b0847506..0615f683859 100644
--- a/db/migrate/20161202152031_remove_duplicates_from_routes.rb
+++ b/db/migrate/20161202152031_remove_duplicates_from_routes.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RemoveDuplicatesFromRoutes < ActiveRecord::Migration
+class RemoveDuplicatesFromRoutes < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20161202152035_add_index_to_routes.rb b/db/migrate/20161202152035_add_index_to_routes.rb
index 552b5fab68c..ad2e0cd13c9 100644
--- a/db/migrate/20161202152035_add_index_to_routes.rb
+++ b/db/migrate/20161202152035_add_index_to_routes.rb
@@ -2,7 +2,7 @@
# for more information on how to write migrations for GitLab.
# rubocop:disable RemoveIndex
-class AddIndexToRoutes < ActiveRecord::Migration
+class AddIndexToRoutes < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20161206003819_add_plant_uml_enabled_to_application_settings.rb b/db/migrate/20161206003819_add_plant_uml_enabled_to_application_settings.rb
index 7f56ecf4c9e..bb44d56ee56 100644
--- a/db/migrate/20161206003819_add_plant_uml_enabled_to_application_settings.rb
+++ b/db/migrate/20161206003819_add_plant_uml_enabled_to_application_settings.rb
@@ -2,7 +2,7 @@
# for more information on how to write migrations for GitLab.
# rubocop:disable Migration/SaferBooleanColumn
-class AddPlantUmlEnabledToApplicationSettings < ActiveRecord::Migration
+class AddPlantUmlEnabledToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20161206153749_remove_uniq_path_index_from_namespace.rb b/db/migrate/20161206153749_remove_uniq_path_index_from_namespace.rb
index 7d39c2ae626..c301d76646e 100644
--- a/db/migrate/20161206153749_remove_uniq_path_index_from_namespace.rb
+++ b/db/migrate/20161206153749_remove_uniq_path_index_from_namespace.rb
@@ -2,7 +2,7 @@
# for more information on how to write migrations for GitLab.
# rubocop:disable RemoveIndex
-class RemoveUniqPathIndexFromNamespace < ActiveRecord::Migration
+class RemoveUniqPathIndexFromNamespace < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20161206153751_add_path_index_to_namespace.rb b/db/migrate/20161206153751_add_path_index_to_namespace.rb
index 623037e35cd..f0848cc59a5 100644
--- a/db/migrate/20161206153751_add_path_index_to_namespace.rb
+++ b/db/migrate/20161206153751_add_path_index_to_namespace.rb
@@ -2,7 +2,7 @@
# for more information on how to write migrations for GitLab.
# rubocop:disable RemoveIndex
-class AddPathIndexToNamespace < ActiveRecord::Migration
+class AddPathIndexToNamespace < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20161206153753_remove_uniq_name_index_from_namespace.rb b/db/migrate/20161206153753_remove_uniq_name_index_from_namespace.rb
index 9296ae36aa5..13660cec7aa 100644
--- a/db/migrate/20161206153753_remove_uniq_name_index_from_namespace.rb
+++ b/db/migrate/20161206153753_remove_uniq_name_index_from_namespace.rb
@@ -2,7 +2,7 @@
# for more information on how to write migrations for GitLab.
# rubocop:disable RemoveIndex
-class RemoveUniqNameIndexFromNamespace < ActiveRecord::Migration
+class RemoveUniqNameIndexFromNamespace < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20161206153754_add_name_index_to_namespace.rb b/db/migrate/20161206153754_add_name_index_to_namespace.rb
index 2bbd039ff27..14152a6dc07 100644
--- a/db/migrate/20161206153754_add_name_index_to_namespace.rb
+++ b/db/migrate/20161206153754_add_name_index_to_namespace.rb
@@ -2,7 +2,7 @@
# for more information on how to write migrations for GitLab.
# rubocop:disable RemoveIndex
-class AddNameIndexToNamespace < ActiveRecord::Migration
+class AddNameIndexToNamespace < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20161207231620_fixup_environment_name_uniqueness.rb b/db/migrate/20161207231620_fixup_environment_name_uniqueness.rb
index 1db8c68626a..7cae09021cd 100644
--- a/db/migrate/20161207231620_fixup_environment_name_uniqueness.rb
+++ b/db/migrate/20161207231620_fixup_environment_name_uniqueness.rb
@@ -1,4 +1,4 @@
-class FixupEnvironmentNameUniqueness < ActiveRecord::Migration
+class FixupEnvironmentNameUniqueness < ActiveRecord::Migration[4.2]
include Gitlab::Database::ArelMethods
include Gitlab::Database::MigrationHelpers
diff --git a/db/migrate/20161207231621_create_environment_name_unique_index.rb b/db/migrate/20161207231621_create_environment_name_unique_index.rb
index 15093350f12..28d22664405 100644
--- a/db/migrate/20161207231621_create_environment_name_unique_index.rb
+++ b/db/migrate/20161207231621_create_environment_name_unique_index.rb
@@ -1,5 +1,5 @@
# rubocop:disable RemoveIndex
-class CreateEnvironmentNameUniqueIndex < ActiveRecord::Migration
+class CreateEnvironmentNameUniqueIndex < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20161207231626_add_environment_slug.rb b/db/migrate/20161207231626_add_environment_slug.rb
index 162f82a01cb..4657b023dfa 100644
--- a/db/migrate/20161207231626_add_environment_slug.rb
+++ b/db/migrate/20161207231626_add_environment_slug.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddEnvironmentSlug < ActiveRecord::Migration
+class AddEnvironmentSlug < ActiveRecord::Migration[4.2]
include Gitlab::Database::ArelMethods
include Gitlab::Database::MigrationHelpers
diff --git a/db/migrate/20161209153400_add_unique_index_for_environment_slug.rb b/db/migrate/20161209153400_add_unique_index_for_environment_slug.rb
index 42a90091b87..57606a33cb9 100644
--- a/db/migrate/20161209153400_add_unique_index_for_environment_slug.rb
+++ b/db/migrate/20161209153400_add_unique_index_for_environment_slug.rb
@@ -2,7 +2,7 @@
# for more information on how to write migrations for GitLab.
# rubocop:disable RemoveIndex
-class AddUniqueIndexForEnvironmentSlug < ActiveRecord::Migration
+class AddUniqueIndexForEnvironmentSlug < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
diff --git a/db/migrate/20161209165216_create_doorkeeper_openid_connect_tables.rb b/db/migrate/20161209165216_create_doorkeeper_openid_connect_tables.rb
index e63d5927f86..e8ea9cf8fda 100644
--- a/db/migrate/20161209165216_create_doorkeeper_openid_connect_tables.rb
+++ b/db/migrate/20161209165216_create_doorkeeper_openid_connect_tables.rb
@@ -1,4 +1,4 @@
-class CreateDoorkeeperOpenidConnectTables < ActiveRecord::Migration
+class CreateDoorkeeperOpenidConnectTables < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20161212142807_add_lower_path_index_to_routes.rb b/db/migrate/20161212142807_add_lower_path_index_to_routes.rb
index 76db5179795..92a12dbc699 100644
--- a/db/migrate/20161212142807_add_lower_path_index_to_routes.rb
+++ b/db/migrate/20161212142807_add_lower_path_index_to_routes.rb
@@ -2,7 +2,7 @@
# for more information on how to write migrations for GitLab.
# rubocop:disable RemoveIndex
-class AddLowerPathIndexToRoutes < ActiveRecord::Migration
+class AddLowerPathIndexToRoutes < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20161213172958_change_slack_service_to_slack_notification_service.rb b/db/migrate/20161213172958_change_slack_service_to_slack_notification_service.rb
index dc38d0ac906..babac6bfc4f 100644
--- a/db/migrate/20161213172958_change_slack_service_to_slack_notification_service.rb
+++ b/db/migrate/20161213172958_change_slack_service_to_slack_notification_service.rb
@@ -1,4 +1,4 @@
-class ChangeSlackServiceToSlackNotificationService < ActiveRecord::Migration
+class ChangeSlackServiceToSlackNotificationService < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20161220141214_remove_dot_git_from_group_names.rb b/db/migrate/20161220141214_remove_dot_git_from_group_names.rb
index 17357b67ab7..5c0b083325e 100644
--- a/db/migrate/20161220141214_remove_dot_git_from_group_names.rb
+++ b/db/migrate/20161220141214_remove_dot_git_from_group_names.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RemoveDotGitFromGroupNames < ActiveRecord::Migration
+class RemoveDotGitFromGroupNames < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
include Gitlab::ShellAdapter
diff --git a/db/migrate/20161221152132_add_last_used_at_to_key.rb b/db/migrate/20161221152132_add_last_used_at_to_key.rb
index 86dc7870247..a5b3f2b6f4b 100644
--- a/db/migrate/20161221152132_add_last_used_at_to_key.rb
+++ b/db/migrate/20161221152132_add_last_used_at_to_key.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/Datetime
-class AddLastUsedAtToKey < ActiveRecord::Migration
+class AddLastUsedAtToKey < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20161223034433_add_estimate_to_issuables_ce.rb b/db/migrate/20161223034433_add_estimate_to_issuables_ce.rb
index d5116dfab49..75bea41387c 100644
--- a/db/migrate/20161223034433_add_estimate_to_issuables_ce.rb
+++ b/db/migrate/20161223034433_add_estimate_to_issuables_ce.rb
@@ -1,4 +1,4 @@
-class AddEstimateToIssuablesCe < ActiveRecord::Migration
+class AddEstimateToIssuablesCe < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20161223034646_create_timelogs_ce.rb b/db/migrate/20161223034646_create_timelogs_ce.rb
index 1e894cc9161..489a2b35dfd 100644
--- a/db/migrate/20161223034646_create_timelogs_ce.rb
+++ b/db/migrate/20161223034646_create_timelogs_ce.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/Timestamps
-class CreateTimelogsCe < ActiveRecord::Migration
+class CreateTimelogsCe < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20161226122833_remove_dot_git_from_usernames.rb b/db/migrate/20161226122833_remove_dot_git_from_usernames.rb
index db10426b483..e3318780151 100644
--- a/db/migrate/20161226122833_remove_dot_git_from_usernames.rb
+++ b/db/migrate/20161226122833_remove_dot_git_from_usernames.rb
@@ -1,4 +1,4 @@
-class RemoveDotGitFromUsernames < ActiveRecord::Migration
+class RemoveDotGitFromUsernames < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
include Gitlab::ShellAdapter
diff --git a/db/migrate/20161227192806_rename_slack_and_mattermost_notification_services.rb b/db/migrate/20161227192806_rename_slack_and_mattermost_notification_services.rb
index 6b15e5caccf..df5714278f2 100644
--- a/db/migrate/20161227192806_rename_slack_and_mattermost_notification_services.rb
+++ b/db/migrate/20161227192806_rename_slack_and_mattermost_notification_services.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/UpdateColumnInBatches
-class RenameSlackAndMattermostNotificationServices < ActiveRecord::Migration
+class RenameSlackAndMattermostNotificationServices < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20161228124936_change_expires_at_to_date_in_personal_access_tokens.rb b/db/migrate/20161228124936_change_expires_at_to_date_in_personal_access_tokens.rb
index 16f7cc487ce..f9f8f11316d 100644
--- a/db/migrate/20161228124936_change_expires_at_to_date_in_personal_access_tokens.rb
+++ b/db/migrate/20161228124936_change_expires_at_to_date_in_personal_access_tokens.rb
@@ -2,7 +2,7 @@
# for more information on how to write migrations for GitLab.
# rubocop:disable Migration/Datetime
-class ChangeExpiresAtToDateInPersonalAccessTokens < ActiveRecord::Migration
+class ChangeExpiresAtToDateInPersonalAccessTokens < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20161228135550_add_impersonation_to_personal_access_tokens.rb b/db/migrate/20161228135550_add_impersonation_to_personal_access_tokens.rb
index ea9caceaa2c..489d7fb8b75 100644
--- a/db/migrate/20161228135550_add_impersonation_to_personal_access_tokens.rb
+++ b/db/migrate/20161228135550_add_impersonation_to_personal_access_tokens.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddImpersonationToPersonalAccessTokens < ActiveRecord::Migration
+class AddImpersonationToPersonalAccessTokens < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20170120131253_create_chat_teams.rb b/db/migrate/20170120131253_create_chat_teams.rb
index 52208821911..e9b9bd7bd2f 100644
--- a/db/migrate/20170120131253_create_chat_teams.rb
+++ b/db/migrate/20170120131253_create_chat_teams.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/Timestamps
-class CreateChatTeams < ActiveRecord::Migration
+class CreateChatTeams < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
diff --git a/db/migrate/20170121123724_add_index_to_ci_builds_for_status_runner_id_and_type.rb b/db/migrate/20170121123724_add_index_to_ci_builds_for_status_runner_id_and_type.rb
index c006098fafd..cc1a4d2db59 100644
--- a/db/migrate/20170121123724_add_index_to_ci_builds_for_status_runner_id_and_type.rb
+++ b/db/migrate/20170121123724_add_index_to_ci_builds_for_status_runner_id_and_type.rb
@@ -1,5 +1,5 @@
# rubocop:disable RemoveIndex
-class AddIndexToCiBuildsForStatusRunnerIdAndType < ActiveRecord::Migration
+class AddIndexToCiBuildsForStatusRunnerIdAndType < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170121130655_add_index_to_ci_runners_for_is_shared.rb b/db/migrate/20170121130655_add_index_to_ci_runners_for_is_shared.rb
index 00aa0b311b1..1b83ce4cfe3 100644
--- a/db/migrate/20170121130655_add_index_to_ci_runners_for_is_shared.rb
+++ b/db/migrate/20170121130655_add_index_to_ci_runners_for_is_shared.rb
@@ -1,5 +1,5 @@
# rubocop:disable RemoveIndex
-class AddIndexToCiRunnersForIsShared < ActiveRecord::Migration
+class AddIndexToCiRunnersForIsShared < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170124174637_add_foreign_keys_to_timelogs.rb b/db/migrate/20170124174637_add_foreign_keys_to_timelogs.rb
index a7d4e141a1a..ffd966be086 100644
--- a/db/migrate/20170124174637_add_foreign_keys_to_timelogs.rb
+++ b/db/migrate/20170124174637_add_foreign_keys_to_timelogs.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddForeignKeysToTimelogs < ActiveRecord::Migration
+class AddForeignKeysToTimelogs < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170124193147_add_two_factor_columns_to_namespaces.rb b/db/migrate/20170124193147_add_two_factor_columns_to_namespaces.rb
index 27ebe0af33b..324e051666b 100644
--- a/db/migrate/20170124193147_add_two_factor_columns_to_namespaces.rb
+++ b/db/migrate/20170124193147_add_two_factor_columns_to_namespaces.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/UpdateLargeTable
-class AddTwoFactorColumnsToNamespaces < ActiveRecord::Migration
+class AddTwoFactorColumnsToNamespaces < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170124193205_add_two_factor_columns_to_users.rb b/db/migrate/20170124193205_add_two_factor_columns_to_users.rb
index 558a1837c79..6c80dbfc965 100644
--- a/db/migrate/20170124193205_add_two_factor_columns_to_users.rb
+++ b/db/migrate/20170124193205_add_two_factor_columns_to_users.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/UpdateLargeTable
-class AddTwoFactorColumnsToUsers < ActiveRecord::Migration
+class AddTwoFactorColumnsToUsers < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170126174819_add_terminal_max_session_time_to_application_settings.rb b/db/migrate/20170126174819_add_terminal_max_session_time_to_application_settings.rb
index 334f53f9145..70f1669108a 100644
--- a/db/migrate/20170126174819_add_terminal_max_session_time_to_application_settings.rb
+++ b/db/migrate/20170126174819_add_terminal_max_session_time_to_application_settings.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddTerminalMaxSessionTimeToApplicationSettings < ActiveRecord::Migration
+class AddTerminalMaxSessionTimeToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170127032550_remove_backlog_lists_from_boards.rb b/db/migrate/20170127032550_remove_backlog_lists_from_boards.rb
index 0ee4229d1f8..2e2fecfa2a7 100644
--- a/db/migrate/20170127032550_remove_backlog_lists_from_boards.rb
+++ b/db/migrate/20170127032550_remove_backlog_lists_from_boards.rb
@@ -1,4 +1,4 @@
-class RemoveBacklogListsFromBoards < ActiveRecord::Migration
+class RemoveBacklogListsFromBoards < ActiveRecord::Migration[4.2]
DOWNTIME = false
def up
diff --git a/db/migrate/20170130204620_add_index_to_project_authorizations.rb b/db/migrate/20170130204620_add_index_to_project_authorizations.rb
index f256251516a..28c4480e9c6 100644
--- a/db/migrate/20170130204620_add_index_to_project_authorizations.rb
+++ b/db/migrate/20170130204620_add_index_to_project_authorizations.rb
@@ -1,5 +1,5 @@
# rubocop:disable RemoveIndex
-class AddIndexToProjectAuthorizations < ActiveRecord::Migration
+class AddIndexToProjectAuthorizations < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170130221926_create_uploads.rb b/db/migrate/20170130221926_create_uploads.rb
index 6f06c5dd840..7bf15ca4978 100644
--- a/db/migrate/20170130221926_create_uploads.rb
+++ b/db/migrate/20170130221926_create_uploads.rb
@@ -1,4 +1,4 @@
-class CreateUploads < ActiveRecord::Migration
+class CreateUploads < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170131221752_add_relative_position_to_issues.rb b/db/migrate/20170131221752_add_relative_position_to_issues.rb
index fd18d8b6a60..126cb9e5415 100644
--- a/db/migrate/20170131221752_add_relative_position_to_issues.rb
+++ b/db/migrate/20170131221752_add_relative_position_to_issues.rb
@@ -2,7 +2,7 @@
# for more information on how to write migrations for GitLab.
# rubocop:disable RemoveIndex
-class AddRelativePositionToIssues < ActiveRecord::Migration
+class AddRelativePositionToIssues < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170204172458_add_name_to_route.rb b/db/migrate/20170204172458_add_name_to_route.rb
index 38ed1ad9039..e7c94aceb26 100644
--- a/db/migrate/20170204172458_add_name_to_route.rb
+++ b/db/migrate/20170204172458_add_name_to_route.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddNameToRoute < ActiveRecord::Migration
+class AddNameToRoute < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170204181513_add_index_to_labels_for_type_and_project.rb b/db/migrate/20170204181513_add_index_to_labels_for_type_and_project.rb
index b1b0a601007..746322885b1 100644
--- a/db/migrate/20170204181513_add_index_to_labels_for_type_and_project.rb
+++ b/db/migrate/20170204181513_add_index_to_labels_for_type_and_project.rb
@@ -1,5 +1,5 @@
# rubocop:disable RemoveIndex
-class AddIndexToLabelsForTypeAndProject < ActiveRecord::Migration
+class AddIndexToLabelsForTypeAndProject < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170206071414_add_recaptcha_verified_to_spam_logs.rb b/db/migrate/20170206071414_add_recaptcha_verified_to_spam_logs.rb
index 44372334d21..06338ac943e 100644
--- a/db/migrate/20170206071414_add_recaptcha_verified_to_spam_logs.rb
+++ b/db/migrate/20170206071414_add_recaptcha_verified_to_spam_logs.rb
@@ -1,4 +1,4 @@
-class AddRecaptchaVerifiedToSpamLogs < ActiveRecord::Migration
+class AddRecaptchaVerifiedToSpamLogs < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20170206115204_add_column_ghost_to_users.rb b/db/migrate/20170206115204_add_column_ghost_to_users.rb
index cc1eeda1160..4b86814e05d 100644
--- a/db/migrate/20170206115204_add_column_ghost_to_users.rb
+++ b/db/migrate/20170206115204_add_column_ghost_to_users.rb
@@ -1,4 +1,4 @@
-class AddColumnGhostToUsers < ActiveRecord::Migration
+class AddColumnGhostToUsers < ActiveRecord::Migration[4.2]
DOWNTIME = false
def up
diff --git a/db/migrate/20170210062829_add_index_to_labels_for_title_and_project.rb b/db/migrate/20170210062829_add_index_to_labels_for_title_and_project.rb
index 2c20f6a48ab..d0b440b8ccb 100644
--- a/db/migrate/20170210062829_add_index_to_labels_for_title_and_project.rb
+++ b/db/migrate/20170210062829_add_index_to_labels_for_title_and_project.rb
@@ -1,5 +1,5 @@
# rubocop:disable RemoveIndex
-class AddIndexToLabelsForTitleAndProject < ActiveRecord::Migration
+class AddIndexToLabelsForTitleAndProject < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170210075922_add_index_to_ci_trigger_requests_for_commit_id.rb b/db/migrate/20170210075922_add_index_to_ci_trigger_requests_for_commit_id.rb
index c31057f2617..753d6c77e35 100644
--- a/db/migrate/20170210075922_add_index_to_ci_trigger_requests_for_commit_id.rb
+++ b/db/migrate/20170210075922_add_index_to_ci_trigger_requests_for_commit_id.rb
@@ -1,5 +1,5 @@
# rubocop:disable RemoveIndex
-class AddIndexToCiTriggerRequestsForCommitId < ActiveRecord::Migration
+class AddIndexToCiTriggerRequestsForCommitId < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170210103609_add_index_to_user_agent_detail.rb b/db/migrate/20170210103609_add_index_to_user_agent_detail.rb
index ba4976a5ce8..a2d6528ea82 100644
--- a/db/migrate/20170210103609_add_index_to_user_agent_detail.rb
+++ b/db/migrate/20170210103609_add_index_to_user_agent_detail.rb
@@ -2,7 +2,7 @@
# for more information on how to write migrations for GitLab.
# rubocop:disable RemoveIndex
-class AddIndexToUserAgentDetail < ActiveRecord::Migration
+class AddIndexToUserAgentDetail < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170210131347_add_unique_ips_limit_to_application_settings.rb b/db/migrate/20170210131347_add_unique_ips_limit_to_application_settings.rb
index 9ab970134be..c286354f476 100644
--- a/db/migrate/20170210131347_add_unique_ips_limit_to_application_settings.rb
+++ b/db/migrate/20170210131347_add_unique_ips_limit_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddUniqueIpsLimitToApplicationSettings < ActiveRecord::Migration
+class AddUniqueIpsLimitToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
diff --git a/db/migrate/20170214084746_add_default_artifacts_expiration_to_application_settings.rb b/db/migrate/20170214084746_add_default_artifacts_expiration_to_application_settings.rb
index e0e3ff8957a..84814c2f8f2 100644
--- a/db/migrate/20170214084746_add_default_artifacts_expiration_to_application_settings.rb
+++ b/db/migrate/20170214084746_add_default_artifacts_expiration_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddDefaultArtifactsExpirationToApplicationSettings < ActiveRecord::Migration
+class AddDefaultArtifactsExpirationToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170216135621_add_index_for_latest_successful_pipeline.rb b/db/migrate/20170216135621_add_index_for_latest_successful_pipeline.rb
index 884c4e569d6..be393bd496d 100644
--- a/db/migrate/20170216135621_add_index_for_latest_successful_pipeline.rb
+++ b/db/migrate/20170216135621_add_index_for_latest_successful_pipeline.rb
@@ -1,5 +1,5 @@
# rubocop:disable RemoveIndex
-class AddIndexForLatestSuccessfulPipeline < ActiveRecord::Migration
+class AddIndexForLatestSuccessfulPipeline < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170216141440_drop_index_for_builds_project_status.rb b/db/migrate/20170216141440_drop_index_for_builds_project_status.rb
index 56ad566ca67..7edf7dd7e10 100644
--- a/db/migrate/20170216141440_drop_index_for_builds_project_status.rb
+++ b/db/migrate/20170216141440_drop_index_for_builds_project_status.rb
@@ -1,5 +1,5 @@
# rubocop:disable RemoveIndex
-class DropIndexForBuildsProjectStatus < ActiveRecord::Migration
+class DropIndexForBuildsProjectStatus < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170217132157_rename_merge_when_build_succeeds.rb b/db/migrate/20170217132157_rename_merge_when_build_succeeds.rb
index 9011526565d..ee8838eff56 100644
--- a/db/migrate/20170217132157_rename_merge_when_build_succeeds.rb
+++ b/db/migrate/20170217132157_rename_merge_when_build_succeeds.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RenameMergeWhenBuildSucceeds < ActiveRecord::Migration
+class RenameMergeWhenBuildSucceeds < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170217151947_rename_only_allow_merge_if_build_succeeds.rb b/db/migrate/20170217151947_rename_only_allow_merge_if_build_succeeds.rb
index b2b68ff72d1..5d35216f3af 100644
--- a/db/migrate/20170217151947_rename_only_allow_merge_if_build_succeeds.rb
+++ b/db/migrate/20170217151947_rename_only_allow_merge_if_build_succeeds.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RenameOnlyAllowMergeIfBuildSucceeds < ActiveRecord::Migration
+class RenameOnlyAllowMergeIfBuildSucceeds < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170217151948_add_owner_id_to_triggers.rb b/db/migrate/20170217151948_add_owner_id_to_triggers.rb
index 16d7cc5bed6..a28711ae59a 100644
--- a/db/migrate/20170217151948_add_owner_id_to_triggers.rb
+++ b/db/migrate/20170217151948_add_owner_id_to_triggers.rb
@@ -1,4 +1,4 @@
-class AddOwnerIdToTriggers < ActiveRecord::Migration
+class AddOwnerIdToTriggers < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170217151949_add_description_to_triggers.rb b/db/migrate/20170217151949_add_description_to_triggers.rb
index 1dca0e37412..27cb4b3ab31 100644
--- a/db/migrate/20170217151949_add_description_to_triggers.rb
+++ b/db/migrate/20170217151949_add_description_to_triggers.rb
@@ -1,4 +1,4 @@
-class AddDescriptionToTriggers < ActiveRecord::Migration
+class AddDescriptionToTriggers < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170222111732_create_gpg_keys.rb b/db/migrate/20170222111732_create_gpg_keys.rb
index 0d6d454bbf3..012e8ef5854 100644
--- a/db/migrate/20170222111732_create_gpg_keys.rb
+++ b/db/migrate/20170222111732_create_gpg_keys.rb
@@ -1,4 +1,4 @@
-class CreateGpgKeys < ActiveRecord::Migration
+class CreateGpgKeys < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170222143317_drop_ci_projects.rb b/db/migrate/20170222143317_drop_ci_projects.rb
index 4db8658f36f..9f3aa2da382 100644
--- a/db/migrate/20170222143317_drop_ci_projects.rb
+++ b/db/migrate/20170222143317_drop_ci_projects.rb
@@ -1,4 +1,4 @@
-class DropCiProjects < ActiveRecord::Migration
+class DropCiProjects < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170222143500_remove_old_project_id_columns.rb b/db/migrate/20170222143500_remove_old_project_id_columns.rb
index 9bed38a3444..356dee4a060 100644
--- a/db/migrate/20170222143500_remove_old_project_id_columns.rb
+++ b/db/migrate/20170222143500_remove_old_project_id_columns.rb
@@ -1,6 +1,6 @@
# rubocop:disable Migration/RemoveColumn
# rubocop:disable RemoveIndex
-class RemoveOldProjectIdColumns < ActiveRecord::Migration
+class RemoveOldProjectIdColumns < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20170222143603_rename_gl_project_id_to_project_id.rb b/db/migrate/20170222143603_rename_gl_project_id_to_project_id.rb
index 7c19d471557..390b2c33d91 100644
--- a/db/migrate/20170222143603_rename_gl_project_id_to_project_id.rb
+++ b/db/migrate/20170222143603_rename_gl_project_id_to_project_id.rb
@@ -1,4 +1,4 @@
-class RenameGlProjectIdToProjectId < ActiveRecord::Migration
+class RenameGlProjectIdToProjectId < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
diff --git a/db/migrate/20170301101006_add_ci_runner_namespaces.rb b/db/migrate/20170301101006_add_ci_runner_namespaces.rb
index deaf03e928b..aa2d8a14242 100644
--- a/db/migrate/20170301101006_add_ci_runner_namespaces.rb
+++ b/db/migrate/20170301101006_add_ci_runner_namespaces.rb
@@ -1,4 +1,4 @@
-class AddCiRunnerNamespaces < ActiveRecord::Migration
+class AddCiRunnerNamespaces < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170301125302_add_printing_merge_request_link_enabled_to_project.rb b/db/migrate/20170301125302_add_printing_merge_request_link_enabled_to_project.rb
index 6d43f346d4f..a7efeb8ae6f 100644
--- a/db/migrate/20170301125302_add_printing_merge_request_link_enabled_to_project.rb
+++ b/db/migrate/20170301125302_add_printing_merge_request_link_enabled_to_project.rb
@@ -2,7 +2,7 @@
# for more information on how to write migrations for GitLab.
# rubocop:disable Migration/UpdateLargeTable
-class AddPrintingMergeRequestLinkEnabledToProject < ActiveRecord::Migration
+class AddPrintingMergeRequestLinkEnabledToProject < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20170301195939_rename_ci_commits_to_ci_pipelines.rb b/db/migrate/20170301195939_rename_ci_commits_to_ci_pipelines.rb
index 4f061d96392..791e9c845a6 100644
--- a/db/migrate/20170301195939_rename_ci_commits_to_ci_pipelines.rb
+++ b/db/migrate/20170301195939_rename_ci_commits_to_ci_pipelines.rb
@@ -1,4 +1,4 @@
-class RenameCiCommitsToCiPipelines < ActiveRecord::Migration
+class RenameCiCommitsToCiPipelines < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
diff --git a/db/migrate/20170301205639_remove_unused_ci_tables_and_columns.rb b/db/migrate/20170301205639_remove_unused_ci_tables_and_columns.rb
index ee802ab34ca..08a11aee992 100644
--- a/db/migrate/20170301205639_remove_unused_ci_tables_and_columns.rb
+++ b/db/migrate/20170301205639_remove_unused_ci_tables_and_columns.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/RemoveColumn
-class RemoveUnusedCiTablesAndColumns < ActiveRecord::Migration
+class RemoveUnusedCiTablesAndColumns < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
diff --git a/db/migrate/20170305180853_add_auto_cancel_pending_pipelines_to_project.rb b/db/migrate/20170305180853_add_auto_cancel_pending_pipelines_to_project.rb
index 3c5cd95726a..3e317bb5248 100644
--- a/db/migrate/20170305180853_add_auto_cancel_pending_pipelines_to_project.rb
+++ b/db/migrate/20170305180853_add_auto_cancel_pending_pipelines_to_project.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/UpdateLargeTable
-class AddAutoCancelPendingPipelinesToProject < ActiveRecord::Migration
+class AddAutoCancelPendingPipelinesToProject < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170305203726_add_owner_id_foreign_key.rb b/db/migrate/20170305203726_add_owner_id_foreign_key.rb
index 5fbdc45f1a7..b3bd441ff9c 100644
--- a/db/migrate/20170305203726_add_owner_id_foreign_key.rb
+++ b/db/migrate/20170305203726_add_owner_id_foreign_key.rb
@@ -1,4 +1,4 @@
-class AddOwnerIdForeignKey < ActiveRecord::Migration
+class AddOwnerIdForeignKey < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170307125949_add_last_activity_on_to_users.rb b/db/migrate/20170307125949_add_last_activity_on_to_users.rb
index 0100836b473..42331eab753 100644
--- a/db/migrate/20170307125949_add_last_activity_on_to_users.rb
+++ b/db/migrate/20170307125949_add_last_activity_on_to_users.rb
@@ -1,4 +1,4 @@
-class AddLastActivityOnToUsers < ActiveRecord::Migration
+class AddLastActivityOnToUsers < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170309173138_create_protected_tags.rb b/db/migrate/20170309173138_create_protected_tags.rb
index 4684c9964c4..f518b500bd4 100644
--- a/db/migrate/20170309173138_create_protected_tags.rb
+++ b/db/migrate/20170309173138_create_protected_tags.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/Timestamps
-class CreateProtectedTags < ActiveRecord::Migration
+class CreateProtectedTags < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170312114329_add_auto_canceled_by_id_to_pipeline.rb b/db/migrate/20170312114329_add_auto_canceled_by_id_to_pipeline.rb
index 1690ce90564..26187a9e8b3 100644
--- a/db/migrate/20170312114329_add_auto_canceled_by_id_to_pipeline.rb
+++ b/db/migrate/20170312114329_add_auto_canceled_by_id_to_pipeline.rb
@@ -1,4 +1,4 @@
-class AddAutoCanceledByIdToPipeline < ActiveRecord::Migration
+class AddAutoCanceledByIdToPipeline < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170312114529_add_auto_canceled_by_id_foreign_key_to_pipeline.rb b/db/migrate/20170312114529_add_auto_canceled_by_id_foreign_key_to_pipeline.rb
index 1e7b02ecf0e..a2b5c1c4533 100644
--- a/db/migrate/20170312114529_add_auto_canceled_by_id_foreign_key_to_pipeline.rb
+++ b/db/migrate/20170312114529_add_auto_canceled_by_id_foreign_key_to_pipeline.rb
@@ -1,4 +1,4 @@
-class AddAutoCanceledByIdForeignKeyToPipeline < ActiveRecord::Migration
+class AddAutoCanceledByIdForeignKeyToPipeline < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170313213916_add_index_to_user_ghost.rb b/db/migrate/20170313213916_add_index_to_user_ghost.rb
index fe5847ed225..66e57b444a0 100644
--- a/db/migrate/20170313213916_add_index_to_user_ghost.rb
+++ b/db/migrate/20170313213916_add_index_to_user_ghost.rb
@@ -2,7 +2,7 @@
# for more information on how to write migrations for GitLab.
# rubocop:disable RemoveIndex
-class AddIndexToUserGhost < ActiveRecord::Migration
+class AddIndexToUserGhost < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170314082049_create_system_note_metadata.rb b/db/migrate/20170314082049_create_system_note_metadata.rb
index fee47e96053..d0cc6e3be36 100644
--- a/db/migrate/20170314082049_create_system_note_metadata.rb
+++ b/db/migrate/20170314082049_create_system_note_metadata.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/Timestamps
-class CreateSystemNoteMetadata < ActiveRecord::Migration
+class CreateSystemNoteMetadata < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170315174634_revert_add_notified_of_own_activity_to_users.rb b/db/migrate/20170315174634_revert_add_notified_of_own_activity_to_users.rb
index 9b9098d115d..8773c7ea657 100644
--- a/db/migrate/20170315174634_revert_add_notified_of_own_activity_to_users.rb
+++ b/db/migrate/20170315174634_revert_add_notified_of_own_activity_to_users.rb
@@ -1,6 +1,6 @@
# rubocop:disable Migration/RemoveColumn
# rubocop:disable Migration/UpdateLargeTable
-class RevertAddNotifiedOfOwnActivityToUsers < ActiveRecord::Migration
+class RevertAddNotifiedOfOwnActivityToUsers < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20170315194013_add_closed_at_to_issues.rb b/db/migrate/20170315194013_add_closed_at_to_issues.rb
index 34a1bd7ca8c..0b06ee6e74c 100644
--- a/db/migrate/20170315194013_add_closed_at_to_issues.rb
+++ b/db/migrate/20170315194013_add_closed_at_to_issues.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/Datetime
-class AddClosedAtToIssues < ActiveRecord::Migration
+class AddClosedAtToIssues < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20170316061730_readd_notified_of_own_activity_to_users.rb b/db/migrate/20170316061730_readd_notified_of_own_activity_to_users.rb
index 524eb2557ce..82029dfd3fc 100644
--- a/db/migrate/20170316061730_readd_notified_of_own_activity_to_users.rb
+++ b/db/migrate/20170316061730_readd_notified_of_own_activity_to_users.rb
@@ -1,4 +1,4 @@
-class ReaddNotifiedOfOwnActivityToUsers < ActiveRecord::Migration
+class ReaddNotifiedOfOwnActivityToUsers < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20170316163845_move_uploads_to_system_dir.rb b/db/migrate/20170316163845_move_uploads_to_system_dir.rb
index cfcb909ddaf..d24527b55cd 100644
--- a/db/migrate/20170316163845_move_uploads_to_system_dir.rb
+++ b/db/migrate/20170316163845_move_uploads_to_system_dir.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class MoveUploadsToSystemDir < ActiveRecord::Migration
+class MoveUploadsToSystemDir < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20170317203554_index_routes_path_for_like.rb b/db/migrate/20170317203554_index_routes_path_for_like.rb
index 8d3609135d0..a1bee3c8783 100644
--- a/db/migrate/20170317203554_index_routes_path_for_like.rb
+++ b/db/migrate/20170317203554_index_routes_path_for_like.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class IndexRoutesPathForLike < ActiveRecord::Migration
+class IndexRoutesPathForLike < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170320173259_migrate_assignees.rb b/db/migrate/20170320173259_migrate_assignees.rb
index 255b5e9c4db..43a90758bd9 100644
--- a/db/migrate/20170320173259_migrate_assignees.rb
+++ b/db/migrate/20170320173259_migrate_assignees.rb
@@ -1,6 +1,6 @@
# rubocop:disable Migration/UpdateLargeTable
# rubocop:disable Migration/UpdateColumnInBatches
-class MigrateAssignees < ActiveRecord::Migration
+class MigrateAssignees < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170322013926_create_container_repository.rb b/db/migrate/20170322013926_create_container_repository.rb
index 242f7b8d17d..b1e778671b2 100644
--- a/db/migrate/20170322013926_create_container_repository.rb
+++ b/db/migrate/20170322013926_create_container_repository.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/Timestamps
-class CreateContainerRepository < ActiveRecord::Migration
+class CreateContainerRepository < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170327091750_add_created_at_index_to_deployments.rb b/db/migrate/20170327091750_add_created_at_index_to_deployments.rb
index fd6ed499b80..f29fff7d5b9 100644
--- a/db/migrate/20170327091750_add_created_at_index_to_deployments.rb
+++ b/db/migrate/20170327091750_add_created_at_index_to_deployments.rb
@@ -1,4 +1,4 @@
-class AddCreatedAtIndexToDeployments < ActiveRecord::Migration
+class AddCreatedAtIndexToDeployments < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170328010804_add_uuid_to_application_settings.rb b/db/migrate/20170328010804_add_uuid_to_application_settings.rb
index 5dfcc751c7b..95a01c2dc8f 100644
--- a/db/migrate/20170328010804_add_uuid_to_application_settings.rb
+++ b/db/migrate/20170328010804_add_uuid_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddUuidToApplicationSettings < ActiveRecord::Migration
+class AddUuidToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170329095325_add_ref_to_triggers.rb b/db/migrate/20170329095325_add_ref_to_triggers.rb
index 4aa52dd8f8f..db09b36db17 100644
--- a/db/migrate/20170329095325_add_ref_to_triggers.rb
+++ b/db/migrate/20170329095325_add_ref_to_triggers.rb
@@ -1,4 +1,4 @@
-class AddRefToTriggers < ActiveRecord::Migration
+class AddRefToTriggers < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170329095907_create_ci_trigger_schedules.rb b/db/migrate/20170329095907_create_ci_trigger_schedules.rb
index cfcfa27ebb5..7f759f908cd 100644
--- a/db/migrate/20170329095907_create_ci_trigger_schedules.rb
+++ b/db/migrate/20170329095907_create_ci_trigger_schedules.rb
@@ -1,4 +1,4 @@
-class CreateCiTriggerSchedules < ActiveRecord::Migration
+class CreateCiTriggerSchedules < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170329124448_add_polling_interval_multiplier_to_application_settings.rb b/db/migrate/20170329124448_add_polling_interval_multiplier_to_application_settings.rb
index a8affd19a0b..17307879a2a 100644
--- a/db/migrate/20170329124448_add_polling_interval_multiplier_to_application_settings.rb
+++ b/db/migrate/20170329124448_add_polling_interval_multiplier_to_application_settings.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddPollingIntervalMultiplierToApplicationSettings < ActiveRecord::Migration
+class AddPollingIntervalMultiplierToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170330141723_disable_invalid_service_templates2.rb b/db/migrate/20170330141723_disable_invalid_service_templates2.rb
index 8424e56d8a1..91ec19dfa87 100644
--- a/db/migrate/20170330141723_disable_invalid_service_templates2.rb
+++ b/db/migrate/20170330141723_disable_invalid_service_templates2.rb
@@ -1,7 +1,7 @@
# This is the same as DisableInvalidServiceTemplates. Later migrations may have
# inadventently enabled some invalid templates again.
#
-class DisableInvalidServiceTemplates2 < ActiveRecord::Migration
+class DisableInvalidServiceTemplates2 < ActiveRecord::Migration[4.2]
DOWNTIME = false
unless defined?(Service)
diff --git a/db/migrate/20170402231018_remove_index_for_users_current_sign_in_at.rb b/db/migrate/20170402231018_remove_index_for_users_current_sign_in_at.rb
index 42c90103262..4c417ce2f71 100644
--- a/db/migrate/20170402231018_remove_index_for_users_current_sign_in_at.rb
+++ b/db/migrate/20170402231018_remove_index_for_users_current_sign_in_at.rb
@@ -1,6 +1,6 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RemoveIndexForUsersCurrentSignInAt < ActiveRecord::Migration
+class RemoveIndexForUsersCurrentSignInAt < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170404163427_add_trigger_id_foreign_key.rb b/db/migrate/20170404163427_add_trigger_id_foreign_key.rb
index 6679a95ca11..f35730c8e45 100644
--- a/db/migrate/20170404163427_add_trigger_id_foreign_key.rb
+++ b/db/migrate/20170404163427_add_trigger_id_foreign_key.rb
@@ -1,4 +1,4 @@
-class AddTriggerIdForeignKey < ActiveRecord::Migration
+class AddTriggerIdForeignKey < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170405080720_add_import_jid_to_projects.rb b/db/migrate/20170405080720_add_import_jid_to_projects.rb
index 55b87b9d56d..ddbea9d7ab6 100644
--- a/db/migrate/20170405080720_add_import_jid_to_projects.rb
+++ b/db/migrate/20170405080720_add_import_jid_to_projects.rb
@@ -1,4 +1,4 @@
-class AddImportJidToProjects < ActiveRecord::Migration
+class AddImportJidToProjects < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170406114958_add_auto_canceled_by_id_to_ci_builds.rb b/db/migrate/20170406114958_add_auto_canceled_by_id_to_ci_builds.rb
index c1d803b4308..ba43a070587 100644
--- a/db/migrate/20170406114958_add_auto_canceled_by_id_to_ci_builds.rb
+++ b/db/migrate/20170406114958_add_auto_canceled_by_id_to_ci_builds.rb
@@ -1,4 +1,4 @@
-class AddAutoCanceledByIdToCiBuilds < ActiveRecord::Migration
+class AddAutoCanceledByIdToCiBuilds < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170406115029_add_auto_canceled_by_id_foreign_key_to_ci_builds.rb b/db/migrate/20170406115029_add_auto_canceled_by_id_foreign_key_to_ci_builds.rb
index 3004683933b..2ec281e20c1 100644
--- a/db/migrate/20170406115029_add_auto_canceled_by_id_foreign_key_to_ci_builds.rb
+++ b/db/migrate/20170406115029_add_auto_canceled_by_id_foreign_key_to_ci_builds.rb
@@ -1,4 +1,4 @@
-class AddAutoCanceledByIdForeignKeyToCiBuilds < ActiveRecord::Migration
+class AddAutoCanceledByIdForeignKeyToCiBuilds < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170407114956_add_ref_to_ci_trigger_schedule.rb b/db/migrate/20170407114956_add_ref_to_ci_trigger_schedule.rb
index 523a306f127..5d156b7ef2e 100644
--- a/db/migrate/20170407114956_add_ref_to_ci_trigger_schedule.rb
+++ b/db/migrate/20170407114956_add_ref_to_ci_trigger_schedule.rb
@@ -1,4 +1,4 @@
-class AddRefToCiTriggerSchedule < ActiveRecord::Migration
+class AddRefToCiTriggerSchedule < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170407122426_add_active_to_ci_trigger_schedule.rb b/db/migrate/20170407122426_add_active_to_ci_trigger_schedule.rb
index 36892118ac0..33295bd3f2e 100644
--- a/db/migrate/20170407122426_add_active_to_ci_trigger_schedule.rb
+++ b/db/migrate/20170407122426_add_active_to_ci_trigger_schedule.rb
@@ -1,4 +1,4 @@
-class AddActiveToCiTriggerSchedule < ActiveRecord::Migration
+class AddActiveToCiTriggerSchedule < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170407135259_add_foreigh_key_trigger_requests_trigger.rb b/db/migrate/20170407135259_add_foreigh_key_trigger_requests_trigger.rb
index 81761c65a9f..9aaa4d0eddf 100644
--- a/db/migrate/20170407135259_add_foreigh_key_trigger_requests_trigger.rb
+++ b/db/migrate/20170407135259_add_foreigh_key_trigger_requests_trigger.rb
@@ -1,4 +1,4 @@
-class AddForeighKeyTriggerRequestsTrigger < ActiveRecord::Migration
+class AddForeighKeyTriggerRequestsTrigger < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170407140450_add_index_to_next_run_at_and_active.rb b/db/migrate/20170407140450_add_index_to_next_run_at_and_active.rb
index 626c2a67fdc..0bde4f69b3b 100644
--- a/db/migrate/20170407140450_add_index_to_next_run_at_and_active.rb
+++ b/db/migrate/20170407140450_add_index_to_next_run_at_and_active.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddIndexToNextRunAtAndActive < ActiveRecord::Migration
+class AddIndexToNextRunAtAndActive < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170410133135_add_version_field_to_markdown_cache.rb b/db/migrate/20170410133135_add_version_field_to_markdown_cache.rb
index d9209fe5770..c019e0627d3 100644
--- a/db/migrate/20170410133135_add_version_field_to_markdown_cache.rb
+++ b/db/migrate/20170410133135_add_version_field_to_markdown_cache.rb
@@ -1,4 +1,4 @@
-class AddVersionFieldToMarkdownCache < ActiveRecord::Migration
+class AddVersionFieldToMarkdownCache < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170413035209_add_preferred_language_to_users.rb b/db/migrate/20170413035209_add_preferred_language_to_users.rb
index 92f1d6f2436..5b5f00ea60f 100644
--- a/db/migrate/20170413035209_add_preferred_language_to_users.rb
+++ b/db/migrate/20170413035209_add_preferred_language_to_users.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddPreferredLanguageToUsers < ActiveRecord::Migration
+class AddPreferredLanguageToUsers < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170418103908_delete_orphan_notification_settings.rb b/db/migrate/20170418103908_delete_orphan_notification_settings.rb
index e4b9cf65936..c99729b9127 100644
--- a/db/migrate/20170418103908_delete_orphan_notification_settings.rb
+++ b/db/migrate/20170418103908_delete_orphan_notification_settings.rb
@@ -1,4 +1,4 @@
-class DeleteOrphanNotificationSettings < ActiveRecord::Migration
+class DeleteOrphanNotificationSettings < ActiveRecord::Migration[4.2]
DOWNTIME = false
def up
diff --git a/db/migrate/20170419001229_add_index_to_system_note_metadata.rb b/db/migrate/20170419001229_add_index_to_system_note_metadata.rb
index c68fd920fff..59cd55395fc 100644
--- a/db/migrate/20170419001229_add_index_to_system_note_metadata.rb
+++ b/db/migrate/20170419001229_add_index_to_system_note_metadata.rb
@@ -1,4 +1,4 @@
-class AddIndexToSystemNoteMetadata < ActiveRecord::Migration
+class AddIndexToSystemNoteMetadata < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170421102337_remove_nil_type_services.rb b/db/migrate/20170421102337_remove_nil_type_services.rb
index b835b9c6ed9..561eddf69e0 100644
--- a/db/migrate/20170421102337_remove_nil_type_services.rb
+++ b/db/migrate/20170421102337_remove_nil_type_services.rb
@@ -1,4 +1,4 @@
-class RemoveNilTypeServices < ActiveRecord::Migration
+class RemoveNilTypeServices < ActiveRecord::Migration[4.2]
DOWNTIME = false
def up
diff --git a/db/migrate/20170423064036_add_index_on_ci_builds_updated_at.rb b/db/migrate/20170423064036_add_index_on_ci_builds_updated_at.rb
index 0bbb74ee05e..76252378c2e 100644
--- a/db/migrate/20170423064036_add_index_on_ci_builds_updated_at.rb
+++ b/db/migrate/20170423064036_add_index_on_ci_builds_updated_at.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddIndexOnCiBuildsUpdatedAt < ActiveRecord::Migration
+class AddIndexOnCiBuildsUpdatedAt < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170424095707_add_index_on_ci_builds_user_id.rb b/db/migrate/20170424095707_add_index_on_ci_builds_user_id.rb
index 348d5dbc270..ab2501da941 100644
--- a/db/migrate/20170424095707_add_index_on_ci_builds_user_id.rb
+++ b/db/migrate/20170424095707_add_index_on_ci_builds_user_id.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddIndexOnCiBuildsUserId < ActiveRecord::Migration
+class AddIndexOnCiBuildsUserId < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170424142900_add_index_to_web_hooks_type.rb b/db/migrate/20170424142900_add_index_to_web_hooks_type.rb
index 9af158e3844..1c56c1ed65a 100644
--- a/db/migrate/20170424142900_add_index_to_web_hooks_type.rb
+++ b/db/migrate/20170424142900_add_index_to_web_hooks_type.rb
@@ -1,4 +1,4 @@
-class AddIndexToWebHooksType < ActiveRecord::Migration
+class AddIndexToWebHooksType < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170425112128_create_pipeline_schedules_table.rb b/db/migrate/20170425112128_create_pipeline_schedules_table.rb
index bd15b9eef19..e66e81b34be 100644
--- a/db/migrate/20170425112128_create_pipeline_schedules_table.rb
+++ b/db/migrate/20170425112128_create_pipeline_schedules_table.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/Timestamps
-class CreatePipelineSchedulesTable < ActiveRecord::Migration
+class CreatePipelineSchedulesTable < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170425112628_remove_foreigh_key_ci_trigger_schedules.rb b/db/migrate/20170425112628_remove_foreigh_key_ci_trigger_schedules.rb
index 1587eee06ae..d89c4c61cbe 100644
--- a/db/migrate/20170425112628_remove_foreigh_key_ci_trigger_schedules.rb
+++ b/db/migrate/20170425112628_remove_foreigh_key_ci_trigger_schedules.rb
@@ -1,4 +1,4 @@
-class RemoveForeighKeyCiTriggerSchedules < ActiveRecord::Migration
+class RemoveForeighKeyCiTriggerSchedules < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170425114731_add_pipeline_schedule_id_to_pipelines.rb b/db/migrate/20170425114731_add_pipeline_schedule_id_to_pipelines.rb
index ddb27d4dc81..da16d89febc 100644
--- a/db/migrate/20170425114731_add_pipeline_schedule_id_to_pipelines.rb
+++ b/db/migrate/20170425114731_add_pipeline_schedule_id_to_pipelines.rb
@@ -1,4 +1,4 @@
-class AddPipelineScheduleIdToPipelines < ActiveRecord::Migration
+class AddPipelineScheduleIdToPipelines < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170426175636_fill_missing_uuid_on_application_settings.rb b/db/migrate/20170426175636_fill_missing_uuid_on_application_settings.rb
index 58ad2c64075..eeeb216f32c 100644
--- a/db/migrate/20170426175636_fill_missing_uuid_on_application_settings.rb
+++ b/db/migrate/20170426175636_fill_missing_uuid_on_application_settings.rb
@@ -1,4 +1,4 @@
-class FillMissingUuidOnApplicationSettings < ActiveRecord::Migration
+class FillMissingUuidOnApplicationSettings < ActiveRecord::Migration[4.2]
DOWNTIME = false
def up
diff --git a/db/migrate/20170426181740_add_index_on_ci_runners_contacted_at.rb b/db/migrate/20170426181740_add_index_on_ci_runners_contacted_at.rb
index 879825a1934..e14b2eb4c8a 100644
--- a/db/migrate/20170426181740_add_index_on_ci_runners_contacted_at.rb
+++ b/db/migrate/20170426181740_add_index_on_ci_runners_contacted_at.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddIndexOnCiRunnersContactedAt < ActiveRecord::Migration
+class AddIndexOnCiRunnersContactedAt < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170427103502_create_web_hook_logs.rb b/db/migrate/20170427103502_create_web_hook_logs.rb
index 3643c52180c..a7a061e7bae 100644
--- a/db/migrate/20170427103502_create_web_hook_logs.rb
+++ b/db/migrate/20170427103502_create_web_hook_logs.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class CreateWebHookLogs < ActiveRecord::Migration
+class CreateWebHookLogs < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20170427215854_create_redirect_routes.rb b/db/migrate/20170427215854_create_redirect_routes.rb
index 6db508e5db4..069c9b39d37 100644
--- a/db/migrate/20170427215854_create_redirect_routes.rb
+++ b/db/migrate/20170427215854_create_redirect_routes.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/Timestamps
-class CreateRedirectRoutes < ActiveRecord::Migration
+class CreateRedirectRoutes < ActiveRecord::Migration[4.2]
# Set this constant to true if this migration requires downtime.
DOWNTIME = false
diff --git a/db/migrate/20170428064307_add_column_delete_error_to_projects.rb b/db/migrate/20170428064307_add_column_delete_error_to_projects.rb
index 09f9d9b5b7a..bef0373309c 100644
--- a/db/migrate/20170428064307_add_column_delete_error_to_projects.rb
+++ b/db/migrate/20170428064307_add_column_delete_error_to_projects.rb
@@ -1,4 +1,4 @@
-class AddColumnDeleteErrorToProjects < ActiveRecord::Migration
+class AddColumnDeleteErrorToProjects < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20170502065653_make_auto_cancel_pending_pipelines_on_by_default.rb b/db/migrate/20170502065653_make_auto_cancel_pending_pipelines_on_by_default.rb
index 03bf626a08a..e51a790de4d 100644
--- a/db/migrate/20170502065653_make_auto_cancel_pending_pipelines_on_by_default.rb
+++ b/db/migrate/20170502065653_make_auto_cancel_pending_pipelines_on_by_default.rb
@@ -1,4 +1,4 @@
-class MakeAutoCancelPendingPipelinesOnByDefault < ActiveRecord::Migration
+class MakeAutoCancelPendingPipelinesOnByDefault < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170502135553_create_index_ci_pipelines_auto_canceled_by_id.rb b/db/migrate/20170502135553_create_index_ci_pipelines_auto_canceled_by_id.rb
index b64d7e0e3f6..7acae645c7b 100644
--- a/db/migrate/20170502135553_create_index_ci_pipelines_auto_canceled_by_id.rb
+++ b/db/migrate/20170502135553_create_index_ci_pipelines_auto_canceled_by_id.rb
@@ -1,4 +1,4 @@
-class CreateIndexCiPipelinesAutoCanceledById < ActiveRecord::Migration
+class CreateIndexCiPipelinesAutoCanceledById < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170502140503_create_index_ci_builds_auto_canceled_by_id.rb b/db/migrate/20170502140503_create_index_ci_builds_auto_canceled_by_id.rb
index 0a8d2c8ff61..f5148f6fdb8 100644
--- a/db/migrate/20170502140503_create_index_ci_builds_auto_canceled_by_id.rb
+++ b/db/migrate/20170502140503_create_index_ci_builds_auto_canceled_by_id.rb
@@ -1,4 +1,4 @@
-class CreateIndexCiBuildsAutoCanceledById < ActiveRecord::Migration
+class CreateIndexCiBuildsAutoCanceledById < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170503004125_add_last_repository_updated_at_to_projects.rb b/db/migrate/20170503004125_add_last_repository_updated_at_to_projects.rb
index 2ea49f62742..303250ff3b0 100644
--- a/db/migrate/20170503004125_add_last_repository_updated_at_to_projects.rb
+++ b/db/migrate/20170503004125_add_last_repository_updated_at_to_projects.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/Datetime
-class AddLastRepositoryUpdatedAtToProjects < ActiveRecord::Migration
+class AddLastRepositoryUpdatedAtToProjects < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20170503004425_add_index_to_last_repository_updated_at_on_projects.rb b/db/migrate/20170503004425_add_index_to_last_repository_updated_at_on_projects.rb
index 6144d74745c..ae54cfb39f5 100644
--- a/db/migrate/20170503004425_add_index_to_last_repository_updated_at_on_projects.rb
+++ b/db/migrate/20170503004425_add_index_to_last_repository_updated_at_on_projects.rb
@@ -1,4 +1,4 @@
-class AddIndexToLastRepositoryUpdatedAtOnProjects < ActiveRecord::Migration
+class AddIndexToLastRepositoryUpdatedAtOnProjects < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170503004426_add_retried_to_ci_build.rb b/db/migrate/20170503004426_add_retried_to_ci_build.rb
index 2851e3de473..ff2e0ba64c5 100644
--- a/db/migrate/20170503004426_add_retried_to_ci_build.rb
+++ b/db/migrate/20170503004426_add_retried_to_ci_build.rb
@@ -1,4 +1,4 @@
-class AddRetriedToCiBuild < ActiveRecord::Migration
+class AddRetriedToCiBuild < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170503021915_add_last_edited_at_and_last_edited_by_id_to_issues.rb b/db/migrate/20170503021915_add_last_edited_at_and_last_edited_by_id_to_issues.rb
index a5d1eca82bb..ef527bb8007 100644
--- a/db/migrate/20170503021915_add_last_edited_at_and_last_edited_by_id_to_issues.rb
+++ b/db/migrate/20170503021915_add_last_edited_at_and_last_edited_by_id_to_issues.rb
@@ -2,7 +2,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddLastEditedAtAndLastEditedByIdToIssues < ActiveRecord::Migration
+class AddLastEditedAtAndLastEditedByIdToIssues < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170503022548_add_last_edited_at_and_last_edited_by_id_to_merge_requests.rb b/db/migrate/20170503022548_add_last_edited_at_and_last_edited_by_id_to_merge_requests.rb
index 47ba6bde856..19b8a9d66e7 100644
--- a/db/migrate/20170503022548_add_last_edited_at_and_last_edited_by_id_to_merge_requests.rb
+++ b/db/migrate/20170503022548_add_last_edited_at_and_last_edited_by_id_to_merge_requests.rb
@@ -2,7 +2,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddLastEditedAtAndLastEditedByIdToMergeRequests < ActiveRecord::Migration
+class AddLastEditedAtAndLastEditedByIdToMergeRequests < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170503023315_add_repository_update_events_to_web_hooks.rb b/db/migrate/20170503023315_add_repository_update_events_to_web_hooks.rb
index 0faea87a962..4824c404ec7 100644
--- a/db/migrate/20170503023315_add_repository_update_events_to_web_hooks.rb
+++ b/db/migrate/20170503023315_add_repository_update_events_to_web_hooks.rb
@@ -1,4 +1,4 @@
-class AddRepositoryUpdateEventsToWebHooks < ActiveRecord::Migration
+class AddRepositoryUpdateEventsToWebHooks < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170503114228_add_description_to_snippets.rb b/db/migrate/20170503114228_add_description_to_snippets.rb
index 3fc960b2da5..78151ed9ff6 100644
--- a/db/migrate/20170503114228_add_description_to_snippets.rb
+++ b/db/migrate/20170503114228_add_description_to_snippets.rb
@@ -1,4 +1,4 @@
-class AddDescriptionToSnippets < ActiveRecord::Migration
+class AddDescriptionToSnippets < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170503140201_reschedule_project_authorizations.rb b/db/migrate/20170503140201_reschedule_project_authorizations.rb
index fa45adadbae..aa940bed2d3 100644
--- a/db/migrate/20170503140201_reschedule_project_authorizations.rb
+++ b/db/migrate/20170503140201_reschedule_project_authorizations.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RescheduleProjectAuthorizations < ActiveRecord::Migration
+class RescheduleProjectAuthorizations < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170503140202_turn_nested_groups_into_regular_groups_for_mysql.rb b/db/migrate/20170503140202_turn_nested_groups_into_regular_groups_for_mysql.rb
index 33908ae1156..cfa63b65df4 100644
--- a/db/migrate/20170503140202_turn_nested_groups_into_regular_groups_for_mysql.rb
+++ b/db/migrate/20170503140202_turn_nested_groups_into_regular_groups_for_mysql.rb
@@ -5,7 +5,7 @@
# updating a namespace to also rename directories (uploads, GitLab pages, etc).
# The alternative is to copy hundreds of lines of code into this migration,
# adjust them where needed, etc; something which doesn't work well at all.
-class TurnNestedGroupsIntoRegularGroupsForMysql < ActiveRecord::Migration
+class TurnNestedGroupsIntoRegularGroupsForMysql < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170503184421_add_index_to_redirect_routes.rb b/db/migrate/20170503184421_add_index_to_redirect_routes.rb
index 9062cf19a73..6320d4bbc99 100644
--- a/db/migrate/20170503184421_add_index_to_redirect_routes.rb
+++ b/db/migrate/20170503184421_add_index_to_redirect_routes.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddIndexToRedirectRoutes < ActiveRecord::Migration
+class AddIndexToRedirectRoutes < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170503185032_index_redirect_routes_path_for_like.rb b/db/migrate/20170503185032_index_redirect_routes_path_for_like.rb
index 8eb20faa03a..5d06fd0511c 100644
--- a/db/migrate/20170503185032_index_redirect_routes_path_for_like.rb
+++ b/db/migrate/20170503185032_index_redirect_routes_path_for_like.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class IndexRedirectRoutesPathForLike < ActiveRecord::Migration
+class IndexRedirectRoutesPathForLike < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170504102911_add_clientside_sentry_to_application_settings.rb b/db/migrate/20170504102911_add_clientside_sentry_to_application_settings.rb
index 141112f8b50..4659f694020 100644
--- a/db/migrate/20170504102911_add_clientside_sentry_to_application_settings.rb
+++ b/db/migrate/20170504102911_add_clientside_sentry_to_application_settings.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddClientsideSentryToApplicationSettings < ActiveRecord::Migration
+class AddClientsideSentryToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170504182103_add_index_project_group_links_group_id.rb b/db/migrate/20170504182103_add_index_project_group_links_group_id.rb
index 62bf641daa6..5b1c14e66dd 100644
--- a/db/migrate/20170504182103_add_index_project_group_links_group_id.rb
+++ b/db/migrate/20170504182103_add_index_project_group_links_group_id.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddIndexProjectGroupLinksGroupId < ActiveRecord::Migration
+class AddIndexProjectGroupLinksGroupId < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170506085040_add_index_to_pipeline_pipeline_schedule_id.rb b/db/migrate/20170506085040_add_index_to_pipeline_pipeline_schedule_id.rb
index 08a7f3fc9ab..9d8cc8a83a2 100644
--- a/db/migrate/20170506085040_add_index_to_pipeline_pipeline_schedule_id.rb
+++ b/db/migrate/20170506085040_add_index_to_pipeline_pipeline_schedule_id.rb
@@ -1,4 +1,4 @@
-class AddIndexToPipelinePipelineScheduleId < ActiveRecord::Migration
+class AddIndexToPipelinePipelineScheduleId < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170506091344_add_foreign_key_to_pipeline_schedules.rb b/db/migrate/20170506091344_add_foreign_key_to_pipeline_schedules.rb
index 7f2dba702af..244e41e2f07 100644
--- a/db/migrate/20170506091344_add_foreign_key_to_pipeline_schedules.rb
+++ b/db/migrate/20170506091344_add_foreign_key_to_pipeline_schedules.rb
@@ -1,4 +1,4 @@
-class AddForeignKeyToPipelineSchedules < ActiveRecord::Migration
+class AddForeignKeyToPipelineSchedules < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170506185517_add_foreign_key_pipeline_schedules_and_pipelines.rb b/db/migrate/20170506185517_add_foreign_key_pipeline_schedules_and_pipelines.rb
index cc5cb355579..50364cac259 100644
--- a/db/migrate/20170506185517_add_foreign_key_pipeline_schedules_and_pipelines.rb
+++ b/db/migrate/20170506185517_add_foreign_key_pipeline_schedules_and_pipelines.rb
@@ -1,4 +1,4 @@
-class AddForeignKeyPipelineSchedulesAndPipelines < ActiveRecord::Migration
+class AddForeignKeyPipelineSchedulesAndPipelines < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170507205316_add_head_pipeline_id_to_merge_requests.rb b/db/migrate/20170507205316_add_head_pipeline_id_to_merge_requests.rb
index 8fc6e380a77..adfe6559084 100644
--- a/db/migrate/20170507205316_add_head_pipeline_id_to_merge_requests.rb
+++ b/db/migrate/20170507205316_add_head_pipeline_id_to_merge_requests.rb
@@ -1,4 +1,4 @@
-class AddHeadPipelineIdToMergeRequests < ActiveRecord::Migration
+class AddHeadPipelineIdToMergeRequests < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20170508153950_add_not_null_contraints_to_ci_variables.rb b/db/migrate/20170508153950_add_not_null_contraints_to_ci_variables.rb
index 41c687a4f6e..2a0c7132bfd 100644
--- a/db/migrate/20170508153950_add_not_null_contraints_to_ci_variables.rb
+++ b/db/migrate/20170508153950_add_not_null_contraints_to_ci_variables.rb
@@ -1,4 +1,4 @@
-class AddNotNullContraintsToCiVariables < ActiveRecord::Migration
+class AddNotNullContraintsToCiVariables < ActiveRecord::Migration[4.2]
DOWNTIME = false
def up
diff --git a/db/migrate/20170508190732_add_foreign_key_to_ci_variables.rb b/db/migrate/20170508190732_add_foreign_key_to_ci_variables.rb
index 20ecaa2c36c..305366b2171 100644
--- a/db/migrate/20170508190732_add_foreign_key_to_ci_variables.rb
+++ b/db/migrate/20170508190732_add_foreign_key_to_ci_variables.rb
@@ -1,4 +1,4 @@
-class AddForeignKeyToCiVariables < ActiveRecord::Migration
+class AddForeignKeyToCiVariables < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170511082759_rename_web_hooks_build_events_to_job_events.rb b/db/migrate/20170511082759_rename_web_hooks_build_events_to_job_events.rb
index a2320a911b7..3a44057d948 100644
--- a/db/migrate/20170511082759_rename_web_hooks_build_events_to_job_events.rb
+++ b/db/migrate/20170511082759_rename_web_hooks_build_events_to_job_events.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RenameWebHooksBuildEventsToJobEvents < ActiveRecord::Migration
+class RenameWebHooksBuildEventsToJobEvents < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170511083824_rename_services_build_events_to_job_events.rb b/db/migrate/20170511083824_rename_services_build_events_to_job_events.rb
index 303d47078e7..713adde76ef 100644
--- a/db/migrate/20170511083824_rename_services_build_events_to_job_events.rb
+++ b/db/migrate/20170511083824_rename_services_build_events_to_job_events.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RenameServicesBuildEventsToJobEvents < ActiveRecord::Migration
+class RenameServicesBuildEventsToJobEvents < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170516153305_migrate_assignee_to_separate_table.rb b/db/migrate/20170516153305_migrate_assignee_to_separate_table.rb
index eed9f00d8b2..0ed45775421 100644
--- a/db/migrate/20170516153305_migrate_assignee_to_separate_table.rb
+++ b/db/migrate/20170516153305_migrate_assignee_to_separate_table.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class MigrateAssigneeToSeparateTable < ActiveRecord::Migration
+class MigrateAssigneeToSeparateTable < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170516183131_add_indices_to_issue_assignees.rb b/db/migrate/20170516183131_add_indices_to_issue_assignees.rb
index a1f064c6848..6877fe9ff98 100644
--- a/db/migrate/20170516183131_add_indices_to_issue_assignees.rb
+++ b/db/migrate/20170516183131_add_indices_to_issue_assignees.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddIndicesToIssueAssignees < ActiveRecord::Migration
+class AddIndicesToIssueAssignees < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170519102115_add_prometheus_settings_to_metrics_settings.rb b/db/migrate/20170519102115_add_prometheus_settings_to_metrics_settings.rb
index 6ec2ed712b9..9c8f58104bd 100644
--- a/db/migrate/20170519102115_add_prometheus_settings_to_metrics_settings.rb
+++ b/db/migrate/20170519102115_add_prometheus_settings_to_metrics_settings.rb
@@ -1,4 +1,4 @@
-class AddPrometheusSettingsToMetricsSettings < ActiveRecord::Migration
+class AddPrometheusSettingsToMetricsSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20170521184006_add_change_position_to_notes.rb b/db/migrate/20170521184006_add_change_position_to_notes.rb
index 219ed1ade4c..f0ca3a2a9ea 100644
--- a/db/migrate/20170521184006_add_change_position_to_notes.rb
+++ b/db/migrate/20170521184006_add_change_position_to_notes.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddChangePositionToNotes < ActiveRecord::Migration
+class AddChangePositionToNotes < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170523091700_add_rss_token_to_users.rb b/db/migrate/20170523091700_add_rss_token_to_users.rb
index 06a85f6ac3d..e1bcd9b3fee 100644
--- a/db/migrate/20170523091700_add_rss_token_to_users.rb
+++ b/db/migrate/20170523091700_add_rss_token_to_users.rb
@@ -1,4 +1,4 @@
-class AddRssTokenToUsers < ActiveRecord::Migration
+class AddRssTokenToUsers < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170523121229_create_conversational_development_index_metrics.rb b/db/migrate/20170523121229_create_conversational_development_index_metrics.rb
index 7026a867ae1..5f8c0d07e3c 100644
--- a/db/migrate/20170523121229_create_conversational_development_index_metrics.rb
+++ b/db/migrate/20170523121229_create_conversational_development_index_metrics.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/Timestamps
-class CreateConversationalDevelopmentIndexMetrics < ActiveRecord::Migration
+class CreateConversationalDevelopmentIndexMetrics < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20170524125940_add_source_to_ci_pipeline.rb b/db/migrate/20170524125940_add_source_to_ci_pipeline.rb
index 1fa3d48037b..81358e7ce3d 100644
--- a/db/migrate/20170524125940_add_source_to_ci_pipeline.rb
+++ b/db/migrate/20170524125940_add_source_to_ci_pipeline.rb
@@ -1,4 +1,4 @@
-class AddSourceToCiPipeline < ActiveRecord::Migration
+class AddSourceToCiPipeline < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170524161101_add_protected_to_ci_variables.rb b/db/migrate/20170524161101_add_protected_to_ci_variables.rb
index 99d4861e889..6125ea5d5a8 100644
--- a/db/migrate/20170524161101_add_protected_to_ci_variables.rb
+++ b/db/migrate/20170524161101_add_protected_to_ci_variables.rb
@@ -1,4 +1,4 @@
-class AddProtectedToCiVariables < ActiveRecord::Migration
+class AddProtectedToCiVariables < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170525130346_create_group_variables_table.rb b/db/migrate/20170525130346_create_group_variables_table.rb
index eaa38dbc40d..6eae7eff7bd 100644
--- a/db/migrate/20170525130346_create_group_variables_table.rb
+++ b/db/migrate/20170525130346_create_group_variables_table.rb
@@ -1,4 +1,4 @@
-class CreateGroupVariablesTable < ActiveRecord::Migration
+class CreateGroupVariablesTable < ActiveRecord::Migration[4.2]
DOWNTIME = false
def up
diff --git a/db/migrate/20170525130758_add_foreign_key_to_group_variables.rb b/db/migrate/20170525130758_add_foreign_key_to_group_variables.rb
index 0146235c5ba..f1f51a1dda3 100644
--- a/db/migrate/20170525130758_add_foreign_key_to_group_variables.rb
+++ b/db/migrate/20170525130758_add_foreign_key_to_group_variables.rb
@@ -1,4 +1,4 @@
-class AddForeignKeyToGroupVariables < ActiveRecord::Migration
+class AddForeignKeyToGroupVariables < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170525132202_create_pipeline_stages.rb b/db/migrate/20170525132202_create_pipeline_stages.rb
index 825993aa41e..0a6400fde90 100644
--- a/db/migrate/20170525132202_create_pipeline_stages.rb
+++ b/db/migrate/20170525132202_create_pipeline_stages.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/Timestamps
-class CreatePipelineStages < ActiveRecord::Migration
+class CreatePipelineStages < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170525174156_create_feature_tables.rb b/db/migrate/20170525174156_create_feature_tables.rb
index a083c89c85f..e1eaaff8d35 100644
--- a/db/migrate/20170525174156_create_feature_tables.rb
+++ b/db/migrate/20170525174156_create_feature_tables.rb
@@ -1,4 +1,4 @@
-class CreateFeatureTables < ActiveRecord::Migration
+class CreateFeatureTables < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170526185602_add_stage_id_to_ci_builds.rb b/db/migrate/20170526185602_add_stage_id_to_ci_builds.rb
index d27cba76d81..6958557d118 100644
--- a/db/migrate/20170526185602_add_stage_id_to_ci_builds.rb
+++ b/db/migrate/20170526185602_add_stage_id_to_ci_builds.rb
@@ -1,4 +1,4 @@
-class AddStageIdToCiBuilds < ActiveRecord::Migration
+class AddStageIdToCiBuilds < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170530130129_project_foreign_keys_with_cascading_deletes.rb b/db/migrate/20170530130129_project_foreign_keys_with_cascading_deletes.rb
index 12352d98a62..d40c61f24b1 100644
--- a/db/migrate/20170530130129_project_foreign_keys_with_cascading_deletes.rb
+++ b/db/migrate/20170530130129_project_foreign_keys_with_cascading_deletes.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class ProjectForeignKeysWithCascadingDeletes < ActiveRecord::Migration
+class ProjectForeignKeysWithCascadingDeletes < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170531180233_add_authorized_keys_enabled_to_application_settings.rb b/db/migrate/20170531180233_add_authorized_keys_enabled_to_application_settings.rb
index 1d86a531eb3..f440609ff8a 100644
--- a/db/migrate/20170531180233_add_authorized_keys_enabled_to_application_settings.rb
+++ b/db/migrate/20170531180233_add_authorized_keys_enabled_to_application_settings.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddAuthorizedKeysEnabledToApplicationSettings < ActiveRecord::Migration
+class AddAuthorizedKeysEnabledToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170531202042_rename_users_ldap_email_to_external_email.rb b/db/migrate/20170531202042_rename_users_ldap_email_to_external_email.rb
index f858611d24b..7b1a7644555 100644
--- a/db/migrate/20170531202042_rename_users_ldap_email_to_external_email.rb
+++ b/db/migrate/20170531202042_rename_users_ldap_email_to_external_email.rb
@@ -1,4 +1,4 @@
-class RenameUsersLdapEmailToExternalEmail < ActiveRecord::Migration
+class RenameUsersLdapEmailToExternalEmail < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170601163708_add_artifacts_store_to_ci_build.rb b/db/migrate/20170601163708_add_artifacts_store_to_ci_build.rb
index e82109190a7..4c9ac821b20 100644
--- a/db/migrate/20170601163708_add_artifacts_store_to_ci_build.rb
+++ b/db/migrate/20170601163708_add_artifacts_store_to_ci_build.rb
@@ -1,4 +1,4 @@
-class AddArtifactsStoreToCiBuild < ActiveRecord::Migration
+class AddArtifactsStoreToCiBuild < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170602154736_add_help_page_hide_commercial_content_to_application_settings.rb b/db/migrate/20170602154736_add_help_page_hide_commercial_content_to_application_settings.rb
index d358020d182..ff9e188d7a8 100644
--- a/db/migrate/20170602154736_add_help_page_hide_commercial_content_to_application_settings.rb
+++ b/db/migrate/20170602154736_add_help_page_hide_commercial_content_to_application_settings.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/SaferBooleanColumn
-class AddHelpPageHideCommercialContentToApplicationSettings < ActiveRecord::Migration
+class AddHelpPageHideCommercialContentToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170602154813_add_help_page_support_url_to_application_settings.rb b/db/migrate/20170602154813_add_help_page_support_url_to_application_settings.rb
index 138fe9b2a37..388e130ab88 100644
--- a/db/migrate/20170602154813_add_help_page_support_url_to_application_settings.rb
+++ b/db/migrate/20170602154813_add_help_page_support_url_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddHelpPageSupportUrlToApplicationSettings < ActiveRecord::Migration
+class AddHelpPageSupportUrlToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170603200744_add_email_provider_to_users.rb b/db/migrate/20170603200744_add_email_provider_to_users.rb
index ed90af9aadc..ad6e813d31b 100644
--- a/db/migrate/20170603200744_add_email_provider_to_users.rb
+++ b/db/migrate/20170603200744_add_email_provider_to_users.rb
@@ -1,4 +1,4 @@
-class AddEmailProviderToUsers < ActiveRecord::Migration
+class AddEmailProviderToUsers < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170606154216_add_notification_setting_columns.rb b/db/migrate/20170606154216_add_notification_setting_columns.rb
index 0a9b5da6583..3b9493e6b49 100644
--- a/db/migrate/20170606154216_add_notification_setting_columns.rb
+++ b/db/migrate/20170606154216_add_notification_setting_columns.rb
@@ -1,4 +1,4 @@
-class AddNotificationSettingColumns < ActiveRecord::Migration
+class AddNotificationSettingColumns < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170608152747_prepare_events_table_for_push_events_migration.rb b/db/migrate/20170608152747_prepare_events_table_for_push_events_migration.rb
index f4f03bbabaf..851af7f7bf6 100644
--- a/db/migrate/20170608152747_prepare_events_table_for_push_events_migration.rb
+++ b/db/migrate/20170608152747_prepare_events_table_for_push_events_migration.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class PrepareEventsTableForPushEventsMigration < ActiveRecord::Migration
+class PrepareEventsTableForPushEventsMigration < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170608152748_create_push_event_payloads_tables.rb b/db/migrate/20170608152748_create_push_event_payloads_tables.rb
index 6c55ad1f2f7..292d9e3ca06 100644
--- a/db/migrate/20170608152748_create_push_event_payloads_tables.rb
+++ b/db/migrate/20170608152748_create_push_event_payloads_tables.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class CreatePushEventPayloadsTables < ActiveRecord::Migration
+class CreatePushEventPayloadsTables < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170608171156_create_merge_request_diff_files.rb b/db/migrate/20170608171156_create_merge_request_diff_files.rb
index bf0c0d29adc..94b518455ee 100644
--- a/db/migrate/20170608171156_create_merge_request_diff_files.rb
+++ b/db/migrate/20170608171156_create_merge_request_diff_files.rb
@@ -1,4 +1,4 @@
-class CreateMergeRequestDiffFiles < ActiveRecord::Migration
+class CreateMergeRequestDiffFiles < ActiveRecord::Migration[4.2]
DOWNTIME = false
disable_ddl_transaction!
diff --git a/db/migrate/20170613154149_create_gpg_signatures.rb b/db/migrate/20170613154149_create_gpg_signatures.rb
index abef13a7a0b..181d35fe7af 100644
--- a/db/migrate/20170613154149_create_gpg_signatures.rb
+++ b/db/migrate/20170613154149_create_gpg_signatures.rb
@@ -1,4 +1,4 @@
-class CreateGpgSignatures < ActiveRecord::Migration
+class CreateGpgSignatures < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170616133147_create_merge_request_diff_commits.rb b/db/migrate/20170616133147_create_merge_request_diff_commits.rb
index 616464cb470..5e148affba2 100644
--- a/db/migrate/20170616133147_create_merge_request_diff_commits.rb
+++ b/db/migrate/20170616133147_create_merge_request_diff_commits.rb
@@ -1,4 +1,4 @@
-class CreateMergeRequestDiffCommits < ActiveRecord::Migration
+class CreateMergeRequestDiffCommits < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20170619144837_add_index_for_head_pipeline_merge_request.rb b/db/migrate/20170619144837_add_index_for_head_pipeline_merge_request.rb
index 02863bee082..f97c8a14b8d 100644
--- a/db/migrate/20170619144837_add_index_for_head_pipeline_merge_request.rb
+++ b/db/migrate/20170619144837_add_index_for_head_pipeline_merge_request.rb
@@ -1,4 +1,4 @@
-class AddIndexForHeadPipelineMergeRequest < ActiveRecord::Migration
+class AddIndexForHeadPipelineMergeRequest < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170620064728_create_ci_pipeline_schedule_variables.rb b/db/migrate/20170620064728_create_ci_pipeline_schedule_variables.rb
index 92833765a82..74f3603505b 100644
--- a/db/migrate/20170620064728_create_ci_pipeline_schedule_variables.rb
+++ b/db/migrate/20170620064728_create_ci_pipeline_schedule_variables.rb
@@ -1,4 +1,4 @@
-class CreateCiPipelineScheduleVariables < ActiveRecord::Migration
+class CreateCiPipelineScheduleVariables < ActiveRecord::Migration[4.2]
DOWNTIME = false
def up
diff --git a/db/migrate/20170620065449_add_foreign_key_to_ci_pipeline_schedule_variables.rb b/db/migrate/20170620065449_add_foreign_key_to_ci_pipeline_schedule_variables.rb
index 7bbf66e0ac3..f6de19aeaf2 100644
--- a/db/migrate/20170620065449_add_foreign_key_to_ci_pipeline_schedule_variables.rb
+++ b/db/migrate/20170620065449_add_foreign_key_to_ci_pipeline_schedule_variables.rb
@@ -1,4 +1,4 @@
-class AddForeignKeyToCiPipelineScheduleVariables < ActiveRecord::Migration
+class AddForeignKeyToCiPipelineScheduleVariables < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170622130029_correct_protected_branches_foreign_keys.rb b/db/migrate/20170622130029_correct_protected_branches_foreign_keys.rb
index 46497775527..c4ba3ec2cc0 100644
--- a/db/migrate/20170622130029_correct_protected_branches_foreign_keys.rb
+++ b/db/migrate/20170622130029_correct_protected_branches_foreign_keys.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class CorrectProtectedBranchesForeignKeys < ActiveRecord::Migration
+class CorrectProtectedBranchesForeignKeys < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170622132212_add_foreign_key_for_merge_request_diffs.rb b/db/migrate/20170622132212_add_foreign_key_for_merge_request_diffs.rb
index 9f524fac8a7..b826f67ff39 100644
--- a/db/migrate/20170622132212_add_foreign_key_for_merge_request_diffs.rb
+++ b/db/migrate/20170622132212_add_foreign_key_for_merge_request_diffs.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddForeignKeyForMergeRequestDiffs < ActiveRecord::Migration
+class AddForeignKeyForMergeRequestDiffs < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170622135451_rename_duplicated_variable_key.rb b/db/migrate/20170622135451_rename_duplicated_variable_key.rb
index 368718ab0ce..06a9529ae79 100644
--- a/db/migrate/20170622135451_rename_duplicated_variable_key.rb
+++ b/db/migrate/20170622135451_rename_duplicated_variable_key.rb
@@ -1,4 +1,4 @@
-class RenameDuplicatedVariableKey < ActiveRecord::Migration
+class RenameDuplicatedVariableKey < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170622135628_add_environment_scope_to_ci_variables.rb b/db/migrate/20170622135628_add_environment_scope_to_ci_variables.rb
index 17fe062d8d5..8fbb2ab57d5 100644
--- a/db/migrate/20170622135628_add_environment_scope_to_ci_variables.rb
+++ b/db/migrate/20170622135628_add_environment_scope_to_ci_variables.rb
@@ -1,4 +1,4 @@
-class AddEnvironmentScopeToCiVariables < ActiveRecord::Migration
+class AddEnvironmentScopeToCiVariables < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170622135728_add_unique_constraint_to_ci_variables.rb b/db/migrate/20170622135728_add_unique_constraint_to_ci_variables.rb
index 787022b7bfe..240f55766d3 100644
--- a/db/migrate/20170622135728_add_unique_constraint_to_ci_variables.rb
+++ b/db/migrate/20170622135728_add_unique_constraint_to_ci_variables.rb
@@ -1,4 +1,4 @@
-class AddUniqueConstraintToCiVariables < ActiveRecord::Migration
+class AddUniqueConstraintToCiVariables < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170622162730_add_ref_fetched_to_merge_request.rb b/db/migrate/20170622162730_add_ref_fetched_to_merge_request.rb
index 62aa1a4b4f0..4715ff7a715 100644
--- a/db/migrate/20170622162730_add_ref_fetched_to_merge_request.rb
+++ b/db/migrate/20170622162730_add_ref_fetched_to_merge_request.rb
@@ -1,4 +1,4 @@
-class AddRefFetchedToMergeRequest < ActiveRecord::Migration
+class AddRefFetchedToMergeRequest < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170623080805_remove_ci_variables_project_id_index.rb b/db/migrate/20170623080805_remove_ci_variables_project_id_index.rb
index ddcc0292b9d..861dbd2ee14 100644
--- a/db/migrate/20170623080805_remove_ci_variables_project_id_index.rb
+++ b/db/migrate/20170623080805_remove_ci_variables_project_id_index.rb
@@ -1,4 +1,4 @@
-class RemoveCiVariablesProjectIdIndex < ActiveRecord::Migration
+class RemoveCiVariablesProjectIdIndex < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170629171610_rename_application_settings_signin_enabled_to_password_authentication_enabled.rb b/db/migrate/20170629171610_rename_application_settings_signin_enabled_to_password_authentication_enabled.rb
index 858b3bebace..1651a47ebec 100644
--- a/db/migrate/20170629171610_rename_application_settings_signin_enabled_to_password_authentication_enabled.rb
+++ b/db/migrate/20170629171610_rename_application_settings_signin_enabled_to_password_authentication_enabled.rb
@@ -1,4 +1,4 @@
-class RenameApplicationSettingsSigninEnabledToPasswordAuthenticationEnabled < ActiveRecord::Migration
+class RenameApplicationSettingsSigninEnabledToPasswordAuthenticationEnabled < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170703102400_add_stage_id_foreign_key_to_builds.rb b/db/migrate/20170703102400_add_stage_id_foreign_key_to_builds.rb
index a89d348b127..36ac360fb0b 100644
--- a/db/migrate/20170703102400_add_stage_id_foreign_key_to_builds.rb
+++ b/db/migrate/20170703102400_add_stage_id_foreign_key_to_builds.rb
@@ -1,4 +1,4 @@
-class AddStageIdForeignKeyToBuilds < ActiveRecord::Migration
+class AddStageIdForeignKeyToBuilds < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170706151212_add_performance_bar_allowed_group_id_to_application_settings.rb b/db/migrate/20170706151212_add_performance_bar_allowed_group_id_to_application_settings.rb
index fe9970ddc71..61416f74b63 100644
--- a/db/migrate/20170706151212_add_performance_bar_allowed_group_id_to_application_settings.rb
+++ b/db/migrate/20170706151212_add_performance_bar_allowed_group_id_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddPerformanceBarAllowedGroupIdToApplicationSettings < ActiveRecord::Migration
+class AddPerformanceBarAllowedGroupIdToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170707183807_add_group_id_to_milestones.rb b/db/migrate/20170707183807_add_group_id_to_milestones.rb
index 675ffd4a1c9..e778a30192f 100644
--- a/db/migrate/20170707183807_add_group_id_to_milestones.rb
+++ b/db/migrate/20170707183807_add_group_id_to_milestones.rb
@@ -1,4 +1,4 @@
-class AddGroupIdToMilestones < ActiveRecord::Migration
+class AddGroupIdToMilestones < ActiveRecord::Migration[4.2]
DOWNTIME = false
def up
diff --git a/db/migrate/20170707184243_add_group_milestone_id_indexes.rb b/db/migrate/20170707184243_add_group_milestone_id_indexes.rb
index aa48fe90cad..545ee070194 100644
--- a/db/migrate/20170707184243_add_group_milestone_id_indexes.rb
+++ b/db/migrate/20170707184243_add_group_milestone_id_indexes.rb
@@ -1,4 +1,4 @@
-class AddGroupMilestoneIdIndexes < ActiveRecord::Migration
+class AddGroupMilestoneIdIndexes < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20170707184244_remove_wrong_versions_from_schema_versions.rb b/db/migrate/20170707184244_remove_wrong_versions_from_schema_versions.rb
index 38536a8b06a..f99206c7f78 100644
--- a/db/migrate/20170707184244_remove_wrong_versions_from_schema_versions.rb
+++ b/db/migrate/20170707184244_remove_wrong_versions_from_schema_versions.rb
@@ -1,4 +1,4 @@
-class RemoveWrongVersionsFromSchemaVersions < ActiveRecord::Migration
+class RemoveWrongVersionsFromSchemaVersions < ActiveRecord::Migration[4.2]
DOWNTIME = false
def up
diff --git a/db/migrate/20170710083355_clean_stage_id_reference_migration.rb b/db/migrate/20170710083355_clean_stage_id_reference_migration.rb
index 681203eaf40..d33c6f53b15 100644
--- a/db/migrate/20170710083355_clean_stage_id_reference_migration.rb
+++ b/db/migrate/20170710083355_clean_stage_id_reference_migration.rb
@@ -1,4 +1,4 @@
-class CleanStageIdReferenceMigration < ActiveRecord::Migration
+class CleanStageIdReferenceMigration < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170711145320_add_status_to_ci_stages.rb b/db/migrate/20170711145320_add_status_to_ci_stages.rb
index d497a61a959..3ea7b750882 100644
--- a/db/migrate/20170711145320_add_status_to_ci_stages.rb
+++ b/db/migrate/20170711145320_add_status_to_ci_stages.rb
@@ -1,4 +1,4 @@
-class AddStatusToCiStages < ActiveRecord::Migration
+class AddStatusToCiStages < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170713104829_add_foreign_key_to_merge_requests.rb b/db/migrate/20170713104829_add_foreign_key_to_merge_requests.rb
index c409915ceed..908b122c659 100644
--- a/db/migrate/20170713104829_add_foreign_key_to_merge_requests.rb
+++ b/db/migrate/20170713104829_add_foreign_key_to_merge_requests.rb
@@ -1,4 +1,4 @@
-class AddForeignKeyToMergeRequests < ActiveRecord::Migration
+class AddForeignKeyToMergeRequests < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170717074009_move_system_upload_folder.rb b/db/migrate/20170717074009_move_system_upload_folder.rb
index d3caa53a7a4..6c57a751c8d 100644
--- a/db/migrate/20170717074009_move_system_upload_folder.rb
+++ b/db/migrate/20170717074009_move_system_upload_folder.rb
@@ -1,4 +1,4 @@
-class MoveSystemUploadFolder < ActiveRecord::Migration
+class MoveSystemUploadFolder < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20170717200542_add_trusted_column_to_oauth_applications.rb b/db/migrate/20170717200542_add_trusted_column_to_oauth_applications.rb
index 1a013e6aefb..d9ae86f6c52 100644
--- a/db/migrate/20170717200542_add_trusted_column_to_oauth_applications.rb
+++ b/db/migrate/20170717200542_add_trusted_column_to_oauth_applications.rb
@@ -1,4 +1,4 @@
-class AddTrustedColumnToOauthApplications < ActiveRecord::Migration
+class AddTrustedColumnToOauthApplications < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170720111708_add_lock_version_to_ci_stages.rb b/db/migrate/20170720111708_add_lock_version_to_ci_stages.rb
index e1c4f033286..a5caca7e80c 100644
--- a/db/migrate/20170720111708_add_lock_version_to_ci_stages.rb
+++ b/db/migrate/20170720111708_add_lock_version_to_ci_stages.rb
@@ -1,4 +1,4 @@
-class AddLockVersionToCiStages < ActiveRecord::Migration
+class AddLockVersionToCiStages < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170720122741_create_user_custom_attributes.rb b/db/migrate/20170720122741_create_user_custom_attributes.rb
index b1c0bebc633..0e6f37d7317 100644
--- a/db/migrate/20170720122741_create_user_custom_attributes.rb
+++ b/db/migrate/20170720122741_create_user_custom_attributes.rb
@@ -1,4 +1,4 @@
-class CreateUserCustomAttributes < ActiveRecord::Migration
+class CreateUserCustomAttributes < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170720130522_create_ci_pipeline_variables.rb b/db/migrate/20170720130522_create_ci_pipeline_variables.rb
index a784f5dd142..4f162d46cf5 100644
--- a/db/migrate/20170720130522_create_ci_pipeline_variables.rb
+++ b/db/migrate/20170720130522_create_ci_pipeline_variables.rb
@@ -1,4 +1,4 @@
-class CreateCiPipelineVariables < ActiveRecord::Migration
+class CreateCiPipelineVariables < ActiveRecord::Migration[4.2]
DOWNTIME = false
def up
diff --git a/db/migrate/20170720130749_add_foreign_key_to_ci_pipeline_variables.rb b/db/migrate/20170720130749_add_foreign_key_to_ci_pipeline_variables.rb
index 550b8a88f02..df9350d9ad5 100644
--- a/db/migrate/20170720130749_add_foreign_key_to_ci_pipeline_variables.rb
+++ b/db/migrate/20170720130749_add_foreign_key_to_ci_pipeline_variables.rb
@@ -1,4 +1,4 @@
-class AddForeignKeyToCiPipelineVariables < ActiveRecord::Migration
+class AddForeignKeyToCiPipelineVariables < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170724214302_add_lower_path_index_to_redirect_routes.rb b/db/migrate/20170724214302_add_lower_path_index_to_redirect_routes.rb
index a770ff63b4e..1a6516f8777 100644
--- a/db/migrate/20170724214302_add_lower_path_index_to_redirect_routes.rb
+++ b/db/migrate/20170724214302_add_lower_path_index_to_redirect_routes.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddLowerPathIndexToRedirectRoutes < ActiveRecord::Migration
+class AddLowerPathIndexToRedirectRoutes < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170725145659_add_binary_to_merge_request_diff_files.rb b/db/migrate/20170725145659_add_binary_to_merge_request_diff_files.rb
index 1f5fa7e3d49..c7d377547e4 100644
--- a/db/migrate/20170725145659_add_binary_to_merge_request_diff_files.rb
+++ b/db/migrate/20170725145659_add_binary_to_merge_request_diff_files.rb
@@ -1,4 +1,4 @@
-class AddBinaryToMergeRequestDiffFiles < ActiveRecord::Migration
+class AddBinaryToMergeRequestDiffFiles < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170727123534_add_index_on_events_project_id_id.rb b/db/migrate/20170727123534_add_index_on_events_project_id_id.rb
index 1c4aaaf9dd6..076b8ee87b2 100644
--- a/db/migrate/20170727123534_add_index_on_events_project_id_id.rb
+++ b/db/migrate/20170727123534_add_index_on_events_project_id_id.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddIndexOnEventsProjectIdId < ActiveRecord::Migration
+class AddIndexOnEventsProjectIdId < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170731175128_add_percentages_to_conv_dev.rb b/db/migrate/20170731175128_add_percentages_to_conv_dev.rb
index 1819bfc96bb..522e99c0751 100644
--- a/db/migrate/20170731175128_add_percentages_to_conv_dev.rb
+++ b/db/migrate/20170731175128_add_percentages_to_conv_dev.rb
@@ -1,4 +1,4 @@
-class AddPercentagesToConvDev < ActiveRecord::Migration
+class AddPercentagesToConvDev < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20170731183033_add_merge_jid_to_merge_requests.rb b/db/migrate/20170731183033_add_merge_jid_to_merge_requests.rb
index a7d8f2f3604..3c677f3bc2d 100644
--- a/db/migrate/20170731183033_add_merge_jid_to_merge_requests.rb
+++ b/db/migrate/20170731183033_add_merge_jid_to_merge_requests.rb
@@ -1,4 +1,4 @@
-class AddMergeJidToMergeRequests < ActiveRecord::Migration
+class AddMergeJidToMergeRequests < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20170802013652_add_storage_fields_to_project.rb b/db/migrate/20170802013652_add_storage_fields_to_project.rb
index c2381a9d0b2..d6672b9b3af 100644
--- a/db/migrate/20170802013652_add_storage_fields_to_project.rb
+++ b/db/migrate/20170802013652_add_storage_fields_to_project.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddStorageFieldsToProject < ActiveRecord::Migration
+class AddStorageFieldsToProject < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170803130232_reorganise_issues_indexes_for_faster_sorting.rb b/db/migrate/20170803130232_reorganise_issues_indexes_for_faster_sorting.rb
index eb7d1be1732..e92b5f28685 100644
--- a/db/migrate/20170803130232_reorganise_issues_indexes_for_faster_sorting.rb
+++ b/db/migrate/20170803130232_reorganise_issues_indexes_for_faster_sorting.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class ReorganiseIssuesIndexesForFasterSorting < ActiveRecord::Migration
+class ReorganiseIssuesIndexesForFasterSorting < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170807071105_add_hashed_storage_to_settings.rb b/db/migrate/20170807071105_add_hashed_storage_to_settings.rb
index 0846557add8..cfb89743127 100644
--- a/db/migrate/20170807071105_add_hashed_storage_to_settings.rb
+++ b/db/migrate/20170807071105_add_hashed_storage_to_settings.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddHashedStorageToSettings < ActiveRecord::Migration
+class AddHashedStorageToSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170809133343_add_broadcast_messages_index.rb b/db/migrate/20170809133343_add_broadcast_messages_index.rb
index 4ab2ddb059d..bcbc6c9f7d2 100644
--- a/db/migrate/20170809133343_add_broadcast_messages_index.rb
+++ b/db/migrate/20170809133343_add_broadcast_messages_index.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddBroadcastMessagesIndex < ActiveRecord::Migration
+class AddBroadcastMessagesIndex < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170809134534_add_broadcast_message_not_null_constraints.rb b/db/migrate/20170809134534_add_broadcast_message_not_null_constraints.rb
index 5551fb51a6e..fd8cdbb95aa 100644
--- a/db/migrate/20170809134534_add_broadcast_message_not_null_constraints.rb
+++ b/db/migrate/20170809134534_add_broadcast_message_not_null_constraints.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddBroadcastMessageNotNullConstraints < ActiveRecord::Migration
+class AddBroadcastMessageNotNullConstraints < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170809142252_cleanup_appearances_schema.rb b/db/migrate/20170809142252_cleanup_appearances_schema.rb
index acf45060114..4c5d6a6d75d 100644
--- a/db/migrate/20170809142252_cleanup_appearances_schema.rb
+++ b/db/migrate/20170809142252_cleanup_appearances_schema.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class CleanupAppearancesSchema < ActiveRecord::Migration
+class CleanupAppearancesSchema < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170809161910_add_project_export_enabled_to_application_settings.rb b/db/migrate/20170809161910_add_project_export_enabled_to_application_settings.rb
index 4baba1ade6d..9dd520de264 100644
--- a/db/migrate/20170809161910_add_project_export_enabled_to_application_settings.rb
+++ b/db/migrate/20170809161910_add_project_export_enabled_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddProjectExportEnabledToApplicationSettings < ActiveRecord::Migration
+class AddProjectExportEnabledToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20170815221154_add_discussion_locked_to_issuable.rb b/db/migrate/20170815221154_add_discussion_locked_to_issuable.rb
index 5bd777c53a0..1444ca480b3 100644
--- a/db/migrate/20170815221154_add_discussion_locked_to_issuable.rb
+++ b/db/migrate/20170815221154_add_discussion_locked_to_issuable.rb
@@ -1,4 +1,4 @@
-class AddDiscussionLockedToIssuable < ActiveRecord::Migration
+class AddDiscussionLockedToIssuable < ActiveRecord::Migration[4.2]
DOWNTIME = false
def up
diff --git a/db/migrate/20170816133938_add_access_level_to_ci_runners.rb b/db/migrate/20170816133938_add_access_level_to_ci_runners.rb
index fc484730f42..5a1ea9514d1 100644
--- a/db/migrate/20170816133938_add_access_level_to_ci_runners.rb
+++ b/db/migrate/20170816133938_add_access_level_to_ci_runners.rb
@@ -1,4 +1,4 @@
-class AddAccessLevelToCiRunners < ActiveRecord::Migration
+class AddAccessLevelToCiRunners < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170816133940_add_protected_to_ci_builds.rb b/db/migrate/20170816133940_add_protected_to_ci_builds.rb
index c73a4387d29..13e1be0d89c 100644
--- a/db/migrate/20170816133940_add_protected_to_ci_builds.rb
+++ b/db/migrate/20170816133940_add_protected_to_ci_builds.rb
@@ -1,4 +1,4 @@
-class AddProtectedToCiBuilds < ActiveRecord::Migration
+class AddProtectedToCiBuilds < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20170816143940_add_protected_to_ci_pipelines.rb b/db/migrate/20170816143940_add_protected_to_ci_pipelines.rb
index ce8f1e03686..aefaf4a487b 100644
--- a/db/migrate/20170816143940_add_protected_to_ci_pipelines.rb
+++ b/db/migrate/20170816143940_add_protected_to_ci_pipelines.rb
@@ -1,4 +1,4 @@
-class AddProtectedToCiPipelines < ActiveRecord::Migration
+class AddProtectedToCiPipelines < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20170816153940_add_index_on_ci_builds_protected.rb b/db/migrate/20170816153940_add_index_on_ci_builds_protected.rb
index caf7c705a6e..fbe5fe31ae8 100644
--- a/db/migrate/20170816153940_add_index_on_ci_builds_protected.rb
+++ b/db/migrate/20170816153940_add_index_on_ci_builds_protected.rb
@@ -1,4 +1,4 @@
-class AddIndexOnCiBuildsProtected < ActiveRecord::Migration
+class AddIndexOnCiBuildsProtected < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170816234252_add_theme_id_to_users.rb b/db/migrate/20170816234252_add_theme_id_to_users.rb
index 5043f9ec591..bd04445cac6 100644
--- a/db/migrate/20170816234252_add_theme_id_to_users.rb
+++ b/db/migrate/20170816234252_add_theme_id_to_users.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddThemeIdToUsers < ActiveRecord::Migration
+class AddThemeIdToUsers < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20170817123339_add_verification_status_to_gpg_signatures.rb b/db/migrate/20170817123339_add_verification_status_to_gpg_signatures.rb
index 128cd109f8d..c7d81dc005a 100644
--- a/db/migrate/20170817123339_add_verification_status_to_gpg_signatures.rb
+++ b/db/migrate/20170817123339_add_verification_status_to_gpg_signatures.rb
@@ -1,4 +1,4 @@
-class AddVerificationStatusToGpgSignatures < ActiveRecord::Migration
+class AddVerificationStatusToGpgSignatures < ActiveRecord::Migration[4.2]
DOWNTIME = false
include Gitlab::Database::MigrationHelpers
diff --git a/db/migrate/20170820100558_correct_protected_tags_foreign_keys.rb b/db/migrate/20170820100558_correct_protected_tags_foreign_keys.rb
index 229298e1946..82e05885b0e 100644
--- a/db/migrate/20170820100558_correct_protected_tags_foreign_keys.rb
+++ b/db/migrate/20170820100558_correct_protected_tags_foreign_keys.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class CorrectProtectedTagsForeignKeys < ActiveRecord::Migration
+class CorrectProtectedTagsForeignKeys < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170820120108_create_user_synced_attributes_metadata.rb b/db/migrate/20170820120108_create_user_synced_attributes_metadata.rb
index 79028e34987..131dcf7ac25 100644
--- a/db/migrate/20170820120108_create_user_synced_attributes_metadata.rb
+++ b/db/migrate/20170820120108_create_user_synced_attributes_metadata.rb
@@ -1,4 +1,4 @@
-class CreateUserSyncedAttributesMetadata < ActiveRecord::Migration
+class CreateUserSyncedAttributesMetadata < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170824101926_add_auto_devops_enabled_to_application_settings.rb b/db/migrate/20170824101926_add_auto_devops_enabled_to_application_settings.rb
index da518d8215c..f7c0aeab8f9 100644
--- a/db/migrate/20170824101926_add_auto_devops_enabled_to_application_settings.rb
+++ b/db/migrate/20170824101926_add_auto_devops_enabled_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddAutoDevopsEnabledToApplicationSettings < ActiveRecord::Migration
+class AddAutoDevopsEnabledToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170824162758_allow_appearances_description_html_null.rb b/db/migrate/20170824162758_allow_appearances_description_html_null.rb
index d7f481ee894..6efa3452796 100644
--- a/db/migrate/20170824162758_allow_appearances_description_html_null.rb
+++ b/db/migrate/20170824162758_allow_appearances_description_html_null.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AllowAppearancesDescriptionHtmlNull < ActiveRecord::Migration
+class AllowAppearancesDescriptionHtmlNull < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170825015534_add_file_store_to_lfs_objects.rb b/db/migrate/20170825015534_add_file_store_to_lfs_objects.rb
index 41bb031014f..be543ffc983 100644
--- a/db/migrate/20170825015534_add_file_store_to_lfs_objects.rb
+++ b/db/migrate/20170825015534_add_file_store_to_lfs_objects.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddFileStoreToLfsObjects < ActiveRecord::Migration
+class AddFileStoreToLfsObjects < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170825104051_migrate_issues_to_ghost_user.rb b/db/migrate/20170825104051_migrate_issues_to_ghost_user.rb
index c5fb5762d61..b1adccc9c5c 100644
--- a/db/migrate/20170825104051_migrate_issues_to_ghost_user.rb
+++ b/db/migrate/20170825104051_migrate_issues_to_ghost_user.rb
@@ -1,4 +1,4 @@
-class MigrateIssuesToGhostUser < ActiveRecord::Migration
+class MigrateIssuesToGhostUser < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170825154015_resolve_outdated_diff_discussions.rb b/db/migrate/20170825154015_resolve_outdated_diff_discussions.rb
index 235530bb1e6..1aed21f10a0 100644
--- a/db/migrate/20170825154015_resolve_outdated_diff_discussions.rb
+++ b/db/migrate/20170825154015_resolve_outdated_diff_discussions.rb
@@ -1,4 +1,4 @@
-class ResolveOutdatedDiffDiscussions < ActiveRecord::Migration
+class ResolveOutdatedDiffDiscussions < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170827123848_add_index_on_merge_request_diff_commit_sha.rb b/db/migrate/20170827123848_add_index_on_merge_request_diff_commit_sha.rb
index 2140ff7b05e..e2061b5600a 100644
--- a/db/migrate/20170827123848_add_index_on_merge_request_diff_commit_sha.rb
+++ b/db/migrate/20170827123848_add_index_on_merge_request_diff_commit_sha.rb
@@ -1,6 +1,6 @@
# rubocop:disable RemoveIndex
-class AddIndexOnMergeRequestDiffCommitSha < ActiveRecord::Migration
+class AddIndexOnMergeRequestDiffCommitSha < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170828093725_create_project_auto_dev_ops.rb b/db/migrate/20170828093725_create_project_auto_dev_ops.rb
index c1bb4f20c1d..ea895dc14c1 100644
--- a/db/migrate/20170828093725_create_project_auto_dev_ops.rb
+++ b/db/migrate/20170828093725_create_project_auto_dev_ops.rb
@@ -1,4 +1,4 @@
-class CreateProjectAutoDevOps < ActiveRecord::Migration
+class CreateProjectAutoDevOps < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170828135939_migrate_user_external_mail_data.rb b/db/migrate/20170828135939_migrate_user_external_mail_data.rb
index f7ac87374b6..9ee4a4598bf 100644
--- a/db/migrate/20170828135939_migrate_user_external_mail_data.rb
+++ b/db/migrate/20170828135939_migrate_user_external_mail_data.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class MigrateUserExternalMailData < ActiveRecord::Migration
+class MigrateUserExternalMailData < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170830125940_add_failure_reason_to_ci_builds.rb b/db/migrate/20170830125940_add_failure_reason_to_ci_builds.rb
index 5a7487b9227..44f709868ca 100644
--- a/db/migrate/20170830125940_add_failure_reason_to_ci_builds.rb
+++ b/db/migrate/20170830125940_add_failure_reason_to_ci_builds.rb
@@ -1,4 +1,4 @@
-class AddFailureReasonToCiBuilds < ActiveRecord::Migration
+class AddFailureReasonToCiBuilds < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170830130119_steal_remaining_event_migration_jobs.rb b/db/migrate/20170830130119_steal_remaining_event_migration_jobs.rb
index 0dfdc4ed261..bcc34d56d2d 100644
--- a/db/migrate/20170830130119_steal_remaining_event_migration_jobs.rb
+++ b/db/migrate/20170830130119_steal_remaining_event_migration_jobs.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class StealRemainingEventMigrationJobs < ActiveRecord::Migration
+class StealRemainingEventMigrationJobs < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170830131015_swap_event_migration_tables.rb b/db/migrate/20170830131015_swap_event_migration_tables.rb
index a256de4a8af..fb3b2472ffe 100644
--- a/db/migrate/20170830131015_swap_event_migration_tables.rb
+++ b/db/migrate/20170830131015_swap_event_migration_tables.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class SwapEventMigrationTables < ActiveRecord::Migration
+class SwapEventMigrationTables < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170831092813_add_config_source_to_pipelines.rb b/db/migrate/20170831092813_add_config_source_to_pipelines.rb
index ff51e968abd..ba1f73f0e68 100644
--- a/db/migrate/20170831092813_add_config_source_to_pipelines.rb
+++ b/db/migrate/20170831092813_add_config_source_to_pipelines.rb
@@ -1,4 +1,4 @@
-class AddConfigSourceToPipelines < ActiveRecord::Migration
+class AddConfigSourceToPipelines < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20170901071411_add_foreign_key_to_issue_author.rb b/db/migrate/20170901071411_add_foreign_key_to_issue_author.rb
index ab6e9fb565a..00d0b0f2c7f 100644
--- a/db/migrate/20170901071411_add_foreign_key_to_issue_author.rb
+++ b/db/migrate/20170901071411_add_foreign_key_to_issue_author.rb
@@ -1,4 +1,4 @@
-class AddForeignKeyToIssueAuthor < ActiveRecord::Migration
+class AddForeignKeyToIssueAuthor < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170904092148_add_email_confirmation.rb b/db/migrate/20170904092148_add_email_confirmation.rb
index 17ff424b319..8bfb2005936 100644
--- a/db/migrate/20170904092148_add_email_confirmation.rb
+++ b/db/migrate/20170904092148_add_email_confirmation.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddEmailConfirmation < ActiveRecord::Migration
+class AddEmailConfirmation < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170905112933_add_resolved_by_push_to_notes.rb b/db/migrate/20170905112933_add_resolved_by_push_to_notes.rb
index ceb31ffb08a..1f27ea3c467 100644
--- a/db/migrate/20170905112933_add_resolved_by_push_to_notes.rb
+++ b/db/migrate/20170905112933_add_resolved_by_push_to_notes.rb
@@ -1,4 +1,4 @@
-class AddResolvedByPushToNotes < ActiveRecord::Migration
+class AddResolvedByPushToNotes < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170906133745_add_runners_token_to_groups.rb b/db/migrate/20170906133745_add_runners_token_to_groups.rb
index 852f4cba670..a02160feb83 100644
--- a/db/migrate/20170906133745_add_runners_token_to_groups.rb
+++ b/db/migrate/20170906133745_add_runners_token_to_groups.rb
@@ -1,4 +1,4 @@
-class AddRunnersTokenToGroups < ActiveRecord::Migration
+class AddRunnersTokenToGroups < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170909090114_add_email_confirmation_index.rb b/db/migrate/20170909090114_add_email_confirmation_index.rb
index a8c1023c482..31c48db2bd2 100644
--- a/db/migrate/20170909090114_add_email_confirmation_index.rb
+++ b/db/migrate/20170909090114_add_email_confirmation_index.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddEmailConfirmationIndex < ActiveRecord::Migration
+class AddEmailConfirmationIndex < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170909150936_add_spent_at_to_timelogs.rb b/db/migrate/20170909150936_add_spent_at_to_timelogs.rb
index ffff719c289..3a2c900b445 100644
--- a/db/migrate/20170909150936_add_spent_at_to_timelogs.rb
+++ b/db/migrate/20170909150936_add_spent_at_to_timelogs.rb
@@ -1,4 +1,4 @@
-class AddSpentAtToTimelogs < ActiveRecord::Migration
+class AddSpentAtToTimelogs < ActiveRecord::Migration[4.2]
DOWNTIME = false
def up
diff --git a/db/migrate/20170912113435_clean_stages_statuses_migration.rb b/db/migrate/20170912113435_clean_stages_statuses_migration.rb
index fc091d7894e..f2040f819cd 100644
--- a/db/migrate/20170912113435_clean_stages_statuses_migration.rb
+++ b/db/migrate/20170912113435_clean_stages_statuses_migration.rb
@@ -1,4 +1,4 @@
-class CleanStagesStatusesMigration < ActiveRecord::Migration
+class CleanStagesStatusesMigration < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170913131410_environments_project_id_not_null.rb b/db/migrate/20170913131410_environments_project_id_not_null.rb
index d5404f8ede9..ba66113945b 100644
--- a/db/migrate/20170913131410_environments_project_id_not_null.rb
+++ b/db/migrate/20170913131410_environments_project_id_not_null.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class EnvironmentsProjectIdNotNull < ActiveRecord::Migration
+class EnvironmentsProjectIdNotNull < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170914135630_add_index_for_recent_push_events.rb b/db/migrate/20170914135630_add_index_for_recent_push_events.rb
index 99f593b0465..ac86185ba50 100644
--- a/db/migrate/20170914135630_add_index_for_recent_push_events.rb
+++ b/db/migrate/20170914135630_add_index_for_recent_push_events.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddIndexForRecentPushEvents < ActiveRecord::Migration
+class AddIndexForRecentPushEvents < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170918072948_create_job_artifacts.rb b/db/migrate/20170918072948_create_job_artifacts.rb
index 95f2c6c8ce8..4dd24aaff99 100644
--- a/db/migrate/20170918072948_create_job_artifacts.rb
+++ b/db/migrate/20170918072948_create_job_artifacts.rb
@@ -1,4 +1,4 @@
-class CreateJobArtifacts < ActiveRecord::Migration
+class CreateJobArtifacts < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170918072949_add_file_store_job_artifacts.rb b/db/migrate/20170918072949_add_file_store_job_artifacts.rb
index b1f1bea6deb..3eb355c9305 100644
--- a/db/migrate/20170918072949_add_file_store_job_artifacts.rb
+++ b/db/migrate/20170918072949_add_file_store_job_artifacts.rb
@@ -1,4 +1,4 @@
-class AddFileStoreJobArtifacts < ActiveRecord::Migration
+class AddFileStoreJobArtifacts < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20170918111708_create_project_custom_attributes.rb b/db/migrate/20170918111708_create_project_custom_attributes.rb
index b5bc90ec02e..bd6064689ff 100644
--- a/db/migrate/20170918111708_create_project_custom_attributes.rb
+++ b/db/migrate/20170918111708_create_project_custom_attributes.rb
@@ -1,4 +1,4 @@
-class CreateProjectCustomAttributes < ActiveRecord::Migration
+class CreateProjectCustomAttributes < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20170918140927_create_group_custom_attributes.rb b/db/migrate/20170918140927_create_group_custom_attributes.rb
index 3879ea15eb6..215a0f16b6f 100644
--- a/db/migrate/20170918140927_create_group_custom_attributes.rb
+++ b/db/migrate/20170918140927_create_group_custom_attributes.rb
@@ -1,4 +1,4 @@
-class CreateGroupCustomAttributes < ActiveRecord::Migration
+class CreateGroupCustomAttributes < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170918222253_reorganize_deployments_indexes.rb b/db/migrate/20170918222253_reorganize_deployments_indexes.rb
index 139427ed2b9..480847ac393 100644
--- a/db/migrate/20170918222253_reorganize_deployments_indexes.rb
+++ b/db/migrate/20170918222253_reorganize_deployments_indexes.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class ReorganizeDeploymentsIndexes < ActiveRecord::Migration
+class ReorganizeDeploymentsIndexes < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170918223303_add_deployments_index_for_last_deployment.rb b/db/migrate/20170918223303_add_deployments_index_for_last_deployment.rb
index b91efb86d98..8e165ac647d 100644
--- a/db/migrate/20170918223303_add_deployments_index_for_last_deployment.rb
+++ b/db/migrate/20170918223303_add_deployments_index_for_last_deployment.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddDeploymentsIndexForLastDeployment < ActiveRecord::Migration
+class AddDeploymentsIndexForLastDeployment < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170919211300_remove_temporary_ci_builds_index.rb b/db/migrate/20170919211300_remove_temporary_ci_builds_index.rb
index 8423bf13fd9..23c94a809d4 100644
--- a/db/migrate/20170919211300_remove_temporary_ci_builds_index.rb
+++ b/db/migrate/20170919211300_remove_temporary_ci_builds_index.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RemoveTemporaryCiBuildsIndex < ActiveRecord::Migration
+class RemoveTemporaryCiBuildsIndex < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170921115009_add_project_repository_storage_index.rb b/db/migrate/20170921115009_add_project_repository_storage_index.rb
index 1c5a8fd65e1..9e1f5052f28 100644
--- a/db/migrate/20170921115009_add_project_repository_storage_index.rb
+++ b/db/migrate/20170921115009_add_project_repository_storage_index.rb
@@ -1,4 +1,4 @@
-class AddProjectRepositoryStorageIndex < ActiveRecord::Migration
+class AddProjectRepositoryStorageIndex < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170924094327_create_gcp_clusters.rb b/db/migrate/20170924094327_create_gcp_clusters.rb
index 657dddcbbc4..43201f75ad7 100644
--- a/db/migrate/20170924094327_create_gcp_clusters.rb
+++ b/db/migrate/20170924094327_create_gcp_clusters.rb
@@ -1,4 +1,4 @@
-class CreateGcpClusters < ActiveRecord::Migration
+class CreateGcpClusters < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20170925184228_add_favicon_to_appearances.rb b/db/migrate/20170925184228_add_favicon_to_appearances.rb
index 65083733afb..1ce750f7e83 100644
--- a/db/migrate/20170925184228_add_favicon_to_appearances.rb
+++ b/db/migrate/20170925184228_add_favicon_to_appearances.rb
@@ -1,4 +1,4 @@
-class AddFaviconToAppearances < ActiveRecord::Migration
+class AddFaviconToAppearances < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20170927095921_add_ci_builds_index_for_jobscontroller.rb b/db/migrate/20170927095921_add_ci_builds_index_for_jobscontroller.rb
index c2cb1df2586..85aa78006db 100644
--- a/db/migrate/20170927095921_add_ci_builds_index_for_jobscontroller.rb
+++ b/db/migrate/20170927095921_add_ci_builds_index_for_jobscontroller.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddCiBuildsIndexForJobscontroller < ActiveRecord::Migration
+class AddCiBuildsIndexForJobscontroller < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170927122209_add_partial_index_for_labels_template.rb b/db/migrate/20170927122209_add_partial_index_for_labels_template.rb
index c3e5077ba20..dd79e024df4 100644
--- a/db/migrate/20170927122209_add_partial_index_for_labels_template.rb
+++ b/db/migrate/20170927122209_add_partial_index_for_labels_template.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddPartialIndexForLabelsTemplate < ActiveRecord::Migration
+class AddPartialIndexForLabelsTemplate < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170927161718_create_gpg_key_subkeys.rb b/db/migrate/20170927161718_create_gpg_key_subkeys.rb
index d9dc2404cac..3b5d452ee12 100644
--- a/db/migrate/20170927161718_create_gpg_key_subkeys.rb
+++ b/db/migrate/20170927161718_create_gpg_key_subkeys.rb
@@ -1,4 +1,4 @@
-class CreateGpgKeySubkeys < ActiveRecord::Migration
+class CreateGpgKeySubkeys < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170928100231_add_composite_index_on_merge_requests_merge_commit_sha.rb b/db/migrate/20170928100231_add_composite_index_on_merge_requests_merge_commit_sha.rb
index 9f02daf04c1..cb16589e8db 100644
--- a/db/migrate/20170928100231_add_composite_index_on_merge_requests_merge_commit_sha.rb
+++ b/db/migrate/20170928100231_add_composite_index_on_merge_requests_merge_commit_sha.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddCompositeIndexOnMergeRequestsMergeCommitSha < ActiveRecord::Migration
+class AddCompositeIndexOnMergeRequestsMergeCommitSha < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20170928124105_create_fork_networks.rb b/db/migrate/20170928124105_create_fork_networks.rb
index 89e5b871967..01f623117f5 100644
--- a/db/migrate/20170928124105_create_fork_networks.rb
+++ b/db/migrate/20170928124105_create_fork_networks.rb
@@ -1,4 +1,4 @@
-class CreateForkNetworks < ActiveRecord::Migration
+class CreateForkNetworks < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170928133643_create_fork_network_members.rb b/db/migrate/20170928133643_create_fork_network_members.rb
index 8c7d9ba859a..e2a6d7b0e8a 100644
--- a/db/migrate/20170928133643_create_fork_network_members.rb
+++ b/db/migrate/20170928133643_create_fork_network_members.rb
@@ -1,4 +1,4 @@
-class CreateForkNetworkMembers < ActiveRecord::Migration
+class CreateForkNetworkMembers < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170929080234_add_failure_reason_to_pipelines.rb b/db/migrate/20170929080234_add_failure_reason_to_pipelines.rb
index 82adddbc1ec..e000ee27eef 100644
--- a/db/migrate/20170929080234_add_failure_reason_to_pipelines.rb
+++ b/db/migrate/20170929080234_add_failure_reason_to_pipelines.rb
@@ -1,4 +1,4 @@
-class AddFailureReasonToPipelines < ActiveRecord::Migration
+class AddFailureReasonToPipelines < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20170929131201_populate_fork_networks.rb b/db/migrate/20170929131201_populate_fork_networks.rb
index ddbf27e1852..ba4f8ef2531 100644
--- a/db/migrate/20170929131201_populate_fork_networks.rb
+++ b/db/migrate/20170929131201_populate_fork_networks.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class PopulateForkNetworks < ActiveRecord::Migration
+class PopulateForkNetworks < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20171004121444_make_sure_fast_forward_option_exists.rb b/db/migrate/20171004121444_make_sure_fast_forward_option_exists.rb
index ac266c3e22e..9b417de1793 100644
--- a/db/migrate/20171004121444_make_sure_fast_forward_option_exists.rb
+++ b/db/migrate/20171004121444_make_sure_fast_forward_option_exists.rb
@@ -1,5 +1,5 @@
# rubocop:disable all
-class MakeSureFastForwardOptionExists < ActiveRecord::Migration
+class MakeSureFastForwardOptionExists < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20171006090001_create_ci_build_trace_sections.rb b/db/migrate/20171006090001_create_ci_build_trace_sections.rb
index ab5ef319618..a2eca0832f2 100644
--- a/db/migrate/20171006090001_create_ci_build_trace_sections.rb
+++ b/db/migrate/20171006090001_create_ci_build_trace_sections.rb
@@ -1,4 +1,4 @@
-class CreateCiBuildTraceSections < ActiveRecord::Migration
+class CreateCiBuildTraceSections < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20171006090010_add_build_foreign_key_to_ci_build_trace_sections.rb b/db/migrate/20171006090010_add_build_foreign_key_to_ci_build_trace_sections.rb
index d279463eb4b..7b17763ac84 100644
--- a/db/migrate/20171006090010_add_build_foreign_key_to_ci_build_trace_sections.rb
+++ b/db/migrate/20171006090010_add_build_foreign_key_to_ci_build_trace_sections.rb
@@ -1,4 +1,4 @@
-class AddBuildForeignKeyToCiBuildTraceSections < ActiveRecord::Migration
+class AddBuildForeignKeyToCiBuildTraceSections < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20171006090100_create_ci_build_trace_section_names.rb b/db/migrate/20171006090100_create_ci_build_trace_section_names.rb
index 88f3e60699a..00a38fa59c2 100644
--- a/db/migrate/20171006090100_create_ci_build_trace_section_names.rb
+++ b/db/migrate/20171006090100_create_ci_build_trace_section_names.rb
@@ -1,4 +1,4 @@
-class CreateCiBuildTraceSectionNames < ActiveRecord::Migration
+class CreateCiBuildTraceSectionNames < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20171006091000_add_name_foreign_key_to_ci_build_trace_sections.rb b/db/migrate/20171006091000_add_name_foreign_key_to_ci_build_trace_sections.rb
index 08422885a98..1342ff013b7 100644
--- a/db/migrate/20171006091000_add_name_foreign_key_to_ci_build_trace_sections.rb
+++ b/db/migrate/20171006091000_add_name_foreign_key_to_ci_build_trace_sections.rb
@@ -1,4 +1,4 @@
-class AddNameForeignKeyToCiBuildTraceSections < ActiveRecord::Migration
+class AddNameForeignKeyToCiBuildTraceSections < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20171006220837_add_global_rate_limits_to_application_settings.rb b/db/migrate/20171006220837_add_global_rate_limits_to_application_settings.rb
index 55e822752af..96d76069b35 100644
--- a/db/migrate/20171006220837_add_global_rate_limits_to_application_settings.rb
+++ b/db/migrate/20171006220837_add_global_rate_limits_to_application_settings.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddGlobalRateLimitsToApplicationSettings < ActiveRecord::Migration
+class AddGlobalRateLimitsToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20171012101043_add_circuit_breaker_properties_to_application_settings.rb b/db/migrate/20171012101043_add_circuit_breaker_properties_to_application_settings.rb
index bcf7dbd8e64..91bba07b4d7 100644
--- a/db/migrate/20171012101043_add_circuit_breaker_properties_to_application_settings.rb
+++ b/db/migrate/20171012101043_add_circuit_breaker_properties_to_application_settings.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddCircuitBreakerPropertiesToApplicationSettings < ActiveRecord::Migration
+class AddCircuitBreakerPropertiesToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20171012125712_migrate_user_authentication_token_to_personal_access_token.rb b/db/migrate/20171012125712_migrate_user_authentication_token_to_personal_access_token.rb
index 9a909644a44..305c12e31f8 100644
--- a/db/migrate/20171012125712_migrate_user_authentication_token_to_personal_access_token.rb
+++ b/db/migrate/20171012125712_migrate_user_authentication_token_to_personal_access_token.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class MigrateUserAuthenticationTokenToPersonalAccessToken < ActiveRecord::Migration
+class MigrateUserAuthenticationTokenToPersonalAccessToken < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20171013094327_create_new_clusters_architectures.rb b/db/migrate/20171013094327_create_new_clusters_architectures.rb
index dabb3e25e48..98f91e6130f 100644
--- a/db/migrate/20171013094327_create_new_clusters_architectures.rb
+++ b/db/migrate/20171013094327_create_new_clusters_architectures.rb
@@ -1,4 +1,4 @@
-class CreateNewClustersArchitectures < ActiveRecord::Migration
+class CreateNewClustersArchitectures < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20171017145932_add_new_circuitbreaker_settings_to_application_settings.rb b/db/migrate/20171017145932_add_new_circuitbreaker_settings_to_application_settings.rb
index 07eb25c0b0f..4a0cadea364 100644
--- a/db/migrate/20171017145932_add_new_circuitbreaker_settings_to_application_settings.rb
+++ b/db/migrate/20171017145932_add_new_circuitbreaker_settings_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddNewCircuitbreakerSettingsToApplicationSettings < ActiveRecord::Migration
+class AddNewCircuitbreakerSettingsToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20171019141859_fix_dev_timezone_schema.rb b/db/migrate/20171019141859_fix_dev_timezone_schema.rb
index fb7c17dd747..68c8b528e17 100644
--- a/db/migrate/20171019141859_fix_dev_timezone_schema.rb
+++ b/db/migrate/20171019141859_fix_dev_timezone_schema.rb
@@ -1,4 +1,4 @@
-class FixDevTimezoneSchema < ActiveRecord::Migration
+class FixDevTimezoneSchema < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# The this migrations tries to help solve unwanted changes to `schema.rb`
diff --git a/db/migrate/20171025110159_add_latest_merge_request_diff_id_to_merge_requests.rb b/db/migrate/20171025110159_add_latest_merge_request_diff_id_to_merge_requests.rb
index 74a2badc130..1af0cf70958 100644
--- a/db/migrate/20171025110159_add_latest_merge_request_diff_id_to_merge_requests.rb
+++ b/db/migrate/20171025110159_add_latest_merge_request_diff_id_to_merge_requests.rb
@@ -1,4 +1,4 @@
-class AddLatestMergeRequestDiffIdToMergeRequests < ActiveRecord::Migration
+class AddLatestMergeRequestDiffIdToMergeRequests < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20171031100710_create_clusters_kubernetes_helm_apps.rb b/db/migrate/20171031100710_create_clusters_kubernetes_helm_apps.rb
index a2ce37127ea..0af05f5c94a 100644
--- a/db/migrate/20171031100710_create_clusters_kubernetes_helm_apps.rb
+++ b/db/migrate/20171031100710_create_clusters_kubernetes_helm_apps.rb
@@ -1,4 +1,4 @@
-class CreateClustersKubernetesHelmApps < ActiveRecord::Migration
+class CreateClustersKubernetesHelmApps < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20171101130535_add_gitaly_timeout_properties_to_application_settings.rb b/db/migrate/20171101130535_add_gitaly_timeout_properties_to_application_settings.rb
index de621e7111c..6d60fdc6132 100644
--- a/db/migrate/20171101130535_add_gitaly_timeout_properties_to_application_settings.rb
+++ b/db/migrate/20171101130535_add_gitaly_timeout_properties_to_application_settings.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddGitalyTimeoutPropertiesToApplicationSettings < ActiveRecord::Migration
+class AddGitalyTimeoutPropertiesToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20171103000000_set_uploads_path_size_for_mysql.rb b/db/migrate/20171103000000_set_uploads_path_size_for_mysql.rb
index 1fbe505f804..93cec87f999 100644
--- a/db/migrate/20171103000000_set_uploads_path_size_for_mysql.rb
+++ b/db/migrate/20171103000000_set_uploads_path_size_for_mysql.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class SetUploadsPathSizeForMysql < ActiveRecord::Migration
+class SetUploadsPathSizeForMysql < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20171106101200_create_clusters_kubernetes_ingress_apps.rb b/db/migrate/20171106101200_create_clusters_kubernetes_ingress_apps.rb
index 21f48b1d1b4..770cb94ee18 100644
--- a/db/migrate/20171106101200_create_clusters_kubernetes_ingress_apps.rb
+++ b/db/migrate/20171106101200_create_clusters_kubernetes_ingress_apps.rb
@@ -1,4 +1,4 @@
-class CreateClustersKubernetesIngressApps < ActiveRecord::Migration
+class CreateClustersKubernetesIngressApps < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20171106132212_issues_confidential_not_null.rb b/db/migrate/20171106132212_issues_confidential_not_null.rb
index c959d2dd938..444a38c2dc5 100644
--- a/db/migrate/20171106132212_issues_confidential_not_null.rb
+++ b/db/migrate/20171106132212_issues_confidential_not_null.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class IssuesConfidentialNotNull < ActiveRecord::Migration
+class IssuesConfidentialNotNull < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20171106133143_rename_application_settings_password_authentication_enabled_to_password_authentication_enabled_for_web.rb b/db/migrate/20171106133143_rename_application_settings_password_authentication_enabled_to_password_authentication_enabled_for_web.rb
index 6d369e93361..58762a4f852 100644
--- a/db/migrate/20171106133143_rename_application_settings_password_authentication_enabled_to_password_authentication_enabled_for_web.rb
+++ b/db/migrate/20171106133143_rename_application_settings_password_authentication_enabled_to_password_authentication_enabled_for_web.rb
@@ -1,4 +1,4 @@
-class RenameApplicationSettingsPasswordAuthenticationEnabledToPasswordAuthenticationEnabledForWeb < ActiveRecord::Migration
+class RenameApplicationSettingsPasswordAuthenticationEnabledToPasswordAuthenticationEnabledForWeb < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20171106133911_add_password_authentication_enabled_for_git_to_application_settings.rb b/db/migrate/20171106133911_add_password_authentication_enabled_for_git_to_application_settings.rb
index b8aa600864e..1f96a0426a1 100644
--- a/db/migrate/20171106133911_add_password_authentication_enabled_for_git_to_application_settings.rb
+++ b/db/migrate/20171106133911_add_password_authentication_enabled_for_git_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddPasswordAuthenticationEnabledForGitToApplicationSettings < ActiveRecord::Migration
+class AddPasswordAuthenticationEnabledForGitToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20171106135924_issues_milestone_id_foreign_key.rb b/db/migrate/20171106135924_issues_milestone_id_foreign_key.rb
index bfb3dcae511..1de7d5e768e 100644
--- a/db/migrate/20171106135924_issues_milestone_id_foreign_key.rb
+++ b/db/migrate/20171106135924_issues_milestone_id_foreign_key.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class IssuesMilestoneIdForeignKey < ActiveRecord::Migration
+class IssuesMilestoneIdForeignKey < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20171106150657_issues_updated_by_id_foreign_key.rb b/db/migrate/20171106150657_issues_updated_by_id_foreign_key.rb
index 3b8844d7d9f..b2992b1ff5d 100644
--- a/db/migrate/20171106150657_issues_updated_by_id_foreign_key.rb
+++ b/db/migrate/20171106150657_issues_updated_by_id_foreign_key.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class IssuesUpdatedByIdForeignKey < ActiveRecord::Migration
+class IssuesUpdatedByIdForeignKey < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20171106151218_issues_moved_to_id_foreign_key.rb b/db/migrate/20171106151218_issues_moved_to_id_foreign_key.rb
index 6395462384b..66bfb5718dc 100644
--- a/db/migrate/20171106151218_issues_moved_to_id_foreign_key.rb
+++ b/db/migrate/20171106151218_issues_moved_to_id_foreign_key.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class IssuesMovedToIdForeignKey < ActiveRecord::Migration
+class IssuesMovedToIdForeignKey < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20171106155656_turn_issues_due_date_index_to_partial_index.rb b/db/migrate/20171106155656_turn_issues_due_date_index_to_partial_index.rb
index 08784de4043..58392de5e6b 100644
--- a/db/migrate/20171106155656_turn_issues_due_date_index_to_partial_index.rb
+++ b/db/migrate/20171106155656_turn_issues_due_date_index_to_partial_index.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class TurnIssuesDueDateIndexToPartialIndex < ActiveRecord::Migration
+class TurnIssuesDueDateIndexToPartialIndex < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20171106171453_add_timezone_to_issues_closed_at.rb b/db/migrate/20171106171453_add_timezone_to_issues_closed_at.rb
index 0f1e937545b..c6edc1af6cb 100644
--- a/db/migrate/20171106171453_add_timezone_to_issues_closed_at.rb
+++ b/db/migrate/20171106171453_add_timezone_to_issues_closed_at.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddTimezoneToIssuesClosedAt < ActiveRecord::Migration
+class AddTimezoneToIssuesClosedAt < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20171114150259_merge_requests_author_id_foreign_key.rb b/db/migrate/20171114150259_merge_requests_author_id_foreign_key.rb
index 021eaa04a0c..4ebb6fad059 100644
--- a/db/migrate/20171114150259_merge_requests_author_id_foreign_key.rb
+++ b/db/migrate/20171114150259_merge_requests_author_id_foreign_key.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class MergeRequestsAuthorIdForeignKey < ActiveRecord::Migration
+class MergeRequestsAuthorIdForeignKey < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20171114160005_merge_requests_assignee_id_foreign_key.rb b/db/migrate/20171114160005_merge_requests_assignee_id_foreign_key.rb
index 1a242f01051..73c177c44f9 100644
--- a/db/migrate/20171114160005_merge_requests_assignee_id_foreign_key.rb
+++ b/db/migrate/20171114160005_merge_requests_assignee_id_foreign_key.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class MergeRequestsAssigneeIdForeignKey < ActiveRecord::Migration
+class MergeRequestsAssigneeIdForeignKey < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20171114160904_merge_requests_updated_by_id_foreign_key.rb b/db/migrate/20171114160904_merge_requests_updated_by_id_foreign_key.rb
index eb3872e38da..69f9c181c10 100644
--- a/db/migrate/20171114160904_merge_requests_updated_by_id_foreign_key.rb
+++ b/db/migrate/20171114160904_merge_requests_updated_by_id_foreign_key.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class MergeRequestsUpdatedByIdForeignKey < ActiveRecord::Migration
+class MergeRequestsUpdatedByIdForeignKey < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20171114161720_merge_requests_merge_user_id_foreign_key.rb b/db/migrate/20171114161720_merge_requests_merge_user_id_foreign_key.rb
index 925b3e537d7..ccd275d5bb4 100644
--- a/db/migrate/20171114161720_merge_requests_merge_user_id_foreign_key.rb
+++ b/db/migrate/20171114161720_merge_requests_merge_user_id_foreign_key.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class MergeRequestsMergeUserIdForeignKey < ActiveRecord::Migration
+class MergeRequestsMergeUserIdForeignKey < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20171114161914_merge_requests_source_project_id_foreign_key.rb b/db/migrate/20171114161914_merge_requests_source_project_id_foreign_key.rb
index 99740f64fe6..250928a6551 100644
--- a/db/migrate/20171114161914_merge_requests_source_project_id_foreign_key.rb
+++ b/db/migrate/20171114161914_merge_requests_source_project_id_foreign_key.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class MergeRequestsSourceProjectIdForeignKey < ActiveRecord::Migration
+class MergeRequestsSourceProjectIdForeignKey < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20171114162227_merge_requests_milestone_id_foreign_key.rb b/db/migrate/20171114162227_merge_requests_milestone_id_foreign_key.rb
index c005cf7d173..cafe0ce0853 100644
--- a/db/migrate/20171114162227_merge_requests_milestone_id_foreign_key.rb
+++ b/db/migrate/20171114162227_merge_requests_milestone_id_foreign_key.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class MergeRequestsMilestoneIdForeignKey < ActiveRecord::Migration
+class MergeRequestsMilestoneIdForeignKey < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20171115164540_populate_merge_requests_latest_merge_request_diff_id_take_two.rb b/db/migrate/20171115164540_populate_merge_requests_latest_merge_request_diff_id_take_two.rb
index 27b6b4ebddc..935092ce46a 100644
--- a/db/migrate/20171115164540_populate_merge_requests_latest_merge_request_diff_id_take_two.rb
+++ b/db/migrate/20171115164540_populate_merge_requests_latest_merge_request_diff_id_take_two.rb
@@ -1,5 +1,5 @@
# This is identical to the stolen background migration, which already has specs.
-class PopulateMergeRequestsLatestMergeRequestDiffIdTakeTwo < ActiveRecord::Migration
+class PopulateMergeRequestsLatestMergeRequestDiffIdTakeTwo < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20171116135628_add_environment_scope_to_clusters.rb b/db/migrate/20171116135628_add_environment_scope_to_clusters.rb
index cce757095dd..39bb8759cc0 100644
--- a/db/migrate/20171116135628_add_environment_scope_to_clusters.rb
+++ b/db/migrate/20171116135628_add_environment_scope_to_clusters.rb
@@ -1,4 +1,4 @@
-class AddEnvironmentScopeToClusters < ActiveRecord::Migration
+class AddEnvironmentScopeToClusters < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20171121135738_clean_up_from_merge_request_diffs_and_commits.rb b/db/migrate/20171121135738_clean_up_from_merge_request_diffs_and_commits.rb
index 30cf08b29fc..6be7b75492d 100644
--- a/db/migrate/20171121135738_clean_up_from_merge_request_diffs_and_commits.rb
+++ b/db/migrate/20171121135738_clean_up_from_merge_request_diffs_and_commits.rb
@@ -1,4 +1,4 @@
-class CleanUpFromMergeRequestDiffsAndCommits < ActiveRecord::Migration
+class CleanUpFromMergeRequestDiffsAndCommits < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20171121144800_ci_pipelines_index_on_project_id_ref_status_id.rb b/db/migrate/20171121144800_ci_pipelines_index_on_project_id_ref_status_id.rb
index 5a8ae6e4b57..a1dcfc70650 100644
--- a/db/migrate/20171121144800_ci_pipelines_index_on_project_id_ref_status_id.rb
+++ b/db/migrate/20171121144800_ci_pipelines_index_on_project_id_ref_status_id.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class CiPipelinesIndexOnProjectIdRefStatusId < ActiveRecord::Migration
+class CiPipelinesIndexOnProjectIdRefStatusId < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20171122131600_add_new_project_guidelines_to_appearances.rb b/db/migrate/20171122131600_add_new_project_guidelines_to_appearances.rb
index 328cc65a549..cbcbb5d988a 100644
--- a/db/migrate/20171122131600_add_new_project_guidelines_to_appearances.rb
+++ b/db/migrate/20171122131600_add_new_project_guidelines_to_appearances.rb
@@ -1,4 +1,4 @@
-class AddNewProjectGuidelinesToAppearances < ActiveRecord::Migration
+class AddNewProjectGuidelinesToAppearances < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20171123094802_add_circuitbreaker_check_interval_to_application_settings.rb b/db/migrate/20171123094802_add_circuitbreaker_check_interval_to_application_settings.rb
index 213d46018fc..94360c64926 100644
--- a/db/migrate/20171123094802_add_circuitbreaker_check_interval_to_application_settings.rb
+++ b/db/migrate/20171123094802_add_circuitbreaker_check_interval_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddCircuitbreakerCheckIntervalToApplicationSettings < ActiveRecord::Migration
+class AddCircuitbreakerCheckIntervalToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20171124125042_add_default_values_to_merge_request_states.rb b/db/migrate/20171124125042_add_default_values_to_merge_request_states.rb
index d08863c3b78..d0d06863777 100644
--- a/db/migrate/20171124125042_add_default_values_to_merge_request_states.rb
+++ b/db/migrate/20171124125042_add_default_values_to_merge_request_states.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddDefaultValuesToMergeRequestStates < ActiveRecord::Migration
+class AddDefaultValuesToMergeRequestStates < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20171124125748_populate_missing_merge_request_statuses.rb b/db/migrate/20171124125748_populate_missing_merge_request_statuses.rb
index 72fbab59f4c..67444f36e24 100644
--- a/db/migrate/20171124125748_populate_missing_merge_request_statuses.rb
+++ b/db/migrate/20171124125748_populate_missing_merge_request_statuses.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class PopulateMissingMergeRequestStatuses < ActiveRecord::Migration
+class PopulateMissingMergeRequestStatuses < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20171124132536_make_merge_request_statuses_not_null.rb b/db/migrate/20171124132536_make_merge_request_statuses_not_null.rb
index 4bb09126036..49b693c5950 100644
--- a/db/migrate/20171124132536_make_merge_request_statuses_not_null.rb
+++ b/db/migrate/20171124132536_make_merge_request_statuses_not_null.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class MakeMergeRequestStatusesNotNull < ActiveRecord::Migration
+class MakeMergeRequestStatusesNotNull < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20171127151038_add_events_related_columns_to_merge_request_metrics.rb b/db/migrate/20171127151038_add_events_related_columns_to_merge_request_metrics.rb
index 18af697cf88..385de9dd73d 100644
--- a/db/migrate/20171127151038_add_events_related_columns_to_merge_request_metrics.rb
+++ b/db/migrate/20171127151038_add_events_related_columns_to_merge_request_metrics.rb
@@ -1,4 +1,4 @@
-class AddEventsRelatedColumnsToMergeRequestMetrics < ActiveRecord::Migration
+class AddEventsRelatedColumnsToMergeRequestMetrics < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20171204204233_add_permanent_to_redirect_route.rb b/db/migrate/20171204204233_add_permanent_to_redirect_route.rb
index f3ae471201e..bc0658035d6 100644
--- a/db/migrate/20171204204233_add_permanent_to_redirect_route.rb
+++ b/db/migrate/20171204204233_add_permanent_to_redirect_route.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddPermanentToRedirectRoute < ActiveRecord::Migration
+class AddPermanentToRedirectRoute < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20171206221519_add_permanent_index_to_redirect_route.rb b/db/migrate/20171206221519_add_permanent_index_to_redirect_route.rb
index 33ce7e1aa68..ba924c4eecc 100644
--- a/db/migrate/20171206221519_add_permanent_index_to_redirect_route.rb
+++ b/db/migrate/20171206221519_add_permanent_index_to_redirect_route.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddPermanentIndexToRedirectRoute < ActiveRecord::Migration
+class AddPermanentIndexToRedirectRoute < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20171207185153_add_merge_request_state_index.rb b/db/migrate/20171207185153_add_merge_request_state_index.rb
index 72f846c5c38..167470cf7fe 100644
--- a/db/migrate/20171207185153_add_merge_request_state_index.rb
+++ b/db/migrate/20171207185153_add_merge_request_state_index.rb
@@ -1,4 +1,4 @@
-class AddMergeRequestStateIndex < ActiveRecord::Migration
+class AddMergeRequestStateIndex < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20171211145425_add_can_push_to_deploy_keys_projects.rb b/db/migrate/20171211145425_add_can_push_to_deploy_keys_projects.rb
index 5dc723db9f9..63e86b23aad 100644
--- a/db/migrate/20171211145425_add_can_push_to_deploy_keys_projects.rb
+++ b/db/migrate/20171211145425_add_can_push_to_deploy_keys_projects.rb
@@ -1,4 +1,4 @@
-class AddCanPushToDeployKeysProjects < ActiveRecord::Migration
+class AddCanPushToDeployKeysProjects < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20171212203433_create_clusters_applications_prometheus.rb b/db/migrate/20171212203433_create_clusters_applications_prometheus.rb
index dc2531d2691..6eb9fec609e 100644
--- a/db/migrate/20171212203433_create_clusters_applications_prometheus.rb
+++ b/db/migrate/20171212203433_create_clusters_applications_prometheus.rb
@@ -1,4 +1,4 @@
-class CreateClustersApplicationsPrometheus < ActiveRecord::Migration
+class CreateClustersApplicationsPrometheus < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20171214144320_add_store_column_to_uploads.rb b/db/migrate/20171214144320_add_store_column_to_uploads.rb
index e35798e2c41..11b3951a3fa 100644
--- a/db/migrate/20171214144320_add_store_column_to_uploads.rb
+++ b/db/migrate/20171214144320_add_store_column_to_uploads.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddStoreColumnToUploads < ActiveRecord::Migration
+class AddStoreColumnToUploads < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20171215113714_populate_can_push_from_deploy_keys_projects.rb b/db/migrate/20171215113714_populate_can_push_from_deploy_keys_projects.rb
index 680855af945..e2d7879b140 100644
--- a/db/migrate/20171215113714_populate_can_push_from_deploy_keys_projects.rb
+++ b/db/migrate/20171215113714_populate_can_push_from_deploy_keys_projects.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class PopulateCanPushFromDeployKeysProjects < ActiveRecord::Migration
+class PopulateCanPushFromDeployKeysProjects < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20171216111734_clean_up_for_members.rb b/db/migrate/20171216111734_clean_up_for_members.rb
index 22e0997dce6..2fefc6c7fd1 100644
--- a/db/migrate/20171216111734_clean_up_for_members.rb
+++ b/db/migrate/20171216111734_clean_up_for_members.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class CleanUpForMembers < ActiveRecord::Migration
+class CleanUpForMembers < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20171216112339_add_foreign_key_for_members.rb b/db/migrate/20171216112339_add_foreign_key_for_members.rb
index be17769be6a..06c2c5068da 100644
--- a/db/migrate/20171216112339_add_foreign_key_for_members.rb
+++ b/db/migrate/20171216112339_add_foreign_key_for_members.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddForeignKeyForMembers < ActiveRecord::Migration
+class AddForeignKeyForMembers < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20171220191323_add_index_on_namespaces_lower_name.rb b/db/migrate/20171220191323_add_index_on_namespaces_lower_name.rb
index 130b24fe6f0..7543e435941 100644
--- a/db/migrate/20171220191323_add_index_on_namespaces_lower_name.rb
+++ b/db/migrate/20171220191323_add_index_on_namespaces_lower_name.rb
@@ -1,4 +1,4 @@
-class AddIndexOnNamespacesLowerName < ActiveRecord::Migration
+class AddIndexOnNamespacesLowerName < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
INDEX_NAME = 'index_on_namespaces_lower_name'
diff --git a/db/migrate/20171222115326_add_confidential_note_events_to_web_hooks.rb b/db/migrate/20171222115326_add_confidential_note_events_to_web_hooks.rb
index 900a6386922..788a842a3ad 100644
--- a/db/migrate/20171222115326_add_confidential_note_events_to_web_hooks.rb
+++ b/db/migrate/20171222115326_add_confidential_note_events_to_web_hooks.rb
@@ -1,4 +1,4 @@
-class AddConfidentialNoteEventsToWebHooks < ActiveRecord::Migration
+class AddConfidentialNoteEventsToWebHooks < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20171222183504_add_jobs_cache_index_to_project.rb b/db/migrate/20171222183504_add_jobs_cache_index_to_project.rb
index 607e9d027d7..78a195c351c 100644
--- a/db/migrate/20171222183504_add_jobs_cache_index_to_project.rb
+++ b/db/migrate/20171222183504_add_jobs_cache_index_to_project.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddJobsCacheIndexToProject < ActiveRecord::Migration
+class AddJobsCacheIndexToProject < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20171229225929_change_user_project_limit_not_null_and_remove_default.rb b/db/migrate/20171229225929_change_user_project_limit_not_null_and_remove_default.rb
index 54fbbcf1a0d..b9efdb8bb8f 100644
--- a/db/migrate/20171229225929_change_user_project_limit_not_null_and_remove_default.rb
+++ b/db/migrate/20171229225929_change_user_project_limit_not_null_and_remove_default.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class ChangeUserProjectLimitNotNullAndRemoveDefault < ActiveRecord::Migration
+class ChangeUserProjectLimitNotNullAndRemoveDefault < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20171230123729_add_rebase_commit_sha_to_merge_requests_ce.rb b/db/migrate/20171230123729_add_rebase_commit_sha_to_merge_requests_ce.rb
index 94a7c1019d8..4e1107e1ff5 100644
--- a/db/migrate/20171230123729_add_rebase_commit_sha_to_merge_requests_ce.rb
+++ b/db/migrate/20171230123729_add_rebase_commit_sha_to_merge_requests_ce.rb
@@ -1,4 +1,4 @@
-class AddRebaseCommitShaToMergeRequestsCe < ActiveRecord::Migration
+class AddRebaseCommitShaToMergeRequestsCe < ActiveRecord::Migration[4.2]
DOWNTIME = false
def up
diff --git a/db/migrate/20180101160629_create_prometheus_metrics.rb b/db/migrate/20180101160629_create_prometheus_metrics.rb
index c3be0939b17..e3b1ed710d6 100644
--- a/db/migrate/20180101160629_create_prometheus_metrics.rb
+++ b/db/migrate/20180101160629_create_prometheus_metrics.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class CreatePrometheusMetrics < ActiveRecord::Migration
+class CreatePrometheusMetrics < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20180101160630_change_project_id_for_prometheus_metrics.rb b/db/migrate/20180101160630_change_project_id_for_prometheus_metrics.rb
index 66820f13f54..d225899af18 100644
--- a/db/migrate/20180101160630_change_project_id_for_prometheus_metrics.rb
+++ b/db/migrate/20180101160630_change_project_id_for_prometheus_metrics.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class ChangeProjectIdForPrometheusMetrics < ActiveRecord::Migration
+class ChangeProjectIdForPrometheusMetrics < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
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 ef6bc6896c0..75488f57fa9 100644
--- a/db/migrate/20180102220145_add_pages_https_only_to_projects.rb
+++ b/db/migrate/20180102220145_add_pages_https_only_to_projects.rb
@@ -1,4 +1,4 @@
-class AddPagesHttpsOnlyToProjects < ActiveRecord::Migration
+class AddPagesHttpsOnlyToProjects < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180103123548_add_confidential_note_events_to_services.rb b/db/migrate/20180103123548_add_confidential_note_events_to_services.rb
index b54ad88df43..02724575e6c 100644
--- a/db/migrate/20180103123548_add_confidential_note_events_to_services.rb
+++ b/db/migrate/20180103123548_add_confidential_note_events_to_services.rb
@@ -1,4 +1,4 @@
-class AddConfidentialNoteEventsToServices < ActiveRecord::Migration
+class AddConfidentialNoteEventsToServices < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180105212544_add_commits_count_to_merge_request_diff.rb b/db/migrate/20180105212544_add_commits_count_to_merge_request_diff.rb
index f942b4c062e..e27eecde906 100644
--- a/db/migrate/20180105212544_add_commits_count_to_merge_request_diff.rb
+++ b/db/migrate/20180105212544_add_commits_count_to_merge_request_diff.rb
@@ -1,4 +1,4 @@
-class AddCommitsCountToMergeRequestDiff < ActiveRecord::Migration
+class AddCommitsCountToMergeRequestDiff < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180109183319_change_default_value_for_pages_https_only.rb b/db/migrate/20180109183319_change_default_value_for_pages_https_only.rb
index c242e1b0d24..558eb60ac3f 100644
--- a/db/migrate/20180109183319_change_default_value_for_pages_https_only.rb
+++ b/db/migrate/20180109183319_change_default_value_for_pages_https_only.rb
@@ -1,4 +1,4 @@
-class ChangeDefaultValueForPagesHttpsOnly < ActiveRecord::Migration
+class ChangeDefaultValueForPagesHttpsOnly < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180113220114_rework_redirect_routes_indexes.rb b/db/migrate/20180113220114_rework_redirect_routes_indexes.rb
index 53f82a31203..4c3bb0a26ce 100644
--- a/db/migrate/20180113220114_rework_redirect_routes_indexes.rb
+++ b/db/migrate/20180113220114_rework_redirect_routes_indexes.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class ReworkRedirectRoutesIndexes < ActiveRecord::Migration
+class ReworkRedirectRoutesIndexes < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20180115201419_add_index_updated_at_to_issues.rb b/db/migrate/20180115201419_add_index_updated_at_to_issues.rb
index a5a48fc97be..8707307eed0 100644
--- a/db/migrate/20180115201419_add_index_updated_at_to_issues.rb
+++ b/db/migrate/20180115201419_add_index_updated_at_to_issues.rb
@@ -1,4 +1,4 @@
-class AddIndexUpdatedAtToIssues < ActiveRecord::Migration
+class AddIndexUpdatedAtToIssues < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180116193854_create_lfs_file_locks.rb b/db/migrate/20180116193854_create_lfs_file_locks.rb
index 23b0c90484b..2dd0e71916b 100644
--- a/db/migrate/20180116193854_create_lfs_file_locks.rb
+++ b/db/migrate/20180116193854_create_lfs_file_locks.rb
@@ -1,4 +1,4 @@
-class CreateLfsFileLocks < ActiveRecord::Migration
+class CreateLfsFileLocks < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180119135717_add_uploader_index_to_uploads.rb b/db/migrate/20180119135717_add_uploader_index_to_uploads.rb
index a678c3d049f..7dd0a06e3bf 100644
--- a/db/migrate/20180119135717_add_uploader_index_to_uploads.rb
+++ b/db/migrate/20180119135717_add_uploader_index_to_uploads.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddUploaderIndexToUploads < ActiveRecord::Migration
+class AddUploaderIndexToUploads < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180119160751_optimize_ci_job_artifacts.rb b/db/migrate/20180119160751_optimize_ci_job_artifacts.rb
index 9b4340ed7b7..3598689d78c 100644
--- a/db/migrate/20180119160751_optimize_ci_job_artifacts.rb
+++ b/db/migrate/20180119160751_optimize_ci_job_artifacts.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class OptimizeCiJobArtifacts < ActiveRecord::Migration
+class OptimizeCiJobArtifacts < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20180122162010_add_auto_devops_domain_to_application_settings.rb b/db/migrate/20180122162010_add_auto_devops_domain_to_application_settings.rb
index 7e16cb83087..c76dc5b3a68 100644
--- a/db/migrate/20180122162010_add_auto_devops_domain_to_application_settings.rb
+++ b/db/migrate/20180122162010_add_auto_devops_domain_to_application_settings.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddAutoDevopsDomainToApplicationSettings < ActiveRecord::Migration
+class AddAutoDevopsDomainToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20180125214301_create_user_callouts.rb b/db/migrate/20180125214301_create_user_callouts.rb
index 856eff36ae0..6eb2f932ccc 100644
--- a/db/migrate/20180125214301_create_user_callouts.rb
+++ b/db/migrate/20180125214301_create_user_callouts.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class CreateUserCallouts < ActiveRecord::Migration
+class CreateUserCallouts < ActiveRecord::Migration[4.2]
# Set this constant to true if this migration requires downtime.
DOWNTIME = false
diff --git a/db/migrate/20180129193323_add_uploads_builder_context.rb b/db/migrate/20180129193323_add_uploads_builder_context.rb
index b3909a770ca..c7227bf0f1e 100644
--- a/db/migrate/20180129193323_add_uploads_builder_context.rb
+++ b/db/migrate/20180129193323_add_uploads_builder_context.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddUploadsBuilderContext < ActiveRecord::Migration
+class AddUploadsBuilderContext < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20180201102129_add_unique_constraint_to_trending_projects_project_id.rb b/db/migrate/20180201102129_add_unique_constraint_to_trending_projects_project_id.rb
index 02e53b8fa8a..1f2a79d36a5 100644
--- a/db/migrate/20180201102129_add_unique_constraint_to_trending_projects_project_id.rb
+++ b/db/migrate/20180201102129_add_unique_constraint_to_trending_projects_project_id.rb
@@ -1,4 +1,4 @@
-class AddUniqueConstraintToTrendingProjectsProjectId < ActiveRecord::Migration
+class AddUniqueConstraintToTrendingProjectsProjectId < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180201110056_add_foreign_keys_to_todos.rb b/db/migrate/20180201110056_add_foreign_keys_to_todos.rb
index 020b0550321..6b217632a52 100644
--- a/db/migrate/20180201110056_add_foreign_keys_to_todos.rb
+++ b/db/migrate/20180201110056_add_foreign_keys_to_todos.rb
@@ -1,4 +1,4 @@
-class AddForeignKeysToTodos < ActiveRecord::Migration
+class AddForeignKeysToTodos < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
class Todo < ActiveRecord::Base
diff --git a/db/migrate/20180201145907_migrate_remaining_issues_closed_at.rb b/db/migrate/20180201145907_migrate_remaining_issues_closed_at.rb
index 36a85b61968..d398909f25b 100644
--- a/db/migrate/20180201145907_migrate_remaining_issues_closed_at.rb
+++ b/db/migrate/20180201145907_migrate_remaining_issues_closed_at.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class MigrateRemainingIssuesClosedAt < ActiveRecord::Migration
+class MigrateRemainingIssuesClosedAt < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20180206200543_reset_events_primary_key_sequence.rb b/db/migrate/20180206200543_reset_events_primary_key_sequence.rb
index eb5c4a6a1e7..d395c5725e4 100644
--- a/db/migrate/20180206200543_reset_events_primary_key_sequence.rb
+++ b/db/migrate/20180206200543_reset_events_primary_key_sequence.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class ResetEventsPrimaryKeySequence < ActiveRecord::Migration
+class ResetEventsPrimaryKeySequence < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20180208183958_schedule_populate_untracked_uploads_if_needed.rb b/db/migrate/20180208183958_schedule_populate_untracked_uploads_if_needed.rb
index e46e793d9d2..b69ac8f94c1 100644
--- a/db/migrate/20180208183958_schedule_populate_untracked_uploads_if_needed.rb
+++ b/db/migrate/20180208183958_schedule_populate_untracked_uploads_if_needed.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class SchedulePopulateUntrackedUploadsIfNeeded < ActiveRecord::Migration
+class SchedulePopulateUntrackedUploadsIfNeeded < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180209165249_add_closed_by_to_issues.rb b/db/migrate/20180209165249_add_closed_by_to_issues.rb
index e251afd7b49..91a1e021ab9 100644
--- a/db/migrate/20180209165249_add_closed_by_to_issues.rb
+++ b/db/migrate/20180209165249_add_closed_by_to_issues.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddClosedByToIssues < ActiveRecord::Migration
+class AddClosedByToIssues < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20180212030105_add_external_ip_to_clusters_applications_ingress.rb b/db/migrate/20180212030105_add_external_ip_to_clusters_applications_ingress.rb
index dbe09a43aa7..e2a9a68b1ad 100644
--- a/db/migrate/20180212030105_add_external_ip_to_clusters_applications_ingress.rb
+++ b/db/migrate/20180212030105_add_external_ip_to_clusters_applications_ingress.rb
@@ -1,4 +1,4 @@
-class AddExternalIpToClustersApplicationsIngress < ActiveRecord::Migration
+class AddExternalIpToClustersApplicationsIngress < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180213131630_add_partial_index_to_projects_for_index_only_scans.rb b/db/migrate/20180213131630_add_partial_index_to_projects_for_index_only_scans.rb
index cedf2510dda..905915d9239 100644
--- a/db/migrate/20180213131630_add_partial_index_to_projects_for_index_only_scans.rb
+++ b/db/migrate/20180213131630_add_partial_index_to_projects_for_index_only_scans.rb
@@ -1,4 +1,4 @@
-class AddPartialIndexToProjectsForIndexOnlyScans < ActiveRecord::Migration
+class AddPartialIndexToProjectsForIndexOnlyScans < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180214093516_create_badges.rb b/db/migrate/20180214093516_create_badges.rb
index a1d77328f77..66e017b115a 100644
--- a/db/migrate/20180214093516_create_badges.rb
+++ b/db/migrate/20180214093516_create_badges.rb
@@ -1,4 +1,4 @@
-class CreateBadges < ActiveRecord::Migration
+class CreateBadges < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20180214155405_create_clusters_applications_runners.rb b/db/migrate/20180214155405_create_clusters_applications_runners.rb
index fc4c0881338..ce594c91890 100644
--- a/db/migrate/20180214155405_create_clusters_applications_runners.rb
+++ b/db/migrate/20180214155405_create_clusters_applications_runners.rb
@@ -1,4 +1,4 @@
-class CreateClustersApplicationsRunners < ActiveRecord::Migration
+class CreateClustersApplicationsRunners < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180215181245_users_name_lower_index.rb b/db/migrate/20180215181245_users_name_lower_index.rb
index d3f68cb7d45..3b80601a727 100644
--- a/db/migrate/20180215181245_users_name_lower_index.rb
+++ b/db/migrate/20180215181245_users_name_lower_index.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class UsersNameLowerIndex < ActiveRecord::Migration
+class UsersNameLowerIndex < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20180216120000_add_pages_domain_verification.rb b/db/migrate/20180216120000_add_pages_domain_verification.rb
index 8b7cae92285..f709f5a5809 100644
--- a/db/migrate/20180216120000_add_pages_domain_verification.rb
+++ b/db/migrate/20180216120000_add_pages_domain_verification.rb
@@ -1,4 +1,4 @@
-class AddPagesDomainVerification < ActiveRecord::Migration
+class AddPagesDomainVerification < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20180216120010_add_pages_domain_verified_at_index.rb b/db/migrate/20180216120010_add_pages_domain_verified_at_index.rb
index 825dfb52dce..6e7cb89c765 100644
--- a/db/migrate/20180216120010_add_pages_domain_verified_at_index.rb
+++ b/db/migrate/20180216120010_add_pages_domain_verified_at_index.rb
@@ -1,4 +1,4 @@
-class AddPagesDomainVerifiedAtIndex < ActiveRecord::Migration
+class AddPagesDomainVerifiedAtIndex < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180216120020_allow_domain_verification_to_be_disabled.rb b/db/migrate/20180216120020_allow_domain_verification_to_be_disabled.rb
index 06d458028b3..18e4f534105 100644
--- a/db/migrate/20180216120020_allow_domain_verification_to_be_disabled.rb
+++ b/db/migrate/20180216120020_allow_domain_verification_to_be_disabled.rb
@@ -1,4 +1,4 @@
-class AllowDomainVerificationToBeDisabled < ActiveRecord::Migration
+class AllowDomainVerificationToBeDisabled < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20180216120030_add_pages_domain_enabled_until.rb b/db/migrate/20180216120030_add_pages_domain_enabled_until.rb
index b40653044dd..3347bb6deaa 100644
--- a/db/migrate/20180216120030_add_pages_domain_enabled_until.rb
+++ b/db/migrate/20180216120030_add_pages_domain_enabled_until.rb
@@ -1,4 +1,4 @@
-class AddPagesDomainEnabledUntil < ActiveRecord::Migration
+class AddPagesDomainEnabledUntil < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20180216120040_add_pages_domain_enabled_until_index.rb b/db/migrate/20180216120040_add_pages_domain_enabled_until_index.rb
index 00f6e4979da..3880a8ea139 100644
--- a/db/migrate/20180216120040_add_pages_domain_enabled_until_index.rb
+++ b/db/migrate/20180216120040_add_pages_domain_enabled_until_index.rb
@@ -1,4 +1,4 @@
-class AddPagesDomainEnabledUntilIndex < ActiveRecord::Migration
+class AddPagesDomainEnabledUntilIndex < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180216120050_pages_domains_verification_grace_period.rb b/db/migrate/20180216120050_pages_domains_verification_grace_period.rb
index d7f8634b536..e51cff68b50 100644
--- a/db/migrate/20180216120050_pages_domains_verification_grace_period.rb
+++ b/db/migrate/20180216120050_pages_domains_verification_grace_period.rb
@@ -1,4 +1,4 @@
-class PagesDomainsVerificationGracePeriod < ActiveRecord::Migration
+class PagesDomainsVerificationGracePeriod < ActiveRecord::Migration[4.2]
DOWNTIME = false
class PagesDomain < ActiveRecord::Base
diff --git a/db/migrate/20180219153455_add_maximum_timeout_to_ci_runners.rb b/db/migrate/20180219153455_add_maximum_timeout_to_ci_runners.rb
index 072e696a43e..68578c23207 100644
--- a/db/migrate/20180219153455_add_maximum_timeout_to_ci_runners.rb
+++ b/db/migrate/20180219153455_add_maximum_timeout_to_ci_runners.rb
@@ -1,4 +1,4 @@
-class AddMaximumTimeoutToCiRunners < ActiveRecord::Migration
+class AddMaximumTimeoutToCiRunners < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180221151752_add_allow_maintainer_to_push_to_merge_requests.rb b/db/migrate/20180221151752_add_allow_maintainer_to_push_to_merge_requests.rb
index 81acfbc3655..71f6bc46a88 100644
--- a/db/migrate/20180221151752_add_allow_maintainer_to_push_to_merge_requests.rb
+++ b/db/migrate/20180221151752_add_allow_maintainer_to_push_to_merge_requests.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddAllowMaintainerToPushToMergeRequests < ActiveRecord::Migration
+class AddAllowMaintainerToPushToMergeRequests < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180222043024_add_ip_address_to_runner.rb b/db/migrate/20180222043024_add_ip_address_to_runner.rb
index bf00560b5a8..b52366c0be1 100644
--- a/db/migrate/20180222043024_add_ip_address_to_runner.rb
+++ b/db/migrate/20180222043024_add_ip_address_to_runner.rb
@@ -1,4 +1,4 @@
-class AddIpAddressToRunner < ActiveRecord::Migration
+class AddIpAddressToRunner < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180223120443_create_user_interacted_projects_table.rb b/db/migrate/20180223120443_create_user_interacted_projects_table.rb
index 8da8cf68088..185a690ad3d 100644
--- a/db/migrate/20180223120443_create_user_interacted_projects_table.rb
+++ b/db/migrate/20180223120443_create_user_interacted_projects_table.rb
@@ -1,4 +1,4 @@
-class CreateUserInteractedProjectsTable < ActiveRecord::Migration
+class CreateUserInteractedProjectsTable < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180223144945_add_allow_local_requests_from_hooks_and_services_to_application_settings.rb b/db/migrate/20180223144945_add_allow_local_requests_from_hooks_and_services_to_application_settings.rb
index c994a54698b..3bd7d6fd827 100644
--- a/db/migrate/20180223144945_add_allow_local_requests_from_hooks_and_services_to_application_settings.rb
+++ b/db/migrate/20180223144945_add_allow_local_requests_from_hooks_and_services_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddAllowLocalRequestsFromHooksAndServicesToApplicationSettings < ActiveRecord::Migration
+class AddAllowLocalRequestsFromHooksAndServicesToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180226050030_add_checksum_to_ci_job_artifacts.rb b/db/migrate/20180226050030_add_checksum_to_ci_job_artifacts.rb
index 54e6e35449e..bccb7ac26ec 100644
--- a/db/migrate/20180226050030_add_checksum_to_ci_job_artifacts.rb
+++ b/db/migrate/20180226050030_add_checksum_to_ci_job_artifacts.rb
@@ -1,4 +1,4 @@
-class AddChecksumToCiJobArtifacts < ActiveRecord::Migration
+class AddChecksumToCiJobArtifacts < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20180227182112_add_group_id_to_boards_ce.rb b/db/migrate/20180227182112_add_group_id_to_boards_ce.rb
index 5b2691b3a00..b887be0cc55 100644
--- a/db/migrate/20180227182112_add_group_id_to_boards_ce.rb
+++ b/db/migrate/20180227182112_add_group_id_to_boards_ce.rb
@@ -1,4 +1,4 @@
-class AddGroupIdToBoardsCe < ActiveRecord::Migration
+class AddGroupIdToBoardsCe < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
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 ea3ebdd83d1..7921d3a14b6 100644
--- a/db/migrate/20180228172924_add_include_private_contributions_to_users.rb
+++ b/db/migrate/20180228172924_add_include_private_contributions_to_users.rb
@@ -1,4 +1,4 @@
-class AddIncludePrivateContributionsToUsers < ActiveRecord::Migration
+class AddIncludePrivateContributionsToUsers < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20180301010859_create_ci_builds_metadata_table.rb b/db/migrate/20180301010859_create_ci_builds_metadata_table.rb
index ce737444092..29652c675e1 100644
--- a/db/migrate/20180301010859_create_ci_builds_metadata_table.rb
+++ b/db/migrate/20180301010859_create_ci_builds_metadata_table.rb
@@ -1,4 +1,4 @@
-class CreateCiBuildsMetadataTable < ActiveRecord::Migration
+class CreateCiBuildsMetadataTable < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180302152117_ensure_foreign_keys_on_clusters_applications.rb b/db/migrate/20180302152117_ensure_foreign_keys_on_clusters_applications.rb
index e6cec39e61f..d660c7cfd2d 100644
--- a/db/migrate/20180302152117_ensure_foreign_keys_on_clusters_applications.rb
+++ b/db/migrate/20180302152117_ensure_foreign_keys_on_clusters_applications.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class EnsureForeignKeysOnClustersApplications < ActiveRecord::Migration
+class EnsureForeignKeysOnClustersApplications < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180305095250_create_internal_ids_table.rb b/db/migrate/20180305095250_create_internal_ids_table.rb
index 432086fe98b..8565f5d848b 100644
--- a/db/migrate/20180305095250_create_internal_ids_table.rb
+++ b/db/migrate/20180305095250_create_internal_ids_table.rb
@@ -1,4 +1,4 @@
-class CreateInternalIdsTable < ActiveRecord::Migration
+class CreateInternalIdsTable < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180305144721_add_privileged_to_runner.rb b/db/migrate/20180305144721_add_privileged_to_runner.rb
index 32e73dba8d5..359498bf9b0 100644
--- a/db/migrate/20180305144721_add_privileged_to_runner.rb
+++ b/db/migrate/20180305144721_add_privileged_to_runner.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddPrivilegedToRunner < ActiveRecord::Migration
+class AddPrivilegedToRunner < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180306134842_add_missing_indexes_acts_as_taggable_on_engine.rb b/db/migrate/20180306134842_add_missing_indexes_acts_as_taggable_on_engine.rb
index 06e402adcd7..b400ff94dbe 100644
--- a/db/migrate/20180306134842_add_missing_indexes_acts_as_taggable_on_engine.rb
+++ b/db/migrate/20180306134842_add_missing_indexes_acts_as_taggable_on_engine.rb
@@ -2,7 +2,7 @@
#
# It has been modified to handle no-downtime GitLab migrations. Several
# indexes have been removed since they are not needed for GitLab.
-class AddMissingIndexesActsAsTaggableOnEngine < ActiveRecord::Migration
+class AddMissingIndexesActsAsTaggableOnEngine < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180308052825_add_section_name_id_index_on_ci_build_trace_sections.rb b/db/migrate/20180308052825_add_section_name_id_index_on_ci_build_trace_sections.rb
index b616cc2fd30..4d2ab7d757f 100644
--- a/db/migrate/20180308052825_add_section_name_id_index_on_ci_build_trace_sections.rb
+++ b/db/migrate/20180308052825_add_section_name_id_index_on_ci_build_trace_sections.rb
@@ -1,4 +1,4 @@
-class AddSectionNameIdIndexOnCiBuildTraceSections < ActiveRecord::Migration
+class AddSectionNameIdIndexOnCiBuildTraceSections < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20180308125206_add_user_internal_regex_to_application_setting.rb b/db/migrate/20180308125206_add_user_internal_regex_to_application_setting.rb
index fe50e909563..5e4bf96f86f 100644
--- a/db/migrate/20180308125206_add_user_internal_regex_to_application_setting.rb
+++ b/db/migrate/20180308125206_add_user_internal_regex_to_application_setting.rb
@@ -1,4 +1,4 @@
-class AddUserInternalRegexToApplicationSetting < ActiveRecord::Migration
+class AddUserInternalRegexToApplicationSetting < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180309121820_reschedule_commits_count_for_merge_request_diff.rb b/db/migrate/20180309121820_reschedule_commits_count_for_merge_request_diff.rb
index 990759104b0..ecb06dd4312 100644
--- a/db/migrate/20180309121820_reschedule_commits_count_for_merge_request_diff.rb
+++ b/db/migrate/20180309121820_reschedule_commits_count_for_merge_request_diff.rb
@@ -1,4 +1,4 @@
-class RescheduleCommitsCountForMergeRequestDiff < ActiveRecord::Migration
+class RescheduleCommitsCountForMergeRequestDiff < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180309160427_add_partial_indexes_on_todos.rb b/db/migrate/20180309160427_add_partial_indexes_on_todos.rb
index 671fa743cec..c22ed0a5177 100644
--- a/db/migrate/20180309160427_add_partial_indexes_on_todos.rb
+++ b/db/migrate/20180309160427_add_partial_indexes_on_todos.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddPartialIndexesOnTodos < ActiveRecord::Migration
+class AddPartialIndexesOnTodos < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20180319190020_create_deploy_tokens.rb b/db/migrate/20180319190020_create_deploy_tokens.rb
index d129459ea0a..a4d797679c5 100644
--- a/db/migrate/20180319190020_create_deploy_tokens.rb
+++ b/db/migrate/20180319190020_create_deploy_tokens.rb
@@ -1,4 +1,4 @@
-class CreateDeployTokens < ActiveRecord::Migration
+class CreateDeployTokens < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20180320182229_add_indexes_for_user_activity_queries.rb b/db/migrate/20180320182229_add_indexes_for_user_activity_queries.rb
index 824bbb3ac05..a15e1d68a95 100644
--- a/db/migrate/20180320182229_add_indexes_for_user_activity_queries.rb
+++ b/db/migrate/20180320182229_add_indexes_for_user_activity_queries.rb
@@ -1,4 +1,4 @@
-class AddIndexesForUserActivityQueries < ActiveRecord::Migration
+class AddIndexesForUserActivityQueries < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180323150945_add_push_to_merge_request_to_notification_settings.rb b/db/migrate/20180323150945_add_push_to_merge_request_to_notification_settings.rb
index 12b8875d8dc..3b38d21a8aa 100644
--- a/db/migrate/20180323150945_add_push_to_merge_request_to_notification_settings.rb
+++ b/db/migrate/20180323150945_add_push_to_merge_request_to_notification_settings.rb
@@ -1,4 +1,4 @@
-class AddPushToMergeRequestToNotificationSettings < ActiveRecord::Migration
+class AddPushToMergeRequestToNotificationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180326202229_create_ci_build_trace_chunks.rb b/db/migrate/20180326202229_create_ci_build_trace_chunks.rb
index fb3f5786e85..45a64ec23d1 100644
--- a/db/migrate/20180326202229_create_ci_build_trace_chunks.rb
+++ b/db/migrate/20180326202229_create_ci_build_trace_chunks.rb
@@ -1,4 +1,4 @@
-class CreateCiBuildTraceChunks < ActiveRecord::Migration
+class CreateCiBuildTraceChunks < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180327101207_remove_index_from_events_table.rb b/db/migrate/20180327101207_remove_index_from_events_table.rb
index 172441da65b..0583a2641ec 100644
--- a/db/migrate/20180327101207_remove_index_from_events_table.rb
+++ b/db/migrate/20180327101207_remove_index_from_events_table.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RemoveIndexFromEventsTable < ActiveRecord::Migration
+class RemoveIndexFromEventsTable < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180330121048_add_issue_due_to_notification_settings.rb b/db/migrate/20180330121048_add_issue_due_to_notification_settings.rb
index c64a481fcf0..2d9ca002872 100644
--- a/db/migrate/20180330121048_add_issue_due_to_notification_settings.rb
+++ b/db/migrate/20180330121048_add_issue_due_to_notification_settings.rb
@@ -1,4 +1,4 @@
-class AddIssueDueToNotificationSettings < ActiveRecord::Migration
+class AddIssueDueToNotificationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180403035759_create_project_ci_cd_settings.rb b/db/migrate/20180403035759_create_project_ci_cd_settings.rb
index 173e662cffc..00028689779 100644
--- a/db/migrate/20180403035759_create_project_ci_cd_settings.rb
+++ b/db/migrate/20180403035759_create_project_ci_cd_settings.rb
@@ -1,4 +1,4 @@
-class CreateProjectCiCdSettings < ActiveRecord::Migration
+class CreateProjectCiCdSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180405142733_create_project_deploy_tokens.rb b/db/migrate/20180405142733_create_project_deploy_tokens.rb
index 9d8f89243a8..ba000492247 100644
--- a/db/migrate/20180405142733_create_project_deploy_tokens.rb
+++ b/db/migrate/20180405142733_create_project_deploy_tokens.rb
@@ -1,4 +1,4 @@
-class CreateProjectDeployTokens < ActiveRecord::Migration
+class CreateProjectDeployTokens < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20180406204716_add_limits_ci_build_trace_chunks_raw_data_for_mysql.rb b/db/migrate/20180406204716_add_limits_ci_build_trace_chunks_raw_data_for_mysql.rb
index 0f2734853e6..0b541e94353 100644
--- a/db/migrate/20180406204716_add_limits_ci_build_trace_chunks_raw_data_for_mysql.rb
+++ b/db/migrate/20180406204716_add_limits_ci_build_trace_chunks_raw_data_for_mysql.rb
@@ -2,7 +2,7 @@
# for more information on how to write migrations for GitLab.
require Rails.root.join('db/migrate/limits_ci_build_trace_chunks_raw_data_for_mysql')
-class AddLimitsCiBuildTraceChunksRawDataForMysql < ActiveRecord::Migration
+class AddLimitsCiBuildTraceChunksRawDataForMysql < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180408143354_rename_users_rss_token_to_feed_token.rb b/db/migrate/20180408143354_rename_users_rss_token_to_feed_token.rb
index e852d50b25e..4b8844a134d 100644
--- a/db/migrate/20180408143354_rename_users_rss_token_to_feed_token.rb
+++ b/db/migrate/20180408143354_rename_users_rss_token_to_feed_token.rb
@@ -1,4 +1,4 @@
-class RenameUsersRssTokenToFeedToken < ActiveRecord::Migration
+class RenameUsersRssTokenToFeedToken < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180413022611_create_missing_namespace_for_internal_users.rb b/db/migrate/20180413022611_create_missing_namespace_for_internal_users.rb
index b7b346cb10e..90d869a8c10 100644
--- a/db/migrate/20180413022611_create_missing_namespace_for_internal_users.rb
+++ b/db/migrate/20180413022611_create_missing_namespace_for_internal_users.rb
@@ -1,4 +1,4 @@
-class CreateMissingNamespaceForInternalUsers < ActiveRecord::Migration
+class CreateMissingNamespaceForInternalUsers < ActiveRecord::Migration[4.2]
DOWNTIME = false
def up
diff --git a/db/migrate/20180416155103_add_further_scope_columns_to_internal_id_table.rb b/db/migrate/20180416155103_add_further_scope_columns_to_internal_id_table.rb
index 37e2d19e022..7c28cbb6795 100644
--- a/db/migrate/20180416155103_add_further_scope_columns_to_internal_id_table.rb
+++ b/db/migrate/20180416155103_add_further_scope_columns_to_internal_id_table.rb
@@ -1,4 +1,4 @@
-class AddFurtherScopeColumnsToInternalIdTable < ActiveRecord::Migration
+class AddFurtherScopeColumnsToInternalIdTable < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180417090132_add_index_constraints_to_internal_id_table.rb b/db/migrate/20180417090132_add_index_constraints_to_internal_id_table.rb
index 58de795472a..ac6bb1a8cab 100644
--- a/db/migrate/20180417090132_add_index_constraints_to_internal_id_table.rb
+++ b/db/migrate/20180417090132_add_index_constraints_to_internal_id_table.rb
@@ -1,4 +1,4 @@
-class AddIndexConstraintsToInternalIdTable < ActiveRecord::Migration
+class AddIndexConstraintsToInternalIdTable < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180417101040_add_tmp_stage_priority_index_to_ci_builds.rb b/db/migrate/20180417101040_add_tmp_stage_priority_index_to_ci_builds.rb
index ee82c70ecf8..ce470884999 100644
--- a/db/migrate/20180417101040_add_tmp_stage_priority_index_to_ci_builds.rb
+++ b/db/migrate/20180417101040_add_tmp_stage_priority_index_to_ci_builds.rb
@@ -1,4 +1,4 @@
-class AddTmpStagePriorityIndexToCiBuilds < ActiveRecord::Migration
+class AddTmpStagePriorityIndexToCiBuilds < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180417101940_add_index_to_ci_stage.rb b/db/migrate/20180417101940_add_index_to_ci_stage.rb
index 9dac78db774..97a8f5efce0 100644
--- a/db/migrate/20180417101940_add_index_to_ci_stage.rb
+++ b/db/migrate/20180417101940_add_index_to_ci_stage.rb
@@ -1,4 +1,4 @@
-class AddIndexToCiStage < ActiveRecord::Migration
+class AddIndexToCiStage < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180418053107_add_index_to_ci_job_artifacts_file_store.rb b/db/migrate/20180418053107_add_index_to_ci_job_artifacts_file_store.rb
index ac91624c3d5..4b574923483 100644
--- a/db/migrate/20180418053107_add_index_to_ci_job_artifacts_file_store.rb
+++ b/db/migrate/20180418053107_add_index_to_ci_job_artifacts_file_store.rb
@@ -1,4 +1,4 @@
-class AddIndexToCiJobArtifactsFileStore < ActiveRecord::Migration
+class AddIndexToCiJobArtifactsFileStore < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180420010016_add_pipeline_build_foreign_key.rb b/db/migrate/20180420010016_add_pipeline_build_foreign_key.rb
index 6fabe07bc9c..90a908feaee 100644
--- a/db/migrate/20180420010016_add_pipeline_build_foreign_key.rb
+++ b/db/migrate/20180420010016_add_pipeline_build_foreign_key.rb
@@ -1,4 +1,4 @@
-class AddPipelineBuildForeignKey < ActiveRecord::Migration
+class AddPipelineBuildForeignKey < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180420010616_cleanup_build_stage_migration.rb b/db/migrate/20180420010616_cleanup_build_stage_migration.rb
index 5e9fe756efd..30c0d97781d 100644
--- a/db/migrate/20180420010616_cleanup_build_stage_migration.rb
+++ b/db/migrate/20180420010616_cleanup_build_stage_migration.rb
@@ -1,4 +1,4 @@
-class CleanupBuildStageMigration < ActiveRecord::Migration
+class CleanupBuildStageMigration < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180423204600_add_pages_access_level_to_project_feature.rb b/db/migrate/20180423204600_add_pages_access_level_to_project_feature.rb
index 1d2f8cf9c76..0c536f917ce 100644
--- a/db/migrate/20180423204600_add_pages_access_level_to_project_feature.rb
+++ b/db/migrate/20180423204600_add_pages_access_level_to_project_feature.rb
@@ -1,4 +1,4 @@
-class AddPagesAccessLevelToProjectFeature < ActiveRecord::Migration
+class AddPagesAccessLevelToProjectFeature < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20180424090541_add_enforce_terms_to_application_settings.rb b/db/migrate/20180424090541_add_enforce_terms_to_application_settings.rb
index f5afdb0e4e6..b8fd71002a1 100644
--- a/db/migrate/20180424090541_add_enforce_terms_to_application_settings.rb
+++ b/db/migrate/20180424090541_add_enforce_terms_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddEnforceTermsToApplicationSettings < ActiveRecord::Migration
+class AddEnforceTermsToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180424134533_create_application_setting_terms.rb b/db/migrate/20180424134533_create_application_setting_terms.rb
index f29335cfc51..8741f20daeb 100644
--- a/db/migrate/20180424134533_create_application_setting_terms.rb
+++ b/db/migrate/20180424134533_create_application_setting_terms.rb
@@ -1,4 +1,4 @@
-class CreateApplicationSettingTerms < ActiveRecord::Migration
+class CreateApplicationSettingTerms < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180424160449_add_pipeline_iid_to_ci_pipelines.rb b/db/migrate/20180424160449_add_pipeline_iid_to_ci_pipelines.rb
index e8f0c91d612..550b5a2c149 100644
--- a/db/migrate/20180424160449_add_pipeline_iid_to_ci_pipelines.rb
+++ b/db/migrate/20180424160449_add_pipeline_iid_to_ci_pipelines.rb
@@ -1,4 +1,4 @@
-class AddPipelineIidToCiPipelines < ActiveRecord::Migration
+class AddPipelineIidToCiPipelines < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180425075446_create_term_agreements.rb b/db/migrate/20180425075446_create_term_agreements.rb
index 1fa2c8dd3be..25182215841 100644
--- a/db/migrate/20180425075446_create_term_agreements.rb
+++ b/db/migrate/20180425075446_create_term_agreements.rb
@@ -1,4 +1,4 @@
-class CreateTermAgreements < ActiveRecord::Migration
+class CreateTermAgreements < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180425131009_assure_commits_count_for_merge_request_diff.rb b/db/migrate/20180425131009_assure_commits_count_for_merge_request_diff.rb
index 0e991c23bfa..7d38a15b850 100644
--- a/db/migrate/20180425131009_assure_commits_count_for_merge_request_diff.rb
+++ b/db/migrate/20180425131009_assure_commits_count_for_merge_request_diff.rb
@@ -1,4 +1,4 @@
-class AssureCommitsCountForMergeRequestDiff < ActiveRecord::Migration
+class AssureCommitsCountForMergeRequestDiff < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180425205249_add_index_constraints_to_pipeline_iid.rb b/db/migrate/20180425205249_add_index_constraints_to_pipeline_iid.rb
index 3fa59b44d5d..8a0cb7ae4e4 100644
--- a/db/migrate/20180425205249_add_index_constraints_to_pipeline_iid.rb
+++ b/db/migrate/20180425205249_add_index_constraints_to_pipeline_iid.rb
@@ -1,4 +1,4 @@
-class AddIndexConstraintsToPipelineIid < ActiveRecord::Migration
+class AddIndexConstraintsToPipelineIid < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180426102016_add_accepted_term_to_users.rb b/db/migrate/20180426102016_add_accepted_term_to_users.rb
index 3d446f66214..3c6665b4264 100644
--- a/db/migrate/20180426102016_add_accepted_term_to_users.rb
+++ b/db/migrate/20180426102016_add_accepted_term_to_users.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddAcceptedTermToUsers < ActiveRecord::Migration
+class AddAcceptedTermToUsers < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180430101916_add_runner_type_to_ci_runners.rb b/db/migrate/20180430101916_add_runner_type_to_ci_runners.rb
index 42409349b75..a74231e0f44 100644
--- a/db/migrate/20180430101916_add_runner_type_to_ci_runners.rb
+++ b/db/migrate/20180430101916_add_runner_type_to_ci_runners.rb
@@ -1,4 +1,4 @@
-class AddRunnerTypeToCiRunners < ActiveRecord::Migration
+class AddRunnerTypeToCiRunners < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180502122856_create_project_mirror_data.rb b/db/migrate/20180502122856_create_project_mirror_data.rb
index d449f944844..8bc114afc0c 100644
--- a/db/migrate/20180502122856_create_project_mirror_data.rb
+++ b/db/migrate/20180502122856_create_project_mirror_data.rb
@@ -1,4 +1,4 @@
-class CreateProjectMirrorData < ActiveRecord::Migration
+class CreateProjectMirrorData < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180503131624_create_remote_mirrors.rb b/db/migrate/20180503131624_create_remote_mirrors.rb
index 249882f8613..9f4bd463e66 100644
--- a/db/migrate/20180503131624_create_remote_mirrors.rb
+++ b/db/migrate/20180503131624_create_remote_mirrors.rb
@@ -1,4 +1,4 @@
-class CreateRemoteMirrors < ActiveRecord::Migration
+class CreateRemoteMirrors < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
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 841393971f4..5e2ef5706ee 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
@@ -1,4 +1,4 @@
-class AddRemoteMirrorAvailableOverriddenToProjects < ActiveRecord::Migration
+class AddRemoteMirrorAvailableOverriddenToProjects < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180503150427_add_index_to_namespaces_runners_token.rb b/db/migrate/20180503150427_add_index_to_namespaces_runners_token.rb
index 9e55690bd33..899e4a05cbd 100644
--- a/db/migrate/20180503150427_add_index_to_namespaces_runners_token.rb
+++ b/db/migrate/20180503150427_add_index_to_namespaces_runners_token.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddIndexToNamespacesRunnersToken < ActiveRecord::Migration
+class AddIndexToNamespacesRunnersToken < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180503175053_ensure_missing_columns_to_project_mirror_data.rb b/db/migrate/20180503175053_ensure_missing_columns_to_project_mirror_data.rb
index 970a53d68d0..3775b3a08c9 100644
--- a/db/migrate/20180503175053_ensure_missing_columns_to_project_mirror_data.rb
+++ b/db/migrate/20180503175053_ensure_missing_columns_to_project_mirror_data.rb
@@ -1,4 +1,4 @@
-class EnsureMissingColumnsToProjectMirrorData < ActiveRecord::Migration
+class EnsureMissingColumnsToProjectMirrorData < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180503175054_add_indexes_to_project_mirror_data.rb b/db/migrate/20180503175054_add_indexes_to_project_mirror_data.rb
index b59b941c815..15a188594b0 100644
--- a/db/migrate/20180503175054_add_indexes_to_project_mirror_data.rb
+++ b/db/migrate/20180503175054_add_indexes_to_project_mirror_data.rb
@@ -1,4 +1,4 @@
-class AddIndexesToProjectMirrorData < ActiveRecord::Migration
+class AddIndexesToProjectMirrorData < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180503193542_add_indexes_to_remote_mirror.rb b/db/migrate/20180503193542_add_indexes_to_remote_mirror.rb
index 4af42b4fb29..bdf05c4e69b 100644
--- a/db/migrate/20180503193542_add_indexes_to_remote_mirror.rb
+++ b/db/migrate/20180503193542_add_indexes_to_remote_mirror.rb
@@ -1,4 +1,4 @@
-class AddIndexesToRemoteMirror < ActiveRecord::Migration
+class AddIndexesToRemoteMirror < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180503193953_add_mirror_available_to_application_settings.rb b/db/migrate/20180503193953_add_mirror_available_to_application_settings.rb
index 25b9905b1a9..64f65cd23be 100644
--- a/db/migrate/20180503193953_add_mirror_available_to_application_settings.rb
+++ b/db/migrate/20180503193953_add_mirror_available_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddMirrorAvailableToApplicationSettings < ActiveRecord::Migration
+class AddMirrorAvailableToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180503200320_enable_prometheus_metrics_by_default.rb b/db/migrate/20180503200320_enable_prometheus_metrics_by_default.rb
index 2c8f86ff0f4..bab3b178713 100644
--- a/db/migrate/20180503200320_enable_prometheus_metrics_by_default.rb
+++ b/db/migrate/20180503200320_enable_prometheus_metrics_by_default.rb
@@ -1,4 +1,4 @@
-class EnablePrometheusMetricsByDefault < ActiveRecord::Migration
+class EnablePrometheusMetricsByDefault < ActiveRecord::Migration[4.2]
DOWNTIME = false
def up
diff --git a/db/migrate/20180504195842_project_name_lower_index.rb b/db/migrate/20180504195842_project_name_lower_index.rb
index 74f3673bb03..3fe90c3fbb1 100644
--- a/db/migrate/20180504195842_project_name_lower_index.rb
+++ b/db/migrate/20180504195842_project_name_lower_index.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class ProjectNameLowerIndex < ActiveRecord::Migration
+class ProjectNameLowerIndex < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20180508055821_make_remote_mirrors_disabled_by_default.rb b/db/migrate/20180508055821_make_remote_mirrors_disabled_by_default.rb
index 0d8a8357a1e..81aa18c8b86 100644
--- a/db/migrate/20180508055821_make_remote_mirrors_disabled_by_default.rb
+++ b/db/migrate/20180508055821_make_remote_mirrors_disabled_by_default.rb
@@ -1,4 +1,4 @@
-class MakeRemoteMirrorsDisabledByDefault < ActiveRecord::Migration
+class MakeRemoteMirrorsDisabledByDefault < ActiveRecord::Migration[4.2]
DOWNTIME = false
def up
diff --git a/db/migrate/20180508100222_add_not_null_constraint_to_project_mirror_data_foreign_key.rb b/db/migrate/20180508100222_add_not_null_constraint_to_project_mirror_data_foreign_key.rb
index 82087d15ccb..dba5d20f276 100644
--- a/db/migrate/20180508100222_add_not_null_constraint_to_project_mirror_data_foreign_key.rb
+++ b/db/migrate/20180508100222_add_not_null_constraint_to_project_mirror_data_foreign_key.rb
@@ -1,4 +1,4 @@
-class AddNotNullConstraintToProjectMirrorDataForeignKey < ActiveRecord::Migration
+class AddNotNullConstraintToProjectMirrorDataForeignKey < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180508102840_add_unique_constraint_to_project_mirror_data_project_id_index.rb b/db/migrate/20180508102840_add_unique_constraint_to_project_mirror_data_project_id_index.rb
index acb976b52fa..b225354ca43 100644
--- a/db/migrate/20180508102840_add_unique_constraint_to_project_mirror_data_project_id_index.rb
+++ b/db/migrate/20180508102840_add_unique_constraint_to_project_mirror_data_project_id_index.rb
@@ -1,4 +1,4 @@
-class AddUniqueConstraintToProjectMirrorDataProjectIdIndex < ActiveRecord::Migration
+class AddUniqueConstraintToProjectMirrorDataProjectIdIndex < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180508135515_set_runner_type_not_null.rb b/db/migrate/20180508135515_set_runner_type_not_null.rb
index dd043ec7179..00c546c8f47 100644
--- a/db/migrate/20180508135515_set_runner_type_not_null.rb
+++ b/db/migrate/20180508135515_set_runner_type_not_null.rb
@@ -1,4 +1,4 @@
-class SetRunnerTypeNotNull < ActiveRecord::Migration
+class SetRunnerTypeNotNull < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180511090724_add_index_on_ci_runners_runner_type.rb b/db/migrate/20180511090724_add_index_on_ci_runners_runner_type.rb
index f3ed20fd243..4913b8602c9 100644
--- a/db/migrate/20180511090724_add_index_on_ci_runners_runner_type.rb
+++ b/db/migrate/20180511090724_add_index_on_ci_runners_runner_type.rb
@@ -1,4 +1,4 @@
-class AddIndexOnCiRunnersRunnerType < ActiveRecord::Migration
+class AddIndexOnCiRunnersRunnerType < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180511131058_create_clusters_applications_jupyter.rb b/db/migrate/20180511131058_create_clusters_applications_jupyter.rb
index f3923884e37..749aeeb4792 100644
--- a/db/migrate/20180511131058_create_clusters_applications_jupyter.rb
+++ b/db/migrate/20180511131058_create_clusters_applications_jupyter.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class CreateClustersApplicationsJupyter < ActiveRecord::Migration
+class CreateClustersApplicationsJupyter < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180515005612_add_squash_to_merge_requests.rb b/db/migrate/20180515005612_add_squash_to_merge_requests.rb
index fd85e968acd..14636d6fd8e 100644
--- a/db/migrate/20180515005612_add_squash_to_merge_requests.rb
+++ b/db/migrate/20180515005612_add_squash_to_merge_requests.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddSquashToMergeRequests < ActiveRecord::Migration
+class AddSquashToMergeRequests < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/migrate/20180515121227_create_notes_diff_files.rb b/db/migrate/20180515121227_create_notes_diff_files.rb
index efcd3bb9c7e..e50324d8599 100644
--- a/db/migrate/20180515121227_create_notes_diff_files.rb
+++ b/db/migrate/20180515121227_create_notes_diff_files.rb
@@ -1,4 +1,4 @@
-class CreateNotesDiffFiles < ActiveRecord::Migration
+class CreateNotesDiffFiles < ActiveRecord::Migration[4.2]
DOWNTIME = false
disable_ddl_transaction!
diff --git a/db/migrate/20180517082340_add_not_null_constraints_to_project_authorizations.rb b/db/migrate/20180517082340_add_not_null_constraints_to_project_authorizations.rb
index 3b7b877232b..36f4770ff32 100644
--- a/db/migrate/20180517082340_add_not_null_constraints_to_project_authorizations.rb
+++ b/db/migrate/20180517082340_add_not_null_constraints_to_project_authorizations.rb
@@ -1,4 +1,4 @@
-class AddNotNullConstraintsToProjectAuthorizations < ActiveRecord::Migration
+class AddNotNullConstraintsToProjectAuthorizations < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20180523042841_rename_merge_requests_allow_maintainer_to_push.rb b/db/migrate/20180523042841_rename_merge_requests_allow_maintainer_to_push.rb
index 41bc7b71694..131dca1fbc2 100644
--- a/db/migrate/20180523042841_rename_merge_requests_allow_maintainer_to_push.rb
+++ b/db/migrate/20180523042841_rename_merge_requests_allow_maintainer_to_push.rb
@@ -1,4 +1,4 @@
-class RenameMergeRequestsAllowMaintainerToPush < ActiveRecord::Migration
+class RenameMergeRequestsAllowMaintainerToPush < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180524132016_merge_requests_target_id_iid_state_partial_index.rb b/db/migrate/20180524132016_merge_requests_target_id_iid_state_partial_index.rb
index cee576b91c8..bff4690427e 100644
--- a/db/migrate/20180524132016_merge_requests_target_id_iid_state_partial_index.rb
+++ b/db/migrate/20180524132016_merge_requests_target_id_iid_state_partial_index.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class MergeRequestsTargetIdIidStatePartialIndex < ActiveRecord::Migration
+class MergeRequestsTargetIdIidStatePartialIndex < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20180529093006_ensure_remote_mirror_columns.rb b/db/migrate/20180529093006_ensure_remote_mirror_columns.rb
index 22e9482cb1d..207e1f089fb 100644
--- a/db/migrate/20180529093006_ensure_remote_mirror_columns.rb
+++ b/db/migrate/20180529093006_ensure_remote_mirror_columns.rb
@@ -1,4 +1,4 @@
-class EnsureRemoteMirrorColumns < ActiveRecord::Migration
+class EnsureRemoteMirrorColumns < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180530135500_add_index_to_stages_position.rb b/db/migrate/20180530135500_add_index_to_stages_position.rb
index 61150f33a25..eabf94ab8ec 100644
--- a/db/migrate/20180530135500_add_index_to_stages_position.rb
+++ b/db/migrate/20180530135500_add_index_to_stages_position.rb
@@ -1,4 +1,4 @@
-class AddIndexToStagesPosition < ActiveRecord::Migration
+class AddIndexToStagesPosition < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180531185349_add_repository_languages.rb b/db/migrate/20180531185349_add_repository_languages.rb
index bfcfb618c87..26a01c3bb26 100644
--- a/db/migrate/20180531185349_add_repository_languages.rb
+++ b/db/migrate/20180531185349_add_repository_languages.rb
@@ -1,4 +1,4 @@
-class AddRepositoryLanguages < ActiveRecord::Migration
+class AddRepositoryLanguages < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180531220618_change_default_value_for_dsa_key_restriction.rb b/db/migrate/20180531220618_change_default_value_for_dsa_key_restriction.rb
index dbbbcd1f622..cf621c46f2b 100644
--- a/db/migrate/20180531220618_change_default_value_for_dsa_key_restriction.rb
+++ b/db/migrate/20180531220618_change_default_value_for_dsa_key_restriction.rb
@@ -1,4 +1,4 @@
-class ChangeDefaultValueForDsaKeyRestriction < ActiveRecord::Migration
+class ChangeDefaultValueForDsaKeyRestriction < ActiveRecord::Migration[4.2]
# Set this constant to true if this migration requires downtime.
DOWNTIME = false
diff --git a/db/migrate/20180601213245_add_deploy_strategy_to_project_auto_devops.rb b/db/migrate/20180601213245_add_deploy_strategy_to_project_auto_devops.rb
index 6f50d428965..78a3617ec93 100644
--- a/db/migrate/20180601213245_add_deploy_strategy_to_project_auto_devops.rb
+++ b/db/migrate/20180601213245_add_deploy_strategy_to_project_auto_devops.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddDeployStrategyToProjectAutoDevops < ActiveRecord::Migration
+class AddDeployStrategyToProjectAutoDevops < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20180607071808_add_push_events_branch_filter_to_web_hooks.rb b/db/migrate/20180607071808_add_push_events_branch_filter_to_web_hooks.rb
index 6a69460e611..e6a1daaffc2 100644
--- a/db/migrate/20180607071808_add_push_events_branch_filter_to_web_hooks.rb
+++ b/db/migrate/20180607071808_add_push_events_branch_filter_to_web_hooks.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddPushEventsBranchFilterToWebHooks < ActiveRecord::Migration
+class AddPushEventsBranchFilterToWebHooks < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180608091413_add_group_to_todos.rb b/db/migrate/20180608091413_add_group_to_todos.rb
index 20ba4849057..7f8efd78c59 100644
--- a/db/migrate/20180608091413_add_group_to_todos.rb
+++ b/db/migrate/20180608091413_add_group_to_todos.rb
@@ -1,4 +1,4 @@
-class AddGroupToTodos < ActiveRecord::Migration
+class AddGroupToTodos < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180608110058_rename_merge_requests_allow_collaboration.rb b/db/migrate/20180608110058_rename_merge_requests_allow_collaboration.rb
index 36f2a593fbe..0f2d5ba3a5e 100644
--- a/db/migrate/20180608110058_rename_merge_requests_allow_collaboration.rb
+++ b/db/migrate/20180608110058_rename_merge_requests_allow_collaboration.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RenameMergeRequestsAllowCollaboration < ActiveRecord::Migration
+class RenameMergeRequestsAllowCollaboration < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20180612103626_add_columns_for_helm_tiller_certificates.rb b/db/migrate/20180612103626_add_columns_for_helm_tiller_certificates.rb
index 57cea18abcd..d7273dff48e 100644
--- a/db/migrate/20180612103626_add_columns_for_helm_tiller_certificates.rb
+++ b/db/migrate/20180612103626_add_columns_for_helm_tiller_certificates.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
-class AddColumnsForHelmTillerCertificates < ActiveRecord::Migration
+class AddColumnsForHelmTillerCertificates < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180613081317_create_ci_builds_runner_session.rb b/db/migrate/20180613081317_create_ci_builds_runner_session.rb
index e550c07b9ab..eb41f76b105 100644
--- a/db/migrate/20180613081317_create_ci_builds_runner_session.rb
+++ b/db/migrate/20180613081317_create_ci_builds_runner_session.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class CreateCiBuildsRunnerSession < ActiveRecord::Migration
+class CreateCiBuildsRunnerSession < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20180625113853_create_import_export_uploads.rb b/db/migrate/20180625113853_create_import_export_uploads.rb
index be42304b0ae..d76b3e8cc15 100644
--- a/db/migrate/20180625113853_create_import_export_uploads.rb
+++ b/db/migrate/20180625113853_create_import_export_uploads.rb
@@ -1,4 +1,4 @@
-class CreateImportExportUploads < ActiveRecord::Migration
+class CreateImportExportUploads < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20180626125654_add_index_on_deployable_for_deployments.rb b/db/migrate/20180626125654_add_index_on_deployable_for_deployments.rb
index a0e3a228f6c..0fc14b43fae 100644
--- a/db/migrate/20180626125654_add_index_on_deployable_for_deployments.rb
+++ b/db/migrate/20180626125654_add_index_on_deployable_for_deployments.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddIndexOnDeployableForDeployments < ActiveRecord::Migration
+class AddIndexOnDeployableForDeployments < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180628124813_alter_web_hook_logs_indexes.rb b/db/migrate/20180628124813_alter_web_hook_logs_indexes.rb
index 1878e76811d..64ef165c5e6 100644
--- a/db/migrate/20180628124813_alter_web_hook_logs_indexes.rb
+++ b/db/migrate/20180628124813_alter_web_hook_logs_indexes.rb
@@ -3,7 +3,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AlterWebHookLogsIndexes < ActiveRecord::Migration
+class AlterWebHookLogsIndexes < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
@@ -12,7 +12,7 @@ class AlterWebHookLogsIndexes < ActiveRecord::Migration
disable_ddl_transaction!
# "created_at" comes first so the Sidekiq worker pruning old webhook logs can
- # use a composite index index.
+ # use a composite index.
#
# We leave the old standalone index on "web_hook_id" in place so future code
# that doesn't care about "created_at" can still use that index.
diff --git a/db/migrate/20180629153018_create_site_statistics.rb b/db/migrate/20180629153018_create_site_statistics.rb
index 085ce1ba64b..60a32b3b2a7 100644
--- a/db/migrate/20180629153018_create_site_statistics.rb
+++ b/db/migrate/20180629153018_create_site_statistics.rb
@@ -1,4 +1,4 @@
-class CreateSiteStatistics < ActiveRecord::Migration
+class CreateSiteStatistics < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180702124358_remove_orphaned_routes.rb b/db/migrate/20180702124358_remove_orphaned_routes.rb
index 4068e479b6c..62c15f9cd00 100644
--- a/db/migrate/20180702124358_remove_orphaned_routes.rb
+++ b/db/migrate/20180702124358_remove_orphaned_routes.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RemoveOrphanedRoutes < ActiveRecord::Migration
+class RemoveOrphanedRoutes < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180702134423_generate_missing_routes.rb b/db/migrate/20180702134423_generate_missing_routes.rb
index 994725f9bd1..a440bc3179c 100644
--- a/db/migrate/20180702134423_generate_missing_routes.rb
+++ b/db/migrate/20180702134423_generate_missing_routes.rb
@@ -7,7 +7,7 @@
# On GitLab.com this would insert 611 project routes, and 0 namespace routes.
# The exact number could vary per instance, so we take care of both just in
# case.
-class GenerateMissingRoutes < ActiveRecord::Migration
+class GenerateMissingRoutes < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180704204006_add_hide_third_party_offers_to_application_settings.rb b/db/migrate/20180704204006_add_hide_third_party_offers_to_application_settings.rb
index 6631c5d1b6c..03afbe217b5 100644
--- a/db/migrate/20180704204006_add_hide_third_party_offers_to_application_settings.rb
+++ b/db/migrate/20180704204006_add_hide_third_party_offers_to_application_settings.rb
@@ -1,4 +1,4 @@
-class AddHideThirdPartyOffersToApplicationSettings < ActiveRecord::Migration
+class AddHideThirdPartyOffersToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180705160945_add_file_format_to_ci_job_artifacts.rb b/db/migrate/20180705160945_add_file_format_to_ci_job_artifacts.rb
index 63c188693f3..938438841a5 100644
--- a/db/migrate/20180705160945_add_file_format_to_ci_job_artifacts.rb
+++ b/db/migrate/20180705160945_add_file_format_to_ci_job_artifacts.rb
@@ -1,4 +1,4 @@
-class AddFileFormatToCiJobArtifacts < ActiveRecord::Migration
+class AddFileFormatToCiJobArtifacts < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20180710162338_add_foreign_key_from_notification_settings_to_users.rb b/db/migrate/20180710162338_add_foreign_key_from_notification_settings_to_users.rb
index 91656f194e5..79691f2b24c 100644
--- a/db/migrate/20180710162338_add_foreign_key_from_notification_settings_to_users.rb
+++ b/db/migrate/20180710162338_add_foreign_key_from_notification_settings_to_users.rb
@@ -1,4 +1,4 @@
-class AddForeignKeyFromNotificationSettingsToUsers < ActiveRecord::Migration
+class AddForeignKeyFromNotificationSettingsToUsers < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
class NotificationSetting < ActiveRecord::Base
diff --git a/db/migrate/20180711103851_drop_duplicate_protected_tags.rb b/db/migrate/20180711103851_drop_duplicate_protected_tags.rb
index 8fa2137551e..6166aa65f1f 100644
--- a/db/migrate/20180711103851_drop_duplicate_protected_tags.rb
+++ b/db/migrate/20180711103851_drop_duplicate_protected_tags.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class DropDuplicateProtectedTags < ActiveRecord::Migration
+class DropDuplicateProtectedTags < ActiveRecord::Migration[4.2]
DOWNTIME = false
disable_ddl_transaction!
diff --git a/db/migrate/20180711103922_add_protected_tags_index.rb b/db/migrate/20180711103922_add_protected_tags_index.rb
index 7ed2258ebaf..ef81ca633c3 100644
--- a/db/migrate/20180711103922_add_protected_tags_index.rb
+++ b/db/migrate/20180711103922_add_protected_tags_index.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddProtectedTagsIndex < ActiveRecord::Migration
+class AddProtectedTagsIndex < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180713092803_create_user_statuses.rb b/db/migrate/20180713092803_create_user_statuses.rb
index cbe21b89ad9..43b96805c1e 100644
--- a/db/migrate/20180713092803_create_user_statuses.rb
+++ b/db/migrate/20180713092803_create_user_statuses.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class CreateUserStatuses < ActiveRecord::Migration
+class CreateUserStatuses < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180717125853_remove_restricted_todos.rb b/db/migrate/20180717125853_remove_restricted_todos.rb
index fdf43921a73..1d4bbf6571e 100644
--- a/db/migrate/20180717125853_remove_restricted_todos.rb
+++ b/db/migrate/20180717125853_remove_restricted_todos.rb
@@ -2,7 +2,7 @@
# for more information on how to write migrations for GitLab.
# frozen_string_literal: true
-class RemoveRestrictedTodos < ActiveRecord::Migration
+class RemoveRestrictedTodos < ActiveRecord::Migration[4.2]
DOWNTIME = false
disable_ddl_transaction!
diff --git a/db/migrate/20180718005113_add_instance_statistics_visibility_to_application_setting.rb b/db/migrate/20180718005113_add_instance_statistics_visibility_to_application_setting.rb
index 4b6c1f74346..ed5fa58b481 100644
--- a/db/migrate/20180718005113_add_instance_statistics_visibility_to_application_setting.rb
+++ b/db/migrate/20180718005113_add_instance_statistics_visibility_to_application_setting.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class AddInstanceStatisticsVisibilityToApplicationSetting < ActiveRecord::Migration
+class AddInstanceStatisticsVisibilityToApplicationSetting < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180720023512_add_receive_max_input_size_to_application_settings.rb b/db/migrate/20180720023512_add_receive_max_input_size_to_application_settings.rb
index 4ed851a0780..0cf3c78507e 100644
--- a/db/migrate/20180720023512_add_receive_max_input_size_to_application_settings.rb
+++ b/db/migrate/20180720023512_add_receive_max_input_size_to_application_settings.rb
@@ -2,7 +2,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddReceiveMaxInputSizeToApplicationSettings < ActiveRecord::Migration
+class AddReceiveMaxInputSizeToApplicationSettings < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20180722103201_add_private_profile_to_users.rb b/db/migrate/20180722103201_add_private_profile_to_users.rb
index 4f7ef1322d8..c8d917065bb 100644
--- a/db/migrate/20180722103201_add_private_profile_to_users.rb
+++ b/db/migrate/20180722103201_add_private_profile_to_users.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddPrivateProfileToUsers < ActiveRecord::Migration
+class AddPrivateProfileToUsers < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20180723135214_add_web_ide_client_side_preview_enabled_to_application_settings.rb b/db/migrate/20180723135214_add_web_ide_client_side_preview_enabled_to_application_settings.rb
index 1ebb91da00c..23b8e04674a 100644
--- a/db/migrate/20180723135214_add_web_ide_client_side_preview_enabled_to_application_settings.rb
+++ b/db/migrate/20180723135214_add_web_ide_client_side_preview_enabled_to_application_settings.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class AddWebIdeClientSidePreviewEnabledToApplicationSettings < ActiveRecord::Migration
+class AddWebIdeClientSidePreviewEnabledToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180726172057_create_resource_label_events.rb b/db/migrate/20180726172057_create_resource_label_events.rb
index 2ef7078d898..550e35d6f90 100644
--- a/db/migrate/20180726172057_create_resource_label_events.rb
+++ b/db/migrate/20180726172057_create_resource_label_events.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class CreateResourceLabelEvents < ActiveRecord::Migration
+class CreateResourceLabelEvents < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180807153545_remove_redundant_status_index_on_ci_builds.rb b/db/migrate/20180807153545_remove_redundant_status_index_on_ci_builds.rb
index f4f7cb6f8ca..c957fc2f6fc 100644
--- a/db/migrate/20180807153545_remove_redundant_status_index_on_ci_builds.rb
+++ b/db/migrate/20180807153545_remove_redundant_status_index_on_ci_builds.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class RemoveRedundantStatusIndexOnCiBuilds < ActiveRecord::Migration
+class RemoveRedundantStatusIndexOnCiBuilds < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180808162000_add_user_show_add_ssh_key_message_to_application_settings.rb b/db/migrate/20180808162000_add_user_show_add_ssh_key_message_to_application_settings.rb
index e3019af2cc9..946d99a4c5f 100644
--- a/db/migrate/20180808162000_add_user_show_add_ssh_key_message_to_application_settings.rb
+++ b/db/migrate/20180808162000_add_user_show_add_ssh_key_message_to_application_settings.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddUserShowAddSshKeyMessageToApplicationSettings < ActiveRecord::Migration
+class AddUserShowAddSshKeyMessageToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20180813101999_change_default_of_auto_devops_instance_wide.rb b/db/migrate/20180813101999_change_default_of_auto_devops_instance_wide.rb
index 05d1124f5c4..da101bc76e3 100644
--- a/db/migrate/20180813101999_change_default_of_auto_devops_instance_wide.rb
+++ b/db/migrate/20180813101999_change_default_of_auto_devops_instance_wide.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class ChangeDefaultOfAutoDevopsInstanceWide < ActiveRecord::Migration
+class ChangeDefaultOfAutoDevopsInstanceWide < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180813102000_enable_auto_devops_instance_wide_for_everyone.rb b/db/migrate/20180813102000_enable_auto_devops_instance_wide_for_everyone.rb
index 21fb62806b3..1531fad2c6c 100644
--- a/db/migrate/20180813102000_enable_auto_devops_instance_wide_for_everyone.rb
+++ b/db/migrate/20180813102000_enable_auto_devops_instance_wide_for_everyone.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class EnableAutoDevopsInstanceWideForEveryone < ActiveRecord::Migration
+class EnableAutoDevopsInstanceWideForEveryone < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180814153625_add_commit_email_to_users.rb b/db/migrate/20180814153625_add_commit_email_to_users.rb
index 5c87d73688e..4d9217ea504 100644
--- a/db/migrate/20180814153625_add_commit_email_to_users.rb
+++ b/db/migrate/20180814153625_add_commit_email_to_users.rb
@@ -3,7 +3,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddCommitEmailToUsers < ActiveRecord::Migration
+class AddCommitEmailToUsers < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/migrate/20180815040323_add_authorization_type_to_cluster_platforms_kubernetes.rb b/db/migrate/20180815040323_add_authorization_type_to_cluster_platforms_kubernetes.rb
index 6397d6dd99f..44125b4696a 100644
--- a/db/migrate/20180815040323_add_authorization_type_to_cluster_platforms_kubernetes.rb
+++ b/db/migrate/20180815040323_add_authorization_type_to_cluster_platforms_kubernetes.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class AddAuthorizationTypeToClusterPlatformsKubernetes < ActiveRecord::Migration
+class AddAuthorizationTypeToClusterPlatformsKubernetes < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180815160409_add_file_location_to_ci_job_artifacts.rb b/db/migrate/20180815160409_add_file_location_to_ci_job_artifacts.rb
index 620342005fe..389101902d0 100644
--- a/db/migrate/20180815160409_add_file_location_to_ci_job_artifacts.rb
+++ b/db/migrate/20180815160409_add_file_location_to_ci_job_artifacts.rb
@@ -1,4 +1,4 @@
-class AddFileLocationToCiJobArtifacts < ActiveRecord::Migration
+class AddFileLocationToCiJobArtifacts < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180815170510_add_partial_index_to_ci_builds_artifacts_file.rb b/db/migrate/20180815170510_add_partial_index_to_ci_builds_artifacts_file.rb
index 5e041ea6559..237e6ba4559 100644
--- a/db/migrate/20180815170510_add_partial_index_to_ci_builds_artifacts_file.rb
+++ b/db/migrate/20180815170510_add_partial_index_to_ci_builds_artifacts_file.rb
@@ -1,4 +1,4 @@
-class AddPartialIndexToCiBuildsArtifactsFile < ActiveRecord::Migration
+class AddPartialIndexToCiBuildsArtifactsFile < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180815175440_add_index_on_list_type.rb b/db/migrate/20180815175440_add_index_on_list_type.rb
index aad805e436e..3fe0f6b8de5 100644
--- a/db/migrate/20180815175440_add_index_on_list_type.rb
+++ b/db/migrate/20180815175440_add_index_on_list_type.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
-class AddIndexOnListType < ActiveRecord::Migration
+class AddIndexOnListType < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180831164904_fix_prometheus_metric_query_limits.rb b/db/migrate/20180831164904_fix_prometheus_metric_query_limits.rb
index 28c92e7c7ac..80c4d11a38e 100644
--- a/db/migrate/20180831164904_fix_prometheus_metric_query_limits.rb
+++ b/db/migrate/20180831164904_fix_prometheus_metric_query_limits.rb
@@ -4,7 +4,7 @@
# for more information on how to write migrations for GitLab.
require Rails.root.join('db/migrate/prometheus_metrics_limits_to_mysql')
-class FixPrometheusMetricQueryLimits < ActiveRecord::Migration
+class FixPrometheusMetricQueryLimits < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180831164905_add_common_to_prometheus_metrics.rb b/db/migrate/20180831164905_add_common_to_prometheus_metrics.rb
index e21c156fff6..5eb77d0480d 100644
--- a/db/migrate/20180831164905_add_common_to_prometheus_metrics.rb
+++ b/db/migrate/20180831164905_add_common_to_prometheus_metrics.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class AddCommonToPrometheusMetrics < ActiveRecord::Migration
+class AddCommonToPrometheusMetrics < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180831164907_add_index_on_common_for_prometheus_metrics.rb b/db/migrate/20180831164907_add_index_on_common_for_prometheus_metrics.rb
index fdbaaf67b87..5758321891a 100644
--- a/db/migrate/20180831164907_add_index_on_common_for_prometheus_metrics.rb
+++ b/db/migrate/20180831164907_add_index_on_common_for_prometheus_metrics.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class AddIndexOnCommonForPrometheusMetrics < ActiveRecord::Migration
+class AddIndexOnCommonForPrometheusMetrics < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180831164908_add_identifier_to_prometheus_metric.rb b/db/migrate/20180831164908_add_identifier_to_prometheus_metric.rb
index 67de990757e..7aa5950249c 100644
--- a/db/migrate/20180831164908_add_identifier_to_prometheus_metric.rb
+++ b/db/migrate/20180831164908_add_identifier_to_prometheus_metric.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class AddIdentifierToPrometheusMetric < ActiveRecord::Migration
+class AddIdentifierToPrometheusMetric < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180831164909_add_index_for_identifier_to_prometheus_metric.rb b/db/migrate/20180831164909_add_index_for_identifier_to_prometheus_metric.rb
index b30c24ccafe..1f6cfc181f4 100644
--- a/db/migrate/20180831164909_add_index_for_identifier_to_prometheus_metric.rb
+++ b/db/migrate/20180831164909_add_index_for_identifier_to_prometheus_metric.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class AddIndexForIdentifierToPrometheusMetric < ActiveRecord::Migration
+class AddIndexForIdentifierToPrometheusMetric < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180831164910_import_common_metrics.rb b/db/migrate/20180831164910_import_common_metrics.rb
index 72658c09b8e..f67d5f40aad 100644
--- a/db/migrate/20180831164910_import_common_metrics.rb
+++ b/db/migrate/20180831164910_import_common_metrics.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class ImportCommonMetrics < ActiveRecord::Migration
+class ImportCommonMetrics < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
require Rails.root.join('db/importers/common_metrics_importer.rb')
diff --git a/db/migrate/20180901171833_add_project_config_source_status_index_to_pipeline.rb b/db/migrate/20180901171833_add_project_config_source_status_index_to_pipeline.rb
index 99dfcc94b12..f2136657d95 100644
--- a/db/migrate/20180901171833_add_project_config_source_status_index_to_pipeline.rb
+++ b/db/migrate/20180901171833_add_project_config_source_status_index_to_pipeline.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class AddProjectConfigSourceStatusIndexToPipeline < ActiveRecord::Migration
+class AddProjectConfigSourceStatusIndexToPipeline < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180901200537_add_resource_label_event_reference_fields.rb b/db/migrate/20180901200537_add_resource_label_event_reference_fields.rb
index 264970ceed8..c8875e16914 100644
--- a/db/migrate/20180901200537_add_resource_label_event_reference_fields.rb
+++ b/db/migrate/20180901200537_add_resource_label_event_reference_fields.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class AddResourceLabelEventReferenceFields < ActiveRecord::Migration
+class AddResourceLabelEventReferenceFields < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20180906101639_add_user_ping_consent_to_application_settings.rb b/db/migrate/20180906101639_add_user_ping_consent_to_application_settings.rb
index 5d0e67d2648..334efa12e7b 100644
--- a/db/migrate/20180906101639_add_user_ping_consent_to_application_settings.rb
+++ b/db/migrate/20180906101639_add_user_ping_consent_to_application_settings.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class AddUserPingConsentToApplicationSettings < ActiveRecord::Migration
+class AddUserPingConsentToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180907015926_add_legacy_abac_to_cluster_providers_gcp.rb b/db/migrate/20180907015926_add_legacy_abac_to_cluster_providers_gcp.rb
index 933047e32de..c57611a0f7d 100644
--- a/db/migrate/20180907015926_add_legacy_abac_to_cluster_providers_gcp.rb
+++ b/db/migrate/20180907015926_add_legacy_abac_to_cluster_providers_gcp.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class AddLegacyAbacToClusterProvidersGcp < ActiveRecord::Migration
+class AddLegacyAbacToClusterProvidersGcp < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180910115836_add_attr_encrypted_columns_to_web_hook.rb b/db/migrate/20180910115836_add_attr_encrypted_columns_to_web_hook.rb
index 72f5c8d653b..ca8dbdba2bb 100644
--- a/db/migrate/20180910115836_add_attr_encrypted_columns_to_web_hook.rb
+++ b/db/migrate/20180910115836_add_attr_encrypted_columns_to_web_hook.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class AddAttrEncryptedColumnsToWebHook < ActiveRecord::Migration
+class AddAttrEncryptedColumnsToWebHook < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180910153412_add_token_digest_to_personal_access_tokens.rb b/db/migrate/20180910153412_add_token_digest_to_personal_access_tokens.rb
index 203fcfe8eae..142e454832f 100644
--- a/db/migrate/20180910153412_add_token_digest_to_personal_access_tokens.rb
+++ b/db/migrate/20180910153412_add_token_digest_to_personal_access_tokens.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class AddTokenDigestToPersonalAccessTokens < ActiveRecord::Migration
+class AddTokenDigestToPersonalAccessTokens < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180910153413_add_index_to_token_digest_on_personal_access_tokens.rb b/db/migrate/20180910153413_add_index_to_token_digest_on_personal_access_tokens.rb
index 4300cd13a45..d501b07614a 100644
--- a/db/migrate/20180910153413_add_index_to_token_digest_on_personal_access_tokens.rb
+++ b/db/migrate/20180910153413_add_index_to_token_digest_on_personal_access_tokens.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class AddIndexToTokenDigestOnPersonalAccessTokens < ActiveRecord::Migration
+class AddIndexToTokenDigestOnPersonalAccessTokens < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180912111628_add_knative_application.rb b/db/migrate/20180912111628_add_knative_application.rb
index bfda6a945a7..86d9100d2e7 100644
--- a/db/migrate/20180912111628_add_knative_application.rb
+++ b/db/migrate/20180912111628_add_knative_application.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class AddKnativeApplication < ActiveRecord::Migration
+class AddKnativeApplication < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180916011959_add_index_pipelines_project_id_source.rb b/db/migrate/20180916011959_add_index_pipelines_project_id_source.rb
index b9bebf30cf0..5b71c79ac86 100644
--- a/db/migrate/20180916011959_add_index_pipelines_project_id_source.rb
+++ b/db/migrate/20180916011959_add_index_pipelines_project_id_source.rb
@@ -3,7 +3,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddIndexPipelinesProjectIdSource < ActiveRecord::Migration
+class AddIndexPipelinesProjectIdSource < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180924141949_add_diff_max_patch_bytes_to_application_settings.rb b/db/migrate/20180924141949_add_diff_max_patch_bytes_to_application_settings.rb
index 084dfc65ce5..5dac5f0d100 100644
--- a/db/migrate/20180924141949_add_diff_max_patch_bytes_to_application_settings.rb
+++ b/db/migrate/20180924141949_add_diff_max_patch_bytes_to_application_settings.rb
@@ -3,7 +3,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddDiffMaxPatchBytesToApplicationSettings < ActiveRecord::Migration
+class AddDiffMaxPatchBytesToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
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 c163fbb1fd6..cd2f8b59d41 100644
--- a/db/migrate/20180924190739_add_scheduled_at_to_ci_builds.rb
+++ b/db/migrate/20180924190739_add_scheduled_at_to_ci_builds.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class AddScheduledAtToCiBuilds < ActiveRecord::Migration
+class AddScheduledAtToCiBuilds < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20180924201039_add_partial_index_to_scheduled_at.rb b/db/migrate/20180924201039_add_partial_index_to_scheduled_at.rb
index 81bf0d94e11..378fc4e5fea 100644
--- a/db/migrate/20180924201039_add_partial_index_to_scheduled_at.rb
+++ b/db/migrate/20180924201039_add_partial_index_to_scheduled_at.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class AddPartialIndexToScheduledAt < ActiveRecord::Migration
+class AddPartialIndexToScheduledAt < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20180925200829_create_user_preferences.rb b/db/migrate/20180925200829_create_user_preferences.rb
index 755cabdabde..b46df8157a6 100644
--- a/db/migrate/20180925200829_create_user_preferences.rb
+++ b/db/migrate/20180925200829_create_user_preferences.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class CreateUserPreferences < ActiveRecord::Migration
+class CreateUserPreferences < ActiveRecord::Migration[4.2]
DOWNTIME = false
class UserPreference < ActiveRecord::Base
diff --git a/db/migrate/20180927073410_add_index_to_project_deploy_tokens_deploy_token_id.rb b/db/migrate/20180927073410_add_index_to_project_deploy_tokens_deploy_token_id.rb
index 61d32fe16eb..80577c52a01 100644
--- a/db/migrate/20180927073410_add_index_to_project_deploy_tokens_deploy_token_id.rb
+++ b/db/migrate/20180927073410_add_index_to_project_deploy_tokens_deploy_token_id.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class AddIndexToProjectDeployTokensDeployTokenId < ActiveRecord::Migration
+class AddIndexToProjectDeployTokensDeployTokenId < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20181002172433_remove_restricted_todos_with_cte.rb b/db/migrate/20181002172433_remove_restricted_todos_with_cte.rb
index 0a8f4a12266..7826c8d802e 100644
--- a/db/migrate/20181002172433_remove_restricted_todos_with_cte.rb
+++ b/db/migrate/20181002172433_remove_restricted_todos_with_cte.rb
@@ -3,7 +3,7 @@
# for more information on how to write migrations for GitLab.
# rescheduling of the revised RemoveRestrictedTodos background migration
-class RemoveRestrictedTodosWithCte < ActiveRecord::Migration
+class RemoveRestrictedTodosWithCte < ActiveRecord::Migration[4.2]
DOWNTIME = false
disable_ddl_transaction!
diff --git a/db/migrate/20181005110927_add_index_to_lfs_objects_file_store.rb b/db/migrate/20181005110927_add_index_to_lfs_objects_file_store.rb
index d09543aa4cc..ff17a0a567d 100644
--- a/db/migrate/20181005110927_add_index_to_lfs_objects_file_store.rb
+++ b/db/migrate/20181005110927_add_index_to_lfs_objects_file_store.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class AddIndexToLfsObjectsFileStore < ActiveRecord::Migration
+class AddIndexToLfsObjectsFileStore < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20181005125926_add_index_to_uploads_store.rb b/db/migrate/20181005125926_add_index_to_uploads_store.rb
index d32ca05e980..d9e31225b6f 100644
--- a/db/migrate/20181005125926_add_index_to_uploads_store.rb
+++ b/db/migrate/20181005125926_add_index_to_uploads_store.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class AddIndexToUploadsStore < ActiveRecord::Migration
+class AddIndexToUploadsStore < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20181009190428_create_clusters_kubernetes_namespaces.rb b/db/migrate/20181009190428_create_clusters_kubernetes_namespaces.rb
index a58c190e1d6..62ad6c63d0a 100644
--- a/db/migrate/20181009190428_create_clusters_kubernetes_namespaces.rb
+++ b/db/migrate/20181009190428_create_clusters_kubernetes_namespaces.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class CreateClustersKubernetesNamespaces < ActiveRecord::Migration
+class CreateClustersKubernetesNamespaces < ActiveRecord::Migration[4.2]
DOWNTIME = false
INDEX_NAME = 'kubernetes_namespaces_cluster_and_namespace'
diff --git a/db/migrate/20181010235606_create_board_project_recent_visits.rb b/db/migrate/20181010235606_create_board_project_recent_visits.rb
index 426f41e202a..07bfbdda26b 100644
--- a/db/migrate/20181010235606_create_board_project_recent_visits.rb
+++ b/db/migrate/20181010235606_create_board_project_recent_visits.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class CreateBoardProjectRecentVisits < ActiveRecord::Migration
+class CreateBoardProjectRecentVisits < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20181014203236_create_cluster_groups.rb b/db/migrate/20181014203236_create_cluster_groups.rb
index 69382d5c851..33ae9a4a478 100644
--- a/db/migrate/20181014203236_create_cluster_groups.rb
+++ b/db/migrate/20181014203236_create_cluster_groups.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class CreateClusterGroups < ActiveRecord::Migration
+class CreateClusterGroups < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20181015155839_add_finished_at_to_deployments.rb b/db/migrate/20181015155839_add_finished_at_to_deployments.rb
index 1a061bb0f5f..bb8d6cdcf2c 100644
--- a/db/migrate/20181015155839_add_finished_at_to_deployments.rb
+++ b/db/migrate/20181015155839_add_finished_at_to_deployments.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class AddFinishedAtToDeployments < ActiveRecord::Migration
+class AddFinishedAtToDeployments < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20181016141739_add_status_to_deployments.rb b/db/migrate/20181016141739_add_status_to_deployments.rb
index 321172696b4..2ff778448b4 100644
--- a/db/migrate/20181016141739_add_status_to_deployments.rb
+++ b/db/migrate/20181016141739_add_status_to_deployments.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class AddStatusToDeployments < ActiveRecord::Migration
+class AddStatusToDeployments < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DEPLOYMENT_STATUS_SUCCESS = 2 # Equivalent to Deployment.state_machine.states['success'].value
diff --git a/db/migrate/20181016152238_create_board_group_recent_visits.rb b/db/migrate/20181016152238_create_board_group_recent_visits.rb
index 1e55dc8658e..9e240a5f97f 100644
--- a/db/migrate/20181016152238_create_board_group_recent_visits.rb
+++ b/db/migrate/20181016152238_create_board_group_recent_visits.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class CreateBoardGroupRecentVisits < ActiveRecord::Migration
+class CreateBoardGroupRecentVisits < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20181017001059_add_cluster_type_to_clusters.rb b/db/migrate/20181017001059_add_cluster_type_to_clusters.rb
index 191e7eb4fb3..d032afe1a43 100644
--- a/db/migrate/20181017001059_add_cluster_type_to_clusters.rb
+++ b/db/migrate/20181017001059_add_cluster_type_to_clusters.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class AddClusterTypeToClusters < ActiveRecord::Migration
+class AddClusterTypeToClusters < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20181019032400_add_shards_table.rb b/db/migrate/20181019032400_add_shards_table.rb
index 5e0a6960548..e31af97cc94 100644
--- a/db/migrate/20181019032400_add_shards_table.rb
+++ b/db/migrate/20181019032400_add_shards_table.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class AddShardsTable < ActiveRecord::Migration
+class AddShardsTable < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20181019032408_add_repositories_table.rb b/db/migrate/20181019032408_add_repositories_table.rb
index 077f264d3ce..2153c1c9fc6 100644
--- a/db/migrate/20181019032408_add_repositories_table.rb
+++ b/db/migrate/20181019032408_add_repositories_table.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class AddRepositoriesTable < ActiveRecord::Migration
+class AddRepositoriesTable < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/migrate/20181019105553_add_projects_pool_repository_id_foreign_key.rb b/db/migrate/20181019105553_add_projects_pool_repository_id_foreign_key.rb
index 059988de38a..dddf44ce488 100644
--- a/db/migrate/20181019105553_add_projects_pool_repository_id_foreign_key.rb
+++ b/db/migrate/20181019105553_add_projects_pool_repository_id_foreign_key.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class AddProjectsPoolRepositoryIdForeignKey < ActiveRecord::Migration
+class AddProjectsPoolRepositoryIdForeignKey < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20181022135539_add_index_on_status_to_deployments.rb b/db/migrate/20181022135539_add_index_on_status_to_deployments.rb
index 2eed20aa855..9c7a722c626 100644
--- a/db/migrate/20181022135539_add_index_on_status_to_deployments.rb
+++ b/db/migrate/20181022135539_add_index_on_status_to_deployments.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class AddIndexOnStatusToDeployments < ActiveRecord::Migration
+class AddIndexOnStatusToDeployments < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20181023104858_add_archive_builds_duration_to_application_settings.rb b/db/migrate/20181023104858_add_archive_builds_duration_to_application_settings.rb
index 744748b3fad..5d7a21fc5b5 100644
--- a/db/migrate/20181023104858_add_archive_builds_duration_to_application_settings.rb
+++ b/db/migrate/20181023104858_add_archive_builds_duration_to_application_settings.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class AddArchiveBuildsDurationToApplicationSettings < ActiveRecord::Migration
+class AddArchiveBuildsDurationToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20181023144439_add_partial_index_for_legacy_successful_deployments.rb b/db/migrate/20181023144439_add_partial_index_for_legacy_successful_deployments.rb
index 5896102af1c..e90e59b57a9 100644
--- a/db/migrate/20181023144439_add_partial_index_for_legacy_successful_deployments.rb
+++ b/db/migrate/20181023144439_add_partial_index_for_legacy_successful_deployments.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class AddPartialIndexForLegacySuccessfulDeployments < ActiveRecord::Migration
+class AddPartialIndexForLegacySuccessfulDeployments < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20181025115728_add_private_commit_email_hostname_to_application_settings.rb b/db/migrate/20181025115728_add_private_commit_email_hostname_to_application_settings.rb
index 89ddaf2ae2b..052a344f182 100644
--- a/db/migrate/20181025115728_add_private_commit_email_hostname_to_application_settings.rb
+++ b/db/migrate/20181025115728_add_private_commit_email_hostname_to_application_settings.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class AddPrivateCommitEmailHostnameToApplicationSettings < ActiveRecord::Migration
+class AddPrivateCommitEmailHostnameToApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20181026143227_migrate_snippets_access_level_default_value.rb b/db/migrate/20181026143227_migrate_snippets_access_level_default_value.rb
index ede0ee27b8a..2f4ef33b253 100644
--- a/db/migrate/20181026143227_migrate_snippets_access_level_default_value.rb
+++ b/db/migrate/20181026143227_migrate_snippets_access_level_default_value.rb
@@ -3,7 +3,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class MigrateSnippetsAccessLevelDefaultValue < ActiveRecord::Migration
+class MigrateSnippetsAccessLevelDefaultValue < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20181030154446_add_missing_indexes_for_foreign_keys.rb b/db/migrate/20181030154446_add_missing_indexes_for_foreign_keys.rb
index 176d55565d8..2b5cd45e92c 100644
--- a/db/migrate/20181030154446_add_missing_indexes_for_foreign_keys.rb
+++ b/db/migrate/20181030154446_add_missing_indexes_for_foreign_keys.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class AddMissingIndexesForForeignKeys < ActiveRecord::Migration
+class AddMissingIndexesForForeignKeys < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20181031190558_drop_fk_gcp_clusters_table.rb b/db/migrate/20181031190558_drop_fk_gcp_clusters_table.rb
index a7106111f46..2c1dea05808 100644
--- a/db/migrate/20181031190558_drop_fk_gcp_clusters_table.rb
+++ b/db/migrate/20181031190558_drop_fk_gcp_clusters_table.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class DropFkGcpClustersTable < ActiveRecord::Migration
+class DropFkGcpClustersTable < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20181031190559_drop_gcp_clusters_table.rb b/db/migrate/20181031190559_drop_gcp_clusters_table.rb
index 808d474b4fc..597fe49f4c8 100644
--- a/db/migrate/20181031190559_drop_gcp_clusters_table.rb
+++ b/db/migrate/20181031190559_drop_gcp_clusters_table.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class DropGcpClustersTable < ActiveRecord::Migration
+class DropGcpClustersTable < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20181101144347_add_index_for_stuck_mr_query.rb b/db/migrate/20181101144347_add_index_for_stuck_mr_query.rb
index 5d3ace54e5c..569eaa8b22c 100644
--- a/db/migrate/20181101144347_add_index_for_stuck_mr_query.rb
+++ b/db/migrate/20181101144347_add_index_for_stuck_mr_query.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
-class AddIndexForStuckMrQuery < ActiveRecord::Migration
+class AddIndexForStuckMrQuery < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20181106135939_add_index_to_deployments.rb b/db/migrate/20181106135939_add_index_to_deployments.rb
index 5f988a4723c..e8181e61d22 100644
--- a/db/migrate/20181106135939_add_index_to_deployments.rb
+++ b/db/migrate/20181106135939_add_index_to_deployments.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class AddIndexToDeployments < ActiveRecord::Migration
+class AddIndexToDeployments < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/migrate/20181112103239_drop_default_value_on_status_deployments.rb b/db/migrate/20181112103239_drop_default_value_on_status_deployments.rb
index a480c15e66b..59d6d2f29ff 100644
--- a/db/migrate/20181112103239_drop_default_value_on_status_deployments.rb
+++ b/db/migrate/20181112103239_drop_default_value_on_status_deployments.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class DropDefaultValueOnStatusDeployments < ActiveRecord::Migration
+class DropDefaultValueOnStatusDeployments < ActiveRecord::Migration[4.2]
DOWNTIME = false
DEPLOYMENT_STATUS_SUCCESS = 2 # Equivalent to Deployment.state_machine.states['success'].value
diff --git a/db/migrate/gpg_keys_limits_to_mysql.rb b/db/migrate/gpg_keys_limits_to_mysql.rb
index 38729320d8c..2cd347a0463 100644
--- a/db/migrate/gpg_keys_limits_to_mysql.rb
+++ b/db/migrate/gpg_keys_limits_to_mysql.rb
@@ -1,4 +1,4 @@
-class IncreaseMysqlTextLimitForGpgKeys < ActiveRecord::Migration
+class IncreaseMysqlTextLimitForGpgKeys < ActiveRecord::Migration[4.2]
# Set this constant to true if this migration requires downtime.
DOWNTIME = false
diff --git a/db/migrate/limits_ci_build_trace_chunks_raw_data_for_mysql.rb b/db/migrate/limits_ci_build_trace_chunks_raw_data_for_mysql.rb
index 9fd23aae1e5..92402cf387b 100644
--- a/db/migrate/limits_ci_build_trace_chunks_raw_data_for_mysql.rb
+++ b/db/migrate/limits_ci_build_trace_chunks_raw_data_for_mysql.rb
@@ -1,4 +1,4 @@
-class LimitsCiBuildTraceChunksRawDataForMysql < ActiveRecord::Migration
+class LimitsCiBuildTraceChunksRawDataForMysql < ActiveRecord::Migration[4.2]
def up
return unless Gitlab::Database.mysql?
diff --git a/db/migrate/limits_to_mysql.rb b/db/migrate/limits_to_mysql.rb
index 7507a4bb431..87992b541b1 100644
--- a/db/migrate/limits_to_mysql.rb
+++ b/db/migrate/limits_to_mysql.rb
@@ -1,4 +1,4 @@
-class LimitsToMysql < ActiveRecord::Migration
+class LimitsToMysql < ActiveRecord::Migration[4.2]
def up
return unless ActiveRecord::Base.configurations[Rails.env]['adapter'] =~ /^mysql/
diff --git a/db/migrate/markdown_cache_limits_to_mysql.rb b/db/migrate/markdown_cache_limits_to_mysql.rb
index f6686db3dc0..f99d500a137 100644
--- a/db/migrate/markdown_cache_limits_to_mysql.rb
+++ b/db/migrate/markdown_cache_limits_to_mysql.rb
@@ -1,4 +1,4 @@
-class MarkdownCacheLimitsToMysql < ActiveRecord::Migration
+class MarkdownCacheLimitsToMysql < ActiveRecord::Migration[4.2]
DOWNTIME = false
def up
diff --git a/db/migrate/merge_request_diff_file_limits_to_mysql.rb b/db/migrate/merge_request_diff_file_limits_to_mysql.rb
index ca3bc7d6be9..65dd0b5b7f7 100644
--- a/db/migrate/merge_request_diff_file_limits_to_mysql.rb
+++ b/db/migrate/merge_request_diff_file_limits_to_mysql.rb
@@ -1,4 +1,4 @@
-class MergeRequestDiffFileLimitsToMysql < ActiveRecord::Migration
+class MergeRequestDiffFileLimitsToMysql < ActiveRecord::Migration[4.2]
DOWNTIME = false
def up
diff --git a/db/migrate/prometheus_metrics_limits_to_mysql.rb b/db/migrate/prometheus_metrics_limits_to_mysql.rb
index 79f4ab9b64b..f7a2fcba8c2 100644
--- a/db/migrate/prometheus_metrics_limits_to_mysql.rb
+++ b/db/migrate/prometheus_metrics_limits_to_mysql.rb
@@ -1,4 +1,4 @@
-class PrometheusMetricsLimitsToMysql < ActiveRecord::Migration
+class PrometheusMetricsLimitsToMysql < ActiveRecord::Migration[4.2]
DOWNTIME = false
def up
diff --git a/db/optional_migrations/composite_primary_keys.rb b/db/optional_migrations/composite_primary_keys.rb
index b330da13d43..e0bb0312a35 100644
--- a/db/optional_migrations/composite_primary_keys.rb
+++ b/db/optional_migrations/composite_primary_keys.rb
@@ -7,7 +7,7 @@
# which requires all tables to have a primary key constraint.
#
# In that sense, the migration is optional and not strictly needed.
-class CompositePrimaryKeysMigration < ActiveRecord::Migration
+class CompositePrimaryKeysMigration < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20160824121037_change_personal_access_tokens_default_back_to_empty_array.rb b/db/post_migrate/20160824121037_change_personal_access_tokens_default_back_to_empty_array.rb
index 7df561d82dd..099814d7556 100644
--- a/db/post_migrate/20160824121037_change_personal_access_tokens_default_back_to_empty_array.rb
+++ b/db/post_migrate/20160824121037_change_personal_access_tokens_default_back_to_empty_array.rb
@@ -4,7 +4,7 @@
#
# Details: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5951#note_19721973
-class ChangePersonalAccessTokensDefaultBackToEmptyArray < ActiveRecord::Migration
+class ChangePersonalAccessTokensDefaultBackToEmptyArray < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20161011222551_remove_inactive_jira_service_properties.rb b/db/post_migrate/20161011222551_remove_inactive_jira_service_properties.rb
index 319d86ac159..bf3aee99418 100644
--- a/db/post_migrate/20161011222551_remove_inactive_jira_service_properties.rb
+++ b/db/post_migrate/20161011222551_remove_inactive_jira_service_properties.rb
@@ -1,4 +1,4 @@
-class RemoveInactiveJiraServiceProperties < ActiveRecord::Migration
+class RemoveInactiveJiraServiceProperties < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = true
diff --git a/db/post_migrate/20161109150329_fix_project_records_with_invalid_visibility.rb b/db/post_migrate/20161109150329_fix_project_records_with_invalid_visibility.rb
index f058e85c1ec..d77a22bfb69 100644
--- a/db/post_migrate/20161109150329_fix_project_records_with_invalid_visibility.rb
+++ b/db/post_migrate/20161109150329_fix_project_records_with_invalid_visibility.rb
@@ -1,4 +1,4 @@
-class FixProjectRecordsWithInvalidVisibility < ActiveRecord::Migration
+class FixProjectRecordsWithInvalidVisibility < ActiveRecord::Migration[4.2]
include Gitlab::Database::ArelMethods
include Gitlab::Database::MigrationHelpers
diff --git a/db/post_migrate/20161128170531_drop_user_activities_table.rb b/db/post_migrate/20161128170531_drop_user_activities_table.rb
index 00bc0c73015..64d13a08953 100644
--- a/db/post_migrate/20161128170531_drop_user_activities_table.rb
+++ b/db/post_migrate/20161128170531_drop_user_activities_table.rb
@@ -1,4 +1,4 @@
-class DropUserActivitiesTable < ActiveRecord::Migration
+class DropUserActivitiesTable < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20161221140236_remove_unneeded_services.rb b/db/post_migrate/20161221140236_remove_unneeded_services.rb
index 6b7e94c8641..31f24263877 100644
--- a/db/post_migrate/20161221140236_remove_unneeded_services.rb
+++ b/db/post_migrate/20161221140236_remove_unneeded_services.rb
@@ -1,4 +1,4 @@
-class RemoveUnneededServices < ActiveRecord::Migration
+class RemoveUnneededServices < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20161221153951_rename_reserved_project_names.rb b/db/post_migrate/20161221153951_rename_reserved_project_names.rb
index 678876e886c..b7665e98490 100644
--- a/db/post_migrate/20161221153951_rename_reserved_project_names.rb
+++ b/db/post_migrate/20161221153951_rename_reserved_project_names.rb
@@ -1,4 +1,4 @@
-class RenameReservedProjectNames < ActiveRecord::Migration
+class RenameReservedProjectNames < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
include Gitlab::ShellAdapter
diff --git a/db/post_migrate/20170104150317_requeue_pending_delete_projects.rb b/db/post_migrate/20170104150317_requeue_pending_delete_projects.rb
index d7be004d47f..f567accb051 100644
--- a/db/post_migrate/20170104150317_requeue_pending_delete_projects.rb
+++ b/db/post_migrate/20170104150317_requeue_pending_delete_projects.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RequeuePendingDeleteProjects < ActiveRecord::Migration
+class RequeuePendingDeleteProjects < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170106142508_fill_authorized_projects.rb b/db/post_migrate/20170106142508_fill_authorized_projects.rb
index 0ca20587981..1f1dd0f47f0 100644
--- a/db/post_migrate/20170106142508_fill_authorized_projects.rb
+++ b/db/post_migrate/20170106142508_fill_authorized_projects.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class FillAuthorizedProjects < ActiveRecord::Migration
+class FillAuthorizedProjects < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
class User < ActiveRecord::Base
diff --git a/db/post_migrate/20170106172224_remove_project_authorizations_id_column.rb b/db/post_migrate/20170106172224_remove_project_authorizations_id_column.rb
index 7c788160022..893af23465a 100644
--- a/db/post_migrate/20170106172224_remove_project_authorizations_id_column.rb
+++ b/db/post_migrate/20170106172224_remove_project_authorizations_id_column.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RemoveProjectAuthorizationsIdColumn < ActiveRecord::Migration
+class RemoveProjectAuthorizationsIdColumn < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170131214021_reset_users_authorized_projects_populated.rb b/db/post_migrate/20170131214021_reset_users_authorized_projects_populated.rb
index f1f81691f81..055a14ad729 100644
--- a/db/post_migrate/20170131214021_reset_users_authorized_projects_populated.rb
+++ b/db/post_migrate/20170131214021_reset_users_authorized_projects_populated.rb
@@ -1,6 +1,6 @@
# rubocop:disable Migration/UpdateLargeTable
# rubocop:disable Migration/UpdateColumnInBatches
-class ResetUsersAuthorizedProjectsPopulated < ActiveRecord::Migration
+class ResetUsersAuthorizedProjectsPopulated < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170206040400_remove_inactive_default_email_services.rb b/db/post_migrate/20170206040400_remove_inactive_default_email_services.rb
index a8e63e8bc7d..f221dac8e20 100644
--- a/db/post_migrate/20170206040400_remove_inactive_default_email_services.rb
+++ b/db/post_migrate/20170206040400_remove_inactive_default_email_services.rb
@@ -1,4 +1,4 @@
-class RemoveInactiveDefaultEmailServices < ActiveRecord::Migration
+class RemoveInactiveDefaultEmailServices < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170206101007_remove_trackable_columns_from_timelogs.rb b/db/post_migrate/20170206101007_remove_trackable_columns_from_timelogs.rb
index aee0c1b6245..14f5d0d4add 100644
--- a/db/post_migrate/20170206101007_remove_trackable_columns_from_timelogs.rb
+++ b/db/post_migrate/20170206101007_remove_trackable_columns_from_timelogs.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RemoveTrackableColumnsFromTimelogs < ActiveRecord::Migration
+class RemoveTrackableColumnsFromTimelogs < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170206101030_validate_foreign_keys_on_timelogs.rb b/db/post_migrate/20170206101030_validate_foreign_keys_on_timelogs.rb
index f397ef919cc..b5a5c0f06c7 100644
--- a/db/post_migrate/20170206101030_validate_foreign_keys_on_timelogs.rb
+++ b/db/post_migrate/20170206101030_validate_foreign_keys_on_timelogs.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class ValidateForeignKeysOnTimelogs < ActiveRecord::Migration
+class ValidateForeignKeysOnTimelogs < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170209140523_validate_foreign_keys_on_oauth_openid_requests.rb b/db/post_migrate/20170209140523_validate_foreign_keys_on_oauth_openid_requests.rb
index e206f9af636..81ac4cf1373 100644
--- a/db/post_migrate/20170209140523_validate_foreign_keys_on_oauth_openid_requests.rb
+++ b/db/post_migrate/20170209140523_validate_foreign_keys_on_oauth_openid_requests.rb
@@ -1,4 +1,4 @@
-class ValidateForeignKeysOnOauthOpenidRequests < ActiveRecord::Migration
+class ValidateForeignKeysOnOauthOpenidRequests < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170211073944_disable_invalid_service_templates.rb b/db/post_migrate/20170211073944_disable_invalid_service_templates.rb
index 603efc43782..31234e5b086 100644
--- a/db/post_migrate/20170211073944_disable_invalid_service_templates.rb
+++ b/db/post_migrate/20170211073944_disable_invalid_service_templates.rb
@@ -1,4 +1,4 @@
-class DisableInvalidServiceTemplates < ActiveRecord::Migration
+class DisableInvalidServiceTemplates < ActiveRecord::Migration[4.2]
DOWNTIME = false
class Service < ActiveRecord::Base
diff --git a/db/post_migrate/20170214111112_delete_deprecated_gitlab_ci_service.rb b/db/post_migrate/20170214111112_delete_deprecated_gitlab_ci_service.rb
index 09a827d22b0..c273060f8b0 100644
--- a/db/post_migrate/20170214111112_delete_deprecated_gitlab_ci_service.rb
+++ b/db/post_migrate/20170214111112_delete_deprecated_gitlab_ci_service.rb
@@ -1,4 +1,4 @@
-class DeleteDeprecatedGitlabCiService < ActiveRecord::Migration
+class DeleteDeprecatedGitlabCiService < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170215200045_remove_theme_id_from_users.rb b/db/post_migrate/20170215200045_remove_theme_id_from_users.rb
index c51646fbe52..937fe3f57af 100644
--- a/db/post_migrate/20170215200045_remove_theme_id_from_users.rb
+++ b/db/post_migrate/20170215200045_remove_theme_id_from_users.rb
@@ -1,4 +1,4 @@
-class RemoveThemeIdFromUsers < ActiveRecord::Migration
+class RemoveThemeIdFromUsers < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170301205640_migrate_build_events_to_pipeline_events.rb b/db/post_migrate/20170301205640_migrate_build_events_to_pipeline_events.rb
index 04bf89c9687..c2d28d79491 100644
--- a/db/post_migrate/20170301205640_migrate_build_events_to_pipeline_events.rb
+++ b/db/post_migrate/20170301205640_migrate_build_events_to_pipeline_events.rb
@@ -1,4 +1,4 @@
-class MigrateBuildEventsToPipelineEvents < ActiveRecord::Migration
+class MigrateBuildEventsToPipelineEvents < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170306170512_migrate_legacy_manual_actions.rb b/db/post_migrate/20170306170512_migrate_legacy_manual_actions.rb
index ec6e8cdfc45..aa12e8ac3da 100644
--- a/db/post_migrate/20170306170512_migrate_legacy_manual_actions.rb
+++ b/db/post_migrate/20170306170512_migrate_legacy_manual_actions.rb
@@ -1,4 +1,4 @@
-class MigrateLegacyManualActions < ActiveRecord::Migration
+class MigrateLegacyManualActions < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170309171644_reset_relative_position_for_issue.rb b/db/post_migrate/20170309171644_reset_relative_position_for_issue.rb
index 49fd46b0262..2cf4cf61d8f 100644
--- a/db/post_migrate/20170309171644_reset_relative_position_for_issue.rb
+++ b/db/post_migrate/20170309171644_reset_relative_position_for_issue.rb
@@ -1,6 +1,6 @@
# rubocop:disable Migration/UpdateLargeTable
# rubocop:disable Migration/UpdateColumnInBatches
-class ResetRelativePositionForIssue < ActiveRecord::Migration
+class ResetRelativePositionForIssue < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170313133418_rename_more_reserved_project_names.rb b/db/post_migrate/20170313133418_rename_more_reserved_project_names.rb
index 26a67b0f814..cac3fd713eb 100644
--- a/db/post_migrate/20170313133418_rename_more_reserved_project_names.rb
+++ b/db/post_migrate/20170313133418_rename_more_reserved_project_names.rb
@@ -1,4 +1,4 @@
-class RenameMoreReservedProjectNames < ActiveRecord::Migration
+class RenameMoreReservedProjectNames < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
include Gitlab::ShellAdapter
diff --git a/db/post_migrate/20170317162059_update_upload_paths_to_system.rb b/db/post_migrate/20170317162059_update_upload_paths_to_system.rb
index 92e33848bf0..a5a6f043e10 100644
--- a/db/post_migrate/20170317162059_update_upload_paths_to_system.rb
+++ b/db/post_migrate/20170317162059_update_upload_paths_to_system.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class UpdateUploadPathsToSystem < ActiveRecord::Migration
+class UpdateUploadPathsToSystem < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170324160416_migrate_user_activities_to_users_last_activity_on.rb b/db/post_migrate/20170324160416_migrate_user_activities_to_users_last_activity_on.rb
index 392fa00b1ba..73989339ad9 100644
--- a/db/post_migrate/20170324160416_migrate_user_activities_to_users_last_activity_on.rb
+++ b/db/post_migrate/20170324160416_migrate_user_activities_to_users_last_activity_on.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/UpdateLargeTable
-class MigrateUserActivitiesToUsersLastActivityOn < ActiveRecord::Migration
+class MigrateUserActivitiesToUsersLastActivityOn < ActiveRecord::Migration[4.2]
include Gitlab::Database::ArelMethods
include Gitlab::Database::MigrationHelpers
diff --git a/db/post_migrate/20170404170532_remove_notes_original_discussion_id.rb b/db/post_migrate/20170404170532_remove_notes_original_discussion_id.rb
index 0c3b3bd5eb3..334742f04e4 100644
--- a/db/post_migrate/20170404170532_remove_notes_original_discussion_id.rb
+++ b/db/post_migrate/20170404170532_remove_notes_original_discussion_id.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RemoveNotesOriginalDiscussionId < ActiveRecord::Migration
+class RemoveNotesOriginalDiscussionId < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170406111121_clean_upload_symlinks.rb b/db/post_migrate/20170406111121_clean_upload_symlinks.rb
index 0ab3d61730d..5fec00aa198 100644
--- a/db/post_migrate/20170406111121_clean_upload_symlinks.rb
+++ b/db/post_migrate/20170406111121_clean_upload_symlinks.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class CleanUploadSymlinks < ActiveRecord::Migration
+class CleanUploadSymlinks < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/post_migrate/20170406142253_migrate_user_project_view.rb b/db/post_migrate/20170406142253_migrate_user_project_view.rb
index d6061dd416d..3601baba787 100644
--- a/db/post_migrate/20170406142253_migrate_user_project_view.rb
+++ b/db/post_migrate/20170406142253_migrate_user_project_view.rb
@@ -2,7 +2,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class MigrateUserProjectView < ActiveRecord::Migration
+class MigrateUserProjectView < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/post_migrate/20170408033905_remove_old_cache_directories.rb b/db/post_migrate/20170408033905_remove_old_cache_directories.rb
index b23b52896b9..22bc5b9db7b 100644
--- a/db/post_migrate/20170408033905_remove_old_cache_directories.rb
+++ b/db/post_migrate/20170408033905_remove_old_cache_directories.rb
@@ -4,7 +4,7 @@
# Remove all files from old custom carrierwave's cache directories.
# See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9466
-class RemoveOldCacheDirectories < ActiveRecord::Migration
+class RemoveOldCacheDirectories < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170412174900_rename_reserved_dynamic_paths.rb b/db/post_migrate/20170412174900_rename_reserved_dynamic_paths.rb
index 08cf366f0a1..c9ff91b0401 100644
--- a/db/post_migrate/20170412174900_rename_reserved_dynamic_paths.rb
+++ b/db/post_migrate/20170412174900_rename_reserved_dynamic_paths.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RenameReservedDynamicPaths < ActiveRecord::Migration
+class RenameReservedDynamicPaths < ActiveRecord::Migration[4.2]
include Gitlab::Database::RenameReservedPathsMigration::V1
DOWNTIME = false
diff --git a/db/post_migrate/20170425121605_migrate_trigger_schedules_to_pipeline_schedules.rb b/db/post_migrate/20170425121605_migrate_trigger_schedules_to_pipeline_schedules.rb
index dae9750558f..99ded277277 100644
--- a/db/post_migrate/20170425121605_migrate_trigger_schedules_to_pipeline_schedules.rb
+++ b/db/post_migrate/20170425121605_migrate_trigger_schedules_to_pipeline_schedules.rb
@@ -1,4 +1,4 @@
-class MigrateTriggerSchedulesToPipelineSchedules < ActiveRecord::Migration
+class MigrateTriggerSchedulesToPipelineSchedules < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170425130047_drop_ci_trigger_schedules_table.rb b/db/post_migrate/20170425130047_drop_ci_trigger_schedules_table.rb
index 24750c58ef0..9d515aca8b4 100644
--- a/db/post_migrate/20170425130047_drop_ci_trigger_schedules_table.rb
+++ b/db/post_migrate/20170425130047_drop_ci_trigger_schedules_table.rb
@@ -1,4 +1,4 @@
-class DropCiTriggerSchedulesTable < ActiveRecord::Migration
+class DropCiTriggerSchedulesTable < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170502070007_enable_auto_cancel_pending_pipelines_for_all.rb b/db/post_migrate/20170502070007_enable_auto_cancel_pending_pipelines_for_all.rb
index 845c6f0557f..4d091d7f275 100644
--- a/db/post_migrate/20170502070007_enable_auto_cancel_pending_pipelines_for_all.rb
+++ b/db/post_migrate/20170502070007_enable_auto_cancel_pending_pipelines_for_all.rb
@@ -1,6 +1,6 @@
# rubocop:disable Migration/UpdateLargeTable
# rubocop:disable Migration/UpdateColumnInBatches
-class EnableAutoCancelPendingPipelinesForAll < ActiveRecord::Migration
+class EnableAutoCancelPendingPipelinesForAll < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/post_migrate/20170502101023_cleanup_namespaceless_pending_delete_projects.rb b/db/post_migrate/20170502101023_cleanup_namespaceless_pending_delete_projects.rb
index 5238a2ba1b7..c018d30c175 100644
--- a/db/post_migrate/20170502101023_cleanup_namespaceless_pending_delete_projects.rb
+++ b/db/post_migrate/20170502101023_cleanup_namespaceless_pending_delete_projects.rb
@@ -1,6 +1,6 @@
# This is the counterpart of RequeuePendingDeleteProjects and cleans all
# projects with `pending_delete = true` and that do not have a namespace.
-class CleanupNamespacelessPendingDeleteProjects < ActiveRecord::Migration
+class CleanupNamespacelessPendingDeleteProjects < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170503004427_update_retried_for_ci_build.rb b/db/post_migrate/20170503004427_update_retried_for_ci_build.rb
index 079f0e7511f..596f8593308 100644
--- a/db/post_migrate/20170503004427_update_retried_for_ci_build.rb
+++ b/db/post_migrate/20170503004427_update_retried_for_ci_build.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/UpdateLargeTable
-class UpdateRetriedForCiBuild < ActiveRecord::Migration
+class UpdateRetriedForCiBuild < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170503120310_remove_users_authorized_projects_populated.rb b/db/post_migrate/20170503120310_remove_users_authorized_projects_populated.rb
index 1b44334395f..891ce44f60a 100644
--- a/db/post_migrate/20170503120310_remove_users_authorized_projects_populated.rb
+++ b/db/post_migrate/20170503120310_remove_users_authorized_projects_populated.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RemoveUsersAuthorizedProjectsPopulated < ActiveRecord::Migration
+class RemoveUsersAuthorizedProjectsPopulated < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/post_migrate/20170508170547_add_head_pipeline_for_each_merge_request.rb b/db/post_migrate/20170508170547_add_head_pipeline_for_each_merge_request.rb
index 5df3ab71648..6e7365f4c56 100644
--- a/db/post_migrate/20170508170547_add_head_pipeline_for_each_merge_request.rb
+++ b/db/post_migrate/20170508170547_add_head_pipeline_for_each_merge_request.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/UpdateLargeTable
-class AddHeadPipelineForEachMergeRequest < ActiveRecord::Migration
+class AddHeadPipelineForEachMergeRequest < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170510101043_add_foreign_key_on_pipeline_schedule_owner.rb b/db/post_migrate/20170510101043_add_foreign_key_on_pipeline_schedule_owner.rb
index 6a870f08e89..85586aecd54 100644
--- a/db/post_migrate/20170510101043_add_foreign_key_on_pipeline_schedule_owner.rb
+++ b/db/post_migrate/20170510101043_add_foreign_key_on_pipeline_schedule_owner.rb
@@ -1,4 +1,4 @@
-class AddForeignKeyOnPipelineScheduleOwner < ActiveRecord::Migration
+class AddForeignKeyOnPipelineScheduleOwner < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170511100900_cleanup_rename_web_hooks_build_events_to_job_events.rb b/db/post_migrate/20170511100900_cleanup_rename_web_hooks_build_events_to_job_events.rb
index 281be90163a..b4a3db65607 100644
--- a/db/post_migrate/20170511100900_cleanup_rename_web_hooks_build_events_to_job_events.rb
+++ b/db/post_migrate/20170511100900_cleanup_rename_web_hooks_build_events_to_job_events.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class CleanupRenameWebHooksBuildEventsToJobEvents < ActiveRecord::Migration
+class CleanupRenameWebHooksBuildEventsToJobEvents < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170511101000_cleanup_rename_services_build_events_to_job_events.rb b/db/post_migrate/20170511101000_cleanup_rename_services_build_events_to_job_events.rb
index 5d26df5688f..65342747321 100644
--- a/db/post_migrate/20170511101000_cleanup_rename_services_build_events_to_job_events.rb
+++ b/db/post_migrate/20170511101000_cleanup_rename_services_build_events_to_job_events.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class CleanupRenameServicesBuildEventsToJobEvents < ActiveRecord::Migration
+class CleanupRenameServicesBuildEventsToJobEvents < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170516165238_cleanup_trigger_for_issues.rb b/db/post_migrate/20170516165238_cleanup_trigger_for_issues.rb
index 378fe5603c3..affeba52250 100644
--- a/db/post_migrate/20170516165238_cleanup_trigger_for_issues.rb
+++ b/db/post_migrate/20170516165238_cleanup_trigger_for_issues.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class CleanupTriggerForIssues < ActiveRecord::Migration
+class CleanupTriggerForIssues < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/post_migrate/20170516181025_add_constraints_to_issue_assignees_table.rb b/db/post_migrate/20170516181025_add_constraints_to_issue_assignees_table.rb
index 6fa573c5b49..03456a31b0d 100644
--- a/db/post_migrate/20170516181025_add_constraints_to_issue_assignees_table.rb
+++ b/db/post_migrate/20170516181025_add_constraints_to_issue_assignees_table.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddConstraintsToIssueAssigneesTable < ActiveRecord::Migration
+class AddConstraintsToIssueAssigneesTable < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/post_migrate/20170518200835_rename_users_with_renamed_namespace.rb b/db/post_migrate/20170518200835_rename_users_with_renamed_namespace.rb
index 17ad7de065d..4ba78727cc3 100644
--- a/db/post_migrate/20170518200835_rename_users_with_renamed_namespace.rb
+++ b/db/post_migrate/20170518200835_rename_users_with_renamed_namespace.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RenameUsersWithRenamedNamespace < ActiveRecord::Migration
+class RenameUsersWithRenamedNamespace < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170518231126_fix_wrongly_renamed_routes.rb b/db/post_migrate/20170518231126_fix_wrongly_renamed_routes.rb
index 3e952980866..28a2a2e01bf 100644
--- a/db/post_migrate/20170518231126_fix_wrongly_renamed_routes.rb
+++ b/db/post_migrate/20170518231126_fix_wrongly_renamed_routes.rb
@@ -2,7 +2,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class FixWronglyRenamedRoutes < ActiveRecord::Migration
+class FixWronglyRenamedRoutes < ActiveRecord::Migration[4.2]
include Gitlab::Database::RenameReservedPathsMigration::V1
DOWNTIME = false
diff --git a/db/post_migrate/20170523073948_remove_assignee_id_from_issue.rb b/db/post_migrate/20170523073948_remove_assignee_id_from_issue.rb
index 006d17b4d62..d75bbb2f612 100644
--- a/db/post_migrate/20170523073948_remove_assignee_id_from_issue.rb
+++ b/db/post_migrate/20170523073948_remove_assignee_id_from_issue.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RemoveAssigneeIdFromIssue < ActiveRecord::Migration
+class RemoveAssigneeIdFromIssue < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/post_migrate/20170523083112_migrate_old_artifacts.rb b/db/post_migrate/20170523083112_migrate_old_artifacts.rb
index 3a77b9751d3..55e155c7619 100644
--- a/db/post_migrate/20170523083112_migrate_old_artifacts.rb
+++ b/db/post_migrate/20170523083112_migrate_old_artifacts.rb
@@ -1,4 +1,4 @@
-class MigrateOldArtifacts < ActiveRecord::Migration
+class MigrateOldArtifacts < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170525140254_rename_all_reserved_paths_again.rb b/db/post_migrate/20170525140254_rename_all_reserved_paths_again.rb
index c996ddbec84..59b8daaffdf 100644
--- a/db/post_migrate/20170525140254_rename_all_reserved_paths_again.rb
+++ b/db/post_migrate/20170525140254_rename_all_reserved_paths_again.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RenameAllReservedPathsAgain < ActiveRecord::Migration
+class RenameAllReservedPathsAgain < ActiveRecord::Migration[4.2]
include Gitlab::Database::RenameReservedPathsMigration::V1
DOWNTIME = false
diff --git a/db/post_migrate/20170526185842_migrate_pipeline_stages.rb b/db/post_migrate/20170526185842_migrate_pipeline_stages.rb
index 736aff77f02..53743fc16e6 100644
--- a/db/post_migrate/20170526185842_migrate_pipeline_stages.rb
+++ b/db/post_migrate/20170526185842_migrate_pipeline_stages.rb
@@ -1,4 +1,4 @@
-class MigratePipelineStages < ActiveRecord::Migration
+class MigratePipelineStages < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170526185858_create_index_in_pipeline_stages.rb b/db/post_migrate/20170526185858_create_index_in_pipeline_stages.rb
index ec9ff33b6b7..dc7b1d6d026 100644
--- a/db/post_migrate/20170526185858_create_index_in_pipeline_stages.rb
+++ b/db/post_migrate/20170526185858_create_index_in_pipeline_stages.rb
@@ -1,4 +1,4 @@
-class CreateIndexInPipelineStages < ActiveRecord::Migration
+class CreateIndexInPipelineStages < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170526185901_remove_stage_id_index_from_builds.rb b/db/post_migrate/20170526185901_remove_stage_id_index_from_builds.rb
index 3879cf9133b..de473e7bb91 100644
--- a/db/post_migrate/20170526185901_remove_stage_id_index_from_builds.rb
+++ b/db/post_migrate/20170526185901_remove_stage_id_index_from_builds.rb
@@ -1,4 +1,4 @@
-class RemoveStageIdIndexFromBuilds < ActiveRecord::Migration
+class RemoveStageIdIndexFromBuilds < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170526185921_migrate_build_stage_reference.rb b/db/post_migrate/20170526185921_migrate_build_stage_reference.rb
index 98c32d8284c..a9b392314fa 100644
--- a/db/post_migrate/20170526185921_migrate_build_stage_reference.rb
+++ b/db/post_migrate/20170526185921_migrate_build_stage_reference.rb
@@ -1,4 +1,4 @@
-class MigrateBuildStageReference < ActiveRecord::Migration
+class MigrateBuildStageReference < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170526190000_migrate_build_stage_reference_again.rb b/db/post_migrate/20170526190000_migrate_build_stage_reference_again.rb
index a7bfba0ab2b..01b6cf3a158 100644
--- a/db/post_migrate/20170526190000_migrate_build_stage_reference_again.rb
+++ b/db/post_migrate/20170526190000_migrate_build_stage_reference_again.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/UpdateLargeTable
-class MigrateBuildStageReferenceAgain < ActiveRecord::Migration
+class MigrateBuildStageReferenceAgain < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170531203055_cleanup_users_ldap_email_rename.rb b/db/post_migrate/20170531203055_cleanup_users_ldap_email_rename.rb
index a70e3985005..3d75c7e3eaf 100644
--- a/db/post_migrate/20170531203055_cleanup_users_ldap_email_rename.rb
+++ b/db/post_migrate/20170531203055_cleanup_users_ldap_email_rename.rb
@@ -1,4 +1,4 @@
-class CleanupUsersLdapEmailRename < ActiveRecord::Migration
+class CleanupUsersLdapEmailRename < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170606202615_move_appearance_to_system_dir.rb b/db/post_migrate/20170606202615_move_appearance_to_system_dir.rb
index 07935ab8a52..fb9ac8d6daf 100644
--- a/db/post_migrate/20170606202615_move_appearance_to_system_dir.rb
+++ b/db/post_migrate/20170606202615_move_appearance_to_system_dir.rb
@@ -1,4 +1,4 @@
-class MoveAppearanceToSystemDir < ActiveRecord::Migration
+class MoveAppearanceToSystemDir < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/post_migrate/20170607121233_convert_custom_notification_settings_to_columns.rb b/db/post_migrate/20170607121233_convert_custom_notification_settings_to_columns.rb
index 9abda6a1d73..8ff26130cba 100644
--- a/db/post_migrate/20170607121233_convert_custom_notification_settings_to_columns.rb
+++ b/db/post_migrate/20170607121233_convert_custom_notification_settings_to_columns.rb
@@ -1,4 +1,4 @@
-class ConvertCustomNotificationSettingsToColumns < ActiveRecord::Migration
+class ConvertCustomNotificationSettingsToColumns < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170609183112_remove_position_from_issuables.rb b/db/post_migrate/20170609183112_remove_position_from_issuables.rb
index 4caaa2e83e8..edad0a502b4 100644
--- a/db/post_migrate/20170609183112_remove_position_from_issuables.rb
+++ b/db/post_migrate/20170609183112_remove_position_from_issuables.rb
@@ -1,4 +1,4 @@
-class RemovePositionFromIssuables < ActiveRecord::Migration
+class RemovePositionFromIssuables < ActiveRecord::Migration[4.2]
DOWNTIME = false
def change
diff --git a/db/post_migrate/20170612071012_move_personal_snippets_files.rb b/db/post_migrate/20170612071012_move_personal_snippets_files.rb
index c735dc67f44..d32d92637fa 100644
--- a/db/post_migrate/20170612071012_move_personal_snippets_files.rb
+++ b/db/post_migrate/20170612071012_move_personal_snippets_files.rb
@@ -1,6 +1,6 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class MovePersonalSnippetsFiles < ActiveRecord::Migration
+class MovePersonalSnippetsFiles < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/post_migrate/20170613111224_clean_appearance_symlinks.rb b/db/post_migrate/20170613111224_clean_appearance_symlinks.rb
index 17849b78ceb..14511bff3db 100644
--- a/db/post_migrate/20170613111224_clean_appearance_symlinks.rb
+++ b/db/post_migrate/20170613111224_clean_appearance_symlinks.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class CleanAppearanceSymlinks < ActiveRecord::Migration
+class CleanAppearanceSymlinks < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/post_migrate/20170621102400_add_stage_id_index_to_builds.rb b/db/post_migrate/20170621102400_add_stage_id_index_to_builds.rb
index ac61b5c84a8..cca9b488547 100644
--- a/db/post_migrate/20170621102400_add_stage_id_index_to_builds.rb
+++ b/db/post_migrate/20170621102400_add_stage_id_index_to_builds.rb
@@ -1,4 +1,4 @@
-class AddStageIdIndexToBuilds < ActiveRecord::Migration
+class AddStageIdIndexToBuilds < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170627101016_schedule_event_migrations.rb b/db/post_migrate/20170627101016_schedule_event_migrations.rb
index 1e020d05f78..f026a86bc0f 100644
--- a/db/post_migrate/20170627101016_schedule_event_migrations.rb
+++ b/db/post_migrate/20170627101016_schedule_event_migrations.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class ScheduleEventMigrations < ActiveRecord::Migration
+class ScheduleEventMigrations < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170628080858_migrate_stage_id_reference_in_background.rb b/db/post_migrate/20170628080858_migrate_stage_id_reference_in_background.rb
index f31015d77a3..36aac3df071 100644
--- a/db/post_migrate/20170628080858_migrate_stage_id_reference_in_background.rb
+++ b/db/post_migrate/20170628080858_migrate_stage_id_reference_in_background.rb
@@ -1,4 +1,4 @@
-class MigrateStageIdReferenceInBackground < ActiveRecord::Migration
+class MigrateStageIdReferenceInBackground < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170629180131_cleanup_application_settings_signin_enabled_rename.rb b/db/post_migrate/20170629180131_cleanup_application_settings_signin_enabled_rename.rb
index 52a773ddfee..87268fb4b31 100644
--- a/db/post_migrate/20170629180131_cleanup_application_settings_signin_enabled_rename.rb
+++ b/db/post_migrate/20170629180131_cleanup_application_settings_signin_enabled_rename.rb
@@ -1,4 +1,4 @@
-class CleanupApplicationSettingsSigninEnabledRename < ActiveRecord::Migration
+class CleanupApplicationSettingsSigninEnabledRename < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170703130158_schedule_merge_request_diff_migrations.rb b/db/post_migrate/20170703130158_schedule_merge_request_diff_migrations.rb
index 17a9dc293f1..fd4b2859f7f 100644
--- a/db/post_migrate/20170703130158_schedule_merge_request_diff_migrations.rb
+++ b/db/post_migrate/20170703130158_schedule_merge_request_diff_migrations.rb
@@ -1,4 +1,4 @@
-class ScheduleMergeRequestDiffMigrations < ActiveRecord::Migration
+class ScheduleMergeRequestDiffMigrations < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170711145558_migrate_stages_statuses.rb b/db/post_migrate/20170711145558_migrate_stages_statuses.rb
index 265f7317b9b..8ba69ea4dce 100644
--- a/db/post_migrate/20170711145558_migrate_stages_statuses.rb
+++ b/db/post_migrate/20170711145558_migrate_stages_statuses.rb
@@ -1,4 +1,4 @@
-class MigrateStagesStatuses < ActiveRecord::Migration
+class MigrateStagesStatuses < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170717111152_cleanup_move_system_upload_folder_symlink.rb b/db/post_migrate/20170717111152_cleanup_move_system_upload_folder_symlink.rb
index 3ae4406ff96..392c4f71532 100644
--- a/db/post_migrate/20170717111152_cleanup_move_system_upload_folder_symlink.rb
+++ b/db/post_migrate/20170717111152_cleanup_move_system_upload_folder_symlink.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class CleanupMoveSystemUploadFolderSymlink < ActiveRecord::Migration
+class CleanupMoveSystemUploadFolderSymlink < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170717150329_enqueue_migrate_system_uploads_to_new_folder.rb b/db/post_migrate/20170717150329_enqueue_migrate_system_uploads_to_new_folder.rb
index 87069dce006..fdd990ae2e5 100644
--- a/db/post_migrate/20170717150329_enqueue_migrate_system_uploads_to_new_folder.rb
+++ b/db/post_migrate/20170717150329_enqueue_migrate_system_uploads_to_new_folder.rb
@@ -1,4 +1,4 @@
-class EnqueueMigrateSystemUploadsToNewFolder < ActiveRecord::Migration
+class EnqueueMigrateSystemUploadsToNewFolder < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170719150301_merge_issuable_reopened_into_opened_state.rb b/db/post_migrate/20170719150301_merge_issuable_reopened_into_opened_state.rb
index acc0fc7a0ac..7af1d04f0cc 100644
--- a/db/post_migrate/20170719150301_merge_issuable_reopened_into_opened_state.rb
+++ b/db/post_migrate/20170719150301_merge_issuable_reopened_into_opened_state.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class MergeIssuableReopenedIntoOpenedState < ActiveRecord::Migration
+class MergeIssuableReopenedIntoOpenedState < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170728101014_remove_events_from_notification_settings.rb b/db/post_migrate/20170728101014_remove_events_from_notification_settings.rb
index cd533391d8d..f1b0a1daec5 100644
--- a/db/post_migrate/20170728101014_remove_events_from_notification_settings.rb
+++ b/db/post_migrate/20170728101014_remove_events_from_notification_settings.rb
@@ -1,4 +1,4 @@
-class RemoveEventsFromNotificationSettings < ActiveRecord::Migration
+class RemoveEventsFromNotificationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170803090603_calculate_conv_dev_index_percentages.rb b/db/post_migrate/20170803090603_calculate_conv_dev_index_percentages.rb
index 9af76c94bf3..a148586ca89 100644
--- a/db/post_migrate/20170803090603_calculate_conv_dev_index_percentages.rb
+++ b/db/post_migrate/20170803090603_calculate_conv_dev_index_percentages.rb
@@ -1,4 +1,4 @@
-class CalculateConvDevIndexPercentages < ActiveRecord::Migration
+class CalculateConvDevIndexPercentages < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170807160457_remove_locked_at_column_from_merge_requests.rb b/db/post_migrate/20170807160457_remove_locked_at_column_from_merge_requests.rb
index ea3d1fb3e02..6dc49211e5a 100644
--- a/db/post_migrate/20170807160457_remove_locked_at_column_from_merge_requests.rb
+++ b/db/post_migrate/20170807160457_remove_locked_at_column_from_merge_requests.rb
@@ -1,4 +1,4 @@
-class RemoveLockedAtColumnFromMergeRequests < ActiveRecord::Migration
+class RemoveLockedAtColumnFromMergeRequests < ActiveRecord::Migration[4.2]
DOWNTIME = false
def up
diff --git a/db/post_migrate/20170807190736_move_personal_snippet_files_into_correct_folder.rb b/db/post_migrate/20170807190736_move_personal_snippet_files_into_correct_folder.rb
index e3d2446b897..8341ac39c25 100644
--- a/db/post_migrate/20170807190736_move_personal_snippet_files_into_correct_folder.rb
+++ b/db/post_migrate/20170807190736_move_personal_snippet_files_into_correct_folder.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class MovePersonalSnippetFilesIntoCorrectFolder < ActiveRecord::Migration
+class MovePersonalSnippetFilesIntoCorrectFolder < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/post_migrate/20170815060945_remove_duplicate_mr_events.rb b/db/post_migrate/20170815060945_remove_duplicate_mr_events.rb
index 6132b553177..fdc126b8fd6 100644
--- a/db/post_migrate/20170815060945_remove_duplicate_mr_events.rb
+++ b/db/post_migrate/20170815060945_remove_duplicate_mr_events.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RemoveDuplicateMrEvents < ActiveRecord::Migration
+class RemoveDuplicateMrEvents < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170816102555_cleanup_nonexisting_namespace_pending_delete_projects.rb b/db/post_migrate/20170816102555_cleanup_nonexisting_namespace_pending_delete_projects.rb
index 3f085c17133..27656fd926d 100644
--- a/db/post_migrate/20170816102555_cleanup_nonexisting_namespace_pending_delete_projects.rb
+++ b/db/post_migrate/20170816102555_cleanup_nonexisting_namespace_pending_delete_projects.rb
@@ -1,7 +1,7 @@
# Follow up of CleanupNamespacelessPendingDeleteProjects and it cleans
# all projects with `pending_delete = true` and for which the
# namespace no longer exists.
-class CleanupNonexistingNamespacePendingDeleteProjects < ActiveRecord::Migration
+class CleanupNonexistingNamespacePendingDeleteProjects < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170822101017_migrate_pipeline_sidekiq_queues.rb b/db/post_migrate/20170822101017_migrate_pipeline_sidekiq_queues.rb
index 8441cfe7968..825bc9250bd 100644
--- a/db/post_migrate/20170822101017_migrate_pipeline_sidekiq_queues.rb
+++ b/db/post_migrate/20170822101017_migrate_pipeline_sidekiq_queues.rb
@@ -1,4 +1,4 @@
-class MigratePipelineSidekiqQueues < ActiveRecord::Migration
+class MigratePipelineSidekiqQueues < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170828170502_post_deploy_migrate_user_external_mail_data.rb b/db/post_migrate/20170828170502_post_deploy_migrate_user_external_mail_data.rb
index fd1437b07f5..533155aeb7a 100644
--- a/db/post_migrate/20170828170502_post_deploy_migrate_user_external_mail_data.rb
+++ b/db/post_migrate/20170828170502_post_deploy_migrate_user_external_mail_data.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class PostDeployMigrateUserExternalMailData < ActiveRecord::Migration
+class PostDeployMigrateUserExternalMailData < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170828170513_remove_user_email_provider_column.rb b/db/post_migrate/20170828170513_remove_user_email_provider_column.rb
index 570f2b3772a..bfc8aede540 100644
--- a/db/post_migrate/20170828170513_remove_user_email_provider_column.rb
+++ b/db/post_migrate/20170828170513_remove_user_email_provider_column.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RemoveUserEmailProviderColumn < ActiveRecord::Migration
+class RemoveUserEmailProviderColumn < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170828170516_remove_user_external_mail_columns.rb b/db/post_migrate/20170828170516_remove_user_external_mail_columns.rb
index bb81dc682b3..0104955e5c8 100644
--- a/db/post_migrate/20170828170516_remove_user_external_mail_columns.rb
+++ b/db/post_migrate/20170828170516_remove_user_external_mail_columns.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RemoveUserExternalMailColumns < ActiveRecord::Migration
+class RemoveUserExternalMailColumns < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170830084744_destroy_gpg_signatures.rb b/db/post_migrate/20170830084744_destroy_gpg_signatures.rb
index b04d36f6537..2945eb9fde6 100644
--- a/db/post_migrate/20170830084744_destroy_gpg_signatures.rb
+++ b/db/post_migrate/20170830084744_destroy_gpg_signatures.rb
@@ -1,4 +1,4 @@
-class DestroyGpgSignatures < ActiveRecord::Migration
+class DestroyGpgSignatures < ActiveRecord::Migration[4.2]
DOWNTIME = false
def up
diff --git a/db/post_migrate/20170830150306_drop_events_for_migration_table.rb b/db/post_migrate/20170830150306_drop_events_for_migration_table.rb
index 69a612ead40..3538b52b004 100644
--- a/db/post_migrate/20170830150306_drop_events_for_migration_table.rb
+++ b/db/post_migrate/20170830150306_drop_events_for_migration_table.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class DropEventsForMigrationTable < ActiveRecord::Migration
+class DropEventsForMigrationTable < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170831195038_remove_valid_signature_from_gpg_signatures.rb b/db/post_migrate/20170831195038_remove_valid_signature_from_gpg_signatures.rb
index 9b6745e33d9..8e264c1ab41 100644
--- a/db/post_migrate/20170831195038_remove_valid_signature_from_gpg_signatures.rb
+++ b/db/post_migrate/20170831195038_remove_valid_signature_from_gpg_signatures.rb
@@ -1,4 +1,4 @@
-class RemoveValidSignatureFromGpgSignatures < ActiveRecord::Migration
+class RemoveValidSignatureFromGpgSignatures < ActiveRecord::Migration[4.2]
DOWNTIME = false
def up
diff --git a/db/post_migrate/20170907170235_delete_conflicting_redirect_routes.rb b/db/post_migrate/20170907170235_delete_conflicting_redirect_routes.rb
index 033019c398e..95abf2474dd 100644
--- a/db/post_migrate/20170907170235_delete_conflicting_redirect_routes.rb
+++ b/db/post_migrate/20170907170235_delete_conflicting_redirect_routes.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class DeleteConflictingRedirectRoutes < ActiveRecord::Migration
+class DeleteConflictingRedirectRoutes < ActiveRecord::Migration[4.2]
def up
# No-op.
# See https://gitlab.com/gitlab-com/infrastructure/issues/3460#note_53223252
diff --git a/db/post_migrate/20170913180600_fix_projects_without_project_feature.rb b/db/post_migrate/20170913180600_fix_projects_without_project_feature.rb
index bfa9ad80c7d..bbc624ac7c0 100644
--- a/db/post_migrate/20170913180600_fix_projects_without_project_feature.rb
+++ b/db/post_migrate/20170913180600_fix_projects_without_project_feature.rb
@@ -1,4 +1,4 @@
-class FixProjectsWithoutProjectFeature < ActiveRecord::Migration
+class FixProjectsWithoutProjectFeature < ActiveRecord::Migration[4.2]
DOWNTIME = false
def up
diff --git a/db/post_migrate/20170921101004_normalize_ldap_extern_uids.rb b/db/post_migrate/20170921101004_normalize_ldap_extern_uids.rb
index 2230bb0e53c..9080acee1d6 100644
--- a/db/post_migrate/20170921101004_normalize_ldap_extern_uids.rb
+++ b/db/post_migrate/20170921101004_normalize_ldap_extern_uids.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class NormalizeLdapExternUids < ActiveRecord::Migration
+class NormalizeLdapExternUids < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170926150348_schedule_merge_request_diff_migrations_take_two.rb b/db/post_migrate/20170926150348_schedule_merge_request_diff_migrations_take_two.rb
index 5732cb85ea5..9b675a51725 100644
--- a/db/post_migrate/20170926150348_schedule_merge_request_diff_migrations_take_two.rb
+++ b/db/post_migrate/20170926150348_schedule_merge_request_diff_migrations_take_two.rb
@@ -1,4 +1,4 @@
-class ScheduleMergeRequestDiffMigrationsTakeTwo < ActiveRecord::Migration
+class ScheduleMergeRequestDiffMigrationsTakeTwo < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170927112318_update_legacy_diff_notes_type_for_import.rb b/db/post_migrate/20170927112318_update_legacy_diff_notes_type_for_import.rb
index b040c81b316..83c21c203e0 100644
--- a/db/post_migrate/20170927112318_update_legacy_diff_notes_type_for_import.rb
+++ b/db/post_migrate/20170927112318_update_legacy_diff_notes_type_for_import.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/UpdateLargeTable
-class UpdateLegacyDiffNotesTypeForImport < ActiveRecord::Migration
+class UpdateLegacyDiffNotesTypeForImport < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20170927112319_update_notes_type_for_import.rb b/db/post_migrate/20170927112319_update_notes_type_for_import.rb
index 5a400c71b02..8c691de3192 100644
--- a/db/post_migrate/20170927112319_update_notes_type_for_import.rb
+++ b/db/post_migrate/20170927112319_update_notes_type_for_import.rb
@@ -1,5 +1,5 @@
# rubocop:disable Migration/UpdateLargeTable
-class UpdateNotesTypeForImport < ActiveRecord::Migration
+class UpdateNotesTypeForImport < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20171005130944_schedule_create_gpg_key_subkeys_from_gpg_keys.rb b/db/post_migrate/20171005130944_schedule_create_gpg_key_subkeys_from_gpg_keys.rb
index 467c584c2e0..e49a70f902c 100644
--- a/db/post_migrate/20171005130944_schedule_create_gpg_key_subkeys_from_gpg_keys.rb
+++ b/db/post_migrate/20171005130944_schedule_create_gpg_key_subkeys_from_gpg_keys.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class ScheduleCreateGpgKeySubkeysFromGpgKeys < ActiveRecord::Migration
+class ScheduleCreateGpgKeySubkeysFromGpgKeys < ActiveRecord::Migration[4.2]
disable_ddl_transaction!
DOWNTIME = false
diff --git a/db/post_migrate/20171012150314_remove_user_authentication_token.rb b/db/post_migrate/20171012150314_remove_user_authentication_token.rb
index d0f3aa06e98..9313986ce85 100644
--- a/db/post_migrate/20171012150314_remove_user_authentication_token.rb
+++ b/db/post_migrate/20171012150314_remove_user_authentication_token.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RemoveUserAuthenticationToken < ActiveRecord::Migration
+class RemoveUserAuthenticationToken < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20171013104327_migrate_gcp_clusters_to_new_clusters_architectures.rb b/db/post_migrate/20171013104327_migrate_gcp_clusters_to_new_clusters_architectures.rb
index 28cd0f70cc2..9c90aa611a4 100644
--- a/db/post_migrate/20171013104327_migrate_gcp_clusters_to_new_clusters_architectures.rb
+++ b/db/post_migrate/20171013104327_migrate_gcp_clusters_to_new_clusters_architectures.rb
@@ -1,4 +1,4 @@
-class MigrateGcpClustersToNewClustersArchitectures < ActiveRecord::Migration
+class MigrateGcpClustersToNewClustersArchitectures < ActiveRecord::Migration[4.2]
DOWNTIME = false
class GcpCluster < ActiveRecord::Base
diff --git a/db/post_migrate/20171026082505_schedule_merge_request_latest_merge_request_diff_id_migrations.rb b/db/post_migrate/20171026082505_schedule_merge_request_latest_merge_request_diff_id_migrations.rb
index 7a63382cc6d..764561de997 100644
--- a/db/post_migrate/20171026082505_schedule_merge_request_latest_merge_request_diff_id_migrations.rb
+++ b/db/post_migrate/20171026082505_schedule_merge_request_latest_merge_request_diff_id_migrations.rb
@@ -1,4 +1,4 @@
-class ScheduleMergeRequestLatestMergeRequestDiffIdMigrations < ActiveRecord::Migration
+class ScheduleMergeRequestLatestMergeRequestDiffIdMigrations < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20171101134435_remove_ref_fetched_from_merge_requests.rb b/db/post_migrate/20171101134435_remove_ref_fetched_from_merge_requests.rb
index 4e8f495d65d..e6a5ffc8649 100644
--- a/db/post_migrate/20171101134435_remove_ref_fetched_from_merge_requests.rb
+++ b/db/post_migrate/20171101134435_remove_ref_fetched_from_merge_requests.rb
@@ -1,4 +1,4 @@
-class RemoveRefFetchedFromMergeRequests < ActiveRecord::Migration
+class RemoveRefFetchedFromMergeRequests < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/post_migrate/20171103140253_track_untracked_uploads.rb b/db/post_migrate/20171103140253_track_untracked_uploads.rb
index 548a94d2d38..6891ef5ba12 100644
--- a/db/post_migrate/20171103140253_track_untracked_uploads.rb
+++ b/db/post_migrate/20171103140253_track_untracked_uploads.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class TrackUntrackedUploads < ActiveRecord::Migration
+class TrackUntrackedUploads < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/post_migrate/20171106133144_cleanup_application_settings_password_authentication_enabled_rename.rb b/db/post_migrate/20171106133144_cleanup_application_settings_password_authentication_enabled_rename.rb
index d54ff3d5f5e..4a01bf75f50 100644
--- a/db/post_migrate/20171106133144_cleanup_application_settings_password_authentication_enabled_rename.rb
+++ b/db/post_migrate/20171106133144_cleanup_application_settings_password_authentication_enabled_rename.rb
@@ -1,4 +1,4 @@
-class CleanupApplicationSettingsPasswordAuthenticationEnabledRename < ActiveRecord::Migration
+class CleanupApplicationSettingsPasswordAuthenticationEnabledRename < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20171106154015_remove_issues_branch_name.rb b/db/post_migrate/20171106154015_remove_issues_branch_name.rb
index 3d08225c96d..4e71aa2f163 100644
--- a/db/post_migrate/20171106154015_remove_issues_branch_name.rb
+++ b/db/post_migrate/20171106154015_remove_issues_branch_name.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RemoveIssuesBranchName < ActiveRecord::Migration
+class RemoveIssuesBranchName < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/post_migrate/20171106180641_cleanup_add_timezone_to_issues_closed_at.rb b/db/post_migrate/20171106180641_cleanup_add_timezone_to_issues_closed_at.rb
index 53f376f216b..8187d3971fc 100644
--- a/db/post_migrate/20171106180641_cleanup_add_timezone_to_issues_closed_at.rb
+++ b/db/post_migrate/20171106180641_cleanup_add_timezone_to_issues_closed_at.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class CleanupAddTimezoneToIssuesClosedAt < ActiveRecord::Migration
+class CleanupAddTimezoneToIssuesClosedAt < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20171114104051_remove_empty_fork_networks.rb b/db/post_migrate/20171114104051_remove_empty_fork_networks.rb
index 2fe99a1b9c1..76862cccf60 100644
--- a/db/post_migrate/20171114104051_remove_empty_fork_networks.rb
+++ b/db/post_migrate/20171114104051_remove_empty_fork_networks.rb
@@ -1,4 +1,4 @@
-class RemoveEmptyForkNetworks < ActiveRecord::Migration
+class RemoveEmptyForkNetworks < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20171121160421_remove_merge_request_diff_st_commits_and_st_diffs.rb b/db/post_migrate/20171121160421_remove_merge_request_diff_st_commits_and_st_diffs.rb
index 3a7b2a7fac0..93a97993f1f 100644
--- a/db/post_migrate/20171121160421_remove_merge_request_diff_st_commits_and_st_diffs.rb
+++ b/db/post_migrate/20171121160421_remove_merge_request_diff_st_commits_and_st_diffs.rb
@@ -1,4 +1,4 @@
-class RemoveMergeRequestDiffStCommitsAndStDiffs < ActiveRecord::Migration
+class RemoveMergeRequestDiffStCommitsAndStDiffs < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20171123101020_update_circuitbreaker_defaults.rb b/db/post_migrate/20171123101020_update_circuitbreaker_defaults.rb
index 8e1c9e6d6bb..ae954289291 100644
--- a/db/post_migrate/20171123101020_update_circuitbreaker_defaults.rb
+++ b/db/post_migrate/20171123101020_update_circuitbreaker_defaults.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class UpdateCircuitbreakerDefaults < ActiveRecord::Migration
+class UpdateCircuitbreakerDefaults < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20171123101046_remove_old_circuitbreaker_config.rb b/db/post_migrate/20171123101046_remove_old_circuitbreaker_config.rb
index e646d4d3224..3f2c1b2170a 100644
--- a/db/post_migrate/20171123101046_remove_old_circuitbreaker_config.rb
+++ b/db/post_migrate/20171123101046_remove_old_circuitbreaker_config.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RemoveOldCircuitbreakerConfig < ActiveRecord::Migration
+class RemoveOldCircuitbreakerConfig < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20171124095655_add_index_on_merge_request_diffs_merge_request_id_and_id.rb b/db/post_migrate/20171124095655_add_index_on_merge_request_diffs_merge_request_id_and_id.rb
index 698df712c11..2c65a4ae4f5 100644
--- a/db/post_migrate/20171124095655_add_index_on_merge_request_diffs_merge_request_id_and_id.rb
+++ b/db/post_migrate/20171124095655_add_index_on_merge_request_diffs_merge_request_id_and_id.rb
@@ -1,4 +1,4 @@
-class AddIndexOnMergeRequestDiffsMergeRequestIdAndId < ActiveRecord::Migration
+class AddIndexOnMergeRequestDiffsMergeRequestIdAndId < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20171124100152_remove_index_on_merge_request_diffs_merge_request_diff_id.rb b/db/post_migrate/20171124100152_remove_index_on_merge_request_diffs_merge_request_diff_id.rb
index 038e4807000..efd3714d668 100644
--- a/db/post_migrate/20171124100152_remove_index_on_merge_request_diffs_merge_request_diff_id.rb
+++ b/db/post_migrate/20171124100152_remove_index_on_merge_request_diffs_merge_request_diff_id.rb
@@ -1,4 +1,4 @@
-class RemoveIndexOnMergeRequestDiffsMergeRequestDiffId < ActiveRecord::Migration
+class RemoveIndexOnMergeRequestDiffsMergeRequestDiffId < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20171124104327_migrate_kubernetes_service_to_new_clusters_architectures.rb b/db/post_migrate/20171124104327_migrate_kubernetes_service_to_new_clusters_architectures.rb
index a957f107405..58ceefe3c97 100644
--- a/db/post_migrate/20171124104327_migrate_kubernetes_service_to_new_clusters_architectures.rb
+++ b/db/post_migrate/20171124104327_migrate_kubernetes_service_to_new_clusters_architectures.rb
@@ -1,4 +1,4 @@
-class MigrateKubernetesServiceToNewClustersArchitectures < ActiveRecord::Migration
+class MigrateKubernetesServiceToNewClustersArchitectures < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20171124150326_reschedule_fork_network_creation.rb b/db/post_migrate/20171124150326_reschedule_fork_network_creation.rb
index 26f917d5a1e..8e320ea9e8d 100644
--- a/db/post_migrate/20171124150326_reschedule_fork_network_creation.rb
+++ b/db/post_migrate/20171124150326_reschedule_fork_network_creation.rb
@@ -1,4 +1,4 @@
-class RescheduleForkNetworkCreation < ActiveRecord::Migration
+class RescheduleForkNetworkCreation < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20171128214150_schedule_populate_merge_request_metrics_with_events_data.rb b/db/post_migrate/20171128214150_schedule_populate_merge_request_metrics_with_events_data.rb
index 980f76e7d57..51441a36e4b 100644
--- a/db/post_migrate/20171128214150_schedule_populate_merge_request_metrics_with_events_data.rb
+++ b/db/post_migrate/20171128214150_schedule_populate_merge_request_metrics_with_events_data.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class SchedulePopulateMergeRequestMetricsWithEventsData < ActiveRecord::Migration
+class SchedulePopulateMergeRequestMetricsWithEventsData < ActiveRecord::Migration[4.2]
DOWNTIME = false
BATCH_SIZE = 10_000
MIGRATION = 'PopulateMergeRequestMetricsWithEventsData'
diff --git a/db/post_migrate/20171205190711_reschedule_fork_network_creation_caller.rb b/db/post_migrate/20171205190711_reschedule_fork_network_creation_caller.rb
index 30ff5173192..058f3a40817 100644
--- a/db/post_migrate/20171205190711_reschedule_fork_network_creation_caller.rb
+++ b/db/post_migrate/20171205190711_reschedule_fork_network_creation_caller.rb
@@ -1,4 +1,4 @@
-class RescheduleForkNetworkCreationCaller < ActiveRecord::Migration
+class RescheduleForkNetworkCreationCaller < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20171207150300_remove_project_labels_group_id_copy.rb b/db/post_migrate/20171207150300_remove_project_labels_group_id_copy.rb
index 2f339172eeb..44273cebc9d 100644
--- a/db/post_migrate/20171207150300_remove_project_labels_group_id_copy.rb
+++ b/db/post_migrate/20171207150300_remove_project_labels_group_id_copy.rb
@@ -1,7 +1,7 @@
# Copy of 20180202111106 - this one should run before 20171207150343 to fix issues related to
# the removal of groups with labels.
-class RemoveProjectLabelsGroupIdCopy < ActiveRecord::Migration
+class RemoveProjectLabelsGroupIdCopy < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20171207150343_remove_soft_removed_objects.rb b/db/post_migrate/20171207150343_remove_soft_removed_objects.rb
index 3109b6dbf8e..53707c67d36 100644
--- a/db/post_migrate/20171207150343_remove_soft_removed_objects.rb
+++ b/db/post_migrate/20171207150343_remove_soft_removed_objects.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RemoveSoftRemovedObjects < ActiveRecord::Migration
+class RemoveSoftRemovedObjects < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/post_migrate/20171207150344_remove_deleted_at_columns.rb b/db/post_migrate/20171207150344_remove_deleted_at_columns.rb
index 154d7a1b926..5f1c70a2797 100644
--- a/db/post_migrate/20171207150344_remove_deleted_at_columns.rb
+++ b/db/post_migrate/20171207150344_remove_deleted_at_columns.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RemoveDeletedAtColumns < ActiveRecord::Migration
+class RemoveDeletedAtColumns < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20171213160445_migrate_github_importer_advance_stage_sidekiq_queue.rb b/db/post_migrate/20171213160445_migrate_github_importer_advance_stage_sidekiq_queue.rb
index 149c28f1946..088c4b5d46b 100644
--- a/db/post_migrate/20171213160445_migrate_github_importer_advance_stage_sidekiq_queue.rb
+++ b/db/post_migrate/20171213160445_migrate_github_importer_advance_stage_sidekiq_queue.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class MigrateGithubImporterAdvanceStageSidekiqQueue < ActiveRecord::Migration
+class MigrateGithubImporterAdvanceStageSidekiqQueue < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20171215121205_post_populate_can_push_from_deploy_keys_projects.rb b/db/post_migrate/20171215121205_post_populate_can_push_from_deploy_keys_projects.rb
index 3a5850df3db..1c81e56db55 100644
--- a/db/post_migrate/20171215121205_post_populate_can_push_from_deploy_keys_projects.rb
+++ b/db/post_migrate/20171215121205_post_populate_can_push_from_deploy_keys_projects.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class PostPopulateCanPushFromDeployKeysProjects < ActiveRecord::Migration
+class PostPopulateCanPushFromDeployKeysProjects < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20171215121259_remove_can_push_from_keys.rb b/db/post_migrate/20171215121259_remove_can_push_from_keys.rb
index 0599811d986..fc4045a383d 100644
--- a/db/post_migrate/20171215121259_remove_can_push_from_keys.rb
+++ b/db/post_migrate/20171215121259_remove_can_push_from_keys.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RemoveCanPushFromKeys < ActiveRecord::Migration
+class RemoveCanPushFromKeys < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20171219121201_normalize_extern_uid_from_identities.rb b/db/post_migrate/20171219121201_normalize_extern_uid_from_identities.rb
index 286721a0894..45ef75fdb98 100644
--- a/db/post_migrate/20171219121201_normalize_extern_uid_from_identities.rb
+++ b/db/post_migrate/20171219121201_normalize_extern_uid_from_identities.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class NormalizeExternUidFromIdentities < ActiveRecord::Migration
+class NormalizeExternUidFromIdentities < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20171221140220_schedule_issues_closed_at_type_change.rb b/db/post_migrate/20171221140220_schedule_issues_closed_at_type_change.rb
index eeecc7b1de0..6b5e6202688 100644
--- a/db/post_migrate/20171221140220_schedule_issues_closed_at_type_change.rb
+++ b/db/post_migrate/20171221140220_schedule_issues_closed_at_type_change.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
# rubocop:disable Migration/Datetime
-class ScheduleIssuesClosedAtTypeChange < ActiveRecord::Migration
+class ScheduleIssuesClosedAtTypeChange < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180104131052_schedule_set_confidential_note_events_on_webhooks.rb b/db/post_migrate/20180104131052_schedule_set_confidential_note_events_on_webhooks.rb
index fa51ac83619..0822aebc2c6 100644
--- a/db/post_migrate/20180104131052_schedule_set_confidential_note_events_on_webhooks.rb
+++ b/db/post_migrate/20180104131052_schedule_set_confidential_note_events_on_webhooks.rb
@@ -1,4 +1,4 @@
-class ScheduleSetConfidentialNoteEventsOnWebhooks < ActiveRecord::Migration
+class ScheduleSetConfidentialNoteEventsOnWebhooks < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180119121225_remove_redundant_pipeline_stages.rb b/db/post_migrate/20180119121225_remove_redundant_pipeline_stages.rb
index 269f1287f91..0a2ea7bfb7b 100644
--- a/db/post_migrate/20180119121225_remove_redundant_pipeline_stages.rb
+++ b/db/post_migrate/20180119121225_remove_redundant_pipeline_stages.rb
@@ -1,4 +1,4 @@
-class RemoveRedundantPipelineStages < ActiveRecord::Migration
+class RemoveRedundantPipelineStages < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180122154930_schedule_set_confidential_note_events_on_services.rb b/db/post_migrate/20180122154930_schedule_set_confidential_note_events_on_services.rb
index a3ff9f1719e..98bbb34dda1 100644
--- a/db/post_migrate/20180122154930_schedule_set_confidential_note_events_on_services.rb
+++ b/db/post_migrate/20180122154930_schedule_set_confidential_note_events_on_services.rb
@@ -1,4 +1,4 @@
-class ScheduleSetConfidentialNoteEventsOnServices < ActiveRecord::Migration
+class ScheduleSetConfidentialNoteEventsOnServices < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180202111106_remove_project_labels_group_id.rb b/db/post_migrate/20180202111106_remove_project_labels_group_id.rb
index db7fd0d167d..31ec84f0d6a 100644
--- a/db/post_migrate/20180202111106_remove_project_labels_group_id.rb
+++ b/db/post_migrate/20180202111106_remove_project_labels_group_id.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RemoveProjectLabelsGroupId < ActiveRecord::Migration
+class RemoveProjectLabelsGroupId < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180204200836_change_author_id_to_not_null_in_todos.rb b/db/post_migrate/20180204200836_change_author_id_to_not_null_in_todos.rb
index 92c32feebf7..54b8a91fa47 100644
--- a/db/post_migrate/20180204200836_change_author_id_to_not_null_in_todos.rb
+++ b/db/post_migrate/20180204200836_change_author_id_to_not_null_in_todos.rb
@@ -1,4 +1,4 @@
-class ChangeAuthorIdToNotNullInTodos < ActiveRecord::Migration
+class ChangeAuthorIdToNotNullInTodos < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
class Todo < ActiveRecord::Base
diff --git a/db/post_migrate/20180212101828_add_tmp_partial_null_index_to_builds.rb b/db/post_migrate/20180212101828_add_tmp_partial_null_index_to_builds.rb
index e55e2e6f888..f8badcac990 100644
--- a/db/post_migrate/20180212101828_add_tmp_partial_null_index_to_builds.rb
+++ b/db/post_migrate/20180212101828_add_tmp_partial_null_index_to_builds.rb
@@ -1,4 +1,4 @@
-class AddTmpPartialNullIndexToBuilds < ActiveRecord::Migration
+class AddTmpPartialNullIndexToBuilds < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/post_migrate/20180212101928_schedule_build_stage_migration.rb b/db/post_migrate/20180212101928_schedule_build_stage_migration.rb
index 0f61fa81832..2445ab1a130 100644
--- a/db/post_migrate/20180212101928_schedule_build_stage_migration.rb
+++ b/db/post_migrate/20180212101928_schedule_build_stage_migration.rb
@@ -1,4 +1,4 @@
-class ScheduleBuildStageMigration < ActiveRecord::Migration
+class ScheduleBuildStageMigration < ActiveRecord::Migration[4.2]
##
# This migration has been rescheduled to run again, see
# `20180405101928_reschedule_builds_stages_migration.rb`
diff --git a/db/post_migrate/20180212102028_remove_tmp_partial_null_index_from_builds.rb b/db/post_migrate/20180212102028_remove_tmp_partial_null_index_from_builds.rb
index ed7b1fc72f4..2444df881b8 100644
--- a/db/post_migrate/20180212102028_remove_tmp_partial_null_index_from_builds.rb
+++ b/db/post_migrate/20180212102028_remove_tmp_partial_null_index_from_builds.rb
@@ -1,4 +1,4 @@
-class RemoveTmpPartialNullIndexFromBuilds < ActiveRecord::Migration
+class RemoveTmpPartialNullIndexFromBuilds < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/post_migrate/20180216121020_fill_pages_domain_verification_code.rb b/db/post_migrate/20180216121020_fill_pages_domain_verification_code.rb
index d423673d2a5..dae43ee14df 100644
--- a/db/post_migrate/20180216121020_fill_pages_domain_verification_code.rb
+++ b/db/post_migrate/20180216121020_fill_pages_domain_verification_code.rb
@@ -1,4 +1,4 @@
-class FillPagesDomainVerificationCode < ActiveRecord::Migration
+class FillPagesDomainVerificationCode < ActiveRecord::Migration[4.2]
DOWNTIME = false
class PagesDomain < ActiveRecord::Base
diff --git a/db/post_migrate/20180216121030_enqueue_verify_pages_domain_workers.rb b/db/post_migrate/20180216121030_enqueue_verify_pages_domain_workers.rb
index bf9bf4e660f..d776fb85f00 100644
--- a/db/post_migrate/20180216121030_enqueue_verify_pages_domain_workers.rb
+++ b/db/post_migrate/20180216121030_enqueue_verify_pages_domain_workers.rb
@@ -1,4 +1,4 @@
-class EnqueueVerifyPagesDomainWorkers < ActiveRecord::Migration
+class EnqueueVerifyPagesDomainWorkers < ActiveRecord::Migration[4.2]
class PagesDomain < ActiveRecord::Base
include EachBatch
end
diff --git a/db/post_migrate/20180220150310_remove_empty_extern_uid_auth0_identities.rb b/db/post_migrate/20180220150310_remove_empty_extern_uid_auth0_identities.rb
index 2d5a8617169..86ef333685e 100644
--- a/db/post_migrate/20180220150310_remove_empty_extern_uid_auth0_identities.rb
+++ b/db/post_migrate/20180220150310_remove_empty_extern_uid_auth0_identities.rb
@@ -1,4 +1,4 @@
-class RemoveEmptyExternUidAuth0Identities < ActiveRecord::Migration
+class RemoveEmptyExternUidAuth0Identities < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180223124427_build_user_interacted_projects_table.rb b/db/post_migrate/20180223124427_build_user_interacted_projects_table.rb
index 8c8dbb1a043..fa332fd5c70 100644
--- a/db/post_migrate/20180223124427_build_user_interacted_projects_table.rb
+++ b/db/post_migrate/20180223124427_build_user_interacted_projects_table.rb
@@ -1,7 +1,7 @@
require_relative '../migrate/20180223120443_create_user_interacted_projects_table.rb'
# rubocop:disable AddIndex
# rubocop:disable AddConcurrentForeignKey
-class BuildUserInteractedProjectsTable < ActiveRecord::Migration
+class BuildUserInteractedProjectsTable < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
@@ -43,7 +43,7 @@ class BuildUserInteractedProjectsTable < ActiveRecord::Migration
end
end
- class PostgresStrategy < ActiveRecord::Migration
+ class PostgresStrategy < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
BATCH_SIZE = 100_000
@@ -141,7 +141,7 @@ class BuildUserInteractedProjectsTable < ActiveRecord::Migration
end
end
- class MysqlStrategy < ActiveRecord::Migration
+ class MysqlStrategy < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
def up
diff --git a/db/post_migrate/20180301084653_change_project_namespace_id_not_null.rb b/db/post_migrate/20180301084653_change_project_namespace_id_not_null.rb
index 0342372cbed..62a239b0e7c 100644
--- a/db/post_migrate/20180301084653_change_project_namespace_id_not_null.rb
+++ b/db/post_migrate/20180301084653_change_project_namespace_id_not_null.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class ChangeProjectNamespaceIdNotNull < ActiveRecord::Migration
+class ChangeProjectNamespaceIdNotNull < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
class Project < ActiveRecord::Base
diff --git a/db/post_migrate/20180305100050_remove_permanent_from_redirect_routes.rb b/db/post_migrate/20180305100050_remove_permanent_from_redirect_routes.rb
index aa19732ca1c..15c052da99b 100644
--- a/db/post_migrate/20180305100050_remove_permanent_from_redirect_routes.rb
+++ b/db/post_migrate/20180305100050_remove_permanent_from_redirect_routes.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RemovePermanentFromRedirectRoutes < ActiveRecord::Migration
+class RemovePermanentFromRedirectRoutes < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180306074045_migrate_create_trace_artifact_sidekiq_queue.rb b/db/post_migrate/20180306074045_migrate_create_trace_artifact_sidekiq_queue.rb
index 0af1c3bc0a5..fc74f6f1712 100644
--- a/db/post_migrate/20180306074045_migrate_create_trace_artifact_sidekiq_queue.rb
+++ b/db/post_migrate/20180306074045_migrate_create_trace_artifact_sidekiq_queue.rb
@@ -1,4 +1,4 @@
-class MigrateCreateTraceArtifactSidekiqQueue < ActiveRecord::Migration
+class MigrateCreateTraceArtifactSidekiqQueue < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180306164012_add_path_index_to_redirect_routes.rb b/db/post_migrate/20180306164012_add_path_index_to_redirect_routes.rb
index ca9212fae27..53918250b4c 100644
--- a/db/post_migrate/20180306164012_add_path_index_to_redirect_routes.rb
+++ b/db/post_migrate/20180306164012_add_path_index_to_redirect_routes.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class AddPathIndexToRedirectRoutes < ActiveRecord::Migration
+class AddPathIndexToRedirectRoutes < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/post_migrate/20180307012445_migrate_update_head_pipeline_for_merge_request_sidekiq_queue.rb b/db/post_migrate/20180307012445_migrate_update_head_pipeline_for_merge_request_sidekiq_queue.rb
index 9728df6d409..372c04429c7 100644
--- a/db/post_migrate/20180307012445_migrate_update_head_pipeline_for_merge_request_sidekiq_queue.rb
+++ b/db/post_migrate/20180307012445_migrate_update_head_pipeline_for_merge_request_sidekiq_queue.rb
@@ -1,4 +1,4 @@
-class MigrateUpdateHeadPipelineForMergeRequestSidekiqQueue < ActiveRecord::Migration
+class MigrateUpdateHeadPipelineForMergeRequestSidekiqQueue < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180405101928_reschedule_builds_stages_migration.rb b/db/post_migrate/20180405101928_reschedule_builds_stages_migration.rb
index c32123454f9..213d97b71f7 100644
--- a/db/post_migrate/20180405101928_reschedule_builds_stages_migration.rb
+++ b/db/post_migrate/20180405101928_reschedule_builds_stages_migration.rb
@@ -1,4 +1,4 @@
-class RescheduleBuildsStagesMigration < ActiveRecord::Migration
+class RescheduleBuildsStagesMigration < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
##
diff --git a/db/post_migrate/20180408143355_cleanup_users_rss_token_rename.rb b/db/post_migrate/20180408143355_cleanup_users_rss_token_rename.rb
index 3d77ff921c7..813603cb3ad 100644
--- a/db/post_migrate/20180408143355_cleanup_users_rss_token_rename.rb
+++ b/db/post_migrate/20180408143355_cleanup_users_rss_token_rename.rb
@@ -1,4 +1,4 @@
-class CleanupUsersRssTokenRename < ActiveRecord::Migration
+class CleanupUsersRssTokenRename < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
diff --git a/db/post_migrate/20180409170809_populate_missing_project_ci_cd_settings.rb b/db/post_migrate/20180409170809_populate_missing_project_ci_cd_settings.rb
index 3b0fdb3aeea..0cda3d76a3d 100644
--- a/db/post_migrate/20180409170809_populate_missing_project_ci_cd_settings.rb
+++ b/db/post_migrate/20180409170809_populate_missing_project_ci_cd_settings.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class PopulateMissingProjectCiCdSettings < ActiveRecord::Migration
+class PopulateMissingProjectCiCdSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180420080616_schedule_stages_index_migration.rb b/db/post_migrate/20180420080616_schedule_stages_index_migration.rb
index eb82f098639..2d72e75393f 100644
--- a/db/post_migrate/20180420080616_schedule_stages_index_migration.rb
+++ b/db/post_migrate/20180420080616_schedule_stages_index_migration.rb
@@ -1,4 +1,4 @@
-class ScheduleStagesIndexMigration < ActiveRecord::Migration
+class ScheduleStagesIndexMigration < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180424151928_fill_file_store.rb b/db/post_migrate/20180424151928_fill_file_store.rb
index 03d54dab250..45fa10c9550 100644
--- a/db/post_migrate/20180424151928_fill_file_store.rb
+++ b/db/post_migrate/20180424151928_fill_file_store.rb
@@ -1,4 +1,4 @@
-class FillFileStore < ActiveRecord::Migration
+class FillFileStore < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180430143705_backfill_runner_type_for_ci_runners_post_migrate.rb b/db/post_migrate/20180430143705_backfill_runner_type_for_ci_runners_post_migrate.rb
index 0e6ec46e5f0..ba1023866c5 100644
--- a/db/post_migrate/20180430143705_backfill_runner_type_for_ci_runners_post_migrate.rb
+++ b/db/post_migrate/20180430143705_backfill_runner_type_for_ci_runners_post_migrate.rb
@@ -1,4 +1,4 @@
-class BackfillRunnerTypeForCiRunnersPostMigrate < ActiveRecord::Migration
+class BackfillRunnerTypeForCiRunnersPostMigrate < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180502134117_migrate_import_attributes_data_from_projects_to_project_mirror_data.rb b/db/post_migrate/20180502134117_migrate_import_attributes_data_from_projects_to_project_mirror_data.rb
index 08d7d64a2c5..b82ee3569c9 100644
--- a/db/post_migrate/20180502134117_migrate_import_attributes_data_from_projects_to_project_mirror_data.rb
+++ b/db/post_migrate/20180502134117_migrate_import_attributes_data_from_projects_to_project_mirror_data.rb
@@ -1,4 +1,4 @@
-class MigrateImportAttributesDataFromProjectsToProjectMirrorData < ActiveRecord::Migration
+class MigrateImportAttributesDataFromProjectsToProjectMirrorData < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180507083701_set_minimal_project_build_timeout.rb b/db/post_migrate/20180507083701_set_minimal_project_build_timeout.rb
index fb9616f0c07..34edbb08bcf 100644
--- a/db/post_migrate/20180507083701_set_minimal_project_build_timeout.rb
+++ b/db/post_migrate/20180507083701_set_minimal_project_build_timeout.rb
@@ -1,4 +1,4 @@
-class SetMinimalProjectBuildTimeout < ActiveRecord::Migration
+class SetMinimalProjectBuildTimeout < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180511174224_add_unique_constraint_to_project_features_project_id.rb b/db/post_migrate/20180511174224_add_unique_constraint_to_project_features_project_id.rb
index 88a9f5f8256..a526001a91e 100644
--- a/db/post_migrate/20180511174224_add_unique_constraint_to_project_features_project_id.rb
+++ b/db/post_migrate/20180511174224_add_unique_constraint_to_project_features_project_id.rb
@@ -1,4 +1,4 @@
-class AddUniqueConstraintToProjectFeaturesProjectId < ActiveRecord::Migration
+class AddUniqueConstraintToProjectFeaturesProjectId < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180512061621_add_not_null_constraint_to_project_features_project_id.rb b/db/post_migrate/20180512061621_add_not_null_constraint_to_project_features_project_id.rb
index 5a6d6ff4a10..e3abbc039e8 100644
--- a/db/post_migrate/20180512061621_add_not_null_constraint_to_project_features_project_id.rb
+++ b/db/post_migrate/20180512061621_add_not_null_constraint_to_project_features_project_id.rb
@@ -1,4 +1,4 @@
-class AddNotNullConstraintToProjectFeaturesProjectId < ActiveRecord::Migration
+class AddNotNullConstraintToProjectFeaturesProjectId < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180514161336_remove_gemnasium_service.rb b/db/post_migrate/20180514161336_remove_gemnasium_service.rb
index 6d7806e8daa..5842bde474c 100644
--- a/db/post_migrate/20180514161336_remove_gemnasium_service.rb
+++ b/db/post_migrate/20180514161336_remove_gemnasium_service.rb
@@ -1,4 +1,4 @@
-class RemoveGemnasiumService < ActiveRecord::Migration
+class RemoveGemnasiumService < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180521162137_migrate_remaining_mr_metrics_populating_background_migration.rb b/db/post_migrate/20180521162137_migrate_remaining_mr_metrics_populating_background_migration.rb
index 0282688fa40..39666a0cd2a 100644
--- a/db/post_migrate/20180521162137_migrate_remaining_mr_metrics_populating_background_migration.rb
+++ b/db/post_migrate/20180521162137_migrate_remaining_mr_metrics_populating_background_migration.rb
@@ -1,4 +1,4 @@
-class MigrateRemainingMrMetricsPopulatingBackgroundMigration < ActiveRecord::Migration
+class MigrateRemainingMrMetricsPopulatingBackgroundMigration < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180523125103_cleanup_merge_requests_allow_maintainer_to_push_rename.rb b/db/post_migrate/20180523125103_cleanup_merge_requests_allow_maintainer_to_push_rename.rb
index 7eca7394f5f..b3b539fd156 100644
--- a/db/post_migrate/20180523125103_cleanup_merge_requests_allow_maintainer_to_push_rename.rb
+++ b/db/post_migrate/20180523125103_cleanup_merge_requests_allow_maintainer_to_push_rename.rb
@@ -1,4 +1,4 @@
-class CleanupMergeRequestsAllowMaintainerToPushRename < ActiveRecord::Migration
+class CleanupMergeRequestsAllowMaintainerToPushRename < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180529152628_schedule_to_archive_legacy_traces.rb b/db/post_migrate/20180529152628_schedule_to_archive_legacy_traces.rb
index 965cd3a8714..6246f6afab0 100644
--- a/db/post_migrate/20180529152628_schedule_to_archive_legacy_traces.rb
+++ b/db/post_migrate/20180529152628_schedule_to_archive_legacy_traces.rb
@@ -1,4 +1,4 @@
-class ScheduleToArchiveLegacyTraces < ActiveRecord::Migration
+class ScheduleToArchiveLegacyTraces < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180603190921_migrate_object_storage_upload_sidekiq_queue.rb b/db/post_migrate/20180603190921_migrate_object_storage_upload_sidekiq_queue.rb
index 57bee6269b9..bc7c3eb5385 100644
--- a/db/post_migrate/20180603190921_migrate_object_storage_upload_sidekiq_queue.rb
+++ b/db/post_migrate/20180603190921_migrate_object_storage_upload_sidekiq_queue.rb
@@ -1,4 +1,4 @@
-class MigrateObjectStorageUploadSidekiqQueue < ActiveRecord::Migration
+class MigrateObjectStorageUploadSidekiqQueue < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180604123514_cleanup_stages_position_migration.rb b/db/post_migrate/20180604123514_cleanup_stages_position_migration.rb
index 5418f442e79..326cdfa27c3 100644
--- a/db/post_migrate/20180604123514_cleanup_stages_position_migration.rb
+++ b/db/post_migrate/20180604123514_cleanup_stages_position_migration.rb
@@ -1,4 +1,4 @@
-class CleanupStagesPositionMigration < ActiveRecord::Migration
+class CleanupStagesPositionMigration < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180608201435_cleanup_merge_requests_allow_collaboration_rename.rb b/db/post_migrate/20180608201435_cleanup_merge_requests_allow_collaboration_rename.rb
index 3f3edb8ea3d..5e892f8bace 100644
--- a/db/post_migrate/20180608201435_cleanup_merge_requests_allow_collaboration_rename.rb
+++ b/db/post_migrate/20180608201435_cleanup_merge_requests_allow_collaboration_rename.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class CleanupMergeRequestsAllowCollaborationRename < ActiveRecord::Migration
+class CleanupMergeRequestsAllowCollaborationRename < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180619121030_enqueue_delete_diff_files_workers.rb b/db/post_migrate/20180619121030_enqueue_delete_diff_files_workers.rb
index c4d2f5f61a0..73f6a3a2a43 100644
--- a/db/post_migrate/20180619121030_enqueue_delete_diff_files_workers.rb
+++ b/db/post_migrate/20180619121030_enqueue_delete_diff_files_workers.rb
@@ -1,4 +1,4 @@
-class EnqueueDeleteDiffFilesWorkers < ActiveRecord::Migration
+class EnqueueDeleteDiffFilesWorkers < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180629191052_add_partial_index_to_projects_for_last_repository_check_at.rb b/db/post_migrate/20180629191052_add_partial_index_to_projects_for_last_repository_check_at.rb
index a701d3678db..15c02cd77b8 100644
--- a/db/post_migrate/20180629191052_add_partial_index_to_projects_for_last_repository_check_at.rb
+++ b/db/post_migrate/20180629191052_add_partial_index_to_projects_for_last_repository_check_at.rb
@@ -1,4 +1,4 @@
-class AddPartialIndexToProjectsForLastRepositoryCheckAt < ActiveRecord::Migration
+class AddPartialIndexToProjectsForLastRepositoryCheckAt < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/post_migrate/20180702120647_enqueue_fix_cross_project_label_links.rb b/db/post_migrate/20180702120647_enqueue_fix_cross_project_label_links.rb
index 59aa41adede..3d3d49e7564 100644
--- a/db/post_migrate/20180702120647_enqueue_fix_cross_project_label_links.rb
+++ b/db/post_migrate/20180702120647_enqueue_fix_cross_project_label_links.rb
@@ -1,4 +1,4 @@
-class EnqueueFixCrossProjectLabelLinks < ActiveRecord::Migration
+class EnqueueFixCrossProjectLabelLinks < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180704145007_update_project_indexes.rb b/db/post_migrate/20180704145007_update_project_indexes.rb
index 0e2601ad4fa..0a82f4535a0 100644
--- a/db/post_migrate/20180704145007_update_project_indexes.rb
+++ b/db/post_migrate/20180704145007_update_project_indexes.rb
@@ -1,7 +1,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class UpdateProjectIndexes < ActiveRecord::Migration
+class UpdateProjectIndexes < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180706223200_populate_site_statistics.rb b/db/post_migrate/20180706223200_populate_site_statistics.rb
index e78e9eb900a..896965b708f 100644
--- a/db/post_migrate/20180706223200_populate_site_statistics.rb
+++ b/db/post_migrate/20180706223200_populate_site_statistics.rb
@@ -1,4 +1,4 @@
-class PopulateSiteStatistics < ActiveRecord::Migration
+class PopulateSiteStatistics < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180723130817_delete_inconsistent_internal_id_records.rb b/db/post_migrate/20180723130817_delete_inconsistent_internal_id_records.rb
index 3b9b95ec9ca..440868005bb 100644
--- a/db/post_migrate/20180723130817_delete_inconsistent_internal_id_records.rb
+++ b/db/post_migrate/20180723130817_delete_inconsistent_internal_id_records.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
-class DeleteInconsistentInternalIdRecords < ActiveRecord::Migration
+class DeleteInconsistentInternalIdRecords < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180809195358_migrate_null_wiki_access_levels.rb b/db/post_migrate/20180809195358_migrate_null_wiki_access_levels.rb
index 0a0a33299e4..363219da539 100644
--- a/db/post_migrate/20180809195358_migrate_null_wiki_access_levels.rb
+++ b/db/post_migrate/20180809195358_migrate_null_wiki_access_levels.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class MigrateNullWikiAccessLevels < ActiveRecord::Migration
+class MigrateNullWikiAccessLevels < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180816161409_migrate_legacy_artifacts_to_job_artifacts.rb b/db/post_migrate/20180816161409_migrate_legacy_artifacts_to_job_artifacts.rb
index 2dd711e9c10..6b0d1ef0d0c 100644
--- a/db/post_migrate/20180816161409_migrate_legacy_artifacts_to_job_artifacts.rb
+++ b/db/post_migrate/20180816161409_migrate_legacy_artifacts_to_job_artifacts.rb
@@ -1,4 +1,4 @@
-class MigrateLegacyArtifactsToJobArtifacts < ActiveRecord::Migration
+class MigrateLegacyArtifactsToJobArtifacts < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180816193530_rename_login_root_namespaces.rb b/db/post_migrate/20180816193530_rename_login_root_namespaces.rb
index 4ab1250473f..70db8f46d05 100644
--- a/db/post_migrate/20180816193530_rename_login_root_namespaces.rb
+++ b/db/post_migrate/20180816193530_rename_login_root_namespaces.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
-class RenameLoginRootNamespaces < ActiveRecord::Migration
+class RenameLoginRootNamespaces < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
include Gitlab::Database::RenameReservedPathsMigration::V1
diff --git a/db/post_migrate/20180826111825_recalculate_site_statistics.rb b/db/post_migrate/20180826111825_recalculate_site_statistics.rb
index 741035a444f..6d27eca38e3 100644
--- a/db/post_migrate/20180826111825_recalculate_site_statistics.rb
+++ b/db/post_migrate/20180826111825_recalculate_site_statistics.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class RecalculateSiteStatistics < ActiveRecord::Migration
+class RecalculateSiteStatistics < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180906051323_remove_orphaned_label_links.rb b/db/post_migrate/20180906051323_remove_orphaned_label_links.rb
index b56b74f483e..a474aaf534c 100644
--- a/db/post_migrate/20180906051323_remove_orphaned_label_links.rb
+++ b/db/post_migrate/20180906051323_remove_orphaned_label_links.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class RemoveOrphanedLabelLinks < ActiveRecord::Migration
+class RemoveOrphanedLabelLinks < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180913051323_consume_remaining_diff_files_deletion_jobs.rb b/db/post_migrate/20180913051323_consume_remaining_diff_files_deletion_jobs.rb
index ed9422a3894..2c266a4695b 100644
--- a/db/post_migrate/20180913051323_consume_remaining_diff_files_deletion_jobs.rb
+++ b/db/post_migrate/20180913051323_consume_remaining_diff_files_deletion_jobs.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class ConsumeRemainingDiffFilesDeletionJobs < ActiveRecord::Migration
+class ConsumeRemainingDiffFilesDeletionJobs < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180913142237_schedule_digest_personal_access_tokens.rb b/db/post_migrate/20180913142237_schedule_digest_personal_access_tokens.rb
index 36be819b245..951cb3b088c 100644
--- a/db/post_migrate/20180913142237_schedule_digest_personal_access_tokens.rb
+++ b/db/post_migrate/20180913142237_schedule_digest_personal_access_tokens.rb
@@ -1,4 +1,4 @@
-class ScheduleDigestPersonalAccessTokens < ActiveRecord::Migration
+class ScheduleDigestPersonalAccessTokens < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180914162043_encrypt_web_hooks_columns.rb b/db/post_migrate/20180914162043_encrypt_web_hooks_columns.rb
index 05ec4864a9e..ef864f490bb 100644
--- a/db/post_migrate/20180914162043_encrypt_web_hooks_columns.rb
+++ b/db/post_migrate/20180914162043_encrypt_web_hooks_columns.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class EncryptWebHooksColumns < ActiveRecord::Migration
+class EncryptWebHooksColumns < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180914201132_remove_sidekiq_throttling_from_application_settings.rb b/db/post_migrate/20180914201132_remove_sidekiq_throttling_from_application_settings.rb
index b3ed0d3f1e9..2c007ec395d 100644
--- a/db/post_migrate/20180914201132_remove_sidekiq_throttling_from_application_settings.rb
+++ b/db/post_migrate/20180914201132_remove_sidekiq_throttling_from_application_settings.rb
@@ -2,7 +2,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class RemoveSidekiqThrottlingFromApplicationSettings < ActiveRecord::Migration
+class RemoveSidekiqThrottlingFromApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20180916014356_populate_external_pipeline_source.rb b/db/post_migrate/20180916014356_populate_external_pipeline_source.rb
index 5577d05cf40..a3d2df1f2bd 100644
--- a/db/post_migrate/20180916014356_populate_external_pipeline_source.rb
+++ b/db/post_migrate/20180916014356_populate_external_pipeline_source.rb
@@ -3,7 +3,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class PopulateExternalPipelineSource < ActiveRecord::Migration
+class PopulateExternalPipelineSource < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/post_migrate/20180917172041_remove_wikis_count_from_site_statistics.rb b/db/post_migrate/20180917172041_remove_wikis_count_from_site_statistics.rb
index 0a39abe3bdf..3b8300dabeb 100644
--- a/db/post_migrate/20180917172041_remove_wikis_count_from_site_statistics.rb
+++ b/db/post_migrate/20180917172041_remove_wikis_count_from_site_statistics.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
-class RemoveWikisCountFromSiteStatistics < ActiveRecord::Migration
+class RemoveWikisCountFromSiteStatistics < ActiveRecord::Migration[4.2]
def change
remove_column :site_statistics, :wikis_count, :integer
end
diff --git a/db/post_migrate/20181008145341_steal_encrypt_columns.rb b/db/post_migrate/20181008145341_steal_encrypt_columns.rb
index c107ac72913..4102643ba13 100644
--- a/db/post_migrate/20181008145341_steal_encrypt_columns.rb
+++ b/db/post_migrate/20181008145341_steal_encrypt_columns.rb
@@ -1,4 +1,4 @@
-class StealEncryptColumns < ActiveRecord::Migration
+class StealEncryptColumns < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20181008145359_remove_web_hooks_token_and_url.rb b/db/post_migrate/20181008145359_remove_web_hooks_token_and_url.rb
index 0c44bca5f1a..93e4458b795 100644
--- a/db/post_migrate/20181008145359_remove_web_hooks_token_and_url.rb
+++ b/db/post_migrate/20181008145359_remove_web_hooks_token_and_url.rb
@@ -1,4 +1,4 @@
-class RemoveWebHooksTokenAndUrl < ActiveRecord::Migration
+class RemoveWebHooksTokenAndUrl < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20181008200441_remove_circuit_breaker.rb b/db/post_migrate/20181008200441_remove_circuit_breaker.rb
index 838addb7286..378692e8886 100644
--- a/db/post_migrate/20181008200441_remove_circuit_breaker.rb
+++ b/db/post_migrate/20181008200441_remove_circuit_breaker.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class RemoveCircuitBreaker < ActiveRecord::Migration
+class RemoveCircuitBreaker < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/db/post_migrate/20181013005024_remove_koding_from_application_settings.rb b/db/post_migrate/20181013005024_remove_koding_from_application_settings.rb
index 938a32e4e98..550ad94f4ab 100644
--- a/db/post_migrate/20181013005024_remove_koding_from_application_settings.rb
+++ b/db/post_migrate/20181013005024_remove_koding_from_application_settings.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class RemoveKodingFromApplicationSettings < ActiveRecord::Migration
+class RemoveKodingFromApplicationSettings < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20181014121030_enqueue_redact_links.rb b/db/post_migrate/20181014121030_enqueue_redact_links.rb
index 1ee4703c88a..8d1a840d594 100644
--- a/db/post_migrate/20181014121030_enqueue_redact_links.rb
+++ b/db/post_migrate/20181014121030_enqueue_redact_links.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class EnqueueRedactLinks < ActiveRecord::Migration
+class EnqueueRedactLinks < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20181022173835_enqueue_populate_cluster_kubernetes_namespace.rb b/db/post_migrate/20181022173835_enqueue_populate_cluster_kubernetes_namespace.rb
index f80a2aa6eac..94a4574abff 100644
--- a/db/post_migrate/20181022173835_enqueue_populate_cluster_kubernetes_namespace.rb
+++ b/db/post_migrate/20181022173835_enqueue_populate_cluster_kubernetes_namespace.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class EnqueuePopulateClusterKubernetesNamespace < ActiveRecord::Migration
+class EnqueuePopulateClusterKubernetesNamespace < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20181030135124_fill_empty_finished_at_in_deployments.rb b/db/post_migrate/20181030135124_fill_empty_finished_at_in_deployments.rb
index 32b271c472a..228841a14a0 100644
--- a/db/post_migrate/20181030135124_fill_empty_finished_at_in_deployments.rb
+++ b/db/post_migrate/20181030135124_fill_empty_finished_at_in_deployments.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class FillEmptyFinishedAtInDeployments < ActiveRecord::Migration
+class FillEmptyFinishedAtInDeployments < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20181105201455_steal_fill_store_upload.rb b/db/post_migrate/20181105201455_steal_fill_store_upload.rb
index 982001fedbe..a31a4eab472 100644
--- a/db/post_migrate/20181105201455_steal_fill_store_upload.rb
+++ b/db/post_migrate/20181105201455_steal_fill_store_upload.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-class StealFillStoreUpload < ActiveRecord::Migration
+class StealFillStoreUpload < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/db/post_migrate/20181107054254_remove_restricted_todos_again.rb b/db/post_migrate/20181107054254_remove_restricted_todos_again.rb
index 644e0074c46..bbeb4e8a1de 100644
--- a/db/post_migrate/20181107054254_remove_restricted_todos_again.rb
+++ b/db/post_migrate/20181107054254_remove_restricted_todos_again.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
# rescheduling of the revised RemoveRestrictedTodosWithCte background migration
-class RemoveRestrictedTodosAgain < ActiveRecord::Migration
+class RemoveRestrictedTodosAgain < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/doc/api/issues.md b/doc/api/issues.md
index 0dc9d706120..0e97d9ea6f5 100644
--- a/doc/api/issues.md
+++ b/doc/api/issues.md
@@ -658,7 +658,7 @@ POST /projects/:id/issues/:issue_iid/move
| `to_project_id` | integer | yes | The ID of the new project |
```bash
-curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --data '{"to_project_id": 5}' https://gitlab.example.com/api/v4/projects/4/issues/85/move
+curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --form to_project_id=5 https://gitlab.example.com/api/v4/projects/4/issues/85/move
```
Example response:
diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md
index 66743ea0e47..02f198dbd67 100644
--- a/doc/ci/yaml/README.md
+++ b/doc/ci/yaml/README.md
@@ -1634,6 +1634,10 @@ rspec:
- bundle exec rspec
```
+NOTE: **Note:**
+`include` requires the external YAML files to have the extensions `.yml` or `.yaml`.
+The external file will not be included if the extension is missing.
+
You can define it either as a single string, or, in case you want to include
more than one files, an array of different values . The following examples
are both valid cases:
diff --git a/doc/development/README.md b/doc/development/README.md
index d2dd62ecac5..bcf57a223f5 100644
--- a/doc/development/README.md
+++ b/doc/development/README.md
@@ -23,7 +23,7 @@ description: 'Learn how to contribute to GitLab.'
## UX and frontend guides
-- [UX guide](ux_guide/index.md) for building GitLab with existing CSS styles and elements
+- [GitLab Design System](https://design.gitlab.com/) for building GitLab with existing CSS styles and elements
- [Frontend guidelines](fe_guide/index.md)
- [Emoji guide](fe_guide/emojis.md)
diff --git a/doc/development/contributing/style_guides.md b/doc/development/contributing/style_guides.md
index fb0454db7d2..6f1ba5d62a5 100644
--- a/doc/development/contributing/style_guides.md
+++ b/doc/development/contributing/style_guides.md
@@ -23,8 +23,7 @@
1. Code should be written in [US English][us-english]
This is also the style used by linting tools such as
-[RuboCop](https://github.com/bbatsov/rubocop),
-[PullReview](https://www.pullreview.com/) and [Hound CI](https://houndci.com).
+[RuboCop](https://github.com/bbatsov/rubocop) and [Hound CI](https://houndci.com).
---
diff --git a/doc/development/documentation/index.md b/doc/development/documentation/index.md
index b8b86ac1bf5..b7990e1b558 100644
--- a/doc/development/documentation/index.md
+++ b/doc/development/documentation/index.md
@@ -100,9 +100,6 @@ The table below shows what kind of documentation goes where.
**General rules & best practices:**
-1. The correct naming and location of a new document, is a combination
- of the relative URL of the document in question and the GitLab Map design
- that is used for UX purposes ([source][graffle], [image][gitlab-map]).
1. When creating a new document and it has more than one word in its name,
make sure to use underscores instead of spaces or dashes (`-`). For example,
a proper naming would be `import_projects_from_github.md`. The same rule
diff --git a/doc/development/fe_guide/components.md b/doc/development/fe_guide/components.md
index ee0c2d534ff..0e9126ee667 100644
--- a/doc/development/fe_guide/components.md
+++ b/doc/development/fe_guide/components.md
@@ -6,7 +6,7 @@
## Dropdowns
-See also the [corresponding UX guide](../ux_guide/components.md#dropdowns).
+See also the [corresponding UX guide](https://design.gitlab.com/#/components/dropdowns).
### How to style a bootstrap dropdown
1. Use the HTML structure provided by the [docs][bootstrap-dropdowns]
@@ -40,7 +40,7 @@ See also the [corresponding UX guide](../ux_guide/components.md#dropdowns).
## Modals
-See also the [corresponding UX guide](../ux_guide/components.md#modals).
+See also the [corresponding UX guide](https://design.gitlab.com/#/components/modals).
We have a reusable Vue component for modals: [vue_shared/components/gl_modal.vue](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/assets/javascripts/vue_shared/components/gl_modal.vue)
diff --git a/doc/development/ui_guide.md b/doc/development/ui_guide.md
index dd206bb2ae9..cec937da99b 100644
--- a/doc/development/ui_guide.md
+++ b/doc/development/ui_guide.md
@@ -1,107 +1,5 @@
-# UI Guide for building GitLab
+---
+redirect_to: 'https://design.gitlab.com/'
+---
-## GitLab UI development kit
-
-We created a page inside GitLab where you can check commonly used html and css elements.
-
-When you run GitLab instance locally - just visit http://localhost:3000/help/ui page to see UI examples
-you can use during GitLab development.
-
-## Design repository
-
-All design files are stored in the [gitlab-design](https://gitlab.com/gitlab-org/gitlab-design)
-repository and maintained by GitLab UX designers.
-
-## Navigation
-
-GitLab's layout contains 2 sections: the left sidebar and the content. The left sidebar contains a static navigation menu.
-This menu will be visible regardless of what page you visit.
-The content section contains a header and the content itself. The header describes the current GitLab page and what navigation is
-available to the user in this area. Depending on the area (project, group, profile setting) the header name and navigation may change. For example, when the user visits one of the
-project pages the header will contain the project's name and navigation for that project. When the user visits a group page it will contain the group's name and navigation related to this group.
-
-You can see a visual representation of the navigation in GitLab in the GitLab Product Map, which is located in the [Design Repository][gitlab-map-graffle]
-along with [PDF][gitlab-map-pdf] and [PNG][gitlab-map-png] exports.
-
-
-### Adding new tab to header navigation
-
-We try to keep the amount of tabs in the header navigation between 5 and 10 so that it fits on a typical laptop screen. We also try not to confuse the user with too many options. Ideally each
-tab should represent separate functionality. Everything related to the issue
-tracker should be under the 'Issues' tab while everything related to the wiki should
-be under 'Wiki' tab and so on and so forth.
-When adding a new tab to the header don't use more than 2 words for text in the link.
-We want to keep links short and easy to remember and fit all of them in the small screen.
-
-## Mobile screen size
-
-We want GitLab to work well on small mobile screens as well. Size limitations make it is impossible to fit everything on a mobile screen. In this case it is OK to hide
-part of the UI for smaller resolutions in favor of a better user experience.
-However core functionality like browsing files, creating issues, writing comments, should
-be available on all resolutions.
-
-## Icons
-
-* `trash` icon for button or link that does destructive action like removing
-information from database or file system
-* `x` icon for closing/hiding UI element. For example close modal window
-* `pencil` icon for edit button or link
-* `eye` icon for subscribe action
-* `rss` for rss/atom feed
-* `plus` for link or dropdown that lead to page where you create new object (For example new issue page)
-
-### SVGs
-
-When exporting SVGs, be sure to follow the following guidelines:
-
-- Convert all strokes to outlines.
-- Use pathfinder tools to combine overlapping paths and create compound paths.
-- SVGs that are limited to one color should be exported without a fill color so the color can be set using CSS.
-- Ensure that exported SVGs have been run through an [SVG cleaner](https://github.com/RazrFalcon/SVGCleaner) to remove unused elements and attributes.
-
-You can open your svg in a text editor to ensure that it is clean.
-Incorrect files will look like this:
-
-```xml
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg width="16px" height="17px" viewBox="0 0 16 17" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
- <!-- Generator: Sketch 3.7.2 (28276) - http://www.bohemiancoding.com/sketch -->
- <title>Group</title>
- <desc>Created with Sketch.</desc>
- <defs></defs>
- <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
- <g id="Group" fill="#7E7C7C">
- <path d="M15.1111,1 L0.8891,1 C0.3981,1 0.0001,1.446 0.0001,1.996 L0.0001,15.945 C0.0001,16.495 0.3981,16.941 0.8891,16.941 L15.1111,16.941 C15.6021,16.941 16.0001,16.495 16.0001,15.945 L16.0001,1.996 C16.0001,1.446 15.6021,1 15.1111,1 L15.1111,1 L15.1111,1 Z M14.0001,6.0002 L14.0001,14.949 L2.0001,14.949 L2.0001,6.0002 L14.0001,6.0002 Z M14.0001,4.0002 L14.0001,2.993 L2.0001,2.993 L2.0001,4.0002 L14.0001,4.0002 Z" id="Combined-Shape"></path>
- <polygon id="Fill-11" points="3 2.0002 5 2.0002 5 0.0002 3 0.0002"></polygon>
- <polygon id="Fill-16" points="11 2.0002 13 2.0002 13 0.0002 11 0.0002"></polygon>
- <path d="M5.37709616,11.5511984 L6.92309616,12.7821984 C7.35112915,13.123019 7.97359761,13.0565604 8.32002627,12.6330535 L10.7740263,9.63305349 C11.1237073,9.20557058 11.0606364,8.57555475 10.6331535,8.22587373 C10.2056706,7.87619272 9.57565475,7.93926361 9.22597373,8.36674651 L6.77197373,11.3667465 L8.16890384,11.2176016 L6.62290384,9.98660159 C6.19085236,9.6425813 5.56172188,9.71394467 5.21770159,10.1459962 C4.8736813,10.5780476 4.94504467,11.2071781 5.37709616,11.5511984 L5.37709616,11.5511984 Z" id="Stroke-21"></path>
- </g>
- </g>
-</svg>
-```
-
-Correct file will look like this:
-
-```xml
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 17" enable-background="new 0 0 16 17"><path d="m15.1 1h-2.1v-1h-2v1h-6v-1h-2v1h-2.1c-.5 0-.9.5-.9 1v14c0 .6.4 1 .9 1h14.2c.5 0 .9-.4.9-1v-14c0-.5-.4-1-.9-1m-1.1 14h-12v-9h12v9m0-11h-12v-1h12v1"/><path d="m5.4 11.6l1.5 1.2c.4.3 1.1.3 1.4-.1l2.5-3c.3-.4.3-1.1-.1-1.4-.5-.4-1.1-.3-1.5.1l-1.8 2.2-.8-.6c-.4-.3-1.1-.3-1.4.2-.3.4-.3 1 .2 1.4"/></svg>
-```
-
-
-## Buttons
-
-* Button should contain icon or text. Exceptions should be approved by UX designer.
-* Use red button for destructive actions (not revertable). For example removing issue.
-* Use green or blue button for primary action. Primary button should be only one.
-Do not use both green and blue button in one form.
-* For all other cases use default white button.
-* Text button should have only first word capitalized. So should be "Create issue" instead of "Create Issue"
-
-## Counts
-
-* Always use the [`number_with_delimiter`][number_with_delimiter] helper to
- display counts in the UI.
-
-[number_with_delimiter]: http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#method-i-number_with_delimiter
-[gitlab-map-graffle]: https://gitlab.com/gitlab-org/gitlab-design/blob/master/production/resources/gitlab-map.graffle
-[gitlab-map-pdf]: https://gitlab.com/gitlab-org/gitlab-design/raw/master/production/resources/gitlab-map.pdf
-[gitlab-map-png]: https://gitlab.com/gitlab-org/gitlab-design/raw/master/production/resources/gitlab-map.png
+The content of this documented was moved into the [GitLab Design System](https://design.gitlab.com/).
diff --git a/doc/development/ux_guide/animation.md b/doc/development/ux_guide/animation.md
index 797390a6845..3ebbd87d05f 100644
--- a/doc/development/ux_guide/animation.md
+++ b/doc/development/ux_guide/animation.md
@@ -1,65 +1,5 @@
-# Animation
+---
+redirect_to: 'https://design.gitlab.com/foundations/motion'
+---
-Motion is a tool to help convey important relationships, changes or transitions between elements. It should be used sparingly and intentionally, highlighting the right elements at the right moment.
-
-## Timings
-
-The longer distance an object travel, the timing should be longer for the animation. However, when in doubt, we should avoid large, full screen animations.
-
-Subtle animations, or objects leaving the screen should take **100-200 milliseconds**. Objects entering the screen, or motion we want to use to direct user attention can take between **200-400 milliseconds**. We should avoid animations of longer than 400 milliseconds as they will make the experience appear sluggish. If a specific animation feels like it will need more than 400 milliseconds, revisit the animation to see if there is a simpler, easier, shorter animation to implement.
-
-## Easing
-
-Easing specifies the rate of change of a parameter over time (see [easings.net](http://easings.net/)). Adding an easing curve will make the motion feel more natural. Being consistent with the easing curves will make the whole experience feel more cohesive and connected.
-
-* When an object is entering the screen, or transforming the scale, position, or shape, use the **easeOutQuint** curve (`cubic-bezier(0.23, 1, 0.32, 1)`)
-* When an object is leaving the screen, or transforming the opacity or color, no easing curve is needed. It shouldn't _slow down_ as it is exiting the screen, as that draws attention on the leaving object, where we don't want it. Adding easing to opacity and color transitions will make the motion appear less smooth. Therefore, for these cases, motion should just be **linear**.
-
-## Types of animations
-
-### Hover
-
-Interactive elements (links, buttons, etc.) should have a hover state. A subtle animation for this transition adds a polished feel. We should target a `100ms - 150ms linear` transition for a color hover effect.
-
-View the [interactive example](http://codepen.io/awhildy/full/GNyEvM/) here.
-
-![Hover animation](img/animation-hover.gif)
-
-### Dropdowns
-
-The dropdown menu should feel like it is appearing from the triggering element. Combining a position shift `400ms cubic-bezier(0.23, 1, 0.32, 1)` with an opacity animation `200ms linear` on the second half of the motion achieves this affect.
-
-View the [interactive example](http://codepen.io/awhildy/full/jVLJpb/) here.
-
-![Dropdown animation](img/animation-dropdown.gif)
-
-### Quick update
-
-When information is updating in place, a quick, subtle animation is needed. The previous content should cut out, and the new content should have a quick, `200ms linear` fade in.
-
-![Quick update animation](img/animation-quickupdate.gif)
-
-### Skeleton loading
-
-Skeleton loading is explained in the [component section](components.html#skeleton-loading) of the UX guide. It includes a horizontally pulsating animation that shows motion as if it's growing. It's timing is a slower `linear 1s`.
-
-![Skeleton loading animation](img/skeleton-loading.gif)
-
-### Moving transitions
-
-When elements move on screen, there should be a quick animation so it is clear to users what moved where. The timing of this animation differs based on the amount of movement and change. Consider animations between `200ms` and `400ms`.
-
-#### Shifting elements on reorder
-An example of a moving transition is when elements have to move out of the way when you drag an element.
-
-View the [interactive example](http://codepen.io/awhildy/full/ALyKPE/) here.
-
-![Reorder animation](img/animation-reorder.gif)
-
-#### Autoscroll the page
-
-Another example of a moving transition is when you have to autoscroll the page to keep an active element visible.
-
-View the [interactive example](http://codepen.io/awhildy/full/PbxgVo/) here.
-
-![Autoscroll animation](img/animation-autoscroll.gif)
+The content of this documented was moved into the [GitLab Design System](https://design.gitlab.com).
diff --git a/doc/development/ux_guide/basics.md b/doc/development/ux_guide/basics.md
index e215026bcca..cec937da99b 100644
--- a/doc/development/ux_guide/basics.md
+++ b/doc/development/ux_guide/basics.md
@@ -1,82 +1,5 @@
-# Basics
-
-## Contents
-* [Responsive](#responsive)
-* [Typography](#typography)
-* [Icons](#icons)
-* [Color](#color)
-* [Cursors](#cursors)
-
----
-
-## Responsive
-GitLab is a responsive experience that works well across all screen sizes, from mobile devices to large monitors. In order to provide a great user experience, the core functionality (browsing files, creating issues, writing comments, etc.) must be available at all resolutions. However, due to size limitations, some secondary functionality may be hidden on smaller screens. Please keep this functionality limited to rare actions that aren't expected to be needed on small devices.
-
----
-
-## Typography
-### Primary typeface
-GitLab's main typeface used throughout the UI is **Source Sans Pro**. We support both the bold and regular weight.
-
-![Source Sans Pro sample](img/sourcesanspro-sample.png)
-
-
-### Monospace typeface
-This is the typeface used for code blocks and references to commits, branches, and tags (`.commit-sha` or `.ref-name`). GitLab uses the OS default font.
-- **Menlo** (Mac)
-- **Consolas** (Windows)
-- **Liberation Mono** (Linux)
-
-![Monospace font sample](img/monospacefont-sample.png)
-
----
-
-## Icons
-
-GitLab has a strong, unique personality. When you look at any screen, you should know immediately that it is GitLab.
-Iconography is a powerful visual cue to the user and is a great way for us to reflect our particular sense of style.
-
-- **Standard size:** 16px * 16px
-- **Border thickness:** 2px
-- **Border radius:** 3px
-
-![Icon sampler](img/icon-spec.png)
-
-> TODO: List all icons, proper usage, hover, and active states.
-
---
-
-## Color
-
-| | State | Action |
-| :------: | :------- | :------- |
-| ![Blue](img/color-blue.png) | Primary and active (such as the current tab) | Organizational, managing, and retry commands|
-| ![Green](img/color-green.png) | Opened | Create new objects |
-| ![Orange](img/color-orange.png) | Warning | Non destructive action |
-| ![Red](img/color-red.png) | Closed | Delete and other destructive commands |
-| ![Grey](img/color-grey.png) | Neutral | Neutral secondary commands |
-
-### Text colors
-
-|||
-| :---: | :--- |
-| ![Text primary](img/color-textprimary.png) | Used for primary body text, such as issue description and comment |
-| ![Text secondary](img/color-textsecondary.png) | Used for secondary body text, such as username and date |
-
-> TODO: Establish a perspective for color in terms of our personality and rationalize with Marketing usage.
-
+redirect_to: 'https://design.gitlab.com/'
---
-## Cursors
-The mouse cursor is key in helping users understand how to interact with elements on the screen.
-
-| | |
-| :------: | :------- |
-| ![Default cursor](img/cursors-default.png) | Default cursor |
-| ![Pointer cursor](img/cursors-pointer.png) | Pointer cursor: used to indicate that you can click on an element to invoke a command or navigate, such as links and buttons |
-| ![Move cursor](img/cursors-move.png) | Move cursor: used to indicate that you can move an element around on the screen |
-| ![Pan opened cursor](img/cursors-panopened.png) | Pan cursor (opened): indicates that you can grab and move the entire canvas, affecting what is seen in the view port. |
-| ![Pan closed cursor](img/cursors-panclosed.png) | Pan cursor (closed): indicates that you are actively panning the canvas. |
-| ![I-beam cursor](img/cursors-ibeam.png) | I-beam cursor: indicates that this is either text that you can select and copy, or a text field that you can click into to enter text. |
-
-
+The content of this documented was moved into the [GitLab Design System](https://design.gitlab.com/).
diff --git a/doc/development/ux_guide/components.md b/doc/development/ux_guide/components.md
index 4a3b3125f59..cec937da99b 100644
--- a/doc/development/ux_guide/components.md
+++ b/doc/development/ux_guide/components.md
@@ -1,387 +1,5 @@
-# Components
-
-## Contents
-* [Tooltips](#tooltips)
-* [Anchor links](#anchor-links)
-* [Buttons](#buttons)
-* [Dropdowns](#dropdowns)
-* [Counts](#counts)
-* [Lists](#lists)
-* [Tables](#tables)
-* [Blocks](#blocks)
-* [Panels](#panels)
-* [Modals](#modals)
-* [Alerts](#alerts)
-* [Forms](#forms)
-* [Search box](#search-box)
-* [File holders](#file-holders)
-* [Data formats](#data-formats)
-
----
-
-## Tooltips
-Tooltips identify elements or provide additional, useful information about the referring elements. Tooltips are different from ALT-attributes, which are intended primarily for static images. Tooltips are summoned by:
-
-* Hovering over an element with a cursor
-* Focusing on an element with a keyboard (usually the tab key)
-* Upon touch
-
-### Usage
-A tooltip should be used:
-* When there isn’t enough space to show the information
-* When it isn’t critical for the user to see the information
-* For icons that don’t have a label
-
-Tooltips shouldn’t repeat information that is shown near the referring element. However, they can show the same data in a different format (e.g. date or timestamps).
-
-![Tooltip usage](img/tooltip-usage.png)
-
-### Placement
-By default, tooltips should be placed below the referring element. However, if there isn’t enough space in the viewport, the tooltip should be moved to the side as needed.
-
-![Tooltip placement location](img/tooltip-placement.png)
-
----
-
-## Popovers
-
-Popovers provide additional, useful, unique information about the referring elements and can provide one or multiple actionable elements. They inform the user of additional information within the context of their original view, but without forcing the user to act upon it like a modal. Popovers are different from tooltips, which do not provide rich markup and actionable items. A popover can contain a header section with a different background color.
-
-Popovers are summoned:
-
-* Upon hover or touch on an element
-
-### Usage
-A popover should be used:
-* When you don't want to let the user lose context, but still want to provide additional useful unique information about referring elements
-* When it isn’t critical for the user to act upon the information
-* When you want to give a user a summary of extended information and the option to switch context if they want to dive in deeper.
-
-### Styling
-
-A popover can contain a header section with a different background color if that improves readability and separation of content within.
-
-![Popover usage](img/popover-placement-below.png)
-
-This example shows two sections, where each section includes an actionable element. The first section shows a summary of the content shown when clicking the "read more" link. With this information the user can decide to dive deeper or start their GitLab Enterprise Edition trial immediately.
-
-### Placement
-By default, tooltips should be placed below the referring element. However, if there isn’t enough space in the viewport or it blocks related content, the tooltip should be moved to the side or above as needed.
-
-![Tooltip placement location](img/popover-placement-above.png)
-
-In this example we let the user know more about the setting they are deciding over, without loosing context. If they want to know even more they can do so, but with the expectation of opening that content in a new view.
-
----
-
-## Anchor links
-
-Anchor links are used for navigational actions and lone, secondary commands (such as 'Reset filters' on the Issues List) when deemed appropriate by the UX team.
-
-### States
-
-#### Rest
-
-Primary links are blue in their rest state. Secondary links (such as the time stamp on comments) are a neutral gray color in rest. Details on the main GitLab navigation links can be found on the [features](features.md#navigation) page.
-
-#### Hover
-
-On hover, an underline should be added and the color should change. Both the primary and secondary link should become the darker blue color on hover.
-
-#### Focus
-
-The focus state should match the hover state.
-
-![Anchor link states ](img/components-anchorlinks.png)
-
----
-
-## Buttons
-
-Buttons communicate the command that will occur when the user clicks on them.
-
-### Types
-
-#### Primary
-Primary buttons communicate the main call to action. There should only be one call to action in any given experience. Visually, primary buttons are conveyed with a full background fill
-
-![Primary button example](img/button-primary.png)
-
-#### Secondary
-Secondary buttons are for alternative commands. They should be conveyed by a button with a stroke, and no background fill.
-
-![Secondary button example](img/button-secondary.png)
-
-### Icon and text treatment
-Text should be in sentence case, where only the first word is capitalized. "Create issue" is correct, not "Create Issue". Buttons should only contain an icon or a text, not both.
-
-> TODO: Rationalize this. Ensure that we still believe this.
-
-### Colors
-The default color treatment is the white/grey button. Follow the guidance on the [basics](basics.md#color) page to add meaningful color to a button.
-
-### Secondary states
-
-Primary buttons darken the color of their background and border for hover, focus and active states. An inner shadow is added to the active state to denote the button being pressed.
-
-| Values | Info | Success | Warning | Danger |
-| :------ | :------: | :------: | :------: | :------: |
-| Background: `$color-light` <br> Border: `$border-color-light` | ![](img/button-info--resting.png) | ![](img/button-success--resting.png) | ![](img/button-warning--resting.png) | ![](img/button-danger--resting.png) |
-| Background: `$color-normal` <br> Border: `$border-color-normal` | ![](img/button-info--hover.png) | ![](img/button-success--hover.png) | ![](img/button-warning--hover.png) | ![](img/button-danger--hover.png) |
-| Background: `$color-dark` <br> Border: `$border-color-dark` | ![](img/button-info--active.png) | ![](img/button-success--active.png) | ![](img/button-warning--active.png) | ![](img/button-danger--active.png) |
-
-Since secondary buttons only have a border on their resting state, their hover and focus states add a background color, which gets darkened on active.
-
-| Values | Success Secondary | Close | Spam |
-| :------ | :------: | :------: | :------: |
-| Font: `$border-color-light` <br> Border: `$border-color-light` | ![](img/button-success-secondary--resting.png) | ![](img/button-close--resting.png) | ![](img/button-spam--resting.png) |
-| Background: `$color-light` <br> Border: `$border-color-light` | ![](img/button-success-secondary--hover.png) | ![](img/button-close--hover.png) | ![](img/button-spam--hover.png) |
-| Background: `$color-normal` <br> Border: `$border-color-normal` | ![](img/button-success-secondary--active.png) | ![](img/button-close--active.png) | ![](img/button-spam--active.png) |
-
-### Placement
-
-When there are a group of buttons in a dialog or a form, we need to be consistent with the placement.
-
-#### Dismissive actions on the left
-The dismissive action returns the user to the previous state.
-
-> Example: Cancel
-
-#### Affirmative actions on the right
-Affirmative actions continue to progress towards the user goal that triggered the dialog or form.
-
-> Example: Submit, Ok, Delete
-
----
-
-
-## Dropdowns
-
-Dropdowns are used to allow users to choose one (or many) options from a list of options. If this list of options is more 20, there should generally be a way to search through and filter the options (see the complex filter dropdowns below.)
-
-> TODO: Will update this section when the new filters UI is implemented.
-
-![Dropdown states](img/components-dropdown.png)
-
-### Max size
-
-The max height for dropdowns should target **10-15** single line items, or **7-10** multi-line items. If the height of the dropdown is too large, the list becomes very hard to parse and it is easy to visually lose track of the item you are looking for. Usability also suffers as more mouse movement is required, and you have a larger area in which you hijack the scroll away from the page level. While it may initially seem counterintuitive to not show as many items as you can, it is actually quicker and easier to process the information when it is cropped at a reasonable height.
-
----
-
-## Counts
-
-A count element is used in navigation contexts where it is helpful to indicate the count, or number of items, in a list. Always use the [`number_with_delimiter`][number_with_delimiter] helper to display counts in the UI.
-
-![Counts example](img/components-counts.png)
-
-[number_with_delimiter]: http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#method-i-number_with_delimiter
-
----
-
-## Lists
-
-Lists are used where ever there is a single column of information to display. Ths [issues list](https://gitlab.com/gitlab-org/gitlab-ce/issues) is an example of an important list in the GitLab UI.
-
-### Types
-
-Simple list using .content-list
-
-![Simple list](img/components-simplelist.png)
-
-List with avatar, title and description using .content-list
-
-![List with avatar](img/components-listwithavatar.png)
-
-List with hover effect .content-list
-
-![List with hover effect](img/components-listwithhover.png)
-
-List inside panel
-
-![List inside panel](img/components-listinsidepanel.png)
-
----
-
-## Tables
-
-When the information is too complex for a list, with multiple columns of information, a table can be used. For example, the [pipelines page](https://gitlab.com/gitlab-org/gitlab-ce/pipelines) uses a table.
-
-![Table](img/components-table.png)
-
----
-
-## Blocks
-
-Blocks are a way to group related information.
-
-### Types
-
-#### Content blocks
-
-Content blocks (`.content-block`) are the basic grouping of content. They are commonly used in [lists](#lists), and are separated by a button border.
-
-![Content block](img/components-contentblock.png)
-
-#### Row content blocks
-
-A background color can be added to this blocks. For example, items in the [issue list](https://gitlab.com/gitlab-org/gitlab-ce/issues) have a green background if they were created recently. Below is an example of a gray content block with side padding using `.row-content-block`.
-
-![Row content block](img/components-rowcontentblock.png)
-
-#### Cover blocks
-Cover blocks are generally used to create a heading element for a page, such as a new project, or a user profile page. Below is a cover block (`.cover-block`) for the profile page with an avatar, name and description.
-
-![Cover block](img/components-coverblock.png)
-
----
-
-## Skeleton loading
-
-Skeleton loading is a way to convey to the user what kind of content is currently being loaded. It's a paradigm with which content can independently and asynchronously be loaded, while still adhering to the structure and look of the completely loaded view.
-
-### Requirements
-
-* A skeleton should represent an organism in a recognisable way
-* Atom elements within organisms (for reference see this article on [atomic design methodology](http://atomicdesign.bradfrost.com/chapter-2/)) may be represented in a maximum of 3 repetitions, if applicable.
-* Skeletons should only be presented in grayscale using the HEX colors: `#fafafa` or `#ffffff` (except for shadows)
-* Animate the grey atoms in a pulsating way to show motion, as if "loading". The pulse animation transitions colors horizontally from left to right, starting with `#f2f2f2` to `#fafafa`.
-
-![Skeleton loading animation](img/skeleton-loading.gif)
-
-### Usage
-
-Skeleton loading can replace any existing UI elements for the period in which they are loaded and should aim for maintaining a similar structure visually.
-
----
-
-## Modals
-
-Modals are only used for having a conversation and confirmation with the user. The user is not able to access the features on the main page until closing the modal.
-
-### Usage
-
-* When the action is irreversible, modals provide the details and confirm with the user before they take an advanced action.
-* When the action will affect privacy or authorization, modals provide advanced information and confirm with the user.
-
-### Style
-
-* Modals contain the header, body, and actions.
- * **Header(1):** The header title is a question instead of a descriptive phrase.
- * **Body(2):** The content in body should never be ambiguous and unclear. It provides specific information.
- * **Actions(3):** Contains an affirmative action, a dismissive action, and an extra action. The order of actions from left to right: Dismissive action → Extra action → Affirmative action
-* Confirmations regarding labels should keep labeling styling.
-* References to commits, branches, and tags should be **monospaced**.
-
-![layout-modal](img/modals-layout-for-modals.png)
-
-### Placement
-
-* Modals should always be the center of the screen horizontally and be positioned **72px** from the top.
-
-| Modal with 2 actions | Modal with 3 actions | Special confirmation |
-| --------------------- | --------------------- | -------------------- |
-| ![two-actions](img/modals-general-confimation-dialog.png) | ![three-actions](img/modals-three-buttons.png) | ![special-confirmation](img/modals-special-confimation-dialog.png) |
-
-> TODO: Special case for modal.
-
----
-
-## Panels
-
-> TODO: Catalog how we are currently using panels and rationalize how they relate to alerts
-
-![Panels](img/components-panels.png)
-
----
-
-## Alerts
-
-> TODO: Catalog how we are currently using alerts
-
-![Alerts](img/components-alerts.png)
-
---
-
-## Forms
-
-There are two options shown below regarding the positioning of labels in forms. Both are options to consider based on context and available size. However, it is important to have a consistent treatment of labels in the same form.
-
-### Types
-
-#### Labels stack vertically
-
-Form (`form`) with label rendered above input.
-
-![Vertical form](img/components-verticalform.png)
-
-#### Labels side-by-side
-
-Horizontal form (`form.horizontal-form`) with label rendered inline with input.
-
-![Horizontal form](img/components-horizontalform.png)
-
+redirect_to: 'https://design.gitlab.com/'
---
-## Search box
-
-Search boxes across GitLab have a consistent rest, active and text entered state. When text isn't entered in the box, there should be a magnifying glass right aligned with the input field. When text is entered, the magnifying glass should become a x, allowing users to clear their text.
-
-![Search box](img/components-searchbox.png)
-
-If needed, we indicate the scope of the search in the search box.
-
-![Scoped Search box](img/components-searchboxscoped.png)
-
----
-
-## File holders
-A file holder (`.file-holder`) is used to show the contents of a file inline on a page of GitLab.
-
-![File Holder component](img/components-fileholder.png)
-
----
-
-## Data formats
-
-### Dates
-
-#### Exact
-
-Format for exacts dates should be ‘Mon DD, YYYY’, such as the examples below.
-
-![Exact date](img/components-dateexact.png)
-
-#### Relative
-
-This format relates how long since an action has occurred. The exact date can be shown as a tooltip on hover.
-
-![Relative date](img/components-daterelative.png)
-
-### References
-
-Referencing GitLab items depends on a symbol for each type of item. Typing that symbol will invoke a dropdown that allows you to search for and autocomplete the item you were looking for. References are shown as [links](#links) in context, and hovering on them shows the full title or name of the item.
-
-![Hovering on a reference](img/components-referencehover.png)
-
-#### `%` Milestones
-
-![Milestone reference](img/components-referencemilestone.png)
-
-#### `#` Issues
-
-![Issue reference](img/components-referenceissues.png)
-
-#### `!` Merge Requests
-
-![Merge request reference](img/components-referencemrs.png)
-
-#### `~` Labels
-
-![Labels reference](img/components-referencelabels.png)
-
-#### `@` People
-
-![People reference](img/components-referencepeople.png)
-
-> TODO: Open issue: Some commit references use monospace fonts, but others don't. Need to standardize this.
+The content of this documented was moved into the [GitLab Design System](https://design.gitlab.com/).
diff --git a/doc/development/ux_guide/copy.md b/doc/development/ux_guide/copy.md
index d5afa544372..cec937da99b 100644
--- a/doc/development/ux_guide/copy.md
+++ b/doc/development/ux_guide/copy.md
@@ -1,198 +1,5 @@
-# Copy
-
-The copy for GitLab is clear and direct. We strike a clear balance between professional and friendly. We can empathesize with users (such as celebrating completing all Todos), and remain respectful of the importance of the work. We are that trusted, friendly coworker that is helpful and understanding.
-
-The copy and messaging is a core part of the experience of GitLab and the conversation with our users. Follow the below conventions throughout GitLab.
-
-Portions of this page are inspired by work found in the [Material Design guidelines][material design].
-
->**Note:**
-We are currently inconsistent with this guidance. Images below are created to illustrate the point. As this guidance is refined, we will ensure that our experiences align.
-
-## Contents
-* [Brevity](#brevity)
-* [Capitalization and punctuation](#capitalization-and-punctuation)
-* [Terminology](#terminology)
-
----
-
-## Brevity
-Users will skim content, rather than read text carefully.
-When familiar with a web app, users rely on muscle memory, and may read even less when moving quickly.
-A good experience should quickly orient a user, regardless of their experience, to the purpose of the current screen. This should happen without the user having to consciously read long strings of text.
-In general, text is burdensome and adds cognitive load. This is especially pronounced in a powerful productivity tool such as GitLab.
-We should _not_ rely on words as a crutch to explain the purpose of a screen.
-The current navigation and composition of the elements on the screen should get the user 95% there, with the remaining 5% being specific elements such as text.
-This means that, as a rule, copy should be very short. A long message or label is a red flag hinting at design that needs improvement.
-
->**Example:**
-Use `Add` instead of `Add issue` as a button label.
-Preferably use context and placement of controls to make it obvious what clicking on them will do.
-
----
-
-## Capitalization and punctuation
-
-### Case
-Use sentence case for titles, headings, labels, menu items, and buttons. Use title case when referring to [features][features] or [products][products]. Note that some features are also objects (e.g. “Merge Requests” and “merge requests”).
-
-| :white_check_mark: Do | :no_entry_sign: Don’t |
-| --- | --- |
-| Add issues to the Issue Board feature in GitLab Hosted | Add Issues To The Issue Board Feature In GitLab Hosted |
-
-### Avoid periods
-Avoid using periods in solitary sentences in these elements:
-
-* Labels
-* Hover text
-* Bulleted lists
-* Modal body text
-
-Periods should be used for:
-
-* Lists or modals with multiple sentences
-* Any sentence followed by a link
-
-| :white_check_mark: **Do** place periods after sentences followed by a link | :no_entry_sign: **Don’t** place periods after a link if it‘s not followed by a sentence |
-| --- | --- |
-| Mention someone to notify them. [Learn more](#) | Mention someone to notify them. [Learn more](#). |
-
-| :white_check_mark: **Do** skip periods after solo sentences of body text | :no_entry_sign: **Don’t** place periods after body text if there is only a single sentence |
-| --- | --- |
-| To see the available commands, enter `/gitlab help` | To see the available commands, enter `/gitlab help`. |
-
-### Use contractions
-Don’t make a sentence harder to understand just to follow this rule. For example, “do not” can give more emphasis than “don’t” when needed.
-
-| :white_check_mark: Do | :no_entry_sign: Don’t |
-| --- | --- |
-| it’s, can’t, wouldn’t, you’re, you’ve, haven’t, don’t | it is, cannot, would not, it’ll, should’ve |
-
-### Use numerals for numbers
-Use “1, 2, 3” instead of “one, two, three” for numbers. One exception is when mixing uses of numbers, such as “Enter two 3s.”
-
-| :white_check_mark: Do | :no_entry_sign: Don’t |
-| --- | --- |
-| 3 new commits | Three new commits |
-
-### Punctuation
-Omit punctuation after phrases and labels to create a cleaner and more readable interface. Use punctuation to add clarity or be grammatically correct.
-
-| Punctuation mark | Copy and paste | HTML entity | Unicode | Mac shortcut | Windows shortcut | Description |
-|---|---|---|---|---|---|---|
-| Period | **.** | | | | | Omit for single sentences in affordances like labels, hover text, bulleted lists, and modal body text.<br><br>Use in lists or modals with multiple sentences, and any sentence followed by a link or inline code.<br><br>Place inside quotation marks unless you’re telling the reader what to enter and it’s ambiguous whether to include the period. |
-| Comma | **,** | | | | | Place inside quotation marks.<br><br>Use a [serial comma][serial comma] in lists of three or more terms. |
-| Exclamation point | **!** | | | | | Avoid exclamation points as they tend to come across as shouting. Some exceptions include greetings or congratulatory messages. |
-| Colon | **:** | `&#58;` | `\u003A` | | | Omit from labels, for example, in the labels for fields in a form. |
-| Apostrophe | **’** | `&rsquo;` | `\u2019` | <kbd>⌥ Option</kbd>+<kbd>⇧ Shift</kbd>+<kbd>]</kbd> | <kbd>Alt</kbd>+<kbd>0 1 4 6</kbd> | Use for contractions (I’m, you’re, ’89) and to show possession.<br><br>To show possession, add an *’s* to all singular common nouns and names, even if they already end in an *s*: “Look into this worker process’s log.” For singular proper names ending in *s*, use only an apostrophe: “James’ commits.” For plurals of a single letter, add an *’s*: “Dot your i’s and cross your t’s.”<br><br>Omit for decades or acronyms: “the 1990s”, “MRs.” |
-| Quotation marks | **“**<br><br>**”**<br><br>**‘**<br><br>**’** | `&ldquo;`<br><br>`&rdquo;`<br><br>`&lsquo;`<br><br>`&rsquo;` | `\u201C`<br><br>`\u201D`<br><br>`\u2018`<br><br>`\u2019` | <kbd>⌥ Option</kbd>+<kbd>[</kbd><br><br><kbd>⌥ Option</kbd>+<kbd>⇧ Shift</kbd>+<kbd>[</kbd><br><br><kbd>⌥ Option</kbd>+<kbd>]</kbd><br><br><kbd>⌥ Option</kbd>+<kbd>⇧ Shift</kbd>+<kbd>]</kbd> | <kbd>Alt</kbd>+<kbd>0 1 4 7</kbd><br><br><kbd>Alt</kbd>+<kbd>0 1 4 8</kbd><br><br><kbd>Alt</kbd>+<kbd>0 1 4 5</kbd><br><br><kbd>Alt</kbd>+<kbd>0 1 4 6</kbd> | Use proper quotation marks (also known as smart quotes, curly quotes, or typographer’s quotes) for quotes. Single quotation marks are used for quotes inside of quotes.<br><br>The right single quotation mark symbol is also used for apostrophes.<br><br>Don’t use primes, straight quotes, or free-standing accents for quotation marks. |
-| Primes | **′**<br><br>**″** | `&prime;`<br><br>`&Prime;` | `\u2032`<br><br>`\u2033` | | <kbd>Alt</kbd>+<kbd>8 2 4 2</kbd><br><br><kbd>Alt</kbd>+<kbd>8 2 4 3</kbd> | Use prime (′) only in abbreviations for feet, arcminutes, and minutes: 3° 15′<br><br>Use double-prime (″) only in abbreviations for inches, arcseconds, and seconds: 3° 15′ 35″<br><br>Don’t use quotation marks, straight quotes, or free-standing accents for primes. |
-| Straight quotes and accents | **"**<br><br>**'**<br><br>**`**<br><br>**´** | `&quot;`<br><br>`&#39;`<br><br>`&#96;`<br><br>`&acute;` | `\u0022`<br><br>`\u0027`<br><br>`\u0060`<br><br>`\u00B4` | | | Don’t use straight quotes or free-standing accents for primes or quotation marks.<br><br>Proper typography never uses straight quotes. They are left over from the age of typewriters and their only modern use is for code. |
-| Ellipsis | **…** | `&hellip;` | | <kbd>⌥ Option</kbd>+<kbd>;</kbd> | <kbd>Alt</kbd>+<kbd>0 1 3 3</kbd> | Use to indicate an action in progress (“Downloading…”) or incomplete or truncated text. No space before the ellipsis.<br><br>Omit from menu items or buttons that open a modal or start some other process. |
-| Chevrons | **«**<br><br>**»**<br><br>**‹**<br><br>**›**<br><br>**<**<br><br>**>** | `&#171;`<br><br>`&#187;`<br><br>`&#8249;`<br><br>`&#8250;`<br><br>`&lt;`<br><br>`&gt;` | `\u00AB`<br><br>`\u00BB`<br><br>`\u2039`<br><br>`\u203A`<br><br>`\u003C`<br><br>`\u003E`<br><br> | | | Omit from links or buttons that open another page or move to the next or previous step in a process. Also known as angle brackets, angular quote brackets, or guillemets. |
-| Em dash | **—** | `&mdash;` | `\u2014` | <kbd>⌥ Option</kbd>+<kbd>⇧ Shift</kbd>+<kbd>-</kbd> | <kbd>Alt</kbd>+<kbd>0 1 5 1</kbd> | Avoid using dashes to separate text. If you must use dashes for this purpose — like this — use an em dash surrounded by spaces. |
-| En dash | **–** | `&ndash;` | `\u2013` | <kbd>⌥ Option</kbd>+<kbd>-</kbd> | <kbd>Alt</kbd>+<kbd>0 1 5 0</kbd> | Use an en dash without spaces instead of a hyphen to indicate a range of values, such as numbers, times, and dates: “3–5 kg”, “8:00 AM–12:30 PM”, “10–17 Jan” |
-| Hyphen | **-** | | | | | Use to represent negative numbers, or to avoid ambiguity in adjective-noun or noun-participle pairs. Example: “anti-inflammatory”; “5-mile walk.”<br><br>Omit in commonly understood terms and adverbs that end in *ly*: “frontend”, “greatly improved performance.”<br><br>Omit in the term “open source.” |
-| Parentheses | **( )** | | | | | Use only to define acronyms or jargon: “Secure web connections are based on a technology called SSL (the secure sockets layer).”<br><br>Avoid other uses and instead rewrite the text, or use dashes or commas to set off the information. If parentheses are required: If the parenthetical is a complete, independent sentence, place the period inside the parentheses; if not, the period goes outside. |
-
-When using the <kbd>Alt</kbd> keystrokes in Windows, use the numeric keypad, not the row of numbers above the alphabet, and be sure Num Lock is turned on.
-
----
-
-## Terminology
-Only use the terms below.
-
-When using verbs or adjectives:
-* If the context clearly refers to the object, use them alone. Example: `Edit` or `Closed`
-* If the context isn’t clear enough, use them with the object. Example: `Edit issue` or `Closed issues`
-
-### Search
-
-| Term | Use |
-| ---- | --- |
-| Search | When using all metadata to add criteria that match/don't match. Search can also affect ordering, by ranking best results. |
-| Filter | When taking a single criteria that removes items within a list that match/don't match. Filters do not affect ordering. |
-| Sort | Orders a list based on a single or grouped criteria |
-
-### Projects and Groups
-
-| Term | Use | :no_entry_sign: Don't |
-| ---- | --- | ----- |
-| Members | When discussing the people who are a part of a project or a group. | Don't use `users`. |
-
-### Issues
-
-#### Adjectives (states)
-
-| Term | :no_entry_sign: Don’t |
-| ---- | --- |
-| Open | Don’t use `Pending` or `Created` |
-| Closed | Don’t use `Archived` |
-| Deleted | Don’t use `Removed` or `Trashed` |
-
-#### Verbs (actions)
-
-| Term | Use | :no_entry_sign: Don’t |
-| ---- | --- | --- |
-| New | Although it’s not a verb, `New` is a common standard and used for entering the creation mode of a non-existent issue | Don’t use `Create`, `Open`, or `Add` |
-| Create | Only to indicate when or who created an issue ||
-| Add | Associate an existing issue with an item or a list of items | Don’t use `New` or `Create` |
-| View | Open the detail page of an issue | Don’t use `Open` or `See` |
-| Edit | Enter the editing mode of an issue | Don’t use `Change`, `Modify` or `Update` |
-| Submit | Finalize the *creation* process of an issue | Don’t use `Add`, `Create`, `New`, `Open`, `Save` or `Save changes` |
-| Save | Finalize the *editing* process of an issue | Don’t use `Edit`, `Modify`, `Update`, `Submit`, or `Save changes` |
-| Cancel | Cancel the *creation* or *editing* process of an issue | Don’t use `Back`, `Close`, or `Discard` |
-| Close | Close an open issue | Don’t use `Archive` |
-| Re-open | Re-open a closed issue | Don’t use `Open` |
-| Delete | Permanently remove an issue from the system | Don’t use `Remove` |
-| Remove | Remove the association an issue with an item or a list of items | Don’t use `Delete` |
-
-### Merge requests
-
-#### Adjectives (states)
-
-| Term |
-| ---- |
-| Open |
-| Merged |
-
-#### Verbs (actions)
-
-| Term | Use | :no_entry_sign: Don’t |
-| ---- | --- | --- |
-| Add | Add a merge request | Do not use `create` or `new` |
-| View | View an open or merged merge request ||
-| Edit | Edit an open or merged merge request| Do not use `update` |
-| Approve | Approve an open merge request ||
-| Remove approval, unapproved | Remove approval of an open merge request | Do not use `unapprove` as that is not an English word|
-| Merge | Merge an open merge request ||
-
-### Comments & Discussions
-
-#### Comment
-A **comment** is a written piece of text that users of GitLab can create. Comments have the meta data of author and timestamp. Comments can be added in a variety of contexts, such as issues, merge requests, and discussions.
-
-#### Discussion
-A **discussion** is a group of 1 or more comments. A discussion can include subdiscussions. Some discussions have the special capability of being able to be **resolved**. Both the comments in the discussion and the discussion itself can be resolved.
-
-## Modals
-
-- Destruction buttons should be clear and always say what they are destroying.
- E.g., `Delete page` instead of just `Delete`.
-- If the copy describes another action the user can take instead of the
- destructive one, provide a way for them to do that as a secondary button.
-- Avoid the word `cancel` or `canceled` in the descriptive copy. It can be
- confusing when you then see the `Cancel` button.
-
-see also: guidelines for [modal components](components.md#modals)
-
----
-
-Portions of this page are modifications based on work created and shared by the [Android Open Source Project][android project] and used according to terms described in the [Creative Commons 2.5 Attribution License][creative commons].
-
-[material design]: https://material.io/guidelines/
-[features]: https://about.gitlab.com/features/ "GitLab features page"
-[products]: https://about.gitlab.com/pricing/ "GitLab products page"
-[serial comma]: https://en.wikipedia.org/wiki/Serial_comma "“Serial comma” in Wikipedia"
-[android project]: http://source.android.com/
-[creative commons]: http://creativecommons.org/licenses/by/2.5/
+---
+redirect_to: 'https://design.gitlab.com/'
+---
+
+The content of this documented was moved into the [GitLab Design System](https://design.gitlab.com/).
diff --git a/doc/development/ux_guide/features.md b/doc/development/ux_guide/features.md
index 9472995c68c..cec937da99b 100644
--- a/doc/development/ux_guide/features.md
+++ b/doc/development/ux_guide/features.md
@@ -1,57 +1,5 @@
-# Features
-
-## Contents
-* [Navigation](#navigation)
-* [Filtering](#filtering)
-* [Search results](#search-results)
-* [Conversations](#conversations)
-* [Empty states](#empty-states)
-
---
-
-## Navigation
-
-### Global navigation
-
-The global navigation is accessible via the menu button on the top left of the screen, and can be pinned to keep it open. It contains a consistent list of pages that allow you to view content that is across GitLab. For example, you can view your todos, issues and merge requests across projects and groups.
-
-![Global nav](img/features-globalnav.png)
-
-
-### Contextual navigation
-
-The navigation in the header is contextual to each page. These options change depending on if you are looking at a project, group, or settings page. There should be no more than 10 items on a level in the contextual navigation, allowing it to comfortably fit on a typical laptop screen. There can be up to too levels of navigation. Each sub nav group should be a self-contained group of functionality. For example, everything related to the issue tracker should be under the 'Issue' tab, while everything relating to the wiki will be grouped under the 'Wiki' tab. The names used for each section should be short and easy to remember, ideally 1-2 words in length.
-
-![Contextual nav](img/features-contextualnav.png)
-
-### Information architecture
-
-The [GitLab Product Map](https://gitlab.com/gitlab-org/gitlab-design/raw/master/production/resources/gitlab-map.png) shows a visual representation of the information architecture for GitLab.
-
+redirect_to: 'https://design.gitlab.com/'
---
-## Filtering
-
-Today, lists are filtered by a series of dropdowns. Some of these dropdowns allow multiselect (labels), while others allow you to filter to one option (milestones). However, we are currently implementing a [new model](https://gitlab.com/gitlab-org/gitlab-ce/issues/21747) for this, and will update the guide when it is ready.
-
-![Filters](img/features-filters.png)
-
----
-
-## Search results
-
-### Global search
-
-[Global search](https://gitlab.com/search?group_id=&project_id=13083&repository_ref=&scope=issues&search=mobile) allows you to search across items in a project, or even across multiple projects. You can switch tabs to filter on type of object, or filter by group.
-
-### List search
-
-There are several core lists in the GitLab experience, such as the Issue list and the Merge Request list. You are also able to [filter and search these lists](https://gitlab.com/gitlab-org/gitlab-ce/issues?utf8=%E2%9C%93&search=mobile). This UI will be updated with the [new filtering model](https://gitlab.com/gitlab-org/gitlab-ce/issues/21747).
-
----
-
-## Empty states
-
-Empty states need to be considered in the design of features. They are vital to helping onboard new users, making the experience feel more approachable and understandable. Empty states should feel inviting and provide just enough information to get people started. There should be a single call to action and a clear explanation of what to use the feature for.
-
-![Empty states](img/features-emptystates.png)
+The content of this documented was moved into the [GitLab Design System](https://design.gitlab.com/).
diff --git a/doc/development/ux_guide/illustrations.md b/doc/development/ux_guide/illustrations.md
index 7e16c300921..fa67d7c2d74 100644
--- a/doc/development/ux_guide/illustrations.md
+++ b/doc/development/ux_guide/illustrations.md
@@ -1,86 +1,5 @@
-# Illustrations
-
-The illustrations should always align with topics and goals in specific context.
-
-## Principles
-
-#### Be simple.
-- For clarity, we use simple and specific elements to create our illustrations.
-
-#### Be optimistic.
-- We are an open-minded, optimistic, and friendly team. We should reflect those values in our illustrations to connect with our brand experience.
-
-#### Be gentle.
-- Our illustrations assist users in understanding context and guide users in the right direction. Illustrations are supportive, so they should be obvious but not aggressive.
-
-
-## Style
-
-#### Shapes
-- All illustrations are geometric rather than organic.
-- The illustrations are made by circles, rectangles, squares, and triangles.
-
-<img src="img/illustrations-geometric.png" width=224px alt="Example for geometric" />
-
-#### Stroke
-- Standard border thickness: **4px**
-- Depending on the situation, border thickness can be changed to **3px**. For example, when the illustration size is small, an illustration with 4px border thickness would look tight. In this case, the border thickness can be changed to 3px.
-- We use **rounded caps** and **rounded corner**.
-
-| Do | Don't |
-| -------- | -------- |
-| <img src="img/illustrations-caps-do.png" width= 133px alt="Do: caps and corner" /> | <img src="img/illustrations-caps-don't.png" width= 133px alt="Don't: caps and corner"/> |
-
-#### Radius
-- Standard corner radius: **10px**
-- Depending on the situation, corner radius can be changed to **5px**. For example, when the illustration size is small, an illustration with 10px corner radius would be over-rounded. In this case, the corner radius can be changed to 5px.
-
-<img src="img/illustrations-border-radius.png" width= 464px alt="Example for border radius"/>
-
-#### Size
-Depends on the situation, the illustration size can be the 3 types below:
-
-**Large**
-* Use case: Empty states, error pages(e.g. 404, 403)
-* For vertical layout, the illustration should not larger than **430*300 px**.
-* For horizontal layout, the illustration should not larger than **430*380 px**.
-
-| Vertical layout | Horizontal layout |
-| --------------- | ----------------- |
-| <img src="img/illustration-size-large-vertical.png" /> | <img src="img/illustration-size-large-horizontal.png" />
-
-**Medium**
-* Use case: Banner
-* The illustration should not larger than **240*160 px**
-* The illustration should keep simple and clear. We recommend not including too many elements in the medium size illustration.
-
-<img src="img/illustration-size-medium.png" width=983px />
-
-**Small**
-* Use case: Graphics for explanatory text, graphics for status.
-* The illustration should not larger than **160*90 px**.
-* The illustration should keep simple and clear. We recommend not including too many elements in the small size illustration.
-
-<img src="img/illustration-size-small.png" width=983px />
-
-**Illustration on mobile**
-- Keep the proportions in original ratio.
-
-#### Colors palette
-
-For consistency, we recommend choosing colors from our color palette.
-
-| Orange | Purple | Grey |
-| -------- | -------- | -------- |
-| <img src="img/illustrations-color-orange.png" width= 160px alt="Orange" /> | <img src="img/illustrations-color-purple.png" width= 160px alt="Purple" /> | <img src="img/illustrations-color-grey.png" width= 160px alt="Grey" /> |
-| #FC6D26 | #6B4FBB | #EEEEEE |
-
-#### Don't
-- Don't include the typography in the illustration.
-- Don't include tanuki in the illustration. If necessary, we recommend having tanuki monochromatic.
-
+---
+redirect_to: 'https://design.gitlab.com/foundations/illustration/'
---
-| Orange | Purple |
-| -------- | -------- |
-| <img src="img/illustrations-palette-oragne.png" width= 160px alt="Palette - Orange" /> | <img src="img/illustrations-palette-purple.png" width= 160px alt="Palette - Purple" /> |
+The content of this documented was moved into the [GitLab Design System](https://design.gitlab.com/).
diff --git a/doc/development/ux_guide/index.md b/doc/development/ux_guide/index.md
index c59e7b72a1a..cec937da99b 100644
--- a/doc/development/ux_guide/index.md
+++ b/doc/development/ux_guide/index.md
@@ -1,70 +1,5 @@
-> We are in the process of transferring UX documentation to the [design.gitlab.com](https://gitlab.com/gitlab-org/design.gitlab.com) project. Any updates to these docs should be made in that project. If documentation does not yet exist within [design.gitlab.com](https://gitlab.com/gitlab-org/design.gitlab.com), [create an issue](https://gitlab.com/gitlab-org/design.gitlab.com/issues) and merge request to add your new changes.
-
-# GitLab UX Guide
-
-The goal of this guide is to provide standards, principles and in-depth information to design beautiful and effective GitLab features. This will be a living document, and we welcome contributions, feedback and suggestions.
-
-## Design
-
----
-
-### [Principles](principles.md)
-These guiding principles set a solid foundation for our design system, and should remain relatively stable over multiple releases. They should be referenced as new design patterns are created.
-
----
-
-### [Basics](basics.md)
-The basic ingredients of our experience establish our personality and feel. This section includes details about typography, iconography, and color.
-
---
-
-### [Animation](animation.md)
-Guidance on the timing, curving and motion for GitLab.
-
----
-
-### [Illustrations](illustrations.md)
-Guidelines for principals and styles related to illustrations for GitLab.
-
----
-
-### [Copy](copy.md)
-Conventions on text and messaging within labels, buttons, and other components.
-
----
-
-### [Components](components.md)
-Components are the controls that make up the GitLab experience, including guidance around buttons, links, dropdowns, etc.
-
----
-
-### [Surfaces](surfaces.md)
-The GitLab experience is broken apart into several surfaces. Each of these surfaces is designated for a specific scope or type of content. Examples include the header, global menu, side pane, etc.
-
----
-
-### [Features](features.md)
-The previous building blocks are combined into complete features in the GitLab UX. Examples include our navigation, filters, search results, and empty states.
-
----
-
-## Research
-
----
-
-### [Users](users.md)
-How we think about the variety of users of GitLab, from small to large teams, comparing opensource usage to enterprise, etc.
-
----
-
-## Other
-
----
-
-### [Tips for designers](tips.md)
-Tips for exporting assets, and other guidance.
-
+redirect_to: 'https://design.gitlab.com/'
---
-### [Resources](resources.md)
-Resources for GitLab UX
+The content of this documented was moved into the [GitLab Design System](https://design.gitlab.com/).
diff --git a/doc/development/ux_guide/principles.md b/doc/development/ux_guide/principles.md
index 1a297cba2cc..cec937da99b 100644
--- a/doc/development/ux_guide/principles.md
+++ b/doc/development/ux_guide/principles.md
@@ -1,17 +1,5 @@
-# Principles
+---
+redirect_to: 'https://design.gitlab.com/'
+---
-These are the guiding principles that we should strive for to establish a solid foundation for the GitLab experience.
-
-## Professional and productive
-GitLab is a tool to support what people do, day in, day out. We need to respect the importance of their work, and avoid gimicky details.
-
-## Minimal and efficient
-While work can get complicated, GitLab is about bringing a sharp focus, helping our customers know what matters now.
-
-## Immediately recognizable
-When you look at any screen, you should know immediately that it is GitLab. Our personality is strong and consistent across product and marketing experiences.
-
-## Human and quirky
-We need to build empathy with our users, understanding their state of mind, and connect with them at a human level. Quirkiness is part of our DNA, and we should embrace it in the right moments and contexts.
-
-> TODO: Ensure these principles align well with the goals of the Marketing team
+The content of this documented was moved into the [GitLab Design System](https://design.gitlab.com/).
diff --git a/doc/development/ux_guide/resources.md b/doc/development/ux_guide/resources.md
index db57258237f..895dd5fe831 100644
--- a/doc/development/ux_guide/resources.md
+++ b/doc/development/ux_guide/resources.md
@@ -1,17 +1,5 @@
-# Resources
+---
+redirect_to: 'https://design.gitlab.com/resources/design-resources'
+---
-## GitLab UI development kit
-
-We created a page inside GitLab where you can check commonly used html and css elements.
-
-When you run GitLab instance locally - just visit http://localhost:3000/help/ui page to see UI examples
-you can use during GitLab development.
-
-## Design repository
-
-All design files are stored in the [gitlab-design](https://gitlab.com/gitlab-org/gitlab-design)
-repository and maintained by GitLab UX designers.
-
-## [brand.ai](https://brand.ai/git-lab/primary-brand)
-
-We are in the process of capturing our UI paradigms on brand.ai, see https://brand.ai/git-lab/primary-brand
+The content of this documented was moved into the [GitLab Design System](https://design.gitlab.com/).
diff --git a/doc/development/ux_guide/surfaces.md b/doc/development/ux_guide/surfaces.md
index 881d6aa4cd6..cec937da99b 100644
--- a/doc/development/ux_guide/surfaces.md
+++ b/doc/development/ux_guide/surfaces.md
@@ -1,47 +1,5 @@
-# Surfaces
-
-## Contents
-* [Header](#header)
-* [Global menu](#global-menu)
-* [Side pane](#side-pane)
-* [Content area](#content-area)
-
----
-
-![Surfaces UX](img/surfaces-ux.png)
-
-## Global menu
-
-This menu is to navigate to pages that contain content global to GitLab.
-
----
-
-## Header
-
-The header contains 3 main elements: Project switching and searching, user account avatar and settings, and a contextual menu that changes based on the current page.
-
-![Surfaces Header](img/surfaces-header.png)
-
---
-
-## Side pane
-
-The side pane holds supporting information and meta data for the information in the content area.
-
+redirect_to: 'https://design.gitlab.com/'
---
-## Content area
-
-The main content of the page. The content area can include other surfaces.
-
-### Item title bar
-
-The item title bar contains the top level information to identify the item, such as the name, id and status.
-
-![Item title](img/surfaces-contentitemtitle.png)
-
-### Item system information
-
-The system information block contains relevant system controlled information.
-
-![Item system information](img/surfaces-systeminformationblock.png)
+The content of this documented was moved into the [GitLab Design System](https://design.gitlab.com/).
diff --git a/doc/development/ux_guide/tips.md b/doc/development/ux_guide/tips.md
index ceb9ed56ac4..964ea6aae7d 100644
--- a/doc/development/ux_guide/tips.md
+++ b/doc/development/ux_guide/tips.md
@@ -1,40 +1,5 @@
-# Tips
+---
+redirect_to: 'https://design.gitlab.com/'
+---
-## SVGs
-
-When exporting SVGs, be sure to follow the following guidelines:
-
-1. Convert all strokes to outlines.
-1. Use pathfinder tools to combine overlapping paths and create compound paths.
-1. SVGs that are limited to one color should be exported without a fill color so the color can be set using CSS.
-1. Ensure that exported SVGs have been run through an [SVG cleaner](https://github.com/RazrFalcon/SVGCleaner) to remove unused elements and attributes.
-
-You can open your SVG in a text editor to ensure that it is clean.
-
-Incorrect files will look like this:
-
-```xml
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg width="16px" height="17px" viewBox="0 0 16 17" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
- <!-- Generator: Sketch 3.7.2 (28276) - http://www.bohemiancoding.com/sketch -->
- <title>Group</title>
- <desc>Created with Sketch.</desc>
- <defs></defs>
- <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
- <g id="Group" fill="#7E7C7C">
- <path d="M15.1111,1 L0.8891,1 C0.3981,1 0.0001,1.446 0.0001,1.996 L0.0001,15.945 C0.0001,16.495 0.3981,16.941 0.8891,16.941 L15.1111,16.941 C15.6021,16.941 16.0001,16.495 16.0001,15.945 L16.0001,1.996 C16.0001,1.446 15.6021,1 15.1111,1 L15.1111,1 L15.1111,1 Z M14.0001,6.0002 L14.0001,14.949 L2.0001,14.949 L2.0001,6.0002 L14.0001,6.0002 Z M14.0001,4.0002 L14.0001,2.993 L2.0001,2.993 L2.0001,4.0002 L14.0001,4.0002 Z" id="Combined-Shape"></path>
- <polygon id="Fill-11" points="3 2.0002 5 2.0002 5 0.0002 3 0.0002"></polygon>
- <polygon id="Fill-16" points="11 2.0002 13 2.0002 13 0.0002 11 0.0002"></polygon>
- <path d="M5.37709616,11.5511984 L6.92309616,12.7821984 C7.35112915,13.123019 7.97359761,13.0565604 8.32002627,12.6330535 L10.7740263,9.63305349 C11.1237073,9.20557058 11.0606364,8.57555475 10.6331535,8.22587373 C10.2056706,7.87619272 9.57565475,7.93926361 9.22597373,8.36674651 L6.77197373,11.3667465 L8.16890384,11.2176016 L6.62290384,9.98660159 C6.19085236,9.6425813 5.56172188,9.71394467 5.21770159,10.1459962 C4.8736813,10.5780476 4.94504467,11.2071781 5.37709616,11.5511984 L5.37709616,11.5511984 Z" id="Stroke-21"></path>
- </g>
- </g>
-</svg>
-```
-
-Correct files will look like this:
-
-```xml
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 17" enable-background="new 0 0 16 17"><path d="m15.1 1h-2.1v-1h-2v1h-6v-1h-2v1h-2.1c-.5 0-.9.5-.9 1v14c0 .6.4 1 .9 1h14.2c.5 0 .9-.4.9-1v-14c0-.5-.4-1-.9-1m-1.1 14h-12v-9h12v9m0-11h-12v-1h12v1"/><path d="m5.4 11.6l1.5 1.2c.4.3 1.1.3 1.4-.1l2.5-3c.3-.4.3-1.1-.1-1.4-.5-.4-1.1-.3-1.5.1l-1.8 2.2-.8-.6c-.4-.3-1.1-.3-1.4.2-.3.4-.3 1 .2 1.4"/></svg>
-```
-
-> TODO: Checkout <https://github.com/svg/svgo>.
+The content of this documented was moved into the [GitLab Design System](https://design.gitlab.com/). \ No newline at end of file
diff --git a/doc/development/ux_guide/users.md b/doc/development/ux_guide/users.md
index 30386e728c4..9258073cc14 100644
--- a/doc/development/ux_guide/users.md
+++ b/doc/development/ux_guide/users.md
@@ -1,310 +1,5 @@
-# UX Personas
-
-* [Nazim Ramesh](#nazim-ramesh)
- - Small to medium size organizations using GitLab CE
-* [Matthieu Poirier](#matthieu-poirier)
- - Responsible for managing and maintaining GitLab installation
- - Any size organization
- - Using CE or EE
-* [James Mackey](#james-mackey)
- - Medium to large size organizations using CE or EE
- - Small organizations using EE
-* [Karolina Plaskaty](#karolina-plaskaty)
- - Using GitLab.com for personal/hobby projects
- - Would like to use GitLab at work
- - Working within a medium to large size organization
-
---
-
-## Nazim Ramesh
-- Small to medium size organizations using GitLab CE
-
-![nazim-ramesh](img/nazim-ramesh.png)
-
-### Demographics
-
-**Age**
-
-32 years old
-
-**Location**
-
-Germany
-
-**Education**
-
-Bachelor of Science in Computer Science
-
-**Occupation**
-
-Full-stack web developer
-
-**Programming experience**
-
-Over 10 years
-
-**Frequently used programming languages**
-
-JavaScript, SQL, PHP
-
-**Hobbies / interests**
-
-Functional programming, open source, gaming, web development, and web security.
-
-### Motivations
-Nazim works for a software development company which currently hires around 80 people. When Nazim first joined the company, the engineering team were using Subversion (SVN) as their primary form of source control. However, Nazim felt SVN was not flexible enough to work with many feature branches and noticed that developers with less experience of source control struggled with the central-repository nature of SVN. Armed with a wish list of features, Nazim began comparing source control tools. A search for "self-hosted Git server repository management" returned GitLab. In his own words, Nazim explains why he wanted the engineering team to start using GitLab:
-
->"I wanted them to switch away from SVN. I needed a server application to manage repositories. The common tools that were around just didn't meet the requirements. Most of them were too simple or plain...GitLab provided all the required features. Also, costs had to be low since we don't have a big budget for those things...the Community Edition was perfect in this regard."
-
-In his role as a full-stack web developer, Nazim could recommend products that he would like the engineering team to use, but final approval lay with his line manager, Mike, VP of Engineering. Nazim recalls that he was met with reluctance from his colleagues when he raised moving to Git and using GitLab.
-
->"The biggest challenge...why should we change anything at all from the status quo? We needed to switch from SVN to Git. They knew they needed to learn Git and a Git workflow...using Git was scary to my colleagues...they thought it was more complex than SVN to use."
-
-Undeterred, Nazim decided to migrate a couple of projects across to GitLab.
-
->"Old SVN users couldn't see the benefits of Git at first. It took a month or two to convince them."
-
-Slowly, by showing his colleagues how easy it was to use Git, the majority of the team's projects were migrated to GitLab.
-
-The engineering team have been using GitLab CE for around 2 years now. Nazim credits himself as being entirely responsible for his company's decision to move to GitLab.
-
-### Frustrations
-#### Adoption to GitLab has been slow
-Not only has the engineering team had to get to grips with Git, they've also had to adapt to using GitLab. Due to lack of training and existing skills in other tools, the full feature set of GitLab CE is not being utilized. Nazim sold GitLab to his manager as an ‘all in one' tool which would replace multiple tools used within the company, thus saving costs. Nazim hasn't had the time to integrate the legacy tools to GitLab and he's struggling to convince his peers to change their habits.
-
-#### Missing Features
-Nazim's company want GitLab to be able to do everything. There isn't a large budget for software, so they're selective about what tools are implemented. It needs to add real value to the company. In order for GitLab to be widely adopted and to meet the requirements of different roles within the company, it needs a host of features. When an individual within Nazim's company wants to know if GitLab has a specific feature or does a particular thing, Nazim is the person to ask. He becomes the point of contact to investigate, build or sometimes just raise the feature request. Nazim gets frustrated when GitLab isn't able to do what he or his colleagues need it to do.
-
-#### Regressions and bugs
-Nazim often has to calm down his colleagues, when a release contains regressions or new bugs. As he puts it "every new version adds something awesome, but breaks something". He feels that "old issues for minor annoyances get quickly buried in the mass of open issues and linger for a very long time. More generally, I have the feeling that GitLab focus on adding new functionalities, but overlook a bunch of annoying minor regressions or introduced bugs." Due to limited resource and expertise within the team, not only is it difficult to remain up-to-date with the frequent release cycle, it's also counterproductive to fix workflows every month.
-
-#### Uses too much RAM and CPU
->"Memory usages mean that if we host it from a cloud-based host like AWS, we spend almost as much on the instance as what we would pay GitHub"
-
-
-#### UI/UX
-GitLab's interface initially attracted Nazim when he was comparing version control software. He thought it would help his less technical colleagues to adapt to using Git and perhaps, GitLab could be rolled out to other areas of the business, beyond engineering. However, using GitLab's interface daily has left him frustrated at the lack of personalization/control over his user experience. He's also regularly lost in a maze of navigation. Whilst he acknowledges that GitLab listens to its users and that the interface is improving, he becomes annoyed when the changes are too progressive. "Too frequent UI changes. Most of them tend to turn out great after a few cycles of fixes, but the frequency is still far too high for me to feel comfortable to always stay on the current release."
-
-### Goals
-* To convince his colleagues to fully adopt GitLab CE, thus improving workflow and collaboration.
-* To use a feature-rich version control platform that covers all stages of the development lifecycle, in order to reduce dependencies on other tools.
-* To use an intuitive and stable product, so he can spend more time on his core job responsibilities and less time bug-fixing, guiding colleagues, etc.
-
+redirect_to: 'https://design.gitlab.com/getting-started/personas/'
---
-## Matthieu Poirier
-- Responsible for managing and maintaining GitLab installation
-- Any size organization
-- Using CE or EE
-
-![matthieu-poirier](img/matthieu-poirier.png)
-
-### Demographics
-
-**Age**
-
-42 years old
-
-**Location**
-
-France
-
-**Education**
-
-Masters Degree in Computer Science
-
-**Occupation**
-
-DevOps Engineer
-
-**Programming experience**
-
-Over 10 years
-
-**Frequently used programming languages**
-
-JavaScript, SQL, PHP and Node.js
-
-**Hobbies / interests**
-
-Functional programming, data analysis, building apps, and tools.
-
-### Motivations
-Matthieu works in DevOps for a web services company which currently hires 90 staff. When Matthieu first joined the company, he was responsible for managing a custom built in-house bug tracking tool and release management system. Over time, as the company grew, his colleagues requested more features and tools to help them in their day-to-day work. To meet their needs, Matthieu was forced to "hack together" a solution. In his own words, Matthieu explains that it became:
-
->"...a huge pain managing access to all the individual pieces. In addition, they didn't have any integration with each other, nobody ended up using them and we couldn't do any workflows with merge requests and the like. I was sick of managing all those separate parts and wanted to move to a single platform that would handle it all."
-
-
-He further explains that he wanted to introduce "better, easier, more formal code reviews" and to start using continuous integration and deployment.
-
-Matthieu tried to find a platform which would consolidate the company's existing toolset, and centralize code, documentation, and issues. He discovered GitHub, but the price was an issue:
-
->"We needed to host our code on-site and wanted GitHub Enterprise functionality without the GitHub Enterprise costs."
-
-
-Not only was GitLab cheaper than GitHub, it was also more cost-effective than maintaining multiple tools. Subsequently, Matthieu found it easy to sell the merits of GitLab to his manager.
-
-Matthieu describes GitLab as:
-
->"the only tool that offers the real feeling of having everything you need in one place."
-
-
-He credits himself as being entirely responsible for moving his company to GitLab.
-
-### Frustrations
-#### Updating to the latest release
-Matthieu introduced his company to GitLab. He is responsible for maintaining and managing the company's installation in addition to his day job. He feels updates are too frequent and he doesn't always have sufficient time to update GitLab. As a result, he's not up to date with releases.
-
-Matthieu tried to set up automatic updates, however, as he isn't a Systems Administrator, he wasn't confident in his setup. He feels he should be able to "upgrade without users even noticing" but hasn't figured out how to do this yet. Matthieu would like the "update process to be triggered from the Admin Panel, perhaps accompanied with a changelog and the option to skip updates."
-
-Matthieu is looking for confirmation that his update procedure is "secure and efficient" so more tutorials related to this topic would be useful to him.
-
-#### Configuration
-Matthieu dislikes using the combination of gitlab.rb and the UI for changing settings. He explains that it "would be nice to be able to configure more from the Admin UI rather than just the config files."
-
-#### Creating a backup
-Matthieu explains that the "backup solution is not well integrated into the UI", for example, he "cannot see if backups succeeded" or whether they have been rolled back to via the UI.
-
-#### Onboarding
-It's Matthieu's responsibility to get teams across his organization up and running with GitLab. He explains that whilst many teams might be leveraging GitLab, they are:
-
->"..not aware of GitLab's powerful CI or our omnibus install of Mattermost...It would be nice to have a tutorial type walkthrough available when a new user logs in on how to get started with all these features. AutoDevOps may solve some of this, but GitLab has many powerful features wrapped up into it and some [teams] may just think that it is only a Git repo similar to GitHub."
-
-
-He states that there has been: "a sluggishness of others to adapt" and it's "a low-effort adaptation at that."
-
-### Goals
-* To save time. One of the reasons Matthieu moved his company to GitLab was to reduce the effort it took him to manage and configure multiple tools, thus saving him time. He has to balance his day job in addition to managing the company's GitLab installation and onboarding new teams to GitLab.
-* To use a platform which is easy to manage. Matthieu isn't a Systems Administrator, and when updating GitLab, creating backups, etc. He would prefer to work within GitLab's UI. Explanations / guided instructions when configuring settings in GitLab's interface would really help Matthieu. He needs reassurance that what he is about to change is
-
-- The right setting.
-- Will provide him with the desired result he wants.
-
-* Matthieu needs to educate his colleagues about GitLab. Matthieu's colleagues won't adopt GitLab as they're unaware of its capabilities and the positive impact it could have on their work. Matthieu needs support in getting this message across to them.
-
----
-
-## James Mackey
-- Medium to large size organizations using CE or EE
-- Small organizations using EE
-
-![james-mackey.png](img/james-mackey.png)
-
-### Demographics
-
-**Age**
-
-36 years old
-
-**Location**
-
-US
-
-**Education**
-
-Masters degree in Computer Science
-
-**Occupation**
-
-Full-stack web developer
-
-**Programming experience**
-
-Over 10 years
-
-**Frequently used programming languages**
-
-JavaScript, SQL, Node.js, Java, PHP, Python
-
-**Hobbies / interests**
-
-DevOps, open source, web development, science, automation, and electronics.
-
-### Motivations
-James works for a research company which currently hires around 800 staff. He began using GitLab.com back in 2013 for his own open source, hobby projects and loved "the simplicity of installation, administration and use". After using GitLab for over a year, he began to wonder about using it at work. James explains:
-
->"We first installed the CE edition...on a staging server for a PoC and asked a beta team to use it, specifically for the Merge Request features. Soon other teams began asking us to be beta users too because the team that was already using GitLab was really enjoying it."
-
-
-James and his colleagues also reviewed competitor products including GitHub Enterprise, but they found it "less innovative and with considerable costs...GitLab had the features we wanted at a much lower cost per head than GitHub".
-
-The company James works for provides employees with a discretionary budget to spend how they want on software, so James and his team decided to upgrade to EE.
-
-James feels partially responsible for his organization's decision to start using GitLab.
-
->"It's still up to the teams themselves [to decide] which tools to use. We just had a great experience moving our daily development to GitLab, so other teams have followed the path or are thinking about switching."
-
-
-### Frustrations
-#### Third Party Integration
-Some of GitLab EE's features are too basic, in particular, issues boards which do not have the level of reporting that James and his team need. Subsequently, they still need to use GitLab EE in conjunction with other tools, such as JIRA. Whilst James feels it isn't essential for GitLab to meet all his needs (his company are happy for him to use, and pay for, multiple tools), he sometimes isn't sure what is/isn't possible with plugins and what level of custom development he and his team will need to do.
-
-#### UX/UI
-James and his team use CI quite heavily for several projects. Whilst they've welcomed improvements to the builds and pipelines interface, they still have some difficulty following build process on the different tabs under Pipelines. Some confusion has arisen from not knowing where to find different pieces of information or how to get to the next stages logs from the current stage's log output screen. They feel more intuitive linking and flow may alleviate the problem. Generally, they feel GitLab's navigation needs to reviewed and optimized.
-
-#### Permissions
->"There is no granular control over user or group permissions. The permissions for a project are too tightly coupled to the permissions for GitLab CI/build pipelines."
-
-
-### Goals
-* To be able to integrate third-party tools easily with GitLab EE and to create custom integrations and patches where needed.
-* To use GitLab EE primarily for code hosting, merge requests, continuous integration and issue management. James and his team want to be able to understand and use these particular features easily.
-* To able to share one instance of GitLab EE with multiple teams across the business. Advanced user management, the ability to separate permissions on different parts of the source code, etc are important to James.
-
----
-
-## Karolina Plaskaty
-- Using GitLab.com for personal/hobby projects
-- Would like to use GitLab at work
-- Working within a medium to large size organization
-
-![karolina-plaskaty.png](img/karolina-plaskaty.png)
-
-### Demographics
-
-**Age**
-
-26 years old
-
-**Location**
-
-UK
-
-**Education**
-
-Self taught
-
-**Occupation**
-
-Junior web-developer
-
-**Programming experience**
-
-6 years
-
-**Frequently used programming languages**
-
-JavaScript and SQL
-
-**Hobbies / interests**
-
-Web development, mobile development, UX, open source, gaming, and travel.
-
-### Motivations
-Karolina has been using GitLab.com for around a year. She roughly spends 8 hours every week programming, of that, 2 hours is spent contributing to open source projects. Karolina contributes to open source projects to gain programming experience and to give back to the community. She likes GitLab.com for its free private repositories and range of features which provide her with everything she needs for her personal projects. Karolina is also a massive fan of GitLab's values and the fact that it isn't a "behemoth of a company". She explains that "displaying every single thing (doc, culture, assumptions, development...) in the open gives me greater confidence to choose GitLab personally and to recommend it at work." She's also an avid reader of GitLab's blog.
-
-Karolina works for a software development company which currently hires around 500 people. Karolina would love to use GitLab at work but the company has used GitHub Enterprise for a number of years. She describes management at her company as "old fashioned" and explains that it's "less of a technical issue and more of a cultural issue" to convince upper management to move to GitLab. Karolina is also relatively new to the company so she's apprehensive about pushing too hard to change version control platforms.
-
-### Frustrations
-#### Unable to use GitLab at work
-Karolina wants to use GitLab at work but isn't sure how to approach the subject with management. In her current role, she doesn't feel that she has the authority to request GitLab.
-
-#### Performance
-GitLab.com is frequently slow and unavailable. Karolina has also heard that GitLab is a "memory hog" which has deterred her from running GitLab on her own machine for just hobby / personal projects.
-
-#### UX/UI
-Karolina has an interest in UX and therefore has strong opinions about how GitLab should look and feel. She feels the interface is cluttered, "it has too many links/buttons" and the navigation "feels a bit weird sometimes. I get lost if I don't pay attention." As Karolina also enjoys contributing to open-source projects, it's important to her that GitLab is well designed for public repositories, she doesn't feel that GitLab currently achieves this.
-### Goals
-* To develop her programming experience and to learn from other developers.
-* To contribute to both her own and other open source projects.
-* To use a fast and intuitive version control platform.
+The content of this documented was moved into the [GitLab Design System](https://design.gitlab.com/).
diff --git a/doc/install/database_mysql.md b/doc/install/database_mysql.md
index 4cb8ca4f3e7..e89846107b6 100644
--- a/doc/install/database_mysql.md
+++ b/doc/install/database_mysql.md
@@ -97,7 +97,7 @@ Follow the below instructions to ensure you use the most up to date requirements
#### Check for InnoDB File-Per-Table Tablespaces
-We need to check, enable and maybe convert your existing GitLab DB tables to the [InnoDB File-Per-Table Tablespaces](http://dev.mysql.com/doc/refman/5.7/en/innodb-multiple-tablespaces.html) as a prerequisite for supporting **utfb8mb4 with long indexes** required by recent GitLab databases.
+We need to check, enable and maybe convert your existing GitLab DB tables to the [InnoDB File-Per-Table Tablespaces](https://dev.mysql.com/doc/refman/5.7/en/innodb-multiple-tablespaces.html) as a prerequisite for supporting **utfb8mb4 with long indexes** required by recent GitLab databases.
# Login to MySQL
mysql -u root -p
@@ -134,7 +134,7 @@ We need to check, enable and maybe convert your existing GitLab DB tables to the
> You need **MySQL 5.5.3 or later** to perform this update.
-Whatever the results of your checks above, we now need to check if your GitLab database has been created using [InnoDB File-Per-Table Tablespaces](http://dev.mysql.com/doc/refman/5.7/en/innodb-multiple-tablespaces.html) (i.e. `innodb_file_per_table` was set to **1** at initial setup time).
+Whatever the results of your checks above, we now need to check if your GitLab database has been created using [InnoDB File-Per-Table Tablespaces](https://dev.mysql.com/doc/refman/5.7/en/innodb-multiple-tablespaces.html) (i.e. `innodb_file_per_table` was set to **1** at initial setup time).
NOTE: **Note:**
This setting is [enabled by default](http://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_file_per_table) since MySQL 5.6.6.
@@ -163,7 +163,7 @@ Now, if you have a **different result** returned by the 2 commands above, it mea
- **Case 2: a result equals to "0" OR not the same result for both commands**
-Unfortunately, none or only some of your GitLab database tables use the GitLab requirement of [InnoDB File-Per-Table Tablespaces](http://dev.mysql.com/doc/refman/5.7/en/innodb-multiple-tablespaces.html).
+Unfortunately, none or only some of your GitLab database tables use the GitLab requirement of [InnoDB File-Per-Table Tablespaces](https://dev.mysql.com/doc/refman/5.7/en/innodb-multiple-tablespaces.html).
Let's enable what we need on the running server:
@@ -297,8 +297,7 @@ GitLab database to `longtext` columns, which can persist values of up to 4GB
(sometimes less if the value contains multibyte characters).
Details can be found in the [PostgreSQL][postgres-text-type] and
-[MySQL][mysql-text-types] manuals.
+[MySQL](https://dev.mysql.com/doc/refman/5.7/en/string-type-overview.html) manuals.
[postgres-text-type]: http://www.postgresql.org/docs/9.2/static/datatype-character.html
-[mysql-text-types]: http://dev.mysql.com/doc/refman/5.7/en/string-type-overview.html
[ce-38152]: https://gitlab.com/gitlab-org/gitlab-ce/issues/38152
diff --git a/doc/install/installation.md b/doc/install/installation.md
index cac97b63d92..06293b8caf5 100644
--- a/doc/install/installation.md
+++ b/doc/install/installation.md
@@ -79,7 +79,7 @@ Make sure you have the right version of Git installed
# Install Git
sudo apt-get install -y git-core
- # Make sure Git is version 2.9.5 or higher
+ # Make sure Git is version 2.18.0 or higher
git --version
Is the system packaged Git too old? Remove it and compile from source.
diff --git a/doc/integration/shibboleth.md b/doc/integration/shibboleth.md
index 41fa63ae6f2..616f3a76b2c 100644
--- a/doc/integration/shibboleth.md
+++ b/doc/integration/shibboleth.md
@@ -4,92 +4,95 @@ This documentation is for enabling shibboleth with omnibus-gitlab package.
In order to enable Shibboleth support in gitlab we need to use Apache instead of Nginx (It may be possible to use Nginx, however this is difficult to configure using the bundled Nginx provided in the omnibus-gitlab package). Apache uses mod_shib2 module for shibboleth authentication and can pass attributes as headers to omniauth-shibboleth provider.
-
-To enable the Shibboleth OmniAuth provider you must:
-
-1. Configure Apache shibboleth module. Installation and configuration of module it self is out of scope of this document.
-Check https://wiki.shibboleth.net/ for more info.
-
-1. You can find Apache config in gitlab-recipes (https://gitlab.com/gitlab-org/gitlab-recipes/tree/master/web-server/apache)
-
-Following changes are needed to enable shibboleth:
-
-protect omniauth-shibboleth callback URL:
-```
- <Location /users/auth/shibboleth/callback>
- AuthType shibboleth
- ShibRequestSetting requireSession 1
- ShibUseHeaders On
- require valid-user
- </Location>
-
- Alias /shibboleth-sp /usr/share/shibboleth
- <Location /shibboleth-sp>
- Satisfy any
- </Location>
-
- <Location /Shibboleth.sso>
- SetHandler shib
- </Location>
-```
-exclude shibboleth URLs from rewriting, add "RewriteCond %{REQUEST_URI} !/Shibboleth.sso" and "RewriteCond %{REQUEST_URI} !/shibboleth-sp", config should look like this:
-```
- # Apache equivalent of Nginx try files
- RewriteEngine on
- RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
- RewriteCond %{REQUEST_URI} !/Shibboleth.sso
- RewriteCond %{REQUEST_URI} !/shibboleth-sp
- RewriteRule .* http://127.0.0.1:8080%{REQUEST_URI} [P,QSA]
- RequestHeader set X_FORWARDED_PROTO 'https'
-```
-
-1. Edit /etc/gitlab/gitlab.rb configuration file to enable OmniAuth and add
-Shibboleth as an OmniAuth provider. User attributes will be sent from the
-Apache reverse proxy to GitLab as headers with the names from the Shibboleth
-attribute mapping. Therefore the values of the `args` hash
-should be in the form of `"HTTP_ATTRIBUTE"`. The keys in the hash are arguments
-to the [OmniAuth::Strategies::Shibboleth class](https://github.com/toyokazu/omniauth-shibboleth/blob/master/lib/omniauth/strategies/shibboleth.rb)
-and are documented by the [omniauth-shibboleth gem](https://github.com/toyokazu/omniauth-shibboleth)
-(take care to note the version of the gem packaged with GitLab). If some of
-your users appear to be authenticated by Shibboleth and Apache, but GitLab
-rejects their account with a URI that contains "e-mail is invalid" then your
-Shibboleth Identity Provider or Attribute Authority may be asserting multiple
-e-mail addresses. In this instance, you might consider setting the
-`multi_values` argument to `first`.
-
-File should look like this:
-```
-external_url 'https://gitlab.example.com'
-gitlab_rails['internal_api_url'] = 'https://gitlab.example.com'
-
-# disable Nginx
-nginx['enable'] = false
-
-gitlab_rails['omniauth_allow_single_sign_on'] = true
-gitlab_rails['omniauth_block_auto_created_users'] = false
-gitlab_rails['omniauth_enabled'] = true
-gitlab_rails['omniauth_providers'] = [
- {
- "name" => "'shibboleth"',
- "label" => "Text for Login Button",
- "args" => {
- "shib_session_id_field" => "HTTP_SHIB_SESSION_ID",
- "shib_application_id_field" => "HTTP_SHIB_APPLICATION_ID",
- "uid_field" => 'HTTP_EPPN',
- "name_field" => 'HTTP_CN',
- "info_fields" => { "email" => 'HTTP_MAIL'}
- }
- }
-]
-
-```
-
-1. [Reconfigure][] or [restart GitLab][] for the changes to take effect if you
+To enable the Shibboleth OmniAuth provider you must configure Apache shibboleth module.
+Installation and configuration of module it self is out of scope of this document.
+Check <https://wiki.shibboleth.net/> for more info.
+
+You can find Apache config in gitlab-recipes (<https://gitlab.com/gitlab-org/gitlab-recipes/tree/master/web-server/apache>).
+
+The following changes are needed to enable Shibboleth:
+
+1. Protect omniauth-shibboleth callback URL:
+
+ ```
+ <Location /users/auth/shibboleth/callback>
+ AuthType shibboleth
+ ShibRequestSetting requireSession 1
+ ShibUseHeaders On
+ require valid-user
+ </Location>
+
+ Alias /shibboleth-sp /usr/share/shibboleth
+ <Location /shibboleth-sp>
+ Satisfy any
+ </Location>
+
+ <Location /Shibboleth.sso>
+ SetHandler shib
+ </Location>
+ ```
+
+1. Exclude shibboleth URLs from rewriting. Add `RewriteCond %{REQUEST_URI} !/Shibboleth.sso` and `RewriteCond %{REQUEST_URI} !/shibboleth-sp`. Config should look like this:
+
+ ```
+ # Apache equivalent of Nginx try files
+ RewriteEngine on
+ RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
+ RewriteCond %{REQUEST_URI} !/Shibboleth.sso
+ RewriteCond %{REQUEST_URI} !/shibboleth-sp
+ RewriteRule .* http://127.0.0.1:8080%{REQUEST_URI} [P,QSA]
+ RequestHeader set X_FORWARDED_PROTO 'https'
+ ```
+
+1. Edit `/etc/gitlab/gitlab.rb` configuration file to enable OmniAuth and add
+ Shibboleth as an OmniAuth provider. User attributes will be sent from the
+ Apache reverse proxy to GitLab as headers with the names from the Shibboleth
+ attribute mapping. Therefore the values of the `args` hash
+ should be in the form of `"HTTP_ATTRIBUTE"`. The keys in the hash are arguments
+ to the [OmniAuth::Strategies::Shibboleth class](https://github.com/toyokazu/omniauth-shibboleth/blob/master/lib/omniauth/strategies/shibboleth.rb)
+ and are documented by the [omniauth-shibboleth gem](https://github.com/toyokazu/omniauth-shibboleth)
+ (take care to note the version of the gem packaged with GitLab). If some of
+ your users appear to be authenticated by Shibboleth and Apache, but GitLab
+ rejects their account with a URI that contains "e-mail is invalid" then your
+ Shibboleth Identity Provider or Attribute Authority may be asserting multiple
+ e-mail addresses. In this instance, you might consider setting the
+ `multi_values` argument to `first`.
+
+ The file should look like this:
+
+ ```
+ external_url 'https://gitlab.example.com'
+ gitlab_rails['internal_api_url'] = 'https://gitlab.example.com'
+
+ # disable Nginx
+ nginx['enable'] = false
+
+ gitlab_rails['omniauth_allow_single_sign_on'] = true
+ gitlab_rails['omniauth_block_auto_created_users'] = false
+ gitlab_rails['omniauth_enabled'] = true
+ gitlab_rails['omniauth_providers'] = [
+ {
+ "name" => "'shibboleth"',
+ "label" => "Text for Login Button",
+ "args" => {
+ "shib_session_id_field" => "HTTP_SHIB_SESSION_ID",
+ "shib_application_id_field" => "HTTP_SHIB_APPLICATION_ID",
+ "uid_field" => 'HTTP_EPPN',
+ "name_field" => 'HTTP_CN',
+ "info_fields" => { "email" => 'HTTP_MAIL'}
+ }
+ }
+ ]
+
+ ```
+
+1. [Reconfigure](../administration/restart_gitlab.md#omnibus-gitlab-reconfigure) or [restart](../administration/restart_gitlab.md#installations-from-source) GitLab for the changes to take effect if you
installed GitLab via Omnibus or from source respectively.
-On the sign in page there should now be a "Sign in with: Shibboleth" icon below the regular sign in form. Click the icon to begin the authentication process. You will be redirected to IdP server (Depends on your Shibboleth module configuration). If everything goes well the user will be returned to GitLab and will be signed in.
+On the sign in page, there should now be a "Sign in with: Shibboleth" icon below the regular sign in form. Click the icon to begin the authentication process. You will be redirected to IdP server (depends on your Shibboleth module configuration). If everything goes well the user will be returned to GitLab and will be signed in.
## Apache 2.4 / GitLab 8.6 update
+
The order of the first 2 Location directives is important. If they are reversed,
you will not get a shibboleth session!
@@ -135,6 +138,3 @@ you will not get a shibboleth session!
RequestHeader set X_FORWARDED_PROTO 'https'
RequestHeader set X-Forwarded-Ssl on
```
-
-[reconfigure]: ../administration/restart_gitlab.md#omnibus-gitlab-reconfigure
-[restart GitLab]: ../administration/restart_gitlab.md#installations-from-source
diff --git a/doc/ssh/README.md b/doc/ssh/README.md
index c5b7813b285..9114b8d8417 100644
--- a/doc/ssh/README.md
+++ b/doc/ssh/README.md
@@ -30,7 +30,7 @@ clients at your disposal.
### Installing the SSH client for Windows 8.1 and Windows 7
The easiest way to install Git and the SSH client on Windows 8.1 and Windows 7
-is [Git for Windows](https://gitforwindows.com). It provides a BASH
+is [Git for Windows](https://gitforwindows.org). It provides a BASH
emulation (Git Bash) used for running Git from the command line and the
`ssh-keygen` command that is useful to create SSH keys as you'll learn below.
diff --git a/doc/update/6.x-or-7.x-to-7.14.md b/doc/update/6.x-or-7.x-to-7.14.md
index 41d0e78b7d8..61854b91aa2 100644
--- a/doc/update/6.x-or-7.x-to-7.14.md
+++ b/doc/update/6.x-or-7.x-to-7.14.md
@@ -20,7 +20,7 @@ database migrations for GitLab 7.2.
## Stash changes
-If you [deleted the vendors folder during your original installation](https://github.com/gitlabhq/gitlabhq/issues/4883#issuecomment-31108431), [you will get an error](https://gitlab.com/gitlab-org/gitlab-ce/issues/1494) when you attempt to rebuild the assets in step 7. To avoid this, stash the changes in your GitLab working copy before starting:
+If you deleted the vendors folder during your original installation, [you will get an error](https://gitlab.com/gitlab-org/gitlab-ce/issues/1494) when you attempt to rebuild the assets in step 7. To avoid this, stash the changes in your GitLab working copy before starting:
git stash
diff --git a/doc/user/discussions/img/index_notes_filters.png b/doc/user/discussions/img/index_notes_filters.png
new file mode 100644
index 00000000000..977a3770c05
--- /dev/null
+++ b/doc/user/discussions/img/index_notes_filters.png
Binary files differ
diff --git a/doc/user/discussions/index.md b/doc/user/discussions/index.md
index 097b18ad496..0f89d261ff6 100644
--- a/doc/user/discussions/index.md
+++ b/doc/user/discussions/index.md
@@ -273,6 +273,26 @@ edit existing comments. Non-team members are restricted from adding or editing c
Additionally locked issues can not be reopened.
+## Filtering notes
+
+> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/issues/26723) in GitLab 11.5.
+
+For issues with many comments like activity notes and user comments, sometimes
+finding useful information can be hard. There is a way to filter comments from single notes and discussions for merge requests and issues.
+
+From a merge request's **Discussion** tab, or from an issue overview, find the filter's dropdown menu on the right side of the page, from which you can choose one of the following options:
+
+- **Show all activity**: displays all user comments and system notes
+(issue updates, mentions from other issues, changes to the description, etc).
+- **Show comments only**: only displays user comments in the list.
+- **Show history only**: only displays activity notes.
+
+![Notes filters dropdown options](img/index_notes_filters.png)
+
+Once you select one of the filters in a given issue or MR, GitLab will save
+your preference, so that it will persist when you visit the same page again
+from any device you're logged into.
+
[ce-5022]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5022
[ce-7125]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7125
[ce-7527]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7527
diff --git a/doc/user/project/integrations/discord_notifications.md b/doc/user/project/integrations/discord_notifications.md
index e157f5cc106..cb98105e0c0 100644
--- a/doc/user/project/integrations/discord_notifications.md
+++ b/doc/user/project/integrations/discord_notifications.md
@@ -1,6 +1,6 @@
# Discord Notifications service
-> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/22684) in GitLab 11.5.
+> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/22684) in GitLab 11.6.
The Discord Notifications service sends event notifications from GitLab to the channel for which the webhook was created.
diff --git a/doc/user/project/merge_requests/index.md b/doc/user/project/merge_requests/index.md
index a0e7c1c99d5..5b54b6ecdd5 100644
--- a/doc/user/project/merge_requests/index.md
+++ b/doc/user/project/merge_requests/index.md
@@ -9,7 +9,7 @@ collaborate with other people on the same project.
A Merge Request (**MR**) is the basis of GitLab as a code collaboration
and version control platform.
-Is it simple as the name implies: a _request_ to _merge_ one branch into another.
+It is as simple as the name implies: a _request_ to _merge_ one branch into another.
With GitLab merge requests, you can:
diff --git a/doc/workflow/repository_mirroring.md b/doc/workflow/repository_mirroring.md
index 7eb324e3ece..e259e6fe50c 100644
--- a/doc/workflow/repository_mirroring.md
+++ b/doc/workflow/repository_mirroring.md
@@ -396,4 +396,4 @@ settings are recommended:
- `unknown_git` user will be used as the commit author if the GitLab user does not exist in
Perforce Helix.
-Read about [Git Fusion settings on Perforce.com](https://www.perforce.com/perforce/doc.current/manuals/git-fusion/Content/Git-Fusion/section_zdp_zz1_3l.html).
+Read about [Git Fusion settings on Perforce.com](https://www.perforce.com/perforce/doc.current/manuals/git-fusion/Content/Git-Fusion/section_vss_bdw_w3.html#section_zdp_zz1_3l).
diff --git a/generator_templates/active_record/migration/create_table_migration.rb b/generator_templates/active_record/migration/create_table_migration.rb
index 92e963911d0..4a6bea2796c 100644
--- a/generator_templates/active_record/migration/create_table_migration.rb
+++ b/generator_templates/active_record/migration/create_table_migration.rb
@@ -3,7 +3,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class <%= migration_class_name %> < ActiveRecord::Migration
+class <%= migration_class_name %> < ActiveRecord::Migration[<%= ActiveRecord::Migration.current_version %>]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/generator_templates/active_record/migration/migration.rb b/generator_templates/active_record/migration/migration.rb
index 38edab82550..153280cd4b7 100644
--- a/generator_templates/active_record/migration/migration.rb
+++ b/generator_templates/active_record/migration/migration.rb
@@ -3,7 +3,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class <%= migration_class_name %> < ActiveRecord::Migration
+class <%= migration_class_name %> < ActiveRecord::Migration[<%= ActiveRecord::Migration.current_version %>]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
diff --git a/generator_templates/rails/post_deployment_migration/migration.rb b/generator_templates/rails/post_deployment_migration/migration.rb
index 353709f7c9c..4c1685545b5 100644
--- a/generator_templates/rails/post_deployment_migration/migration.rb
+++ b/generator_templates/rails/post_deployment_migration/migration.rb
@@ -3,7 +3,7 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class <%= migration_class_name %> < ActiveRecord::Migration
+class <%= migration_class_name %> < ActiveRecord::Migration[<%= ActiveRecord::Migration.current_version %>]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
diff --git a/lib/gitlab/ci/status/build/scheduled.rb b/lib/gitlab/ci/status/build/scheduled.rb
index b3452eae189..0a09dbe5f42 100644
--- a/lib/gitlab/ci/status/build/scheduled.rb
+++ b/lib/gitlab/ci/status/build/scheduled.rb
@@ -10,7 +10,7 @@ module Gitlab
image: 'illustrations/illustrations_scheduled-job_countdown.svg',
size: 'svg-394',
title: _("This is a delayed job to run in %{remainingTime}"),
- content: _("This job will automatically run after it's timer finishes. " \
+ content: _("This job will automatically run after its timer finishes. " \
"Often they are used for incremental roll-out deploys " \
"to production environments. When unscheduled it converts " \
"into a manual action.")
diff --git a/lib/gitlab/gfm/uploads_rewriter.rb b/lib/gitlab/gfm/uploads_rewriter.rb
index 3f06badf5d9..2d1c9ac40ae 100644
--- a/lib/gitlab/gfm/uploads_rewriter.rb
+++ b/lib/gitlab/gfm/uploads_rewriter.rb
@@ -8,7 +8,7 @@ module Gitlab
# Class that rewrites markdown links for uploads
#
# Using a pattern defined in `FileUploader` it copies files to a new
- # project and rewrites all links to uploads in in a given text.
+ # project and rewrites all links to uploads in a given text.
#
#
class UploadsRewriter
diff --git a/lib/gitlab/git/blob.rb b/lib/gitlab/git/blob.rb
index 9dd1c484d59..2d25389594e 100644
--- a/lib/gitlab/git/blob.rb
+++ b/lib/gitlab/git/blob.rb
@@ -1,7 +1,5 @@
# frozen_string_literal: true
-# Gitaly note: JV: seems to be completely migrated (behind feature flags).
-
module Gitlab
module Git
class Blob
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb
index 993955d1a6b..067f4026f48 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -441,7 +441,7 @@ module Gitlab
gitaly_ref_client.find_ref_name(sha, ref_path)
end
- # Get refs hash which key is is the commit id
+ # Get refs hash which key is the commit id
# and value is a Gitlab::Git::Tag or Gitlab::Git::Branch
# Note that both inherit from Gitlab::Git::Ref
def refs_hash
@@ -885,12 +885,6 @@ module Gitlab
Gitlab::GitalyClient::ConflictsService.new(self, our_commit_oid, their_commit_oid)
end
- def gitaly_migrate(method, status: Gitlab::GitalyClient::MigrationStatus::OPT_IN, &block)
- wrapped_gitaly_errors do
- Gitlab::GitalyClient.migrate(method, status: status, &block)
- end
- end
-
def clean_stale_repository_files
wrapped_gitaly_errors do
gitaly_repository_client.cleanup if exists?
diff --git a/lib/gitlab/gitaly_client.rb b/lib/gitlab/gitaly_client.rb
index 8b455dc7696..9be553a8b86 100644
--- a/lib/gitlab/gitaly_client.rb
+++ b/lib/gitlab/gitaly_client.rb
@@ -9,11 +9,6 @@ require 'grpc/health/v1/health_services_pb'
module Gitlab
module GitalyClient
include Gitlab::Metrics::Methods
- module MigrationStatus
- DISABLED = 1
- OPT_IN = 2
- OPT_OUT = 3
- end
class TooManyInvocationsError < StandardError
attr_reader :call_site, :invocation_count, :max_call_stack
@@ -31,7 +26,7 @@ module Gitlab
end
end
- SERVER_VERSION_FILE = 'GITALY_SERVER_VERSION'.freeze
+ SERVER_VERSION_FILE = 'GITALY_SERVER_VERSION'
MAXIMUM_GITALY_CALLS = 35
CLIENT_NAME = (Sidekiq.server? ? 'gitlab-sidekiq' : 'gitlab-web').freeze
@@ -43,11 +38,6 @@ module Gitlab
self.query_time = 0
- define_histogram :gitaly_migrate_call_duration_seconds do
- docstring "Gitaly migration call execution timings"
- base_labels gitaly_enabled: nil, feature: nil
- end
-
define_histogram :gitaly_controller_action_duration_seconds do
docstring "Gitaly endpoint histogram by controller and action combination"
base_labels Gitlab::Metrics::Transaction::BASE_LABELS.merge(gitaly_service: nil, rpc: nil)
@@ -126,7 +116,6 @@ module Gitlab
def self.call(storage, service, rpc, request, remote_storage: nil, timeout: nil)
start = Gitlab::Metrics::System.monotonic_time
request_hash = request.is_a?(Google::Protobuf::MessageExts) ? request.to_h : {}
- @current_call_id ||= SecureRandom.uuid
enforce_gitaly_request_limits(:call)
@@ -145,9 +134,7 @@ module Gitlab
current_transaction_labels.merge(gitaly_service: service.to_s, rpc: rpc.to_s),
duration)
- add_call_details(id: @current_call_id, feature: service, duration: duration, request: request_hash)
-
- @current_call_id = nil
+ add_call_details(feature: "#{service}##{rpc}", duration: duration, request: request_hash, rpc: rpc)
end
def self.handle_grpc_unavailable!(ex)
@@ -222,7 +209,7 @@ module Gitlab
result
end
- SERVER_FEATURE_FLAGS = %w[gogit_findcommit].freeze
+ SERVER_FEATURE_FLAGS = %w[].freeze
def self.server_feature_flags
SERVER_FEATURE_FLAGS.map do |f|
@@ -237,82 +224,8 @@ module Gitlab
params['gitaly_token'].presence || Gitlab.config.gitaly['token']
end
- # Evaluates whether a feature toggle is on or off
- def self.feature_enabled?(feature_name, status: MigrationStatus::OPT_IN)
- # Disabled features are always off!
- return false if status == MigrationStatus::DISABLED
-
- feature = Feature.get("gitaly_#{feature_name}")
-
- # If the feature has been set, always evaluate
- if Feature.persisted?(feature)
- if feature.percentage_of_time_value > 0
- # Probabilistically enable this feature
- return Random.rand() * 100 < feature.percentage_of_time_value
- end
-
- return feature.enabled?
- end
-
- # If the feature has not been set, the default depends
- # on it's status
- case status
- when MigrationStatus::OPT_OUT
- true
- when MigrationStatus::OPT_IN
- opt_into_all_features? && !explicit_opt_in_required.include?(feature_name)
- else
- false
- end
- rescue => ex
- # During application startup feature lookups in SQL can fail
- Rails.logger.warn "exception while checking Gitaly feature status for #{feature_name}: #{ex}"
- false
- end
-
- # We have a mechanism to let GitLab automatically opt in to all Gitaly
- # features. We want to be able to exclude some features from automatic
- # opt-in. This function has an override in EE.
- def self.explicit_opt_in_required
- []
- end
-
- # opt_into_all_features? returns true when the current environment
- # is one in which we opt into features automatically
- def self.opt_into_all_features?
- Rails.env.development? || ENV["GITALY_FEATURE_DEFAULT_ON"] == "1"
- end
- private_class_method :opt_into_all_features?
-
- def self.migrate(feature, status: MigrationStatus::OPT_IN)
- # Enforce limits at both the `migrate` and `call` sites to ensure that
- # problems are not hidden by a feature being disabled
- enforce_gitaly_request_limits(:migrate)
-
- is_enabled = feature_enabled?(feature, status: status)
- metric_name = feature.to_s
- metric_name += "_gitaly" if is_enabled
-
- Gitlab::Metrics.measure(metric_name) do
- # Some migrate calls wrap other migrate calls
- allow_n_plus_1_calls do
- feature_stack = Thread.current[:gitaly_feature_stack] ||= []
- feature_stack.unshift(feature)
- begin
- start = Gitlab::Metrics::System.monotonic_time
- @current_call_id = SecureRandom.uuid
- call_details = { id: @current_call_id }
- yield is_enabled
- ensure
- total_time = Gitlab::Metrics::System.monotonic_time - start
- gitaly_migrate_call_duration_seconds.observe({ gitaly_enabled: is_enabled, feature: feature }, total_time)
- feature_stack.shift
- Thread.current[:gitaly_feature_stack] = nil if feature_stack.empty?
-
- add_call_details(call_details.merge(feature: feature, duration: total_time))
- end
- end
- end
+ def self.feature_enabled?(feature_name)
+ Feature.enabled?("gitaly_#{feature_name}")
end
# Ensures that Gitaly is not being abuse through n+1 misuse etc
@@ -368,48 +281,29 @@ module Gitlab
end
private_class_method :decrement_call_count
- # Returns an estimate of the number of Gitaly calls made for this
- # request
+ # Returns the of the number of Gitaly calls made for this request
def self.get_request_count
- return 0 unless Gitlab::SafeRequestStore.active?
-
- gitaly_migrate_count = get_call_count("gitaly_migrate_actual")
- gitaly_call_count = get_call_count("gitaly_call_actual")
-
- # Using the maximum of migrate and call_count will provide an
- # indicator of how many Gitaly calls will be made, even
- # before a feature is enabled. This provides us with a single
- # metric, but not an exact number, but this tradeoff is acceptable
- if gitaly_migrate_count > gitaly_call_count
- gitaly_migrate_count
- else
- gitaly_call_count
- end
+ get_call_count("gitaly_call_actual")
end
def self.reset_counts
return unless Gitlab::SafeRequestStore.active?
- %w[migrate call].each do |call_site|
- Gitlab::SafeRequestStore["gitaly_#{call_site}_actual"] = 0
- Gitlab::SafeRequestStore["gitaly_#{call_site}_permitted"] = 0
- end
+ Gitlab::SafeRequestStore["gitaly_call_actual"] = 0
+ Gitlab::SafeRequestStore["gitaly_call_permitted"] = 0
end
def self.add_call_details(details)
- id = details.delete(:id)
-
- return unless id && Gitlab::SafeRequestStore[:peek_enabled]
+ return unless Gitlab::SafeRequestStore[:peek_enabled]
- Gitlab::SafeRequestStore['gitaly_call_details'] ||= {}
- Gitlab::SafeRequestStore['gitaly_call_details'][id] ||= {}
- Gitlab::SafeRequestStore['gitaly_call_details'][id].merge!(details)
+ Gitlab::SafeRequestStore['gitaly_call_details'] ||= []
+ Gitlab::SafeRequestStore['gitaly_call_details'] << details
end
def self.list_call_details
- return {} unless Gitlab::SafeRequestStore[:peek_enabled]
+ return [] unless Gitlab::SafeRequestStore[:peek_enabled]
- Gitlab::SafeRequestStore['gitaly_call_details'] || {}
+ Gitlab::SafeRequestStore['gitaly_call_details'] || []
end
def self.expected_server_version
diff --git a/lib/gitlab/i18n/po_linter.rb b/lib/gitlab/i18n/po_linter.rb
index 644ef8c8589..3e9a035010f 100644
--- a/lib/gitlab/i18n/po_linter.rb
+++ b/lib/gitlab/i18n/po_linter.rb
@@ -251,7 +251,7 @@ module Gitlab
def validate_variable_usage(errors, translation, required_variables)
# We don't need to validate when the message is empty.
- # In this case we fall back to the default, which has all the the
+ # In this case we fall back to the default, which has all the
# required variables.
return if translation.empty?
diff --git a/lib/gitlab/import/merge_request_creator.rb b/lib/gitlab/import/merge_request_creator.rb
index a01951b0762..8291372bba9 100644
--- a/lib/gitlab/import/merge_request_creator.rb
+++ b/lib/gitlab/import/merge_request_creator.rb
@@ -6,10 +6,10 @@
# used for rendering Markdown) are completely unnecessary and may even lead to
# transaction timeouts.
#
-# To ensure importing merge requests requests has a minimal impact and can
-# complete in a reasonable time we bypass all the hooks by inserting the row
-# and then retrieving it. We then only perform the additional work that is
-# strictly necessary.
+# To ensure importing merge requests has a minimal impact and can complete in
+# a reasonable time we bypass all the hooks by inserting the row and then
+# retrieving it. We then only perform the additional work that is strictly
+# necessary.
module Gitlab
module Import
class MergeRequestCreator
diff --git a/lib/peek/views/gitaly.rb b/lib/peek/views/gitaly.rb
index 860963ef94f..30f95a10024 100644
--- a/lib/peek/views/gitaly.rb
+++ b/lib/peek/views/gitaly.rb
@@ -23,7 +23,6 @@ module Peek
def details
::Gitlab::GitalyClient.list_call_details
- .values
.sort { |a, b| b[:duration] <=> a[:duration] }
.map(&method(:format_call_details))
end
diff --git a/lib/rails4_migration_version.rb b/lib/rails4_migration_version.rb
new file mode 100644
index 00000000000..ae48734dfad
--- /dev/null
+++ b/lib/rails4_migration_version.rb
@@ -0,0 +1,16 @@
+# rubocop:disable Naming/FileName
+# frozen_string_literal: true
+
+# When switching to rails 5, we added migration version to all migration
+# classes. This patch makes it possible to run versioned migrations
+# also with rails 4
+
+unless Gitlab.rails5?
+ module ActiveRecord
+ class Migration
+ def self.[](version)
+ Migration
+ end
+ end
+ end
+end
diff --git a/lib/system_check/app/git_version_check.rb b/lib/system_check/app/git_version_check.rb
index 994af3ab53e..7c3e7759dd0 100644
--- a/lib/system_check/app/git_version_check.rb
+++ b/lib/system_check/app/git_version_check.rb
@@ -7,7 +7,7 @@ module SystemCheck
set_check_pass -> { "yes (#{self.current_version})" }
def self.required_version
- @required_version ||= Gitlab::VersionInfo.new(2, 9, 5)
+ @required_version ||= Gitlab::VersionInfo.parse('2.18.0')
end
def self.current_version
diff --git a/lib/system_check/app/ruby_version_check.rb b/lib/system_check/app/ruby_version_check.rb
index d73c39f2c3f..60e07718338 100644
--- a/lib/system_check/app/ruby_version_check.rb
+++ b/lib/system_check/app/ruby_version_check.rb
@@ -11,7 +11,7 @@ module SystemCheck
end
def self.current_version
- @current_version ||= Gitlab::VersionInfo.parse(Gitlab::TaskHelpers.run_command(%w(ruby --version)))
+ @current_version ||= Gitlab::VersionInfo.parse(RUBY_VERSION)
end
def check?
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 15d18e6691f..ff4fd0c8aec 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -498,34 +498,7 @@ msgstr ""
msgid "An error has occurred"
msgstr ""
-msgid "An error occured creating the new branch."
-msgstr ""
-
-msgid "An error occured whilst fetching the job trace."
-msgstr ""
-
-msgid "An error occured whilst fetching the latest pipeline."
-msgstr ""
-
-msgid "An error occured whilst loading all the files."
-msgstr ""
-
-msgid "An error occured whilst loading the file content."
-msgstr ""
-
-msgid "An error occured whilst loading the file."
-msgstr ""
-
-msgid "An error occured whilst loading the merge request changes."
-msgstr ""
-
-msgid "An error occured whilst loading the merge request version data."
-msgstr ""
-
-msgid "An error occured whilst loading the merge request."
-msgstr ""
-
-msgid "An error occured whilst loading the pipelines jobs."
+msgid "An error occurred creating the new branch."
msgstr ""
msgid "An error occurred previewing the blob"
@@ -603,6 +576,33 @@ msgstr ""
msgid "An error occurred while validating username"
msgstr ""
+msgid "An error occurred whilst fetching the job trace."
+msgstr ""
+
+msgid "An error occurred whilst fetching the latest pipeline."
+msgstr ""
+
+msgid "An error occurred whilst loading all the files."
+msgstr ""
+
+msgid "An error occurred whilst loading the file content."
+msgstr ""
+
+msgid "An error occurred whilst loading the file."
+msgstr ""
+
+msgid "An error occurred whilst loading the merge request changes."
+msgstr ""
+
+msgid "An error occurred whilst loading the merge request version data."
+msgstr ""
+
+msgid "An error occurred whilst loading the merge request."
+msgstr ""
+
+msgid "An error occurred whilst loading the pipelines jobs."
+msgstr ""
+
msgid "An error occurred. Please try again."
msgstr ""
@@ -1316,7 +1316,7 @@ msgstr ""
msgid "CiVariable|All environments"
msgstr ""
-msgid "CiVariable|Error occured while saving variables"
+msgid "CiVariable|Error occurred while saving variables"
msgstr ""
msgid "CiVariable|Protected"
@@ -1397,13 +1397,13 @@ msgstr ""
msgid "ClusterIntegration|An error occured while trying to fetch project zones: %{error}"
msgstr ""
-msgid "ClusterIntegration|An error occured while trying to fetch your projects: %{error}"
+msgid "ClusterIntegration|An error occurred when trying to contact the Google Cloud API. Please try again later."
msgstr ""
-msgid "ClusterIntegration|An error occured while trying to fetch zone machine types: %{error}"
+msgid "ClusterIntegration|An error occurred while trying to fetch your projects: %{error}"
msgstr ""
-msgid "ClusterIntegration|An error occurred when trying to contact the Google Cloud API. Please try again later."
+msgid "ClusterIntegration|An error occurred while trying to fetch zone machine types: %{error}"
msgstr ""
msgid "ClusterIntegration|Applications"
@@ -4252,12 +4252,6 @@ msgstr ""
msgid "None"
msgstr ""
-msgid "Not all comments are displayed because you're comparing two versions of the diff."
-msgstr ""
-
-msgid "Not all comments are displayed because you're viewing an old version of the diff."
-msgstr ""
-
msgid "Not allowed to merge"
msgstr ""
@@ -4395,9 +4389,6 @@ msgstr ""
msgid "Only admins"
msgstr ""
-msgid "Only comments from the following commit are shown below"
-msgstr ""
-
msgid "Only mirror protected branches"
msgstr ""
@@ -5764,9 +5755,6 @@ msgstr ""
msgid "Show latest version"
msgstr ""
-msgid "Show latest version of the diff"
-msgstr ""
-
msgid "Show parent pages"
msgstr ""
@@ -6446,7 +6434,7 @@ msgstr ""
msgid "This job requires a manual action"
msgstr ""
-msgid "This job will automatically run after it's timer finishes. Often they are used for incremental roll-out deploys to production environments. When unscheduled it converts into a manual action."
+msgid "This job will automatically run after its timer finishes. Often they are used for incremental roll-out deploys to production environments. When unscheduled it converts into a manual action."
msgstr ""
msgid "This means you can not push code until you create an empty repository or import existing one."
@@ -7053,6 +7041,9 @@ msgstr ""
msgid "View the documentation"
msgstr ""
+msgid "Viewing commit"
+msgstr ""
+
msgid "Visibility and access controls"
msgstr ""
diff --git a/qa/Gemfile.lock b/qa/Gemfile.lock
index 8d28fcacc05..d61ecf8fbb5 100644
--- a/qa/Gemfile.lock
+++ b/qa/Gemfile.lock
@@ -56,7 +56,7 @@ GEM
byebug (~> 9.1)
pry (~> 0.10)
public_suffix (3.0.1)
- rack (2.0.3)
+ rack (2.0.6)
rack-test (0.8.2)
rack (>= 1.0, < 3)
rake (12.3.0)
@@ -103,4 +103,4 @@ DEPENDENCIES
selenium-webdriver (~> 3.8.0)
BUNDLED WITH
- 1.16.4
+ 1.17.1
diff --git a/qa/qa/fixtures/auto_devops_rack/Gemfile.lock b/qa/qa/fixtures/auto_devops_rack/Gemfile.lock
index 09cf72c48ac..d44ccbb5e69 100644
--- a/qa/qa/fixtures/auto_devops_rack/Gemfile.lock
+++ b/qa/qa/fixtures/auto_devops_rack/Gemfile.lock
@@ -1,7 +1,7 @@
GEM
remote: https://rubygems.org/
specs:
- rack (2.0.4)
+ rack (2.0.6)
rake (12.3.0)
PLATFORMS
@@ -12,4 +12,4 @@ DEPENDENCIES
rake
BUNDLED WITH
- 1.16.1
+ 1.17.1
diff --git a/qa/qa/runtime/env.rb b/qa/qa/runtime/env.rb
index 1154eaca6a9..0d573859238 100644
--- a/qa/qa/runtime/env.rb
+++ b/qa/qa/runtime/env.rb
@@ -103,6 +103,14 @@ module QA
ENV['GITLAB_SANDBOX_NAME']
end
+ def namespace_name
+ ENV['GITLAB_NAMESPACE_NAME']
+ end
+
+ def auto_devops_project_name
+ ENV['GITLAB_AUTO_DEVOPS_PROJECT_NAME']
+ end
+
def gcloud_account_key
ENV.fetch("GCLOUD_ACCOUNT_KEY")
end
diff --git a/qa/qa/runtime/namespace.rb b/qa/qa/runtime/namespace.rb
index f1c8ef11f94..704c65467e0 100644
--- a/qa/qa/runtime/namespace.rb
+++ b/qa/qa/runtime/namespace.rb
@@ -8,7 +8,7 @@ module QA
end
def name
- "qa-test-#{time.strftime('%Y-%m-%d-%H-%M-%S')}"
+ Runtime::Env.namespace_name || "qa-test-#{time.strftime('%Y-%m-%d-%H-%M-%S')}"
end
def path
diff --git a/qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb b/qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb
index 30ec0665973..b0c277a48c3 100644
--- a/qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb
+++ b/qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb
@@ -16,7 +16,7 @@ module QA
Page::Main::Login.act { sign_in_using_credentials }
project = Resource::Project.fabricate! do |p|
- p.name = 'project-with-autodevops'
+ p.name = Runtime::Env.auto_devops_project_name || 'project-with-autodevops'
p.description = 'Project with Auto Devops'
end
diff --git a/rubocop/cop/safe_params.rb b/rubocop/cop/safe_params.rb
new file mode 100644
index 00000000000..250c16232e4
--- /dev/null
+++ b/rubocop/cop/safe_params.rb
@@ -0,0 +1,34 @@
+# frozen_string_literal: true
+
+module RuboCop
+ module Cop
+ class SafeParams < RuboCop::Cop::Cop
+ MSG = 'Use `safe_params` instead of `params` in url_for.'.freeze
+
+ METHOD_NAME_PATTERN = :url_for
+ UNSAFE_PARAM = :params
+
+ def on_send(node)
+ return unless method_name(node) == METHOD_NAME_PATTERN
+
+ add_offense(node, location: :expression) unless safe_params?(node)
+ end
+
+ private
+
+ def safe_params?(node)
+ node.descendants.each do |param_node|
+ next unless param_node.descendants.empty?
+
+ return false if method_name(param_node) == UNSAFE_PARAM
+ end
+
+ true
+ end
+
+ def method_name(node)
+ node.children[1]
+ end
+ end
+ end
+end
diff --git a/rubocop/rubocop.rb b/rubocop/rubocop.rb
index 6c9b8753c1a..4489159f422 100644
--- a/rubocop/rubocop.rb
+++ b/rubocop/rubocop.rb
@@ -5,6 +5,7 @@ require_relative 'cop/gitlab/httparty'
require_relative 'cop/gitlab/finder_with_find_by'
require_relative 'cop/gitlab/union'
require_relative 'cop/include_sidekiq_worker'
+require_relative 'cop/safe_params'
require_relative 'cop/avoid_return_from_blocks'
require_relative 'cop/avoid_break_from_strong_memoize'
require_relative 'cop/avoid_route_redirect_leading_slash'
diff --git a/scripts/frontend/prettier.js b/scripts/frontend/prettier.js
index ce86a9f4601..ffb09ea9779 100644
--- a/scripts/frontend/prettier.js
+++ b/scripts/frontend/prettier.js
@@ -111,6 +111,6 @@ Promise.all(matchedFiles.map(checkFileWithPrettierConfig))
if (didWarn) process.exit(1);
})
.catch(e => {
- console.log(`\nAn error occured while processing files with prettier: ${e.message}\n`);
+ console.log(`\nAn error occurred while processing files with prettier: ${e.message}\n`);
process.exit(1);
});
diff --git a/scripts/trigger-build b/scripts/trigger-build
index 873c41db456..d02acd01a2a 100755
--- a/scripts/trigger-build
+++ b/scripts/trigger-build
@@ -106,6 +106,7 @@ module Trigger
def extra_variables
{
'GITLAB_VERSION' => ENV['CI_COMMIT_SHA'],
+ 'GITLAB_REF_SLUG' => ENV['CI_COMMIT_REF_SLUG'],
'ALTERNATIVE_SOURCES' => 'true',
'ee' => Trigger.ee? ? 'true' : 'false',
'QA_BRANCH' => ENV['QA_BRANCH'] || 'master'
diff --git a/spec/controllers/projects/blob_controller_spec.rb b/spec/controllers/projects/blob_controller_spec.rb
index 5fdf7f1229d..3c5a21c47fa 100644
--- a/spec/controllers/projects/blob_controller_spec.rb
+++ b/spec/controllers/projects/blob_controller_spec.rb
@@ -152,7 +152,7 @@ describe Projects::BlobController do
expect(match_line['meta_data']).to have_key('new_pos')
end
- it 'does not add top match line when when "since" is equal 1' do
+ it 'does not add top match line when "since" is equal 1' do
do_get(since: 1, to: 10, offset: 10, from_merge_request: true)
match_line = JSON.parse(response.body).first
diff --git a/spec/features/issues/gfm_autocomplete_spec.rb b/spec/features/issues/gfm_autocomplete_spec.rb
index 7c591dacce5..d7531d5fcd9 100644
--- a/spec/features/issues/gfm_autocomplete_spec.rb
+++ b/spec/features/issues/gfm_autocomplete_spec.rb
@@ -9,7 +9,6 @@ describe 'GFM autocomplete', :js do
let(:project) { create(:project) }
let(:label) { create(:label, project: project, title: 'special+') }
let(:issue) { create(:issue, project: project) }
- let!(:project_snippet) { create(:project_snippet, project: project, title: 'code snippet') }
before do
project.add_maintainer(user)
@@ -334,16 +333,57 @@ describe 'GFM autocomplete', :js do
end
end
- it 'shows project snippets' do
- page.within '.timeline-content-form' do
- find('#note-body').native.send_keys('$')
- end
+ shared_examples 'autocomplete suggestions' do
+ it 'suggests objects correctly' do
+ page.within '.timeline-content-form' do
+ find('#note-body').native.send_keys(object.class.reference_prefix)
+ end
+
+ page.within '.atwho-container' do
+ expect(page).to have_content(object.title)
- page.within '.atwho-container' do
- expect(page).to have_content(project_snippet.title)
+ find('ul li').click
+ end
+
+ expect(find('.new-note #note-body').value).to include(expected_body)
end
end
+ context 'issues' do
+ let(:object) { issue }
+ let(:expected_body) { object.to_reference }
+
+ it_behaves_like 'autocomplete suggestions'
+ end
+
+ context 'merge requests' do
+ let(:object) { create(:merge_request, source_project: project) }
+ let(:expected_body) { object.to_reference }
+
+ it_behaves_like 'autocomplete suggestions'
+ end
+
+ context 'project snippets' do
+ let!(:object) { create(:project_snippet, project: project, title: 'code snippet') }
+ let(:expected_body) { object.to_reference }
+
+ it_behaves_like 'autocomplete suggestions'
+ end
+
+ context 'label' do
+ let!(:object) { label }
+ let(:expected_body) { object.title }
+
+ it_behaves_like 'autocomplete suggestions'
+ end
+
+ context 'milestone' do
+ let!(:object) { create(:milestone, project: project) }
+ let(:expected_body) { object.to_reference }
+
+ it_behaves_like 'autocomplete suggestions'
+ end
+
private
def expect_to_wrap(should_wrap, item, note, value)
diff --git a/spec/features/merge_request/user_assigns_themselves_spec.rb b/spec/features/merge_request/user_assigns_themselves_spec.rb
index b6b38186a22..41cc7cef777 100644
--- a/spec/features/merge_request/user_assigns_themselves_spec.rb
+++ b/spec/features/merge_request/user_assigns_themselves_spec.rb
@@ -42,7 +42,7 @@ describe 'Merge request > User assigns themselves' do
visit project_merge_request_path(project, merge_request)
end
- it 'does not not show assignment link' do
+ it 'does not show assignment link' do
expect(page).not_to have_content 'Assign yourself'
end
end
diff --git a/spec/features/merge_request/user_resolves_diff_notes_and_discussions_resolve_spec.rb b/spec/features/merge_request/user_resolves_diff_notes_and_discussions_resolve_spec.rb
index 8a16c011067..87613a4fdce 100644
--- a/spec/features/merge_request/user_resolves_diff_notes_and_discussions_resolve_spec.rb
+++ b/spec/features/merge_request/user_resolves_diff_notes_and_discussions_resolve_spec.rb
@@ -325,7 +325,7 @@ describe 'Merge request > User resolves diff notes and discussions', :js do
end
end
- it 'allows user user to mark all discussions as resolved' do
+ it 'allows user to mark all discussions as resolved' do
page.all('.discussion-reply-holder', count: 2).each do |reply_holder|
page.within reply_holder do
click_button 'Resolve discussion'
diff --git a/spec/features/merge_request/user_sees_versions_spec.rb b/spec/features/merge_request/user_sees_versions_spec.rb
index 92db4f44098..f7512294bef 100644
--- a/spec/features/merge_request/user_sees_versions_spec.rb
+++ b/spec/features/merge_request/user_sees_versions_spec.rb
@@ -66,7 +66,6 @@ describe 'Merge request > User sees versions', :js do
it 'shows comments that were last relevant at that version' do
expect(page).to have_content '5 changed files'
- expect(page).to have_content 'Not all comments are displayed'
position = Gitlab::Diff::Position.new(
old_path: ".gitmodules",
@@ -112,7 +111,6 @@ describe 'Merge request > User sees versions', :js do
)
expect(page).to have_content '4 changed files'
expect(page).to have_content '15 additions 6 deletions'
- expect(page).to have_content 'Not all comments are displayed'
position = Gitlab::Diff::Position.new(
old_path: ".gitmodules",
diff --git a/spec/features/projects/jobs_spec.rb b/spec/features/projects/jobs_spec.rb
index 99a7fbb63bd..24352be592a 100644
--- a/spec/features/projects/jobs_spec.rb
+++ b/spec/features/projects/jobs_spec.rb
@@ -596,7 +596,7 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do
it 'shows delayed job', :js do
expect(page).to have_content('This is a delayed job to run in')
- expect(page).to have_content("This job will automatically run after it's timer finishes.")
+ expect(page).to have_content("This job will automatically run after its timer finishes.")
expect(page).to have_link('Unschedule job')
end
diff --git a/spec/features/projects/wiki/user_creates_wiki_page_spec.rb b/spec/features/projects/wiki/user_creates_wiki_page_spec.rb
index b30286e4446..571104d3467 100644
--- a/spec/features/projects/wiki/user_creates_wiki_page_spec.rb
+++ b/spec/features/projects/wiki/user_creates_wiki_page_spec.rb
@@ -157,7 +157,7 @@ describe "User creates wiki page" do
expect(page).to have_field("wiki[message]", with: "Create home")
end
- it "creates a page from from the home page" do
+ it "creates a page from the home page" do
page.within(".wiki-form") do
fill_in(:wiki_content, with: "My awesome wiki!")
diff --git a/spec/features/projects/wiki/user_updates_wiki_page_spec.rb b/spec/features/projects/wiki/user_updates_wiki_page_spec.rb
index 2ce5ee0e87d..7ad7fec922a 100644
--- a/spec/features/projects/wiki/user_updates_wiki_page_spec.rb
+++ b/spec/features/projects/wiki/user_updates_wiki_page_spec.rb
@@ -1,233 +1,223 @@
require 'spec_helper'
describe 'User updates wiki page' do
- shared_examples 'wiki page user update' do
- let(:user) { create(:user) }
+ let(:user) { create(:user) }
+ before do
+ project.add_maintainer(user)
+ sign_in(user)
+ end
+
+ context 'when wiki is empty' do
before do
- project.add_maintainer(user)
- sign_in(user)
+ visit(project_wikis_path(project))
+ click_link "Create your first page"
end
- context 'when wiki is empty' do
- before do
- visit(project_wikis_path(project))
- click_link "Create your first page"
- end
-
- context 'in a user namespace' do
- let(:project) { create(:project, :wiki_repo, namespace: user.namespace) }
+ context 'in a user namespace' do
+ let(:project) { create(:project, :wiki_repo) }
- it 'redirects back to the home edit page' do
- page.within(:css, '.wiki-form .form-actions') do
- click_on('Cancel')
- end
-
- expect(current_path).to eq project_wiki_path(project, :home)
+ it 'redirects back to the home edit page' do
+ page.within(:css, '.wiki-form .form-actions') do
+ click_on('Cancel')
end
- it 'updates a page that has a path', :js do
- click_on('New page')
+ expect(current_path).to eq project_wiki_path(project, :home)
+ end
- page.within('#modal-new-wiki') do
- fill_in(:new_wiki_path, with: 'one/two/three-test')
- click_on('Create page')
- end
+ it 'updates a page that has a path', :js do
+ click_on('New page')
- page.within '.wiki-form' do
- fill_in(:wiki_content, with: 'wiki content')
- click_on('Create page')
- end
+ page.within('#modal-new-wiki') do
+ fill_in(:new_wiki_path, with: 'one/two/three-test')
+ click_on('Create page')
+ end
- expect(current_path).to include('one/two/three-test')
- expect(find('.wiki-pages')).to have_content('Three')
+ page.within '.wiki-form' do
+ fill_in(:wiki_content, with: 'wiki content')
+ click_on('Create page')
+ end
- first(:link, text: 'Three').click
+ expect(current_path).to include('one/two/three-test')
+ expect(find('.wiki-pages')).to have_content('Three')
- expect(find('.nav-text')).to have_content('Three')
+ first(:link, text: 'Three').click
- click_on('Edit')
+ expect(find('.nav-text')).to have_content('Three')
- expect(current_path).to include('one/two/three-test')
- expect(page).to have_content('Edit Page')
+ click_on('Edit')
- fill_in('Content', with: 'Updated Wiki Content')
- click_on('Save changes')
+ expect(current_path).to include('one/two/three-test')
+ expect(page).to have_content('Edit Page')
- expect(page).to have_content('Updated Wiki Content')
- end
+ fill_in('Content', with: 'Updated Wiki Content')
+ click_on('Save changes')
- it_behaves_like 'wiki file attachments'
+ expect(page).to have_content('Updated Wiki Content')
end
- end
- context 'when wiki is not empty' do
- let(:project_wiki) { create(:project_wiki, project: project, user: project.creator) }
- let!(:wiki_page) { create(:wiki_page, wiki: project_wiki, attrs: { title: 'home', content: 'Home page' }) }
+ it_behaves_like 'wiki file attachments'
+ end
+ end
- before do
- visit(project_wikis_path(project))
+ context 'when wiki is not empty' do
+ let(:project_wiki) { create(:project_wiki, project: project, user: project.creator) }
+ let!(:wiki_page) { create(:wiki_page, wiki: project_wiki, attrs: { title: 'home', content: 'Home page' }) }
- click_link('Edit')
- end
+ before do
+ visit(project_wikis_path(project))
- context 'in a user namespace' do
- let(:project) { create(:project, :wiki_repo, namespace: user.namespace) }
+ click_link('Edit')
+ end
- it 'updates a page' do
- # Commit message field should have correct value.
- expect(page).to have_field('wiki[message]', with: 'Update home')
+ context 'in a user namespace' do
+ let(:project) { create(:project, :wiki_repo) }
- fill_in(:wiki_content, with: 'My awesome wiki!')
- click_button('Save changes')
+ it 'updates a page' do
+ # Commit message field should have correct value.
+ expect(page).to have_field('wiki[message]', with: 'Update home')
- expect(page).to have_content('Home')
- expect(page).to have_content("Last edited by #{user.name}")
- expect(page).to have_content('My awesome wiki!')
- end
+ fill_in(:wiki_content, with: 'My awesome wiki!')
+ click_button('Save changes')
- it 'shows a validation error message' do
- fill_in(:wiki_content, with: '')
- click_button('Save changes')
+ expect(page).to have_content('Home')
+ expect(page).to have_content("Last edited by #{user.name}")
+ expect(page).to have_content('My awesome wiki!')
+ end
- expect(page).to have_selector('.wiki-form')
- expect(page).to have_content('Edit Page')
- expect(page).to have_content('The form contains the following error:')
- expect(page).to have_content("Content can't be blank")
- expect(find('textarea#wiki_content').value).to eq('')
- end
+ it 'shows a validation error message' do
+ fill_in(:wiki_content, with: '')
+ click_button('Save changes')
- it 'shows the emoji autocompletion dropdown', :js do
- find('#wiki_content').native.send_keys('')
- fill_in(:wiki_content, with: ':')
+ expect(page).to have_selector('.wiki-form')
+ expect(page).to have_content('Edit Page')
+ expect(page).to have_content('The form contains the following error:')
+ expect(page).to have_content("Content can't be blank")
+ expect(find('textarea#wiki_content').value).to eq('')
+ end
- expect(page).to have_selector('.atwho-view')
- end
+ it 'shows the emoji autocompletion dropdown', :js do
+ find('#wiki_content').native.send_keys('')
+ fill_in(:wiki_content, with: ':')
- it 'shows the error message' do
- wiki_page.update(content: 'Update')
+ expect(page).to have_selector('.atwho-view')
+ end
- click_button('Save changes')
+ it 'shows the error message' do
+ wiki_page.update(content: 'Update')
- expect(page).to have_content('Someone edited the page the same time you did.')
- end
+ click_button('Save changes')
- it 'updates a page' do
- fill_in('Content', with: 'Updated Wiki Content')
- click_on('Save changes')
+ expect(page).to have_content('Someone edited the page the same time you did.')
+ end
- expect(page).to have_content('Updated Wiki Content')
- end
+ it 'updates a page' do
+ fill_in('Content', with: 'Updated Wiki Content')
+ click_on('Save changes')
- it 'cancels editing of a page' do
- page.within(:css, '.wiki-form .form-actions') do
- click_on('Cancel')
- end
+ expect(page).to have_content('Updated Wiki Content')
+ end
- expect(current_path).to eq(project_wiki_path(project, wiki_page))
+ it 'cancels editing of a page' do
+ page.within(:css, '.wiki-form .form-actions') do
+ click_on('Cancel')
end
- it_behaves_like 'wiki file attachments'
+ expect(current_path).to eq(project_wiki_path(project, wiki_page))
end
- context 'in a group namespace' do
- let(:project) { create(:project, :wiki_repo, namespace: create(:group, :public)) }
+ it_behaves_like 'wiki file attachments'
+ end
- it 'updates a page' do
- # Commit message field should have correct value.
- expect(page).to have_field('wiki[message]', with: 'Update home')
+ context 'in a group namespace' do
+ let(:project) { create(:project, :wiki_repo, namespace: create(:group, :public)) }
- fill_in(:wiki_content, with: 'My awesome wiki!')
+ it 'updates a page' do
+ # Commit message field should have correct value.
+ expect(page).to have_field('wiki[message]', with: 'Update home')
- click_button('Save changes')
+ fill_in(:wiki_content, with: 'My awesome wiki!')
- expect(page).to have_content('Home')
- expect(page).to have_content("Last edited by #{user.name}")
- expect(page).to have_content('My awesome wiki!')
- end
+ click_button('Save changes')
- it_behaves_like 'wiki file attachments'
+ expect(page).to have_content('Home')
+ expect(page).to have_content("Last edited by #{user.name}")
+ expect(page).to have_content('My awesome wiki!')
end
- end
- context 'when the page is in a subdir' do
- let!(:project) { create(:project, :wiki_repo, namespace: user.namespace) }
- let(:project_wiki) { create(:project_wiki, project: project, user: project.creator) }
- let(:page_name) { 'page_name' }
- let(:page_dir) { "foo/bar/#{page_name}" }
- let!(:wiki_page) { create(:wiki_page, wiki: project_wiki, attrs: { title: page_dir, content: 'Home page' }) }
+ it_behaves_like 'wiki file attachments'
+ end
+ end
- before do
- visit(project_wiki_edit_path(project, wiki_page))
- end
+ context 'when the page is in a subdir' do
+ let!(:project) { create(:project, :wiki_repo) }
+ let(:project_wiki) { create(:project_wiki, project: project, user: project.creator) }
+ let(:page_name) { 'page_name' }
+ let(:page_dir) { "foo/bar/#{page_name}" }
+ let!(:wiki_page) { create(:wiki_page, wiki: project_wiki, attrs: { title: page_dir, content: 'Home page' }) }
- it 'moves the page to the root folder', :skip_gitaly_mock do
- fill_in(:wiki_title, with: "/#{page_name}")
+ before do
+ visit(project_wiki_edit_path(project, wiki_page))
+ end
- click_button('Save changes')
+ it 'moves the page to the root folder' do
+ fill_in(:wiki_title, with: "/#{page_name}")
- expect(current_path).to eq(project_wiki_path(project, page_name))
- end
+ click_button('Save changes')
- it 'moves the page to other dir' do
- new_page_dir = "foo1/bar1/#{page_name}"
+ expect(current_path).to eq(project_wiki_path(project, page_name))
+ end
- fill_in(:wiki_title, with: new_page_dir)
+ it 'moves the page to other dir' do
+ new_page_dir = "foo1/bar1/#{page_name}"
- click_button('Save changes')
+ fill_in(:wiki_title, with: new_page_dir)
- expect(current_path).to eq(project_wiki_path(project, new_page_dir))
- end
+ click_button('Save changes')
- it 'remains in the same place if title has not changed' do
- original_path = project_wiki_path(project, wiki_page)
+ expect(current_path).to eq(project_wiki_path(project, new_page_dir))
+ end
- fill_in(:wiki_title, with: page_name)
+ it 'remains in the same place if title has not changed' do
+ original_path = project_wiki_path(project, wiki_page)
- click_button('Save changes')
+ fill_in(:wiki_title, with: page_name)
- expect(current_path).to eq(original_path)
- end
+ click_button('Save changes')
- it 'can be moved to a different dir with a different name' do
- new_page_dir = "foo1/bar1/new_page_name"
+ expect(current_path).to eq(original_path)
+ end
- fill_in(:wiki_title, with: new_page_dir)
+ it 'can be moved to a different dir with a different name' do
+ new_page_dir = "foo1/bar1/new_page_name"
- click_button('Save changes')
+ fill_in(:wiki_title, with: new_page_dir)
- expect(current_path).to eq(project_wiki_path(project, new_page_dir))
- end
+ click_button('Save changes')
- it 'can be renamed and moved to the root folder' do
- new_name = 'new_page_name'
+ expect(current_path).to eq(project_wiki_path(project, new_page_dir))
+ end
- fill_in(:wiki_title, with: "/#{new_name}")
+ it 'can be renamed and moved to the root folder' do
+ new_name = 'new_page_name'
- click_button('Save changes')
+ fill_in(:wiki_title, with: "/#{new_name}")
- expect(current_path).to eq(project_wiki_path(project, new_name))
- end
+ click_button('Save changes')
- it 'squishes the title before creating the page' do
- new_page_dir = " foo1 / bar1 / #{page_name} "
+ expect(current_path).to eq(project_wiki_path(project, new_name))
+ end
- fill_in(:wiki_title, with: new_page_dir)
+ it 'squishes the title before creating the page' do
+ new_page_dir = " foo1 / bar1 / #{page_name} "
- click_button('Save changes')
+ fill_in(:wiki_title, with: new_page_dir)
- expect(current_path).to eq(project_wiki_path(project, "foo1/bar1/#{page_name}"))
- end
+ click_button('Save changes')
- it_behaves_like 'wiki file attachments'
+ expect(current_path).to eq(project_wiki_path(project, "foo1/bar1/#{page_name}"))
end
- end
-
- context 'when Gitaly is enabled' do
- it_behaves_like 'wiki page user update'
- end
- context 'when Gitaly is disabled', :skip_gitaly_mock do
- it_behaves_like 'wiki page user update'
+ it_behaves_like 'wiki file attachments'
end
end
diff --git a/spec/features/projects/wiki/user_views_wiki_page_spec.rb b/spec/features/projects/wiki/user_views_wiki_page_spec.rb
index 4b974a3ca10..3c93d71ab00 100644
--- a/spec/features/projects/wiki/user_views_wiki_page_spec.rb
+++ b/spec/features/projects/wiki/user_views_wiki_page_spec.rb
@@ -1,174 +1,164 @@
require 'spec_helper'
describe 'User views a wiki page' do
- shared_examples 'wiki page user view' do
- include WikiHelpers
-
- let(:user) { create(:user) }
- let(:project) { create(:project, :wiki_repo, namespace: user.namespace) }
- let(:path) { 'image.png' }
- let(:wiki_page) do
- create(:wiki_page,
- wiki: project.wiki,
- attrs: { title: 'home', content: "Look at this [image](#{path})\n\n ![alt text](#{path})" })
- end
+ include WikiHelpers
+
+ let(:user) { create(:user) }
+ let(:project) { create(:project, :wiki_repo, namespace: user.namespace) }
+ let(:path) { 'image.png' }
+ let(:wiki_page) do
+ create(:wiki_page,
+ wiki: project.wiki,
+ attrs: { title: 'home', content: "Look at this [image](#{path})\n\n ![alt text](#{path})" })
+ end
- before do
- project.add_maintainer(user)
- sign_in(user)
- end
+ before do
+ project.add_maintainer(user)
+ sign_in(user)
+ end
- context 'when wiki is empty' do
- before do
- visit(project_wikis_path(project))
- click_link "Create your first page"
+ context 'when wiki is empty' do
+ before do
+ visit(project_wikis_path(project))
+ click_link "Create your first page"
- click_on('New page')
+ click_on('New page')
- page.within('#modal-new-wiki') do
- fill_in(:new_wiki_path, with: 'one/two/three-test')
- click_on('Create page')
- end
+ page.within('#modal-new-wiki') do
+ fill_in(:new_wiki_path, with: 'one/two/three-test')
+ click_on('Create page')
+ end
- page.within('.wiki-form') do
- fill_in(:wiki_content, with: 'wiki content')
- click_on('Create page')
- end
+ page.within('.wiki-form') do
+ fill_in(:wiki_content, with: 'wiki content')
+ click_on('Create page')
end
+ end
- it 'shows the history of a page that has a path', :js do
- expect(current_path).to include('one/two/three-test')
+ it 'shows the history of a page that has a path', :js do
+ expect(current_path).to include('one/two/three-test')
- first(:link, text: 'Three').click
- click_on('Page history')
+ first(:link, text: 'Three').click
+ click_on('Page history')
- expect(current_path).to include('one/two/three-test')
+ expect(current_path).to include('one/two/three-test')
- page.within(:css, '.nav-text') do
- expect(page).to have_content('History')
- end
+ page.within(:css, '.nav-text') do
+ expect(page).to have_content('History')
end
+ end
- it 'shows an old version of a page', :js do
- expect(current_path).to include('one/two/three-test')
- expect(find('.wiki-pages')).to have_content('Three')
-
- first(:link, text: 'Three').click
-
- expect(find('.nav-text')).to have_content('Three')
+ it 'shows an old version of a page', :js do
+ expect(current_path).to include('one/two/three-test')
+ expect(find('.wiki-pages')).to have_content('Three')
- click_on('Edit')
+ first(:link, text: 'Three').click
- expect(current_path).to include('one/two/three-test')
- expect(page).to have_content('Edit Page')
+ expect(find('.nav-text')).to have_content('Three')
- fill_in('Content', with: 'Updated Wiki Content')
+ click_on('Edit')
- click_on('Save changes')
- click_on('Page history')
+ expect(current_path).to include('one/two/three-test')
+ expect(page).to have_content('Edit Page')
- page.within(:css, '.nav-text') do
- expect(page).to have_content('History')
- end
+ fill_in('Content', with: 'Updated Wiki Content')
- find('a[href*="?version_id"]')
- end
- end
-
- context 'when a page does not have history' do
- before do
- visit(project_wiki_path(project, wiki_page))
- end
+ click_on('Save changes')
+ click_on('Page history')
- it 'shows all the pages' do
- expect(page).to have_content(user.name)
- expect(find('.wiki-pages')).to have_content(wiki_page.title.capitalize)
+ page.within(:css, '.nav-text') do
+ expect(page).to have_content('History')
end
- context 'shows a file stored in a page' do
- let(:path) { upload_file_to_wiki(project, user, 'dk.png') }
+ find('a[href*="?version_id"]')
+ end
+ end
- it do
- expect(page).to have_xpath("//img[@data-src='#{project.wiki.wiki_base_path}/#{path}']")
- expect(page).to have_link('image', href: "#{project.wiki.wiki_base_path}/#{path}")
+ context 'when a page does not have history' do
+ before do
+ visit(project_wiki_path(project, wiki_page))
+ end
- click_on('image')
+ it 'shows all the pages' do
+ expect(page).to have_content(user.name)
+ expect(find('.wiki-pages')).to have_content(wiki_page.title.capitalize)
+ end
- expect(current_path).to match("wikis/#{path}")
- expect(page).not_to have_xpath('/html') # Page should render the image which means there is no html involved
- end
- end
+ context 'shows a file stored in a page' do
+ let(:path) { upload_file_to_wiki(project, user, 'dk.png') }
- it 'shows the creation page if file does not exist' do
+ it do
+ expect(page).to have_xpath("//img[@data-src='#{project.wiki.wiki_base_path}/#{path}']")
expect(page).to have_link('image', href: "#{project.wiki.wiki_base_path}/#{path}")
click_on('image')
expect(current_path).to match("wikis/#{path}")
- expect(page).to have_content('New Wiki Page')
- expect(page).to have_content('Create page')
+ expect(page).not_to have_xpath('/html') # Page should render the image which means there is no html involved
end
end
- context 'when a page has history' do
- before do
- wiki_page.update(message: 'updated home', content: 'updated [some link](other-page)')
- end
+ it 'shows the creation page if file does not exist' do
+ expect(page).to have_link('image', href: "#{project.wiki.wiki_base_path}/#{path}")
- it 'shows the page history' do
- visit(project_wiki_path(project, wiki_page))
+ click_on('image')
- expect(page).to have_selector('a.btn', text: 'Edit')
+ expect(current_path).to match("wikis/#{path}")
+ expect(page).to have_content('New Wiki Page')
+ expect(page).to have_content('Create page')
+ end
+ end
- click_on('Page history')
+ context 'when a page has history' do
+ before do
+ wiki_page.update(message: 'updated home', content: 'updated [some link](other-page)')
+ end
- expect(page).to have_content(user.name)
- expect(page).to have_content("#{user.username} created page: home")
- expect(page).to have_content('updated home')
- end
+ it 'shows the page history' do
+ visit(project_wiki_path(project, wiki_page))
- it 'does not show the "Edit" button' do
- visit(project_wiki_path(project, wiki_page, version_id: wiki_page.versions.last.id))
+ expect(page).to have_selector('a.btn', text: 'Edit')
- expect(page).not_to have_selector('a.btn', text: 'Edit')
- end
+ click_on('Page history')
+
+ expect(page).to have_content(user.name)
+ expect(page).to have_content("#{user.username} created page: home")
+ expect(page).to have_content('updated home')
end
- context 'when page has invalid content encoding' do
- let(:content) { 'whatever'.force_encoding('ISO-8859-1') }
+ it 'does not show the "Edit" button' do
+ visit(project_wiki_path(project, wiki_page, version_id: wiki_page.versions.last.id))
- before do
- allow(Gitlab::EncodingHelper).to receive(:encode!).and_return(content)
+ expect(page).not_to have_selector('a.btn', text: 'Edit')
+ end
+ end
- visit(project_wiki_path(project, wiki_page))
- end
+ context 'when page has invalid content encoding' do
+ let(:content) { 'whatever'.force_encoding('ISO-8859-1') }
- it 'does not show "Edit" button' do
- expect(page).not_to have_selector('a.btn', text: 'Edit')
- end
+ before do
+ allow(Gitlab::EncodingHelper).to receive(:encode!).and_return(content)
- it 'shows error' do
- page.within(:css, '.flash-notice') do
- expect(page).to have_content('The content of this page is not encoded in UTF-8. Edits can only be made via the Git repository.')
- end
- end
+ visit(project_wiki_path(project, wiki_page))
end
- it 'opens a default wiki page', :js do
- visit(project_path(project))
-
- find('.shortcuts-wiki').click
- click_link "Create your first page"
+ it 'does not show "Edit" button' do
+ expect(page).not_to have_selector('a.btn', text: 'Edit')
+ end
- expect(page).to have_content('Home · Create Page')
+ it 'shows error' do
+ page.within(:css, '.flash-notice') do
+ expect(page).to have_content('The content of this page is not encoded in UTF-8. Edits can only be made via the Git repository.')
+ end
end
end
- context 'when Gitaly is enabled' do
- it_behaves_like 'wiki page user view'
- end
+ it 'opens a default wiki page', :js do
+ visit(project_path(project))
+
+ find('.shortcuts-wiki').click
+ click_link "Create your first page"
- context 'when Gitaly is disabled', :skip_gitaly_mock do
- it_behaves_like 'wiki page user view'
+ expect(page).to have_content('Home · Create Page')
end
end
diff --git a/spec/finders/pipeline_schedules_finder_spec.rb b/spec/finders/pipeline_schedules_finder_spec.rb
index b9538649b3f..2fefa0280d1 100644
--- a/spec/finders/pipeline_schedules_finder_spec.rb
+++ b/spec/finders/pipeline_schedules_finder_spec.rb
@@ -12,7 +12,7 @@ describe PipelineSchedulesFinder do
context 'when the scope is nil' do
let(:params) { { scope: nil } }
- it 'selects all pipeline pipeline schedules' do
+ it 'selects all pipeline schedules' do
expect(subject.count).to be(2)
expect(subject).to include(active_schedule, inactive_schedule)
end
diff --git a/spec/fixtures/emails/paragraphs.eml b/spec/fixtures/emails/paragraphs.eml
index 2d5b5283f7e..6ab319fa83a 100644
--- a/spec/fixtures/emails/paragraphs.eml
+++ b/spec/fixtures/emails/paragraphs.eml
@@ -17,7 +17,7 @@ X-Received: by 10.0.0.1 with SMTP id n7mr11234144ipb.85.1371157428600; Thu,
13 Jun 2013 14:03:48 -0700 (PDT)
X-Scanned-By: MIMEDefang 2.69 on IPv6:2001:470:1d:165::1
-Is there any reason the *old* candy can't be be kept in silos while the new candy
+Is there any reason the *old* candy can't be kept in silos while the new candy
is imported into *new* silos?
The thing about candy is it stays delicious for a long time -- we can just keep
diff --git a/spec/initializers/secret_token_spec.rb b/spec/initializers/secret_token_spec.rb
index c3dfd7bedbe..6366be30079 100644
--- a/spec/initializers/secret_token_spec.rb
+++ b/spec/initializers/secret_token_spec.rb
@@ -123,7 +123,7 @@ describe 'create_tokens' do
create_tokens
end
- it 'sets the the keys to the values from the environment and secrets.yml' do
+ it 'sets the keys to the values from the environment and secrets.yml' do
create_tokens
expect(secrets.secret_key_base).to eq('secret_key_base')
diff --git a/spec/javascripts/diffs/components/app_spec.js b/spec/javascripts/diffs/components/app_spec.js
index 3c9b5ee0176..1a0b7612ee9 100644
--- a/spec/javascripts/diffs/components/app_spec.js
+++ b/spec/javascripts/diffs/components/app_spec.js
@@ -3,7 +3,6 @@ import { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper
import { TEST_HOST } from 'spec/test_constants';
import App from '~/diffs/components/app.vue';
import createDiffsStore from '../create_diffs_store';
-import getDiffWithCommit from '../mock_data/diff_with_commit';
describe('diffs/components/app', () => {
const oldMrTabs = window.mrTabs;
@@ -40,43 +39,4 @@ describe('diffs/components/app', () => {
it('does not show commit info', () => {
expect(vm.$el).not.toContainElement('.blob-commit-info');
});
-
- it('shows comments message, with commit', done => {
- vm.$store.state.diffs.commit = getDiffWithCommit().commit;
-
- vm.$nextTick()
- .then(() => {
- expect(vm.$el).toContainText('Only comments from the following commit are shown below');
- expect(vm.$el).toContainElement('.blob-commit-info');
- })
- .then(done)
- .catch(done.fail);
- });
-
- it('shows comments message, with old mergeRequestDiff', done => {
- vm.$store.state.diffs.mergeRequestDiff = { latest: false };
- vm.$store.state.diffs.targetBranch = 'master';
-
- vm.$nextTick()
- .then(() => {
- expect(vm.$el).toContainText(
- "Not all comments are displayed because you're viewing an old version of the diff.",
- );
- })
- .then(done)
- .catch(done.fail);
- });
-
- it('shows comments message, with startVersion', done => {
- vm.$store.state.diffs.startVersion = 'test';
-
- vm.$nextTick()
- .then(() => {
- expect(vm.$el).toContainText(
- "Not all comments are displayed because you're comparing two versions of the diff.",
- );
- })
- .then(done)
- .catch(done.fail);
- });
});
diff --git a/spec/javascripts/diffs/components/compare_versions_spec.js b/spec/javascripts/diffs/components/compare_versions_spec.js
index d9d7f61785f..75c66e9ca82 100644
--- a/spec/javascripts/diffs/components/compare_versions_spec.js
+++ b/spec/javascripts/diffs/components/compare_versions_spec.js
@@ -3,6 +3,7 @@ import CompareVersionsComponent from '~/diffs/components/compare_versions.vue';
import store from '~/mr_notes/stores';
import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper';
import diffsMockData from '../mock_data/merge_request_diffs';
+import getDiffWithCommit from '../mock_data/diff_with_commit';
describe('CompareVersions', () => {
let vm;
@@ -122,4 +123,24 @@ describe('CompareVersions', () => {
expect(vm.isWhitespaceVisible()).toBe(true);
});
});
+
+ describe('commit', () => {
+ beforeEach(done => {
+ vm.$store.state.diffs.commit = getDiffWithCommit().commit;
+ vm.mergeRequestDiffs = [];
+
+ vm.$nextTick(done);
+ });
+
+ it('renders latest version button', () => {
+ expect(vm.$el.querySelector('.js-latest-version').textContent.trim()).toBe(
+ 'Show latest version',
+ );
+ });
+
+ it('renders short commit ID', () => {
+ expect(vm.$el.textContent).toContain('Viewing commit');
+ expect(vm.$el.textContent).toContain(vm.commit.short_id);
+ });
+ });
});
diff --git a/spec/javascripts/ide/components/ide_spec.js b/spec/javascripts/ide/components/ide_spec.js
index c02a1ad246c..55f40be0e4e 100644
--- a/spec/javascripts/ide/components/ide_spec.js
+++ b/spec/javascripts/ide/components/ide_spec.js
@@ -29,7 +29,7 @@ describe('ide component', () => {
resetStore(vm.$store);
});
- it('does not render right right when no files open', () => {
+ it('does not render right when no files open', () => {
expect(vm.$el.querySelector('.panel-right')).toBeNull();
});
diff --git a/spec/javascripts/ide/stores/actions/file_spec.js b/spec/javascripts/ide/stores/actions/file_spec.js
index 1ca811e996b..7ddc734ff56 100644
--- a/spec/javascripts/ide/stores/actions/file_spec.js
+++ b/spec/javascripts/ide/stores/actions/file_spec.js
@@ -296,7 +296,7 @@ describe('IDE store file actions', () => {
.getFileData({ state: store.state, commit() {}, dispatch }, { path: localFile.path })
.then(() => {
expect(dispatch).toHaveBeenCalledWith('setErrorMessage', {
- text: 'An error occured whilst loading the file.',
+ text: 'An error occurred whilst loading the file.',
action: jasmine.any(Function),
actionText: 'Please try again',
actionPayload: {
@@ -408,7 +408,7 @@ describe('IDE store file actions', () => {
.then(done.fail)
.catch(() => {
expect(dispatch).toHaveBeenCalledWith('setErrorMessage', {
- text: 'An error occured whilst loading the file content.',
+ text: 'An error occurred whilst loading the file content.',
action: jasmine.any(Function),
actionText: 'Please try again',
actionPayload: {
diff --git a/spec/javascripts/ide/stores/actions/merge_request_spec.js b/spec/javascripts/ide/stores/actions/merge_request_spec.js
index d8e9260e932..9bfc7c397b8 100644
--- a/spec/javascripts/ide/stores/actions/merge_request_spec.js
+++ b/spec/javascripts/ide/stores/actions/merge_request_spec.js
@@ -82,7 +82,7 @@ describe('IDE store merge request actions', () => {
.then(done.fail)
.catch(() => {
expect(dispatch).toHaveBeenCalledWith('setErrorMessage', {
- text: 'An error occured whilst loading the merge request.',
+ text: 'An error occurred whilst loading the merge request.',
action: jasmine.any(Function),
actionText: 'Please try again',
actionPayload: {
@@ -155,7 +155,7 @@ describe('IDE store merge request actions', () => {
.then(done.fail)
.catch(() => {
expect(dispatch).toHaveBeenCalledWith('setErrorMessage', {
- text: 'An error occured whilst loading the merge request changes.',
+ text: 'An error occurred whilst loading the merge request changes.',
action: jasmine.any(Function),
actionText: 'Please try again',
actionPayload: {
@@ -225,7 +225,7 @@ describe('IDE store merge request actions', () => {
.then(done.fail)
.catch(() => {
expect(dispatch).toHaveBeenCalledWith('setErrorMessage', {
- text: 'An error occured whilst loading the merge request version data.',
+ text: 'An error occurred whilst loading the merge request version data.',
action: jasmine.any(Function),
actionText: 'Please try again',
actionPayload: {
diff --git a/spec/javascripts/ide/stores/actions/tree_spec.js b/spec/javascripts/ide/stores/actions/tree_spec.js
index d47c60dc581..bd41e87bf0e 100644
--- a/spec/javascripts/ide/stores/actions/tree_spec.js
+++ b/spec/javascripts/ide/stores/actions/tree_spec.js
@@ -143,7 +143,7 @@ describe('Multi-file store tree actions', () => {
.then(done.fail)
.catch(() => {
expect(dispatch).toHaveBeenCalledWith('setErrorMessage', {
- text: 'An error occured whilst loading all the files.',
+ text: 'An error occurred whilst loading all the files.',
action: jasmine.any(Function),
actionText: 'Please try again',
actionPayload: { projectId: 'abc/def', branchId: 'master-testing' },
diff --git a/spec/javascripts/ide/stores/modules/branches/actions_spec.js b/spec/javascripts/ide/stores/modules/branches/actions_spec.js
index 2b3eac282f6..9c61ba3d1a6 100644
--- a/spec/javascripts/ide/stores/modules/branches/actions_spec.js
+++ b/spec/javascripts/ide/stores/modules/branches/actions_spec.js
@@ -59,7 +59,7 @@ describe('IDE branches actions', () => {
});
describe('receiveBranchesError', () => {
- it('should should commit error', done => {
+ it('should commit error', done => {
testAction(
receiveBranchesError,
{ search: TEST_SEARCH },
diff --git a/spec/javascripts/ide/stores/modules/merge_requests/actions_spec.js b/spec/javascripts/ide/stores/modules/merge_requests/actions_spec.js
index 62699143a91..04925d37ac4 100644
--- a/spec/javascripts/ide/stores/modules/merge_requests/actions_spec.js
+++ b/spec/javascripts/ide/stores/modules/merge_requests/actions_spec.js
@@ -39,7 +39,7 @@ describe('IDE merge requests actions', () => {
});
describe('receiveMergeRequestsError', () => {
- it('should should commit error', done => {
+ it('should commit error', done => {
testAction(
receiveMergeRequestsError,
{ type: 'created', search: '' },
diff --git a/spec/javascripts/ide/stores/modules/pipelines/actions_spec.js b/spec/javascripts/ide/stores/modules/pipelines/actions_spec.js
index c9c09ee9afe..0937ee38390 100644
--- a/spec/javascripts/ide/stores/modules/pipelines/actions_spec.js
+++ b/spec/javascripts/ide/stores/modules/pipelines/actions_spec.js
@@ -77,7 +77,7 @@ describe('IDE pipelines actions', () => {
{
type: 'setErrorMessage',
payload: {
- text: 'An error occured whilst fetching the latest pipeline.',
+ text: 'An error occurred whilst fetching the latest pipeline.',
action: jasmine.any(Function),
actionText: 'Please try again',
actionPayload: null,
@@ -223,7 +223,7 @@ describe('IDE pipelines actions', () => {
{
type: 'setErrorMessage',
payload: {
- text: 'An error occured whilst loading the pipelines jobs.',
+ text: 'An error occurred whilst loading the pipelines jobs.',
action: jasmine.anything(),
actionText: 'Please try again',
actionPayload: { id: 1 },
@@ -360,7 +360,7 @@ describe('IDE pipelines actions', () => {
{
type: 'setErrorMessage',
payload: {
- text: 'An error occured whilst fetching the job trace.',
+ text: 'An error occurred whilst fetching the job trace.',
action: jasmine.any(Function),
actionText: 'Please try again',
actionPayload: null,
diff --git a/spec/javascripts/issue_show/components/edited_spec.js b/spec/javascripts/issue_show/components/edited_spec.js
index 7f09db837bb..a1683f060c0 100644
--- a/spec/javascripts/issue_show/components/edited_spec.js
+++ b/spec/javascripts/issue_show/components/edited_spec.js
@@ -46,14 +46,4 @@ describe('edited', () => {
expect(editedComponent.$el.querySelector('.author-link')).toBeFalsy();
expect(editedComponent.$el.querySelector('time')).toBeTruthy();
});
-
- it('renders time ago tooltip at the bottom', () => {
- const editedComponent = new EditedComponent({
- propsData: {
- updatedAt: '2017-05-15T12:31:04.428Z',
- },
- }).$mount();
-
- expect(editedComponent.$el.querySelector('time').dataset.placement).toEqual('bottom');
- });
});
diff --git a/spec/javascripts/vue_shared/components/time_ago_tooltip_spec.js b/spec/javascripts/vue_shared/components/time_ago_tooltip_spec.js
index 745571d0a97..536bb57b946 100644
--- a/spec/javascripts/vue_shared/components/time_ago_tooltip_spec.js
+++ b/spec/javascripts/vue_shared/components/time_ago_tooltip_spec.js
@@ -26,24 +26,11 @@ describe('Time ago with tooltip component', () => {
formatDate('2017-05-08T14:57:39.781Z'),
);
- expect(vm.$el.getAttribute('data-placement')).toEqual('top');
-
const timeago = getTimeago();
expect(vm.$el.textContent.trim()).toEqual(timeago.format('2017-05-08T14:57:39.781Z'));
});
- it('should render tooltip placed in bottom', () => {
- vm = new TimeagoTooltip({
- propsData: {
- time: '2017-05-08T14:57:39.781Z',
- tooltipPlacement: 'bottom',
- },
- }).$mount();
-
- expect(vm.$el.getAttribute('data-placement')).toEqual('bottom');
- });
-
it('should render provided html class', () => {
vm = new TimeagoTooltip({
propsData: {
diff --git a/spec/lib/banzai/filter/absolute_link_filter_spec.rb b/spec/lib/banzai/filter/absolute_link_filter_spec.rb
index a3ad056efcd..50be551cd90 100644
--- a/spec/lib/banzai/filter/absolute_link_filter_spec.rb
+++ b/spec/lib/banzai/filter/absolute_link_filter_spec.rb
@@ -28,7 +28,7 @@ describe Banzai::Filter::AbsoluteLinkFilter do
end
context 'if relative_url_root is set' do
- it 'joins the url without without doubling the path' do
+ it 'joins the url without doubling the path' do
allow(Gitlab.config.gitlab).to receive(:url).and_return("#{fake_url}/gitlab/")
doc = filter(link("/gitlab/foo", 'gfm'), only_path_context)
expect(doc.at_css('a')['href']).to eq "#{fake_url}/gitlab/foo"
diff --git a/spec/lib/extracts_path_spec.rb b/spec/lib/extracts_path_spec.rb
index 8947e2ac4fb..e0691aba600 100644
--- a/spec/lib/extracts_path_spec.rb
+++ b/spec/lib/extracts_path_spec.rb
@@ -205,28 +205,18 @@ describe ExtractsPath do
end
describe '#lfs_blob_ids' do
- shared_examples '#lfs_blob_ids' do
- let(:tag) { @project.repository.add_tag(@project.owner, 'my-annotated-tag', 'master', 'test tag') }
- let(:ref) { tag.target }
- let(:params) { { ref: ref, path: 'README.md' } }
+ let(:tag) { @project.repository.add_tag(@project.owner, 'my-annotated-tag', 'master', 'test tag') }
+ let(:ref) { tag.target }
+ let(:params) { { ref: ref, path: 'README.md' } }
- before do
- @project = create(:project, :repository)
- end
-
- it 'handles annotated tags' do
- assign_ref_vars
-
- expect(lfs_blob_ids).to eq([])
- end
+ before do
+ @project = create(:project, :repository)
end
- context 'when gitaly is enabled' do
- it_behaves_like '#lfs_blob_ids'
- end
+ it 'handles annotated tags' do
+ assign_ref_vars
- context 'when gitaly is disabled', :skip_gitaly_mock do
- it_behaves_like '#lfs_blob_ids'
+ expect(lfs_blob_ids).to eq([])
end
end
end
diff --git a/spec/lib/gitlab/auth/o_auth/user_spec.rb b/spec/lib/gitlab/auth/o_auth/user_spec.rb
index 3a8667e434d..dcbd12fe190 100644
--- a/spec/lib/gitlab/auth/o_auth/user_spec.rb
+++ b/spec/lib/gitlab/auth/o_auth/user_spec.rb
@@ -498,7 +498,7 @@ describe Gitlab::Auth::OAuth::User do
end
end
- describe 'ensure backwards compatibility with with sync email from provider option' do
+ describe 'ensure backwards compatibility with sync email from provider option' do
let!(:existing_user) { create(:omniauth_user, extern_uid: 'my-uid', provider: 'my-provider') }
before do
diff --git a/spec/lib/gitlab/ci/build/policy/changes_spec.rb b/spec/lib/gitlab/ci/build/policy/changes_spec.rb
index 523d00c1272..5fee37bb43e 100644
--- a/spec/lib/gitlab/ci/build/policy/changes_spec.rb
+++ b/spec/lib/gitlab/ci/build/policy/changes_spec.rb
@@ -4,7 +4,7 @@ describe Gitlab::Ci::Build::Policy::Changes do
set(:project) { create(:project) }
describe '#satisfied_by?' do
- describe 'paths matching matching' do
+ describe 'paths matching' do
let(:pipeline) do
build(:ci_empty_pipeline, project: project,
ref: 'master',
diff --git a/spec/lib/gitlab/ci/config/external/file/local_spec.rb b/spec/lib/gitlab/ci/config/external/file/local_spec.rb
index 2708d8d5b6b..541deb13b97 100644
--- a/spec/lib/gitlab/ci/config/external/file/local_spec.rb
+++ b/spec/lib/gitlab/ci/config/external/file/local_spec.rb
@@ -37,7 +37,7 @@ describe Gitlab::Ci::Config::External::File::Local do
end
describe '#content' do
- context 'with a a valid file' do
+ context 'with a valid file' do
let(:local_file_content) do
<<~HEREDOC
before_script:
diff --git a/spec/lib/gitlab/ci/pipeline/expression/lexeme/string_spec.rb b/spec/lib/gitlab/ci/pipeline/expression/lexeme/string_spec.rb
index 1ccb792d1da..f54ef492e6d 100644
--- a/spec/lib/gitlab/ci/pipeline/expression/lexeme/string_spec.rb
+++ b/spec/lib/gitlab/ci/pipeline/expression/lexeme/string_spec.rb
@@ -93,7 +93,7 @@ describe Gitlab::Ci::Pipeline::Expression::Lexeme::String do
end
describe '#evaluate' do
- it 'returns string value it is is present' do
+ it 'returns string value if it is present' do
string = described_class.new('my string')
expect(string.evaluate).to eq 'my string'
diff --git a/spec/lib/gitlab/contributions_calendar_spec.rb b/spec/lib/gitlab/contributions_calendar_spec.rb
index 6d29044ffd5..b7924302014 100644
--- a/spec/lib/gitlab/contributions_calendar_spec.rb
+++ b/spec/lib/gitlab/contributions_calendar_spec.rb
@@ -135,7 +135,7 @@ describe Gitlab::ContributionsCalendar do
expect(calendar(contributor).events_by_date(today)).to contain_exactly(e1, e2, e3)
end
- context 'when the user cannot read read cross project' do
+ context 'when the user cannot read cross project' do
before do
allow(Ability).to receive(:allowed?).and_call_original
expect(Ability).to receive(:allowed?).with(user, :read_cross_project) { false }
diff --git a/spec/lib/gitlab/cross_project_access/check_info_spec.rb b/spec/lib/gitlab/cross_project_access/check_info_spec.rb
index 239fa364f5e..ea7393a7006 100644
--- a/spec/lib/gitlab/cross_project_access/check_info_spec.rb
+++ b/spec/lib/gitlab/cross_project_access/check_info_spec.rb
@@ -50,7 +50,7 @@ describe Gitlab::CrossProjectAccess::CheckInfo do
expect(info.should_run?(dummy_controller)).to be_truthy
end
- it 'returns the the opposite of #should_skip? when the check is a skip' do
+ it 'returns the opposite of #should_skip? when the check is a skip' do
info = described_class.new({}, nil, nil, true)
expect(info).to receive(:should_skip?).with(dummy_controller).and_return(false)
@@ -101,7 +101,7 @@ describe Gitlab::CrossProjectAccess::CheckInfo do
expect(info.should_skip?(dummy_controller)).to be_truthy
end
- it 'returns the the opposite of #should_run? when the check is not a skip' do
+ it 'returns the opposite of #should_run? when the check is not a skip' do
info = described_class.new({}, nil, nil, false)
expect(info).to receive(:should_run?).with(dummy_controller).and_return(false)
diff --git a/spec/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_namespaces_spec.rb b/spec/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_namespaces_spec.rb
index 0a8c77b0ad9..b6096d4faf6 100644
--- a/spec/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_namespaces_spec.rb
+++ b/spec/lib/gitlab/database/rename_reserved_paths_migration/v1/rename_namespaces_spec.rb
@@ -165,7 +165,7 @@ describe Gitlab::Database::RenameReservedPathsMigration::V1::RenameNamespaces, :
end
describe '#rename_namespace_dependencies' do
- it "moves the the repository for a project in the namespace" do
+ it "moves the repository for a project in the namespace" do
create(:project, :repository, :legacy_storage, namespace: namespace, path: "the-path-project")
expected_repo = File.join(TestEnv.repos_path, "the-path0", "the-path-project.git")
diff --git a/spec/lib/gitlab/diff/file_collection/merge_request_diff_spec.rb b/spec/lib/gitlab/diff/file_collection/merge_request_diff_spec.rb
index 4578da70bfc..fbcf515281e 100644
--- a/spec/lib/gitlab/diff/file_collection/merge_request_diff_spec.rb
+++ b/spec/lib/gitlab/diff/file_collection/merge_request_diff_spec.rb
@@ -37,17 +37,7 @@ describe Gitlab::Diff::FileCollection::MergeRequestDiff do
let(:stub_path) { '.gitignore' }
end
- shared_examples 'initializes a DiffCollection' do
- it 'returns a valid instance of a DiffCollection' do
- expect(diff_files).to be_a(Gitlab::Git::DiffCollection)
- end
- end
-
- context 'with Gitaly disabled', :disable_gitaly do
- it_behaves_like 'initializes a DiffCollection'
- end
-
- context 'with Gitaly enabled' do
- it_behaves_like 'initializes a DiffCollection'
+ it 'returns a valid instance of a DiffCollection' do
+ expect(diff_files).to be_a(Gitlab::Git::DiffCollection)
end
end
diff --git a/spec/lib/gitlab/diff/inline_diff_marker_spec.rb b/spec/lib/gitlab/diff/inline_diff_marker_spec.rb
index 7296bbf5df3..97e65318059 100644
--- a/spec/lib/gitlab/diff/inline_diff_marker_spec.rb
+++ b/spec/lib/gitlab/diff/inline_diff_marker_spec.rb
@@ -16,7 +16,7 @@ describe Gitlab::Diff::InlineDiffMarker do
end
end
- context "when the text text is not html safe" do
+ context "when the text is not html safe" do
let(:rich) { "abc 'def' differs" }
it 'marks the range' do
diff --git a/spec/lib/gitlab/email/reply_parser_spec.rb b/spec/lib/gitlab/email/reply_parser_spec.rb
index 0989188f7ee..376d3accd55 100644
--- a/spec/lib/gitlab/email/reply_parser_spec.rb
+++ b/spec/lib/gitlab/email/reply_parser_spec.rb
@@ -49,7 +49,7 @@ describe Gitlab::Email::ReplyParser do
expect(test_parse_body(fixture_file("emails/paragraphs.eml")))
.to eq(
<<-BODY.strip_heredoc.chomp
- Is there any reason the *old* candy can't be be kept in silos while the new candy
+ Is there any reason the *old* candy can't be kept in silos while the new candy
is imported into *new* silos?
The thing about candy is it stays delicious for a long time -- we can just keep
diff --git a/spec/lib/gitlab/git/blob_spec.rb b/spec/lib/gitlab/git/blob_spec.rb
index b243f0dacae..80dd3dcc58e 100644
--- a/spec/lib/gitlab/git/blob_spec.rb
+++ b/spec/lib/gitlab/git/blob_spec.rb
@@ -128,7 +128,7 @@ describe Gitlab::Git::Blob, :seed_helper do
end
end
- shared_examples 'finding blobs by ID' do
+ describe '.raw' do
let(:raw_blob) { Gitlab::Git::Blob.raw(repository, SeedRepo::RubyBlob::ID) }
let(:bad_blob) { Gitlab::Git::Blob.raw(repository, SeedRepo::BigCommit::ID) }
@@ -166,16 +166,6 @@ describe Gitlab::Git::Blob, :seed_helper do
end
end
- describe '.raw' do
- context 'when the blob_raw Gitaly feature is enabled' do
- it_behaves_like 'finding blobs by ID'
- end
-
- context 'when the blob_raw Gitaly feature is disabled', :skip_gitaly_mock do
- it_behaves_like 'finding blobs by ID'
- end
- end
-
describe '.batch' do
let(:blob_references) do
[
diff --git a/spec/lib/gitlab/git/commit_spec.rb b/spec/lib/gitlab/git/commit_spec.rb
index 6be35eee0fd..74d542060d5 100644
--- a/spec/lib/gitlab/git/commit_spec.rb
+++ b/spec/lib/gitlab/git/commit_spec.rb
@@ -183,110 +183,100 @@ describe Gitlab::Git::Commit, :seed_helper do
end
end
- shared_examples '.where' do
- context 'path is empty string' do
- subject do
- commits = described_class.where(
- repo: repository,
- ref: 'master',
- path: '',
- limit: 10
- )
-
- commits.map { |c| c.id }
- end
+ context 'path is empty string' do
+ subject do
+ commits = described_class.where(
+ repo: repository,
+ ref: 'master',
+ path: '',
+ limit: 10
+ )
- it 'has 10 elements' do
- expect(subject.size).to eq(10)
- end
- it { is_expected.to include(SeedRepo::EmptyCommit::ID) }
+ commits.map { |c| c.id }
end
- context 'path is nil' do
- subject do
- commits = described_class.where(
- repo: repository,
- ref: 'master',
- path: nil,
- limit: 10
- )
-
- commits.map { |c| c.id }
- end
-
- it 'has 10 elements' do
- expect(subject.size).to eq(10)
- end
- it { is_expected.to include(SeedRepo::EmptyCommit::ID) }
+ it 'has 10 elements' do
+ expect(subject.size).to eq(10)
end
+ it { is_expected.to include(SeedRepo::EmptyCommit::ID) }
+ end
- context 'ref is branch name' do
- subject do
- commits = described_class.where(
- repo: repository,
- ref: 'master',
- path: 'files',
- limit: 3,
- offset: 1
- )
+ context 'path is nil' do
+ subject do
+ commits = described_class.where(
+ repo: repository,
+ ref: 'master',
+ path: nil,
+ limit: 10
+ )
- commits.map { |c| c.id }
- end
+ commits.map { |c| c.id }
+ end
- it 'has 3 elements' do
- expect(subject.size).to eq(3)
- end
- it { is_expected.to include("d14d6c0abdd253381df51a723d58691b2ee1ab08") }
- it { is_expected.not_to include("eb49186cfa5c4338011f5f590fac11bd66c5c631") }
+ it 'has 10 elements' do
+ expect(subject.size).to eq(10)
end
+ it { is_expected.to include(SeedRepo::EmptyCommit::ID) }
+ end
- context 'ref is commit id' do
- subject do
- commits = described_class.where(
- repo: repository,
- ref: "874797c3a73b60d2187ed6e2fcabd289ff75171e",
- path: 'files',
- limit: 3,
- offset: 1
- )
+ context 'ref is branch name' do
+ subject do
+ commits = described_class.where(
+ repo: repository,
+ ref: 'master',
+ path: 'files',
+ limit: 3,
+ offset: 1
+ )
- commits.map { |c| c.id }
- end
+ commits.map { |c| c.id }
+ end
- it 'has 3 elements' do
- expect(subject.size).to eq(3)
- end
- it { is_expected.to include("2f63565e7aac07bcdadb654e253078b727143ec4") }
- it { is_expected.not_to include(SeedRepo::Commit::ID) }
+ it 'has 3 elements' do
+ expect(subject.size).to eq(3)
end
+ it { is_expected.to include("d14d6c0abdd253381df51a723d58691b2ee1ab08") }
+ it { is_expected.not_to include("eb49186cfa5c4338011f5f590fac11bd66c5c631") }
+ end
- context 'ref is tag' do
- subject do
- commits = described_class.where(
- repo: repository,
- ref: 'v1.0.0',
- path: 'files',
- limit: 3,
- offset: 1
- )
+ context 'ref is commit id' do
+ subject do
+ commits = described_class.where(
+ repo: repository,
+ ref: "874797c3a73b60d2187ed6e2fcabd289ff75171e",
+ path: 'files',
+ limit: 3,
+ offset: 1
+ )
- commits.map { |c| c.id }
- end
+ commits.map { |c| c.id }
+ end
- it 'has 3 elements' do
- expect(subject.size).to eq(3)
- end
- it { is_expected.to include("874797c3a73b60d2187ed6e2fcabd289ff75171e") }
- it { is_expected.not_to include(SeedRepo::Commit::ID) }
+ it 'has 3 elements' do
+ expect(subject.size).to eq(3)
end
+ it { is_expected.to include("2f63565e7aac07bcdadb654e253078b727143ec4") }
+ it { is_expected.not_to include(SeedRepo::Commit::ID) }
end
- describe '.where with gitaly' do
- it_should_behave_like '.where'
- end
+ context 'ref is tag' do
+ subject do
+ commits = described_class.where(
+ repo: repository,
+ ref: 'v1.0.0',
+ path: 'files',
+ limit: 3,
+ offset: 1
+ )
- describe '.where without gitaly', :skip_gitaly_mock do
- it_should_behave_like '.where'
+ commits.map { |c| c.id }
+ end
+
+ it 'has 3 elements' do
+ expect(subject.size).to eq(3)
+ end
+ it { is_expected.to include("874797c3a73b60d2187ed6e2fcabd289ff75171e") }
+ it { is_expected.not_to include(SeedRepo::Commit::ID) }
end
describe '.between' do
@@ -508,7 +498,7 @@ describe Gitlab::Git::Commit, :seed_helper do
end
end
- shared_examples '#stats' do
+ describe '#stats' do
subject { commit.stats }
describe '#additions' do
@@ -527,14 +517,6 @@ describe Gitlab::Git::Commit, :seed_helper do
end
end
- describe '#stats with gitaly on' do
- it_should_behave_like '#stats'
- end
-
- describe '#stats with gitaly disabled', :skip_gitaly_mock do
- it_should_behave_like '#stats'
- end
-
describe '#has_zero_stats?' do
it { expect(commit.has_zero_stats?).to eq(false) }
end
@@ -577,25 +559,15 @@ describe Gitlab::Git::Commit, :seed_helper do
commit_ids.map { |id| described_class.get_message(repository, id) }
end
- shared_examples 'getting commit messages' do
- it 'gets commit messages' do
- expect(subject).to contain_exactly(
- "Added contributing guide\n\nSigned-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>\n",
- "Add submodule\n\nSigned-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>\n"
- )
- end
- end
-
- context 'when Gitaly commit_messages feature is enabled' do
- it_behaves_like 'getting commit messages'
-
- it 'gets messages in one batch', :request_store do
- expect { subject.map(&:itself) }.to change { Gitlab::GitalyClient.get_request_count }.by(1)
- end
+ it 'gets commit messages' do
+ expect(subject).to contain_exactly(
+ "Added contributing guide\n\nSigned-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>\n",
+ "Add submodule\n\nSigned-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>\n"
+ )
end
- context 'when Gitaly commit_messages feature is disabled', :disable_gitaly do
- it_behaves_like 'getting commit messages'
+ it 'gets messages in one batch', :request_store do
+ expect { subject.map(&:itself) }.to change { Gitlab::GitalyClient.get_request_count }.by(1)
end
end
diff --git a/spec/lib/gitlab/git/merge_base_spec.rb b/spec/lib/gitlab/git/merge_base_spec.rb
index 2f4e043a20f..8d16d451730 100644
--- a/spec/lib/gitlab/git/merge_base_spec.rb
+++ b/spec/lib/gitlab/git/merge_base_spec.rb
@@ -82,7 +82,7 @@ describe Gitlab::Git::MergeBase do
end
describe '#unknown_refs', :missing_ref do
- it 'returns the the refs passed that are not part of the repository' do
+ it 'returns the refs passed that are not part of the repository' do
expect(merge_base.unknown_refs).to contain_exactly('aaaa')
end
diff --git a/spec/lib/gitlab/git/tag_spec.rb b/spec/lib/gitlab/git/tag_spec.rb
index c5bad062c2a..abee2822d77 100644
--- a/spec/lib/gitlab/git/tag_spec.rb
+++ b/spec/lib/gitlab/git/tag_spec.rb
@@ -3,7 +3,7 @@ require "spec_helper"
describe Gitlab::Git::Tag, :seed_helper do
let(:repository) { Gitlab::Git::Repository.new('default', TEST_REPO_PATH, '') }
- shared_examples 'Gitlab::Git::Repository#tags' do
+ describe '#tags' do
describe 'first tag' do
let(:tag) { repository.tags.first }
@@ -25,14 +25,6 @@ describe Gitlab::Git::Tag, :seed_helper do
it { expect(repository.tags.size).to eq(SeedRepo::Repo::TAGS.size) }
end
- context 'when Gitaly tags feature is enabled' do
- it_behaves_like 'Gitlab::Git::Repository#tags'
- end
-
- context 'when Gitaly tags feature is disabled', :skip_gitaly_mock do
- it_behaves_like 'Gitlab::Git::Repository#tags'
- end
-
describe '.get_message' do
let(:tag_ids) { %w[f4e6814c3e4e7a0de82a9e7cd20c626cc963a2f8 8a2a6eb295bb170b34c24c76c49ed0e9b2eaf34b] }
@@ -40,23 +32,13 @@ describe Gitlab::Git::Tag, :seed_helper do
tag_ids.map { |id| described_class.get_message(repository, id) }
end
- shared_examples 'getting tag messages' do
- it 'gets tag messages' do
- expect(subject[0]).to eq("Release\n")
- expect(subject[1]).to eq("Version 1.1.0\n")
- end
- end
-
- context 'when Gitaly tag_messages feature is enabled' do
- it_behaves_like 'getting tag messages'
-
- it 'gets messages in one batch', :request_store do
- expect { subject.map(&:itself) }.to change { Gitlab::GitalyClient.get_request_count }.by(1)
- end
+ it 'gets tag messages' do
+ expect(subject[0]).to eq("Release\n")
+ expect(subject[1]).to eq("Version 1.1.0\n")
end
- context 'when Gitaly tag_messages feature is disabled', :disable_gitaly do
- it_behaves_like 'getting tag messages'
+ it 'gets messages in one batch', :request_store do
+ expect { subject.map(&:itself) }.to change { Gitlab::GitalyClient.get_request_count }.by(1)
end
end
diff --git a/spec/lib/gitlab/git/tree_spec.rb b/spec/lib/gitlab/git/tree_spec.rb
index 3792d6bf67b..bec875fb03d 100644
--- a/spec/lib/gitlab/git/tree_spec.rb
+++ b/spec/lib/gitlab/git/tree_spec.rb
@@ -80,18 +80,8 @@ describe Gitlab::Git::Tree, :seed_helper do
end
describe '#where' do
- shared_examples '#where' do
- it 'returns an empty array when called with an invalid ref' do
- expect(described_class.where(repository, 'foobar-does-not-exist')).to eq([])
- end
- end
-
- context 'with gitaly' do
- it_behaves_like '#where'
- end
-
- context 'without gitaly', :skip_gitaly_mock do
- it_behaves_like '#where'
+ it 'returns an empty array when called with an invalid ref' do
+ expect(described_class.where(repository, 'foobar-does-not-exist')).to eq([])
end
end
end
diff --git a/spec/lib/gitlab/gitaly_client_spec.rb b/spec/lib/gitlab/gitaly_client_spec.rb
index 81bcd8c28ed..5eda4d041a8 100644
--- a/spec/lib/gitlab/gitaly_client_spec.rb
+++ b/spec/lib/gitlab/gitaly_client_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
# We stub Gitaly in `spec/support/gitaly.rb` for other tests. We don't want
# those stubs while testing the GitalyClient itself.
-describe Gitlab::GitalyClient, skip_gitaly_mock: true do
+describe Gitlab::GitalyClient do
describe '.stub_class' do
it 'returns the gRPC health check stub' do
expect(described_class.stub_class(:health_check)).to eq(::Grpc::Health::V1::Health::Stub)
@@ -191,102 +191,13 @@ describe Gitlab::GitalyClient, skip_gitaly_mock: true do
let(:feature_name) { 'my_feature' }
let(:real_feature_name) { "gitaly_#{feature_name}" }
- context 'when Gitaly is disabled' do
- before do
- allow(described_class).to receive(:enabled?).and_return(false)
- end
-
- it 'returns false' do
- expect(described_class.feature_enabled?(feature_name)).to be(false)
- end
- end
-
- context 'when the feature status is DISABLED' do
- let(:feature_status) { Gitlab::GitalyClient::MigrationStatus::DISABLED }
-
- it 'returns false' do
- expect(described_class.feature_enabled?(feature_name, status: feature_status)).to be(false)
- end
- end
-
- context 'when the feature_status is OPT_IN' do
- let(:feature_status) { Gitlab::GitalyClient::MigrationStatus::OPT_IN }
-
- context "when the feature flag hasn't been set" do
- it 'returns false' do
- expect(described_class.feature_enabled?(feature_name, status: feature_status)).to be(false)
- end
- end
-
- context "when the feature flag is set to disable" do
- before do
- Feature.get(real_feature_name).disable
- end
-
- it 'returns false' do
- expect(described_class.feature_enabled?(feature_name, status: feature_status)).to be(false)
- end
- end
-
- context "when the feature flag is set to enable" do
- before do
- Feature.get(real_feature_name).enable
- end
-
- it 'returns true' do
- expect(described_class.feature_enabled?(feature_name, status: feature_status)).to be(true)
- end
- end
-
- context "when the feature flag is set to a percentage of time" do
- before do
- Feature.get(real_feature_name).enable_percentage_of_time(70)
- end
-
- it 'bases the result on pseudo-random numbers' do
- expect(Random).to receive(:rand).and_return(0.3)
- expect(described_class.feature_enabled?(feature_name, status: feature_status)).to be(true)
-
- expect(Random).to receive(:rand).and_return(0.8)
- expect(described_class.feature_enabled?(feature_name, status: feature_status)).to be(false)
- end
- end
-
- context "when a feature is not persisted" do
- it 'returns false when opt_into_all_features is off' do
- allow(Feature).to receive(:persisted?).and_return(false)
- allow(described_class).to receive(:opt_into_all_features?).and_return(false)
-
- expect(described_class.feature_enabled?(feature_name, status: feature_status)).to be(false)
- end
-
- it 'returns true when the override is on' do
- allow(Feature).to receive(:persisted?).and_return(false)
- allow(described_class).to receive(:opt_into_all_features?).and_return(true)
-
- expect(described_class.feature_enabled?(feature_name, status: feature_status)).to be(true)
- end
- end
+ before do
+ allow(Feature).to receive(:enabled?).and_return(false)
end
- context 'when the feature_status is OPT_OUT' do
- let(:feature_status) { Gitlab::GitalyClient::MigrationStatus::OPT_OUT }
-
- context "when the feature flag hasn't been set" do
- it 'returns true' do
- expect(described_class.feature_enabled?(feature_name, status: feature_status)).to be(true)
- end
- end
-
- context "when the feature flag is set to disable" do
- before do
- Feature.get(real_feature_name).disable
- end
-
- it 'returns false' do
- expect(described_class.feature_enabled?(feature_name, status: feature_status)).to be(false)
- end
- end
+ it 'returns false' do
+ expect(Feature).to receive(:enabled?).with(real_feature_name)
+ expect(described_class.feature_enabled?(feature_name)).to be(false)
end
end
@@ -305,4 +216,29 @@ describe Gitlab::GitalyClient, skip_gitaly_mock: true do
end
end
end
+
+ describe 'Peek Performance bar details' do
+ let(:gitaly_server) { Gitaly::Server.all.first }
+
+ before do
+ Gitlab::SafeRequestStore[:peek_enabled] = true
+ end
+
+ context 'when the request store is active', :request_store do
+ it 'records call details if a RPC is called' do
+ gitaly_server.server_version
+
+ expect(described_class.list_call_details).not_to be_empty
+ expect(described_class.list_call_details.size).to be(1)
+ end
+ end
+
+ context 'when no request store is active' do
+ it 'records nothing' do
+ gitaly_server.server_version
+
+ expect(described_class.list_call_details).to be_empty
+ end
+ end
+ end
end
diff --git a/spec/lib/gitlab/multi_collection_paginator_spec.rb b/spec/lib/gitlab/multi_collection_paginator_spec.rb
index 68bd4f93159..28cd704b05a 100644
--- a/spec/lib/gitlab/multi_collection_paginator_spec.rb
+++ b/spec/lib/gitlab/multi_collection_paginator_spec.rb
@@ -28,7 +28,7 @@ describe Gitlab::MultiCollectionPaginator do
expect(paginator.paginate(1)).to eq(all_projects.take(3))
end
- it 'fils the second page with a mixture of of the first & second collection' do
+ it 'fils the second page with a mixture of the first & second collection' do
first_collection_element = all_projects.last
second_collection_elements = all_groups.take(2)
diff --git a/spec/models/ci/build_trace_chunk_spec.rb b/spec/models/ci/build_trace_chunk_spec.rb
index 915bf134d57..59c861a74db 100644
--- a/spec/models/ci/build_trace_chunk_spec.rb
+++ b/spec/models/ci/build_trace_chunk_spec.rb
@@ -45,11 +45,11 @@ describe Ci::BuildTraceChunk, :clean_gitlab_redis_shared_state do
is_expected.to eq(%w[redis database fog])
end
- it 'returns redis store as the the lowest precedence' do
+ it 'returns redis store as the lowest precedence' do
expect(subject.first).to eq('redis')
end
- it 'returns fog store as the the highest precedence' do
+ it 'returns fog store as the highest precedence' do
expect(subject.last).to eq('fog')
end
end
diff --git a/spec/models/list_spec.rb b/spec/models/list_spec.rb
index a6cc01bea5f..17dc27bd132 100644
--- a/spec/models/list_spec.rb
+++ b/spec/models/list_spec.rb
@@ -22,13 +22,13 @@ describe List do
end
describe '#destroy' do
- it 'can be destroyed when when list_type is set to label' do
+ it 'can be destroyed when list_type is set to label' do
subject = create(:list)
expect(subject.destroy).to be_truthy
end
- it 'can not be destroyed when when list_type is set to closed' do
+ it 'can not be destroyed when list_type is set to closed' do
subject = create(:closed_list)
expect(subject.destroy).to be_falsey
diff --git a/spec/models/merge_request_spec.rb b/spec/models/merge_request_spec.rb
index a58dc8e25e8..ad55c280399 100644
--- a/spec/models/merge_request_spec.rb
+++ b/spec/models/merge_request_spec.rb
@@ -30,48 +30,38 @@ describe MergeRequest do
end
describe '#squash_in_progress?' do
- shared_examples 'checking whether a squash is in progress' do
- let(:repo_path) do
- Gitlab::GitalyClient::StorageSettings.allow_disk_access do
- subject.source_project.repository.path
- end
- end
- let(:squash_path) { File.join(repo_path, "gitlab-worktree", "squash-#{subject.id}") }
-
- before do
- system(*%W(#{Gitlab.config.git.bin_path} -C #{repo_path} worktree add --detach #{squash_path} master))
- end
-
- it 'returns true when there is a current squash directory' do
- expect(subject.squash_in_progress?).to be_truthy
+ let(:repo_path) do
+ Gitlab::GitalyClient::StorageSettings.allow_disk_access do
+ subject.source_project.repository.path
end
+ end
+ let(:squash_path) { File.join(repo_path, "gitlab-worktree", "squash-#{subject.id}") }
- it 'returns false when there is no squash directory' do
- FileUtils.rm_rf(squash_path)
+ before do
+ system(*%W(#{Gitlab.config.git.bin_path} -C #{repo_path} worktree add --detach #{squash_path} master))
+ end
- expect(subject.squash_in_progress?).to be_falsey
- end
+ it 'returns true when there is a current squash directory' do
+ expect(subject.squash_in_progress?).to be_truthy
+ end
- it 'returns false when the squash directory has expired' do
- time = 20.minutes.ago.to_time
- File.utime(time, time, squash_path)
+ it 'returns false when there is no squash directory' do
+ FileUtils.rm_rf(squash_path)
- expect(subject.squash_in_progress?).to be_falsey
- end
+ expect(subject.squash_in_progress?).to be_falsey
+ end
- it 'returns false when the source project has been removed' do
- allow(subject).to receive(:source_project).and_return(nil)
+ it 'returns false when the squash directory has expired' do
+ time = 20.minutes.ago.to_time
+ File.utime(time, time, squash_path)
- expect(subject.squash_in_progress?).to be_falsey
- end
+ expect(subject.squash_in_progress?).to be_falsey
end
- context 'when Gitaly squash_in_progress is enabled' do
- it_behaves_like 'checking whether a squash is in progress'
- end
+ it 'returns false when the source project has been removed' do
+ allow(subject).to receive(:source_project).and_return(nil)
- context 'when Gitaly squash_in_progress is disabled', :disable_gitaly do
- it_behaves_like 'checking whether a squash is in progress'
+ expect(subject.squash_in_progress?).to be_falsey
end
end
@@ -2587,14 +2577,6 @@ describe MergeRequest do
expect(subject.rebase_in_progress?).to be_falsey
end
end
-
- context 'when Gitaly rebase_in_progress is enabled' do
- it_behaves_like 'checking whether a rebase is in progress'
- end
-
- context 'when Gitaly rebase_in_progress is enabled', :disable_gitaly do
- it_behaves_like 'checking whether a rebase is in progress'
- end
end
describe '#allow_collaboration' do
diff --git a/spec/models/project_wiki_spec.rb b/spec/models/project_wiki_spec.rb
index cc5e34782ec..48a43801b9f 100644
--- a/spec/models/project_wiki_spec.rb
+++ b/spec/models/project_wiki_spec.rb
@@ -130,63 +130,53 @@ describe ProjectWiki do
end
describe "#find_page" do
- shared_examples 'finding a wiki page' do
- before do
- create_page("index page", "This is an awesome Gollum Wiki")
- end
-
- after do
- subject.pages.each { |page| destroy_page(page.page) }
- end
+ before do
+ create_page("index page", "This is an awesome Gollum Wiki")
+ end
- it "returns the latest version of the page if it exists" do
- page = subject.find_page("index page")
- expect(page.title).to eq("index page")
- end
+ after do
+ subject.pages.each { |page| destroy_page(page.page) }
+ end
- it "returns nil if the page does not exist" do
- expect(subject.find_page("non-existent")).to eq(nil)
- end
+ it "returns the latest version of the page if it exists" do
+ page = subject.find_page("index page")
+ expect(page.title).to eq("index page")
+ end
- it "can find a page by slug" do
- page = subject.find_page("index-page")
- expect(page.title).to eq("index page")
- end
+ it "returns nil if the page does not exist" do
+ expect(subject.find_page("non-existent")).to eq(nil)
+ end
- it "returns a WikiPage instance" do
- page = subject.find_page("index page")
- expect(page).to be_a WikiPage
- end
+ it "can find a page by slug" do
+ page = subject.find_page("index-page")
+ expect(page.title).to eq("index page")
+ end
- context 'pages with multibyte-character title' do
- before do
- create_page("autre pagé", "C'est un génial Gollum Wiki")
- end
+ it "returns a WikiPage instance" do
+ page = subject.find_page("index page")
+ expect(page).to be_a WikiPage
+ end
- it "can find a page by slug" do
- page = subject.find_page("autre pagé")
- expect(page.title).to eq("autre pagé")
- end
+ context 'pages with multibyte-character title' do
+ before do
+ create_page("autre pagé", "C'est un génial Gollum Wiki")
end
- context 'pages with invalidly-encoded content' do
- before do
- create_page("encoding is fun", "f\xFCr".b)
- end
-
- it "can find the page" do
- page = subject.find_page("encoding is fun")
- expect(page.content).to eq("fr")
- end
+ it "can find a page by slug" do
+ page = subject.find_page("autre pagé")
+ expect(page.title).to eq("autre pagé")
end
end
- context 'when Gitaly wiki_find_page is enabled' do
- it_behaves_like 'finding a wiki page'
- end
+ context 'pages with invalidly-encoded content' do
+ before do
+ create_page("encoding is fun", "f\xFCr".b)
+ end
- context 'when Gitaly wiki_find_page is disabled', :skip_gitaly_mock do
- it_behaves_like 'finding a wiki page'
+ it "can find the page" do
+ page = subject.find_page("encoding is fun")
+ expect(page.content).to eq("fr")
+ end
end
end
@@ -207,100 +197,80 @@ describe ProjectWiki do
end
describe '#find_file' do
- shared_examples 'finding a wiki file' do
- let(:image) { File.open(Rails.root.join('spec', 'fixtures', 'big-image.png')) }
-
- before do
- subject.wiki # Make sure the wiki repo exists
-
- repo_path = Gitlab::GitalyClient::StorageSettings.allow_disk_access do
- subject.repository.path_to_repo
- end
-
- BareRepoOperations.new(repo_path).commit_file(image, 'image.png')
- end
+ let(:image) { File.open(Rails.root.join('spec', 'fixtures', 'big-image.png')) }
- it 'returns the latest version of the file if it exists' do
- file = subject.find_file('image.png')
- expect(file.mime_type).to eq('image/png')
- end
+ before do
+ subject.wiki # Make sure the wiki repo exists
- it 'returns nil if the page does not exist' do
- expect(subject.find_file('non-existent')).to eq(nil)
+ repo_path = Gitlab::GitalyClient::StorageSettings.allow_disk_access do
+ subject.repository.path_to_repo
end
- it 'returns a Gitlab::Git::WikiFile instance' do
- file = subject.find_file('image.png')
- expect(file).to be_a Gitlab::Git::WikiFile
- end
+ BareRepoOperations.new(repo_path).commit_file(image, 'image.png')
+ end
- it 'returns the whole file' do
- file = subject.find_file('image.png')
- image.rewind
+ it 'returns the latest version of the file if it exists' do
+ file = subject.find_file('image.png')
+ expect(file.mime_type).to eq('image/png')
+ end
- expect(file.raw_data.b).to eq(image.read.b)
- end
+ it 'returns nil if the page does not exist' do
+ expect(subject.find_file('non-existent')).to eq(nil)
end
- context 'when Gitaly wiki_find_file is enabled' do
- it_behaves_like 'finding a wiki file'
+ it 'returns a Gitlab::Git::WikiFile instance' do
+ file = subject.find_file('image.png')
+ expect(file).to be_a Gitlab::Git::WikiFile
end
- context 'when Gitaly wiki_find_file is disabled', :skip_gitaly_mock do
- it_behaves_like 'finding a wiki file'
+ it 'returns the whole file' do
+ file = subject.find_file('image.png')
+ image.rewind
+
+ expect(file.raw_data.b).to eq(image.read.b)
end
end
describe "#create_page" do
- shared_examples 'creating a wiki page' do
- after do
- destroy_page(subject.pages.first.page)
- end
-
- it "creates a new wiki page" do
- expect(subject.create_page("test page", "this is content")).not_to eq(false)
- expect(subject.pages.count).to eq(1)
- end
-
- it "returns false when a duplicate page exists" do
- subject.create_page("test page", "content")
- expect(subject.create_page("test page", "content")).to eq(false)
- end
-
- it "stores an error message when a duplicate page exists" do
- 2.times { subject.create_page("test page", "content") }
- expect(subject.error_message).to match(/Duplicate page:/)
- end
+ after do
+ destroy_page(subject.pages.first.page)
+ end
- it "sets the correct commit message" do
- subject.create_page("test page", "some content", :markdown, "commit message")
- expect(subject.pages.first.page.version.message).to eq("commit message")
- end
+ it "creates a new wiki page" do
+ expect(subject.create_page("test page", "this is content")).not_to eq(false)
+ expect(subject.pages.count).to eq(1)
+ end
- it 'sets the correct commit email' do
- subject.create_page('test page', 'content')
+ it "returns false when a duplicate page exists" do
+ subject.create_page("test page", "content")
+ expect(subject.create_page("test page", "content")).to eq(false)
+ end
- expect(user.commit_email).not_to eq(user.email)
- expect(commit.author_email).to eq(user.commit_email)
- expect(commit.committer_email).to eq(user.commit_email)
- end
+ it "stores an error message when a duplicate page exists" do
+ 2.times { subject.create_page("test page", "content") }
+ expect(subject.error_message).to match(/Duplicate page:/)
+ end
- it 'updates project activity' do
- subject.create_page('Test Page', 'This is content')
+ it "sets the correct commit message" do
+ subject.create_page("test page", "some content", :markdown, "commit message")
+ expect(subject.pages.first.page.version.message).to eq("commit message")
+ end
- project.reload
+ it 'sets the correct commit email' do
+ subject.create_page('test page', 'content')
- expect(project.last_activity_at).to be_within(1.minute).of(Time.now)
- expect(project.last_repository_updated_at).to be_within(1.minute).of(Time.now)
- end
+ expect(user.commit_email).not_to eq(user.email)
+ expect(commit.author_email).to eq(user.commit_email)
+ expect(commit.committer_email).to eq(user.commit_email)
end
- context 'when Gitaly wiki_write_page is enabled' do
- it_behaves_like 'creating a wiki page'
- end
+ it 'updates project activity' do
+ subject.create_page('Test Page', 'This is content')
- context 'when Gitaly wiki_write_page is disabled', :skip_gitaly_mock do
- it_behaves_like 'creating a wiki page'
+ project.reload
+
+ expect(project.last_activity_at).to be_within(1.minute).of(Time.now)
+ expect(project.last_repository_updated_at).to be_within(1.minute).of(Time.now)
end
end
@@ -351,41 +321,31 @@ describe ProjectWiki do
end
describe "#delete_page" do
- shared_examples 'deleting a wiki page' do
- before do
- create_page("index", "some content")
- @page = subject.wiki.page(title: "index")
- end
-
- it "deletes the page" do
- subject.delete_page(@page)
- expect(subject.pages.count).to eq(0)
- end
-
- it 'sets the correct commit email' do
- subject.delete_page(@page)
-
- expect(user.commit_email).not_to eq(user.email)
- expect(commit.author_email).to eq(user.commit_email)
- expect(commit.committer_email).to eq(user.commit_email)
- end
+ before do
+ create_page("index", "some content")
+ @page = subject.wiki.page(title: "index")
+ end
- it 'updates project activity' do
- subject.delete_page(@page)
+ it "deletes the page" do
+ subject.delete_page(@page)
+ expect(subject.pages.count).to eq(0)
+ end
- project.reload
+ it 'sets the correct commit email' do
+ subject.delete_page(@page)
- expect(project.last_activity_at).to be_within(1.minute).of(Time.now)
- expect(project.last_repository_updated_at).to be_within(1.minute).of(Time.now)
- end
+ expect(user.commit_email).not_to eq(user.email)
+ expect(commit.author_email).to eq(user.commit_email)
+ expect(commit.committer_email).to eq(user.commit_email)
end
- context 'when Gitaly wiki_delete_page is enabled' do
- it_behaves_like 'deleting a wiki page'
- end
+ it 'updates project activity' do
+ subject.delete_page(@page)
+
+ project.reload
- context 'when Gitaly wiki_delete_page is disabled', :skip_gitaly_mock do
- it_behaves_like 'deleting a wiki page'
+ expect(project.last_activity_at).to be_within(1.minute).of(Time.now)
+ expect(project.last_repository_updated_at).to be_within(1.minute).of(Time.now)
end
end
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb
index 56edb0fd6da..187283b284b 100644
--- a/spec/models/repository_spec.rb
+++ b/spec/models/repository_spec.rb
@@ -38,49 +38,29 @@ describe Repository do
end
describe '#branch_names_contains' do
- shared_examples '#branch_names_contains' do
- set(:project) { create(:project, :repository) }
- let(:repository) { project.repository }
+ set(:project) { create(:project, :repository) }
+ let(:repository) { project.repository }
- subject { repository.branch_names_contains(sample_commit.id) }
+ subject { repository.branch_names_contains(sample_commit.id) }
- it { is_expected.to include('master') }
- it { is_expected.not_to include('feature') }
- it { is_expected.not_to include('fix') }
+ it { is_expected.to include('master') }
+ it { is_expected.not_to include('feature') }
+ it { is_expected.not_to include('fix') }
- describe 'when storage is broken', :broken_storage do
- it 'should raise a storage error' do
- expect_to_raise_storage_error do
- broken_repository.branch_names_contains(sample_commit.id)
- end
+ describe 'when storage is broken', :broken_storage do
+ it 'should raise a storage error' do
+ expect_to_raise_storage_error do
+ broken_repository.branch_names_contains(sample_commit.id)
end
end
end
-
- context 'when gitaly is enabled' do
- it_behaves_like '#branch_names_contains'
- end
-
- context 'when gitaly is disabled', :skip_gitaly_mock do
- it_behaves_like '#branch_names_contains'
- end
end
describe '#tag_names_contains' do
- shared_examples '#tag_names_contains' do
- subject { repository.tag_names_contains(sample_commit.id) }
-
- it { is_expected.to include('v1.1.0') }
- it { is_expected.not_to include('v1.0.0') }
- end
-
- context 'when gitaly is enabled' do
- it_behaves_like '#tag_names_contains'
- end
+ subject { repository.tag_names_contains(sample_commit.id) }
- context 'when gitaly is enabled', :skip_gitaly_mock do
- it_behaves_like '#tag_names_contains'
- end
+ it { is_expected.to include('v1.1.0') }
+ it { is_expected.not_to include('v1.0.0') }
end
describe 'tags_sorted_by' do
@@ -238,61 +218,41 @@ describe Repository do
end
describe '#last_commit_for_path' do
- shared_examples 'getting last commit for path' do
- subject { repository.last_commit_for_path(sample_commit.id, '.gitignore').id }
+ subject { repository.last_commit_for_path(sample_commit.id, '.gitignore').id }
- it { is_expected.to eq('c1acaa58bbcbc3eafe538cb8274ba387047b69f8') }
+ it { is_expected.to eq('c1acaa58bbcbc3eafe538cb8274ba387047b69f8') }
- describe 'when storage is broken', :broken_storage do
- it 'should raise a storage error' do
- expect_to_raise_storage_error do
- broken_repository.last_commit_id_for_path(sample_commit.id, '.gitignore')
- end
+ describe 'when storage is broken', :broken_storage do
+ it 'should raise a storage error' do
+ expect_to_raise_storage_error do
+ broken_repository.last_commit_id_for_path(sample_commit.id, '.gitignore')
end
end
end
-
- context 'when Gitaly feature last_commit_for_path is enabled' do
- it_behaves_like 'getting last commit for path'
- end
-
- context 'when Gitaly feature last_commit_for_path is disabled', :skip_gitaly_mock do
- it_behaves_like 'getting last commit for path'
- end
end
describe '#last_commit_id_for_path' do
- shared_examples 'getting last commit ID for path' do
- subject { repository.last_commit_id_for_path(sample_commit.id, '.gitignore') }
+ subject { repository.last_commit_id_for_path(sample_commit.id, '.gitignore') }
- it "returns last commit id for a given path" do
- is_expected.to eq('c1acaa58bbcbc3eafe538cb8274ba387047b69f8')
- end
+ it "returns last commit id for a given path" do
+ is_expected.to eq('c1acaa58bbcbc3eafe538cb8274ba387047b69f8')
+ end
- it "caches last commit id for a given path" do
- cache = repository.send(:cache)
- key = "last_commit_id_for_path:#{sample_commit.id}:#{Digest::SHA1.hexdigest('.gitignore')}"
+ it "caches last commit id for a given path" do
+ cache = repository.send(:cache)
+ key = "last_commit_id_for_path:#{sample_commit.id}:#{Digest::SHA1.hexdigest('.gitignore')}"
- expect(cache).to receive(:fetch).with(key).and_return('c1acaa5')
- is_expected.to eq('c1acaa5')
- end
+ expect(cache).to receive(:fetch).with(key).and_return('c1acaa5')
+ is_expected.to eq('c1acaa5')
+ end
- describe 'when storage is broken', :broken_storage do
- it 'should raise a storage error' do
- expect_to_raise_storage_error do
- broken_repository.last_commit_for_path(sample_commit.id, '.gitignore').id
- end
+ describe 'when storage is broken', :broken_storage do
+ it 'should raise a storage error' do
+ expect_to_raise_storage_error do
+ broken_repository.last_commit_for_path(sample_commit.id, '.gitignore').id
end
end
end
-
- context 'when Gitaly feature last_commit_for_path is enabled' do
- it_behaves_like 'getting last commit ID for path'
- end
-
- context 'when Gitaly feature last_commit_for_path is disabled', :skip_gitaly_mock do
- it_behaves_like 'getting last commit ID for path'
- end
end
describe '#commits' do
@@ -374,78 +334,57 @@ describe Repository do
describe '#commits_by' do
set(:project) { create(:project, :repository) }
+ let(:oids) { TestEnv::BRANCH_SHA.values }
- shared_examples 'batch commits fetching' do
- let(:oids) { TestEnv::BRANCH_SHA.values }
+ subject { project.repository.commits_by(oids: oids) }
- subject { project.repository.commits_by(oids: oids) }
+ it 'finds each commit' do
+ expect(subject).not_to include(nil)
+ expect(subject.size).to eq(oids.size)
+ end
- it 'finds each commit' do
- expect(subject).not_to include(nil)
- expect(subject.size).to eq(oids.size)
- end
+ it 'returns only Commit instances' do
+ expect(subject).to all( be_a(Commit) )
+ end
- it 'returns only Commit instances' do
- expect(subject).to all( be_a(Commit) )
+ context 'when some commits are not found ' do
+ let(:oids) do
+ ['deadbeef'] + TestEnv::BRANCH_SHA.values.first(10)
end
- context 'when some commits are not found ' do
- let(:oids) do
- ['deadbeef'] + TestEnv::BRANCH_SHA.values.first(10)
- end
-
- it 'returns only found commits' do
- expect(subject).not_to include(nil)
- expect(subject.size).to eq(10)
- end
+ it 'returns only found commits' do
+ expect(subject).not_to include(nil)
+ expect(subject.size).to eq(10)
end
+ end
- context 'when no oids are passed' do
- let(:oids) { [] }
+ context 'when no oids are passed' do
+ let(:oids) { [] }
- it 'does not call #batch_by_oid' do
- expect(Gitlab::Git::Commit).not_to receive(:batch_by_oid)
+ it 'does not call #batch_by_oid' do
+ expect(Gitlab::Git::Commit).not_to receive(:batch_by_oid)
- subject
- end
+ subject
end
end
-
- context 'when Gitaly list_commits_by_oid is enabled' do
- it_behaves_like 'batch commits fetching'
- end
-
- context 'when Gitaly list_commits_by_oid is enabled', :disable_gitaly do
- it_behaves_like 'batch commits fetching'
- end
end
describe '#find_commits_by_message' do
- shared_examples 'finding commits by message' do
- it 'returns commits with messages containing a given string' do
- commit_ids = repository.find_commits_by_message('submodule').map(&:id)
-
- expect(commit_ids).to include(
- '5937ac0a7beb003549fc5fd26fc247adbce4a52e',
- '6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9',
- 'cfe32cf61b73a0d5e9f13e774abde7ff789b1660'
- )
- expect(commit_ids).not_to include('913c66a37b4a45b9769037c55c2d238bd0942d2e')
- end
-
- it 'is case insensitive' do
- commit_ids = repository.find_commits_by_message('SUBMODULE').map(&:id)
+ it 'returns commits with messages containing a given string' do
+ commit_ids = repository.find_commits_by_message('submodule').map(&:id)
- expect(commit_ids).to include('5937ac0a7beb003549fc5fd26fc247adbce4a52e')
- end
+ expect(commit_ids).to include(
+ '5937ac0a7beb003549fc5fd26fc247adbce4a52e',
+ '6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9',
+ 'cfe32cf61b73a0d5e9f13e774abde7ff789b1660'
+ )
+ expect(commit_ids).not_to include('913c66a37b4a45b9769037c55c2d238bd0942d2e')
end
- context 'when Gitaly commits_by_message feature is enabled' do
- it_behaves_like 'finding commits by message'
- end
+ it 'is case insensitive' do
+ commit_ids = repository.find_commits_by_message('SUBMODULE').map(&:id)
- context 'when Gitaly commits_by_message feature is disabled', :skip_gitaly_mock do
- it_behaves_like 'finding commits by message'
+ expect(commit_ids).to include('5937ac0a7beb003549fc5fd26fc247adbce4a52e')
end
describe 'when storage is broken', :broken_storage do
@@ -1328,34 +1267,23 @@ describe Repository do
describe '#merge' do
let(:merge_request) { create(:merge_request, source_branch: 'feature', target_branch: 'master', source_project: project) }
-
let(:message) { 'Test \r\n\r\n message' }
- shared_examples '#merge' do
- it 'merges the code and returns the commit id' do
- expect(merge_commit).to be_present
- expect(repository.blob_at(merge_commit.id, 'files/ruby/feature.rb')).to be_present
- end
-
- it 'sets the `in_progress_merge_commit_sha` flag for the given merge request' do
- merge_commit_id = merge(repository, user, merge_request, message)
-
- expect(merge_request.in_progress_merge_commit_sha).to eq(merge_commit_id)
- end
+ it 'merges the code and returns the commit id' do
+ expect(merge_commit).to be_present
+ expect(repository.blob_at(merge_commit.id, 'files/ruby/feature.rb')).to be_present
+ end
- it 'removes carriage returns from commit message' do
- merge_commit_id = merge(repository, user, merge_request, message)
+ it 'sets the `in_progress_merge_commit_sha` flag for the given merge request' do
+ merge_commit_id = merge(repository, user, merge_request, message)
- expect(repository.commit(merge_commit_id).message).to eq(message.delete("\r"))
- end
+ expect(merge_request.in_progress_merge_commit_sha).to eq(merge_commit_id)
end
- context 'with gitaly' do
- it_behaves_like '#merge'
- end
+ it 'removes carriage returns from commit message' do
+ merge_commit_id = merge(repository, user, merge_request, message)
- context 'without gitaly', :skip_gitaly_mock do
- it_behaves_like '#merge'
+ expect(repository.commit(merge_commit_id).message).to eq(message.delete("\r"))
end
def merge(repository, user, merge_request, message)
@@ -1392,98 +1320,78 @@ describe Repository do
end
describe '#revert' do
- shared_examples 'reverting a commit' do
- let(:new_image_commit) { repository.commit('33f3729a45c02fc67d00adb1b8bca394b0e761d9') }
- let(:update_image_commit) { repository.commit('2f63565e7aac07bcdadb654e253078b727143ec4') }
- let(:message) { 'revert message' }
-
- context 'when there is a conflict' do
- it 'raises an error' do
- expect { repository.revert(user, new_image_commit, 'master', message) }.to raise_error(Gitlab::Git::Repository::CreateTreeError)
- end
- end
+ let(:new_image_commit) { repository.commit('33f3729a45c02fc67d00adb1b8bca394b0e761d9') }
+ let(:update_image_commit) { repository.commit('2f63565e7aac07bcdadb654e253078b727143ec4') }
+ let(:message) { 'revert message' }
- context 'when commit was already reverted' do
- it 'raises an error' do
- repository.revert(user, update_image_commit, 'master', message)
-
- expect { repository.revert(user, update_image_commit, 'master', message) }.to raise_error(Gitlab::Git::Repository::CreateTreeError)
- end
- end
-
- context 'when commit can be reverted' do
- it 'reverts the changes' do
- expect(repository.revert(user, update_image_commit, 'master', message)).to be_truthy
- end
+ context 'when there is a conflict' do
+ it 'raises an error' do
+ expect { repository.revert(user, new_image_commit, 'master', message) }.to raise_error(Gitlab::Git::Repository::CreateTreeError)
end
+ end
- context 'reverting a merge commit' do
- it 'reverts the changes' do
- merge_commit
- expect(repository.blob_at_branch('master', 'files/ruby/feature.rb')).to be_present
+ context 'when commit was already reverted' do
+ it 'raises an error' do
+ repository.revert(user, update_image_commit, 'master', message)
- repository.revert(user, merge_commit, 'master', message)
- expect(repository.blob_at_branch('master', 'files/ruby/feature.rb')).not_to be_present
- end
+ expect { repository.revert(user, update_image_commit, 'master', message) }.to raise_error(Gitlab::Git::Repository::CreateTreeError)
end
end
- context 'when Gitaly revert feature is enabled' do
- it_behaves_like 'reverting a commit'
+ context 'when commit can be reverted' do
+ it 'reverts the changes' do
+ expect(repository.revert(user, update_image_commit, 'master', message)).to be_truthy
+ end
end
- context 'when Gitaly revert feature is disabled', :disable_gitaly do
- it_behaves_like 'reverting a commit'
+ context 'reverting a merge commit' do
+ it 'reverts the changes' do
+ merge_commit
+ expect(repository.blob_at_branch('master', 'files/ruby/feature.rb')).to be_present
+
+ repository.revert(user, merge_commit, 'master', message)
+ expect(repository.blob_at_branch('master', 'files/ruby/feature.rb')).not_to be_present
+ end
end
end
describe '#cherry_pick' do
- shared_examples 'cherry-picking a commit' do
- let(:conflict_commit) { repository.commit('c642fe9b8b9f28f9225d7ea953fe14e74748d53b') }
- let(:pickable_commit) { repository.commit('7d3b0f7cff5f37573aea97cebfd5692ea1689924') }
- let(:pickable_merge) { repository.commit('e56497bb5f03a90a51293fc6d516788730953899') }
- let(:message) { 'cherry-pick message' }
-
- context 'when there is a conflict' do
- it 'raises an error' do
- expect { repository.cherry_pick(user, conflict_commit, 'master', message) }.to raise_error(Gitlab::Git::Repository::CreateTreeError)
- end
+ let(:conflict_commit) { repository.commit('c642fe9b8b9f28f9225d7ea953fe14e74748d53b') }
+ let(:pickable_commit) { repository.commit('7d3b0f7cff5f37573aea97cebfd5692ea1689924') }
+ let(:pickable_merge) { repository.commit('e56497bb5f03a90a51293fc6d516788730953899') }
+ let(:message) { 'cherry-pick message' }
+
+ context 'when there is a conflict' do
+ it 'raises an error' do
+ expect { repository.cherry_pick(user, conflict_commit, 'master', message) }.to raise_error(Gitlab::Git::Repository::CreateTreeError)
end
+ end
- context 'when commit was already cherry-picked' do
- it 'raises an error' do
- repository.cherry_pick(user, pickable_commit, 'master', message)
+ context 'when commit was already cherry-picked' do
+ it 'raises an error' do
+ repository.cherry_pick(user, pickable_commit, 'master', message)
- expect { repository.cherry_pick(user, pickable_commit, 'master', message) }.to raise_error(Gitlab::Git::Repository::CreateTreeError)
- end
+ expect { repository.cherry_pick(user, pickable_commit, 'master', message) }.to raise_error(Gitlab::Git::Repository::CreateTreeError)
end
+ end
- context 'when commit can be cherry-picked' do
- it 'cherry-picks the changes' do
- expect(repository.cherry_pick(user, pickable_commit, 'master', message)).to be_truthy
- end
+ context 'when commit can be cherry-picked' do
+ it 'cherry-picks the changes' do
+ expect(repository.cherry_pick(user, pickable_commit, 'master', message)).to be_truthy
end
+ end
- context 'cherry-picking a merge commit' do
- it 'cherry-picks the changes' do
- expect(repository.blob_at_branch('improve/awesome', 'foo/bar/.gitkeep')).to be_nil
+ context 'cherry-picking a merge commit' do
+ it 'cherry-picks the changes' do
+ expect(repository.blob_at_branch('improve/awesome', 'foo/bar/.gitkeep')).to be_nil
- cherry_pick_commit_sha = repository.cherry_pick(user, pickable_merge, 'improve/awesome', message)
- cherry_pick_commit_message = project.commit(cherry_pick_commit_sha).message
+ cherry_pick_commit_sha = repository.cherry_pick(user, pickable_merge, 'improve/awesome', message)
+ cherry_pick_commit_message = project.commit(cherry_pick_commit_sha).message
- expect(repository.blob_at_branch('improve/awesome', 'foo/bar/.gitkeep')).not_to be_nil
- expect(cherry_pick_commit_message).to eq(message)
- end
+ expect(repository.blob_at_branch('improve/awesome', 'foo/bar/.gitkeep')).not_to be_nil
+ expect(cherry_pick_commit_message).to eq(message)
end
end
-
- context 'when Gitaly cherry_pick feature is enabled' do
- it_behaves_like 'cherry-picking a commit'
- end
-
- context 'when Gitaly cherry_pick feature is disabled', :disable_gitaly do
- it_behaves_like 'cherry-picking a commit'
- end
end
describe '#before_delete' do
@@ -2190,33 +2098,23 @@ describe Repository do
let(:commit) { repository.commit }
let(:ancestor) { commit.parents.first }
- shared_examples '#ancestor?' do
- it 'it is an ancestor' do
- expect(repository.ancestor?(ancestor.id, commit.id)).to eq(true)
- end
-
- it 'it is not an ancestor' do
- expect(repository.ancestor?(commit.id, ancestor.id)).to eq(false)
- end
-
- it 'returns false on nil-values' do
- expect(repository.ancestor?(nil, commit.id)).to eq(false)
- expect(repository.ancestor?(ancestor.id, nil)).to eq(false)
- expect(repository.ancestor?(nil, nil)).to eq(false)
- end
+ it 'it is an ancestor' do
+ expect(repository.ancestor?(ancestor.id, commit.id)).to eq(true)
+ end
- it 'returns false for invalid commit IDs' do
- expect(repository.ancestor?(commit.id, Gitlab::Git::BLANK_SHA)).to eq(false)
- expect(repository.ancestor?( Gitlab::Git::BLANK_SHA, commit.id)).to eq(false)
- end
+ it 'it is not an ancestor' do
+ expect(repository.ancestor?(commit.id, ancestor.id)).to eq(false)
end
- context 'with Gitaly enabled' do
- it_behaves_like('#ancestor?')
+ it 'returns false on nil-values' do
+ expect(repository.ancestor?(nil, commit.id)).to eq(false)
+ expect(repository.ancestor?(ancestor.id, nil)).to eq(false)
+ expect(repository.ancestor?(nil, nil)).to eq(false)
end
- context 'with Gitaly disabled', :skip_gitaly_mock do
- it_behaves_like('#ancestor?')
+ it 'returns false for invalid commit IDs' do
+ expect(repository.ancestor?(commit.id, Gitlab::Git::BLANK_SHA)).to eq(false)
+ expect(repository.ancestor?( Gitlab::Git::BLANK_SHA, commit.id)).to eq(false)
end
end
diff --git a/spec/models/wiki_page_spec.rb b/spec/models/wiki_page_spec.rb
index b87a2d871e5..cba22b2cc4e 100644
--- a/spec/models/wiki_page_spec.rb
+++ b/spec/models/wiki_page_spec.rb
@@ -200,180 +200,160 @@ describe WikiPage do
end
describe '#create' do
- shared_examples 'create method' do
- context 'with valid attributes' do
- it 'raises an error if a page with the same path already exists' do
- create_page('New Page', 'content')
- create_page('foo/bar', 'content')
- expect { create_page('New Page', 'other content') }.to raise_error Gitlab::Git::Wiki::DuplicatePageError
- expect { create_page('foo/bar', 'other content') }.to raise_error Gitlab::Git::Wiki::DuplicatePageError
-
- destroy_page('New Page')
- destroy_page('bar', 'foo')
- end
+ context 'with valid attributes' do
+ it 'raises an error if a page with the same path already exists' do
+ create_page('New Page', 'content')
+ create_page('foo/bar', 'content')
+ expect { create_page('New Page', 'other content') }.to raise_error Gitlab::Git::Wiki::DuplicatePageError
+ expect { create_page('foo/bar', 'other content') }.to raise_error Gitlab::Git::Wiki::DuplicatePageError
- it 'if the title is preceded by a / it is removed' do
- create_page('/New Page', 'content')
+ destroy_page('New Page')
+ destroy_page('bar', 'foo')
+ end
- expect(wiki.find_page('New Page')).not_to be_nil
+ it 'if the title is preceded by a / it is removed' do
+ create_page('/New Page', 'content')
- destroy_page('New Page')
- end
+ expect(wiki.find_page('New Page')).not_to be_nil
+
+ destroy_page('New Page')
end
end
+ end
- context 'when Gitaly is enabled' do
- it_behaves_like 'create method'
+ describe "#update" do
+ before do
+ create_page("Update", "content")
+ @page = wiki.find_page("Update")
end
- context 'when Gitaly is disabled', :skip_gitaly_mock do
- it_behaves_like 'create method'
+ after do
+ destroy_page(@page.title, @page.directory)
end
- end
- describe "#update" do
- shared_examples 'update method' do
- before do
- create_page("Update", "content")
+ context "with valid attributes" do
+ it "updates the content of the page" do
+ new_content = "new content"
+
+ @page.update(content: new_content)
@page = wiki.find_page("Update")
- end
- after do
- destroy_page(@page.title, @page.directory)
+ expect(@page.content).to eq("new content")
end
- context "with valid attributes" do
- it "updates the content of the page" do
- new_content = "new content"
-
- @page.update(content: new_content)
- @page = wiki.find_page("Update")
-
- expect(@page.content).to eq("new content")
- end
+ it "updates the title of the page" do
+ new_title = "Index v.1.2.4"
- it "updates the title of the page" do
- new_title = "Index v.1.2.4"
+ @page.update(title: new_title)
+ @page = wiki.find_page(new_title)
- @page.update(title: new_title)
- @page = wiki.find_page(new_title)
-
- expect(@page.title).to eq(new_title)
- end
+ expect(@page.title).to eq(new_title)
+ end
- it "returns true" do
- expect(@page.update(content: "more content")).to be_truthy
- end
+ it "returns true" do
+ expect(@page.update(content: "more content")).to be_truthy
end
+ end
- context 'with same last commit sha' do
- it 'returns true' do
- expect(@page.update(content: 'more content', last_commit_sha: @page.last_commit_sha)).to be_truthy
- end
+ context 'with same last commit sha' do
+ it 'returns true' do
+ expect(@page.update(content: 'more content', last_commit_sha: @page.last_commit_sha)).to be_truthy
end
+ end
- context 'with different last commit sha' do
- it 'raises exception' do
- expect { @page.update(content: 'more content', last_commit_sha: 'xxx') }.to raise_error(WikiPage::PageChangedError)
- end
+ context 'with different last commit sha' do
+ it 'raises exception' do
+ expect { @page.update(content: 'more content', last_commit_sha: 'xxx') }.to raise_error(WikiPage::PageChangedError)
end
+ end
- context 'when renaming a page' do
- it 'raises an error if the page already exists' do
- create_page('Existing Page', 'content')
+ context 'when renaming a page' do
+ it 'raises an error if the page already exists' do
+ create_page('Existing Page', 'content')
- expect { @page.update(title: 'Existing Page', content: 'new_content') }.to raise_error(WikiPage::PageRenameError)
- expect(@page.title).to eq 'Update'
- expect(@page.content).to eq 'new_content'
+ expect { @page.update(title: 'Existing Page', content: 'new_content') }.to raise_error(WikiPage::PageRenameError)
+ expect(@page.title).to eq 'Update'
+ expect(@page.content).to eq 'new_content'
- destroy_page('Existing Page')
- end
+ destroy_page('Existing Page')
+ end
- it 'updates the content and rename the file' do
- new_title = 'Renamed Page'
- new_content = 'updated content'
+ it 'updates the content and rename the file' do
+ new_title = 'Renamed Page'
+ new_content = 'updated content'
- expect(@page.update(title: new_title, content: new_content)).to be_truthy
+ expect(@page.update(title: new_title, content: new_content)).to be_truthy
- @page = wiki.find_page(new_title)
+ @page = wiki.find_page(new_title)
- expect(@page).not_to be_nil
- expect(@page.content).to eq new_content
- end
+ expect(@page).not_to be_nil
+ expect(@page.content).to eq new_content
end
+ end
- context 'when moving a page' do
- it 'raises an error if the page already exists' do
- create_page('foo/Existing Page', 'content')
-
- expect { @page.update(title: 'foo/Existing Page', content: 'new_content') }.to raise_error(WikiPage::PageRenameError)
- expect(@page.title).to eq 'Update'
- expect(@page.content).to eq 'new_content'
+ context 'when moving a page' do
+ it 'raises an error if the page already exists' do
+ create_page('foo/Existing Page', 'content')
- destroy_page('Existing Page', 'foo')
- end
+ expect { @page.update(title: 'foo/Existing Page', content: 'new_content') }.to raise_error(WikiPage::PageRenameError)
+ expect(@page.title).to eq 'Update'
+ expect(@page.content).to eq 'new_content'
- it 'updates the content and moves the file' do
- new_title = 'foo/Other Page'
- new_content = 'new_content'
-
- expect(@page.update(title: new_title, content: new_content)).to be_truthy
+ destroy_page('Existing Page', 'foo')
+ end
- page = wiki.find_page(new_title)
+ it 'updates the content and moves the file' do
+ new_title = 'foo/Other Page'
+ new_content = 'new_content'
- expect(page).not_to be_nil
- expect(page.content).to eq new_content
- end
+ expect(@page.update(title: new_title, content: new_content)).to be_truthy
- context 'in subdir' do
- before do
- create_page('foo/Existing Page', 'content')
- @page = wiki.find_page('foo/Existing Page')
- end
+ page = wiki.find_page(new_title)
- it 'moves the page to the root folder if the title is preceded by /', :skip_gitaly_mock do
- expect(@page.slug).to eq 'foo/Existing-Page'
- expect(@page.update(title: '/Existing Page', content: 'new_content')).to be_truthy
- expect(@page.slug).to eq 'Existing-Page'
- end
+ expect(page).not_to be_nil
+ expect(page.content).to eq new_content
+ end
- it 'does nothing if it has the same title' do
- original_path = @page.slug
+ context 'in subdir' do
+ before do
+ create_page('foo/Existing Page', 'content')
+ @page = wiki.find_page('foo/Existing Page')
+ end
- expect(@page.update(title: 'Existing Page', content: 'new_content')).to be_truthy
- expect(@page.slug).to eq original_path
- end
+ it 'moves the page to the root folder if the title is preceded by /' do
+ expect(@page.slug).to eq 'foo/Existing-Page'
+ expect(@page.update(title: '/Existing Page', content: 'new_content')).to be_truthy
+ expect(@page.slug).to eq 'Existing-Page'
end
- context 'in root dir' do
- it 'does nothing if the title is preceded by /' do
- original_path = @page.slug
+ it 'does nothing if it has the same title' do
+ original_path = @page.slug
- expect(@page.update(title: '/Update', content: 'new_content')).to be_truthy
- expect(@page.slug).to eq original_path
- end
+ expect(@page.update(title: 'Existing Page', content: 'new_content')).to be_truthy
+ expect(@page.slug).to eq original_path
end
end
- context "with invalid attributes" do
- it 'aborts update if title blank' do
- expect(@page.update(title: '', content: 'new_content')).to be_falsey
- expect(@page.content).to eq 'new_content'
+ context 'in root dir' do
+ it 'does nothing if the title is preceded by /' do
+ original_path = @page.slug
- page = wiki.find_page('Update')
- expect(page.content).to eq 'content'
-
- @page.title = 'Update'
+ expect(@page.update(title: '/Update', content: 'new_content')).to be_truthy
+ expect(@page.slug).to eq original_path
end
end
end
- context 'when Gitaly is enabled' do
- it_behaves_like 'update method'
- end
+ context "with invalid attributes" do
+ it 'aborts update if title blank' do
+ expect(@page.update(title: '', content: 'new_content')).to be_falsey
+ expect(@page.content).to eq 'new_content'
- context 'when Gitaly is disabled', :skip_gitaly_mock do
- it_behaves_like 'update method'
+ page = wiki.find_page('Update')
+ expect(page.content).to eq 'content'
+
+ @page.title = 'Update'
+ end
end
end
@@ -394,34 +374,24 @@ describe WikiPage do
end
describe "#versions" do
- shared_examples 'wiki page versions' do
- let(:page) { wiki.find_page("Update") }
+ let(:page) { wiki.find_page("Update") }
- before do
- create_page("Update", "content")
- end
-
- after do
- destroy_page("Update")
- end
-
- it "returns an array of all commits for the page" do
- 3.times { |i| page.update(content: "content #{i}") }
-
- expect(page.versions.count).to eq(4)
- end
+ before do
+ create_page("Update", "content")
+ end
- it 'returns instances of WikiPageVersion' do
- expect(page.versions).to all( be_a(Gitlab::Git::WikiPageVersion) )
- end
+ after do
+ destroy_page("Update")
end
- context 'when Gitaly is enabled' do
- it_behaves_like 'wiki page versions'
+ it "returns an array of all commits for the page" do
+ 3.times { |i| page.update(content: "content #{i}") }
+
+ expect(page.versions.count).to eq(4)
end
- context 'when Gitaly is disabled', :disable_gitaly do
- it_behaves_like 'wiki page versions'
+ it 'returns instances of WikiPageVersion' do
+ expect(page.versions).to all( be_a(Gitlab::Git::WikiPageVersion) )
end
end
@@ -555,23 +525,13 @@ describe WikiPage do
end
describe '#formatted_content' do
- shared_examples 'fetching page formatted content' do
- it 'returns processed content of the page' do
- subject.create({ title: "RDoc", content: "*bold*", format: "rdoc" })
- page = wiki.find_page('RDoc')
-
- expect(page.formatted_content).to eq("\n<p><strong>bold</strong></p>\n")
+ it 'returns processed content of the page' do
+ subject.create({ title: "RDoc", content: "*bold*", format: "rdoc" })
+ page = wiki.find_page('RDoc')
- destroy_page('RDoc')
- end
- end
-
- context 'when Gitaly wiki_page_formatted_data is enabled' do
- it_behaves_like 'fetching page formatted content'
- end
+ expect(page.formatted_content).to eq("\n<p><strong>bold</strong></p>\n")
- context 'when Gitaly wiki_page_formatted_data is disabled', :disable_gitaly do
- it_behaves_like 'fetching page formatted content'
+ destroy_page('RDoc')
end
end
diff --git a/spec/policies/ci/pipeline_schedule_policy_spec.rb b/spec/policies/ci/pipeline_schedule_policy_spec.rb
index f1d3cd04e32..5a56e91cd69 100644
--- a/spec/policies/ci/pipeline_schedule_policy_spec.rb
+++ b/spec/policies/ci/pipeline_schedule_policy_spec.rb
@@ -70,7 +70,7 @@ describe Ci::PipelineSchedulePolicy, :models do
pipeline_schedule.update(owner: user)
end
- it 'includes abilities to do do all operations on pipeline schedule' do
+ it 'includes abilities to do all operations on pipeline schedule' do
expect(policy).to be_allowed :play_pipeline_schedule
expect(policy).to be_allowed :update_pipeline_schedule
expect(policy).to be_allowed :admin_pipeline_schedule
@@ -82,7 +82,7 @@ describe Ci::PipelineSchedulePolicy, :models do
project.add_maintainer(user)
end
- it 'includes abilities to do do all operations on pipeline schedule' do
+ it 'includes abilities to do all operations on pipeline schedule' do
expect(policy).to be_allowed :play_pipeline_schedule
expect(policy).to be_allowed :update_pipeline_schedule
expect(policy).to be_allowed :admin_pipeline_schedule
diff --git a/spec/policies/project_policy_spec.rb b/spec/policies/project_policy_spec.rb
index d6bc67a9d70..69468f9ad85 100644
--- a/spec/policies/project_policy_spec.rb
+++ b/spec/policies/project_policy_spec.rb
@@ -223,7 +223,7 @@ describe ProjectPolicy do
expect_disallowed(*other_write_abilities)
end
- it 'does not disable other other abilities' do
+ it 'does not disable other abilities' do
expect_allowed(*(regular_abilities - feature_write_abilities - other_write_abilities))
end
end
diff --git a/spec/rubocop/cop/safe_params_spec.rb b/spec/rubocop/cop/safe_params_spec.rb
new file mode 100644
index 00000000000..4f02b8e9008
--- /dev/null
+++ b/spec/rubocop/cop/safe_params_spec.rb
@@ -0,0 +1,39 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+require 'rubocop'
+require 'rubocop/rspec/support'
+require_relative '../../../rubocop/cop/safe_params'
+
+describe RuboCop::Cop::SafeParams do
+ include CopHelper
+
+ subject(:cop) { described_class.new }
+
+ it 'flags the params as an argument of url_for' do
+ expect_offense(<<~SOURCE)
+ url_for(params)
+ ^^^^^^^^^^^^^^^ Use `safe_params` instead of `params` in url_for.
+ SOURCE
+ end
+
+ it 'flags the merged params as an argument of url_for' do
+ expect_offense(<<~SOURCE)
+ url_for(params.merge(additional_params))
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Use `safe_params` instead of `params` in url_for.
+ SOURCE
+ end
+
+ it 'flags the merged params arg as an argument of url_for' do
+ expect_offense(<<~SOURCE)
+ url_for(something.merge(additional).merge(params))
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Use `safe_params` instead of `params` in url_for.
+ SOURCE
+ end
+
+ it 'does not flag other argument of url_for' do
+ expect_no_offenses(<<~SOURCE)
+ url_for(something)
+ SOURCE
+ end
+end
diff --git a/spec/services/merge_requests/build_service_spec.rb b/spec/services/merge_requests/build_service_spec.rb
index c9a668994eb..1894d8c8d0e 100644
--- a/spec/services/merge_requests/build_service_spec.rb
+++ b/spec/services/merge_requests/build_service_spec.rb
@@ -21,15 +21,20 @@ describe MergeRequests::BuildService do
let(:commit_2) { double(:commit_2, sha: 'f00ba7', safe_message: 'This is a bad commit message!') }
let(:commits) { nil }
+ let(:params) do
+ {
+ description: description,
+ source_branch: source_branch,
+ target_branch: target_branch,
+ source_project: source_project,
+ target_project: target_project,
+ milestone_id: milestone_id,
+ label_ids: label_ids
+ }
+ end
+
let(:service) do
- described_class.new(project, user,
- description: description,
- source_branch: source_branch,
- target_branch: target_branch,
- source_project: source_project,
- target_project: target_project,
- milestone_id: milestone_id,
- label_ids: label_ids)
+ described_class.new(project, user, params)
end
before do
@@ -56,6 +61,19 @@ describe MergeRequests::BuildService do
merge_request
end
+ it 'does not assign force_remove_source_branch' do
+ expect(merge_request.force_remove_source_branch?).to be_falsey
+ end
+
+ context 'with force_remove_source_branch parameter' do
+ let(:mr_params) { params.merge(force_remove_source_branch: '1') }
+ let(:merge_request) { described_class.new(project, user, mr_params).execute }
+
+ it 'assigns force_remove_source_branch' do
+ expect(merge_request.force_remove_source_branch?).to be_truthy
+ end
+ end
+
context 'missing source branch' do
let(:source_branch) { '' }
diff --git a/spec/services/merge_requests/merge_when_pipeline_succeeds_service_spec.rb b/spec/services/merge_requests/merge_when_pipeline_succeeds_service_spec.rb
index 8838742a637..52bbd4e794d 100644
--- a/spec/services/merge_requests/merge_when_pipeline_succeeds_service_spec.rb
+++ b/spec/services/merge_requests/merge_when_pipeline_succeeds_service_spec.rb
@@ -95,7 +95,7 @@ describe MergeRequests::MergeWhenPipelineSucceedsService do
sha: '1234abcdef', status: 'success')
end
- it 'it does not merge merge request' do
+ it 'it does not merge request' do
expect(MergeWorker).not_to receive(:perform_async)
service.trigger(old_pipeline)
end
diff --git a/spec/services/users/set_status_service_spec.rb b/spec/services/users/set_status_service_spec.rb
index 8a8458ab9de..7c26be48345 100644
--- a/spec/services/users/set_status_service_spec.rb
+++ b/spec/services/users/set_status_service_spec.rb
@@ -7,7 +7,7 @@ describe Users::SetStatusService do
subject(:service) { described_class.new(current_user, params) }
describe '#execute' do
- context 'when when params are set' do
+ context 'when params are set' do
let(:params) { { emoji: 'taurus', message: 'a random status' } }
it 'creates a status' do
diff --git a/spec/support/gitaly.rb b/spec/support/gitaly.rb
deleted file mode 100644
index 614aaa73693..00000000000
--- a/spec/support/gitaly.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-RSpec.configure do |config|
- config.before(:each) do |example|
- if example.metadata[:disable_gitaly]
- # Use 'and_wrap_original' to make sure the arguments are valid
- allow(Gitlab::GitalyClient).to receive(:feature_enabled?).and_wrap_original { |m, *args| m.call(*args) && false }
- else
- next if example.metadata[:skip_gitaly_mock]
-
- # Use 'and_wrap_original' to make sure the arguments are valid
- allow(Gitlab::GitalyClient).to receive(:feature_enabled?).and_wrap_original do |m, *args|
- m.call(*args)
- !Gitlab::GitalyClient.explicit_opt_in_required.include?(args.first)
- end
- end
- end
-end
diff --git a/spec/support/import_export/export_file_helper.rb b/spec/support/import_export/export_file_helper.rb
index d9ed405baf4..a49036c3b80 100644
--- a/spec/support/import_export/export_file_helper.rb
+++ b/spec/support/import_export/export_file_helper.rb
@@ -123,7 +123,7 @@ module ExportFileHelper
false
end
- # Compares model attributes with those those found in the hash
+ # Compares model attributes with those found in the hash
# and returns true if there is a match, ignoring some excluded attributes.
def safe_model?(model, excluded_attributes, parent)
excluded_attributes += associations_for(model)