summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml5
-rw-r--r--app/assets/javascripts/ci_variable_list/ajax_variable_list.js2
-rw-r--r--app/assets/javascripts/diffs/components/app.vue55
-rw-r--r--app/assets/javascripts/diffs/components/commit_widget.vue2
-rw-r--r--app/assets/javascripts/diffs/components/compare_versions.vue23
-rw-r--r--app/assets/javascripts/diffs/components/diff_file_header.vue4
-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/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/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--changelogs/unreleased/mr-file-tree-commit.yml5
-rw-r--r--changelogs/unreleased/mr-sticky-headers.yml5
-rw-r--r--config/application.rb3
-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.rb2
-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/integration/shibboleth.md170
-rw-r--r--doc/update/6.x-or-7.x-to-7.14.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/rails4_migration_version.rb16
-rw-r--r--locale/gitlab.pot79
-rw-r--r--scripts/frontend/prettier.js2
-rwxr-xr-xscripts/trigger-build1
-rw-r--r--spec/features/merge_request/user_sees_versions_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/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/pipelines/actions_spec.js6
1097 files changed, 1322 insertions, 1315 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/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/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_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 3ccd111f1cb..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 { GlTooltipDirective } from '@gitlab/ui';
+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,6 +10,8 @@ export default {
components: {
CompareVersionsDropdown,
Icon,
+ GlLink,
+ GlButton,
},
directives: {
GlTooltip: GlTooltipDirective,
@@ -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);
@@ -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 60b33e771b4..f75a01b023b 100644
--- a/app/assets/javascripts/diffs/components/diff_file_header.vue
+++ b/app/assets/javascripts/diffs/components/diff_file_header.vue
@@ -1,6 +1,7 @@
<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';
@@ -116,6 +117,9 @@ export default {
return `\`${this.diffFile.file_path}\``;
},
},
+ mounted() {
+ polyfillSticky(this.$refs.header);
+ },
methods: {
...mapActions('diffs', ['toggleFileDiscussions']),
handleToggleFile(e, checkTarget) {
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/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/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/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-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/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/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 289c87b30d2..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.
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/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/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/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/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/locale/gitlab.pot b/locale/gitlab.pot
index 7af36b049d8..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 ""
@@ -7053,6 +7041,9 @@ msgstr ""
msgid "View the documentation"
msgstr ""
+msgid "Viewing commit"
+msgstr ""
+
msgid "Visibility and access controls"
msgstr ""
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/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/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/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/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,