Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
43971ef2
Commit
43971ef2
authored
Jul 25, 2018
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable rubocop for db/**/* and ee/db/**/*
parent
73e0679e
Changes
166
Hide whitespace changes
Inline
Side-by-side
Showing
166 changed files
with
56 additions
and
156 deletions
+56
-156
.rubocop.yml
.rubocop.yml
+4
-2
db/migrate/20140313092127_init_schema.rb
db/migrate/20140313092127_init_schema.rb
+5
-4
db/migrate/20140407135544_fix_namespaces.rb
db/migrate/20140407135544_fix_namespaces.rb
+0
-1
db/migrate/20140415124820_limits_to_mysql.rb
db/migrate/20140415124820_limits_to_mysql.rb
+0
-1
db/migrate/20140729145339_migrate_project_tags.rb
db/migrate/20140729145339_migrate_project_tags.rb
+0
-1
db/migrate/20141121133009_add_timestamps_to_members.rb
db/migrate/20141121133009_add_timestamps_to_members.rb
+0
-1
db/migrate/20141223135007_add_import_data_to_project_table.rb
...igrate/20141223135007_add_import_data_to_project_table.rb
+0
-1
db/migrate/20150116234544_add_home_page_url_for_application_settings.rb
...50116234544_add_home_page_url_for_application_settings.rb
+0
-1
db/migrate/20150116234545_add_gitlab_access_token_to_user.rb
db/migrate/20150116234545_add_gitlab_access_token_to_user.rb
+0
-1
db/migrate/20150206222854_add_notification_email_to_user.rb
db/migrate/20150206222854_add_notification_email_to_user.rb
+0
-1
db/migrate/20150211174341_allow_null_in_services_project_id.rb
...grate/20150211174341_allow_null_in_services_project_id.rb
+0
-1
db/migrate/20150217123345_add_bitbucket_access_token_and_secret_to_user.rb
...17123345_add_bitbucket_access_token_and_secret_to_user.rb
+0
-1
db/migrate/20150223022001_set_missing_last_activity_at.rb
db/migrate/20150223022001_set_missing_last_activity_at.rb
+0
-1
db/migrate/20150301014758_add_restricted_visibility_levels_to_application_settings.rb
...d_restricted_visibility_levels_to_application_settings.rb
+0
-1
db/migrate/20150320234437_add_location_to_user.rb
db/migrate/20150320234437_add_location_to_user.rb
+0
-1
db/migrate/20150324155957_set_incorrect_assignee_id_to_null.rb
...grate/20150324155957_set_incorrect_assignee_id_to_null.rb
+0
-1
db/migrate/20150327150017_add_import_data_to_project.rb
db/migrate/20150327150017_add_import_data_to_project.rb
+0
-1
db/migrate/20150327223628_add_devise_two_factor_to_users.rb
db/migrate/20150327223628_add_devise_two_factor_to_users.rb
+0
-1
db/migrate/20150328132231_add_max_attachment_size_to_application_settings.rb
...132231_add_max_attachment_size_to_application_settings.rb
+0
-1
db/migrate/20150331183602_add_devise_two_factor_backupable_to_users.rb
...150331183602_add_devise_two_factor_backupable_to_users.rb
+0
-1
db/migrate/20150411000035_fix_identities.rb
db/migrate/20150411000035_fix_identities.rb
+0
-1
db/migrate/20150411180045_rename_buildbox_service.rb
db/migrate/20150411180045_rename_buildbox_service.rb
+0
-1
db/migrate/20150417121913_create_project_import_data.rb
db/migrate/20150417121913_create_project_import_data.rb
+0
-1
db/migrate/20150423033240_add_default_project_visibililty_to_application_settings.rb
...dd_default_project_visibililty_to_application_settings.rb
+0
-1
db/migrate/20150425164646_gitlab_change_collation_for_tag_names.acts_as_taggable_on_engine.rb
...nge_collation_for_tag_names.acts_as_taggable_on_engine.rb
+0
-1
db/migrate/20150425164650_add_missing_taggable_index.acts_as_taggable_on_engine.rb
..._add_missing_taggable_index.acts_as_taggable_on_engine.rb
+0
-1
db/migrate/20150425164651_change_collation_for_tag_names.acts_as_taggable_on_engine.rb
...nge_collation_for_tag_names.acts_as_taggable_on_engine.rb
+0
-1
db/migrate/20150425173433_add_default_snippet_visibility_to_app_settings.rb
...5173433_add_default_snippet_visibility_to_app_settings.rb
+0
-1
db/migrate/20150429002313_remove_abandoned_group_members_records.rb
.../20150429002313_remove_abandoned_group_members_records.rb
+0
-1
db/migrate/20150502064022_add_restricted_signup_domains_to_application_settings.rb
..._add_restricted_signup_domains_to_application_settings.rb
+0
-1
db/migrate/20150509180749_convert_legacy_reference_notes.rb
db/migrate/20150509180749_convert_legacy_reference_notes.rb
+0
-1
db/migrate/20150529111607_add_user_oauth_applications_to_application_settings.rb
...07_add_user_oauth_applications_to_application_settings.rb
+0
-1
db/migrate/20150609141121_add_session_expire_delay_for_application_settings.rb
...1121_add_session_expire_delay_for_application_settings.rb
+0
-1
db/migrate/20150620233230_add_default_otp_required_for_login_value.rb
...0150620233230_add_default_otp_required_for_login_value.rb
+0
-1
db/migrate/20150730122406_add_updated_by_to_issuables_and_notes.rb
...e/20150730122406_add_updated_by_to_issuables_and_notes.rb
+0
-1
db/migrate/20150818213832_add_sent_notifications.rb
db/migrate/20150818213832_add_sent_notifications.rb
+0
-1
db/migrate/20150915001905_enable_ssl_verification_by_default.rb
...rate/20150915001905_enable_ssl_verification_by_default.rb
+0
-1
db/migrate/20150916000405_enable_ssl_verification_for_web_hooks.rb
...e/20150916000405_enable_ssl_verification_for_web_hooks.rb
+0
-1
db/migrate/20150916114643_add_help_page_text_to_application_settings.rb
...50916114643_add_help_page_text_to_application_settings.rb
+0
-1
db/migrate/20150918084513_add_ci_enabled_to_application_settings.rb
.../20150918084513_add_ci_enabled_to_application_settings.rb
+0
-1
db/migrate/20150918161719_remove_invalid_milestones_from_merge_requests.rb
...18161719_remove_invalid_milestones_from_merge_requests.rb
+0
-1
db/migrate/20150920010715_add_consumed_timestep_to_users.rb
db/migrate/20150920010715_add_consumed_timestep_to_users.rb
+0
-1
db/migrate/20150920161119_add_line_code_to_sent_notification.rb
...rate/20150920161119_add_line_code_to_sent_notification.rb
+0
-1
db/migrate/20150924125150_add_project_id_to_ci_commit.rb
db/migrate/20150924125150_add_project_id_to_ci_commit.rb
+0
-1
db/migrate/20150924125436_migrate_project_id_for_ci_commits.rb
...grate/20150924125436_migrate_project_id_for_ci_commits.rb
+0
-1
db/migrate/20150930001110_merge_request_error_field.rb
db/migrate/20150930001110_merge_request_error_field.rb
+0
-1
db/migrate/20150930095736_add_null_to_name_for_ci_projects.rb
...igrate/20150930095736_add_null_to_name_for_ci_projects.rb
+0
-1
db/migrate/20151002112914_add_stage_idx_to_builds.rb
db/migrate/20151002112914_add_stage_idx_to_builds.rb
+0
-1
db/migrate/20151002122929_add_ref_and_tag_to_builds.rb
db/migrate/20151002122929_add_ref_and_tag_to_builds.rb
+0
-1
db/migrate/20151005075649_add_user_id_to_build.rb
db/migrate/20151005075649_add_user_id_to_build.rb
+0
-1
db/migrate/20151008143519_add_admin_notification_email_setting.rb
...te/20151008143519_add_admin_notification_email_setting.rb
+0
-1
db/migrate/20151013092124_add_artifacts_file_to_builds.rb
db/migrate/20151013092124_add_artifacts_file_to_builds.rb
+0
-1
db/migrate/20151019111551_fix_build_tags.rb
db/migrate/20151019111551_fix_build_tags.rb
+0
-1
db/migrate/20151019111703_fail_build_without_names.rb
db/migrate/20151019111703_fail_build_without_names.rb
+0
-1
db/migrate/20151020173516_ci_limits_to_mysql.rb
db/migrate/20151020173516_ci_limits_to_mysql.rb
+0
-1
db/migrate/20151023112551_fail_build_with_empty_name.rb
db/migrate/20151023112551_fail_build_with_empty_name.rb
+0
-1
db/migrate/20151023144219_remove_satellites.rb
db/migrate/20151023144219_remove_satellites.rb
+0
-1
db/migrate/20151103133339_add_shared_runners_setting.rb
db/migrate/20151103133339_add_shared_runners_setting.rb
+0
-1
db/migrate/20151104105513_add_file_to_lfs_objects.rb
db/migrate/20151104105513_add_file_to_lfs_objects.rb
+0
-1
db/migrate/20151109100728_add_max_artifacts_size_to_application_settings.rb
...9100728_add_max_artifacts_size_to_application_settings.rb
+0
-1
db/migrate/20151110125604_add_import_error_to_project.rb
db/migrate/20151110125604_add_import_error_to_project.rb
+0
-1
db/migrate/20151201203948_raise_hook_url_limit.rb
db/migrate/20151201203948_raise_hook_url_limit.rb
+0
-1
db/migrate/20151209144329_migrate_ci_web_hooks.rb
db/migrate/20151209144329_migrate_ci_web_hooks.rb
+0
-1
db/migrate/20151209145909_migrate_ci_emails.rb
db/migrate/20151209145909_migrate_ci_emails.rb
+0
-1
db/migrate/20151210030143_add_unlock_token_to_user.rb
db/migrate/20151210030143_add_unlock_token_to_user.rb
+0
-1
db/migrate/20151210072243_add_runners_registration_token_to_application_settings.rb
...add_runners_registration_token_to_application_settings.rb
+0
-1
db/migrate/20151210125232_migrate_ci_slack_service.rb
db/migrate/20151210125232_migrate_ci_slack_service.rb
+0
-1
db/migrate/20151210125927_migrate_ci_hip_chat_service.rb
db/migrate/20151210125927_migrate_ci_hip_chat_service.rb
+0
-1
db/migrate/20151210125929_add_project_id_to_ci.rb
db/migrate/20151210125929_add_project_id_to_ci.rb
+0
-1
db/migrate/20151210125930_migrate_ci_to_project.rb
db/migrate/20151210125930_migrate_ci_to_project.rb
+0
-1
db/migrate/20151218154042_add_tfa_to_application_settings.rb
db/migrate/20151218154042_add_tfa_to_application_settings.rb
+0
-1
db/migrate/20151221234414_add_tfa_additional_fields.rb
db/migrate/20151221234414_add_tfa_additional_fields.rb
+0
-1
db/migrate/20151224123230_rename_emojis.rb
db/migrate/20151224123230_rename_emojis.rb
+0
-1
db/migrate/20151228175719_add_recaptcha_to_application_settings.rb
...e/20151228175719_add_recaptcha_to_application_settings.rb
+0
-1
db/migrate/20151229102248_influxdb_udp_port_setting.rb
db/migrate/20151229102248_influxdb_udp_port_setting.rb
+0
-1
db/migrate/20151230132518_add_artifacts_metadata_to_ci_build.rb
...rate/20151230132518_add_artifacts_metadata_to_ci_build.rb
+0
-1
db/migrate/20151231152326_add_akismet_to_application_settings.rb
...ate/20151231152326_add_akismet_to_application_settings.rb
+0
-1
db/migrate/20160113111034_add_metrics_sample_interval.rb
db/migrate/20160113111034_add_metrics_sample_interval.rb
+0
-1
db/migrate/20160118155830_add_sentry_to_application_settings.rb
...rate/20160118155830_add_sentry_to_application_settings.rb
+0
-1
db/migrate/20160120172143_add_base_commit_sha_to_merge_request_diffs.rb
...60120172143_add_base_commit_sha_to_merge_request_diffs.rb
+0
-1
db/migrate/20160128233227_change_lfs_objects_size_column.rb
db/migrate/20160128233227_change_lfs_objects_size_column.rb
+0
-1
db/migrate/20160129135155_remove_dot_atom_path_ending_of_projects.rb
...20160129135155_remove_dot_atom_path_ending_of_projects.rb
+0
-1
db/migrate/20160129155512_add_merge_commit_sha_to_merge_requests.rb
.../20160129155512_add_merge_commit_sha_to_merge_requests.rb
+0
-1
db/migrate/20160204144558_add_real_size_to_merge_request_diffs.rb
...te/20160204144558_add_real_size_to_merge_request_diffs.rb
+0
-1
db/migrate/20160217100506_add_description_to_label.rb
db/migrate/20160217100506_add_description_to_label.rb
+0
-1
db/migrate/20160217174422_add_note_to_tasks.rb
db/migrate/20160217174422_add_note_to_tasks.rb
+0
-1
db/migrate/20160220123949_rename_tasks_to_todos.rb
db/migrate/20160220123949_rename_tasks_to_todos.rb
+0
-1
db/migrate/20160229193553_add_main_language_to_repository.rb
db/migrate/20160229193553_add_main_language_to_repository.rb
+0
-1
db/migrate/20160302151724_add_import_credentials_to_project_import_data.rb
...02151724_add_import_credentials_to_project_import_data.rb
+0
-1
db/migrate/20160307221555_disallow_blank_line_code_on_note.rb
...igrate/20160307221555_disallow_blank_line_code_on_note.rb
+0
-1
db/migrate/20160316192622_change_target_id_to_null_on_todos.rb
...grate/20160316192622_change_target_id_to_null_on_todos.rb
+0
-1
db/migrate/20160317092222_add_moved_to_to_issue.rb
db/migrate/20160317092222_add_moved_to_to_issue.rb
+0
-1
db/migrate/20160324020319_remove_todos_for_deleted_issues.rb
db/migrate/20160324020319_remove_todos_for_deleted_issues.rb
+0
-1
db/migrate/20160328115649_migrate_new_notification_setting.rb
...igrate/20160328115649_migrate_new_notification_setting.rb
+0
-1
db/migrate/20160331133914_remove_todos_for_deleted_merge_requests.rb
...20160331133914_remove_todos_for_deleted_merge_requests.rb
+0
-1
db/migrate/20160407120251_add_images_enabled_for_project.rb
db/migrate/20160407120251_add_images_enabled_for_project.rb
+0
-1
db/migrate/20160413115152_add_token_to_web_hooks.rb
db/migrate/20160413115152_add_token_to_web_hooks.rb
+0
-1
db/migrate/20160415062917_create_personal_access_tokens.rb
db/migrate/20160415062917_create_personal_access_tokens.rb
+0
-1
db/migrate/20160415133440_add_shared_runners_text_to_application_settings.rb
...133440_add_shared_runners_text_to_application_settings.rb
+0
-1
db/migrate/20160416182152_convert_award_note_to_emoji_award.rb
...grate/20160416182152_convert_award_note_to_emoji_award.rb
+0
-1
db/migrate/20160419120017_add_metrics_packet_size.rb
db/migrate/20160419120017_add_metrics_packet_size.rb
+0
-1
db/migrate/20160504091942_add_disabled_oauth_sign_in_sources_to_application_settings.rb
...disabled_oauth_sign_in_sources_to_application_settings.rb
+0
-1
db/migrate/20160504112519_add_run_untagged_to_ci_runner.rb
db/migrate/20160504112519_add_run_untagged_to_ci_runner.rb
+0
-1
db/migrate/20160508215820_add_type_to_notes.rb
db/migrate/20160508215820_add_type_to_notes.rb
+0
-1
db/migrate/20160509201028_add_health_check_access_token_to_application_settings.rb
..._add_health_check_access_token_to_application_settings.rb
+0
-1
db/migrate/20160527020117_remove_notification_settings_for_deleted_projects.rb
...0117_remove_notification_settings_for_deleted_projects.rb
+0
-1
db/migrate/20160530150109_add_container_registry_token_expire_delay_to_application_settings.rb
...er_registry_token_expire_delay_to_application_settings.rb
+0
-1
db/migrate/20160603180330_remove_duplicated_notification_settings.rb
...20160603180330_remove_duplicated_notification_settings.rb
+0
-1
db/migrate/20160608155312_add_after_sign_up_text_to_application_settings.rb
...8155312_add_after_sign_up_text_to_application_settings.rb
+0
-1
db/migrate/20160610204157_add_deployments.rb
db/migrate/20160610204157_add_deployments.rb
+0
-2
db/migrate/20160610204158_add_environments.rb
db/migrate/20160610204158_add_environments.rb
+0
-2
db/migrate/20160615173316_add_enabled_git_access_protocols_to_application_settings.rb
...d_enabled_git_access_protocols_to_application_settings.rb
+0
-1
db/migrate/20160616102642_remove_duplicated_keys.rb
db/migrate/20160616102642_remove_duplicated_keys.rb
+0
-1
db/migrate/20160824124900_add_table_issue_metrics.rb
db/migrate/20160824124900_add_table_issue_metrics.rb
+0
-2
db/migrate/20160825052008_add_table_merge_request_metrics.rb
db/migrate/20160825052008_add_table_merge_request_metrics.rb
+0
-2
db/migrate/20161113184239_create_user_chat_names_table.rb
db/migrate/20161113184239_create_user_chat_names_table.rb
+0
-1
db/migrate/20170130221926_create_uploads.rb
db/migrate/20170130221926_create_uploads.rb
+0
-1
db/migrate/20170222143317_drop_ci_projects.rb
db/migrate/20170222143317_drop_ci_projects.rb
+0
-1
db/migrate/20170301205639_remove_unused_ci_tables_and_columns.rb
...ate/20170301205639_remove_unused_ci_tables_and_columns.rb
+0
-1
db/migrate/20170329095907_create_ci_trigger_schedules.rb
db/migrate/20170329095907_create_ci_trigger_schedules.rb
+0
-1
db/migrate/20170402231018_remove_index_for_users_current_sign_in_at.rb
...170402231018_remove_index_for_users_current_sign_in_at.rb
+0
-2
db/migrate/20170425112128_create_pipeline_schedules_table.rb
db/migrate/20170425112128_create_pipeline_schedules_table.rb
+0
-1
db/migrate/20170502091007_markdown_cache_limits_to_mysql.rb
db/migrate/20170502091007_markdown_cache_limits_to_mysql.rb
+0
-1
db/migrate/20170531202042_rename_users_ldap_email_to_external_email.rb
...170531202042_rename_users_ldap_email_to_external_email.rb
+1
-0
db/migrate/20171106171453_add_timezone_to_issues_closed_at.rb
...igrate/20171106171453_add_timezone_to_issues_closed_at.rb
+1
-0
db/migrate/20180201145907_migrate_remaining_issues_closed_at.rb
...rate/20180201145907_migrate_remaining_issues_closed_at.rb
+1
-0
db/migrate/20180214093516_create_badges.rb
db/migrate/20180214093516_create_badges.rb
+1
-0
db/migrate/20180227182112_add_group_id_to_boards_ce.rb
db/migrate/20180227182112_add_group_id_to_boards_ce.rb
+2
-0
db/migrate/20180302152117_ensure_foreign_keys_on_clusters_applications.rb
...302152117_ensure_foreign_keys_on_clusters_applications.rb
+1
-0
db/migrate/20180309160427_add_partial_indexes_on_todos.rb
db/migrate/20180309160427_add_partial_indexes_on_todos.rb
+6
-5
db/migrate/20180408143354_rename_users_rss_token_to_feed_token.rb
...te/20180408143354_rename_users_rss_token_to_feed_token.rb
+1
-0
db/migrate/20180417090132_add_index_constraints_to_internal_id_table.rb
...80417090132_add_index_constraints_to_internal_id_table.rb
+1
-0
db/migrate/20180418053107_add_index_to_ci_job_artifacts_file_store.rb
...0180418053107_add_index_to_ci_job_artifacts_file_store.rb
+1
-0
db/migrate/20180424090541_add_enforce_terms_to_application_settings.rb
...180424090541_add_enforce_terms_to_application_settings.rb
+1
-0
db/migrate/20180425075446_create_term_agreements.rb
db/migrate/20180425075446_create_term_agreements.rb
+1
-0
db/migrate/20180503131624_create_remote_mirrors.rb
db/migrate/20180503131624_create_remote_mirrors.rb
+1
-0
db/migrate/20180503150427_add_index_to_namespaces_runners_token.rb
...e/20180503150427_add_index_to_namespaces_runners_token.rb
+1
-0
db/migrate/20180503175054_add_indexes_to_project_mirror_data.rb
...rate/20180503175054_add_indexes_to_project_mirror_data.rb
+1
-0
db/migrate/20180503193542_add_indexes_to_remote_mirror.rb
db/migrate/20180503193542_add_indexes_to_remote_mirror.rb
+2
-0
db/migrate/20180511090724_add_index_on_ci_runners_runner_type.rb
...ate/20180511090724_add_index_on_ci_runners_runner_type.rb
+1
-0
db/migrate/20180515005612_add_squash_to_merge_requests.rb
db/migrate/20180515005612_add_squash_to_merge_requests.rb
+1
-0
db/migrate/20180515121227_create_notes_diff_files.rb
db/migrate/20180515121227_create_notes_diff_files.rb
+1
-0
db/migrate/20180521171529_increase_mysql_text_limit_for_gpg_keys.rb
.../20180521171529_increase_mysql_text_limit_for_gpg_keys.rb
+0
-1
db/migrate/20180529093006_ensure_remote_mirror_columns.rb
db/migrate/20180529093006_ensure_remote_mirror_columns.rb
+1
-0
db/migrate/20180531220618_change_default_value_for_dsa_key_restriction.rb
...531220618_change_default_value_for_dsa_key_restriction.rb
+2
-2
db/migrate/20180608110058_rename_merge_requests_allow_collaboration.rb
...180608110058_rename_merge_requests_allow_collaboration.rb
+1
-0
db/migrate/gpg_keys_limits_to_mysql.rb
db/migrate/gpg_keys_limits_to_mysql.rb
+0
-1
db/migrate/limits_ci_build_trace_chunks_raw_data_for_mysql.rb
...igrate/limits_ci_build_trace_chunks_raw_data_for_mysql.rb
+1
-1
db/migrate/limits_to_mysql.rb
db/migrate/limits_to_mysql.rb
+0
-1
db/optional_migrations/composite_primary_keys.rb
db/optional_migrations/composite_primary_keys.rb
+3
-3
db/post_migrate/20161221153951_rename_reserved_project_names.rb
...t_migrate/20161221153951_rename_reserved_project_names.rb
+1
-1
db/post_migrate/20170313133418_rename_more_reserved_project_names.rb
...rate/20170313133418_rename_more_reserved_project_names.rb
+1
-1
db/post_migrate/20170425130047_drop_ci_trigger_schedules_table.rb
...migrate/20170425130047_drop_ci_trigger_schedules_table.rb
+0
-1
db/post_migrate/20170531203055_cleanup_users_ldap_email_rename.rb
...migrate/20170531203055_cleanup_users_ldap_email_rename.rb
+1
-0
db/post_migrate/20170711145558_migrate_stages_statuses.rb
db/post_migrate/20170711145558_migrate_stages_statuses.rb
+1
-0
db/post_migrate/20170830150306_drop_events_for_migration_table.rb
...migrate/20170830150306_drop_events_for_migration_table.rb
+0
-1
db/post_migrate/20171106154015_remove_issues_branch_name.rb
db/post_migrate/20171106154015_remove_issues_branch_name.rb
+0
-1
db/post_migrate/20171106180641_cleanup_add_timezone_to_issues_closed_at.rb
...0171106180641_cleanup_add_timezone_to_issues_closed_at.rb
+1
-0
db/post_migrate/20171128214150_schedule_populate_merge_request_metrics_with_events_data.rb
...hedule_populate_merge_request_metrics_with_events_data.rb
+0
-1
db/post_migrate/20180223124427_build_user_interacted_projects_table.rb
...te/20180223124427_build_user_interacted_projects_table.rb
+1
-2
db/post_migrate/20180408143355_cleanup_users_rss_token_rename.rb
..._migrate/20180408143355_cleanup_users_rss_token_rename.rb
+1
-0
db/post_migrate/20180424151928_fill_file_store.rb
db/post_migrate/20180424151928_fill_file_store.rb
+1
-1
db/post_migrate/20180430143705_backfill_runner_type_for_ci_runners_post_migrate.rb
...43705_backfill_runner_type_for_ci_runners_post_migrate.rb
+1
-0
db/post_migrate/20180507083701_set_minimal_project_build_timeout.rb
...grate/20180507083701_set_minimal_project_build_timeout.rb
+2
-0
db/post_migrate/20180523125103_cleanup_merge_requests_allow_maintainer_to_push_rename.rb
...cleanup_merge_requests_allow_maintainer_to_push_rename.rb
+1
-0
db/post_migrate/20180704145007_update_project_indexes.rb
db/post_migrate/20180704145007_update_project_indexes.rb
+1
-1
No files found.
.rubocop.yml
View file @
43971ef2
...
...
@@ -10,9 +10,9 @@ AllCops:
Exclude
:
-
'
vendor/**/*'
-
'
node_modules/**/*'
-
'
db/**/*'
-
'
db/fixtures/**/*'
-
'
ee/db/**/*'
-
'
db/schema.rb'
-
'
ee/db/geo/schema.rb'
-
'
tmp/**/*'
-
'
bin/**/*'
-
'
generator_templates/**/*'
...
...
@@ -34,6 +34,8 @@ Style/MutableConstant:
Naming/FileName
:
ExpectMatchingDefinition
:
true
Exclude
:
-
'
db/**/*'
-
'
ee/db/**/*'
-
'
spec/**/*'
-
'
features/**/*'
-
'
ee/spec/**/*'
...
...
db/migrate/20140313092127_init_schema.rb
View file @
43971ef2
class
InitSchema
<
ActiveRecord
::
Migration
DOWNTIME
=
true
# rubocop:disable Metrics/AbcSize
def
up
create_table
"broadcast_messages"
,
force: :cascade
do
|
t
|
t
.
text
"message"
,
null:
false
...
...
@@ -157,9 +158,9 @@ class InitSchema < ActiveRecord::Migration
add_index
"notes"
,
[
"author_id"
],
name:
"index_notes_on_author_id"
,
using: :btree
add_index
"notes"
,
[
"commit_id"
],
name:
"index_notes_on_commit_id"
,
using: :btree
add_index
"notes"
,
[
"created_at"
],
name:
"index_notes_on_created_at"
,
using: :btree
add_index
"notes"
,
[
"noteable_id"
,
"noteable_type"
],
name:
"index_notes_on_noteable_id_and_noteable_type"
,
using: :btree
add_index
"notes"
,
%w[noteable_id noteable_type
]
,
name:
"index_notes_on_noteable_id_and_noteable_type"
,
using: :btree
add_index
"notes"
,
[
"noteable_type"
],
name:
"index_notes_on_noteable_type"
,
using: :btree
add_index
"notes"
,
[
"project_id"
,
"noteable_type"
],
name:
"index_notes_on_project_id_and_noteable_type"
,
using: :btree
add_index
"notes"
,
%w[project_id noteable_type
]
,
name:
"index_notes_on_project_id_and_noteable_type"
,
using: :btree
add_index
"notes"
,
[
"project_id"
],
name:
"index_notes_on_project_id"
,
using: :btree
create_table
"project_group_links"
,
force: :cascade
do
|
t
|
t
.
integer
"project_id"
,
null:
false
...
...
@@ -241,7 +242,7 @@ class InitSchema < ActiveRecord::Migration
t
.
datetime
"created_at"
end
add_index
"taggings"
,
[
"tag_id"
],
name:
"index_taggings_on_tag_id"
,
using: :btree
add_index
"taggings"
,
[
"taggable_id"
,
"taggable_type"
,
"context"
],
name:
"index_taggings_on_taggable_id_and_taggable_type_and_context"
,
using: :btree
add_index
"taggings"
,
%w[taggable_id taggable_type context
]
,
name:
"index_taggings_on_taggable_id_and_taggable_type_and_context"
,
using: :btree
create_table
"tags"
,
force: :cascade
do
|
t
|
t
.
string
"name"
end
...
...
@@ -292,7 +293,7 @@ class InitSchema < ActiveRecord::Migration
add_index
"users"
,
[
"authentication_token"
],
name:
"index_users_on_authentication_token"
,
unique:
true
,
using: :btree
add_index
"users"
,
[
"confirmation_token"
],
name:
"index_users_on_confirmation_token"
,
unique:
true
,
using: :btree
add_index
"users"
,
[
"email"
],
name:
"index_users_on_email"
,
unique:
true
,
using: :btree
add_index
"users"
,
[
"extern_uid"
,
"provider"
],
name:
"index_users_on_extern_uid_and_provider"
,
unique:
true
,
using: :btree
add_index
"users"
,
%w[extern_uid provider
]
,
name:
"index_users_on_extern_uid_and_provider"
,
unique:
true
,
using: :btree
add_index
"users"
,
[
"name"
],
name:
"index_users_on_name"
,
using: :btree
add_index
"users"
,
[
"reset_password_token"
],
name:
"index_users_on_reset_password_token"
,
unique:
true
,
using: :btree
add_index
"users"
,
[
"username"
],
name:
"index_users_on_username"
,
using: :btree
...
...
db/migrate/20140407135544_fix_namespaces.rb
View file @
43971ef2
# rubocop:disable all
class
FixNamespaces
<
ActiveRecord
::
Migration
DOWNTIME
=
false
...
...
db/migrate/20140415124820_limits_to_mysql.rb
View file @
43971ef2
# rubocop:disable all
require_relative
'limits_to_mysql'
db/migrate/20140729145339_migrate_project_tags.rb
View file @
43971ef2
# rubocop:disable all
class
MigrateProjectTags
<
ActiveRecord
::
Migration
def
up
ActsAsTaggableOn
::
Tagging
.
where
(
taggable_type:
'Project'
,
context:
'labels'
).
update_all
(
context:
'tags'
)
...
...
db/migrate/20141121133009_add_timestamps_to_members.rb
View file @
43971ef2
# rubocop:disable all
# In 20140914145549_migrate_to_new_members_model.rb we forgot to set the
# created_at and updated_at times for new records in the 'members' table. This
# became a problem after commit c8e78d972a5a628870eefca0f2ccea0199c55bda which
...
...
db/migrate/20141223135007_add_import_data_to_project_table.rb
View file @
43971ef2
# rubocop:disable all
class
AddImportDataToProjectTable
<
ActiveRecord
::
Migration
def
change
add_column
:projects
,
:import_type
,
:string
...
...
db/migrate/20150116234544_add_home_page_url_for_application_settings.rb
View file @
43971ef2
# rubocop:disable all
class
AddHomePageUrlForApplicationSettings
<
ActiveRecord
::
Migration
def
change
add_column
:application_settings
,
:home_page_url
,
:string
...
...
db/migrate/20150116234545_add_gitlab_access_token_to_user.rb
View file @
43971ef2
# rubocop:disable all
class
AddGitlabAccessTokenToUser
<
ActiveRecord
::
Migration
def
change
add_column
:users
,
:gitlab_access_token
,
:string
...
...
db/migrate/20150206222854_add_notification_email_to_user.rb
View file @
43971ef2
# rubocop:disable all
class
AddNotificationEmailToUser
<
ActiveRecord
::
Migration
def
up
add_column
:users
,
:notification_email
,
:string
...
...
db/migrate/20150211174341_allow_null_in_services_project_id.rb
View file @
43971ef2
# rubocop:disable all
class
AllowNullInServicesProjectId
<
ActiveRecord
::
Migration
def
change
change_column
:services
,
:project_id
,
:integer
,
null:
true
...
...
db/migrate/20150217123345_add_bitbucket_access_token_and_secret_to_user.rb
View file @
43971ef2
# rubocop:disable all
class
AddBitbucketAccessTokenAndSecretToUser
<
ActiveRecord
::
Migration
def
change
add_column
:users
,
:bitbucket_access_token
,
:string
...
...
db/migrate/20150223022001_set_missing_last_activity_at.rb
View file @
43971ef2
# rubocop:disable all
class
SetMissingLastActivityAt
<
ActiveRecord
::
Migration
def
up
execute
"UPDATE projects SET last_activity_at = updated_at WHERE last_activity_at IS NULL"
...
...
db/migrate/20150301014758_add_restricted_visibility_levels_to_application_settings.rb
View file @
43971ef2
# rubocop:disable all
class
AddRestrictedVisibilityLevelsToApplicationSettings
<
ActiveRecord
::
Migration
def
change
add_column
:application_settings
,
:restricted_visibility_levels
,
:text
...
...
db/migrate/20150320234437_add_location_to_user.rb
View file @
43971ef2
# rubocop:disable all
class
AddLocationToUser
<
ActiveRecord
::
Migration
def
change
add_column
:users
,
:location
,
:string
...
...
db/migrate/20150324155957_set_incorrect_assignee_id_to_null.rb
View file @
43971ef2
# rubocop:disable all
class
SetIncorrectAssigneeIdToNull
<
ActiveRecord
::
Migration
def
up
execute
"UPDATE issues SET assignee_id = NULL WHERE assignee_id = -1"
...
...
db/migrate/20150327150017_add_import_data_to_project.rb
View file @
43971ef2
# rubocop:disable all
class
AddImportDataToProject
<
ActiveRecord
::
Migration
def
change
add_column
:projects
,
:import_data
,
:text
...
...
db/migrate/20150327223628_add_devise_two_factor_to_users.rb
View file @
43971ef2
# rubocop:disable all
class
AddDeviseTwoFactorToUsers
<
ActiveRecord
::
Migration
def
change
add_column
:users
,
:encrypted_otp_secret
,
:string
...
...
db/migrate/20150328132231_add_max_attachment_size_to_application_settings.rb
View file @
43971ef2
# rubocop:disable all
class
AddMaxAttachmentSizeToApplicationSettings
<
ActiveRecord
::
Migration
def
change
add_column
:application_settings
,
:max_attachment_size
,
:integer
,
default:
10
,
null:
false
...
...
db/migrate/20150331183602_add_devise_two_factor_backupable_to_users.rb
View file @
43971ef2
# rubocop:disable all
class
AddDeviseTwoFactorBackupableToUsers
<
ActiveRecord
::
Migration
def
change
add_column
:users
,
:otp_backup_codes
,
:text
...
...
db/migrate/20150411000035_fix_identities.rb
View file @
43971ef2
# rubocop:disable all
class
FixIdentities
<
ActiveRecord
::
Migration
def
up
# Up until now, legacy 'ldap' references in the database were charitably
...
...
db/migrate/20150411180045_rename_buildbox_service.rb
View file @
43971ef2
# rubocop:disable all
class
RenameBuildboxService
<
ActiveRecord
::
Migration
def
up
execute
"UPDATE services SET type = 'BuildkiteService' WHERE type = 'BuildboxService';"
...
...
db/migrate/20150417121913_create_project_import_data.rb
View file @
43971ef2
# rubocop:disable all
class
CreateProjectImportData
<
ActiveRecord
::
Migration
def
change
create_table
:project_import_data
do
|
t
|
...
...
db/migrate/20150423033240_add_default_project_visibililty_to_application_settings.rb
View file @
43971ef2
# rubocop:disable all
class
AddDefaultProjectVisibililtyToApplicationSettings
<
ActiveRecord
::
Migration
def
up
add_column
:application_settings
,
:default_project_visibility
,
:integer
...
...
db/migrate/20150425164646_gitlab_change_collation_for_tag_names.acts_as_taggable_on_engine.rb
View file @
43971ef2
# rubocop:disable all
# 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.
...
...
db/migrate/20150425164650_add_missing_taggable_index.acts_as_taggable_on_engine.rb
View file @
43971ef2
# rubocop:disable all
# This migration comes from acts_as_taggable_on_engine (originally 4)
class
AddMissingTaggableIndex
<
ActiveRecord
::
Migration
def
self
.
up
...
...
db/migrate/20150425164651_change_collation_for_tag_names.acts_as_taggable_on_engine.rb
View file @
43971ef2
# rubocop:disable all
# 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
...
...
db/migrate/20150425173433_add_default_snippet_visibility_to_app_settings.rb
View file @
43971ef2
# rubocop:disable all
class
AddDefaultSnippetVisibilityToAppSettings
<
ActiveRecord
::
Migration
def
up
add_column
:application_settings
,
:default_snippet_visibility
,
:integer
...
...
db/migrate/20150429002313_remove_abandoned_group_members_records.rb
View file @
43971ef2
# rubocop:disable all
class
RemoveAbandonedGroupMembersRecords
<
ActiveRecord
::
Migration
def
up
execute
(
"DELETE FROM members WHERE type = 'GroupMember' AND source_id NOT IN(\
...
...
db/migrate/20150502064022_add_restricted_signup_domains_to_application_settings.rb
View file @
43971ef2
# rubocop:disable all
class
AddRestrictedSignupDomainsToApplicationSettings
<
ActiveRecord
::
Migration
def
change
add_column
:application_settings
,
:restricted_signup_domains
,
:text
...
...
db/migrate/20150509180749_convert_legacy_reference_notes.rb
View file @
43971ef2
# rubocop:disable all
# Convert legacy Markdown-emphasized notes to the current, non-emphasized format
#
# _mentioned in 54f7727c850972f0401c1312a7c4a6a380de5666_
...
...
db/migrate/20150529111607_add_user_oauth_applications_to_application_settings.rb
View file @
43971ef2
# rubocop:disable all
class
AddUserOauthApplicationsToApplicationSettings
<
ActiveRecord
::
Migration
def
change
add_column
:application_settings
,
:user_oauth_applications
,
:bool
,
default:
true
...
...
db/migrate/20150609141121_add_session_expire_delay_for_application_settings.rb
View file @
43971ef2
# rubocop:disable all
class
AddSessionExpireDelayForApplicationSettings
<
ActiveRecord
::
Migration
def
change
unless
column_exists?
(
:application_settings
,
:session_expire_delay
)
...
...
db/migrate/20150620233230_add_default_otp_required_for_login_value.rb
View file @
43971ef2
# rubocop:disable all
class
AddDefaultOtpRequiredForLoginValue
<
ActiveRecord
::
Migration
def
up
execute
%q{UPDATE users SET otp_required_for_login = FALSE WHERE otp_required_for_login IS NULL}
...
...
db/migrate/20150730122406_add_updated_by_to_issuables_and_notes.rb
View file @
43971ef2
# rubocop:disable all
class
AddUpdatedByToIssuablesAndNotes
<
ActiveRecord
::
Migration
def
change
add_column
:notes
,
:updated_by_id
,
:integer
...
...
db/migrate/20150818213832_add_sent_notifications.rb
View file @
43971ef2
# rubocop:disable all
class
AddSentNotifications
<
ActiveRecord
::
Migration
def
change
create_table
:sent_notifications
do
|
t
|
...
...
db/migrate/20150915001905_enable_ssl_verification_by_default.rb
View file @
43971ef2
# rubocop:disable all
class
EnableSslVerificationByDefault
<
ActiveRecord
::
Migration
def
change
change_column
:web_hooks
,
:enable_ssl_verification
,
:boolean
,
default:
true
...
...
db/migrate/20150916000405_enable_ssl_verification_for_web_hooks.rb
View file @
43971ef2
# rubocop:disable all
class
EnableSslVerificationForWebHooks
<
ActiveRecord
::
Migration
def
up
execute
(
"UPDATE web_hooks SET enable_ssl_verification = true"
)
...
...
db/migrate/20150916114643_add_help_page_text_to_application_settings.rb
View file @
43971ef2
# rubocop:disable all
class
AddHelpPageTextToApplicationSettings
<
ActiveRecord
::
Migration
def
change
add_column
:application_settings
,
:help_page_text
,
:text
...
...
db/migrate/20150918084513_add_ci_enabled_to_application_settings.rb
View file @
43971ef2
# rubocop:disable all
class
AddCiEnabledToApplicationSettings
<
ActiveRecord
::
Migration
def
change
add_column
:application_settings
,
:ci_enabled
,
:boolean
,
null:
false
,
default:
true
...
...
db/migrate/20150918161719_remove_invalid_milestones_from_merge_requests.rb
View file @
43971ef2
# rubocop:disable all
class
RemoveInvalidMilestonesFromMergeRequests
<
ActiveRecord
::
Migration
def
up
execute
(
"UPDATE merge_requests SET milestone_id = NULL where milestone_id NOT IN (SELECT id FROM milestones)"
)
...
...
db/migrate/20150920010715_add_consumed_timestep_to_users.rb
View file @
43971ef2
# rubocop:disable all
class
AddConsumedTimestepToUsers
<
ActiveRecord
::
Migration
def
change
add_column
:users
,
:consumed_timestep
,
:integer
...
...
db/migrate/20150920161119_add_line_code_to_sent_notification.rb
View file @
43971ef2
# rubocop:disable all
class
AddLineCodeToSentNotification
<
ActiveRecord
::
Migration
def
change
add_column
:sent_notifications
,
:line_code
,
:string
...
...
db/migrate/20150924125150_add_project_id_to_ci_commit.rb
View file @
43971ef2
# rubocop:disable all
class
AddProjectIdToCiCommit
<
ActiveRecord
::
Migration
def
up
add_column
:ci_commits
,
:gl_project_id
,
:integer
...
...
db/migrate/20150924125436_migrate_project_id_for_ci_commits.rb
View file @
43971ef2
# rubocop:disable all
class
MigrateProjectIdForCiCommits
<
ActiveRecord
::
Migration
def
up
subquery
=
'SELECT gitlab_id FROM ci_projects WHERE ci_projects.id = ci_commits.project_id'
...
...
db/migrate/20150930001110_merge_request_error_field.rb
View file @
43971ef2
# rubocop:disable all
class
MergeRequestErrorField
<
ActiveRecord
::
Migration
def
up
add_column
:merge_requests
,
:merge_error
,
:string
...
...
db/migrate/20150930095736_add_null_to_name_for_ci_projects.rb
View file @
43971ef2
# rubocop:disable all
class
AddNullToNameForCiProjects
<
ActiveRecord
::
Migration
def
up
change_column_null
:ci_projects
,
:name
,
true
...
...
db/migrate/20151002112914_add_stage_idx_to_builds.rb
View file @
43971ef2
# rubocop:disable all
class
AddStageIdxToBuilds
<
ActiveRecord
::
Migration
def
change
add_column
:ci_builds
,
:stage_idx
,
:integer
...
...
db/migrate/20151002122929_add_ref_and_tag_to_builds.rb
View file @
43971ef2
# rubocop:disable all
class
AddRefAndTagToBuilds
<
ActiveRecord
::
Migration
def
change
add_column
:ci_builds
,
:tag
,
:boolean
...
...
db/migrate/20151005075649_add_user_id_to_build.rb
View file @
43971ef2
# rubocop:disable all
class
AddUserIdToBuild
<
ActiveRecord
::
Migration
def
change
add_column
:ci_builds
,
:user_id
,
:integer
...
...
db/migrate/20151008143519_add_admin_notification_email_setting.rb
View file @
43971ef2
# rubocop:disable all
class
AddAdminNotificationEmailSetting
<
ActiveRecord
::
Migration
def
change
add_column
:application_settings
,
:admin_notification_email
,
:string
...
...
db/migrate/20151013092124_add_artifacts_file_to_builds.rb
View file @
43971ef2
# rubocop:disable all
class
AddArtifactsFileToBuilds
<
ActiveRecord
::
Migration
def
change
add_column
:ci_builds
,
:artifacts_file
,
:text
...
...
db/migrate/20151019111551_fix_build_tags.rb
View file @
43971ef2
# rubocop:disable all
class
FixBuildTags
<
ActiveRecord
::
Migration
def
up
execute
(
"UPDATE taggings SET taggable_type='CommitStatus' WHERE taggable_type='Ci::Build'"
)
...
...
db/migrate/20151019111703_fail_build_without_names.rb
View file @
43971ef2
# rubocop:disable all
class
FailBuildWithoutNames
<
ActiveRecord
::
Migration
def
up
execute
(
"UPDATE ci_builds SET status='failed' WHERE name IS NULL AND status='pending'"
)
...
...
db/migrate/20151020173516_ci_limits_to_mysql.rb
View file @
43971ef2
# rubocop:disable all
class
CiLimitsToMysql
<
ActiveRecord
::
Migration
def
change
return
unless
ActiveRecord
::
Base
.
configurations
[
Rails
.
env
][
'adapter'
]
=~
/^mysql/
...
...
db/migrate/20151023112551_fail_build_with_empty_name.rb
View file @
43971ef2
# rubocop:disable all
class
FailBuildWithEmptyName
<
ActiveRecord
::
Migration
def
up
execute
(
"UPDATE ci_builds SET status='failed' WHERE (name IS NULL OR name='') AND status='pending'"
)
...
...
db/migrate/20151023144219_remove_satellites.rb
View file @
43971ef2
# rubocop:disable all
require
'fileutils'
class
RemoveSatellites
<
ActiveRecord
::
Migration
...
...
db/migrate/20151103133339_add_shared_runners_setting.rb
View file @
43971ef2
# rubocop:disable all
class
AddSharedRunnersSetting
<
ActiveRecord
::
Migration
def
up
add_column
:application_settings
,
:shared_runners_enabled
,
:boolean
,
default:
true
,
null:
false
...
...
db/migrate/20151104105513_add_file_to_lfs_objects.rb
View file @
43971ef2
# rubocop:disable all
class
AddFileToLfsObjects
<
ActiveRecord
::
Migration
def
change
add_column
:lfs_objects
,
:file
,
:string
...
...
db/migrate/20151109100728_add_max_artifacts_size_to_application_settings.rb
View file @
43971ef2
# rubocop:disable all
class
AddMaxArtifactsSizeToApplicationSettings
<
ActiveRecord
::
Migration
def
change
add_column
:application_settings
,
:max_artifacts_size
,
:integer
,
default:
100
,
null:
false
...
...
db/migrate/20151110125604_add_import_error_to_project.rb
View file @
43971ef2
# rubocop:disable all
class
AddImportErrorToProject
<
ActiveRecord
::
Migration
def
change
add_column
:projects
,
:import_error
,
:text
...
...
db/migrate/20151201203948_raise_hook_url_limit.rb
View file @
43971ef2
# rubocop:disable all
class
RaiseHookUrlLimit
<
ActiveRecord
::
Migration
def
change
change_column
:web_hooks
,
:url
,
:string
,
limit:
2000
...
...
db/migrate/20151209144329_migrate_ci_web_hooks.rb
View file @
43971ef2
# rubocop:disable all
class
MigrateCiWebHooks
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
...
...
db/migrate/20151209145909_migrate_ci_emails.rb
View file @
43971ef2
# rubocop:disable all
class
MigrateCiEmails
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
...
...
db/migrate/20151210030143_add_unlock_token_to_user.rb
View file @
43971ef2
# rubocop:disable all
class
AddUnlockTokenToUser
<
ActiveRecord
::
Migration
def
change
add_column
:users
,
:unlock_token
,
:string
...
...
db/migrate/20151210072243_add_runners_registration_token_to_application_settings.rb
View file @
43971ef2
# rubocop:disable all
class
AddRunnersRegistrationTokenToApplicationSettings
<
ActiveRecord
::
Migration
def
change
add_column
:application_settings
,
:runners_registration_token
,
:string
...
...
db/migrate/20151210125232_migrate_ci_slack_service.rb
View file @
43971ef2
# rubocop:disable all
class
MigrateCiSlackService
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
...
...
db/migrate/20151210125927_migrate_ci_hip_chat_service.rb
View file @
43971ef2
# rubocop:disable all
class
MigrateCiHipChatService
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
...
...
db/migrate/20151210125929_add_project_id_to_ci.rb
View file @
43971ef2
# rubocop:disable all
class
AddProjectIdToCi
<
ActiveRecord
::
Migration
def
change
add_column
:ci_builds
,
:gl_project_id
,
:integer
...
...
db/migrate/20151210125930_migrate_ci_to_project.rb
View file @
43971ef2
# rubocop:disable all
class
MigrateCiToProject
<
ActiveRecord
::
Migration
def
up
migrate_project_id_for_table
(
'ci_runner_projects'
)
...
...
db/migrate/20151218154042_add_tfa_to_application_settings.rb
View file @
43971ef2
# rubocop:disable all
class
AddTfaToApplicationSettings
<
ActiveRecord
::
Migration
def
change
change_table
:application_settings
do
|
t
|
...
...
db/migrate/20151221234414_add_tfa_additional_fields.rb
View file @
43971ef2
# rubocop:disable all
class
AddTfaAdditionalFields
<
ActiveRecord
::
Migration
def
change
change_table
:users
do
|
t
|
...
...
db/migrate/20151224123230_rename_emojis.rb
View file @
43971ef2
# rubocop:disable all
# Migration type: online without errors (works on previous version and new one)
class
RenameEmojis
<
ActiveRecord
::
Migration
def
up
...
...
db/migrate/20151228175719_add_recaptcha_to_application_settings.rb
View file @
43971ef2
# rubocop:disable all
class
AddRecaptchaToApplicationSettings
<
ActiveRecord
::
Migration
def
change
change_table
:application_settings
do
|
t
|
...
...
db/migrate/20151229102248_influxdb_udp_port_setting.rb
View file @
43971ef2
# rubocop:disable all
class
InfluxdbUdpPortSetting
<
ActiveRecord
::
Migration
def
change
add_column
:application_settings
,
:metrics_port
,
:integer
,
default:
8089
...
...
db/migrate/20151230132518_add_artifacts_metadata_to_ci_build.rb
View file @
43971ef2
# rubocop:disable all
class
AddArtifactsMetadataToCiBuild
<
ActiveRecord
::
Migration
def
change
add_column
:ci_builds
,
:artifacts_metadata
,
:text
...
...
db/migrate/20151231152326_add_akismet_to_application_settings.rb
View file @
43971ef2
# rubocop:disable all
class
AddAkismetToApplicationSettings
<
ActiveRecord
::
Migration
def
change
change_table
:application_settings
do
|
t
|
...
...
db/migrate/20160113111034_add_metrics_sample_interval.rb
View file @
43971ef2
# rubocop:disable all
class
AddMetricsSampleInterval
<
ActiveRecord
::
Migration
def
change
add_column
:application_settings
,
:metrics_sample_interval
,
:integer
,
...
...
db/migrate/20160118155830_add_sentry_to_application_settings.rb
View file @
43971ef2
# rubocop:disable all
class
AddSentryToApplicationSettings
<
ActiveRecord
::
Migration
def
change
change_table
:application_settings
do
|
t
|
...
...
db/migrate/20160120172143_add_base_commit_sha_to_merge_request_diffs.rb
View file @
43971ef2
# rubocop:disable all
class
AddBaseCommitShaToMergeRequestDiffs
<
ActiveRecord
::
Migration
def
change
add_column
:merge_request_diffs
,
:base_commit_sha
,
:string
...
...
db/migrate/20160128233227_change_lfs_objects_size_column.rb
View file @
43971ef2
# rubocop:disable all
class
ChangeLfsObjectsSizeColumn
<
ActiveRecord
::
Migration
def
change
change_column
:lfs_objects
,
:size
,
:integer
,
limit:
8
...
...
db/migrate/20160129135155_remove_dot_atom_path_ending_of_projects.rb
View file @
43971ef2
# rubocop:disable all
class
RemoveDotAtomPathEndingOfProjects
<
ActiveRecord
::
Migration
include
Gitlab
::
ShellAdapter
...
...
db/migrate/20160129155512_add_merge_commit_sha_to_merge_requests.rb
View file @
43971ef2
# rubocop:disable all
class
AddMergeCommitShaToMergeRequests
<
ActiveRecord
::
Migration
def
change
add_column
:merge_requests
,
:merge_commit_sha
,
:string
...
...
db/migrate/20160204144558_add_real_size_to_merge_request_diffs.rb
View file @
43971ef2
# rubocop:disable all
class
AddRealSizeToMergeRequestDiffs
<
ActiveRecord
::
Migration
def
change
add_column
:merge_request_diffs
,
:real_size
,
:string
...
...
db/migrate/20160217100506_add_description_to_label.rb
View file @
43971ef2
# rubocop:disable all
class
AddDescriptionToLabel
<
ActiveRecord
::
Migration
def
change
add_column
:labels
,
:description
,
:string
...
...
db/migrate/20160217174422_add_note_to_tasks.rb
View file @
43971ef2
# rubocop:disable all
class
AddNoteToTasks
<
ActiveRecord
::
Migration
def
change
add_reference
:tasks
,
:note
,
index:
true
...
...
db/migrate/20160220123949_rename_tasks_to_todos.rb
View file @
43971ef2
# rubocop:disable all
class
RenameTasksToTodos
<
ActiveRecord
::
Migration
def
change
rename_table
:tasks
,
:todos
...
...
db/migrate/20160229193553_add_main_language_to_repository.rb
View file @
43971ef2
# rubocop:disable all
class
AddMainLanguageToRepository
<
ActiveRecord
::
Migration
def
change
add_column
:projects
,
:main_language
,
:string
...
...
db/migrate/20160302151724_add_import_credentials_to_project_import_data.rb
View file @
43971ef2
# rubocop:disable all
class
AddImportCredentialsToProjectImportData
<
ActiveRecord
::
Migration
def
change
add_column
:project_import_data
,
:encrypted_credentials
,
:text
...
...
db/migrate/20160307221555_disallow_blank_line_code_on_note.rb
View file @
43971ef2
# rubocop:disable all
class
DisallowBlankLineCodeOnNote
<
ActiveRecord
::
Migration
def
up
execute
(
"UPDATE notes SET line_code = NULL WHERE line_code = ''"
)
...
...
db/migrate/20160316192622_change_target_id_to_null_on_todos.rb
View file @
43971ef2
# rubocop:disable all
class
ChangeTargetIdToNullOnTodos
<
ActiveRecord
::
Migration
def
change
change_column_null
:todos
,
:target_id
,
true
...
...
db/migrate/20160317092222_add_moved_to_to_issue.rb
View file @
43971ef2
# rubocop:disable all
class
AddMovedToToIssue
<
ActiveRecord
::
Migration
def
change
add_reference
:issues
,
:moved_to
,
references: :issues
...
...
db/migrate/20160324020319_remove_todos_for_deleted_issues.rb
View file @
43971ef2
# rubocop:disable all
class
RemoveTodosForDeletedIssues
<
ActiveRecord
::
Migration
def
up
execute
<<-
SQL
...
...
db/migrate/20160328115649_migrate_new_notification_setting.rb
View file @
43971ef2
# rubocop:disable all
# This migration will create one row of NotificationSetting for each Member row
# It can take long time on big instances.
#
...
...
db/migrate/20160331133914_remove_todos_for_deleted_merge_requests.rb
View file @
43971ef2
# rubocop:disable all
class
RemoveTodosForDeletedMergeRequests
<
ActiveRecord
::
Migration
def
up
execute
<<-
SQL
...
...
db/migrate/20160407120251_add_images_enabled_for_project.rb
View file @
43971ef2
# rubocop:disable all
class
AddImagesEnabledForProject
<
ActiveRecord
::
Migration
def
change
add_column
:projects
,
:container_registry_enabled
,
:boolean
...
...
db/migrate/20160413115152_add_token_to_web_hooks.rb
View file @
43971ef2
# rubocop:disable all
class
AddTokenToWebHooks
<
ActiveRecord
::
Migration
def
change
add_column
:web_hooks
,
:token
,
:string
...
...
db/migrate/20160415062917_create_personal_access_tokens.rb
View file @
43971ef2
# rubocop:disable Migration/Datetime
# rubocop:disable Migration/Timestamps
class
CreatePersonalAccessTokens
<
ActiveRecord
::
Migration
def
change
...
...
db/migrate/20160415133440_add_shared_runners_text_to_application_settings.rb
View file @
43971ef2
# rubocop:disable all
class
AddSharedRunnersTextToApplicationSettings
<
ActiveRecord
::
Migration
def
change
add_column
:application_settings
,
:shared_runners_text
,
:text
...
...
db/migrate/20160416182152_convert_award_note_to_emoji_award.rb
View file @
43971ef2
# rubocop:disable all
class
ConvertAwardNoteToEmojiAward
<
ActiveRecord
::
Migration
disable_ddl_transaction!
...
...
db/migrate/20160419120017_add_metrics_packet_size.rb
View file @
43971ef2
# rubocop:disable all
class
AddMetricsPacketSize
<
ActiveRecord
::
Migration
def
change
add_column
:application_settings
,
:metrics_packet_size
,
:integer
,
default:
1
...
...
db/migrate/20160504091942_add_disabled_oauth_sign_in_sources_to_application_settings.rb
View file @
43971ef2
# rubocop:disable all
class
AddDisabledOauthSignInSourcesToApplicationSettings
<
ActiveRecord
::
Migration
def
change
add_column
:application_settings
,
:disabled_oauth_sign_in_sources
,
:text
...
...
db/migrate/20160504112519_add_run_untagged_to_ci_runner.rb
View file @
43971ef2
# rubocop:disable all
class
AddRunUntaggedToCiRunner
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
disable_ddl_transaction!
...
...
db/migrate/20160508215820_add_type_to_notes.rb
View file @
43971ef2
# rubocop:disable all
class
AddTypeToNotes
<
ActiveRecord
::
Migration
def
change
add_column
:notes
,
:type
,
:string
...
...
db/migrate/20160509201028_add_health_check_access_token_to_application_settings.rb
View file @
43971ef2
# rubocop:disable all
class
AddHealthCheckAccessTokenToApplicationSettings
<
ActiveRecord
::
Migration
def
change
add_column
:application_settings
,
:health_check_access_token
,
:string
...
...
db/migrate/20160527020117_remove_notification_settings_for_deleted_projects.rb
View file @
43971ef2
# rubocop:disable all
class
RemoveNotificationSettingsForDeletedProjects
<
ActiveRecord
::
Migration
def
up
execute
<<-
SQL
...
...
db/migrate/20160530150109_add_container_registry_token_expire_delay_to_application_settings.rb
View file @
43971ef2
# rubocop:disable all
# This is ONLINE migration
class
AddContainerRegistryTokenExpireDelayToApplicationSettings
<
ActiveRecord
::
Migration
...
...
db/migrate/20160603180330_remove_duplicated_notification_settings.rb
View file @
43971ef2
# rubocop:disable all
class
RemoveDuplicatedNotificationSettings
<
ActiveRecord
::
Migration
def
up
duplicates
=
exec_query
(
%Q{
...
...
db/migrate/20160608155312_add_after_sign_up_text_to_application_settings.rb
View file @
43971ef2
# rubocop:disable all
class
AddAfterSignUpTextToApplicationSettings
<
ActiveRecord
::
Migration
def
change
add_column
:application_settings
,
:after_sign_up_text
,
:text
...
...
db/migrate/20160610204157_add_deployments.rb
View file @
43971ef2
# 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
AddDeployments
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
...
...
db/migrate/20160610204158_add_environments.rb
View file @
43971ef2
# 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
AddEnvironments
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
...
...
db/migrate/20160615173316_add_enabled_git_access_protocols_to_application_settings.rb
View file @
43971ef2
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
# rubocop:disable all
class
AddEnabledGitAccessProtocolsToApplicationSettings
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
...
...
db/migrate/20160616102642_remove_duplicated_keys.rb
View file @
43971ef2
# rubocop:disable all
class
RemoveDuplicatedKeys
<
ActiveRecord
::
Migration
def
up
select_all
(
"SELECT fingerprint FROM
#{
quote_table_name
(
:keys
)
}
GROUP BY fingerprint HAVING COUNT(*) > 1"
).
each
do
|
row
|
...
...
db/migrate/20160824124900_add_table_issue_metrics.rb
View file @
43971ef2
# 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
# rubocop:disable Migration/Timestamps
class
AddTableIssueMetrics
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
...
...
db/migrate/20160825052008_add_table_merge_request_metrics.rb
View file @
43971ef2
# 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
# rubocop:disable Migration/Timestamps
class
AddTableMergeRequestMetrics
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
...
...
db/migrate/20161113184239_create_user_chat_names_table.rb
View file @
43971ef2
# rubocop:disable Migration/Datetime
# rubocop:disable Migration/Timestamps
class
CreateUserChatNamesTable
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
...
...
db/migrate/20170130221926_create_uploads.rb
View file @
43971ef2
# rubocop:disable Migration/Datetime
class
CreateUploads
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
...
...
db/migrate/20170222143317_drop_ci_projects.rb
View file @
43971ef2
# rubocop:disable Migration/Datetime
class
DropCiProjects
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
...
...
db/migrate/20170301205639_remove_unused_ci_tables_and_columns.rb
View file @
43971ef2
# rubocop:disable Migration/RemoveColumn
# rubocop:disable Migration/Datetime
class
RemoveUnusedCiTablesAndColumns
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
...
...
db/migrate/20170329095907_create_ci_trigger_schedules.rb
View file @
43971ef2
# rubocop:disable Migration/Datetime
class
CreateCiTriggerSchedules
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
...
...
db/migrate/20170402231018_remove_index_for_users_current_sign_in_at.rb
View file @
43971ef2
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
# rubocop:disable RemoveIndex
class
RemoveIndexForUsersCurrentSignInAt
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
...
...
db/migrate/20170425112128_create_pipeline_schedules_table.rb
View file @
43971ef2
# rubocop:disable Migration/Datetime
# rubocop:disable Migration/Timestamps
class
CreatePipelineSchedulesTable
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
...
...
db/migrate/20170502091007_markdown_cache_limits_to_mysql.rb
View file @
43971ef2
# rubocop:disable all
require_relative
'markdown_cache_limits_to_mysql'
db/migrate/20170531202042_rename_users_ldap_email_to_external_email.rb
View file @
43971ef2
...
...
@@ -6,6 +6,7 @@ class RenameUsersLdapEmailToExternalEmail < ActiveRecord::Migration
disable_ddl_transaction!
def
up
# rubocop:disable Migration/UpdateLargeTable
rename_column_concurrently
:users
,
:ldap_email
,
:external_email
end
...
...
db/migrate/20171106171453_add_timezone_to_issues_closed_at.rb
View file @
43971ef2
...
...
@@ -10,6 +10,7 @@ class AddTimezoneToIssuesClosedAt < ActiveRecord::Migration
disable_ddl_transaction!
def
up
# rubocop:disable Migration/UpdateLargeTable
change_column_type_concurrently
(
:issues
,
:closed_at
,
:datetime_with_timezone
)
end
...
...
db/migrate/20180201145907_migrate_remaining_issues_closed_at.rb
View file @
43971ef2
...
...
@@ -25,6 +25,7 @@ class MigrateRemainingIssuesClosedAt < ActiveRecord::Migration
# Due to some EE merge problems some environments may not have the
# "closed_at_for_type_change" column. If this is the case we have no
# other option than to migrate the data _right now_.
# rubocop:disable Migration/UpdateLargeTable
change_column_type_concurrently
(
:issues
,
:closed_at
,
:datetime_with_timezone
)
cleanup_concurrent_column_type_change
(
:issues
,
:closed_at
)
end
...
...
db/migrate/20180214093516_create_badges.rb
View file @
43971ef2
...
...
@@ -12,6 +12,7 @@ class CreateBadges < ActiveRecord::Migration
t
.
timestamps_with_timezone
null:
false
end
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:badges
,
:namespaces
,
column: :group_id
,
on_delete: :cascade
end
end
db/migrate/20180227182112_add_group_id_to_boards_ce.rb
View file @
43971ef2
...
...
@@ -8,6 +8,7 @@ class AddGroupIdToBoardsCe < ActiveRecord::Migration
def
up
return
if
group_id_exists?
# rubocop:disable Migration/AddConcurrentForeignKey
add_column
:boards
,
:group_id
,
:integer
add_foreign_key
:boards
,
:namespaces
,
column: :group_id
,
on_delete: :cascade
add_concurrent_index
:boards
,
:group_id
...
...
@@ -18,6 +19,7 @@ class AddGroupIdToBoardsCe < ActiveRecord::Migration
def
down
return
unless
group_id_exists?
# rubocop:disable Migration/RemoveIndex
remove_foreign_key
:boards
,
column: :group_id
remove_index
:boards
,
:group_id
if
index_exists?
:boards
,
:group_id
remove_column
:boards
,
:group_id
...
...
db/migrate/20180302152117_ensure_foreign_keys_on_clusters_applications.rb
View file @
43971ef2
...
...
@@ -8,6 +8,7 @@ class EnsureForeignKeysOnClustersApplications < ActiveRecord::Migration
disable_ddl_transaction!
# rubocop:disable Cop/InBatches
def
up
existing
=
Clusters
::
Cluster
.
joins
(
:application_ingress
)
...
...
db/migrate/20180309160427_add_partial_indexes_on_todos.rb
View file @
43971ef2
...
...
@@ -7,15 +7,16 @@ class AddPartialIndexesOnTodos < ActiveRecord::Migration
# Set this constant to true if this migration requires downtime.
DOWNTIME
=
false
disable_ddl_transaction!
disable_ddl_transaction!
INDEX_NAME_PENDING
=
"index_todos_on_user_id_and_id_pending"
INDEX_NAME_DONE
=
"index_todos_on_user_id_and_id_done"
INDEX_NAME_PENDING
=
"index_todos_on_user_id_and_id_pending"
INDEX_NAME_DONE
=
"index_todos_on_user_id_and_id_done"
def
up
unless
index_exists?
(
:todos
,
[
:user_id
,
:id
],
name:
INDEX_NAME_PENDING
)
add_concurrent_index
(
:todos
,
[
:user_id
,
:id
],
where:
"state='pending'"
,
name:
INDEX_NAME_PENDING
)
end
unless
index_exists?
(
:todos
,
[
:user_id
,
:id
],
name:
INDEX_NAME_DONE
)
add_concurrent_index
(
:todos
,
[
:user_id
,
:id
],
where:
"state='done'"
,
name:
INDEX_NAME_DONE
)
end
...
...
@@ -24,5 +25,5 @@ class AddPartialIndexesOnTodos < ActiveRecord::Migration
def
down
remove_concurrent_index
(
:todos
,
[
:user_id
,
:id
],
where:
"state='pending'"
,
name:
INDEX_NAME_PENDING
)
remove_concurrent_index
(
:todos
,
[
:user_id
,
:id
],
where:
"state='done'"
,
name:
INDEX_NAME_DONE
)
end
end
end
db/migrate/20180408143354_rename_users_rss_token_to_feed_token.rb
View file @
43971ef2
...
...
@@ -6,6 +6,7 @@ class RenameUsersRssTokenToFeedToken < ActiveRecord::Migration
disable_ddl_transaction!
def
up
# rubocop:disable Migration/UpdateLargeTable
rename_column_concurrently
:users
,
:rss_token
,
:feed_token
end
...
...
db/migrate/20180417090132_add_index_constraints_to_internal_id_table.rb
View file @
43971ef2
...
...
@@ -26,6 +26,7 @@ class AddIndexConstraintsToInternalIdTable < ActiveRecord::Migration
end
private
def
replace_index
(
table
,
columns
,
name
:)
temporary_name
=
"
#{
name
}
_old"
...
...
db/migrate/20180418053107_add_index_to_ci_job_artifacts_file_store.rb
View file @
43971ef2
...
...
@@ -10,6 +10,7 @@ class AddIndexToCiJobArtifactsFileStore < ActiveRecord::Migration
end
def
down
# rubocop:disable Migration/RemoveIndex
remove_index
:ci_job_artifacts
,
:file_store
if
index_exists?
(
:ci_job_artifacts
,
:file_store
)
end
end
db/migrate/20180424090541_add_enforce_terms_to_application_settings.rb
View file @
43971ef2
...
...
@@ -4,6 +4,7 @@ class AddEnforceTermsToApplicationSettings < ActiveRecord::Migration
DOWNTIME
=
false
def
change
# rubocop:disable Migration/SaferBooleanColumn
add_column
:application_settings
,
:enforce_terms
,
:boolean
,
default:
false
end
end
db/migrate/20180425075446_create_term_agreements.rb
View file @
43971ef2
...
...
@@ -21,6 +21,7 @@ class CreateTermAgreements < ActiveRecord::Migration
end
def
down
# rubocop:disable Migration/RemoveIndex
remove_index
:term_agreements
,
name:
'term_agreements_unique_index'
drop_table
:term_agreements
...
...
db/migrate/20180503131624_create_remote_mirrors.rb
View file @
43971ef2
...
...
@@ -23,6 +23,7 @@ class CreateRemoteMirrors < ActiveRecord::Migration
t
.
string
:encrypted_credentials_iv
t
.
string
:encrypted_credentials_salt
# rubocop:disable Migration/Timestamps
t
.
timestamps
null:
false
end
end
...
...
db/migrate/20180503150427_add_index_to_namespaces_runners_token.rb
View file @
43971ef2
...
...
@@ -14,6 +14,7 @@ class AddIndexToNamespacesRunnersToken < ActiveRecord::Migration
def
down
if
index_exists?
(
:namespaces
,
:runners_token
,
unique:
true
)
# rubocop:disable Migration/RemoveIndex
remove_index
:namespaces
,
:runners_token
end
end
...
...
db/migrate/20180503175054_add_indexes_to_project_mirror_data.rb
View file @
43971ef2
...
...
@@ -11,6 +11,7 @@ class AddIndexesToProjectMirrorData < ActiveRecord::Migration
end
def
down
# rubocop:disable Migration/RemoveIndex
remove_index
:project_mirror_data
,
:jid
if
index_exists?
:project_mirror_data
,
:jid
remove_index
:project_mirror_data
,
:status
if
index_exists?
:project_mirror_data
,
:status
end
...
...
db/migrate/20180503193542_add_indexes_to_remote_mirror.rb
View file @
43971ef2
...
...
@@ -11,5 +11,7 @@ class AddIndexesToRemoteMirror < ActiveRecord::Migration
def
down
# ee/db/migrate/20170208144550_add_index_to_mirrors_last_update_at_fields.rb will remove the index.
# rubocop:disable Migration/RemoveIndex
remove_index
:remote_mirrors
,
:last_successful_update_at
if
index_exists?
:remote_mirrors
,
:last_successful_update_at
end
end
db/migrate/20180511090724_add_index_on_ci_runners_runner_type.rb
View file @
43971ef2
...
...
@@ -10,6 +10,7 @@ class AddIndexOnCiRunnersRunnerType < ActiveRecord::Migration
end
def
down
# rubocop:disable Migration/RemoveIndex
remove_index
:ci_runners
,
:runner_type
end
end
db/migrate/20180515005612_add_squash_to_merge_requests.rb
View file @
43971ef2
...
...
@@ -9,6 +9,7 @@ class AddSquashToMergeRequests < ActiveRecord::Migration
def
up
unless
column_exists?
(
:merge_requests
,
:squash
)
# rubocop:disable Migration/UpdateLargeTable
add_column_with_default
:merge_requests
,
:squash
,
:boolean
,
default:
false
,
allow_null:
false
end
end
...
...
db/migrate/20180515121227_create_notes_diff_files.rb
View file @
43971ef2
...
...
@@ -16,6 +16,7 @@ class CreateNotesDiffFiles < ActiveRecord::Migration
t
.
text
:old_path
,
null:
false
end
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:note_diff_files
,
:notes
,
column: :diff_note_id
,
on_delete: :cascade
end
end
db/migrate/20180521171529_increase_mysql_text_limit_for_gpg_keys.rb
View file @
43971ef2
# rubocop:disable all
require_relative
'gpg_keys_limits_to_mysql'
db/migrate/20180529093006_ensure_remote_mirror_columns.rb
View file @
43971ef2
...
...
@@ -6,6 +6,7 @@ class EnsureRemoteMirrorColumns < ActiveRecord::Migration
disable_ddl_transaction!
def
up
# rubocop:disable Migration/Datetime
add_column
:remote_mirrors
,
:last_update_started_at
,
:datetime
unless
column_exists?
(
:remote_mirrors
,
:last_update_started_at
)
add_column
:remote_mirrors
,
:remote_name
,
:string
unless
column_exists?
(
:remote_mirrors
,
:remote_name
)
...
...
db/migrate/20180531220618_change_default_value_for_dsa_key_restriction.rb
View file @
43971ef2
...
...
@@ -4,13 +4,13 @@ class ChangeDefaultValueForDsaKeyRestriction < ActiveRecord::Migration
def
up
change_column
:application_settings
,
:dsa_key_restriction
,
:integer
,
null:
false
,
default:
-
1
default:
-
1
execute
(
"UPDATE application_settings SET dsa_key_restriction = -1"
)
end
def
down
change_column
:application_settings
,
:dsa_key_restriction
,
:integer
,
null:
false
,
default:
0
default:
0
end
end
db/migrate/20180608110058_rename_merge_requests_allow_collaboration.rb
View file @
43971ef2
...
...
@@ -11,6 +11,7 @@ class RenameMergeRequestsAllowCollaboration < ActiveRecord::Migration
def
up
if
column_exists?
(
:merge_requests
,
:allow_collaboration
)
# rubocop:disable Migration/UpdateLargeTable
rename_column_concurrently
:merge_requests
,
:allow_collaboration
,
:allow_maintainer_to_push
end
end
...
...
db/migrate/gpg_keys_limits_to_mysql.rb
View file @
43971ef2
class
IncreaseMysqlTextLimitForGpgKeys
<
ActiveRecord
::
Migration
# Set this constant to true if this migration requires downtime.
DOWNTIME
=
false
...
...
db/migrate/limits_ci_build_trace_chunks_raw_data_for_mysql.rb
View file @
43971ef2
...
...
@@ -4,6 +4,6 @@ class LimitsCiBuildTraceChunksRawDataForMysql < ActiveRecord::Migration
# Mysql needs MEDIUMTEXT type (up to 16MB) rather than TEXT (up to 64KB)
# Because 'raw_data' is always capped by Ci::BuildTraceChunk::CHUNK_SIZE, which is 128KB
change_column
:ci_build_trace_chunks
,
:raw_data
,
:binary
,
limit:
16
.
megabytes
-
1
#MEDIUMTEXT
change_column
:ci_build_trace_chunks
,
:raw_data
,
:binary
,
limit:
16
.
megabytes
-
1
#
MEDIUMTEXT
end
end
db/migrate/limits_to_mysql.rb
View file @
43971ef2
# rubocop:disable all
class
LimitsToMysql
<
ActiveRecord
::
Migration
def
up
return
unless
ActiveRecord
::
Base
.
configurations
[
Rails
.
env
][
'adapter'
]
=~
/^mysql/
...
...
db/optional_migrations/composite_primary_keys.rb
View file @
43971ef2
...
...
@@ -21,8 +21,8 @@ class CompositePrimaryKeysMigration < ActiveRecord::Migration
Index
.
new
(
:merge_request_diff_commits
,
'index_merge_request_diff_commits_on_mr_diff_id_and_order'
,
%i(merge_request_diff_id relative_order)
),
Index
.
new
(
:project_authorizations
,
'index_project_authorizations_on_user_id_project_id_access_level'
,
%i(user_id project_id access_level)
),
Index
.
new
(
:push_event_payloads
,
'index_push_event_payloads_on_event_id'
,
%i(event_id)
),
Index
.
new
(
:schema_migrations
,
'unique_schema_migrations'
,
%(version)
)
,
]
Index
.
new
(
:schema_migrations
,
'unique_schema_migrations'
,
%(version)
)
]
.
freeze
disable_ddl_transaction!
...
...
@@ -45,6 +45,7 @@ class CompositePrimaryKeysMigration < ActiveRecord::Migration
end
private
def
add_primary_key
(
index
)
execute
"ALTER TABLE
#{
index
.
table
}
ADD PRIMARY KEY USING INDEX
#{
index
.
name
}
"
end
...
...
@@ -60,4 +61,3 @@ class CompositePrimaryKeysMigration < ActiveRecord::Migration
execute
"ALTER TABLE
#{
index
.
table
}
DROP CONSTRAINT IF EXISTS
#{
temp_index_name
}
"
end
end
db/post_migrate/20161221153951_rename_reserved_project_names.rb
View file @
43971ef2
...
...
@@ -124,7 +124,7 @@ class RenameReservedProjectNames < ActiveRecord::Migration
def
rename_project_row
(
project
,
path
)
project
.
respond_to?
(
:update_attributes
)
&&
project
.
update
_attributes
(
path:
path
)
&&
project
.
update
(
path:
path
)
&&
project
.
respond_to?
(
:rename_repo
)
end
end
db/post_migrate/20170313133418_rename_more_reserved_project_names.rb
View file @
43971ef2
...
...
@@ -66,7 +66,7 @@ class RenameMoreReservedProjectNames < ActiveRecord::Migration
def
rename_project_row
(
project
,
path
)
project
.
respond_to?
(
:update_attributes
)
&&
project
.
update
_attributes
(
path:
path
)
&&
project
.
update
(
path:
path
)
&&
project
.
respond_to?
(
:rename_repo
)
end
end
db/post_migrate/20170425130047_drop_ci_trigger_schedules_table.rb
View file @
43971ef2
# rubocop:disable Migration/Datetime
class
DropCiTriggerSchedulesTable
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
...
...
db/post_migrate/20170531203055_cleanup_users_ldap_email_rename.rb
View file @
43971ef2
...
...
@@ -10,6 +10,7 @@ class CleanupUsersLdapEmailRename < ActiveRecord::Migration
end
def
down
# rubocop:disable Migration/UpdateLargeTable
rename_column_concurrently
:users
,
:external_email
,
:ldap_email
end
end
db/post_migrate/20170711145558_migrate_stages_statuses.rb
View file @
43971ef2
...
...
@@ -28,6 +28,7 @@ class MigrateStagesStatuses < ActiveRecord::Migration
def
down
disable_statement_timeout
# rubocop:disable Migration/UpdateLargeTable
update_column_in_batches
(
:ci_stages
,
:status
,
nil
)
end
end
db/post_migrate/20170830150306_drop_events_for_migration_table.rb
View file @
43971ef2
...
...
@@ -18,7 +18,6 @@ class DropEventsForMigrationTable < ActiveRecord::Migration
end
end
# rubocop: disable Migration/Datetime
def
down
create_table
:events_for_migration
do
|
t
|
t
.
string
:target_type
,
index:
true
...
...
db/post_migrate/20171106154015_remove_issues_branch_name.rb
View file @
43971ef2
# rubocop:disable Migration/RemoveColumn
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
...
...
db/post_migrate/20171106180641_cleanup_add_timezone_to_issues_closed_at.rb
View file @
43971ef2
...
...
@@ -13,6 +13,7 @@ class CleanupAddTimezoneToIssuesClosedAt < ActiveRecord::Migration
end
# rubocop:disable Migration/Datetime
# rubocop:disable Migration/UpdateLargeTable
def
down
change_column_type_concurrently
(
:issues
,
:closed_at
,
:datetime
)
end
...
...
db/post_migrate/20171128214150_schedule_populate_merge_request_metrics_with_events_data.rb
View file @
43971ef2
# frozen_string_literal: true
# rubocop:disable GitlabSecurity/SqlInjection
class
SchedulePopulateMergeRequestMetricsWithEventsData
<
ActiveRecord
::
Migration
DOWNTIME
=
false
...
...
db/post_migrate/20180223124427_build_user_interacted_projects_table.rb
View file @
43971ef2
...
...
@@ -43,8 +43,6 @@ class BuildUserInteractedProjectsTable < ActiveRecord::Migration
end
end
private
class
PostgresStrategy
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
...
...
@@ -79,6 +77,7 @@ class BuildUserInteractedProjectsTable < ActiveRecord::Migration
end
private
def
insert_missing_records
iteration
=
0
records
=
0
...
...
db/post_migrate/20180408143355_cleanup_users_rss_token_rename.rb
View file @
43971ef2
...
...
@@ -8,6 +8,7 @@ class CleanupUsersRssTokenRename < ActiveRecord::Migration
end
def
down
# rubocop:disable Migration/UpdateLargeTable
rename_column_concurrently
:users
,
:feed_token
,
:rss_token
end
end
db/post_migrate/20180424151928_fill_file_store.rb
View file @
43971ef2
...
...
@@ -38,7 +38,7 @@ class FillFileStore < ActiveRecord::Migration
def
up
# NOTE: Schedule background migrations that fill 'NULL' value by '1'(ObjectStorage::Store::LOCAL) on `file_store`, `store` columns
#
#
# Here are the target columns
# - ci_job_artifacts.file_store
# - lfs_objects.file_store
...
...
db/post_migrate/20180430143705_backfill_runner_type_for_ci_runners_post_migrate.rb
View file @
43971ef2
...
...
@@ -9,6 +9,7 @@ class BackfillRunnerTypeForCiRunnersPostMigrate < ActiveRecord::Migration
disable_ddl_transaction!
def
up
# rubocop:disable Migration/UpdateColumnInBatches
update_column_in_batches
(
:ci_runners
,
:runner_type
,
INSTANCE_RUNNER_TYPE
)
do
|
table
,
query
|
query
.
where
(
table
[
:is_shared
].
eq
(
true
)).
where
(
table
[
:runner_type
].
eq
(
nil
))
end
...
...
db/post_migrate/20180507083701_set_minimal_project_build_timeout.rb
View file @
43971ef2
...
...
@@ -8,6 +8,8 @@ class SetMinimalProjectBuildTimeout < ActiveRecord::Migration
disable_ddl_transaction!
def
up
# rubocop:disable Migration/UpdateLargeTable
# rubocop:disable Migration/UpdateColumnInBatches
update_column_in_batches
(
:projects
,
:build_timeout
,
MINIMUM_TIMEOUT
)
do
|
table
,
query
|
query
.
where
(
table
[
:build_timeout
].
lt
(
MINIMUM_TIMEOUT
))
end
...
...
db/post_migrate/20180523125103_cleanup_merge_requests_allow_maintainer_to_push_rename.rb
View file @
43971ef2
...
...
@@ -11,6 +11,7 @@ class CleanupMergeRequestsAllowMaintainerToPushRename < ActiveRecord::Migration
def
down
if
column_exists?
(
:merge_requests
,
:allow_collaboration
)
# rubocop:disable Migration/UpdateLargeTable
rename_column_concurrently
:merge_requests
,
:allow_collaboration
,
:allow_maintainer_to_push
end
end
...
...
db/post_migrate/20180704145007_update_project_indexes.rb
View file @
43971ef2
...
...
@@ -14,7 +14,7 @@ class UpdateProjectIndexes < ActiveRecord::Migration
[
:repository_storage
,
:created_at
],
name:
NEW_INDEX_NAME
,
where:
'last_repository_check_at IS NULL'
)
)
end
def
down
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment