From febb89058f437a33ef43b99c37bf7475bd727176 Mon Sep 17 00:00:00 2001 From: Leonardo da Rosa <ldarosa@gitlab.com> Date: Thu, 18 Jan 2024 19:30:56 +0000 Subject: [PATCH] Removes database migrations up to 15-9-stable-ee Pre-16.3 migration files were removed and schema changes moved to db/init_structure.sql file Changelog: changed --- .gitlab/ci/database.gitlab-ci.yml | 2 +- .rubocop_todo/layout/argument_alignment.yml | 34 - .../layout/empty_line_after_magic_comment.yml | 10 - .../lint/redundant_cop_disable_directive.yml | 5 - .rubocop_todo/rspec/context_wording.yml | 1 - .rubocop_todo/rspec/feature_category.yml | 4 - .rubocop_todo/rspec/named_subject.yml | 4 - .rubocop_todo/rspec/scattered_let.yml | 1 - .../style/inline_disable_annotation.yml | 30 - db/init_structure.sql | 1775 ++++++++++++++--- ...bility_occurrences_on_id_and_scanner_id.rb | 20 - ...istration_enabled_to_namespace_settings.rb | 9 - ...36_add_access_level_to_ci_job_artifacts.rb | 9 - ...atus_updated_at_to_container_repository.rb | 7 - .../20221101174816_create_package_metadata.rb | 11 - ...194416_create_package_metadata_versions.rb | 11 - ...195309_create_package_metadata_licenses.rb | 10 - ...ckage_metadata_package_version_licenses.rb | 12 - ...ironments_for_name_search_within_folder.rb | 16 - ...create_dependency_proxy_manifest_states.rb | 45 - ...05317_create_dast_pre_scan_verification.rb | 22 - ..._reviewers_to_merge_request_predictions.rb | 9 - ...d_partition_id_to_ci_unit_test_failures.rb | 9 - ...dd_partition_id_to_ci_sources_pipelines.rb | 9 - ...partition_id_to_ci_build_pending_states.rb | 9 - ...d_partition_id_to_ci_build_trace_chunks.rb | 9 - ...partition_id_to_ci_build_report_results.rb | 9 - ...0956_add_partition_id_to_ci_build_needs.rb | 9 - ...artition_id_to_ci_builds_runner_session.rb | 9 - ...5_add_partition_id_to_ci_pending_builds.rb | 9 - ...partition_id_to_ci_build_trace_metadata.rb | 9 - ...8_add_partition_id_to_ci_running_builds.rb | 9 - ...48_add_partition_id_to_ci_job_variables.rb | 9 - ...d_dashboard_fields_to_namespace_details.rb | 10 - ...146_add_onboarding_in_progress_to_users.rb | 15 - ...add_onboarding_step_url_to_user_details.rb | 16 - ...8_add_text_limit_to_onboarding_step_url.rb | 13 - ...38_create_dependency_list_exports_table.rb | 23 - ...221111142921_add_hierarchy_restrictions.rb | 21 - ...14131943_add_short_title_to_appearances.rb | 10 - ...seat_refresh_at_to_gitlab_subscriptions.rb | 16 - ...8_add_debug_trace_to_ci_builds_metadata.rb | 9 - ...13_add_limit_to_appereances_short_title.rb | 13 - ..._foreign_key_to_dependency_list_exports.rb | 27 - ...113323_add_index_on_team_id_and_chat_id.rb | 15 - ..._add_enterprise_boolean_to_bulk_imports.rb | 7 - ...4507_add_projects_emails_enabled_column.rb | 7 - ...39_add_namespaces_emails_enabled_column.rb | 8 - ...ment_metadata_and_ml_candidate_metadata.rb | 29 - ...116161126_add_auth_signing_type_to_keys.rb | 7 - .../20221121091238_add_work_item_progress.rb | 18 - ...100431_add_partition_id_to_ci_resources.rb | 9 - ..._approve_deployment_to_project_settings.rb | 9 - ...ing_send_user_confirmation_email_column.rb | 22 - ..._pipeline_hierarchy_size_to_plan_limits.rb | 7 - ...rce_partition_id_to_ci_sources_pipeline.rb | 9 - ...21128155738_add_discord_to_user_details.rb | 12 - ...add_discord_field_limit_to_user_details.rb | 15 - ...rease_self_hosted_attachment_size_limit.rb | 13 - ..._create_dast_pre_scan_verification_step.rb | 18 - ...ts_max_size_to_requirements_v2_artifact.rb | 7 - .../20221202144210_create_achievements.rb | 24 - ...cope_links_on_source_and_target_project.rb | 23 - ...1204090437_add_category_to_abuse_report.rb | 7 - ...dd_disable_pats_to_application_settings.rb | 7 - ..._use_new_navigation_to_user_preferences.rb | 9 - ..._authorized_scopes_to_slack_integration.rb | 38 - ...206222032_add_read_code_to_member_roles.rb | 7 - ...tate_size_bytes_to_application_settings.rb | 24 - ..._import_enabled_to_application_settings.rb | 7 - ...reate_dast_scanner_profiles_runner_tags.rb | 18 - ...ints_from_ci_resources_for_partition_id.rb | 16 - ..._import_sources_on_application_settings.rb | 28 - ..._import_sources_on_application_settings.rb | 25 - ...32_remove_sbom_occurrences_unique_index.rb | 22 - ...0221209174157_truncate_sbom_occurrences.rb | 28 - ...4640_add_reported_from_to_abuse_reports.rb | 21 - ...452_add_uuid_column_to_sbom_occurrences.rb | 7 - ...12192527_index_sbom_occurrences_on_uuid.rb | 15 - ...aces_on_path_for_top_level_non_projects.rb | 18 - ...ault_in_dependency_proxy_group_settings.rb | 7 - ...20221214201256_create_user_achievements.rb | 33 - ...14204247_user_achievements_foreign_keys.rb | 19 - ...47_partition_pm_package_metadata_tables.rb | 13 - ...nnection_string_to_application_settings.rb | 7 - ...0221219103007_add_name_to_ml_candidates.rb | 6 - ...add_text_limit_to_name_on_ml_candidates.rb | 13 - ...ver_limit_check_at_to_namespace_details.rb | 20 - ...ouse_connection_string_to_encrypted_var.rb | 25 - ...private_profile_to_application_settings.rb | 7 - ...116_create_elastic_group_index_statuses.rb | 18 - ...0221221171239_rename_amount_used_column.rb | 22 - ...ytics_dashboards_configuration_pointers.rb | 19 - ...21223114543_add_pwa_icon_to_appearances.rb | 13 - ..._add_registration_columns_to_ci_runners.rb | 10 - ...26132038_index_ci_runners_on_creator_id.rb | 15 - ...0221226163203_create_ci_runner_machines.rb | 21 - ...221227080606_add_text_limit_to_pwa_icon.rb | 13 - ...istration_token_to_application_settings.rb | 9 - ...egistration_token_to_namespace_settings.rb | 9 - ...845_add_incident_events_to_integrations.rb | 7 - ...72549_add_pwa_attributes_to_appearances.rb | 15 - ...073206_add_text_limit_to_pwa_attributes.rb | 15 - ...constraint_on_chat_names_on_integration.rb | 15 - ...pearances_short_title_to_pwa_short_name.rb | 13 - ...4959_add_links_to_spam_to_abuse_reports.rb | 7 - ...tp_credentials_to_service_desk_settings.rb | 28 - ...r_custom_email_to_service_desk_settings.rb | 18 - ...tp_credentials_on_service_desk_settings.rb | 19 - ...to_merge_requests_compliance_violations.rb | 10 - ...50600_add_machine_id_to_builds_metadata.rb | 9 - ...add_zoekt_shards_and_indexed_namespaces.rb | 20 - ...mn_on_ci_namespace_monthly_usages_table.rb | 24 - ...6014423_add_constraint_to_links_to_spam.rb | 15 - ...230106125945_add_user_to_ssh_signatures.rb | 11 - ...31659_add_fingerprint_to_ssh_signatures.rb | 13 - ...add_config_column_to_ci_runner_machines.rb | 9 - ...0230106184809_create_dast_profiles_tags.rb | 18 - ...dd_zoekt_indexed_namespaces_foreign_key.rb | 15 - ...ate_namespaces_storage_limit_exclusions.rb | 20 - ...59_add_runner_machines_created_at_index.rb | 15 - ...e_web_hook_calls_to_web_hook_calls_high.rb | 13 - ..._add_runner_machines_contacted_at_index.rb | 16 - ...ge_admin_control_columns_to_plan_limits.rb | 11 - ...109232316_create_wiki_repository_states.rb | 44 - ...131_add_uses_legacy_iid_to_test_reports.rb | 7 - ..._update_action_to_postgres_foreign_keys.rb | 73 - ...igrate_projects_to_bulk_import_entities.rb | 7 - ...2_remove_tmp_index_vulns_on_report_type.rb | 22 - ..._unpartition_pm_package_metadata_tables.rb | 54 - ...w_possible_spam_to_application_settings.rb | 9 - .../20230111174113_create_airflow_dags.rb | 18 - ...add_user_index_and_fk_to_ssh_signatures.rb | 20 - ...dd_tmp_index_to_ci_build_runner_session.rb | 23 - ...04526_add_tmp_index_to_ci_pending_build.rb | 23 - ...04636_add_tmp_index_to_ci_running_build.rb | 23 - ...1_package_metadata_set_default_not_null.rb | 7 - ...ique_domain_columns_to_project_settings.rb | 13 - ...ject_settings_pages_unique_domain_limit.rb | 13 - ...ttings_pages_unique_domain_unique_index.rb | 20 - ...0117173433_create_project_data_transfer.rb | 32 - ...ration_settings_to_application_settings.rb | 17 - ...119151636_add_url_hash_to_web_hook_logs.rb | 8 - ...dd_text_limit_to_web_hook_logs_url_hash.rb | 13 - ...additional_text_to_application_settings.rb | 12 - ...215436_add_package_metadata_checkpoints.rb | 19 - ...0120170042_re_add_web_hook_calls_column.rb | 9 - ...riggers_from_web_hook_calls_plan_limits.rb | 15 - ...sync_plan_limits_web_hook_calls_columns.rb | 15 - ...30123095022_create_scan_result_policies.rb | 18 - ...datetime_fields_to_bulk_import_trackers.rb | 13 - ...ext_to_application_settings_text_limits.rb | 13 - ...d_deploy_key_id_to_create_access_levels.rb | 11 - ...se_group_and_project_ci_variable_limits.rb | 17 - ...checksums_column_to_project_mirror_data.rb | 9 - ..._for_protected_tag_create_access_levels.rb | 18 - ...090315_add_prepared_at_to_merge_request.rb | 17 - ...d_timestamps_to_package_metadata_tables.rb | 17 - ...lue_for_inbound_job_token_scope_enabled.rb | 11 - ...6151622_add_ci_triggers_encrypted_token.rb | 13 - ...nect_public_key_storage_enabled_setting.rb | 7 - ...sion_of_merge_request_metrics_to_bigint.rb | 16 - ...users_alertlist_to_application_settings.rb | 11 - ...d_limit_alertlist_to_namespace_settings.rb | 13 - ...project_pointer_for_analytics_dashboard.rb | 29 - ...project_pointer_for_analytics_dashboard.rb | 15 - ..._analytics_project_pointer_project_null.rb | 29 - ...d_column_to_package_metadata_join_table.rb | 76 - ...rial_date_index_to_gitlab_subscribtions.rb | 15 - .../20230129094140_add_widget_definitions.rb | 24 - ...30129154126_add_widget_def_namespace_fk.rb | 16 - ...154202_add_widget_def_work_item_type_fk.rb | 15 - ...9154819_add_widgets_for_work_item_types.rb | 143 -- ..._conversion_of_ci_build_needs_to_bigint.rb | 16 - ...l_ci_build_needs_for_big_int_conversion.rb | 16 - ...nd_last_error_to_postgres_async_indexes.rb | 11 - ...it_to_postgres_async_indexes_last_error.rb | 13 - ...version_of_sent_notifications_to_bigint.rb | 16 - ...tected_environment_default_access_level.rb | 7 - ...ialize_conversion_of_notes_id_to_bigint.rb | 16 - ...provers_enabled_to_application_settings.rb | 11 - ...23923_raise_ci_variables_default_limits.rb | 8 - ...rsion_index_to_installable_npm_packages.rb | 21 - ...e_conversion_of_todos_note_id_to_bigint.rb | 16 - ..._system_note_metadata_note_id_to_bigint.rb | 16 - ...of_epic_user_mentions_note_id_to_bigint.rb | 16 - ...ersion_of_suggestions_note_id_to_bigint.rb | 16 - ...f_issue_user_mentions_note_id_to_bigint.rb | 16 - ...scan_result_policy_id_to_approval_rules.rb | 10 - .../20230203011359_create_automation_rules.rb | 28 - ...peline_id_to_dast_pre_scan_verification.rb | 11 - ..._postgres_async_foreign_key_validations.rb | 17 - ...atch_on_inclusion_to_scan_result_policy.rb | 9 - ..._note_diff_files_diff_note_id_to_bigint.rb | 16 - ...snippet_user_mentions_note_id_to_bigint.rb | 16 - ..._design_user_mentions_note_id_to_bigint.rb | 16 - ...ability_user_mentions_note_id_to_bigint.rb | 16 - ..._commit_user_mentions_note_id_to_bigint.rb | 16 - ...request_user_mentions_note_id_to_bigint.rb | 16 - ...onversion_of_timelogs_note_id_to_bigint.rb | 16 - ...0230208103640_rename_runner_machine_xid.rb | 13 - ..._external_authn_to_application_settings.rb | 8 - ...from_ci_job_artifacts_original_filename.rb | 17 - ...move_ci_job_artifacts_original_filename.rb | 16 - ...tainer_repository_deprecated_geo_fields.rb | 28 - ...ove_container_repository_updated_events.rb | 22 - ...dule_vulnerabilities_feedback_migration.rb | 25 - ..._license_for_projects_less_than_five_mb.rb | 33 - ...0_finalize_backfill_user_details_fields.rb | 24 - ...move_temp_index_for_user_details_fields.rb | 24 - ...stics_storage_size_without_uploads_size.rb | 31 - ...n_public_top_level_groups_to_namespaces.rb | 17 - ...ult_for_approval_project_rules_scanners.rb | 11 - ...ex_on_overlong_vulnerability_html_title.rb | 18 - ...cate_overlong_vulnerability_html_titles.rb | 29 - ...110152133_delete_orphans_approval_rules.rb | 36 - ...urce_license_available_project_id_index.rb | 18 - ...4142044_delete_experiments_foreign_keys.rb | 34 - ...14142602_drop_experiment_subjects_table.rb | 32 - .../20221114142616_drop_experiments_table.rb | 21 - ...index_for_issues_health_status_ordering.rb | 23 - ...k_item_type_backfill_migration_finished.rb | 42 - ...remove_namespaces_tmp_project_id_column.rb | 27 - ...on_legacy_open_source_license_available.rb | 18 - ...d_namespaces_emails_enabled_column_data.rb | 28 - ...add_projects_emails_enabled_column_data.rb | 28 - ...16143854_add_okr_hierarchy_restrictions.rb | 48 - ..._author_id_created_at_on_merge_requests.rb | 13 - ...ove_clusters_applications_job_instances.rb | 28 - ...an_finding_approval_merge_request_rules.rb | 17 - ...inalize_issues_namespace_id_backfilling.rb | 22 - ...ascade_delete_fk_on_issues_namespace_id.rb | 41 - ...t_null_contraint_to_issues_namespace_id.rb | 13 - ...t_null_contraint_to_issues_namespace_id.rb | 13 - ...reated_at_and_id_for_non_purged_records.rb | 16 - ...rity_scans_on_id_for_non_purged_records.rb | 16 - ..._remove_unused_feedback_migration_index.rb | 24 - ...for_vulnerabilities_feedback_migration2.rb | 24 - ...ilities_state_transitions_comment_limit.rb | 23 - ..._index_on_vulnerabilities_state_case_id.rb | 21 - ...x_on_vulnerabilities_state_case_id_desc.rb | 20 - ...l_contraint_on_issues_work_item_type_id.rb | 13 - ...063922_remove_issue_title_trigram_index.rb | 20 - ..._remove_issue_description_trigram_index.rb | 20 - ...chedule_prune_stale_project_export_jobs.rb | 22 - ...149_add_index_for_paths_on_non_projects.rb | 16 - ..._reset_status_on_container_repositories.rb | 25 - ...rabilities_feedback_comment_proccessing.rb | 24 - ..._metrics_index_to_authentication_events.rb | 17 - ...result_index_from_authentication_events.rb | 18 - ..._schedule_fixing_security_scan_statuses.rb | 52 - ...p_temp_work_item_type_id_backfill_index.rb | 15 - ...add_back_issues_work_item_type_id_index.rb | 15 - ...240_remove_flowdock_integration_records.rb | 23 - ...roject_rules_without_protected_branches.rb | 27 - ...issue_assignees_on_user_id_and_issue_id.rb | 15 - ...ove_index_to_issue_assignees_on_user_id.rb | 15 - ...154128_add_pipeline_metadata_name_index.rb | 15 - ...ove_pipeline_metadata_pipeline_id_index.rb | 15 - ...index_for_issues_health_status_ordering.rb | 25 - ...1917_schedule_backfill_environment_tier.rb | 21 - ...1205170310_add_index_for_active_members.rb | 18 - ..._author_id_created_at_on_merge_requests.rb | 15 - ...nique_id_partition_id_index_to_ci_build.rb | 15 - ...ncrypted_partition_id_index_to_ci_build.rb | 21 - ...3132_add_issues_work_item_type_id_index.rb | 15 - ...cess_tokens_on_id_where_expires_in_null.rb | 16 - ...auth_access_tokens_with_null_expires_in.rb | 25 - ...4044_update_active_billable_users_index.rb | 29 - ...3_add_index_id_partition_id_to_ci_build.rb | 17 - ...ge_default_partition_id_on_ci_resources.rb | 9 - ...095129_second_recount_epic_cache_counts.rb | 29 - ...ncrypted_partition_id_index_to_ci_build.rb | 23 - ...22_schedule_backfill_releases_author_id.rb | 59 - ...31710_add_index_to_ci_unit_test_failure.rb | 17 - ...935_add_index_to_ci_build_pending_state.rb | 17 - ...31958_add_index_to_ci_build_trace_chunk.rb | 17 - ...add_foreign_key_to_ci_unit_test_failure.rb | 30 - ...d_foreign_key_to_ci_build_pending_state.rb | 30 - ...add_foreign_key_to_ci_build_trace_chunk.rb | 30 - ...unit_test_failure_partition_id_build_id.rb | 16 - ...ild_pending_state_partition_id_build_id.rb | 16 - ...build_trace_chunk_partition_id_build_id.rb | 16 - ...members_on_member_namespace_id_compound.rb | 19 - ...rs_on_member_namespace_id_compound_sync.rb | 19 - ...d_query_index_for_ci_pipeline_schedules.rb | 18 - ...efault_partition_id_value_for_ci_tables.rb | 56 - ...roject_statistics_upload_size_migration.rb | 17 - ...21221150123_update_billable_users_index.rb | 29 - ...8_sync_new_amount_used_with_amount_used.rb | 17 - ..._for_vulnerabilities_feedback_migration.rb | 23 - ...e_chat_names_integration_id_foreign_key.rb | 27 - ..._integration_id_and_team_id_and_chat_id.rb | 15 - ...1227100751_add_user_index_to_chat_names.rb | 15 - ...hat_names_on_user_id_and_integration_id.rb | 15 - ...n_mode_scope_for_personal_access_tokens.rb | 11 - ..._cleanup_appearances_short_title_rename.rb | 13 - ...dex_on_ci_runners_on_runner_type_and_id.rb | 18 - ...104103748_remove_new_amount_used_column.rb | 20 - ...50601_prepare_builds_metadata_async_idx.rb | 36 - ...ads_on_default_branch_with_common_query.rb | 26 - ..._add_partition_index_to_builds_metadata.rb | 18 - ...2514_add_foreign_key_to_builds_metadata.rb | 18 - ...drop_vuln_reads_on_default_branch_index.rb | 19 - ...ed_on_ci_namespace_monthly_usages_table.rb | 19 - ...d_column_on_ci_namespace_monthly_usages.rb | 22 - ..._change_keys_relation_to_ssh_signatures.rb | 41 - ...44_cleanup_web_hook_calls_column_rename.rb | 13 - ...es_application_settings_push_rule_id_fk.rb | 21 - ..._settings_usage_stats_set_by_user_id_fk.rb | 21 - ...ngs_instance_administrators_group_id_fk.rb | 21 - ...on_settings_file_template_project_id_fk.rb | 21 - ...s_instance_administration_project_id_fk.rb | 21 - ...gs_custom_project_templates_group_id_fk.rb | 21 - ...2751_add_partial_index_on_group_path_id.rb | 17 - ...ype_and_member_role_id_index_to_members.rb | 15 - ...e_id_and_source_type_index_from_members.rb | 15 - ...aint_to_o_auth_access_tokens_expires_in.rb | 17 - ...index_environments_on_project_id_and_id.rb | 15 - ...ule_vulnerabilities_feedback_migration2.rb | 23 - ...12144946_add_tmp_index_to_ci_build_need.rb | 20 - ...6_add_tmp_index_to_ci_pipeline_variable.rb | 20 - ...move_atlassian_refresh_token_constraint.rb | 17 - ..._drop_index_on_ci_build_token_encrypted.rb | 17 - ...630_add_index_for_group_activity_events.rb | 15 - ...2_add_index_for_project_activity_events.rb | 15 - ..._add_index_to_events_on_group_id_and_id.rb | 15 - ...626_add_index_for_events_followed_users.rb | 15 - ...230116111252_finalize_todo_sanitization.rb | 22 - ...04_remove_user_details_fields_from_user.rb | 14 - ...dd_tmp_index_to_ci_build_report_results.rb | 20 - ..._tmp_index_to_ci_builds_on_partition_id.rb | 19 - ...p_index_to_ci_pipelines_on_partition_id.rb | 19 - ..._tmp_index_to_ci_stages_on_partition_id.rb | 19 - ...re_tmp_index_to_ci_build_trace_metadata.rb | 20 - ...26_prepare_tmp_index_to_ci_job_artifact.rb | 20 - ...094316_add_tmp_index_to_ci_job_variable.rb | 20 - ...to_ci_sources_pipelines_on_partition_id.rb | 29 - ...0117114739_clear_duplicate_jobs_cookies.rb | 22 - ...pted_and_partition_id_index_to_ci_build.rb | 17 - ...ine_foreign_key_on_ci_unit_test_failure.rb | 51 - ...e_foreign_key_on_ci_build_pending_state.rb | 51 - ...ine_foreign_key_on_ci_build_trace_chunk.rb | 51 - ...119085509_add_index_to_ci_running_build.rb | 17 - ...552_add_foreign_key_to_ci_running_build.rb | 31 - ...119090944_add_index_to_ci_pending_build.rb | 17 - ...027_add_foreign_key_to_ci_pending_build.rb | 31 - ...er_session_on_partition_id_and_build_id.rb | 17 - ...er_session_on_partition_id_and_build_id.rb | 37 - ...unner_session_partition_id_and_build_id.rb | 15 - ...ds_ci_builds_runner_session_on_build_id.rb | 35 - ..._resources_on_partition_id_and_build_id.rb | 17 - ..._resources_on_partition_id_and_build_id.rb | 32 - ..._ci_resources_partition_id_and_build_id.rb | 15 - ...k_to_ci_builds_ci_resources_on_build_id.rb | 30 - ...d_temporary_size_index_to_package_files.rb | 19 - ...ent_packages_size_on_project_statistics.rb | 29 - ..._policy_id_to_software_license_policies.rb | 15 - ...builds_ci_unit_test_failure_on_build_id.rb | 35 - ...ilds_ci_build_pending_state_on_build_id.rb | 35 - ...builds_ci_build_trace_chunk_on_build_id.rb | 35 - ...web_hook_logs_id_created_at_async_index.rb | 40 - ...3723_rebalance_partition_id_ci_pipeline.rb | 11 - ...5093840_rebalance_partition_id_ci_build.rb | 11 - ..._unique_index_to_ci_build_pending_state.rb | 22 - ...s_for_tables_with_schema_differences_v3.rb | 18 - ...e_request_metrics_for_bigint_conversion.rb | 16 - ...and_trial_index_to_gitlab_subscriptions.rb | 15 - ...n_source_partition_id_and_source_job_id.rb | 17 - ...n_source_partition_id_and_source_job_id.rb | 37 - ...plan_id_index_from_gitlab_subscriptions.rb | 17 - ...sers_alertlist_max_usernames_constraint.rb | 15 - ...ownload_limit_alertlist_size_constraint.rb | 17 - ...e_metadata_on_partition_id_and_build_id.rb | 17 - ...e_metadata_on_partition_id_and_build_id.rb | 37 - ...ob_artifacts_on_partition_id_and_job_id.rb | 17 - ...ob_artifacts_on_partition_id_and_job_id.rb | 37 - ...ob_variables_on_partition_id_and_job_id.rb | 17 - ...ob_variables_on_partition_id_and_job_id.rb | 37 - ...ndex_on_packages_package_file_file_name.rb | 14 - ...nullify_creator_id_of_orphaned_projects.rb | 27 - ...le_tmp_index_to_ci_build_report_results.rb | 20 - ...d_async_index_from_postgres_async_index.rb | 21 - ...rt_results_on_partition_id_and_build_id.rb | 17 - ...rt_results_on_partition_id_and_build_id.rb | 37 - ...uild_needs_on_partition_id_and_build_id.rb | 17 - ...uild_needs_on_partition_id_and_build_id.rb | 37 - ...ent_notifications_for_bigint_conversion.rb | 16 - ...backfill_notes_id_for_bigint_conversion.rb | 16 - ...4959_remove_invalid_deploy_access_level.rb | 13 - ..._project_id_scanner_id_vulnerability_id.rb | 16 - ...ill_todos_note_id_for_bigint_conversion.rb | 16 - ..._metadata_note_id_for_bigint_conversion.rb | 16 - ...1082038_drop_web_hook_calls_high_column.rb | 21 - ...uild_needs_on_partition_id_and_build_id.rb | 17 - ...201153450_add_index_on_lfs_objects_file.rb | 14 - ...ize_backfill_environment_tier_migration.rb | 22 - ..._mentions_note_id_for_bigint_conversion.rb | 16 - ...ex_on_merge_request_diffs_external_diff.rb | 14 - ...ggestions_note_id_for_bigint_conversion.rb | 16 - ..._mentions_note_id_for_bigint_conversion.rb | 16 - ...20230202131928_encrypt_ci_trigger_token.rb | 29 - ...ule_vulnerabilities_feedback_migration3.rb | 24 - ...230203122609_change_pipeline_name_index.rb | 20 - ...iles_diff_note_id_for_bigint_conversion.rb | 16 - ..._mentions_note_id_for_bigint_conversion.rb | 16 - ..._mentions_note_id_for_bigint_conversion.rb | 16 - ..._mentions_note_id_for_bigint_conversion.rb | 16 - ..._mentions_note_id_for_bigint_conversion.rb | 16 - ..._mentions_note_id_for_bigint_conversion.rb | 16 - ..._timelogs_note_id_for_bigint_conversion.rb | 16 - ...e_metadata_on_partition_id_and_build_id.rb | 17 - ...ob_artifacts_on_partition_id_and_job_id.rb | 17 - ..._partition_ids_for_ci_pipeline_variable.rb | 11 - ...9_fix_partition_ids_for_ci_job_artifact.rb | 11 - ...p_ci_runner_machines_machine_xid_rename.rb | 13 - ...ify_last_error_from_project_mirror_data.rb | 26 - ...08132608_fix_partition_ids_for_ci_stage.rb | 11 - ...artition_ids_for_ci_build_report_result.rb | 11 - ...rtition_ids_for_ci_build_trace_metadata.rb | 11 - ...index_on_project_and_scan_result_policy.rb | 18 - ...approval_rules_on_scan_result_policy_id.rb | 23 - ...tware_license_policies_index_on_project.rb | 15 - ...0209131808_recount_epic_cache_counts_v3.rb | 29 - ...fix_partition_ids_for_ci_build_metadata.rb | 11 - ...ule_vulnerabilities_feedback_migration4.rb | 43 - ...approval_rules_on_scan_result_policy_id.rb | 17 - ..._fix_partition_ids_for_ci_job_variables.rb | 11 - ...x_partition_ids_on_ci_sources_pipelines.rb | 11 - ...74335_prepare_async_index_web_hook_logs.rb | 39 - ...reign_key_validation_for_ci_build_needs.rb | 15 - ..._validation_for_ci_build_report_results.rb | 15 - ...ign_key_validation_for_ci_job_artifacts.rb | 15 - db/schema_migrations/20220824082427 | 1 - db/schema_migrations/20220826152430 | 1 - db/schema_migrations/20220826152432 | 1 - db/schema_migrations/20220908150054 | 1 - db/schema_migrations/20220920180451 | 1 - db/schema_migrations/20221010191136 | 1 - db/schema_migrations/20221018095434 | 1 - db/schema_migrations/20221026095133 | 1 - db/schema_migrations/20221101174816 | 1 - db/schema_migrations/20221101194416 | 1 - db/schema_migrations/20221101195309 | 1 - db/schema_migrations/20221101195543 | 1 - db/schema_migrations/20221102150737 | 1 - db/schema_migrations/20221102195642 | 1 - db/schema_migrations/20221102231130 | 1 - db/schema_migrations/20221102231131 | 1 - db/schema_migrations/20221103205317 | 1 - db/schema_migrations/20221104115712 | 1 - db/schema_migrations/20221104141647 | 1 - db/schema_migrations/20221107013943 | 1 - db/schema_migrations/20221109160052 | 1 - db/schema_migrations/20221110080508 | 1 - db/schema_migrations/20221110080636 | 1 - db/schema_migrations/20221110080748 | 1 - db/schema_migrations/20221110080822 | 1 - db/schema_migrations/20221110080913 | 1 - db/schema_migrations/20221110080956 | 1 - db/schema_migrations/20221110081037 | 1 - db/schema_migrations/20221110081115 | 1 - db/schema_migrations/20221110081207 | 1 - db/schema_migrations/20221110081348 | 1 - db/schema_migrations/20221110081448 | 1 - db/schema_migrations/20221110100600 | 1 - db/schema_migrations/20221110100602 | 1 - db/schema_migrations/20221110152133 | 1 - db/schema_migrations/20221110183103 | 1 - db/schema_migrations/20221110190340 | 1 - db/schema_migrations/20221111123146 | 1 - db/schema_migrations/20221111123147 | 1 - db/schema_migrations/20221111123148 | 1 - db/schema_migrations/20221111135238 | 1 - db/schema_migrations/20221111142921 | 1 - db/schema_migrations/20221114131943 | 1 - db/schema_migrations/20221114142044 | 1 - db/schema_migrations/20221114142602 | 1 - db/schema_migrations/20221114142616 | 1 - db/schema_migrations/20221114145103 | 1 - db/schema_migrations/20221114212908 | 1 - db/schema_migrations/20221115085813 | 1 - db/schema_migrations/20221115120602 | 1 - db/schema_migrations/20221115173607 | 1 - db/schema_migrations/20221115184525 | 1 - db/schema_migrations/20221116100056 | 1 - db/schema_migrations/20221116105434 | 1 - db/schema_migrations/20221116113323 | 1 - db/schema_migrations/20221116124821 | 1 - db/schema_migrations/20221116134507 | 1 - db/schema_migrations/20221116134539 | 1 - db/schema_migrations/20221116134611 | 1 - db/schema_migrations/20221116134633 | 1 - db/schema_migrations/20221116143854 | 1 - db/schema_migrations/20221116160204 | 1 - db/schema_migrations/20221116161126 | 1 - db/schema_migrations/20221117103015 | 1 - db/schema_migrations/20221117135032 | 1 - db/schema_migrations/20221117153015 | 1 - db/schema_migrations/20221118103152 | 1 - db/schema_migrations/20221118103352 | 1 - db/schema_migrations/20221118103752 | 1 - db/schema_migrations/20221118104752 | 1 - db/schema_migrations/20221121000127 | 1 - db/schema_migrations/20221121000451 | 1 - db/schema_migrations/20221121091238 | 1 - db/schema_migrations/20221121100431 | 1 - db/schema_migrations/20221121152048 | 1 - db/schema_migrations/20221121152515 | 1 - db/schema_migrations/20221121155850 | 1 - db/schema_migrations/20221121180138 | 1 - db/schema_migrations/20221121181627 | 1 - db/schema_migrations/20221121184931 | 1 - db/schema_migrations/20221122063922 | 1 - db/schema_migrations/20221122064537 | 1 - db/schema_migrations/20221122132812 | 1 - db/schema_migrations/20221122141046 | 1 - db/schema_migrations/20221122155149 | 1 - db/schema_migrations/20221122210711 | 1 - db/schema_migrations/20221122225925 | 1 - db/schema_migrations/20221123133054 | 1 - db/schema_migrations/20221124113925 | 1 - db/schema_migrations/20221124153602 | 1 - db/schema_migrations/20221125222221 | 1 - db/schema_migrations/20221125222341 | 1 - db/schema_migrations/20221128120634 | 1 - db/schema_migrations/20221128123514 | 1 - db/schema_migrations/20221128155738 | 1 - db/schema_migrations/20221128165833 | 1 - db/schema_migrations/20221128220043 | 1 - db/schema_migrations/20221128222417 | 1 - db/schema_migrations/20221129124240 | 1 - db/schema_migrations/20221129192619 | 1 - db/schema_migrations/20221130170433 | 1 - db/schema_migrations/20221130182056 | 1 - db/schema_migrations/20221130192239 | 1 - db/schema_migrations/20221202031332 | 1 - db/schema_migrations/20221202031417 | 1 - db/schema_migrations/20221202144210 | 1 - db/schema_migrations/20221202154128 | 1 - db/schema_migrations/20221202154151 | 1 - db/schema_migrations/20221202202351 | 1 - db/schema_migrations/20221204090437 | 1 - db/schema_migrations/20221205061134 | 1 - db/schema_migrations/20221205134448 | 1 - db/schema_migrations/20221205151917 | 1 - db/schema_migrations/20221205170310 | 1 - db/schema_migrations/20221206012013 | 1 - db/schema_migrations/20221206075631 | 1 - db/schema_migrations/20221206132610 | 1 - db/schema_migrations/20221206163420 | 1 - db/schema_migrations/20221206173132 | 1 - db/schema_migrations/20221206211814 | 1 - db/schema_migrations/20221206222032 | 1 - db/schema_migrations/20221206235208 | 1 - db/schema_migrations/20221207140259 | 1 - db/schema_migrations/20221207220120 | 1 - db/schema_migrations/20221208122921 | 1 - db/schema_migrations/20221209110934 | 1 - db/schema_migrations/20221209110935 | 1 - db/schema_migrations/20221209174132 | 1 - db/schema_migrations/20221209174157 | 1 - db/schema_migrations/20221209235939 | 1 - db/schema_migrations/20221209235940 | 1 - db/schema_migrations/20221210154044 | 1 - db/schema_migrations/20221212054640 | 1 - db/schema_migrations/20221212103743 | 1 - db/schema_migrations/20221212192452 | 1 - db/schema_migrations/20221212192527 | 1 - db/schema_migrations/20221213064717 | 1 - db/schema_migrations/20221213105028 | 1 - db/schema_migrations/20221213184314 | 1 - db/schema_migrations/20221214095129 | 1 - db/schema_migrations/20221214105307 | 1 - db/schema_migrations/20221214201256 | 1 - db/schema_migrations/20221214204247 | 1 - db/schema_migrations/20221215151822 | 1 - db/schema_migrations/20221215210347 | 1 - db/schema_migrations/20221216131710 | 1 - db/schema_migrations/20221216131935 | 1 - db/schema_migrations/20221216131958 | 1 - db/schema_migrations/20221216144854 | 1 - db/schema_migrations/20221216145659 | 1 - db/schema_migrations/20221216150304 | 1 - db/schema_migrations/20221216150321 | 1 - db/schema_migrations/20221216150919 | 1 - db/schema_migrations/20221216151459 | 1 - db/schema_migrations/20221216151649 | 1 - db/schema_migrations/20221216232658 | 1 - db/schema_migrations/20221216232659 | 1 - db/schema_migrations/20221219103007 | 1 - db/schema_migrations/20221219112528 | 1 - db/schema_migrations/20221219112632 | 1 - db/schema_migrations/20221219122320 | 1 - db/schema_migrations/20221219135535 | 1 - db/schema_migrations/20221220075936 | 1 - db/schema_migrations/20221220131020 | 1 - db/schema_migrations/20221221110733 | 1 - db/schema_migrations/20221221134116 | 1 - db/schema_migrations/20221221150123 | 1 - db/schema_migrations/20221221171239 | 1 - db/schema_migrations/20221222092958 | 1 - db/schema_migrations/20221222144954 | 1 - db/schema_migrations/20221223114543 | 1 - db/schema_migrations/20221223123019 | 1 - db/schema_migrations/20221226105323 | 1 - db/schema_migrations/20221226132038 | 1 - db/schema_migrations/20221226153240 | 1 - db/schema_migrations/20221226154458 | 1 - db/schema_migrations/20221226163203 | 1 - db/schema_migrations/20221227080606 | 1 - db/schema_migrations/20221227100751 | 1 - db/schema_migrations/20221227100846 | 1 - db/schema_migrations/20221227100908 | 1 - db/schema_migrations/20221227101436 | 1 - db/schema_migrations/20221228063845 | 1 - db/schema_migrations/20221228072549 | 1 - db/schema_migrations/20221228073206 | 1 - db/schema_migrations/20221228083452 | 1 - db/schema_migrations/20221228103133 | 1 - db/schema_migrations/20221228161214 | 1 - db/schema_migrations/20221228163035 | 1 - db/schema_migrations/20221228210616 | 1 - db/schema_migrations/20221229064959 | 1 - db/schema_migrations/20230102131000 | 1 - db/schema_migrations/20230102131050 | 1 - db/schema_migrations/20230102131100 | 1 - db/schema_migrations/20230102180341 | 1 - db/schema_migrations/20230104103748 | 1 - db/schema_migrations/20230104150600 | 1 - db/schema_migrations/20230104150601 | 1 - db/schema_migrations/20230104201524 | 1 - db/schema_migrations/20230104220137 | 1 - db/schema_migrations/20230104222438 | 1 - db/schema_migrations/20230104222514 | 1 - db/schema_migrations/20230104224020 | 1 - db/schema_migrations/20230105170414 | 1 - db/schema_migrations/20230105172120 | 1 - db/schema_migrations/20230105180002 | 1 - db/schema_migrations/20230106014423 | 1 - db/schema_migrations/20230106124332 | 1 - db/schema_migrations/20230106125945 | 1 - db/schema_migrations/20230106131659 | 1 - db/schema_migrations/20230106142239 | 1 - db/schema_migrations/20230106184809 | 1 - db/schema_migrations/20230107125328 | 1 - db/schema_migrations/20230109093043 | 1 - db/schema_migrations/20230109095159 | 1 - db/schema_migrations/20230109095622 | 1 - db/schema_migrations/20230109100044 | 1 - db/schema_migrations/20230109121313 | 1 - db/schema_migrations/20230109144915 | 1 - db/schema_migrations/20230109144928 | 1 - db/schema_migrations/20230109144941 | 1 - db/schema_migrations/20230109144953 | 1 - db/schema_migrations/20230109145005 | 1 - db/schema_migrations/20230109145018 | 1 - db/schema_migrations/20230109215921 | 1 - db/schema_migrations/20230109232316 | 1 - db/schema_migrations/20230110031131 | 1 - db/schema_migrations/20230110172751 | 1 - db/schema_migrations/20230110212906 | 1 - db/schema_migrations/20230111092510 | 1 - db/schema_migrations/20230111124512 | 1 - db/schema_migrations/20230111125148 | 1 - db/schema_migrations/20230111125150 | 1 - db/schema_migrations/20230111132621 | 1 - db/schema_migrations/20230111171355 | 1 - db/schema_migrations/20230111174113 | 1 - db/schema_migrations/20230112014822 | 1 - db/schema_migrations/20230112051854 | 1 - db/schema_migrations/20230112085143 | 1 - db/schema_migrations/20230112104253 | 1 - db/schema_migrations/20230112104526 | 1 - db/schema_migrations/20230112104636 | 1 - db/schema_migrations/20230112141236 | 1 - db/schema_migrations/20230112144946 | 1 - db/schema_migrations/20230112145326 | 1 - db/schema_migrations/20230113003255 | 1 - db/schema_migrations/20230113195141 | 1 - db/schema_migrations/20230116083826 | 1 - db/schema_migrations/20230116090630 | 1 - db/schema_migrations/20230116090852 | 1 - db/schema_migrations/20230116090920 | 1 - db/schema_migrations/20230116091626 | 1 - db/schema_migrations/20230116111252 | 1 - db/schema_migrations/20230116143310 | 1 - db/schema_migrations/20230116143311 | 1 - db/schema_migrations/20230116143312 | 1 - db/schema_migrations/20230116160904 | 1 - db/schema_migrations/20230117092947 | 1 - db/schema_migrations/20230117093222 | 1 - db/schema_migrations/20230117093736 | 1 - db/schema_migrations/20230117093924 | 1 - db/schema_migrations/20230117094111 | 1 - db/schema_migrations/20230117094226 | 1 - db/schema_migrations/20230117094316 | 1 - db/schema_migrations/20230117113719 | 1 - db/schema_migrations/20230117114739 | 1 - db/schema_migrations/20230117145628 | 1 - db/schema_migrations/20230117173433 | 1 - db/schema_migrations/20230118083437 | 1 - db/schema_migrations/20230118083632 | 1 - db/schema_migrations/20230118083748 | 1 - db/schema_migrations/20230119085509 | 1 - db/schema_migrations/20230119085552 | 1 - db/schema_migrations/20230119090944 | 1 - db/schema_migrations/20230119091027 | 1 - db/schema_migrations/20230119095022 | 1 - db/schema_migrations/20230119095023 | 1 - db/schema_migrations/20230119095024 | 1 - db/schema_migrations/20230119095025 | 1 - db/schema_migrations/20230119123256 | 1 - db/schema_migrations/20230119123257 | 1 - db/schema_migrations/20230119123258 | 1 - db/schema_migrations/20230119123259 | 1 - db/schema_migrations/20230119123908 | 1 - db/schema_migrations/20230119123937 | 1 - db/schema_migrations/20230119150727 | 1 - db/schema_migrations/20230119151636 | 1 - db/schema_migrations/20230119151940 | 1 - db/schema_migrations/20230119214643 | 1 - db/schema_migrations/20230119215436 | 1 - db/schema_migrations/20230120170042 | 1 - db/schema_migrations/20230120170631 | 1 - db/schema_migrations/20230120171818 | 1 - db/schema_migrations/20230123095022 | 1 - db/schema_migrations/20230123095023 | 1 - db/schema_migrations/20230123120004 | 1 - db/schema_migrations/20230123150648 | 1 - db/schema_migrations/20230124101832 | 1 - db/schema_migrations/20230124102131 | 1 - db/schema_migrations/20230124102222 | 1 - db/schema_migrations/20230124104310 | 1 - db/schema_migrations/20230124122143 | 1 - db/schema_migrations/20230124173255 | 1 - db/schema_migrations/20230124183643 | 1 - db/schema_migrations/20230124193917 | 1 - db/schema_migrations/20230125090315 | 1 - db/schema_migrations/20230125093723 | 1 - db/schema_migrations/20230125093840 | 1 - db/schema_migrations/20230126023444 | 1 - db/schema_migrations/20230126091522 | 1 - db/schema_migrations/20230126110439 | 1 - db/schema_migrations/20230126133531 | 1 - db/schema_migrations/20230126151622 | 1 - db/schema_migrations/20230126210436 | 1 - db/schema_migrations/20230127093353 | 1 - db/schema_migrations/20230127101834 | 1 - db/schema_migrations/20230127115607 | 1 - db/schema_migrations/20230127121107 | 1 - db/schema_migrations/20230127121443 | 1 - db/schema_migrations/20230127123947 | 1 - db/schema_migrations/20230127123948 | 1 - db/schema_migrations/20230127125018 | 1 - db/schema_migrations/20230127131835 | 1 - db/schema_migrations/20230127131915 | 1 - db/schema_migrations/20230127151529 | 1 - db/schema_migrations/20230127151530 | 1 - db/schema_migrations/20230127151531 | 1 - db/schema_migrations/20230127151606 | 1 - db/schema_migrations/20230127151607 | 1 - db/schema_migrations/20230127152727 | 1 - db/schema_migrations/20230127152728 | 1 - db/schema_migrations/20230127153229 | 1 - db/schema_migrations/20230127153230 | 1 - db/schema_migrations/20230127155217 | 1 - db/schema_migrations/20230127164007 | 1 - db/schema_migrations/20230129094140 | 1 - db/schema_migrations/20230129154126 | 1 - db/schema_migrations/20230129154202 | 1 - db/schema_migrations/20230129154819 | 1 - db/schema_migrations/20230130070623 | 1 - db/schema_migrations/20230130073109 | 1 - db/schema_migrations/20230130075434 | 1 - db/schema_migrations/20230130084718 | 1 - db/schema_migrations/20230130102855 | 1 - db/schema_migrations/20230130102856 | 1 - db/schema_migrations/20230130103957 | 1 - db/schema_migrations/20230130103958 | 1 - db/schema_migrations/20230130104819 | 1 - db/schema_migrations/20230130110855 | 1 - db/schema_migrations/20230130125541 | 1 - db/schema_migrations/20230130130624 | 1 - db/schema_migrations/20230130175512 | 1 - db/schema_migrations/20230130202201 | 1 - db/schema_migrations/20230130204743 | 1 - db/schema_migrations/20230131004948 | 1 - db/schema_migrations/20230131005411 | 1 - db/schema_migrations/20230131090842 | 1 - db/schema_migrations/20230131123923 | 1 - db/schema_migrations/20230131125844 | 1 - db/schema_migrations/20230131194959 | 1 - db/schema_migrations/20230131210921 | 1 - db/schema_migrations/20230201012727 | 1 - db/schema_migrations/20230201012846 | 1 - db/schema_migrations/20230201014223 | 1 - db/schema_migrations/20230201014238 | 1 - db/schema_migrations/20230201082038 | 1 - db/schema_migrations/20230201152525 | 1 - db/schema_migrations/20230201153450 | 1 - db/schema_migrations/20230201171450 | 1 - db/schema_migrations/20230202002616 | 1 - db/schema_migrations/20230202002637 | 1 - db/schema_migrations/20230202004247 | 1 - db/schema_migrations/20230202023208 | 1 - db/schema_migrations/20230202023224 | 1 - db/schema_migrations/20230202032248 | 1 - db/schema_migrations/20230202032302 | 1 - db/schema_migrations/20230202131928 | 1 - db/schema_migrations/20230202153926 | 1 - db/schema_migrations/20230203011359 | 1 - db/schema_migrations/20230203122602 | 1 - db/schema_migrations/20230203122609 | 1 - db/schema_migrations/20230203145514 | 1 - db/schema_migrations/20230206143851 | 1 - db/schema_migrations/20230206172702 | 1 - db/schema_migrations/20230207003737 | 1 - db/schema_migrations/20230207003812 | 1 - db/schema_migrations/20230207005549 | 1 - db/schema_migrations/20230207005701 | 1 - db/schema_migrations/20230207011344 | 1 - db/schema_migrations/20230207011414 | 1 - db/schema_migrations/20230207012217 | 1 - db/schema_migrations/20230207012238 | 1 - db/schema_migrations/20230207015819 | 1 - db/schema_migrations/20230207015850 | 1 - db/schema_migrations/20230207025259 | 1 - db/schema_migrations/20230207025315 | 1 - db/schema_migrations/20230207030244 | 1 - db/schema_migrations/20230207030259 | 1 - db/schema_migrations/20230207143602 | 1 - db/schema_migrations/20230207143844 | 1 - db/schema_migrations/20230208100917 | 1 - db/schema_migrations/20230208103009 | 1 - db/schema_migrations/20230208103640 | 1 - db/schema_migrations/20230208110638 | 1 - db/schema_migrations/20230208131808 | 1 - db/schema_migrations/20230208132608 | 1 - db/schema_migrations/20230209090702 | 1 - db/schema_migrations/20230209092204 | 1 - db/schema_migrations/20230209103650 | 1 - db/schema_migrations/20230209103714 | 1 - db/schema_migrations/20230209123006 | 1 - db/schema_migrations/20230209131808 | 1 - db/schema_migrations/20230209140102 | 1 - db/schema_migrations/20230209171547 | 1 - db/schema_migrations/20230210113924 | 1 - db/schema_migrations/20230210181214 | 1 - db/schema_migrations/20230214122717 | 1 - db/schema_migrations/20230214142447 | 1 - db/schema_migrations/20230214142813 | 1 - db/schema_migrations/20230214154101 | 1 - db/schema_migrations/20230214174335 | 1 - db/schema_migrations/20230216035802 | 1 - db/schema_migrations/20230216052103 | 1 - db/schema_migrations/20230216054348 | 1 - ..._storage_size_without_uploads_size_spec.rb | 2 +- ...t_rules_without_protected_branches_spec.rb | 17 - ...umn_to_package_metadata_join_table_spec.rb | 72 - scripts/verify-tff-mapping | 4 +- .../db/migrate/schema_cache_migration_test.rb | 2 +- ...e_scope_for_personal_access_tokens_spec.rb | 2 +- .../backfill_environment_tiers_spec.rb | 2 +- ...ackfill_imported_issue_search_data_spec.rb | 109 - ...tegrations_enable_ssl_verification_spec.rb | 2 +- ...amespace_id_of_vulnerability_reads_spec.rb | 2 +- ...ckfill_project_namespace_on_issues_spec.rb | 76 - .../backfill_releases_author_id_spec.rb | 2 +- .../backfill_topics_title_spec.rb | 2 +- .../backfill_user_details_fields_spec.rb | 222 --- ..._vulnerability_reads_cluster_agent_spec.rb | 2 +- ...kfill_work_item_type_id_for_issues_spec.rb | 102 - .../destroy_invalid_members_spec.rb | 4 +- ...nse_for_no_issues_no_repo_projects_spec.rb | 63 - ...se_for_one_member_no_repo_projects_spec.rb | 2 +- ...nse_for_projects_less_than_five_mb_spec.rb | 2 +- ...ense_for_projects_less_than_one_mb_spec.rb | 2 +- .../expire_o_auth_tokens_spec.rb | 36 - ...tor_id_column_of_orphaned_projects_spec.rb | 2 +- .../populate_projects_star_count_spec.rb | 2 +- ...ect_group_link_with_missing_groups_spec.rb | 124 -- .../remove_self_managed_wiki_notes_spec.rb | 2 +- ...many_tags_skipped_registry_imports_spec.rb | 2 +- ..._available_for_non_public_projects_spec.rb | 2 +- ...overlong_vulnerability_html_titles_spec.rb | 2 +- .../gitlab/database/migration_helpers_spec.rb | 11 +- ...nse_for_projects_less_than_five_mb_spec.rb | 62 - ...alize_backfill_user_details_fields_spec.rb | 113 -- ..._storage_size_without_uploads_size_spec.rb | 43 - ...2133_delete_orphans_approval_rules_spec.rb | 22 - ...m_type_backfill_migration_finished_spec.rb | 106 - ...le_prune_stale_project_export_jobs_spec.rb | 24 - ...t_status_on_container_repositories_spec.rb | 51 - ...schedule_backfill_environment_tier_spec.rb | 24 - ...rt_sources_on_application_settings_spec.rb | 21 - ...rt_sources_on_application_settings_spec.rb | 34 - ...access_tokens_with_null_expires_in_spec.rb | 24 - ...update_active_billable_users_index_spec.rb | 33 - ...hedule_backfill_releases_author_id_spec.rb | 59 - ...connection_string_to_encrypted_var_spec.rb | 19 - ...t_partition_id_value_for_ci_tables_spec.rb | 78 - ...t_statistics_upload_size_migration_spec.rb | 22 - ...c_new_amount_used_with_amount_used_spec.rb | 54 - ...vulnerabilities_feedback_migration_spec.rb | 33 - ...ackages_size_on_project_statistics_spec.rb | 54 - ..._ci_namespace_monthly_usages_table_spec.rb | 55 - ...6111252_finalize_todo_sanitization_spec.rb | 57 - ...14739_clear_duplicate_jobs_cookies_spec.rb | 23 - ...fy_creator_id_of_orphaned_projects_spec.rb | 32 - ..._index_to_installable_npm_packages_spec.rb | 20 - ...ackfill_environment_tier_migration_spec.rb | 76 - ...202131928_encrypt_ci_trigger_token_spec.rb | 57 - ...ulnerabilities_feedback_migration4_spec.rb | 31 - ...espaces_emails_enabled_column_data_spec.rb | 63 - .../add_okr_hierarchy_restrictions_spec.rb | 35 - ...rojects_emails_enabled_column_data_spec.rb | 69 - ...ze_issues_namespace_id_backfilling_spec.rb | 76 - ...ast_error_from_project_mirror_data_spec.rb | 37 - .../recount_epic_cache_counts_v3_spec.rb | 32 - ...emove_flowdock_integration_records_spec.rb | 23 - ...dule_fixing_security_scan_statuses_spec.rb | 78 - .../second_recount_epic_cache_counts_spec.rb | 32 - ...end_user_confirmation_email_column_spec.rb | 42 - spec/support/rspec_order_todo.yml | 4 - 925 files changed, 1543 insertions(+), 11498 deletions(-) delete mode 100644 db/migrate/20220824082427_remove_tmp_idx_vulnerability_occurrences_on_id_and_scanner_id.rb delete mode 100644 db/migrate/20220908150054_add_runner_registration_enabled_to_namespace_settings.rb delete mode 100644 db/migrate/20221010191136_add_access_level_to_ci_job_artifacts.rb delete mode 100644 db/migrate/20221026095133_add_status_updated_at_to_container_repository.rb delete mode 100644 db/migrate/20221101174816_create_package_metadata.rb delete mode 100644 db/migrate/20221101194416_create_package_metadata_versions.rb delete mode 100644 db/migrate/20221101195309_create_package_metadata_licenses.rb delete mode 100644 db/migrate/20221101195543_create_package_metadata_package_version_licenses.rb delete mode 100644 db/migrate/20221102150737_index_environments_for_name_search_within_folder.rb delete mode 100644 db/migrate/20221102195642_create_dependency_proxy_manifest_states.rb delete mode 100644 db/migrate/20221103205317_create_dast_pre_scan_verification.rb delete mode 100644 db/migrate/20221107013943_add_accepted_reviewers_to_merge_request_predictions.rb delete mode 100644 db/migrate/20221110080508_add_partition_id_to_ci_unit_test_failures.rb delete mode 100644 db/migrate/20221110080636_add_partition_id_to_ci_sources_pipelines.rb delete mode 100644 db/migrate/20221110080748_add_partition_id_to_ci_build_pending_states.rb delete mode 100644 db/migrate/20221110080822_add_partition_id_to_ci_build_trace_chunks.rb delete mode 100644 db/migrate/20221110080913_add_partition_id_to_ci_build_report_results.rb delete mode 100644 db/migrate/20221110080956_add_partition_id_to_ci_build_needs.rb delete mode 100644 db/migrate/20221110081037_add_partition_id_to_ci_builds_runner_session.rb delete mode 100644 db/migrate/20221110081115_add_partition_id_to_ci_pending_builds.rb delete mode 100644 db/migrate/20221110081207_add_partition_id_to_ci_build_trace_metadata.rb delete mode 100644 db/migrate/20221110081348_add_partition_id_to_ci_running_builds.rb delete mode 100644 db/migrate/20221110081448_add_partition_id_to_ci_job_variables.rb delete mode 100644 db/migrate/20221110183103_add_dashboard_fields_to_namespace_details.rb delete mode 100644 db/migrate/20221111123146_add_onboarding_in_progress_to_users.rb delete mode 100644 db/migrate/20221111123147_add_onboarding_step_url_to_user_details.rb delete mode 100644 db/migrate/20221111123148_add_text_limit_to_onboarding_step_url.rb delete mode 100644 db/migrate/20221111135238_create_dependency_list_exports_table.rb delete mode 100644 db/migrate/20221111142921_add_hierarchy_restrictions.rb delete mode 100644 db/migrate/20221114131943_add_short_title_to_appearances.rb delete mode 100644 db/migrate/20221114145103_add_last_seat_refresh_at_to_gitlab_subscriptions.rb delete mode 100644 db/migrate/20221114212908_add_debug_trace_to_ci_builds_metadata.rb delete mode 100644 db/migrate/20221115085813_add_limit_to_appereances_short_title.rb delete mode 100644 db/migrate/20221116100056_add_foreign_key_to_dependency_list_exports.rb delete mode 100644 db/migrate/20221116113323_add_index_on_team_id_and_chat_id.rb delete mode 100644 db/migrate/20221116124821_add_enterprise_boolean_to_bulk_imports.rb delete mode 100644 db/migrate/20221116134507_add_projects_emails_enabled_column.rb delete mode 100644 db/migrate/20221116134539_add_namespaces_emails_enabled_column.rb delete mode 100644 db/migrate/20221116160204_create_ml_experiment_metadata_and_ml_candidate_metadata.rb delete mode 100644 db/migrate/20221116161126_add_auth_signing_type_to_keys.rb delete mode 100644 db/migrate/20221121091238_add_work_item_progress.rb delete mode 100644 db/migrate/20221121100431_add_partition_id_to_ci_resources.rb delete mode 100644 db/migrate/20221122141046_add_allow_pipeline_trigger_approve_deployment_to_project_settings.rb delete mode 100644 db/migrate/20221122225925_set_email_confirmation_setting_before_removing_send_user_confirmation_email_column.rb delete mode 100644 db/migrate/20221124113925_add_pipeline_hierarchy_size_to_plan_limits.rb delete mode 100644 db/migrate/20221128123514_add_source_partition_id_to_ci_sources_pipeline.rb delete mode 100644 db/migrate/20221128155738_add_discord_to_user_details.rb delete mode 100644 db/migrate/20221128165833_add_discord_field_limit_to_user_details.rb delete mode 100644 db/migrate/20221129192619_increase_self_hosted_attachment_size_limit.rb delete mode 100644 db/migrate/20221130170433_create_dast_pre_scan_verification_step.rb delete mode 100644 db/migrate/20221130182056_add_plan_limits_max_size_to_requirements_v2_artifact.rb delete mode 100644 db/migrate/20221202144210_create_achievements.rb delete mode 100644 db/migrate/20221202202351_remove_index_i_ci_job_token_project_scope_links_on_source_and_target_project.rb delete mode 100644 db/migrate/20221204090437_add_category_to_abuse_report.rb delete mode 100644 db/migrate/20221205061134_add_disable_pats_to_application_settings.rb delete mode 100644 db/migrate/20221206163420_add_use_new_navigation_to_user_preferences.rb delete mode 100644 db/migrate/20221206211814_add_authorized_scopes_to_slack_integration.rb delete mode 100644 db/migrate/20221206222032_add_read_code_to_member_roles.rb delete mode 100644 db/migrate/20221206235208_add_max_terraform_state_size_bytes_to_application_settings.rb delete mode 100644 db/migrate/20221207140259_add_bulk_import_enabled_to_application_settings.rb delete mode 100644 db/migrate/20221207220120_create_dast_scanner_profiles_runner_tags.rb delete mode 100644 db/migrate/20221208122921_remove_constraints_from_ci_resources_for_partition_id.rb delete mode 100644 db/migrate/20221209110934_update_import_sources_on_application_settings.rb delete mode 100644 db/migrate/20221209110935_fix_update_import_sources_on_application_settings.rb delete mode 100644 db/migrate/20221209174132_remove_sbom_occurrences_unique_index.rb delete mode 100644 db/migrate/20221209174157_truncate_sbom_occurrences.rb delete mode 100644 db/migrate/20221212054640_add_reported_from_to_abuse_reports.rb delete mode 100644 db/migrate/20221212192452_add_uuid_column_to_sbom_occurrences.rb delete mode 100644 db/migrate/20221212192527_index_sbom_occurrences_on_uuid.rb delete mode 100644 db/migrate/20221213105028_add_sync_part_step_2_of_index_namespaces_on_path_for_top_level_non_projects.rb delete mode 100644 db/migrate/20221213184314_change_enabled_default_in_dependency_proxy_group_settings.rb delete mode 100644 db/migrate/20221214201256_create_user_achievements.rb delete mode 100644 db/migrate/20221214204247_user_achievements_foreign_keys.rb delete mode 100644 db/migrate/20221215210347_partition_pm_package_metadata_tables.rb delete mode 100644 db/migrate/20221216145659_add_pa_clickhouse_connection_string_to_application_settings.rb delete mode 100644 db/migrate/20221219103007_add_name_to_ml_candidates.rb delete mode 100644 db/migrate/20221219112528_add_text_limit_to_name_on_ml_candidates.rb delete mode 100644 db/migrate/20221219112632_add_next_over_limit_check_at_to_namespace_details.rb delete mode 100644 db/migrate/20221219122320_copy_clickhouse_connection_string_to_encrypted_var.rb delete mode 100644 db/migrate/20221219135535_add_user_defaults_to_private_profile_to_application_settings.rb delete mode 100644 db/migrate/20221221134116_create_elastic_group_index_statuses.rb delete mode 100644 db/migrate/20221221171239_rename_amount_used_column.rb delete mode 100644 db/migrate/20221222144954_create_analytics_dashboards_configuration_pointers.rb delete mode 100644 db/migrate/20221223114543_add_pwa_icon_to_appearances.rb delete mode 100644 db/migrate/20221226105323_add_registration_columns_to_ci_runners.rb delete mode 100644 db/migrate/20221226132038_index_ci_runners_on_creator_id.rb delete mode 100644 db/migrate/20221226163203_create_ci_runner_machines.rb delete mode 100644 db/migrate/20221227080606_add_text_limit_to_pwa_icon.rb delete mode 100644 db/migrate/20221227100846_add_allow_registration_token_to_application_settings.rb delete mode 100644 db/migrate/20221227100908_add_allow_registration_token_to_namespace_settings.rb delete mode 100644 db/migrate/20221228063845_add_incident_events_to_integrations.rb delete mode 100644 db/migrate/20221228072549_add_pwa_attributes_to_appearances.rb delete mode 100644 db/migrate/20221228073206_add_text_limit_to_pwa_attributes.rb delete mode 100644 db/migrate/20221228083452_remove_check_constraint_on_chat_names_on_integration.rb delete mode 100644 db/migrate/20221228161214_rename_appearances_short_title_to_pwa_short_name.rb delete mode 100644 db/migrate/20221229064959_add_links_to_spam_to_abuse_reports.rb delete mode 100644 db/migrate/20230102131000_add_smtp_credentials_to_service_desk_settings.rb delete mode 100644 db/migrate/20230102131050_add_unique_constraint_for_custom_email_to_service_desk_settings.rb delete mode 100644 db/migrate/20230102131100_add_text_limits_to_smtp_credentials_on_service_desk_settings.rb delete mode 100644 db/migrate/20230102180341_add_merge_request_meta_to_merge_requests_compliance_violations.rb delete mode 100644 db/migrate/20230104150600_add_machine_id_to_builds_metadata.rb delete mode 100644 db/migrate/20230104201524_add_zoekt_shards_and_indexed_namespaces.rb delete mode 100644 db/migrate/20230105170414_rename_amount_used_column_on_ci_namespace_monthly_usages_table.rb delete mode 100644 db/migrate/20230106014423_add_constraint_to_links_to_spam.rb delete mode 100644 db/migrate/20230106125945_add_user_to_ssh_signatures.rb delete mode 100644 db/migrate/20230106131659_add_fingerprint_to_ssh_signatures.rb delete mode 100644 db/migrate/20230106142239_add_config_column_to_ci_runner_machines.rb delete mode 100644 db/migrate/20230106184809_create_dast_profiles_tags.rb delete mode 100644 db/migrate/20230107125328_add_zoekt_indexed_namespaces_foreign_key.rb delete mode 100644 db/migrate/20230109093043_create_namespaces_storage_limit_exclusions.rb delete mode 100644 db/migrate/20230109095159_add_runner_machines_created_at_index.rb delete mode 100644 db/migrate/20230109095622_rename_web_hook_calls_to_web_hook_calls_high.rb delete mode 100644 db/migrate/20230109121313_add_runner_machines_contacted_at_index.rb delete mode 100644 db/migrate/20230109215921_add_storage_admin_control_columns_to_plan_limits.rb delete mode 100644 db/migrate/20230109232316_create_wiki_repository_states.rb delete mode 100644 db/migrate/20230110031131_add_uses_legacy_iid_to_test_reports.rb delete mode 100644 db/migrate/20230110212906_add_on_update_action_to_postgres_foreign_keys.rb delete mode 100644 db/migrate/20230111092510_add_migrate_projects_to_bulk_import_entities.rb delete mode 100644 db/migrate/20230111124512_remove_tmp_index_vulns_on_report_type.rb delete mode 100644 db/migrate/20230111132621_unpartition_pm_package_metadata_tables.rb delete mode 100644 db/migrate/20230111171355_add_allow_possible_spam_to_application_settings.rb delete mode 100644 db/migrate/20230111174113_create_airflow_dags.rb delete mode 100644 db/migrate/20230112014822_add_user_index_and_fk_to_ssh_signatures.rb delete mode 100644 db/migrate/20230112104253_add_tmp_index_to_ci_build_runner_session.rb delete mode 100644 db/migrate/20230112104526_add_tmp_index_to_ci_pending_build.rb delete mode 100644 db/migrate/20230112104636_add_tmp_index_to_ci_running_build.rb delete mode 100644 db/migrate/20230113195141_package_metadata_set_default_not_null.rb delete mode 100644 db/migrate/20230116143310_add_pages_unique_domain_columns_to_project_settings.rb delete mode 100644 db/migrate/20230116143311_add_project_settings_pages_unique_domain_limit.rb delete mode 100644 db/migrate/20230116143312_add_project_settings_pages_unique_domain_unique_index.rb delete mode 100644 db/migrate/20230117173433_create_project_data_transfer.rb delete mode 100644 db/migrate/20230119150727_add_search_curation_settings_to_application_settings.rb delete mode 100644 db/migrate/20230119151636_add_url_hash_to_web_hook_logs.rb delete mode 100644 db/migrate/20230119151940_add_text_limit_to_web_hook_logs_url_hash.rb delete mode 100644 db/migrate/20230119214643_add_deactivation_email_additional_text_to_application_settings.rb delete mode 100644 db/migrate/20230119215436_add_package_metadata_checkpoints.rb delete mode 100644 db/migrate/20230120170042_re_add_web_hook_calls_column.rb delete mode 100644 db/migrate/20230120170631_drop_sync_triggers_from_web_hook_calls_plan_limits.rb delete mode 100644 db/migrate/20230120171818_sync_plan_limits_web_hook_calls_columns.rb delete mode 100644 db/migrate/20230123095022_create_scan_result_policies.rb delete mode 100644 db/migrate/20230123120004_add_datetime_fields_to_bulk_import_trackers.rb delete mode 100644 db/migrate/20230123150648_add_deactivation_email_additional_text_to_application_settings_text_limits.rb delete mode 100644 db/migrate/20230124122143_add_deploy_key_id_to_create_access_levels.rb delete mode 100644 db/migrate/20230124173255_raise_group_and_project_ci_variable_limits.rb delete mode 100644 db/migrate/20230124183643_add_checksums_column_to_project_mirror_data.rb delete mode 100644 db/migrate/20230124193917_add_index_for_protected_tag_create_access_levels.rb delete mode 100644 db/migrate/20230125090315_add_prepared_at_to_merge_request.rb delete mode 100644 db/migrate/20230126023444_add_timestamps_to_package_metadata_tables.rb delete mode 100644 db/migrate/20230126110439_change_default_value_for_inbound_job_token_scope_enabled.rb delete mode 100644 db/migrate/20230126151622_add_ci_triggers_encrypted_token.rb delete mode 100644 db/migrate/20230126210436_add_jira_connect_public_key_storage_enabled_setting.rb delete mode 100644 db/migrate/20230127093353_initialize_conversion_of_merge_request_metrics_to_bigint.rb delete mode 100644 db/migrate/20230127121107_add_git_rate_limit_users_alertlist_to_application_settings.rb delete mode 100644 db/migrate/20230127121443_add_unique_project_download_limit_alertlist_to_namespace_settings.rb delete mode 100644 db/migrate/20230127151529_add_project_pointer_for_analytics_dashboard.rb delete mode 100644 db/migrate/20230127151530_migrate_project_pointer_for_analytics_dashboard.rb delete mode 100644 db/migrate/20230127151531_change_dashboard_analytics_project_pointer_project_null.rb delete mode 100644 db/migrate/20230127155217_add_id_column_to_package_metadata_join_table.rb delete mode 100644 db/migrate/20230127164007_add_trial_date_index_to_gitlab_subscribtions.rb delete mode 100644 db/migrate/20230129094140_add_widget_definitions.rb delete mode 100644 db/migrate/20230129154126_add_widget_def_namespace_fk.rb delete mode 100644 db/migrate/20230129154202_add_widget_def_work_item_type_fk.rb delete mode 100644 db/migrate/20230129154819_add_widgets_for_work_item_types.rb delete mode 100644 db/migrate/20230130104819_initialize_conversion_of_ci_build_needs_to_bigint.rb delete mode 100644 db/migrate/20230130110855_backfill_ci_build_needs_for_big_int_conversion.rb delete mode 100644 db/migrate/20230130125541_add_attempts_and_last_error_to_postgres_async_indexes.rb delete mode 100644 db/migrate/20230130130624_add_text_limit_to_postgres_async_indexes_last_error.rb delete mode 100644 db/migrate/20230130175512_initialize_conversion_of_sent_notifications_to_bigint.rb delete mode 100644 db/migrate/20230130204743_remove_protected_environment_default_access_level.rb delete mode 100644 db/migrate/20230131004948_initialize_conversion_of_notes_id_to_bigint.rb delete mode 100644 db/migrate/20230131090842_add_global_group_approvers_enabled_to_application_settings.rb delete mode 100644 db/migrate/20230131123923_raise_ci_variables_default_limits.rb delete mode 100644 db/migrate/20230131125844_add_project_id_name_id_version_index_to_installable_npm_packages.rb delete mode 100644 db/migrate/20230201012727_initialize_conversion_of_todos_note_id_to_bigint.rb delete mode 100644 db/migrate/20230201014223_initialize_conversion_of_system_note_metadata_note_id_to_bigint.rb delete mode 100644 db/migrate/20230202002616_initialize_conversion_of_epic_user_mentions_note_id_to_bigint.rb delete mode 100644 db/migrate/20230202023208_initialize_conversion_of_suggestions_note_id_to_bigint.rb delete mode 100644 db/migrate/20230202032248_initialize_conversion_of_issue_user_mentions_note_id_to_bigint.rb delete mode 100644 db/migrate/20230202153926_add_scan_result_policy_id_to_approval_rules.rb delete mode 100644 db/migrate/20230203011359_create_automation_rules.rb delete mode 100644 db/migrate/20230203145514_allow_null_pipeline_id_to_dast_pre_scan_verification.rb delete mode 100644 db/migrate/20230206143851_create_postgres_async_foreign_key_validations.rb delete mode 100644 db/migrate/20230206172702_add_match_on_inclusion_to_scan_result_policy.rb delete mode 100644 db/migrate/20230207003737_initialize_conversion_of_note_diff_files_diff_note_id_to_bigint.rb delete mode 100644 db/migrate/20230207005549_initialize_conversion_of_snippet_user_mentions_note_id_to_bigint.rb delete mode 100644 db/migrate/20230207011344_initialize_conversion_of_design_user_mentions_note_id_to_bigint.rb delete mode 100644 db/migrate/20230207012217_initialize_conversion_of_vulnerability_user_mentions_note_id_to_bigint.rb delete mode 100644 db/migrate/20230207015819_initialize_conversion_of_commit_user_mentions_note_id_to_bigint.rb delete mode 100644 db/migrate/20230207025259_initialize_conversion_of_merge_request_user_mentions_note_id_to_bigint.rb delete mode 100644 db/migrate/20230207030244_initialize_conversion_of_timelogs_note_id_to_bigint.rb delete mode 100644 db/migrate/20230208103640_rename_runner_machine_xid.rb delete mode 100644 db/migrate/20230210181214_add_allow_deploy_tokens_and_keys_with_external_authn_to_application_settings.rb delete mode 100644 db/migrate/20230214142447_remove_text_limit_from_ci_job_artifacts_original_filename.rb delete mode 100644 db/migrate/20230214142813_remove_ci_job_artifacts_original_filename.rb delete mode 100644 db/post_migrate/20220826152430_remove_container_repository_deprecated_geo_fields.rb delete mode 100644 db/post_migrate/20220826152432_remove_container_repository_updated_events.rb delete mode 100644 db/post_migrate/20220920180451_schedule_vulnerabilities_feedback_migration.rb delete mode 100644 db/post_migrate/20221018095434_schedule_disable_legacy_open_source_license_for_projects_less_than_five_mb.rb delete mode 100644 db/post_migrate/20221102231130_finalize_backfill_user_details_fields.rb delete mode 100644 db/post_migrate/20221102231131_remove_temp_index_for_user_details_fields.rb delete mode 100644 db/post_migrate/20221104115712_backfill_project_statistics_storage_size_without_uploads_size.rb delete mode 100644 db/post_migrate/20221104141647_add_index_for_non_public_top_level_groups_to_namespaces.rb delete mode 100644 db/post_migrate/20221109160052_add_default_for_approval_project_rules_scanners.rb delete mode 100644 db/post_migrate/20221110100600_add_temp_index_on_overlong_vulnerability_html_title.rb delete mode 100644 db/post_migrate/20221110100602_queue_truncate_overlong_vulnerability_html_titles.rb delete mode 100644 db/post_migrate/20221110152133_delete_orphans_approval_rules.rb delete mode 100644 db/post_migrate/20221110190340_add_partial_legacy_open_source_license_available_project_id_index.rb delete mode 100644 db/post_migrate/20221114142044_delete_experiments_foreign_keys.rb delete mode 100644 db/post_migrate/20221114142602_drop_experiment_subjects_table.rb delete mode 100644 db/post_migrate/20221114142616_drop_experiments_table.rb delete mode 100644 db/post_migrate/20221115120602_add_index_for_issues_health_status_ordering.rb delete mode 100644 db/post_migrate/20221115173607_ensure_work_item_type_backfill_migration_finished.rb delete mode 100644 db/post_migrate/20221115184525_remove_namespaces_tmp_project_id_column.rb delete mode 100644 db/post_migrate/20221116105434_remove_index_project_settings_on_legacy_open_source_license_available.rb delete mode 100644 db/post_migrate/20221116134611_add_namespaces_emails_enabled_column_data.rb delete mode 100644 db/post_migrate/20221116134633_add_projects_emails_enabled_column_data.rb delete mode 100644 db/post_migrate/20221116143854_add_okr_hierarchy_restrictions.rb delete mode 100644 db/post_migrate/20221117103015_add_async_index_author_id_created_at_on_merge_requests.rb delete mode 100644 db/post_migrate/20221117135032_remove_clusters_applications_job_instances.rb delete mode 100644 db/post_migrate/20221117153015_add_index_merge_request_id_created_at_on_scan_finding_approval_merge_request_rules.rb delete mode 100644 db/post_migrate/20221118103152_finalize_issues_namespace_id_backfilling.rb delete mode 100644 db/post_migrate/20221118103352_add_cascade_delete_fk_on_issues_namespace_id.rb delete mode 100644 db/post_migrate/20221118103752_add_not_null_contraint_to_issues_namespace_id.rb delete mode 100644 db/post_migrate/20221118104752_validate_not_null_contraint_to_issues_namespace_id.rb delete mode 100644 db/post_migrate/20221121000127_index_security_scans_on_created_at_and_id_for_non_purged_records.rb delete mode 100644 db/post_migrate/20221121000451_drop_index_security_scans_on_id_for_non_purged_records.rb delete mode 100644 db/post_migrate/20221121152048_remove_unused_feedback_migration_index.rb delete mode 100644 db/post_migrate/20221121152515_add_supporting_index_for_vulnerabilities_feedback_migration2.rb delete mode 100644 db/post_migrate/20221121155850_change_vulnerabilities_state_transitions_comment_limit.rb delete mode 100644 db/post_migrate/20221121180138_drop_index_on_vulnerabilities_state_case_id.rb delete mode 100644 db/post_migrate/20221121181627_drop_index_on_vulnerabilities_state_case_id_desc.rb delete mode 100644 db/post_migrate/20221121184931_validate_not_null_contraint_on_issues_work_item_type_id.rb delete mode 100644 db/post_migrate/20221122063922_remove_issue_title_trigram_index.rb delete mode 100644 db/post_migrate/20221122064537_remove_issue_description_trigram_index.rb delete mode 100644 db/post_migrate/20221122132812_schedule_prune_stale_project_export_jobs.rb delete mode 100644 db/post_migrate/20221122155149_add_index_for_paths_on_non_projects.rb delete mode 100644 db/post_migrate/20221123133054_queue_reset_status_on_container_repositories.rb delete mode 100644 db/post_migrate/20221124153602_add_supporting_index_for_vulnerabilities_feedback_comment_proccessing.rb delete mode 100644 db/post_migrate/20221125222221_add_metrics_index_to_authentication_events.rb delete mode 100644 db/post_migrate/20221125222341_remove_result_index_from_authentication_events.rb delete mode 100644 db/post_migrate/20221128120634_schedule_fixing_security_scan_statuses.rb delete mode 100644 db/post_migrate/20221128220043_drop_temp_work_item_type_id_backfill_index.rb delete mode 100644 db/post_migrate/20221128222417_add_back_issues_work_item_type_id_index.rb delete mode 100644 db/post_migrate/20221129124240_remove_flowdock_integration_records.rb delete mode 100644 db/post_migrate/20221130192239_fix_approval_project_rules_without_protected_branches.rb delete mode 100644 db/post_migrate/20221202031332_add_index_to_issue_assignees_on_user_id_and_issue_id.rb delete mode 100644 db/post_migrate/20221202031417_remove_index_to_issue_assignees_on_user_id.rb delete mode 100644 db/post_migrate/20221202154128_add_pipeline_metadata_name_index.rb delete mode 100644 db/post_migrate/20221202154151_remove_pipeline_metadata_pipeline_id_index.rb delete mode 100644 db/post_migrate/20221205134448_set_index_for_issues_health_status_ordering.rb delete mode 100644 db/post_migrate/20221205151917_schedule_backfill_environment_tier.rb delete mode 100644 db/post_migrate/20221205170310_add_index_for_active_members.rb delete mode 100644 db/post_migrate/20221206012013_add_index_author_id_created_at_on_merge_requests.rb delete mode 100644 db/post_migrate/20221206075631_add_unique_id_partition_id_index_to_ci_build.rb delete mode 100644 db/post_migrate/20221206132610_add_unique_token_encrypted_partition_id_index_to_ci_build.rb delete mode 100644 db/post_migrate/20221206173132_add_issues_work_item_type_id_index.rb delete mode 100644 db/post_migrate/20221209235939_add_tmp_index_oauth_access_tokens_on_id_where_expires_in_null.rb delete mode 100644 db/post_migrate/20221209235940_cleanup_o_auth_access_tokens_with_null_expires_in.rb delete mode 100644 db/post_migrate/20221210154044_update_active_billable_users_index.rb delete mode 100644 db/post_migrate/20221212103743_add_index_id_partition_id_to_ci_build.rb delete mode 100644 db/post_migrate/20221213064717_change_default_partition_id_on_ci_resources.rb delete mode 100644 db/post_migrate/20221214095129_second_recount_epic_cache_counts.rb delete mode 100644 db/post_migrate/20221214105307_add_token_encrypted_partition_id_index_to_ci_build.rb delete mode 100644 db/post_migrate/20221215151822_schedule_backfill_releases_author_id.rb delete mode 100644 db/post_migrate/20221216131710_add_index_to_ci_unit_test_failure.rb delete mode 100644 db/post_migrate/20221216131935_add_index_to_ci_build_pending_state.rb delete mode 100644 db/post_migrate/20221216131958_add_index_to_ci_build_trace_chunk.rb delete mode 100644 db/post_migrate/20221216144854_add_foreign_key_to_ci_unit_test_failure.rb delete mode 100644 db/post_migrate/20221216150304_add_foreign_key_to_ci_build_pending_state.rb delete mode 100644 db/post_migrate/20221216150321_add_foreign_key_to_ci_build_trace_chunk.rb delete mode 100644 db/post_migrate/20221216150919_validate_foreign_key_on_ci_unit_test_failure_partition_id_build_id.rb delete mode 100644 db/post_migrate/20221216151459_validate_foreign_key_on_ci_build_pending_state_partition_id_build_id.rb delete mode 100644 db/post_migrate/20221216151649_validate_foreign_key_on_ci_build_trace_chunk_partition_id_build_id.rb delete mode 100644 db/post_migrate/20221216232658_index_members_on_member_namespace_id_compound.rb delete mode 100644 db/post_migrate/20221216232659_index_members_on_member_namespace_id_compound_sync.rb delete mode 100644 db/post_migrate/20221220075936_add_query_index_for_ci_pipeline_schedules.rb delete mode 100644 db/post_migrate/20221220131020_bump_default_partition_id_value_for_ci_tables.rb delete mode 100644 db/post_migrate/20221221110733_remove_temp_index_for_project_statistics_upload_size_migration.rb delete mode 100644 db/post_migrate/20221221150123_update_billable_users_index.rb delete mode 100644 db/post_migrate/20221222092958_sync_new_amount_used_with_amount_used.rb delete mode 100644 db/post_migrate/20221223123019_delete_queued_jobs_for_vulnerabilities_feedback_migration.rb delete mode 100644 db/post_migrate/20221226153240_remove_chat_names_integration_id_foreign_key.rb delete mode 100644 db/post_migrate/20221226154458_drop_index_on_chat_names_on_integration_id_and_team_id_and_chat_id.rb delete mode 100644 db/post_migrate/20221227100751_add_user_index_to_chat_names.rb delete mode 100644 db/post_migrate/20221227101436_drop_index_on_chat_names_on_user_id_and_integration_id.rb delete mode 100644 db/post_migrate/20221228103133_queue_backfill_admin_mode_scope_for_personal_access_tokens.rb delete mode 100644 db/post_migrate/20221228163035_cleanup_appearances_short_title_rename.rb delete mode 100644 db/post_migrate/20221228210616_add_index_on_ci_runners_on_runner_type_and_id.rb delete mode 100644 db/post_migrate/20230104103748_remove_new_amount_used_column.rb delete mode 100644 db/post_migrate/20230104150601_prepare_builds_metadata_async_idx.rb delete mode 100644 db/post_migrate/20230104220137_reindex_vuln_reads_on_default_branch_with_common_query.rb delete mode 100644 db/post_migrate/20230104222438_add_partition_index_to_builds_metadata.rb delete mode 100644 db/post_migrate/20230104222514_add_foreign_key_to_builds_metadata.rb delete mode 100644 db/post_migrate/20230104224020_drop_vuln_reads_on_default_branch_index.rb delete mode 100644 db/post_migrate/20230105172120_sync_new_amount_used_with_amount_used_on_ci_namespace_monthly_usages_table.rb delete mode 100644 db/post_migrate/20230105180002_remove_new_amount_used_column_on_ci_namespace_monthly_usages.rb delete mode 100644 db/post_migrate/20230106124332_change_keys_relation_to_ssh_signatures.rb delete mode 100644 db/post_migrate/20230109100044_cleanup_web_hook_calls_column_rename.rb delete mode 100644 db/post_migrate/20230109144915_remove_push_rules_application_settings_push_rule_id_fk.rb delete mode 100644 db/post_migrate/20230109144928_remove_users_application_settings_usage_stats_set_by_user_id_fk.rb delete mode 100644 db/post_migrate/20230109144941_remove_namespaces_application_settings_instance_administrators_group_id_fk.rb delete mode 100644 db/post_migrate/20230109144953_remove_projects_application_settings_file_template_project_id_fk.rb delete mode 100644 db/post_migrate/20230109145005_remove_projects_application_settings_instance_administration_project_id_fk.rb delete mode 100644 db/post_migrate/20230109145018_remove_namespaces_application_settings_custom_project_templates_group_id_fk.rb delete mode 100644 db/post_migrate/20230110172751_add_partial_index_on_group_path_id.rb delete mode 100644 db/post_migrate/20230111125148_add_user_id_and_source_id_and_source_type_and_member_role_id_index_to_members.rb delete mode 100644 db/post_migrate/20230111125150_drop_user_id_and_source_id_and_source_type_index_from_members.rb delete mode 100644 db/post_migrate/20230112051854_add_not_null_constraint_to_o_auth_access_tokens_expires_in.rb delete mode 100644 db/post_migrate/20230112085143_add_index_environments_on_project_id_and_id.rb delete mode 100644 db/post_migrate/20230112141236_schedule_vulnerabilities_feedback_migration2.rb delete mode 100644 db/post_migrate/20230112144946_add_tmp_index_to_ci_build_need.rb delete mode 100644 db/post_migrate/20230112145326_add_tmp_index_to_ci_pipeline_variable.rb delete mode 100644 db/post_migrate/20230113003255_remove_atlassian_refresh_token_constraint.rb delete mode 100644 db/post_migrate/20230116083826_drop_index_on_ci_build_token_encrypted.rb delete mode 100644 db/post_migrate/20230116090630_add_index_for_group_activity_events.rb delete mode 100644 db/post_migrate/20230116090852_add_index_for_project_activity_events.rb delete mode 100644 db/post_migrate/20230116090920_add_index_to_events_on_group_id_and_id.rb delete mode 100644 db/post_migrate/20230116091626_add_index_for_events_followed_users.rb delete mode 100644 db/post_migrate/20230116111252_finalize_todo_sanitization.rb delete mode 100644 db/post_migrate/20230116160904_remove_user_details_fields_from_user.rb delete mode 100644 db/post_migrate/20230117092947_add_tmp_index_to_ci_build_report_results.rb delete mode 100644 db/post_migrate/20230117093222_add_tmp_index_to_ci_builds_on_partition_id.rb delete mode 100644 db/post_migrate/20230117093736_add_tmp_index_to_ci_pipelines_on_partition_id.rb delete mode 100644 db/post_migrate/20230117093924_add_tmp_index_to_ci_stages_on_partition_id.rb delete mode 100644 db/post_migrate/20230117094111_prepare_tmp_index_to_ci_build_trace_metadata.rb delete mode 100644 db/post_migrate/20230117094226_prepare_tmp_index_to_ci_job_artifact.rb delete mode 100644 db/post_migrate/20230117094316_add_tmp_index_to_ci_job_variable.rb delete mode 100644 db/post_migrate/20230117113719_add_tmp_index_to_ci_sources_pipelines_on_partition_id.rb delete mode 100644 db/post_migrate/20230117114739_clear_duplicate_jobs_cookies.rb delete mode 100644 db/post_migrate/20230117145628_add_token_encrypted_and_partition_id_index_to_ci_build.rb delete mode 100644 db/post_migrate/20230118083437_redefine_foreign_key_on_ci_unit_test_failure.rb delete mode 100644 db/post_migrate/20230118083632_redefine_foreign_key_on_ci_build_pending_state.rb delete mode 100644 db/post_migrate/20230118083748_redefine_foreign_key_on_ci_build_trace_chunk.rb delete mode 100644 db/post_migrate/20230119085509_add_index_to_ci_running_build.rb delete mode 100644 db/post_migrate/20230119085552_add_foreign_key_to_ci_running_build.rb delete mode 100644 db/post_migrate/20230119090944_add_index_to_ci_pending_build.rb delete mode 100644 db/post_migrate/20230119091027_add_foreign_key_to_ci_pending_build.rb delete mode 100644 db/post_migrate/20230119095022_add_fk_index_to_ci_builds_runner_session_on_partition_id_and_build_id.rb delete mode 100644 db/post_migrate/20230119095023_add_fk_to_ci_builds_runner_session_on_partition_id_and_build_id.rb delete mode 100644 db/post_migrate/20230119095024_validate_fk_on_ci_builds_runner_session_partition_id_and_build_id.rb delete mode 100644 db/post_migrate/20230119095025_remove_fk_to_ci_builds_ci_builds_runner_session_on_build_id.rb delete mode 100644 db/post_migrate/20230119123256_add_fk_index_to_ci_resources_on_partition_id_and_build_id.rb delete mode 100644 db/post_migrate/20230119123257_add_fk_to_ci_resources_on_partition_id_and_build_id.rb delete mode 100644 db/post_migrate/20230119123258_validate_fk_on_ci_resources_partition_id_and_build_id.rb delete mode 100644 db/post_migrate/20230119123259_remove_fk_to_ci_builds_ci_resources_on_build_id.rb delete mode 100644 db/post_migrate/20230119123908_add_temporary_size_index_to_package_files.rb delete mode 100644 db/post_migrate/20230119123937_queue_fix_incoherent_packages_size_on_project_statistics.rb delete mode 100644 db/post_migrate/20230123095023_add_scan_result_policy_id_to_software_license_policies.rb delete mode 100644 db/post_migrate/20230124101832_remove_fk_to_ci_builds_ci_unit_test_failure_on_build_id.rb delete mode 100644 db/post_migrate/20230124102131_remove_fk_to_ci_builds_ci_build_pending_state_on_build_id.rb delete mode 100644 db/post_migrate/20230124102222_remove_fk_to_ci_builds_ci_build_trace_chunk_on_build_id.rb delete mode 100644 db/post_migrate/20230124104310_prepare_web_hook_logs_id_created_at_async_index.rb delete mode 100644 db/post_migrate/20230125093723_rebalance_partition_id_ci_pipeline.rb delete mode 100644 db/post_migrate/20230125093840_rebalance_partition_id_ci_build.rb delete mode 100644 db/post_migrate/20230126091522_add_unique_index_to_ci_build_pending_state.rb delete mode 100644 db/post_migrate/20230126133531_remove_not_null_constraints_for_tables_with_schema_differences_v3.rb delete mode 100644 db/post_migrate/20230127101834_backfill_merge_request_metrics_for_bigint_conversion.rb delete mode 100644 db/post_migrate/20230127115607_add_hosted_plan_id_and_trial_index_to_gitlab_subscriptions.rb delete mode 100644 db/post_migrate/20230127123947_add_fk_index_to_ci_sources_pipelines_on_source_partition_id_and_source_job_id.rb delete mode 100644 db/post_migrate/20230127123948_add_fk_to_ci_sources_pipelines_on_source_partition_id_and_source_job_id.rb delete mode 100644 db/post_migrate/20230127125018_remove_hosted_plan_id_index_from_gitlab_subscriptions.rb delete mode 100644 db/post_migrate/20230127131835_add_application_settings_git_users_alertlist_max_usernames_constraint.rb delete mode 100644 db/post_migrate/20230127131915_add_namespace_settings_unique_project_download_limit_alertlist_size_constraint.rb delete mode 100644 db/post_migrate/20230127151606_add_fk_index_to_ci_build_trace_metadata_on_partition_id_and_build_id.rb delete mode 100644 db/post_migrate/20230127151607_add_fk_to_ci_build_trace_metadata_on_partition_id_and_build_id.rb delete mode 100644 db/post_migrate/20230127152727_add_fk_index_to_ci_job_artifacts_on_partition_id_and_job_id.rb delete mode 100644 db/post_migrate/20230127152728_add_fk_to_ci_job_artifacts_on_partition_id_and_job_id.rb delete mode 100644 db/post_migrate/20230127153229_add_fk_index_to_ci_job_variables_on_partition_id_and_job_id.rb delete mode 100644 db/post_migrate/20230127153230_add_fk_to_ci_job_variables_on_partition_id_and_job_id.rb delete mode 100644 db/post_migrate/20230130070623_add_index_on_packages_package_file_file_name.rb delete mode 100644 db/post_migrate/20230130073109_nullify_creator_id_of_orphaned_projects.rb delete mode 100644 db/post_migrate/20230130075434_schedule_tmp_index_to_ci_build_report_results.rb delete mode 100644 db/post_migrate/20230130084718_drop_invalid_async_index_from_postgres_async_index.rb delete mode 100644 db/post_migrate/20230130102855_add_fk_index_to_ci_build_report_results_on_partition_id_and_build_id.rb delete mode 100644 db/post_migrate/20230130102856_add_fk_to_ci_build_report_results_on_partition_id_and_build_id.rb delete mode 100644 db/post_migrate/20230130103957_add_fk_index_to_ci_build_needs_on_partition_id_and_build_id.rb delete mode 100644 db/post_migrate/20230130103958_add_fk_to_ci_build_needs_on_partition_id_and_build_id.rb delete mode 100644 db/post_migrate/20230130202201_backfill_sent_notifications_for_bigint_conversion.rb delete mode 100644 db/post_migrate/20230131005411_backfill_notes_id_for_bigint_conversion.rb delete mode 100644 db/post_migrate/20230131194959_remove_invalid_deploy_access_level.rb delete mode 100644 db/post_migrate/20230131210921_prepare_index_for_vulnerability_reads_on_project_id_scanner_id_vulnerability_id.rb delete mode 100644 db/post_migrate/20230201012846_backfill_todos_note_id_for_bigint_conversion.rb delete mode 100644 db/post_migrate/20230201014238_backfill_system_note_metadata_note_id_for_bigint_conversion.rb delete mode 100644 db/post_migrate/20230201082038_drop_web_hook_calls_high_column.rb delete mode 100644 db/post_migrate/20230201152525_schedule_fk_index_to_ci_build_needs_on_partition_id_and_build_id.rb delete mode 100644 db/post_migrate/20230201153450_add_index_on_lfs_objects_file.rb delete mode 100644 db/post_migrate/20230201171450_finalize_backfill_environment_tier_migration.rb delete mode 100644 db/post_migrate/20230202002637_backfill_epic_user_mentions_note_id_for_bigint_conversion.rb delete mode 100644 db/post_migrate/20230202004247_add_index_on_merge_request_diffs_external_diff.rb delete mode 100644 db/post_migrate/20230202023224_backfill_suggestions_note_id_for_bigint_conversion.rb delete mode 100644 db/post_migrate/20230202032302_backfill_issue_user_mentions_note_id_for_bigint_conversion.rb delete mode 100644 db/post_migrate/20230202131928_encrypt_ci_trigger_token.rb delete mode 100644 db/post_migrate/20230203122602_schedule_vulnerabilities_feedback_migration3.rb delete mode 100644 db/post_migrate/20230203122609_change_pipeline_name_index.rb delete mode 100644 db/post_migrate/20230207003812_backfill_note_diff_files_diff_note_id_for_bigint_conversion.rb delete mode 100644 db/post_migrate/20230207005701_backfill_snippet_user_mentions_note_id_for_bigint_conversion.rb delete mode 100644 db/post_migrate/20230207011414_backfill_design_user_mentions_note_id_for_bigint_conversion.rb delete mode 100644 db/post_migrate/20230207012238_backfill_vulnerability_user_mentions_note_id_for_bigint_conversion.rb delete mode 100644 db/post_migrate/20230207015850_backfill_commit_user_mentions_note_id_for_bigint_conversion.rb delete mode 100644 db/post_migrate/20230207025315_backfill_merge_request_user_mentions_note_id_for_bigint_conversion.rb delete mode 100644 db/post_migrate/20230207030259_backfill_timelogs_note_id_for_bigint_conversion.rb delete mode 100644 db/post_migrate/20230207143602_schedule_fk_index_to_ci_build_trace_metadata_on_partition_id_and_build_id.rb delete mode 100644 db/post_migrate/20230207143844_schedule_fk_index_to_ci_job_artifacts_on_partition_id_and_job_id.rb delete mode 100644 db/post_migrate/20230208100917_fix_partition_ids_for_ci_pipeline_variable.rb delete mode 100644 db/post_migrate/20230208103009_fix_partition_ids_for_ci_job_artifact.rb delete mode 100644 db/post_migrate/20230208110638_cleanup_ci_runner_machines_machine_xid_rename.rb delete mode 100644 db/post_migrate/20230208131808_nullify_last_error_from_project_mirror_data.rb delete mode 100644 db/post_migrate/20230208132608_fix_partition_ids_for_ci_stage.rb delete mode 100644 db/post_migrate/20230209090702_fix_partition_ids_for_ci_build_report_result.rb delete mode 100644 db/post_migrate/20230209092204_fix_partition_ids_for_ci_build_trace_metadata.rb delete mode 100644 db/post_migrate/20230209103650_add_unique_software_license_policies_index_on_project_and_scan_result_policy.rb delete mode 100644 db/post_migrate/20230209103714_add_fk_to_approval_rules_on_scan_result_policy_id.rb delete mode 100644 db/post_migrate/20230209123006_remove_unique_software_license_policies_index_on_project.rb delete mode 100644 db/post_migrate/20230209131808_recount_epic_cache_counts_v3.rb delete mode 100644 db/post_migrate/20230209140102_fix_partition_ids_for_ci_build_metadata.rb delete mode 100644 db/post_migrate/20230209171547_schedule_vulnerabilities_feedback_migration4.rb delete mode 100644 db/post_migrate/20230210113924_prepare_index_approval_rules_on_scan_result_policy_id.rb delete mode 100644 db/post_migrate/20230214122717_fix_partition_ids_for_ci_job_variables.rb delete mode 100644 db/post_migrate/20230214154101_fix_partition_ids_on_ci_sources_pipelines.rb delete mode 100644 db/post_migrate/20230214174335_prepare_async_index_web_hook_logs.rb delete mode 100644 db/post_migrate/20230216035802_prepare_async_foreign_key_validation_for_ci_build_needs.rb delete mode 100644 db/post_migrate/20230216052103_prepare_async_foreign_key_validation_for_ci_build_report_results.rb delete mode 100644 db/post_migrate/20230216054348_prepare_async_foreign_key_validation_for_ci_job_artifacts.rb delete mode 100644 db/schema_migrations/20220824082427 delete mode 100644 db/schema_migrations/20220826152430 delete mode 100644 db/schema_migrations/20220826152432 delete mode 100644 db/schema_migrations/20220908150054 delete mode 100644 db/schema_migrations/20220920180451 delete mode 100644 db/schema_migrations/20221010191136 delete mode 100644 db/schema_migrations/20221018095434 delete mode 100644 db/schema_migrations/20221026095133 delete mode 100644 db/schema_migrations/20221101174816 delete mode 100644 db/schema_migrations/20221101194416 delete mode 100644 db/schema_migrations/20221101195309 delete mode 100644 db/schema_migrations/20221101195543 delete mode 100644 db/schema_migrations/20221102150737 delete mode 100644 db/schema_migrations/20221102195642 delete mode 100644 db/schema_migrations/20221102231130 delete mode 100644 db/schema_migrations/20221102231131 delete mode 100644 db/schema_migrations/20221103205317 delete mode 100644 db/schema_migrations/20221104115712 delete mode 100644 db/schema_migrations/20221104141647 delete mode 100644 db/schema_migrations/20221107013943 delete mode 100644 db/schema_migrations/20221109160052 delete mode 100644 db/schema_migrations/20221110080508 delete mode 100644 db/schema_migrations/20221110080636 delete mode 100644 db/schema_migrations/20221110080748 delete mode 100644 db/schema_migrations/20221110080822 delete mode 100644 db/schema_migrations/20221110080913 delete mode 100644 db/schema_migrations/20221110080956 delete mode 100644 db/schema_migrations/20221110081037 delete mode 100644 db/schema_migrations/20221110081115 delete mode 100644 db/schema_migrations/20221110081207 delete mode 100644 db/schema_migrations/20221110081348 delete mode 100644 db/schema_migrations/20221110081448 delete mode 100644 db/schema_migrations/20221110100600 delete mode 100644 db/schema_migrations/20221110100602 delete mode 100644 db/schema_migrations/20221110152133 delete mode 100644 db/schema_migrations/20221110183103 delete mode 100644 db/schema_migrations/20221110190340 delete mode 100644 db/schema_migrations/20221111123146 delete mode 100644 db/schema_migrations/20221111123147 delete mode 100644 db/schema_migrations/20221111123148 delete mode 100644 db/schema_migrations/20221111135238 delete mode 100644 db/schema_migrations/20221111142921 delete mode 100644 db/schema_migrations/20221114131943 delete mode 100644 db/schema_migrations/20221114142044 delete mode 100644 db/schema_migrations/20221114142602 delete mode 100644 db/schema_migrations/20221114142616 delete mode 100644 db/schema_migrations/20221114145103 delete mode 100644 db/schema_migrations/20221114212908 delete mode 100644 db/schema_migrations/20221115085813 delete mode 100644 db/schema_migrations/20221115120602 delete mode 100644 db/schema_migrations/20221115173607 delete mode 100644 db/schema_migrations/20221115184525 delete mode 100644 db/schema_migrations/20221116100056 delete mode 100644 db/schema_migrations/20221116105434 delete mode 100644 db/schema_migrations/20221116113323 delete mode 100644 db/schema_migrations/20221116124821 delete mode 100644 db/schema_migrations/20221116134507 delete mode 100644 db/schema_migrations/20221116134539 delete mode 100644 db/schema_migrations/20221116134611 delete mode 100644 db/schema_migrations/20221116134633 delete mode 100644 db/schema_migrations/20221116143854 delete mode 100644 db/schema_migrations/20221116160204 delete mode 100644 db/schema_migrations/20221116161126 delete mode 100644 db/schema_migrations/20221117103015 delete mode 100644 db/schema_migrations/20221117135032 delete mode 100644 db/schema_migrations/20221117153015 delete mode 100644 db/schema_migrations/20221118103152 delete mode 100644 db/schema_migrations/20221118103352 delete mode 100644 db/schema_migrations/20221118103752 delete mode 100644 db/schema_migrations/20221118104752 delete mode 100644 db/schema_migrations/20221121000127 delete mode 100644 db/schema_migrations/20221121000451 delete mode 100644 db/schema_migrations/20221121091238 delete mode 100644 db/schema_migrations/20221121100431 delete mode 100644 db/schema_migrations/20221121152048 delete mode 100644 db/schema_migrations/20221121152515 delete mode 100644 db/schema_migrations/20221121155850 delete mode 100644 db/schema_migrations/20221121180138 delete mode 100644 db/schema_migrations/20221121181627 delete mode 100644 db/schema_migrations/20221121184931 delete mode 100644 db/schema_migrations/20221122063922 delete mode 100644 db/schema_migrations/20221122064537 delete mode 100644 db/schema_migrations/20221122132812 delete mode 100644 db/schema_migrations/20221122141046 delete mode 100644 db/schema_migrations/20221122155149 delete mode 100644 db/schema_migrations/20221122210711 delete mode 100644 db/schema_migrations/20221122225925 delete mode 100644 db/schema_migrations/20221123133054 delete mode 100644 db/schema_migrations/20221124113925 delete mode 100644 db/schema_migrations/20221124153602 delete mode 100644 db/schema_migrations/20221125222221 delete mode 100644 db/schema_migrations/20221125222341 delete mode 100644 db/schema_migrations/20221128120634 delete mode 100644 db/schema_migrations/20221128123514 delete mode 100644 db/schema_migrations/20221128155738 delete mode 100644 db/schema_migrations/20221128165833 delete mode 100644 db/schema_migrations/20221128220043 delete mode 100644 db/schema_migrations/20221128222417 delete mode 100644 db/schema_migrations/20221129124240 delete mode 100644 db/schema_migrations/20221129192619 delete mode 100644 db/schema_migrations/20221130170433 delete mode 100644 db/schema_migrations/20221130182056 delete mode 100644 db/schema_migrations/20221130192239 delete mode 100644 db/schema_migrations/20221202031332 delete mode 100644 db/schema_migrations/20221202031417 delete mode 100644 db/schema_migrations/20221202144210 delete mode 100644 db/schema_migrations/20221202154128 delete mode 100644 db/schema_migrations/20221202154151 delete mode 100644 db/schema_migrations/20221202202351 delete mode 100644 db/schema_migrations/20221204090437 delete mode 100644 db/schema_migrations/20221205061134 delete mode 100644 db/schema_migrations/20221205134448 delete mode 100644 db/schema_migrations/20221205151917 delete mode 100644 db/schema_migrations/20221205170310 delete mode 100644 db/schema_migrations/20221206012013 delete mode 100644 db/schema_migrations/20221206075631 delete mode 100644 db/schema_migrations/20221206132610 delete mode 100644 db/schema_migrations/20221206163420 delete mode 100644 db/schema_migrations/20221206173132 delete mode 100644 db/schema_migrations/20221206211814 delete mode 100644 db/schema_migrations/20221206222032 delete mode 100644 db/schema_migrations/20221206235208 delete mode 100644 db/schema_migrations/20221207140259 delete mode 100644 db/schema_migrations/20221207220120 delete mode 100644 db/schema_migrations/20221208122921 delete mode 100644 db/schema_migrations/20221209110934 delete mode 100644 db/schema_migrations/20221209110935 delete mode 100644 db/schema_migrations/20221209174132 delete mode 100644 db/schema_migrations/20221209174157 delete mode 100644 db/schema_migrations/20221209235939 delete mode 100644 db/schema_migrations/20221209235940 delete mode 100644 db/schema_migrations/20221210154044 delete mode 100644 db/schema_migrations/20221212054640 delete mode 100644 db/schema_migrations/20221212103743 delete mode 100644 db/schema_migrations/20221212192452 delete mode 100644 db/schema_migrations/20221212192527 delete mode 100644 db/schema_migrations/20221213064717 delete mode 100644 db/schema_migrations/20221213105028 delete mode 100644 db/schema_migrations/20221213184314 delete mode 100644 db/schema_migrations/20221214095129 delete mode 100644 db/schema_migrations/20221214105307 delete mode 100644 db/schema_migrations/20221214201256 delete mode 100644 db/schema_migrations/20221214204247 delete mode 100644 db/schema_migrations/20221215151822 delete mode 100644 db/schema_migrations/20221215210347 delete mode 100644 db/schema_migrations/20221216131710 delete mode 100644 db/schema_migrations/20221216131935 delete mode 100644 db/schema_migrations/20221216131958 delete mode 100644 db/schema_migrations/20221216144854 delete mode 100644 db/schema_migrations/20221216145659 delete mode 100644 db/schema_migrations/20221216150304 delete mode 100644 db/schema_migrations/20221216150321 delete mode 100644 db/schema_migrations/20221216150919 delete mode 100644 db/schema_migrations/20221216151459 delete mode 100644 db/schema_migrations/20221216151649 delete mode 100644 db/schema_migrations/20221216232658 delete mode 100644 db/schema_migrations/20221216232659 delete mode 100644 db/schema_migrations/20221219103007 delete mode 100644 db/schema_migrations/20221219112528 delete mode 100644 db/schema_migrations/20221219112632 delete mode 100644 db/schema_migrations/20221219122320 delete mode 100644 db/schema_migrations/20221219135535 delete mode 100644 db/schema_migrations/20221220075936 delete mode 100644 db/schema_migrations/20221220131020 delete mode 100644 db/schema_migrations/20221221110733 delete mode 100644 db/schema_migrations/20221221134116 delete mode 100644 db/schema_migrations/20221221150123 delete mode 100644 db/schema_migrations/20221221171239 delete mode 100644 db/schema_migrations/20221222092958 delete mode 100644 db/schema_migrations/20221222144954 delete mode 100644 db/schema_migrations/20221223114543 delete mode 100644 db/schema_migrations/20221223123019 delete mode 100644 db/schema_migrations/20221226105323 delete mode 100644 db/schema_migrations/20221226132038 delete mode 100644 db/schema_migrations/20221226153240 delete mode 100644 db/schema_migrations/20221226154458 delete mode 100644 db/schema_migrations/20221226163203 delete mode 100644 db/schema_migrations/20221227080606 delete mode 100644 db/schema_migrations/20221227100751 delete mode 100644 db/schema_migrations/20221227100846 delete mode 100644 db/schema_migrations/20221227100908 delete mode 100644 db/schema_migrations/20221227101436 delete mode 100644 db/schema_migrations/20221228063845 delete mode 100644 db/schema_migrations/20221228072549 delete mode 100644 db/schema_migrations/20221228073206 delete mode 100644 db/schema_migrations/20221228083452 delete mode 100644 db/schema_migrations/20221228103133 delete mode 100644 db/schema_migrations/20221228161214 delete mode 100644 db/schema_migrations/20221228163035 delete mode 100644 db/schema_migrations/20221228210616 delete mode 100644 db/schema_migrations/20221229064959 delete mode 100644 db/schema_migrations/20230102131000 delete mode 100644 db/schema_migrations/20230102131050 delete mode 100644 db/schema_migrations/20230102131100 delete mode 100644 db/schema_migrations/20230102180341 delete mode 100644 db/schema_migrations/20230104103748 delete mode 100644 db/schema_migrations/20230104150600 delete mode 100644 db/schema_migrations/20230104150601 delete mode 100644 db/schema_migrations/20230104201524 delete mode 100644 db/schema_migrations/20230104220137 delete mode 100644 db/schema_migrations/20230104222438 delete mode 100644 db/schema_migrations/20230104222514 delete mode 100644 db/schema_migrations/20230104224020 delete mode 100644 db/schema_migrations/20230105170414 delete mode 100644 db/schema_migrations/20230105172120 delete mode 100644 db/schema_migrations/20230105180002 delete mode 100644 db/schema_migrations/20230106014423 delete mode 100644 db/schema_migrations/20230106124332 delete mode 100644 db/schema_migrations/20230106125945 delete mode 100644 db/schema_migrations/20230106131659 delete mode 100644 db/schema_migrations/20230106142239 delete mode 100644 db/schema_migrations/20230106184809 delete mode 100644 db/schema_migrations/20230107125328 delete mode 100644 db/schema_migrations/20230109093043 delete mode 100644 db/schema_migrations/20230109095159 delete mode 100644 db/schema_migrations/20230109095622 delete mode 100644 db/schema_migrations/20230109100044 delete mode 100644 db/schema_migrations/20230109121313 delete mode 100644 db/schema_migrations/20230109144915 delete mode 100644 db/schema_migrations/20230109144928 delete mode 100644 db/schema_migrations/20230109144941 delete mode 100644 db/schema_migrations/20230109144953 delete mode 100644 db/schema_migrations/20230109145005 delete mode 100644 db/schema_migrations/20230109145018 delete mode 100644 db/schema_migrations/20230109215921 delete mode 100644 db/schema_migrations/20230109232316 delete mode 100644 db/schema_migrations/20230110031131 delete mode 100644 db/schema_migrations/20230110172751 delete mode 100644 db/schema_migrations/20230110212906 delete mode 100644 db/schema_migrations/20230111092510 delete mode 100644 db/schema_migrations/20230111124512 delete mode 100644 db/schema_migrations/20230111125148 delete mode 100644 db/schema_migrations/20230111125150 delete mode 100644 db/schema_migrations/20230111132621 delete mode 100644 db/schema_migrations/20230111171355 delete mode 100644 db/schema_migrations/20230111174113 delete mode 100644 db/schema_migrations/20230112014822 delete mode 100644 db/schema_migrations/20230112051854 delete mode 100644 db/schema_migrations/20230112085143 delete mode 100644 db/schema_migrations/20230112104253 delete mode 100644 db/schema_migrations/20230112104526 delete mode 100644 db/schema_migrations/20230112104636 delete mode 100644 db/schema_migrations/20230112141236 delete mode 100644 db/schema_migrations/20230112144946 delete mode 100644 db/schema_migrations/20230112145326 delete mode 100644 db/schema_migrations/20230113003255 delete mode 100644 db/schema_migrations/20230113195141 delete mode 100644 db/schema_migrations/20230116083826 delete mode 100644 db/schema_migrations/20230116090630 delete mode 100644 db/schema_migrations/20230116090852 delete mode 100644 db/schema_migrations/20230116090920 delete mode 100644 db/schema_migrations/20230116091626 delete mode 100644 db/schema_migrations/20230116111252 delete mode 100644 db/schema_migrations/20230116143310 delete mode 100644 db/schema_migrations/20230116143311 delete mode 100644 db/schema_migrations/20230116143312 delete mode 100644 db/schema_migrations/20230116160904 delete mode 100644 db/schema_migrations/20230117092947 delete mode 100644 db/schema_migrations/20230117093222 delete mode 100644 db/schema_migrations/20230117093736 delete mode 100644 db/schema_migrations/20230117093924 delete mode 100644 db/schema_migrations/20230117094111 delete mode 100644 db/schema_migrations/20230117094226 delete mode 100644 db/schema_migrations/20230117094316 delete mode 100644 db/schema_migrations/20230117113719 delete mode 100644 db/schema_migrations/20230117114739 delete mode 100644 db/schema_migrations/20230117145628 delete mode 100644 db/schema_migrations/20230117173433 delete mode 100644 db/schema_migrations/20230118083437 delete mode 100644 db/schema_migrations/20230118083632 delete mode 100644 db/schema_migrations/20230118083748 delete mode 100644 db/schema_migrations/20230119085509 delete mode 100644 db/schema_migrations/20230119085552 delete mode 100644 db/schema_migrations/20230119090944 delete mode 100644 db/schema_migrations/20230119091027 delete mode 100644 db/schema_migrations/20230119095022 delete mode 100644 db/schema_migrations/20230119095023 delete mode 100644 db/schema_migrations/20230119095024 delete mode 100644 db/schema_migrations/20230119095025 delete mode 100644 db/schema_migrations/20230119123256 delete mode 100644 db/schema_migrations/20230119123257 delete mode 100644 db/schema_migrations/20230119123258 delete mode 100644 db/schema_migrations/20230119123259 delete mode 100644 db/schema_migrations/20230119123908 delete mode 100644 db/schema_migrations/20230119123937 delete mode 100644 db/schema_migrations/20230119150727 delete mode 100644 db/schema_migrations/20230119151636 delete mode 100644 db/schema_migrations/20230119151940 delete mode 100644 db/schema_migrations/20230119214643 delete mode 100644 db/schema_migrations/20230119215436 delete mode 100644 db/schema_migrations/20230120170042 delete mode 100644 db/schema_migrations/20230120170631 delete mode 100644 db/schema_migrations/20230120171818 delete mode 100644 db/schema_migrations/20230123095022 delete mode 100644 db/schema_migrations/20230123095023 delete mode 100644 db/schema_migrations/20230123120004 delete mode 100644 db/schema_migrations/20230123150648 delete mode 100644 db/schema_migrations/20230124101832 delete mode 100644 db/schema_migrations/20230124102131 delete mode 100644 db/schema_migrations/20230124102222 delete mode 100644 db/schema_migrations/20230124104310 delete mode 100644 db/schema_migrations/20230124122143 delete mode 100644 db/schema_migrations/20230124173255 delete mode 100644 db/schema_migrations/20230124183643 delete mode 100644 db/schema_migrations/20230124193917 delete mode 100644 db/schema_migrations/20230125090315 delete mode 100644 db/schema_migrations/20230125093723 delete mode 100644 db/schema_migrations/20230125093840 delete mode 100644 db/schema_migrations/20230126023444 delete mode 100644 db/schema_migrations/20230126091522 delete mode 100644 db/schema_migrations/20230126110439 delete mode 100644 db/schema_migrations/20230126133531 delete mode 100644 db/schema_migrations/20230126151622 delete mode 100644 db/schema_migrations/20230126210436 delete mode 100644 db/schema_migrations/20230127093353 delete mode 100644 db/schema_migrations/20230127101834 delete mode 100644 db/schema_migrations/20230127115607 delete mode 100644 db/schema_migrations/20230127121107 delete mode 100644 db/schema_migrations/20230127121443 delete mode 100644 db/schema_migrations/20230127123947 delete mode 100644 db/schema_migrations/20230127123948 delete mode 100644 db/schema_migrations/20230127125018 delete mode 100644 db/schema_migrations/20230127131835 delete mode 100644 db/schema_migrations/20230127131915 delete mode 100644 db/schema_migrations/20230127151529 delete mode 100644 db/schema_migrations/20230127151530 delete mode 100644 db/schema_migrations/20230127151531 delete mode 100644 db/schema_migrations/20230127151606 delete mode 100644 db/schema_migrations/20230127151607 delete mode 100644 db/schema_migrations/20230127152727 delete mode 100644 db/schema_migrations/20230127152728 delete mode 100644 db/schema_migrations/20230127153229 delete mode 100644 db/schema_migrations/20230127153230 delete mode 100644 db/schema_migrations/20230127155217 delete mode 100644 db/schema_migrations/20230127164007 delete mode 100644 db/schema_migrations/20230129094140 delete mode 100644 db/schema_migrations/20230129154126 delete mode 100644 db/schema_migrations/20230129154202 delete mode 100644 db/schema_migrations/20230129154819 delete mode 100644 db/schema_migrations/20230130070623 delete mode 100644 db/schema_migrations/20230130073109 delete mode 100644 db/schema_migrations/20230130075434 delete mode 100644 db/schema_migrations/20230130084718 delete mode 100644 db/schema_migrations/20230130102855 delete mode 100644 db/schema_migrations/20230130102856 delete mode 100644 db/schema_migrations/20230130103957 delete mode 100644 db/schema_migrations/20230130103958 delete mode 100644 db/schema_migrations/20230130104819 delete mode 100644 db/schema_migrations/20230130110855 delete mode 100644 db/schema_migrations/20230130125541 delete mode 100644 db/schema_migrations/20230130130624 delete mode 100644 db/schema_migrations/20230130175512 delete mode 100644 db/schema_migrations/20230130202201 delete mode 100644 db/schema_migrations/20230130204743 delete mode 100644 db/schema_migrations/20230131004948 delete mode 100644 db/schema_migrations/20230131005411 delete mode 100644 db/schema_migrations/20230131090842 delete mode 100644 db/schema_migrations/20230131123923 delete mode 100644 db/schema_migrations/20230131125844 delete mode 100644 db/schema_migrations/20230131194959 delete mode 100644 db/schema_migrations/20230131210921 delete mode 100644 db/schema_migrations/20230201012727 delete mode 100644 db/schema_migrations/20230201012846 delete mode 100644 db/schema_migrations/20230201014223 delete mode 100644 db/schema_migrations/20230201014238 delete mode 100644 db/schema_migrations/20230201082038 delete mode 100644 db/schema_migrations/20230201152525 delete mode 100644 db/schema_migrations/20230201153450 delete mode 100644 db/schema_migrations/20230201171450 delete mode 100644 db/schema_migrations/20230202002616 delete mode 100644 db/schema_migrations/20230202002637 delete mode 100644 db/schema_migrations/20230202004247 delete mode 100644 db/schema_migrations/20230202023208 delete mode 100644 db/schema_migrations/20230202023224 delete mode 100644 db/schema_migrations/20230202032248 delete mode 100644 db/schema_migrations/20230202032302 delete mode 100644 db/schema_migrations/20230202131928 delete mode 100644 db/schema_migrations/20230202153926 delete mode 100644 db/schema_migrations/20230203011359 delete mode 100644 db/schema_migrations/20230203122602 delete mode 100644 db/schema_migrations/20230203122609 delete mode 100644 db/schema_migrations/20230203145514 delete mode 100644 db/schema_migrations/20230206143851 delete mode 100644 db/schema_migrations/20230206172702 delete mode 100644 db/schema_migrations/20230207003737 delete mode 100644 db/schema_migrations/20230207003812 delete mode 100644 db/schema_migrations/20230207005549 delete mode 100644 db/schema_migrations/20230207005701 delete mode 100644 db/schema_migrations/20230207011344 delete mode 100644 db/schema_migrations/20230207011414 delete mode 100644 db/schema_migrations/20230207012217 delete mode 100644 db/schema_migrations/20230207012238 delete mode 100644 db/schema_migrations/20230207015819 delete mode 100644 db/schema_migrations/20230207015850 delete mode 100644 db/schema_migrations/20230207025259 delete mode 100644 db/schema_migrations/20230207025315 delete mode 100644 db/schema_migrations/20230207030244 delete mode 100644 db/schema_migrations/20230207030259 delete mode 100644 db/schema_migrations/20230207143602 delete mode 100644 db/schema_migrations/20230207143844 delete mode 100644 db/schema_migrations/20230208100917 delete mode 100644 db/schema_migrations/20230208103009 delete mode 100644 db/schema_migrations/20230208103640 delete mode 100644 db/schema_migrations/20230208110638 delete mode 100644 db/schema_migrations/20230208131808 delete mode 100644 db/schema_migrations/20230208132608 delete mode 100644 db/schema_migrations/20230209090702 delete mode 100644 db/schema_migrations/20230209092204 delete mode 100644 db/schema_migrations/20230209103650 delete mode 100644 db/schema_migrations/20230209103714 delete mode 100644 db/schema_migrations/20230209123006 delete mode 100644 db/schema_migrations/20230209131808 delete mode 100644 db/schema_migrations/20230209140102 delete mode 100644 db/schema_migrations/20230209171547 delete mode 100644 db/schema_migrations/20230210113924 delete mode 100644 db/schema_migrations/20230210181214 delete mode 100644 db/schema_migrations/20230214122717 delete mode 100644 db/schema_migrations/20230214142447 delete mode 100644 db/schema_migrations/20230214142813 delete mode 100644 db/schema_migrations/20230214154101 delete mode 100644 db/schema_migrations/20230214174335 delete mode 100644 db/schema_migrations/20230216035802 delete mode 100644 db/schema_migrations/20230216052103 delete mode 100644 db/schema_migrations/20230216054348 delete mode 100644 ee/spec/migrations/20221130192239_fix_approval_project_rules_without_protected_branches_spec.rb delete mode 100644 ee/spec/migrations/20230127155217_add_id_column_to_package_metadata_join_table_spec.rb rename db/migrate/20221122210711_add_columns_to_postgres_foreign_keys.rb => spec/fixtures/migrations/db/migrate/schema_cache_migration_test.rb (97%) delete mode 100644 spec/lib/gitlab/background_migration/backfill_imported_issue_search_data_spec.rb delete mode 100644 spec/lib/gitlab/background_migration/backfill_project_namespace_on_issues_spec.rb delete mode 100644 spec/lib/gitlab/background_migration/backfill_user_details_fields_spec.rb delete mode 100644 spec/lib/gitlab/background_migration/backfill_work_item_type_id_for_issues_spec.rb delete mode 100644 spec/lib/gitlab/background_migration/disable_legacy_open_source_license_for_no_issues_no_repo_projects_spec.rb delete mode 100644 spec/lib/gitlab/background_migration/expire_o_auth_tokens_spec.rb delete mode 100644 spec/lib/gitlab/background_migration/remove_project_group_link_with_missing_groups_spec.rb delete mode 100644 spec/migrations/20221018095434_schedule_disable_legacy_open_source_license_for_projects_less_than_five_mb_spec.rb delete mode 100644 spec/migrations/20221102231130_finalize_backfill_user_details_fields_spec.rb delete mode 100644 spec/migrations/20221104115712_backfill_project_statistics_storage_size_without_uploads_size_spec.rb delete mode 100644 spec/migrations/20221110152133_delete_orphans_approval_rules_spec.rb delete mode 100644 spec/migrations/20221115173607_ensure_work_item_type_backfill_migration_finished_spec.rb delete mode 100644 spec/migrations/20221122132812_schedule_prune_stale_project_export_jobs_spec.rb delete mode 100644 spec/migrations/20221123133054_queue_reset_status_on_container_repositories_spec.rb delete mode 100644 spec/migrations/20221205151917_schedule_backfill_environment_tier_spec.rb delete mode 100644 spec/migrations/20221209110934_update_import_sources_on_application_settings_spec.rb delete mode 100644 spec/migrations/20221209110935_fix_update_import_sources_on_application_settings_spec.rb delete mode 100644 spec/migrations/20221209235940_cleanup_o_auth_access_tokens_with_null_expires_in_spec.rb delete mode 100644 spec/migrations/20221210154044_update_active_billable_users_index_spec.rb delete mode 100644 spec/migrations/20221215151822_schedule_backfill_releases_author_id_spec.rb delete mode 100644 spec/migrations/20221219122320_copy_clickhouse_connection_string_to_encrypted_var_spec.rb delete mode 100644 spec/migrations/20221220131020_bump_default_partition_id_value_for_ci_tables_spec.rb delete mode 100644 spec/migrations/20221221110733_remove_temp_index_for_project_statistics_upload_size_migration_spec.rb delete mode 100644 spec/migrations/20221222092958_sync_new_amount_used_with_amount_used_spec.rb delete mode 100644 spec/migrations/20221223123019_delete_queued_jobs_for_vulnerabilities_feedback_migration_spec.rb delete mode 100644 spec/migrations/20221226153252_queue_fix_incoherent_packages_size_on_project_statistics_spec.rb delete mode 100644 spec/migrations/20230105172120_sync_new_amount_used_with_amount_used_on_ci_namespace_monthly_usages_table_spec.rb delete mode 100644 spec/migrations/20230116111252_finalize_todo_sanitization_spec.rb delete mode 100644 spec/migrations/20230117114739_clear_duplicate_jobs_cookies_spec.rb delete mode 100644 spec/migrations/20230130073109_nullify_creator_id_of_orphaned_projects_spec.rb delete mode 100644 spec/migrations/20230131125844_add_project_id_name_id_version_index_to_installable_npm_packages_spec.rb delete mode 100644 spec/migrations/20230201171450_finalize_backfill_environment_tier_migration_spec.rb delete mode 100644 spec/migrations/20230202131928_encrypt_ci_trigger_token_spec.rb delete mode 100644 spec/migrations/20230203122602_schedule_vulnerabilities_feedback_migration4_spec.rb delete mode 100644 spec/migrations/add_namespaces_emails_enabled_column_data_spec.rb delete mode 100644 spec/migrations/add_okr_hierarchy_restrictions_spec.rb delete mode 100644 spec/migrations/add_projects_emails_enabled_column_data_spec.rb delete mode 100644 spec/migrations/finalize_issues_namespace_id_backfilling_spec.rb delete mode 100644 spec/migrations/nullify_last_error_from_project_mirror_data_spec.rb delete mode 100644 spec/migrations/recount_epic_cache_counts_v3_spec.rb delete mode 100644 spec/migrations/remove_flowdock_integration_records_spec.rb delete mode 100644 spec/migrations/schedule_fixing_security_scan_statuses_spec.rb delete mode 100644 spec/migrations/second_recount_epic_cache_counts_spec.rb delete mode 100644 spec/migrations/set_email_confirmation_setting_before_removing_send_user_confirmation_email_column_spec.rb diff --git a/.gitlab/ci/database.gitlab-ci.yml b/.gitlab/ci/database.gitlab-ci.yml index b01ba247ce7cf..f1fd06691f515 100644 --- a/.gitlab/ci/database.gitlab-ci.yml +++ b/.gitlab/ci/database.gitlab-ci.yml @@ -36,7 +36,7 @@ db:rollback: - .db-job-base - .rails:rules:db-rollback script: - - bundle exec rake db:migrate VERSION=20221111123146 # 15.7 + - bundle exec rake db:migrate VERSION=20230216060333 # 16.0 First migration - bundle exec rake db:migrate db:rollback single-db: diff --git a/.rubocop_todo/layout/argument_alignment.yml b/.rubocop_todo/layout/argument_alignment.yml index a0ae27f77b2b5..cf490823f76b5 100644 --- a/.rubocop_todo/layout/argument_alignment.yml +++ b/.rubocop_todo/layout/argument_alignment.yml @@ -508,40 +508,6 @@ Layout/ArgumentAlignment: - 'config/initializers/rack_timeout.rb' - 'config/initializers/rest-client-hostname_override.rb' - 'config/initializers/zz_metrics.rb' - - 'db/migrate/20220824082427_remove_tmp_idx_vulnerability_occurrences_on_id_and_scanner_id.rb' - - 'db/migrate/20221103205317_create_dast_pre_scan_verification.rb' - - 'db/migrate/20221111142921_add_hierarchy_restrictions.rb' - - 'db/migrate/20221116160204_create_ml_experiment_metadata_and_ml_candidate_metadata.rb' - - 'db/migrate/20221121091238_add_work_item_progress.rb' - - 'db/migrate/20221130170433_create_dast_pre_scan_verification_step.rb' - - 'db/migrate/20221202144210_create_achievements.rb' - - 'db/migrate/20221207220120_create_dast_scanner_profiles_runner_tags.rb' - - 'db/migrate/20221214201256_create_user_achievements.rb' - - 'db/migrate/20221221134116_create_elastic_group_index_statuses.rb' - - 'db/migrate/20221222144954_create_analytics_dashboards_configuration_pointers.rb' - - 'db/migrate/20230106184809_create_dast_profiles_tags.rb' - - 'db/migrate/20230109093043_create_namespaces_storage_limit_exclusions.rb' - - 'db/migrate/20230109121313_add_runner_machines_contacted_at_index.rb' - - 'db/migrate/20230117173433_create_project_data_transfer.rb' - - 'db/migrate/20230123095022_create_scan_result_policies.rb' - - 'db/migrate/20230124193917_add_index_for_protected_tag_create_access_levels.rb' - - 'db/migrate/20230127151529_add_project_pointer_for_analytics_dashboard.rb' - - 'db/migrate/20230127151531_change_dashboard_analytics_project_pointer_project_null.rb' - - 'db/post_migrate/20220826152430_remove_container_repository_deprecated_geo_fields.rb' - - 'db/post_migrate/20220826152432_remove_container_repository_updated_events.rb' - - 'db/post_migrate/20221110190340_add_partial_legacy_open_source_license_available_project_id_index.rb' - - 'db/post_migrate/20221114142044_delete_experiments_foreign_keys.rb' - - 'db/post_migrate/20221116105434_remove_index_project_settings_on_legacy_open_source_license_available.rb' - - 'db/post_migrate/20221205170310_add_index_for_active_members.rb' - - 'db/post_migrate/20230104103748_remove_new_amount_used_column.rb' - - 'db/post_migrate/20230104150601_prepare_builds_metadata_async_idx.rb' - - 'db/post_migrate/20230104222514_add_foreign_key_to_builds_metadata.rb' - - 'db/post_migrate/20230104224020_drop_vuln_reads_on_default_branch_index.rb' - - 'db/post_migrate/20230105180002_remove_new_amount_used_column_on_ci_namespace_monthly_usages.rb' - - 'db/post_migrate/20230119123908_add_temporary_size_index_to_package_files.rb' - - 'db/post_migrate/20230123095023_add_scan_result_policy_id_to_software_license_policies.rb' - - 'db/post_migrate/20230124104310_prepare_web_hook_logs_id_created_at_async_index.rb' - - 'db/post_migrate/20230130070623_add_index_on_packages_package_file_file_name.rb' - 'ee/app/components/namespaces/free_user_cap/base_alert_component.rb' - 'ee/app/components/namespaces/free_user_cap/enforcement_at_limit_alert_component.rb' - 'ee/app/graphql/ee/mutations/alert_management/http_integration/create.rb' diff --git a/.rubocop_todo/layout/empty_line_after_magic_comment.yml b/.rubocop_todo/layout/empty_line_after_magic_comment.yml index 3d6266a74389f..1467f835e3f26 100644 --- a/.rubocop_todo/layout/empty_line_after_magic_comment.yml +++ b/.rubocop_todo/layout/empty_line_after_magic_comment.yml @@ -127,16 +127,6 @@ Layout/EmptyLineAfterMagicComment: - 'danger/ce_ee_vue_templates/Dangerfile' - 'danger/feature_flag/Dangerfile' - 'danger/pajamas/Dangerfile' - - 'db/migrate/20221116134507_add_projects_emails_enabled_column.rb' - - 'db/migrate/20221116134539_add_namespaces_emails_enabled_column.rb' - - 'db/migrate/20221202202351_remove_index_i_ci_job_token_project_scope_links_on_source_and_target_project.rb' - - 'db/migrate/20221216145659_add_pa_clickhouse_connection_string_to_application_settings.rb' - - 'db/migrate/20221219103007_add_name_to_ml_candidates.rb' - - 'db/migrate/20221219122320_copy_clickhouse_connection_string_to_encrypted_var.rb' - - 'db/migrate/20230111124512_remove_tmp_index_vulns_on_report_type.rb' - - 'db/post_migrate/20221116134611_add_namespaces_emails_enabled_column_data.rb' - - 'db/post_migrate/20221116134633_add_projects_emails_enabled_column_data.rb' - - 'db/post_migrate/20221210154044_update_active_billable_users_index.rb' - 'ee/app/controllers/concerns/epics_actions.rb' - 'ee/app/controllers/concerns/saml_authorization.rb' - 'ee/app/controllers/ee/projects/analytics/cycle_analytics/stages_controller.rb' diff --git a/.rubocop_todo/lint/redundant_cop_disable_directive.yml b/.rubocop_todo/lint/redundant_cop_disable_directive.yml index 38c75390cc838..f10700b8d81b6 100644 --- a/.rubocop_todo/lint/redundant_cop_disable_directive.yml +++ b/.rubocop_todo/lint/redundant_cop_disable_directive.yml @@ -76,9 +76,6 @@ Lint/RedundantCopDisableDirective: - 'config/initializers/wikicloth_redos_patch.rb' - 'config/initializers/wikicloth_ruby_3_patch.rb' - 'config/routes/api.rb' - - 'db/post_migrate/20221102231131_remove_temp_index_for_user_details_fields.rb' - - 'db/post_migrate/20230104103748_remove_new_amount_used_column.rb' - - 'db/post_migrate/20230105180002_remove_new_amount_used_column_on_ci_namespace_monthly_usages.rb' - 'ee/app/controllers/ee/admin/application_settings_controller.rb' - 'ee/app/controllers/ee/groups/group_members_controller.rb' - 'ee/app/controllers/ee/projects/settings/ci_cd_controller.rb' @@ -260,8 +257,6 @@ Lint/RedundantCopDisableDirective: - 'spec/lib/gitlab/sidekiq_middleware/server_metrics_spec.rb' - 'spec/lib/gitlab/sidekiq_middleware/size_limiter/server_spec.rb' - 'spec/metrics_server/metrics_server_spec.rb' - - 'spec/migrations/add_namespaces_emails_enabled_column_data_spec.rb' - - 'spec/migrations/add_projects_emails_enabled_column_data_spec.rb' - 'spec/models/ci/build_trace_chunk_spec.rb' - 'spec/models/ci/pipeline_spec.rb' - 'spec/models/concerns/encrypted_user_password_spec.rb' diff --git a/.rubocop_todo/rspec/context_wording.yml b/.rubocop_todo/rspec/context_wording.yml index 7859119eb608c..f35df67c4cc02 100644 --- a/.rubocop_todo/rspec/context_wording.yml +++ b/.rubocop_todo/rspec/context_wording.yml @@ -1568,7 +1568,6 @@ RSpec/ContextWording: - 'spec/lib/gitlab/auth_spec.rb' - 'spec/lib/gitlab/authorized_keys_spec.rb' - 'spec/lib/gitlab/avatar_cache_spec.rb' - - 'spec/lib/gitlab/background_migration/backfill_imported_issue_search_data_spec.rb' - 'spec/lib/gitlab/background_migration/copy_column_using_background_migration_job_spec.rb' - 'spec/lib/gitlab/blame_spec.rb' - 'spec/lib/gitlab/cache/ci/project_pipeline_status_spec.rb' diff --git a/.rubocop_todo/rspec/feature_category.yml b/.rubocop_todo/rspec/feature_category.yml index 26425c80da932..2b2054aed4cd3 100644 --- a/.rubocop_todo/rspec/feature_category.yml +++ b/.rubocop_todo/rspec/feature_category.yml @@ -2777,7 +2777,6 @@ RSpec/FeatureCategory: - 'spec/lib/gitlab/authorized_keys_spec.rb' - 'spec/lib/gitlab/avatar_cache_spec.rb' - 'spec/lib/gitlab/background_migration/backfill_cluster_agents_has_vulnerabilities_spec.rb' - - 'spec/lib/gitlab/background_migration/backfill_imported_issue_search_data_spec.rb' - 'spec/lib/gitlab/background_migration/backfill_integrations_enable_ssl_verification_spec.rb' - 'spec/lib/gitlab/background_migration/backfill_internal_on_notes_spec.rb' - 'spec/lib/gitlab/background_migration/backfill_namespace_details_spec.rb' @@ -2788,7 +2787,6 @@ RSpec/FeatureCategory: - 'spec/lib/gitlab/background_migration/backfill_project_namespace_details_spec.rb' - 'spec/lib/gitlab/background_migration/backfill_project_repositories_spec.rb' - 'spec/lib/gitlab/background_migration/backfill_topics_title_spec.rb' - - 'spec/lib/gitlab/background_migration/backfill_user_details_fields_spec.rb' - 'spec/lib/gitlab/background_migration/backfill_vulnerability_reads_cluster_agent_spec.rb' - 'spec/lib/gitlab/background_migration/base_job_spec.rb' - 'spec/lib/gitlab/background_migration/batching_strategies/backfill_project_statistics_with_container_registry_size_batching_strategy_spec.rb' @@ -2804,10 +2802,8 @@ RSpec/FeatureCategory: - 'spec/lib/gitlab/background_migration/destroy_invalid_members_spec.rb' - 'spec/lib/gitlab/background_migration/disable_legacy_open_source_licence_for_recent_public_projects_spec.rb' - 'spec/lib/gitlab/background_migration/disable_legacy_open_source_license_for_inactive_public_projects_spec.rb' - - 'spec/lib/gitlab/background_migration/disable_legacy_open_source_license_for_no_issues_no_repo_projects_spec.rb' - 'spec/lib/gitlab/background_migration/disable_legacy_open_source_license_for_one_member_no_repo_projects_spec.rb' - 'spec/lib/gitlab/background_migration/disable_legacy_open_source_license_for_projects_less_than_one_mb_spec.rb' - - 'spec/lib/gitlab/background_migration/expire_o_auth_tokens_spec.rb' - 'spec/lib/gitlab/background_migration/job_coordinator_spec.rb' - 'spec/lib/gitlab/background_migration/legacy_upload_mover_spec.rb' - 'spec/lib/gitlab/background_migration/legacy_uploads_migrator_spec.rb' diff --git a/.rubocop_todo/rspec/named_subject.yml b/.rubocop_todo/rspec/named_subject.yml index dd03eedb92320..2e0e343d868d9 100644 --- a/.rubocop_todo/rspec/named_subject.yml +++ b/.rubocop_todo/rspec/named_subject.yml @@ -1821,7 +1821,6 @@ RSpec/NamedSubject: - 'spec/lib/gitlab/background_migration/backfill_missing_ci_cd_settings_spec.rb' - 'spec/lib/gitlab/background_migration/backfill_project_repositories_spec.rb' - 'spec/lib/gitlab/background_migration/backfill_topics_title_spec.rb' - - 'spec/lib/gitlab/background_migration/backfill_user_details_fields_spec.rb' - 'spec/lib/gitlab/background_migration/delete_invalid_protected_branch_merge_access_levels_spec.rb' - 'spec/lib/gitlab/background_migration/delete_invalid_protected_branch_push_access_levels_spec.rb' - 'spec/lib/gitlab/background_migration/delete_invalid_protected_tag_create_access_levels_spec.rb' @@ -1835,7 +1834,6 @@ RSpec/NamedSubject: - 'spec/lib/gitlab/background_migration/populate_vulnerability_dismissal_fields_spec.rb' - 'spec/lib/gitlab/background_migration/redis/backfill_project_pipeline_status_ttl_spec.rb' - 'spec/lib/gitlab/background_migration/remove_backfilled_job_artifacts_expire_at_spec.rb' - - 'spec/lib/gitlab/background_migration/remove_project_group_link_with_missing_groups_spec.rb' - 'spec/lib/gitlab/background_migration/truncate_overlong_vulnerability_html_titles_spec.rb' - 'spec/lib/gitlab/background_migration/update_ci_pipeline_artifacts_unknown_locked_status_spec.rb' - 'spec/lib/gitlab/background_task_spec.rb' @@ -2562,8 +2560,6 @@ RSpec/NamedSubject: - 'spec/mailers/emails/merge_requests_spec.rb' - 'spec/mailers/notify_spec.rb' - 'spec/metrics_server/metrics_server_spec.rb' - - 'spec/migrations/20221210154044_update_active_billable_users_index_spec.rb' - - 'spec/migrations/20221221110733_remove_temp_index_for_project_statistics_upload_size_migration_spec.rb' - 'spec/migrations/20230714015909_add_index_for_member_expiring_query_spec.rb' - 'spec/migrations/drop_packages_events_table_spec.rb' - 'spec/models/ability_spec.rb' diff --git a/.rubocop_todo/rspec/scattered_let.yml b/.rubocop_todo/rspec/scattered_let.yml index f94aa2b8b00d3..c140bcba6fd14 100644 --- a/.rubocop_todo/rspec/scattered_let.yml +++ b/.rubocop_todo/rspec/scattered_let.yml @@ -120,7 +120,6 @@ RSpec/ScatteredLet: - 'spec/lib/gitlab/asciidoc/include_processor_spec.rb' - 'spec/lib/gitlab/auth/ldap/person_spec.rb' - 'spec/lib/gitlab/auth/saml/auth_hash_spec.rb' - - 'spec/lib/gitlab/background_migration/backfill_imported_issue_search_data_spec.rb' - 'spec/lib/gitlab/background_migration/disable_legacy_open_source_license_for_inactive_public_projects_spec.rb' - 'spec/lib/gitlab/background_migration/legacy_uploads_migrator_spec.rb' - 'spec/lib/gitlab/background_migration/reset_too_many_tags_skipped_registry_imports_spec.rb' diff --git a/.rubocop_todo/style/inline_disable_annotation.yml b/.rubocop_todo/style/inline_disable_annotation.yml index 6c2c802d51683..f6d56b477b73d 100644 --- a/.rubocop_todo/style/inline_disable_annotation.yml +++ b/.rubocop_todo/style/inline_disable_annotation.yml @@ -1117,23 +1117,6 @@ Style/InlineDisableAnnotation: - 'config/routes/project.rb' - 'danger/ce_ee_vue_templates/Dangerfile' - 'danger/roulette/Dangerfile' - - 'db/migrate/20221111123146_add_onboarding_in_progress_to_users.rb' - - 'db/migrate/20221111123147_add_onboarding_step_url_to_user_details.rb' - - 'db/migrate/20221114131943_add_short_title_to_appearances.rb' - - 'db/migrate/20221128155738_add_discord_to_user_details.rb' - - 'db/migrate/20221212192452_add_uuid_column_to_sbom_occurrences.rb' - - 'db/migrate/20221219103007_add_name_to_ml_candidates.rb' - - 'db/migrate/20221223114543_add_pwa_icon_to_appearances.rb' - - 'db/migrate/20221228072549_add_pwa_attributes_to_appearances.rb' - - 'db/migrate/20230102131000_add_smtp_credentials_to_service_desk_settings.rb' - - 'db/migrate/20230102180341_add_merge_request_meta_to_merge_requests_compliance_violations.rb' - - 'db/migrate/20230111132621_unpartition_pm_package_metadata_tables.rb' - - 'db/migrate/20230116143310_add_pages_unique_domain_columns_to_project_settings.rb' - - 'db/migrate/20230119151636_add_url_hash_to_web_hook_logs.rb' - - 'db/migrate/20230119214643_add_deactivation_email_additional_text_to_application_settings.rb' - - 'db/migrate/20230127155217_add_id_column_to_package_metadata_join_table.rb' - - 'db/migrate/20230130125541_add_attempts_and_last_error_to_postgres_async_indexes.rb' - - 'db/migrate/20230214142813_remove_ci_job_artifacts_original_filename.rb' - 'db/migrate/20230216144719_drop_table_airflow_dags.rb' - 'db/migrate/20230222161226_add_custom_jira_regex_to_jira_tracker_data.rb' - 'db/migrate/20230228133011_add_design_description.rb' @@ -1177,17 +1160,7 @@ Style/InlineDisableAnnotation: - 'db/migrate/20231017135207_add_fields_to_ml_model.rb' - 'db/migrate/20231019180421_add_name_description_to_catalog_resources.rb' - 'db/migrate/20231024142236_add_fields_to_bulk_import_failures.rb' - - 'db/post_migrate/20221102231131_remove_temp_index_for_user_details_fields.rb' - - 'db/post_migrate/20221115184525_remove_namespaces_tmp_project_id_column.rb' - - 'db/post_migrate/20221220131020_bump_default_partition_id_value_for_ci_tables.rb' - - 'db/post_migrate/20221221150123_update_billable_users_index.rb' - - 'db/post_migrate/20230104103748_remove_new_amount_used_column.rb' - - 'db/post_migrate/20230105180002_remove_new_amount_used_column_on_ci_namespace_monthly_usages.rb' - - 'db/post_migrate/20230110172751_add_partial_index_on_group_path_id.rb' - - 'db/post_migrate/20230117114739_clear_duplicate_jobs_cookies.rb' - - 'db/post_migrate/20230123095023_add_scan_result_policy_id_to_software_license_policies.rb' - 'db/post_migrate/20230131184319_update_billable_users_index_for_service_accounts.rb' - - 'db/post_migrate/20230201082038_drop_web_hook_calls_high_column.rb' - 'db/post_migrate/20230303154314_add_user_type_migration_indexes.rb' - 'db/post_migrate/20230310111859_recreate_user_type_migration_indexes.rb' - 'db/post_migrate/20230313150531_reschedule_migration_for_remediation.rb' @@ -2882,7 +2855,6 @@ Style/InlineDisableAnnotation: - 'spec/lib/gitlab/background_migration/backfill_has_merge_request_of_vulnerability_reads_spec.rb' - 'spec/lib/gitlab/background_migration/backfill_missing_ci_cd_settings_spec.rb' - 'spec/lib/gitlab/background_migration/backfill_project_import_level_spec.rb' - - 'spec/lib/gitlab/background_migration/backfill_project_namespace_on_issues_spec.rb' - 'spec/lib/gitlab/background_migration/backfill_project_repositories_spec.rb' - 'spec/lib/gitlab/background_migration/backfill_resource_link_events_spec.rb' - 'spec/lib/gitlab/background_migration/backfill_root_storage_statistics_fork_storage_sizes_spec.rb' @@ -3019,8 +2991,6 @@ Style/InlineDisableAnnotation: - 'spec/migrations/20230906204934_restart_self_hosted_sent_notifications_bigint_conversion_spec.rb' - 'spec/migrations/20230906204935_restart_self_hosted_sent_notifications_backfill_spec.rb' - 'spec/migrations/20231016001000_fix_design_user_mentions_design_id_note_id_index_for_self_managed_spec.rb' - - 'spec/migrations/add_namespaces_emails_enabled_column_data_spec.rb' - - 'spec/migrations/add_projects_emails_enabled_column_data_spec.rb' - 'spec/migrations/cleanup_bigint_conversion_for_merge_request_metrics_for_self_hosts_spec.rb' - 'spec/migrations/cleanup_conversion_big_int_ci_build_needs_self_managed_spec.rb' - 'spec/migrations/swap_award_emoji_note_id_to_bigint_for_gitlab_dot_com_spec.rb' diff --git a/db/init_structure.sql b/db/init_structure.sql index 491ceb59332d2..ca4f02a2b152a 100644 --- a/db/init_structure.sql +++ b/db/init_structure.sql @@ -225,20 +225,29 @@ RETURN NULL; END $$; -CREATE FUNCTION sync_namespaces_amount_used_columns() RETURNS trigger +CREATE FUNCTION trigger_080e73845bfd() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN - NEW."new_amount_used" := NEW."amount_used"; + NEW."id_convert_to_bigint" := NEW."id"; RETURN NEW; END; $$; -CREATE FUNCTION sync_projects_amount_used_columns() RETURNS trigger +CREATE FUNCTION trigger_0e214b8a14f2() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN - NEW."new_amount_used" := NEW."amount_used"; + NEW."note_id_convert_to_bigint" := NEW."note_id"; + RETURN NEW; +END; +$$; + +CREATE FUNCTION trigger_17c3a95ee58a() RETURNS trigger + LANGUAGE plpgsql + AS $$ +BEGIN + NEW."note_id_convert_to_bigint" := NEW."note_id"; RETURN NEW; END; $$; @@ -252,6 +261,123 @@ BEGIN END; $$; +CREATE FUNCTION trigger_3207b8d0d6f3() RETURNS trigger + LANGUAGE plpgsql + AS $$ +BEGIN + NEW."id_convert_to_bigint" := NEW."id"; + RETURN NEW; +END; +$$; + +CREATE FUNCTION trigger_3dc62927cae8() RETURNS trigger + LANGUAGE plpgsql + AS $$ +BEGIN + NEW."note_id_convert_to_bigint" := NEW."note_id"; + RETURN NEW; +END; +$$; + +CREATE FUNCTION trigger_428d92773fe7() RETURNS trigger + LANGUAGE plpgsql + AS $$ +BEGIN + NEW."note_id_convert_to_bigint" := NEW."note_id"; + RETURN NEW; +END; +$$; + +CREATE FUNCTION trigger_482bac5ec48a() RETURNS trigger + LANGUAGE plpgsql + AS $$ +BEGIN + NEW."note_id_convert_to_bigint" := NEW."note_id"; + RETURN NEW; +END; +$$; + +CREATE FUNCTION trigger_775287b6d67a() RETURNS trigger + LANGUAGE plpgsql + AS $$ +BEGIN + NEW."diff_note_id_convert_to_bigint" := NEW."diff_note_id"; + RETURN NEW; +END; +$$; + +CREATE FUNCTION trigger_7f4fcd5aa322() RETURNS trigger + LANGUAGE plpgsql + AS $$ +BEGIN + NEW."id_convert_to_bigint" := NEW."id"; + RETURN NEW; +END; +$$; + +CREATE FUNCTION trigger_bfc6e47be8cc() RETURNS trigger + LANGUAGE plpgsql + AS $$ +BEGIN + NEW."note_id_convert_to_bigint" := NEW."note_id"; + RETURN NEW; +END; +$$; + +CREATE FUNCTION trigger_bfcbace4260d() RETURNS trigger + LANGUAGE plpgsql + AS $$ +BEGIN + NEW."note_id_convert_to_bigint" := NEW."note_id"; + RETURN NEW; +END; +$$; + +CREATE FUNCTION trigger_c2051020aa8b() RETURNS trigger + LANGUAGE plpgsql + AS $$ +BEGIN + NEW."note_id_convert_to_bigint" := NEW."note_id"; + RETURN NEW; +END; +$$; + +CREATE FUNCTION trigger_c5a5f48f12b0() RETURNS trigger + LANGUAGE plpgsql + AS $$ +BEGIN + NEW."note_id_convert_to_bigint" := NEW."note_id"; + RETURN NEW; +END; +$$; + +CREATE FUNCTION trigger_c7107f30d69d() RETURNS trigger + LANGUAGE plpgsql + AS $$ +BEGIN + NEW."id_convert_to_bigint" := NEW."id"; + RETURN NEW; +END; +$$; + +CREATE FUNCTION trigger_dca935e3a712() RETURNS trigger + LANGUAGE plpgsql + AS $$ +BEGIN + NEW."note_id_convert_to_bigint" := NEW."note_id"; + RETURN NEW; +END; +$$; + +CREATE FUNCTION trigger_ee7956d805e6() RETURNS trigger + LANGUAGE plpgsql + AS $$ +BEGIN + NEW."note_id_convert_to_bigint" := NEW."note_id"; + RETURN NEW; +END; +$$; + CREATE FUNCTION unset_has_issues_on_vulnerability_reads() RETURNS trigger LANGUAGE plpgsql AS $$ @@ -493,7 +619,8 @@ CREATE TABLE web_hook_logs ( execution_duration double precision, internal_error_message character varying, updated_at timestamp without time zone NOT NULL, - created_at timestamp without time zone NOT NULL + created_at timestamp without time zone NOT NULL, + url_hash text ) PARTITION BY RANGE (created_at); @@ -10602,7 +10729,12 @@ CREATE TABLE abuse_reports ( created_at timestamp without time zone, updated_at timestamp without time zone, message_html text, - cached_markdown_version integer + cached_markdown_version integer, + category smallint DEFAULT 1 NOT NULL, + reported_from_url text DEFAULT ''::text NOT NULL, + links_to_spam text[] DEFAULT '{}'::text[] NOT NULL, + CONSTRAINT abuse_reports_links_to_spam_length_check CHECK ((cardinality(links_to_spam) <= 20)), + CONSTRAINT check_ab1260fa6c CHECK ((char_length(reported_from_url) <= 512)) ); CREATE SEQUENCE abuse_reports_id_seq @@ -10614,6 +10746,29 @@ CREATE SEQUENCE abuse_reports_id_seq ALTER SEQUENCE abuse_reports_id_seq OWNED BY abuse_reports.id; +CREATE TABLE achievements ( + id bigint NOT NULL, + namespace_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + name text NOT NULL, + avatar text, + description text, + revokeable boolean DEFAULT false NOT NULL, + CONSTRAINT check_5171b03f22 CHECK ((char_length(name) <= 255)), + CONSTRAINT check_a7a7b84a80 CHECK ((char_length(description) <= 1024)), + CONSTRAINT check_e174e93a9e CHECK ((char_length(avatar) <= 255)) +); + +CREATE SEQUENCE achievements_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE achievements_id_seq OWNED BY achievements.id; + CREATE TABLE agent_activity_events ( id bigint NOT NULL, agent_id bigint NOT NULL, @@ -10670,6 +10825,32 @@ CREATE SEQUENCE agent_project_authorizations_id_seq ALTER SEQUENCE agent_project_authorizations_id_seq OWNED BY agent_project_authorizations.id; +CREATE TABLE airflow_dags ( + id bigint NOT NULL, + project_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + next_run timestamp with time zone, + has_import_errors boolean, + is_active boolean, + is_paused boolean, + dag_name text NOT NULL, + schedule text, + fileloc text, + CONSTRAINT check_6999a61016 CHECK ((char_length(schedule) <= 255)), + CONSTRAINT check_6f52bee3a1 CHECK ((char_length(fileloc) <= 255)), + CONSTRAINT check_e10ac15d52 CHECK ((char_length(dag_name) <= 255)) +); + +CREATE SEQUENCE airflow_dags_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE airflow_dags_id_seq OWNED BY airflow_dags.id; + CREATE TABLE alert_management_alert_assignees ( id bigint NOT NULL, user_id bigint NOT NULL, @@ -10943,6 +11124,23 @@ CREATE SEQUENCE analytics_cycle_analytics_stage_event_hashes_id_seq ALTER SEQUENCE analytics_cycle_analytics_stage_event_hashes_id_seq OWNED BY analytics_cycle_analytics_stage_event_hashes.id; +CREATE TABLE analytics_dashboards_pointers ( + id bigint NOT NULL, + namespace_id bigint, + project_id bigint, + target_project_id bigint NOT NULL, + CONSTRAINT chk_analytics_dashboards_pointers_project_or_namespace CHECK (((project_id IS NULL) <> (namespace_id IS NULL))) +); + +CREATE SEQUENCE analytics_dashboards_pointers_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE analytics_dashboards_pointers_id_seq OWNED BY analytics_dashboards_pointers.id; + CREATE TABLE analytics_devops_adoption_segments ( id bigint NOT NULL, last_recorded_at timestamp with time zone, @@ -11040,7 +11238,15 @@ CREATE TABLE appearances ( email_header_and_footer_enabled boolean DEFAULT false NOT NULL, profile_image_guidelines text, profile_image_guidelines_html text, - CONSTRAINT appearances_profile_image_guidelines CHECK ((char_length(profile_image_guidelines) <= 4096)) + pwa_short_name text, + pwa_icon text, + pwa_name text, + pwa_description text, + CONSTRAINT appearances_profile_image_guidelines CHECK ((char_length(profile_image_guidelines) <= 4096)), + CONSTRAINT check_13b2165eca CHECK ((char_length(pwa_name) <= 255)), + CONSTRAINT check_5c3fd63577 CHECK ((char_length(pwa_short_name) <= 255)), + CONSTRAINT check_5e0e6f24ed CHECK ((char_length(pwa_description) <= 2048)), + CONSTRAINT check_5e5b7ac344 CHECK ((char_length(pwa_icon) <= 1024)) ); CREATE SEQUENCE appearances_id_seq @@ -11081,7 +11287,7 @@ CREATE TABLE application_settings ( help_text text, restricted_visibility_levels text, version_check_enabled boolean DEFAULT true, - max_attachment_size integer DEFAULT 10 NOT NULL, + max_attachment_size integer DEFAULT 100 NOT NULL, default_project_visibility integer DEFAULT 0 NOT NULL, default_snippet_visibility integer DEFAULT 0 NOT NULL, user_oauth_applications boolean DEFAULT true, @@ -11529,12 +11735,30 @@ CREATE TABLE application_settings ( encrypted_telesign_customer_xid_iv bytea, encrypted_telesign_api_key bytea, encrypted_telesign_api_key_iv bytea, + disable_personal_access_tokens boolean DEFAULT false NOT NULL, + max_terraform_state_size_bytes integer DEFAULT 0 NOT NULL, + bulk_import_enabled boolean DEFAULT false NOT NULL, + allow_runner_registration_token boolean DEFAULT true NOT NULL, + user_defaults_to_private_profile boolean DEFAULT false NOT NULL, + allow_possible_spam boolean DEFAULT false NOT NULL, + encrypted_product_analytics_clickhouse_connection_string bytea, + encrypted_product_analytics_clickhouse_connection_string_iv bytea, + search_max_shard_size_gb integer DEFAULT 50 NOT NULL, + search_max_docs_denominator integer DEFAULT 5000000 NOT NULL, + search_min_docs_before_rollover integer DEFAULT 100000 NOT NULL, + deactivation_email_additional_text text, + jira_connect_public_key_storage_enabled boolean DEFAULT false NOT NULL, + git_rate_limit_users_alertlist integer[] DEFAULT '{}'::integer[] NOT NULL, + allow_deploy_tokens_and_keys_with_external_authn boolean DEFAULT false NOT NULL, + security_policy_global_group_approvers_enabled boolean DEFAULT true NOT NULL, CONSTRAINT app_settings_container_reg_cleanup_tags_max_list_size_positive CHECK ((container_registry_cleanup_tags_service_max_list_size >= 0)), CONSTRAINT app_settings_container_registry_pre_import_tags_rate_positive CHECK ((container_registry_pre_import_tags_rate >= (0)::numeric)), CONSTRAINT app_settings_dep_proxy_ttl_policies_worker_capacity_positive CHECK ((dependency_proxy_ttl_group_policy_worker_capacity >= 0)), CONSTRAINT app_settings_ext_pipeline_validation_service_url_text_limit CHECK ((char_length(external_pipeline_validation_service_url) <= 255)), + CONSTRAINT app_settings_git_rate_limit_users_alertlist_max_usernames CHECK ((cardinality(git_rate_limit_users_alertlist) <= 100)), CONSTRAINT app_settings_git_rate_limit_users_allowlist_max_usernames CHECK ((cardinality(git_rate_limit_users_allowlist) <= 100)), CONSTRAINT app_settings_max_pages_custom_domains_per_project_check CHECK ((max_pages_custom_domains_per_project >= 0)), + CONSTRAINT app_settings_max_terraform_state_size_bytes_check CHECK ((max_terraform_state_size_bytes >= 0)), CONSTRAINT app_settings_p_cleanup_package_file_worker_capacity_positive CHECK ((packages_cleanup_package_file_worker_capacity >= 0)), CONSTRAINT app_settings_pkg_registry_cleanup_pol_worker_capacity_gte_zero CHECK ((package_registry_cleanup_policies_worker_capacity >= 0)), CONSTRAINT app_settings_registry_exp_policies_worker_capacity_positive CHECK ((container_registry_expiration_policies_worker_capacity >= 0)), @@ -11565,6 +11789,7 @@ CREATE TABLE application_settings ( CONSTRAINT check_9a719834eb CHECK ((char_length(secret_detection_token_revocation_url) <= 255)), CONSTRAINT check_9c6c447a13 CHECK ((char_length(maintenance_mode_message) <= 255)), CONSTRAINT check_a5704163cc CHECK ((char_length(secret_detection_revocation_token_types_url) <= 255)), + CONSTRAINT check_b8c74ea5b3 CHECK ((char_length(deactivation_email_additional_text) <= 1000)), CONSTRAINT check_d03919528d CHECK ((char_length(container_registry_vendor) <= 255)), CONSTRAINT check_d4865d70f3 CHECK ((char_length(clickhouse_connection_string) <= 1024)), CONSTRAINT check_d820146492 CHECK ((char_length(spam_check_endpoint_url) <= 255)), @@ -11662,6 +11887,7 @@ CREATE TABLE approval_merge_request_rules ( severity_levels text[] DEFAULT '{}'::text[] NOT NULL, vulnerability_states text[] DEFAULT '{newly_detected}'::text[] NOT NULL, security_orchestration_policy_configuration_id bigint, + scan_result_policy_id bigint, CONSTRAINT check_6fca5928b2 CHECK ((char_length(section) <= 255)) ); @@ -11727,14 +11953,15 @@ CREATE TABLE approval_project_rules ( approvals_required smallint DEFAULT 0 NOT NULL, name character varying NOT NULL, rule_type smallint DEFAULT 0 NOT NULL, - scanners text[], + scanners text[] DEFAULT '{}'::text[], vulnerabilities_allowed smallint DEFAULT 0 NOT NULL, severity_levels text[] DEFAULT '{}'::text[] NOT NULL, report_type smallint, vulnerability_states text[] DEFAULT '{newly_detected}'::text[] NOT NULL, orchestration_policy_idx smallint, applies_to_all_protected_branches boolean DEFAULT false NOT NULL, - security_orchestration_policy_configuration_id bigint + security_orchestration_policy_configuration_id bigint, + scan_result_policy_id bigint ); CREATE TABLE approval_project_rules_groups ( @@ -11845,7 +12072,7 @@ CREATE TABLE atlassian_identities ( encrypted_refresh_token bytea, encrypted_refresh_token_iv bytea, CONSTRAINT atlassian_identities_refresh_token_iv_length_constraint CHECK ((octet_length(encrypted_refresh_token_iv) <= 12)), - CONSTRAINT atlassian_identities_refresh_token_length_constraint CHECK ((octet_length(encrypted_refresh_token) <= 512)), + CONSTRAINT atlassian_identities_refresh_token_length_constraint CHECK ((octet_length(encrypted_refresh_token) <= 5000)), CONSTRAINT atlassian_identities_token_iv_length_constraint CHECK ((octet_length(encrypted_token_iv) <= 12)), CONSTRAINT atlassian_identities_token_length_constraint CHECK ((octet_length(encrypted_token) <= 2048)), CONSTRAINT check_32f5779763 CHECK ((char_length(extern_uid) <= 255)) @@ -11948,6 +12175,29 @@ CREATE SEQUENCE authentication_events_id_seq ALTER SEQUENCE authentication_events_id_seq OWNED BY authentication_events.id; +CREATE TABLE automation_rules ( + id bigint NOT NULL, + namespace_id bigint NOT NULL, + issues_events boolean DEFAULT false NOT NULL, + merge_requests_events boolean DEFAULT false NOT NULL, + permanently_disabled boolean DEFAULT false NOT NULL, + name text NOT NULL, + rule text NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + CONSTRAINT check_0be3e2c953 CHECK ((char_length(name) <= 255)), + CONSTRAINT check_ed5a4fcbd5 CHECK ((char_length(rule) <= 2048)) +); + +CREATE SEQUENCE automation_rules_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE automation_rules_id_seq OWNED BY automation_rules.id; + CREATE TABLE award_emoji ( id integer NOT NULL, name character varying, @@ -12404,6 +12654,7 @@ CREATE TABLE bulk_import_entities ( created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, source_xid integer, + migrate_projects boolean DEFAULT true NOT NULL, CONSTRAINT check_13f279f7da CHECK ((char_length(source_full_path) <= 255)), CONSTRAINT check_715d725ea2 CHECK ((char_length(destination_name) <= 255)), CONSTRAINT check_796a4d9cc6 CHECK ((char_length(jid) <= 255)), @@ -12494,6 +12745,8 @@ CREATE TABLE bulk_import_trackers ( jid text, stage smallint DEFAULT 0 NOT NULL, status smallint DEFAULT 0 NOT NULL, + created_at timestamp with time zone, + updated_at timestamp with time zone, CONSTRAINT check_2d45cae629 CHECK ((char_length(relation) <= 255)), CONSTRAINT check_40aeaa600b CHECK ((char_length(next_page) <= 255)), CONSTRAINT check_603f91cb06 CHECK ((char_length(jid) <= 255)), @@ -12517,6 +12770,7 @@ CREATE TABLE bulk_imports ( created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, source_version text, + source_enterprise boolean DEFAULT true NOT NULL, CONSTRAINT check_ea4e58775a CHECK ((char_length(source_version) <= 63)) ); @@ -12539,8 +12793,7 @@ CREATE TABLE chat_names ( last_used_at timestamp without time zone, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, - integration_id integer, - CONSTRAINT check_2b0a0d0f0f CHECK ((integration_id IS NOT NULL)) + integration_id integer ); CREATE SEQUENCE chat_names_id_seq @@ -12575,7 +12828,9 @@ CREATE TABLE ci_build_needs ( name text NOT NULL, artifacts boolean DEFAULT true NOT NULL, optional boolean DEFAULT false NOT NULL, - build_id bigint NOT NULL + build_id bigint NOT NULL, + partition_id bigint DEFAULT 100 NOT NULL, + id_convert_to_bigint bigint DEFAULT 0 NOT NULL ); CREATE SEQUENCE ci_build_needs_id_seq @@ -12595,7 +12850,8 @@ CREATE TABLE ci_build_pending_states ( state smallint, failure_reason smallint, trace_checksum bytea, - trace_bytesize bigint + trace_bytesize bigint, + partition_id bigint DEFAULT 100 NOT NULL ); CREATE SEQUENCE ci_build_pending_states_id_seq @@ -12610,7 +12866,8 @@ ALTER SEQUENCE ci_build_pending_states_id_seq OWNED BY ci_build_pending_states.i CREATE TABLE ci_build_report_results ( build_id bigint NOT NULL, project_id bigint NOT NULL, - data jsonb DEFAULT '{}'::jsonb NOT NULL + data jsonb DEFAULT '{}'::jsonb NOT NULL, + partition_id bigint DEFAULT 100 NOT NULL ); CREATE TABLE ci_build_trace_chunks ( @@ -12620,7 +12877,8 @@ CREATE TABLE ci_build_trace_chunks ( raw_data bytea, checksum bytea, lock_version integer DEFAULT 0 NOT NULL, - build_id bigint NOT NULL + build_id bigint NOT NULL, + partition_id bigint DEFAULT 100 NOT NULL ); CREATE SEQUENCE ci_build_trace_chunks_id_seq @@ -12639,7 +12897,8 @@ CREATE TABLE ci_build_trace_metadata ( checksum bytea, remote_checksum bytea, last_archival_attempt_at timestamp with time zone, - archived_at timestamp with time zone + archived_at timestamp with time zone, + partition_id bigint DEFAULT 100 NOT NULL ); CREATE TABLE ci_builds ( @@ -12714,7 +12973,9 @@ CREATE TABLE p_ci_builds_metadata ( id bigint NOT NULL, runtime_runner_features jsonb DEFAULT '{}'::jsonb NOT NULL, id_tokens jsonb DEFAULT '{}'::jsonb NOT NULL, - partition_id bigint DEFAULT 100 NOT NULL + partition_id bigint DEFAULT 100 NOT NULL, + debug_trace_enabled boolean DEFAULT false NOT NULL, + runner_machine_id bigint ) PARTITION BY LIST (partition_id); @@ -12742,7 +13003,9 @@ CREATE TABLE ci_builds_metadata ( id bigint DEFAULT nextval('ci_builds_metadata_id_seq'::regclass) NOT NULL, runtime_runner_features jsonb DEFAULT '{}'::jsonb NOT NULL, id_tokens jsonb DEFAULT '{}'::jsonb NOT NULL, - partition_id bigint DEFAULT 100 NOT NULL + partition_id bigint DEFAULT 100 NOT NULL, + debug_trace_enabled boolean DEFAULT false NOT NULL, + runner_machine_id bigint ); ALTER TABLE ONLY p_ci_builds_metadata ATTACH PARTITION ci_builds_metadata FOR VALUES IN ('100'); @@ -12751,7 +13014,8 @@ CREATE TABLE ci_builds_runner_session ( url character varying NOT NULL, certificate character varying, "authorization" character varying, - build_id bigint NOT NULL + build_id bigint NOT NULL, + partition_id bigint DEFAULT 100 NOT NULL ); CREATE SEQUENCE ci_builds_runner_session_id_seq @@ -12898,10 +13162,9 @@ CREATE TABLE ci_job_artifacts ( id bigint NOT NULL, job_id bigint NOT NULL, locked smallint DEFAULT 2, - original_filename text, partition_id bigint DEFAULT 100 NOT NULL, - CONSTRAINT check_27f0f6dbab CHECK ((file_store IS NOT NULL)), - CONSTRAINT check_85573000db CHECK ((char_length(original_filename) <= 512)) + accessibility smallint DEFAULT 0 NOT NULL, + CONSTRAINT check_27f0f6dbab CHECK ((file_store IS NOT NULL)) ); CREATE SEQUENCE ci_job_artifacts_id_seq @@ -12939,7 +13202,8 @@ CREATE TABLE ci_job_variables ( job_id bigint NOT NULL, variable_type smallint DEFAULT 1 NOT NULL, source smallint DEFAULT 0 NOT NULL, - raw boolean DEFAULT false NOT NULL + raw boolean DEFAULT false NOT NULL, + partition_id bigint DEFAULT 100 NOT NULL ); CREATE SEQUENCE ci_job_variables_id_seq @@ -12990,11 +13254,10 @@ CREATE TABLE ci_namespace_monthly_usages ( id bigint NOT NULL, namespace_id bigint NOT NULL, date date NOT NULL, - amount_used numeric(18,2) DEFAULT 0.0 NOT NULL, notification_level smallint DEFAULT 100 NOT NULL, shared_runners_duration integer DEFAULT 0 NOT NULL, created_at timestamp with time zone, - new_amount_used numeric(18,4) DEFAULT 0.0 NOT NULL, + amount_used numeric(18,4) DEFAULT 0.0 NOT NULL, CONSTRAINT ci_namespace_monthly_usages_year_month_constraint CHECK ((date = date_trunc('month'::text, (date)::timestamp with time zone))) ); @@ -13032,7 +13295,8 @@ CREATE TABLE ci_pending_builds ( namespace_id bigint, minutes_exceeded boolean DEFAULT false NOT NULL, tag_ids integer[] DEFAULT '{}'::integer[], - namespace_traversal_ids integer[] DEFAULT '{}'::integer[] + namespace_traversal_ids integer[] DEFAULT '{}'::integer[], + partition_id bigint DEFAULT 100 NOT NULL ); CREATE SEQUENCE ci_pending_builds_id_seq @@ -13272,10 +13536,9 @@ CREATE TABLE ci_project_monthly_usages ( id bigint NOT NULL, project_id bigint NOT NULL, date date NOT NULL, - amount_used numeric(18,2) DEFAULT 0.0 NOT NULL, shared_runners_duration integer DEFAULT 0 NOT NULL, created_at timestamp with time zone, - new_amount_used numeric(18,4) DEFAULT 0.0 NOT NULL, + amount_used numeric(18,4) DEFAULT 0.0 NOT NULL, CONSTRAINT ci_project_monthly_usages_year_month_constraint CHECK ((date = date_trunc('month'::text, (date)::timestamp with time zone))) ); @@ -13328,7 +13591,8 @@ CREATE TABLE ci_resources ( created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, resource_group_id bigint NOT NULL, - build_id bigint + build_id bigint, + partition_id bigint ); CREATE SEQUENCE ci_resources_id_seq @@ -13340,6 +13604,38 @@ CREATE SEQUENCE ci_resources_id_seq ALTER SEQUENCE ci_resources_id_seq OWNED BY ci_resources.id; +CREATE TABLE ci_runner_machines ( + id bigint NOT NULL, + runner_id bigint NOT NULL, + executor_type smallint, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + contacted_at timestamp with time zone, + version text, + revision text, + platform text, + architecture text, + ip_address text, + config jsonb DEFAULT '{}'::jsonb NOT NULL, + system_xid text, + CONSTRAINT check_1537c1f66f CHECK ((char_length(platform) <= 255)), + CONSTRAINT check_5253913ae9 CHECK ((char_length(system_xid) <= 64)), + CONSTRAINT check_6f45a91da7 CHECK ((char_length(version) <= 2048)), + CONSTRAINT check_9b521b3105 CHECK ((char_length(architecture) <= 255)), + CONSTRAINT check_afb8efc1a2 CHECK ((char_length(revision) <= 255)), + CONSTRAINT check_b714f452d5 CHECK ((system_xid IS NOT NULL)), + CONSTRAINT check_f214590856 CHECK ((char_length(ip_address) <= 1024)) +); + +CREATE SEQUENCE ci_runner_machines_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_runner_machines_id_seq OWNED BY ci_runner_machines.id; + CREATE TABLE ci_runner_namespaces ( id integer NOT NULL, runner_id integer, @@ -13405,6 +13701,8 @@ CREATE TABLE ci_runners ( maintainer_note text, token_expires_at timestamp with time zone, allowed_plans text[] DEFAULT '{}'::text[] NOT NULL, + registration_type smallint DEFAULT 0 NOT NULL, + creator_id bigint, CONSTRAINT check_ce275cee06 CHECK ((char_length(maintainer_note) <= 1024)) ); @@ -13423,7 +13721,8 @@ CREATE TABLE ci_running_builds ( project_id bigint NOT NULL, runner_id bigint NOT NULL, created_at timestamp with time zone DEFAULT now() NOT NULL, - runner_type smallint NOT NULL + runner_type smallint NOT NULL, + partition_id bigint DEFAULT 100 NOT NULL ); CREATE SEQUENCE ci_running_builds_id_seq @@ -13488,7 +13787,9 @@ CREATE TABLE ci_sources_pipelines ( pipeline_id integer, source_project_id integer, source_pipeline_id integer, - source_job_id bigint + source_job_id bigint, + partition_id bigint DEFAULT 100 NOT NULL, + source_partition_id bigint DEFAULT 100 NOT NULL ); CREATE SEQUENCE ci_sources_pipelines_id_seq @@ -13580,7 +13881,9 @@ CREATE TABLE ci_triggers ( project_id integer, owner_id integer NOT NULL, description character varying, - ref character varying + ref character varying, + encrypted_token bytea, + encrypted_token_iv bytea ); CREATE SEQUENCE ci_triggers_id_seq @@ -13596,7 +13899,8 @@ CREATE TABLE ci_unit_test_failures ( id bigint NOT NULL, failed_at timestamp with time zone NOT NULL, unit_test_id bigint NOT NULL, - build_id bigint NOT NULL + build_id bigint NOT NULL, + partition_id bigint DEFAULT 100 NOT NULL ); CREATE SEQUENCE ci_unit_test_failures_id_seq @@ -14088,7 +14392,8 @@ CREATE TABLE commit_user_mentions ( mentioned_users_ids integer[], mentioned_projects_ids integer[], mentioned_groups_ids integer[], - commit_id character varying NOT NULL + commit_id character varying NOT NULL, + note_id_convert_to_bigint bigint DEFAULT 0 NOT NULL ); CREATE SEQUENCE commit_user_mentions_id_seq @@ -14161,6 +14466,7 @@ CREATE TABLE container_repositories ( migration_plan text, last_cleanup_deleted_tags_count integer, delete_started_at timestamp with time zone, + status_updated_at timestamp with time zone, CONSTRAINT check_05e9012f36 CHECK ((char_length(migration_plan) <= 255)), CONSTRAINT check_13c58fe73a CHECK ((char_length(migration_state) <= 255)), CONSTRAINT check_97f0249439 CHECK ((char_length(migration_aborted_in_state) <= 255)) @@ -14351,6 +14657,43 @@ CREATE SEQUENCE customer_relations_organizations_id_seq ALTER SEQUENCE customer_relations_organizations_id_seq OWNED BY customer_relations_organizations.id; +CREATE TABLE dast_pre_scan_verification_steps ( + id bigint NOT NULL, + dast_pre_scan_verification_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + name text, + verification_errors text[] DEFAULT '{}'::text[] NOT NULL, + CONSTRAINT check_cd216b95e4 CHECK ((char_length(name) <= 255)) +); + +CREATE SEQUENCE dast_pre_scan_verification_steps_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE dast_pre_scan_verification_steps_id_seq OWNED BY dast_pre_scan_verification_steps.id; + +CREATE TABLE dast_pre_scan_verifications ( + id bigint NOT NULL, + dast_profile_id bigint NOT NULL, + ci_pipeline_id bigint, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + status smallint DEFAULT 0 NOT NULL +); + +CREATE SEQUENCE dast_pre_scan_verifications_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE dast_pre_scan_verifications_id_seq OWNED BY dast_pre_scan_verifications.id; + CREATE TABLE dast_profile_schedules ( id bigint NOT NULL, project_id bigint NOT NULL, @@ -14412,6 +14755,21 @@ CREATE TABLE dast_profiles_pipelines ( COMMENT ON TABLE dast_profiles_pipelines IS '{"owner":"group::dynamic analysis","description":"Join table between DAST Profiles and CI Pipelines"}'; +CREATE TABLE dast_profiles_tags ( + id bigint NOT NULL, + dast_profile_id bigint NOT NULL, + tag_id bigint NOT NULL +); + +CREATE SEQUENCE dast_profiles_tags_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE dast_profiles_tags_id_seq OWNED BY dast_profiles_tags.id; + CREATE TABLE dast_scanner_profiles ( id bigint NOT NULL, created_at timestamp with time zone NOT NULL, @@ -14442,6 +14800,21 @@ CREATE SEQUENCE dast_scanner_profiles_id_seq ALTER SEQUENCE dast_scanner_profiles_id_seq OWNED BY dast_scanner_profiles.id; +CREATE TABLE dast_scanner_profiles_tags ( + id bigint NOT NULL, + dast_scanner_profile_id bigint NOT NULL, + tag_id bigint NOT NULL +); + +CREATE SEQUENCE dast_scanner_profiles_tags_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE dast_scanner_profiles_tags_id_seq OWNED BY dast_scanner_profiles_tags.id; + CREATE TABLE dast_site_profile_secret_variables ( id bigint NOT NULL, dast_site_profile_id bigint NOT NULL, @@ -14583,6 +14956,27 @@ CREATE SEQUENCE dast_sites_id_seq ALTER SEQUENCE dast_sites_id_seq OWNED BY dast_sites.id; +CREATE TABLE dependency_list_exports ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + project_id bigint NOT NULL, + user_id bigint, + file_store integer, + status smallint DEFAULT 0 NOT NULL, + file text, + CONSTRAINT check_fff6fc9b2f CHECK ((char_length(file) <= 255)) +); + +CREATE SEQUENCE dependency_list_exports_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE dependency_list_exports_id_seq OWNED BY dependency_list_exports.id; + CREATE TABLE dependency_proxy_blob_states ( verification_started_at timestamp with time zone, verification_retry_at timestamp with time zone, @@ -14624,7 +15018,7 @@ CREATE TABLE dependency_proxy_group_settings ( group_id integer NOT NULL, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - enabled boolean DEFAULT false NOT NULL + enabled boolean DEFAULT true NOT NULL ); CREATE SEQUENCE dependency_proxy_group_settings_id_seq @@ -14644,6 +15038,18 @@ CREATE TABLE dependency_proxy_image_ttl_group_policies ( enabled boolean DEFAULT false NOT NULL ); +CREATE TABLE dependency_proxy_manifest_states ( + verification_started_at timestamp with time zone, + verification_retry_at timestamp with time zone, + verified_at timestamp with time zone, + dependency_proxy_manifest_id bigint NOT NULL, + verification_state smallint DEFAULT 0 NOT NULL, + verification_retry_count smallint DEFAULT 0 NOT NULL, + verification_checksum bytea, + verification_failure text, + CONSTRAINT check_fdd5d9791b CHECK ((char_length(verification_failure) <= 255)) +); + CREATE TABLE dependency_proxy_manifests ( id bigint NOT NULL, created_at timestamp with time zone NOT NULL, @@ -14858,7 +15264,8 @@ CREATE TABLE design_user_mentions ( note_id integer NOT NULL, mentioned_users_ids integer[], mentioned_projects_ids integer[], - mentioned_groups_ids integer[] + mentioned_groups_ids integer[], + note_id_convert_to_bigint bigint DEFAULT 0 NOT NULL ); CREATE SEQUENCE design_user_mentions_id_seq @@ -14996,6 +15403,14 @@ CREATE SEQUENCE draft_notes_id_seq ALTER SEQUENCE draft_notes_id_seq OWNED BY draft_notes.id; +CREATE TABLE elastic_group_index_statuses ( + namespace_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + wiki_indexed_at timestamp with time zone, + last_wiki_commit bytea +); + CREATE TABLE elastic_index_settings ( id bigint NOT NULL, created_at timestamp with time zone NOT NULL, @@ -15180,7 +15595,8 @@ CREATE TABLE epic_user_mentions ( note_id integer, mentioned_users_ids integer[], mentioned_projects_ids integer[], - mentioned_groups_ids integer[] + mentioned_groups_ids integer[], + note_id_convert_to_bigint bigint ); CREATE SEQUENCE epic_user_mentions_id_seq @@ -15356,44 +15772,6 @@ CREATE SEQUENCE evidences_id_seq ALTER SEQUENCE evidences_id_seq OWNED BY evidences.id; -CREATE TABLE experiment_subjects ( - id bigint NOT NULL, - experiment_id bigint NOT NULL, - user_id bigint, - project_id bigint, - variant smallint DEFAULT 0 NOT NULL, - created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL, - converted_at timestamp with time zone, - context jsonb DEFAULT '{}'::jsonb NOT NULL, - namespace_id bigint, - CONSTRAINT check_f6411bc4b5 CHECK ((num_nonnulls(user_id, namespace_id, project_id) = 1)) -); - -CREATE SEQUENCE experiment_subjects_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE experiment_subjects_id_seq OWNED BY experiment_subjects.id; - -CREATE TABLE experiments ( - id bigint NOT NULL, - name text NOT NULL, - CONSTRAINT check_e2dda25ed0 CHECK ((char_length(name) <= 255)) -); - -CREATE SEQUENCE experiments_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE experiments_id_seq OWNED BY experiments.id; - CREATE TABLE external_approval_rules ( id bigint NOT NULL, project_id bigint NOT NULL, @@ -15567,20 +15945,6 @@ CREATE SEQUENCE geo_cache_invalidation_events_id_seq ALTER SEQUENCE geo_cache_invalidation_events_id_seq OWNED BY geo_cache_invalidation_events.id; -CREATE TABLE geo_container_repository_updated_events ( - id bigint NOT NULL, - container_repository_id integer NOT NULL -); - -CREATE SEQUENCE geo_container_repository_updated_events_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE geo_container_repository_updated_events_id_seq OWNED BY geo_container_repository_updated_events.id; - CREATE TABLE geo_event_log ( id bigint NOT NULL, created_at timestamp without time zone NOT NULL, @@ -15593,7 +15957,6 @@ CREATE TABLE geo_event_log ( hashed_storage_attachments_event_id bigint, reset_checksum_event_id bigint, cache_invalidation_event_id bigint, - container_repository_updated_event_id bigint, geo_event_id integer ); @@ -15946,6 +16309,7 @@ CREATE TABLE gitlab_subscriptions ( seats_owed integer DEFAULT 0 NOT NULL, trial_extension_type smallint, max_seats_used_changed_at timestamp with time zone, + last_seat_refresh_at timestamp with time zone, CONSTRAINT check_77fea3f0e7 CHECK ((namespace_id IS NOT NULL)) ); @@ -16613,6 +16977,7 @@ CREATE TABLE integrations ( archive_trace_events boolean DEFAULT false NOT NULL, encrypted_properties bytea, encrypted_properties_iv bytea, + incident_events boolean DEFAULT false NOT NULL, CONSTRAINT check_a948a0aa7e CHECK ((char_length(type_new) <= 255)) ); @@ -16855,7 +17220,8 @@ CREATE TABLE issue_user_mentions ( note_id integer, mentioned_users_ids integer[], mentioned_projects_ids integer[], - mentioned_groups_ids integer[] + mentioned_groups_ids integer[], + note_id_convert_to_bigint bigint ); CREATE SEQUENCE issue_user_mentions_id_seq @@ -16906,6 +17272,8 @@ CREATE TABLE issues ( work_item_type_id bigint, namespace_id bigint, start_date date, + CONSTRAINT check_2addf801cd CHECK ((work_item_type_id IS NOT NULL)), + CONSTRAINT check_c33362cd43 CHECK ((namespace_id IS NOT NULL)), CONSTRAINT check_fba63f706d CHECK ((lock_version IS NOT NULL)) ); @@ -17073,7 +17441,8 @@ CREATE TABLE keys ( fingerprint_sha256 bytea, expires_at timestamp with time zone, expiry_notification_delivered_at timestamp with time zone, - before_expiry_notification_delivered_at timestamp with time zone + before_expiry_notification_delivered_at timestamp with time zone, + usage_type smallint DEFAULT 0 NOT NULL ); CREATE SEQUENCE keys_id_seq @@ -17317,7 +17686,8 @@ CREATE TABLE member_roles ( created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, base_access_level integer NOT NULL, - download_code boolean DEFAULT false + download_code boolean DEFAULT false, + read_code boolean DEFAULT false ); CREATE SEQUENCE member_roles_id_seq @@ -17594,6 +17964,7 @@ CREATE TABLE merge_request_metrics ( added_lines integer, removed_lines integer, target_project_id integer, + id_convert_to_bigint bigint DEFAULT 0 NOT NULL, CONSTRAINT check_e03d0900bf CHECK ((target_project_id IS NOT NULL)) ); @@ -17610,7 +17981,8 @@ CREATE TABLE merge_request_predictions ( merge_request_id bigint NOT NULL, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - suggested_reviewers jsonb DEFAULT '{}'::jsonb NOT NULL + suggested_reviewers jsonb DEFAULT '{}'::jsonb NOT NULL, + accepted_reviewers jsonb DEFAULT '{}'::jsonb NOT NULL ); CREATE SEQUENCE merge_request_predictions_merge_request_id_seq @@ -17645,7 +18017,8 @@ CREATE TABLE merge_request_user_mentions ( note_id integer, mentioned_users_ids integer[], mentioned_projects_ids integer[], - mentioned_groups_ids integer[] + mentioned_groups_ids integer[], + note_id_convert_to_bigint bigint ); CREATE SEQUENCE merge_request_user_mentions_id_seq @@ -17700,6 +18073,7 @@ CREATE TABLE merge_requests ( sprint_id bigint, merge_ref_sha bytea, draft boolean DEFAULT false NOT NULL, + prepared_at timestamp with time zone, CONSTRAINT check_970d272570 CHECK ((lock_version IS NOT NULL)) ); @@ -17725,7 +18099,11 @@ CREATE TABLE merge_requests_compliance_violations ( violating_user_id bigint NOT NULL, merge_request_id bigint NOT NULL, reason smallint NOT NULL, - severity_level smallint DEFAULT 0 NOT NULL + severity_level smallint DEFAULT 0 NOT NULL, + merged_at timestamp with time zone, + target_project_id integer, + title text, + target_branch text ); CREATE SEQUENCE merge_requests_compliance_violations_id_seq @@ -17839,6 +18217,26 @@ CREATE SEQUENCE milestones_id_seq ALTER SEQUENCE milestones_id_seq OWNED BY milestones.id; +CREATE TABLE ml_candidate_metadata ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + candidate_id bigint NOT NULL, + name text NOT NULL, + value text NOT NULL, + CONSTRAINT check_6b38a286a5 CHECK ((char_length(name) <= 255)), + CONSTRAINT check_9453f4a8e9 CHECK ((char_length(value) <= 5000)) +); + +CREATE SEQUENCE ml_candidate_metadata_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ml_candidate_metadata_id_seq OWNED BY ml_candidate_metadata.id; + CREATE TABLE ml_candidate_metrics ( id bigint NOT NULL, created_at timestamp with time zone NOT NULL, @@ -17890,7 +18288,9 @@ CREATE TABLE ml_candidates ( user_id bigint, start_time bigint, end_time bigint, - status smallint DEFAULT 0 NOT NULL + status smallint DEFAULT 0 NOT NULL, + name text, + CONSTRAINT check_25e6c65051 CHECK ((char_length(name) <= 255)) ); CREATE SEQUENCE ml_candidates_id_seq @@ -17902,6 +18302,26 @@ CREATE SEQUENCE ml_candidates_id_seq ALTER SEQUENCE ml_candidates_id_seq OWNED BY ml_candidates.id; +CREATE TABLE ml_experiment_metadata ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + experiment_id bigint NOT NULL, + name text NOT NULL, + value text NOT NULL, + CONSTRAINT check_112fe5002d CHECK ((char_length(name) <= 255)), + CONSTRAINT check_a91c633d68 CHECK ((char_length(value) <= 5000)) +); + +CREATE SEQUENCE ml_experiment_metadata_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ml_experiment_metadata_id_seq OWNED BY ml_experiment_metadata.id; + CREATE TABLE ml_experiments ( id bigint NOT NULL, created_at timestamp with time zone NOT NULL, @@ -17993,7 +18413,10 @@ CREATE TABLE namespace_details ( description text, description_html text, free_user_cap_over_limt_notified_at timestamp with time zone, - free_user_cap_over_limit_notified_at timestamp with time zone + free_user_cap_over_limit_notified_at timestamp with time zone, + dashboard_notification_at timestamp with time zone, + dashboard_enforcement_at timestamp with time zone, + next_over_limit_check_at timestamp with time zone ); CREATE TABLE namespace_limits ( @@ -18065,7 +18488,12 @@ CREATE TABLE namespace_settings ( allow_merge_on_skipped_pipeline boolean DEFAULT false NOT NULL, only_allow_merge_if_all_discussions_are_resolved boolean DEFAULT false NOT NULL, default_compliance_framework_id bigint, + runner_registration_enabled boolean DEFAULT true, + allow_runner_registration_token boolean DEFAULT true NOT NULL, + unique_project_download_limit_alertlist integer[] DEFAULT '{}'::integer[] NOT NULL, + emails_enabled boolean DEFAULT true NOT NULL, CONSTRAINT check_0ba93c78c7 CHECK ((char_length(default_branch_name) <= 255)), + CONSTRAINT namespace_settings_unique_project_download_limit_alertlist_size CHECK ((cardinality(unique_project_download_limit_alertlist) <= 100)), CONSTRAINT namespace_settings_unique_project_download_limit_allowlist_size CHECK ((cardinality(unique_project_download_limit_allowlist) <= 100)) ); @@ -18136,8 +18564,7 @@ CREATE TABLE namespaces ( push_rule_id bigint, shared_runners_enabled boolean DEFAULT true NOT NULL, allow_descendants_override_disabled_shared_runners boolean DEFAULT false NOT NULL, - traversal_ids integer[] DEFAULT '{}'::integer[] NOT NULL, - tmp_project_id integer + traversal_ids integer[] DEFAULT '{}'::integer[] NOT NULL ); CREATE SEQUENCE namespaces_id_seq @@ -18149,6 +18576,24 @@ CREATE SEQUENCE namespaces_id_seq ALTER SEQUENCE namespaces_id_seq OWNED BY namespaces.id; +CREATE TABLE namespaces_storage_limit_exclusions ( + id bigint NOT NULL, + namespace_id bigint NOT NULL, + reason text NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + CONSTRAINT check_81640b2ee2 CHECK ((char_length(reason) <= 255)) +); + +CREATE SEQUENCE namespaces_storage_limit_exclusions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE namespaces_storage_limit_exclusions_id_seq OWNED BY namespaces_storage_limit_exclusions.id; + CREATE TABLE namespaces_sync_events ( id bigint NOT NULL, namespace_id bigint NOT NULL @@ -18173,7 +18618,8 @@ CREATE TABLE note_diff_files ( a_mode character varying NOT NULL, b_mode character varying NOT NULL, new_path text NOT NULL, - old_path text NOT NULL + old_path text NOT NULL, + diff_note_id_convert_to_bigint bigint DEFAULT 0 NOT NULL ); CREATE SEQUENCE note_diff_files_id_seq @@ -18213,7 +18659,8 @@ CREATE TABLE notes ( review_id bigint, confidential boolean, last_edited_at timestamp with time zone, - internal boolean DEFAULT false NOT NULL + internal boolean DEFAULT false NOT NULL, + id_convert_to_bigint bigint DEFAULT 0 NOT NULL ); CREATE SEQUENCE notes_id_seq @@ -18296,7 +18743,7 @@ CREATE TABLE oauth_access_tokens ( application_id integer, token character varying NOT NULL, refresh_token character varying, - expires_in integer, + expires_in integer DEFAULT 7200, revoked_at timestamp without time zone, created_at timestamp without time zone NOT NULL, scopes character varying @@ -19382,7 +19829,6 @@ CREATE TABLE plan_limits ( helm_max_file_size bigint DEFAULT 5242880 NOT NULL, ci_registered_group_runners integer DEFAULT 1000 NOT NULL, ci_registered_project_runners integer DEFAULT 1000 NOT NULL, - web_hook_calls integer DEFAULT 0 NOT NULL, ci_daily_pipeline_schedule_triggers integer DEFAULT 0 NOT NULL, ci_max_artifact_size_running_container_scanning integer DEFAULT 0 NOT NULL, ci_max_artifact_size_cluster_image_scanning integer DEFAULT 0 NOT NULL, @@ -19398,10 +19844,16 @@ CREATE TABLE plan_limits ( security_policy_scan_execution_schedules integer DEFAULT 0 NOT NULL, web_hook_calls_mid integer DEFAULT 0 NOT NULL, web_hook_calls_low integer DEFAULT 0 NOT NULL, - project_ci_variables integer DEFAULT 200 NOT NULL, - group_ci_variables integer DEFAULT 200 NOT NULL, + project_ci_variables integer DEFAULT 8000 NOT NULL, + group_ci_variables integer DEFAULT 30000 NOT NULL, ci_max_artifact_size_cyclonedx integer DEFAULT 1 NOT NULL, - rpm_max_file_size bigint DEFAULT '5368709120'::bigint NOT NULL + rpm_max_file_size bigint DEFAULT '5368709120'::bigint NOT NULL, + ci_max_artifact_size_requirements_v2 integer DEFAULT 0 NOT NULL, + pipeline_hierarchy_size integer DEFAULT 1000 NOT NULL, + enforcement_limit integer DEFAULT 0 NOT NULL, + notification_limit integer DEFAULT 0 NOT NULL, + dashboard_limit_enabled_at timestamp with time zone, + web_hook_calls integer DEFAULT 0 NOT NULL ); CREATE SEQUENCE plan_limits_id_seq @@ -19430,6 +19882,84 @@ CREATE SEQUENCE plans_id_seq ALTER SEQUENCE plans_id_seq OWNED BY plans.id; +CREATE TABLE pm_checkpoints ( + sequence integer NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + purl_type smallint NOT NULL, + chunk smallint NOT NULL +); + +CREATE TABLE pm_licenses ( + id bigint NOT NULL, + spdx_identifier text NOT NULL, + created_at timestamp with time zone DEFAULT now() NOT NULL, + updated_at timestamp with time zone DEFAULT now() NOT NULL, + CONSTRAINT check_c1eb81d1ba CHECK ((char_length(spdx_identifier) <= 50)) +); + +CREATE SEQUENCE pm_licenses_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE pm_licenses_id_seq OWNED BY pm_licenses.id; + +CREATE TABLE pm_package_version_licenses ( + pm_package_version_id bigint NOT NULL, + pm_license_id bigint NOT NULL, + created_at timestamp with time zone DEFAULT now() NOT NULL, + updated_at timestamp with time zone DEFAULT now() NOT NULL, + id bigint NOT NULL +); + +CREATE SEQUENCE pm_package_version_licenses_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE pm_package_version_licenses_id_seq OWNED BY pm_package_version_licenses.id; + +CREATE TABLE pm_package_versions ( + id bigint NOT NULL, + pm_package_id bigint NOT NULL, + version text NOT NULL, + created_at timestamp with time zone DEFAULT now() NOT NULL, + updated_at timestamp with time zone DEFAULT now() NOT NULL, + CONSTRAINT check_2d8a88cfcc CHECK ((char_length(version) <= 255)) +); + +CREATE SEQUENCE pm_package_versions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE pm_package_versions_id_seq OWNED BY pm_package_versions.id; + +CREATE TABLE pm_packages ( + id bigint NOT NULL, + purl_type smallint NOT NULL, + name text NOT NULL, + created_at timestamp with time zone DEFAULT now() NOT NULL, + updated_at timestamp with time zone DEFAULT now() NOT NULL, + CONSTRAINT check_3a3aedb8ba CHECK ((char_length(name) <= 255)) +); + +CREATE SEQUENCE pm_packages_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE pm_packages_id_seq OWNED BY pm_packages.id; + CREATE TABLE pool_repositories ( id bigint NOT NULL, shard_id integer NOT NULL, @@ -19447,6 +19977,28 @@ CREATE SEQUENCE pool_repositories_id_seq ALTER SEQUENCE pool_repositories_id_seq OWNED BY pool_repositories.id; +CREATE TABLE postgres_async_foreign_key_validations ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + name text NOT NULL, + table_name text NOT NULL, + last_error text, + attempts integer DEFAULT 0 NOT NULL, + CONSTRAINT check_536a40afbf CHECK ((char_length(last_error) <= 10000)), + CONSTRAINT check_74fb7c8e57 CHECK ((char_length(name) <= 63)), + CONSTRAINT check_cd435d6301 CHECK ((char_length(table_name) <= 63)) +); + +CREATE SEQUENCE postgres_async_foreign_key_validations_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE postgres_async_foreign_key_validations_id_seq OWNED BY postgres_async_foreign_key_validations.id; + CREATE TABLE postgres_async_indexes ( id bigint NOT NULL, created_at timestamp with time zone NOT NULL, @@ -19454,7 +20006,10 @@ CREATE TABLE postgres_async_indexes ( name text NOT NULL, definition text NOT NULL, table_name text NOT NULL, + attempts integer DEFAULT 0 NOT NULL, + last_error text, CONSTRAINT check_083b21157b CHECK ((char_length(definition) <= 2048)), + CONSTRAINT check_45dc23c315 CHECK ((char_length(last_error) <= 10000)), CONSTRAINT check_b732c6cd1d CHECK ((char_length(name) <= 63)), CONSTRAINT check_e64ff4359e CHECK ((char_length(table_name) <= 63)) ); @@ -19503,12 +20058,25 @@ CREATE VIEW postgres_foreign_keys AS SELECT pg_constraint.oid, pg_constraint.conname AS name, (((constrained_namespace.nspname)::text || '.'::text) || (constrained_table.relname)::text) AS constrained_table_identifier, - (((referenced_namespace.nspname)::text || '.'::text) || (referenced_table.relname)::text) AS referenced_table_identifier - FROM ((((pg_constraint + (((referenced_namespace.nspname)::text || '.'::text) || (referenced_table.relname)::text) AS referenced_table_identifier, + (constrained_table.relname)::text AS constrained_table_name, + (referenced_table.relname)::text AS referenced_table_name, + constrained_cols.constrained_columns, + referenced_cols.referenced_columns, + pg_constraint.confdeltype AS on_delete_action, + pg_constraint.confupdtype AS on_update_action, + (pg_constraint.coninhcount > 0) AS is_inherited + FROM ((((((pg_constraint JOIN pg_class constrained_table ON ((constrained_table.oid = pg_constraint.conrelid))) JOIN pg_class referenced_table ON ((referenced_table.oid = pg_constraint.confrelid))) JOIN pg_namespace constrained_namespace ON ((constrained_table.relnamespace = constrained_namespace.oid))) JOIN pg_namespace referenced_namespace ON ((referenced_table.relnamespace = referenced_namespace.oid))) + CROSS JOIN LATERAL ( SELECT array_agg(pg_attribute.attname ORDER BY conkey.idx) AS array_agg + FROM (unnest(pg_constraint.conkey) WITH ORDINALITY conkey(attnum, idx) + JOIN pg_attribute ON (((pg_attribute.attnum = conkey.attnum) AND (pg_attribute.attrelid = constrained_table.oid))))) constrained_cols(constrained_columns)) + CROSS JOIN LATERAL ( SELECT array_agg(pg_attribute.attname ORDER BY confkey.idx) AS array_agg + FROM (unnest(pg_constraint.confkey) WITH ORDINALITY confkey(attnum, idx) + JOIN pg_attribute ON (((pg_attribute.attnum = confkey.attnum) AND (pg_attribute.attrelid = referenced_table.oid))))) referenced_cols(referenced_columns)) WHERE (pg_constraint.contype = 'f'::"char"); CREATE VIEW postgres_index_bloat_estimates AS @@ -19830,7 +20398,7 @@ CREATE TABLE project_ci_cd_settings ( separated_caches boolean DEFAULT true NOT NULL, opt_in_jwt boolean DEFAULT false NOT NULL, allow_fork_pipelines_to_run_in_parent_project boolean DEFAULT true NOT NULL, - inbound_job_token_scope_enabled boolean DEFAULT false NOT NULL + inbound_job_token_scope_enabled boolean DEFAULT true NOT NULL ); CREATE SEQUENCE project_ci_cd_settings_id_seq @@ -19907,6 +20475,28 @@ CREATE SEQUENCE project_daily_statistics_id_seq ALTER SEQUENCE project_daily_statistics_id_seq OWNED BY project_daily_statistics.id; +CREATE TABLE project_data_transfers ( + id bigint NOT NULL, + project_id bigint NOT NULL, + namespace_id bigint NOT NULL, + repository_egress bigint DEFAULT 0 NOT NULL, + artifacts_egress bigint DEFAULT 0 NOT NULL, + packages_egress bigint DEFAULT 0 NOT NULL, + registry_egress bigint DEFAULT 0 NOT NULL, + date date NOT NULL, + created_at timestamp with time zone NOT NULL, + CONSTRAINT project_data_transfers_project_year_month_constraint CHECK ((date = date_trunc('month'::text, (date)::timestamp with time zone))) +); + +CREATE SEQUENCE project_data_transfers_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE project_data_transfers_id_seq OWNED BY project_data_transfers.id; + CREATE TABLE project_deploy_tokens ( id integer NOT NULL, project_id integer NOT NULL, @@ -20074,7 +20664,8 @@ CREATE TABLE project_mirror_data ( last_error text, last_update_at timestamp with time zone, last_successful_update_at timestamp with time zone, - correlation_id_value character varying(128) + correlation_id_value character varying(128), + checksums jsonb DEFAULT '{}'::jsonb NOT NULL ); CREATE SEQUENCE project_mirror_data_id_seq @@ -20244,6 +20835,11 @@ CREATE TABLE project_settings ( suggested_reviewers_enabled boolean DEFAULT false NOT NULL, only_allow_merge_if_all_status_checks_passed boolean DEFAULT false NOT NULL, mirror_branch_regex text, + allow_pipeline_trigger_approve_deployment boolean DEFAULT false NOT NULL, + emails_enabled boolean DEFAULT true NOT NULL, + pages_unique_domain_enabled boolean DEFAULT false NOT NULL, + pages_unique_domain text, + CONSTRAINT check_1a30456322 CHECK ((char_length(pages_unique_domain) <= 63)), CONSTRAINT check_2981f15877 CHECK ((char_length(jitsu_key) <= 100)), CONSTRAINT check_3a03e7557a CHECK ((char_length(previous_default_branch) <= 4096)), CONSTRAINT check_3ca5cbffe6 CHECK ((char_length(issue_branch_template) <= 255)), @@ -20608,7 +21204,7 @@ CREATE TABLE protected_environment_deploy_access_levels ( id integer NOT NULL, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - access_level integer DEFAULT 40, + access_level integer, protected_environment_id integer NOT NULL, user_id integer, group_id integer, @@ -20652,7 +21248,8 @@ CREATE TABLE protected_tag_create_access_levels ( user_id integer, group_id integer, created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL + updated_at timestamp without time zone NOT NULL, + deploy_key_id integer ); CREATE SEQUENCE protected_tag_create_access_levels_id_seq @@ -20912,7 +21509,8 @@ CREATE TABLE requirements_management_test_reports ( author_id bigint, state smallint NOT NULL, build_id bigint, - issue_id bigint + issue_id bigint, + uses_legacy_iid boolean DEFAULT true NOT NULL ); CREATE SEQUENCE requirements_management_test_reports_id_seq @@ -21173,7 +21771,8 @@ CREATE TABLE sbom_occurrences ( pipeline_id bigint, source_id bigint, commit_sha bytea NOT NULL, - component_id bigint NOT NULL + component_id bigint NOT NULL, + uuid uuid NOT NULL ); CREATE SEQUENCE sbom_occurrences_id_seq @@ -21219,6 +21818,25 @@ CREATE SEQUENCE sbom_vulnerable_component_versions_id_seq ALTER SEQUENCE sbom_vulnerable_component_versions_id_seq OWNED BY sbom_vulnerable_component_versions.id; +CREATE TABLE scan_result_policies ( + id bigint NOT NULL, + security_orchestration_policy_configuration_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + orchestration_policy_idx smallint NOT NULL, + license_states text[] DEFAULT '{}'::text[], + match_on_inclusion boolean +); + +CREATE SEQUENCE scan_result_policies_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE scan_result_policies_id_seq OWNED BY scan_result_policies.id; + CREATE TABLE scim_identities ( id bigint NOT NULL, group_id bigint, @@ -21406,7 +22024,8 @@ CREATE TABLE sent_notifications ( line_code character varying, note_type character varying, "position" text, - in_reply_to_discussion_id character varying + in_reply_to_discussion_id character varying, + id_convert_to_bigint bigint DEFAULT 0 NOT NULL ); CREATE SEQUENCE sent_notifications_id_seq @@ -21450,7 +22069,17 @@ CREATE TABLE service_desk_settings ( issue_template_key character varying(255), outgoing_name character varying(255), project_key character varying(255), - file_template_project_id bigint + file_template_project_id bigint, + custom_email_enabled boolean DEFAULT false NOT NULL, + custom_email text, + custom_email_smtp_address text, + custom_email_smtp_port integer, + custom_email_smtp_username text, + encrypted_custom_email_smtp_password bytea, + encrypted_custom_email_smtp_password_iv bytea, + CONSTRAINT check_57a79552e1 CHECK ((char_length(custom_email) <= 255)), + CONSTRAINT check_b283637a9e CHECK ((char_length(custom_email_smtp_address) <= 255)), + CONSTRAINT check_e3535d46ee CHECK ((char_length(custom_email_smtp_username) <= 255)) ); CREATE TABLE shards ( @@ -21467,6 +22096,21 @@ CREATE SEQUENCE shards_id_seq ALTER SEQUENCE shards_id_seq OWNED BY shards.id; +CREATE TABLE slack_api_scopes ( + id bigint NOT NULL, + name text NOT NULL, + CONSTRAINT check_738678187a CHECK ((char_length(name) <= 100)) +); + +CREATE SEQUENCE slack_api_scopes_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE slack_api_scopes_id_seq OWNED BY slack_api_scopes.id; + CREATE TABLE slack_integrations ( id integer NOT NULL, team_id character varying NOT NULL, @@ -21492,6 +22136,21 @@ CREATE SEQUENCE slack_integrations_id_seq ALTER SEQUENCE slack_integrations_id_seq OWNED BY slack_integrations.id; +CREATE TABLE slack_integrations_scopes ( + id bigint NOT NULL, + slack_api_scope_id bigint NOT NULL, + slack_integration_id bigint NOT NULL +); + +CREATE SEQUENCE slack_integrations_scopes_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE slack_integrations_scopes_id_seq OWNED BY slack_integrations_scopes.id; + CREATE TABLE smartcard_identities ( id bigint NOT NULL, user_id integer NOT NULL, @@ -21556,7 +22215,8 @@ CREATE TABLE snippet_user_mentions ( note_id integer, mentioned_users_ids integer[], mentioned_projects_ids integer[], - mentioned_groups_ids integer[] + mentioned_groups_ids integer[], + note_id_convert_to_bigint bigint ); CREATE SEQUENCE snippet_user_mentions_id_seq @@ -21605,7 +22265,8 @@ CREATE TABLE software_license_policies ( software_license_id integer NOT NULL, classification integer DEFAULT 0 NOT NULL, created_at timestamp with time zone NOT NULL, - updated_at timestamp with time zone NOT NULL + updated_at timestamp with time zone NOT NULL, + scan_result_policy_id bigint ); CREATE SEQUENCE software_license_policies_id_seq @@ -21691,7 +22352,9 @@ CREATE TABLE ssh_signatures ( project_id bigint NOT NULL, key_id bigint, verification_status smallint DEFAULT 0 NOT NULL, - commit_sha bytea NOT NULL + commit_sha bytea NOT NULL, + user_id bigint, + key_fingerprint_sha256 bytea ); CREATE SEQUENCE ssh_signatures_id_seq @@ -21790,7 +22453,8 @@ CREATE TABLE suggestions ( to_content text NOT NULL, lines_above integer DEFAULT 0 NOT NULL, lines_below integer DEFAULT 0 NOT NULL, - outdated boolean DEFAULT false NOT NULL + outdated boolean DEFAULT false NOT NULL, + note_id_convert_to_bigint bigint DEFAULT 0 NOT NULL ); CREATE SEQUENCE suggestions_id_seq @@ -21809,7 +22473,8 @@ CREATE TABLE system_note_metadata ( action character varying, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, - description_version_id bigint + description_version_id bigint, + note_id_convert_to_bigint bigint DEFAULT 0 NOT NULL ); CREATE SEQUENCE system_note_metadata_id_seq @@ -21965,6 +22630,7 @@ CREATE TABLE timelogs ( note_id integer, project_id integer, summary text, + note_id_convert_to_bigint bigint, CONSTRAINT check_271d321699 CHECK ((char_length(summary) <= 255)) ); @@ -21991,7 +22657,8 @@ CREATE TABLE todos ( note_id integer, commit_id character varying, group_id integer, - resolved_by_action smallint + resolved_by_action smallint, + note_id_convert_to_bigint bigint ); CREATE SEQUENCE todos_id_seq @@ -22142,6 +22809,26 @@ CREATE SEQUENCE uploads_id_seq ALTER SEQUENCE uploads_id_seq OWNED BY uploads.id; +CREATE TABLE user_achievements ( + id bigint NOT NULL, + achievement_id bigint NOT NULL, + user_id bigint NOT NULL, + awarded_by_user_id bigint, + revoked_by_user_id bigint, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + revoked_at timestamp with time zone +); + +CREATE SEQUENCE user_achievements_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE user_achievements_id_seq OWNED BY user_achievements.id; + CREATE TABLE user_agent_details ( id integer NOT NULL, user_agent character varying NOT NULL, @@ -22243,9 +22930,13 @@ CREATE TABLE user_details ( location text DEFAULT ''::text NOT NULL, organization text DEFAULT ''::text NOT NULL, password_last_changed_at timestamp with time zone DEFAULT now() NOT NULL, + onboarding_step_url text, + discord text DEFAULT ''::text NOT NULL, CONSTRAINT check_245664af82 CHECK ((char_length(webauthn_xid) <= 100)), CONSTRAINT check_444573ee52 CHECK ((char_length(skype) <= 500)), CONSTRAINT check_466a25be35 CHECK ((char_length(twitter) <= 500)), + CONSTRAINT check_4ef1de1a15 CHECK ((char_length(discord) <= 500)), + CONSTRAINT check_4f51129940 CHECK ((char_length(onboarding_step_url) <= 2000)), CONSTRAINT check_7b246dad73 CHECK ((char_length(organization) <= 500)), CONSTRAINT check_7d6489f8f3 CHECK ((char_length(linkedin) <= 500)), CONSTRAINT check_7fe2044093 CHECK ((char_length(website_url) <= 500)), @@ -22384,6 +23075,7 @@ CREATE TABLE user_preferences ( diffs_addition_color text, markdown_automatic_lists boolean DEFAULT true NOT NULL, use_legacy_web_ide boolean DEFAULT false NOT NULL, + use_new_navigation boolean, CONSTRAINT check_89bf269f41 CHECK ((char_length(diffs_deletion_color) <= 7)), CONSTRAINT check_d07ccd35f7 CHECK ((char_length(diffs_addition_color) <= 7)) ); @@ -22468,9 +23160,6 @@ CREATE TABLE users ( name character varying, admin boolean DEFAULT false NOT NULL, projects_limit integer NOT NULL, - skype character varying DEFAULT ''::character varying NOT NULL, - linkedin character varying DEFAULT ''::character varying NOT NULL, - twitter character varying DEFAULT ''::character varying NOT NULL, failed_attempts integer DEFAULT 0, locked_at timestamp without time zone, username character varying, @@ -22487,12 +23176,10 @@ CREATE TABLE users ( confirmation_sent_at timestamp without time zone, unconfirmed_email character varying, hide_no_ssh_key boolean DEFAULT false, - website_url character varying DEFAULT ''::character varying NOT NULL, admin_email_unsubscribed_at timestamp without time zone, notification_email character varying, hide_no_password boolean DEFAULT false, password_automatically_set boolean DEFAULT false, - location character varying, encrypted_otp_secret character varying, encrypted_otp_secret_iv character varying, encrypted_otp_secret_salt character varying, @@ -22509,7 +23196,6 @@ CREATE TABLE users ( otp_grace_period_started_at timestamp without time zone, external boolean DEFAULT false, incoming_email_token character varying, - organization character varying, auditor boolean DEFAULT false NOT NULL, require_two_factor_authentication_from_group boolean DEFAULT false NOT NULL, two_factor_grace_period integer DEFAULT 48 NOT NULL, @@ -22536,6 +23222,7 @@ CREATE TABLE users ( user_type smallint, static_object_token_encrypted text, otp_secret_expires_at timestamp with time zone, + onboarding_in_progress boolean DEFAULT false NOT NULL, CONSTRAINT check_7bde697e8e CHECK ((char_length(static_object_token_encrypted) <= 255)) ); @@ -23101,7 +23788,7 @@ CREATE TABLE vulnerability_state_transitions ( comment text, dismissal_reason smallint, CONSTRAINT check_d1ca8ec043 CHECK ((from_state <> to_state)), - CONSTRAINT check_fca4a7ca39 CHECK ((char_length(comment) <= 255)) + CONSTRAINT check_fe2eb6a0f3 CHECK ((char_length(comment) <= 50000)) ); CREATE SEQUENCE vulnerability_state_transitions_id_seq @@ -23144,7 +23831,8 @@ CREATE TABLE vulnerability_user_mentions ( note_id integer, mentioned_users_ids integer[], mentioned_projects_ids integer[], - mentioned_groups_ids integer[] + mentioned_groups_ids integer[], + note_id_convert_to_bigint bigint ); CREATE SEQUENCE vulnerability_user_mentions_id_seq @@ -23270,6 +23958,44 @@ CREATE SEQUENCE wiki_page_slugs_id_seq ALTER SEQUENCE wiki_page_slugs_id_seq OWNED BY wiki_page_slugs.id; +CREATE TABLE wiki_repository_states ( + id bigint NOT NULL, + verification_started_at timestamp with time zone, + verification_retry_at timestamp with time zone, + verified_at timestamp with time zone, + project_wiki_repository_id bigint NOT NULL, + verification_state smallint DEFAULT 0 NOT NULL, + verification_retry_count smallint, + verification_checksum bytea, + verification_failure text, + CONSTRAINT check_2933ff60dc CHECK ((char_length(verification_failure) <= 255)) +); + +CREATE SEQUENCE wiki_repository_states_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE wiki_repository_states_id_seq OWNED BY wiki_repository_states.id; + +CREATE TABLE work_item_hierarchy_restrictions ( + id bigint NOT NULL, + parent_type_id bigint NOT NULL, + child_type_id bigint NOT NULL, + maximum_depth smallint +); + +CREATE SEQUENCE work_item_hierarchy_restrictions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE work_item_hierarchy_restrictions_id_seq OWNED BY work_item_hierarchy_restrictions.id; + CREATE TABLE work_item_parent_links ( id bigint NOT NULL, work_item_id bigint NOT NULL, @@ -23288,6 +24014,13 @@ CREATE SEQUENCE work_item_parent_links_id_seq ALTER SEQUENCE work_item_parent_links_id_seq OWNED BY work_item_parent_links.id; +CREATE TABLE work_item_progresses ( + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + issue_id bigint NOT NULL, + progress smallint DEFAULT 0 NOT NULL +); + CREATE TABLE work_item_types ( id bigint NOT NULL, base_type smallint DEFAULT 0 NOT NULL, @@ -23312,6 +24045,25 @@ CREATE SEQUENCE work_item_types_id_seq ALTER SEQUENCE work_item_types_id_seq OWNED BY work_item_types.id; +CREATE TABLE work_item_widget_definitions ( + id bigint NOT NULL, + namespace_id bigint, + work_item_type_id bigint NOT NULL, + widget_type smallint NOT NULL, + disabled boolean DEFAULT false, + name text, + CONSTRAINT check_050f2e2328 CHECK ((char_length(name) <= 255)) +); + +CREATE SEQUENCE work_item_widget_definitions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE work_item_widget_definitions_id_seq OWNED BY work_item_widget_definitions.id; + CREATE TABLE x509_certificates ( id bigint NOT NULL, created_at timestamp with time zone NOT NULL, @@ -23394,6 +24146,42 @@ CREATE SEQUENCE zentao_tracker_data_id_seq ALTER SEQUENCE zentao_tracker_data_id_seq OWNED BY zentao_tracker_data.id; +CREATE TABLE zoekt_indexed_namespaces ( + id bigint NOT NULL, + zoekt_shard_id bigint NOT NULL, + namespace_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL +); + +CREATE SEQUENCE zoekt_indexed_namespaces_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE zoekt_indexed_namespaces_id_seq OWNED BY zoekt_indexed_namespaces.id; + +CREATE TABLE zoekt_shards ( + id bigint NOT NULL, + index_base_url text NOT NULL, + search_base_url text NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + CONSTRAINT check_61794bac26 CHECK ((char_length(search_base_url) <= 1024)), + CONSTRAINT check_c65bb85a32 CHECK ((char_length(index_base_url) <= 1024)) +); + +CREATE SEQUENCE zoekt_shards_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE zoekt_shards_id_seq OWNED BY zoekt_shards.id; + CREATE TABLE zoom_meetings ( id bigint NOT NULL, project_id bigint NOT NULL, @@ -23415,12 +24203,16 @@ ALTER SEQUENCE zoom_meetings_id_seq OWNED BY zoom_meetings.id; ALTER TABLE ONLY abuse_reports ALTER COLUMN id SET DEFAULT nextval('abuse_reports_id_seq'::regclass); +ALTER TABLE ONLY achievements ALTER COLUMN id SET DEFAULT nextval('achievements_id_seq'::regclass); + ALTER TABLE ONLY agent_activity_events ALTER COLUMN id SET DEFAULT nextval('agent_activity_events_id_seq'::regclass); ALTER TABLE ONLY agent_group_authorizations ALTER COLUMN id SET DEFAULT nextval('agent_group_authorizations_id_seq'::regclass); ALTER TABLE ONLY agent_project_authorizations ALTER COLUMN id SET DEFAULT nextval('agent_project_authorizations_id_seq'::regclass); +ALTER TABLE ONLY airflow_dags ALTER COLUMN id SET DEFAULT nextval('airflow_dags_id_seq'::regclass); + ALTER TABLE ONLY alert_management_alert_assignees ALTER COLUMN id SET DEFAULT nextval('alert_management_alert_assignees_id_seq'::regclass); ALTER TABLE ONLY alert_management_alert_metric_images ALTER COLUMN id SET DEFAULT nextval('alert_management_alert_metric_images_id_seq'::regclass); @@ -23443,6 +24235,8 @@ ALTER TABLE ONLY analytics_cycle_analytics_project_value_streams ALTER COLUMN id ALTER TABLE ONLY analytics_cycle_analytics_stage_event_hashes ALTER COLUMN id SET DEFAULT nextval('analytics_cycle_analytics_stage_event_hashes_id_seq'::regclass); +ALTER TABLE ONLY analytics_dashboards_pointers ALTER COLUMN id SET DEFAULT nextval('analytics_dashboards_pointers_id_seq'::regclass); + ALTER TABLE ONLY analytics_devops_adoption_segments ALTER COLUMN id SET DEFAULT nextval('analytics_devops_adoption_segments_id_seq'::regclass); ALTER TABLE ONLY analytics_devops_adoption_snapshots ALTER COLUMN id SET DEFAULT nextval('analytics_devops_adoption_snapshots_id_seq'::regclass); @@ -23489,6 +24283,8 @@ ALTER TABLE ONLY audit_events_streaming_headers ALTER COLUMN id SET DEFAULT next ALTER TABLE ONLY authentication_events ALTER COLUMN id SET DEFAULT nextval('authentication_events_id_seq'::regclass); +ALTER TABLE ONLY automation_rules ALTER COLUMN id SET DEFAULT nextval('automation_rules_id_seq'::regclass); + ALTER TABLE ONLY award_emoji ALTER COLUMN id SET DEFAULT nextval('award_emoji_id_seq'::regclass); ALTER TABLE ONLY background_migration_jobs ALTER COLUMN id SET DEFAULT nextval('background_migration_jobs_id_seq'::regclass); @@ -23609,6 +24405,8 @@ ALTER TABLE ONLY ci_resource_groups ALTER COLUMN id SET DEFAULT nextval('ci_reso ALTER TABLE ONLY ci_resources ALTER COLUMN id SET DEFAULT nextval('ci_resources_id_seq'::regclass); +ALTER TABLE ONLY ci_runner_machines ALTER COLUMN id SET DEFAULT nextval('ci_runner_machines_id_seq'::regclass); + ALTER TABLE ONLY ci_runner_namespaces ALTER COLUMN id SET DEFAULT nextval('ci_runner_namespaces_id_seq'::regclass); ALTER TABLE ONLY ci_runner_projects ALTER COLUMN id SET DEFAULT nextval('ci_runner_projects_id_seq'::regclass); @@ -23697,12 +24495,20 @@ ALTER TABLE ONLY customer_relations_contacts ALTER COLUMN id SET DEFAULT nextval ALTER TABLE ONLY customer_relations_organizations ALTER COLUMN id SET DEFAULT nextval('customer_relations_organizations_id_seq'::regclass); +ALTER TABLE ONLY dast_pre_scan_verification_steps ALTER COLUMN id SET DEFAULT nextval('dast_pre_scan_verification_steps_id_seq'::regclass); + +ALTER TABLE ONLY dast_pre_scan_verifications ALTER COLUMN id SET DEFAULT nextval('dast_pre_scan_verifications_id_seq'::regclass); + ALTER TABLE ONLY dast_profile_schedules ALTER COLUMN id SET DEFAULT nextval('dast_profile_schedules_id_seq'::regclass); ALTER TABLE ONLY dast_profiles ALTER COLUMN id SET DEFAULT nextval('dast_profiles_id_seq'::regclass); +ALTER TABLE ONLY dast_profiles_tags ALTER COLUMN id SET DEFAULT nextval('dast_profiles_tags_id_seq'::regclass); + ALTER TABLE ONLY dast_scanner_profiles ALTER COLUMN id SET DEFAULT nextval('dast_scanner_profiles_id_seq'::regclass); +ALTER TABLE ONLY dast_scanner_profiles_tags ALTER COLUMN id SET DEFAULT nextval('dast_scanner_profiles_tags_id_seq'::regclass); + ALTER TABLE ONLY dast_site_profile_secret_variables ALTER COLUMN id SET DEFAULT nextval('dast_site_profile_secret_variables_id_seq'::regclass); ALTER TABLE ONLY dast_site_profiles ALTER COLUMN id SET DEFAULT nextval('dast_site_profiles_id_seq'::regclass); @@ -23713,6 +24519,8 @@ ALTER TABLE ONLY dast_site_validations ALTER COLUMN id SET DEFAULT nextval('dast ALTER TABLE ONLY dast_sites ALTER COLUMN id SET DEFAULT nextval('dast_sites_id_seq'::regclass); +ALTER TABLE ONLY dependency_list_exports ALTER COLUMN id SET DEFAULT nextval('dependency_list_exports_id_seq'::regclass); + ALTER TABLE ONLY dependency_proxy_blobs ALTER COLUMN id SET DEFAULT nextval('dependency_proxy_blobs_id_seq'::regclass); ALTER TABLE ONLY dependency_proxy_group_settings ALTER COLUMN id SET DEFAULT nextval('dependency_proxy_group_settings_id_seq'::regclass); @@ -23779,10 +24587,6 @@ ALTER TABLE ONLY events ALTER COLUMN id SET DEFAULT nextval('events_id_seq'::reg ALTER TABLE ONLY evidences ALTER COLUMN id SET DEFAULT nextval('evidences_id_seq'::regclass); -ALTER TABLE ONLY experiment_subjects ALTER COLUMN id SET DEFAULT nextval('experiment_subjects_id_seq'::regclass); - -ALTER TABLE ONLY experiments ALTER COLUMN id SET DEFAULT nextval('experiments_id_seq'::regclass); - ALTER TABLE ONLY external_approval_rules ALTER COLUMN id SET DEFAULT nextval('external_approval_rules_id_seq'::regclass); ALTER TABLE ONLY external_approval_rules_protected_branches ALTER COLUMN id SET DEFAULT nextval('external_approval_rules_protected_branches_id_seq'::regclass); @@ -23803,8 +24607,6 @@ ALTER TABLE ONLY fork_networks ALTER COLUMN id SET DEFAULT nextval('fork_network ALTER TABLE ONLY geo_cache_invalidation_events ALTER COLUMN id SET DEFAULT nextval('geo_cache_invalidation_events_id_seq'::regclass); -ALTER TABLE ONLY geo_container_repository_updated_events ALTER COLUMN id SET DEFAULT nextval('geo_container_repository_updated_events_id_seq'::regclass); - ALTER TABLE ONLY geo_event_log ALTER COLUMN id SET DEFAULT nextval('geo_event_log_id_seq'::regclass); ALTER TABLE ONLY geo_events ALTER COLUMN id SET DEFAULT nextval('geo_events_id_seq'::regclass); @@ -24007,12 +24809,16 @@ ALTER TABLE ONLY metrics_users_starred_dashboards ALTER COLUMN id SET DEFAULT ne ALTER TABLE ONLY milestones ALTER COLUMN id SET DEFAULT nextval('milestones_id_seq'::regclass); +ALTER TABLE ONLY ml_candidate_metadata ALTER COLUMN id SET DEFAULT nextval('ml_candidate_metadata_id_seq'::regclass); + ALTER TABLE ONLY ml_candidate_metrics ALTER COLUMN id SET DEFAULT nextval('ml_candidate_metrics_id_seq'::regclass); ALTER TABLE ONLY ml_candidate_params ALTER COLUMN id SET DEFAULT nextval('ml_candidate_params_id_seq'::regclass); ALTER TABLE ONLY ml_candidates ALTER COLUMN id SET DEFAULT nextval('ml_candidates_id_seq'::regclass); +ALTER TABLE ONLY ml_experiment_metadata ALTER COLUMN id SET DEFAULT nextval('ml_experiment_metadata_id_seq'::regclass); + ALTER TABLE ONLY ml_experiments ALTER COLUMN id SET DEFAULT nextval('ml_experiments_id_seq'::regclass); ALTER TABLE ONLY namespace_admin_notes ALTER COLUMN id SET DEFAULT nextval('namespace_admin_notes_id_seq'::regclass); @@ -24025,6 +24831,8 @@ ALTER TABLE ONLY namespace_statistics ALTER COLUMN id SET DEFAULT nextval('names ALTER TABLE ONLY namespaces ALTER COLUMN id SET DEFAULT nextval('namespaces_id_seq'::regclass); +ALTER TABLE ONLY namespaces_storage_limit_exclusions ALTER COLUMN id SET DEFAULT nextval('namespaces_storage_limit_exclusions_id_seq'::regclass); + ALTER TABLE ONLY namespaces_sync_events ALTER COLUMN id SET DEFAULT nextval('namespaces_sync_events_id_seq'::regclass); ALTER TABLE ONLY note_diff_files ALTER COLUMN id SET DEFAULT nextval('note_diff_files_id_seq'::regclass); @@ -24125,8 +24933,18 @@ ALTER TABLE ONLY plan_limits ALTER COLUMN id SET DEFAULT nextval('plan_limits_id ALTER TABLE ONLY plans ALTER COLUMN id SET DEFAULT nextval('plans_id_seq'::regclass); +ALTER TABLE ONLY pm_licenses ALTER COLUMN id SET DEFAULT nextval('pm_licenses_id_seq'::regclass); + +ALTER TABLE ONLY pm_package_version_licenses ALTER COLUMN id SET DEFAULT nextval('pm_package_version_licenses_id_seq'::regclass); + +ALTER TABLE ONLY pm_package_versions ALTER COLUMN id SET DEFAULT nextval('pm_package_versions_id_seq'::regclass); + +ALTER TABLE ONLY pm_packages ALTER COLUMN id SET DEFAULT nextval('pm_packages_id_seq'::regclass); + ALTER TABLE ONLY pool_repositories ALTER COLUMN id SET DEFAULT nextval('pool_repositories_id_seq'::regclass); +ALTER TABLE ONLY postgres_async_foreign_key_validations ALTER COLUMN id SET DEFAULT nextval('postgres_async_foreign_key_validations_id_seq'::regclass); + ALTER TABLE ONLY postgres_async_indexes ALTER COLUMN id SET DEFAULT nextval('postgres_async_indexes_id_seq'::regclass); ALTER TABLE ONLY postgres_reindex_actions ALTER COLUMN id SET DEFAULT nextval('postgres_reindex_actions_id_seq'::regclass); @@ -24153,6 +24971,8 @@ ALTER TABLE ONLY project_custom_attributes ALTER COLUMN id SET DEFAULT nextval(' ALTER TABLE ONLY project_daily_statistics ALTER COLUMN id SET DEFAULT nextval('project_daily_statistics_id_seq'::regclass); +ALTER TABLE ONLY project_data_transfers ALTER COLUMN id SET DEFAULT nextval('project_data_transfers_id_seq'::regclass); + ALTER TABLE ONLY project_deploy_tokens ALTER COLUMN id SET DEFAULT nextval('project_deploy_tokens_id_seq'::regclass); ALTER TABLE ONLY project_export_jobs ALTER COLUMN id SET DEFAULT nextval('project_export_jobs_id_seq'::regclass); @@ -24263,6 +25083,8 @@ ALTER TABLE ONLY sbom_sources ALTER COLUMN id SET DEFAULT nextval('sbom_sources_ ALTER TABLE ONLY sbom_vulnerable_component_versions ALTER COLUMN id SET DEFAULT nextval('sbom_vulnerable_component_versions_id_seq'::regclass); +ALTER TABLE ONLY scan_result_policies ALTER COLUMN id SET DEFAULT nextval('scan_result_policies_id_seq'::regclass); + ALTER TABLE ONLY scim_identities ALTER COLUMN id SET DEFAULT nextval('scim_identities_id_seq'::regclass); ALTER TABLE ONLY scim_oauth_access_tokens ALTER COLUMN id SET DEFAULT nextval('scim_oauth_access_tokens_id_seq'::regclass); @@ -24287,8 +25109,12 @@ ALTER TABLE ONLY sentry_issues ALTER COLUMN id SET DEFAULT nextval('sentry_issue ALTER TABLE ONLY shards ALTER COLUMN id SET DEFAULT nextval('shards_id_seq'::regclass); +ALTER TABLE ONLY slack_api_scopes ALTER COLUMN id SET DEFAULT nextval('slack_api_scopes_id_seq'::regclass); + ALTER TABLE ONLY slack_integrations ALTER COLUMN id SET DEFAULT nextval('slack_integrations_id_seq'::regclass); +ALTER TABLE ONLY slack_integrations_scopes ALTER COLUMN id SET DEFAULT nextval('slack_integrations_scopes_id_seq'::regclass); + ALTER TABLE ONLY smartcard_identities ALTER COLUMN id SET DEFAULT nextval('smartcard_identities_id_seq'::regclass); ALTER TABLE ONLY snippet_repository_storage_moves ALTER COLUMN id SET DEFAULT nextval('snippet_repository_storage_moves_id_seq'::regclass); @@ -24349,6 +25175,8 @@ ALTER TABLE ONLY upload_states ALTER COLUMN upload_id SET DEFAULT nextval('uploa ALTER TABLE ONLY uploads ALTER COLUMN id SET DEFAULT nextval('uploads_id_seq'::regclass); +ALTER TABLE ONLY user_achievements ALTER COLUMN id SET DEFAULT nextval('user_achievements_id_seq'::regclass); + ALTER TABLE ONLY user_agent_details ALTER COLUMN id SET DEFAULT nextval('user_agent_details_id_seq'::regclass); ALTER TABLE ONLY user_callouts ALTER COLUMN id SET DEFAULT nextval('user_callouts_id_seq'::regclass); @@ -24437,10 +25265,16 @@ ALTER TABLE ONLY wiki_page_meta ALTER COLUMN id SET DEFAULT nextval('wiki_page_m ALTER TABLE ONLY wiki_page_slugs ALTER COLUMN id SET DEFAULT nextval('wiki_page_slugs_id_seq'::regclass); +ALTER TABLE ONLY wiki_repository_states ALTER COLUMN id SET DEFAULT nextval('wiki_repository_states_id_seq'::regclass); + +ALTER TABLE ONLY work_item_hierarchy_restrictions ALTER COLUMN id SET DEFAULT nextval('work_item_hierarchy_restrictions_id_seq'::regclass); + ALTER TABLE ONLY work_item_parent_links ALTER COLUMN id SET DEFAULT nextval('work_item_parent_links_id_seq'::regclass); ALTER TABLE ONLY work_item_types ALTER COLUMN id SET DEFAULT nextval('work_item_types_id_seq'::regclass); +ALTER TABLE ONLY work_item_widget_definitions ALTER COLUMN id SET DEFAULT nextval('work_item_widget_definitions_id_seq'::regclass); + ALTER TABLE ONLY x509_certificates ALTER COLUMN id SET DEFAULT nextval('x509_certificates_id_seq'::regclass); ALTER TABLE ONLY x509_commit_signatures ALTER COLUMN id SET DEFAULT nextval('x509_commit_signatures_id_seq'::regclass); @@ -24449,6 +25283,10 @@ ALTER TABLE ONLY x509_issuers ALTER COLUMN id SET DEFAULT nextval('x509_issuers_ ALTER TABLE ONLY zentao_tracker_data ALTER COLUMN id SET DEFAULT nextval('zentao_tracker_data_id_seq'::regclass); +ALTER TABLE ONLY zoekt_indexed_namespaces ALTER COLUMN id SET DEFAULT nextval('zoekt_indexed_namespaces_id_seq'::regclass); + +ALTER TABLE ONLY zoekt_shards ALTER COLUMN id SET DEFAULT nextval('zoekt_shards_id_seq'::regclass); + ALTER TABLE ONLY zoom_meetings ALTER COLUMN id SET DEFAULT nextval('zoom_meetings_id_seq'::regclass); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events @@ -25042,6 +25880,9 @@ ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_ ALTER TABLE ONLY abuse_reports ADD CONSTRAINT abuse_reports_pkey PRIMARY KEY (id); +ALTER TABLE ONLY achievements + ADD CONSTRAINT achievements_pkey PRIMARY KEY (id); + ALTER TABLE ONLY agent_activity_events ADD CONSTRAINT agent_activity_events_pkey PRIMARY KEY (id); @@ -25051,6 +25892,9 @@ ALTER TABLE ONLY agent_group_authorizations ALTER TABLE ONLY agent_project_authorizations ADD CONSTRAINT agent_project_authorizations_pkey PRIMARY KEY (id); +ALTER TABLE ONLY airflow_dags + ADD CONSTRAINT airflow_dags_pkey PRIMARY KEY (id); + ALTER TABLE ONLY alert_management_alert_assignees ADD CONSTRAINT alert_management_alert_assignees_pkey PRIMARY KEY (id); @@ -25087,6 +25931,9 @@ ALTER TABLE ONLY analytics_cycle_analytics_project_value_streams ALTER TABLE ONLY analytics_cycle_analytics_stage_event_hashes ADD CONSTRAINT analytics_cycle_analytics_stage_event_hashes_pkey PRIMARY KEY (id); +ALTER TABLE ONLY analytics_dashboards_pointers + ADD CONSTRAINT analytics_dashboards_pointers_pkey PRIMARY KEY (id); + ALTER TABLE ONLY analytics_devops_adoption_segments ADD CONSTRAINT analytics_devops_adoption_segments_pkey PRIMARY KEY (id); @@ -25162,6 +26009,9 @@ ALTER TABLE ONLY audit_events_streaming_headers ALTER TABLE ONLY authentication_events ADD CONSTRAINT authentication_events_pkey PRIMARY KEY (id); +ALTER TABLE ONLY automation_rules + ADD CONSTRAINT automation_rules_pkey PRIMARY KEY (id); + ALTER TABLE ONLY award_emoji ADD CONSTRAINT award_emoji_pkey PRIMARY KEY (id); @@ -25258,6 +26108,9 @@ ALTER TABLE ONLY chat_teams ALTER TABLE vulnerability_scanners ADD CONSTRAINT check_37608c9db5 CHECK ((char_length(vendor) <= 255)) NOT VALID; +ALTER TABLE oauth_access_tokens + ADD CONSTRAINT check_70f294ef54 CHECK ((expires_in IS NOT NULL)) NOT VALID; + ALTER TABLE sprints ADD CONSTRAINT check_ccd8a1eae0 CHECK ((start_date IS NOT NULL)) NOT VALID; @@ -25267,6 +26120,9 @@ ALTER TABLE group_import_states ALTER TABLE sprints ADD CONSTRAINT check_df3816aed7 CHECK ((due_date IS NOT NULL)) NOT VALID; +ALTER TABLE web_hook_logs + ADD CONSTRAINT check_df72cb58f5 CHECK ((char_length(url_hash) <= 44)) NOT VALID; + ALTER TABLE projects ADD CONSTRAINT check_fa75869cb1 CHECK ((project_namespace_id IS NOT NULL)) NOT VALID; @@ -25384,6 +26240,9 @@ ALTER TABLE ONLY ci_resource_groups ALTER TABLE ONLY ci_resources ADD CONSTRAINT ci_resources_pkey PRIMARY KEY (id); +ALTER TABLE ONLY ci_runner_machines + ADD CONSTRAINT ci_runner_machines_pkey PRIMARY KEY (id); + ALTER TABLE ONLY ci_runner_namespaces ADD CONSTRAINT ci_runner_namespaces_pkey PRIMARY KEY (id); @@ -25525,6 +26384,12 @@ ALTER TABLE ONLY customer_relations_contacts ALTER TABLE ONLY customer_relations_organizations ADD CONSTRAINT customer_relations_organizations_pkey PRIMARY KEY (id); +ALTER TABLE ONLY dast_pre_scan_verification_steps + ADD CONSTRAINT dast_pre_scan_verification_steps_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY dast_pre_scan_verifications + ADD CONSTRAINT dast_pre_scan_verifications_pkey PRIMARY KEY (id); + ALTER TABLE ONLY dast_profile_schedules ADD CONSTRAINT dast_profile_schedules_pkey PRIMARY KEY (id); @@ -25534,12 +26399,18 @@ ALTER TABLE ONLY dast_profiles_pipelines ALTER TABLE ONLY dast_profiles ADD CONSTRAINT dast_profiles_pkey PRIMARY KEY (id); +ALTER TABLE ONLY dast_profiles_tags + ADD CONSTRAINT dast_profiles_tags_pkey PRIMARY KEY (id); + ALTER TABLE ONLY dast_scanner_profiles_builds ADD CONSTRAINT dast_scanner_profiles_builds_pkey PRIMARY KEY (dast_scanner_profile_id, ci_build_id); ALTER TABLE ONLY dast_scanner_profiles ADD CONSTRAINT dast_scanner_profiles_pkey PRIMARY KEY (id); +ALTER TABLE ONLY dast_scanner_profiles_tags + ADD CONSTRAINT dast_scanner_profiles_tags_pkey PRIMARY KEY (id); + ALTER TABLE ONLY dast_site_profile_secret_variables ADD CONSTRAINT dast_site_profile_secret_variables_pkey PRIMARY KEY (id); @@ -25561,6 +26432,9 @@ ALTER TABLE ONLY dast_site_validations ALTER TABLE ONLY dast_sites ADD CONSTRAINT dast_sites_pkey PRIMARY KEY (id); +ALTER TABLE ONLY dependency_list_exports + ADD CONSTRAINT dependency_list_exports_pkey PRIMARY KEY (id); + ALTER TABLE ONLY dependency_proxy_blob_states ADD CONSTRAINT dependency_proxy_blob_states_pkey PRIMARY KEY (dependency_proxy_blob_id); @@ -25573,6 +26447,9 @@ ALTER TABLE ONLY dependency_proxy_group_settings ALTER TABLE ONLY dependency_proxy_image_ttl_group_policies ADD CONSTRAINT dependency_proxy_image_ttl_group_policies_pkey PRIMARY KEY (group_id); +ALTER TABLE ONLY dependency_proxy_manifest_states + ADD CONSTRAINT dependency_proxy_manifest_states_pkey PRIMARY KEY (dependency_proxy_manifest_id); + ALTER TABLE ONLY dependency_proxy_manifests ADD CONSTRAINT dependency_proxy_manifests_pkey PRIMARY KEY (id); @@ -25627,6 +26504,9 @@ ALTER TABLE ONLY dora_daily_metrics ALTER TABLE ONLY draft_notes ADD CONSTRAINT draft_notes_pkey PRIMARY KEY (id); +ALTER TABLE ONLY elastic_group_index_statuses + ADD CONSTRAINT elastic_group_index_statuses_pkey PRIMARY KEY (namespace_id); + ALTER TABLE ONLY elastic_index_settings ADD CONSTRAINT elastic_index_settings_pkey PRIMARY KEY (id); @@ -25678,12 +26558,6 @@ ALTER TABLE ONLY events ALTER TABLE ONLY evidences ADD CONSTRAINT evidences_pkey PRIMARY KEY (id); -ALTER TABLE ONLY experiment_subjects - ADD CONSTRAINT experiment_subjects_pkey PRIMARY KEY (id); - -ALTER TABLE ONLY experiments - ADD CONSTRAINT experiments_pkey PRIMARY KEY (id); - ALTER TABLE ONLY external_approval_rules ADD CONSTRAINT external_approval_rules_pkey PRIMARY KEY (id); @@ -25714,9 +26588,6 @@ ALTER TABLE ONLY fork_networks ALTER TABLE ONLY geo_cache_invalidation_events ADD CONSTRAINT geo_cache_invalidation_events_pkey PRIMARY KEY (id); -ALTER TABLE ONLY geo_container_repository_updated_events - ADD CONSTRAINT geo_container_repository_updated_events_pkey PRIMARY KEY (id); - ALTER TABLE ONLY geo_event_log ADD CONSTRAINT geo_event_log_pkey PRIMARY KEY (id); @@ -26059,6 +26930,9 @@ ALTER TABLE ONLY milestone_releases ALTER TABLE ONLY milestones ADD CONSTRAINT milestones_pkey PRIMARY KEY (id); +ALTER TABLE ONLY ml_candidate_metadata + ADD CONSTRAINT ml_candidate_metadata_pkey PRIMARY KEY (id); + ALTER TABLE ONLY ml_candidate_metrics ADD CONSTRAINT ml_candidate_metrics_pkey PRIMARY KEY (id); @@ -26068,6 +26942,9 @@ ALTER TABLE ONLY ml_candidate_params ALTER TABLE ONLY ml_candidates ADD CONSTRAINT ml_candidates_pkey PRIMARY KEY (id); +ALTER TABLE ONLY ml_experiment_metadata + ADD CONSTRAINT ml_experiment_metadata_pkey PRIMARY KEY (id); + ALTER TABLE ONLY ml_experiments ADD CONSTRAINT ml_experiments_pkey PRIMARY KEY (id); @@ -26107,6 +26984,9 @@ ALTER TABLE ONLY namespace_statistics ALTER TABLE ONLY namespaces ADD CONSTRAINT namespaces_pkey PRIMARY KEY (id); +ALTER TABLE ONLY namespaces_storage_limit_exclusions + ADD CONSTRAINT namespaces_storage_limit_exclusions_pkey PRIMARY KEY (id); + ALTER TABLE ONLY namespaces_sync_events ADD CONSTRAINT namespaces_sync_events_pkey PRIMARY KEY (id); @@ -26284,9 +27164,27 @@ ALTER TABLE ONLY plan_limits ALTER TABLE ONLY plans ADD CONSTRAINT plans_pkey PRIMARY KEY (id); +ALTER TABLE ONLY pm_checkpoints + ADD CONSTRAINT pm_checkpoints_pkey PRIMARY KEY (purl_type); + +ALTER TABLE ONLY pm_licenses + ADD CONSTRAINT pm_licenses_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY pm_package_version_licenses + ADD CONSTRAINT pm_package_version_licenses_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY pm_package_versions + ADD CONSTRAINT pm_package_versions_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY pm_packages + ADD CONSTRAINT pm_packages_pkey PRIMARY KEY (id); + ALTER TABLE ONLY pool_repositories ADD CONSTRAINT pool_repositories_pkey PRIMARY KEY (id); +ALTER TABLE ONLY postgres_async_foreign_key_validations + ADD CONSTRAINT postgres_async_foreign_key_validations_pkey PRIMARY KEY (id); + ALTER TABLE ONLY postgres_async_indexes ADD CONSTRAINT postgres_async_indexes_pkey PRIMARY KEY (id); @@ -26332,6 +27230,9 @@ ALTER TABLE ONLY project_custom_attributes ALTER TABLE ONLY project_daily_statistics ADD CONSTRAINT project_daily_statistics_pkey PRIMARY KEY (id); +ALTER TABLE ONLY project_data_transfers + ADD CONSTRAINT project_data_transfers_pkey PRIMARY KEY (id); + ALTER TABLE ONLY project_deploy_tokens ADD CONSTRAINT project_deploy_tokens_pkey PRIMARY KEY (id); @@ -26524,6 +27425,9 @@ ALTER TABLE ONLY sbom_sources ALTER TABLE ONLY sbom_vulnerable_component_versions ADD CONSTRAINT sbom_vulnerable_component_versions_pkey PRIMARY KEY (id); +ALTER TABLE ONLY scan_result_policies + ADD CONSTRAINT scan_result_policies_pkey PRIMARY KEY (id); + ALTER TABLE ONLY scim_identities ADD CONSTRAINT scim_identities_pkey PRIMARY KEY (id); @@ -26569,9 +27473,15 @@ ALTER TABLE ONLY service_desk_settings ALTER TABLE ONLY shards ADD CONSTRAINT shards_pkey PRIMARY KEY (id); +ALTER TABLE ONLY slack_api_scopes + ADD CONSTRAINT slack_api_scopes_pkey PRIMARY KEY (id); + ALTER TABLE ONLY slack_integrations ADD CONSTRAINT slack_integrations_pkey PRIMARY KEY (id); +ALTER TABLE ONLY slack_integrations_scopes + ADD CONSTRAINT slack_integrations_scopes_pkey PRIMARY KEY (id); + ALTER TABLE ONLY smartcard_identities ADD CONSTRAINT smartcard_identities_pkey PRIMARY KEY (id); @@ -26668,6 +27578,9 @@ ALTER TABLE ONLY upload_states ALTER TABLE ONLY uploads ADD CONSTRAINT uploads_pkey PRIMARY KEY (id); +ALTER TABLE ONLY user_achievements + ADD CONSTRAINT user_achievements_pkey PRIMARY KEY (id); + ALTER TABLE ONLY user_agent_details ADD CONSTRAINT user_agent_details_pkey PRIMARY KEY (id); @@ -26821,12 +27734,24 @@ ALTER TABLE ONLY wiki_page_meta ALTER TABLE ONLY wiki_page_slugs ADD CONSTRAINT wiki_page_slugs_pkey PRIMARY KEY (id); +ALTER TABLE ONLY wiki_repository_states + ADD CONSTRAINT wiki_repository_states_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY work_item_hierarchy_restrictions + ADD CONSTRAINT work_item_hierarchy_restrictions_pkey PRIMARY KEY (id); + ALTER TABLE ONLY work_item_parent_links ADD CONSTRAINT work_item_parent_links_pkey PRIMARY KEY (id); +ALTER TABLE ONLY work_item_progresses + ADD CONSTRAINT work_item_progresses_pkey PRIMARY KEY (issue_id); + ALTER TABLE ONLY work_item_types ADD CONSTRAINT work_item_types_pkey PRIMARY KEY (id); +ALTER TABLE ONLY work_item_widget_definitions + ADD CONSTRAINT work_item_widget_definitions_pkey PRIMARY KEY (id); + ALTER TABLE ONLY x509_certificates ADD CONSTRAINT x509_certificates_pkey PRIMARY KEY (id); @@ -26839,6 +27764,12 @@ ALTER TABLE ONLY x509_issuers ALTER TABLE ONLY zentao_tracker_data ADD CONSTRAINT zentao_tracker_data_pkey PRIMARY KEY (id); +ALTER TABLE ONLY zoekt_indexed_namespaces + ADD CONSTRAINT zoekt_indexed_namespaces_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY zoekt_shards + ADD CONSTRAINT zoekt_shards_pkey PRIMARY KEY (id); + ALTER TABLE ONLY zoom_meetings ADD CONSTRAINT zoom_meetings_pkey PRIMARY KEY (id); @@ -27760,8 +28691,6 @@ CREATE INDEX product_analytics_events_exper_project_id_collector_tstamp_idx9 ON CREATE INDEX product_analytics_events_experi_project_id_collector_tstamp_idx ON gitlab_partitions_static.product_analytics_events_experimental_00 USING btree (project_id, collector_tstamp); -CREATE INDEX active_billable_users ON users USING btree (id) WHERE (((state)::text = 'active'::text) AND ((user_type IS NULL) OR (user_type = ANY (ARRAY[NULL::integer, 6, 4]))) AND ((user_type IS NULL) OR (user_type <> ALL ('{2,6,1,3,7,8}'::smallint[])))); - CREATE INDEX analytics_index_audit_events_part_on_created_at_and_author_id ON ONLY audit_events USING btree (created_at, author_id); CREATE INDEX analytics_index_events_on_created_at_and_author_id ON events USING btree (created_at, author_id); @@ -27784,6 +28713,8 @@ CREATE INDEX ca_aggregations_last_incremental_run_at ON analytics_cycle_analytic CREATE INDEX ci_builds_gitlab_monitor_metrics ON ci_builds USING btree (status, created_at, project_id) WHERE ((type)::text = 'Ci::Build'::text); +CREATE UNIQUE INDEX ci_job_token_scope_links_source_and_target_project_direction ON ci_job_token_project_scope_links USING btree (source_project_id, target_project_id, direction); + CREATE INDEX ci_pipeline_artifacts_on_expire_at_for_removal ON ci_pipeline_artifacts USING btree (expire_at) WHERE ((locked = 0) AND (expire_at IS NOT NULL)); CREATE INDEX code_owner_approval_required ON protected_branches USING btree (project_id, code_owner_approval_required) WHERE (code_owner_approval_required = true); @@ -27792,6 +28723,8 @@ CREATE UNIQUE INDEX commit_user_mentions_on_commit_id_and_note_id_unique_index O CREATE INDEX composer_cache_files_index_on_deleted_at ON packages_composer_cache_files USING btree (delete_at, id); +CREATE UNIQUE INDEX custom_email_unique_constraint ON service_desk_settings USING btree (custom_email); + CREATE UNIQUE INDEX dast_scanner_profiles_builds_on_ci_build_id ON dast_scanner_profiles_builds USING btree (ci_build_id); CREATE UNIQUE INDEX dast_site_profiles_builds_on_ci_build_id ON dast_site_profiles_builds USING btree (ci_build_id); @@ -27814,10 +28747,22 @@ CREATE INDEX finding_links_on_vulnerability_occurrence_id ON vulnerability_findi CREATE INDEX i_batched_background_migration_job_transition_logs_on_job_id ON ONLY batched_background_migration_job_transition_logs USING btree (batched_background_migration_job_id); -CREATE UNIQUE INDEX i_ci_job_token_project_scope_links_on_source_and_target_project ON ci_job_token_project_scope_links USING btree (source_project_id, target_project_id); - CREATE INDEX i_compliance_frameworks_on_id_and_created_at ON compliance_management_frameworks USING btree (id, created_at, pipeline_configuration_full_path); +CREATE INDEX i_dast_pre_scan_verification_steps_on_pre_scan_verification_id ON dast_pre_scan_verification_steps USING btree (dast_pre_scan_verification_id); + +CREATE INDEX i_dast_profiles_tags_on_scanner_profiles_id ON dast_profiles_tags USING btree (dast_profile_id); + +CREATE INDEX i_dast_scanner_profiles_tags_on_scanner_profiles_id ON dast_scanner_profiles_tags USING btree (dast_scanner_profile_id); + +CREATE UNIQUE INDEX i_pm_licenses_on_spdx_identifier ON pm_licenses USING btree (spdx_identifier); + +CREATE UNIQUE INDEX i_pm_package_version_licenses_join_ids ON pm_package_version_licenses USING btree (pm_package_version_id, pm_license_id); + +CREATE UNIQUE INDEX i_pm_package_versions_on_package_id_and_version ON pm_package_versions USING btree (pm_package_id, version); + +CREATE UNIQUE INDEX i_pm_packages_purl_type_and_name ON pm_packages USING btree (purl_type, name); + CREATE INDEX idx_analytics_devops_adoption_segments_on_namespace_id ON analytics_devops_adoption_segments USING btree (namespace_id); CREATE INDEX idx_analytics_devops_adoption_snapshots_finalized ON analytics_devops_adoption_snapshots USING btree (namespace_id, end_time) WHERE (recorded_at >= end_time); @@ -27866,8 +28811,6 @@ CREATE UNIQUE INDEX idx_environment_merge_requests_unique_index ON deployment_me CREATE UNIQUE INDEX idx_external_audit_event_destination_id_key_uniq ON audit_events_streaming_headers USING btree (key, external_audit_event_destination_id); -CREATE INDEX idx_geo_con_rep_updated_events_on_container_repository_id ON geo_container_repository_updated_events USING btree (container_repository_id); - CREATE INDEX idx_installable_conan_pkgs_on_project_id_id ON packages_packages USING btree (project_id, id) WHERE ((package_type = 3) AND (status = ANY (ARRAY[0, 1]))); CREATE INDEX idx_installable_helm_pkgs_on_project_id_id ON packages_packages USING btree (project_id, id); @@ -27894,6 +28837,8 @@ CREATE INDEX idx_keys_expires_at_and_before_expiry_notification_undelivered ON k CREATE INDEX idx_members_created_at_user_id_invite_token ON members USING btree (created_at) WHERE ((invite_token IS NOT NULL) AND (user_id IS NULL)); +CREATE INDEX idx_members_on_user_and_source_and_source_type_and_member_role ON members USING btree (user_id, source_id, source_type, member_role_id); + CREATE INDEX idx_merge_requests_on_id_and_merge_jid ON merge_requests USING btree (id, merge_jid) WHERE ((merge_jid IS NOT NULL) AND (state_id = 4)); CREATE INDEX idx_merge_requests_on_merged_state ON merge_requests USING btree (id) WHERE (state_id = 3); @@ -27930,6 +28875,8 @@ CREATE INDEX idx_packages_debian_group_component_files_on_architecture_id ON pac CREATE INDEX idx_packages_debian_project_component_files_on_architecture_id ON packages_debian_project_component_files USING btree (architecture_id); +CREATE INDEX idx_packages_on_project_id_name_id_version_when_installable_npm ON packages_packages USING btree (project_id, name, id, version) WHERE ((package_type = 2) AND (status = ANY (ARRAY[0, 1]))); + CREATE UNIQUE INDEX idx_packages_on_project_id_name_version_unique_when_generic ON packages_packages USING btree (project_id, name, version) WHERE ((package_type = 7) AND (status <> 4)); CREATE UNIQUE INDEX idx_packages_on_project_id_name_version_unique_when_golang ON packages_packages USING btree (project_id, name, version) WHERE ((package_type = 8) AND (status <> 4)); @@ -27986,10 +28933,14 @@ CREATE INDEX idx_security_scans_on_scan_type ON security_scans USING btree (scan CREATE UNIQUE INDEX idx_serverless_domain_cluster_on_clusters_applications_knative ON serverless_domain_cluster USING btree (clusters_applications_knative_id); +CREATE UNIQUE INDEX idx_software_license_policies_unique_on_project_and_scan_policy ON software_license_policies USING btree (project_id, software_license_id, scan_result_policy_id); + CREATE INDEX idx_streaming_headers_on_external_audit_event_destination_id ON audit_events_streaming_headers USING btree (external_audit_event_destination_id); CREATE INDEX idx_test_reports_on_issue_id_created_at_and_id ON requirements_management_test_reports USING btree (issue_id, created_at, id); +CREATE UNIQUE INDEX idx_uniq_analytics_dashboards_pointers_on_project_id ON analytics_dashboards_pointers USING btree (project_id); + CREATE INDEX idx_user_details_on_provisioned_by_group_id_user_id ON user_details USING btree (provisioned_by_group_id, user_id); CREATE UNIQUE INDEX idx_vuln_signatures_on_occurrences_id_and_signature_sha ON vulnerability_finding_signatures USING btree (finding_id, signature_sha); @@ -28012,6 +28963,8 @@ CREATE UNIQUE INDEX idx_work_item_types_on_namespace_id_and_name_null_namespace CREATE INDEX index_abuse_reports_on_user_id ON abuse_reports USING btree (user_id); +CREATE UNIQUE INDEX "index_achievements_on_namespace_id_LOWER_name" ON achievements USING btree (namespace_id, lower(name)); + CREATE INDEX index_agent_activity_events_on_agent_id_and_recorded_at_and_id ON agent_activity_events USING btree (agent_id, recorded_at, id); CREATE INDEX index_agent_activity_events_on_agent_token_id ON agent_activity_events USING btree (agent_token_id) WHERE (agent_token_id IS NOT NULL); @@ -28030,6 +28983,8 @@ CREATE UNIQUE INDEX index_agent_project_authorizations_on_agent_id_and_project_i CREATE INDEX index_agent_project_authorizations_on_project_id ON agent_project_authorizations USING btree (project_id); +CREATE INDEX index_airflow_dags_on_project_id ON airflow_dags USING btree (project_id); + CREATE INDEX index_alert_assignees_on_alert_id ON alert_management_alert_assignees USING btree (alert_id); CREATE UNIQUE INDEX index_alert_assignees_on_user_id_and_alert_id ON alert_management_alert_assignees USING btree (user_id, alert_id); @@ -28084,6 +29039,10 @@ CREATE UNIQUE INDEX index_analytics_ca_project_value_streams_on_project_id_and_n CREATE INDEX index_analytics_cycle_analytics_group_stages_custom_only ON analytics_cycle_analytics_group_stages USING btree (id) WHERE (custom = true); +CREATE UNIQUE INDEX index_analytics_dashboards_pointers_on_namespace_id ON analytics_dashboards_pointers USING btree (namespace_id); + +CREATE INDEX index_analytics_dashboards_pointers_on_target_project_id ON analytics_dashboards_pointers USING btree (target_project_id); + CREATE INDEX index_application_settings_on_custom_project_templates_group_id ON application_settings USING btree (custom_project_templates_group_id); CREATE INDEX index_application_settings_on_file_template_project_id ON application_settings USING btree (file_template_project_id); @@ -28160,16 +29119,22 @@ CREATE UNIQUE INDEX index_audit_events_external_audit_on_verification_token ON a CREATE INDEX index_authentication_events_on_provider ON authentication_events USING btree (provider); -CREATE INDEX index_authentication_events_on_provider_user_id_created_at ON authentication_events USING btree (provider, user_id, created_at) WHERE (result = 1); - CREATE INDEX index_authentication_events_on_user_and_ip_address_and_result ON authentication_events USING btree (user_id, ip_address, result); +CREATE UNIQUE INDEX index_automation_rules_namespace_id_name ON automation_rules USING btree (namespace_id, lower(name)); + +CREATE INDEX index_automation_rules_namespace_id_permanently_disabled ON automation_rules USING btree (namespace_id, permanently_disabled); + CREATE INDEX index_award_emoji_on_awardable_type_and_awardable_id ON award_emoji USING btree (awardable_type, awardable_id); CREATE UNIQUE INDEX index_aws_roles_on_role_external_id ON aws_roles USING btree (role_external_id); CREATE UNIQUE INDEX index_aws_roles_on_user_id ON aws_roles USING btree (user_id); +CREATE INDEX p_ci_builds_metadata_on_runner_machine_id_idx ON ONLY p_ci_builds_metadata USING btree (runner_machine_id) WHERE (runner_machine_id IS NOT NULL); + +CREATE INDEX index_b6331cde35 ON ci_builds_metadata USING btree (runner_machine_id) WHERE (runner_machine_id IS NOT NULL); + CREATE INDEX index_background_migration_jobs_for_partitioning_migrations ON background_migration_jobs USING btree (((arguments ->> 2))) WHERE (class_name = 'Gitlab::Database::PartitioningMigrationHelpers::BackfillPartitionedTable'::text); CREATE INDEX index_background_migration_jobs_on_class_name_and_arguments ON background_migration_jobs USING btree (class_name, arguments); @@ -28288,20 +29253,28 @@ CREATE INDEX index_bulk_import_failures_on_correlation_id_value ON bulk_import_f CREATE INDEX index_bulk_imports_on_user_id ON bulk_imports USING btree (user_id); -CREATE UNIQUE INDEX index_chat_names_on_integration_id_and_team_id_and_chat_id ON chat_names USING btree (integration_id, team_id, chat_id); +CREATE INDEX index_chat_names_on_team_id_and_chat_id ON chat_names USING btree (team_id, chat_id); -CREATE UNIQUE INDEX index_chat_names_on_user_id_and_integration_id ON chat_names USING btree (user_id, integration_id); +CREATE INDEX index_chat_names_on_user_id ON chat_names USING btree (user_id); CREATE UNIQUE INDEX index_chat_teams_on_namespace_id ON chat_teams USING btree (namespace_id); CREATE UNIQUE INDEX index_ci_build_needs_on_build_id_and_name ON ci_build_needs USING btree (build_id, name); +CREATE INDEX index_ci_build_needs_on_partition_id_build_id ON ci_build_needs USING btree (partition_id, build_id); + CREATE UNIQUE INDEX index_ci_build_pending_states_on_build_id ON ci_build_pending_states USING btree (build_id); +CREATE UNIQUE INDEX index_ci_build_report_results_on_partition_id_build_id ON ci_build_report_results USING btree (partition_id, build_id); + CREATE INDEX index_ci_build_report_results_on_project_id ON ci_build_report_results USING btree (project_id); CREATE UNIQUE INDEX index_ci_build_trace_chunks_on_build_id_and_chunk_index ON ci_build_trace_chunks USING btree (build_id, chunk_index); +CREATE INDEX index_ci_build_trace_chunks_on_partition_id_build_id ON ci_build_trace_chunks USING btree (partition_id, build_id); + +CREATE UNIQUE INDEX index_ci_build_trace_metadata_on_partition_id_build_id ON ci_build_trace_metadata USING btree (partition_id, build_id); + CREATE INDEX index_ci_build_trace_metadata_on_trace_artifact_id ON ci_build_trace_metadata USING btree (trace_artifact_id); CREATE INDEX p_ci_builds_metadata_build_id_idx ON ONLY p_ci_builds_metadata USING btree (build_id) WHERE (has_exposed_artifacts IS TRUE); @@ -28336,6 +29309,8 @@ CREATE INDEX index_ci_builds_on_commit_id_and_type_and_ref ON ci_builds USING bt CREATE INDEX index_ci_builds_on_commit_id_artifacts_expired_at_and_id ON ci_builds USING btree (commit_id, artifacts_expire_at, id) WHERE (((type)::text = 'Ci::Build'::text) AND ((retried = false) OR (retried IS NULL)) AND ((name)::text = ANY (ARRAY[('sast'::character varying)::text, ('secret_detection'::character varying)::text, ('dependency_scanning'::character varying)::text, ('container_scanning'::character varying)::text, ('dast'::character varying)::text]))); +CREATE UNIQUE INDEX index_ci_builds_on_id_partition_id_unique ON ci_builds USING btree (id, partition_id); + CREATE INDEX index_ci_builds_on_project_id_and_id ON ci_builds USING btree (project_id, id); CREATE INDEX index_ci_builds_on_project_id_and_name_and_ref ON ci_builds USING btree (project_id, name, ref) WHERE (((type)::text = 'Ci::Build'::text) AND ((status)::text = 'success'::text) AND ((retried = false) OR (retried IS NULL))); @@ -28364,6 +29339,8 @@ CREATE INDEX index_ci_builds_runner_id_running ON ci_builds USING btree (runner_ CREATE UNIQUE INDEX index_ci_builds_runner_session_on_build_id ON ci_builds_runner_session USING btree (build_id); +CREATE UNIQUE INDEX index_ci_builds_runner_session_on_partition_id_build_id ON ci_builds_runner_session USING btree (partition_id, build_id); + CREATE INDEX index_ci_daily_build_group_report_results_on_group_id ON ci_daily_build_group_report_results USING btree (group_id); CREATE INDEX index_ci_daily_build_group_report_results_on_last_pipeline_id ON ci_daily_build_group_report_results USING btree (last_pipeline_id); @@ -28398,6 +29375,8 @@ CREATE INDEX index_ci_job_artifacts_on_id_project_id_and_file_type ON ci_job_art CREATE UNIQUE INDEX index_ci_job_artifacts_on_job_id_and_file_type ON ci_job_artifacts USING btree (job_id, file_type); +CREATE INDEX index_ci_job_artifacts_on_partition_id_job_id ON ci_job_artifacts USING btree (partition_id, job_id); + CREATE INDEX index_ci_job_artifacts_on_project_id ON ci_job_artifacts USING btree (project_id); CREATE INDEX index_ci_job_artifacts_on_project_id_and_id ON ci_job_artifacts USING btree (project_id, id); @@ -28412,6 +29391,8 @@ CREATE INDEX index_ci_job_variables_on_job_id ON ci_job_variables USING btree (j CREATE UNIQUE INDEX index_ci_job_variables_on_key_and_job_id ON ci_job_variables USING btree (key, job_id); +CREATE INDEX index_ci_job_variables_on_partition_id_job_id ON ci_job_variables USING btree (partition_id, job_id); + CREATE INDEX index_ci_minutes_additional_packs_on_namespace_id_purchase_xid ON ci_minutes_additional_packs USING btree (namespace_id, purchase_xid); CREATE UNIQUE INDEX index_ci_namespace_mirrors_on_namespace_id ON ci_namespace_mirrors USING btree (namespace_id); @@ -28426,6 +29407,8 @@ CREATE UNIQUE INDEX index_ci_pending_builds_on_build_id ON ci_pending_builds USI CREATE INDEX index_ci_pending_builds_on_namespace_id ON ci_pending_builds USING btree (namespace_id); +CREATE UNIQUE INDEX index_ci_pending_builds_on_partition_id_build_id ON ci_pending_builds USING btree (partition_id, build_id); + CREATE INDEX index_ci_pending_builds_on_project_id ON ci_pending_builds USING btree (project_id); CREATE INDEX index_ci_pending_builds_on_tag_ids ON ci_pending_builds USING btree (tag_ids) WHERE (cardinality(tag_ids) > 0); @@ -28452,12 +29435,12 @@ CREATE UNIQUE INDEX index_ci_pipeline_chat_data_on_pipeline_id ON ci_pipeline_ch CREATE INDEX index_ci_pipeline_messages_on_pipeline_id ON ci_pipeline_messages USING btree (pipeline_id); -CREATE INDEX index_ci_pipeline_metadata_on_pipeline_id_name ON ci_pipeline_metadata USING btree (pipeline_id, name); - CREATE INDEX index_ci_pipeline_metadata_on_project_id ON ci_pipeline_metadata USING btree (project_id); CREATE UNIQUE INDEX index_ci_pipeline_schedule_variables_on_schedule_id_and_key ON ci_pipeline_schedule_variables USING btree (pipeline_schedule_id, key); +CREATE INDEX index_ci_pipeline_schedules_on_id_and_next_run_at_and_active ON ci_pipeline_schedules USING btree (id, next_run_at) WHERE (active = true); + CREATE INDEX index_ci_pipeline_schedules_on_next_run_at_and_active ON ci_pipeline_schedules USING btree (next_run_at, active); CREATE INDEX index_ci_pipeline_schedules_on_owner_id ON ci_pipeline_schedules USING btree (owner_id); @@ -28524,8 +29507,18 @@ CREATE UNIQUE INDEX index_ci_resource_groups_on_project_id_and_key ON ci_resourc CREATE INDEX index_ci_resources_on_build_id ON ci_resources USING btree (build_id); +CREATE INDEX index_ci_resources_on_partition_id_build_id ON ci_resources USING btree (partition_id, build_id); + CREATE UNIQUE INDEX index_ci_resources_on_resource_group_id_and_build_id ON ci_resources USING btree (resource_group_id, build_id); +CREATE INDEX index_ci_runner_machines_on_contacted_at_desc_and_id_desc ON ci_runner_machines USING btree (contacted_at DESC, id DESC); + +CREATE INDEX index_ci_runner_machines_on_created_at_and_id_desc ON ci_runner_machines USING btree (created_at, id DESC); + +CREATE UNIQUE INDEX index_ci_runner_machines_on_runner_id_and_system_xid ON ci_runner_machines USING btree (runner_id, system_xid); + +CREATE INDEX index_ci_runner_machines_on_version ON ci_runner_machines USING btree (version); + CREATE INDEX index_ci_runner_namespaces_on_namespace_id ON ci_runner_namespaces USING btree (namespace_id); CREATE UNIQUE INDEX index_ci_runner_namespaces_on_runner_id_and_namespace_id ON ci_runner_namespaces USING btree (runner_id, namespace_id); @@ -28548,11 +29541,13 @@ CREATE INDEX index_ci_runners_on_created_at_and_id_where_inactive ON ci_runners CREATE INDEX index_ci_runners_on_created_at_desc_and_id_desc ON ci_runners USING btree (created_at DESC, id DESC); +CREATE INDEX index_ci_runners_on_creator_id_where_creator_id_not_null ON ci_runners USING btree (creator_id) WHERE (creator_id IS NOT NULL); + CREATE INDEX index_ci_runners_on_description_trigram ON ci_runners USING gin (description gin_trgm_ops); CREATE INDEX index_ci_runners_on_locked ON ci_runners USING btree (locked); -CREATE INDEX index_ci_runners_on_runner_type ON ci_runners USING btree (runner_type); +CREATE INDEX index_ci_runners_on_runner_type_and_id ON ci_runners USING btree (runner_type, id); CREATE INDEX index_ci_runners_on_token_expires_at_and_id_desc ON ci_runners USING btree (token_expires_at, id DESC); @@ -28562,6 +29557,8 @@ CREATE INDEX index_ci_runners_on_version ON ci_runners USING btree (version); CREATE UNIQUE INDEX index_ci_running_builds_on_build_id ON ci_running_builds USING btree (build_id); +CREATE UNIQUE INDEX index_ci_running_builds_on_partition_id_build_id ON ci_running_builds USING btree (partition_id, build_id); + CREATE INDEX index_ci_running_builds_on_project_id ON ci_running_builds USING btree (project_id); CREATE INDEX index_ci_running_builds_on_runner_id ON ci_running_builds USING btree (runner_id); @@ -28584,6 +29581,8 @@ CREATE INDEX index_ci_sources_pipelines_on_project_id ON ci_sources_pipelines US CREATE INDEX index_ci_sources_pipelines_on_source_job_id ON ci_sources_pipelines USING btree (source_job_id); +CREATE INDEX index_ci_sources_pipelines_on_source_partition_id_source_job_id ON ci_sources_pipelines USING btree (source_partition_id, source_job_id); + CREATE INDEX index_ci_sources_pipelines_on_source_pipeline_id ON ci_sources_pipelines USING btree (source_pipeline_id); CREATE INDEX index_ci_sources_pipelines_on_source_project_id ON ci_sources_pipelines USING btree (source_project_id); @@ -28618,6 +29617,8 @@ CREATE INDEX index_ci_triggers_on_project_id ON ci_triggers USING btree (project CREATE INDEX index_ci_unit_test_failures_on_build_id ON ci_unit_test_failures USING btree (build_id); +CREATE INDEX index_ci_unit_test_failures_on_partition_id_build_id ON ci_unit_test_failures USING btree (partition_id, build_id); + CREATE UNIQUE INDEX index_ci_unit_tests_on_project_id_and_key_hash ON ci_unit_tests USING btree (project_id, key_hash); CREATE INDEX index_ci_variables_on_key ON ci_variables USING btree (key); @@ -28748,6 +29749,10 @@ CREATE UNIQUE INDEX index_cycle_analytics_stage_event_hashes_on_hash_sha_256 ON CREATE UNIQUE INDEX index_daily_build_group_report_results_unique_columns ON ci_daily_build_group_report_results USING btree (project_id, ref_path, date, group_name); +CREATE UNIQUE INDEX index_dast_pre_scan_verifications_on_ci_pipeline_id ON dast_pre_scan_verifications USING btree (ci_pipeline_id); + +CREATE INDEX index_dast_pre_scan_verifications_on_dast_profile_id ON dast_pre_scan_verifications USING btree (dast_profile_id); + CREATE INDEX index_dast_profile_schedules_active_next_run_at ON dast_profile_schedules USING btree (active, next_run_at); CREATE UNIQUE INDEX index_dast_profile_schedules_on_dast_profile_id ON dast_profile_schedules USING btree (dast_profile_id); @@ -28764,8 +29769,12 @@ CREATE UNIQUE INDEX index_dast_profiles_on_project_id_and_name ON dast_profiles CREATE UNIQUE INDEX index_dast_profiles_pipelines_on_ci_pipeline_id ON dast_profiles_pipelines USING btree (ci_pipeline_id); +CREATE INDEX index_dast_profiles_tags_on_tag_id ON dast_profiles_tags USING btree (tag_id); + CREATE UNIQUE INDEX index_dast_scanner_profiles_on_project_id_and_name ON dast_scanner_profiles USING btree (project_id, name); +CREATE INDEX index_dast_scanner_profiles_tags_on_tag_id ON dast_scanner_profiles_tags USING btree (tag_id); + CREATE INDEX index_dast_site_profiles_on_dast_site_id ON dast_site_profiles USING btree (dast_site_id); CREATE UNIQUE INDEX index_dast_site_profiles_on_project_id_and_name ON dast_site_profiles USING btree (project_id, name); @@ -28788,6 +29797,10 @@ CREATE UNIQUE INDEX index_dast_sites_on_project_id_and_url ON dast_sites USING b CREATE UNIQUE INDEX index_dep_prox_manifests_on_group_id_file_name_and_status ON dependency_proxy_manifests USING btree (group_id, file_name, status); +CREATE INDEX index_dependency_list_exports_on_project_id ON dependency_list_exports USING btree (project_id); + +CREATE INDEX index_dependency_list_exports_on_user_id ON dependency_list_exports USING btree (user_id); + CREATE INDEX index_dependency_proxy_blob_states_failed_verification ON dependency_proxy_blob_states USING btree (verification_retry_at NULLS FIRST) WHERE (verification_state = 3); CREATE INDEX index_dependency_proxy_blob_states_needs_verification ON dependency_proxy_blob_states USING btree (verification_state) WHERE ((verification_state = 0) OR (verification_state = 3)); @@ -28938,10 +29951,14 @@ CREATE INDEX index_emails_on_user_id ON emails USING btree (user_id); CREATE INDEX index_enabled_clusters_on_id ON clusters USING btree (id) WHERE (enabled = true); +CREATE INDEX index_environments_for_name_search_within_folder ON environments USING btree (project_id, lower(ltrim((name)::text, ((environment_type)::text || '/'::text))) varchar_pattern_ops, state); + CREATE INDEX index_environments_on_merge_request_id ON environments USING btree (merge_request_id); CREATE INDEX index_environments_on_name_varchar_pattern_ops ON environments USING btree (name varchar_pattern_ops); +CREATE INDEX index_environments_on_project_id_and_id ON environments USING btree (project_id, id); + CREATE UNIQUE INDEX index_environments_on_project_id_and_name ON environments USING btree (project_id, name); CREATE UNIQUE INDEX index_environments_on_project_id_and_slug ON environments USING btree (project_id, slug); @@ -29026,6 +30043,12 @@ CREATE INDEX index_et_errors_on_project_id_and_status_last_seen_at_id_desc ON er CREATE INDEX index_events_author_id_project_id_action_target_type_created_at ON events USING btree (author_id, project_id, action, target_type, created_at); +CREATE INDEX index_events_for_followed_users ON events USING btree (author_id, target_type, action, id); + +CREATE INDEX index_events_for_group_activity ON events USING btree (group_id, target_type, action, id) WHERE (group_id IS NOT NULL); + +CREATE INDEX index_events_for_project_activity ON events USING btree (project_id, target_type, action, id); + CREATE INDEX index_events_on_action ON events USING btree (action); CREATE INDEX index_events_on_author_id_and_created_at ON events USING btree (author_id, created_at); @@ -29036,6 +30059,8 @@ CREATE INDEX index_events_on_author_id_and_id ON events USING btree (author_id, CREATE INDEX index_events_on_created_at_and_id ON events USING btree (created_at, id) WHERE (created_at > '2021-08-27 00:00:00+00'::timestamp with time zone); +CREATE INDEX index_events_on_group_id_and_id ON events USING btree (group_id, id) WHERE (group_id IS NOT NULL); + CREATE INDEX index_events_on_group_id_partial ON events USING btree (group_id) WHERE (group_id IS NOT NULL); CREATE INDEX index_events_on_project_id_and_created_at ON events USING btree (project_id, created_at); @@ -29048,16 +30073,6 @@ CREATE UNIQUE INDEX index_events_on_target_type_and_target_id_and_fingerprint ON CREATE INDEX index_evidences_on_release_id ON evidences USING btree (release_id); -CREATE INDEX index_experiment_subjects_on_experiment_id ON experiment_subjects USING btree (experiment_id); - -CREATE INDEX index_experiment_subjects_on_namespace_id ON experiment_subjects USING btree (namespace_id); - -CREATE INDEX index_experiment_subjects_on_project_id ON experiment_subjects USING btree (project_id); - -CREATE INDEX index_experiment_subjects_on_user_id ON experiment_subjects USING btree (user_id); - -CREATE UNIQUE INDEX index_experiments_on_name ON experiments USING btree (name); - CREATE INDEX index_expired_and_not_notified_personal_access_tokens ON personal_access_tokens USING btree (id, expires_at) WHERE ((impersonation = false) AND (revoked = false) AND (expire_notification_delivered = false)); CREATE UNIQUE INDEX index_external_audit_event_destinations_on_namespace_id ON audit_events_external_audit_event_destinations USING btree (namespace_id, destination_url); @@ -29084,8 +30099,6 @@ CREATE UNIQUE INDEX index_fork_networks_on_root_project_id ON fork_networks USIN CREATE INDEX index_geo_event_log_on_cache_invalidation_event_id ON geo_event_log USING btree (cache_invalidation_event_id) WHERE (cache_invalidation_event_id IS NOT NULL); -CREATE INDEX index_geo_event_log_on_container_repository_updated_event_id ON geo_event_log USING btree (container_repository_updated_event_id); - CREATE INDEX index_geo_event_log_on_geo_event_id ON geo_event_log USING btree (geo_event_id) WHERE (geo_event_id IS NOT NULL); CREATE INDEX index_geo_event_log_on_hashed_storage_attachments_event_id ON geo_event_log USING btree (hashed_storage_attachments_event_id) WHERE (hashed_storage_attachments_event_id IS NOT NULL); @@ -29148,12 +30161,14 @@ CREATE INDEX index_gitlab_subscription_histories_on_gitlab_subscription_id ON gi CREATE INDEX index_gitlab_subscriptions_on_end_date_and_namespace_id ON gitlab_subscriptions USING btree (end_date, namespace_id); -CREATE INDEX index_gitlab_subscriptions_on_hosted_plan_id ON gitlab_subscriptions USING btree (hosted_plan_id); +CREATE INDEX index_gitlab_subscriptions_on_hosted_plan_id_and_trial ON gitlab_subscriptions USING btree (hosted_plan_id, trial); CREATE INDEX index_gitlab_subscriptions_on_max_seats_used_changed_at ON gitlab_subscriptions USING btree (max_seats_used_changed_at, namespace_id); CREATE UNIQUE INDEX index_gitlab_subscriptions_on_namespace_id ON gitlab_subscriptions USING btree (namespace_id); +CREATE INDEX index_gitlab_subscriptions_on_trial_and_trial_starts_on ON gitlab_subscriptions USING btree (trial, trial_starts_on); + CREATE UNIQUE INDEX index_gpg_key_subkeys_on_fingerprint ON gpg_key_subkeys USING btree (fingerprint); CREATE INDEX index_gpg_key_subkeys_on_gpg_key_id ON gpg_key_subkeys USING btree (gpg_key_id); @@ -29228,6 +30243,8 @@ CREATE INDEX index_group_wiki_repositories_on_shard_id ON group_wiki_repositorie CREATE INDEX index_groups_on_parent_id_id ON namespaces USING btree (parent_id, id) WHERE ((type)::text = 'Group'::text); +CREATE INDEX index_groups_on_path_and_id ON namespaces USING btree (path, id) WHERE ((type)::text = 'Group'::text); + CREATE INDEX index_historical_data_on_recorded_at ON historical_data USING btree (recorded_at); CREATE UNIQUE INDEX index_http_integrations_on_active_and_project_and_endpoint ON alert_management_http_integrations USING btree (active, project_id, endpoint_identifier) WHERE active; @@ -29346,7 +30363,7 @@ CREATE INDEX index_issuable_slas_on_due_at_id_label_applied_issuable_closed ON i CREATE UNIQUE INDEX index_issuable_slas_on_issue_id ON issuable_slas USING btree (issue_id); -CREATE INDEX index_issue_assignees_on_user_id ON issue_assignees USING btree (user_id); +CREATE INDEX index_issue_assignees_on_user_id_and_issue_id ON issue_assignees USING btree (user_id, issue_id); CREATE UNIQUE INDEX index_issue_crm_contacts_on_issue_id_and_contact_id ON issue_customer_relations_contacts USING btree (issue_id, contact_id); @@ -29380,8 +30397,6 @@ CREATE INDEX index_issues_on_closed_by_id ON issues USING btree (closed_by_id); CREATE INDEX index_issues_on_confidential ON issues USING btree (confidential); -CREATE INDEX index_issues_on_description_trigram ON issues USING gin (description gin_trgm_ops) WITH (fastupdate='false'); - CREATE INDEX index_issues_on_description_trigram_non_latin ON issues USING gin (description gin_trgm_ops) WHERE (((title)::text !~ similar_escape('[\u0000-\u02FF\u1E00-\u1EFF\u2070-\u218F]*'::text, NULL::text)) OR (description !~ similar_escape('[\u0000-\u02FF\u1E00-\u1EFF\u2070-\u218F]*'::text, NULL::text))); CREATE INDEX index_issues_on_duplicated_to_id ON issues USING btree (duplicated_to_id) WHERE (duplicated_to_id IS NOT NULL); @@ -29418,14 +30433,14 @@ CREATE INDEX index_issues_on_promoted_to_epic_id ON issues USING btree (promoted CREATE INDEX index_issues_on_sprint_id ON issues USING btree (sprint_id); -CREATE INDEX index_issues_on_title_trigram ON issues USING gin (title gin_trgm_ops) WITH (fastupdate='false'); - CREATE INDEX index_issues_on_title_trigram_non_latin ON issues USING gin (title gin_trgm_ops) WHERE (((title)::text !~ similar_escape('[\u0000-\u02FF\u1E00-\u1EFF\u2070-\u218F]*'::text, NULL::text)) OR (description !~ similar_escape('[\u0000-\u02FF\u1E00-\u1EFF\u2070-\u218F]*'::text, NULL::text))); CREATE INDEX index_issues_on_updated_at ON issues USING btree (updated_at); CREATE INDEX index_issues_on_updated_by_id ON issues USING btree (updated_by_id) WHERE (updated_by_id IS NOT NULL); +CREATE INDEX index_issues_on_work_item_type_id ON issues USING btree (work_item_type_id); + CREATE INDEX index_iterations_cadences_on_group_id ON iterations_cadences USING btree (group_id); CREATE UNIQUE INDEX index_jira_connect_installations_on_client_key ON jira_connect_installations USING btree (client_key); @@ -29532,6 +30547,16 @@ CREATE INDEX index_lists_on_user_id ON lists USING btree (user_id); CREATE INDEX index_loose_foreign_keys_deleted_records_for_partitioned_query ON ONLY loose_foreign_keys_deleted_records USING btree (partition, fully_qualified_table_name, consume_after, id) WHERE (status = 1); +CREATE INDEX index_manifest_states_failed_verification ON dependency_proxy_manifest_states USING btree (verification_retry_at NULLS FIRST) WHERE (verification_state = 3); + +CREATE INDEX index_manifest_states_needs_verification ON dependency_proxy_manifest_states USING btree (verification_state) WHERE ((verification_state = 0) OR (verification_state = 3)); + +CREATE INDEX index_manifest_states_on_dependency_proxy_manifest_id ON dependency_proxy_manifest_states USING btree (dependency_proxy_manifest_id); + +CREATE INDEX index_manifest_states_on_verification_state ON dependency_proxy_manifest_states USING btree (verification_state); + +CREATE INDEX index_manifest_states_pending_verification ON dependency_proxy_manifest_states USING btree (verified_at NULLS FIRST) WHERE (verification_state = 0); + CREATE INDEX index_member_roles_on_namespace_id ON member_roles USING btree (namespace_id); CREATE INDEX index_member_tasks_on_member_id ON member_tasks USING btree (member_id); @@ -29550,18 +30575,20 @@ CREATE UNIQUE INDEX index_members_on_invite_token ON members USING btree (invite CREATE INDEX index_members_on_member_namespace_id ON members USING btree (member_namespace_id); +CREATE INDEX index_members_on_member_namespace_id_compound ON members USING btree (member_namespace_id, type, requested_at, id); + CREATE INDEX index_members_on_member_role_id ON members USING btree (member_role_id); CREATE INDEX index_members_on_requested_at ON members USING btree (requested_at); CREATE INDEX index_members_on_source_id_and_source_type ON members USING btree (source_id, source_type); +CREATE INDEX index_members_on_source_state_type_access_level_and_user_id ON members USING btree (source_id, source_type, state, type, access_level, user_id) WHERE ((requested_at IS NULL) AND (invite_token IS NULL)); + CREATE INDEX index_members_on_user_id_and_access_level_requested_at_is_null ON members USING btree (user_id, access_level) WHERE (requested_at IS NULL); CREATE INDEX index_members_on_user_id_created_at ON members USING btree (user_id, created_at) WHERE ((ldap = true) AND ((type)::text = 'GroupMember'::text) AND ((source_type)::text = 'Namespace'::text)); -CREATE INDEX index_members_on_user_id_source_id_source_type ON members USING btree (user_id, source_id, source_type); - CREATE INDEX index_merge_request_assignees_on_merge_request_id ON merge_request_assignees USING btree (merge_request_id); CREATE UNIQUE INDEX index_merge_request_assignees_on_merge_request_id_and_user_id ON merge_request_assignees USING btree (merge_request_id, user_id); @@ -29630,6 +30657,8 @@ CREATE INDEX index_merge_requests_on_assignee_id ON merge_requests USING btree ( CREATE INDEX index_merge_requests_on_author_id ON merge_requests USING btree (author_id); +CREATE INDEX index_merge_requests_on_author_id_and_created_at ON merge_requests USING btree (author_id, created_at); + CREATE INDEX index_merge_requests_on_author_id_and_id ON merge_requests USING btree (author_id, id); CREATE INDEX index_merge_requests_on_author_id_and_target_project_id ON merge_requests USING btree (author_id, target_project_id); @@ -29712,6 +30741,10 @@ CREATE INDEX index_milestones_on_title_trigram ON milestones USING gin (title gi CREATE INDEX index_mirror_data_non_scheduled_or_started ON project_mirror_data USING btree (next_execution_timestamp, retry_count) WHERE ((status)::text <> ALL ('{scheduled,started}'::text[])); +CREATE UNIQUE INDEX index_ml_candidate_metadata_on_candidate_id_and_name ON ml_candidate_metadata USING btree (candidate_id, name); + +CREATE INDEX index_ml_candidate_metadata_on_name ON ml_candidate_metadata USING btree (name); + CREATE INDEX index_ml_candidate_metrics_on_candidate_id ON ml_candidate_metrics USING btree (candidate_id); CREATE INDEX index_ml_candidate_params_on_candidate_id ON ml_candidate_params USING btree (candidate_id); @@ -29722,6 +30755,8 @@ CREATE UNIQUE INDEX index_ml_candidates_on_experiment_id_and_iid ON ml_candidate CREATE INDEX index_ml_candidates_on_user_id ON ml_candidates USING btree (user_id); +CREATE UNIQUE INDEX index_ml_experiment_metadata_on_experiment_id_and_name ON ml_experiment_metadata USING btree (experiment_id, name); + CREATE UNIQUE INDEX index_ml_experiments_on_project_id_and_iid ON ml_experiments USING btree (project_id, iid); CREATE UNIQUE INDEX index_ml_experiments_on_project_id_and_name ON ml_experiments USING btree (project_id, name); @@ -29776,6 +30811,8 @@ CREATE UNIQUE INDEX index_namespaces_on_parent_id_and_id ON namespaces USING btr CREATE INDEX index_namespaces_on_path ON namespaces USING btree (path); +CREATE INDEX index_namespaces_on_path_for_top_level_non_projects ON namespaces USING btree (lower((path)::text)) WHERE ((parent_id IS NULL) AND ((type)::text <> 'Project'::text)); + CREATE INDEX index_namespaces_on_path_trigram ON namespaces USING gin (path gin_trgm_ops); CREATE UNIQUE INDEX index_namespaces_on_push_rule_id ON namespaces USING btree (push_rule_id); @@ -29796,8 +30833,12 @@ CREATE INDEX index_namespaces_on_traversal_ids_for_groups_btree ON namespaces US CREATE INDEX index_namespaces_on_type_and_id ON namespaces USING btree (type, id); +CREATE INDEX index_namespaces_on_type_and_visibility_and_parent_id ON namespaces USING btree (id) WHERE (((type)::text = 'Group'::text) AND (parent_id IS NULL) AND (visibility_level <> 20)); + CREATE INDEX index_namespaces_public_groups_name_id ON namespaces USING btree (name, id) WHERE (((type)::text = 'Group'::text) AND (visibility_level = 20)); +CREATE INDEX index_namespaces_storage_limit_exclusions_on_namespace_id ON namespaces_storage_limit_exclusions USING btree (namespace_id); + CREATE INDEX index_namespaces_sync_events_on_namespace_id ON namespaces_sync_events USING btree (namespace_id); CREATE INDEX index_non_requested_project_members_on_source_id_and_type ON members USING btree (source_id, source_type) WHERE ((requested_at IS NULL) AND ((type)::text = 'ProjectMember'::text)); @@ -29866,6 +30907,10 @@ CREATE UNIQUE INDEX index_on_instance_statistics_recorded_at_and_identifier ON a CREATE INDEX index_on_issues_closed_incidents_by_project_id_and_closed_at ON issues USING btree (project_id, closed_at) WHERE ((issue_type = 1) AND (state_id = 2)); +CREATE INDEX index_on_issues_health_status_asc_order ON issues USING btree (project_id, health_status, id DESC, state_id, issue_type); + +CREATE INDEX index_on_issues_health_status_desc_order ON issues USING btree (project_id, health_status DESC NULLS LAST, id DESC, state_id, issue_type); + CREATE INDEX index_on_label_links_all_columns ON label_links USING btree (target_id, label_id, target_type); CREATE INDEX index_on_merge_request_reviewers_user_id_and_state ON merge_request_reviewers USING btree (user_id, state) WHERE (state = 2); @@ -30084,16 +31129,26 @@ CREATE UNIQUE INDEX index_personal_access_tokens_on_token_digest ON personal_acc CREATE INDEX index_personal_access_tokens_on_user_id ON personal_access_tokens USING btree (user_id); +CREATE INDEX index_pipeline_metadata_on_pipeline_id_name_text_pattern ON ci_pipeline_metadata USING btree (pipeline_id, name text_pattern_ops); + CREATE UNIQUE INDEX index_plan_limits_on_plan_id ON plan_limits USING btree (plan_id); CREATE UNIQUE INDEX index_plans_on_name ON plans USING btree (name); +CREATE INDEX index_pm_package_version_licenses_on_pm_license_id ON pm_package_version_licenses USING btree (pm_license_id); + +CREATE INDEX index_pm_package_version_licenses_on_pm_package_version_id ON pm_package_version_licenses USING btree (pm_package_version_id); + +CREATE INDEX index_pm_package_versions_on_pm_package_id ON pm_package_versions USING btree (pm_package_id); + CREATE UNIQUE INDEX index_pool_repositories_on_disk_path ON pool_repositories USING btree (disk_path); CREATE INDEX index_pool_repositories_on_shard_id ON pool_repositories USING btree (shard_id); CREATE UNIQUE INDEX index_pool_repositories_on_source_project_id_and_shard_id ON pool_repositories USING btree (source_project_id, shard_id); +CREATE UNIQUE INDEX index_postgres_async_foreign_key_validations_on_name ON postgres_async_foreign_key_validations USING btree (name); + CREATE UNIQUE INDEX index_postgres_async_indexes_on_name ON postgres_async_indexes USING btree (name); CREATE INDEX index_postgres_reindex_actions_on_index_identifier ON postgres_reindex_actions USING btree (index_identifier); @@ -30126,6 +31181,10 @@ CREATE UNIQUE INDEX index_project_custom_attributes_on_project_id_and_key ON pro CREATE UNIQUE INDEX index_project_daily_statistics_on_project_id_and_date ON project_daily_statistics USING btree (project_id, date DESC); +CREATE INDEX index_project_data_transfers_on_namespace_id ON project_data_transfers USING btree (namespace_id); + +CREATE UNIQUE INDEX index_project_data_transfers_on_project_and_namespace_and_date ON project_data_transfers USING btree (project_id, namespace_id, date); + CREATE INDEX index_project_deploy_tokens_on_deploy_token_id ON project_deploy_tokens USING btree (deploy_token_id); CREATE UNIQUE INDEX index_project_deploy_tokens_on_project_id_and_deploy_token_id ON project_deploy_tokens USING btree (project_id, deploy_token_id); @@ -30190,7 +31249,7 @@ CREATE UNIQUE INDEX index_project_repository_states_on_project_id ON project_rep CREATE INDEX index_project_repository_storage_moves_on_project_id ON project_repository_storage_moves USING btree (project_id); -CREATE INDEX index_project_settings_on_legacy_open_source_license_available ON project_settings USING btree (legacy_open_source_license_available) WHERE (legacy_open_source_license_available = true); +CREATE INDEX index_project_settings_on_legacy_os_license_project_id ON project_settings USING btree (project_id) WHERE (legacy_open_source_license_available = true); CREATE INDEX index_project_settings_on_project_id_partially ON project_settings USING btree (project_id) WHERE (has_vulnerabilities IS TRUE); @@ -30374,6 +31433,8 @@ CREATE UNIQUE INDEX index_protected_environments_on_project_id_and_name ON prote CREATE INDEX index_protected_tag_create_access ON protected_tag_create_access_levels USING btree (protected_tag_id); +CREATE INDEX index_protected_tag_create_access_levels_on_deploy_key_id ON protected_tag_create_access_levels USING btree (deploy_key_id); + CREATE INDEX index_protected_tag_create_access_levels_on_group_id ON protected_tag_create_access_levels USING btree (group_id); CREATE INDEX index_protected_tag_create_access_levels_on_user_id ON protected_tag_create_access_levels USING btree (user_id); @@ -30528,16 +31589,18 @@ CREATE INDEX index_sbom_occurrences_on_component_id ON sbom_occurrences USING bt CREATE INDEX index_sbom_occurrences_on_component_version_id ON sbom_occurrences USING btree (component_version_id); -CREATE UNIQUE INDEX index_sbom_occurrences_on_ingestion_attributes ON sbom_occurrences USING btree (project_id, component_id, component_version_id, source_id, commit_sha); - CREATE INDEX index_sbom_occurrences_on_pipeline_id ON sbom_occurrences USING btree (pipeline_id); CREATE INDEX index_sbom_occurrences_on_project_id ON sbom_occurrences USING btree (project_id); CREATE INDEX index_sbom_occurrences_on_source_id ON sbom_occurrences USING btree (source_id); +CREATE UNIQUE INDEX index_sbom_occurrences_on_uuid ON sbom_occurrences USING btree (uuid); + CREATE UNIQUE INDEX index_sbom_sources_on_source_type_and_source ON sbom_sources USING btree (source_type, source); +CREATE INDEX index_scan_result_policies_on_policy_configuration_id ON scan_result_policies USING btree (security_orchestration_policy_configuration_id); + CREATE INDEX index_scim_identities_on_group_id ON scim_identities USING btree (group_id); CREATE UNIQUE INDEX index_scim_identities_on_lower_extern_uid_and_group_id ON scim_identities USING btree (lower((extern_uid)::text), group_id); @@ -30550,12 +31613,12 @@ CREATE INDEX index_secure_ci_builds_on_user_id_name_created_at ON ci_builds USIN CREATE INDEX index_security_ci_builds_on_name_and_id_parser_features ON ci_builds USING btree (name, id) WHERE (((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, ('dast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('license_management'::character varying)::text, ('sast'::character varying)::text, ('secret_detection'::character varying)::text, ('coverage_fuzzing'::character varying)::text, ('license_scanning'::character varying)::text, ('apifuzzer_fuzz'::character varying)::text, ('apifuzzer_fuzz_dnd'::character varying)::text])) AND ((type)::text = 'Ci::Build'::text)); +CREATE INDEX index_security_scans_for_non_purged_records ON security_scans USING btree (created_at, id) WHERE (status <> 6); + CREATE INDEX index_security_scans_on_created_at ON security_scans USING btree (created_at); CREATE INDEX index_security_scans_on_date_created_at_and_id ON security_scans USING btree (date(timezone('UTC'::text, created_at)), id); -CREATE INDEX index_security_scans_on_id_for_non_purged_records ON security_scans USING btree (id) WHERE (status <> 6); - CREATE INDEX index_security_scans_on_length_of_errors ON security_scans USING btree (pipeline_id, jsonb_array_length(COALESCE((info -> 'errors'::text), '[]'::jsonb))); CREATE INDEX index_security_scans_on_length_of_warnings ON security_scans USING btree (pipeline_id, jsonb_array_length(COALESCE((info -> 'warnings'::text), '[]'::jsonb))); @@ -30594,6 +31657,10 @@ CREATE UNIQUE INDEX index_shards_on_name ON shards USING btree (name); CREATE UNIQUE INDEX index_site_profile_secret_variables_on_site_profile_id_and_key ON dast_site_profile_secret_variables USING btree (dast_site_profile_id, key); +CREATE UNIQUE INDEX index_slack_api_scopes_on_name ON slack_api_scopes USING btree (name); + +CREATE UNIQUE INDEX index_slack_api_scopes_on_name_and_integration ON slack_integrations_scopes USING btree (slack_integration_id, slack_api_scope_id); + CREATE INDEX index_slack_integrations_on_integration_id ON slack_integrations USING btree (integration_id); CREATE UNIQUE INDEX index_slack_integrations_on_team_id_and_alias ON slack_integrations USING btree (team_id, alias); @@ -30644,9 +31711,9 @@ CREATE INDEX index_snippets_on_updated_at ON snippets USING btree (updated_at); CREATE INDEX index_snippets_on_visibility_level_and_secret ON snippets USING btree (visibility_level, secret); -CREATE INDEX index_software_license_policies_on_software_license_id ON software_license_policies USING btree (software_license_id); +CREATE INDEX index_software_license_policies_on_scan_result_policy_id ON software_license_policies USING btree (scan_result_policy_id); -CREATE UNIQUE INDEX index_software_license_policies_unique_per_project ON software_license_policies USING btree (project_id, software_license_id); +CREATE INDEX index_software_license_policies_on_software_license_id ON software_license_policies USING btree (software_license_id); CREATE INDEX index_software_licenses_on_spdx_identifier ON software_licenses USING btree (spdx_identifier); @@ -30678,6 +31745,8 @@ CREATE INDEX index_ssh_signatures_on_key_id ON ssh_signatures USING btree (key_i CREATE INDEX index_ssh_signatures_on_project_id ON ssh_signatures USING btree (project_id); +CREATE INDEX index_ssh_signatures_on_user_id ON ssh_signatures USING btree (user_id); + CREATE INDEX index_status_check_responses_on_external_approval_rule_id ON status_check_responses USING btree (external_approval_rule_id); CREATE INDEX index_status_check_responses_on_external_status_check_id ON status_check_responses USING btree (external_status_check_id); @@ -30692,6 +31761,8 @@ CREATE INDEX index_subscriptions_on_project_id ON subscriptions USING btree (pro CREATE UNIQUE INDEX index_subscriptions_on_subscribable_and_user_id_and_project_id ON subscriptions USING btree (subscribable_id, subscribable_type, user_id, project_id); +CREATE INDEX index_successful_authentication_events_for_metrics ON authentication_events USING btree (user_id, provider, created_at) WHERE (result = 1); + CREATE INDEX index_successful_deployments_on_cluster_id_and_environment_id ON deployments USING btree (cluster_id, environment_id) WHERE (status = 2); CREATE UNIQUE INDEX index_suggestions_on_note_id_and_relative_order ON suggestions USING btree (note_id, relative_order); @@ -30828,6 +31899,14 @@ CREATE INDEX index_uploads_on_store ON uploads USING btree (store); CREATE INDEX index_uploads_on_uploader_and_path ON uploads USING btree (uploader, path); +CREATE INDEX index_user_achievements_on_achievement_id_revoked_by_is_null ON user_achievements USING btree (achievement_id, ((revoked_by_user_id IS NULL))); + +CREATE INDEX index_user_achievements_on_awarded_by_revoked_by_is_null ON user_achievements USING btree (awarded_by_user_id, ((revoked_by_user_id IS NULL))); + +CREATE INDEX index_user_achievements_on_revoked_by_user_id ON user_achievements USING btree (revoked_by_user_id); + +CREATE INDEX index_user_achievements_on_user_id_revoked_by_is_null ON user_achievements USING btree (user_id, ((revoked_by_user_id IS NULL))); + CREATE INDEX index_user_agent_details_on_subject_id_and_subject_type ON user_agent_details USING btree (subject_id, subject_type); CREATE INDEX index_user_callouts_on_user_id ON user_callouts USING btree (user_id); @@ -30882,6 +31961,8 @@ CREATE INDEX index_user_statuses_on_user_id ON user_statuses USING btree (user_i CREATE UNIQUE INDEX index_user_synced_attributes_metadata_on_user_id ON user_synced_attributes_metadata USING btree (user_id); +CREATE INDEX index_users_for_billable_users ON users USING btree (id) WHERE (((state)::text = 'active'::text) AND ((user_type IS NULL) OR (user_type = ANY (ARRAY[6, 4]))) AND ((user_type IS NULL) OR (user_type = ANY (ARRAY[4, 5])))); + CREATE INDEX index_users_on_accepted_term_id ON users USING btree (accepted_term_id); CREATE INDEX index_users_on_admin ON users USING btree (admin); @@ -30950,14 +32031,14 @@ COMMENT ON INDEX index_verification_codes_on_phone_and_visitor_id_code IS 'JiHu- CREATE UNIQUE INDEX index_vuln_historical_statistics_on_project_id_and_date ON vulnerability_historical_statistics USING btree (project_id, date); +CREATE INDEX index_vuln_reads_common_query_on_resolved_on_default_branch ON vulnerability_reads USING btree (project_id, state, report_type, vulnerability_id DESC) WHERE (resolved_on_default_branch IS TRUE); + CREATE INDEX index_vuln_reads_on_casted_cluster_agent_id_where_it_is_null ON vulnerability_reads USING btree (casted_cluster_agent_id) WHERE (casted_cluster_agent_id IS NOT NULL); CREATE INDEX index_vuln_reads_on_namespace_id_state_severity_and_vuln_id ON vulnerability_reads USING btree (namespace_id, state, severity, vulnerability_id DESC); CREATE INDEX index_vuln_reads_on_project_id_state_severity_and_vuln_id ON vulnerability_reads USING btree (project_id, state, severity, vulnerability_id DESC); -CREATE INDEX index_vuln_reads_on_resolved_on_default_branch ON vulnerability_reads USING btree (project_id, state, id) WHERE (resolved_on_default_branch IS TRUE); - CREATE INDEX index_vulnerabilities_common_finder_query_on_default_branch ON vulnerabilities USING btree (project_id, state, report_type, present_on_default_branch, severity, id); CREATE INDEX index_vulnerabilities_on_author_id ON vulnerabilities USING btree (author_id); @@ -30980,10 +32061,6 @@ CREATE INDEX index_vulnerabilities_on_resolved_by_id ON vulnerabilities USING bt CREATE INDEX index_vulnerabilities_on_start_date_sourcing_milestone_id ON vulnerabilities USING btree (start_date_sourcing_milestone_id); -CREATE INDEX index_vulnerabilities_on_state_case_id ON vulnerabilities USING btree (array_position(ARRAY[(1)::smallint, (4)::smallint, (3)::smallint, (2)::smallint], state), id DESC); - -CREATE INDEX index_vulnerabilities_on_state_case_id_desc ON vulnerabilities USING btree (array_position(ARRAY[(1)::smallint, (4)::smallint, (3)::smallint, (2)::smallint], state) DESC, id DESC); - CREATE INDEX index_vulnerabilities_on_updated_by_id ON vulnerabilities USING btree (updated_by_id); CREATE INDEX index_vulnerabilities_project_id_and_id_on_default_branch ON vulnerabilities USING btree (project_id, id) WHERE (present_on_default_branch IS TRUE); @@ -31134,10 +32211,32 @@ CREATE UNIQUE INDEX index_wiki_page_slugs_on_slug_and_wiki_page_meta_id ON wiki_ CREATE INDEX index_wiki_page_slugs_on_wiki_page_meta_id ON wiki_page_slugs USING btree (wiki_page_meta_id); +CREATE INDEX index_wiki_repository_states_failed_verification ON wiki_repository_states USING btree (verification_retry_at NULLS FIRST) WHERE (verification_state = 3); + +CREATE INDEX index_wiki_repository_states_needs_verification ON wiki_repository_states USING btree (verification_state) WHERE ((verification_state = 0) OR (verification_state = 3)); + +CREATE UNIQUE INDEX index_wiki_repository_states_on_project_wiki_repository_id ON wiki_repository_states USING btree (project_wiki_repository_id); + +CREATE INDEX index_wiki_repository_states_on_verification_state ON wiki_repository_states USING btree (verification_state); + +CREATE INDEX index_wiki_repository_states_pending_verification ON wiki_repository_states USING btree (verified_at NULLS FIRST) WHERE (verification_state = 0); + +CREATE INDEX index_work_item_hierarchy_restrictions_on_child_type_id ON work_item_hierarchy_restrictions USING btree (child_type_id); + +CREATE UNIQUE INDEX index_work_item_hierarchy_restrictions_on_parent_and_child ON work_item_hierarchy_restrictions USING btree (parent_type_id, child_type_id); + +CREATE INDEX index_work_item_hierarchy_restrictions_on_parent_type_id ON work_item_hierarchy_restrictions USING btree (parent_type_id); + CREATE UNIQUE INDEX index_work_item_parent_links_on_work_item_id ON work_item_parent_links USING btree (work_item_id); CREATE INDEX index_work_item_parent_links_on_work_item_parent_id ON work_item_parent_links USING btree (work_item_parent_id); +CREATE UNIQUE INDEX index_work_item_widget_definitions_on_default_witype_and_name ON work_item_widget_definitions USING btree (work_item_type_id, name) WHERE (namespace_id IS NULL); + +CREATE UNIQUE INDEX index_work_item_widget_definitions_on_namespace_type_and_name ON work_item_widget_definitions USING btree (namespace_id, work_item_type_id, name); + +CREATE INDEX index_work_item_widget_definitions_on_work_item_type_id ON work_item_widget_definitions USING btree (work_item_type_id); + CREATE INDEX index_x509_certificates_on_subject_key_identifier ON x509_certificates USING btree (subject_key_identifier); CREATE INDEX index_x509_certificates_on_x509_issuer_id ON x509_certificates USING btree (x509_issuer_id); @@ -31152,6 +32251,14 @@ CREATE INDEX index_x509_issuers_on_subject_key_identifier ON x509_issuers USING CREATE INDEX index_zentao_tracker_data_on_integration_id ON zentao_tracker_data USING btree (integration_id); +CREATE INDEX index_zoekt_indexed_namespaces_on_namespace_id ON zoekt_indexed_namespaces USING btree (namespace_id); + +CREATE UNIQUE INDEX index_zoekt_shard_and_namespace ON zoekt_indexed_namespaces USING btree (zoekt_shard_id, namespace_id); + +CREATE UNIQUE INDEX index_zoekt_shards_on_index_base_url ON zoekt_shards USING btree (index_base_url); + +CREATE UNIQUE INDEX index_zoekt_shards_on_search_base_url ON zoekt_shards USING btree (search_base_url); + CREATE INDEX index_zoom_meetings_on_issue_id ON zoom_meetings USING btree (issue_id); CREATE UNIQUE INDEX index_zoom_meetings_on_issue_id_and_issue_status ON zoom_meetings USING btree (issue_id, issue_status) WHERE (issue_status = 1); @@ -31212,6 +32319,8 @@ CREATE INDEX scan_finding_approval_mr_rule_index_id ON approval_merge_request_ru CREATE INDEX scan_finding_approval_mr_rule_index_merge_request_id ON approval_merge_request_rules USING btree (merge_request_id) WHERE (report_type = 4); +CREATE INDEX scan_finding_approval_mr_rule_index_mr_id_and_created_at ON approval_merge_request_rules USING btree (merge_request_id, created_at) WHERE (report_type = 4); + CREATE INDEX scan_finding_approval_project_rule_index_created_at_project_id ON approval_project_rules USING btree (created_at, project_id) WHERE (report_type = 4); CREATE INDEX scan_finding_approval_project_rule_index_project_id ON approval_project_rules USING btree (project_id) WHERE (report_type = 4); @@ -31238,11 +32347,11 @@ CREATE UNIQUE INDEX taggings_idx ON taggings USING btree (tag_id, taggable_id, t CREATE UNIQUE INDEX term_agreements_unique_index ON term_agreements USING btree (user_id, term_id); -CREATE INDEX tmp_idx_for_vulnerability_feedback_migration ON vulnerability_feedback USING btree (migrated_to_state_transition, feedback_type) WHERE ((migrated_to_state_transition = false) AND (feedback_type = 0)); +CREATE INDEX tmp_idx_for_feedback_comment_processing ON vulnerability_feedback USING btree (id) WHERE (char_length(comment) > 50000); -CREATE INDEX tmp_idx_vulnerabilities_on_id_where_report_type_7_99 ON vulnerabilities USING btree (id) WHERE (report_type = ANY (ARRAY[7, 99])); +CREATE INDEX tmp_idx_for_vulnerability_feedback_migration ON vulnerability_feedback USING btree (id) WHERE ((migrated_to_state_transition = false) AND (feedback_type = 0)); -CREATE INDEX tmp_idx_where_user_details_fields_filled ON users USING btree (id) WHERE (((COALESCE(linkedin, ''::character varying))::text IS DISTINCT FROM ''::text) OR ((COALESCE(twitter, ''::character varying))::text IS DISTINCT FROM ''::text) OR ((COALESCE(skype, ''::character varying))::text IS DISTINCT FROM ''::text) OR ((COALESCE(website_url, ''::character varying))::text IS DISTINCT FROM ''::text) OR ((COALESCE(location, ''::character varying))::text IS DISTINCT FROM ''::text) OR ((COALESCE(organization, ''::character varying))::text IS DISTINCT FROM ''::text)); +CREATE INDEX tmp_idx_package_files_on_non_zero_size ON packages_package_files USING btree (package_id, size) WHERE (size IS NOT NULL); CREATE INDEX tmp_index_ci_job_artifacts_on_expire_at_where_locked_unknown ON ci_job_artifacts USING btree (expire_at, job_id) WHERE ((locked = 2) AND (expire_at IS NOT NULL)); @@ -31258,21 +32367,17 @@ CREATE INDEX tmp_index_for_null_member_namespace_id ON members USING btree (memb CREATE INDEX tmp_index_for_project_namespace_id_migration_on_routes ON routes USING btree (id) WHERE ((namespace_id IS NULL) AND ((source_type)::text = 'Project'::text)); -CREATE INDEX tmp_index_issues_on_issue_type_and_id ON issues USING btree (issue_type, id); - CREATE INDEX tmp_index_members_on_state ON members USING btree (state) WHERE (state = 2); CREATE INDEX tmp_index_migrated_container_registries ON container_repositories USING btree (project_id) WHERE ((migration_state = 'import_done'::text) OR (created_at >= '2022-01-23 00:00:00'::timestamp without time zone)); -CREATE UNIQUE INDEX tmp_index_on_tmp_project_id_on_namespaces ON namespaces USING btree (tmp_project_id); +CREATE INDEX tmp_index_oauth_access_tokens_on_id_where_expires_in_null ON oauth_access_tokens USING btree (id) WHERE (expires_in IS NULL); CREATE INDEX tmp_index_on_vulnerabilities_non_dismissed ON vulnerabilities USING btree (id) WHERE (state <> 2); CREATE INDEX tmp_index_project_statistics_cont_registry_size ON project_statistics USING btree (project_id) WHERE (container_registry_size = 0); -CREATE INDEX tmp_index_project_statistics_uploads_size ON project_statistics USING btree (project_id) WHERE (uploads_size <> 0); - -CREATE INDEX tmp_index_vulnerability_occurrences_on_id_and_scanner_id ON vulnerability_occurrences USING btree (id, scanner_id) WHERE (report_type = ANY (ARRAY[7, 99])); +CREATE INDEX tmp_index_vulnerability_overlong_title_html ON vulnerabilities USING btree (id) WHERE (length(title_html) > 800); CREATE UNIQUE INDEX uniq_pkgs_deb_grp_architectures_on_distribution_id_and_name ON packages_debian_group_architectures USING btree (distribution_id, name); @@ -31290,6 +32395,12 @@ CREATE UNIQUE INDEX uniq_pkgs_debian_project_distributions_project_id_and_codena CREATE UNIQUE INDEX uniq_pkgs_debian_project_distributions_project_id_and_suite ON packages_debian_project_distributions USING btree (project_id, suite); +CREATE UNIQUE INDEX unique_ci_builds_token_encrypted_and_partition_id ON ci_builds USING btree (token_encrypted, partition_id) WHERE (token_encrypted IS NOT NULL); + +CREATE UNIQUE INDEX unique_index_ci_build_pending_states_on_partition_id_build_id ON ci_build_pending_states USING btree (partition_id, build_id); + +CREATE UNIQUE INDEX unique_index_for_project_pages_unique_domain ON project_settings USING btree (pages_unique_domain) WHERE (pages_unique_domain IS NOT NULL); + CREATE UNIQUE INDEX unique_merge_request_metrics_by_merge_request_id ON merge_request_metrics USING btree (merge_request_id); CREATE UNIQUE INDEX unique_projects_on_name_namespace_id ON projects USING btree (name, namespace_id); @@ -32588,6 +33699,8 @@ ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_p ALTER INDEX p_ci_builds_metadata_pkey ATTACH PARTITION ci_builds_metadata_pkey; +ALTER INDEX p_ci_builds_metadata_on_runner_machine_id_idx ATTACH PARTITION index_b6331cde35; + ALTER INDEX p_ci_builds_metadata_build_id_idx ATTACH PARTITION index_ci_builds_metadata_on_build_id_and_has_exposed_artifacts; ALTER INDEX p_ci_builds_metadata_build_id_id_idx ATTACH PARTITION index_ci_builds_metadata_on_build_id_and_id_and_interruptible; @@ -32616,14 +33729,42 @@ CREATE TRIGGER nullify_merge_request_metrics_build_data_on_update BEFORE UPDATE CREATE TRIGGER projects_loose_fk_trigger AFTER DELETE ON projects REFERENCING OLD TABLE AS old_table FOR EACH STATEMENT EXECUTE FUNCTION insert_into_loose_foreign_keys_deleted_records(); -CREATE TRIGGER sync_namespaces_amount_used_columns BEFORE INSERT OR UPDATE ON ci_namespace_monthly_usages FOR EACH ROW EXECUTE FUNCTION sync_namespaces_amount_used_columns(); +CREATE TRIGGER trigger_080e73845bfd BEFORE INSERT OR UPDATE ON notes FOR EACH ROW EXECUTE FUNCTION trigger_080e73845bfd(); -CREATE TRIGGER sync_projects_amount_used_columns BEFORE INSERT OR UPDATE ON ci_project_monthly_usages FOR EACH ROW EXECUTE FUNCTION sync_projects_amount_used_columns(); +CREATE TRIGGER trigger_0e214b8a14f2 BEFORE INSERT OR UPDATE ON vulnerability_user_mentions FOR EACH ROW EXECUTE FUNCTION trigger_0e214b8a14f2(); + +CREATE TRIGGER trigger_17c3a95ee58a BEFORE INSERT OR UPDATE ON commit_user_mentions FOR EACH ROW EXECUTE FUNCTION trigger_17c3a95ee58a(); CREATE TRIGGER trigger_1a857e8db6cd BEFORE INSERT OR UPDATE ON vulnerability_occurrences FOR EACH ROW EXECUTE FUNCTION trigger_1a857e8db6cd(); +CREATE TRIGGER trigger_3207b8d0d6f3 BEFORE INSERT OR UPDATE ON ci_build_needs FOR EACH ROW EXECUTE FUNCTION trigger_3207b8d0d6f3(); + +CREATE TRIGGER trigger_3dc62927cae8 BEFORE INSERT OR UPDATE ON design_user_mentions FOR EACH ROW EXECUTE FUNCTION trigger_3dc62927cae8(); + +CREATE TRIGGER trigger_428d92773fe7 BEFORE INSERT OR UPDATE ON timelogs FOR EACH ROW EXECUTE FUNCTION trigger_428d92773fe7(); + +CREATE TRIGGER trigger_482bac5ec48a BEFORE INSERT OR UPDATE ON system_note_metadata FOR EACH ROW EXECUTE FUNCTION trigger_482bac5ec48a(); + +CREATE TRIGGER trigger_775287b6d67a BEFORE INSERT OR UPDATE ON note_diff_files FOR EACH ROW EXECUTE FUNCTION trigger_775287b6d67a(); + +CREATE TRIGGER trigger_7f4fcd5aa322 BEFORE INSERT OR UPDATE ON sent_notifications FOR EACH ROW EXECUTE FUNCTION trigger_7f4fcd5aa322(); + +CREATE TRIGGER trigger_bfc6e47be8cc BEFORE INSERT OR UPDATE ON snippet_user_mentions FOR EACH ROW EXECUTE FUNCTION trigger_bfc6e47be8cc(); + +CREATE TRIGGER trigger_bfcbace4260d BEFORE INSERT OR UPDATE ON merge_request_user_mentions FOR EACH ROW EXECUTE FUNCTION trigger_bfcbace4260d(); + +CREATE TRIGGER trigger_c2051020aa8b BEFORE INSERT OR UPDATE ON issue_user_mentions FOR EACH ROW EXECUTE FUNCTION trigger_c2051020aa8b(); + +CREATE TRIGGER trigger_c5a5f48f12b0 BEFORE INSERT OR UPDATE ON epic_user_mentions FOR EACH ROW EXECUTE FUNCTION trigger_c5a5f48f12b0(); + +CREATE TRIGGER trigger_c7107f30d69d BEFORE INSERT OR UPDATE ON merge_request_metrics FOR EACH ROW EXECUTE FUNCTION trigger_c7107f30d69d(); + +CREATE TRIGGER trigger_dca935e3a712 BEFORE INSERT OR UPDATE ON todos FOR EACH ROW EXECUTE FUNCTION trigger_dca935e3a712(); + CREATE TRIGGER trigger_delete_project_namespace_on_project_delete AFTER DELETE ON projects FOR EACH ROW WHEN ((old.project_namespace_id IS NOT NULL)) EXECUTE FUNCTION delete_associated_project_namespace(); +CREATE TRIGGER trigger_ee7956d805e6 BEFORE INSERT OR UPDATE ON suggestions FOR EACH ROW EXECUTE FUNCTION trigger_ee7956d805e6(); + CREATE TRIGGER trigger_has_external_issue_tracker_on_delete AFTER DELETE ON integrations FOR EACH ROW WHEN ((((old.category)::text = 'issue_tracker'::text) AND (old.active = true) AND (old.project_id IS NOT NULL))) EXECUTE FUNCTION set_has_external_issue_tracker(); CREATE TRIGGER trigger_has_external_issue_tracker_on_insert AFTER INSERT ON integrations FOR EACH ROW WHEN ((((new.category)::text = 'issue_tracker'::text) AND (new.active = true) AND (new.project_id IS NOT NULL))) EXECUTE FUNCTION set_has_external_issue_tracker(); @@ -32684,6 +33825,9 @@ ALTER TABLE ONLY service_desk_settings ALTER TABLE ONLY design_management_designs_versions ADD CONSTRAINT fk_03c671965c FOREIGN KEY (design_id) REFERENCES design_management_designs(id) ON DELETE CASCADE; +ALTER TABLE ONLY analytics_dashboards_pointers + ADD CONSTRAINT fk_05d96922bd FOREIGN KEY (target_project_id) REFERENCES projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY issues ADD CONSTRAINT fk_05f1e72feb FOREIGN KEY (author_id) REFERENCES users(id) ON DELETE SET NULL; @@ -32699,6 +33843,9 @@ ALTER TABLE ONLY dast_sites ALTER TABLE ONLY issue_customer_relations_contacts ADD CONSTRAINT fk_0c0037f723 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE; +ALTER TABLE ONLY ssh_signatures + ADD CONSTRAINT fk_0c83baaa5f FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE SET NULL; + ALTER TABLE ONLY web_hooks ADD CONSTRAINT fk_0c8ca6d9d1 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -32708,9 +33855,6 @@ ALTER TABLE ONLY notification_settings ALTER TABLE ONLY lists ADD CONSTRAINT fk_0d3f677137 FOREIGN KEY (board_id) REFERENCES boards(id) ON DELETE CASCADE; -ALTER TABLE ONLY ci_unit_test_failures - ADD CONSTRAINT fk_0f09856e1f FOREIGN KEY (build_id) REFERENCES ci_builds(id) ON DELETE CASCADE; - ALTER TABLE ONLY deployment_approvals ADD CONSTRAINT fk_0f58311058 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; @@ -32780,9 +33924,6 @@ ALTER TABLE ONLY coverage_fuzzing_corpuses ALTER TABLE ONLY namespace_settings ADD CONSTRAINT fk_20cf0eb2f9 FOREIGN KEY (default_compliance_framework_id) REFERENCES compliance_management_frameworks(id) ON DELETE SET NULL; -ALTER TABLE ONLY geo_container_repository_updated_events - ADD CONSTRAINT fk_212c89c706 FOREIGN KEY (container_repository_id) REFERENCES container_repositories(id) ON DELETE CASCADE; - ALTER TABLE ONLY ci_build_trace_metadata ADD CONSTRAINT fk_21d25cac1a FOREIGN KEY (trace_artifact_id) REFERENCES ci_job_artifacts(id) ON DELETE CASCADE; @@ -32879,6 +34020,9 @@ ALTER TABLE ONLY sprints ALTER TABLE ONLY push_event_payloads ADD CONSTRAINT fk_36c74129da FOREIGN KEY (event_id) REFERENCES events(id) ON DELETE CASCADE; +ALTER TABLE ONLY protected_tag_create_access_levels + ADD CONSTRAINT fk_386a642e13 FOREIGN KEY (deploy_key_id) REFERENCES keys(id) ON DELETE CASCADE; + ALTER TABLE ONLY incident_management_timeline_events ADD CONSTRAINT fk_38a74279df FOREIGN KEY (updated_by_user_id) REFERENCES users(id) ON DELETE SET NULL; @@ -32894,6 +34038,9 @@ ALTER TABLE ONLY agent_activity_events ALTER TABLE ONLY issues ADD CONSTRAINT fk_3b8c72ea56 FOREIGN KEY (sprint_id) REFERENCES sprints(id) ON DELETE SET NULL; +ALTER TABLE ONLY zoekt_indexed_namespaces + ADD CONSTRAINT fk_3bebdb4efc FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY epics ADD CONSTRAINT fk_3c1fd1cccc FOREIGN KEY (due_date_sourcing_milestone_id) REFERENCES milestones(id) ON DELETE SET NULL; @@ -32936,6 +34083,9 @@ ALTER TABLE ONLY sbom_occurrences ALTER TABLE ONLY namespace_commit_emails ADD CONSTRAINT fk_4d6ba63ba5 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE; +ALTER TABLE ONLY user_achievements + ADD CONSTRAINT fk_4efde02858 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; + ALTER TABLE ONLY vulnerability_reads ADD CONSTRAINT fk_4f593f6c62 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE; @@ -32972,6 +34122,9 @@ ALTER TABLE ONLY approval_merge_request_rules ALTER TABLE ONLY deploy_keys_projects ADD CONSTRAINT fk_58a901ca7e FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY dependency_list_exports + ADD CONSTRAINT fk_5b3d11e1ef FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE SET NULL; + ALTER TABLE ONLY dast_scanner_profiles_builds ADD CONSTRAINT fk_5d46286ad3 FOREIGN KEY (dast_scanner_profile_id) REFERENCES dast_scanner_profiles(id) ON DELETE CASCADE; @@ -32987,9 +34140,15 @@ ALTER TABLE ONLY csv_issue_imports ALTER TABLE ONLY project_access_tokens ADD CONSTRAINT fk_5f7e8450e1 FOREIGN KEY (personal_access_token_id) REFERENCES personal_access_tokens(id) ON DELETE CASCADE; +ALTER TABLE ONLY user_achievements + ADD CONSTRAINT fk_60b12fcda3 FOREIGN KEY (awarded_by_user_id) REFERENCES users(id) ON DELETE SET NULL; + ALTER TABLE ONLY merge_requests ADD CONSTRAINT fk_6149611a04 FOREIGN KEY (assignee_id) REFERENCES users(id) ON DELETE SET NULL; +ALTER TABLE ONLY work_item_widget_definitions + ADD CONSTRAINT fk_61bfa96db5 FOREIGN KEY (work_item_type_id) REFERENCES work_item_types(id) ON DELETE CASCADE; + ALTER TABLE ONLY deployment_approvals ADD CONSTRAINT fk_61cdbdc5b9 FOREIGN KEY (approval_rule_id) REFERENCES protected_environment_approval_rules(id) ON DELETE SET NULL; @@ -33008,21 +34167,12 @@ ALTER TABLE ONLY merge_requests ALTER TABLE ONLY ci_builds ADD CONSTRAINT fk_6661f4f0e8 FOREIGN KEY (resource_group_id) REFERENCES ci_resource_groups(id) ON DELETE SET NULL; -ALTER TABLE ONLY application_settings - ADD CONSTRAINT fk_693b8795e4 FOREIGN KEY (push_rule_id) REFERENCES push_rules(id) ON DELETE SET NULL; - ALTER TABLE ONLY project_wiki_repository_states ADD CONSTRAINT fk_6951681c70 FOREIGN KEY (project_wiki_repository_id) REFERENCES project_wiki_repositories(id) ON DELETE CASCADE; ALTER TABLE ONLY merge_requests ADD CONSTRAINT fk_6a5165a692 FOREIGN KEY (milestone_id) REFERENCES milestones(id) ON DELETE SET NULL; -ALTER TABLE ONLY namespaces - ADD CONSTRAINT fk_6a77f66919 FOREIGN KEY (tmp_project_id) REFERENCES projects(id) ON DELETE CASCADE; - -ALTER TABLE ONLY geo_event_log - ADD CONSTRAINT fk_6ada82d42a FOREIGN KEY (container_repository_updated_event_id) REFERENCES geo_container_repository_updated_events(id) ON DELETE CASCADE; - ALTER TABLE ONLY projects ADD CONSTRAINT fk_6ca23af0a3 FOREIGN KEY (project_namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE; @@ -33032,9 +34182,6 @@ ALTER TABLE ONLY dast_profile_schedules ALTER TABLE ONLY vulnerability_merge_request_links ADD CONSTRAINT fk_6d7aa8796e FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE; -ALTER TABLE ONLY issues - ADD CONSTRAINT fk_6e10d4d38a FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE SET NULL; - ALTER TABLE ONLY projects ADD CONSTRAINT fk_6e5c14658a FOREIGN KEY (pool_repository_id) REFERENCES pool_repositories(id) ON DELETE SET NULL; @@ -33122,15 +34269,15 @@ ALTER TABLE ONLY import_export_uploads ALTER TABLE ONLY push_rules ADD CONSTRAINT fk_83b29894de FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; -ALTER TABLE ONLY experiment_subjects - ADD CONSTRAINT fk_842649f2f5 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE; - ALTER TABLE ONLY merge_request_diffs ADD CONSTRAINT fk_8483f3258f FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE; ALTER TABLE ONLY requirements ADD CONSTRAINT fk_85044baef0 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE; +ALTER TABLE ONLY ci_build_pending_states + ADD CONSTRAINT fk_861cd17da3_p FOREIGN KEY (partition_id, build_id) REFERENCES ci_builds(partition_id, id) ON UPDATE CASCADE ON DELETE CASCADE; + ALTER TABLE ONLY geo_event_log ADD CONSTRAINT fk_86c84214ec FOREIGN KEY (repository_renamed_event_id) REFERENCES geo_repository_renamed_events(id) ON DELETE CASCADE; @@ -33152,6 +34299,9 @@ ALTER TABLE ONLY requirements_management_test_reports ALTER TABLE ONLY issues ADD CONSTRAINT fk_899c8f3231 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY ci_build_trace_chunks + ADD CONSTRAINT fk_89e29fa5ee_p FOREIGN KEY (partition_id, build_id) REFERENCES ci_builds(partition_id, id) ON UPDATE CASCADE ON DELETE CASCADE; + ALTER TABLE ONLY sbom_vulnerable_component_versions ADD CONSTRAINT fk_8a2a1197f9 FOREIGN KEY (sbom_component_version_id) REFERENCES sbom_component_versions(id) ON DELETE CASCADE; @@ -33185,9 +34335,6 @@ ALTER TABLE ONLY vulnerabilities ALTER TABLE ONLY boards_epic_list_user_preferences ADD CONSTRAINT fk_95eac55851 FOREIGN KEY (epic_list_id) REFERENCES boards_epic_lists(id) ON DELETE CASCADE; -ALTER TABLE ONLY application_settings - ADD CONSTRAINT fk_964370041d FOREIGN KEY (usage_stats_set_by_user_id) REFERENCES users(id) ON DELETE SET NULL; - ALTER TABLE ONLY issues ADD CONSTRAINT fk_96b1dd429c FOREIGN KEY (milestone_id) REFERENCES milestones(id) ON DELETE SET NULL; @@ -33197,9 +34344,6 @@ ALTER TABLE ONLY vulnerability_occurrences ALTER TABLE ONLY protected_branch_merge_access_levels ADD CONSTRAINT fk_98f3d044fe FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; -ALTER TABLE ONLY chat_names - ADD CONSTRAINT fk_99a1348daf FOREIGN KEY (integration_id) REFERENCES integrations(id) ON DELETE CASCADE; - ALTER TABLE ONLY notes ADD CONSTRAINT fk_99e097b079 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -33218,6 +34362,9 @@ ALTER TABLE ONLY epics ALTER TABLE ONLY user_group_callouts ADD CONSTRAINT fk_9dc8b9d4b2 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; +ALTER TABLE ONLY ci_unit_test_failures + ADD CONSTRAINT fk_9e0fc58930_p FOREIGN KEY (partition_id, build_id) REFERENCES ci_builds(partition_id, id) ON UPDATE CASCADE ON DELETE CASCADE; + ALTER TABLE ONLY protected_environments ADD CONSTRAINT fk_9e112565b7 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; @@ -33251,6 +34398,9 @@ ALTER TABLE ONLY lfs_objects_projects ALTER TABLE ONLY merge_requests ADD CONSTRAINT fk_a6963e8447 FOREIGN KEY (target_project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY ssh_signatures + ADD CONSTRAINT fk_aa1efbe865 FOREIGN KEY (key_id) REFERENCES keys(id) ON DELETE SET NULL; + ALTER TABLE ONLY epics ADD CONSTRAINT fk_aa5798e761 FOREIGN KEY (closed_by_id) REFERENCES users(id) ON DELETE SET NULL; @@ -33353,6 +34503,9 @@ ALTER TABLE ONLY snippets ALTER TABLE ONLY ci_sources_pipelines ADD CONSTRAINT fk_be5624bf37 FOREIGN KEY (source_job_id) REFERENCES ci_builds(id) ON DELETE CASCADE; +ALTER TABLE ONLY ci_sources_pipelines + ADD CONSTRAINT fk_be5624bf37_p FOREIGN KEY (source_partition_id, source_job_id) REFERENCES ci_builds(partition_id, id) ON UPDATE CASCADE ON DELETE CASCADE NOT VALID; + ALTER TABLE ONLY packages_maven_metadata ADD CONSTRAINT fk_be88aed360 FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE CASCADE; @@ -33383,6 +34536,9 @@ ALTER TABLE ONLY geo_event_log ALTER TABLE ONLY issues ADD CONSTRAINT fk_c63cbf6c25 FOREIGN KEY (closed_by_id) REFERENCES users(id) ON DELETE SET NULL; +ALTER TABLE ONLY issues + ADD CONSTRAINT fk_c78fbacd64 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY agent_activity_events ADD CONSTRAINT fk_c815368376 FOREIGN KEY (agent_id) REFERENCES cluster_agents(id) ON DELETE CASCADE; @@ -33410,9 +34566,6 @@ ALTER TABLE ONLY external_status_checks_protected_branches ALTER TABLE ONLY dast_profiles_pipelines ADD CONSTRAINT fk_cc206a8c13 FOREIGN KEY (dast_profile_id) REFERENCES dast_profiles(id) ON DELETE CASCADE; -ALTER TABLE ONLY experiment_subjects - ADD CONSTRAINT fk_ccc28f8ceb FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; - ALTER TABLE ONLY todos ADD CONSTRAINT fk_ccf0373936 FOREIGN KEY (author_id) REFERENCES users(id) ON DELETE CASCADE; @@ -33452,6 +34605,9 @@ ALTER TABLE ONLY agent_activity_events ALTER TABLE ONLY sbom_vulnerable_component_versions ADD CONSTRAINT fk_d720a1959a FOREIGN KEY (vulnerability_advisory_id) REFERENCES vulnerability_advisories(id) ON DELETE CASCADE; +ALTER TABLE ONLY user_achievements + ADD CONSTRAINT fk_d7653ef780 FOREIGN KEY (revoked_by_user_id) REFERENCES users(id) ON DELETE SET NULL; + ALTER TABLE ONLY metrics_users_starred_dashboards ADD CONSTRAINT fk_d76a2b9a8c FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -33464,6 +34620,9 @@ ALTER TABLE ONLY system_note_metadata ALTER TABLE ONLY sbom_occurrences ADD CONSTRAINT fk_d857c6edc1 FOREIGN KEY (component_id) REFERENCES sbom_components(id) ON DELETE CASCADE; +ALTER TABLE ONLY dependency_list_exports + ADD CONSTRAINT fk_d871d74675 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY todos ADD CONSTRAINT fk_d94154aa95 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; @@ -33491,11 +34650,11 @@ ALTER TABLE ONLY protected_branches ALTER TABLE ONLY issues ADD CONSTRAINT fk_df75a7c8b8 FOREIGN KEY (promoted_to_epic_id) REFERENCES epics(id) ON DELETE SET NULL; -ALTER TABLE ONLY experiment_subjects - ADD CONSTRAINT fk_dfc3e211d4 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; +ALTER TABLE ONLY approval_project_rules + ADD CONSTRAINT fk_e1372c912e FOREIGN KEY (scan_result_policy_id) REFERENCES scan_result_policies(id) ON DELETE CASCADE; ALTER TABLE ONLY ci_resources - ADD CONSTRAINT fk_e169a8e3d5 FOREIGN KEY (build_id) REFERENCES ci_builds(id) ON DELETE SET NULL; + ADD CONSTRAINT fk_e169a8e3d5_p FOREIGN KEY (partition_id, build_id) REFERENCES ci_builds(partition_id, id) ON UPDATE CASCADE ON DELETE SET NULL; ALTER TABLE ONLY ci_sources_pipelines ADD CONSTRAINT fk_e1bad85861 FOREIGN KEY (pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE; @@ -33524,21 +34683,18 @@ ALTER TABLE ONLY namespaces ALTER TABLE ONLY fork_networks ADD CONSTRAINT fk_e7b436b2b5 FOREIGN KEY (root_project_id) REFERENCES projects(id) ON DELETE SET NULL; -ALTER TABLE ONLY application_settings - ADD CONSTRAINT fk_e8a145f3a7 FOREIGN KEY (instance_administrators_group_id) REFERENCES namespaces(id) ON DELETE SET NULL; - ALTER TABLE ONLY integrations ADD CONSTRAINT fk_e8fe908a34 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; ALTER TABLE ONLY pages_domains ADD CONSTRAINT fk_ea2f6dfc6f FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; -ALTER TABLE ONLY application_settings - ADD CONSTRAINT fk_ec757bd087 FOREIGN KEY (file_template_project_id) REFERENCES projects(id) ON DELETE SET NULL; - ALTER TABLE ONLY merge_requests_compliance_violations ADD CONSTRAINT fk_ec881c1c6f FOREIGN KEY (violating_user_id) REFERENCES users(id) ON DELETE CASCADE; +ALTER TABLE ONLY work_item_widget_definitions + ADD CONSTRAINT fk_ecf57512f7 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY events ADD CONSTRAINT fk_edfd187b6f FOREIGN KEY (author_id) REFERENCES users(id) ON DELETE CASCADE; @@ -33566,9 +34722,6 @@ ALTER TABLE ONLY epics ALTER TABLE ONLY boards ADD CONSTRAINT fk_f15266b5f9 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; -ALTER TABLE ONLY ssh_signatures - ADD CONSTRAINT fk_f177ea6aa5 FOREIGN KEY (key_id) REFERENCES keys(id) ON DELETE CASCADE; - ALTER TABLE ONLY ci_pipeline_variables ADD CONSTRAINT fk_f29c5f4380 FOREIGN KEY (pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE; @@ -33587,6 +34740,9 @@ ALTER TABLE ONLY boards_epic_list_user_preferences ALTER TABLE ONLY user_project_callouts ADD CONSTRAINT fk_f62dd11a33 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; +ALTER TABLE ONLY approval_merge_request_rules + ADD CONSTRAINT fk_f726c79756 FOREIGN KEY (scan_result_policy_id) REFERENCES scan_result_policies(id) ON DELETE CASCADE; + ALTER TABLE ONLY cluster_agents ADD CONSTRAINT fk_f7d43dee13 FOREIGN KEY (created_by_user_id) REFERENCES users(id) ON DELETE SET NULL; @@ -33641,6 +34797,9 @@ ALTER TABLE ONLY approval_merge_request_rules ALTER TABLE ONLY namespace_statistics ADD CONSTRAINT fk_rails_0062050394 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE; +ALTER TABLE ONLY automation_rules + ADD CONSTRAINT fk_rails_025b519b8d FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY incident_management_oncall_participants ADD CONSTRAINT fk_rails_032b12996a FOREIGN KEY (oncall_rotation_id) REFERENCES incident_management_oncall_rotations(id) ON DELETE CASCADE; @@ -33656,6 +34815,9 @@ ALTER TABLE ONLY ip_restrictions ALTER TABLE ONLY terraform_state_versions ADD CONSTRAINT fk_rails_04f176e239 FOREIGN KEY (terraform_state_id) REFERENCES terraform_states(id) ON DELETE CASCADE; +ALTER TABLE ONLY work_item_hierarchy_restrictions + ADD CONSTRAINT fk_rails_08cd7fef58 FOREIGN KEY (child_type_id) REFERENCES work_item_types(id) ON DELETE CASCADE; + ALTER TABLE ONLY trending_projects ADD CONSTRAINT fk_rails_09feecd872 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -33674,9 +34836,6 @@ ALTER TABLE ONLY packages_conan_file_metadata ALTER TABLE ONLY related_epic_links ADD CONSTRAINT fk_rails_0b72027748 FOREIGN KEY (target_id) REFERENCES epics(id) ON DELETE CASCADE; -ALTER TABLE ONLY ci_build_pending_states - ADD CONSTRAINT fk_rails_0bbbfeaf9d FOREIGN KEY (build_id) REFERENCES ci_builds(id) ON DELETE CASCADE; - ALTER TABLE ONLY audit_events_external_audit_event_destinations ADD CONSTRAINT fk_rails_0bc80a4edc FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE; @@ -33704,9 +34863,6 @@ ALTER TABLE ONLY issue_email_participants ALTER TABLE ONLY merge_request_context_commits ADD CONSTRAINT fk_rails_0fe0039f60 FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE; -ALTER TABLE ONLY ci_build_trace_chunks - ADD CONSTRAINT fk_rails_1013b761f2 FOREIGN KEY (build_id) REFERENCES ci_builds(id) ON DELETE CASCADE; - ALTER TABLE ONLY vulnerability_exports ADD CONSTRAINT fk_rails_1019162882 FOREIGN KEY (author_id) REFERENCES users(id) ON DELETE CASCADE; @@ -33746,12 +34902,18 @@ ALTER TABLE ONLY diff_note_positions ALTER TABLE ONLY analytics_cycle_analytics_aggregations ADD CONSTRAINT fk_rails_13c8374c7a FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; +ALTER TABLE ONLY namespaces_storage_limit_exclusions + ADD CONSTRAINT fk_rails_14e8f7b0e0 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY users_security_dashboard_projects ADD CONSTRAINT fk_rails_150cd5682c FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; ALTER TABLE ONLY ci_build_report_results ADD CONSTRAINT fk_rails_16cb1ff064 FOREIGN KEY (build_id) REFERENCES ci_builds(id) ON DELETE CASCADE; +ALTER TABLE ONLY ci_build_report_results + ADD CONSTRAINT fk_rails_16cb1ff064_p FOREIGN KEY (partition_id, build_id) REFERENCES ci_builds(partition_id, id) ON UPDATE CASCADE ON DELETE CASCADE NOT VALID; + ALTER TABLE ONLY project_deploy_tokens ADD CONSTRAINT fk_rails_170e03cbaf FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -33881,6 +35043,9 @@ ALTER TABLE ONLY lfs_file_locks ALTER TABLE ONLY project_alerting_settings ADD CONSTRAINT fk_rails_27a84b407d FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY work_item_hierarchy_restrictions + ADD CONSTRAINT fk_rails_27bb3a10ba FOREIGN KEY (parent_type_id) REFERENCES work_item_types(id) ON DELETE CASCADE; + ALTER TABLE ONLY user_credit_card_validations ADD CONSTRAINT fk_rails_27ebc03cbf FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; @@ -33932,6 +35097,9 @@ ALTER TABLE ONLY issuable_severities ALTER TABLE ONLY saml_providers ADD CONSTRAINT fk_rails_306d459be7 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; +ALTER TABLE ONLY pm_package_version_licenses + ADD CONSTRAINT fk_rails_30ddb7f837 FOREIGN KEY (pm_package_version_id) REFERENCES pm_package_versions(id) ON DELETE CASCADE; + ALTER TABLE ONLY resource_state_events ADD CONSTRAINT fk_rails_3112bba7dc FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE; @@ -34010,6 +35178,9 @@ ALTER TABLE ONLY chat_teams ALTER TABLE ONLY ci_build_needs ADD CONSTRAINT fk_rails_3cf221d4ed FOREIGN KEY (build_id) REFERENCES ci_builds(id) ON DELETE CASCADE; +ALTER TABLE ONLY ci_build_needs + ADD CONSTRAINT fk_rails_3cf221d4ed_p FOREIGN KEY (partition_id, build_id) REFERENCES ci_builds(partition_id, id) ON UPDATE CASCADE ON DELETE CASCADE NOT VALID; + ALTER TABLE ONLY cluster_groups ADD CONSTRAINT fk_rails_3d28377556 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; @@ -34130,6 +35301,9 @@ ALTER TABLE ONLY geo_repository_renamed_events ALTER TABLE ONLY aws_roles ADD CONSTRAINT fk_rails_4ed56f4720 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; +ALTER TABLE ONLY zoekt_indexed_namespaces + ADD CONSTRAINT fk_rails_4f6006e94c FOREIGN KEY (zoekt_shard_id) REFERENCES zoekt_shards(id) ON DELETE CASCADE; + ALTER TABLE ONLY packages_debian_publications ADD CONSTRAINT fk_rails_4fc8ebd03e FOREIGN KEY (distribution_id) REFERENCES packages_debian_project_distributions(id) ON DELETE CASCADE; @@ -34148,6 +35322,12 @@ ALTER TABLE ONLY ci_pipeline_metadata ALTER TABLE ONLY project_repository_storage_moves ADD CONSTRAINT fk_rails_5106dbd44a FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY ml_candidate_metadata + ADD CONSTRAINT fk_rails_5117dddf22 FOREIGN KEY (candidate_id) REFERENCES ml_candidates(id) ON DELETE CASCADE; + +ALTER TABLE ONLY elastic_group_index_statuses + ADD CONSTRAINT fk_rails_52b9969b12 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY bulk_import_configurations ADD CONSTRAINT fk_rails_536b96bff1 FOREIGN KEY (bulk_import_id) REFERENCES bulk_imports(id) ON DELETE CASCADE; @@ -34304,6 +35484,9 @@ ALTER TABLE ONLY operations_feature_flags_clients ALTER TABLE ONLY namespace_admin_notes ADD CONSTRAINT fk_rails_666166ea7b FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE; +ALTER TABLE ONLY ci_runner_machines + ADD CONSTRAINT fk_rails_666b61f04f FOREIGN KEY (runner_id) REFERENCES ci_runners(id) ON DELETE CASCADE; + ALTER TABLE ONLY analytics_cycle_analytics_project_value_streams ADD CONSTRAINT fk_rails_669f4ba293 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -34325,6 +35508,9 @@ ALTER TABLE ONLY plan_limits ALTER TABLE ONLY operations_feature_flags_issues ADD CONSTRAINT fk_rails_6a8856ca4f FOREIGN KEY (feature_flag_id) REFERENCES operations_feature_flags(id) ON DELETE CASCADE; +ALTER TABLE ONLY ml_experiment_metadata + ADD CONSTRAINT fk_rails_6b39844d44 FOREIGN KEY (experiment_id) REFERENCES ml_experiments(id) ON DELETE CASCADE; + ALTER TABLE ONLY error_tracking_errors ADD CONSTRAINT fk_rails_6b41f837ba FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -34343,8 +35529,11 @@ ALTER TABLE ONLY users_security_dashboard_projects ALTER TABLE ONLY dast_sites ADD CONSTRAINT fk_rails_6febb6ea9c FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY analytics_dashboards_pointers + ADD CONSTRAINT fk_rails_7027b7eaa9 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY ci_builds_runner_session - ADD CONSTRAINT fk_rails_70707857d3 FOREIGN KEY (build_id) REFERENCES ci_builds(id) ON DELETE CASCADE; + ADD CONSTRAINT fk_rails_70707857d3_p FOREIGN KEY (partition_id, build_id) REFERENCES ci_builds(partition_id, id) ON UPDATE CASCADE ON DELETE CASCADE; ALTER TABLE ONLY list_user_preferences ADD CONSTRAINT fk_rails_70b2ef5ce2 FOREIGN KEY (list_id) REFERENCES lists(id) ON DELETE CASCADE; @@ -34355,6 +35544,9 @@ ALTER TABLE ONLY project_custom_attributes ALTER TABLE ONLY ci_pending_builds ADD CONSTRAINT fk_rails_725a2644a3 FOREIGN KEY (build_id) REFERENCES ci_builds(id) ON DELETE CASCADE; +ALTER TABLE ONLY ci_pending_builds + ADD CONSTRAINT fk_rails_725a2644a3_p FOREIGN KEY (partition_id, build_id) REFERENCES ci_builds(partition_id, id) ON UPDATE CASCADE ON DELETE CASCADE; + ALTER TABLE security_findings ADD CONSTRAINT fk_rails_729b763a54 FOREIGN KEY (scanner_id) REFERENCES vulnerability_scanners(id) ON DELETE CASCADE; @@ -34379,6 +35571,9 @@ ALTER TABLE ONLY merge_request_context_commit_diff_files ALTER TABLE ONLY group_crm_settings ADD CONSTRAINT fk_rails_74fdf2f13d FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; +ALTER TABLE ONLY pm_package_version_licenses + ADD CONSTRAINT fk_rails_7520ea026d FOREIGN KEY (pm_license_id) REFERENCES pm_licenses(id) ON DELETE CASCADE; + ALTER TABLE ONLY clusters_applications_ingress ADD CONSTRAINT fk_rails_753a7b41c1 FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE; @@ -34433,12 +35628,12 @@ ALTER TABLE ONLY milestone_releases ALTER TABLE ONLY resource_state_events ADD CONSTRAINT fk_rails_7ddc5f7457 FOREIGN KEY (source_merge_request_id) REFERENCES merge_requests(id) ON DELETE SET NULL; -ALTER TABLE ONLY application_settings - ADD CONSTRAINT fk_rails_7e112a9599 FOREIGN KEY (instance_administration_project_id) REFERENCES projects(id) ON DELETE SET NULL; - ALTER TABLE ONLY clusters_kubernetes_namespaces ADD CONSTRAINT fk_rails_7e7688ecaf FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE; +ALTER TABLE ONLY dependency_proxy_manifest_states + ADD CONSTRAINT fk_rails_806cf07a3c FOREIGN KEY (dependency_proxy_manifest_id) REFERENCES dependency_proxy_manifests(id) ON DELETE CASCADE; + ALTER TABLE ONLY ci_job_artifact_states ADD CONSTRAINT fk_rails_80a9cba3b2 FOREIGN KEY (job_artifact_id) REFERENCES ci_job_artifacts(id) ON DELETE CASCADE; @@ -34487,6 +35682,9 @@ ALTER TABLE ONLY ci_runner_namespaces ALTER TABLE ONLY software_license_policies ADD CONSTRAINT fk_rails_87b2247ce5 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY achievements + ADD CONSTRAINT fk_rails_87e990f752 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY protected_environment_deploy_access_levels ADD CONSTRAINT fk_rails_898a13b650 FOREIGN KEY (protected_environment_id) REFERENCES protected_environments(id) ON DELETE CASCADE; @@ -34508,6 +35706,9 @@ ALTER TABLE ONLY cluster_projects ALTER TABLE ONLY project_pages_metadata ADD CONSTRAINT fk_rails_8c28a61485 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY work_item_progresses + ADD CONSTRAINT fk_rails_8c584bfb37 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE; + ALTER TABLE ONLY packages_conan_metadata ADD CONSTRAINT fk_rails_8c68cfec8b FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE CASCADE; @@ -34604,6 +35805,9 @@ ALTER TABLE ONLY error_tracking_client_keys ALTER TABLE ONLY pages_deployments ADD CONSTRAINT fk_rails_993b88f59a FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY dast_pre_scan_verification_steps + ADD CONSTRAINT fk_rails_9990fc2adf FOREIGN KEY (dast_pre_scan_verification_id) REFERENCES dast_pre_scan_verifications(id) ON DELETE CASCADE; + ALTER TABLE ONLY vulnerability_exports ADD CONSTRAINT fk_rails_9aff2c3b45 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -34715,9 +35919,15 @@ ALTER TABLE ONLY ci_pipeline_artifacts ALTER TABLE ONLY merge_request_user_mentions ADD CONSTRAINT fk_rails_aa1b2961b1 FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE; +ALTER TABLE ONLY wiki_repository_states + ADD CONSTRAINT fk_rails_aa2f8a61ba FOREIGN KEY (project_wiki_repository_id) REFERENCES project_wiki_repositories(id) ON DELETE CASCADE; + ALTER TABLE ONLY x509_commit_signatures ADD CONSTRAINT fk_rails_ab07452314 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY dast_profiles_tags + ADD CONSTRAINT fk_rails_ab9e643cd8 FOREIGN KEY (dast_profile_id) REFERENCES dast_profiles(id) ON DELETE CASCADE; + ALTER TABLE ONLY resource_iteration_events ADD CONSTRAINT fk_rails_abf5d4affa FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE; @@ -34739,6 +35949,9 @@ ALTER TABLE ONLY metrics_dashboard_annotations ALTER TABLE ONLY ci_build_trace_metadata ADD CONSTRAINT fk_rails_aebc78111f FOREIGN KEY (build_id) REFERENCES ci_builds(id) ON DELETE CASCADE; +ALTER TABLE ONLY ci_build_trace_metadata + ADD CONSTRAINT fk_rails_aebc78111f_p FOREIGN KEY (partition_id, build_id) REFERENCES ci_builds(partition_id, id) ON UPDATE CASCADE ON DELETE CASCADE NOT VALID; + ALTER TABLE ONLY bulk_import_trackers ADD CONSTRAINT fk_rails_aed566d3f3 FOREIGN KEY (bulk_import_entity_id) REFERENCES bulk_import_entities(id) ON DELETE CASCADE; @@ -34778,9 +35991,6 @@ ALTER TABLE ONLY merge_request_predictions ALTER TABLE ONLY incident_management_escalation_rules ADD CONSTRAINT fk_rails_b3c9c17bd4 FOREIGN KEY (oncall_schedule_id) REFERENCES incident_management_oncall_schedules(id) ON DELETE CASCADE; -ALTER TABLE ONLY application_settings - ADD CONSTRAINT fk_rails_b53e481273 FOREIGN KEY (custom_project_templates_group_id) REFERENCES namespaces(id) ON DELETE SET NULL; - ALTER TABLE ONLY packages_debian_project_component_files ADD CONSTRAINT fk_rails_b543a9622b FOREIGN KEY (architecture_id) REFERENCES packages_debian_project_architectures(id) ON DELETE RESTRICT; @@ -34850,6 +36060,9 @@ ALTER TABLE ONLY atlassian_identities ALTER TABLE ONLY serverless_domain_cluster ADD CONSTRAINT fk_rails_c09009dee1 FOREIGN KEY (pages_domain_id) REFERENCES pages_domains(id) ON DELETE CASCADE; +ALTER TABLE ONLY slack_integrations_scopes + ADD CONSTRAINT fk_rails_c0e018a6fe FOREIGN KEY (slack_api_scope_id) REFERENCES slack_api_scopes(id) ON DELETE CASCADE; + ALTER TABLE ONLY packages_npm_metadata ADD CONSTRAINT fk_rails_c0e5fce6f3 FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE CASCADE; @@ -34877,6 +36090,9 @@ ALTER TABLE ONLY project_wiki_repositories ALTER TABLE ONLY merge_request_user_mentions ADD CONSTRAINT fk_rails_c440b9ea31 FOREIGN KEY (note_id) REFERENCES notes(id) ON DELETE CASCADE; +ALTER TABLE ONLY user_achievements + ADD CONSTRAINT fk_rails_c44f5b3b25 FOREIGN KEY (achievement_id) REFERENCES achievements(id) ON DELETE CASCADE; + ALTER TABLE ONLY related_epic_links ADD CONSTRAINT fk_rails_c464534def FOREIGN KEY (source_id) REFERENCES epics(id) ON DELETE CASCADE; @@ -34886,6 +36102,9 @@ ALTER TABLE ONLY boards_epic_board_recent_visits ALTER TABLE ONLY ci_job_artifacts ADD CONSTRAINT fk_rails_c5137cb2c1 FOREIGN KEY (job_id) REFERENCES ci_builds(id) ON DELETE CASCADE; +ALTER TABLE ONLY ci_job_artifacts + ADD CONSTRAINT fk_rails_c5137cb2c1_p FOREIGN KEY (partition_id, job_id) REFERENCES ci_builds(partition_id, id) ON UPDATE CASCADE ON DELETE CASCADE NOT VALID; + ALTER TABLE ONLY packages_events ADD CONSTRAINT fk_rails_c6c20d0094 FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE SET NULL; @@ -34919,6 +36138,9 @@ ALTER TABLE ONLY gpg_signatures ALTER TABLE ONLY board_group_recent_visits ADD CONSTRAINT fk_rails_ca04c38720 FOREIGN KEY (board_id) REFERENCES boards(id) ON DELETE CASCADE; +ALTER TABLE ONLY airflow_dags + ADD CONSTRAINT fk_rails_ca3ac0d68c FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY boards_epic_board_positions ADD CONSTRAINT fk_rails_cb4563dd6e FOREIGN KEY (epic_board_id) REFERENCES boards_epic_boards(id) ON DELETE CASCADE; @@ -34943,6 +36165,9 @@ ALTER TABLE ONLY resource_iteration_events ALTER TABLE ONLY member_roles ADD CONSTRAINT fk_rails_cf0ee35814 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE; +ALTER TABLE ONLY pm_package_versions + ADD CONSTRAINT fk_rails_cf94c3e601 FOREIGN KEY (pm_package_id) REFERENCES pm_packages(id) ON DELETE CASCADE; + ALTER TABLE ONLY upload_states ADD CONSTRAINT fk_rails_d00f153613 FOREIGN KEY (upload_id) REFERENCES uploads(id) ON DELETE CASCADE; @@ -34994,6 +36219,9 @@ ALTER TABLE ONLY merge_request_reviewers ALTER TABLE ONLY ci_running_builds ADD CONSTRAINT fk_rails_da45cfa165 FOREIGN KEY (build_id) REFERENCES ci_builds(id) ON DELETE CASCADE; +ALTER TABLE ONLY ci_running_builds + ADD CONSTRAINT fk_rails_da45cfa165_p FOREIGN KEY (partition_id, build_id) REFERENCES ci_builds(partition_id, id) ON UPDATE CASCADE ON DELETE CASCADE; + ALTER TABLE ONLY jira_imports ADD CONSTRAINT fk_rails_da617096ce FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE SET NULL; @@ -35021,6 +36249,12 @@ ALTER TABLE ONLY incident_management_timeline_event_tags ALTER TABLE ONLY user_callouts ADD CONSTRAINT fk_rails_ddfdd80f3d FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; +ALTER TABLE ONLY scan_result_policies + ADD CONSTRAINT fk_rails_de9e5d2ce6 FOREIGN KEY (security_orchestration_policy_configuration_id) REFERENCES security_orchestration_policy_configurations(id) ON DELETE CASCADE; + +ALTER TABLE ONLY dast_scanner_profiles_tags + ADD CONSTRAINT fk_rails_deb79b7f19 FOREIGN KEY (dast_scanner_profile_id) REFERENCES dast_scanner_profiles(id) ON DELETE CASCADE; + ALTER TABLE ONLY vulnerability_feedback ADD CONSTRAINT fk_rails_debd54e456 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -35069,6 +36303,9 @@ ALTER TABLE ONLY serverless_domain_cluster ALTER TABLE ONLY incident_management_escalation_policies ADD CONSTRAINT fk_rails_e5b513daa7 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY software_license_policies + ADD CONSTRAINT fk_rails_e5b77d620e FOREIGN KEY (scan_result_policy_id) REFERENCES scan_result_policies(id) ON DELETE CASCADE; + ALTER TABLE ONLY vulnerability_external_issue_links ADD CONSTRAINT fk_rails_e5ba7f7b13 FOREIGN KEY (author_id) REFERENCES users(id) ON DELETE SET NULL; @@ -35117,6 +36354,9 @@ ALTER TABLE ONLY alert_management_alert_user_mentions ALTER TABLE ONLY snippet_statistics ADD CONSTRAINT fk_rails_ebc283ccf1 FOREIGN KEY (snippet_id) REFERENCES snippets(id) ON DELETE CASCADE; +ALTER TABLE ONLY slack_integrations_scopes + ADD CONSTRAINT fk_rails_ece1eb6772 FOREIGN KEY (slack_integration_id) REFERENCES slack_integrations(id) ON DELETE CASCADE; + ALTER TABLE ONLY iterations_cadences ADD CONSTRAINT fk_rails_ece400c55a FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; @@ -35129,9 +36369,6 @@ ALTER TABLE ONLY project_security_settings ALTER TABLE ONLY packages_debian_group_distributions ADD CONSTRAINT fk_rails_ede0bb937f FOREIGN KEY (creator_id) REFERENCES users(id) ON DELETE SET NULL; -ALTER TABLE ONLY experiment_subjects - ADD CONSTRAINT fk_rails_ede5754774 FOREIGN KEY (experiment_id) REFERENCES experiments(id) ON DELETE CASCADE; - ALTER TABLE ONLY ci_daily_build_group_report_results ADD CONSTRAINT fk_rails_ee072d13b3 FOREIGN KEY (last_pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE; @@ -35153,6 +36390,12 @@ ALTER TABLE ONLY fork_network_members ALTER TABLE ONLY security_orchestration_policy_rule_schedules ADD CONSTRAINT fk_rails_efe1d9b133 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; +ALTER TABLE ONLY dast_pre_scan_verifications + ADD CONSTRAINT fk_rails_f08d9312a8 FOREIGN KEY (dast_profile_id) REFERENCES dast_profiles(id) ON DELETE CASCADE; + +ALTER TABLE ONLY analytics_dashboards_pointers + ADD CONSTRAINT fk_rails_f0e7c640c3 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY prometheus_alerts ADD CONSTRAINT fk_rails_f0e8db86aa FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -35213,6 +36456,9 @@ ALTER TABLE ONLY merge_requests_closing_issues ALTER TABLE ONLY banned_users ADD CONSTRAINT fk_rails_fa5bb598e5 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; +ALTER TABLE p_ci_builds_metadata + ADD CONSTRAINT fk_rails_fae01b2700 FOREIGN KEY (runner_machine_id) REFERENCES ci_runner_machines(id) ON DELETE SET NULL; + ALTER TABLE ONLY operations_feature_flags_issues ADD CONSTRAINT fk_rails_fb4d2a7cb1 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE; @@ -35225,6 +36471,9 @@ ALTER TABLE ONLY serverless_domain_cluster ALTER TABLE ONLY ci_job_variables ADD CONSTRAINT fk_rails_fbf3b34792 FOREIGN KEY (job_id) REFERENCES ci_builds(id) ON DELETE CASCADE; +ALTER TABLE ONLY ci_job_variables + ADD CONSTRAINT fk_rails_fbf3b34792_p FOREIGN KEY (partition_id, job_id) REFERENCES ci_builds(partition_id, id) ON UPDATE CASCADE ON DELETE CASCADE NOT VALID; + ALTER TABLE ONLY packages_nuget_metadata ADD CONSTRAINT fk_rails_fc0c19f5b4 FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE CASCADE; diff --git a/db/migrate/20220824082427_remove_tmp_idx_vulnerability_occurrences_on_id_and_scanner_id.rb b/db/migrate/20220824082427_remove_tmp_idx_vulnerability_occurrences_on_id_and_scanner_id.rb deleted file mode 100644 index ebb90df569bad..0000000000000 --- a/db/migrate/20220824082427_remove_tmp_idx_vulnerability_occurrences_on_id_and_scanner_id.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class RemoveTmpIdxVulnerabilityOccurrencesOnIdAndScannerId < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'tmp_index_vulnerability_occurrences_on_id_and_scanner_id' - REPORT_TYPES = { cluster_image_scanning: 7, generic: 99 }.freeze - CLAUSE = "report_type IN (#{REPORT_TYPES.values.join(',')})" - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :vulnerability_occurrences, INDEX_NAME - end - - def down - add_concurrent_index :vulnerability_occurrences, - [:id, :scanner_id], - where: CLAUSE, - name: INDEX_NAME - end -end diff --git a/db/migrate/20220908150054_add_runner_registration_enabled_to_namespace_settings.rb b/db/migrate/20220908150054_add_runner_registration_enabled_to_namespace_settings.rb deleted file mode 100644 index 7721d0d592ca4..0000000000000 --- a/db/migrate/20220908150054_add_runner_registration_enabled_to_namespace_settings.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddRunnerRegistrationEnabledToNamespaceSettings < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - add_column :namespace_settings, :runner_registration_enabled, :boolean, default: true - end -end diff --git a/db/migrate/20221010191136_add_access_level_to_ci_job_artifacts.rb b/db/migrate/20221010191136_add_access_level_to_ci_job_artifacts.rb deleted file mode 100644 index d69965ed8ec95..0000000000000 --- a/db/migrate/20221010191136_add_access_level_to_ci_job_artifacts.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddAccessLevelToCiJobArtifacts < Gitlab::Database::Migration[2.1] - enable_lock_retries! - - def change - add_column :ci_job_artifacts, :accessibility, :integer, default: 0, limit: 2, null: false - end -end diff --git a/db/migrate/20221026095133_add_status_updated_at_to_container_repository.rb b/db/migrate/20221026095133_add_status_updated_at_to_container_repository.rb deleted file mode 100644 index caf838e83073c..0000000000000 --- a/db/migrate/20221026095133_add_status_updated_at_to_container_repository.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddStatusUpdatedAtToContainerRepository < Gitlab::Database::Migration[2.0] - def change - add_column :container_repositories, :status_updated_at, :datetime_with_timezone - end -end diff --git a/db/migrate/20221101174816_create_package_metadata.rb b/db/migrate/20221101174816_create_package_metadata.rb deleted file mode 100644 index f14566896415e..0000000000000 --- a/db/migrate/20221101174816_create_package_metadata.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class CreatePackageMetadata < Gitlab::Database::Migration[2.0] - def change - create_table :pm_packages do |t| - t.integer :purl_type, null: false, limit: 2 - t.text :name, null: false, limit: 255 - t.index [:purl_type, :name], unique: true, name: 'i_pm_packages_purl_type_and_name' - end - end -end diff --git a/db/migrate/20221101194416_create_package_metadata_versions.rb b/db/migrate/20221101194416_create_package_metadata_versions.rb deleted file mode 100644 index 19b86d86de176..0000000000000 --- a/db/migrate/20221101194416_create_package_metadata_versions.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class CreatePackageMetadataVersions < Gitlab::Database::Migration[2.0] - def change - create_table :pm_package_versions do |t| - t.references :pm_package, foreign_key: { to_table: :pm_packages, on_delete: :cascade } - t.text :version, null: false, limit: 255 - t.index [:pm_package_id, :version], unique: true, name: 'i_pm_package_versions_on_package_id_and_version' - end - end -end diff --git a/db/migrate/20221101195309_create_package_metadata_licenses.rb b/db/migrate/20221101195309_create_package_metadata_licenses.rb deleted file mode 100644 index 1fbb0c147bdc9..0000000000000 --- a/db/migrate/20221101195309_create_package_metadata_licenses.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -class CreatePackageMetadataLicenses < Gitlab::Database::Migration[2.0] - def change - create_table :pm_licenses do |t| - t.text :spdx_identifier, null: false, limit: 50 - t.index [:spdx_identifier], unique: true, name: 'i_pm_licenses_on_spdx_identifier' - end - end -end diff --git a/db/migrate/20221101195543_create_package_metadata_package_version_licenses.rb b/db/migrate/20221101195543_create_package_metadata_package_version_licenses.rb deleted file mode 100644 index 9007f869e1f18..0000000000000 --- a/db/migrate/20221101195543_create_package_metadata_package_version_licenses.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -class CreatePackageMetadataPackageVersionLicenses < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'i_pm_package_version_licenses_on_version_and_license_ids' - - def change - create_table :pm_package_version_licenses, primary_key: [:pm_package_version_id, :pm_license_id] do |t| - t.references :pm_package_version, foreign_key: { on_delete: :cascade }, null: false - t.references :pm_license, foreign_key: { on_delete: :cascade }, null: false - end - end -end diff --git a/db/migrate/20221102150737_index_environments_for_name_search_within_folder.rb b/db/migrate/20221102150737_index_environments_for_name_search_within_folder.rb deleted file mode 100644 index 10fd8b33c45bd..0000000000000 --- a/db/migrate/20221102150737_index_environments_for_name_search_within_folder.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class IndexEnvironmentsForNameSearchWithinFolder < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_environments_for_name_search_within_folder' - - def up - add_concurrent_index :environments, - "project_id, lower(ltrim(name, environment_type || '/')) varchar_pattern_ops, state", name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :environments, INDEX_NAME - end -end diff --git a/db/migrate/20221102195642_create_dependency_proxy_manifest_states.rb b/db/migrate/20221102195642_create_dependency_proxy_manifest_states.rb deleted file mode 100644 index e0da92c6c94ee..0000000000000 --- a/db/migrate/20221102195642_create_dependency_proxy_manifest_states.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -class CreateDependencyProxyManifestStates < Gitlab::Database::Migration[2.0] - DEPENDENCY_PROXY_MANIFEST_INDEX_NAME = "index_manifest_states_on_dependency_proxy_manifest_id" - VERIFICATION_STATE_INDEX_NAME = "index_manifest_states_on_verification_state" - PENDING_VERIFICATION_INDEX_NAME = "index_manifest_states_pending_verification" - FAILED_VERIFICATION_INDEX_NAME = "index_manifest_states_failed_verification" - NEEDS_VERIFICATION_INDEX_NAME = "index_manifest_states_needs_verification" - - enable_lock_retries! - - def up - create_table :dependency_proxy_manifest_states, id: false do |t| - t.datetime_with_timezone :verification_started_at - t.datetime_with_timezone :verification_retry_at - t.datetime_with_timezone :verified_at - t.references :dependency_proxy_manifest, - primary_key: true, - index: { name: DEPENDENCY_PROXY_MANIFEST_INDEX_NAME }, - default: nil, - foreign_key: { on_delete: :cascade } - t.integer :verification_state, default: 0, limit: 2, null: false - t.integer :verification_retry_count, limit: 2, default: 0, null: false - t.binary :verification_checksum, using: 'verification_checksum::bytea' - t.text :verification_failure, limit: 255 - - t.index :verification_state, name: VERIFICATION_STATE_INDEX_NAME - t.index :verified_at, - where: "(verification_state = 0)", - order: { verified_at: 'ASC NULLS FIRST' }, - name: PENDING_VERIFICATION_INDEX_NAME - t.index :verification_retry_at, - where: "(verification_state = 3)", - order: { verification_retry_at: 'ASC NULLS FIRST' }, - name: FAILED_VERIFICATION_INDEX_NAME - t.index :verification_state, - where: "(verification_state = 0 OR verification_state = 3)", - name: NEEDS_VERIFICATION_INDEX_NAME - end - end - - def down - drop_table :dependency_proxy_manifest_states - end -end diff --git a/db/migrate/20221103205317_create_dast_pre_scan_verification.rb b/db/migrate/20221103205317_create_dast_pre_scan_verification.rb deleted file mode 100644 index 85375be53b559..0000000000000 --- a/db/migrate/20221103205317_create_dast_pre_scan_verification.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class CreateDastPreScanVerification < Gitlab::Database::Migration[2.0] - def up - create_table :dast_pre_scan_verifications do |t| - t.references :dast_profile, null: false, foreign_key: { on_delete: :cascade }, - index: { name: 'index_dast_pre_scan_verifications_on_dast_profile_id' } - - t.bigint :ci_pipeline_id, null: false - - t.timestamps_with_timezone - - t.integer :status, default: 0, limit: 2, null: false - - t.index :ci_pipeline_id, unique: true, name: :index_dast_pre_scan_verifications_on_ci_pipeline_id - end - end - - def down - drop_table :dast_pre_scan_verifications - end -end diff --git a/db/migrate/20221107013943_add_accepted_reviewers_to_merge_request_predictions.rb b/db/migrate/20221107013943_add_accepted_reviewers_to_merge_request_predictions.rb deleted file mode 100644 index 9876ac3127a0b..0000000000000 --- a/db/migrate/20221107013943_add_accepted_reviewers_to_merge_request_predictions.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddAcceptedReviewersToMergeRequestPredictions < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - add_column :merge_request_predictions, :accepted_reviewers, :jsonb, null: false, default: {} - end -end diff --git a/db/migrate/20221110080508_add_partition_id_to_ci_unit_test_failures.rb b/db/migrate/20221110080508_add_partition_id_to_ci_unit_test_failures.rb deleted file mode 100644 index 2217048965cda..0000000000000 --- a/db/migrate/20221110080508_add_partition_id_to_ci_unit_test_failures.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddPartitionIdToCiUnitTestFailures < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - add_column :ci_unit_test_failures, :partition_id, :bigint, default: 100, null: false - end -end diff --git a/db/migrate/20221110080636_add_partition_id_to_ci_sources_pipelines.rb b/db/migrate/20221110080636_add_partition_id_to_ci_sources_pipelines.rb deleted file mode 100644 index a76955d8db148..0000000000000 --- a/db/migrate/20221110080636_add_partition_id_to_ci_sources_pipelines.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddPartitionIdToCiSourcesPipelines < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - add_column :ci_sources_pipelines, :partition_id, :bigint, default: 100, null: false - end -end diff --git a/db/migrate/20221110080748_add_partition_id_to_ci_build_pending_states.rb b/db/migrate/20221110080748_add_partition_id_to_ci_build_pending_states.rb deleted file mode 100644 index abf14f4cecac4..0000000000000 --- a/db/migrate/20221110080748_add_partition_id_to_ci_build_pending_states.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddPartitionIdToCiBuildPendingStates < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - add_column :ci_build_pending_states, :partition_id, :bigint, default: 100, null: false - end -end diff --git a/db/migrate/20221110080822_add_partition_id_to_ci_build_trace_chunks.rb b/db/migrate/20221110080822_add_partition_id_to_ci_build_trace_chunks.rb deleted file mode 100644 index 27a9bbdb896ee..0000000000000 --- a/db/migrate/20221110080822_add_partition_id_to_ci_build_trace_chunks.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddPartitionIdToCiBuildTraceChunks < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - add_column :ci_build_trace_chunks, :partition_id, :bigint, default: 100, null: false - end -end diff --git a/db/migrate/20221110080913_add_partition_id_to_ci_build_report_results.rb b/db/migrate/20221110080913_add_partition_id_to_ci_build_report_results.rb deleted file mode 100644 index b915ac9f90755..0000000000000 --- a/db/migrate/20221110080913_add_partition_id_to_ci_build_report_results.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddPartitionIdToCiBuildReportResults < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - add_column :ci_build_report_results, :partition_id, :bigint, default: 100, null: false - end -end diff --git a/db/migrate/20221110080956_add_partition_id_to_ci_build_needs.rb b/db/migrate/20221110080956_add_partition_id_to_ci_build_needs.rb deleted file mode 100644 index faa0309f2c103..0000000000000 --- a/db/migrate/20221110080956_add_partition_id_to_ci_build_needs.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddPartitionIdToCiBuildNeeds < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - add_column :ci_build_needs, :partition_id, :bigint, default: 100, null: false - end -end diff --git a/db/migrate/20221110081037_add_partition_id_to_ci_builds_runner_session.rb b/db/migrate/20221110081037_add_partition_id_to_ci_builds_runner_session.rb deleted file mode 100644 index e6f5d65c7b160..0000000000000 --- a/db/migrate/20221110081037_add_partition_id_to_ci_builds_runner_session.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddPartitionIdToCiBuildsRunnerSession < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - add_column :ci_builds_runner_session, :partition_id, :bigint, default: 100, null: false - end -end diff --git a/db/migrate/20221110081115_add_partition_id_to_ci_pending_builds.rb b/db/migrate/20221110081115_add_partition_id_to_ci_pending_builds.rb deleted file mode 100644 index 24435fd7aa971..0000000000000 --- a/db/migrate/20221110081115_add_partition_id_to_ci_pending_builds.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddPartitionIdToCiPendingBuilds < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - add_column :ci_pending_builds, :partition_id, :bigint, default: 100, null: false - end -end diff --git a/db/migrate/20221110081207_add_partition_id_to_ci_build_trace_metadata.rb b/db/migrate/20221110081207_add_partition_id_to_ci_build_trace_metadata.rb deleted file mode 100644 index 0c4baa2af1ea4..0000000000000 --- a/db/migrate/20221110081207_add_partition_id_to_ci_build_trace_metadata.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddPartitionIdToCiBuildTraceMetadata < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - add_column :ci_build_trace_metadata, :partition_id, :bigint, default: 100, null: false - end -end diff --git a/db/migrate/20221110081348_add_partition_id_to_ci_running_builds.rb b/db/migrate/20221110081348_add_partition_id_to_ci_running_builds.rb deleted file mode 100644 index f4d61a93e3ece..0000000000000 --- a/db/migrate/20221110081348_add_partition_id_to_ci_running_builds.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddPartitionIdToCiRunningBuilds < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - add_column :ci_running_builds, :partition_id, :bigint, default: 100, null: false - end -end diff --git a/db/migrate/20221110081448_add_partition_id_to_ci_job_variables.rb b/db/migrate/20221110081448_add_partition_id_to_ci_job_variables.rb deleted file mode 100644 index 0e0eadd8f7214..0000000000000 --- a/db/migrate/20221110081448_add_partition_id_to_ci_job_variables.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddPartitionIdToCiJobVariables < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - add_column :ci_job_variables, :partition_id, :bigint, default: 100, null: false - end -end diff --git a/db/migrate/20221110183103_add_dashboard_fields_to_namespace_details.rb b/db/migrate/20221110183103_add_dashboard_fields_to_namespace_details.rb deleted file mode 100644 index 73e8ccbcb5180..0000000000000 --- a/db/migrate/20221110183103_add_dashboard_fields_to_namespace_details.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -class AddDashboardFieldsToNamespaceDetails < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - add_column :namespace_details, :dashboard_notification_at, :datetime_with_timezone - add_column :namespace_details, :dashboard_enforcement_at, :datetime_with_timezone - end -end diff --git a/db/migrate/20221111123146_add_onboarding_in_progress_to_users.rb b/db/migrate/20221111123146_add_onboarding_in_progress_to_users.rb deleted file mode 100644 index 665760347bfd7..0000000000000 --- a/db/migrate/20221111123146_add_onboarding_in_progress_to_users.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddOnboardingInProgressToUsers < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - # rubocop:disable Migration/AddColumnsToWideTables - def up - add_column :users, :onboarding_in_progress, :boolean, default: false, null: false - end - - def down - remove_column :users, :onboarding_in_progress - end - # rubocop:enable Migration/AddColumnsToWideTables -end diff --git a/db/migrate/20221111123147_add_onboarding_step_url_to_user_details.rb b/db/migrate/20221111123147_add_onboarding_step_url_to_user_details.rb deleted file mode 100644 index 7b6c035e05a8b..0000000000000 --- a/db/migrate/20221111123147_add_onboarding_step_url_to_user_details.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class AddOnboardingStepUrlToUserDetails < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - # rubocop:disable Migration/AddLimitToTextColumns - # limit is added in 20221111123148_add_text_limit_to_onboarding_step_url.rb - def up - add_column :user_details, :onboarding_step_url, :text - end - - def down - remove_column :user_details, :onboarding_step_url - end - # rubocop:enable Migration/AddLimitToTextColumns -end diff --git a/db/migrate/20221111123148_add_text_limit_to_onboarding_step_url.rb b/db/migrate/20221111123148_add_text_limit_to_onboarding_step_url.rb deleted file mode 100644 index cfd9f00413111..0000000000000 --- a/db/migrate/20221111123148_add_text_limit_to_onboarding_step_url.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitToOnboardingStepUrl < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - add_text_limit :user_details, :onboarding_step_url, 2000 - end - - def down - remove_text_limit :user_details, :onboarding_step_url - end -end diff --git a/db/migrate/20221111135238_create_dependency_list_exports_table.rb b/db/migrate/20221111135238_create_dependency_list_exports_table.rb deleted file mode 100644 index d47bd93fff77f..0000000000000 --- a/db/migrate/20221111135238_create_dependency_list_exports_table.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class CreateDependencyListExportsTable < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - create_table :dependency_list_exports do |t| - t.timestamps_with_timezone null: false - t.bigint :project_id, null: false - t.bigint :user_id - t.integer :file_store - t.integer :status, default: 0, null: false, limit: 2 - t.text :file, limit: 255 - - t.index :user_id - t.index :project_id - end - end - - def down - drop_table :dependency_list_exports - end -end diff --git a/db/migrate/20221111142921_add_hierarchy_restrictions.rb b/db/migrate/20221111142921_add_hierarchy_restrictions.rb deleted file mode 100644 index dd80de0496993..0000000000000 --- a/db/migrate/20221111142921_add_hierarchy_restrictions.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddHierarchyRestrictions < Gitlab::Database::Migration[2.0] - UNIQUE_INDEX_NAME = 'index_work_item_hierarchy_restrictions_on_parent_and_child' - - def up - create_table :work_item_hierarchy_restrictions do |t| - t.references :parent_type, index: true, null: false, - foreign_key: { on_delete: :cascade, to_table: :work_item_types } - t.references :child_type, index: true, null: false, - foreign_key: { on_delete: :cascade, to_table: :work_item_types } - t.integer :maximum_depth, limit: 2 - - t.index [:parent_type_id, :child_type_id], unique: true, name: UNIQUE_INDEX_NAME - end - end - - def down - drop_table :work_item_hierarchy_restrictions - end -end diff --git a/db/migrate/20221114131943_add_short_title_to_appearances.rb b/db/migrate/20221114131943_add_short_title_to_appearances.rb deleted file mode 100644 index 6bf5d32f441f5..0000000000000 --- a/db/migrate/20221114131943_add_short_title_to_appearances.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -class AddShortTitleToAppearances < Gitlab::Database::Migration[2.0] - # rubocop:disable Migration/AddLimitToTextColumns - # limit is added in 20221115085813_add_limit_to_appereances_short_title.rb - def change - add_column :appearances, :short_title, :text - end - # rubocop:enable Migration/AddLimitToTextColumns -end diff --git a/db/migrate/20221114145103_add_last_seat_refresh_at_to_gitlab_subscriptions.rb b/db/migrate/20221114145103_add_last_seat_refresh_at_to_gitlab_subscriptions.rb deleted file mode 100644 index 77d6bb42f02cd..0000000000000 --- a/db/migrate/20221114145103_add_last_seat_refresh_at_to_gitlab_subscriptions.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class AddLastSeatRefreshAtToGitlabSubscriptions < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - TABLE_NAME = 'gitlab_subscriptions' - COLUMN_NAME = 'last_seat_refresh_at' - - def up - add_column(TABLE_NAME, COLUMN_NAME, :datetime_with_timezone) - end - - def down - remove_column(TABLE_NAME, COLUMN_NAME) - end -end diff --git a/db/migrate/20221114212908_add_debug_trace_to_ci_builds_metadata.rb b/db/migrate/20221114212908_add_debug_trace_to_ci_builds_metadata.rb deleted file mode 100644 index aee479dfceee9..0000000000000 --- a/db/migrate/20221114212908_add_debug_trace_to_ci_builds_metadata.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddDebugTraceToCiBuildsMetadata < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - add_column :p_ci_builds_metadata, :debug_trace_enabled, :boolean, null: false, default: false - end -end diff --git a/db/migrate/20221115085813_add_limit_to_appereances_short_title.rb b/db/migrate/20221115085813_add_limit_to_appereances_short_title.rb deleted file mode 100644 index d75895216f7ad..0000000000000 --- a/db/migrate/20221115085813_add_limit_to_appereances_short_title.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddLimitToAppereancesShortTitle < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - add_text_limit :appearances, :short_title, 255 - end - - def down - remove_text_limit :appearances, :short_title - end -end diff --git a/db/migrate/20221116100056_add_foreign_key_to_dependency_list_exports.rb b/db/migrate/20221116100056_add_foreign_key_to_dependency_list_exports.rb deleted file mode 100644 index 1c7df66bd04f2..0000000000000 --- a/db/migrate/20221116100056_add_foreign_key_to_dependency_list_exports.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class AddForeignKeyToDependencyListExports < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - add_concurrent_foreign_key( - :dependency_list_exports, - :users, - column: :user_id, - on_delete: :nullify) - add_concurrent_foreign_key( - :dependency_list_exports, - :projects, - column: :project_id, - on_delete: :cascade) - end - - def down - with_lock_retries do - remove_foreign_key_if_exists :dependency_list_exports, column: :user_id - end - with_lock_retries do - remove_foreign_key_if_exists :dependency_list_exports, column: :project_id - end - end -end diff --git a/db/migrate/20221116113323_add_index_on_team_id_and_chat_id.rb b/db/migrate/20221116113323_add_index_on_team_id_and_chat_id.rb deleted file mode 100644 index 7a7bcf48d802d..0000000000000 --- a/db/migrate/20221116113323_add_index_on_team_id_and_chat_id.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnTeamIdAndChatId < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_chat_names_on_team_id_and_chat_id' - - def up - add_concurrent_index(:chat_names, [:team_id, :chat_id], name: INDEX_NAME) - end - - def down - remove_concurrent_index_by_name :chat_names, INDEX_NAME - end -end diff --git a/db/migrate/20221116124821_add_enterprise_boolean_to_bulk_imports.rb b/db/migrate/20221116124821_add_enterprise_boolean_to_bulk_imports.rb deleted file mode 100644 index 69cc39b72f6c9..0000000000000 --- a/db/migrate/20221116124821_add_enterprise_boolean_to_bulk_imports.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddEnterpriseBooleanToBulkImports < Gitlab::Database::Migration[2.0] - def change - add_column :bulk_imports, :source_enterprise, :boolean, default: true, null: false - end -end diff --git a/db/migrate/20221116134507_add_projects_emails_enabled_column.rb b/db/migrate/20221116134507_add_projects_emails_enabled_column.rb deleted file mode 100644 index 1499ea2752bd3..0000000000000 --- a/db/migrate/20221116134507_add_projects_emails_enabled_column.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true -class AddProjectsEmailsEnabledColumn < Gitlab::Database::Migration[2.0] - enable_lock_retries! - def change - add_column :project_settings, :emails_enabled, :boolean, default: true, null: false - end -end diff --git a/db/migrate/20221116134539_add_namespaces_emails_enabled_column.rb b/db/migrate/20221116134539_add_namespaces_emails_enabled_column.rb deleted file mode 100644 index e979cbb8aa5a5..0000000000000 --- a/db/migrate/20221116134539_add_namespaces_emails_enabled_column.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true -class AddNamespacesEmailsEnabledColumn < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - add_column :namespace_settings, :emails_enabled, :boolean, default: true, null: false - end -end diff --git a/db/migrate/20221116160204_create_ml_experiment_metadata_and_ml_candidate_metadata.rb b/db/migrate/20221116160204_create_ml_experiment_metadata_and_ml_candidate_metadata.rb deleted file mode 100644 index 288d1e4be9877..0000000000000 --- a/db/migrate/20221116160204_create_ml_experiment_metadata_and_ml_candidate_metadata.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class CreateMlExperimentMetadataAndMlCandidateMetadata < Gitlab::Database::Migration[2.0] - def change - create_table :ml_experiment_metadata do |t| - t.timestamps_with_timezone null: false - t.references :experiment, - foreign_key: { to_table: :ml_experiments, on_delete: :cascade }, - index: false, - null: false - t.text :name, limit: 255, null: false - t.text :value, limit: 5000, null: false - - t.index [:experiment_id, :name], unique: true - end - - create_table :ml_candidate_metadata do |t| - t.timestamps_with_timezone null: false - t.references :candidate, - foreign_key: { to_table: :ml_candidates, on_delete: :cascade }, - index: false, - null: false - t.text :name, limit: 255, null: false, index: true - t.text :value, limit: 5000, null: false - - t.index [:candidate_id, :name], unique: true - end - end -end diff --git a/db/migrate/20221116161126_add_auth_signing_type_to_keys.rb b/db/migrate/20221116161126_add_auth_signing_type_to_keys.rb deleted file mode 100644 index 795074fa0ca61..0000000000000 --- a/db/migrate/20221116161126_add_auth_signing_type_to_keys.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddAuthSigningTypeToKeys < Gitlab::Database::Migration[2.0] - def change - add_column :keys, :usage_type, :integer, limit: 2, null: false, default: 0 - end -end diff --git a/db/migrate/20221121091238_add_work_item_progress.rb b/db/migrate/20221121091238_add_work_item_progress.rb deleted file mode 100644 index 0e306bf7332b3..0000000000000 --- a/db/migrate/20221121091238_add_work_item_progress.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddWorkItemProgress < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def up - create_table :work_item_progresses, id: false do |t| - t.timestamps_with_timezone null: false - t.references :issue, primary_key: true, index: false, default: nil, - foreign_key: { on_delete: :cascade, to_table: :issues } - t.integer :progress, default: 0, limit: 2, null: false - end - end - - def down - drop_table :work_item_progresses - end -end diff --git a/db/migrate/20221121100431_add_partition_id_to_ci_resources.rb b/db/migrate/20221121100431_add_partition_id_to_ci_resources.rb deleted file mode 100644 index 5b783057b3aa5..0000000000000 --- a/db/migrate/20221121100431_add_partition_id_to_ci_resources.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddPartitionIdToCiResources < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - add_column(:ci_resources, :partition_id, :bigint, default: 100, null: false) - end -end diff --git a/db/migrate/20221122141046_add_allow_pipeline_trigger_approve_deployment_to_project_settings.rb b/db/migrate/20221122141046_add_allow_pipeline_trigger_approve_deployment_to_project_settings.rb deleted file mode 100644 index b9397d8021143..0000000000000 --- a/db/migrate/20221122141046_add_allow_pipeline_trigger_approve_deployment_to_project_settings.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddAllowPipelineTriggerApproveDeploymentToProjectSettings < Gitlab::Database::Migration[2.1] - enable_lock_retries! - - def change - add_column :project_settings, :allow_pipeline_trigger_approve_deployment, :boolean, default: false, null: false - end -end diff --git a/db/migrate/20221122225925_set_email_confirmation_setting_before_removing_send_user_confirmation_email_column.rb b/db/migrate/20221122225925_set_email_confirmation_setting_before_removing_send_user_confirmation_email_column.rb deleted file mode 100644 index f92704ac212d1..0000000000000 --- a/db/migrate/20221122225925_set_email_confirmation_setting_before_removing_send_user_confirmation_email_column.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class SetEmailConfirmationSettingBeforeRemovingSendUserConfirmationEmailColumn < Gitlab::Database::Migration[2.0] - restrict_gitlab_migration gitlab_schema: :gitlab_main - - class ApplicationSetting < MigrationRecord - self.table_name = 'application_settings' - end - - def up - return unless ApplicationSetting.exists? - return unless ApplicationSetting.last.send_user_confirmation_email - - ApplicationSetting.last.update(email_confirmation_setting: 2) - end - - def down - return unless ApplicationSetting.exists? - - ApplicationSetting.last.update(email_confirmation_setting: 0) - end -end diff --git a/db/migrate/20221124113925_add_pipeline_hierarchy_size_to_plan_limits.rb b/db/migrate/20221124113925_add_pipeline_hierarchy_size_to_plan_limits.rb deleted file mode 100644 index f96097febe55a..0000000000000 --- a/db/migrate/20221124113925_add_pipeline_hierarchy_size_to_plan_limits.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddPipelineHierarchySizeToPlanLimits < Gitlab::Database::Migration[2.1] - def change - add_column(:plan_limits, :pipeline_hierarchy_size, :integer, default: 1000, null: false) - end -end diff --git a/db/migrate/20221128123514_add_source_partition_id_to_ci_sources_pipeline.rb b/db/migrate/20221128123514_add_source_partition_id_to_ci_sources_pipeline.rb deleted file mode 100644 index a98cdbf88de68..0000000000000 --- a/db/migrate/20221128123514_add_source_partition_id_to_ci_sources_pipeline.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddSourcePartitionIdToCiSourcesPipeline < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - add_column :ci_sources_pipelines, :source_partition_id, :bigint, default: 100, null: false - end -end diff --git a/db/migrate/20221128155738_add_discord_to_user_details.rb b/db/migrate/20221128155738_add_discord_to_user_details.rb deleted file mode 100644 index 4d59a53dcd7ce..0000000000000 --- a/db/migrate/20221128155738_add_discord_to_user_details.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -class AddDiscordToUserDetails < Gitlab::Database::Migration[2.1] - enable_lock_retries! - - # rubocop:disable Migration/AddLimitToTextColumns - # limits are added in 20221128165833_add_discord_field_limit_to_user_details.rb - def change - add_column :user_details, :discord, :text, default: '', null: false - end - # rubocop:enable Migration/AddLimitToTextColumns -end diff --git a/db/migrate/20221128165833_add_discord_field_limit_to_user_details.rb b/db/migrate/20221128165833_add_discord_field_limit_to_user_details.rb deleted file mode 100644 index a63b2019b200d..0000000000000 --- a/db/migrate/20221128165833_add_discord_field_limit_to_user_details.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddDiscordFieldLimitToUserDetails < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - USER_DETAILS_FIELD_LIMIT = 500 - - def up - add_text_limit :user_details, :discord, USER_DETAILS_FIELD_LIMIT - end - - def down - remove_text_limit :user_details, :discord - end -end diff --git a/db/migrate/20221129192619_increase_self_hosted_attachment_size_limit.rb b/db/migrate/20221129192619_increase_self_hosted_attachment_size_limit.rb deleted file mode 100644 index ec938afc7badb..0000000000000 --- a/db/migrate/20221129192619_increase_self_hosted_attachment_size_limit.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class IncreaseSelfHostedAttachmentSizeLimit < Gitlab::Database::Migration[2.1] - enable_lock_retries! - - def up - change_column_default :application_settings, :max_attachment_size, from: 10, to: 100 - end - - def down - change_column_default :application_settings, :max_attachment_size, from: 100, to: 10 - end -end diff --git a/db/migrate/20221130170433_create_dast_pre_scan_verification_step.rb b/db/migrate/20221130170433_create_dast_pre_scan_verification_step.rb deleted file mode 100644 index f0b88ab1c4d62..0000000000000 --- a/db/migrate/20221130170433_create_dast_pre_scan_verification_step.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class CreateDastPreScanVerificationStep < Gitlab::Database::Migration[2.1] - def up - create_table :dast_pre_scan_verification_steps do |t| - t.references :dast_pre_scan_verification, - null: false, foreign_key: { on_delete: :cascade }, - index: { name: 'i_dast_pre_scan_verification_steps_on_pre_scan_verification_id' } - t.timestamps_with_timezone - t.text :name, limit: 255 - t.text :verification_errors, array: true, default: [], null: false - end - end - - def down - drop_table :dast_pre_scan_verification_steps - end -end diff --git a/db/migrate/20221130182056_add_plan_limits_max_size_to_requirements_v2_artifact.rb b/db/migrate/20221130182056_add_plan_limits_max_size_to_requirements_v2_artifact.rb deleted file mode 100644 index 48d53d698981f..0000000000000 --- a/db/migrate/20221130182056_add_plan_limits_max_size_to_requirements_v2_artifact.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddPlanLimitsMaxSizeToRequirementsV2Artifact < Gitlab::Database::Migration[2.0] - def change - add_column :plan_limits, :ci_max_artifact_size_requirements_v2, :integer, null: false, default: 0 - end -end diff --git a/db/migrate/20221202144210_create_achievements.rb b/db/migrate/20221202144210_create_achievements.rb deleted file mode 100644 index 30b2fd528eebe..0000000000000 --- a/db/migrate/20221202144210_create_achievements.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class CreateAchievements < Gitlab::Database::Migration[2.1] - enable_lock_retries! - - def up - create_table :achievements do |t| - t.references :namespace, - null: false, - index: false, - foreign_key: { on_delete: :cascade } - t.timestamps_with_timezone null: false - t.text :name, null: false, limit: 255 - t.text :avatar, limit: 255 - t.text :description, limit: 1024 - t.boolean :revokeable, default: false, null: false - t.index 'namespace_id, LOWER(name)', unique: true - end - end - - def down - drop_table :achievements - end -end diff --git a/db/migrate/20221202202351_remove_index_i_ci_job_token_project_scope_links_on_source_and_target_project.rb b/db/migrate/20221202202351_remove_index_i_ci_job_token_project_scope_links_on_source_and_target_project.rb deleted file mode 100644 index 81a636739b48f..0000000000000 --- a/db/migrate/20221202202351_remove_index_i_ci_job_token_project_scope_links_on_source_and_target_project.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -class RemoveIndexICiJobTokenProjectScopeLinksOnSourceAndTargetProject < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - TABLE_NAME = 'ci_job_token_project_scope_links' - OLD_INDEX_NAME = 'i_ci_job_token_project_scope_links_on_source_and_target_project' - NEW_INDEX_NAME = 'ci_job_token_scope_links_source_and_target_project_direction' - NEW_INDEX_COL = %w[source_project_id target_project_id direction] - - def up - add_concurrent_index( - TABLE_NAME, - NEW_INDEX_COL, - name: NEW_INDEX_NAME, - unique: true - ) - remove_concurrent_index_by_name(TABLE_NAME, OLD_INDEX_NAME) - end - - def down - # noop: as we can have duplicate records once the unique index is removed - end -end diff --git a/db/migrate/20221204090437_add_category_to_abuse_report.rb b/db/migrate/20221204090437_add_category_to_abuse_report.rb deleted file mode 100644 index e908f3354bbc7..0000000000000 --- a/db/migrate/20221204090437_add_category_to_abuse_report.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddCategoryToAbuseReport < Gitlab::Database::Migration[2.1] - def change - add_column :abuse_reports, :category, :integer, limit: 2, default: 1, null: false - end -end diff --git a/db/migrate/20221205061134_add_disable_pats_to_application_settings.rb b/db/migrate/20221205061134_add_disable_pats_to_application_settings.rb deleted file mode 100644 index 0f2438f3e783b..0000000000000 --- a/db/migrate/20221205061134_add_disable_pats_to_application_settings.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddDisablePatsToApplicationSettings < Gitlab::Database::Migration[2.0] - def change - add_column(:application_settings, :disable_personal_access_tokens, :boolean, default: false, null: false) - end -end diff --git a/db/migrate/20221206163420_add_use_new_navigation_to_user_preferences.rb b/db/migrate/20221206163420_add_use_new_navigation_to_user_preferences.rb deleted file mode 100644 index 72531e8c067ea..0000000000000 --- a/db/migrate/20221206163420_add_use_new_navigation_to_user_preferences.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddUseNewNavigationToUserPreferences < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - add_column :user_preferences, :use_new_navigation, :boolean, default: nil, null: true - end -end diff --git a/db/migrate/20221206211814_add_authorized_scopes_to_slack_integration.rb b/db/migrate/20221206211814_add_authorized_scopes_to_slack_integration.rb deleted file mode 100644 index 94d553fdab5f0..0000000000000 --- a/db/migrate/20221206211814_add_authorized_scopes_to_slack_integration.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -class AddAuthorizedScopesToSlackIntegration < Gitlab::Database::Migration[2.1] - def up - create_table :slack_api_scopes do |t| - t.text :name, null: false, limit: 100 - - t.index :name, name: 'index_slack_api_scopes_on_name', unique: true - end - - create_table :slack_integrations_scopes do |t| - t.references :slack_api_scope, - null: false, - index: false, # See composite index - foreign_key: { - to_table: :slack_api_scopes, - on_delete: :cascade - } - - t.references :slack_integration, - null: false, - index: false, # see composite index - foreign_key: { - to_table: :slack_integrations, - on_delete: :cascade - } - - t.index [:slack_integration_id, :slack_api_scope_id], - unique: true, - name: 'index_slack_api_scopes_on_name_and_integration' - end - end - - def down - drop_table :slack_integrations_scopes, if_exists: true - drop_table :slack_api_scopes, if_exists: true - end -end diff --git a/db/migrate/20221206222032_add_read_code_to_member_roles.rb b/db/migrate/20221206222032_add_read_code_to_member_roles.rb deleted file mode 100644 index dc62672ccd0c2..0000000000000 --- a/db/migrate/20221206222032_add_read_code_to_member_roles.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddReadCodeToMemberRoles < Gitlab::Database::Migration[2.1] - def change - add_column :member_roles, :read_code, :boolean, default: false - end -end diff --git a/db/migrate/20221206235208_add_max_terraform_state_size_bytes_to_application_settings.rb b/db/migrate/20221206235208_add_max_terraform_state_size_bytes_to_application_settings.rb deleted file mode 100644 index 28bfce8ac0bfa..0000000000000 --- a/db/migrate/20221206235208_add_max_terraform_state_size_bytes_to_application_settings.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class AddMaxTerraformStateSizeBytesToApplicationSettings < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - CONSTRAINT_NAME = "app_settings_max_terraform_state_size_bytes_check" - - def up - add_column( - :application_settings, - :max_terraform_state_size_bytes, - :integer, - null: false, - default: 0, - if_not_exists: true - ) - - add_check_constraint :application_settings, "max_terraform_state_size_bytes >= 0", CONSTRAINT_NAME - end - - def down - remove_column :application_settings, :max_terraform_state_size_bytes, if_exists: true - end -end diff --git a/db/migrate/20221207140259_add_bulk_import_enabled_to_application_settings.rb b/db/migrate/20221207140259_add_bulk_import_enabled_to_application_settings.rb deleted file mode 100644 index c6702559da1a9..0000000000000 --- a/db/migrate/20221207140259_add_bulk_import_enabled_to_application_settings.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddBulkImportEnabledToApplicationSettings < Gitlab::Database::Migration[2.1] - def change - add_column :application_settings, :bulk_import_enabled, :boolean, default: false, null: false - end -end diff --git a/db/migrate/20221207220120_create_dast_scanner_profiles_runner_tags.rb b/db/migrate/20221207220120_create_dast_scanner_profiles_runner_tags.rb deleted file mode 100644 index f07cebb6b2c70..0000000000000 --- a/db/migrate/20221207220120_create_dast_scanner_profiles_runner_tags.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class CreateDastScannerProfilesRunnerTags < Gitlab::Database::Migration[2.1] - def up - create_table :dast_scanner_profiles_tags do |t| - t.references :dast_scanner_profile, null: false, foreign_key: { on_delete: :cascade }, - index: { name: 'i_dast_scanner_profiles_tags_on_scanner_profiles_id' } - - t.bigint :tag_id, null: false - - t.index :tag_id, name: :index_dast_scanner_profiles_tags_on_tag_id - end - end - - def down - drop_table :dast_scanner_profiles_tags - end -end diff --git a/db/migrate/20221208122921_remove_constraints_from_ci_resources_for_partition_id.rb b/db/migrate/20221208122921_remove_constraints_from_ci_resources_for_partition_id.rb deleted file mode 100644 index ffdd744b05cf1..0000000000000 --- a/db/migrate/20221208122921_remove_constraints_from_ci_resources_for_partition_id.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class RemoveConstraintsFromCiResourcesForPartitionId < Gitlab::Database::Migration[2.1] - enable_lock_retries! - - def up - change_column_null :ci_resources, :partition_id, true - end - - def down - # no-op - # Adding back the not null constraint requires a long exclusive lock. - # Also depending on when it gets called, it might not even be possible to - # execute because the application could have inserted null values. - end -end diff --git a/db/migrate/20221209110934_update_import_sources_on_application_settings.rb b/db/migrate/20221209110934_update_import_sources_on_application_settings.rb deleted file mode 100644 index 59955d3054433..0000000000000 --- a/db/migrate/20221209110934_update_import_sources_on_application_settings.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -class UpdateImportSourcesOnApplicationSettings < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - class ApplicationSetting < MigrationRecord - end - - def up - return if import_sources.empty? - - new_sources = import_sources - ['google_code'] - ApplicationSetting.update_all(import_sources: new_sources.to_yaml) - end - - def down - ## a reversion is not needed as google_code is no longer a supported import source - # and attempting to save it as one will result in a ActiveRecord error. - end - - def import_sources - ## the last ApplicationSetting record is used to determine application settings - import_sources = ApplicationSetting.last&.import_sources - import_sources.nil? ? [] : YAML.safe_load(import_sources) - end -end diff --git a/db/migrate/20221209110935_fix_update_import_sources_on_application_settings.rb b/db/migrate/20221209110935_fix_update_import_sources_on_application_settings.rb deleted file mode 100644 index d3123113e82b4..0000000000000 --- a/db/migrate/20221209110935_fix_update_import_sources_on_application_settings.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# This fixes 20221209110934_update_import_sources_on_application_settings.rb, which -# previously serialized a YAML column into a string. -class FixUpdateImportSourcesOnApplicationSettings < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - class ApplicationSetting < MigrationRecord - end - - def up - sources = ApplicationSetting.last&.import_sources - - return unless sources.is_a?(String) - return if sources.start_with?('---') - - sources = YAML.safe_load(sources) - - ApplicationSetting.update_all(import_sources: sources.to_yaml) - end - - def down; end -end diff --git a/db/migrate/20221209174132_remove_sbom_occurrences_unique_index.rb b/db/migrate/20221209174132_remove_sbom_occurrences_unique_index.rb deleted file mode 100644 index 1bee62b5b1f02..0000000000000 --- a/db/migrate/20221209174132_remove_sbom_occurrences_unique_index.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class RemoveSbomOccurrencesUniqueIndex < Gitlab::Database::Migration[2.1] - INDEX_NAME = 'index_sbom_occurrences_on_ingestion_attributes' - ATTRIBUTES = %i[ - project_id - component_id - component_version_id - source_id - commit_sha - ].freeze - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :sbom_occurrences, name: INDEX_NAME - end - - def down - add_concurrent_index :sbom_occurrences, ATTRIBUTES, unique: true, name: INDEX_NAME - end -end diff --git a/db/migrate/20221209174157_truncate_sbom_occurrences.rb b/db/migrate/20221209174157_truncate_sbom_occurrences.rb deleted file mode 100644 index e9db6526e2ddb..0000000000000 --- a/db/migrate/20221209174157_truncate_sbom_occurrences.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -class TruncateSbomOccurrences < Gitlab::Database::Migration[2.1] - def up - # Because existing data in the table violates the new - # uniqueness constraints, we need to remove the non-distinct rows. - # Rather than do an expensive and error-prone batch migration - # to find and remove the duplicates, we'll just remove all records - # from the table. - # - # The `cyclonedx_sbom_ingestion` feature flag should - # be OFF in all environments to avoid having more duplicate records - # added between this migration and the one where the new unqiue index - # is added. - - # TRUNCATE is a DDL statement (it drops the table and re-creates it), so we want to run the - # migration in DDL mode, but we also don't want to execute it against all schemas because - # it's considered a write operation. So, we'll manually check and skip the migration if - # it's on not `:gitlab_main`. - return unless Gitlab::Database.gitlab_schemas_for_connection(connection).include?(:gitlab_main) - - execute('TRUNCATE sbom_occurrences') - end - - def down - # no-op - end -end diff --git a/db/migrate/20221212054640_add_reported_from_to_abuse_reports.rb b/db/migrate/20221212054640_add_reported_from_to_abuse_reports.rb deleted file mode 100644 index 701c0fa2e2c04..0000000000000 --- a/db/migrate/20221212054640_add_reported_from_to_abuse_reports.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddReportedFromToAbuseReports < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - with_lock_retries do - unless column_exists?(:abuse_reports, :reported_from_url) - add_column :abuse_reports, :reported_from_url, :text, null: false, default: '' - end - end - - add_text_limit :abuse_reports, :reported_from_url, 512 - end - - def down - with_lock_retries do - remove_column :abuse_reports, :reported_from_url if column_exists?(:abuse_reports, :reported_from_url) - end - end -end diff --git a/db/migrate/20221212192452_add_uuid_column_to_sbom_occurrences.rb b/db/migrate/20221212192452_add_uuid_column_to_sbom_occurrences.rb deleted file mode 100644 index 4b7162d66f1ce..0000000000000 --- a/db/migrate/20221212192452_add_uuid_column_to_sbom_occurrences.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddUuidColumnToSbomOccurrences < Gitlab::Database::Migration[2.1] - def change - add_column :sbom_occurrences, :uuid, :uuid, null: false # rubocop:disable Rails/NotNullColumn - end -end diff --git a/db/migrate/20221212192527_index_sbom_occurrences_on_uuid.rb b/db/migrate/20221212192527_index_sbom_occurrences_on_uuid.rb deleted file mode 100644 index 7dbf6f25ab43b..0000000000000 --- a/db/migrate/20221212192527_index_sbom_occurrences_on_uuid.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class IndexSbomOccurrencesOnUuid < Gitlab::Database::Migration[2.1] - INDEX_NAME = 'index_sbom_occurrences_on_uuid' - - disable_ddl_transaction! - - def up - add_concurrent_index :sbom_occurrences, :uuid, unique: true, name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :sbom_occurrences, name: INDEX_NAME - end -end diff --git a/db/migrate/20221213105028_add_sync_part_step_2_of_index_namespaces_on_path_for_top_level_non_projects.rb b/db/migrate/20221213105028_add_sync_part_step_2_of_index_namespaces_on_path_for_top_level_non_projects.rb deleted file mode 100644 index c16cf3dd9408a..0000000000000 --- a/db/migrate/20221213105028_add_sync_part_step_2_of_index_namespaces_on_path_for_top_level_non_projects.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddSyncPartStep2OfIndexNamespacesOnPathForTopLevelNonProjects < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - TABLE_NAME = 'namespaces' - INDEX_NAME = 'index_namespaces_on_path_for_top_level_non_projects' - COLUMN = "lower((path)::text)" - CONDITIONS = "(parent_id IS NULL AND type::text <> 'Project'::text)" - - def up - add_concurrent_index TABLE_NAME, COLUMN, name: INDEX_NAME, where: CONDITIONS - end - - def down - remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME - end -end diff --git a/db/migrate/20221213184314_change_enabled_default_in_dependency_proxy_group_settings.rb b/db/migrate/20221213184314_change_enabled_default_in_dependency_proxy_group_settings.rb deleted file mode 100644 index 6cddcb8094975..0000000000000 --- a/db/migrate/20221213184314_change_enabled_default_in_dependency_proxy_group_settings.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class ChangeEnabledDefaultInDependencyProxyGroupSettings < Gitlab::Database::Migration[2.0] - def change - change_column_default :dependency_proxy_group_settings, :enabled, from: false, to: true - end -end diff --git a/db/migrate/20221214201256_create_user_achievements.rb b/db/migrate/20221214201256_create_user_achievements.rb deleted file mode 100644 index 6e82cd255cd9b..0000000000000 --- a/db/migrate/20221214201256_create_user_achievements.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -class CreateUserAchievements < Gitlab::Database::Migration[2.1] - enable_lock_retries! - - def up - create_table :user_achievements do |t| - t.references :achievement, - null: false, - index: false, - foreign_key: { on_delete: :cascade } - t.bigint :user_id, - null: false - t.bigint :awarded_by_user_id, - null: true - t.bigint :revoked_by_user_id, - index: true, - null: true - t.timestamps_with_timezone null: false - t.datetime_with_timezone :revoked_at, null: true - t.index 'achievement_id, (revoked_by_user_id IS NULL)', - name: 'index_user_achievements_on_achievement_id_revoked_by_is_null' - t.index 'user_id, (revoked_by_user_id IS NULL)', - name: 'index_user_achievements_on_user_id_revoked_by_is_null' - t.index 'awarded_by_user_id, (revoked_by_user_id IS NULL)', - name: 'index_user_achievements_on_awarded_by_revoked_by_is_null' - end - end - - def down - drop_table :user_achievements - end -end diff --git a/db/migrate/20221214204247_user_achievements_foreign_keys.rb b/db/migrate/20221214204247_user_achievements_foreign_keys.rb deleted file mode 100644 index d65d3800dab5e..0000000000000 --- a/db/migrate/20221214204247_user_achievements_foreign_keys.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class UserAchievementsForeignKeys < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - add_concurrent_foreign_key :user_achievements, :users, column: :user_id, on_delete: :cascade - add_concurrent_foreign_key :user_achievements, :users, column: :awarded_by_user_id, on_delete: :nullify - add_concurrent_foreign_key :user_achievements, :users, column: :revoked_by_user_id, on_delete: :nullify - end - - def down - with_lock_retries do - remove_foreign_key :user_achievements, column: :user_id - remove_foreign_key :user_achievements, column: :awarded_by_user_id - remove_foreign_key :user_achievements, column: :revoked_by_user_id - end - end -end diff --git a/db/migrate/20221215210347_partition_pm_package_metadata_tables.rb b/db/migrate/20221215210347_partition_pm_package_metadata_tables.rb deleted file mode 100644 index ebf2b8395b689..0000000000000 --- a/db/migrate/20221215210347_partition_pm_package_metadata_tables.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class PartitionPmPackageMetadataTables < Gitlab::Database::Migration[2.1] - def up - # no-op - # This migration was reverted as part of https://gitlab.com/gitlab-org/gitlab/-/merge_requests/108644 - # The migration file is re-added to ensure that all environments have the same list of migrations. - end - - def down - # no-op - end -end diff --git a/db/migrate/20221216145659_add_pa_clickhouse_connection_string_to_application_settings.rb b/db/migrate/20221216145659_add_pa_clickhouse_connection_string_to_application_settings.rb deleted file mode 100644 index 8774ee8b964d1..0000000000000 --- a/db/migrate/20221216145659_add_pa_clickhouse_connection_string_to_application_settings.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true -class AddPaClickhouseConnectionStringToApplicationSettings < Gitlab::Database::Migration[2.1] - def change - add_column :application_settings, :encrypted_product_analytics_clickhouse_connection_string, :binary - add_column :application_settings, :encrypted_product_analytics_clickhouse_connection_string_iv, :binary - end -end diff --git a/db/migrate/20221219103007_add_name_to_ml_candidates.rb b/db/migrate/20221219103007_add_name_to_ml_candidates.rb deleted file mode 100644 index 2c56279de7368..0000000000000 --- a/db/migrate/20221219103007_add_name_to_ml_candidates.rb +++ /dev/null @@ -1,6 +0,0 @@ -# frozen_string_literal: true -class AddNameToMlCandidates < Gitlab::Database::Migration[2.1] - def change - add_column :ml_candidates, :name, :text # rubocop:disable Migration/AddLimitToTextColumns - end -end diff --git a/db/migrate/20221219112528_add_text_limit_to_name_on_ml_candidates.rb b/db/migrate/20221219112528_add_text_limit_to_name_on_ml_candidates.rb deleted file mode 100644 index c8f0de3b82636..0000000000000 --- a/db/migrate/20221219112528_add_text_limit_to_name_on_ml_candidates.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitToNameOnMlCandidates < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - add_text_limit :ml_candidates, :name, 255 - end - - def down - remove_text_limit :ml_candidates, :name - end -end diff --git a/db/migrate/20221219112632_add_next_over_limit_check_at_to_namespace_details.rb b/db/migrate/20221219112632_add_next_over_limit_check_at_to_namespace_details.rb deleted file mode 100644 index dd2acbfd0bbf7..0000000000000 --- a/db/migrate/20221219112632_add_next_over_limit_check_at_to_namespace_details.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddNextOverLimitCheckAtToNamespaceDetails < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - TABLE_NAME = :namespace_details - COLUMN = :next_over_limit_check_at - - def up - with_lock_retries do - add_column TABLE_NAME, COLUMN, :datetime_with_timezone, null: true - end - end - - def down - with_lock_retries do - remove_column TABLE_NAME, COLUMN - end - end -end diff --git a/db/migrate/20221219122320_copy_clickhouse_connection_string_to_encrypted_var.rb b/db/migrate/20221219122320_copy_clickhouse_connection_string_to_encrypted_var.rb deleted file mode 100644 index feaa2dab170ed..0000000000000 --- a/db/migrate/20221219122320_copy_clickhouse_connection_string_to_encrypted_var.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -class CopyClickhouseConnectionStringToEncryptedVar < Gitlab::Database::Migration[2.1] - restrict_gitlab_migration gitlab_schema: :gitlab_main - - class ApplicationSetting < MigrationRecord - self.table_name = 'application_settings' - - attr_encrypted :product_analytics_clickhouse_connection_string, { - mode: :per_attribute_iv, - key: Settings.attr_encrypted_db_key_base_32, - algorithm: 'aes-256-gcm', - encode: true - }.merge(encode: false, encode_iv: false) - end - - def up - setting = ApplicationSetting.first - - setting.update!(product_analytics_clickhouse_connection_string: setting.clickhouse_connection_string) if setting - end - - def down - # no-op - end -end diff --git a/db/migrate/20221219135535_add_user_defaults_to_private_profile_to_application_settings.rb b/db/migrate/20221219135535_add_user_defaults_to_private_profile_to_application_settings.rb deleted file mode 100644 index 2770456c46f18..0000000000000 --- a/db/migrate/20221219135535_add_user_defaults_to_private_profile_to_application_settings.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddUserDefaultsToPrivateProfileToApplicationSettings < Gitlab::Database::Migration[2.1] - def change - add_column(:application_settings, :user_defaults_to_private_profile, :boolean, default: false, null: false) - end -end diff --git a/db/migrate/20221221134116_create_elastic_group_index_statuses.rb b/db/migrate/20221221134116_create_elastic_group_index_statuses.rb deleted file mode 100644 index 6084b7e955711..0000000000000 --- a/db/migrate/20221221134116_create_elastic_group_index_statuses.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class CreateElasticGroupIndexStatuses < Gitlab::Database::Migration[2.1] - def change - create_table :elastic_group_index_statuses, id: false do |t| - t.references :namespace, - primary_key: true, - foreign_key: { on_delete: :cascade }, - index: false, - default: nil - - t.timestamps_with_timezone null: false - t.datetime_with_timezone :wiki_indexed_at - - t.binary :last_wiki_commit - end - end -end diff --git a/db/migrate/20221221171239_rename_amount_used_column.rb b/db/migrate/20221221171239_rename_amount_used_column.rb deleted file mode 100644 index f25407a85afea..0000000000000 --- a/db/migrate/20221221171239_rename_amount_used_column.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class RenameAmountUsedColumn < Gitlab::Database::Migration[2.1] - TRIGGER_NAME = 'sync_projects_amount_used_columns' - def up - rename_column :ci_project_monthly_usages, :amount_used, :tmp_amount_used - rename_column :ci_project_monthly_usages, :new_amount_used, :amount_used - rename_column :ci_project_monthly_usages, :tmp_amount_used, :new_amount_used - - remove_rename_triggers(:ci_project_monthly_usages, TRIGGER_NAME) - install_rename_triggers(:ci_project_monthly_usages, :amount_used, :new_amount_used, trigger_name: TRIGGER_NAME) - end - - def down - rename_column :ci_project_monthly_usages, :amount_used, :tmp_amount_used - rename_column :ci_project_monthly_usages, :new_amount_used, :amount_used - rename_column :ci_project_monthly_usages, :tmp_amount_used, :new_amount_used - - remove_rename_triggers(:ci_project_monthly_usages, TRIGGER_NAME) - install_rename_triggers(:ci_project_monthly_usages, :amount_used, :new_amount_used, trigger_name: TRIGGER_NAME) - end -end diff --git a/db/migrate/20221222144954_create_analytics_dashboards_configuration_pointers.rb b/db/migrate/20221222144954_create_analytics_dashboards_configuration_pointers.rb deleted file mode 100644 index b3df3ea281bb8..0000000000000 --- a/db/migrate/20221222144954_create_analytics_dashboards_configuration_pointers.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class CreateAnalyticsDashboardsConfigurationPointers < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - create_table :analytics_dashboards_pointers do |t| - t.belongs_to :namespace, - null: false, - index: { unique: true }, - foreign_key: { to_table: :namespaces, on_delete: :cascade } - t.belongs_to :project, null: false, foreign_key: { to_table: :projects, on_delete: :cascade } - end - end - - def down - drop_table :analytics_dashboards_pointers - end -end diff --git a/db/migrate/20221223114543_add_pwa_icon_to_appearances.rb b/db/migrate/20221223114543_add_pwa_icon_to_appearances.rb deleted file mode 100644 index 9a1711be75d73..0000000000000 --- a/db/migrate/20221223114543_add_pwa_icon_to_appearances.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddPwaIconToAppearances < Gitlab::Database::Migration[2.1] - # rubocop:disable Migration/AddLimitToTextColumns - def up - add_column :appearances, :pwa_icon, :text - end - # rubocop:enable Migration/AddLimitToTextColumns - - def down - remove_column :appearances, :pwa_icon - end -end diff --git a/db/migrate/20221226105323_add_registration_columns_to_ci_runners.rb b/db/migrate/20221226105323_add_registration_columns_to_ci_runners.rb deleted file mode 100644 index 6788f154a5cad..0000000000000 --- a/db/migrate/20221226105323_add_registration_columns_to_ci_runners.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -class AddRegistrationColumnsToCiRunners < Gitlab::Database::Migration[2.1] - enable_lock_retries! - - def change - add_column :ci_runners, :registration_type, :integer, limit: 1, default: 0, null: false - add_column :ci_runners, :creator_id, :bigint, null: true - end -end diff --git a/db/migrate/20221226132038_index_ci_runners_on_creator_id.rb b/db/migrate/20221226132038_index_ci_runners_on_creator_id.rb deleted file mode 100644 index e163380533b4f..0000000000000 --- a/db/migrate/20221226132038_index_ci_runners_on_creator_id.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class IndexCiRunnersOnCreatorId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = 'index_ci_runners_on_creator_id_where_creator_id_not_null' - - def up - add_concurrent_index :ci_runners, :creator_id, where: 'creator_id IS NOT NULL', name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :ci_runners, INDEX_NAME - end -end diff --git a/db/migrate/20221226163203_create_ci_runner_machines.rb b/db/migrate/20221226163203_create_ci_runner_machines.rb deleted file mode 100644 index 21ebeb898f408..0000000000000 --- a/db/migrate/20221226163203_create_ci_runner_machines.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class CreateCiRunnerMachines < Gitlab::Database::Migration[2.1] - def change - create_table :ci_runner_machines do |t| - t.belongs_to :runner, index: false, null: false, foreign_key: { to_table: :ci_runners, on_delete: :cascade } - t.integer :executor_type, limit: 2 - t.text :machine_xid, null: false, limit: 64 - t.timestamps_with_timezone null: false - t.datetime_with_timezone :contacted_at - t.text :version, limit: 2048 - t.text :revision, limit: 255 - t.text :platform, limit: 255 - t.text :architecture, limit: 255 - t.text :ip_address, limit: 1024 - - t.index [:runner_id, :machine_xid], unique: true - t.index :version - end - end -end diff --git a/db/migrate/20221227080606_add_text_limit_to_pwa_icon.rb b/db/migrate/20221227080606_add_text_limit_to_pwa_icon.rb deleted file mode 100644 index 66edad4f53eb4..0000000000000 --- a/db/migrate/20221227080606_add_text_limit_to_pwa_icon.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitToPwaIcon < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - add_text_limit :appearances, :pwa_icon, 1024 - end - - def down - remove_text_limit :appearances, :pwa_icon - end -end diff --git a/db/migrate/20221227100846_add_allow_registration_token_to_application_settings.rb b/db/migrate/20221227100846_add_allow_registration_token_to_application_settings.rb deleted file mode 100644 index f6f055ef865af..0000000000000 --- a/db/migrate/20221227100846_add_allow_registration_token_to_application_settings.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddAllowRegistrationTokenToApplicationSettings < Gitlab::Database::Migration[2.1] - enable_lock_retries! - - def change - add_column :application_settings, :allow_runner_registration_token, :boolean, default: true, null: false - end -end diff --git a/db/migrate/20221227100908_add_allow_registration_token_to_namespace_settings.rb b/db/migrate/20221227100908_add_allow_registration_token_to_namespace_settings.rb deleted file mode 100644 index 46456fcfbdf90..0000000000000 --- a/db/migrate/20221227100908_add_allow_registration_token_to_namespace_settings.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddAllowRegistrationTokenToNamespaceSettings < Gitlab::Database::Migration[2.1] - enable_lock_retries! - - def change - add_column :namespace_settings, :allow_runner_registration_token, :boolean, default: true, null: false - end -end diff --git a/db/migrate/20221228063845_add_incident_events_to_integrations.rb b/db/migrate/20221228063845_add_incident_events_to_integrations.rb deleted file mode 100644 index 521ffce07245e..0000000000000 --- a/db/migrate/20221228063845_add_incident_events_to_integrations.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddIncidentEventsToIntegrations < Gitlab::Database::Migration[2.1] - def change - add_column :integrations, :incident_events, :boolean, default: false, null: false - end -end diff --git a/db/migrate/20221228072549_add_pwa_attributes_to_appearances.rb b/db/migrate/20221228072549_add_pwa_attributes_to_appearances.rb deleted file mode 100644 index 4c800d3305cc9..0000000000000 --- a/db/migrate/20221228072549_add_pwa_attributes_to_appearances.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddPwaAttributesToAppearances < Gitlab::Database::Migration[2.1] - # rubocop:disable Migration/AddLimitToTextColumns - def up - add_column :appearances, :pwa_name, :text - add_column :appearances, :pwa_description, :text - end - # rubocop:enable Migration/AddLimitToTextColumns - - def down - remove_column :appearances, :pwa_name - remove_column :appearances, :pwa_description - end -end diff --git a/db/migrate/20221228073206_add_text_limit_to_pwa_attributes.rb b/db/migrate/20221228073206_add_text_limit_to_pwa_attributes.rb deleted file mode 100644 index 0f3bf66dfa818..0000000000000 --- a/db/migrate/20221228073206_add_text_limit_to_pwa_attributes.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitToPwaAttributes < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - add_text_limit :appearances, :pwa_name, 255 - add_text_limit :appearances, :pwa_description, 2048 - end - - def down - remove_text_limit :appearances, :pwa_name - remove_text_limit :appearances, :pwa_description - end -end diff --git a/db/migrate/20221228083452_remove_check_constraint_on_chat_names_on_integration.rb b/db/migrate/20221228083452_remove_check_constraint_on_chat_names_on_integration.rb deleted file mode 100644 index 6a75bd1badd9f..0000000000000 --- a/db/migrate/20221228083452_remove_check_constraint_on_chat_names_on_integration.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class RemoveCheckConstraintOnChatNamesOnIntegration < Gitlab::Database::Migration[2.1] - CONSTRAINT_NAME = 'check_2b0a0d0f0f' - - disable_ddl_transaction! - - def up - remove_check_constraint(:chat_names, CONSTRAINT_NAME) - end - - def down - # noop: rollback would not work as we can have records where `integration_id` IS NULL - end -end diff --git a/db/migrate/20221228161214_rename_appearances_short_title_to_pwa_short_name.rb b/db/migrate/20221228161214_rename_appearances_short_title_to_pwa_short_name.rb deleted file mode 100644 index 76dfbb56f65bd..0000000000000 --- a/db/migrate/20221228161214_rename_appearances_short_title_to_pwa_short_name.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class RenameAppearancesShortTitleToPwaShortName < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - rename_column_concurrently :appearances, :short_title, :pwa_short_name - end - - def down - undo_rename_column_concurrently :appearances, :short_title, :pwa_short_name - end -end diff --git a/db/migrate/20221229064959_add_links_to_spam_to_abuse_reports.rb b/db/migrate/20221229064959_add_links_to_spam_to_abuse_reports.rb deleted file mode 100644 index af4761644c4d6..0000000000000 --- a/db/migrate/20221229064959_add_links_to_spam_to_abuse_reports.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddLinksToSpamToAbuseReports < Gitlab::Database::Migration[2.1] - def change - add_column :abuse_reports, :links_to_spam, :text, array: true, null: false, default: [] - end -end diff --git a/db/migrate/20230102131000_add_smtp_credentials_to_service_desk_settings.rb b/db/migrate/20230102131000_add_smtp_credentials_to_service_desk_settings.rb deleted file mode 100644 index 8d3e3860ceb51..0000000000000 --- a/db/migrate/20230102131000_add_smtp_credentials_to_service_desk_settings.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -class AddSmtpCredentialsToServiceDeskSettings < Gitlab::Database::Migration[2.1] - def up - # rubocop:disable Migration/AddLimitToTextColumns - # limit is added in 20230102131100_add_text_limits_to_smtp_credentials_on_service_desk_settings.rb - add_column :service_desk_settings, :custom_email_enabled, :boolean, default: false, null: false - # Unique constraint/index is added in 20230102131050_add_unique_constraint_for_custom_email_to_... - add_column :service_desk_settings, :custom_email, :text - add_column :service_desk_settings, :custom_email_smtp_address, :text - add_column :service_desk_settings, :custom_email_smtp_port, :integer - add_column :service_desk_settings, :custom_email_smtp_username, :text - # Encrypted attribute via attr_encrypted needs these two columns - add_column :service_desk_settings, :encrypted_custom_email_smtp_password, :binary - add_column :service_desk_settings, :encrypted_custom_email_smtp_password_iv, :binary - # rubocop:enable Migration/AddLimitToTextColumns - end - - def down - remove_column :service_desk_settings, :custom_email_enabled - remove_column :service_desk_settings, :custom_email - remove_column :service_desk_settings, :custom_email_smtp_address - remove_column :service_desk_settings, :custom_email_smtp_port - remove_column :service_desk_settings, :custom_email_smtp_username - remove_column :service_desk_settings, :encrypted_custom_email_smtp_password - remove_column :service_desk_settings, :encrypted_custom_email_smtp_password_iv - end -end diff --git a/db/migrate/20230102131050_add_unique_constraint_for_custom_email_to_service_desk_settings.rb b/db/migrate/20230102131050_add_unique_constraint_for_custom_email_to_service_desk_settings.rb deleted file mode 100644 index cfee56ececd2b..0000000000000 --- a/db/migrate/20230102131050_add_unique_constraint_for_custom_email_to_service_desk_settings.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddUniqueConstraintForCustomEmailToServiceDeskSettings < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = 'custom_email_unique_constraint' - - def up - # Force custom_email to be unique instance-wide. This is neccessary because we will match - # incoming service desk emails with a custom email by the custom_email field. - # This also adds the corresponding index - add_concurrent_index(:service_desk_settings, :custom_email, unique: true, name: INDEX_NAME) - end - - def down - remove_concurrent_index_by_name(:service_desk_settings, INDEX_NAME) - end -end diff --git a/db/migrate/20230102131100_add_text_limits_to_smtp_credentials_on_service_desk_settings.rb b/db/migrate/20230102131100_add_text_limits_to_smtp_credentials_on_service_desk_settings.rb deleted file mode 100644 index 60c96bd6bdbcd..0000000000000 --- a/db/migrate/20230102131100_add_text_limits_to_smtp_credentials_on_service_desk_settings.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitsToSmtpCredentialsOnServiceDeskSettings < Gitlab::Database::Migration[2.1] - MAXIMUM_LIMIT = 255 - - disable_ddl_transaction! - - def up - add_text_limit :service_desk_settings, :custom_email, MAXIMUM_LIMIT - add_text_limit :service_desk_settings, :custom_email_smtp_address, MAXIMUM_LIMIT - add_text_limit :service_desk_settings, :custom_email_smtp_username, MAXIMUM_LIMIT - end - - def down - remove_text_limit :service_desk_settings, :custom_email - remove_text_limit :service_desk_settings, :custom_email_smtp_address - remove_text_limit :service_desk_settings, :custom_email_smtp_username - end -end diff --git a/db/migrate/20230102180341_add_merge_request_meta_to_merge_requests_compliance_violations.rb b/db/migrate/20230102180341_add_merge_request_meta_to_merge_requests_compliance_violations.rb deleted file mode 100644 index 84e1994e91cca..0000000000000 --- a/db/migrate/20230102180341_add_merge_request_meta_to_merge_requests_compliance_violations.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -class AddMergeRequestMetaToMergeRequestsComplianceViolations < Gitlab::Database::Migration[2.1] - def change - add_column :merge_requests_compliance_violations, :merged_at, :datetime_with_timezone - add_column :merge_requests_compliance_violations, :target_project_id, :integer - add_column :merge_requests_compliance_violations, :title, :text # rubocop:disable Migration/AddLimitToTextColumns - add_column :merge_requests_compliance_violations, :target_branch, :text # rubocop:disable Migration/AddLimitToTextColumns - end -end diff --git a/db/migrate/20230104150600_add_machine_id_to_builds_metadata.rb b/db/migrate/20230104150600_add_machine_id_to_builds_metadata.rb deleted file mode 100644 index 838ccbff75497..0000000000000 --- a/db/migrate/20230104150600_add_machine_id_to_builds_metadata.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddMachineIdToBuildsMetadata < Gitlab::Database::Migration[2.1] - enable_lock_retries! - - def change - add_column :p_ci_builds_metadata, :runner_machine_id, :bigint - end -end diff --git a/db/migrate/20230104201524_add_zoekt_shards_and_indexed_namespaces.rb b/db/migrate/20230104201524_add_zoekt_shards_and_indexed_namespaces.rb deleted file mode 100644 index c9d7bc51041cb..0000000000000 --- a/db/migrate/20230104201524_add_zoekt_shards_and_indexed_namespaces.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddZoektShardsAndIndexedNamespaces < Gitlab::Database::Migration[2.1] - enable_lock_retries! - - def change - create_table :zoekt_shards do |t| - t.text :index_base_url, limit: 1024, index: { unique: true }, null: false - t.text :search_base_url, limit: 1024, index: { unique: true }, null: false - t.timestamps_with_timezone - end - - create_table :zoekt_indexed_namespaces do |t| - t.references :zoekt_shard, null: false, index: false, foreign_key: { on_delete: :cascade } - t.bigint :namespace_id, null: false, index: true - t.timestamps_with_timezone - t.index [:zoekt_shard_id, :namespace_id], unique: true, name: 'index_zoekt_shard_and_namespace' - end - end -end diff --git a/db/migrate/20230105170414_rename_amount_used_column_on_ci_namespace_monthly_usages_table.rb b/db/migrate/20230105170414_rename_amount_used_column_on_ci_namespace_monthly_usages_table.rb deleted file mode 100644 index ff59b1e598709..0000000000000 --- a/db/migrate/20230105170414_rename_amount_used_column_on_ci_namespace_monthly_usages_table.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class RenameAmountUsedColumnOnCiNamespaceMonthlyUsagesTable < Gitlab::Database::Migration[2.1] - enable_lock_retries! - - TRIGGER_NAME = 'sync_namespaces_amount_used_columns' - def up - rename_column :ci_namespace_monthly_usages, :amount_used, :tmp_amount_used - rename_column :ci_namespace_monthly_usages, :new_amount_used, :amount_used - rename_column :ci_namespace_monthly_usages, :tmp_amount_used, :new_amount_used - - remove_rename_triggers(:ci_namespace_monthly_usages, TRIGGER_NAME) - install_rename_triggers(:ci_namespace_monthly_usages, :amount_used, :new_amount_used, trigger_name: TRIGGER_NAME) - end - - def down - rename_column :ci_namespace_monthly_usages, :amount_used, :tmp_amount_used - rename_column :ci_namespace_monthly_usages, :new_amount_used, :amount_used - rename_column :ci_namespace_monthly_usages, :tmp_amount_used, :new_amount_used - - remove_rename_triggers(:ci_namespace_monthly_usages, TRIGGER_NAME) - install_rename_triggers(:ci_namespace_monthly_usages, :amount_used, :new_amount_used, trigger_name: TRIGGER_NAME) - end -end diff --git a/db/migrate/20230106014423_add_constraint_to_links_to_spam.rb b/db/migrate/20230106014423_add_constraint_to_links_to_spam.rb deleted file mode 100644 index b3d7ff3755aaf..0000000000000 --- a/db/migrate/20230106014423_add_constraint_to_links_to_spam.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddConstraintToLinksToSpam < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - CONSTRAINT_NAME = "abuse_reports_links_to_spam_length_check" - - def up - add_check_constraint :abuse_reports, "CARDINALITY(links_to_spam) <= 20", CONSTRAINT_NAME - end - - def down - remove_check_constraint :abuse_reports, CONSTRAINT_NAME - end -end diff --git a/db/migrate/20230106125945_add_user_to_ssh_signatures.rb b/db/migrate/20230106125945_add_user_to_ssh_signatures.rb deleted file mode 100644 index 9e487287b668f..0000000000000 --- a/db/migrate/20230106125945_add_user_to_ssh_signatures.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class AddUserToSshSignatures < Gitlab::Database::Migration[2.1] - def up - add_column :ssh_signatures, :user_id, :bigint, if_not_exists: true, null: true - end - - def down - remove_column :ssh_signatures, :user_id, if_exists: true - end -end diff --git a/db/migrate/20230106131659_add_fingerprint_to_ssh_signatures.rb b/db/migrate/20230106131659_add_fingerprint_to_ssh_signatures.rb deleted file mode 100644 index ba792a1ae4336..0000000000000 --- a/db/migrate/20230106131659_add_fingerprint_to_ssh_signatures.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddFingerprintToSshSignatures < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - add_column :ssh_signatures, :key_fingerprint_sha256, :bytea, if_not_exists: true - end - - def down - remove_column :ssh_signatures, :key_fingerprint_sha256, :bytea, if_exists: true - end -end diff --git a/db/migrate/20230106142239_add_config_column_to_ci_runner_machines.rb b/db/migrate/20230106142239_add_config_column_to_ci_runner_machines.rb deleted file mode 100644 index 29fee4d7b568a..0000000000000 --- a/db/migrate/20230106142239_add_config_column_to_ci_runner_machines.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddConfigColumnToCiRunnerMachines < Gitlab::Database::Migration[2.1] - enable_lock_retries! - - def change - add_column :ci_runner_machines, :config, :jsonb, default: {}, null: false - end -end diff --git a/db/migrate/20230106184809_create_dast_profiles_tags.rb b/db/migrate/20230106184809_create_dast_profiles_tags.rb deleted file mode 100644 index f31eaea5fa869..0000000000000 --- a/db/migrate/20230106184809_create_dast_profiles_tags.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class CreateDastProfilesTags < Gitlab::Database::Migration[2.1] - def up - create_table :dast_profiles_tags do |t| - t.references :dast_profile, null: false, foreign_key: { on_delete: :cascade }, - index: { name: 'i_dast_profiles_tags_on_scanner_profiles_id' } - - t.bigint :tag_id, null: false - - t.index :tag_id, name: :index_dast_profiles_tags_on_tag_id - end - end - - def down - drop_table :dast_profiles_tags - end -end diff --git a/db/migrate/20230107125328_add_zoekt_indexed_namespaces_foreign_key.rb b/db/migrate/20230107125328_add_zoekt_indexed_namespaces_foreign_key.rb deleted file mode 100644 index db995d6603e4d..0000000000000 --- a/db/migrate/20230107125328_add_zoekt_indexed_namespaces_foreign_key.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddZoektIndexedNamespacesForeignKey < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - add_concurrent_foreign_key :zoekt_indexed_namespaces, :namespaces, column: :namespace_id, on_delete: :cascade - end - - def down - with_lock_retries do - remove_foreign_key :zoekt_indexed_namespaces, column: :namespace_id - end - end -end diff --git a/db/migrate/20230109093043_create_namespaces_storage_limit_exclusions.rb b/db/migrate/20230109093043_create_namespaces_storage_limit_exclusions.rb deleted file mode 100644 index 06168587fb5ce..0000000000000 --- a/db/migrate/20230109093043_create_namespaces_storage_limit_exclusions.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class CreateNamespacesStorageLimitExclusions < Gitlab::Database::Migration[2.1] - enable_lock_retries! - - def up - create_table :namespaces_storage_limit_exclusions do |t| - t.references :namespace, - foreign_key: { on_delete: :cascade }, - index: true, - null: false - t.text :reason, null: false, limit: 255 - t.timestamps_with_timezone null: false - end - end - - def down - drop_table :namespaces_storage_limit_exclusions - end -end diff --git a/db/migrate/20230109095159_add_runner_machines_created_at_index.rb b/db/migrate/20230109095159_add_runner_machines_created_at_index.rb deleted file mode 100644 index e9ca48514975f..0000000000000 --- a/db/migrate/20230109095159_add_runner_machines_created_at_index.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddRunnerMachinesCreatedAtIndex < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = 'index_ci_runner_machines_on_created_at_and_id_desc' - - def up - add_concurrent_index :ci_runner_machines, [:created_at, :id], order: { id: :desc }, name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :ci_runner_machines, INDEX_NAME - end -end diff --git a/db/migrate/20230109095622_rename_web_hook_calls_to_web_hook_calls_high.rb b/db/migrate/20230109095622_rename_web_hook_calls_to_web_hook_calls_high.rb deleted file mode 100644 index d3a461b3abbbd..0000000000000 --- a/db/migrate/20230109095622_rename_web_hook_calls_to_web_hook_calls_high.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class RenameWebHookCallsToWebHookCallsHigh < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - rename_column_concurrently :plan_limits, :web_hook_calls, :web_hook_calls_high - end - - def down - undo_rename_column_concurrently :plan_limits, :web_hook_calls, :web_hook_calls_high - end -end diff --git a/db/migrate/20230109121313_add_runner_machines_contacted_at_index.rb b/db/migrate/20230109121313_add_runner_machines_contacted_at_index.rb deleted file mode 100644 index 667a4309c51d3..0000000000000 --- a/db/migrate/20230109121313_add_runner_machines_contacted_at_index.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class AddRunnerMachinesContactedAtIndex < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = 'index_ci_runner_machines_on_contacted_at_desc_and_id_desc' - - def up - add_concurrent_index :ci_runner_machines, [:contacted_at, :id], order: { contacted_at: :desc, id: :desc }, - name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :ci_runner_machines, INDEX_NAME - end -end diff --git a/db/migrate/20230109215921_add_storage_admin_control_columns_to_plan_limits.rb b/db/migrate/20230109215921_add_storage_admin_control_columns_to_plan_limits.rb deleted file mode 100644 index cf4879e4b8904..0000000000000 --- a/db/migrate/20230109215921_add_storage_admin_control_columns_to_plan_limits.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class AddStorageAdminControlColumnsToPlanLimits < Gitlab::Database::Migration[2.1] - enable_lock_retries! - - def change - add_column(:plan_limits, :enforcement_limit, :integer, default: 0, null: false) - add_column(:plan_limits, :notification_limit, :integer, default: 0, null: false) - add_column(:plan_limits, :dashboard_limit_enabled_at, :datetime_with_timezone) - end -end diff --git a/db/migrate/20230109232316_create_wiki_repository_states.rb b/db/migrate/20230109232316_create_wiki_repository_states.rb deleted file mode 100644 index 61afc18c0f643..0000000000000 --- a/db/migrate/20230109232316_create_wiki_repository_states.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true - -class CreateWikiRepositoryStates < Gitlab::Database::Migration[2.0] - VERIFICATION_STATE_INDEX_NAME = "index_wiki_repository_states_on_verification_state" - PENDING_VERIFICATION_INDEX_NAME = "index_wiki_repository_states_pending_verification" - FAILED_VERIFICATION_INDEX_NAME = "index_wiki_repository_states_failed_verification" - NEEDS_VERIFICATION_INDEX_NAME = "index_wiki_repository_states_needs_verification" - - enable_lock_retries! - - def up - create_table :wiki_repository_states do |t| - t.datetime_with_timezone :verification_started_at - t.datetime_with_timezone :verification_retry_at - t.datetime_with_timezone :verified_at - t.references :project_wiki_repository, null: false, index: { unique: true }, foreign_key: { on_delete: :cascade } - t.integer :verification_state, default: 0, limit: 2, null: false - t.integer :verification_retry_count, limit: 2 - t.binary :verification_checksum, using: 'verification_checksum::bytea' - t.text :verification_failure, limit: 255 - - t.index :verification_state, - name: VERIFICATION_STATE_INDEX_NAME - - t.index :verified_at, - where: "(verification_state = 0)", - order: { verified_at: 'ASC NULLS FIRST' }, - name: PENDING_VERIFICATION_INDEX_NAME - - t.index :verification_retry_at, - where: "(verification_state = 3)", - order: { verification_retry_at: 'ASC NULLS FIRST' }, - name: FAILED_VERIFICATION_INDEX_NAME - - t.index :verification_state, - where: "(verification_state = 0 OR verification_state = 3)", - name: NEEDS_VERIFICATION_INDEX_NAME - end - end - - def down - drop_table :wiki_repository_states - end -end diff --git a/db/migrate/20230110031131_add_uses_legacy_iid_to_test_reports.rb b/db/migrate/20230110031131_add_uses_legacy_iid_to_test_reports.rb deleted file mode 100644 index e327a4d43a4b8..0000000000000 --- a/db/migrate/20230110031131_add_uses_legacy_iid_to_test_reports.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddUsesLegacyIidToTestReports < Gitlab::Database::Migration[2.1] - def change - add_column :requirements_management_test_reports, :uses_legacy_iid, :boolean, null: false, default: true - end -end diff --git a/db/migrate/20230110212906_add_on_update_action_to_postgres_foreign_keys.rb b/db/migrate/20230110212906_add_on_update_action_to_postgres_foreign_keys.rb deleted file mode 100644 index 6cc3aeed56f88..0000000000000 --- a/db/migrate/20230110212906_add_on_update_action_to_postgres_foreign_keys.rb +++ /dev/null @@ -1,73 +0,0 @@ -# frozen_string_literal: true - -class AddOnUpdateActionToPostgresForeignKeys < Gitlab::Database::Migration[2.1] - def up - execute(<<~SQL) - -- adding the on_update_action before is_inherited requires recreating the view - DROP VIEW IF EXISTS postgres_foreign_keys; - CREATE OR REPLACE VIEW postgres_foreign_keys AS - SELECT - pg_constraint.oid AS oid, - pg_constraint.conname AS name, - constrained_namespace.nspname::text || '.'::text || constrained_table.relname::text AS constrained_table_identifier, - referenced_namespace.nspname::text || '.'::text || referenced_table.relname::text AS referenced_table_identifier, - constrained_table.relname::text AS constrained_table_name, - referenced_table.relname::text AS referenced_table_name, - constrained_cols.constrained_columns, - referenced_cols.referenced_columns, - pg_constraint.confdeltype AS on_delete_action, - pg_constraint.confupdtype as on_update_action, - pg_constraint.coninhcount > 0 as is_inherited - FROM pg_constraint - INNER JOIN pg_class constrained_table ON constrained_table.oid = pg_constraint.conrelid - INNER JOIN pg_class referenced_table ON referenced_table.oid = pg_constraint.confrelid - INNER JOIN pg_namespace constrained_namespace ON constrained_table.relnamespace = constrained_namespace.oid - INNER JOIN pg_namespace referenced_namespace ON referenced_table.relnamespace = referenced_namespace.oid - CROSS JOIN LATERAL ( - SELECT array_agg(pg_attribute.attname ORDER BY conkey.idx) -- must order here so that attributes are in correct order in array - FROM unnest(pg_constraint.conkey) WITH ORDINALITY conkey(attnum, idx) - INNER JOIN pg_attribute ON pg_attribute.attnum = conkey.attnum AND pg_attribute.attrelid = constrained_table.oid - ) constrained_cols(constrained_columns) - CROSS JOIN LATERAL ( - SELECT array_agg(pg_attribute.attname ORDER BY confkey.idx) - FROM unnest(pg_constraint.confkey) WITH ORDINALITY confkey(attnum, idx) - INNER JOIN pg_attribute ON pg_attribute.attnum = confkey.attnum AND pg_attribute.attrelid = referenced_table.oid - ) referenced_cols(referenced_columns) - WHERE contype = 'f'; - SQL - end - - def down - execute(<<~SQL) - DROP VIEW IF EXISTS postgres_foreign_keys; - CREATE OR REPLACE VIEW postgres_foreign_keys AS - SELECT - pg_constraint.oid AS oid, - pg_constraint.conname AS name, - constrained_namespace.nspname::text || '.'::text || constrained_table.relname::text AS constrained_table_identifier, - referenced_namespace.nspname::text || '.'::text || referenced_table.relname::text AS referenced_table_identifier, - constrained_table.relname::text AS constrained_table_name, - referenced_table.relname::text AS referenced_table_name, - constrained_cols.constrained_columns, - referenced_cols.referenced_columns, - pg_constraint.confdeltype AS on_delete_action, - pg_constraint.coninhcount > 0 as is_inherited - FROM pg_constraint - INNER JOIN pg_class constrained_table ON constrained_table.oid = pg_constraint.conrelid - INNER JOIN pg_class referenced_table ON referenced_table.oid = pg_constraint.confrelid - INNER JOIN pg_namespace constrained_namespace ON constrained_table.relnamespace = constrained_namespace.oid - INNER JOIN pg_namespace referenced_namespace ON referenced_table.relnamespace = referenced_namespace.oid - CROSS JOIN LATERAL ( - SELECT array_agg(pg_attribute.attname ORDER BY conkey.idx) -- must order here so that attributes are in correct order in array - FROM unnest(pg_constraint.conkey) WITH ORDINALITY conkey(attnum, idx) - INNER JOIN pg_attribute ON pg_attribute.attnum = conkey.attnum AND pg_attribute.attrelid = constrained_table.oid - ) constrained_cols(constrained_columns) - CROSS JOIN LATERAL ( - SELECT array_agg(pg_attribute.attname ORDER BY confkey.idx) - FROM unnest(pg_constraint.confkey) WITH ORDINALITY confkey(attnum, idx) - INNER JOIN pg_attribute ON pg_attribute.attnum = confkey.attnum AND pg_attribute.attrelid = referenced_table.oid - ) referenced_cols(referenced_columns) - WHERE contype = 'f'; - SQL - end -end diff --git a/db/migrate/20230111092510_add_migrate_projects_to_bulk_import_entities.rb b/db/migrate/20230111092510_add_migrate_projects_to_bulk_import_entities.rb deleted file mode 100644 index d09a796ba5c55..0000000000000 --- a/db/migrate/20230111092510_add_migrate_projects_to_bulk_import_entities.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddMigrateProjectsToBulkImportEntities < Gitlab::Database::Migration[2.1] - def change - add_column :bulk_import_entities, :migrate_projects, :boolean, null: false, default: true - end -end diff --git a/db/migrate/20230111124512_remove_tmp_index_vulns_on_report_type.rb b/db/migrate/20230111124512_remove_tmp_index_vulns_on_report_type.rb deleted file mode 100644 index e1254d237ba23..0000000000000 --- a/db/migrate/20230111124512_remove_tmp_index_vulns_on_report_type.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -class RemoveTmpIndexVulnsOnReportType < Gitlab::Database::Migration[2.0] - # Temporary index to perform migration removing invalid vulnerabilities - INDEX_NAME = 'tmp_idx_vulnerabilities_on_id_where_report_type_7_99' - - REPORT_TYPES = { - cluster_image_scanning: 7, - custom: 99 - } - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :vulnerabilities, INDEX_NAME - end - - def down - add_concurrent_index :vulnerabilities, :id, - where: "report_type IN (#{REPORT_TYPES.values.join(', ')})", - name: INDEX_NAME - end -end diff --git a/db/migrate/20230111132621_unpartition_pm_package_metadata_tables.rb b/db/migrate/20230111132621_unpartition_pm_package_metadata_tables.rb deleted file mode 100644 index 9fbd04734d3ee..0000000000000 --- a/db/migrate/20230111132621_unpartition_pm_package_metadata_tables.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -class UnpartitionPmPackageMetadataTables < Gitlab::Database::Migration[2.1] - def up - return unless Gitlab.dev_or_test_env? || Gitlab.staging? - - drop_table(:pm_package_version_licenses, force: :cascade) # rubocop:disable Migration/DropTable - drop_table(:pm_package_versions, force: :cascade) # rubocop:disable Migration/DropTable - drop_table(:pm_packages, force: :cascade) # rubocop:disable Migration/DropTable - - create_table :pm_packages do |t| - t.integer :purl_type, limit: 2, null: false - t.text :name, null: false, limit: 255 - t.index [:purl_type, :name], name: 'i_pm_packages_purl_type_and_name', unique: true - end - - create_table :pm_package_versions do |t| - t.references :pm_package, - index: false, - foreign_key: { - to_table: :pm_packages, - column: :pm_package_id, - name: 'fk_rails_cf94c3e601', - on_delete: :cascade - } - t.text :version, null: false, limit: 255 - t.index [:pm_package_id, :version], name: 'i_pm_package_versions_on_package_id_and_version', unique: true - t.index :pm_package_id, name: 'index_pm_package_versions_on_pm_package_id' - end - - create_table :pm_package_version_licenses, primary_key: [:pm_package_version_id, :pm_license_id] do |t| - t.references :pm_package_version, - index: false, - null: false, - foreign_key: { - to_table: :pm_package_versions, - column: :pm_package_version_id, - name: 'fk_rails_30ddb7f837', - on_delete: :cascade - } - t.references :pm_license, - index: false, - null: false, - foreign_key: { name: 'fk_rails_7520ea026d', on_delete: :cascade } - t.index :pm_license_id, name: 'index_pm_package_version_licenses_on_pm_license_id' - t.index :pm_package_version_id, name: 'index_pm_package_version_licenses_on_pm_package_version_id' - end - end - - # partitioned tables can't be restored because - # foreign keys to partitioned tables are not supported by Postgres 11 - # https://gitlab.com/gitlab-org/gitlab/-/issues/387761 - def down; end -end diff --git a/db/migrate/20230111171355_add_allow_possible_spam_to_application_settings.rb b/db/migrate/20230111171355_add_allow_possible_spam_to_application_settings.rb deleted file mode 100644 index 0b6b20e6129b9..0000000000000 --- a/db/migrate/20230111171355_add_allow_possible_spam_to_application_settings.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddAllowPossibleSpamToApplicationSettings < Gitlab::Database::Migration[2.1] - enable_lock_retries! - - def change - add_column :application_settings, :allow_possible_spam, :boolean, default: false, null: false - end -end diff --git a/db/migrate/20230111174113_create_airflow_dags.rb b/db/migrate/20230111174113_create_airflow_dags.rb deleted file mode 100644 index 798acadd79043..0000000000000 --- a/db/migrate/20230111174113_create_airflow_dags.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class CreateAirflowDags < Gitlab::Database::Migration[2.1] - enable_lock_retries! - def change - create_table :airflow_dags do |t| - t.references :project, index: true, foreign_key: { on_delete: :cascade }, null: false - t.timestamps_with_timezone null: false - t.datetime_with_timezone :next_run - t.boolean :has_import_errors - t.boolean :is_active - t.boolean :is_paused - t.text :dag_name, null: false, limit: 255 - t.text :schedule, limit: 255 - t.text :fileloc, limit: 255 - end - end -end diff --git a/db/migrate/20230112014822_add_user_index_and_fk_to_ssh_signatures.rb b/db/migrate/20230112014822_add_user_index_and_fk_to_ssh_signatures.rb deleted file mode 100644 index 31df4b982747e..0000000000000 --- a/db/migrate/20230112014822_add_user_index_and_fk_to_ssh_signatures.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddUserIndexAndFkToSshSignatures < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = 'index_ssh_signatures_on_user_id' - - def up - add_concurrent_index :ssh_signatures, :user_id, name: INDEX_NAME - add_concurrent_foreign_key :ssh_signatures, :users, column: :user_id, on_delete: :nullify - end - - def down - with_lock_retries do - remove_foreign_key_if_exists :ssh_signatures, column: :user_id - end - - remove_concurrent_index_by_name :ssh_signatures, INDEX_NAME - end -end diff --git a/db/migrate/20230112104253_add_tmp_index_to_ci_build_runner_session.rb b/db/migrate/20230112104253_add_tmp_index_to_ci_build_runner_session.rb deleted file mode 100644 index 62f202c1ee2ef..0000000000000 --- a/db/migrate/20230112104253_add_tmp_index_to_ci_build_runner_session.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class AddTmpIndexToCiBuildRunnerSession < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = :tmp_index_ci_builds_runner_session_on_partition_id_and_id - TABLE_NAME = :ci_builds_runner_session - - def up - return unless Gitlab.com? - - add_concurrent_index( - TABLE_NAME, - [:partition_id, :id], - where: 'partition_id = 101', - name: INDEX_NAME - ) - end - - def down - remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME) - end -end diff --git a/db/migrate/20230112104526_add_tmp_index_to_ci_pending_build.rb b/db/migrate/20230112104526_add_tmp_index_to_ci_pending_build.rb deleted file mode 100644 index 3666e03a8b5e7..0000000000000 --- a/db/migrate/20230112104526_add_tmp_index_to_ci_pending_build.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class AddTmpIndexToCiPendingBuild < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = :tmp_index_ci_pending_builds_on_partition_id_and_id - TABLE_NAME = :ci_pending_builds - - def up - return unless Gitlab.com? - - add_concurrent_index( - TABLE_NAME, - [:partition_id, :id], - where: 'partition_id = 101', - name: INDEX_NAME - ) - end - - def down - remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME) - end -end diff --git a/db/migrate/20230112104636_add_tmp_index_to_ci_running_build.rb b/db/migrate/20230112104636_add_tmp_index_to_ci_running_build.rb deleted file mode 100644 index 66c66cc1cd915..0000000000000 --- a/db/migrate/20230112104636_add_tmp_index_to_ci_running_build.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class AddTmpIndexToCiRunningBuild < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = :tmp_index_ci_running_builds_on_partition_id_and_id - TABLE_NAME = :ci_running_builds - - def up - return unless Gitlab.com? - - add_concurrent_index( - TABLE_NAME, - [:partition_id, :id], - where: 'partition_id = 101', - name: INDEX_NAME - ) - end - - def down - remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME) - end -end diff --git a/db/migrate/20230113195141_package_metadata_set_default_not_null.rb b/db/migrate/20230113195141_package_metadata_set_default_not_null.rb deleted file mode 100644 index 92aed8a5706ad..0000000000000 --- a/db/migrate/20230113195141_package_metadata_set_default_not_null.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class PackageMetadataSetDefaultNotNull < Gitlab::Database::Migration[2.1] - def change - change_column_null(:pm_package_versions, :pm_package_id, false) - end -end diff --git a/db/migrate/20230116143310_add_pages_unique_domain_columns_to_project_settings.rb b/db/migrate/20230116143310_add_pages_unique_domain_columns_to_project_settings.rb deleted file mode 100644 index 53c4f429243e3..0000000000000 --- a/db/migrate/20230116143310_add_pages_unique_domain_columns_to_project_settings.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddPagesUniqueDomainColumnsToProjectSettings < Gitlab::Database::Migration[2.1] - def up - add_column :project_settings, :pages_unique_domain_enabled, :boolean, default: false, null: false - add_column :project_settings, :pages_unique_domain, :text # rubocop: disable Migration/AddLimitToTextColumns - end - - def down - remove_column :project_settings, :pages_unique_domain_enabled, :boolean - remove_column :project_settings, :pages_unique_domain, :text - end -end diff --git a/db/migrate/20230116143311_add_project_settings_pages_unique_domain_limit.rb b/db/migrate/20230116143311_add_project_settings_pages_unique_domain_limit.rb deleted file mode 100644 index 53c2a344a2c8e..0000000000000 --- a/db/migrate/20230116143311_add_project_settings_pages_unique_domain_limit.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddProjectSettingsPagesUniqueDomainLimit < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - add_text_limit :project_settings, :pages_unique_domain, 63 - end - - def down - remove_text_limit :project_settings, :pages_unique_domain - end -end diff --git a/db/migrate/20230116143312_add_project_settings_pages_unique_domain_unique_index.rb b/db/migrate/20230116143312_add_project_settings_pages_unique_domain_unique_index.rb deleted file mode 100644 index 3e6fea00ed22e..0000000000000 --- a/db/migrate/20230116143312_add_project_settings_pages_unique_domain_unique_index.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddProjectSettingsPagesUniqueDomainUniqueIndex < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - add_concurrent_index :project_settings, - :pages_unique_domain, - unique: true, - where: 'pages_unique_domain IS NOT NULL', - name: 'unique_index_for_project_pages_unique_domain' - end - - def down - remove_concurrent_index :project_settings, - :pages_unique_domain, - unique: true, - name: 'unique_index_for_project_pages_unique_domain' - end -end diff --git a/db/migrate/20230117173433_create_project_data_transfer.rb b/db/migrate/20230117173433_create_project_data_transfer.rb deleted file mode 100644 index f63191c991b95..0000000000000 --- a/db/migrate/20230117173433_create_project_data_transfer.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -class CreateProjectDataTransfer < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - with_lock_retries do - create_table :project_data_transfers do |t| - t.references :project, index: false, null: false - t.references :namespace, index: true, null: false - t.bigint :repository_egress, null: false, default: 0 - t.bigint :artifacts_egress, null: false, default: 0 - t.bigint :packages_egress, null: false, default: 0 - t.bigint :registry_egress, null: false, default: 0 - t.date :date, null: false - t.datetime_with_timezone :created_at, null: false - - t.index [:project_id, :namespace_id, :date], unique: true, - name: 'index_project_data_transfers_on_project_and_namespace_and_date' - end - end - - add_check_constraint :project_data_transfers, - "(date = date_trunc('month', date))", 'project_data_transfers_project_year_month_constraint' - end - - def down - with_lock_retries do - drop_table :project_data_transfers - end - end -end diff --git a/db/migrate/20230119150727_add_search_curation_settings_to_application_settings.rb b/db/migrate/20230119150727_add_search_curation_settings_to_application_settings.rb deleted file mode 100644 index f2ae4f49b9ddb..0000000000000 --- a/db/migrate/20230119150727_add_search_curation_settings_to_application_settings.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddSearchCurationSettingsToApplicationSettings < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - add_column :application_settings, :search_max_shard_size_gb, :integer, default: 50, null: false - add_column :application_settings, :search_max_docs_denominator, :integer, default: 5_000_000, null: false - add_column :application_settings, :search_min_docs_before_rollover, :integer, default: 100_000, null: false - end - - def down - remove_column :application_settings, :search_max_shard_size_gb - remove_column :application_settings, :search_max_docs_denominator - remove_column :application_settings, :search_min_docs_before_rollover - end -end diff --git a/db/migrate/20230119151636_add_url_hash_to_web_hook_logs.rb b/db/migrate/20230119151636_add_url_hash_to_web_hook_logs.rb deleted file mode 100644 index e330ecfdae80b..0000000000000 --- a/db/migrate/20230119151636_add_url_hash_to_web_hook_logs.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true - -class AddUrlHashToWebHookLogs < Gitlab::Database::Migration[2.1] - def change - # limit is added in 20230119151940_add_text_limit_to_web_hook_logs_url_hash.rb - add_column :web_hook_logs, :url_hash, :text # rubocop:disable Migration/AddLimitToTextColumns - end -end diff --git a/db/migrate/20230119151940_add_text_limit_to_web_hook_logs_url_hash.rb b/db/migrate/20230119151940_add_text_limit_to_web_hook_logs_url_hash.rb deleted file mode 100644 index 28e719b0a0f28..0000000000000 --- a/db/migrate/20230119151940_add_text_limit_to_web_hook_logs_url_hash.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitToWebHookLogsUrlHash < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - add_text_limit :web_hook_logs, :url_hash, 44, validate: false - end - - def down - remove_text_limit :web_hook_logs, :url_hash - end -end diff --git a/db/migrate/20230119214643_add_deactivation_email_additional_text_to_application_settings.rb b/db/migrate/20230119214643_add_deactivation_email_additional_text_to_application_settings.rb deleted file mode 100644 index e2b3e12c0ef94..0000000000000 --- a/db/migrate/20230119214643_add_deactivation_email_additional_text_to_application_settings.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -class AddDeactivationEmailAdditionalTextToApplicationSettings < Gitlab::Database::Migration[2.1] - enable_lock_retries! - - # rubocop:disable Migration/AddLimitToTextColumns - # limit is added in 20230123150648_add_deactivation_email_additional_text_to_application_settings_text_limits.rb - def change - add_column :application_settings, :deactivation_email_additional_text, :text - end - # rubocop:enable Migration/AddLimitToTextColumns -end diff --git a/db/migrate/20230119215436_add_package_metadata_checkpoints.rb b/db/migrate/20230119215436_add_package_metadata_checkpoints.rb deleted file mode 100644 index a8349a107b1e7..0000000000000 --- a/db/migrate/20230119215436_add_package_metadata_checkpoints.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddPackageMetadataCheckpoints < Gitlab::Database::Migration[2.1] - def up - create_table :pm_checkpoints, id: false do |t| - t.integer :sequence, null: false - t.timestamps_with_timezone - t.integer :purl_type, null: false, primary_key: true - t.integer :chunk, null: false, limit: 2 - end - - change_column(:pm_checkpoints, :purl_type, :integer, limit: 2) - drop_sequence(:pm_checkpoints, :purl_type, 'pm_checkpoints_purl_type_seq') - end - - def down - drop_table :pm_checkpoints - end -end diff --git a/db/migrate/20230120170042_re_add_web_hook_calls_column.rb b/db/migrate/20230120170042_re_add_web_hook_calls_column.rb deleted file mode 100644 index 1096c073f3710..0000000000000 --- a/db/migrate/20230120170042_re_add_web_hook_calls_column.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class ReAddWebHookCallsColumn < Gitlab::Database::Migration[2.1] - enable_lock_retries! - - def change - add_column :plan_limits, :web_hook_calls, :integer, default: 0, null: false, if_not_exists: true - end -end diff --git a/db/migrate/20230120170631_drop_sync_triggers_from_web_hook_calls_plan_limits.rb b/db/migrate/20230120170631_drop_sync_triggers_from_web_hook_calls_plan_limits.rb deleted file mode 100644 index 74c642437b922..0000000000000 --- a/db/migrate/20230120170631_drop_sync_triggers_from_web_hook_calls_plan_limits.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class DropSyncTriggersFromWebHookCallsPlanLimits < Gitlab::Database::Migration[2.1] - enable_lock_retries! - - def up - drop_trigger('trigger_c0776354152a', 'plan_limits') - drop_trigger('trigger_d0c336b01d00', 'plan_limits') - drop_trigger('trigger_e19c4cf656dc', 'plan_limits') - end - - def down - # noop - end -end diff --git a/db/migrate/20230120171818_sync_plan_limits_web_hook_calls_columns.rb b/db/migrate/20230120171818_sync_plan_limits_web_hook_calls_columns.rb deleted file mode 100644 index 28c29f8731a93..0000000000000 --- a/db/migrate/20230120171818_sync_plan_limits_web_hook_calls_columns.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class SyncPlanLimitsWebHookCallsColumns < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - execute('UPDATE plan_limits SET web_hook_calls=web_hook_calls_high') - end - - def down - # noop - end -end diff --git a/db/migrate/20230123095022_create_scan_result_policies.rb b/db/migrate/20230123095022_create_scan_result_policies.rb deleted file mode 100644 index 6f9eb7d051164..0000000000000 --- a/db/migrate/20230123095022_create_scan_result_policies.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class CreateScanResultPolicies < Gitlab::Database::Migration[2.1] - INDEX_NAME = "index_scan_result_policies_on_policy_configuration_id" - - def change - create_table :scan_result_policies do |t| - t.references :security_orchestration_policy_configuration, - null: false, - foreign_key: { on_delete: :cascade }, - index: { name: INDEX_NAME } - - t.timestamps_with_timezone null: false - t.integer :orchestration_policy_idx, limit: 2, null: false - t.text :license_states, array: true, default: [] - end - end -end diff --git a/db/migrate/20230123120004_add_datetime_fields_to_bulk_import_trackers.rb b/db/migrate/20230123120004_add_datetime_fields_to_bulk_import_trackers.rb deleted file mode 100644 index a35fd382b34e0..0000000000000 --- a/db/migrate/20230123120004_add_datetime_fields_to_bulk_import_trackers.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddDatetimeFieldsToBulkImportTrackers < Gitlab::Database::Migration[2.1] - def up - add_column :bulk_import_trackers, :created_at, :datetime_with_timezone, null: true - add_column :bulk_import_trackers, :updated_at, :datetime_with_timezone, null: true - end - - def down - remove_column :bulk_import_trackers, :created_at - remove_column :bulk_import_trackers, :updated_at - end -end diff --git a/db/migrate/20230123150648_add_deactivation_email_additional_text_to_application_settings_text_limits.rb b/db/migrate/20230123150648_add_deactivation_email_additional_text_to_application_settings_text_limits.rb deleted file mode 100644 index ae3d3a516e3f1..0000000000000 --- a/db/migrate/20230123150648_add_deactivation_email_additional_text_to_application_settings_text_limits.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddDeactivationEmailAdditionalTextToApplicationSettingsTextLimits < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - add_text_limit :application_settings, :deactivation_email_additional_text, 1000 - end - - def down - remove_text_limit :application_settings, :deactivation_email_additional_text - end -end diff --git a/db/migrate/20230124122143_add_deploy_key_id_to_create_access_levels.rb b/db/migrate/20230124122143_add_deploy_key_id_to_create_access_levels.rb deleted file mode 100644 index d26cf2a1e5f04..0000000000000 --- a/db/migrate/20230124122143_add_deploy_key_id_to_create_access_levels.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class AddDeployKeyIdToCreateAccessLevels < Gitlab::Database::Migration[2.1] - def up - add_column :protected_tag_create_access_levels, :deploy_key_id, :integer - end - - def down - remove_column :protected_tag_create_access_levels, :deploy_key_id - end -end diff --git a/db/migrate/20230124173255_raise_group_and_project_ci_variable_limits.rb b/db/migrate/20230124173255_raise_group_and_project_ci_variable_limits.rb deleted file mode 100644 index 7a5f05c977ca0..0000000000000 --- a/db/migrate/20230124173255_raise_group_and_project_ci_variable_limits.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class RaiseGroupAndProjectCiVariableLimits < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - create_or_update_plan_limit('project_ci_variables', 'default', 8000) - create_or_update_plan_limit('group_ci_variables', 'default', 30000) - end - - def down - create_or_update_plan_limit('project_ci_variables', 'default', 200) - create_or_update_plan_limit('group_ci_variables', 'default', 200) - end -end diff --git a/db/migrate/20230124183643_add_checksums_column_to_project_mirror_data.rb b/db/migrate/20230124183643_add_checksums_column_to_project_mirror_data.rb deleted file mode 100644 index a4c13b4308f66..0000000000000 --- a/db/migrate/20230124183643_add_checksums_column_to_project_mirror_data.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddChecksumsColumnToProjectMirrorData < Gitlab::Database::Migration[2.1] - enable_lock_retries! - - def change - add_column :project_mirror_data, :checksums, :jsonb, null: false, default: {} - end -end diff --git a/db/migrate/20230124193917_add_index_for_protected_tag_create_access_levels.rb b/db/migrate/20230124193917_add_index_for_protected_tag_create_access_levels.rb deleted file mode 100644 index 7068f4f0447c9..0000000000000 --- a/db/migrate/20230124193917_add_index_for_protected_tag_create_access_levels.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexForProtectedTagCreateAccessLevels < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - DEPLOY_KEY_INDEX_NAME = 'index_protected_tag_create_access_levels_on_deploy_key_id' - - def up - add_concurrent_foreign_key :protected_tag_create_access_levels, :keys, column: :deploy_key_id, on_delete: :cascade - add_concurrent_index :protected_tag_create_access_levels, :deploy_key_id, - name: DEPLOY_KEY_INDEX_NAME - end - - def down - remove_foreign_key_if_exists :protected_tag_create_access_levels, column: :deploy_key_id - remove_concurrent_index_by_name :protected_tag_create_access_levels, name: DEPLOY_KEY_INDEX_NAME - end -end diff --git a/db/migrate/20230125090315_add_prepared_at_to_merge_request.rb b/db/migrate/20230125090315_add_prepared_at_to_merge_request.rb deleted file mode 100644 index 4e4b4ccf6711d..0000000000000 --- a/db/migrate/20230125090315_add_prepared_at_to_merge_request.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddPreparedAtToMergeRequest < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - with_lock_retries do - add_column :merge_requests, 'prepared_at', :datetime_with_timezone - end - end - - def down - with_lock_retries do - remove_column :merge_requests, 'prepared_at' - end - end -end diff --git a/db/migrate/20230126023444_add_timestamps_to_package_metadata_tables.rb b/db/migrate/20230126023444_add_timestamps_to_package_metadata_tables.rb deleted file mode 100644 index ccf239ac273f1..0000000000000 --- a/db/migrate/20230126023444_add_timestamps_to_package_metadata_tables.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddTimestampsToPackageMetadataTables < Gitlab::Database::Migration[2.1] - def up - add_timestamps_with_timezone(:pm_packages, null: false, default: -> { 'NOW()' }) - add_timestamps_with_timezone(:pm_package_versions, null: false, default: -> { 'NOW()' }) - add_timestamps_with_timezone(:pm_licenses, null: false, default: -> { 'NOW()' }) - add_timestamps_with_timezone(:pm_package_version_licenses, null: false, default: -> { 'NOW()' }) - end - - def down - remove_timestamps(:pm_packages) - remove_timestamps(:pm_package_versions) - remove_timestamps(:pm_licenses) - remove_timestamps(:pm_package_version_licenses) - end -end diff --git a/db/migrate/20230126110439_change_default_value_for_inbound_job_token_scope_enabled.rb b/db/migrate/20230126110439_change_default_value_for_inbound_job_token_scope_enabled.rb deleted file mode 100644 index 9b9de65d4232f..0000000000000 --- a/db/migrate/20230126110439_change_default_value_for_inbound_job_token_scope_enabled.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class ChangeDefaultValueForInboundJobTokenScopeEnabled < Gitlab::Database::Migration[2.1] - def up - change_column_default :project_ci_cd_settings, :inbound_job_token_scope_enabled, from: false, to: true - end - - def down - change_column_default :project_ci_cd_settings, :inbound_job_token_scope_enabled, from: true, to: false - end -end diff --git a/db/migrate/20230126151622_add_ci_triggers_encrypted_token.rb b/db/migrate/20230126151622_add_ci_triggers_encrypted_token.rb deleted file mode 100644 index 8f394d24d6adc..0000000000000 --- a/db/migrate/20230126151622_add_ci_triggers_encrypted_token.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddCiTriggersEncryptedToken < Gitlab::Database::Migration[2.1] - def up - add_column :ci_triggers, :encrypted_token, :binary - add_column :ci_triggers, :encrypted_token_iv, :binary - end - - def down - remove_column :ci_triggers, :encrypted_token - remove_column :ci_triggers, :encrypted_token_iv - end -end diff --git a/db/migrate/20230126210436_add_jira_connect_public_key_storage_enabled_setting.rb b/db/migrate/20230126210436_add_jira_connect_public_key_storage_enabled_setting.rb deleted file mode 100644 index 1d8ac03f9dfbf..0000000000000 --- a/db/migrate/20230126210436_add_jira_connect_public_key_storage_enabled_setting.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddJiraConnectPublicKeyStorageEnabledSetting < Gitlab::Database::Migration[2.1] - def change - add_column :application_settings, :jira_connect_public_key_storage_enabled, :boolean, default: false, null: false - end -end diff --git a/db/migrate/20230127093353_initialize_conversion_of_merge_request_metrics_to_bigint.rb b/db/migrate/20230127093353_initialize_conversion_of_merge_request_metrics_to_bigint.rb deleted file mode 100644 index dfca67a2e2f08..0000000000000 --- a/db/migrate/20230127093353_initialize_conversion_of_merge_request_metrics_to_bigint.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class InitializeConversionOfMergeRequestMetricsToBigint < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - TABLE = :merge_request_metrics - COLUMNS = %i[id] - - def up - initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end - - def down - revert_initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end -end diff --git a/db/migrate/20230127121107_add_git_rate_limit_users_alertlist_to_application_settings.rb b/db/migrate/20230127121107_add_git_rate_limit_users_alertlist_to_application_settings.rb deleted file mode 100644 index b429bea160085..0000000000000 --- a/db/migrate/20230127121107_add_git_rate_limit_users_alertlist_to_application_settings.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class AddGitRateLimitUsersAlertlistToApplicationSettings < Gitlab::Database::Migration[2.1] - def change - add_column :application_settings, :git_rate_limit_users_alertlist, - :integer, - array: true, - default: [], - null: false - end -end diff --git a/db/migrate/20230127121443_add_unique_project_download_limit_alertlist_to_namespace_settings.rb b/db/migrate/20230127121443_add_unique_project_download_limit_alertlist_to_namespace_settings.rb deleted file mode 100644 index 4679d668843af..0000000000000 --- a/db/migrate/20230127121443_add_unique_project_download_limit_alertlist_to_namespace_settings.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddUniqueProjectDownloadLimitAlertlistToNamespaceSettings < Gitlab::Database::Migration[2.1] - enable_lock_retries! - - def change - add_column :namespace_settings, :unique_project_download_limit_alertlist, - :integer, - array: true, - default: [], - null: false - end -end diff --git a/db/migrate/20230127151529_add_project_pointer_for_analytics_dashboard.rb b/db/migrate/20230127151529_add_project_pointer_for_analytics_dashboard.rb deleted file mode 100644 index bbfb0c905968e..0000000000000 --- a/db/migrate/20230127151529_add_project_pointer_for_analytics_dashboard.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class AddProjectPointerForAnalyticsDashboard < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - change_column_null :analytics_dashboards_pointers, :project_id, true - change_column_null :analytics_dashboards_pointers, :namespace_id, true - - unless column_exists?(:analytics_dashboards_pointers, :target_project_id) - add_column :analytics_dashboards_pointers, :target_project_id, :bigint - end - - add_concurrent_foreign_key :analytics_dashboards_pointers, :projects, - column: :target_project_id, - on_delete: :cascade - - add_concurrent_index :analytics_dashboards_pointers, :target_project_id - end - - def down - change_column_null :analytics_dashboards_pointers, :project_id, false - change_column_null :analytics_dashboards_pointers, :namespace_id, false - - return unless column_exists?(:analytics_dashboards_pointers, :target_project_id) - - remove_column :analytics_dashboards_pointers, :target_project_id - end -end diff --git a/db/migrate/20230127151530_migrate_project_pointer_for_analytics_dashboard.rb b/db/migrate/20230127151530_migrate_project_pointer_for_analytics_dashboard.rb deleted file mode 100644 index 233474d091808..0000000000000 --- a/db/migrate/20230127151530_migrate_project_pointer_for_analytics_dashboard.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class MigrateProjectPointerForAnalyticsDashboard < Gitlab::Database::Migration[2.1] - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - execute 'UPDATE analytics_dashboards_pointers SET target_project_id = project_id' - execute 'UPDATE analytics_dashboards_pointers SET project_id = NULL' - end - - def down - execute 'UPDATE analytics_dashboards_pointers SET project_id = target_project_id' - execute 'UPDATE analytics_dashboards_pointers SET target_project_id = NULL' - end -end diff --git a/db/migrate/20230127151531_change_dashboard_analytics_project_pointer_project_null.rb b/db/migrate/20230127151531_change_dashboard_analytics_project_pointer_project_null.rb deleted file mode 100644 index d615185fe8a78..0000000000000 --- a/db/migrate/20230127151531_change_dashboard_analytics_project_pointer_project_null.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class ChangeDashboardAnalyticsProjectPointerProjectNull < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - EXISTENCE_CONSTRAINT = 'chk_analytics_dashboards_pointers_project_or_namespace' - NEW_UNIQ_INDEX = 'idx_uniq_analytics_dashboards_pointers_on_project_id' - OLD_INDEX = 'index_analytics_dashboards_pointers_on_project_id' - - def up - add_check_constraint :analytics_dashboards_pointers, - "(project_id IS NULL) <> (namespace_id IS NULL)", - EXISTENCE_CONSTRAINT - - change_column_null :analytics_dashboards_pointers, :target_project_id, false - - add_concurrent_index :analytics_dashboards_pointers, :project_id, name: NEW_UNIQ_INDEX, unique: true - remove_concurrent_index_by_name :analytics_dashboards_pointers, OLD_INDEX - end - - def down - remove_check_constraint :analytics_dashboards_pointers, EXISTENCE_CONSTRAINT - - change_column_null :analytics_dashboards_pointers, :target_project_id, true - - add_concurrent_index :analytics_dashboards_pointers, :project_id, name: OLD_INDEX - remove_concurrent_index_by_name :analytics_dashboards_pointers, NEW_UNIQ_INDEX - end -end diff --git a/db/migrate/20230127155217_add_id_column_to_package_metadata_join_table.rb b/db/migrate/20230127155217_add_id_column_to_package_metadata_join_table.rb deleted file mode 100644 index 4ce3643208ea1..0000000000000 --- a/db/migrate/20230127155217_add_id_column_to_package_metadata_join_table.rb +++ /dev/null @@ -1,76 +0,0 @@ -# frozen_string_literal: true - -class AddIdColumnToPackageMetadataJoinTable < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - COMPOSITE_UNIQUE_INDEX = :i_pm_package_version_licenses_join_ids - - def up - if Gitlab::Database::PostgresPartitionedTable.where(name: 'pm_package_version_licenses').exists? - recreate_unpartitioned_tables - end - - drop_constraint(:pm_package_version_licenses, :pm_package_version_licenses_pkey, cascade: true) - add_column(:pm_package_version_licenses, :id, :primary_key) - add_concurrent_index(:pm_package_version_licenses, [:pm_package_version_id, :pm_license_id], unique: true, - name: COMPOSITE_UNIQUE_INDEX) - end - - def down - return if Gitlab::Database::PostgresPartitionedTable.where(name: 'pm_package_version_licenses').exists? - - remove_column(:pm_package_version_licenses, :id) - add_primary_key_using_index(:pm_package_version_licenses, :pm_package_version_licenses_pkey, COMPOSITE_UNIQUE_INDEX) - remove_concurrent_index_by_name(:pm_package_version_licenses, COMPOSITE_UNIQUE_INDEX) - end - - private - - def recreate_unpartitioned_tables - drop_table(:pm_package_version_licenses, force: :cascade) # rubocop:disable Migration/DropTable - drop_table(:pm_package_versions, force: :cascade) # rubocop:disable Migration/DropTable - drop_table(:pm_packages, force: :cascade) # rubocop:disable Migration/DropTable - - create_table :pm_packages do |t| - t.integer :purl_type, limit: 2, null: false - t.text :name, null: false, limit: 255 - t.timestamps_with_timezone null: false - t.index [:purl_type, :name], name: 'i_pm_packages_purl_type_and_name', unique: true - end - - create_table :pm_package_versions do |t| - t.references :pm_package, - index: false, - null: false, - foreign_key: { - to_table: :pm_packages, - column: :pm_package_id, - name: 'fk_rails_cf94c3e601', - on_delete: :cascade - } - t.text :version, null: false, limit: 255 - t.timestamps_with_timezone null: false - t.index [:pm_package_id, :version], name: 'i_pm_package_versions_on_package_id_and_version', unique: true - t.index :pm_package_id, name: 'index_pm_package_versions_on_pm_package_id' - end - - create_table :pm_package_version_licenses, primary_key: [:pm_package_version_id, :pm_license_id] do |t| - t.references :pm_package_version, - index: false, - null: false, - foreign_key: { - to_table: :pm_package_versions, - column: :pm_package_version_id, - name: 'fk_rails_30ddb7f837', - on_delete: :cascade - } - t.references :pm_license, - index: false, - null: false, - foreign_key: { name: 'fk_rails_7520ea026d', on_delete: :cascade } - t.timestamps_with_timezone null: false - t.index :pm_license_id, name: 'index_pm_package_version_licenses_on_pm_license_id' - t.index :pm_package_version_id, name: 'index_pm_package_version_licenses_on_pm_package_version_id' - end - end -end diff --git a/db/migrate/20230127164007_add_trial_date_index_to_gitlab_subscribtions.rb b/db/migrate/20230127164007_add_trial_date_index_to_gitlab_subscribtions.rb deleted file mode 100644 index 5711763894554..0000000000000 --- a/db/migrate/20230127164007_add_trial_date_index_to_gitlab_subscribtions.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddTrialDateIndexToGitlabSubscribtions < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = 'index_gitlab_subscriptions_on_trial_and_trial_starts_on' - - def up - add_concurrent_index :gitlab_subscriptions, [:trial, :trial_starts_on], name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :gitlab_subscriptions, INDEX_NAME - end -end diff --git a/db/migrate/20230129094140_add_widget_definitions.rb b/db/migrate/20230129094140_add_widget_definitions.rb deleted file mode 100644 index 09816f7386d26..0000000000000 --- a/db/migrate/20230129094140_add_widget_definitions.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class AddWidgetDefinitions < Gitlab::Database::Migration[2.1] - UNIQUE_INDEX_NAME = 'index_work_item_widget_definitions_on_namespace_type_and_name' - UNIQUE_DEFAULT_NAMESPACE_INDEX_NAME = 'index_work_item_widget_definitions_on_default_witype_and_name' - - def up - create_table :work_item_widget_definitions do |t| - t.references :namespace, index: false - t.references :work_item_type, index: true, null: false - t.integer :widget_type, null: false, limit: 2 - t.boolean :disabled, default: false - t.text :name, limit: 255 - - t.index [:namespace_id, :work_item_type_id, :name], unique: true, name: UNIQUE_INDEX_NAME - t.index [:work_item_type_id, :name], where: "namespace_id is NULL", - unique: true, name: UNIQUE_DEFAULT_NAMESPACE_INDEX_NAME - end - end - - def down - drop_table :work_item_widget_definitions - end -end diff --git a/db/migrate/20230129154126_add_widget_def_namespace_fk.rb b/db/migrate/20230129154126_add_widget_def_namespace_fk.rb deleted file mode 100644 index cf3f83fdbfef5..0000000000000 --- a/db/migrate/20230129154126_add_widget_def_namespace_fk.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class AddWidgetDefNamespaceFk < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - add_concurrent_foreign_key :work_item_widget_definitions, :work_item_types, - column: :work_item_type_id, on_delete: :cascade - end - - def down - with_lock_retries do - remove_foreign_key :work_item_widget_definitions, column: :work_item_type_id - end - end -end diff --git a/db/migrate/20230129154202_add_widget_def_work_item_type_fk.rb b/db/migrate/20230129154202_add_widget_def_work_item_type_fk.rb deleted file mode 100644 index 530f2c78198ca..0000000000000 --- a/db/migrate/20230129154202_add_widget_def_work_item_type_fk.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddWidgetDefWorkItemTypeFk < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - add_concurrent_foreign_key :work_item_widget_definitions, :namespaces, column: :namespace_id, on_delete: :cascade - end - - def down - with_lock_retries do - remove_foreign_key :work_item_widget_definitions, column: :namespace_id - end - end -end diff --git a/db/migrate/20230129154819_add_widgets_for_work_item_types.rb b/db/migrate/20230129154819_add_widgets_for_work_item_types.rb deleted file mode 100644 index b936ea2e409bd..0000000000000 --- a/db/migrate/20230129154819_add_widgets_for_work_item_types.rb +++ /dev/null @@ -1,143 +0,0 @@ -# frozen_string_literal: true - -class AddWidgetsForWorkItemTypes < Gitlab::Database::Migration[2.1] - class WorkItemType < MigrationRecord - self.table_name = 'work_item_types' - end - - class WidgetDefinition < MigrationRecord - self.table_name = 'work_item_widget_definitions' - end - - restrict_gitlab_migration gitlab_schema: :gitlab_main - disable_ddl_transaction! - - def up - widget_names = { - assignees: 'Assignees', - labels: 'Labels', - description: 'Description', - hierarchy: 'Hierarchy', - start_and_due_date: 'Start and due date', - milestone: 'Milestone', - notes: 'Notes', - iteration: 'Iteration', - weight: 'Weight', - health_status: 'Health status', - progress: 'Progress', - status: 'Status', - requirement_legacy: 'Requirement legacy', - test_reports: 'Test reports' - } - - widgets_for_type = { - 'Issue' => [ - :assignees, - :labels, - :description, - :hierarchy, - :start_and_due_date, - :milestone, - :notes, - # EE widgets - :iteration, - :weight, - :health_status - ], - 'Incident' => [ - :description, - :hierarchy, - :notes - ], - 'Test Case' => [ - :description, - :notes - ], - 'Requirement' => [ - :description, - :notes, - :status, - :requirement_legacy, - :test_reports - ], - 'Task' => [ - :assignees, - :labels, - :description, - :hierarchy, - :start_and_due_date, - :milestone, - :notes, - :iteration, - :weight - ], - 'Objective' => [ - :assignees, - :labels, - :description, - :hierarchy, - :milestone, - :notes, - :health_status, - :progress - ], - 'Key Result' => [ - :assignees, - :labels, - :description, - :hierarchy, - :start_and_due_date, - :notes, - :health_status, - :progress - ] - } - - widgets_enum = { - assignees: 0, - description: 1, - hierarchy: 2, - labels: 3, - milestone: 4, - notes: 5, - start_and_due_date: 6, - health_status: 7, # EE-only - weight: 8, # EE-only - iteration: 9, # EE-only - progress: 10, # EE-only - status: 11, # EE-only - requirement_legacy: 12, # EE-only - test_reports: 13 - } - - widgets = [] - widgets_for_type.each do |type_name, widget_syms| - type = WorkItemType.find_by_name_and_namespace_id(type_name, nil) - - unless type - Gitlab::AppLogger.warn("type #{type_name} is missing, not adding widgets") - - next - end - - widgets += widget_syms.map do |widget_sym| - { - work_item_type_id: type.id, - name: widget_names[widget_sym], - widget_type: widgets_enum[widget_sym] - } - end - end - - return if widgets.empty? - - WidgetDefinition.upsert_all( - widgets, - unique_by: :index_work_item_widget_definitions_on_default_witype_and_name - ) - end - - def down - WidgetDefinition.delete_all - end -end diff --git a/db/migrate/20230130104819_initialize_conversion_of_ci_build_needs_to_bigint.rb b/db/migrate/20230130104819_initialize_conversion_of_ci_build_needs_to_bigint.rb deleted file mode 100644 index 680ad5703911e..0000000000000 --- a/db/migrate/20230130104819_initialize_conversion_of_ci_build_needs_to_bigint.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class InitializeConversionOfCiBuildNeedsToBigint < Gitlab::Database::Migration[2.1] - TABLE = :ci_build_needs - COLUMNS = %i[id] - - enable_lock_retries! - - def up - initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end - - def down - revert_initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end -end diff --git a/db/migrate/20230130110855_backfill_ci_build_needs_for_big_int_conversion.rb b/db/migrate/20230130110855_backfill_ci_build_needs_for_big_int_conversion.rb deleted file mode 100644 index ae7ad3b52c2ba..0000000000000 --- a/db/migrate/20230130110855_backfill_ci_build_needs_for_big_int_conversion.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class BackfillCiBuildNeedsForBigIntConversion < Gitlab::Database::Migration[2.1] - TABLE = :ci_build_needs - COLUMNS = %i[id] - - restrict_gitlab_migration gitlab_schema: :gitlab_ci - - def up - backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end - - def down - revert_backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end -end diff --git a/db/migrate/20230130125541_add_attempts_and_last_error_to_postgres_async_indexes.rb b/db/migrate/20230130125541_add_attempts_and_last_error_to_postgres_async_indexes.rb deleted file mode 100644 index 31d09e5ee8a65..0000000000000 --- a/db/migrate/20230130125541_add_attempts_and_last_error_to_postgres_async_indexes.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class AddAttemptsAndLastErrorToPostgresAsyncIndexes < Gitlab::Database::Migration[2.1] - # rubocop:disable Migration/AddLimitToTextColumns - # limit is added in 20230130130624_add_text_limit_to_postgres_async_indexes_last_error.rb - def change - add_column :postgres_async_indexes, :attempts, :integer, null: false, default: 0 - add_column :postgres_async_indexes, :last_error, :text - end - # rubocop:enable Migration/AddLimitToTextColumns -end diff --git a/db/migrate/20230130130624_add_text_limit_to_postgres_async_indexes_last_error.rb b/db/migrate/20230130130624_add_text_limit_to_postgres_async_indexes_last_error.rb deleted file mode 100644 index 1cd51453fd21f..0000000000000 --- a/db/migrate/20230130130624_add_text_limit_to_postgres_async_indexes_last_error.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitToPostgresAsyncIndexesLastError < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - add_text_limit :postgres_async_indexes, :last_error, 10_000 - end - - def down - remove_text_limit :postgres_async_indexes, :last_error - end -end diff --git a/db/migrate/20230130175512_initialize_conversion_of_sent_notifications_to_bigint.rb b/db/migrate/20230130175512_initialize_conversion_of_sent_notifications_to_bigint.rb deleted file mode 100644 index 4e588ab21974f..0000000000000 --- a/db/migrate/20230130175512_initialize_conversion_of_sent_notifications_to_bigint.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class InitializeConversionOfSentNotificationsToBigint < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - TABLE = :sent_notifications - COLUMNS = %i[id] - - def up - initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end - - def down - revert_initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end -end diff --git a/db/migrate/20230130204743_remove_protected_environment_default_access_level.rb b/db/migrate/20230130204743_remove_protected_environment_default_access_level.rb deleted file mode 100644 index d01fd6b90f392..0000000000000 --- a/db/migrate/20230130204743_remove_protected_environment_default_access_level.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class RemoveProtectedEnvironmentDefaultAccessLevel < Gitlab::Database::Migration[2.1] - def change - change_column_default :protected_environment_deploy_access_levels, :access_level, from: 40, to: nil - end -end diff --git a/db/migrate/20230131004948_initialize_conversion_of_notes_id_to_bigint.rb b/db/migrate/20230131004948_initialize_conversion_of_notes_id_to_bigint.rb deleted file mode 100644 index a376ba50e87e1..0000000000000 --- a/db/migrate/20230131004948_initialize_conversion_of_notes_id_to_bigint.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class InitializeConversionOfNotesIdToBigint < Gitlab::Database::Migration[2.1] - TABLE = :notes - COLUMNS = %i[id] - - enable_lock_retries! - - def up - initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end - - def down - revert_initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end -end diff --git a/db/migrate/20230131090842_add_global_group_approvers_enabled_to_application_settings.rb b/db/migrate/20230131090842_add_global_group_approvers_enabled_to_application_settings.rb deleted file mode 100644 index cb3c747d35147..0000000000000 --- a/db/migrate/20230131090842_add_global_group_approvers_enabled_to_application_settings.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class AddGlobalGroupApproversEnabledToApplicationSettings < Gitlab::Database::Migration[2.1] - def change - add_column :application_settings, - :security_policy_global_group_approvers_enabled, - :boolean, - default: true, - null: false - end -end diff --git a/db/migrate/20230131123923_raise_ci_variables_default_limits.rb b/db/migrate/20230131123923_raise_ci_variables_default_limits.rb deleted file mode 100644 index ebe59c13e18b0..0000000000000 --- a/db/migrate/20230131123923_raise_ci_variables_default_limits.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true - -class RaiseCiVariablesDefaultLimits < Gitlab::Database::Migration[2.1] - def change - change_column_default(:plan_limits, :project_ci_variables, from: 200, to: 8000) - change_column_default(:plan_limits, :group_ci_variables, from: 200, to: 30000) - end -end diff --git a/db/migrate/20230131125844_add_project_id_name_id_version_index_to_installable_npm_packages.rb b/db/migrate/20230131125844_add_project_id_name_id_version_index_to_installable_npm_packages.rb deleted file mode 100644 index 88ff29769b17f..0000000000000 --- a/db/migrate/20230131125844_add_project_id_name_id_version_index_to_installable_npm_packages.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddProjectIdNameIdVersionIndexToInstallableNpmPackages < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = 'idx_packages_on_project_id_name_id_version_when_installable_npm' - PACKAGE_TYPE_NPM = 2 - - def up - add_concurrent_index( - :packages_packages, - [:project_id, :name, :id, :version], - name: INDEX_NAME, - where: "package_type = #{PACKAGE_TYPE_NPM} AND status IN (0, 1)" - ) - end - - def down - remove_concurrent_index_by_name(:packages_packages, INDEX_NAME) - end -end diff --git a/db/migrate/20230201012727_initialize_conversion_of_todos_note_id_to_bigint.rb b/db/migrate/20230201012727_initialize_conversion_of_todos_note_id_to_bigint.rb deleted file mode 100644 index 06ddcacba4249..0000000000000 --- a/db/migrate/20230201012727_initialize_conversion_of_todos_note_id_to_bigint.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class InitializeConversionOfTodosNoteIdToBigint < Gitlab::Database::Migration[2.1] - TABLE = :todos - COLUMNS = %i[note_id] - - enable_lock_retries! - - def up - initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end - - def down - revert_initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end -end diff --git a/db/migrate/20230201014223_initialize_conversion_of_system_note_metadata_note_id_to_bigint.rb b/db/migrate/20230201014223_initialize_conversion_of_system_note_metadata_note_id_to_bigint.rb deleted file mode 100644 index ec84f1cb946df..0000000000000 --- a/db/migrate/20230201014223_initialize_conversion_of_system_note_metadata_note_id_to_bigint.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class InitializeConversionOfSystemNoteMetadataNoteIdToBigint < Gitlab::Database::Migration[2.1] - TABLE = :system_note_metadata - COLUMNS = %i[note_id] - - enable_lock_retries! - - def up - initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end - - def down - revert_initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end -end diff --git a/db/migrate/20230202002616_initialize_conversion_of_epic_user_mentions_note_id_to_bigint.rb b/db/migrate/20230202002616_initialize_conversion_of_epic_user_mentions_note_id_to_bigint.rb deleted file mode 100644 index 8e0c4e0b106a7..0000000000000 --- a/db/migrate/20230202002616_initialize_conversion_of_epic_user_mentions_note_id_to_bigint.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class InitializeConversionOfEpicUserMentionsNoteIdToBigint < Gitlab::Database::Migration[2.1] - TABLE = :epic_user_mentions - COLUMNS = %i[note_id] - - enable_lock_retries! - - def up - initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end - - def down - revert_initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end -end diff --git a/db/migrate/20230202023208_initialize_conversion_of_suggestions_note_id_to_bigint.rb b/db/migrate/20230202023208_initialize_conversion_of_suggestions_note_id_to_bigint.rb deleted file mode 100644 index 9b27108980184..0000000000000 --- a/db/migrate/20230202023208_initialize_conversion_of_suggestions_note_id_to_bigint.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class InitializeConversionOfSuggestionsNoteIdToBigint < Gitlab::Database::Migration[2.1] - TABLE = :suggestions - COLUMNS = %i[note_id] - - enable_lock_retries! - - def up - initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end - - def down - revert_initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end -end diff --git a/db/migrate/20230202032248_initialize_conversion_of_issue_user_mentions_note_id_to_bigint.rb b/db/migrate/20230202032248_initialize_conversion_of_issue_user_mentions_note_id_to_bigint.rb deleted file mode 100644 index 3df255b3d6d36..0000000000000 --- a/db/migrate/20230202032248_initialize_conversion_of_issue_user_mentions_note_id_to_bigint.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class InitializeConversionOfIssueUserMentionsNoteIdToBigint < Gitlab::Database::Migration[2.1] - TABLE = :issue_user_mentions - COLUMNS = %i[note_id] - - enable_lock_retries! - - def up - initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end - - def down - revert_initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end -end diff --git a/db/migrate/20230202153926_add_scan_result_policy_id_to_approval_rules.rb b/db/migrate/20230202153926_add_scan_result_policy_id_to_approval_rules.rb deleted file mode 100644 index b72405ccf3073..0000000000000 --- a/db/migrate/20230202153926_add_scan_result_policy_id_to_approval_rules.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -class AddScanResultPolicyIdToApprovalRules < Gitlab::Database::Migration[2.1] - enable_lock_retries! - - def change - add_column :approval_project_rules, :scan_result_policy_id, :bigint - add_column :approval_merge_request_rules, :scan_result_policy_id, :bigint - end -end diff --git a/db/migrate/20230203011359_create_automation_rules.rb b/db/migrate/20230203011359_create_automation_rules.rb deleted file mode 100644 index d247799bee81b..0000000000000 --- a/db/migrate/20230203011359_create_automation_rules.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -class CreateAutomationRules < Gitlab::Database::Migration[2.1] - enable_lock_retries! - - def up - create_table :automation_rules do |t| - t.references :namespace, null: false, index: false, foreign_key: { on_delete: :cascade } - t.boolean :issues_events, default: false, null: false - t.boolean :merge_requests_events, default: false, null: false - t.boolean :permanently_disabled, default: false, null: false - t.text :name, null: false, limit: 255 - t.text :rule, null: false, limit: 2048 - t.timestamps_with_timezone null: false - - t.index 'namespace_id, LOWER(name)', - name: 'index_automation_rules_namespace_id_name', - unique: true - - t.index [:namespace_id, :permanently_disabled], - name: 'index_automation_rules_namespace_id_permanently_disabled' - end - end - - def down - drop_table :automation_rules - end -end diff --git a/db/migrate/20230203145514_allow_null_pipeline_id_to_dast_pre_scan_verification.rb b/db/migrate/20230203145514_allow_null_pipeline_id_to_dast_pre_scan_verification.rb deleted file mode 100644 index 11e8a856c11a8..0000000000000 --- a/db/migrate/20230203145514_allow_null_pipeline_id_to_dast_pre_scan_verification.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class AllowNullPipelineIdToDastPreScanVerification < Gitlab::Database::Migration[2.1] - def up - change_column_null :dast_pre_scan_verifications, :ci_pipeline_id, true - end - - def down - # There may now be nulls in the table, so we cannot re-add the constraint here. - end -end diff --git a/db/migrate/20230206143851_create_postgres_async_foreign_key_validations.rb b/db/migrate/20230206143851_create_postgres_async_foreign_key_validations.rb deleted file mode 100644 index b9c32f83411e6..0000000000000 --- a/db/migrate/20230206143851_create_postgres_async_foreign_key_validations.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class CreatePostgresAsyncForeignKeyValidations < Gitlab::Database::Migration[2.1] - def change - create_table :postgres_async_foreign_key_validations, if_not_exists: true do |t| - t.timestamps_with_timezone null: false - - t.text :name, null: false, limit: 63 - t.text :table_name, null: false, limit: 63 - t.text :last_error, limit: 10_000 - - t.integer :attempts, null: false, default: 0 - - t.index :name, unique: true - end - end -end diff --git a/db/migrate/20230206172702_add_match_on_inclusion_to_scan_result_policy.rb b/db/migrate/20230206172702_add_match_on_inclusion_to_scan_result_policy.rb deleted file mode 100644 index bec3dfeca76c1..0000000000000 --- a/db/migrate/20230206172702_add_match_on_inclusion_to_scan_result_policy.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddMatchOnInclusionToScanResultPolicy < Gitlab::Database::Migration[2.1] - enable_lock_retries! - - def change - add_column :scan_result_policies, :match_on_inclusion, :boolean - end -end diff --git a/db/migrate/20230207003737_initialize_conversion_of_note_diff_files_diff_note_id_to_bigint.rb b/db/migrate/20230207003737_initialize_conversion_of_note_diff_files_diff_note_id_to_bigint.rb deleted file mode 100644 index 22c7d252dc353..0000000000000 --- a/db/migrate/20230207003737_initialize_conversion_of_note_diff_files_diff_note_id_to_bigint.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class InitializeConversionOfNoteDiffFilesDiffNoteIdToBigint < Gitlab::Database::Migration[2.1] - TABLE = :note_diff_files - COLUMNS = %i[diff_note_id] - - enable_lock_retries! - - def up - initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end - - def down - revert_initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end -end diff --git a/db/migrate/20230207005549_initialize_conversion_of_snippet_user_mentions_note_id_to_bigint.rb b/db/migrate/20230207005549_initialize_conversion_of_snippet_user_mentions_note_id_to_bigint.rb deleted file mode 100644 index 3f994a0e40fe3..0000000000000 --- a/db/migrate/20230207005549_initialize_conversion_of_snippet_user_mentions_note_id_to_bigint.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class InitializeConversionOfSnippetUserMentionsNoteIdToBigint < Gitlab::Database::Migration[2.1] - TABLE = :snippet_user_mentions - COLUMNS = %i[note_id] - - enable_lock_retries! - - def up - initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end - - def down - revert_initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end -end diff --git a/db/migrate/20230207011344_initialize_conversion_of_design_user_mentions_note_id_to_bigint.rb b/db/migrate/20230207011344_initialize_conversion_of_design_user_mentions_note_id_to_bigint.rb deleted file mode 100644 index 6f192bf402c32..0000000000000 --- a/db/migrate/20230207011344_initialize_conversion_of_design_user_mentions_note_id_to_bigint.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class InitializeConversionOfDesignUserMentionsNoteIdToBigint < Gitlab::Database::Migration[2.1] - TABLE = :design_user_mentions - COLUMNS = %i[note_id] - - enable_lock_retries! - - def up - initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end - - def down - revert_initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end -end diff --git a/db/migrate/20230207012217_initialize_conversion_of_vulnerability_user_mentions_note_id_to_bigint.rb b/db/migrate/20230207012217_initialize_conversion_of_vulnerability_user_mentions_note_id_to_bigint.rb deleted file mode 100644 index feaf705a77057..0000000000000 --- a/db/migrate/20230207012217_initialize_conversion_of_vulnerability_user_mentions_note_id_to_bigint.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class InitializeConversionOfVulnerabilityUserMentionsNoteIdToBigint < Gitlab::Database::Migration[2.1] - TABLE = :vulnerability_user_mentions - COLUMNS = %i[note_id] - - enable_lock_retries! - - def up - initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end - - def down - revert_initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end -end diff --git a/db/migrate/20230207015819_initialize_conversion_of_commit_user_mentions_note_id_to_bigint.rb b/db/migrate/20230207015819_initialize_conversion_of_commit_user_mentions_note_id_to_bigint.rb deleted file mode 100644 index bede8624c2b1c..0000000000000 --- a/db/migrate/20230207015819_initialize_conversion_of_commit_user_mentions_note_id_to_bigint.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class InitializeConversionOfCommitUserMentionsNoteIdToBigint < Gitlab::Database::Migration[2.1] - TABLE = :commit_user_mentions - COLUMNS = %i[note_id] - - enable_lock_retries! - - def up - initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end - - def down - revert_initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end -end diff --git a/db/migrate/20230207025259_initialize_conversion_of_merge_request_user_mentions_note_id_to_bigint.rb b/db/migrate/20230207025259_initialize_conversion_of_merge_request_user_mentions_note_id_to_bigint.rb deleted file mode 100644 index ef8b2a2739383..0000000000000 --- a/db/migrate/20230207025259_initialize_conversion_of_merge_request_user_mentions_note_id_to_bigint.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class InitializeConversionOfMergeRequestUserMentionsNoteIdToBigint < Gitlab::Database::Migration[2.1] - TABLE = :merge_request_user_mentions - COLUMNS = %i[note_id] - - enable_lock_retries! - - def up - initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end - - def down - revert_initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end -end diff --git a/db/migrate/20230207030244_initialize_conversion_of_timelogs_note_id_to_bigint.rb b/db/migrate/20230207030244_initialize_conversion_of_timelogs_note_id_to_bigint.rb deleted file mode 100644 index 85e218f8e64e2..0000000000000 --- a/db/migrate/20230207030244_initialize_conversion_of_timelogs_note_id_to_bigint.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class InitializeConversionOfTimelogsNoteIdToBigint < Gitlab::Database::Migration[2.1] - TABLE = :timelogs - COLUMNS = %i[note_id] - - enable_lock_retries! - - def up - initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end - - def down - revert_initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end -end diff --git a/db/migrate/20230208103640_rename_runner_machine_xid.rb b/db/migrate/20230208103640_rename_runner_machine_xid.rb deleted file mode 100644 index c9c9ffd324f96..0000000000000 --- a/db/migrate/20230208103640_rename_runner_machine_xid.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class RenameRunnerMachineXid < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - rename_column_concurrently :ci_runner_machines, :machine_xid, :system_xid - end - - def down - undo_rename_column_concurrently :ci_runner_machines, :machine_xid, :system_xid - end -end diff --git a/db/migrate/20230210181214_add_allow_deploy_tokens_and_keys_with_external_authn_to_application_settings.rb b/db/migrate/20230210181214_add_allow_deploy_tokens_and_keys_with_external_authn_to_application_settings.rb deleted file mode 100644 index d65fbca197550..0000000000000 --- a/db/migrate/20230210181214_add_allow_deploy_tokens_and_keys_with_external_authn_to_application_settings.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true - -class AddAllowDeployTokensAndKeysWithExternalAuthnToApplicationSettings < Gitlab::Database::Migration[2.1] - def change - add_column(:application_settings, :allow_deploy_tokens_and_keys_with_external_authn, :boolean, - default: false, null: false) - end -end diff --git a/db/migrate/20230214142447_remove_text_limit_from_ci_job_artifacts_original_filename.rb b/db/migrate/20230214142447_remove_text_limit_from_ci_job_artifacts_original_filename.rb deleted file mode 100644 index 68552839a54d5..0000000000000 --- a/db/migrate/20230214142447_remove_text_limit_from_ci_job_artifacts_original_filename.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class RemoveTextLimitFromCiJobArtifactsOriginalFilename < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - # In preparation for 20230214142813_remove_ci_job_artifacts_original_filename.rb - # We first remove the text limit before removing the column. - # This is to properly reverse the 2-step migration to add a text column with limit - # https://docs.gitlab.com/ee/development/database/strings_and_the_text_data_type.html#add-a-text-column-to-an-existing-table - remove_text_limit :ci_job_artifacts, :original_filename - end - - def down - add_text_limit :ci_job_artifacts, :original_filename, 512 - end -end diff --git a/db/migrate/20230214142813_remove_ci_job_artifacts_original_filename.rb b/db/migrate/20230214142813_remove_ci_job_artifacts_original_filename.rb deleted file mode 100644 index fed09fb113d60..0000000000000 --- a/db/migrate/20230214142813_remove_ci_job_artifacts_original_filename.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class RemoveCiJobArtifactsOriginalFilename < Gitlab::Database::Migration[2.1] - enable_lock_retries! - - def up - # This column has never been used and has always been under ignore_column since it was added. - # We're doing the removal of the ignore_column in the same MR with this migration and this - # is why we are not doing this in post migrate. - remove_column :ci_job_artifacts, :original_filename, :text # rubocop:disable Migration/RemoveColumn - end - - def down - add_column :ci_job_artifacts, :original_filename, :text - end -end diff --git a/db/post_migrate/20220826152430_remove_container_repository_deprecated_geo_fields.rb b/db/post_migrate/20220826152430_remove_container_repository_deprecated_geo_fields.rb deleted file mode 100644 index f5cb2be4ebeea..0000000000000 --- a/db/post_migrate/20220826152430_remove_container_repository_deprecated_geo_fields.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -class RemoveContainerRepositoryDeprecatedGeoFields < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - with_lock_retries do - remove_column :geo_event_log, :container_repository_updated_event_id, :bigint - end - end - - def down - with_lock_retries do - unless column_exists?(:geo_event_log, :container_repository_updated_event_id) - add_column(:geo_event_log, :container_repository_updated_event_id, :bigint) - end - end - - add_concurrent_foreign_key :geo_event_log, :geo_container_repository_updated_events, - column: :container_repository_updated_event_id, - name: 'fk_6ada82d42a', - on_delete: :cascade - - add_concurrent_index :geo_event_log, - :container_repository_updated_event_id, - name: 'index_geo_event_log_on_container_repository_updated_event_id' - end -end diff --git a/db/post_migrate/20220826152432_remove_container_repository_updated_events.rb b/db/post_migrate/20220826152432_remove_container_repository_updated_events.rb deleted file mode 100644 index edce7b4e89125..0000000000000 --- a/db/post_migrate/20220826152432_remove_container_repository_updated_events.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class RemoveContainerRepositoryUpdatedEvents < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - drop_table :geo_container_repository_updated_events - end - - def down - create_table :geo_container_repository_updated_events, id: :bigserial do |t| - t.integer :container_repository_id, - null: false, - index: { name: :idx_geo_con_rep_updated_events_on_container_repository_id } - end - - add_concurrent_foreign_key :geo_container_repository_updated_events, :container_repositories, - column: :container_repository_id, - name: 'fk_212c89c706', - on_delete: :cascade - end -end diff --git a/db/post_migrate/20220920180451_schedule_vulnerabilities_feedback_migration.rb b/db/post_migrate/20220920180451_schedule_vulnerabilities_feedback_migration.rb deleted file mode 100644 index e5e16e5d0dcf3..0000000000000 --- a/db/post_migrate/20220920180451_schedule_vulnerabilities_feedback_migration.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class ScheduleVulnerabilitiesFeedbackMigration < Gitlab::Database::Migration[2.0] - MIGRATION = 'MigrateVulnerabilitiesFeedbackToVulnerabilitiesStateTransition' - TABLE_NAME = :vulnerability_feedback - BATCH_COLUMN = :id - DELAY_INTERVAL = 5.minutes - BATCH_SIZE = 250 - MAX_BATCH_SIZE = 250 - SUB_BATCH_SIZE = 50 - - disable_ddl_transaction! - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - # no-op - # Removing this migration due to subtransactions created. See discussion in - # https://gitlab.com/gitlab-org/gitlab/-/issues/386494#note_1217986034 - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20221018095434_schedule_disable_legacy_open_source_license_for_projects_less_than_five_mb.rb b/db/post_migrate/20221018095434_schedule_disable_legacy_open_source_license_for_projects_less_than_five_mb.rb deleted file mode 100644 index 8b3f06682004e..0000000000000 --- a/db/post_migrate/20221018095434_schedule_disable_legacy_open_source_license_for_projects_less_than_five_mb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -class ScheduleDisableLegacyOpenSourceLicenseForProjectsLessThanFiveMb < Gitlab::Database::Migration[2.0] - MIGRATION = 'DisableLegacyOpenSourceLicenseForProjectsLessThanFiveMb' - INTERVAL = 2.minutes - BATCH_SIZE = 4_000 - MAX_BATCH_SIZE = 50_000 - SUB_BATCH_SIZE = 250 - - disable_ddl_transaction! - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - return unless Gitlab.com? - - queue_batched_background_migration( - MIGRATION, - :project_settings, - :project_id, - job_interval: INTERVAL, - batch_size: BATCH_SIZE, - max_batch_size: MAX_BATCH_SIZE, - sub_batch_size: SUB_BATCH_SIZE - ) - end - - def down - return unless Gitlab.com? - - delete_batched_background_migration(MIGRATION, :project_settings, :project_id, []) - end -end diff --git a/db/post_migrate/20221102231130_finalize_backfill_user_details_fields.rb b/db/post_migrate/20221102231130_finalize_backfill_user_details_fields.rb deleted file mode 100644 index a6b5bdd307efd..0000000000000 --- a/db/post_migrate/20221102231130_finalize_backfill_user_details_fields.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class FinalizeBackfillUserDetailsFields < Gitlab::Database::Migration[2.0] - BACKFILL_MIGRATION = 'BackfillUserDetailsFields' - - disable_ddl_transaction! - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - # If the 20230116160904_remove_user_details_fields_from_user.rb migration already ran, - # finalizing this background migration will fail. - return unless column_exists?(:users, :linkedin) - - ensure_batched_background_migration_is_finished( - job_class_name: BACKFILL_MIGRATION, - table_name: :users, - column_name: :id, - job_arguments: [], - finalize: true) - end - - def down; end -end diff --git a/db/post_migrate/20221102231131_remove_temp_index_for_user_details_fields.rb b/db/post_migrate/20221102231131_remove_temp_index_for_user_details_fields.rb deleted file mode 100644 index c31513e00fc5b..0000000000000 --- a/db/post_migrate/20221102231131_remove_temp_index_for_user_details_fields.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class RemoveTempIndexForUserDetailsFields < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'tmp_idx_where_user_details_fields_filled' - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :users, INDEX_NAME - end - - def down - # rubocop:disable Migration/PreventIndexCreation - add_concurrent_index :users, :id, name: INDEX_NAME, where: <<~QUERY - (COALESCE(linkedin, '') IS DISTINCT FROM '') - OR (COALESCE(twitter, '') IS DISTINCT FROM '') - OR (COALESCE(skype, '') IS DISTINCT FROM '') - OR (COALESCE(website_url, '') IS DISTINCT FROM '') - OR (COALESCE(location, '') IS DISTINCT FROM '') - OR (COALESCE(organization, '') IS DISTINCT FROM '') - QUERY - # rubocop:enable Migration/PreventIndexCreation - end -end diff --git a/db/post_migrate/20221104115712_backfill_project_statistics_storage_size_without_uploads_size.rb b/db/post_migrate/20221104115712_backfill_project_statistics_storage_size_without_uploads_size.rb deleted file mode 100644 index 9dd64a3e7b564..0000000000000 --- a/db/post_migrate/20221104115712_backfill_project_statistics_storage_size_without_uploads_size.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -class BackfillProjectStatisticsStorageSizeWithoutUploadsSize < Gitlab::Database::Migration[2.0] - restrict_gitlab_migration gitlab_schema: :gitlab_main - - DELAY_INTERVAL = 2.minutes.to_i - BATCH_SIZE = 500 - MIGRATION_CLASS = 'BackfillProjectStatisticsStorageSizeWithoutUploadsSize' - SUB_BATCH_SIZE = 100 - - disable_ddl_transaction! - - def up - return unless Gitlab.dev_or_test_env? || Gitlab.org_or_com? - - queue_batched_background_migration( - MIGRATION_CLASS, - :project_statistics, - :project_id, - job_interval: DELAY_INTERVAL, - batch_size: BATCH_SIZE, - sub_batch_size: SUB_BATCH_SIZE - ) - end - - def down - return unless Gitlab.dev_or_test_env? || Gitlab.org_or_com? - - delete_batched_background_migration(MIGRATION_CLASS, :project_statistics, :project_id, []) - end -end diff --git a/db/post_migrate/20221104141647_add_index_for_non_public_top_level_groups_to_namespaces.rb b/db/post_migrate/20221104141647_add_index_for_non_public_top_level_groups_to_namespaces.rb deleted file mode 100644 index ade35a397371c..0000000000000 --- a/db/post_migrate/20221104141647_add_index_for_non_public_top_level_groups_to_namespaces.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexForNonPublicTopLevelGroupsToNamespaces < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - TABLE_NAME = 'namespaces' - INDEX_NAME = 'index_namespaces_on_type_and_visibility_and_parent_id' - CONDITIONS = "(type = 'Group' AND parent_id IS NULL AND visibility_level != 20)" - - def up - add_concurrent_index TABLE_NAME, :id, name: INDEX_NAME, where: CONDITIONS - end - - def down - remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME - end -end diff --git a/db/post_migrate/20221109160052_add_default_for_approval_project_rules_scanners.rb b/db/post_migrate/20221109160052_add_default_for_approval_project_rules_scanners.rb deleted file mode 100644 index a527bf4b2ef06..0000000000000 --- a/db/post_migrate/20221109160052_add_default_for_approval_project_rules_scanners.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class AddDefaultForApprovalProjectRulesScanners < Gitlab::Database::Migration[2.0] - def up - change_column_default :approval_project_rules, :scanners, from: nil, to: [] - end - - def down - change_column_default :approval_project_rules, :scanners, from: [], to: nil - end -end diff --git a/db/post_migrate/20221110100600_add_temp_index_on_overlong_vulnerability_html_title.rb b/db/post_migrate/20221110100600_add_temp_index_on_overlong_vulnerability_html_title.rb deleted file mode 100644 index 5ff56874e116a..0000000000000 --- a/db/post_migrate/20221110100600_add_temp_index_on_overlong_vulnerability_html_title.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddTempIndexOnOverlongVulnerabilityHtmlTitle < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'tmp_index_vulnerability_overlong_title_html' - - disable_ddl_transaction! - - def up - # Temporary index to speed up the truncation of vulnerabilities with invalid html title length - add_concurrent_index :vulnerabilities, [:id], - name: INDEX_NAME, - where: "LENGTH(title_html) > 800" - end - - def down - remove_concurrent_index_by_name :vulnerabilities, INDEX_NAME - end -end diff --git a/db/post_migrate/20221110100602_queue_truncate_overlong_vulnerability_html_titles.rb b/db/post_migrate/20221110100602_queue_truncate_overlong_vulnerability_html_titles.rb deleted file mode 100644 index 48301498c5aa8..0000000000000 --- a/db/post_migrate/20221110100602_queue_truncate_overlong_vulnerability_html_titles.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class QueueTruncateOverlongVulnerabilityHtmlTitles < Gitlab::Database::Migration[2.0] - MIGRATION = 'TruncateOverlongVulnerabilityHtmlTitles' - INTERVAL = 2.minutes - BATCH_SIZE = 1_000 - MAX_BATCH_SIZE = 10_000 - SUB_BATCH_SIZE = 200 - - disable_ddl_transaction! - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - queue_batched_background_migration( - MIGRATION, - :vulnerabilities, - :id, - job_interval: INTERVAL, - batch_size: BATCH_SIZE, - max_batch_size: MAX_BATCH_SIZE, - sub_batch_size: SUB_BATCH_SIZE - ) - end - - def down - delete_batched_background_migration(MIGRATION, :vulnerabilities, :id, []) - end -end diff --git a/db/post_migrate/20221110152133_delete_orphans_approval_rules.rb b/db/post_migrate/20221110152133_delete_orphans_approval_rules.rb deleted file mode 100644 index 55b6a10d786dc..0000000000000 --- a/db/post_migrate/20221110152133_delete_orphans_approval_rules.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true - -class DeleteOrphansApprovalRules < Gitlab::Database::Migration[2.0] - restrict_gitlab_migration gitlab_schema: :gitlab_main - - BATCH_SIZE = 1000 - SUB_BATCH_SIZE = 500 - MERGE_REQUEST_MIGRATION = 'DeleteOrphansApprovalMergeRequestRules' - PROJECT_MIGRATION = 'DeleteOrphansApprovalProjectRules' - INTERVAL = 2.minutes - - def up - queue_batched_background_migration( - PROJECT_MIGRATION, - :approval_project_rules, - :id, - job_interval: INTERVAL, - batch_size: BATCH_SIZE, - sub_batch_size: SUB_BATCH_SIZE - ) - - queue_batched_background_migration( - MERGE_REQUEST_MIGRATION, - :approval_merge_request_rules, - :id, - job_interval: INTERVAL, - batch_size: BATCH_SIZE, - sub_batch_size: SUB_BATCH_SIZE - ) - end - - def down - delete_batched_background_migration(PROJECT_MIGRATION, :approval_project_rules, :id, []) - delete_batched_background_migration(MERGE_REQUEST_MIGRATION, :approval_merge_request_rules, :id, []) - end -end diff --git a/db/post_migrate/20221110190340_add_partial_legacy_open_source_license_available_project_id_index.rb b/db/post_migrate/20221110190340_add_partial_legacy_open_source_license_available_project_id_index.rb deleted file mode 100644 index 9931b25eb3cdd..0000000000000 --- a/db/post_migrate/20221110190340_add_partial_legacy_open_source_license_available_project_id_index.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddPartialLegacyOpenSourceLicenseAvailableProjectIdIndex < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_project_settings_on_legacy_os_license_project_id' - - def up - add_concurrent_index :project_settings, - :project_id, - where: "legacy_open_source_license_available = TRUE", - name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name(:project_settings, INDEX_NAME) - end -end diff --git a/db/post_migrate/20221114142044_delete_experiments_foreign_keys.rb b/db/post_migrate/20221114142044_delete_experiments_foreign_keys.rb deleted file mode 100644 index d44b7a6eb5135..0000000000000 --- a/db/post_migrate/20221114142044_delete_experiments_foreign_keys.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -class DeleteExperimentsForeignKeys < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - with_lock_retries do - remove_foreign_key_if_exists :experiment_subjects, :users, name: 'fk_dfc3e211d4' - end - - with_lock_retries do - remove_foreign_key_if_exists :experiment_subjects, :experiments, name: 'fk_rails_ede5754774' - end - - with_lock_retries do - remove_foreign_key_if_exists :experiment_subjects, :projects, name: 'fk_ccc28f8ceb' - end - - with_lock_retries do - remove_foreign_key_if_exists :experiment_subjects, :namespaces, name: 'fk_842649f2f5' - end - end - - def down - add_concurrent_foreign_key :experiment_subjects, - :users, column: :user_id, name: 'fk_dfc3e211d4', on_delete: :cascade - add_concurrent_foreign_key :experiment_subjects, - :experiments, column: :experiment_id, name: 'fk_rails_ede5754774', on_delete: :cascade - add_concurrent_foreign_key :experiment_subjects, - :projects, column: :project_id, name: 'fk_ccc28f8ceb', on_delete: :cascade - add_concurrent_foreign_key :experiment_subjects, - :namespaces, column: :namespace_id, name: 'fk_842649f2f5', on_delete: :cascade - end -end diff --git a/db/post_migrate/20221114142602_drop_experiment_subjects_table.rb b/db/post_migrate/20221114142602_drop_experiment_subjects_table.rb deleted file mode 100644 index f7c10192afb92..0000000000000 --- a/db/post_migrate/20221114142602_drop_experiment_subjects_table.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -class DropExperimentSubjectsTable < Gitlab::Database::Migration[2.0] - def up - drop_table :experiment_subjects, if_exists: true - end - - def down - unless table_exists?(:experiment_subjects) - create_table :experiment_subjects do |t| - t.bigint :experiment_id, null: false - t.bigint :user_id - t.bigint :project_id - t.integer :variant, limit: 2, null: false, default: 0 - t.timestamps_with_timezone null: false - t.datetime_with_timezone :converted_at - t.jsonb :context, null: false, default: {} - t.bigint :namespace_id - - t.index :experiment_id - t.index :namespace_id - t.index :project_id - t.index :user_id - end - end - - # Require exactly one of user_id, group_id, or project_id to be NOT NULL - execute <<-SQL - ALTER TABLE experiment_subjects ADD CONSTRAINT check_f6411bc4b5 CHECK (num_nonnulls(user_id, namespace_id, project_id) = 1); - SQL - end -end diff --git a/db/post_migrate/20221114142616_drop_experiments_table.rb b/db/post_migrate/20221114142616_drop_experiments_table.rb deleted file mode 100644 index a8280eb9f6954..0000000000000 --- a/db/post_migrate/20221114142616_drop_experiments_table.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class DropExperimentsTable < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - drop_table :experiments, if_exists: true - end - - def down - unless table_exists?(:experiments) - create_table :experiments do |t| - t.text :name, null: false - - t.index :name, unique: true - end - end - - add_text_limit :experiments, :name, 255 - end -end diff --git a/db/post_migrate/20221115120602_add_index_for_issues_health_status_ordering.rb b/db/post_migrate/20221115120602_add_index_for_issues_health_status_ordering.rb deleted file mode 100644 index d7d861387fde1..0000000000000 --- a/db/post_migrate/20221115120602_add_index_for_issues_health_status_ordering.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class AddIndexForIssuesHealthStatusOrdering < Gitlab::Database::Migration[2.0] - INDEX_NAME_DESC = 'index_on_issues_health_status_desc_order' - INDEX_NAME_ASC = 'index_on_issues_health_status_asc_order' - - def up - prepare_async_index :issues, - [:project_id, :health_status, :id, :state_id, :issue_type], - order: { health_status: 'DESC NULLS LAST', id: :desc }, - name: INDEX_NAME_DESC - - prepare_async_index :issues, - [:project_id, :health_status, :id, :state_id, :issue_type], - order: { health_status: 'ASC NULLS LAST', id: :desc }, - name: INDEX_NAME_ASC - end - - def down - unprepare_async_index :issues, INDEX_NAME_DESC - unprepare_async_index :issues, INDEX_NAME_ASC - end -end diff --git a/db/post_migrate/20221115173607_ensure_work_item_type_backfill_migration_finished.rb b/db/post_migrate/20221115173607_ensure_work_item_type_backfill_migration_finished.rb deleted file mode 100644 index 2cec1919e8248..0000000000000 --- a/db/post_migrate/20221115173607_ensure_work_item_type_backfill_migration_finished.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -class EnsureWorkItemTypeBackfillMigrationFinished < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - MIGRATION = 'BackfillWorkItemTypeIdForIssues' - - class MigrationWorkItemType < MigrationRecord - self.table_name = 'work_item_types' - - def self.id_by_type(types) - where(namespace_id: nil, base_type: types).pluck(:base_type, :id).to_h - end - end - - def up - # more types were added to the types table after the backfill run - # so we cannot fetch all from the DB but only those that were backfilled - relevant_types = { - issue: 0, - incident: 1, - test_case: 2, - requirement: 3, - task: 4 - } - - MigrationWorkItemType.id_by_type(relevant_types.values).each do |base_type, type_id| - ensure_batched_background_migration_is_finished( - job_class_name: MIGRATION, - table_name: :issues, - column_name: :id, - job_arguments: [base_type, type_id] - ) - end - end - - def down - # noop - end -end diff --git a/db/post_migrate/20221115184525_remove_namespaces_tmp_project_id_column.rb b/db/post_migrate/20221115184525_remove_namespaces_tmp_project_id_column.rb deleted file mode 100644 index d044c44e95e36..0000000000000 --- a/db/post_migrate/20221115184525_remove_namespaces_tmp_project_id_column.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class RemoveNamespacesTmpProjectIdColumn < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'tmp_index_on_tmp_project_id_on_namespaces' - - def up - with_lock_retries do - remove_column :namespaces, :tmp_project_id if column_exists?(:namespaces, :tmp_project_id) - end - end - - def down - unless column_exists?(:namespaces, :tmp_project_id) - with_lock_retries do - # rubocop:disable Migration/AddColumnsToWideTables - add_column :namespaces, :tmp_project_id, :integer - # rubocop:enable Migration/AddColumnsToWideTables - end - end - - add_concurrent_foreign_key :namespaces, :projects, column: :tmp_project_id - - add_concurrent_index :namespaces, :tmp_project_id, name: INDEX_NAME, unique: true - end -end diff --git a/db/post_migrate/20221116105434_remove_index_project_settings_on_legacy_open_source_license_available.rb b/db/post_migrate/20221116105434_remove_index_project_settings_on_legacy_open_source_license_available.rb deleted file mode 100644 index 363c9b6e5725e..0000000000000 --- a/db/post_migrate/20221116105434_remove_index_project_settings_on_legacy_open_source_license_available.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class RemoveIndexProjectSettingsOnLegacyOpenSourceLicenseAvailable < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_project_settings_on_legacy_open_source_license_available' - - def up - remove_concurrent_index_by_name(:project_settings, INDEX_NAME) - end - - def down - add_concurrent_index :project_settings, - %i[legacy_open_source_license_available], - where: "legacy_open_source_license_available = TRUE", - name: INDEX_NAME - end -end diff --git a/db/post_migrate/20221116134611_add_namespaces_emails_enabled_column_data.rb b/db/post_migrate/20221116134611_add_namespaces_emails_enabled_column_data.rb deleted file mode 100644 index e3efc18f3fde2..0000000000000 --- a/db/post_migrate/20221116134611_add_namespaces_emails_enabled_column_data.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -class AddNamespacesEmailsEnabledColumnData < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - restrict_gitlab_migration gitlab_schema: :gitlab_main - - MIGRATION = 'AddNamespacesEmailsEnabledColumnData' - DELAY_INTERVAL = 2.minutes.to_i - BATCH_SIZE = 200 - MAX_BATCH_SIZE = 1000 - SUB_BATCH_SIZE = 20 - - def up - queue_batched_background_migration( - MIGRATION, - :namespaces, - :id, - job_interval: DELAY_INTERVAL, - batch_size: BATCH_SIZE, - max_batch_size: MAX_BATCH_SIZE, - sub_batch_size: SUB_BATCH_SIZE, - gitlab_schema: :gitlab_main - ) - end - - def down - delete_batched_background_migration(MIGRATION, :namespaces, :id, []) - end -end diff --git a/db/post_migrate/20221116134633_add_projects_emails_enabled_column_data.rb b/db/post_migrate/20221116134633_add_projects_emails_enabled_column_data.rb deleted file mode 100644 index 9f0edbd0707e2..0000000000000 --- a/db/post_migrate/20221116134633_add_projects_emails_enabled_column_data.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -class AddProjectsEmailsEnabledColumnData < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - restrict_gitlab_migration gitlab_schema: :gitlab_main - - MIGRATION = 'AddProjectsEmailsEnabledColumnData' - DELAY_INTERVAL = 2.minutes.to_i - BATCH_SIZE = 200 - MAX_BATCH_SIZE = 1000 - SUB_BATCH_SIZE = 20 - - def up - queue_batched_background_migration( - MIGRATION, - :projects, - :id, - job_interval: DELAY_INTERVAL, - batch_size: BATCH_SIZE, - max_batch_size: MAX_BATCH_SIZE, - sub_batch_size: SUB_BATCH_SIZE, - gitlab_schema: :gitlab_main - ) - end - - def down - delete_batched_background_migration(MIGRATION, :projects, :id, []) - end -end diff --git a/db/post_migrate/20221116143854_add_okr_hierarchy_restrictions.rb b/db/post_migrate/20221116143854_add_okr_hierarchy_restrictions.rb deleted file mode 100644 index 658ce0287f840..0000000000000 --- a/db/post_migrate/20221116143854_add_okr_hierarchy_restrictions.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -class AddOkrHierarchyRestrictions < Gitlab::Database::Migration[2.0] - class WorkItemType < MigrationRecord - self.table_name = 'work_item_types' - end - - class HierarchyRestriction < MigrationRecord - self.table_name = 'work_item_hierarchy_restrictions' - end - - restrict_gitlab_migration gitlab_schema: :gitlab_main - disable_ddl_transaction! - - def up - objective = WorkItemType.find_by_name_and_namespace_id('Objective', nil) - key_result = WorkItemType.find_by_name_and_namespace_id('Key Result', nil) - issue = WorkItemType.find_by_name_and_namespace_id('Issue', nil) - task = WorkItemType.find_by_name_and_namespace_id('Task', nil) - incident = WorkItemType.find_by_name_and_namespace_id('Incident', nil) - - # work item default types should be filled, if this is not the case - # then restrictions will be created together with work item types - unless objective && key_result && issue && task && incident - Gitlab::AppLogger.warn('default types are missing, not adding restrictions') - - return - end - - restrictions = [ - { parent_type_id: objective.id, child_type_id: objective.id, maximum_depth: 9 }, - { parent_type_id: objective.id, child_type_id: key_result.id, maximum_depth: 1 }, - { parent_type_id: issue.id, child_type_id: task.id, maximum_depth: 1 }, - { parent_type_id: incident.id, child_type_id: task.id, maximum_depth: 1 } - ] - - HierarchyRestriction.upsert_all( - restrictions, - unique_by: :index_work_item_hierarchy_restrictions_on_parent_and_child - ) - end - - def down - # so far restrictions table was empty so we can delete all records when - # migrating down - HierarchyRestriction.delete_all - end -end diff --git a/db/post_migrate/20221117103015_add_async_index_author_id_created_at_on_merge_requests.rb b/db/post_migrate/20221117103015_add_async_index_author_id_created_at_on_merge_requests.rb deleted file mode 100644 index a45fdcccc2734..0000000000000 --- a/db/post_migrate/20221117103015_add_async_index_author_id_created_at_on_merge_requests.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddAsyncIndexAuthorIdCreatedAtOnMergeRequests < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'index_merge_requests_on_author_id_and_created_at' - - def up - prepare_async_index :merge_requests, %i[author_id created_at], name: INDEX_NAME - end - - def down - unprepare_async_index_by_name :merge_requests, INDEX_NAME - end -end diff --git a/db/post_migrate/20221117135032_remove_clusters_applications_job_instances.rb b/db/post_migrate/20221117135032_remove_clusters_applications_job_instances.rb deleted file mode 100644 index 80cd00e77374b..0000000000000 --- a/db/post_migrate/20221117135032_remove_clusters_applications_job_instances.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -class RemoveClustersApplicationsJobInstances < Gitlab::Database::Migration[2.0] - DEPRECATED_JOB_CLASSES = %w[ - ClusterConfigureIstioWorker - ClusterInstallAppWorker - ClusterPatchAppWorker - ClusterUpdateAppWorker - ClusterUpgradeAppWorker - ClusterWaitForAppInstallationWorker - ClusterWaitForAppUpdateWorker - ClusterWaitForIngressIpAddressWorker - ] - - disable_ddl_transaction! - - def up - sidekiq_remove_jobs(job_klasses: DEPRECATED_JOB_CLASSES) - end - - def down - # no-op Why: This migration removes any instances of deprecated job classes - # from expected queues via the sidekiq_queue_length method. Once the job - # class instances are removed, they cannot be added back. These job classes - # are deprecated and previous MRs have already no-op'd their perform - # methods to further increase confidence that removal is OK. - end -end diff --git a/db/post_migrate/20221117153015_add_index_merge_request_id_created_at_on_scan_finding_approval_merge_request_rules.rb b/db/post_migrate/20221117153015_add_index_merge_request_id_created_at_on_scan_finding_approval_merge_request_rules.rb deleted file mode 100644 index ecd3a8be02e47..0000000000000 --- a/db/post_migrate/20221117153015_add_index_merge_request_id_created_at_on_scan_finding_approval_merge_request_rules.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexMergeRequestIdCreatedAtOnScanFindingApprovalMergeRequestRules < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'scan_finding_approval_mr_rule_index_mr_id_and_created_at' - SCAN_FINDING_REPORT_TYPE = 4 - - disable_ddl_transaction! - - def up - add_concurrent_index :approval_merge_request_rules, %i[merge_request_id created_at], - where: "report_type = #{SCAN_FINDING_REPORT_TYPE}", name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :approval_merge_request_rules, INDEX_NAME - end -end diff --git a/db/post_migrate/20221118103152_finalize_issues_namespace_id_backfilling.rb b/db/post_migrate/20221118103152_finalize_issues_namespace_id_backfilling.rb deleted file mode 100644 index c0a95b3e348ce..0000000000000 --- a/db/post_migrate/20221118103152_finalize_issues_namespace_id_backfilling.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class FinalizeIssuesNamespaceIdBackfilling < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - MIGRATION = 'BackfillProjectNamespaceOnIssues' - - def up - ensure_batched_background_migration_is_finished( - job_class_name: MIGRATION, - table_name: :issues, - column_name: :id, - job_arguments: [] - ) - end - - def down - # noop - end -end diff --git a/db/post_migrate/20221118103352_add_cascade_delete_fk_on_issues_namespace_id.rb b/db/post_migrate/20221118103352_add_cascade_delete_fk_on_issues_namespace_id.rb deleted file mode 100644 index 094ac3abe0fcc..0000000000000 --- a/db/post_migrate/20221118103352_add_cascade_delete_fk_on_issues_namespace_id.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true - -class AddCascadeDeleteFkOnIssuesNamespaceId < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - TARGET_COLUMN = :namespace_id - - def up - # add the new FK before removing the old one - add_concurrent_foreign_key( - :issues, - :namespaces, - column: TARGET_COLUMN, - name: fk_name("#{TARGET_COLUMN}_new"), - on_delete: :cascade - ) - - with_lock_retries do - remove_foreign_key_if_exists(:issues, column: TARGET_COLUMN, name: fk_name(TARGET_COLUMN)) - end - end - - def down - add_concurrent_foreign_key( - :issues, - :namespaces, - column: TARGET_COLUMN, - name: fk_name(TARGET_COLUMN), - on_delete: :nullify - ) - - with_lock_retries do - remove_foreign_key_if_exists(:issues, column: TARGET_COLUMN, name: fk_name("#{TARGET_COLUMN}_new")) - end - end - - def fk_name(column_name) - # generate a FK name - concurrent_foreign_key_name(:issues, column_name) - end -end diff --git a/db/post_migrate/20221118103752_add_not_null_contraint_to_issues_namespace_id.rb b/db/post_migrate/20221118103752_add_not_null_contraint_to_issues_namespace_id.rb deleted file mode 100644 index 22a69c2bac081..0000000000000 --- a/db/post_migrate/20221118103752_add_not_null_contraint_to_issues_namespace_id.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddNotNullContraintToIssuesNamespaceId < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - add_not_null_constraint :issues, :namespace_id, validate: false - end - - def down - remove_not_null_constraint :issues, :namespace_id - end -end diff --git a/db/post_migrate/20221118104752_validate_not_null_contraint_to_issues_namespace_id.rb b/db/post_migrate/20221118104752_validate_not_null_contraint_to_issues_namespace_id.rb deleted file mode 100644 index f7aad9d3606c0..0000000000000 --- a/db/post_migrate/20221118104752_validate_not_null_contraint_to_issues_namespace_id.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class ValidateNotNullContraintToIssuesNamespaceId < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - validate_not_null_constraint :issues, :namespace_id - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20221121000127_index_security_scans_on_created_at_and_id_for_non_purged_records.rb b/db/post_migrate/20221121000127_index_security_scans_on_created_at_and_id_for_non_purged_records.rb deleted file mode 100644 index 0085005166f2e..0000000000000 --- a/db/post_migrate/20221121000127_index_security_scans_on_created_at_and_id_for_non_purged_records.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class IndexSecurityScansOnCreatedAtAndIdForNonPurgedRecords < Gitlab::Database::Migration[2.0] - INDEX_NAME = :index_security_scans_for_non_purged_records - PURGED_STATE = 6 - - disable_ddl_transaction! - - def up - add_concurrent_index :security_scans, %w[created_at id], where: "status != #{PURGED_STATE}", name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :security_scans, INDEX_NAME - end -end diff --git a/db/post_migrate/20221121000451_drop_index_security_scans_on_id_for_non_purged_records.rb b/db/post_migrate/20221121000451_drop_index_security_scans_on_id_for_non_purged_records.rb deleted file mode 100644 index 06e614101e0f3..0000000000000 --- a/db/post_migrate/20221121000451_drop_index_security_scans_on_id_for_non_purged_records.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class DropIndexSecurityScansOnIdForNonPurgedRecords < Gitlab::Database::Migration[2.0] - INDEX_NAME = :index_security_scans_on_id_for_non_purged_records - PURGED_STATE = 6 - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :security_scans, INDEX_NAME - end - - def down - add_concurrent_index :security_scans, :id, where: "status != #{PURGED_STATE}", name: INDEX_NAME - end -end diff --git a/db/post_migrate/20221121152048_remove_unused_feedback_migration_index.rb b/db/post_migrate/20221121152048_remove_unused_feedback_migration_index.rb deleted file mode 100644 index b5dbafccd3a20..0000000000000 --- a/db/post_migrate/20221121152048_remove_unused_feedback_migration_index.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class RemoveUnusedFeedbackMigrationIndex < Gitlab::Database::Migration[2.0] - INDEX_NAME = "tmp_idx_for_vulnerability_feedback_migration" - WHERE_CLAUSE = "migrated_to_state_transition = false AND feedback_type = 0" - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name( - :vulnerability_feedback, - INDEX_NAME - ) - end - - def down - add_concurrent_index( - :vulnerability_feedback, - %i[migrated_to_state_transition feedback_type], - where: WHERE_CLAUSE, - name: INDEX_NAME - ) - end -end diff --git a/db/post_migrate/20221121152515_add_supporting_index_for_vulnerabilities_feedback_migration2.rb b/db/post_migrate/20221121152515_add_supporting_index_for_vulnerabilities_feedback_migration2.rb deleted file mode 100644 index 8c55f2da957ca..0000000000000 --- a/db/post_migrate/20221121152515_add_supporting_index_for_vulnerabilities_feedback_migration2.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class AddSupportingIndexForVulnerabilitiesFeedbackMigration2 < Gitlab::Database::Migration[2.0] - INDEX_NAME = "tmp_idx_for_vulnerability_feedback_migration" - WHERE_CLAUSE = "migrated_to_state_transition = false AND feedback_type = 0" - - disable_ddl_transaction! - - def up - add_concurrent_index( - :vulnerability_feedback, - :id, - where: WHERE_CLAUSE, - name: INDEX_NAME - ) - end - - def down - remove_concurrent_index_by_name( - :vulnerability_feedback, - INDEX_NAME - ) - end -end diff --git a/db/post_migrate/20221121155850_change_vulnerabilities_state_transitions_comment_limit.rb b/db/post_migrate/20221121155850_change_vulnerabilities_state_transitions_comment_limit.rb deleted file mode 100644 index b75216ee413df..0000000000000 --- a/db/post_migrate/20221121155850_change_vulnerabilities_state_transitions_comment_limit.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class ChangeVulnerabilitiesStateTransitionsCommentLimit < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - add_text_limit( - :vulnerability_state_transitions, - :comment, - 50_000, - constraint_name: check_constraint_name(:vulnerability_state_transitions, :comment, 'max_length_50000') - ) - remove_text_limit( - :vulnerability_state_transitions, - :comment, - constraint_name: 'check_fca4a7ca39' - ) - end - - def down - # no-op: this can fail if records with length > 255 (previous limit) show up - end -end diff --git a/db/post_migrate/20221121180138_drop_index_on_vulnerabilities_state_case_id.rb b/db/post_migrate/20221121180138_drop_index_on_vulnerabilities_state_case_id.rb deleted file mode 100644 index 87f1e5d3ba2d0..0000000000000 --- a/db/post_migrate/20221121180138_drop_index_on_vulnerabilities_state_case_id.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class DropIndexOnVulnerabilitiesStateCaseId < Gitlab::Database::Migration[2.0] - INDEX_NAME = "index_vulnerabilities_on_state_case_id" - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name( - :vulnerabilities, - INDEX_NAME - ) - end - - def down - execute <<~SQL - CREATE INDEX CONCURRENTLY index_vulnerabilities_on_state_case_id ON vulnerabilities - USING btree (array_position(ARRAY[(1)::smallint, (4)::smallint, (3)::smallint, (2)::smallint], state), id DESC); - SQL - end -end diff --git a/db/post_migrate/20221121181627_drop_index_on_vulnerabilities_state_case_id_desc.rb b/db/post_migrate/20221121181627_drop_index_on_vulnerabilities_state_case_id_desc.rb deleted file mode 100644 index 712343bc7b0c8..0000000000000 --- a/db/post_migrate/20221121181627_drop_index_on_vulnerabilities_state_case_id_desc.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class DropIndexOnVulnerabilitiesStateCaseIdDesc < Gitlab::Database::Migration[2.0] - INDEX_NAME = "index_vulnerabilities_on_state_case_id_desc" - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name( - :vulnerabilities, - INDEX_NAME - ) - end - - def down - execute <<~SQL - CREATE INDEX CONCURRENTLY index_vulnerabilities_on_state_case_id_desc ON vulnerabilities - USING btree (array_position(ARRAY[(1)::smallint, (4)::smallint, (3)::smallint, (2)::smallint], state) DESC, id DESC); - SQL - end -end diff --git a/db/post_migrate/20221121184931_validate_not_null_contraint_on_issues_work_item_type_id.rb b/db/post_migrate/20221121184931_validate_not_null_contraint_on_issues_work_item_type_id.rb deleted file mode 100644 index be09f2ebe3a1f..0000000000000 --- a/db/post_migrate/20221121184931_validate_not_null_contraint_on_issues_work_item_type_id.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class ValidateNotNullContraintOnIssuesWorkItemTypeId < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - add_not_null_constraint :issues, :work_item_type_id, validate: true - end - - def down - remove_not_null_constraint :issues, :work_item_type_id - end -end diff --git a/db/post_migrate/20221122063922_remove_issue_title_trigram_index.rb b/db/post_migrate/20221122063922_remove_issue_title_trigram_index.rb deleted file mode 100644 index 80a2020a3646f..0000000000000 --- a/db/post_migrate/20221122063922_remove_issue_title_trigram_index.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class RemoveIssueTitleTrigramIndex < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_issues_on_title_trigram' - - def up - remove_concurrent_index_by_name :issues, name: INDEX_NAME - end - - def down - disable_statement_timeout do - execute <<-SQL - CREATE INDEX CONCURRENTLY IF NOT EXISTS #{INDEX_NAME} ON issues - USING gin (title gin_trgm_ops) WITH (fastupdate='false') - SQL - end - end -end diff --git a/db/post_migrate/20221122064537_remove_issue_description_trigram_index.rb b/db/post_migrate/20221122064537_remove_issue_description_trigram_index.rb deleted file mode 100644 index c6d4f62de3e72..0000000000000 --- a/db/post_migrate/20221122064537_remove_issue_description_trigram_index.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class RemoveIssueDescriptionTrigramIndex < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_issues_on_description_trigram' - - def up - remove_concurrent_index_by_name :issues, name: INDEX_NAME - end - - def down - disable_statement_timeout do - execute <<-SQL - CREATE INDEX CONCURRENTLY IF NOT EXISTS #{INDEX_NAME} ON issues - USING gin (description gin_trgm_ops) WITH (fastupdate='false') - SQL - end - end -end diff --git a/db/post_migrate/20221122132812_schedule_prune_stale_project_export_jobs.rb b/db/post_migrate/20221122132812_schedule_prune_stale_project_export_jobs.rb deleted file mode 100644 index 871224ea18e0c..0000000000000 --- a/db/post_migrate/20221122132812_schedule_prune_stale_project_export_jobs.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class SchedulePruneStaleProjectExportJobs < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - restrict_gitlab_migration gitlab_schema: :gitlab_main - - MIGRATION = 'PruneStaleProjectExportJobs' - DELAY_INTERVAL = 2.minutes - - def up - queue_batched_background_migration( - MIGRATION, - :project_export_jobs, - :id, - job_interval: DELAY_INTERVAL - ) - end - - def down - delete_batched_background_migration(MIGRATION, :project_export_jobs, :id, []) - end -end diff --git a/db/post_migrate/20221122155149_add_index_for_paths_on_non_projects.rb b/db/post_migrate/20221122155149_add_index_for_paths_on_non_projects.rb deleted file mode 100644 index e9a9084455081..0000000000000 --- a/db/post_migrate/20221122155149_add_index_for_paths_on_non_projects.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class AddIndexForPathsOnNonProjects < Gitlab::Database::Migration[2.0] - TABLE_NAME = 'namespaces' - INDEX_NAME = 'index_namespaces_on_path_for_top_level_non_projects' - COLUMN = "(lower(path::text))" - CONDITIONS = "(parent_id IS NULL AND type::text <> 'Project'::text)" - - def up - prepare_async_index TABLE_NAME, COLUMN, name: INDEX_NAME, where: CONDITIONS - end - - def down - unprepare_async_index TABLE_NAME, COLUMN, name: INDEX_NAME - end -end diff --git a/db/post_migrate/20221123133054_queue_reset_status_on_container_repositories.rb b/db/post_migrate/20221123133054_queue_reset_status_on_container_repositories.rb deleted file mode 100644 index 2d482e0b83c06..0000000000000 --- a/db/post_migrate/20221123133054_queue_reset_status_on_container_repositories.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class QueueResetStatusOnContainerRepositories < Gitlab::Database::Migration[2.0] - MIGRATION = 'ResetStatusOnContainerRepositories' - DELAY_INTERVAL = 2.minutes - BATCH_SIZE = 50 - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - return unless ::Gitlab.config.registry.enabled - - queue_batched_background_migration( - MIGRATION, - :container_repositories, - :id, - job_interval: DELAY_INTERVAL, - sub_batch_size: BATCH_SIZE - ) - end - - def down - delete_batched_background_migration(MIGRATION, :container_repositories, :id, []) - end -end diff --git a/db/post_migrate/20221124153602_add_supporting_index_for_vulnerabilities_feedback_comment_proccessing.rb b/db/post_migrate/20221124153602_add_supporting_index_for_vulnerabilities_feedback_comment_proccessing.rb deleted file mode 100644 index 71f48e22b52b8..0000000000000 --- a/db/post_migrate/20221124153602_add_supporting_index_for_vulnerabilities_feedback_comment_proccessing.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class AddSupportingIndexForVulnerabilitiesFeedbackCommentProccessing < Gitlab::Database::Migration[2.0] - INDEX_NAME = "tmp_idx_for_feedback_comment_processing" - WHERE_CLAUSE = "char_length(comment) > 50000" - - disable_ddl_transaction! - - def up - add_concurrent_index( - :vulnerability_feedback, - :id, - where: WHERE_CLAUSE, - name: INDEX_NAME - ) - end - - def down - remove_concurrent_index_by_name( - :vulnerability_feedback, - INDEX_NAME - ) - end -end diff --git a/db/post_migrate/20221125222221_add_metrics_index_to_authentication_events.rb b/db/post_migrate/20221125222221_add_metrics_index_to_authentication_events.rb deleted file mode 100644 index 2d3181dea67d1..0000000000000 --- a/db/post_migrate/20221125222221_add_metrics_index_to_authentication_events.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddMetricsIndexToAuthenticationEvents < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'index_successful_authentication_events_for_metrics' - disable_ddl_transaction! - - def up - add_concurrent_index :authentication_events, - %i[user_id provider created_at], - where: "result = 1", - name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :authentication_events, INDEX_NAME - end -end diff --git a/db/post_migrate/20221125222341_remove_result_index_from_authentication_events.rb b/db/post_migrate/20221125222341_remove_result_index_from_authentication_events.rb deleted file mode 100644 index 97fb4b320d1dc..0000000000000 --- a/db/post_migrate/20221125222341_remove_result_index_from_authentication_events.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class RemoveResultIndexFromAuthenticationEvents < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_authentication_events_on_provider_user_id_created_at' - - def up - remove_concurrent_index_by_name :authentication_events, INDEX_NAME - end - - def down - add_concurrent_index :authentication_events, - [:provider, :user_id, :created_at], - where: 'result = 1', - name: INDEX_NAME - end -end diff --git a/db/post_migrate/20221128120634_schedule_fixing_security_scan_statuses.rb b/db/post_migrate/20221128120634_schedule_fixing_security_scan_statuses.rb deleted file mode 100644 index 1cf4a33e09fda..0000000000000 --- a/db/post_migrate/20221128120634_schedule_fixing_security_scan_statuses.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -class ScheduleFixingSecurityScanStatuses < Gitlab::Database::Migration[2.0] - MIGRATION = 'FixSecurityScanStatuses' - TABLE_NAME = :security_scans - BATCH_COLUMN = :id - DELAY_INTERVAL = 2.minutes - BATCH_SIZE = 10_000 - MAX_BATCH_SIZE = 50_000 - SUB_BATCH_SIZE = 100 - - disable_ddl_transaction! - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - class SecurityScan < MigrationRecord - def self.start_migration_from - sort_order = Arel::Nodes::SqlLiteral.new("date(timezone('UTC'::text, created_at)) ASC, id ASC") - - where("date(timezone('UTC'::text, created_at)) > ?", 90.days.ago).order(sort_order).first&.id - end - end - - def up - # Only the SaaS application is affected - return unless Gitlab.dev_or_test_env? || Gitlab.com? - - batch_min_value = SecurityScan.start_migration_from - - return unless batch_min_value # It is possible that some users don't have corrupted records - - queue_batched_background_migration( - MIGRATION, - TABLE_NAME, - BATCH_COLUMN, - job_interval: DELAY_INTERVAL, - batch_size: BATCH_SIZE, - max_batch_size: MAX_BATCH_SIZE, - sub_batch_size: SUB_BATCH_SIZE, - batch_min_value: batch_min_value - ) - end - - def down - delete_batched_background_migration( - MIGRATION, - TABLE_NAME, - BATCH_COLUMN, - [] - ) - end -end diff --git a/db/post_migrate/20221128220043_drop_temp_work_item_type_id_backfill_index.rb b/db/post_migrate/20221128220043_drop_temp_work_item_type_id_backfill_index.rb deleted file mode 100644 index 97fb1202e6eee..0000000000000 --- a/db/post_migrate/20221128220043_drop_temp_work_item_type_id_backfill_index.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class DropTempWorkItemTypeIdBackfillIndex < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'tmp_index_issues_on_issue_type_and_id' - - def up - remove_concurrent_index_by_name :issues, INDEX_NAME - end - - def down - add_concurrent_index :issues, [:issue_type, :id], name: INDEX_NAME - end -end diff --git a/db/post_migrate/20221128222417_add_back_issues_work_item_type_id_index.rb b/db/post_migrate/20221128222417_add_back_issues_work_item_type_id_index.rb deleted file mode 100644 index 3ee6f0a6179cc..0000000000000 --- a/db/post_migrate/20221128222417_add_back_issues_work_item_type_id_index.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddBackIssuesWorkItemTypeIdIndex < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_issues_on_work_item_type_id' - - def up - prepare_async_index :issues, :work_item_type_id, name: INDEX_NAME - end - - def down - unprepare_async_index :issues, :work_item_type_id, name: INDEX_NAME - end -end diff --git a/db/post_migrate/20221129124240_remove_flowdock_integration_records.rb b/db/post_migrate/20221129124240_remove_flowdock_integration_records.rb deleted file mode 100644 index 6390ed0d53b45..0000000000000 --- a/db/post_migrate/20221129124240_remove_flowdock_integration_records.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class RemoveFlowdockIntegrationRecords < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - class Integration < MigrationRecord - include EachBatch - - self.table_name = 'integrations' - end - - def up - Integration.each_batch(of: 1000, column: :id) do |relation| - relation.delete_by(type_new: 'Integrations::Flowdock') - end - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20221130192239_fix_approval_project_rules_without_protected_branches.rb b/db/post_migrate/20221130192239_fix_approval_project_rules_without_protected_branches.rb deleted file mode 100644 index 9cfe958ff6090..0000000000000 --- a/db/post_migrate/20221130192239_fix_approval_project_rules_without_protected_branches.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class FixApprovalProjectRulesWithoutProtectedBranches < Gitlab::Database::Migration[2.0] - restrict_gitlab_migration gitlab_schema: :gitlab_main - - BATCH_SIZE = 1000 - SUB_BATCH_SIZE = 500 - MIGRATION = 'FixApprovalProjectRulesWithoutProtectedBranches' - INTERVAL = 2.minutes - - def up - return unless Gitlab.ee? - - queue_batched_background_migration( - MIGRATION, - :approval_project_rules, - :id, - job_interval: INTERVAL, - batch_size: BATCH_SIZE, - sub_batch_size: SUB_BATCH_SIZE - ) - end - - def down - delete_batched_background_migration(MIGRATION, :approval_project_rules, :id, []) - end -end diff --git a/db/post_migrate/20221202031332_add_index_to_issue_assignees_on_user_id_and_issue_id.rb b/db/post_migrate/20221202031332_add_index_to_issue_assignees_on_user_id_and_issue_id.rb deleted file mode 100644 index 5c00800821833..0000000000000 --- a/db/post_migrate/20221202031332_add_index_to_issue_assignees_on_user_id_and_issue_id.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToIssueAssigneesOnUserIdAndIssueId < Gitlab::Database::Migration[2.1] - INDEX_NAME = "index_issue_assignees_on_user_id_and_issue_id" - - disable_ddl_transaction! - - def up - add_concurrent_index :issue_assignees, [:user_id, :issue_id], name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :issue_assignees, INDEX_NAME - end -end diff --git a/db/post_migrate/20221202031417_remove_index_to_issue_assignees_on_user_id.rb b/db/post_migrate/20221202031417_remove_index_to_issue_assignees_on_user_id.rb deleted file mode 100644 index abdda680098ac..0000000000000 --- a/db/post_migrate/20221202031417_remove_index_to_issue_assignees_on_user_id.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class RemoveIndexToIssueAssigneesOnUserId < Gitlab::Database::Migration[2.1] - INDEX_NAME = "index_issue_assignees_on_user_id" - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :issue_assignees, INDEX_NAME - end - - def down - add_concurrent_index :issue_assignees, [:user_id], name: INDEX_NAME - end -end diff --git a/db/post_migrate/20221202154128_add_pipeline_metadata_name_index.rb b/db/post_migrate/20221202154128_add_pipeline_metadata_name_index.rb deleted file mode 100644 index 3d1d7fa7e5aed..0000000000000 --- a/db/post_migrate/20221202154128_add_pipeline_metadata_name_index.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddPipelineMetadataNameIndex < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_pipeline_metadata_on_pipeline_id_name_lower_text_pattern' - - def up - add_concurrent_index :ci_pipeline_metadata, 'pipeline_id, lower(name) text_pattern_ops', name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :ci_pipeline_metadata, INDEX_NAME - end -end diff --git a/db/post_migrate/20221202154151_remove_pipeline_metadata_pipeline_id_index.rb b/db/post_migrate/20221202154151_remove_pipeline_metadata_pipeline_id_index.rb deleted file mode 100644 index 1c551f49fa66b..0000000000000 --- a/db/post_migrate/20221202154151_remove_pipeline_metadata_pipeline_id_index.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class RemovePipelineMetadataPipelineIdIndex < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_ci_pipeline_metadata_on_pipeline_id_name' - - def up - remove_concurrent_index_by_name :ci_pipeline_metadata, INDEX_NAME - end - - def down - add_concurrent_index :ci_pipeline_metadata, [:pipeline_id, :name], name: INDEX_NAME - end -end diff --git a/db/post_migrate/20221205134448_set_index_for_issues_health_status_ordering.rb b/db/post_migrate/20221205134448_set_index_for_issues_health_status_ordering.rb deleted file mode 100644 index 38426c3ba156b..0000000000000 --- a/db/post_migrate/20221205134448_set_index_for_issues_health_status_ordering.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class SetIndexForIssuesHealthStatusOrdering < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME_DESC = 'index_on_issues_health_status_desc_order' - INDEX_NAME_ASC = 'index_on_issues_health_status_asc_order' - - def up - add_concurrent_index :issues, - [:project_id, :health_status, :id, :state_id, :issue_type], - order: { health_status: 'DESC NULLS LAST', id: :desc }, - name: INDEX_NAME_DESC - - add_concurrent_index :issues, - [:project_id, :health_status, :id, :state_id, :issue_type], - order: { health_status: 'ASC NULLS LAST', id: :desc }, - name: INDEX_NAME_ASC - end - - def down - remove_concurrent_index_by_name :issues, INDEX_NAME_DESC - remove_concurrent_index_by_name :issues, INDEX_NAME_ASC - end -end diff --git a/db/post_migrate/20221205151917_schedule_backfill_environment_tier.rb b/db/post_migrate/20221205151917_schedule_backfill_environment_tier.rb deleted file mode 100644 index eb62e50ea65d9..0000000000000 --- a/db/post_migrate/20221205151917_schedule_backfill_environment_tier.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class ScheduleBackfillEnvironmentTier < Gitlab::Database::Migration[2.0] - MIGRATION = 'BackfillEnvironmentTiers' - DELAY_INTERVAL = 2.minutes - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - queue_batched_background_migration( - MIGRATION, - :environments, - :id, - job_interval: DELAY_INTERVAL - ) - end - - def down - delete_batched_background_migration(MIGRATION, :environments, :id, []) - end -end diff --git a/db/post_migrate/20221205170310_add_index_for_active_members.rb b/db/post_migrate/20221205170310_add_index_for_active_members.rb deleted file mode 100644 index c52b8ccfd0476..0000000000000 --- a/db/post_migrate/20221205170310_add_index_for_active_members.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexForActiveMembers < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'index_members_on_source_state_type_access_level_and_user_id' - - disable_ddl_transaction! - - def up - where_clause = 'requested_at is null and invite_token is null' - - add_concurrent_index :members, [:source_id, :source_type, :state, :type, :access_level, :user_id], - name: INDEX_NAME, where: where_clause - end - - def down - remove_concurrent_index_by_name :members, INDEX_NAME - end -end diff --git a/db/post_migrate/20221206012013_add_index_author_id_created_at_on_merge_requests.rb b/db/post_migrate/20221206012013_add_index_author_id_created_at_on_merge_requests.rb deleted file mode 100644 index 886d8aed71a51..0000000000000 --- a/db/post_migrate/20221206012013_add_index_author_id_created_at_on_merge_requests.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddIndexAuthorIdCreatedAtOnMergeRequests < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'index_merge_requests_on_author_id_and_created_at' - - disable_ddl_transaction! - - def up - add_concurrent_index :merge_requests, %i[author_id created_at], name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :merge_requests, INDEX_NAME - end -end diff --git a/db/post_migrate/20221206075631_add_unique_id_partition_id_index_to_ci_build.rb b/db/post_migrate/20221206075631_add_unique_id_partition_id_index_to_ci_build.rb deleted file mode 100644 index c3e7a5799d04b..0000000000000 --- a/db/post_migrate/20221206075631_add_unique_id_partition_id_index_to_ci_build.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddUniqueIdPartitionIdIndexToCiBuild < Gitlab::Database::Migration[2.1] - TABLE_NAME = :ci_builds - INDEX_NAME = :index_ci_builds_on_id_partition_id_unique - COLUMNS = %i[id partition_id].freeze - - def up - prepare_async_index(TABLE_NAME, COLUMNS, unique: true, name: INDEX_NAME) - end - - def down - unprepare_async_index(TABLE_NAME, COLUMNS, name: INDEX_NAME) - end -end diff --git a/db/post_migrate/20221206132610_add_unique_token_encrypted_partition_id_index_to_ci_build.rb b/db/post_migrate/20221206132610_add_unique_token_encrypted_partition_id_index_to_ci_build.rb deleted file mode 100644 index c330ece1a60cf..0000000000000 --- a/db/post_migrate/20221206132610_add_unique_token_encrypted_partition_id_index_to_ci_build.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddUniqueTokenEncryptedPartitionIdIndexToCiBuild < Gitlab::Database::Migration[2.1] - TABLE_NAME = :ci_builds - INDEX_NAME = :index_ci_builds_on_token_encrypted_partition_id_unique - COLUMNS = %i[token_encrypted partition_id].freeze - - def up - prepare_async_index( - TABLE_NAME, - COLUMNS, - where: 'token_encrypted IS NOT NULL', - unique: true, - name: INDEX_NAME - ) - end - - def down - unprepare_async_index(TABLE_NAME, COLUMNS, name: INDEX_NAME) - end -end diff --git a/db/post_migrate/20221206173132_add_issues_work_item_type_id_index.rb b/db/post_migrate/20221206173132_add_issues_work_item_type_id_index.rb deleted file mode 100644 index b50da0e46440d..0000000000000 --- a/db/post_migrate/20221206173132_add_issues_work_item_type_id_index.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddIssuesWorkItemTypeIdIndex < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = 'index_issues_on_work_item_type_id' - - def up - add_concurrent_index :issues, :work_item_type_id, name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :issues, INDEX_NAME - end -end diff --git a/db/post_migrate/20221209235939_add_tmp_index_oauth_access_tokens_on_id_where_expires_in_null.rb b/db/post_migrate/20221209235939_add_tmp_index_oauth_access_tokens_on_id_where_expires_in_null.rb deleted file mode 100644 index 0f313f420f05f..0000000000000 --- a/db/post_migrate/20221209235939_add_tmp_index_oauth_access_tokens_on_id_where_expires_in_null.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class AddTmpIndexOauthAccessTokensOnIdWhereExpiresInNull < Gitlab::Database::Migration[2.1] - TMP_INDEX = 'tmp_index_oauth_access_tokens_on_id_where_expires_in_null' - - disable_ddl_transaction! - - def up - # Temporary index to be removed in %15.9 or later https://gitlab.com/gitlab-org/gitlab/-/issues/385343 - add_concurrent_index :oauth_access_tokens, :id, where: "expires_in IS NULL", name: TMP_INDEX - end - - def down - remove_concurrent_index_by_name :oauth_access_tokens, TMP_INDEX - end -end diff --git a/db/post_migrate/20221209235940_cleanup_o_auth_access_tokens_with_null_expires_in.rb b/db/post_migrate/20221209235940_cleanup_o_auth_access_tokens_with_null_expires_in.rb deleted file mode 100644 index 8daf5bf4d93f9..0000000000000 --- a/db/post_migrate/20221209235940_cleanup_o_auth_access_tokens_with_null_expires_in.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class CleanupOAuthAccessTokensWithNullExpiresIn < Gitlab::Database::Migration[2.1] - MIGRATION = 'ReExpireOAuthTokens' - INTERVAL = 2.minutes - MAX_BATCH_SIZE = 50_000 - - disable_ddl_transaction! - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - queue_batched_background_migration( - MIGRATION, - :oauth_access_tokens, - :id, - job_interval: INTERVAL, - max_batch_size: MAX_BATCH_SIZE - ) - end - - def down - delete_batched_background_migration(MIGRATION, :oauth_access_tokens, :id, []) - end -end diff --git a/db/post_migrate/20221210154044_update_active_billable_users_index.rb b/db/post_migrate/20221210154044_update_active_billable_users_index.rb deleted file mode 100644 index 9d306eff16bce..0000000000000 --- a/db/post_migrate/20221210154044_update_active_billable_users_index.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -class UpdateActiveBillableUsersIndex < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - OLD_INDEX_NAME = 'active_billable_users' - NEW_INDEX_NAME = 'index_users_for_active_billable' - TABLE_NAME = 'users' - COLUMNS = %i[id] - OLD_INDEX_FILTER_CONDITION = <<~QUERY - ((state)::text = 'active'::text) AND ((user_type IS NULL) - OR (user_type = ANY (ARRAY[NULL::integer, 6, 4]))) AND ((user_type IS NULL) - OR (user_type <> ALL ('{2,6,1,3,7,8}'::smallint[]))) - QUERY - NEW_INDEX_FILTER_CONDITION = <<~QUERY - ((state)::text = 'active'::text) AND ((user_type IS NULL) - OR (user_type = ANY (ARRAY[NULL::integer, 6, 4]))) AND ((user_type IS NULL) - OR (user_type <> ALL ('{1,2,3,4,5,6,7,8,9,11}'::smallint[]))) - QUERY - - def up - add_concurrent_index(TABLE_NAME, COLUMNS, where: NEW_INDEX_FILTER_CONDITION, name: NEW_INDEX_NAME) - remove_concurrent_index_by_name(TABLE_NAME, OLD_INDEX_NAME) - end - - def down - add_concurrent_index(TABLE_NAME, COLUMNS, where: OLD_INDEX_FILTER_CONDITION, name: OLD_INDEX_NAME) - remove_concurrent_index_by_name(TABLE_NAME, NEW_INDEX_NAME) - end -end diff --git a/db/post_migrate/20221212103743_add_index_id_partition_id_to_ci_build.rb b/db/post_migrate/20221212103743_add_index_id_partition_id_to_ci_build.rb deleted file mode 100644 index aab67272a7783..0000000000000 --- a/db/post_migrate/20221212103743_add_index_id_partition_id_to_ci_build.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexIdPartitionIdToCiBuild < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - TABLE_NAME = :ci_builds - INDEX_NAME = :index_ci_builds_on_id_partition_id_unique - COLUMNS = %i[id partition_id].freeze - - def up - add_concurrent_index(TABLE_NAME, COLUMNS, unique: true, name: INDEX_NAME) - end - - def down - remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME) - end -end diff --git a/db/post_migrate/20221213064717_change_default_partition_id_on_ci_resources.rb b/db/post_migrate/20221213064717_change_default_partition_id_on_ci_resources.rb deleted file mode 100644 index 889659cdc2c51..0000000000000 --- a/db/post_migrate/20221213064717_change_default_partition_id_on_ci_resources.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class ChangeDefaultPartitionIdOnCiResources < Gitlab::Database::Migration[2.1] - enable_lock_retries! - - def change - change_column_default :ci_resources, :partition_id, from: 100, to: nil - end -end diff --git a/db/post_migrate/20221214095129_second_recount_epic_cache_counts.rb b/db/post_migrate/20221214095129_second_recount_epic_cache_counts.rb deleted file mode 100644 index 608e27c344e66..0000000000000 --- a/db/post_migrate/20221214095129_second_recount_epic_cache_counts.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class SecondRecountEpicCacheCounts < Gitlab::Database::Migration[2.0] - MIGRATION = 'SecondRecountEpicCacheCounts' - DELAY_INTERVAL = 2.minutes.to_i - BATCH_SIZE = 200 - MAX_BATCH_SIZE = 1000 - SUB_BATCH_SIZE = 20 - - disable_ddl_transaction! - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - queue_batched_background_migration( - MIGRATION, - :epics, - :id, - job_interval: DELAY_INTERVAL, - batch_size: BATCH_SIZE, - max_batch_size: MAX_BATCH_SIZE, - sub_batch_size: SUB_BATCH_SIZE, - gitlab_schema: :gitlab_main - ) - end - - def down - delete_batched_background_migration(MIGRATION, :epics, :id, []) - end -end diff --git a/db/post_migrate/20221214105307_add_token_encrypted_partition_id_index_to_ci_build.rb b/db/post_migrate/20221214105307_add_token_encrypted_partition_id_index_to_ci_build.rb deleted file mode 100644 index 4c64e9b0e7031..0000000000000 --- a/db/post_migrate/20221214105307_add_token_encrypted_partition_id_index_to_ci_build.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class AddTokenEncryptedPartitionIdIndexToCiBuild < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - TABLE_NAME = :ci_builds - INDEX_NAME = :unique_ci_builds_token_encrypted_and_partition_id - COLUMNS = %i[token_encrypted partition_id].freeze - - def up - prepare_async_index( - TABLE_NAME, - COLUMNS, - where: 'token_encrypted IS NOT NULL', - unique: true, - name: INDEX_NAME - ) - end - - def down - unprepare_async_index(TABLE_NAME, COLUMNS, name: INDEX_NAME) - end -end diff --git a/db/post_migrate/20221215151822_schedule_backfill_releases_author_id.rb b/db/post_migrate/20221215151822_schedule_backfill_releases_author_id.rb deleted file mode 100644 index 4d8343ca2dd67..0000000000000 --- a/db/post_migrate/20221215151822_schedule_backfill_releases_author_id.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -class ScheduleBackfillReleasesAuthorId < Gitlab::Database::Migration[2.1] - MIGRATION = 'BackfillReleasesAuthorId' - JOB_DELAY_INTERVAL = 2.minutes - GHOST_USER_TYPE = 5 - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - class User < MigrationRecord - self.table_name = 'users' - end - - class Release < MigrationRecord - self.table_name = 'releases' - end - - def up - unless release_with_empty_author_exists? - say "There are no releases with empty author_id, so skipping migration #{self.class.name}" - return - end - - create_ghost_user if ghost_user_id.nil? - - queue_batched_background_migration( - MIGRATION, - :releases, - :id, - ghost_user_id, - job_interval: JOB_DELAY_INTERVAL - ) - end - - def down - delete_batched_background_migration(MIGRATION, :releases, :id, [ghost_user_id]) - end - - private - - def ghost_user_id - User.find_by(user_type: GHOST_USER_TYPE)&.id - end - - def create_ghost_user - user = User.new - user.name = 'Ghost User' - user.username = 'ghost' - user.email = 'ghost@example.com' - user.user_type = GHOST_USER_TYPE - user.projects_limit = 100000 - - user.save! - end - - def release_with_empty_author_exists? - Release.exists?(author_id: nil) - end -end diff --git a/db/post_migrate/20221216131710_add_index_to_ci_unit_test_failure.rb b/db/post_migrate/20221216131710_add_index_to_ci_unit_test_failure.rb deleted file mode 100644 index f99d2914aa4a2..0000000000000 --- a/db/post_migrate/20221216131710_add_index_to_ci_unit_test_failure.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToCiUnitTestFailure < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = :index_ci_unit_test_failures_on_partition_id_build_id - TABLE_NAME = :ci_unit_test_failures - COLUMNS = [:partition_id, :build_id] - - def up - add_concurrent_index(TABLE_NAME, COLUMNS, name: INDEX_NAME) - end - - def down - remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME) - end -end diff --git a/db/post_migrate/20221216131935_add_index_to_ci_build_pending_state.rb b/db/post_migrate/20221216131935_add_index_to_ci_build_pending_state.rb deleted file mode 100644 index 4fec5e016a421..0000000000000 --- a/db/post_migrate/20221216131935_add_index_to_ci_build_pending_state.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToCiBuildPendingState < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = :index_ci_build_pending_states_on_partition_id_build_id - TABLE_NAME = :ci_build_pending_states - COLUMNS = [:partition_id, :build_id] - - def up - add_concurrent_index(TABLE_NAME, COLUMNS, name: INDEX_NAME) - end - - def down - remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME) - end -end diff --git a/db/post_migrate/20221216131958_add_index_to_ci_build_trace_chunk.rb b/db/post_migrate/20221216131958_add_index_to_ci_build_trace_chunk.rb deleted file mode 100644 index 5577a18c144a7..0000000000000 --- a/db/post_migrate/20221216131958_add_index_to_ci_build_trace_chunk.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToCiBuildTraceChunk < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = :index_ci_build_trace_chunks_on_partition_id_build_id - TABLE_NAME = :ci_build_trace_chunks - COLUMNS = [:partition_id, :build_id] - - def up - add_concurrent_index(TABLE_NAME, COLUMNS, name: INDEX_NAME) - end - - def down - remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME) - end -end diff --git a/db/post_migrate/20221216144854_add_foreign_key_to_ci_unit_test_failure.rb b/db/post_migrate/20221216144854_add_foreign_key_to_ci_unit_test_failure.rb deleted file mode 100644 index e04647d7c9250..0000000000000 --- a/db/post_migrate/20221216144854_add_foreign_key_to_ci_unit_test_failure.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class AddForeignKeyToCiUnitTestFailure < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - SOURCE_TABLE_NAME = :ci_unit_test_failures - TARGET_TABLE_NAME = :ci_builds - COLUMN = :build_id - TARGET_COLUMN = :id - FK_NAME = :fk_0f09856e1f_p - PARTITION_COLUMN = :partition_id - - def up - add_concurrent_foreign_key( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - column: [PARTITION_COLUMN, COLUMN], - target_column: [PARTITION_COLUMN, TARGET_COLUMN], - validate: false, - reverse_lock_order: true, - name: FK_NAME - ) - end - - def down - with_lock_retries do - remove_foreign_key_if_exists(SOURCE_TABLE_NAME, name: FK_NAME) - end - end -end diff --git a/db/post_migrate/20221216150304_add_foreign_key_to_ci_build_pending_state.rb b/db/post_migrate/20221216150304_add_foreign_key_to_ci_build_pending_state.rb deleted file mode 100644 index ef9ecc3033f45..0000000000000 --- a/db/post_migrate/20221216150304_add_foreign_key_to_ci_build_pending_state.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class AddForeignKeyToCiBuildPendingState < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - SOURCE_TABLE_NAME = :ci_build_pending_states - TARGET_TABLE_NAME = :ci_builds - COLUMN = :build_id - TARGET_COLUMN = :id - FK_NAME = :fk_rails_0bbbfeaf9d_p - PARTITION_COLUMN = :partition_id - - def up - add_concurrent_foreign_key( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - column: [PARTITION_COLUMN, COLUMN], - target_column: [PARTITION_COLUMN, TARGET_COLUMN], - validate: false, - reverse_lock_order: true, - name: FK_NAME - ) - end - - def down - with_lock_retries do - remove_foreign_key_if_exists(SOURCE_TABLE_NAME, name: FK_NAME) - end - end -end diff --git a/db/post_migrate/20221216150321_add_foreign_key_to_ci_build_trace_chunk.rb b/db/post_migrate/20221216150321_add_foreign_key_to_ci_build_trace_chunk.rb deleted file mode 100644 index dd16d3d7787fa..0000000000000 --- a/db/post_migrate/20221216150321_add_foreign_key_to_ci_build_trace_chunk.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class AddForeignKeyToCiBuildTraceChunk < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - SOURCE_TABLE_NAME = :ci_build_trace_chunks - TARGET_TABLE_NAME = :ci_builds - COLUMN = :build_id - TARGET_COLUMN = :id - FK_NAME = :fk_rails_1013b761f2_p - PARTITION_COLUMN = :partition_id - - def up - add_concurrent_foreign_key( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - column: [PARTITION_COLUMN, COLUMN], - target_column: [PARTITION_COLUMN, TARGET_COLUMN], - validate: false, - reverse_lock_order: true, - name: FK_NAME - ) - end - - def down - with_lock_retries do - remove_foreign_key_if_exists(SOURCE_TABLE_NAME, name: FK_NAME) - end - end -end diff --git a/db/post_migrate/20221216150919_validate_foreign_key_on_ci_unit_test_failure_partition_id_build_id.rb b/db/post_migrate/20221216150919_validate_foreign_key_on_ci_unit_test_failure_partition_id_build_id.rb deleted file mode 100644 index a886949aea74b..0000000000000 --- a/db/post_migrate/20221216150919_validate_foreign_key_on_ci_unit_test_failure_partition_id_build_id.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class ValidateForeignKeyOnCiUnitTestFailurePartitionIdBuildId < Gitlab::Database::Migration[2.1] - TABLE_NAME = :ci_unit_test_failures - FK_NAME = :fk_0f09856e1f_p - PARTITION_COLUMN = :partition_id - COLUMN = :build_id - - def up - validate_foreign_key(TABLE_NAME, [PARTITION_COLUMN, COLUMN], name: FK_NAME) - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20221216151459_validate_foreign_key_on_ci_build_pending_state_partition_id_build_id.rb b/db/post_migrate/20221216151459_validate_foreign_key_on_ci_build_pending_state_partition_id_build_id.rb deleted file mode 100644 index 6ea8cb213ab6d..0000000000000 --- a/db/post_migrate/20221216151459_validate_foreign_key_on_ci_build_pending_state_partition_id_build_id.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class ValidateForeignKeyOnCiBuildPendingStatePartitionIdBuildId < Gitlab::Database::Migration[2.1] - TABLE_NAME = :ci_build_pending_states - FK_NAME = :fk_rails_0bbbfeaf9d_p - PARTITION_COLUMN = :partition_id - COLUMN = :build_id - - def up - validate_foreign_key(TABLE_NAME, [PARTITION_COLUMN, COLUMN], name: FK_NAME) - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20221216151649_validate_foreign_key_on_ci_build_trace_chunk_partition_id_build_id.rb b/db/post_migrate/20221216151649_validate_foreign_key_on_ci_build_trace_chunk_partition_id_build_id.rb deleted file mode 100644 index 8afd7de808b96..0000000000000 --- a/db/post_migrate/20221216151649_validate_foreign_key_on_ci_build_trace_chunk_partition_id_build_id.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class ValidateForeignKeyOnCiBuildTraceChunkPartitionIdBuildId < Gitlab::Database::Migration[2.1] - TABLE_NAME = :ci_build_trace_chunks - FK_NAME = :fk_rails_1013b761f2_p - PARTITION_COLUMN = :partition_id - COLUMN = :build_id - - def up - validate_foreign_key(TABLE_NAME, [PARTITION_COLUMN, COLUMN], name: FK_NAME) - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20221216232658_index_members_on_member_namespace_id_compound.rb b/db/post_migrate/20221216232658_index_members_on_member_namespace_id_compound.rb deleted file mode 100644 index 56adad1e4a5d7..0000000000000 --- a/db/post_migrate/20221216232658_index_members_on_member_namespace_id_compound.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class IndexMembersOnMemberNamespaceIdCompound < Gitlab::Database::Migration[2.1] - INDEX_NAME = 'index_members_on_member_namespace_id_compound' - - disable_ddl_transaction! - - def up - prepare_async_index( - :members, - [:member_namespace_id, :type, :requested_at, :id], - name: INDEX_NAME - ) - end - - def down - remove_concurrent_index_by_name :members, INDEX_NAME - end -end diff --git a/db/post_migrate/20221216232659_index_members_on_member_namespace_id_compound_sync.rb b/db/post_migrate/20221216232659_index_members_on_member_namespace_id_compound_sync.rb deleted file mode 100644 index f37a1b694b430..0000000000000 --- a/db/post_migrate/20221216232659_index_members_on_member_namespace_id_compound_sync.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class IndexMembersOnMemberNamespaceIdCompoundSync < Gitlab::Database::Migration[2.1] - INDEX_NAME = 'index_members_on_member_namespace_id_compound' - - disable_ddl_transaction! - - def up - add_concurrent_index( - :members, - [:member_namespace_id, :type, :requested_at, :id], - name: INDEX_NAME - ) - end - - def down - remove_concurrent_index_by_name :members, INDEX_NAME - end -end diff --git a/db/post_migrate/20221220075936_add_query_index_for_ci_pipeline_schedules.rb b/db/post_migrate/20221220075936_add_query_index_for_ci_pipeline_schedules.rb deleted file mode 100644 index 4fc64f66a83ec..0000000000000 --- a/db/post_migrate/20221220075936_add_query_index_for_ci_pipeline_schedules.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddQueryIndexForCiPipelineSchedules < Gitlab::Database::Migration[2.1] - TABLE_NAME = :ci_pipeline_schedules - INDEX_NAME = :index_ci_pipeline_schedules_on_id_and_next_run_at_and_active - COLUMNS = %i[id next_run_at].freeze - INDEX_CONDITION = 'active = TRUE' - - disable_ddl_transaction! - - def up - add_concurrent_index(TABLE_NAME, COLUMNS, name: INDEX_NAME, where: INDEX_CONDITION) - end - - def down - remove_concurrent_index(TABLE_NAME, COLUMNS, name: INDEX_NAME) - end -end diff --git a/db/post_migrate/20221220131020_bump_default_partition_id_value_for_ci_tables.rb b/db/post_migrate/20221220131020_bump_default_partition_id_value_for_ci_tables.rb deleted file mode 100644 index 3d06f02a6d67f..0000000000000 --- a/db/post_migrate/20221220131020_bump_default_partition_id_value_for_ci_tables.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -class BumpDefaultPartitionIdValueForCiTables < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - TABLES = { - ci_build_needs: [:partition_id], - ci_build_pending_states: [:partition_id], - ci_build_report_results: [:partition_id], - ci_build_trace_chunks: [:partition_id], - ci_build_trace_metadata: [:partition_id], - ci_builds: [:partition_id], - ci_builds_runner_session: [:partition_id], - ci_job_artifacts: [:partition_id], - ci_job_variables: [:partition_id], - ci_pending_builds: [:partition_id], - ci_pipeline_variables: [:partition_id], - ci_pipelines: [:partition_id], - ci_running_builds: [:partition_id], - ci_sources_pipelines: [:partition_id, :source_partition_id], - ci_stages: [:partition_id], - ci_unit_test_failures: [:partition_id], - p_ci_builds_metadata: [:partition_id] - } - - def up - change_partitions_default_value(from: 100, to: 101) - end - - def down - change_partitions_default_value(from: 101, to: 100) - end - - private - - def change_partitions_default_value(from:, to:) - return unless Gitlab.com? - - TABLES.each do |table_name, columns| - next if columns.all? { |column_name| default_value_for(table_name, column_name) == to } - - with_lock_retries do - columns.each do |column_name| # rubocop:disable Migration/WithLockRetriesDisallowedMethod - change_column_default(table_name, column_name, from: from, to: to) - end - end - end - end - - def default_value_for(table_name, column_name) - connection - .columns(table_name) - .find { |column| column.name == column_name.to_s } - .default&.to_i - end -end diff --git a/db/post_migrate/20221221110733_remove_temp_index_for_project_statistics_upload_size_migration.rb b/db/post_migrate/20221221110733_remove_temp_index_for_project_statistics_upload_size_migration.rb deleted file mode 100644 index 1df6ad274f9b9..0000000000000 --- a/db/post_migrate/20221221110733_remove_temp_index_for_project_statistics_upload_size_migration.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class RemoveTempIndexForProjectStatisticsUploadSizeMigration < Gitlab::Database::Migration[2.1] - INDEX_NAME = 'tmp_index_project_statistics_uploads_size' - TABLE_NAME = 'project_statistics' - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :project_statistics, INDEX_NAME - end - - def down - add_concurrent_index :project_statistics, [:project_id], - name: INDEX_NAME, - where: "uploads_size <> 0" - end -end diff --git a/db/post_migrate/20221221150123_update_billable_users_index.rb b/db/post_migrate/20221221150123_update_billable_users_index.rb deleted file mode 100644 index d77669f6a697d..0000000000000 --- a/db/post_migrate/20221221150123_update_billable_users_index.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class UpdateBillableUsersIndex < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - NEW_INDEX = 'index_users_for_billable_users' - OLD_INDEX = 'index_users_for_active_billable' - - OLD_INDEX_CONDITION = <<~QUERY - ((state)::text = 'active'::text) AND ((user_type IS NULL) - OR (user_type = ANY (ARRAY[NULL::integer, 6, 4]))) AND ((user_type IS NULL) - OR (user_type <> ALL ('{1,2,3,4,5,6,7,8,9,11}'::smallint[]))) - QUERY - NEW_INDEX_CONDITION = <<~QUERY - state = 'active' AND (user_type IS NULL OR user_type IN (6, 4)) AND (user_type IS NULL OR user_type IN (4, 5)) - QUERY - - def up - # rubocop:disable Migration/PreventIndexCreation - add_concurrent_index(:users, :id, where: NEW_INDEX_CONDITION, name: NEW_INDEX) - # rubocop:enable Migration/PreventIndexCreation - remove_concurrent_index_by_name(:users, OLD_INDEX) - end - - def down - add_concurrent_index(:users, :id, where: OLD_INDEX_CONDITION, name: OLD_INDEX) - remove_concurrent_index_by_name(:users, NEW_INDEX) - end -end diff --git a/db/post_migrate/20221222092958_sync_new_amount_used_with_amount_used.rb b/db/post_migrate/20221222092958_sync_new_amount_used_with_amount_used.rb deleted file mode 100644 index 9d8e2ee54d67e..0000000000000 --- a/db/post_migrate/20221222092958_sync_new_amount_used_with_amount_used.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class SyncNewAmountUsedWithAmountUsed < Gitlab::Database::Migration[2.1] - restrict_gitlab_migration gitlab_schema: :gitlab_ci - - def up - # This migration will only run on rollback, there is no need for the positive case - end - - def down - project_usages = define_batchable_model('ci_project_monthly_usages') - - project_usages.each_batch(of: 500) do |batch| - batch.where('amount_used > 0').update_all('new_amount_used = amount_used') - end - end -end diff --git a/db/post_migrate/20221223123019_delete_queued_jobs_for_vulnerabilities_feedback_migration.rb b/db/post_migrate/20221223123019_delete_queued_jobs_for_vulnerabilities_feedback_migration.rb deleted file mode 100644 index e5822d2d7a25f..0000000000000 --- a/db/post_migrate/20221223123019_delete_queued_jobs_for_vulnerabilities_feedback_migration.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class DeleteQueuedJobsForVulnerabilitiesFeedbackMigration < Gitlab::Database::Migration[2.1] - MIGRATION = 'MigrateVulnerabilitiesFeedbackToVulnerabilitiesStateTransition' - TABLE_NAME = :vulnerability_feedback - BATCH_COLUMN = :id - - disable_ddl_transaction! - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - delete_batched_background_migration( - MIGRATION, - TABLE_NAME, - BATCH_COLUMN, - [] - ) - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20221226153240_remove_chat_names_integration_id_foreign_key.rb b/db/post_migrate/20221226153240_remove_chat_names_integration_id_foreign_key.rb deleted file mode 100644 index 51baa9c9f5721..0000000000000 --- a/db/post_migrate/20221226153240_remove_chat_names_integration_id_foreign_key.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class RemoveChatNamesIntegrationIdForeignKey < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - SOURCE_TABLE_NAME = :chat_names - TARGET_TABLE_NAME = :integrations - COLUMN = :integration_id - TARGET_COLUMN = :id - FK_NAME = :fk_99a1348daf - - def up - with_lock_retries do - remove_foreign_key_if_exists(SOURCE_TABLE_NAME, name: FK_NAME) - end - end - - def down - add_concurrent_foreign_key( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - column: COLUMN, - name: FK_NAME, - on_delete: :cascade - ) - end -end diff --git a/db/post_migrate/20221226154458_drop_index_on_chat_names_on_integration_id_and_team_id_and_chat_id.rb b/db/post_migrate/20221226154458_drop_index_on_chat_names_on_integration_id_and_team_id_and_chat_id.rb deleted file mode 100644 index d5aeb704983bc..0000000000000 --- a/db/post_migrate/20221226154458_drop_index_on_chat_names_on_integration_id_and_team_id_and_chat_id.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class DropIndexOnChatNamesOnIntegrationIdAndTeamIdAndChatId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = 'index_chat_names_on_integration_id_and_team_id_and_chat_id' - - def up - remove_concurrent_index_by_name(:chat_names, INDEX_NAME) - end - - def down - add_concurrent_index(:chat_names, [:integration_id, :team_id, :chat_id], name: INDEX_NAME, unique: true) - end -end diff --git a/db/post_migrate/20221227100751_add_user_index_to_chat_names.rb b/db/post_migrate/20221227100751_add_user_index_to_chat_names.rb deleted file mode 100644 index 7be671b2cbd89..0000000000000 --- a/db/post_migrate/20221227100751_add_user_index_to_chat_names.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddUserIndexToChatNames < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = 'index_chat_names_on_user_id' - - def up - add_concurrent_index(:chat_names, :user_id, name: INDEX_NAME) - end - - def down - remove_concurrent_index_by_name(:chat_names, name: INDEX_NAME) - end -end diff --git a/db/post_migrate/20221227101436_drop_index_on_chat_names_on_user_id_and_integration_id.rb b/db/post_migrate/20221227101436_drop_index_on_chat_names_on_user_id_and_integration_id.rb deleted file mode 100644 index ab2842ea77505..0000000000000 --- a/db/post_migrate/20221227101436_drop_index_on_chat_names_on_user_id_and_integration_id.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class DropIndexOnChatNamesOnUserIdAndIntegrationId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = 'index_chat_names_on_user_id_and_integration_id' - - def up - remove_concurrent_index_by_name(:chat_names, INDEX_NAME) - end - - def down - add_concurrent_index(:chat_names, [:user_id, :integration_id], name: INDEX_NAME, unique: true) - end -end diff --git a/db/post_migrate/20221228103133_queue_backfill_admin_mode_scope_for_personal_access_tokens.rb b/db/post_migrate/20221228103133_queue_backfill_admin_mode_scope_for_personal_access_tokens.rb deleted file mode 100644 index 577d55f4df6d1..0000000000000 --- a/db/post_migrate/20221228103133_queue_backfill_admin_mode_scope_for_personal_access_tokens.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class QueueBackfillAdminModeScopeForPersonalAccessTokens < Gitlab::Database::Migration[2.1] - restrict_gitlab_migration gitlab_schema: :gitlab_main - - # no-op as the original migration is rescheduled - # in migrations version 20230406093640 - def up; end - - def down; end -end diff --git a/db/post_migrate/20221228163035_cleanup_appearances_short_title_rename.rb b/db/post_migrate/20221228163035_cleanup_appearances_short_title_rename.rb deleted file mode 100644 index 300d53f227a3a..0000000000000 --- a/db/post_migrate/20221228163035_cleanup_appearances_short_title_rename.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class CleanupAppearancesShortTitleRename < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - cleanup_concurrent_column_rename :appearances, :short_title, :pwa_short_name - end - - def down - undo_cleanup_concurrent_column_rename :appearances, :short_title, :pwa_short_name - end -end diff --git a/db/post_migrate/20221228210616_add_index_on_ci_runners_on_runner_type_and_id.rb b/db/post_migrate/20221228210616_add_index_on_ci_runners_on_runner_type_and_id.rb deleted file mode 100644 index 62c40b78945c3..0000000000000 --- a/db/post_migrate/20221228210616_add_index_on_ci_runners_on_runner_type_and_id.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnCiRunnersOnRunnerTypeAndId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - OLD_INDEX_NAME = 'index_ci_runners_on_runner_type' - NEW_INDEX_NAME = 'index_ci_runners_on_runner_type_and_id' - - def up - add_concurrent_index :ci_runners, [:runner_type, :id], name: NEW_INDEX_NAME - remove_concurrent_index_by_name :ci_runners, OLD_INDEX_NAME - end - - def down - add_concurrent_index :ci_runners, :runner_type, name: OLD_INDEX_NAME - remove_concurrent_index_by_name :ci_runners, NEW_INDEX_NAME - end -end diff --git a/db/post_migrate/20230104103748_remove_new_amount_used_column.rb b/db/post_migrate/20230104103748_remove_new_amount_used_column.rb deleted file mode 100644 index b93879c2b5039..0000000000000 --- a/db/post_migrate/20230104103748_remove_new_amount_used_column.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class RemoveNewAmountUsedColumn < Gitlab::Database::Migration[2.1] - TRIGGER_NAME = 'sync_projects_amount_used_columns' - def up - remove_rename_triggers :ci_project_monthly_usages, TRIGGER_NAME - remove_column :ci_project_monthly_usages, :new_amount_used - end - - def down - return if column_exists?(:ci_project_monthly_usages, :new_amount_used) - - # rubocop:disable Migration/AddColumnsToWideTables - add_column :ci_project_monthly_usages, :new_amount_used, :decimal, default: 0.0, - precision: 18, scale: 2, null: false - # rubocop:enable Migration/AddColumnsToWideTables - - install_rename_triggers :ci_project_monthly_usages, :amount_used, :new_amount_used, trigger_name: TRIGGER_NAME - end -end diff --git a/db/post_migrate/20230104150601_prepare_builds_metadata_async_idx.rb b/db/post_migrate/20230104150601_prepare_builds_metadata_async_idx.rb deleted file mode 100644 index 83dfe62ad710a..0000000000000 --- a/db/post_migrate/20230104150601_prepare_builds_metadata_async_idx.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true - -class PrepareBuildsMetadataAsyncIdx < Gitlab::Database::Migration[2.1] - include Gitlab::Database::PartitioningMigrationHelpers - - disable_ddl_transaction! - - INDEX_NAME = 'p_ci_builds_metadata_on_runner_machine_id_idx' - - def up - # Break up the logic from add_concurrent_partitioned_index so that the partition indices can be created async - # A follow-up migration will complete the index creation by creating the index on the metadata table, and - # creating the concurrent foreign key - each_partition(:p_ci_builds_metadata) do |partition, partition_index_name| - prepare_async_index(partition.identifier, :runner_machine_id, - name: partition_index_name, where: 'runner_machine_id IS NOT NULL') - end - end - - def down - each_partition(:p_ci_builds_metadata) do |partition, partition_index_name| - unprepare_async_index_by_name(partition.identifier, partition_index_name) - end - end - - private - - def each_partition(table_name) - partitioned_table = find_partitioned_table(table_name) - partitioned_table.postgres_partitions.order(:name).each do |partition| - partition_index_name = generated_index_name(partition.identifier, INDEX_NAME) - - yield partition, partition_index_name - end - end -end diff --git a/db/post_migrate/20230104220137_reindex_vuln_reads_on_default_branch_with_common_query.rb b/db/post_migrate/20230104220137_reindex_vuln_reads_on_default_branch_with_common_query.rb deleted file mode 100644 index 114a1a84fa065..0000000000000 --- a/db/post_migrate/20230104220137_reindex_vuln_reads_on_default_branch_with_common_query.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -class ReindexVulnReadsOnDefaultBranchWithCommonQuery < Gitlab::Database::Migration[2.1] - INDEX_NAME = 'index_vuln_reads_common_query_on_resolved_on_default_branch' - - COLUMNS = %i[project_id state report_type vulnerability_id] - - disable_ddl_transaction! - - def up - add_concurrent_index( - :vulnerability_reads, - COLUMNS, - name: INDEX_NAME, - where: 'resolved_on_default_branch IS TRUE', - order: { vulnerability_id: :desc } - ) - end - - def down - remove_concurrent_index_by_name( - :vulnerability_reads, - INDEX_NAME - ) - end -end diff --git a/db/post_migrate/20230104222438_add_partition_index_to_builds_metadata.rb b/db/post_migrate/20230104222438_add_partition_index_to_builds_metadata.rb deleted file mode 100644 index 474f6f8540b62..0000000000000 --- a/db/post_migrate/20230104222438_add_partition_index_to_builds_metadata.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddPartitionIndexToBuildsMetadata < Gitlab::Database::Migration[2.1] - include Gitlab::Database::PartitioningMigrationHelpers - - disable_ddl_transaction! - - INDEX_NAME = 'p_ci_builds_metadata_on_runner_machine_id_idx' - - def up - add_concurrent_partitioned_index :p_ci_builds_metadata, :runner_machine_id, name: INDEX_NAME, - where: 'runner_machine_id IS NOT NULL' - end - - def down - remove_concurrent_partitioned_index_by_name :p_ci_builds_metadata, INDEX_NAME - end -end diff --git a/db/post_migrate/20230104222514_add_foreign_key_to_builds_metadata.rb b/db/post_migrate/20230104222514_add_foreign_key_to_builds_metadata.rb deleted file mode 100644 index b9c78e4eeb9d7..0000000000000 --- a/db/post_migrate/20230104222514_add_foreign_key_to_builds_metadata.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddForeignKeyToBuildsMetadata < Gitlab::Database::Migration[2.1] - include Gitlab::Database::PartitioningMigrationHelpers - - disable_ddl_transaction! - - def up - add_concurrent_partitioned_foreign_key :p_ci_builds_metadata, - :ci_runner_machines, - column: :runner_machine_id, - on_delete: :nullify - end - - def down - remove_foreign_key_if_exists :p_ci_builds_metadata, column: :runner_machine_id - end -end diff --git a/db/post_migrate/20230104224020_drop_vuln_reads_on_default_branch_index.rb b/db/post_migrate/20230104224020_drop_vuln_reads_on_default_branch_index.rb deleted file mode 100644 index acac69478a388..0000000000000 --- a/db/post_migrate/20230104224020_drop_vuln_reads_on_default_branch_index.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class DropVulnReadsOnDefaultBranchIndex < Gitlab::Database::Migration[2.1] - INDEX_NAME = 'index_vuln_reads_on_resolved_on_default_branch' - - COLUMNS = %i[project_id state id] - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :vulnerability_reads, name: INDEX_NAME - end - - def down - add_concurrent_index :vulnerability_reads, COLUMNS, - where: 'resolved_on_default_branch IS TRUE', - name: INDEX_NAME - end -end diff --git a/db/post_migrate/20230105172120_sync_new_amount_used_with_amount_used_on_ci_namespace_monthly_usages_table.rb b/db/post_migrate/20230105172120_sync_new_amount_used_with_amount_used_on_ci_namespace_monthly_usages_table.rb deleted file mode 100644 index 4181d6a0f92be..0000000000000 --- a/db/post_migrate/20230105172120_sync_new_amount_used_with_amount_used_on_ci_namespace_monthly_usages_table.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class SyncNewAmountUsedWithAmountUsedOnCiNamespaceMonthlyUsagesTable < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - restrict_gitlab_migration gitlab_schema: :gitlab_ci - - def up - # This migration will only run on rollback, there is no need for the positive case - end - - def down - project_usages = define_batchable_model('ci_namespace_monthly_usages') - - project_usages.each_batch(of: 500) do |batch| - batch.where('amount_used > 0').update_all('new_amount_used = amount_used') - end - end -end diff --git a/db/post_migrate/20230105180002_remove_new_amount_used_column_on_ci_namespace_monthly_usages.rb b/db/post_migrate/20230105180002_remove_new_amount_used_column_on_ci_namespace_monthly_usages.rb deleted file mode 100644 index 11e212a697d31..0000000000000 --- a/db/post_migrate/20230105180002_remove_new_amount_used_column_on_ci_namespace_monthly_usages.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class RemoveNewAmountUsedColumnOnCiNamespaceMonthlyUsages < Gitlab::Database::Migration[2.1] - enable_lock_retries! - - TRIGGER_NAME = 'sync_namespaces_amount_used_columns' - def up - remove_rename_triggers :ci_namespace_monthly_usages, TRIGGER_NAME - remove_column :ci_namespace_monthly_usages, :new_amount_used - end - - def down - return if column_exists?(:ci_namespace_monthly_usages, :new_amount_used) - - # rubocop:disable Migration/AddColumnsToWideTables - add_column :ci_namespace_monthly_usages, :new_amount_used, :decimal, default: 0.0, - precision: 18, scale: 2, null: false - # rubocop:enable Migration/AddColumnsToWideTables - - install_rename_triggers :ci_namespace_monthly_usages, :amount_used, :new_amount_used, trigger_name: TRIGGER_NAME - end -end diff --git a/db/post_migrate/20230106124332_change_keys_relation_to_ssh_signatures.rb b/db/post_migrate/20230106124332_change_keys_relation_to_ssh_signatures.rb deleted file mode 100644 index e76a3617ba38a..0000000000000 --- a/db/post_migrate/20230106124332_change_keys_relation_to_ssh_signatures.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true - -class ChangeKeysRelationToSshSignatures < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - TARGET_COLUMN = :key_id - - def up - add_concurrent_foreign_key( - :ssh_signatures, - :keys, - column: :key_id, - name: fk_name("#{TARGET_COLUMN}_nullify"), - on_delete: :nullify - ) - - with_lock_retries do - remove_foreign_key_if_exists(:ssh_signatures, column: TARGET_COLUMN, name: fk_name(TARGET_COLUMN)) - end - end - - def down - add_concurrent_foreign_key( - :ssh_signatures, - :keys, - column: :key_id, - name: fk_name(TARGET_COLUMN), - on_delete: :cascade - ) - - with_lock_retries do - remove_foreign_key_if_exists(:ssh_signatures, column: TARGET_COLUMN, name: fk_name("#{TARGET_COLUMN}_nullify")) - end - end - - private - - def fk_name(column_name) - concurrent_foreign_key_name(:ssh_signatures, column_name) - end -end diff --git a/db/post_migrate/20230109100044_cleanup_web_hook_calls_column_rename.rb b/db/post_migrate/20230109100044_cleanup_web_hook_calls_column_rename.rb deleted file mode 100644 index eca75bff19917..0000000000000 --- a/db/post_migrate/20230109100044_cleanup_web_hook_calls_column_rename.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class CleanupWebHookCallsColumnRename < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - # noop, related incident: https://gitlab.com/gitlab-com/gl-infra/production/-/issues/8264 - end - - def down - undo_cleanup_concurrent_column_rename :plan_limits, :web_hook_calls, :web_hook_calls_high - end -end diff --git a/db/post_migrate/20230109144915_remove_push_rules_application_settings_push_rule_id_fk.rb b/db/post_migrate/20230109144915_remove_push_rules_application_settings_push_rule_id_fk.rb deleted file mode 100644 index 7ac492a6e621a..0000000000000 --- a/db/post_migrate/20230109144915_remove_push_rules_application_settings_push_rule_id_fk.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class RemovePushRulesApplicationSettingsPushRuleIdFk < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - return unless foreign_key_exists?(:application_settings, :push_rules, name: "fk_693b8795e4") - - with_lock_retries do - execute('LOCK push_rules, application_settings IN ACCESS EXCLUSIVE MODE') if transaction_open? - - remove_foreign_key_if_exists(:application_settings, :push_rules, name: "fk_693b8795e4") - end - end - - def down - add_concurrent_foreign_key(:application_settings, :push_rules, - name: "fk_693b8795e4", column: :push_rule_id, - target_column: :id, on_delete: :nullify) - end -end diff --git a/db/post_migrate/20230109144928_remove_users_application_settings_usage_stats_set_by_user_id_fk.rb b/db/post_migrate/20230109144928_remove_users_application_settings_usage_stats_set_by_user_id_fk.rb deleted file mode 100644 index a8b9b48dbc707..0000000000000 --- a/db/post_migrate/20230109144928_remove_users_application_settings_usage_stats_set_by_user_id_fk.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class RemoveUsersApplicationSettingsUsageStatsSetByUserIdFk < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - return unless foreign_key_exists?(:application_settings, :users, name: "fk_964370041d") - - with_lock_retries do - execute('LOCK users, application_settings IN ACCESS EXCLUSIVE MODE') if transaction_open? - - remove_foreign_key_if_exists(:application_settings, :users, name: "fk_964370041d") - end - end - - def down - add_concurrent_foreign_key(:application_settings, :users, - name: "fk_964370041d", column: :usage_stats_set_by_user_id, - target_column: :id, on_delete: :nullify) - end -end diff --git a/db/post_migrate/20230109144941_remove_namespaces_application_settings_instance_administrators_group_id_fk.rb b/db/post_migrate/20230109144941_remove_namespaces_application_settings_instance_administrators_group_id_fk.rb deleted file mode 100644 index 82f0d8a2e478d..0000000000000 --- a/db/post_migrate/20230109144941_remove_namespaces_application_settings_instance_administrators_group_id_fk.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class RemoveNamespacesApplicationSettingsInstanceAdministratorsGroupIdFk < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - return unless foreign_key_exists?(:application_settings, :namespaces, name: "fk_e8a145f3a7") - - with_lock_retries do - execute('LOCK namespaces, application_settings IN ACCESS EXCLUSIVE MODE') if transaction_open? - - remove_foreign_key_if_exists(:application_settings, :namespaces, name: "fk_e8a145f3a7") - end - end - - def down - add_concurrent_foreign_key(:application_settings, :namespaces, - name: "fk_e8a145f3a7", column: :instance_administrators_group_id, - target_column: :id, on_delete: :nullify) - end -end diff --git a/db/post_migrate/20230109144953_remove_projects_application_settings_file_template_project_id_fk.rb b/db/post_migrate/20230109144953_remove_projects_application_settings_file_template_project_id_fk.rb deleted file mode 100644 index 8527930e5a744..0000000000000 --- a/db/post_migrate/20230109144953_remove_projects_application_settings_file_template_project_id_fk.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class RemoveProjectsApplicationSettingsFileTemplateProjectIdFk < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - return unless foreign_key_exists?(:application_settings, :projects, name: "fk_ec757bd087") - - with_lock_retries do - execute('LOCK projects, application_settings IN ACCESS EXCLUSIVE MODE') if transaction_open? - - remove_foreign_key_if_exists(:application_settings, :projects, name: "fk_ec757bd087") - end - end - - def down - add_concurrent_foreign_key(:application_settings, :projects, - name: "fk_ec757bd087", column: :file_template_project_id, - target_column: :id, on_delete: :nullify) - end -end diff --git a/db/post_migrate/20230109145005_remove_projects_application_settings_instance_administration_project_id_fk.rb b/db/post_migrate/20230109145005_remove_projects_application_settings_instance_administration_project_id_fk.rb deleted file mode 100644 index e91769a90bb4b..0000000000000 --- a/db/post_migrate/20230109145005_remove_projects_application_settings_instance_administration_project_id_fk.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class RemoveProjectsApplicationSettingsInstanceAdministrationProjectIdFk < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - return unless foreign_key_exists?(:application_settings, :projects, name: "fk_rails_7e112a9599") - - with_lock_retries do - execute('LOCK projects, application_settings IN ACCESS EXCLUSIVE MODE') if transaction_open? - - remove_foreign_key_if_exists(:application_settings, :projects, name: "fk_rails_7e112a9599") - end - end - - def down - add_concurrent_foreign_key(:application_settings, :projects, - name: "fk_rails_7e112a9599", column: :instance_administration_project_id, - target_column: :id, on_delete: :nullify) - end -end diff --git a/db/post_migrate/20230109145018_remove_namespaces_application_settings_custom_project_templates_group_id_fk.rb b/db/post_migrate/20230109145018_remove_namespaces_application_settings_custom_project_templates_group_id_fk.rb deleted file mode 100644 index cfc915f57b456..0000000000000 --- a/db/post_migrate/20230109145018_remove_namespaces_application_settings_custom_project_templates_group_id_fk.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class RemoveNamespacesApplicationSettingsCustomProjectTemplatesGroupIdFk < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - return unless foreign_key_exists?(:application_settings, :namespaces, name: "fk_rails_b53e481273") - - with_lock_retries do - execute('LOCK namespaces, application_settings IN ACCESS EXCLUSIVE MODE') if transaction_open? - - remove_foreign_key_if_exists(:application_settings, :namespaces, name: "fk_rails_b53e481273") - end - end - - def down - add_concurrent_foreign_key(:application_settings, :namespaces, - name: "fk_rails_b53e481273", column: :custom_project_templates_group_id, - target_column: :id, on_delete: :nullify) - end -end diff --git a/db/post_migrate/20230110172751_add_partial_index_on_group_path_id.rb b/db/post_migrate/20230110172751_add_partial_index_on_group_path_id.rb deleted file mode 100644 index 2135f241fd194..0000000000000 --- a/db/post_migrate/20230110172751_add_partial_index_on_group_path_id.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddPartialIndexOnGroupPathId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = :index_groups_on_path_and_id - - # rubocop:disable Migration/PreventIndexCreation - def up - add_concurrent_index :namespaces, [:path, :id], where: "type = 'Group'", name: INDEX_NAME - end - # rubocop:enable Migration/PreventIndexCreation - - def down - remove_concurrent_index_by_name :namespaces, INDEX_NAME - end -end diff --git a/db/post_migrate/20230111125148_add_user_id_and_source_id_and_source_type_and_member_role_id_index_to_members.rb b/db/post_migrate/20230111125148_add_user_id_and_source_id_and_source_type_and_member_role_id_index_to_members.rb deleted file mode 100644 index 82e2ea8bf291b..0000000000000 --- a/db/post_migrate/20230111125148_add_user_id_and_source_id_and_source_type_and_member_role_id_index_to_members.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddUserIdAndSourceIdAndSourceTypeAndMemberRoleIdIndexToMembers < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = 'idx_members_on_user_and_source_and_source_type_and_member_role' - - def up - add_concurrent_index :members, [:user_id, :source_id, :source_type, :member_role_id], name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :members, name: INDEX_NAME - end -end diff --git a/db/post_migrate/20230111125150_drop_user_id_and_source_id_and_source_type_index_from_members.rb b/db/post_migrate/20230111125150_drop_user_id_and_source_id_and_source_type_index_from_members.rb deleted file mode 100644 index c1c56a4073ca5..0000000000000 --- a/db/post_migrate/20230111125150_drop_user_id_and_source_id_and_source_type_index_from_members.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class DropUserIdAndSourceIdAndSourceTypeIndexFromMembers < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = 'index_members_on_user_id_source_id_source_type' - - def up - remove_concurrent_index_by_name :members, name: INDEX_NAME - end - - def down - add_concurrent_index :members, [:user_id, :source_id, :source_type], name: INDEX_NAME - end -end diff --git a/db/post_migrate/20230112051854_add_not_null_constraint_to_o_auth_access_tokens_expires_in.rb b/db/post_migrate/20230112051854_add_not_null_constraint_to_o_auth_access_tokens_expires_in.rb deleted file mode 100644 index 21028993f5daa..0000000000000 --- a/db/post_migrate/20230112051854_add_not_null_constraint_to_o_auth_access_tokens_expires_in.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddNotNullConstraintToOAuthAccessTokensExpiresIn < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - # validate: false ensures that existing records are not affected - # https://docs.gitlab.com/ee/development/database/not_null_constraints.html#prevent-new-invalid-records-current-release - add_not_null_constraint :oauth_access_tokens, :expires_in, validate: false - change_column_default :oauth_access_tokens, :expires_in, 7200 - end - - def down - remove_not_null_constraint :oauth_access_tokens, :expires_in - change_column_default :oauth_access_tokens, :expires_in, nil - end -end diff --git a/db/post_migrate/20230112085143_add_index_environments_on_project_id_and_id.rb b/db/post_migrate/20230112085143_add_index_environments_on_project_id_and_id.rb deleted file mode 100644 index bfb855577148f..0000000000000 --- a/db/post_migrate/20230112085143_add_index_environments_on_project_id_and_id.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddIndexEnvironmentsOnProjectIdAndId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = 'index_environments_on_project_id_and_id' - - def up - add_concurrent_index :environments, %i[project_id id], name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :environments, INDEX_NAME - end -end diff --git a/db/post_migrate/20230112141236_schedule_vulnerabilities_feedback_migration2.rb b/db/post_migrate/20230112141236_schedule_vulnerabilities_feedback_migration2.rb deleted file mode 100644 index 7d8cba96a91d2..0000000000000 --- a/db/post_migrate/20230112141236_schedule_vulnerabilities_feedback_migration2.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class ScheduleVulnerabilitiesFeedbackMigration2 < Gitlab::Database::Migration[2.1] - MIGRATION = 'MigrateVulnerabilitiesFeedbackToVulnerabilitiesStateTransition' - TABLE_NAME = :vulnerability_feedback - BATCH_COLUMN = :id - DELAY_INTERVAL = 5.minutes - BATCH_SIZE = 250 - MAX_BATCH_SIZE = 250 - SUB_BATCH_SIZE = 50 - - disable_ddl_transaction! - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - # rescheduled by 20230203122602_schedule_vulnerabilities_feedback_migration3.rb - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20230112144946_add_tmp_index_to_ci_build_need.rb b/db/post_migrate/20230112144946_add_tmp_index_to_ci_build_need.rb deleted file mode 100644 index d1e0ae6665f08..0000000000000 --- a/db/post_migrate/20230112144946_add_tmp_index_to_ci_build_need.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddTmpIndexToCiBuildNeed < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = :tmp_index_ci_build_needs_on_partition_id_and_id - TABLE_NAME = :ci_build_needs - - def up - return unless Gitlab.com? - - prepare_async_index(TABLE_NAME, [:partition_id, :id], where: 'partition_id = 101', name: INDEX_NAME) - end - - def down - return unless Gitlab.com? - - unprepare_async_index_by_name(TABLE_NAME, INDEX_NAME) - end -end diff --git a/db/post_migrate/20230112145326_add_tmp_index_to_ci_pipeline_variable.rb b/db/post_migrate/20230112145326_add_tmp_index_to_ci_pipeline_variable.rb deleted file mode 100644 index 920b70765cc94..0000000000000 --- a/db/post_migrate/20230112145326_add_tmp_index_to_ci_pipeline_variable.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddTmpIndexToCiPipelineVariable < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = :tmp_index_ci_pipeline_variables_on_partition_id_and_id - TABLE_NAME = :ci_pipeline_variables - - def up - return unless Gitlab.com? - - prepare_async_index(TABLE_NAME, [:partition_id, :id], where: 'partition_id = 101', name: INDEX_NAME) - end - - def down - return unless Gitlab.com? - - unprepare_async_index_by_name(TABLE_NAME, INDEX_NAME) - end -end diff --git a/db/post_migrate/20230113003255_remove_atlassian_refresh_token_constraint.rb b/db/post_migrate/20230113003255_remove_atlassian_refresh_token_constraint.rb deleted file mode 100644 index 7929d4495c004..0000000000000 --- a/db/post_migrate/20230113003255_remove_atlassian_refresh_token_constraint.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class RemoveAtlassianRefreshTokenConstraint < Gitlab::Database::Migration[2.1] - CONSTRAINT_NAME = 'atlassian_identities_refresh_token_length_constraint' - - disable_ddl_transaction! - - def up - remove_check_constraint(:atlassian_identities, CONSTRAINT_NAME) - add_check_constraint :atlassian_identities, 'octet_length(encrypted_refresh_token) <= 5000', CONSTRAINT_NAME - end - - def down - remove_check_constraint(:atlassian_identities, CONSTRAINT_NAME) - add_check_constraint :atlassian_identities, 'octet_length(encrypted_refresh_token) <= 512', CONSTRAINT_NAME - end -end diff --git a/db/post_migrate/20230116083826_drop_index_on_ci_build_token_encrypted.rb b/db/post_migrate/20230116083826_drop_index_on_ci_build_token_encrypted.rb deleted file mode 100644 index 429388b1742ae..0000000000000 --- a/db/post_migrate/20230116083826_drop_index_on_ci_build_token_encrypted.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class DropIndexOnCiBuildTokenEncrypted < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - TABLE_NAME = :ci_builds - INDEX_NAME = :index_ci_builds_on_token_encrypted_partition_id_unique - COLUMNS = %i[token_encrypted partition_id].freeze - - def up - remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME) - end - - def down - add_concurrent_index(TABLE_NAME, COLUMNS, unique: true, where: 'token_encrypted IS NOT NULL', name: INDEX_NAME) - end -end diff --git a/db/post_migrate/20230116090630_add_index_for_group_activity_events.rb b/db/post_migrate/20230116090630_add_index_for_group_activity_events.rb deleted file mode 100644 index a775a471f98cc..0000000000000 --- a/db/post_migrate/20230116090630_add_index_for_group_activity_events.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddIndexForGroupActivityEvents < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = 'index_events_for_group_activity' - - def up - add_concurrent_index :events, %i[group_id target_type action id], name: INDEX_NAME, where: 'group_id IS NOT NULL' - end - - def down - remove_concurrent_index_by_name :events, INDEX_NAME - end -end diff --git a/db/post_migrate/20230116090852_add_index_for_project_activity_events.rb b/db/post_migrate/20230116090852_add_index_for_project_activity_events.rb deleted file mode 100644 index f0d757ad88583..0000000000000 --- a/db/post_migrate/20230116090852_add_index_for_project_activity_events.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddIndexForProjectActivityEvents < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = 'index_events_for_project_activity' - - def up - add_concurrent_index :events, %i[project_id target_type action id], name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :events, INDEX_NAME - end -end diff --git a/db/post_migrate/20230116090920_add_index_to_events_on_group_id_and_id.rb b/db/post_migrate/20230116090920_add_index_to_events_on_group_id_and_id.rb deleted file mode 100644 index 4c2a9af7df9a9..0000000000000 --- a/db/post_migrate/20230116090920_add_index_to_events_on_group_id_and_id.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToEventsOnGroupIdAndId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = 'index_events_on_group_id_and_id' - - def up - add_concurrent_index :events, %i[group_id id], name: INDEX_NAME, where: 'group_id IS NOT NULL' - end - - def down - remove_concurrent_index_by_name :events, INDEX_NAME - end -end diff --git a/db/post_migrate/20230116091626_add_index_for_events_followed_users.rb b/db/post_migrate/20230116091626_add_index_for_events_followed_users.rb deleted file mode 100644 index 24358814521e9..0000000000000 --- a/db/post_migrate/20230116091626_add_index_for_events_followed_users.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddIndexForEventsFollowedUsers < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = 'index_events_for_followed_users' - - def up - add_concurrent_index :events, %I[author_id target_type action id], name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :events, INDEX_NAME - end -end diff --git a/db/post_migrate/20230116111252_finalize_todo_sanitization.rb b/db/post_migrate/20230116111252_finalize_todo_sanitization.rb deleted file mode 100644 index b3da479aa5790..0000000000000 --- a/db/post_migrate/20230116111252_finalize_todo_sanitization.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class FinalizeTodoSanitization < Gitlab::Database::Migration[2.1] - MIGRATION = 'SanitizeConfidentialTodos' - disable_ddl_transaction! - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - ensure_batched_background_migration_is_finished( - job_class_name: MIGRATION, - table_name: :notes, - column_name: :id, - job_arguments: [], - finalize: true - ) - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20230116160904_remove_user_details_fields_from_user.rb b/db/post_migrate/20230116160904_remove_user_details_fields_from_user.rb deleted file mode 100644 index 8842f75e691ab..0000000000000 --- a/db/post_migrate/20230116160904_remove_user_details_fields_from_user.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -class RemoveUserDetailsFieldsFromUser < Gitlab::Database::Migration[2.1] - enable_lock_retries! - - def change - %i[linkedin twitter skype website_url].each do |column| - remove_column :users, column, :string, null: false, default: '' - end - %i[location organization].each do |column| - remove_column :users, column, :string, null: true - end - end -end diff --git a/db/post_migrate/20230117092947_add_tmp_index_to_ci_build_report_results.rb b/db/post_migrate/20230117092947_add_tmp_index_to_ci_build_report_results.rb deleted file mode 100644 index a116562e9ec31..0000000000000 --- a/db/post_migrate/20230117092947_add_tmp_index_to_ci_build_report_results.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddTmpIndexToCiBuildReportResults < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = :tmp_index_ci_build_report_results_on_partition_id_and_id - TABLE_NAME = :ci_build_report_results - - def up - return unless Gitlab.com? - - prepare_async_index(TABLE_NAME, [:partition_id, :id], where: 'partition_id = 101', name: INDEX_NAME) - end - - def down - return unless Gitlab.com? - - unprepare_async_index_by_name(TABLE_NAME, INDEX_NAME) - end -end diff --git a/db/post_migrate/20230117093222_add_tmp_index_to_ci_builds_on_partition_id.rb b/db/post_migrate/20230117093222_add_tmp_index_to_ci_builds_on_partition_id.rb deleted file mode 100644 index 3a40e636ef939..0000000000000 --- a/db/post_migrate/20230117093222_add_tmp_index_to_ci_builds_on_partition_id.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddTmpIndexToCiBuildsOnPartitionId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = :tmp_index_ci_builds_on_partition_id_and_id - - def up - return unless Gitlab.com? - - prepare_async_index :ci_builds, [:partition_id, :id], name: INDEX_NAME, where: 'partition_id = 101' - end - - def down - return unless Gitlab.com? - - unprepare_async_index :ci_builds, [:partition_id, :id], name: INDEX_NAME, where: 'partition_id = 101' - end -end diff --git a/db/post_migrate/20230117093736_add_tmp_index_to_ci_pipelines_on_partition_id.rb b/db/post_migrate/20230117093736_add_tmp_index_to_ci_pipelines_on_partition_id.rb deleted file mode 100644 index a8e5da592af2f..0000000000000 --- a/db/post_migrate/20230117093736_add_tmp_index_to_ci_pipelines_on_partition_id.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddTmpIndexToCiPipelinesOnPartitionId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = :tmp_index_ci_pipelines_on_partition_id_and_id - - def up - return unless Gitlab.com? - - prepare_async_index :ci_pipelines, [:partition_id, :id], name: INDEX_NAME, where: 'partition_id = 101' - end - - def down - return unless Gitlab.com? - - unprepare_async_index :ci_pipelines, [:partition_id, :id], name: INDEX_NAME, where: 'partition_id = 101' - end -end diff --git a/db/post_migrate/20230117093924_add_tmp_index_to_ci_stages_on_partition_id.rb b/db/post_migrate/20230117093924_add_tmp_index_to_ci_stages_on_partition_id.rb deleted file mode 100644 index 33273ee2ba4b0..0000000000000 --- a/db/post_migrate/20230117093924_add_tmp_index_to_ci_stages_on_partition_id.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddTmpIndexToCiStagesOnPartitionId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = :tmp_index_ci_stages_on_partition_id_and_id - - def up - return unless Gitlab.com? - - prepare_async_index :ci_stages, [:partition_id, :id], name: INDEX_NAME, where: 'partition_id = 101' - end - - def down - return unless Gitlab.com? - - unprepare_async_index :ci_stages, [:partition_id, :id], name: INDEX_NAME, where: 'partition_id = 101' - end -end diff --git a/db/post_migrate/20230117094111_prepare_tmp_index_to_ci_build_trace_metadata.rb b/db/post_migrate/20230117094111_prepare_tmp_index_to_ci_build_trace_metadata.rb deleted file mode 100644 index 93356b4eb3fb3..0000000000000 --- a/db/post_migrate/20230117094111_prepare_tmp_index_to_ci_build_trace_metadata.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class PrepareTmpIndexToCiBuildTraceMetadata < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = :tmp_index_ci_build_trace_metadata_on_partition_id_and_id - TABLE_NAME = :ci_build_trace_metadata - - def up - return unless Gitlab.com? - - prepare_async_index(TABLE_NAME, [:partition_id, :build_id], where: 'partition_id = 101', name: INDEX_NAME) - end - - def down - return unless Gitlab.com? - - unprepare_async_index_by_name(TABLE_NAME, INDEX_NAME) - end -end diff --git a/db/post_migrate/20230117094226_prepare_tmp_index_to_ci_job_artifact.rb b/db/post_migrate/20230117094226_prepare_tmp_index_to_ci_job_artifact.rb deleted file mode 100644 index db0c51e4cfd80..0000000000000 --- a/db/post_migrate/20230117094226_prepare_tmp_index_to_ci_job_artifact.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class PrepareTmpIndexToCiJobArtifact < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = :tmp_index_ci_job_artifacts_on_partition_id_and_id - TABLE_NAME = :ci_job_artifacts - - def up - return unless Gitlab.com? - - prepare_async_index(TABLE_NAME, [:partition_id, :id], where: 'partition_id = 101', name: INDEX_NAME) - end - - def down - return unless Gitlab.com? - - unprepare_async_index_by_name(TABLE_NAME, INDEX_NAME) - end -end diff --git a/db/post_migrate/20230117094316_add_tmp_index_to_ci_job_variable.rb b/db/post_migrate/20230117094316_add_tmp_index_to_ci_job_variable.rb deleted file mode 100644 index 96de0c9fed180..0000000000000 --- a/db/post_migrate/20230117094316_add_tmp_index_to_ci_job_variable.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddTmpIndexToCiJobVariable < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = :tmp_index_ci_job_variables_on_partition_id_and_id - TABLE_NAME = :ci_job_variables - - def up - return unless Gitlab.com? - - add_concurrent_index(TABLE_NAME, [:partition_id, :id], where: 'partition_id = 101', name: INDEX_NAME) - end - - def down - return unless Gitlab.com? - - remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME) - end -end diff --git a/db/post_migrate/20230117113719_add_tmp_index_to_ci_sources_pipelines_on_partition_id.rb b/db/post_migrate/20230117113719_add_tmp_index_to_ci_sources_pipelines_on_partition_id.rb deleted file mode 100644 index 28c722893bc4c..0000000000000 --- a/db/post_migrate/20230117113719_add_tmp_index_to_ci_sources_pipelines_on_partition_id.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class AddTmpIndexToCiSourcesPipelinesOnPartitionId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = :tmp_index_ci_sources_pipelines_on_partition_id_and_id - SOURCE_INDEX_NAME = :tmp_index_ci_sources_pipelines_on_source_partition_id_and_id - TABLE_NAME = :ci_sources_pipelines - - def up - return unless Gitlab.com? - - add_concurrent_index TABLE_NAME, - [:partition_id, :id], - name: INDEX_NAME, where: 'partition_id = 101' - - add_concurrent_index TABLE_NAME, - [:source_partition_id, :id], - name: SOURCE_INDEX_NAME, - where: 'source_partition_id = 101' - end - - def down - return unless Gitlab.com? - - remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME - remove_concurrent_index_by_name TABLE_NAME, SOURCE_INDEX_NAME - end -end diff --git a/db/post_migrate/20230117114739_clear_duplicate_jobs_cookies.rb b/db/post_migrate/20230117114739_clear_duplicate_jobs_cookies.rb deleted file mode 100644 index ce587e6c90249..0000000000000 --- a/db/post_migrate/20230117114739_clear_duplicate_jobs_cookies.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -# This is workaround for -# https://gitlab.com/gitlab-org/gitlab/-/issues/388253. During a -# zero-downtime upgrade, duplicate jobs cookies can fail to get deleted. -# This post-deployment migration deletes all such cookies. This can -# cause some jobs that normally would have been deduplicated to twice -# instead of once. -class ClearDuplicateJobsCookies < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - Gitlab::Redis::Queues.with do |redis| # rubocop:disable Cop/RedisQueueUsage - redis.scan_each(match: "resque:gitlab:duplicate:*:cookie:v2").each_slice(100) do |keys| - redis.del(keys) - end - end - end - - def down; end -end diff --git a/db/post_migrate/20230117145628_add_token_encrypted_and_partition_id_index_to_ci_build.rb b/db/post_migrate/20230117145628_add_token_encrypted_and_partition_id_index_to_ci_build.rb deleted file mode 100644 index ffcf56dd2cab8..0000000000000 --- a/db/post_migrate/20230117145628_add_token_encrypted_and_partition_id_index_to_ci_build.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddTokenEncryptedAndPartitionIdIndexToCiBuild < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - TABLE_NAME = :ci_builds - INDEX_NAME = :unique_ci_builds_token_encrypted_and_partition_id - COLUMNS = %i[token_encrypted partition_id].freeze - - def up - add_concurrent_index(TABLE_NAME, COLUMNS, unique: true, where: 'token_encrypted IS NOT NULL', name: INDEX_NAME) - end - - def down - remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME) - end -end diff --git a/db/post_migrate/20230118083437_redefine_foreign_key_on_ci_unit_test_failure.rb b/db/post_migrate/20230118083437_redefine_foreign_key_on_ci_unit_test_failure.rb deleted file mode 100644 index 220da0908a9c8..0000000000000 --- a/db/post_migrate/20230118083437_redefine_foreign_key_on_ci_unit_test_failure.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -class RedefineForeignKeyOnCiUnitTestFailure < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - SOURCE_TABLE_NAME = :ci_unit_test_failures - TARGET_TABLE_NAME = :ci_builds - COLUMN = :build_id - TARGET_COLUMN = :id - OLD_FK_NAME = :fk_0f09856e1f_p - PARTITION_COLUMN = :partition_id - - def up - add_concurrent_foreign_key( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - column: [PARTITION_COLUMN, COLUMN], - target_column: [PARTITION_COLUMN, TARGET_COLUMN], - validate: true, - reverse_lock_order: true, - name: new_foreign_key_name, - on_update: :cascade - ) - - with_lock_retries do - remove_foreign_key_if_exists(SOURCE_TABLE_NAME, name: OLD_FK_NAME) - end - end - - def down - add_concurrent_foreign_key( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - column: [PARTITION_COLUMN, COLUMN], - target_column: [PARTITION_COLUMN, TARGET_COLUMN], - validate: true, - reverse_lock_order: true, - name: OLD_FK_NAME - ) - - with_lock_retries do - remove_foreign_key_if_exists(SOURCE_TABLE_NAME, name: new_foreign_key_name) - end - end - - private - - def new_foreign_key_name - "#{concurrent_foreign_key_name(SOURCE_TABLE_NAME, [PARTITION_COLUMN, COLUMN])}_p" - end -end diff --git a/db/post_migrate/20230118083632_redefine_foreign_key_on_ci_build_pending_state.rb b/db/post_migrate/20230118083632_redefine_foreign_key_on_ci_build_pending_state.rb deleted file mode 100644 index 002ec92398954..0000000000000 --- a/db/post_migrate/20230118083632_redefine_foreign_key_on_ci_build_pending_state.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -class RedefineForeignKeyOnCiBuildPendingState < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - SOURCE_TABLE_NAME = :ci_build_pending_states - TARGET_TABLE_NAME = :ci_builds - COLUMN = :build_id - TARGET_COLUMN = :id - OLD_FK_NAME = :fk_rails_0bbbfeaf9d_p - PARTITION_COLUMN = :partition_id - - def up - add_concurrent_foreign_key( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - column: [PARTITION_COLUMN, COLUMN], - target_column: [PARTITION_COLUMN, TARGET_COLUMN], - validate: true, - reverse_lock_order: true, - name: new_foreign_key_name, - on_update: :cascade - ) - - with_lock_retries do - remove_foreign_key_if_exists(SOURCE_TABLE_NAME, name: OLD_FK_NAME) - end - end - - def down - add_concurrent_foreign_key( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - column: [PARTITION_COLUMN, COLUMN], - target_column: [PARTITION_COLUMN, TARGET_COLUMN], - validate: true, - reverse_lock_order: true, - name: OLD_FK_NAME - ) - - with_lock_retries do - remove_foreign_key_if_exists(SOURCE_TABLE_NAME, name: new_foreign_key_name) - end - end - - private - - def new_foreign_key_name - "#{concurrent_foreign_key_name(SOURCE_TABLE_NAME, [PARTITION_COLUMN, COLUMN])}_p" - end -end diff --git a/db/post_migrate/20230118083748_redefine_foreign_key_on_ci_build_trace_chunk.rb b/db/post_migrate/20230118083748_redefine_foreign_key_on_ci_build_trace_chunk.rb deleted file mode 100644 index 3474e672dfa75..0000000000000 --- a/db/post_migrate/20230118083748_redefine_foreign_key_on_ci_build_trace_chunk.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -class RedefineForeignKeyOnCiBuildTraceChunk < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - SOURCE_TABLE_NAME = :ci_build_trace_chunks - TARGET_TABLE_NAME = :ci_builds - COLUMN = :build_id - TARGET_COLUMN = :id - OLD_FK_NAME = :fk_rails_1013b761f2_p - PARTITION_COLUMN = :partition_id - - def up - add_concurrent_foreign_key( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - column: [PARTITION_COLUMN, COLUMN], - target_column: [PARTITION_COLUMN, TARGET_COLUMN], - validate: true, - reverse_lock_order: true, - name: new_foreign_key_name, - on_update: :cascade - ) - - with_lock_retries do - remove_foreign_key_if_exists(SOURCE_TABLE_NAME, name: OLD_FK_NAME) - end - end - - def down - add_concurrent_foreign_key( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - column: [PARTITION_COLUMN, COLUMN], - target_column: [PARTITION_COLUMN, TARGET_COLUMN], - validate: true, - reverse_lock_order: true, - name: OLD_FK_NAME - ) - - with_lock_retries do - remove_foreign_key_if_exists(SOURCE_TABLE_NAME, name: new_foreign_key_name) - end - end - - private - - def new_foreign_key_name - "#{concurrent_foreign_key_name(SOURCE_TABLE_NAME, [PARTITION_COLUMN, COLUMN])}_p" - end -end diff --git a/db/post_migrate/20230119085509_add_index_to_ci_running_build.rb b/db/post_migrate/20230119085509_add_index_to_ci_running_build.rb deleted file mode 100644 index f340b78801fb3..0000000000000 --- a/db/post_migrate/20230119085509_add_index_to_ci_running_build.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToCiRunningBuild < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = :index_ci_running_builds_on_partition_id_build_id - TABLE_NAME = :ci_running_builds - COLUMNS = [:partition_id, :build_id] - - def up - add_concurrent_index(TABLE_NAME, COLUMNS, unique: true, name: INDEX_NAME) - end - - def down - remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME) - end -end diff --git a/db/post_migrate/20230119085552_add_foreign_key_to_ci_running_build.rb b/db/post_migrate/20230119085552_add_foreign_key_to_ci_running_build.rb deleted file mode 100644 index 94dfdc5b967ea..0000000000000 --- a/db/post_migrate/20230119085552_add_foreign_key_to_ci_running_build.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -class AddForeignKeyToCiRunningBuild < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - SOURCE_TABLE_NAME = :ci_running_builds - TARGET_TABLE_NAME = :ci_builds - COLUMN = :build_id - TARGET_COLUMN = :id - FK_NAME = :fk_rails_da45cfa165_p - PARTITION_COLUMN = :partition_id - - def up - add_concurrent_foreign_key( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - column: [PARTITION_COLUMN, COLUMN], - target_column: [PARTITION_COLUMN, TARGET_COLUMN], - validate: true, - reverse_lock_order: true, - name: FK_NAME, - on_update: :cascade - ) - end - - def down - with_lock_retries do - remove_foreign_key_if_exists(SOURCE_TABLE_NAME, name: FK_NAME) - end - end -end diff --git a/db/post_migrate/20230119090944_add_index_to_ci_pending_build.rb b/db/post_migrate/20230119090944_add_index_to_ci_pending_build.rb deleted file mode 100644 index de58b6a0ef89f..0000000000000 --- a/db/post_migrate/20230119090944_add_index_to_ci_pending_build.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToCiPendingBuild < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = :index_ci_pending_builds_on_partition_id_build_id - TABLE_NAME = :ci_pending_builds - COLUMNS = [:partition_id, :build_id] - - def up - add_concurrent_index(TABLE_NAME, COLUMNS, unique: true, name: INDEX_NAME) - end - - def down - remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME) - end -end diff --git a/db/post_migrate/20230119091027_add_foreign_key_to_ci_pending_build.rb b/db/post_migrate/20230119091027_add_foreign_key_to_ci_pending_build.rb deleted file mode 100644 index 9f7f807e7383c..0000000000000 --- a/db/post_migrate/20230119091027_add_foreign_key_to_ci_pending_build.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -class AddForeignKeyToCiPendingBuild < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - SOURCE_TABLE_NAME = :ci_pending_builds - TARGET_TABLE_NAME = :ci_builds - COLUMN = :build_id - TARGET_COLUMN = :id - FK_NAME = :fk_rails_725a2644a3_p - PARTITION_COLUMN = :partition_id - - def up - add_concurrent_foreign_key( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - column: [PARTITION_COLUMN, COLUMN], - target_column: [PARTITION_COLUMN, TARGET_COLUMN], - validate: true, - reverse_lock_order: true, - name: FK_NAME, - on_update: :cascade - ) - end - - def down - with_lock_retries do - remove_foreign_key_if_exists(SOURCE_TABLE_NAME, name: FK_NAME) - end - end -end diff --git a/db/post_migrate/20230119095022_add_fk_index_to_ci_builds_runner_session_on_partition_id_and_build_id.rb b/db/post_migrate/20230119095022_add_fk_index_to_ci_builds_runner_session_on_partition_id_and_build_id.rb deleted file mode 100644 index 9fee62e55f2af..0000000000000 --- a/db/post_migrate/20230119095022_add_fk_index_to_ci_builds_runner_session_on_partition_id_and_build_id.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddFkIndexToCiBuildsRunnerSessionOnPartitionIdAndBuildId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = :index_ci_builds_runner_session_on_partition_id_build_id - TABLE_NAME = :ci_builds_runner_session - COLUMNS = [:partition_id, :build_id] - - def up - add_concurrent_index(TABLE_NAME, COLUMNS, name: INDEX_NAME, unique: true) - end - - def down - remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME) - end -end diff --git a/db/post_migrate/20230119095023_add_fk_to_ci_builds_runner_session_on_partition_id_and_build_id.rb b/db/post_migrate/20230119095023_add_fk_to_ci_builds_runner_session_on_partition_id_and_build_id.rb deleted file mode 100644 index e3aed238e0fa9..0000000000000 --- a/db/post_migrate/20230119095023_add_fk_to_ci_builds_runner_session_on_partition_id_and_build_id.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -class AddFkToCiBuildsRunnerSessionOnPartitionIdAndBuildId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - SOURCE_TABLE_NAME = :ci_builds_runner_session - TARGET_TABLE_NAME = :ci_builds - COLUMN = :build_id - TARGET_COLUMN = :id - FK_NAME = :fk_rails_70707857d3_p - PARTITION_COLUMN = :partition_id - - def up - add_concurrent_foreign_key( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - column: [PARTITION_COLUMN, COLUMN], - target_column: [PARTITION_COLUMN, TARGET_COLUMN], - validate: false, - reverse_lock_order: true, - on_update: :cascade, - on_delete: :cascade, - name: FK_NAME - ) - end - - def down - with_lock_retries do - remove_foreign_key_if_exists( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - name: FK_NAME, - reverse_lock_order: true - ) - end - end -end diff --git a/db/post_migrate/20230119095024_validate_fk_on_ci_builds_runner_session_partition_id_and_build_id.rb b/db/post_migrate/20230119095024_validate_fk_on_ci_builds_runner_session_partition_id_and_build_id.rb deleted file mode 100644 index 07402b749ea5f..0000000000000 --- a/db/post_migrate/20230119095024_validate_fk_on_ci_builds_runner_session_partition_id_and_build_id.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class ValidateFkOnCiBuildsRunnerSessionPartitionIdAndBuildId < Gitlab::Database::Migration[2.1] - TABLE_NAME = :ci_builds_runner_session - FK_NAME = :fk_rails_70707857d3_p - COLUMNS = [:partition_id, :build_id] - - def up - validate_foreign_key(TABLE_NAME, COLUMNS, name: FK_NAME) - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20230119095025_remove_fk_to_ci_builds_ci_builds_runner_session_on_build_id.rb b/db/post_migrate/20230119095025_remove_fk_to_ci_builds_ci_builds_runner_session_on_build_id.rb deleted file mode 100644 index 0707114d3a5d0..0000000000000 --- a/db/post_migrate/20230119095025_remove_fk_to_ci_builds_ci_builds_runner_session_on_build_id.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -class RemoveFkToCiBuildsCiBuildsRunnerSessionOnBuildId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - SOURCE_TABLE_NAME = :ci_builds_runner_session - TARGET_TABLE_NAME = :ci_builds - COLUMN = :build_id - TARGET_COLUMN = :id - FK_NAME = :fk_rails_70707857d3 - - def up - with_lock_retries do - remove_foreign_key_if_exists( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - name: FK_NAME, - reverse_lock_order: true - ) - end - end - - def down - add_concurrent_foreign_key( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - column: COLUMN, - target_column: TARGET_COLUMN, - validate: true, - reverse_lock_order: true, - on_delete: :cascade, - name: FK_NAME - ) - end -end diff --git a/db/post_migrate/20230119123256_add_fk_index_to_ci_resources_on_partition_id_and_build_id.rb b/db/post_migrate/20230119123256_add_fk_index_to_ci_resources_on_partition_id_and_build_id.rb deleted file mode 100644 index 8c1b8c8123575..0000000000000 --- a/db/post_migrate/20230119123256_add_fk_index_to_ci_resources_on_partition_id_and_build_id.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddFkIndexToCiResourcesOnPartitionIdAndBuildId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = :index_ci_resources_on_partition_id_build_id - TABLE_NAME = :ci_resources - COLUMNS = [:partition_id, :build_id] - - def up - add_concurrent_index(TABLE_NAME, COLUMNS, name: INDEX_NAME) - end - - def down - remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME) - end -end diff --git a/db/post_migrate/20230119123257_add_fk_to_ci_resources_on_partition_id_and_build_id.rb b/db/post_migrate/20230119123257_add_fk_to_ci_resources_on_partition_id_and_build_id.rb deleted file mode 100644 index 8279def779e81..0000000000000 --- a/db/post_migrate/20230119123257_add_fk_to_ci_resources_on_partition_id_and_build_id.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -class AddFkToCiResourcesOnPartitionIdAndBuildId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - SOURCE_TABLE_NAME = :ci_resources - TARGET_TABLE_NAME = :ci_builds - COLUMN = :build_id - TARGET_COLUMN = :id - FK_NAME = :fk_e169a8e3d5_p - PARTITION_COLUMN = :partition_id - - def up - add_concurrent_foreign_key( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - column: [PARTITION_COLUMN, COLUMN], - target_column: [PARTITION_COLUMN, TARGET_COLUMN], - validate: false, - reverse_lock_order: true, - on_update: :cascade, - on_delete: :nullify, - name: FK_NAME - ) - end - - def down - with_lock_retries do - remove_foreign_key_if_exists(SOURCE_TABLE_NAME, name: FK_NAME) - end - end -end diff --git a/db/post_migrate/20230119123258_validate_fk_on_ci_resources_partition_id_and_build_id.rb b/db/post_migrate/20230119123258_validate_fk_on_ci_resources_partition_id_and_build_id.rb deleted file mode 100644 index 3df7f27d92118..0000000000000 --- a/db/post_migrate/20230119123258_validate_fk_on_ci_resources_partition_id_and_build_id.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class ValidateFkOnCiResourcesPartitionIdAndBuildId < Gitlab::Database::Migration[2.1] - TABLE_NAME = :ci_resources - FK_NAME = :fk_e169a8e3d5_p - COLUMNS = [:partition_id, :build_id] - - def up - validate_foreign_key(TABLE_NAME, COLUMNS, name: FK_NAME) - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20230119123259_remove_fk_to_ci_builds_ci_resources_on_build_id.rb b/db/post_migrate/20230119123259_remove_fk_to_ci_builds_ci_resources_on_build_id.rb deleted file mode 100644 index fcf6989f30da4..0000000000000 --- a/db/post_migrate/20230119123259_remove_fk_to_ci_builds_ci_resources_on_build_id.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class RemoveFkToCiBuildsCiResourcesOnBuildId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - SOURCE_TABLE_NAME = :ci_resources - TARGET_TABLE_NAME = :ci_builds - COLUMN = :build_id - TARGET_COLUMN = :id - FK_NAME = :fk_e169a8e3d5 - - def up - with_lock_retries do - remove_foreign_key_if_exists(SOURCE_TABLE_NAME, name: FK_NAME) - end - end - - def down - add_concurrent_foreign_key( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - column: COLUMN, - target_column: TARGET_COLUMN, - validate: true, - reverse_lock_order: true, - on_delete: :nullify, - name: FK_NAME - ) - end -end diff --git a/db/post_migrate/20230119123908_add_temporary_size_index_to_package_files.rb b/db/post_migrate/20230119123908_add_temporary_size_index_to_package_files.rb deleted file mode 100644 index dbd1f2ce112d0..0000000000000 --- a/db/post_migrate/20230119123908_add_temporary_size_index_to_package_files.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddTemporarySizeIndexToPackageFiles < Gitlab::Database::Migration[2.1] - INDEX_NAME = 'tmp_idx_package_files_on_non_zero_size' - - disable_ddl_transaction! - - def up - # Temporary index to be removed in 16.0 https://gitlab.com/gitlab-org/gitlab/-/issues/386695 - add_concurrent_index :packages_package_files, - %i[package_id size], - where: 'size IS NOT NULL', - name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :packages_package_files, INDEX_NAME - end -end diff --git a/db/post_migrate/20230119123937_queue_fix_incoherent_packages_size_on_project_statistics.rb b/db/post_migrate/20230119123937_queue_fix_incoherent_packages_size_on_project_statistics.rb deleted file mode 100644 index b00888e28d5c5..0000000000000 --- a/db/post_migrate/20230119123937_queue_fix_incoherent_packages_size_on_project_statistics.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class QueueFixIncoherentPackagesSizeOnProjectStatistics < Gitlab::Database::Migration[2.1] - MIGRATION = 'FixIncoherentPackagesSizeOnProjectStatistics' - DELAY_INTERVAL = 2.minutes - BATCH_SIZE = 17000 - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - class Package < MigrationRecord - self.table_name = 'packages_packages' - end - - def up - return unless ::QueueFixIncoherentPackagesSizeOnProjectStatistics::Package.exists? - - queue_batched_background_migration( - MIGRATION, - :project_statistics, - :id, - job_interval: DELAY_INTERVAL, - batch_size: BATCH_SIZE - ) - end - - def down - delete_batched_background_migration(MIGRATION, :project_statistics, :id, []) - end -end diff --git a/db/post_migrate/20230123095023_add_scan_result_policy_id_to_software_license_policies.rb b/db/post_migrate/20230123095023_add_scan_result_policy_id_to_software_license_policies.rb deleted file mode 100644 index 7f61b3bfe8533..0000000000000 --- a/db/post_migrate/20230123095023_add_scan_result_policy_id_to_software_license_policies.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddScanResultPolicyIdToSoftwareLicensePolicies < Gitlab::Database::Migration[2.1] - INDEX_NAME = "index_software_license_policies_on_scan_result_policy_id" - - def change - # rubocop:disable Migration/AddReference - add_reference :software_license_policies, - :scan_result_policy, - foreign_key: { on_delete: :cascade }, - index: { name: INDEX_NAME }, - null: true - # rubocop:enable Migration/AddReference - end -end diff --git a/db/post_migrate/20230124101832_remove_fk_to_ci_builds_ci_unit_test_failure_on_build_id.rb b/db/post_migrate/20230124101832_remove_fk_to_ci_builds_ci_unit_test_failure_on_build_id.rb deleted file mode 100644 index 943c458d0fec6..0000000000000 --- a/db/post_migrate/20230124101832_remove_fk_to_ci_builds_ci_unit_test_failure_on_build_id.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -class RemoveFkToCiBuildsCiUnitTestFailureOnBuildId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - SOURCE_TABLE_NAME = :ci_unit_test_failures - TARGET_TABLE_NAME = :ci_builds - COLUMN = :build_id - TARGET_COLUMN = :id - FK_NAME = :fk_0f09856e1f - - def up - with_lock_retries do - remove_foreign_key_if_exists( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - name: FK_NAME, - reverse_lock_order: true - ) - end - end - - def down - add_concurrent_foreign_key( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - column: COLUMN, - target_column: TARGET_COLUMN, - validate: true, - reverse_lock_order: true, - on_delete: :cascade, - name: FK_NAME - ) - end -end diff --git a/db/post_migrate/20230124102131_remove_fk_to_ci_builds_ci_build_pending_state_on_build_id.rb b/db/post_migrate/20230124102131_remove_fk_to_ci_builds_ci_build_pending_state_on_build_id.rb deleted file mode 100644 index a969aec0968a3..0000000000000 --- a/db/post_migrate/20230124102131_remove_fk_to_ci_builds_ci_build_pending_state_on_build_id.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -class RemoveFkToCiBuildsCiBuildPendingStateOnBuildId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - SOURCE_TABLE_NAME = :ci_build_pending_states - TARGET_TABLE_NAME = :ci_builds - COLUMN = :build_id - TARGET_COLUMN = :id - FK_NAME = :fk_rails_0bbbfeaf9d - - def up - with_lock_retries do - remove_foreign_key_if_exists( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - name: FK_NAME, - reverse_lock_order: true - ) - end - end - - def down - add_concurrent_foreign_key( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - column: COLUMN, - target_column: TARGET_COLUMN, - validate: true, - reverse_lock_order: true, - on_delete: :cascade, - name: FK_NAME - ) - end -end diff --git a/db/post_migrate/20230124102222_remove_fk_to_ci_builds_ci_build_trace_chunk_on_build_id.rb b/db/post_migrate/20230124102222_remove_fk_to_ci_builds_ci_build_trace_chunk_on_build_id.rb deleted file mode 100644 index 3e03b0774eebb..0000000000000 --- a/db/post_migrate/20230124102222_remove_fk_to_ci_builds_ci_build_trace_chunk_on_build_id.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -class RemoveFkToCiBuildsCiBuildTraceChunkOnBuildId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - SOURCE_TABLE_NAME = :ci_build_trace_chunks - TARGET_TABLE_NAME = :ci_builds - COLUMN = :build_id - TARGET_COLUMN = :id - FK_NAME = :fk_rails_1013b761f2 - - def up - with_lock_retries do - remove_foreign_key_if_exists( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - name: FK_NAME, - reverse_lock_order: true - ) - end - end - - def down - add_concurrent_foreign_key( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - column: COLUMN, - target_column: TARGET_COLUMN, - validate: true, - reverse_lock_order: true, - on_delete: :cascade, - name: FK_NAME - ) - end -end diff --git a/db/post_migrate/20230124104310_prepare_web_hook_logs_id_created_at_async_index.rb b/db/post_migrate/20230124104310_prepare_web_hook_logs_id_created_at_async_index.rb deleted file mode 100644 index d22fda092d371..0000000000000 --- a/db/post_migrate/20230124104310_prepare_web_hook_logs_id_created_at_async_index.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -class PrepareWebHookLogsIdCreatedAtAsyncIndex < Gitlab::Database::Migration[2.1] - include Gitlab::Database::PartitioningMigrationHelpers - - disable_ddl_transaction! - - INDEX_NAME = 'index_web_hook_logs_on_web_hook_id_and_created_at' - - def up - # Since web_hook_logs is a partitioned table, we need to prepare the index - # for each partition individually. We can't use the `prepare_async_index` - # method directly because it will try to prepare the index for the whole - # table, which will fail. - - # In a future migration after this one, we will create the index on the - # parent table itself. - each_partition(:web_hook_logs) do |partition, partition_index_name| - prepare_async_index(partition.identifier, [:web_hook_id, :created_at], - name: partition_index_name) - end - end - - def down - each_partition(:web_hook_logs) do |partition, partition_index_name| - unprepare_async_index_by_name(partition.identifier, partition_index_name) - end - end - - private - - def each_partition(table_name) - partitioned_table = find_partitioned_table(table_name) - partitioned_table.postgres_partitions.order(:name).each do |partition| - partition_index_name = generated_index_name(partition.identifier, INDEX_NAME) - - yield partition, partition_index_name - end - end -end diff --git a/db/post_migrate/20230125093723_rebalance_partition_id_ci_pipeline.rb b/db/post_migrate/20230125093723_rebalance_partition_id_ci_pipeline.rb deleted file mode 100644 index c7a7d9669117d..0000000000000 --- a/db/post_migrate/20230125093723_rebalance_partition_id_ci_pipeline.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class RebalancePartitionIdCiPipeline < Gitlab::Database::Migration[2.1] - def up - # no-op - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20230125093840_rebalance_partition_id_ci_build.rb b/db/post_migrate/20230125093840_rebalance_partition_id_ci_build.rb deleted file mode 100644 index a4514e958f930..0000000000000 --- a/db/post_migrate/20230125093840_rebalance_partition_id_ci_build.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class RebalancePartitionIdCiBuild < Gitlab::Database::Migration[2.1] - def up - # no-op - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20230126091522_add_unique_index_to_ci_build_pending_state.rb b/db/post_migrate/20230126091522_add_unique_index_to_ci_build_pending_state.rb deleted file mode 100644 index 484b64feb970d..0000000000000 --- a/db/post_migrate/20230126091522_add_unique_index_to_ci_build_pending_state.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class AddUniqueIndexToCiBuildPendingState < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - OLD_INDEX_NAME = :index_ci_build_pending_states_on_partition_id_build_id - NEW_INDEX_NAME = :unique_index_ci_build_pending_states_on_partition_id_build_id - TABLE_NAME = :ci_build_pending_states - COLUMNS = [:partition_id, :build_id] - - def up - add_concurrent_index(TABLE_NAME, COLUMNS, unique: true, name: NEW_INDEX_NAME) - - remove_concurrent_index_by_name(TABLE_NAME, OLD_INDEX_NAME) - end - - def down - add_concurrent_index(TABLE_NAME, COLUMNS, name: OLD_INDEX_NAME) - - remove_concurrent_index_by_name(TABLE_NAME, NEW_INDEX_NAME) - end -end diff --git a/db/post_migrate/20230126133531_remove_not_null_constraints_for_tables_with_schema_differences_v3.rb b/db/post_migrate/20230126133531_remove_not_null_constraints_for_tables_with_schema_differences_v3.rb deleted file mode 100644 index 04ed7a7ee1238..0000000000000 --- a/db/post_migrate/20230126133531_remove_not_null_constraints_for_tables_with_schema_differences_v3.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class RemoveNotNullConstraintsForTablesWithSchemaDifferencesV3 < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - return unless Gitlab.com? - - change_column_null :integrations, :updated_at, true - change_column_null :integrations, :created_at, true - - change_column_null :project_settings, :show_default_award_emojis, true - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20230127101834_backfill_merge_request_metrics_for_bigint_conversion.rb b/db/post_migrate/20230127101834_backfill_merge_request_metrics_for_bigint_conversion.rb deleted file mode 100644 index 02ef1c230da23..0000000000000 --- a/db/post_migrate/20230127101834_backfill_merge_request_metrics_for_bigint_conversion.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class BackfillMergeRequestMetricsForBigintConversion < Gitlab::Database::Migration[2.1] - restrict_gitlab_migration gitlab_schema: :gitlab_main - - TABLE = :merge_request_metrics - COLUMNS = %i[id] - - def up - backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS, sub_batch_size: 200) - end - - def down - revert_backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end -end diff --git a/db/post_migrate/20230127115607_add_hosted_plan_id_and_trial_index_to_gitlab_subscriptions.rb b/db/post_migrate/20230127115607_add_hosted_plan_id_and_trial_index_to_gitlab_subscriptions.rb deleted file mode 100644 index 1b16ac5c187f6..0000000000000 --- a/db/post_migrate/20230127115607_add_hosted_plan_id_and_trial_index_to_gitlab_subscriptions.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddHostedPlanIdAndTrialIndexToGitlabSubscriptions < Gitlab::Database::Migration[2.1] - INDEX_NAME = 'index_gitlab_subscriptions_on_hosted_plan_id_and_trial' - - disable_ddl_transaction! - - def up - add_concurrent_index :gitlab_subscriptions, [:hosted_plan_id, :trial], name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :gitlab_subscriptions, INDEX_NAME - end -end diff --git a/db/post_migrate/20230127123947_add_fk_index_to_ci_sources_pipelines_on_source_partition_id_and_source_job_id.rb b/db/post_migrate/20230127123947_add_fk_index_to_ci_sources_pipelines_on_source_partition_id_and_source_job_id.rb deleted file mode 100644 index f2a9d362cc468..0000000000000 --- a/db/post_migrate/20230127123947_add_fk_index_to_ci_sources_pipelines_on_source_partition_id_and_source_job_id.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddFkIndexToCiSourcesPipelinesOnSourcePartitionIdAndSourceJobId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = :index_ci_sources_pipelines_on_source_partition_id_source_job_id - TABLE_NAME = :ci_sources_pipelines - COLUMNS = [:source_partition_id, :source_job_id] - - def up - add_concurrent_index(TABLE_NAME, COLUMNS, name: INDEX_NAME) - end - - def down - remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME) - end -end diff --git a/db/post_migrate/20230127123948_add_fk_to_ci_sources_pipelines_on_source_partition_id_and_source_job_id.rb b/db/post_migrate/20230127123948_add_fk_to_ci_sources_pipelines_on_source_partition_id_and_source_job_id.rb deleted file mode 100644 index 7adf97268ff40..0000000000000 --- a/db/post_migrate/20230127123948_add_fk_to_ci_sources_pipelines_on_source_partition_id_and_source_job_id.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -class AddFkToCiSourcesPipelinesOnSourcePartitionIdAndSourceJobId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - SOURCE_TABLE_NAME = :ci_sources_pipelines - TARGET_TABLE_NAME = :ci_builds - COLUMN = :source_job_id - TARGET_COLUMN = :id - FK_NAME = :fk_be5624bf37_p - PARTITION_COLUMN = :source_partition_id - - def up - add_concurrent_foreign_key( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - column: [PARTITION_COLUMN, COLUMN], - target_column: [:partition_id, TARGET_COLUMN], - validate: false, - reverse_lock_order: true, - on_update: :cascade, - on_delete: :cascade, - name: FK_NAME - ) - end - - def down - with_lock_retries do - remove_foreign_key_if_exists( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - name: FK_NAME, - reverse_lock_order: true - ) - end - end -end diff --git a/db/post_migrate/20230127125018_remove_hosted_plan_id_index_from_gitlab_subscriptions.rb b/db/post_migrate/20230127125018_remove_hosted_plan_id_index_from_gitlab_subscriptions.rb deleted file mode 100644 index 6cc21920748b8..0000000000000 --- a/db/post_migrate/20230127125018_remove_hosted_plan_id_index_from_gitlab_subscriptions.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class RemoveHostedPlanIdIndexFromGitlabSubscriptions < Gitlab::Database::Migration[2.1] - OLD_INDEX_NAME = 'index_gitlab_subscriptions_on_hosted_plan_id' - NEW_INDEX_NAME = 'index_gitlab_subscriptions_on_hosted_plan_id_and_trial' - TABLE = :gitlab_subscriptions - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name TABLE, OLD_INDEX_NAME if index_exists_by_name?(TABLE, NEW_INDEX_NAME) - end - - def down - add_concurrent_index TABLE, :hosted_plan_id, name: OLD_INDEX_NAME - end -end diff --git a/db/post_migrate/20230127131835_add_application_settings_git_users_alertlist_max_usernames_constraint.rb b/db/post_migrate/20230127131835_add_application_settings_git_users_alertlist_max_usernames_constraint.rb deleted file mode 100644 index 77ef7e7eba58c..0000000000000 --- a/db/post_migrate/20230127131835_add_application_settings_git_users_alertlist_max_usernames_constraint.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddApplicationSettingsGitUsersAlertlistMaxUsernamesConstraint < Gitlab::Database::Migration[2.1] - CONSTRAINT_NAME = 'app_settings_git_rate_limit_users_alertlist_max_usernames' - - disable_ddl_transaction! - - def up - add_check_constraint :application_settings, 'CARDINALITY(git_rate_limit_users_alertlist) <= 100', CONSTRAINT_NAME - end - - def down - remove_check_constraint :application_settings, CONSTRAINT_NAME - end -end diff --git a/db/post_migrate/20230127131915_add_namespace_settings_unique_project_download_limit_alertlist_size_constraint.rb b/db/post_migrate/20230127131915_add_namespace_settings_unique_project_download_limit_alertlist_size_constraint.rb deleted file mode 100644 index 0777d31aa3bfe..0000000000000 --- a/db/post_migrate/20230127131915_add_namespace_settings_unique_project_download_limit_alertlist_size_constraint.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddNamespaceSettingsUniqueProjectDownloadLimitAlertlistSizeConstraint < Gitlab::Database::Migration[2.1] - CONSTRAINT_NAME = 'namespace_settings_unique_project_download_limit_alertlist_size' - - disable_ddl_transaction! - - def up - add_check_constraint :namespace_settings, - 'CARDINALITY(unique_project_download_limit_alertlist) <= 100', - CONSTRAINT_NAME - end - - def down - remove_check_constraint :namespace_settings, CONSTRAINT_NAME - end -end diff --git a/db/post_migrate/20230127151606_add_fk_index_to_ci_build_trace_metadata_on_partition_id_and_build_id.rb b/db/post_migrate/20230127151606_add_fk_index_to_ci_build_trace_metadata_on_partition_id_and_build_id.rb deleted file mode 100644 index a13ba0c21fbcb..0000000000000 --- a/db/post_migrate/20230127151606_add_fk_index_to_ci_build_trace_metadata_on_partition_id_and_build_id.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddFkIndexToCiBuildTraceMetadataOnPartitionIdAndBuildId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = :index_ci_build_trace_metadata_on_partition_id_build_id - TABLE_NAME = :ci_build_trace_metadata - COLUMNS = [:partition_id, :build_id] - - def up - add_concurrent_index(TABLE_NAME, COLUMNS, name: INDEX_NAME, unique: true) - end - - def down - remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME) - end -end diff --git a/db/post_migrate/20230127151607_add_fk_to_ci_build_trace_metadata_on_partition_id_and_build_id.rb b/db/post_migrate/20230127151607_add_fk_to_ci_build_trace_metadata_on_partition_id_and_build_id.rb deleted file mode 100644 index 389cfc6a4ec1f..0000000000000 --- a/db/post_migrate/20230127151607_add_fk_to_ci_build_trace_metadata_on_partition_id_and_build_id.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -class AddFkToCiBuildTraceMetadataOnPartitionIdAndBuildId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - SOURCE_TABLE_NAME = :ci_build_trace_metadata - TARGET_TABLE_NAME = :ci_builds - COLUMN = :build_id - TARGET_COLUMN = :id - FK_NAME = :fk_rails_aebc78111f_p - PARTITION_COLUMN = :partition_id - - def up - add_concurrent_foreign_key( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - column: [PARTITION_COLUMN, COLUMN], - target_column: [PARTITION_COLUMN, TARGET_COLUMN], - validate: false, - reverse_lock_order: true, - on_update: :cascade, - on_delete: :cascade, - name: FK_NAME - ) - end - - def down - with_lock_retries do - remove_foreign_key_if_exists( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - name: FK_NAME, - reverse_lock_order: true - ) - end - end -end diff --git a/db/post_migrate/20230127152727_add_fk_index_to_ci_job_artifacts_on_partition_id_and_job_id.rb b/db/post_migrate/20230127152727_add_fk_index_to_ci_job_artifacts_on_partition_id_and_job_id.rb deleted file mode 100644 index 66933fa600ec7..0000000000000 --- a/db/post_migrate/20230127152727_add_fk_index_to_ci_job_artifacts_on_partition_id_and_job_id.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddFkIndexToCiJobArtifactsOnPartitionIdAndJobId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = :index_ci_job_artifacts_on_partition_id_job_id - TABLE_NAME = :ci_job_artifacts - COLUMNS = [:partition_id, :job_id] - - def up - add_concurrent_index(TABLE_NAME, COLUMNS, name: INDEX_NAME) - end - - def down - remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME) - end -end diff --git a/db/post_migrate/20230127152728_add_fk_to_ci_job_artifacts_on_partition_id_and_job_id.rb b/db/post_migrate/20230127152728_add_fk_to_ci_job_artifacts_on_partition_id_and_job_id.rb deleted file mode 100644 index 7c7cf7861ea2b..0000000000000 --- a/db/post_migrate/20230127152728_add_fk_to_ci_job_artifacts_on_partition_id_and_job_id.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -class AddFkToCiJobArtifactsOnPartitionIdAndJobId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - SOURCE_TABLE_NAME = :ci_job_artifacts - TARGET_TABLE_NAME = :ci_builds - COLUMN = :job_id - TARGET_COLUMN = :id - FK_NAME = :fk_rails_c5137cb2c1_p - PARTITION_COLUMN = :partition_id - - def up - add_concurrent_foreign_key( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - column: [PARTITION_COLUMN, COLUMN], - target_column: [PARTITION_COLUMN, TARGET_COLUMN], - validate: false, - reverse_lock_order: true, - on_update: :cascade, - on_delete: :cascade, - name: FK_NAME - ) - end - - def down - with_lock_retries do - remove_foreign_key_if_exists( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - name: FK_NAME, - reverse_lock_order: true - ) - end - end -end diff --git a/db/post_migrate/20230127153229_add_fk_index_to_ci_job_variables_on_partition_id_and_job_id.rb b/db/post_migrate/20230127153229_add_fk_index_to_ci_job_variables_on_partition_id_and_job_id.rb deleted file mode 100644 index b06da3fc93379..0000000000000 --- a/db/post_migrate/20230127153229_add_fk_index_to_ci_job_variables_on_partition_id_and_job_id.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddFkIndexToCiJobVariablesOnPartitionIdAndJobId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = :index_ci_job_variables_on_partition_id_job_id - TABLE_NAME = :ci_job_variables - COLUMNS = [:partition_id, :job_id] - - def up - add_concurrent_index(TABLE_NAME, COLUMNS, name: INDEX_NAME) - end - - def down - remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME) - end -end diff --git a/db/post_migrate/20230127153230_add_fk_to_ci_job_variables_on_partition_id_and_job_id.rb b/db/post_migrate/20230127153230_add_fk_to_ci_job_variables_on_partition_id_and_job_id.rb deleted file mode 100644 index 7a6950fa96cf5..0000000000000 --- a/db/post_migrate/20230127153230_add_fk_to_ci_job_variables_on_partition_id_and_job_id.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -class AddFkToCiJobVariablesOnPartitionIdAndJobId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - SOURCE_TABLE_NAME = :ci_job_variables - TARGET_TABLE_NAME = :ci_builds - COLUMN = :job_id - TARGET_COLUMN = :id - FK_NAME = :fk_rails_fbf3b34792_p - PARTITION_COLUMN = :partition_id - - def up - add_concurrent_foreign_key( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - column: [PARTITION_COLUMN, COLUMN], - target_column: [PARTITION_COLUMN, TARGET_COLUMN], - validate: false, - reverse_lock_order: true, - on_update: :cascade, - on_delete: :cascade, - name: FK_NAME - ) - end - - def down - with_lock_retries do - remove_foreign_key_if_exists( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - name: FK_NAME, - reverse_lock_order: true - ) - end - end -end diff --git a/db/post_migrate/20230130070623_add_index_on_packages_package_file_file_name.rb b/db/post_migrate/20230130070623_add_index_on_packages_package_file_file_name.rb deleted file mode 100644 index d7b495df27222..0000000000000 --- a/db/post_migrate/20230130070623_add_index_on_packages_package_file_file_name.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnPackagesPackageFileFileName < Gitlab::Database::Migration[2.1] - INDEX_NAME = 'index_packages_package_files_on_file_name' - - def up - prepare_async_index :packages_package_files, :file_name, name: INDEX_NAME, using: :gin, - opclass: { description: :gin_trgm_ops } - end - - def down - unprepare_async_index :packages_package_files, :file_name, name: INDEX_NAME - end -end diff --git a/db/post_migrate/20230130073109_nullify_creator_id_of_orphaned_projects.rb b/db/post_migrate/20230130073109_nullify_creator_id_of_orphaned_projects.rb deleted file mode 100644 index c13c6552c8e10..0000000000000 --- a/db/post_migrate/20230130073109_nullify_creator_id_of_orphaned_projects.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class NullifyCreatorIdOfOrphanedProjects < Gitlab::Database::Migration[2.1] - restrict_gitlab_migration gitlab_schema: :gitlab_main - - BATCH_SIZE = 1000 - SUB_BATCH_SIZE = 500 - MAX_BATCH_SIZE = 5000 - MIGRATION = 'NullifyCreatorIdColumnOfOrphanedProjects' - INTERVAL = 2.minutes - - def up - queue_batched_background_migration( - MIGRATION, - :projects, - :id, - job_interval: INTERVAL, - batch_size: BATCH_SIZE, - max_batch_size: MAX_BATCH_SIZE, - sub_batch_size: SUB_BATCH_SIZE - ) - end - - def down - delete_batched_background_migration(MIGRATION, :projects, :id, []) - end -end diff --git a/db/post_migrate/20230130075434_schedule_tmp_index_to_ci_build_report_results.rb b/db/post_migrate/20230130075434_schedule_tmp_index_to_ci_build_report_results.rb deleted file mode 100644 index 778510e9fcb59..0000000000000 --- a/db/post_migrate/20230130075434_schedule_tmp_index_to_ci_build_report_results.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class ScheduleTmpIndexToCiBuildReportResults < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = :tmp_index_ci_build_report_results_on_partition_id_and_build_id - TABLE_NAME = :ci_build_report_results - - def up - return unless Gitlab.com? - - prepare_async_index(TABLE_NAME, [:partition_id, :build_id], where: 'partition_id = 101', name: INDEX_NAME) - end - - def down - return unless Gitlab.com? - - unprepare_async_index_by_name(TABLE_NAME, INDEX_NAME) - end -end diff --git a/db/post_migrate/20230130084718_drop_invalid_async_index_from_postgres_async_index.rb b/db/post_migrate/20230130084718_drop_invalid_async_index_from_postgres_async_index.rb deleted file mode 100644 index ebe28eb408853..0000000000000 --- a/db/post_migrate/20230130084718_drop_invalid_async_index_from_postgres_async_index.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class DropInvalidAsyncIndexFromPostgresAsyncIndex < Gitlab::Database::Migration[2.1] - # rollback 20230117092947_add_tmp_index_to_ci_build_report_results.rb - disable_ddl_transaction! - - INDEX_NAME = 'tmp_index_ci_build_report_results_on_partition_id_and_id' - TABLE_NAME = 'ci_build_report_results' - - def up - return unless Gitlab.com? - - unprepare_async_index_by_name(TABLE_NAME, INDEX_NAME) - end - - def down - return unless Gitlab.com? - - prepare_async_index(TABLE_NAME, [:partition_id, :id], where: 'partition_id = 101', name: INDEX_NAME) - end -end diff --git a/db/post_migrate/20230130102855_add_fk_index_to_ci_build_report_results_on_partition_id_and_build_id.rb b/db/post_migrate/20230130102855_add_fk_index_to_ci_build_report_results_on_partition_id_and_build_id.rb deleted file mode 100644 index 4fe71ba46d972..0000000000000 --- a/db/post_migrate/20230130102855_add_fk_index_to_ci_build_report_results_on_partition_id_and_build_id.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddFkIndexToCiBuildReportResultsOnPartitionIdAndBuildId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = :index_ci_build_report_results_on_partition_id_build_id - TABLE_NAME = :ci_build_report_results - COLUMNS = [:partition_id, :build_id] - - def up - add_concurrent_index(TABLE_NAME, COLUMNS, unique: true, name: INDEX_NAME) - end - - def down - remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME) - end -end diff --git a/db/post_migrate/20230130102856_add_fk_to_ci_build_report_results_on_partition_id_and_build_id.rb b/db/post_migrate/20230130102856_add_fk_to_ci_build_report_results_on_partition_id_and_build_id.rb deleted file mode 100644 index ef301af2c9fb0..0000000000000 --- a/db/post_migrate/20230130102856_add_fk_to_ci_build_report_results_on_partition_id_and_build_id.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -class AddFkToCiBuildReportResultsOnPartitionIdAndBuildId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - SOURCE_TABLE_NAME = :ci_build_report_results - TARGET_TABLE_NAME = :ci_builds - COLUMN = :build_id - TARGET_COLUMN = :id - FK_NAME = :fk_rails_16cb1ff064_p - PARTITION_COLUMN = :partition_id - - def up - add_concurrent_foreign_key( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - column: [PARTITION_COLUMN, COLUMN], - target_column: [PARTITION_COLUMN, TARGET_COLUMN], - validate: false, - reverse_lock_order: true, - on_update: :cascade, - on_delete: :cascade, - name: FK_NAME - ) - end - - def down - with_lock_retries do - remove_foreign_key_if_exists( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - name: FK_NAME, - reverse_lock_order: true - ) - end - end -end diff --git a/db/post_migrate/20230130103957_add_fk_index_to_ci_build_needs_on_partition_id_and_build_id.rb b/db/post_migrate/20230130103957_add_fk_index_to_ci_build_needs_on_partition_id_and_build_id.rb deleted file mode 100644 index cea4070a8be98..0000000000000 --- a/db/post_migrate/20230130103957_add_fk_index_to_ci_build_needs_on_partition_id_and_build_id.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddFkIndexToCiBuildNeedsOnPartitionIdAndBuildId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = :index_ci_build_needs_on_partition_id_build_id - TABLE_NAME = :ci_build_needs - COLUMNS = [:partition_id, :build_id] - - def up - add_concurrent_index(TABLE_NAME, COLUMNS, name: INDEX_NAME) - end - - def down - remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME) - end -end diff --git a/db/post_migrate/20230130103958_add_fk_to_ci_build_needs_on_partition_id_and_build_id.rb b/db/post_migrate/20230130103958_add_fk_to_ci_build_needs_on_partition_id_and_build_id.rb deleted file mode 100644 index 46985f12ff9bb..0000000000000 --- a/db/post_migrate/20230130103958_add_fk_to_ci_build_needs_on_partition_id_and_build_id.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -class AddFkToCiBuildNeedsOnPartitionIdAndBuildId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - SOURCE_TABLE_NAME = :ci_build_needs - TARGET_TABLE_NAME = :ci_builds - COLUMN = :build_id - TARGET_COLUMN = :id - FK_NAME = :fk_rails_3cf221d4ed_p - PARTITION_COLUMN = :partition_id - - def up - add_concurrent_foreign_key( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - column: [PARTITION_COLUMN, COLUMN], - target_column: [PARTITION_COLUMN, TARGET_COLUMN], - validate: false, - reverse_lock_order: true, - on_update: :cascade, - on_delete: :cascade, - name: FK_NAME - ) - end - - def down - with_lock_retries do - remove_foreign_key_if_exists( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - name: FK_NAME, - reverse_lock_order: true - ) - end - end -end diff --git a/db/post_migrate/20230130202201_backfill_sent_notifications_for_bigint_conversion.rb b/db/post_migrate/20230130202201_backfill_sent_notifications_for_bigint_conversion.rb deleted file mode 100644 index 2c8efed8dc296..0000000000000 --- a/db/post_migrate/20230130202201_backfill_sent_notifications_for_bigint_conversion.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class BackfillSentNotificationsForBigintConversion < Gitlab::Database::Migration[2.1] - restrict_gitlab_migration gitlab_schema: :gitlab_main - - TABLE = :sent_notifications - COLUMNS = %i[id] - - def up - backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end - - def down - revert_backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end -end diff --git a/db/post_migrate/20230131005411_backfill_notes_id_for_bigint_conversion.rb b/db/post_migrate/20230131005411_backfill_notes_id_for_bigint_conversion.rb deleted file mode 100644 index b0ccc14e947d4..0000000000000 --- a/db/post_migrate/20230131005411_backfill_notes_id_for_bigint_conversion.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class BackfillNotesIdForBigintConversion < Gitlab::Database::Migration[2.1] - TABLE = :notes - COLUMNS = %i[id] - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS, sub_batch_size: 500) - end - - def down - revert_backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end -end diff --git a/db/post_migrate/20230131194959_remove_invalid_deploy_access_level.rb b/db/post_migrate/20230131194959_remove_invalid_deploy_access_level.rb deleted file mode 100644 index 13e49ca087da0..0000000000000 --- a/db/post_migrate/20230131194959_remove_invalid_deploy_access_level.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class RemoveInvalidDeployAccessLevel < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - # no-op, moved to 20230322151605_rerun_remove_invalid_deploy_access_level.rb - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20230131210921_prepare_index_for_vulnerability_reads_on_project_id_scanner_id_vulnerability_id.rb b/db/post_migrate/20230131210921_prepare_index_for_vulnerability_reads_on_project_id_scanner_id_vulnerability_id.rb deleted file mode 100644 index 0ac4e805f8ad4..0000000000000 --- a/db/post_migrate/20230131210921_prepare_index_for_vulnerability_reads_on_project_id_scanner_id_vulnerability_id.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class PrepareIndexForVulnerabilityReadsOnProjectIdScannerIdVulnerabilityId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = 'idx_vulnerability_reads_project_id_scanner_id_vulnerability_id' - - # Index to be created synchronously in https://gitlab.com/gitlab-org/gitlab/-/issues/382625 - def up - prepare_async_index :vulnerability_reads, [:project_id, :scanner_id, :vulnerability_id], name: INDEX_NAME - end - - def down - unprepare_async_index :vulnerability_reads, [:project_id, :scanner_id, :vulnerability_id], name: INDEX_NAME - end -end diff --git a/db/post_migrate/20230201012846_backfill_todos_note_id_for_bigint_conversion.rb b/db/post_migrate/20230201012846_backfill_todos_note_id_for_bigint_conversion.rb deleted file mode 100644 index a105bea13abdf..0000000000000 --- a/db/post_migrate/20230201012846_backfill_todos_note_id_for_bigint_conversion.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class BackfillTodosNoteIdForBigintConversion < Gitlab::Database::Migration[2.1] - TABLE = :todos - COLUMNS = %i[note_id] - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS, sub_batch_size: 500) - end - - def down - revert_backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end -end diff --git a/db/post_migrate/20230201014238_backfill_system_note_metadata_note_id_for_bigint_conversion.rb b/db/post_migrate/20230201014238_backfill_system_note_metadata_note_id_for_bigint_conversion.rb deleted file mode 100644 index df24b755b7fe5..0000000000000 --- a/db/post_migrate/20230201014238_backfill_system_note_metadata_note_id_for_bigint_conversion.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class BackfillSystemNoteMetadataNoteIdForBigintConversion < Gitlab::Database::Migration[2.1] - TABLE = :system_note_metadata - COLUMNS = %i[note_id] - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end - - def down - revert_backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end -end diff --git a/db/post_migrate/20230201082038_drop_web_hook_calls_high_column.rb b/db/post_migrate/20230201082038_drop_web_hook_calls_high_column.rb deleted file mode 100644 index 76c93be0f4233..0000000000000 --- a/db/post_migrate/20230201082038_drop_web_hook_calls_high_column.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class DropWebHookCallsHighColumn < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - with_lock_retries do - if column_exists?(:plan_limits, :web_hook_calls_high) # rubocop:disable Style/IfUnlessModifier - remove_column :plan_limits, :web_hook_calls_high - end - end - end - - def down - with_lock_retries do - unless column_exists?(:plan_limits, :web_hook_calls_high) - add_column :plan_limits, :web_hook_calls_high, :integer, default: 0 - end - end - end -end diff --git a/db/post_migrate/20230201152525_schedule_fk_index_to_ci_build_needs_on_partition_id_and_build_id.rb b/db/post_migrate/20230201152525_schedule_fk_index_to_ci_build_needs_on_partition_id_and_build_id.rb deleted file mode 100644 index 674d92295c3f9..0000000000000 --- a/db/post_migrate/20230201152525_schedule_fk_index_to_ci_build_needs_on_partition_id_and_build_id.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class ScheduleFkIndexToCiBuildNeedsOnPartitionIdAndBuildId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = :index_ci_build_needs_on_partition_id_build_id - TABLE_NAME = :ci_build_needs - COLUMNS = [:partition_id, :build_id] - - def up - prepare_async_index(TABLE_NAME, COLUMNS, name: INDEX_NAME) - end - - def down - unprepare_async_index_by_name(TABLE_NAME, INDEX_NAME) - end -end diff --git a/db/post_migrate/20230201153450_add_index_on_lfs_objects_file.rb b/db/post_migrate/20230201153450_add_index_on_lfs_objects_file.rb deleted file mode 100644 index 669b3faf3d68d..0000000000000 --- a/db/post_migrate/20230201153450_add_index_on_lfs_objects_file.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnLfsObjectsFile < Gitlab::Database::Migration[2.1] - INDEX_NAME = 'index_lfs_objects_on_file' - - # TODO: Index to be created synchronously in https://gitlab.com/gitlab-org/gitlab/-/issues/390401 - def up - prepare_async_index :lfs_objects, :file, name: INDEX_NAME - end - - def down - unprepare_async_index :lfs_objects, :file, name: INDEX_NAME - end -end diff --git a/db/post_migrate/20230201171450_finalize_backfill_environment_tier_migration.rb b/db/post_migrate/20230201171450_finalize_backfill_environment_tier_migration.rb deleted file mode 100644 index ae4062cb764eb..0000000000000 --- a/db/post_migrate/20230201171450_finalize_backfill_environment_tier_migration.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class FinalizeBackfillEnvironmentTierMigration < Gitlab::Database::Migration[2.1] - MIGRATION = 'BackfillEnvironmentTiers' - disable_ddl_transaction! - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - ensure_batched_background_migration_is_finished( - job_class_name: MIGRATION, - table_name: :environments, - column_name: :id, - job_arguments: [], - finalize: true - ) - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20230202002637_backfill_epic_user_mentions_note_id_for_bigint_conversion.rb b/db/post_migrate/20230202002637_backfill_epic_user_mentions_note_id_for_bigint_conversion.rb deleted file mode 100644 index 1f7af1af78f11..0000000000000 --- a/db/post_migrate/20230202002637_backfill_epic_user_mentions_note_id_for_bigint_conversion.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class BackfillEpicUserMentionsNoteIdForBigintConversion < Gitlab::Database::Migration[2.1] - TABLE = :epic_user_mentions - COLUMNS = %i[note_id] - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end - - def down - revert_backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end -end diff --git a/db/post_migrate/20230202004247_add_index_on_merge_request_diffs_external_diff.rb b/db/post_migrate/20230202004247_add_index_on_merge_request_diffs_external_diff.rb deleted file mode 100644 index 6f8cfced238ee..0000000000000 --- a/db/post_migrate/20230202004247_add_index_on_merge_request_diffs_external_diff.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnMergeRequestDiffsExternalDiff < Gitlab::Database::Migration[2.1] - INDEX_NAME = 'index_merge_request_diffs_on_external_diff' - - # TODO: Index to be created synchronously in https://gitlab.com/gitlab-org/gitlab/-/issues/390399 - def up - prepare_async_index :merge_request_diffs, :external_diff, name: INDEX_NAME - end - - def down - unprepare_async_index :merge_request_diffs, :external_diff, name: INDEX_NAME - end -end diff --git a/db/post_migrate/20230202023224_backfill_suggestions_note_id_for_bigint_conversion.rb b/db/post_migrate/20230202023224_backfill_suggestions_note_id_for_bigint_conversion.rb deleted file mode 100644 index c4bd2ccf0c7f3..0000000000000 --- a/db/post_migrate/20230202023224_backfill_suggestions_note_id_for_bigint_conversion.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class BackfillSuggestionsNoteIdForBigintConversion < Gitlab::Database::Migration[2.1] - TABLE = :suggestions - COLUMNS = %i[note_id] - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end - - def down - revert_backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end -end diff --git a/db/post_migrate/20230202032302_backfill_issue_user_mentions_note_id_for_bigint_conversion.rb b/db/post_migrate/20230202032302_backfill_issue_user_mentions_note_id_for_bigint_conversion.rb deleted file mode 100644 index 749a2f97d7c00..0000000000000 --- a/db/post_migrate/20230202032302_backfill_issue_user_mentions_note_id_for_bigint_conversion.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class BackfillIssueUserMentionsNoteIdForBigintConversion < Gitlab::Database::Migration[2.1] - TABLE = :issue_user_mentions - COLUMNS = %i[note_id] - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS, batch_size: 40_000, sub_batch_size: 500) - end - - def down - revert_backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end -end diff --git a/db/post_migrate/20230202131928_encrypt_ci_trigger_token.rb b/db/post_migrate/20230202131928_encrypt_ci_trigger_token.rb deleted file mode 100644 index c1cb40d1da191..0000000000000 --- a/db/post_migrate/20230202131928_encrypt_ci_trigger_token.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class EncryptCiTriggerToken < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - restrict_gitlab_migration gitlab_schema: :gitlab_ci - - MIGRATION = 'EncryptCiTriggerToken' - DELAY_INTERVAL = 2.minutes - BATCH_SIZE = 1_000 - MAX_BATCH_SIZE = 2_000 - SUB_BATCH_SIZE = 100 - - def up - queue_batched_background_migration( - MIGRATION, - :ci_triggers, - :id, - job_interval: DELAY_INTERVAL, - batch_size: BATCH_SIZE, - max_batch_size: MAX_BATCH_SIZE, - sub_batch_size: SUB_BATCH_SIZE - ) - end - - def down - delete_batched_background_migration(MIGRATION, :ci_triggers, :id, []) - end -end diff --git a/db/post_migrate/20230203122602_schedule_vulnerabilities_feedback_migration3.rb b/db/post_migrate/20230203122602_schedule_vulnerabilities_feedback_migration3.rb deleted file mode 100644 index 7fed726823bdd..0000000000000 --- a/db/post_migrate/20230203122602_schedule_vulnerabilities_feedback_migration3.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class ScheduleVulnerabilitiesFeedbackMigration3 < Gitlab::Database::Migration[2.1] - MIGRATION = 'MigrateVulnerabilitiesFeedbackToVulnerabilitiesStateTransition' - TABLE_NAME = :vulnerability_feedback - BATCH_COLUMN = :id - DELAY_INTERVAL = 5.minutes - BATCH_SIZE = 250 - MAX_BATCH_SIZE = 250 - SUB_BATCH_SIZE = 50 - - disable_ddl_transaction! - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - # replaced by db/post_migrate/20230209171547_schedule_vulnerabilities_feedback_migration4.rb - # no-op - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20230203122609_change_pipeline_name_index.rb b/db/post_migrate/20230203122609_change_pipeline_name_index.rb deleted file mode 100644 index 2f2fef82c9d86..0000000000000 --- a/db/post_migrate/20230203122609_change_pipeline_name_index.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class ChangePipelineNameIndex < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - OLD_INDEX_NAME = 'index_pipeline_metadata_on_pipeline_id_name_lower_text_pattern' - NEW_INDEX_NAME = 'index_pipeline_metadata_on_pipeline_id_name_text_pattern' - - def up - add_concurrent_index :ci_pipeline_metadata, 'pipeline_id, name text_pattern_ops', name: NEW_INDEX_NAME - - remove_concurrent_index_by_name :ci_pipeline_metadata, OLD_INDEX_NAME - end - - def down - add_concurrent_index :ci_pipeline_metadata, 'pipeline_id, lower(name) text_pattern_ops', name: OLD_INDEX_NAME - - remove_concurrent_index_by_name :ci_pipeline_metadata, NEW_INDEX_NAME - end -end diff --git a/db/post_migrate/20230207003812_backfill_note_diff_files_diff_note_id_for_bigint_conversion.rb b/db/post_migrate/20230207003812_backfill_note_diff_files_diff_note_id_for_bigint_conversion.rb deleted file mode 100644 index ce53a855b2a20..0000000000000 --- a/db/post_migrate/20230207003812_backfill_note_diff_files_diff_note_id_for_bigint_conversion.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class BackfillNoteDiffFilesDiffNoteIdForBigintConversion < Gitlab::Database::Migration[2.1] - TABLE = :note_diff_files - COLUMNS = %i[diff_note_id] - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS, batch_size: 40_000) - end - - def down - revert_backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end -end diff --git a/db/post_migrate/20230207005701_backfill_snippet_user_mentions_note_id_for_bigint_conversion.rb b/db/post_migrate/20230207005701_backfill_snippet_user_mentions_note_id_for_bigint_conversion.rb deleted file mode 100644 index 4d4c36bf8fccb..0000000000000 --- a/db/post_migrate/20230207005701_backfill_snippet_user_mentions_note_id_for_bigint_conversion.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class BackfillSnippetUserMentionsNoteIdForBigintConversion < Gitlab::Database::Migration[2.1] - TABLE = :snippet_user_mentions - COLUMNS = %i[note_id] - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end - - def down - revert_backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end -end diff --git a/db/post_migrate/20230207011414_backfill_design_user_mentions_note_id_for_bigint_conversion.rb b/db/post_migrate/20230207011414_backfill_design_user_mentions_note_id_for_bigint_conversion.rb deleted file mode 100644 index 6e971bad3827b..0000000000000 --- a/db/post_migrate/20230207011414_backfill_design_user_mentions_note_id_for_bigint_conversion.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class BackfillDesignUserMentionsNoteIdForBigintConversion < Gitlab::Database::Migration[2.1] - TABLE = :design_user_mentions - COLUMNS = %i[note_id] - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end - - def down - revert_backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end -end diff --git a/db/post_migrate/20230207012238_backfill_vulnerability_user_mentions_note_id_for_bigint_conversion.rb b/db/post_migrate/20230207012238_backfill_vulnerability_user_mentions_note_id_for_bigint_conversion.rb deleted file mode 100644 index e6d674c09cecb..0000000000000 --- a/db/post_migrate/20230207012238_backfill_vulnerability_user_mentions_note_id_for_bigint_conversion.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class BackfillVulnerabilityUserMentionsNoteIdForBigintConversion < Gitlab::Database::Migration[2.1] - TABLE = :vulnerability_user_mentions - COLUMNS = %i[note_id] - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end - - def down - revert_backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end -end diff --git a/db/post_migrate/20230207015850_backfill_commit_user_mentions_note_id_for_bigint_conversion.rb b/db/post_migrate/20230207015850_backfill_commit_user_mentions_note_id_for_bigint_conversion.rb deleted file mode 100644 index d690c00dc7c62..0000000000000 --- a/db/post_migrate/20230207015850_backfill_commit_user_mentions_note_id_for_bigint_conversion.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class BackfillCommitUserMentionsNoteIdForBigintConversion < Gitlab::Database::Migration[2.1] - TABLE = :commit_user_mentions - COLUMNS = %i[note_id] - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end - - def down - revert_backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end -end diff --git a/db/post_migrate/20230207025315_backfill_merge_request_user_mentions_note_id_for_bigint_conversion.rb b/db/post_migrate/20230207025315_backfill_merge_request_user_mentions_note_id_for_bigint_conversion.rb deleted file mode 100644 index 127c1c17bce96..0000000000000 --- a/db/post_migrate/20230207025315_backfill_merge_request_user_mentions_note_id_for_bigint_conversion.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class BackfillMergeRequestUserMentionsNoteIdForBigintConversion < Gitlab::Database::Migration[2.1] - TABLE = :merge_request_user_mentions - COLUMNS = %i[note_id] - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS, batch_size: 30_000, sub_batch_size: 500) - end - - def down - revert_backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end -end diff --git a/db/post_migrate/20230207030259_backfill_timelogs_note_id_for_bigint_conversion.rb b/db/post_migrate/20230207030259_backfill_timelogs_note_id_for_bigint_conversion.rb deleted file mode 100644 index e88b810d81328..0000000000000 --- a/db/post_migrate/20230207030259_backfill_timelogs_note_id_for_bigint_conversion.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class BackfillTimelogsNoteIdForBigintConversion < Gitlab::Database::Migration[2.1] - TABLE = :timelogs - COLUMNS = %i[note_id] - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end - - def down - revert_backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS) - end -end diff --git a/db/post_migrate/20230207143602_schedule_fk_index_to_ci_build_trace_metadata_on_partition_id_and_build_id.rb b/db/post_migrate/20230207143602_schedule_fk_index_to_ci_build_trace_metadata_on_partition_id_and_build_id.rb deleted file mode 100644 index ae51e312fc414..0000000000000 --- a/db/post_migrate/20230207143602_schedule_fk_index_to_ci_build_trace_metadata_on_partition_id_and_build_id.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class ScheduleFkIndexToCiBuildTraceMetadataOnPartitionIdAndBuildId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = :index_ci_build_trace_metadata_on_partition_id_build_id - TABLE_NAME = :ci_build_trace_metadata - COLUMNS = [:partition_id, :build_id] - - def up - prepare_async_index(TABLE_NAME, COLUMNS, name: INDEX_NAME, unique: true) - end - - def down - unprepare_async_index_by_name(TABLE_NAME, INDEX_NAME) - end -end diff --git a/db/post_migrate/20230207143844_schedule_fk_index_to_ci_job_artifacts_on_partition_id_and_job_id.rb b/db/post_migrate/20230207143844_schedule_fk_index_to_ci_job_artifacts_on_partition_id_and_job_id.rb deleted file mode 100644 index c9eda410b3446..0000000000000 --- a/db/post_migrate/20230207143844_schedule_fk_index_to_ci_job_artifacts_on_partition_id_and_job_id.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class ScheduleFkIndexToCiJobArtifactsOnPartitionIdAndJobId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - INDEX_NAME = :index_ci_job_artifacts_on_partition_id_job_id - TABLE_NAME = :ci_job_artifacts - COLUMNS = [:partition_id, :job_id] - - def up - prepare_async_index(TABLE_NAME, COLUMNS, name: INDEX_NAME) - end - - def down - unprepare_async_index_by_name(TABLE_NAME, INDEX_NAME) - end -end diff --git a/db/post_migrate/20230208100917_fix_partition_ids_for_ci_pipeline_variable.rb b/db/post_migrate/20230208100917_fix_partition_ids_for_ci_pipeline_variable.rb deleted file mode 100644 index 8bf1239146c6b..0000000000000 --- a/db/post_migrate/20230208100917_fix_partition_ids_for_ci_pipeline_variable.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class FixPartitionIdsForCiPipelineVariable < Gitlab::Database::Migration[2.1] - def up - # no-op - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20230208103009_fix_partition_ids_for_ci_job_artifact.rb b/db/post_migrate/20230208103009_fix_partition_ids_for_ci_job_artifact.rb deleted file mode 100644 index 7c6ff6c3b4feb..0000000000000 --- a/db/post_migrate/20230208103009_fix_partition_ids_for_ci_job_artifact.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class FixPartitionIdsForCiJobArtifact < Gitlab::Database::Migration[2.1] - def up - # no-op - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20230208110638_cleanup_ci_runner_machines_machine_xid_rename.rb b/db/post_migrate/20230208110638_cleanup_ci_runner_machines_machine_xid_rename.rb deleted file mode 100644 index b596d7773ae8b..0000000000000 --- a/db/post_migrate/20230208110638_cleanup_ci_runner_machines_machine_xid_rename.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class CleanupCiRunnerMachinesMachineXidRename < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - cleanup_concurrent_column_rename :ci_runner_machines, :machine_xid, :system_xid - end - - def down - undo_cleanup_concurrent_column_rename :ci_runner_machines, :machine_xid, :system_xid - end -end diff --git a/db/post_migrate/20230208131808_nullify_last_error_from_project_mirror_data.rb b/db/post_migrate/20230208131808_nullify_last_error_from_project_mirror_data.rb deleted file mode 100644 index 73e6f257498aa..0000000000000 --- a/db/post_migrate/20230208131808_nullify_last_error_from_project_mirror_data.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -class NullifyLastErrorFromProjectMirrorData < Gitlab::Database::Migration[2.1] - MIGRATION = 'NullifyLastErrorFromProjectMirrorData' - INTERVAL = 2.minutes - BATCH_SIZE = 10_000 - SUB_BATCH_SIZE = 1_000 - - disable_ddl_transaction! - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - queue_batched_background_migration( - MIGRATION, - :project_mirror_data, - :id, - job_interval: INTERVAL, - batch_size: BATCH_SIZE, - sub_batch_size: SUB_BATCH_SIZE - ) - end - - def down - delete_batched_background_migration(MIGRATION, :project_mirror_data, :id, []) - end -end diff --git a/db/post_migrate/20230208132608_fix_partition_ids_for_ci_stage.rb b/db/post_migrate/20230208132608_fix_partition_ids_for_ci_stage.rb deleted file mode 100644 index f05a53dda5f56..0000000000000 --- a/db/post_migrate/20230208132608_fix_partition_ids_for_ci_stage.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class FixPartitionIdsForCiStage < Gitlab::Database::Migration[2.1] - def up - # no-op - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20230209090702_fix_partition_ids_for_ci_build_report_result.rb b/db/post_migrate/20230209090702_fix_partition_ids_for_ci_build_report_result.rb deleted file mode 100644 index 4ff3d1a2789a8..0000000000000 --- a/db/post_migrate/20230209090702_fix_partition_ids_for_ci_build_report_result.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class FixPartitionIdsForCiBuildReportResult < Gitlab::Database::Migration[2.1] - def up - # no-op - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20230209092204_fix_partition_ids_for_ci_build_trace_metadata.rb b/db/post_migrate/20230209092204_fix_partition_ids_for_ci_build_trace_metadata.rb deleted file mode 100644 index f682527a296ed..0000000000000 --- a/db/post_migrate/20230209092204_fix_partition_ids_for_ci_build_trace_metadata.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class FixPartitionIdsForCiBuildTraceMetadata < Gitlab::Database::Migration[2.1] - def up - # no-op - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20230209103650_add_unique_software_license_policies_index_on_project_and_scan_result_policy.rb b/db/post_migrate/20230209103650_add_unique_software_license_policies_index_on_project_and_scan_result_policy.rb deleted file mode 100644 index b3e6c42370a6a..0000000000000 --- a/db/post_migrate/20230209103650_add_unique_software_license_policies_index_on_project_and_scan_result_policy.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddUniqueSoftwareLicensePoliciesIndexOnProjectAndScanResultPolicy < Gitlab::Database::Migration[2.1] - INDEX_NAME = 'idx_software_license_policies_unique_on_project_and_scan_policy' - - disable_ddl_transaction! - - def up - add_concurrent_index :software_license_policies, - [:project_id, :software_license_id, :scan_result_policy_id], - unique: true, - name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :software_license_policies, INDEX_NAME - end -end diff --git a/db/post_migrate/20230209103714_add_fk_to_approval_rules_on_scan_result_policy_id.rb b/db/post_migrate/20230209103714_add_fk_to_approval_rules_on_scan_result_policy_id.rb deleted file mode 100644 index cfc2c33b32a7d..0000000000000 --- a/db/post_migrate/20230209103714_add_fk_to_approval_rules_on_scan_result_policy_id.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -class AddFkToApprovalRulesOnScanResultPolicyId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - def up - add_concurrent_foreign_key :approval_project_rules, - :scan_result_policies, - column: :scan_result_policy_id, - on_delete: :cascade, - reverse_lock_order: true - add_concurrent_foreign_key :approval_merge_request_rules, - :scan_result_policies, - column: :scan_result_policy_id, - on_delete: :cascade, - reverse_lock_order: true - end - - def down - remove_foreign_key_if_exists :approval_project_rules, column: :scan_result_policy_id - remove_foreign_key_if_exists :approval_merge_request_rules, column: :scan_result_policy_id - end -end diff --git a/db/post_migrate/20230209123006_remove_unique_software_license_policies_index_on_project.rb b/db/post_migrate/20230209123006_remove_unique_software_license_policies_index_on_project.rb deleted file mode 100644 index 5c69fc6d9fe82..0000000000000 --- a/db/post_migrate/20230209123006_remove_unique_software_license_policies_index_on_project.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class RemoveUniqueSoftwareLicensePoliciesIndexOnProject < Gitlab::Database::Migration[2.1] - INDEX_NAME = 'index_software_license_policies_unique_per_project' - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :software_license_policies, INDEX_NAME - end - - def down - add_concurrent_index :software_license_policies, [:project_id, :software_license_id], unique: true, name: INDEX_NAME - end -end diff --git a/db/post_migrate/20230209131808_recount_epic_cache_counts_v3.rb b/db/post_migrate/20230209131808_recount_epic_cache_counts_v3.rb deleted file mode 100644 index 6252a30045353..0000000000000 --- a/db/post_migrate/20230209131808_recount_epic_cache_counts_v3.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class RecountEpicCacheCountsV3 < Gitlab::Database::Migration[2.1] - MIGRATION = 'ThirdRecountEpicCacheCounts' - DELAY_INTERVAL = 2.minutes.to_i - BATCH_SIZE = 200 - MAX_BATCH_SIZE = 1000 - SUB_BATCH_SIZE = 20 - - disable_ddl_transaction! - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - queue_batched_background_migration( - MIGRATION, - :epics, - :id, - job_interval: DELAY_INTERVAL, - batch_size: BATCH_SIZE, - max_batch_size: MAX_BATCH_SIZE, - sub_batch_size: SUB_BATCH_SIZE, - gitlab_schema: :gitlab_main - ) - end - - def down - delete_batched_background_migration(MIGRATION, :epics, :id, []) - end -end diff --git a/db/post_migrate/20230209140102_fix_partition_ids_for_ci_build_metadata.rb b/db/post_migrate/20230209140102_fix_partition_ids_for_ci_build_metadata.rb deleted file mode 100644 index 785db1be0795c..0000000000000 --- a/db/post_migrate/20230209140102_fix_partition_ids_for_ci_build_metadata.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class FixPartitionIdsForCiBuildMetadata < Gitlab::Database::Migration[2.1] - def up - # no-op - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20230209171547_schedule_vulnerabilities_feedback_migration4.rb b/db/post_migrate/20230209171547_schedule_vulnerabilities_feedback_migration4.rb deleted file mode 100644 index fb2f8fd65cc7e..0000000000000 --- a/db/post_migrate/20230209171547_schedule_vulnerabilities_feedback_migration4.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -class ScheduleVulnerabilitiesFeedbackMigration4 < Gitlab::Database::Migration[2.1] - MIGRATION = 'MigrateVulnerabilitiesFeedbackToVulnerabilitiesStateTransition' - TABLE_NAME = :vulnerability_feedback - BATCH_COLUMN = :id - JOB_INTERVAL = 2.minutes - BATCH_SIZE = 250 - SUB_BATCH_SIZE = 5 - - disable_ddl_transaction! - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - # Delete the previous jobs - delete_batched_background_migration( - MIGRATION, - TABLE_NAME, - BATCH_COLUMN, - [] - ) - - # Reschedule the migration - queue_batched_background_migration( - MIGRATION, - TABLE_NAME, - BATCH_COLUMN, - job_interval: JOB_INTERVAL, - batch_size: BATCH_SIZE, - sub_batch_size: SUB_BATCH_SIZE - ) - end - - def down - delete_batched_background_migration( - MIGRATION, - TABLE_NAME, - BATCH_COLUMN, - [] - ) - end -end diff --git a/db/post_migrate/20230210113924_prepare_index_approval_rules_on_scan_result_policy_id.rb b/db/post_migrate/20230210113924_prepare_index_approval_rules_on_scan_result_policy_id.rb deleted file mode 100644 index 5776d6f737e54..0000000000000 --- a/db/post_migrate/20230210113924_prepare_index_approval_rules_on_scan_result_policy_id.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class PrepareIndexApprovalRulesOnScanResultPolicyId < Gitlab::Database::Migration[2.1] - PROJECT_INDEX_NAME = 'idx_approval_project_rules_on_scan_result_policy_id' - MERGE_REQUEST_INDEX_NAME = 'idx_approval_merge_request_rules_on_scan_result_policy_id' - - # TODO: Index to be created synchronously in https://gitlab.com/gitlab-org/gitlab/-/issues/391312 - def up - prepare_async_index :approval_project_rules, :scan_result_policy_id, name: PROJECT_INDEX_NAME - prepare_async_index :approval_merge_request_rules, :scan_result_policy_id, name: MERGE_REQUEST_INDEX_NAME - end - - def down - unprepare_async_index :approval_project_rules, :scan_result_policy_id, name: PROJECT_INDEX_NAME - unprepare_async_index :approval_merge_request_rules, :scan_result_policy_id, name: MERGE_REQUEST_INDEX_NAME - end -end diff --git a/db/post_migrate/20230214122717_fix_partition_ids_for_ci_job_variables.rb b/db/post_migrate/20230214122717_fix_partition_ids_for_ci_job_variables.rb deleted file mode 100644 index 64f5bc4bb5eec..0000000000000 --- a/db/post_migrate/20230214122717_fix_partition_ids_for_ci_job_variables.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class FixPartitionIdsForCiJobVariables < Gitlab::Database::Migration[2.1] - def up - # no-op - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20230214154101_fix_partition_ids_on_ci_sources_pipelines.rb b/db/post_migrate/20230214154101_fix_partition_ids_on_ci_sources_pipelines.rb deleted file mode 100644 index bbacd13389bf4..0000000000000 --- a/db/post_migrate/20230214154101_fix_partition_ids_on_ci_sources_pipelines.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class FixPartitionIdsOnCiSourcesPipelines < Gitlab::Database::Migration[2.1] - def up - # no-op - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20230214174335_prepare_async_index_web_hook_logs.rb b/db/post_migrate/20230214174335_prepare_async_index_web_hook_logs.rb deleted file mode 100644 index 536f0750b912e..0000000000000 --- a/db/post_migrate/20230214174335_prepare_async_index_web_hook_logs.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -class PrepareAsyncIndexWebHookLogs < Gitlab::Database::Migration[2.1] - include Gitlab::Database::PartitioningMigrationHelpers - - disable_ddl_transaction! - - INDEX_NAME = 'index_web_hook_logs_on_web_hook_id_and_created_at' - - def up - # Since web_hook_logs is a partitioned table, we need to prepare the index - # for each partition individually. We can't use the `prepare_async_index` - # method directly because it will try to prepare the index for the whole - # table, which will fail. - - # In a future migration, we will create the index on the parent table itself. - each_partition(:web_hook_logs) do |partition, partition_index_name| - prepare_async_index(partition.identifier, [:web_hook_id, :created_at], - name: partition_index_name) - end - end - - def down - each_partition(:web_hook_logs) do |partition, partition_index_name| - unprepare_async_index_by_name(partition.identifier, partition_index_name) - end - end - - private - - def each_partition(table_name) - partitioned_table = find_partitioned_table(table_name) - partitioned_table.postgres_partitions.order(:name).each do |partition| - partition_index_name = generated_index_name(partition.identifier, INDEX_NAME) - - yield partition, partition_index_name - end - end -end diff --git a/db/post_migrate/20230216035802_prepare_async_foreign_key_validation_for_ci_build_needs.rb b/db/post_migrate/20230216035802_prepare_async_foreign_key_validation_for_ci_build_needs.rb deleted file mode 100644 index 1c3215a669125..0000000000000 --- a/db/post_migrate/20230216035802_prepare_async_foreign_key_validation_for_ci_build_needs.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class PrepareAsyncForeignKeyValidationForCiBuildNeeds < Gitlab::Database::Migration[2.1] - TABLE_NAME = :ci_build_needs - COLUMN_NAMES = [:partition_id, :build_id] - FOREIGN_KEY_NAME = :fk_rails_3cf221d4ed_p - - def up - prepare_async_foreign_key_validation(TABLE_NAME, COLUMN_NAMES, name: FOREIGN_KEY_NAME) - end - - def down - unprepare_async_foreign_key_validation(TABLE_NAME, COLUMN_NAMES, name: FOREIGN_KEY_NAME) - end -end diff --git a/db/post_migrate/20230216052103_prepare_async_foreign_key_validation_for_ci_build_report_results.rb b/db/post_migrate/20230216052103_prepare_async_foreign_key_validation_for_ci_build_report_results.rb deleted file mode 100644 index e9add3fd2ae3d..0000000000000 --- a/db/post_migrate/20230216052103_prepare_async_foreign_key_validation_for_ci_build_report_results.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class PrepareAsyncForeignKeyValidationForCiBuildReportResults < Gitlab::Database::Migration[2.1] - TABLE_NAME = :ci_build_report_results - COLUMN_NAMES = [:partition_id, :build_id] - FOREIGN_KEY_NAME = :fk_rails_16cb1ff064_p - - def up - prepare_async_foreign_key_validation(TABLE_NAME, COLUMN_NAMES, name: FOREIGN_KEY_NAME) - end - - def down - unprepare_async_foreign_key_validation(TABLE_NAME, COLUMN_NAMES, name: FOREIGN_KEY_NAME) - end -end diff --git a/db/post_migrate/20230216054348_prepare_async_foreign_key_validation_for_ci_job_artifacts.rb b/db/post_migrate/20230216054348_prepare_async_foreign_key_validation_for_ci_job_artifacts.rb deleted file mode 100644 index 6d545361e1086..0000000000000 --- a/db/post_migrate/20230216054348_prepare_async_foreign_key_validation_for_ci_job_artifacts.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class PrepareAsyncForeignKeyValidationForCiJobArtifacts < Gitlab::Database::Migration[2.1] - TABLE_NAME = :ci_job_artifacts - COLUMN_NAMES = [:partition_id, :job_id] - FOREIGN_KEY_NAME = :fk_rails_c5137cb2c1_p - - def up - prepare_async_foreign_key_validation(TABLE_NAME, COLUMN_NAMES, name: FOREIGN_KEY_NAME) - end - - def down - unprepare_async_foreign_key_validation(TABLE_NAME, COLUMN_NAMES, name: FOREIGN_KEY_NAME) - end -end diff --git a/db/schema_migrations/20220824082427 b/db/schema_migrations/20220824082427 deleted file mode 100644 index 1805c95699164..0000000000000 --- a/db/schema_migrations/20220824082427 +++ /dev/null @@ -1 +0,0 @@ -80d083f58cc9b225542c1198c7d9d80fd8202c959c70957400d63d22435999aa \ No newline at end of file diff --git a/db/schema_migrations/20220826152430 b/db/schema_migrations/20220826152430 deleted file mode 100644 index 8808d043924ff..0000000000000 --- a/db/schema_migrations/20220826152430 +++ /dev/null @@ -1 +0,0 @@ -542221bf9d79defa3ea53c6fd408caf7d0736711a51b91dadccf8d0d9743abf7 \ No newline at end of file diff --git a/db/schema_migrations/20220826152432 b/db/schema_migrations/20220826152432 deleted file mode 100644 index d474e3aa7f2ff..0000000000000 --- a/db/schema_migrations/20220826152432 +++ /dev/null @@ -1 +0,0 @@ -1822f41860f04dab2f4290d19b4d7f2fb896567b7b8f3f4d598dda36a1bc1b6a \ No newline at end of file diff --git a/db/schema_migrations/20220908150054 b/db/schema_migrations/20220908150054 deleted file mode 100644 index 125498c3e6306..0000000000000 --- a/db/schema_migrations/20220908150054 +++ /dev/null @@ -1 +0,0 @@ -820ab42535cf8291960e41f26395d4f820c0a464b6b1bbf51955d79a16e900ab \ No newline at end of file diff --git a/db/schema_migrations/20220920180451 b/db/schema_migrations/20220920180451 deleted file mode 100644 index a1121731e9d9e..0000000000000 --- a/db/schema_migrations/20220920180451 +++ /dev/null @@ -1 +0,0 @@ -3e15307d975890ba62f9617aee32009eac5b66eb02fdd129bb0fcfa8ff4c1ac6 \ No newline at end of file diff --git a/db/schema_migrations/20221010191136 b/db/schema_migrations/20221010191136 deleted file mode 100644 index 00128d6ce52ff..0000000000000 --- a/db/schema_migrations/20221010191136 +++ /dev/null @@ -1 +0,0 @@ -031607378457cac9f9477e751f2ebe15173a91fec98daa4e64b1f278dce5d931 \ No newline at end of file diff --git a/db/schema_migrations/20221018095434 b/db/schema_migrations/20221018095434 deleted file mode 100644 index f924caf455395..0000000000000 --- a/db/schema_migrations/20221018095434 +++ /dev/null @@ -1 +0,0 @@ -0cb708a3cb823676e473bf961aa6920d156598c3c5455b87c89cb1833dfb509c \ No newline at end of file diff --git a/db/schema_migrations/20221026095133 b/db/schema_migrations/20221026095133 deleted file mode 100644 index bd5893ed2261c..0000000000000 --- a/db/schema_migrations/20221026095133 +++ /dev/null @@ -1 +0,0 @@ -a2a0bc78f8f9012d294d42e90e144a209aa48c0160eedae09a748c1835132ab4 \ No newline at end of file diff --git a/db/schema_migrations/20221101174816 b/db/schema_migrations/20221101174816 deleted file mode 100644 index ce1368622a455..0000000000000 --- a/db/schema_migrations/20221101174816 +++ /dev/null @@ -1 +0,0 @@ -2bd5e8cadc82207b0540d8418e6312cc76868318e1e040fb64fa69dfe3e01cb8 \ No newline at end of file diff --git a/db/schema_migrations/20221101194416 b/db/schema_migrations/20221101194416 deleted file mode 100644 index 0051072650ca0..0000000000000 --- a/db/schema_migrations/20221101194416 +++ /dev/null @@ -1 +0,0 @@ -c4fc7b3ca831b670c504a824cbe07d6c94ddaa5c432d37cb353807c5387ee4e8 \ No newline at end of file diff --git a/db/schema_migrations/20221101195309 b/db/schema_migrations/20221101195309 deleted file mode 100644 index 54fd0d397b662..0000000000000 --- a/db/schema_migrations/20221101195309 +++ /dev/null @@ -1 +0,0 @@ -9033c025820c306db295ac4acacc8fa2d99aa78f3883e134829beb8c756eacb1 \ No newline at end of file diff --git a/db/schema_migrations/20221101195543 b/db/schema_migrations/20221101195543 deleted file mode 100644 index a1b20ac62743e..0000000000000 --- a/db/schema_migrations/20221101195543 +++ /dev/null @@ -1 +0,0 @@ -18e1da4447efd3c77c6a4baf194eb0cfa787d5ce60e544c6fd8d4ed0818f9082 \ No newline at end of file diff --git a/db/schema_migrations/20221102150737 b/db/schema_migrations/20221102150737 deleted file mode 100644 index 83e3c1e77ed37..0000000000000 --- a/db/schema_migrations/20221102150737 +++ /dev/null @@ -1 +0,0 @@ -600e0c6bd79850846c38de38f175889cee731b5619dfbd084e1bd4438d13d387 \ No newline at end of file diff --git a/db/schema_migrations/20221102195642 b/db/schema_migrations/20221102195642 deleted file mode 100644 index 746c62e7f7ea6..0000000000000 --- a/db/schema_migrations/20221102195642 +++ /dev/null @@ -1 +0,0 @@ -66a97a441e7be47db9d4dfd49bfe5b600cc2977e581ade98daa923778a142b85 \ No newline at end of file diff --git a/db/schema_migrations/20221102231130 b/db/schema_migrations/20221102231130 deleted file mode 100644 index ee01f627eef4f..0000000000000 --- a/db/schema_migrations/20221102231130 +++ /dev/null @@ -1 +0,0 @@ -8678040a9fa8da1d455489db89e00084943d1dced6dd01cbf3517afd1a47bac5 \ No newline at end of file diff --git a/db/schema_migrations/20221102231131 b/db/schema_migrations/20221102231131 deleted file mode 100644 index 28e3550793a90..0000000000000 --- a/db/schema_migrations/20221102231131 +++ /dev/null @@ -1 +0,0 @@ -c58301896d1defa90c32ad3a9966daaeff73bada1272652ac8bcb2c56fff0265 \ No newline at end of file diff --git a/db/schema_migrations/20221103205317 b/db/schema_migrations/20221103205317 deleted file mode 100644 index f205ff2db2187..0000000000000 --- a/db/schema_migrations/20221103205317 +++ /dev/null @@ -1 +0,0 @@ -d1d3c4281b79318902e3e26d9104971a4537fd6380ce5f53282073330ab173e6 \ No newline at end of file diff --git a/db/schema_migrations/20221104115712 b/db/schema_migrations/20221104115712 deleted file mode 100644 index c3b87b343d908..0000000000000 --- a/db/schema_migrations/20221104115712 +++ /dev/null @@ -1 +0,0 @@ -61322973112a2450036fbbd6e329105ff16d5dc5efac72c75c152bcf87a84aeb \ No newline at end of file diff --git a/db/schema_migrations/20221104141647 b/db/schema_migrations/20221104141647 deleted file mode 100644 index e449f19b8ab18..0000000000000 --- a/db/schema_migrations/20221104141647 +++ /dev/null @@ -1 +0,0 @@ -913154d7bf3d7e663e680d08076da681e963758f0bb2c5b7419914a88df55701 \ No newline at end of file diff --git a/db/schema_migrations/20221107013943 b/db/schema_migrations/20221107013943 deleted file mode 100644 index a447e6590c145..0000000000000 --- a/db/schema_migrations/20221107013943 +++ /dev/null @@ -1 +0,0 @@ -5d3efc9c623a22768e2cbf7aa6282ff2f3fead17cad8537154e4e50485748fbd \ No newline at end of file diff --git a/db/schema_migrations/20221109160052 b/db/schema_migrations/20221109160052 deleted file mode 100644 index 33d7191311559..0000000000000 --- a/db/schema_migrations/20221109160052 +++ /dev/null @@ -1 +0,0 @@ -4567d064918a67787a8d08a18b2747f2e6c1ef43a4bc1471a4bb2a881c66f49d \ No newline at end of file diff --git a/db/schema_migrations/20221110080508 b/db/schema_migrations/20221110080508 deleted file mode 100644 index b1c213d19c866..0000000000000 --- a/db/schema_migrations/20221110080508 +++ /dev/null @@ -1 +0,0 @@ -9000b90fa232989de2210efd289d0e435d72c955c1a8ae055879a84b42e0bf2a \ No newline at end of file diff --git a/db/schema_migrations/20221110080636 b/db/schema_migrations/20221110080636 deleted file mode 100644 index 0e93b46f18372..0000000000000 --- a/db/schema_migrations/20221110080636 +++ /dev/null @@ -1 +0,0 @@ -0e3578ebbde1c61610e3bf043b6b841cbbc2e5ac555723d510956bc677d18830 \ No newline at end of file diff --git a/db/schema_migrations/20221110080748 b/db/schema_migrations/20221110080748 deleted file mode 100644 index 7dca70ba2d8ee..0000000000000 --- a/db/schema_migrations/20221110080748 +++ /dev/null @@ -1 +0,0 @@ -9b6d530507f560cfcd4e6f7c9862fe337f83a2b11209c293c35930ae3a2a9337 \ No newline at end of file diff --git a/db/schema_migrations/20221110080822 b/db/schema_migrations/20221110080822 deleted file mode 100644 index 08cd9263a3ada..0000000000000 --- a/db/schema_migrations/20221110080822 +++ /dev/null @@ -1 +0,0 @@ -30445b0bb4c7e5a92607c94e783c375aa701ab7021f6cdd9a4e586f36f1c8c53 \ No newline at end of file diff --git a/db/schema_migrations/20221110080913 b/db/schema_migrations/20221110080913 deleted file mode 100644 index 71bb2246107e8..0000000000000 --- a/db/schema_migrations/20221110080913 +++ /dev/null @@ -1 +0,0 @@ -1b35ffef693ef3fc468ea993080fcc1090fec43032cde06fd0560d47c806b86c \ No newline at end of file diff --git a/db/schema_migrations/20221110080956 b/db/schema_migrations/20221110080956 deleted file mode 100644 index be455f79d03f8..0000000000000 --- a/db/schema_migrations/20221110080956 +++ /dev/null @@ -1 +0,0 @@ -014856a7b2e713e5181c79ddc1e0dcaa4696c867224338768274ea0987bc8b7a \ No newline at end of file diff --git a/db/schema_migrations/20221110081037 b/db/schema_migrations/20221110081037 deleted file mode 100644 index 74b21d07ec0a8..0000000000000 --- a/db/schema_migrations/20221110081037 +++ /dev/null @@ -1 +0,0 @@ -d22d5d4288369c275c193a6863174a67b16872fb41d17be63d7698302ee6cdb5 \ No newline at end of file diff --git a/db/schema_migrations/20221110081115 b/db/schema_migrations/20221110081115 deleted file mode 100644 index 9cf89be9ab798..0000000000000 --- a/db/schema_migrations/20221110081115 +++ /dev/null @@ -1 +0,0 @@ -d189936c73331c868f31e7d332230b25b2f26aa2983f6b4e5b348816dc5e7050 \ No newline at end of file diff --git a/db/schema_migrations/20221110081207 b/db/schema_migrations/20221110081207 deleted file mode 100644 index 7347f2ad44620..0000000000000 --- a/db/schema_migrations/20221110081207 +++ /dev/null @@ -1 +0,0 @@ -9c4a57679d2bff30da1b88cca6e81b8d5aaa16adbbb748ae0bfdaba1ba2bbc9e \ No newline at end of file diff --git a/db/schema_migrations/20221110081348 b/db/schema_migrations/20221110081348 deleted file mode 100644 index b15c561ea9544..0000000000000 --- a/db/schema_migrations/20221110081348 +++ /dev/null @@ -1 +0,0 @@ -0edc396d8a2c39abb4e49709359a2917703f967ae33258aa2f9dd59dec06b562 \ No newline at end of file diff --git a/db/schema_migrations/20221110081448 b/db/schema_migrations/20221110081448 deleted file mode 100644 index 5473ccd20983e..0000000000000 --- a/db/schema_migrations/20221110081448 +++ /dev/null @@ -1 +0,0 @@ -77b11688ef2d41d3aba6d7e730b6a50f8baf12eaf6e8d950f239d8c70f413196 \ No newline at end of file diff --git a/db/schema_migrations/20221110100600 b/db/schema_migrations/20221110100600 deleted file mode 100644 index 80b1c2bbb36ce..0000000000000 --- a/db/schema_migrations/20221110100600 +++ /dev/null @@ -1 +0,0 @@ -ff748a75deac671ea4ff0ce9df901672afc5dfef794353bec9ab6e0c5d44c981 \ No newline at end of file diff --git a/db/schema_migrations/20221110100602 b/db/schema_migrations/20221110100602 deleted file mode 100644 index b25e9687eb92a..0000000000000 --- a/db/schema_migrations/20221110100602 +++ /dev/null @@ -1 +0,0 @@ -a6234578eeaa90365894d345b74cd66d73bd630f2037e07278466cf59ca42210 \ No newline at end of file diff --git a/db/schema_migrations/20221110152133 b/db/schema_migrations/20221110152133 deleted file mode 100644 index d50f57be2b621..0000000000000 --- a/db/schema_migrations/20221110152133 +++ /dev/null @@ -1 +0,0 @@ -2fcf1b1e5395b89ebf2d9757f0d9f005cc2014946a957127545969ad8472f99b \ No newline at end of file diff --git a/db/schema_migrations/20221110183103 b/db/schema_migrations/20221110183103 deleted file mode 100644 index 08b3a8823df4e..0000000000000 --- a/db/schema_migrations/20221110183103 +++ /dev/null @@ -1 +0,0 @@ -3a8b69f61d48ed02d1015cf63b1dd89fb7206a3d5ce9668126cfdc52048f1e61 \ No newline at end of file diff --git a/db/schema_migrations/20221110190340 b/db/schema_migrations/20221110190340 deleted file mode 100644 index 253cd2c23a823..0000000000000 --- a/db/schema_migrations/20221110190340 +++ /dev/null @@ -1 +0,0 @@ -7cc74ddc58ed05ebc2fb2dcbf2a3f1b2c0327bb2e6109666167bcc89683bcd98 \ No newline at end of file diff --git a/db/schema_migrations/20221111123146 b/db/schema_migrations/20221111123146 deleted file mode 100644 index 176a6ac6bba1d..0000000000000 --- a/db/schema_migrations/20221111123146 +++ /dev/null @@ -1 +0,0 @@ -9679ef7921014d7b6123bf33a3df6276ca3a187641487c11d1dad86aa58b59a6 \ No newline at end of file diff --git a/db/schema_migrations/20221111123147 b/db/schema_migrations/20221111123147 deleted file mode 100644 index f5c17b7e08fae..0000000000000 --- a/db/schema_migrations/20221111123147 +++ /dev/null @@ -1 +0,0 @@ -43c86e9b4c78f5335a3288c4bd40fbcd5559cc175f3619f5e62e779f8aafa126 \ No newline at end of file diff --git a/db/schema_migrations/20221111123148 b/db/schema_migrations/20221111123148 deleted file mode 100644 index d32b16274537d..0000000000000 --- a/db/schema_migrations/20221111123148 +++ /dev/null @@ -1 +0,0 @@ -777d3e757eeec38ee9a29ed2e9f72631d3928d9d449db4327781ad8240ab7922 \ No newline at end of file diff --git a/db/schema_migrations/20221111135238 b/db/schema_migrations/20221111135238 deleted file mode 100644 index 5a01cca7871fd..0000000000000 --- a/db/schema_migrations/20221111135238 +++ /dev/null @@ -1 +0,0 @@ -baf4a11c802eccd1d45bc210c981f0ee2552d7347252caa5558e223271f8a92f \ No newline at end of file diff --git a/db/schema_migrations/20221111142921 b/db/schema_migrations/20221111142921 deleted file mode 100644 index 269979c1f865e..0000000000000 --- a/db/schema_migrations/20221111142921 +++ /dev/null @@ -1 +0,0 @@ -5d31ed73f99f6f36cba7466ccb999337206a0eca9c29e2ad2f6c28f2154572b4 \ No newline at end of file diff --git a/db/schema_migrations/20221114131943 b/db/schema_migrations/20221114131943 deleted file mode 100644 index ce5aa4208b404..0000000000000 --- a/db/schema_migrations/20221114131943 +++ /dev/null @@ -1 +0,0 @@ -f101fcfae81e560c141c571f1494d63821b28271bda74cc2697cea9895872f8f \ No newline at end of file diff --git a/db/schema_migrations/20221114142044 b/db/schema_migrations/20221114142044 deleted file mode 100644 index cd0e0bd8abbd3..0000000000000 --- a/db/schema_migrations/20221114142044 +++ /dev/null @@ -1 +0,0 @@ -5df7ccad8b87eb93db804886d93d5cab40ef988f8706bfe9b54c044ea49b78f9 \ No newline at end of file diff --git a/db/schema_migrations/20221114142602 b/db/schema_migrations/20221114142602 deleted file mode 100644 index d59022a5ba73a..0000000000000 --- a/db/schema_migrations/20221114142602 +++ /dev/null @@ -1 +0,0 @@ -0ce9bc1eb8164103c13be54e5b94b5d78e64c9a61a0d4c29ea7cbac6655c3d02 \ No newline at end of file diff --git a/db/schema_migrations/20221114142616 b/db/schema_migrations/20221114142616 deleted file mode 100644 index ad8e685cb8520..0000000000000 --- a/db/schema_migrations/20221114142616 +++ /dev/null @@ -1 +0,0 @@ -6532501a17c42d41dab53d277624992e8be1dd8597b8c9eda08e3d62d6e1c33a \ No newline at end of file diff --git a/db/schema_migrations/20221114145103 b/db/schema_migrations/20221114145103 deleted file mode 100644 index da49d8f76b16f..0000000000000 --- a/db/schema_migrations/20221114145103 +++ /dev/null @@ -1 +0,0 @@ -1621f0ac141f24c15beef34f5f411158c1eb8a89f5022dd426533d705aa859fe \ No newline at end of file diff --git a/db/schema_migrations/20221114212908 b/db/schema_migrations/20221114212908 deleted file mode 100644 index cbd453b2cc9c0..0000000000000 --- a/db/schema_migrations/20221114212908 +++ /dev/null @@ -1 +0,0 @@ -0a939e4568d4edcdee322a9a4f69dac51e7604a30e79d2eced9e131a7e06937a \ No newline at end of file diff --git a/db/schema_migrations/20221115085813 b/db/schema_migrations/20221115085813 deleted file mode 100644 index c2f7c8a7c51d7..0000000000000 --- a/db/schema_migrations/20221115085813 +++ /dev/null @@ -1 +0,0 @@ -b6538475a9c8a48e640ae367523b9843573e271e508e3f8fe575abef0a4b64f3 \ No newline at end of file diff --git a/db/schema_migrations/20221115120602 b/db/schema_migrations/20221115120602 deleted file mode 100644 index e7d0bfac37b75..0000000000000 --- a/db/schema_migrations/20221115120602 +++ /dev/null @@ -1 +0,0 @@ -793a1e1c80385cf7fe8f2d27af9acc64f46298790c6dc353f5355047500eebb9 \ No newline at end of file diff --git a/db/schema_migrations/20221115173607 b/db/schema_migrations/20221115173607 deleted file mode 100644 index 1de7aaf5da6f1..0000000000000 --- a/db/schema_migrations/20221115173607 +++ /dev/null @@ -1 +0,0 @@ -c3e763e7c801b308cf44cd494104e8c3b37e61fa00b30d777ef97ca310f4823b \ No newline at end of file diff --git a/db/schema_migrations/20221115184525 b/db/schema_migrations/20221115184525 deleted file mode 100644 index da6620d281c22..0000000000000 --- a/db/schema_migrations/20221115184525 +++ /dev/null @@ -1 +0,0 @@ -7e181636d6fd40eb13a40f596ab442ea7b795748546b58a33b1475b2d5fcd264 \ No newline at end of file diff --git a/db/schema_migrations/20221116100056 b/db/schema_migrations/20221116100056 deleted file mode 100644 index 8909a1d9bf278..0000000000000 --- a/db/schema_migrations/20221116100056 +++ /dev/null @@ -1 +0,0 @@ -20fd10e525180e73a642809143c4e3caf3a58defc1c475389bc2a9b386bad253 \ No newline at end of file diff --git a/db/schema_migrations/20221116105434 b/db/schema_migrations/20221116105434 deleted file mode 100644 index 105f7e9961855..0000000000000 --- a/db/schema_migrations/20221116105434 +++ /dev/null @@ -1 +0,0 @@ -c354ac7501cc534a0deff46dc9f0bce27f05d9c08cf5fc0883a906c3dbd7c736 \ No newline at end of file diff --git a/db/schema_migrations/20221116113323 b/db/schema_migrations/20221116113323 deleted file mode 100644 index 1c852aa2ac9d5..0000000000000 --- a/db/schema_migrations/20221116113323 +++ /dev/null @@ -1 +0,0 @@ -d8a541a683d7957ddc8446703bfa781609c4180a2c3cbb6098e748e71b6cc9d0 \ No newline at end of file diff --git a/db/schema_migrations/20221116124821 b/db/schema_migrations/20221116124821 deleted file mode 100644 index 8bea2d3564fcc..0000000000000 --- a/db/schema_migrations/20221116124821 +++ /dev/null @@ -1 +0,0 @@ -775519b2a0881608fd6e446b4c4aaff65ed45889b87a6522d0ea314980e5f66c \ No newline at end of file diff --git a/db/schema_migrations/20221116134507 b/db/schema_migrations/20221116134507 deleted file mode 100644 index cb761de5adb96..0000000000000 --- a/db/schema_migrations/20221116134507 +++ /dev/null @@ -1 +0,0 @@ -80504a4700681db9e46d729f4175dc077fae7e1b0235c9178558293b83f7a006 \ No newline at end of file diff --git a/db/schema_migrations/20221116134539 b/db/schema_migrations/20221116134539 deleted file mode 100644 index 4f25094c3a83e..0000000000000 --- a/db/schema_migrations/20221116134539 +++ /dev/null @@ -1 +0,0 @@ -dd36d2586454c8799effa598c0a058a6adf332622877eae16dd95d468f9b3958 \ No newline at end of file diff --git a/db/schema_migrations/20221116134611 b/db/schema_migrations/20221116134611 deleted file mode 100644 index 9e47c46b7e3f4..0000000000000 --- a/db/schema_migrations/20221116134611 +++ /dev/null @@ -1 +0,0 @@ -0668760d6df566ac3081bd9fa2a053497da7a7af652225e91831110435166dcb \ No newline at end of file diff --git a/db/schema_migrations/20221116134633 b/db/schema_migrations/20221116134633 deleted file mode 100644 index 3f89ce1ff9d63..0000000000000 --- a/db/schema_migrations/20221116134633 +++ /dev/null @@ -1 +0,0 @@ -ceaf6a2b15da0dde23ba37f1166aa5135a9dce1abbe9fca81a12a41cc0319fd9 \ No newline at end of file diff --git a/db/schema_migrations/20221116143854 b/db/schema_migrations/20221116143854 deleted file mode 100644 index 9f0b0815c7974..0000000000000 --- a/db/schema_migrations/20221116143854 +++ /dev/null @@ -1 +0,0 @@ -a6caf06dd18f096219d5ce0752c956ef099a92df71899c1b9164d3a16f6ef0ba \ No newline at end of file diff --git a/db/schema_migrations/20221116160204 b/db/schema_migrations/20221116160204 deleted file mode 100644 index 3b697bb910806..0000000000000 --- a/db/schema_migrations/20221116160204 +++ /dev/null @@ -1 +0,0 @@ -09e6935b54925d65dfe11c5aaf7c2b711fee204b817cdaddd6fb4066206721d6 \ No newline at end of file diff --git a/db/schema_migrations/20221116161126 b/db/schema_migrations/20221116161126 deleted file mode 100644 index 5d65ed55915ad..0000000000000 --- a/db/schema_migrations/20221116161126 +++ /dev/null @@ -1 +0,0 @@ -93286f75aec167041985c2cde8ef1fc32447eae4f520c87131b89c28c402675c \ No newline at end of file diff --git a/db/schema_migrations/20221117103015 b/db/schema_migrations/20221117103015 deleted file mode 100644 index 27244eb22e701..0000000000000 --- a/db/schema_migrations/20221117103015 +++ /dev/null @@ -1 +0,0 @@ -3e8cb08fd67a748a5ba77b495fb9700ff968af6e45d6fd024a4d2b09ba0c4d39 \ No newline at end of file diff --git a/db/schema_migrations/20221117135032 b/db/schema_migrations/20221117135032 deleted file mode 100644 index d9dd4606e4afd..0000000000000 --- a/db/schema_migrations/20221117135032 +++ /dev/null @@ -1 +0,0 @@ -bb15453aa03df0d579ed2c2d38806cc30362e642c5cd8f58ccca29c70f97ea8d \ No newline at end of file diff --git a/db/schema_migrations/20221117153015 b/db/schema_migrations/20221117153015 deleted file mode 100644 index 438ddfdcfbf43..0000000000000 --- a/db/schema_migrations/20221117153015 +++ /dev/null @@ -1 +0,0 @@ -ce905f8497f63b909fee18cb20f2bfc95c33f09d01df09798ca30cdcd72280dc \ No newline at end of file diff --git a/db/schema_migrations/20221118103152 b/db/schema_migrations/20221118103152 deleted file mode 100644 index 2a5ae81a7e256..0000000000000 --- a/db/schema_migrations/20221118103152 +++ /dev/null @@ -1 +0,0 @@ -e7aa8bf64fde9ebc2c027c3aac7ea2b317b9a96fcb3514481b0f27070d335d74 \ No newline at end of file diff --git a/db/schema_migrations/20221118103352 b/db/schema_migrations/20221118103352 deleted file mode 100644 index d50fb4354ad27..0000000000000 --- a/db/schema_migrations/20221118103352 +++ /dev/null @@ -1 +0,0 @@ -577d345895cde08e41512266a72aadea953386e0fa57773ef428b03d052c0f63 \ No newline at end of file diff --git a/db/schema_migrations/20221118103752 b/db/schema_migrations/20221118103752 deleted file mode 100644 index a6de9bf7a55a2..0000000000000 --- a/db/schema_migrations/20221118103752 +++ /dev/null @@ -1 +0,0 @@ -2caac7002aa56d0cd8fb157171a0dd5e0630d06334370154aa574433446220a4 \ No newline at end of file diff --git a/db/schema_migrations/20221118104752 b/db/schema_migrations/20221118104752 deleted file mode 100644 index f507d02477a65..0000000000000 --- a/db/schema_migrations/20221118104752 +++ /dev/null @@ -1 +0,0 @@ -2e8e796f4477a027c53ad97b5a582222541f7919bf2ed2f5179fa5bc6a65ec60 \ No newline at end of file diff --git a/db/schema_migrations/20221121000127 b/db/schema_migrations/20221121000127 deleted file mode 100644 index de209f0e721ee..0000000000000 --- a/db/schema_migrations/20221121000127 +++ /dev/null @@ -1 +0,0 @@ -2b45437b2ec1ed0f1481808fcc9dfb6827d6b46122a8b4b120318399d4e622c0 \ No newline at end of file diff --git a/db/schema_migrations/20221121000451 b/db/schema_migrations/20221121000451 deleted file mode 100644 index 08a9ebf2248f9..0000000000000 --- a/db/schema_migrations/20221121000451 +++ /dev/null @@ -1 +0,0 @@ -93da760ac1c16403bb83255a20f4ff1ff68e0279b4c4aa53a1705e792369f543 \ No newline at end of file diff --git a/db/schema_migrations/20221121091238 b/db/schema_migrations/20221121091238 deleted file mode 100644 index d042656a9c21e..0000000000000 --- a/db/schema_migrations/20221121091238 +++ /dev/null @@ -1 +0,0 @@ -065c3eb12275fda5806d5c5674ae95ef99a78752c0417dd97534b6f4e2337c06 \ No newline at end of file diff --git a/db/schema_migrations/20221121100431 b/db/schema_migrations/20221121100431 deleted file mode 100644 index c89e74a5c0932..0000000000000 --- a/db/schema_migrations/20221121100431 +++ /dev/null @@ -1 +0,0 @@ -e4d54fe2976b8f38053126a7e25fc26d8c84aca36f219435a7cdf57948d36b94 \ No newline at end of file diff --git a/db/schema_migrations/20221121152048 b/db/schema_migrations/20221121152048 deleted file mode 100644 index 8d19b1ff54e0c..0000000000000 --- a/db/schema_migrations/20221121152048 +++ /dev/null @@ -1 +0,0 @@ -daf3e3b4d3b7b6487542f5cc418b0308bc22da13c0ac6f189ab3fb9352e23898 \ No newline at end of file diff --git a/db/schema_migrations/20221121152515 b/db/schema_migrations/20221121152515 deleted file mode 100644 index cb1054488077b..0000000000000 --- a/db/schema_migrations/20221121152515 +++ /dev/null @@ -1 +0,0 @@ -23e3d67029b004c63e4c0843ca58556e259c5795075a772043418181335e3349 \ No newline at end of file diff --git a/db/schema_migrations/20221121155850 b/db/schema_migrations/20221121155850 deleted file mode 100644 index 33c41d1b35e6d..0000000000000 --- a/db/schema_migrations/20221121155850 +++ /dev/null @@ -1 +0,0 @@ -f73bd76a9ad54932b1f4b880af225a49089fc6ea782d213a9fc608b3029cddab \ No newline at end of file diff --git a/db/schema_migrations/20221121180138 b/db/schema_migrations/20221121180138 deleted file mode 100644 index be8f86feea6f6..0000000000000 --- a/db/schema_migrations/20221121180138 +++ /dev/null @@ -1 +0,0 @@ -85eb5cd27485934054a5ee8449b58282b1602e8054941ebebf5c33a169809389 \ No newline at end of file diff --git a/db/schema_migrations/20221121181627 b/db/schema_migrations/20221121181627 deleted file mode 100644 index 2be29d4fcec29..0000000000000 --- a/db/schema_migrations/20221121181627 +++ /dev/null @@ -1 +0,0 @@ -91c8b8327b502611b47400f229204f3093b87f6dd555c7471a2a827c0ee2d7fe \ No newline at end of file diff --git a/db/schema_migrations/20221121184931 b/db/schema_migrations/20221121184931 deleted file mode 100644 index 3d90e696941ed..0000000000000 --- a/db/schema_migrations/20221121184931 +++ /dev/null @@ -1 +0,0 @@ -1700ebce94f46e086d2f5f4ec3d00d5bf2f212009c8115f1a7851471912c829a \ No newline at end of file diff --git a/db/schema_migrations/20221122063922 b/db/schema_migrations/20221122063922 deleted file mode 100644 index 1ea4f70aa998e..0000000000000 --- a/db/schema_migrations/20221122063922 +++ /dev/null @@ -1 +0,0 @@ -2c9002eb1c43ecaa8a6d023e1637f061c308d623f2c541e02e1d979f7ff2b5ba \ No newline at end of file diff --git a/db/schema_migrations/20221122064537 b/db/schema_migrations/20221122064537 deleted file mode 100644 index 40e1b0c0cfbba..0000000000000 --- a/db/schema_migrations/20221122064537 +++ /dev/null @@ -1 +0,0 @@ -735a85cf6adcf9de1949d0c3d4edbc9415ce62649a078c254d2e5699ce69864a \ No newline at end of file diff --git a/db/schema_migrations/20221122132812 b/db/schema_migrations/20221122132812 deleted file mode 100644 index d7534c717fda9..0000000000000 --- a/db/schema_migrations/20221122132812 +++ /dev/null @@ -1 +0,0 @@ -dfc5d0f35c41cde817bdb747bbbceaddc9fa77bec0219f7027ffc66191895f1b \ No newline at end of file diff --git a/db/schema_migrations/20221122141046 b/db/schema_migrations/20221122141046 deleted file mode 100644 index 4baebb0dda618..0000000000000 --- a/db/schema_migrations/20221122141046 +++ /dev/null @@ -1 +0,0 @@ -64b59128c42f55725a268b051c2f9fc656b2a49a2e721af995e3e25fc7c7e85d \ No newline at end of file diff --git a/db/schema_migrations/20221122155149 b/db/schema_migrations/20221122155149 deleted file mode 100644 index 46a4270e5ed2a..0000000000000 --- a/db/schema_migrations/20221122155149 +++ /dev/null @@ -1 +0,0 @@ -3c9b8f6191297e95c47a0ae2e3da7725ce33daa2a702407e0256393774935b0b \ No newline at end of file diff --git a/db/schema_migrations/20221122210711 b/db/schema_migrations/20221122210711 deleted file mode 100644 index 1b6fe28ff90dc..0000000000000 --- a/db/schema_migrations/20221122210711 +++ /dev/null @@ -1 +0,0 @@ -88c1d4e154335af66aea88f8dbb4bbd9a548a13499839ce96f7bbda17c7116c3 \ No newline at end of file diff --git a/db/schema_migrations/20221122225925 b/db/schema_migrations/20221122225925 deleted file mode 100644 index 81da88065a214..0000000000000 --- a/db/schema_migrations/20221122225925 +++ /dev/null @@ -1 +0,0 @@ -223aa6d68c159847c8a50889a270c32b10c4efbf6c1445870f156896d0a34559 \ No newline at end of file diff --git a/db/schema_migrations/20221123133054 b/db/schema_migrations/20221123133054 deleted file mode 100644 index 3a7a382ee7482..0000000000000 --- a/db/schema_migrations/20221123133054 +++ /dev/null @@ -1 +0,0 @@ -1a0a090433dd422b1bd9efdb56f82c02af8bab45b1a651b51a6ed224d823964c \ No newline at end of file diff --git a/db/schema_migrations/20221124113925 b/db/schema_migrations/20221124113925 deleted file mode 100644 index 60ae3f4c5515e..0000000000000 --- a/db/schema_migrations/20221124113925 +++ /dev/null @@ -1 +0,0 @@ -72063c052e88d9351dbf7aedc373dadedb685f63cfbbadc992ddf322c546579b \ No newline at end of file diff --git a/db/schema_migrations/20221124153602 b/db/schema_migrations/20221124153602 deleted file mode 100644 index 0c6055b4561fe..0000000000000 --- a/db/schema_migrations/20221124153602 +++ /dev/null @@ -1 +0,0 @@ -688db679fa547cd07e8c9ac11cb80afd475bb529a462eba1b899391ca721a611 \ No newline at end of file diff --git a/db/schema_migrations/20221125222221 b/db/schema_migrations/20221125222221 deleted file mode 100644 index 9235ef557b712..0000000000000 --- a/db/schema_migrations/20221125222221 +++ /dev/null @@ -1 +0,0 @@ -c1974d6763a85469f3d12fe4e51b1bc3b986cc335b7fe79b3875332d34a1b548 \ No newline at end of file diff --git a/db/schema_migrations/20221125222341 b/db/schema_migrations/20221125222341 deleted file mode 100644 index 5f4a29202e119..0000000000000 --- a/db/schema_migrations/20221125222341 +++ /dev/null @@ -1 +0,0 @@ -401b563cf9f92627082bbc9850ab2fbe1d9806ced094fda99783c5d51e00fe1c \ No newline at end of file diff --git a/db/schema_migrations/20221128120634 b/db/schema_migrations/20221128120634 deleted file mode 100644 index 4a2fa52d6755f..0000000000000 --- a/db/schema_migrations/20221128120634 +++ /dev/null @@ -1 +0,0 @@ -011a7add2949c39e642da2f9d7908f6e2a118c91f2e334e0eee623711576c3cb \ No newline at end of file diff --git a/db/schema_migrations/20221128123514 b/db/schema_migrations/20221128123514 deleted file mode 100644 index a10dff5ab4220..0000000000000 --- a/db/schema_migrations/20221128123514 +++ /dev/null @@ -1 +0,0 @@ -2b763fd1fe9aee5631f9a8f3bdf699a19003e56f5c857efe4410ec21e5dad8f7 \ No newline at end of file diff --git a/db/schema_migrations/20221128155738 b/db/schema_migrations/20221128155738 deleted file mode 100644 index 5322aa1f75e5c..0000000000000 --- a/db/schema_migrations/20221128155738 +++ /dev/null @@ -1 +0,0 @@ -39ca72ad461ff7b56ce6feed351ef46ee9f3584a8c3c9383ca75f44b61baa1a1 \ No newline at end of file diff --git a/db/schema_migrations/20221128165833 b/db/schema_migrations/20221128165833 deleted file mode 100644 index e2aeaa26c32fa..0000000000000 --- a/db/schema_migrations/20221128165833 +++ /dev/null @@ -1 +0,0 @@ -4f4846fe8e5f84ee566dfc8f9b8249e1ff1d77f8f6c2f0006d89a73a2e734b9d \ No newline at end of file diff --git a/db/schema_migrations/20221128220043 b/db/schema_migrations/20221128220043 deleted file mode 100644 index 0768b098ba148..0000000000000 --- a/db/schema_migrations/20221128220043 +++ /dev/null @@ -1 +0,0 @@ -6c2e0ae4cbfabd7d303103a75b76746265e273dc0154618c1dc182621a44ae5a \ No newline at end of file diff --git a/db/schema_migrations/20221128222417 b/db/schema_migrations/20221128222417 deleted file mode 100644 index a71c9c84fd138..0000000000000 --- a/db/schema_migrations/20221128222417 +++ /dev/null @@ -1 +0,0 @@ -fc5a253aabc821a371b6755183cc1d785a37881213dd019b522f074fc884bb73 \ No newline at end of file diff --git a/db/schema_migrations/20221129124240 b/db/schema_migrations/20221129124240 deleted file mode 100644 index 9b0199dc74813..0000000000000 --- a/db/schema_migrations/20221129124240 +++ /dev/null @@ -1 +0,0 @@ -ae20537326115d37db8beb3432ffd3ace447b39a75906535d319da4db1fcb1b2 \ No newline at end of file diff --git a/db/schema_migrations/20221129192619 b/db/schema_migrations/20221129192619 deleted file mode 100644 index 4097014aca718..0000000000000 --- a/db/schema_migrations/20221129192619 +++ /dev/null @@ -1 +0,0 @@ -b452251587b4b1f738300cc2c729642c91470b9233ac2db9f3f0061aeff1dd4a \ No newline at end of file diff --git a/db/schema_migrations/20221130170433 b/db/schema_migrations/20221130170433 deleted file mode 100644 index e4c75f719e06e..0000000000000 --- a/db/schema_migrations/20221130170433 +++ /dev/null @@ -1 +0,0 @@ -2c744b68accac8be53240dfa46f09e5dae90e8b14541d57ae8e4c1823eded397 \ No newline at end of file diff --git a/db/schema_migrations/20221130182056 b/db/schema_migrations/20221130182056 deleted file mode 100644 index 5cadd5084e5ae..0000000000000 --- a/db/schema_migrations/20221130182056 +++ /dev/null @@ -1 +0,0 @@ -8a6a12d28ddca01863d39e21461daace89aa9d0940bc13a1747712f699c07600 \ No newline at end of file diff --git a/db/schema_migrations/20221130192239 b/db/schema_migrations/20221130192239 deleted file mode 100644 index 02edafb2710dc..0000000000000 --- a/db/schema_migrations/20221130192239 +++ /dev/null @@ -1 +0,0 @@ -dba113bc64ddabf2059a7aea8ac0a830a237957f1ce50e1a3662c7ed18a645eb \ No newline at end of file diff --git a/db/schema_migrations/20221202031332 b/db/schema_migrations/20221202031332 deleted file mode 100644 index 10dd1ac1b3661..0000000000000 --- a/db/schema_migrations/20221202031332 +++ /dev/null @@ -1 +0,0 @@ -b07f7fdc85af4cdf85ea3f4add62896fea2fc1fa6fcc973ba615f8a0ed84746e \ No newline at end of file diff --git a/db/schema_migrations/20221202031417 b/db/schema_migrations/20221202031417 deleted file mode 100644 index 324807b8421e9..0000000000000 --- a/db/schema_migrations/20221202031417 +++ /dev/null @@ -1 +0,0 @@ -0c422bc0ef354437302cda84dae77d883ab28775e6008c669075b447828ba914 \ No newline at end of file diff --git a/db/schema_migrations/20221202144210 b/db/schema_migrations/20221202144210 deleted file mode 100644 index 3b37793b1a96a..0000000000000 --- a/db/schema_migrations/20221202144210 +++ /dev/null @@ -1 +0,0 @@ -5e29c2ebe99ef811cac0f894b3a77d2d158ba43070fb924c663db4622b8e79d7 \ No newline at end of file diff --git a/db/schema_migrations/20221202154128 b/db/schema_migrations/20221202154128 deleted file mode 100644 index 328f13d3d963f..0000000000000 --- a/db/schema_migrations/20221202154128 +++ /dev/null @@ -1 +0,0 @@ -99f7f14d12f9d213016e0c183cfe6a0e8384db04952128299299a5f83d144a41 \ No newline at end of file diff --git a/db/schema_migrations/20221202154151 b/db/schema_migrations/20221202154151 deleted file mode 100644 index 23f7349048a19..0000000000000 --- a/db/schema_migrations/20221202154151 +++ /dev/null @@ -1 +0,0 @@ -5c64c1072e6b7c05a7cd23a7c50b5cfce9aba7eca6f29169590be9e115acc87d \ No newline at end of file diff --git a/db/schema_migrations/20221202202351 b/db/schema_migrations/20221202202351 deleted file mode 100644 index 942bc0577d606..0000000000000 --- a/db/schema_migrations/20221202202351 +++ /dev/null @@ -1 +0,0 @@ -8e9641a603bd9540d0004fb76b407a5cb4392c8cc41c084cd746f354b9a8d417 \ No newline at end of file diff --git a/db/schema_migrations/20221204090437 b/db/schema_migrations/20221204090437 deleted file mode 100644 index 3ae8d4c206789..0000000000000 --- a/db/schema_migrations/20221204090437 +++ /dev/null @@ -1 +0,0 @@ -16bdaabcc19086652b0543dcdc7204305a920794fdab38c042d06bb2be76dde0 \ No newline at end of file diff --git a/db/schema_migrations/20221205061134 b/db/schema_migrations/20221205061134 deleted file mode 100644 index e6b4b38a902d1..0000000000000 --- a/db/schema_migrations/20221205061134 +++ /dev/null @@ -1 +0,0 @@ -dbb03459b96d7b5165ce093d31bbeb253a972e7d54345f2e171fb487447cdb0b \ No newline at end of file diff --git a/db/schema_migrations/20221205134448 b/db/schema_migrations/20221205134448 deleted file mode 100644 index 13a6fd7c8fde5..0000000000000 --- a/db/schema_migrations/20221205134448 +++ /dev/null @@ -1 +0,0 @@ -95adff6092ae61752ee817560e2ba98bf697660a38ae78e07317e1634436c778 \ No newline at end of file diff --git a/db/schema_migrations/20221205151917 b/db/schema_migrations/20221205151917 deleted file mode 100644 index 6ae6787c2a9ff..0000000000000 --- a/db/schema_migrations/20221205151917 +++ /dev/null @@ -1 +0,0 @@ -64c4d48759a28b2dbac035d290724ee82b8af4af2bef75e1d7e07eefe10e6d17 \ No newline at end of file diff --git a/db/schema_migrations/20221205170310 b/db/schema_migrations/20221205170310 deleted file mode 100644 index 08365068b43f9..0000000000000 --- a/db/schema_migrations/20221205170310 +++ /dev/null @@ -1 +0,0 @@ -6501b62569b96e2be3afc2c79fe438fffc6b45485b04f6b2989ae35f0cf9a4b9 \ No newline at end of file diff --git a/db/schema_migrations/20221206012013 b/db/schema_migrations/20221206012013 deleted file mode 100644 index a7cfcc43f7c97..0000000000000 --- a/db/schema_migrations/20221206012013 +++ /dev/null @@ -1 +0,0 @@ -52294ac9fd807fdff49d918d6b49c071b53e683a479af6beef9449302080e44f \ No newline at end of file diff --git a/db/schema_migrations/20221206075631 b/db/schema_migrations/20221206075631 deleted file mode 100644 index d8c7332528cb8..0000000000000 --- a/db/schema_migrations/20221206075631 +++ /dev/null @@ -1 +0,0 @@ -35879808e9dd8f4436a1fd09c68e28114f8cd448f039eaff000075226d0a80f9 \ No newline at end of file diff --git a/db/schema_migrations/20221206132610 b/db/schema_migrations/20221206132610 deleted file mode 100644 index 1df21d68a0c23..0000000000000 --- a/db/schema_migrations/20221206132610 +++ /dev/null @@ -1 +0,0 @@ -52d5d6dd9d762da8885fae101ff8014ffaac7ade5c6aa8b306595320997d4e58 \ No newline at end of file diff --git a/db/schema_migrations/20221206163420 b/db/schema_migrations/20221206163420 deleted file mode 100644 index f61bb680fd2bf..0000000000000 --- a/db/schema_migrations/20221206163420 +++ /dev/null @@ -1 +0,0 @@ -8f22266821405e2931ca80baf4b6760cb340f6207b00e2ffbedb9c62419a3af4 \ No newline at end of file diff --git a/db/schema_migrations/20221206173132 b/db/schema_migrations/20221206173132 deleted file mode 100644 index 7f34421d27003..0000000000000 --- a/db/schema_migrations/20221206173132 +++ /dev/null @@ -1 +0,0 @@ -c2e7a2c25e281419e2e401e3bff661c706386900faffc784efcfbf7aca169ed8 \ No newline at end of file diff --git a/db/schema_migrations/20221206211814 b/db/schema_migrations/20221206211814 deleted file mode 100644 index fb9c93fce392d..0000000000000 --- a/db/schema_migrations/20221206211814 +++ /dev/null @@ -1 +0,0 @@ -9294a13506b4e7f50ffa49674aff45f9223830f6247509029d533cdfea4d9d6f \ No newline at end of file diff --git a/db/schema_migrations/20221206222032 b/db/schema_migrations/20221206222032 deleted file mode 100644 index 16c8b6ea72b26..0000000000000 --- a/db/schema_migrations/20221206222032 +++ /dev/null @@ -1 +0,0 @@ -9e3f3c09100e3c26de7280bf30dc836a66d9fefb0894c86c80a3c5ee8e36235b \ No newline at end of file diff --git a/db/schema_migrations/20221206235208 b/db/schema_migrations/20221206235208 deleted file mode 100644 index 7a1a82545ae57..0000000000000 --- a/db/schema_migrations/20221206235208 +++ /dev/null @@ -1 +0,0 @@ -4af9700e48540da55c783900a9156eca04a5e580ca106d94b6e51fa15f3a6547 \ No newline at end of file diff --git a/db/schema_migrations/20221207140259 b/db/schema_migrations/20221207140259 deleted file mode 100644 index d0f4a627129a4..0000000000000 --- a/db/schema_migrations/20221207140259 +++ /dev/null @@ -1 +0,0 @@ -4ec6d2cd2a497c7416c08fa31618f34474c868fdf0060692b8815492bace3a0d \ No newline at end of file diff --git a/db/schema_migrations/20221207220120 b/db/schema_migrations/20221207220120 deleted file mode 100644 index 3ff084a13ac67..0000000000000 --- a/db/schema_migrations/20221207220120 +++ /dev/null @@ -1 +0,0 @@ -caa6f87b639b62ea25c9f7adc81bd64bba4084b8987bfc5df84f507b63faab4a \ No newline at end of file diff --git a/db/schema_migrations/20221208122921 b/db/schema_migrations/20221208122921 deleted file mode 100644 index 1245bbc2bc32d..0000000000000 --- a/db/schema_migrations/20221208122921 +++ /dev/null @@ -1 +0,0 @@ -e205d116057a4e6770b8e8b7e49a87a180fb470087a4394d1a4e529ff1dba631 \ No newline at end of file diff --git a/db/schema_migrations/20221209110934 b/db/schema_migrations/20221209110934 deleted file mode 100644 index 43951756ce231..0000000000000 --- a/db/schema_migrations/20221209110934 +++ /dev/null @@ -1 +0,0 @@ -73b704bee30bf90476bcb913d56949cdd59f9c5f4b19a38025c9b02af9cb26a7 \ No newline at end of file diff --git a/db/schema_migrations/20221209110935 b/db/schema_migrations/20221209110935 deleted file mode 100644 index 6e39531220dc8..0000000000000 --- a/db/schema_migrations/20221209110935 +++ /dev/null @@ -1 +0,0 @@ -6a25429104daf2b735f0a22e48dc631ded1aebe7d6f5f9d61520af184f6b5075 \ No newline at end of file diff --git a/db/schema_migrations/20221209174132 b/db/schema_migrations/20221209174132 deleted file mode 100644 index 0bc7f720b08c0..0000000000000 --- a/db/schema_migrations/20221209174132 +++ /dev/null @@ -1 +0,0 @@ -5bc41c2430a033da7aa063e5646941428bb01cbf99aafed4acc80b4f9aa2f650 \ No newline at end of file diff --git a/db/schema_migrations/20221209174157 b/db/schema_migrations/20221209174157 deleted file mode 100644 index 0d0a9ed9e82a3..0000000000000 --- a/db/schema_migrations/20221209174157 +++ /dev/null @@ -1 +0,0 @@ -5a7f509173cf10ab512935db0dd65ab9ed347539a6448e2922ea603db418b1df \ No newline at end of file diff --git a/db/schema_migrations/20221209235939 b/db/schema_migrations/20221209235939 deleted file mode 100644 index 4f3e38b6783b4..0000000000000 --- a/db/schema_migrations/20221209235939 +++ /dev/null @@ -1 +0,0 @@ -1932d6cee91dac3fb3fee7bbdac1bb08c7af92d8ef9f9f32c2d6a2958fc4fdcf \ No newline at end of file diff --git a/db/schema_migrations/20221209235940 b/db/schema_migrations/20221209235940 deleted file mode 100644 index 58e8fe83906de..0000000000000 --- a/db/schema_migrations/20221209235940 +++ /dev/null @@ -1 +0,0 @@ -fc12bfad8fb9c2aba5aea0726f8e8630c9d0f4f791988660ea183e269b2068ef \ No newline at end of file diff --git a/db/schema_migrations/20221210154044 b/db/schema_migrations/20221210154044 deleted file mode 100644 index 44dd561a449a5..0000000000000 --- a/db/schema_migrations/20221210154044 +++ /dev/null @@ -1 +0,0 @@ -6349918b178fb0b110f16f4cff6f64c862b3763c5a401238732f6ac507b7c79d \ No newline at end of file diff --git a/db/schema_migrations/20221212054640 b/db/schema_migrations/20221212054640 deleted file mode 100644 index 2df095bd8989d..0000000000000 --- a/db/schema_migrations/20221212054640 +++ /dev/null @@ -1 +0,0 @@ -18c98815e882f808ec2d5d29d605b89bd725690f0c399627eaa98f4ff7d3ef76 \ No newline at end of file diff --git a/db/schema_migrations/20221212103743 b/db/schema_migrations/20221212103743 deleted file mode 100644 index 7f225c9516f7a..0000000000000 --- a/db/schema_migrations/20221212103743 +++ /dev/null @@ -1 +0,0 @@ -a961cf4e53556fe7899fbabc7bc686d5edaf061abe5a008eb7a6304f64f2f22f \ No newline at end of file diff --git a/db/schema_migrations/20221212192452 b/db/schema_migrations/20221212192452 deleted file mode 100644 index c5be14681896e..0000000000000 --- a/db/schema_migrations/20221212192452 +++ /dev/null @@ -1 +0,0 @@ -51f9c66f46063a9ad6979f2a50b0d963d93c007b25bde2dedf941317317ef077 \ No newline at end of file diff --git a/db/schema_migrations/20221212192527 b/db/schema_migrations/20221212192527 deleted file mode 100644 index cf79bf9446f5e..0000000000000 --- a/db/schema_migrations/20221212192527 +++ /dev/null @@ -1 +0,0 @@ -de8a5fae011e67ff3b8da9c73f0c19a93a2c534764d81bc72e3058627b5ab6b5 \ No newline at end of file diff --git a/db/schema_migrations/20221213064717 b/db/schema_migrations/20221213064717 deleted file mode 100644 index 1da000d50c5a7..0000000000000 --- a/db/schema_migrations/20221213064717 +++ /dev/null @@ -1 +0,0 @@ -0677f23100c5a4b010c2601d64c29116150b51735c7b920fa2c87a95de293176 \ No newline at end of file diff --git a/db/schema_migrations/20221213105028 b/db/schema_migrations/20221213105028 deleted file mode 100644 index bb47fe92f99b9..0000000000000 --- a/db/schema_migrations/20221213105028 +++ /dev/null @@ -1 +0,0 @@ -0371c2bfd2d11ea5c78de99c79cdc59ae66bac684190333b562d1fc1e8243c94 \ No newline at end of file diff --git a/db/schema_migrations/20221213184314 b/db/schema_migrations/20221213184314 deleted file mode 100644 index 2d297ebe7eec3..0000000000000 --- a/db/schema_migrations/20221213184314 +++ /dev/null @@ -1 +0,0 @@ -b14a060e05fc73c9d76d7c8bec3f9e1fa99b33eae6ec0057b4a398b28414a02a \ No newline at end of file diff --git a/db/schema_migrations/20221214095129 b/db/schema_migrations/20221214095129 deleted file mode 100644 index 45303906ba2ea..0000000000000 --- a/db/schema_migrations/20221214095129 +++ /dev/null @@ -1 +0,0 @@ -1400b1d7e9f2096a3c84bf262a457043a26e791071ea5e95862628a271bf88aa \ No newline at end of file diff --git a/db/schema_migrations/20221214105307 b/db/schema_migrations/20221214105307 deleted file mode 100644 index d8e1f90901bf6..0000000000000 --- a/db/schema_migrations/20221214105307 +++ /dev/null @@ -1 +0,0 @@ -731ff12680cd8f21b245fcb5b0772567a7534cfe17248a741dc12d4b5e2e951d \ No newline at end of file diff --git a/db/schema_migrations/20221214201256 b/db/schema_migrations/20221214201256 deleted file mode 100644 index 1b1ad048fe606..0000000000000 --- a/db/schema_migrations/20221214201256 +++ /dev/null @@ -1 +0,0 @@ -53cbd505d77cac0224d0dd191ae4af160a80bf589c0324eab3b2db85177b614e \ No newline at end of file diff --git a/db/schema_migrations/20221214204247 b/db/schema_migrations/20221214204247 deleted file mode 100644 index fd20d6ea49769..0000000000000 --- a/db/schema_migrations/20221214204247 +++ /dev/null @@ -1 +0,0 @@ -adeaf9ce3a61f1603a314a8ec8122f5e58f5b56fe75b7d32fadfc9ca6f31bf40 \ No newline at end of file diff --git a/db/schema_migrations/20221215151822 b/db/schema_migrations/20221215151822 deleted file mode 100644 index bef6ccd171193..0000000000000 --- a/db/schema_migrations/20221215151822 +++ /dev/null @@ -1 +0,0 @@ -6d5872c6c5e0a7bc9bd52eeac7cbbd49bbe41210dd5596078acf088ac8eec1bd \ No newline at end of file diff --git a/db/schema_migrations/20221215210347 b/db/schema_migrations/20221215210347 deleted file mode 100644 index 3d9e6ce85c0a0..0000000000000 --- a/db/schema_migrations/20221215210347 +++ /dev/null @@ -1 +0,0 @@ -37df82f093bb81ff1bc36ea9ba29f4e70bcb96274e2dcc70438ce0710dd7e9d9 \ No newline at end of file diff --git a/db/schema_migrations/20221216131710 b/db/schema_migrations/20221216131710 deleted file mode 100644 index 723eda5194c8f..0000000000000 --- a/db/schema_migrations/20221216131710 +++ /dev/null @@ -1 +0,0 @@ -88ec0ad09f04b5c95cc75afdcee64d488abfbf6cf86ab0b7215623a227865432 \ No newline at end of file diff --git a/db/schema_migrations/20221216131935 b/db/schema_migrations/20221216131935 deleted file mode 100644 index 9dcb4412aecc9..0000000000000 --- a/db/schema_migrations/20221216131935 +++ /dev/null @@ -1 +0,0 @@ -fe479c2d3784ede41207beff4fad21004f74ade8f8c08f6a9b154429ceef6395 \ No newline at end of file diff --git a/db/schema_migrations/20221216131958 b/db/schema_migrations/20221216131958 deleted file mode 100644 index 4c773777ff35a..0000000000000 --- a/db/schema_migrations/20221216131958 +++ /dev/null @@ -1 +0,0 @@ -0a012ad57aa6833f41e8927573aeff716ce36724ed6c1ecca8fc0d77186b4c88 \ No newline at end of file diff --git a/db/schema_migrations/20221216144854 b/db/schema_migrations/20221216144854 deleted file mode 100644 index 6deba7583f29d..0000000000000 --- a/db/schema_migrations/20221216144854 +++ /dev/null @@ -1 +0,0 @@ -6a5cae1c59bf32796feee4d7adf113d36a0aea1e0324eb082a848870edaf98c7 \ No newline at end of file diff --git a/db/schema_migrations/20221216145659 b/db/schema_migrations/20221216145659 deleted file mode 100644 index 9ff23376bd945..0000000000000 --- a/db/schema_migrations/20221216145659 +++ /dev/null @@ -1 +0,0 @@ -aacb19ddcf902b9f0ad07f113b2fbd1c9d408b707ad62880ef058ff5b129b456 \ No newline at end of file diff --git a/db/schema_migrations/20221216150304 b/db/schema_migrations/20221216150304 deleted file mode 100644 index 16fa7b669e6ac..0000000000000 --- a/db/schema_migrations/20221216150304 +++ /dev/null @@ -1 +0,0 @@ -74d618f1cf30125936386257bb3bef793afefffc0b7f45f854c2f0632bae56e7 \ No newline at end of file diff --git a/db/schema_migrations/20221216150321 b/db/schema_migrations/20221216150321 deleted file mode 100644 index e6690af1e15d2..0000000000000 --- a/db/schema_migrations/20221216150321 +++ /dev/null @@ -1 +0,0 @@ -501fe17068407fa590ba7f85acf0073ee701d37ad9f9d84ecbeaa8c282fd2957 \ No newline at end of file diff --git a/db/schema_migrations/20221216150919 b/db/schema_migrations/20221216150919 deleted file mode 100644 index e2056eb9b553a..0000000000000 --- a/db/schema_migrations/20221216150919 +++ /dev/null @@ -1 +0,0 @@ -1dda2456e1b2a8ddd5e45d3115219ef9d35a9a11a7d498d1ff394b687d7c9761 \ No newline at end of file diff --git a/db/schema_migrations/20221216151459 b/db/schema_migrations/20221216151459 deleted file mode 100644 index d590076786d8c..0000000000000 --- a/db/schema_migrations/20221216151459 +++ /dev/null @@ -1 +0,0 @@ -3f4e9fdd522498b79512e37f022d73e4f0495d0c6419c783d574a630d07d31c4 \ No newline at end of file diff --git a/db/schema_migrations/20221216151649 b/db/schema_migrations/20221216151649 deleted file mode 100644 index 84d5b3b36b3d5..0000000000000 --- a/db/schema_migrations/20221216151649 +++ /dev/null @@ -1 +0,0 @@ -28d64bca23a251a185241c1f735a663a8da116a5e6dd44451ce94ea2b1945f7d \ No newline at end of file diff --git a/db/schema_migrations/20221216232658 b/db/schema_migrations/20221216232658 deleted file mode 100644 index 18a3e5e18f2e7..0000000000000 --- a/db/schema_migrations/20221216232658 +++ /dev/null @@ -1 +0,0 @@ -8e9bb800a2eab9f5d5a3b4f3835b6c4f21ec861a5808a13bef8d496773a7799c \ No newline at end of file diff --git a/db/schema_migrations/20221216232659 b/db/schema_migrations/20221216232659 deleted file mode 100644 index 0fe1f4055392e..0000000000000 --- a/db/schema_migrations/20221216232659 +++ /dev/null @@ -1 +0,0 @@ -520b29da3912ee69336cb00d3a2da6736a6871b2e27ecbb830f1b3dafe1a8120 \ No newline at end of file diff --git a/db/schema_migrations/20221219103007 b/db/schema_migrations/20221219103007 deleted file mode 100644 index 91fbb67c34491..0000000000000 --- a/db/schema_migrations/20221219103007 +++ /dev/null @@ -1 +0,0 @@ -6fdebbcb5bc3e21cfa932ff9db7037b4d07042bf2cd79e6a8991c36741b88c06 \ No newline at end of file diff --git a/db/schema_migrations/20221219112528 b/db/schema_migrations/20221219112528 deleted file mode 100644 index d446e0e565b3f..0000000000000 --- a/db/schema_migrations/20221219112528 +++ /dev/null @@ -1 +0,0 @@ -3efcc5d139bfad08294f8a131fd4e259fe26cef50a422c17ed9aac75e8867f92 \ No newline at end of file diff --git a/db/schema_migrations/20221219112632 b/db/schema_migrations/20221219112632 deleted file mode 100644 index 0bba0080af799..0000000000000 --- a/db/schema_migrations/20221219112632 +++ /dev/null @@ -1 +0,0 @@ -400cab0a2d3130dd7406024cf982c7312918019197ae06af06696435f6bb5aaa \ No newline at end of file diff --git a/db/schema_migrations/20221219122320 b/db/schema_migrations/20221219122320 deleted file mode 100644 index bac9b8181c4ca..0000000000000 --- a/db/schema_migrations/20221219122320 +++ /dev/null @@ -1 +0,0 @@ -8c4a83a223ae23e3d56665a584af192311459d18af228d71b868775c368086a7 \ No newline at end of file diff --git a/db/schema_migrations/20221219135535 b/db/schema_migrations/20221219135535 deleted file mode 100644 index 8d46309bc592a..0000000000000 --- a/db/schema_migrations/20221219135535 +++ /dev/null @@ -1 +0,0 @@ -7e9b0184762992556f6c97353f76a45851476ba30667e8afc4946c2aed6d762d \ No newline at end of file diff --git a/db/schema_migrations/20221220075936 b/db/schema_migrations/20221220075936 deleted file mode 100644 index 194046d51e227..0000000000000 --- a/db/schema_migrations/20221220075936 +++ /dev/null @@ -1 +0,0 @@ -43f0493091c58f1573613d5672a999bf07994ced2b7172a7aef9148f4d8b8dbe \ No newline at end of file diff --git a/db/schema_migrations/20221220131020 b/db/schema_migrations/20221220131020 deleted file mode 100644 index 36c041b1a3302..0000000000000 --- a/db/schema_migrations/20221220131020 +++ /dev/null @@ -1 +0,0 @@ -8adf517eb859b5c945f70fbdeb911d398cf0a25c75b39b5991280390b70d1adf \ No newline at end of file diff --git a/db/schema_migrations/20221221110733 b/db/schema_migrations/20221221110733 deleted file mode 100644 index 6900431db9be6..0000000000000 --- a/db/schema_migrations/20221221110733 +++ /dev/null @@ -1 +0,0 @@ -db73b1dca175b51bfb9a5fd20806f746cc9d80d37d1eed7c2958a6dfd1445796 \ No newline at end of file diff --git a/db/schema_migrations/20221221134116 b/db/schema_migrations/20221221134116 deleted file mode 100644 index f25d868d150fa..0000000000000 --- a/db/schema_migrations/20221221134116 +++ /dev/null @@ -1 +0,0 @@ -b528d26acaf408f6d787542626bc8d86520b1058dde20596f7da63c1e5b87aee \ No newline at end of file diff --git a/db/schema_migrations/20221221150123 b/db/schema_migrations/20221221150123 deleted file mode 100644 index 318d01c99807c..0000000000000 --- a/db/schema_migrations/20221221150123 +++ /dev/null @@ -1 +0,0 @@ -a842c4aae88386fc5fdeb7f08c0a2ba14780b651801e7dae28c974af58aa946c \ No newline at end of file diff --git a/db/schema_migrations/20221221171239 b/db/schema_migrations/20221221171239 deleted file mode 100644 index 41e529467fec7..0000000000000 --- a/db/schema_migrations/20221221171239 +++ /dev/null @@ -1 +0,0 @@ -58a1e0ebf310f443b268491b5fa5e88ed392390aa028bed57c0292b270a3ec2d \ No newline at end of file diff --git a/db/schema_migrations/20221222092958 b/db/schema_migrations/20221222092958 deleted file mode 100644 index eabf9eedc5f78..0000000000000 --- a/db/schema_migrations/20221222092958 +++ /dev/null @@ -1 +0,0 @@ -689029c5d5ec374f12827d47602096d7bdaab0c1a6c378f45382cd612d3ba002 \ No newline at end of file diff --git a/db/schema_migrations/20221222144954 b/db/schema_migrations/20221222144954 deleted file mode 100644 index 90632cfe36dfc..0000000000000 --- a/db/schema_migrations/20221222144954 +++ /dev/null @@ -1 +0,0 @@ -423156b02a67da496da851c2bdc0b57c68af608eb0dc0ef9b96108b2610161ad \ No newline at end of file diff --git a/db/schema_migrations/20221223114543 b/db/schema_migrations/20221223114543 deleted file mode 100644 index 0a36ef8a481e5..0000000000000 --- a/db/schema_migrations/20221223114543 +++ /dev/null @@ -1 +0,0 @@ -09ecb70b517dd6a4116288bf10a399786a59ae0adfe9d6f9b600913c74347248 \ No newline at end of file diff --git a/db/schema_migrations/20221223123019 b/db/schema_migrations/20221223123019 deleted file mode 100644 index d6bf765ccad6b..0000000000000 --- a/db/schema_migrations/20221223123019 +++ /dev/null @@ -1 +0,0 @@ -ecfd0d17f89aef734239365a79a48b0f8122326030a717a0114db5063bacc58f \ No newline at end of file diff --git a/db/schema_migrations/20221226105323 b/db/schema_migrations/20221226105323 deleted file mode 100644 index f8b82870f5f06..0000000000000 --- a/db/schema_migrations/20221226105323 +++ /dev/null @@ -1 +0,0 @@ -29ebddfcf7508f259eb4de595e194995b255a1a80d79aaa6d261323d8d273021 \ No newline at end of file diff --git a/db/schema_migrations/20221226132038 b/db/schema_migrations/20221226132038 deleted file mode 100644 index 31a40e6d5f2c1..0000000000000 --- a/db/schema_migrations/20221226132038 +++ /dev/null @@ -1 +0,0 @@ -395dd3ad54b7854a12d9bf2faf575ee4d7842a75f0f16db40d26523e4e2ea21f \ No newline at end of file diff --git a/db/schema_migrations/20221226153240 b/db/schema_migrations/20221226153240 deleted file mode 100644 index 3f2eb6afe6406..0000000000000 --- a/db/schema_migrations/20221226153240 +++ /dev/null @@ -1 +0,0 @@ -0ed51d0f733ec6c94cc951e1e0b56c2095bf685dfa55d55cca63554e97ef509e \ No newline at end of file diff --git a/db/schema_migrations/20221226154458 b/db/schema_migrations/20221226154458 deleted file mode 100644 index 8aefafb2fc944..0000000000000 --- a/db/schema_migrations/20221226154458 +++ /dev/null @@ -1 +0,0 @@ -55910df54a9f6260145aac231af36dfbb5018899eebccfc7f80b51b9d48a7c67 \ No newline at end of file diff --git a/db/schema_migrations/20221226163203 b/db/schema_migrations/20221226163203 deleted file mode 100644 index d9f0948a43035..0000000000000 --- a/db/schema_migrations/20221226163203 +++ /dev/null @@ -1 +0,0 @@ -4aa2fe3493785432e633c546593968a4084866560d0d68786e5d10bb202e1a5a \ No newline at end of file diff --git a/db/schema_migrations/20221227080606 b/db/schema_migrations/20221227080606 deleted file mode 100644 index fbb13af357845..0000000000000 --- a/db/schema_migrations/20221227080606 +++ /dev/null @@ -1 +0,0 @@ -3dc372c96fad7f47f03b3bf5799af9fd19b2f9c9822116d28057227708abeeb2 \ No newline at end of file diff --git a/db/schema_migrations/20221227100751 b/db/schema_migrations/20221227100751 deleted file mode 100644 index 62606a7b6d5e4..0000000000000 --- a/db/schema_migrations/20221227100751 +++ /dev/null @@ -1 +0,0 @@ -cc745f68d3719de09f5c0943711a013e84dcd229faaa59f5157e4f1bbcc6d736 \ No newline at end of file diff --git a/db/schema_migrations/20221227100846 b/db/schema_migrations/20221227100846 deleted file mode 100644 index 0bb424a14b51b..0000000000000 --- a/db/schema_migrations/20221227100846 +++ /dev/null @@ -1 +0,0 @@ -19837d832303866eabb7cd27e16926e4e0ae49437b70882bea87421415835c9a \ No newline at end of file diff --git a/db/schema_migrations/20221227100908 b/db/schema_migrations/20221227100908 deleted file mode 100644 index aedc24344c10d..0000000000000 --- a/db/schema_migrations/20221227100908 +++ /dev/null @@ -1 +0,0 @@ -a10a39aaa4184b5f082bfbb17b22cb84c3538f896438f89a366fe92658f5ca41 \ No newline at end of file diff --git a/db/schema_migrations/20221227101436 b/db/schema_migrations/20221227101436 deleted file mode 100644 index 04b8bd3a2e1a8..0000000000000 --- a/db/schema_migrations/20221227101436 +++ /dev/null @@ -1 +0,0 @@ -06a999af8600837d5cb29efdcb56a14eb456d89ea00b6f8974a57a34f4c4008d \ No newline at end of file diff --git a/db/schema_migrations/20221228063845 b/db/schema_migrations/20221228063845 deleted file mode 100644 index 7f5b90b29fd27..0000000000000 --- a/db/schema_migrations/20221228063845 +++ /dev/null @@ -1 +0,0 @@ -48d1456517b233b38d1af9517206db3bd24b1f858912d488f5583e5122f624b7 \ No newline at end of file diff --git a/db/schema_migrations/20221228072549 b/db/schema_migrations/20221228072549 deleted file mode 100644 index e0079614de096..0000000000000 --- a/db/schema_migrations/20221228072549 +++ /dev/null @@ -1 +0,0 @@ -2935444c762f3fdc8bd04055fc6048be4b637d2136e71a84479135e44c50856b \ No newline at end of file diff --git a/db/schema_migrations/20221228073206 b/db/schema_migrations/20221228073206 deleted file mode 100644 index cbd5116deea3f..0000000000000 --- a/db/schema_migrations/20221228073206 +++ /dev/null @@ -1 +0,0 @@ -0105a4d40b8ecb6e4c1bc543001f223bf9bbb25c03288dd394859d4926bb4801 \ No newline at end of file diff --git a/db/schema_migrations/20221228083452 b/db/schema_migrations/20221228083452 deleted file mode 100644 index 6be5bb4eb6cfc..0000000000000 --- a/db/schema_migrations/20221228083452 +++ /dev/null @@ -1 +0,0 @@ -44e854a2afa7bebeb1e220ec1dee2f204173be59e403ba8a70ba3d22675be7a9 \ No newline at end of file diff --git a/db/schema_migrations/20221228103133 b/db/schema_migrations/20221228103133 deleted file mode 100644 index 757c1d9169d8b..0000000000000 --- a/db/schema_migrations/20221228103133 +++ /dev/null @@ -1 +0,0 @@ -59e19291b3f8bb08dd63c1b1993af8f75e06d56ca776c3e8711adcc8c5c26e86 \ No newline at end of file diff --git a/db/schema_migrations/20221228161214 b/db/schema_migrations/20221228161214 deleted file mode 100644 index 7ed6d761a6792..0000000000000 --- a/db/schema_migrations/20221228161214 +++ /dev/null @@ -1 +0,0 @@ -2e22336f0f4f99dc91198bc0634816309ac49375900eed662ab7a41ddce34984 \ No newline at end of file diff --git a/db/schema_migrations/20221228163035 b/db/schema_migrations/20221228163035 deleted file mode 100644 index 477f157a415b6..0000000000000 --- a/db/schema_migrations/20221228163035 +++ /dev/null @@ -1 +0,0 @@ -18c91662404c12f9bcdda60fbf80a13ec36dcd881e47b31d4f0c7a0f20c1f225 \ No newline at end of file diff --git a/db/schema_migrations/20221228210616 b/db/schema_migrations/20221228210616 deleted file mode 100644 index 69ff81fe26542..0000000000000 --- a/db/schema_migrations/20221228210616 +++ /dev/null @@ -1 +0,0 @@ -a248f26495d2fab454538f8dd1c43e73ef4078f1822a900fce97b8c7f6df74c6 \ No newline at end of file diff --git a/db/schema_migrations/20221229064959 b/db/schema_migrations/20221229064959 deleted file mode 100644 index 545aa310068e3..0000000000000 --- a/db/schema_migrations/20221229064959 +++ /dev/null @@ -1 +0,0 @@ -052f83d45f263bc95b80081af9c3086b6677b49e503ddc11770f444d7abd7e45 \ No newline at end of file diff --git a/db/schema_migrations/20230102131000 b/db/schema_migrations/20230102131000 deleted file mode 100644 index 2c0fa2c3f2a99..0000000000000 --- a/db/schema_migrations/20230102131000 +++ /dev/null @@ -1 +0,0 @@ -13b992cf6f30efc7a82062c5184f3e8398704c01e73618c6dd38071ee67595e1 \ No newline at end of file diff --git a/db/schema_migrations/20230102131050 b/db/schema_migrations/20230102131050 deleted file mode 100644 index 03e9292d7e580..0000000000000 --- a/db/schema_migrations/20230102131050 +++ /dev/null @@ -1 +0,0 @@ -4933fd938c23b99963542c2f7e1f50e0270f6817ce49b0864fc7bdad63ea98b3 \ No newline at end of file diff --git a/db/schema_migrations/20230102131100 b/db/schema_migrations/20230102131100 deleted file mode 100644 index 86af671bfe697..0000000000000 --- a/db/schema_migrations/20230102131100 +++ /dev/null @@ -1 +0,0 @@ -889e814bc9633481afeae8e63bfe080bfc956839fd5f97c0d39725f3acdff100 \ No newline at end of file diff --git a/db/schema_migrations/20230102180341 b/db/schema_migrations/20230102180341 deleted file mode 100644 index bc153e07b1acd..0000000000000 --- a/db/schema_migrations/20230102180341 +++ /dev/null @@ -1 +0,0 @@ -1ed2531b3655b46f67c523f4a588471b1b0cb291b24c9491e6efe89d644546d8 \ No newline at end of file diff --git a/db/schema_migrations/20230104103748 b/db/schema_migrations/20230104103748 deleted file mode 100644 index e948ea381c406..0000000000000 --- a/db/schema_migrations/20230104103748 +++ /dev/null @@ -1 +0,0 @@ -7e6fb82580d45777ca0e656c589dc0eed5a7d090fc38096b395a10967acd08f4 \ No newline at end of file diff --git a/db/schema_migrations/20230104150600 b/db/schema_migrations/20230104150600 deleted file mode 100644 index 0a295f686f84c..0000000000000 --- a/db/schema_migrations/20230104150600 +++ /dev/null @@ -1 +0,0 @@ -728bc4489b37ec92f11a759ab682cb17b4658827c547474dca4c4e84f26e099f \ No newline at end of file diff --git a/db/schema_migrations/20230104150601 b/db/schema_migrations/20230104150601 deleted file mode 100644 index 638ac83aeaf67..0000000000000 --- a/db/schema_migrations/20230104150601 +++ /dev/null @@ -1 +0,0 @@ -ebccade2de9ef09aab8679a67f1487324a2f3c080f80ef0524c3178fc328f326 \ No newline at end of file diff --git a/db/schema_migrations/20230104201524 b/db/schema_migrations/20230104201524 deleted file mode 100644 index e98bb08fe2f49..0000000000000 --- a/db/schema_migrations/20230104201524 +++ /dev/null @@ -1 +0,0 @@ -e27a0a61f6807352c02ddf7c0bd44a86e3c244051fa3977f597cc92e83fcb0d1 \ No newline at end of file diff --git a/db/schema_migrations/20230104220137 b/db/schema_migrations/20230104220137 deleted file mode 100644 index cc31da8132835..0000000000000 --- a/db/schema_migrations/20230104220137 +++ /dev/null @@ -1 +0,0 @@ -49d5ccd1521885a759d3ca6da59479aad17a90640b157cfe6bd6a22328ec30d9 \ No newline at end of file diff --git a/db/schema_migrations/20230104222438 b/db/schema_migrations/20230104222438 deleted file mode 100644 index 9390a3893760d..0000000000000 --- a/db/schema_migrations/20230104222438 +++ /dev/null @@ -1 +0,0 @@ -4d6f00bb2679beaac6952d5324c9c3b36c54b5b7bf85fd18e57bdace9bb0ceb6 \ No newline at end of file diff --git a/db/schema_migrations/20230104222514 b/db/schema_migrations/20230104222514 deleted file mode 100644 index 070e537614c3d..0000000000000 --- a/db/schema_migrations/20230104222514 +++ /dev/null @@ -1 +0,0 @@ -2647722de5ee25c720772c61b516ecf6f1121a83269c53381568ce0a349750a3 \ No newline at end of file diff --git a/db/schema_migrations/20230104224020 b/db/schema_migrations/20230104224020 deleted file mode 100644 index ca4f1ac5552aa..0000000000000 --- a/db/schema_migrations/20230104224020 +++ /dev/null @@ -1 +0,0 @@ -8fe5279720306a5f91f973d1ee7c62838b60ab5cb11162237d50fbc32c7567bd \ No newline at end of file diff --git a/db/schema_migrations/20230105170414 b/db/schema_migrations/20230105170414 deleted file mode 100644 index 6892cba20ac91..0000000000000 --- a/db/schema_migrations/20230105170414 +++ /dev/null @@ -1 +0,0 @@ -14de51f7ba812f5a4159e18f2f537ea91e21c1f5fc6c297417409c815c2ac0be \ No newline at end of file diff --git a/db/schema_migrations/20230105172120 b/db/schema_migrations/20230105172120 deleted file mode 100644 index d849fb97d6545..0000000000000 --- a/db/schema_migrations/20230105172120 +++ /dev/null @@ -1 +0,0 @@ -b3c4386dd49156991f2c9efe2516f96540d0bad81965a7be56f319a4dbe13580 \ No newline at end of file diff --git a/db/schema_migrations/20230105180002 b/db/schema_migrations/20230105180002 deleted file mode 100644 index 94ce14f47393b..0000000000000 --- a/db/schema_migrations/20230105180002 +++ /dev/null @@ -1 +0,0 @@ -3dcf0ced36dc29ebb3e79bbe137e7e0ca76e74d30bebaec5971e91eb858ae145 \ No newline at end of file diff --git a/db/schema_migrations/20230106014423 b/db/schema_migrations/20230106014423 deleted file mode 100644 index f4fc4137ffd69..0000000000000 --- a/db/schema_migrations/20230106014423 +++ /dev/null @@ -1 +0,0 @@ -1551efcbb268bdb564647fb36ad700b995a8296229a858a3c82cb36ff3cff673 \ No newline at end of file diff --git a/db/schema_migrations/20230106124332 b/db/schema_migrations/20230106124332 deleted file mode 100644 index ebd5e9d8f2464..0000000000000 --- a/db/schema_migrations/20230106124332 +++ /dev/null @@ -1 +0,0 @@ -7cd938dc6063a51abca80760b6c17f33e64fc73012c56ebbb8ffe4a18defa961 \ No newline at end of file diff --git a/db/schema_migrations/20230106125945 b/db/schema_migrations/20230106125945 deleted file mode 100644 index 0a7df366e5723..0000000000000 --- a/db/schema_migrations/20230106125945 +++ /dev/null @@ -1 +0,0 @@ -6b100c6dca62cbb73103b1e82e78d499eaa9a32b2a04109e5e8c79c5ec5b7927 \ No newline at end of file diff --git a/db/schema_migrations/20230106131659 b/db/schema_migrations/20230106131659 deleted file mode 100644 index 46753b2ccc535..0000000000000 --- a/db/schema_migrations/20230106131659 +++ /dev/null @@ -1 +0,0 @@ -1d111bb8f2eee2fa06070a383170ac0e8c0bfb7135d0b0d4e77bd98fc8458960 \ No newline at end of file diff --git a/db/schema_migrations/20230106142239 b/db/schema_migrations/20230106142239 deleted file mode 100644 index 9db0af20dfae6..0000000000000 --- a/db/schema_migrations/20230106142239 +++ /dev/null @@ -1 +0,0 @@ -17a39b088e164f5642ad5ac34ef03a3c358c0694f6c2313036dd883f07ecc245 \ No newline at end of file diff --git a/db/schema_migrations/20230106184809 b/db/schema_migrations/20230106184809 deleted file mode 100644 index 95318b9ea027c..0000000000000 --- a/db/schema_migrations/20230106184809 +++ /dev/null @@ -1 +0,0 @@ -dad6e8972db3829dc6c02013ee87b08aa9bf4c50e58b35b0dbd67935ee4c266a \ No newline at end of file diff --git a/db/schema_migrations/20230107125328 b/db/schema_migrations/20230107125328 deleted file mode 100644 index 94ba5596a06a5..0000000000000 --- a/db/schema_migrations/20230107125328 +++ /dev/null @@ -1 +0,0 @@ -741599316bd51b0d454e49c43a06b834d8d172f3fd1dcd28996494da8fdf5d8b \ No newline at end of file diff --git a/db/schema_migrations/20230109093043 b/db/schema_migrations/20230109093043 deleted file mode 100644 index 5a5f9ed2180f4..0000000000000 --- a/db/schema_migrations/20230109093043 +++ /dev/null @@ -1 +0,0 @@ -98252d08d480287f1014d7b7c46eafdaa53b9582607e87d5169ec7c314b56ccc \ No newline at end of file diff --git a/db/schema_migrations/20230109095159 b/db/schema_migrations/20230109095159 deleted file mode 100644 index 2e34a34538c6c..0000000000000 --- a/db/schema_migrations/20230109095159 +++ /dev/null @@ -1 +0,0 @@ -dc0e429b5147b43c12e683b46f2d45cc2e52a66a94cac92a1c55d43ceb9dc0b3 \ No newline at end of file diff --git a/db/schema_migrations/20230109095622 b/db/schema_migrations/20230109095622 deleted file mode 100644 index 1a0f0c8091884..0000000000000 --- a/db/schema_migrations/20230109095622 +++ /dev/null @@ -1 +0,0 @@ -a567168b41dc56069e485ef303aeb69b967e685d463ed44d99f54dc96cdf9bbd \ No newline at end of file diff --git a/db/schema_migrations/20230109100044 b/db/schema_migrations/20230109100044 deleted file mode 100644 index 6e72af38f8f71..0000000000000 --- a/db/schema_migrations/20230109100044 +++ /dev/null @@ -1 +0,0 @@ -052c36d0911e104f8bc42f3229170c234f3c61555f53712adbfee6ab385233b3 \ No newline at end of file diff --git a/db/schema_migrations/20230109121313 b/db/schema_migrations/20230109121313 deleted file mode 100644 index 485f829f7cc15..0000000000000 --- a/db/schema_migrations/20230109121313 +++ /dev/null @@ -1 +0,0 @@ -3f2dca9f653c9fe29edde1b29889caf47d17792660b4ab496f4c77cc1f512bf2 \ No newline at end of file diff --git a/db/schema_migrations/20230109144915 b/db/schema_migrations/20230109144915 deleted file mode 100644 index 3aa06a8e06cc3..0000000000000 --- a/db/schema_migrations/20230109144915 +++ /dev/null @@ -1 +0,0 @@ -af5a388ec9716c4ad7e1b513c672aee382e56f859bfbc5b4bd238a6d3c3c2155 \ No newline at end of file diff --git a/db/schema_migrations/20230109144928 b/db/schema_migrations/20230109144928 deleted file mode 100644 index e8491d35e6ffb..0000000000000 --- a/db/schema_migrations/20230109144928 +++ /dev/null @@ -1 +0,0 @@ -1eb5fb28c64d25991587b61821293bb94216a7753b3444568ab389cd1fbfe416 \ No newline at end of file diff --git a/db/schema_migrations/20230109144941 b/db/schema_migrations/20230109144941 deleted file mode 100644 index a9ddefa2314a4..0000000000000 --- a/db/schema_migrations/20230109144941 +++ /dev/null @@ -1 +0,0 @@ -9a10f3fdd239fb65b36d9820474adbf804a2f93f14a11b33007946872e637e36 \ No newline at end of file diff --git a/db/schema_migrations/20230109144953 b/db/schema_migrations/20230109144953 deleted file mode 100644 index b677a0cba24c3..0000000000000 --- a/db/schema_migrations/20230109144953 +++ /dev/null @@ -1 +0,0 @@ -da3526f94be5d3ae58c2f12efc725cc9782d6611f4c75cdb02af501eb97437a7 \ No newline at end of file diff --git a/db/schema_migrations/20230109145005 b/db/schema_migrations/20230109145005 deleted file mode 100644 index 703e57b88c572..0000000000000 --- a/db/schema_migrations/20230109145005 +++ /dev/null @@ -1 +0,0 @@ -5d094f7f2425ce48874af990cdda371da5956c70c4c520c85ba20ce243518b70 \ No newline at end of file diff --git a/db/schema_migrations/20230109145018 b/db/schema_migrations/20230109145018 deleted file mode 100644 index 0d89853b93129..0000000000000 --- a/db/schema_migrations/20230109145018 +++ /dev/null @@ -1 +0,0 @@ -7285f96cefaecee6fb83d16bfa0559c967cb28269a9ebaf806e16c5c9850c7fb \ No newline at end of file diff --git a/db/schema_migrations/20230109215921 b/db/schema_migrations/20230109215921 deleted file mode 100644 index 596b02f9f5f0f..0000000000000 --- a/db/schema_migrations/20230109215921 +++ /dev/null @@ -1 +0,0 @@ -509d522cb5e0fc461228d9102f942e4d5a0c0e4df3fad98bb2988250a9436172 \ No newline at end of file diff --git a/db/schema_migrations/20230109232316 b/db/schema_migrations/20230109232316 deleted file mode 100644 index 813483d449655..0000000000000 --- a/db/schema_migrations/20230109232316 +++ /dev/null @@ -1 +0,0 @@ -94981a0226e10e8f1c711e5b3e110486c019595b822c5d8bf728285233ebd22b \ No newline at end of file diff --git a/db/schema_migrations/20230110031131 b/db/schema_migrations/20230110031131 deleted file mode 100644 index b9765ed25ea62..0000000000000 --- a/db/schema_migrations/20230110031131 +++ /dev/null @@ -1 +0,0 @@ -ae6f1f8a86b4b333349e8631f83372ff509f0844530d7438ba9cf78a49aa2e7d \ No newline at end of file diff --git a/db/schema_migrations/20230110172751 b/db/schema_migrations/20230110172751 deleted file mode 100644 index aabd27bcd3d94..0000000000000 --- a/db/schema_migrations/20230110172751 +++ /dev/null @@ -1 +0,0 @@ -0f3165c67b8b97901561614dfa54a50650c042df9b69ad0f2cc9ae793799a653 \ No newline at end of file diff --git a/db/schema_migrations/20230110212906 b/db/schema_migrations/20230110212906 deleted file mode 100644 index 9a8bf353b0964..0000000000000 --- a/db/schema_migrations/20230110212906 +++ /dev/null @@ -1 +0,0 @@ -0b186a286daefba0149e5b5b34a82109a6d8d67227b3ae9197182d0af97dce43 \ No newline at end of file diff --git a/db/schema_migrations/20230111092510 b/db/schema_migrations/20230111092510 deleted file mode 100644 index b84ab421d2d3a..0000000000000 --- a/db/schema_migrations/20230111092510 +++ /dev/null @@ -1 +0,0 @@ -d80ba166cee17bce1ac7825d9acdc9eeaf78aca5df276cfe2c3b2b076112dd1e \ No newline at end of file diff --git a/db/schema_migrations/20230111124512 b/db/schema_migrations/20230111124512 deleted file mode 100644 index 405823e2861b2..0000000000000 --- a/db/schema_migrations/20230111124512 +++ /dev/null @@ -1 +0,0 @@ -914b596569910281ff0973119d042e0a2f7e4d16e649d7b412681c3d7eaa1854 \ No newline at end of file diff --git a/db/schema_migrations/20230111125148 b/db/schema_migrations/20230111125148 deleted file mode 100644 index d152198f42c0e..0000000000000 --- a/db/schema_migrations/20230111125148 +++ /dev/null @@ -1 +0,0 @@ -3df52ce2b3bfb29884d73cb69aa317ccca8f13c06a4e5cc6622347c52b599c50 \ No newline at end of file diff --git a/db/schema_migrations/20230111125150 b/db/schema_migrations/20230111125150 deleted file mode 100644 index 21009223bc2a1..0000000000000 --- a/db/schema_migrations/20230111125150 +++ /dev/null @@ -1 +0,0 @@ -414c3da79aa6ae6b6a609b7dae715c0121f62d84a76400b745c0b8eaf27433e0 \ No newline at end of file diff --git a/db/schema_migrations/20230111132621 b/db/schema_migrations/20230111132621 deleted file mode 100644 index c259e47ca6d73..0000000000000 --- a/db/schema_migrations/20230111132621 +++ /dev/null @@ -1 +0,0 @@ -d058410f8fd26f5a4d8b18b949ee1c8202b4b2eaa8c5589a81f14107f15cd9fd \ No newline at end of file diff --git a/db/schema_migrations/20230111171355 b/db/schema_migrations/20230111171355 deleted file mode 100644 index 453c56f562df0..0000000000000 --- a/db/schema_migrations/20230111171355 +++ /dev/null @@ -1 +0,0 @@ -add0aa50627dd4a76e090c72d816f071113c59e96ed8eeb6733c93554b1a8a6f \ No newline at end of file diff --git a/db/schema_migrations/20230111174113 b/db/schema_migrations/20230111174113 deleted file mode 100644 index 99b63468318cf..0000000000000 --- a/db/schema_migrations/20230111174113 +++ /dev/null @@ -1 +0,0 @@ -e91e041c1bec4b92128c7e3d2cb2319b96bc399b5aff5c165d57581aa023f2b4 \ No newline at end of file diff --git a/db/schema_migrations/20230112014822 b/db/schema_migrations/20230112014822 deleted file mode 100644 index 84e276b6334a7..0000000000000 --- a/db/schema_migrations/20230112014822 +++ /dev/null @@ -1 +0,0 @@ -2501bf572453b7d77759dfd0677e9f0a0ae35c6095a3df6fa841a4b698602186 \ No newline at end of file diff --git a/db/schema_migrations/20230112051854 b/db/schema_migrations/20230112051854 deleted file mode 100644 index 5082b8bfad79b..0000000000000 --- a/db/schema_migrations/20230112051854 +++ /dev/null @@ -1 +0,0 @@ -16e7446f8fba7fe0b76559432ac6ecc30261a5775b9f914c77425ceab3b92315 \ No newline at end of file diff --git a/db/schema_migrations/20230112085143 b/db/schema_migrations/20230112085143 deleted file mode 100644 index 94f871c7ad810..0000000000000 --- a/db/schema_migrations/20230112085143 +++ /dev/null @@ -1 +0,0 @@ -42bceeb42c208e733d3e7d88c89b9e85e0fb4947f5f8d3828586417fe8ed9ec6 \ No newline at end of file diff --git a/db/schema_migrations/20230112104253 b/db/schema_migrations/20230112104253 deleted file mode 100644 index dd1f723744887..0000000000000 --- a/db/schema_migrations/20230112104253 +++ /dev/null @@ -1 +0,0 @@ -e15e005b840e8d6037548d2abec3ddbae9698ce29e41ac63b134cfc57361d311 \ No newline at end of file diff --git a/db/schema_migrations/20230112104526 b/db/schema_migrations/20230112104526 deleted file mode 100644 index 6f7dc070f72c1..0000000000000 --- a/db/schema_migrations/20230112104526 +++ /dev/null @@ -1 +0,0 @@ -7824b001286975b284a1cc9dafd58e8959d9f9560a283b139551542bea82b128 \ No newline at end of file diff --git a/db/schema_migrations/20230112104636 b/db/schema_migrations/20230112104636 deleted file mode 100644 index ed9fbf67d972d..0000000000000 --- a/db/schema_migrations/20230112104636 +++ /dev/null @@ -1 +0,0 @@ -ec9497e49f2b1289c144abf50aeb288fdbdf9543cf87bb874054bf6bb51c645f \ No newline at end of file diff --git a/db/schema_migrations/20230112141236 b/db/schema_migrations/20230112141236 deleted file mode 100644 index 6f22c27eb0190..0000000000000 --- a/db/schema_migrations/20230112141236 +++ /dev/null @@ -1 +0,0 @@ -d313ee9c99032255e491c1d2113d4ab07c4619287b5bceeb64ee08235f88f434 \ No newline at end of file diff --git a/db/schema_migrations/20230112144946 b/db/schema_migrations/20230112144946 deleted file mode 100644 index e9e307791f5f9..0000000000000 --- a/db/schema_migrations/20230112144946 +++ /dev/null @@ -1 +0,0 @@ -a2cb76b2138b3edc014c01c4b130fcd58bf81a10c68c897376f5bf8d69d5a660 \ No newline at end of file diff --git a/db/schema_migrations/20230112145326 b/db/schema_migrations/20230112145326 deleted file mode 100644 index 1878bebba663a..0000000000000 --- a/db/schema_migrations/20230112145326 +++ /dev/null @@ -1 +0,0 @@ -97a52b54895ff5f5ea3c2dac6148c8d8110081bffe9064c50547b776ec56e78a \ No newline at end of file diff --git a/db/schema_migrations/20230113003255 b/db/schema_migrations/20230113003255 deleted file mode 100644 index 21c60171eb8dc..0000000000000 --- a/db/schema_migrations/20230113003255 +++ /dev/null @@ -1 +0,0 @@ -b10da671ade6a312cdd41f9800c301642c81da8e04fcaa3ea322ef9923d18933 \ No newline at end of file diff --git a/db/schema_migrations/20230113195141 b/db/schema_migrations/20230113195141 deleted file mode 100644 index f64f9ce41f236..0000000000000 --- a/db/schema_migrations/20230113195141 +++ /dev/null @@ -1 +0,0 @@ -3e69f6ab127ec01a005ad1de935500fd4bf5528745cec88139aa2917b2a07abf \ No newline at end of file diff --git a/db/schema_migrations/20230116083826 b/db/schema_migrations/20230116083826 deleted file mode 100644 index 599661ce5bfef..0000000000000 --- a/db/schema_migrations/20230116083826 +++ /dev/null @@ -1 +0,0 @@ -505406e54c5351b1f6dee8a393e5fbfeb23240f007434724f6d096b64ba5cbcf \ No newline at end of file diff --git a/db/schema_migrations/20230116090630 b/db/schema_migrations/20230116090630 deleted file mode 100644 index 85667e1537914..0000000000000 --- a/db/schema_migrations/20230116090630 +++ /dev/null @@ -1 +0,0 @@ -44d8f6ad5cf6c62ddf8c2ce2580b9d3edcf7ce25a87a580acf3bef0e9db42317 \ No newline at end of file diff --git a/db/schema_migrations/20230116090852 b/db/schema_migrations/20230116090852 deleted file mode 100644 index 8f4fc0e17c1a1..0000000000000 --- a/db/schema_migrations/20230116090852 +++ /dev/null @@ -1 +0,0 @@ -01a0c8d8e168068dd127d9763705736ace4420d69cae30be54d2a62bce40e855 \ No newline at end of file diff --git a/db/schema_migrations/20230116090920 b/db/schema_migrations/20230116090920 deleted file mode 100644 index 89b5ca6744c43..0000000000000 --- a/db/schema_migrations/20230116090920 +++ /dev/null @@ -1 +0,0 @@ -828d17a6ea6658e6f8b8638564e4bb08fd224b19245349b19903396f86c4e276 \ No newline at end of file diff --git a/db/schema_migrations/20230116091626 b/db/schema_migrations/20230116091626 deleted file mode 100644 index 93b2c333c5b06..0000000000000 --- a/db/schema_migrations/20230116091626 +++ /dev/null @@ -1 +0,0 @@ -5087e055f633fba07d4aa1f50c2172d5da71c1d1d34426d291e99ac30f077667 \ No newline at end of file diff --git a/db/schema_migrations/20230116111252 b/db/schema_migrations/20230116111252 deleted file mode 100644 index bee6cdeb031f7..0000000000000 --- a/db/schema_migrations/20230116111252 +++ /dev/null @@ -1 +0,0 @@ -a849b6e387cf0fb2dffd67674062d0b283853ad582546d49c782b9120f075383 \ No newline at end of file diff --git a/db/schema_migrations/20230116143310 b/db/schema_migrations/20230116143310 deleted file mode 100644 index c33f99905313a..0000000000000 --- a/db/schema_migrations/20230116143310 +++ /dev/null @@ -1 +0,0 @@ -992b178c63147915cf4f45c9ff7e9853fd69dc23c5dec758ea1707c5d5f0db47 \ No newline at end of file diff --git a/db/schema_migrations/20230116143311 b/db/schema_migrations/20230116143311 deleted file mode 100644 index fca11c68a252c..0000000000000 --- a/db/schema_migrations/20230116143311 +++ /dev/null @@ -1 +0,0 @@ -a447880939f84f9c9e0b1d4afd2bc8a73bf930798b44a66387b350136ab822c9 \ No newline at end of file diff --git a/db/schema_migrations/20230116143312 b/db/schema_migrations/20230116143312 deleted file mode 100644 index f704f78d6f8cc..0000000000000 --- a/db/schema_migrations/20230116143312 +++ /dev/null @@ -1 +0,0 @@ -0df7cea4aee522e901ea673debf4244ba2f9b85059fd6ee3b2d46a8171d85fe2 \ No newline at end of file diff --git a/db/schema_migrations/20230116160904 b/db/schema_migrations/20230116160904 deleted file mode 100644 index 278ed9bd572d6..0000000000000 --- a/db/schema_migrations/20230116160904 +++ /dev/null @@ -1 +0,0 @@ -b699539dfc4453d93c64b6b3532531ec9000d61cfc81ae5267c2c52eb489632f \ No newline at end of file diff --git a/db/schema_migrations/20230117092947 b/db/schema_migrations/20230117092947 deleted file mode 100644 index 4eeca7e352629..0000000000000 --- a/db/schema_migrations/20230117092947 +++ /dev/null @@ -1 +0,0 @@ -775eb98fc81524f667cfab4dfdcee9bd668143c7286011dd1f0d40f87fc06ab0 \ No newline at end of file diff --git a/db/schema_migrations/20230117093222 b/db/schema_migrations/20230117093222 deleted file mode 100644 index 5b539456dd10d..0000000000000 --- a/db/schema_migrations/20230117093222 +++ /dev/null @@ -1 +0,0 @@ -4d38db045a0d505ea8f62327de8cc58fc0896e7c194cf71ca28ba08113757696 \ No newline at end of file diff --git a/db/schema_migrations/20230117093736 b/db/schema_migrations/20230117093736 deleted file mode 100644 index 7d61bf2ba5c81..0000000000000 --- a/db/schema_migrations/20230117093736 +++ /dev/null @@ -1 +0,0 @@ -28b959fe3c79a9d24e24d296112ee7ada71b9932e608cbf5fa2d01cac3db0247 \ No newline at end of file diff --git a/db/schema_migrations/20230117093924 b/db/schema_migrations/20230117093924 deleted file mode 100644 index 0fc56af4b10f5..0000000000000 --- a/db/schema_migrations/20230117093924 +++ /dev/null @@ -1 +0,0 @@ -0a34ab643f8ac5fdd0dd604f53244fe07a88ebf992fed7863bf38300817c9acb \ No newline at end of file diff --git a/db/schema_migrations/20230117094111 b/db/schema_migrations/20230117094111 deleted file mode 100644 index 407024de0cb32..0000000000000 --- a/db/schema_migrations/20230117094111 +++ /dev/null @@ -1 +0,0 @@ -49b81bf05f155f17d44fede8a513ee5bea56e2ba7cd41a55505e31ba36c50b5e \ No newline at end of file diff --git a/db/schema_migrations/20230117094226 b/db/schema_migrations/20230117094226 deleted file mode 100644 index cc0943e7e6563..0000000000000 --- a/db/schema_migrations/20230117094226 +++ /dev/null @@ -1 +0,0 @@ -429754e80bcfde582c92a69a6b655a13254b7ac0fe3504bfad0924560a4c1eed \ No newline at end of file diff --git a/db/schema_migrations/20230117094316 b/db/schema_migrations/20230117094316 deleted file mode 100644 index 5657905baf9fe..0000000000000 --- a/db/schema_migrations/20230117094316 +++ /dev/null @@ -1 +0,0 @@ -7cd9ca122b41eb610e03dd258d74c5c7aaa31482a4ff21dfba720def099a1487 \ No newline at end of file diff --git a/db/schema_migrations/20230117113719 b/db/schema_migrations/20230117113719 deleted file mode 100644 index abdccc39a8050..0000000000000 --- a/db/schema_migrations/20230117113719 +++ /dev/null @@ -1 +0,0 @@ -d0aac8e7bdb605eec1f3d60aa06db81e36d0069b79a15a89f4a076889dd68edc \ No newline at end of file diff --git a/db/schema_migrations/20230117114739 b/db/schema_migrations/20230117114739 deleted file mode 100644 index cb9fabfe4c4e1..0000000000000 --- a/db/schema_migrations/20230117114739 +++ /dev/null @@ -1 +0,0 @@ -f4ba0d1de73da2b7a912c06ca458898f3404235025089efc74aee9fc4caa511a \ No newline at end of file diff --git a/db/schema_migrations/20230117145628 b/db/schema_migrations/20230117145628 deleted file mode 100644 index 62411cc9be8f9..0000000000000 --- a/db/schema_migrations/20230117145628 +++ /dev/null @@ -1 +0,0 @@ -9e6ebddf8723cd07222099bba07c97a8747abe9ea21f07c7ee7875e769cde4a4 \ No newline at end of file diff --git a/db/schema_migrations/20230117173433 b/db/schema_migrations/20230117173433 deleted file mode 100644 index cef427805470e..0000000000000 --- a/db/schema_migrations/20230117173433 +++ /dev/null @@ -1 +0,0 @@ -ee7f3ba064eaaf4a1bf92e5c0a2ed32e5d294ddd6f1fdd8e6eed54c8b83c2af5 \ No newline at end of file diff --git a/db/schema_migrations/20230118083437 b/db/schema_migrations/20230118083437 deleted file mode 100644 index 44a4ceb4e95d3..0000000000000 --- a/db/schema_migrations/20230118083437 +++ /dev/null @@ -1 +0,0 @@ -5d05a62784cc89c1c74531df16d0f4b47bbdba5e1c9f62434335e896a45e5784 \ No newline at end of file diff --git a/db/schema_migrations/20230118083632 b/db/schema_migrations/20230118083632 deleted file mode 100644 index ef6d72182c310..0000000000000 --- a/db/schema_migrations/20230118083632 +++ /dev/null @@ -1 +0,0 @@ -834f5888e949a3ba83b409d64f619329d32d8abb0202dd5aa2a5cec72a90c4c8 \ No newline at end of file diff --git a/db/schema_migrations/20230118083748 b/db/schema_migrations/20230118083748 deleted file mode 100644 index 9b1965a625d38..0000000000000 --- a/db/schema_migrations/20230118083748 +++ /dev/null @@ -1 +0,0 @@ -69bc3d796516f6b2c4de3027be529ea4f366bb03db05d2bdc58faf7041ef173a \ No newline at end of file diff --git a/db/schema_migrations/20230119085509 b/db/schema_migrations/20230119085509 deleted file mode 100644 index 1eb8297a4b368..0000000000000 --- a/db/schema_migrations/20230119085509 +++ /dev/null @@ -1 +0,0 @@ -6206e50e14c129aeb1d44fbd82add001e73b338bbe80bdade852ff7ec0bc0f86 \ No newline at end of file diff --git a/db/schema_migrations/20230119085552 b/db/schema_migrations/20230119085552 deleted file mode 100644 index d548c864d2f7b..0000000000000 --- a/db/schema_migrations/20230119085552 +++ /dev/null @@ -1 +0,0 @@ -4bc2f855e1448c3c1b3d6d2b853dc61b049048fa0fee663fe798d86ea88b09a0 \ No newline at end of file diff --git a/db/schema_migrations/20230119090944 b/db/schema_migrations/20230119090944 deleted file mode 100644 index b9efaee5bc04f..0000000000000 --- a/db/schema_migrations/20230119090944 +++ /dev/null @@ -1 +0,0 @@ -6d66200b1707cb469891aa661ed944b133833abe5a0cdd37e4cae1b78b36426f \ No newline at end of file diff --git a/db/schema_migrations/20230119091027 b/db/schema_migrations/20230119091027 deleted file mode 100644 index f4a5d3d556aab..0000000000000 --- a/db/schema_migrations/20230119091027 +++ /dev/null @@ -1 +0,0 @@ -0e269f5d643757423c3597f646b298224ab3c2eb60ab92cb030edb6ec8fb3241 \ No newline at end of file diff --git a/db/schema_migrations/20230119095022 b/db/schema_migrations/20230119095022 deleted file mode 100644 index 02c615d27f28f..0000000000000 --- a/db/schema_migrations/20230119095022 +++ /dev/null @@ -1 +0,0 @@ -938ad78781f488d0add8b1a85217f93ca41d7093015817d5bd5c8a853d3172b8 \ No newline at end of file diff --git a/db/schema_migrations/20230119095023 b/db/schema_migrations/20230119095023 deleted file mode 100644 index ae882ff2ca7e1..0000000000000 --- a/db/schema_migrations/20230119095023 +++ /dev/null @@ -1 +0,0 @@ -f0b069e73170819e044496fb6eb02b43d0ee2697524659b50ab9b66dd3ec9792 \ No newline at end of file diff --git a/db/schema_migrations/20230119095024 b/db/schema_migrations/20230119095024 deleted file mode 100644 index e7e4255c2331a..0000000000000 --- a/db/schema_migrations/20230119095024 +++ /dev/null @@ -1 +0,0 @@ -be0b7fd198db3caa10e16606a861de6e708eadd225ad0360604a9f4c512a3d19 \ No newline at end of file diff --git a/db/schema_migrations/20230119095025 b/db/schema_migrations/20230119095025 deleted file mode 100644 index f7eac79873c97..0000000000000 --- a/db/schema_migrations/20230119095025 +++ /dev/null @@ -1 +0,0 @@ -66239a6e2fdc476126ca247042078a1b939da15ff91c00cd0392ce664eadc9af \ No newline at end of file diff --git a/db/schema_migrations/20230119123256 b/db/schema_migrations/20230119123256 deleted file mode 100644 index 3a2db3c1d7641..0000000000000 --- a/db/schema_migrations/20230119123256 +++ /dev/null @@ -1 +0,0 @@ -bbf6542b726466ae98323f1e7dd636874e01228ec584166ab617a917822b3fa1 \ No newline at end of file diff --git a/db/schema_migrations/20230119123257 b/db/schema_migrations/20230119123257 deleted file mode 100644 index 78d75e164c065..0000000000000 --- a/db/schema_migrations/20230119123257 +++ /dev/null @@ -1 +0,0 @@ -e69eabf71bfdfc9c5aa50829d08b3ef1473e5359d01e08e1bdc94fcbb7c58e6e \ No newline at end of file diff --git a/db/schema_migrations/20230119123258 b/db/schema_migrations/20230119123258 deleted file mode 100644 index 0bb155c210624..0000000000000 --- a/db/schema_migrations/20230119123258 +++ /dev/null @@ -1 +0,0 @@ -6af88109e5186a6a2f18418f441e232757ee0b03cb8af62e72c86ca4d12075c9 \ No newline at end of file diff --git a/db/schema_migrations/20230119123259 b/db/schema_migrations/20230119123259 deleted file mode 100644 index c4ffc37f790cc..0000000000000 --- a/db/schema_migrations/20230119123259 +++ /dev/null @@ -1 +0,0 @@ -49e256cdd550386c989cb6edea22873547b96120cfd8b5652de532dbbe21928c \ No newline at end of file diff --git a/db/schema_migrations/20230119123908 b/db/schema_migrations/20230119123908 deleted file mode 100644 index 9a403a9da3089..0000000000000 --- a/db/schema_migrations/20230119123908 +++ /dev/null @@ -1 +0,0 @@ -9ad4c4a096bdbb8180326618ad686bedee57a53ada952dbfb820855a1f8098a9 \ No newline at end of file diff --git a/db/schema_migrations/20230119123937 b/db/schema_migrations/20230119123937 deleted file mode 100644 index 53e0789b79ee4..0000000000000 --- a/db/schema_migrations/20230119123937 +++ /dev/null @@ -1 +0,0 @@ -2240a3ac34b434da6cf7e814033ff1e318da12bd0b81920764500fe6f80d5416 \ No newline at end of file diff --git a/db/schema_migrations/20230119150727 b/db/schema_migrations/20230119150727 deleted file mode 100644 index 287ad14c4c87a..0000000000000 --- a/db/schema_migrations/20230119150727 +++ /dev/null @@ -1 +0,0 @@ -cd4606f0aab2593365b74ec0f99115e61fda3f77d6c01b7276f44e9a440d69be \ No newline at end of file diff --git a/db/schema_migrations/20230119151636 b/db/schema_migrations/20230119151636 deleted file mode 100644 index 8cc012ec6f190..0000000000000 --- a/db/schema_migrations/20230119151636 +++ /dev/null @@ -1 +0,0 @@ -18054d43494d8870295c5eb6fca2498625c10cad2d040b209c4d235ae08d6480 \ No newline at end of file diff --git a/db/schema_migrations/20230119151940 b/db/schema_migrations/20230119151940 deleted file mode 100644 index c0a4d78421fe0..0000000000000 --- a/db/schema_migrations/20230119151940 +++ /dev/null @@ -1 +0,0 @@ -c8040984273d168b3a41b3d09d8745b80c4045a0230e1917df277cc9a5b4ca71 \ No newline at end of file diff --git a/db/schema_migrations/20230119214643 b/db/schema_migrations/20230119214643 deleted file mode 100644 index 4b7817ad6ad2f..0000000000000 --- a/db/schema_migrations/20230119214643 +++ /dev/null @@ -1 +0,0 @@ -9bd94352c496d2554d6f96cc8aeda484b3efa894f88d5f8ae69f01ef3a2982bf \ No newline at end of file diff --git a/db/schema_migrations/20230119215436 b/db/schema_migrations/20230119215436 deleted file mode 100644 index 97303b6e7595a..0000000000000 --- a/db/schema_migrations/20230119215436 +++ /dev/null @@ -1 +0,0 @@ -e5498ebd6ea0c18271078236a4f64b447fa5c55318b92c04f12a66834a38f67d \ No newline at end of file diff --git a/db/schema_migrations/20230120170042 b/db/schema_migrations/20230120170042 deleted file mode 100644 index 924c3cb440834..0000000000000 --- a/db/schema_migrations/20230120170042 +++ /dev/null @@ -1 +0,0 @@ -036fd539aa235ccaba493bfa7294f28cf71cfd73a1e069de2977b9313fd0b655 \ No newline at end of file diff --git a/db/schema_migrations/20230120170631 b/db/schema_migrations/20230120170631 deleted file mode 100644 index 0fce8945eee06..0000000000000 --- a/db/schema_migrations/20230120170631 +++ /dev/null @@ -1 +0,0 @@ -61838f8cfb759c53aa8ccc47620cd4d6595a72293172c7e3ac77b2e79e422200 \ No newline at end of file diff --git a/db/schema_migrations/20230120171818 b/db/schema_migrations/20230120171818 deleted file mode 100644 index 00ddff1026f83..0000000000000 --- a/db/schema_migrations/20230120171818 +++ /dev/null @@ -1 +0,0 @@ -c0f53f169d2525ebd5e374c102fe73521d344df078c37384675995ac97fbed9a \ No newline at end of file diff --git a/db/schema_migrations/20230123095022 b/db/schema_migrations/20230123095022 deleted file mode 100644 index 258c9e571ad3f..0000000000000 --- a/db/schema_migrations/20230123095022 +++ /dev/null @@ -1 +0,0 @@ -d526d2549357ca87fb4abf400d6128cc14d01ea633cf2d496c3a9111e412c7f2 \ No newline at end of file diff --git a/db/schema_migrations/20230123095023 b/db/schema_migrations/20230123095023 deleted file mode 100644 index cdc0376c71965..0000000000000 --- a/db/schema_migrations/20230123095023 +++ /dev/null @@ -1 +0,0 @@ -7ad649155804a011c43e4208eea1f59c3e6894591587b5cf9ba4e8be4f5fa757 \ No newline at end of file diff --git a/db/schema_migrations/20230123120004 b/db/schema_migrations/20230123120004 deleted file mode 100644 index f7f7c9af3846f..0000000000000 --- a/db/schema_migrations/20230123120004 +++ /dev/null @@ -1 +0,0 @@ -879b3884221a9082aa2100eae23243fe0580d9ff56fd0de8433d535120b333ce \ No newline at end of file diff --git a/db/schema_migrations/20230123150648 b/db/schema_migrations/20230123150648 deleted file mode 100644 index 859934593fcb8..0000000000000 --- a/db/schema_migrations/20230123150648 +++ /dev/null @@ -1 +0,0 @@ -2e6b5f695349f464cbd5c73cffbb55e86044c6edf8708f785291ab85c0a4edbb \ No newline at end of file diff --git a/db/schema_migrations/20230124101832 b/db/schema_migrations/20230124101832 deleted file mode 100644 index ace7ff6027f8a..0000000000000 --- a/db/schema_migrations/20230124101832 +++ /dev/null @@ -1 +0,0 @@ -c549badd648613b0f52c69719cd62c93c5f49c1d39190a500bd68ec63a90c045 \ No newline at end of file diff --git a/db/schema_migrations/20230124102131 b/db/schema_migrations/20230124102131 deleted file mode 100644 index 81654dbb5d3dc..0000000000000 --- a/db/schema_migrations/20230124102131 +++ /dev/null @@ -1 +0,0 @@ -0e71cb12dfdd1af07f23e218ad76fd081877f49a20e9122ffcbad01e65a25c6f \ No newline at end of file diff --git a/db/schema_migrations/20230124102222 b/db/schema_migrations/20230124102222 deleted file mode 100644 index 6374755bd61f0..0000000000000 --- a/db/schema_migrations/20230124102222 +++ /dev/null @@ -1 +0,0 @@ -268e8ce7d9313f375843a3e8f23beb8028287ef2581f8120f78cbb2fe5b83f99 \ No newline at end of file diff --git a/db/schema_migrations/20230124104310 b/db/schema_migrations/20230124104310 deleted file mode 100644 index 92a6e54eff3d3..0000000000000 --- a/db/schema_migrations/20230124104310 +++ /dev/null @@ -1 +0,0 @@ -00c5c88297137232a7a180452f7ce03dcd56733a0b2e0acc2abfd5a63d36e39e \ No newline at end of file diff --git a/db/schema_migrations/20230124122143 b/db/schema_migrations/20230124122143 deleted file mode 100644 index a38e5b7c40ba2..0000000000000 --- a/db/schema_migrations/20230124122143 +++ /dev/null @@ -1 +0,0 @@ -be87eb6052d3f853f05f59a6deb8669857047ca95d28b209b1c19c66fa96ff15 \ No newline at end of file diff --git a/db/schema_migrations/20230124173255 b/db/schema_migrations/20230124173255 deleted file mode 100644 index b1134aad3845e..0000000000000 --- a/db/schema_migrations/20230124173255 +++ /dev/null @@ -1 +0,0 @@ -e11768af160039168f1badf070a8da705660f8a3518198570a0ad4fc39913d92 \ No newline at end of file diff --git a/db/schema_migrations/20230124183643 b/db/schema_migrations/20230124183643 deleted file mode 100644 index d8a2afdd1ca65..0000000000000 --- a/db/schema_migrations/20230124183643 +++ /dev/null @@ -1 +0,0 @@ -b96d1e00bf6368c639cb49afacbde681c505067f09457938106abe8c468bf118 \ No newline at end of file diff --git a/db/schema_migrations/20230124193917 b/db/schema_migrations/20230124193917 deleted file mode 100644 index b8e45dd4692d0..0000000000000 --- a/db/schema_migrations/20230124193917 +++ /dev/null @@ -1 +0,0 @@ -277c1abd9cc4f9fb6aca4991b7643d8b9964ef466f4d209848c90b34c8eec9c0 \ No newline at end of file diff --git a/db/schema_migrations/20230125090315 b/db/schema_migrations/20230125090315 deleted file mode 100644 index aefe04923e7ee..0000000000000 --- a/db/schema_migrations/20230125090315 +++ /dev/null @@ -1 +0,0 @@ -37cc2c2eeb910333a45a18820a569d4263eb614bc138a6a0fe11d037bae045c3 \ No newline at end of file diff --git a/db/schema_migrations/20230125093723 b/db/schema_migrations/20230125093723 deleted file mode 100644 index 9c5782dcdacdc..0000000000000 --- a/db/schema_migrations/20230125093723 +++ /dev/null @@ -1 +0,0 @@ -364f785b564d92d2956c5ffea71091561231888ffa6f4cd9125fc8ebf9150f77 \ No newline at end of file diff --git a/db/schema_migrations/20230125093840 b/db/schema_migrations/20230125093840 deleted file mode 100644 index 1d2fab2561942..0000000000000 --- a/db/schema_migrations/20230125093840 +++ /dev/null @@ -1 +0,0 @@ -c66f77a9de07e2f88b6d371b14f7f72068a5b8e25cb382cb08e578021affbeb7 \ No newline at end of file diff --git a/db/schema_migrations/20230126023444 b/db/schema_migrations/20230126023444 deleted file mode 100644 index 1f22c4096fab4..0000000000000 --- a/db/schema_migrations/20230126023444 +++ /dev/null @@ -1 +0,0 @@ -76894f6bf574e61d078781f0dc914f77dc1bf82a6a6786a32adaf8f829261387 \ No newline at end of file diff --git a/db/schema_migrations/20230126091522 b/db/schema_migrations/20230126091522 deleted file mode 100644 index b179f736257a0..0000000000000 --- a/db/schema_migrations/20230126091522 +++ /dev/null @@ -1 +0,0 @@ -48276b76dbedc046f7270e7204558ab045e48a6d7da9e1c0a58a76b06e51bfa5 \ No newline at end of file diff --git a/db/schema_migrations/20230126110439 b/db/schema_migrations/20230126110439 deleted file mode 100644 index 92153a67a50fe..0000000000000 --- a/db/schema_migrations/20230126110439 +++ /dev/null @@ -1 +0,0 @@ -14bc260de13fb0a42e13777183c5977ff66a01dac4670767f9aabec975c9171e \ No newline at end of file diff --git a/db/schema_migrations/20230126133531 b/db/schema_migrations/20230126133531 deleted file mode 100644 index 21a2394d94ef5..0000000000000 --- a/db/schema_migrations/20230126133531 +++ /dev/null @@ -1 +0,0 @@ -259fa00544b9f63d512738dcbd4fb1ffcdbbfae58e15f7fbeb4fe34e5e7fe1f3 \ No newline at end of file diff --git a/db/schema_migrations/20230126151622 b/db/schema_migrations/20230126151622 deleted file mode 100644 index 1713fa8f5f22b..0000000000000 --- a/db/schema_migrations/20230126151622 +++ /dev/null @@ -1 +0,0 @@ -b5de05db35043b53f3b00635da9d46475dbf7c9d133e83e5295fe4080ab004bb \ No newline at end of file diff --git a/db/schema_migrations/20230126210436 b/db/schema_migrations/20230126210436 deleted file mode 100644 index 7bdd4c12f6907..0000000000000 --- a/db/schema_migrations/20230126210436 +++ /dev/null @@ -1 +0,0 @@ -fc4716b37e18eed2e352ba56fff2c1bb685385336b75144745925a11c4c4f3cd \ No newline at end of file diff --git a/db/schema_migrations/20230127093353 b/db/schema_migrations/20230127093353 deleted file mode 100644 index 903688f1608b5..0000000000000 --- a/db/schema_migrations/20230127093353 +++ /dev/null @@ -1 +0,0 @@ -7b6b30a2de12f145df5eb0814f584a117a421b1ae23c4dd45fea58fe0d883653 \ No newline at end of file diff --git a/db/schema_migrations/20230127101834 b/db/schema_migrations/20230127101834 deleted file mode 100644 index 4d89984347a15..0000000000000 --- a/db/schema_migrations/20230127101834 +++ /dev/null @@ -1 +0,0 @@ -13aba72dc08069cf5585657a6c684495886f27c634cdb63c363ddd1ab6f7c58d \ No newline at end of file diff --git a/db/schema_migrations/20230127115607 b/db/schema_migrations/20230127115607 deleted file mode 100644 index 48b062249e1e6..0000000000000 --- a/db/schema_migrations/20230127115607 +++ /dev/null @@ -1 +0,0 @@ -d0d4a09ec220c34da584f5119435c0c782f32d78dd3cf9b864b444ccdb77041e \ No newline at end of file diff --git a/db/schema_migrations/20230127121107 b/db/schema_migrations/20230127121107 deleted file mode 100644 index 3e3993908e0e4..0000000000000 --- a/db/schema_migrations/20230127121107 +++ /dev/null @@ -1 +0,0 @@ -a95107b71a3e9c6a07b2e50ad18c37b93d0ec3ebcda3cbb8075603f1fb91c555 \ No newline at end of file diff --git a/db/schema_migrations/20230127121443 b/db/schema_migrations/20230127121443 deleted file mode 100644 index b876d31ae783b..0000000000000 --- a/db/schema_migrations/20230127121443 +++ /dev/null @@ -1 +0,0 @@ -08d2be57e3b7293bc6179e2265a7a627cb3b2327f6027039e9c3af9fa746425c \ No newline at end of file diff --git a/db/schema_migrations/20230127123947 b/db/schema_migrations/20230127123947 deleted file mode 100644 index cc3981f130201..0000000000000 --- a/db/schema_migrations/20230127123947 +++ /dev/null @@ -1 +0,0 @@ -dd57ab40a4263df49d8f52f8f737c5cc62101f932752cbb984cb6072d766d6f0 \ No newline at end of file diff --git a/db/schema_migrations/20230127123948 b/db/schema_migrations/20230127123948 deleted file mode 100644 index 0fa5c113d579d..0000000000000 --- a/db/schema_migrations/20230127123948 +++ /dev/null @@ -1 +0,0 @@ -aec7695c7e1cd2eb61625c1c08f7d8ee955bd729a8d70ea2753afcb7b545bfe6 \ No newline at end of file diff --git a/db/schema_migrations/20230127125018 b/db/schema_migrations/20230127125018 deleted file mode 100644 index 21d47c4e8d717..0000000000000 --- a/db/schema_migrations/20230127125018 +++ /dev/null @@ -1 +0,0 @@ -3be83793807d10ef26eb5adbfcfb47efee04d6aa3b3fde84467a69db0fb3d422 \ No newline at end of file diff --git a/db/schema_migrations/20230127131835 b/db/schema_migrations/20230127131835 deleted file mode 100644 index 2b7f6d0e91873..0000000000000 --- a/db/schema_migrations/20230127131835 +++ /dev/null @@ -1 +0,0 @@ -bf4c2b95c008f100045bad2b2c31ce03564f5b3299711ad7a423febd49117f52 \ No newline at end of file diff --git a/db/schema_migrations/20230127131915 b/db/schema_migrations/20230127131915 deleted file mode 100644 index 0ba2786182176..0000000000000 --- a/db/schema_migrations/20230127131915 +++ /dev/null @@ -1 +0,0 @@ -c5d7812734f7561736dafb427fe5276c248aad40a28304e6a785660bec2f54e2 \ No newline at end of file diff --git a/db/schema_migrations/20230127151529 b/db/schema_migrations/20230127151529 deleted file mode 100644 index b36a1842904c8..0000000000000 --- a/db/schema_migrations/20230127151529 +++ /dev/null @@ -1 +0,0 @@ -a3ba269ba178efa2a9025448ba9bf6cd4089484580510a1edc0aa111d5f92b23 \ No newline at end of file diff --git a/db/schema_migrations/20230127151530 b/db/schema_migrations/20230127151530 deleted file mode 100644 index 35951a5aaddc6..0000000000000 --- a/db/schema_migrations/20230127151530 +++ /dev/null @@ -1 +0,0 @@ -54678c1253121aaa9b3378b05621f212a6addaf88bd735c697706272a4dae2f8 \ No newline at end of file diff --git a/db/schema_migrations/20230127151531 b/db/schema_migrations/20230127151531 deleted file mode 100644 index ab576c0772d29..0000000000000 --- a/db/schema_migrations/20230127151531 +++ /dev/null @@ -1 +0,0 @@ -4403e5a0350da73dc83f6a4fd42e5e8721c3983fe8582d9df58f20b7fbc73333 \ No newline at end of file diff --git a/db/schema_migrations/20230127151606 b/db/schema_migrations/20230127151606 deleted file mode 100644 index 576d1fcf615d3..0000000000000 --- a/db/schema_migrations/20230127151606 +++ /dev/null @@ -1 +0,0 @@ -a8a968bf361b6807757d61720adf502528749b6d0236415d709bb393e540eefc \ No newline at end of file diff --git a/db/schema_migrations/20230127151607 b/db/schema_migrations/20230127151607 deleted file mode 100644 index a39fc0dbfffd0..0000000000000 --- a/db/schema_migrations/20230127151607 +++ /dev/null @@ -1 +0,0 @@ -814f3c5716966479aff28a3c2b1713632847c4c30381f2634e7136d5b5cf9f74 \ No newline at end of file diff --git a/db/schema_migrations/20230127152727 b/db/schema_migrations/20230127152727 deleted file mode 100644 index e29d1af05aca3..0000000000000 --- a/db/schema_migrations/20230127152727 +++ /dev/null @@ -1 +0,0 @@ -03377600dfb6df35b3541c4a6a1fdf19d29179c55ed101141289442322086651 \ No newline at end of file diff --git a/db/schema_migrations/20230127152728 b/db/schema_migrations/20230127152728 deleted file mode 100644 index e2fa412b5aafe..0000000000000 --- a/db/schema_migrations/20230127152728 +++ /dev/null @@ -1 +0,0 @@ -50e5a64558a8253e13514d158cc265e463dcfc92d3615a1f207d18b94778ec68 \ No newline at end of file diff --git a/db/schema_migrations/20230127153229 b/db/schema_migrations/20230127153229 deleted file mode 100644 index a61e9ebcf974a..0000000000000 --- a/db/schema_migrations/20230127153229 +++ /dev/null @@ -1 +0,0 @@ -4a1764bf10e6d07f0504a0bdac252c0820d20203ed1fe4a7d39d7bcf1ab524a0 \ No newline at end of file diff --git a/db/schema_migrations/20230127153230 b/db/schema_migrations/20230127153230 deleted file mode 100644 index 99afc6f1eecb5..0000000000000 --- a/db/schema_migrations/20230127153230 +++ /dev/null @@ -1 +0,0 @@ -89ca31682d8d789ff29958cee8451decab966c934012fb6f973565ea18803205 \ No newline at end of file diff --git a/db/schema_migrations/20230127155217 b/db/schema_migrations/20230127155217 deleted file mode 100644 index 0194dba8cdd90..0000000000000 --- a/db/schema_migrations/20230127155217 +++ /dev/null @@ -1 +0,0 @@ -11645dc1986919fcc78d16b0a33033b95aee086b21620c7628e6bd7ec35cd9e5 \ No newline at end of file diff --git a/db/schema_migrations/20230127164007 b/db/schema_migrations/20230127164007 deleted file mode 100644 index 36c45aab0e7a8..0000000000000 --- a/db/schema_migrations/20230127164007 +++ /dev/null @@ -1 +0,0 @@ -9eeead7484119ca0a9764104856970e5d78d484f4616552f8535f1eb047f4ae7 \ No newline at end of file diff --git a/db/schema_migrations/20230129094140 b/db/schema_migrations/20230129094140 deleted file mode 100644 index 1e8543ebfd632..0000000000000 --- a/db/schema_migrations/20230129094140 +++ /dev/null @@ -1 +0,0 @@ -e14187450e98a7ea699beecbc41733f6a524a1612cc0acbea3aa5b75a4f7be49 \ No newline at end of file diff --git a/db/schema_migrations/20230129154126 b/db/schema_migrations/20230129154126 deleted file mode 100644 index f7cecf227d98f..0000000000000 --- a/db/schema_migrations/20230129154126 +++ /dev/null @@ -1 +0,0 @@ -685bc851446d875d72f5712533b13baea90f6f3bc82d383f1fff10859c341e49 \ No newline at end of file diff --git a/db/schema_migrations/20230129154202 b/db/schema_migrations/20230129154202 deleted file mode 100644 index 6af55471b918f..0000000000000 --- a/db/schema_migrations/20230129154202 +++ /dev/null @@ -1 +0,0 @@ -a6146c49a1930b1cad7f56e6c3a8dbd433bd605d965a083f2dea3ab25261b94d \ No newline at end of file diff --git a/db/schema_migrations/20230129154819 b/db/schema_migrations/20230129154819 deleted file mode 100644 index 42bae9a9e2020..0000000000000 --- a/db/schema_migrations/20230129154819 +++ /dev/null @@ -1 +0,0 @@ -c8d2063f94253e79ff3c707e2af75a963863bcf601993c81e3043bbc5c2ae21b \ No newline at end of file diff --git a/db/schema_migrations/20230130070623 b/db/schema_migrations/20230130070623 deleted file mode 100644 index 136a4612f6ae3..0000000000000 --- a/db/schema_migrations/20230130070623 +++ /dev/null @@ -1 +0,0 @@ -3d098df1006f9dba019a1637cd921ff9ffe087a967841fd2d27f7bc4db7e0e42 \ No newline at end of file diff --git a/db/schema_migrations/20230130073109 b/db/schema_migrations/20230130073109 deleted file mode 100644 index 38eebbdfed405..0000000000000 --- a/db/schema_migrations/20230130073109 +++ /dev/null @@ -1 +0,0 @@ -939b01db3195eab6eceeae3b5b08c2a366566cadea85e0f84ba5abb4e004fe93 \ No newline at end of file diff --git a/db/schema_migrations/20230130075434 b/db/schema_migrations/20230130075434 deleted file mode 100644 index d31dafc473913..0000000000000 --- a/db/schema_migrations/20230130075434 +++ /dev/null @@ -1 +0,0 @@ -897f84696379e25d1aba5956db63dd1f4696a546d4c3a4742f0aa8b8eaecdbf6 \ No newline at end of file diff --git a/db/schema_migrations/20230130084718 b/db/schema_migrations/20230130084718 deleted file mode 100644 index 8ba8cf0410561..0000000000000 --- a/db/schema_migrations/20230130084718 +++ /dev/null @@ -1 +0,0 @@ -90e2078790aed27af30756977d40a9ae839ddadcf336c0d1d4da4ab56a26d7ec \ No newline at end of file diff --git a/db/schema_migrations/20230130102855 b/db/schema_migrations/20230130102855 deleted file mode 100644 index 91f9164a2540a..0000000000000 --- a/db/schema_migrations/20230130102855 +++ /dev/null @@ -1 +0,0 @@ -1e6d539713dd9d6b6b8afd5fcb6db87e75eb96fccf91a94c00700760fb5e963f \ No newline at end of file diff --git a/db/schema_migrations/20230130102856 b/db/schema_migrations/20230130102856 deleted file mode 100644 index f258d0e1eae41..0000000000000 --- a/db/schema_migrations/20230130102856 +++ /dev/null @@ -1 +0,0 @@ -4dc770e4a78c0f3e3aa5af43e017744a85b4974c1315508ac2244c7b12f4e0b3 \ No newline at end of file diff --git a/db/schema_migrations/20230130103957 b/db/schema_migrations/20230130103957 deleted file mode 100644 index ace3e7f1a8d8f..0000000000000 --- a/db/schema_migrations/20230130103957 +++ /dev/null @@ -1 +0,0 @@ -17e3e3236ba71778e86a4df672ba2b7080a127658792b60669738fdad4fe2f36 \ No newline at end of file diff --git a/db/schema_migrations/20230130103958 b/db/schema_migrations/20230130103958 deleted file mode 100644 index ffc3d56dfc7d6..0000000000000 --- a/db/schema_migrations/20230130103958 +++ /dev/null @@ -1 +0,0 @@ -0678dd7f9e8ad7c7e5761b7b624340fdf7785688d41badfb4affc8a2e2181072 \ No newline at end of file diff --git a/db/schema_migrations/20230130104819 b/db/schema_migrations/20230130104819 deleted file mode 100644 index 5236cd410ea32..0000000000000 --- a/db/schema_migrations/20230130104819 +++ /dev/null @@ -1 +0,0 @@ -1d1db0265c80b089d2438bdc43565b2de065d44dce2b737aa022385f45cdbeb0 \ No newline at end of file diff --git a/db/schema_migrations/20230130110855 b/db/schema_migrations/20230130110855 deleted file mode 100644 index 1ad25e84bfa24..0000000000000 --- a/db/schema_migrations/20230130110855 +++ /dev/null @@ -1 +0,0 @@ -1ee31ee657b890ba62e125c23fecfcc588192521181986b017b524e9044adb18 \ No newline at end of file diff --git a/db/schema_migrations/20230130125541 b/db/schema_migrations/20230130125541 deleted file mode 100644 index 126cf47bb09fa..0000000000000 --- a/db/schema_migrations/20230130125541 +++ /dev/null @@ -1 +0,0 @@ -a0efe869fb89bd1118bb19184ad47459d8eac8ac517f1fac80eebc7c7da387fc \ No newline at end of file diff --git a/db/schema_migrations/20230130130624 b/db/schema_migrations/20230130130624 deleted file mode 100644 index f52a61e945034..0000000000000 --- a/db/schema_migrations/20230130130624 +++ /dev/null @@ -1 +0,0 @@ -b56a8f0b3c32f29567a28fe2d21a41757365e16eb4cb98639c1ca288656491db \ No newline at end of file diff --git a/db/schema_migrations/20230130175512 b/db/schema_migrations/20230130175512 deleted file mode 100644 index 77e9d27b8ef62..0000000000000 --- a/db/schema_migrations/20230130175512 +++ /dev/null @@ -1 +0,0 @@ -cfda498c61c30312398c325b04944109128ea5363e4096307cb2f59ee850f8a6 \ No newline at end of file diff --git a/db/schema_migrations/20230130202201 b/db/schema_migrations/20230130202201 deleted file mode 100644 index 625a80908cd84..0000000000000 --- a/db/schema_migrations/20230130202201 +++ /dev/null @@ -1 +0,0 @@ -d2a0747a84d465cd7e4e4ca48539442ee37da00691f14bac580f225aa055be36 \ No newline at end of file diff --git a/db/schema_migrations/20230130204743 b/db/schema_migrations/20230130204743 deleted file mode 100644 index dcb1725a6e271..0000000000000 --- a/db/schema_migrations/20230130204743 +++ /dev/null @@ -1 +0,0 @@ -3c6dd3b83bc6a1d9e94c93784e201d3e9114ef62070468a31abe9167ae111c35 \ No newline at end of file diff --git a/db/schema_migrations/20230131004948 b/db/schema_migrations/20230131004948 deleted file mode 100644 index 843732944a4bd..0000000000000 --- a/db/schema_migrations/20230131004948 +++ /dev/null @@ -1 +0,0 @@ -a72828f13fa31c30338ba1b833addbf7fd439e4ea2c51ded252db943826289d9 \ No newline at end of file diff --git a/db/schema_migrations/20230131005411 b/db/schema_migrations/20230131005411 deleted file mode 100644 index 31ba576c9c949..0000000000000 --- a/db/schema_migrations/20230131005411 +++ /dev/null @@ -1 +0,0 @@ -21088bc90a263d5fd5e4cff9cfdea3b778dd98f9207ef6729acafadec40383b6 \ No newline at end of file diff --git a/db/schema_migrations/20230131090842 b/db/schema_migrations/20230131090842 deleted file mode 100644 index c76f02ee2f58a..0000000000000 --- a/db/schema_migrations/20230131090842 +++ /dev/null @@ -1 +0,0 @@ -a494467874e35f0843a383ebdf3ac8344356b435f568e7e5334a460622cae696 \ No newline at end of file diff --git a/db/schema_migrations/20230131123923 b/db/schema_migrations/20230131123923 deleted file mode 100644 index 1368a92047e67..0000000000000 --- a/db/schema_migrations/20230131123923 +++ /dev/null @@ -1 +0,0 @@ -5acafd951bd7a1a521d2b82de5e4b2146e43dab401b3bae82b3d0bb5255c3373 \ No newline at end of file diff --git a/db/schema_migrations/20230131125844 b/db/schema_migrations/20230131125844 deleted file mode 100644 index 87ad79325f15b..0000000000000 --- a/db/schema_migrations/20230131125844 +++ /dev/null @@ -1 +0,0 @@ -ccf6031d207b41bfacbd671b9e320e0929e43d5c62744df49b073f5ee6a90885 \ No newline at end of file diff --git a/db/schema_migrations/20230131194959 b/db/schema_migrations/20230131194959 deleted file mode 100644 index 141a6de47e349..0000000000000 --- a/db/schema_migrations/20230131194959 +++ /dev/null @@ -1 +0,0 @@ -6b646889335342e41d3e891c13abe8c0fc3cb04c4a3e8a74d1f5b3ab19704111 \ No newline at end of file diff --git a/db/schema_migrations/20230131210921 b/db/schema_migrations/20230131210921 deleted file mode 100644 index 8947d4ea112a5..0000000000000 --- a/db/schema_migrations/20230131210921 +++ /dev/null @@ -1 +0,0 @@ -3057b3de5a7ccfa065cb6c279c61a454abcbd9b0e0f3735ec5b9869c450ae3d1 \ No newline at end of file diff --git a/db/schema_migrations/20230201012727 b/db/schema_migrations/20230201012727 deleted file mode 100644 index c501b1b8e55f5..0000000000000 --- a/db/schema_migrations/20230201012727 +++ /dev/null @@ -1 +0,0 @@ -92bef6fc42b8d85e7900b1f8e3b9857dca8f9e4f0af58dc5ad64d3a70e33c5f4 \ No newline at end of file diff --git a/db/schema_migrations/20230201012846 b/db/schema_migrations/20230201012846 deleted file mode 100644 index 0a23144f40b47..0000000000000 --- a/db/schema_migrations/20230201012846 +++ /dev/null @@ -1 +0,0 @@ -5c748226d7b587337526c07c680abade315f6d758237c6bf51daf7ca35c218aa \ No newline at end of file diff --git a/db/schema_migrations/20230201014223 b/db/schema_migrations/20230201014223 deleted file mode 100644 index 323fe555df5ec..0000000000000 --- a/db/schema_migrations/20230201014223 +++ /dev/null @@ -1 +0,0 @@ -42100a86045f084c3b74e404a2f95d4d76751ad92102edb271dc628279060ce5 \ No newline at end of file diff --git a/db/schema_migrations/20230201014238 b/db/schema_migrations/20230201014238 deleted file mode 100644 index 8a2d6effa5eba..0000000000000 --- a/db/schema_migrations/20230201014238 +++ /dev/null @@ -1 +0,0 @@ -00bbfdf3e45248b72aac115e44a95c23b71344dcc9e35ad3be6bf1f5eda33561 \ No newline at end of file diff --git a/db/schema_migrations/20230201082038 b/db/schema_migrations/20230201082038 deleted file mode 100644 index b7e1ee666dbeb..0000000000000 --- a/db/schema_migrations/20230201082038 +++ /dev/null @@ -1 +0,0 @@ -0b735c9ccd267734fd4c4f6f15f6dfac67ec212786e4c31d75b73e2fae537617 \ No newline at end of file diff --git a/db/schema_migrations/20230201152525 b/db/schema_migrations/20230201152525 deleted file mode 100644 index 51fd8eabe9102..0000000000000 --- a/db/schema_migrations/20230201152525 +++ /dev/null @@ -1 +0,0 @@ -cfe3f77bf0615889a0fd1d55ef4f07f2bb9a1dbe1a6bb0fb5a36c017f9a5ca46 \ No newline at end of file diff --git a/db/schema_migrations/20230201153450 b/db/schema_migrations/20230201153450 deleted file mode 100644 index 75f2f582af7b2..0000000000000 --- a/db/schema_migrations/20230201153450 +++ /dev/null @@ -1 +0,0 @@ -f1af51a9623eb1ca9464c74897dababb3dbfba324453cdc36625da820e198663 \ No newline at end of file diff --git a/db/schema_migrations/20230201171450 b/db/schema_migrations/20230201171450 deleted file mode 100644 index c46340e0852d1..0000000000000 --- a/db/schema_migrations/20230201171450 +++ /dev/null @@ -1 +0,0 @@ -c63f9cf6abb67b2d2623b662cd9dd7c9684a972c0aa89ea43f59e6196dacb249 \ No newline at end of file diff --git a/db/schema_migrations/20230202002616 b/db/schema_migrations/20230202002616 deleted file mode 100644 index dc441296f20b4..0000000000000 --- a/db/schema_migrations/20230202002616 +++ /dev/null @@ -1 +0,0 @@ -b78e2581507a85f6ba72f1a6636fb6e8fe372fc8a4accf8f954d25e1ee8c6dc8 \ No newline at end of file diff --git a/db/schema_migrations/20230202002637 b/db/schema_migrations/20230202002637 deleted file mode 100644 index 8ada17cb13b4e..0000000000000 --- a/db/schema_migrations/20230202002637 +++ /dev/null @@ -1 +0,0 @@ -67ce816b0b7e4055f4ffcbfaf407fc56c655f907863528697c83d0f718f9ae21 \ No newline at end of file diff --git a/db/schema_migrations/20230202004247 b/db/schema_migrations/20230202004247 deleted file mode 100644 index f3736acf5f970..0000000000000 --- a/db/schema_migrations/20230202004247 +++ /dev/null @@ -1 +0,0 @@ -a7cdaa5554fef6d92fd73fcb6bc0afa3905e673b403007379a21073fe7c4c3b3 \ No newline at end of file diff --git a/db/schema_migrations/20230202023208 b/db/schema_migrations/20230202023208 deleted file mode 100644 index 084f49a3bf37a..0000000000000 --- a/db/schema_migrations/20230202023208 +++ /dev/null @@ -1 +0,0 @@ -8b6e79c82b253588febad81b34a4ee5f3b82437f3a7e8efb98c40f8a0ffca4f6 \ No newline at end of file diff --git a/db/schema_migrations/20230202023224 b/db/schema_migrations/20230202023224 deleted file mode 100644 index b86d8b0d03599..0000000000000 --- a/db/schema_migrations/20230202023224 +++ /dev/null @@ -1 +0,0 @@ -9ecfae596418d97e7187b1c04bdccf1f719150f3e75658287be39a58e9c8707b \ No newline at end of file diff --git a/db/schema_migrations/20230202032248 b/db/schema_migrations/20230202032248 deleted file mode 100644 index 61a5bfbf6bde9..0000000000000 --- a/db/schema_migrations/20230202032248 +++ /dev/null @@ -1 +0,0 @@ -b2ccc83a631f40528c073b9e5387a7fdd0190d0339ec3c42b8f1ee4408c14ca2 \ No newline at end of file diff --git a/db/schema_migrations/20230202032302 b/db/schema_migrations/20230202032302 deleted file mode 100644 index f6077769d62f0..0000000000000 --- a/db/schema_migrations/20230202032302 +++ /dev/null @@ -1 +0,0 @@ -84e9b2a8d4a85a7d4c458c0c224b4082f2840cfb3b4b2b777bcbea21abbdf930 \ No newline at end of file diff --git a/db/schema_migrations/20230202131928 b/db/schema_migrations/20230202131928 deleted file mode 100644 index becc0cb13a03a..0000000000000 --- a/db/schema_migrations/20230202131928 +++ /dev/null @@ -1 +0,0 @@ -9258d377d0a0756bcb1951eca629fd2975b20c243b98e49e1cff72a665ef96f7 \ No newline at end of file diff --git a/db/schema_migrations/20230202153926 b/db/schema_migrations/20230202153926 deleted file mode 100644 index 7be855b6d22d2..0000000000000 --- a/db/schema_migrations/20230202153926 +++ /dev/null @@ -1 +0,0 @@ -b446c818b57801c3afa26fd4e2c633f04b7956d80f709947cc1be9f87a520fc2 \ No newline at end of file diff --git a/db/schema_migrations/20230203011359 b/db/schema_migrations/20230203011359 deleted file mode 100644 index 364395a3252db..0000000000000 --- a/db/schema_migrations/20230203011359 +++ /dev/null @@ -1 +0,0 @@ -51ce125f058811cd0f118429049389d9b67479628472830bce4c04cc81969a37 \ No newline at end of file diff --git a/db/schema_migrations/20230203122602 b/db/schema_migrations/20230203122602 deleted file mode 100644 index a03143094f59d..0000000000000 --- a/db/schema_migrations/20230203122602 +++ /dev/null @@ -1 +0,0 @@ -bb8b177385489eeefda9b8c1e9534398ec759d95fbf46ee3af02a3964a03e1ae \ No newline at end of file diff --git a/db/schema_migrations/20230203122609 b/db/schema_migrations/20230203122609 deleted file mode 100644 index a1549773f34db..0000000000000 --- a/db/schema_migrations/20230203122609 +++ /dev/null @@ -1 +0,0 @@ -7a1f0770999871ba021a2d6f0c036f4dbe19143abacd7140c76f6f576b89f002 \ No newline at end of file diff --git a/db/schema_migrations/20230203145514 b/db/schema_migrations/20230203145514 deleted file mode 100644 index f929711f2797b..0000000000000 --- a/db/schema_migrations/20230203145514 +++ /dev/null @@ -1 +0,0 @@ -42f7cf3cb5d8b9b3f1c8a30b1f48fb6a5bf650e368c927b2b3c6c74c2c339088 \ No newline at end of file diff --git a/db/schema_migrations/20230206143851 b/db/schema_migrations/20230206143851 deleted file mode 100644 index 52c7753a7ac08..0000000000000 --- a/db/schema_migrations/20230206143851 +++ /dev/null @@ -1 +0,0 @@ -08ba891bbf1342addac1197cbbb13c539ba865928082c72b469c8fae26154728 \ No newline at end of file diff --git a/db/schema_migrations/20230206172702 b/db/schema_migrations/20230206172702 deleted file mode 100644 index 686eaf82767e6..0000000000000 --- a/db/schema_migrations/20230206172702 +++ /dev/null @@ -1 +0,0 @@ -779501ae368409cfe42bf03151309a07f043834c37d742dc52a062727a9cb9de \ No newline at end of file diff --git a/db/schema_migrations/20230207003737 b/db/schema_migrations/20230207003737 deleted file mode 100644 index d66f0ed154360..0000000000000 --- a/db/schema_migrations/20230207003737 +++ /dev/null @@ -1 +0,0 @@ -f054d4b0332145a5c27c3c7d329d0f4851a8a7abf1314055077a2ac4c7a8463a \ No newline at end of file diff --git a/db/schema_migrations/20230207003812 b/db/schema_migrations/20230207003812 deleted file mode 100644 index 6422de7ce370e..0000000000000 --- a/db/schema_migrations/20230207003812 +++ /dev/null @@ -1 +0,0 @@ -5d0e6aed4be364bd4884259f56b44812200963cea724b23130fa8b19f58e2574 \ No newline at end of file diff --git a/db/schema_migrations/20230207005549 b/db/schema_migrations/20230207005549 deleted file mode 100644 index fc3dedf162b5c..0000000000000 --- a/db/schema_migrations/20230207005549 +++ /dev/null @@ -1 +0,0 @@ -060067232f46ea992de5d5392c2918f81167d224b3b90f3a7567b624a3d8d4e3 \ No newline at end of file diff --git a/db/schema_migrations/20230207005701 b/db/schema_migrations/20230207005701 deleted file mode 100644 index 1ffa8f0b48320..0000000000000 --- a/db/schema_migrations/20230207005701 +++ /dev/null @@ -1 +0,0 @@ -1602c379715b3ca22c75fc4ff39cda49d0735db29d0be2256265fb5313ea332f \ No newline at end of file diff --git a/db/schema_migrations/20230207011344 b/db/schema_migrations/20230207011344 deleted file mode 100644 index 0d41804e37a4c..0000000000000 --- a/db/schema_migrations/20230207011344 +++ /dev/null @@ -1 +0,0 @@ -c7cf038ab9b9d853a1e321508bdfd3044b5774adf7d08c157c2c0881bda6bac2 \ No newline at end of file diff --git a/db/schema_migrations/20230207011414 b/db/schema_migrations/20230207011414 deleted file mode 100644 index 3b13317b1e698..0000000000000 --- a/db/schema_migrations/20230207011414 +++ /dev/null @@ -1 +0,0 @@ -8350a8c8dca95ea8c18e0ee132f8b6a732ddd6981ddb9742aecbfc5ad3daa091 \ No newline at end of file diff --git a/db/schema_migrations/20230207012217 b/db/schema_migrations/20230207012217 deleted file mode 100644 index e0709cfd57a57..0000000000000 --- a/db/schema_migrations/20230207012217 +++ /dev/null @@ -1 +0,0 @@ -e9b82380fc23c85bf9f4dc6595a4eb59eedfe696f5dc256141e8b4a7ebaa6ee3 \ No newline at end of file diff --git a/db/schema_migrations/20230207012238 b/db/schema_migrations/20230207012238 deleted file mode 100644 index 4c5d782a1c06e..0000000000000 --- a/db/schema_migrations/20230207012238 +++ /dev/null @@ -1 +0,0 @@ -d3789404b6ecb38eabfa75c41db936bceb2aa219c770764d30caca6d94358ba4 \ No newline at end of file diff --git a/db/schema_migrations/20230207015819 b/db/schema_migrations/20230207015819 deleted file mode 100644 index 5f501f9a7ac84..0000000000000 --- a/db/schema_migrations/20230207015819 +++ /dev/null @@ -1 +0,0 @@ -fb2aae23e613c0e930b88c6ff67382330b7379e3664bb74477ebf7aa48f52e8e \ No newline at end of file diff --git a/db/schema_migrations/20230207015850 b/db/schema_migrations/20230207015850 deleted file mode 100644 index a936f67d58eaa..0000000000000 --- a/db/schema_migrations/20230207015850 +++ /dev/null @@ -1 +0,0 @@ -cecda7c2b2e82768edcc45546adf028ba7839c26ed403c35e12614b341760fbf \ No newline at end of file diff --git a/db/schema_migrations/20230207025259 b/db/schema_migrations/20230207025259 deleted file mode 100644 index 377c25811686c..0000000000000 --- a/db/schema_migrations/20230207025259 +++ /dev/null @@ -1 +0,0 @@ -8f8c230c6254a1dedb71209eb11af47e90fdec52287ed22f833c34ad2cb24156 \ No newline at end of file diff --git a/db/schema_migrations/20230207025315 b/db/schema_migrations/20230207025315 deleted file mode 100644 index 0f665eff8b2de..0000000000000 --- a/db/schema_migrations/20230207025315 +++ /dev/null @@ -1 +0,0 @@ -775d411ef7bfff2cfb20495a1429dddeec2ecb5e84b549818419efa8bfa155d3 \ No newline at end of file diff --git a/db/schema_migrations/20230207030244 b/db/schema_migrations/20230207030244 deleted file mode 100644 index bece0b240db55..0000000000000 --- a/db/schema_migrations/20230207030244 +++ /dev/null @@ -1 +0,0 @@ -30d4ae8a173564126a93ccd7c82d3f43c6567b2c279f7a9949baa50cff372b0c \ No newline at end of file diff --git a/db/schema_migrations/20230207030259 b/db/schema_migrations/20230207030259 deleted file mode 100644 index 30c5d56506d8a..0000000000000 --- a/db/schema_migrations/20230207030259 +++ /dev/null @@ -1 +0,0 @@ -250261f4bbe1da4067a0a9c634114c893c7f43c968dc22fc684a1ea6f85926a8 \ No newline at end of file diff --git a/db/schema_migrations/20230207143602 b/db/schema_migrations/20230207143602 deleted file mode 100644 index f7b6b5c106b9d..0000000000000 --- a/db/schema_migrations/20230207143602 +++ /dev/null @@ -1 +0,0 @@ -5a74e84b0cb956fcd04d85cac572694788aef1a41b43280ad9fd911cb314ef8c \ No newline at end of file diff --git a/db/schema_migrations/20230207143844 b/db/schema_migrations/20230207143844 deleted file mode 100644 index 380ad3ec54d5c..0000000000000 --- a/db/schema_migrations/20230207143844 +++ /dev/null @@ -1 +0,0 @@ -a2df7a3f9f3020294538a282f1ef8d365ac28026e7653c03a2bb1ec5c873f464 \ No newline at end of file diff --git a/db/schema_migrations/20230208100917 b/db/schema_migrations/20230208100917 deleted file mode 100644 index 1862dcf6738d9..0000000000000 --- a/db/schema_migrations/20230208100917 +++ /dev/null @@ -1 +0,0 @@ -55d9815e9590681cedf6e5817ef6419db882837325b9d3c86ae34419339b090d \ No newline at end of file diff --git a/db/schema_migrations/20230208103009 b/db/schema_migrations/20230208103009 deleted file mode 100644 index 097184279f689..0000000000000 --- a/db/schema_migrations/20230208103009 +++ /dev/null @@ -1 +0,0 @@ -2f8fda2911fdbff0e7d0d90c6288c003e36471a6e107271227a6d67bda2775a0 \ No newline at end of file diff --git a/db/schema_migrations/20230208103640 b/db/schema_migrations/20230208103640 deleted file mode 100644 index 7a9e6a603cb98..0000000000000 --- a/db/schema_migrations/20230208103640 +++ /dev/null @@ -1 +0,0 @@ -7f000addc9083ff438abccdbd607fc702d1999a7a182d375d5b7355f0b03304b \ No newline at end of file diff --git a/db/schema_migrations/20230208110638 b/db/schema_migrations/20230208110638 deleted file mode 100644 index 3aa5c61664665..0000000000000 --- a/db/schema_migrations/20230208110638 +++ /dev/null @@ -1 +0,0 @@ -fac390d1508329864c7e859e1c302e00868679b5438c2f5a31dfdaea7ba73eab \ No newline at end of file diff --git a/db/schema_migrations/20230208131808 b/db/schema_migrations/20230208131808 deleted file mode 100644 index 24c5b21f6ad62..0000000000000 --- a/db/schema_migrations/20230208131808 +++ /dev/null @@ -1 +0,0 @@ -784f8f189eee7b5cf3136f0a859874a1d170d2b148f4c260f968b144816f1322 \ No newline at end of file diff --git a/db/schema_migrations/20230208132608 b/db/schema_migrations/20230208132608 deleted file mode 100644 index 9ecc9531ca775..0000000000000 --- a/db/schema_migrations/20230208132608 +++ /dev/null @@ -1 +0,0 @@ -a4709b533b0ef420e5a14088fcf7e2646d4601019f62429b528ea3c715da87ca \ No newline at end of file diff --git a/db/schema_migrations/20230209090702 b/db/schema_migrations/20230209090702 deleted file mode 100644 index 9eb84a3b5d058..0000000000000 --- a/db/schema_migrations/20230209090702 +++ /dev/null @@ -1 +0,0 @@ -f3f0611b503bf2be35a201541826a33dd0ff58a0b41c6588303317f2b171d567 \ No newline at end of file diff --git a/db/schema_migrations/20230209092204 b/db/schema_migrations/20230209092204 deleted file mode 100644 index c6432053853f0..0000000000000 --- a/db/schema_migrations/20230209092204 +++ /dev/null @@ -1 +0,0 @@ -f3962b71ec4b63a2e056872fc155ae4e41cdef8c989728b5e60553c6d602ccee \ No newline at end of file diff --git a/db/schema_migrations/20230209103650 b/db/schema_migrations/20230209103650 deleted file mode 100644 index c4e01b8f49e60..0000000000000 --- a/db/schema_migrations/20230209103650 +++ /dev/null @@ -1 +0,0 @@ -f56cd57c85a852f129099357ae72e94cbed7bc08c3099273842708dc40bc4411 \ No newline at end of file diff --git a/db/schema_migrations/20230209103714 b/db/schema_migrations/20230209103714 deleted file mode 100644 index 1609e8df370dd..0000000000000 --- a/db/schema_migrations/20230209103714 +++ /dev/null @@ -1 +0,0 @@ -bcfb07f384564295b4fc359ced37d5fdcde5689a589ab32953fb1d276de692e8 \ No newline at end of file diff --git a/db/schema_migrations/20230209123006 b/db/schema_migrations/20230209123006 deleted file mode 100644 index a4f8e624eebb2..0000000000000 --- a/db/schema_migrations/20230209123006 +++ /dev/null @@ -1 +0,0 @@ -daaba8ca5c6b9e5eb4ca06d4194208452cb1cf91da8abd80ea228b3887a30c0c \ No newline at end of file diff --git a/db/schema_migrations/20230209131808 b/db/schema_migrations/20230209131808 deleted file mode 100644 index ba90b9dcd5032..0000000000000 --- a/db/schema_migrations/20230209131808 +++ /dev/null @@ -1 +0,0 @@ -48c3039b24ab063a550419d3883b3c6308709e0ef9eacc0f4f1cdc3c99fb4148 \ No newline at end of file diff --git a/db/schema_migrations/20230209140102 b/db/schema_migrations/20230209140102 deleted file mode 100644 index b1938fc21a344..0000000000000 --- a/db/schema_migrations/20230209140102 +++ /dev/null @@ -1 +0,0 @@ -c9f92b576436a473380ad2035030a108c60efd4c2f46a259a46246d2019c4285 \ No newline at end of file diff --git a/db/schema_migrations/20230209171547 b/db/schema_migrations/20230209171547 deleted file mode 100644 index 1c3b3b8d8f4c9..0000000000000 --- a/db/schema_migrations/20230209171547 +++ /dev/null @@ -1 +0,0 @@ -ec7d8a7d00e5c6a80efa6c859df8de31e8615df4ba586d6b014fee60e0da6644 \ No newline at end of file diff --git a/db/schema_migrations/20230210113924 b/db/schema_migrations/20230210113924 deleted file mode 100644 index b9787cddadb7a..0000000000000 --- a/db/schema_migrations/20230210113924 +++ /dev/null @@ -1 +0,0 @@ -00998ed2ff2e1300d4af7f2b1f3817aad6cc3dcec37887704ebc0571963c461d \ No newline at end of file diff --git a/db/schema_migrations/20230210181214 b/db/schema_migrations/20230210181214 deleted file mode 100644 index ab7b3b1ca218a..0000000000000 --- a/db/schema_migrations/20230210181214 +++ /dev/null @@ -1 +0,0 @@ -9e7245187ad1618304f2cdc901a6d8f63e63d007578da92f7ba049def9312923 \ No newline at end of file diff --git a/db/schema_migrations/20230214122717 b/db/schema_migrations/20230214122717 deleted file mode 100644 index 6f69502caa3de..0000000000000 --- a/db/schema_migrations/20230214122717 +++ /dev/null @@ -1 +0,0 @@ -803a4aa4c28aecf498d2a70046850d8128327feb12fe1a42f1255cd08da7746e \ No newline at end of file diff --git a/db/schema_migrations/20230214142447 b/db/schema_migrations/20230214142447 deleted file mode 100644 index 0f13b11d39e33..0000000000000 --- a/db/schema_migrations/20230214142447 +++ /dev/null @@ -1 +0,0 @@ -29006be848d8a5ba33c0e757ac4743cc19dc0274893e2e23c73615218975feef \ No newline at end of file diff --git a/db/schema_migrations/20230214142813 b/db/schema_migrations/20230214142813 deleted file mode 100644 index 4cfbe09f8a262..0000000000000 --- a/db/schema_migrations/20230214142813 +++ /dev/null @@ -1 +0,0 @@ -c7f6778eb181c6c4e97b7d7698bb7df5a4589710426d0a6574d5230f9751ebed \ No newline at end of file diff --git a/db/schema_migrations/20230214154101 b/db/schema_migrations/20230214154101 deleted file mode 100644 index 97ea6dfb25919..0000000000000 --- a/db/schema_migrations/20230214154101 +++ /dev/null @@ -1 +0,0 @@ -89f5c87983f2739ad20f1f3f3542aea5cd9373879d399835207028792e1e097c \ No newline at end of file diff --git a/db/schema_migrations/20230214174335 b/db/schema_migrations/20230214174335 deleted file mode 100644 index a34c5d7c8a04a..0000000000000 --- a/db/schema_migrations/20230214174335 +++ /dev/null @@ -1 +0,0 @@ -8e5862a7c63bc1ccb2ab634d7c8b7fa3b8289b579bcc0531af27572fa6e7e3fc \ No newline at end of file diff --git a/db/schema_migrations/20230216035802 b/db/schema_migrations/20230216035802 deleted file mode 100644 index b61b7368c2734..0000000000000 --- a/db/schema_migrations/20230216035802 +++ /dev/null @@ -1 +0,0 @@ -b00c36a3c19608e64c9616d32eb204aca8fcfb29ab6f2d36b136d22ba0c00579 \ No newline at end of file diff --git a/db/schema_migrations/20230216052103 b/db/schema_migrations/20230216052103 deleted file mode 100644 index 5b4fa3b84fa07..0000000000000 --- a/db/schema_migrations/20230216052103 +++ /dev/null @@ -1 +0,0 @@ -f6520e0b7cda276b7cf198bcbb0be4425c844a88d38118740675b639dbc73694 \ No newline at end of file diff --git a/db/schema_migrations/20230216054348 b/db/schema_migrations/20230216054348 deleted file mode 100644 index c878ce97f9e1d..0000000000000 --- a/db/schema_migrations/20230216054348 +++ /dev/null @@ -1 +0,0 @@ -d86d07d1a1f02b72cfa45ebe83088366d200af00c8ab77f3a287af8476d00f14 \ No newline at end of file diff --git a/ee/spec/lib/ee/gitlab/background_migration/backfill_project_statistics_storage_size_without_uploads_size_spec.rb b/ee/spec/lib/ee/gitlab/background_migration/backfill_project_statistics_storage_size_without_uploads_size_spec.rb index 33e183f43d628..9512d0cbb462a 100644 --- a/ee/spec/lib/ee/gitlab/background_migration/backfill_project_statistics_storage_size_without_uploads_size_spec.rb +++ b/ee/spec/lib/ee/gitlab/background_migration/backfill_project_statistics_storage_size_without_uploads_size_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Gitlab::BackgroundMigration::BackfillProjectStatisticsStorageSizeWithoutUploadsSize, :migration, schema: 20221104115712, feature_category: :consumables_cost_management do # rubocop:disable Layout/LineLength +RSpec.describe Gitlab::BackgroundMigration::BackfillProjectStatisticsStorageSizeWithoutUploadsSize, :migration, schema: 20230216060333, feature_category: :consumables_cost_management do # rubocop:disable Layout/LineLength include MigrationHelpers::ProjectStatisticsHelper let!(:namespace) { table(:namespaces) } diff --git a/ee/spec/migrations/20221130192239_fix_approval_project_rules_without_protected_branches_spec.rb b/ee/spec/migrations/20221130192239_fix_approval_project_rules_without_protected_branches_spec.rb deleted file mode 100644 index 399fc5b443b80..0000000000000 --- a/ee/spec/migrations/20221130192239_fix_approval_project_rules_without_protected_branches_spec.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe FixApprovalProjectRulesWithoutProtectedBranches, feature_category: :security_policy_management do - describe '#up' do - it 'schedules background migration for project approval rules' do - migrate! - - expect(described_class::MIGRATION).to have_scheduled_batched_migration( - table_name: :approval_project_rules, - column_name: :id, - interval: described_class::INTERVAL) - end - end -end diff --git a/ee/spec/migrations/20230127155217_add_id_column_to_package_metadata_join_table_spec.rb b/ee/spec/migrations/20230127155217_add_id_column_to_package_metadata_join_table_spec.rb deleted file mode 100644 index 4a015e4f13111..0000000000000 --- a/ee/spec/migrations/20230127155217_add_id_column_to_package_metadata_join_table_spec.rb +++ /dev/null @@ -1,72 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe AddIdColumnToPackageMetadataJoinTable, feature_category: :software_composition_analysis do - let(:purl_types) { (1..8) } - - context 'when table is up to date' do - it 'updates the primary key of the table' do - expect { migrate! }.to change { compound_primary_key? }.from(true).to(false) - end - end - - context 'when table is still partitioned' do - before do - execute(<<~SQL) - DROP TABLE pm_package_version_licenses; - CREATE TABLE pm_package_version_licenses ( - pm_package_version_id bigint NOT NULL, - pm_license_id bigint NOT NULL, - purl_type smallint NOT NULL, - PRIMARY KEY (pm_package_version_id, pm_license_id, purl_type) - ) PARTITION BY LIST (purl_type); - SQL - - purl_types.each do |i| - execute(<<~SQL) - CREATE TABLE gitlab_partitions_static.pm_package_version_licenses_#{i} - PARTITION OF pm_package_version_licenses - FOR VALUES IN (#{i}) - SQL - end - end - - it 'unpartitions the table' do - expect { migrate! }.to change { table_partitioned? }.from(true).to(false) - end - - it 'updates the primary key of the table' do - expect { migrate! }.to change { compound_primary_key? }.from(true).to(false) - end - end - - def compound_primary_key? - sql = <<~SQL - SELECT COUNT(*) - FROM pg_index i - JOIN pg_attribute a ON a.attrelid = i.indrelid - AND a.attnum = ANY(i.indkey) - WHERE i.indrelid = 'pm_package_version_licenses'::regclass - AND i.indisprimary; - SQL - execute(sql).first != 1 - end - - def table_partitioned? - sql = <<~SQL - SELECT - COUNT(*) - FROM - pg_partitioned_table - INNER JOIN pg_class ON pg_class.oid = pg_partitioned_table.partrelid - WHERE pg_class.relname = 'pm_package_version_licenses' - SQL - execute(sql).first != 0 - end - - def execute(sql) - ApplicationRecord.connection.execute(sql).values.flatten - end -end diff --git a/scripts/verify-tff-mapping b/scripts/verify-tff-mapping index abbf30c7e2dff..b499cc7cc0152 100755 --- a/scripts/verify-tff-mapping +++ b/scripts/verify-tff-mapping @@ -96,8 +96,8 @@ tests = [ # rubocop:disable Layout/LineLength { explanation: 'Migration should map to its timestamped spec', - changed_file: 'db/post_migrate/20230105172120_sync_new_amount_used_with_amount_used_on_ci_namespace_monthly_usages_table.rb', - expected: ['spec/migrations/20230105172120_sync_new_amount_used_with_amount_used_on_ci_namespace_monthly_usages_table_spec.rb'] + changed_file: 'db/post_migrate/20231207194620_backfill_catalog_resources_visibility_level.rb', + expected: ['spec/migrations/20231207194620_backfill_catalog_resources_visibility_level_spec.rb'] }, # rubocop:enable Layout/LineLength { diff --git a/db/migrate/20221122210711_add_columns_to_postgres_foreign_keys.rb b/spec/fixtures/migrations/db/migrate/schema_cache_migration_test.rb similarity index 97% rename from db/migrate/20221122210711_add_columns_to_postgres_foreign_keys.rb rename to spec/fixtures/migrations/db/migrate/schema_cache_migration_test.rb index bef05e52a3a54..32f2512c2853b 100644 --- a/db/migrate/20221122210711_add_columns_to_postgres_foreign_keys.rb +++ b/spec/fixtures/migrations/db/migrate/schema_cache_migration_test.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class AddColumnsToPostgresForeignKeys < Gitlab::Database::Migration[2.0] +module SchemaCacheMigrationTest def up execute(<<~SQL) CREATE OR REPLACE VIEW postgres_foreign_keys AS diff --git a/spec/lib/gitlab/background_migration/backfill_admin_mode_scope_for_personal_access_tokens_spec.rb b/spec/lib/gitlab/background_migration/backfill_admin_mode_scope_for_personal_access_tokens_spec.rb index 92fec48454c69..5aa02e5f8d778 100644 --- a/spec/lib/gitlab/background_migration/backfill_admin_mode_scope_for_personal_access_tokens_spec.rb +++ b/spec/lib/gitlab/background_migration/backfill_admin_mode_scope_for_personal_access_tokens_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' RSpec.describe Gitlab::BackgroundMigration::BackfillAdminModeScopeForPersonalAccessTokens, - :migration, schema: 20221228103133, feature_category: :system_access do + :migration, schema: 20230216060333, feature_category: :system_access do let(:users) { table(:users) } let(:personal_access_tokens) { table(:personal_access_tokens) } diff --git a/spec/lib/gitlab/background_migration/backfill_environment_tiers_spec.rb b/spec/lib/gitlab/background_migration/backfill_environment_tiers_spec.rb index 9026c327e3c9d..3801ccf0f0d33 100644 --- a/spec/lib/gitlab/background_migration/backfill_environment_tiers_spec.rb +++ b/spec/lib/gitlab/background_migration/backfill_environment_tiers_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' RSpec.describe Gitlab::BackgroundMigration::BackfillEnvironmentTiers, - :migration, schema: 20221205151917, feature_category: :continuous_delivery do + :migration, schema: 20230216060333, feature_category: :continuous_delivery do let!(:namespace) { table(:namespaces).create!(name: 'user', path: 'user') } let!(:project) { table(:projects).create!(namespace_id: namespace.id, project_namespace_id: namespace.id) } diff --git a/spec/lib/gitlab/background_migration/backfill_imported_issue_search_data_spec.rb b/spec/lib/gitlab/background_migration/backfill_imported_issue_search_data_spec.rb deleted file mode 100644 index edf972189b2a0..0000000000000 --- a/spec/lib/gitlab/background_migration/backfill_imported_issue_search_data_spec.rb +++ /dev/null @@ -1,109 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Gitlab::BackgroundMigration::BackfillImportedIssueSearchData, - :migration, - schema: 20221111123146 do - let!(:namespace) { table(:namespaces).create!(name: 'user', path: 'user') } - let!(:issue_search_data_table) { table(:issue_search_data) } - - let!(:user) { table(:users).create!(email: 'author@example.com', username: 'author', projects_limit: 10) } - let!(:project) do - table(:projects) - .create!( - namespace_id: namespace.id, - creator_id: user.id, - name: 'projecty', - path: 'path', - project_namespace_id: namespace.id) - end - - let!(:issue) do - table(:issues).create!( - project_id: project.id, - namespace_id: project.project_namespace_id, - title: 'Patterson', - description: FFaker::HipsterIpsum.paragraph - ) - end - - let(:migration) do - described_class.new( - start_id: issue.id, - end_id: issue.id + 30, - batch_table: :issues, - batch_column: :id, - sub_batch_size: 2, - pause_ms: 0, - connection: ApplicationRecord.connection - ) - end - - let(:perform_migration) { migration.perform } - - context 'when issue has search data record' do - let!(:issue_search_data) { issue_search_data_table.create!(project_id: project.id, issue_id: issue.id) } - - it 'does not create or update any search data records' do - expect { perform_migration } - .to not_change { issue_search_data_table.count } - .and not_change { issue_search_data } - - expect(issue_search_data_table.count).to eq(1) - end - end - - context 'when issue has no search data record' do - let(:title_node) { "'#{issue.title.downcase}':1A" } - - it 'creates search data records' do - expect { perform_migration } - .to change { issue_search_data_table.count }.from(0).to(1) - - expect(issue_search_data_table.find_by(project_id: project.id).issue_id) - .to eq(issue.id) - - expect(issue_search_data_table.find_by(project_id: project.id).search_vector) - .to include(title_node) - end - end - - context 'error handling' do - let!(:issue2) do - table(:issues).create!( - project_id: project.id, - namespace_id: project.project_namespace_id, - title: 'Chatterton', - description: FFaker::HipsterIpsum.paragraph - ) - end - - before do - issue.update!(description: Array.new(30_000) { SecureRandom.hex }.join(' ')) - end - - let(:title_node2) { "'#{issue2.title.downcase}':1A" } - - it 'skips insertion for that issue but continues with migration' do - expect_next_instance_of(Gitlab::BackgroundMigration::Logger) do |logger| - expect(logger) - .to receive(:error) - .with(a_hash_including(message: /string is too long for tsvector/, model_id: issue.id)) - end - - expect { perform_migration }.to change { issue_search_data_table.count }.from(0).to(1) - expect(issue_search_data_table.find_by(issue_id: issue.id)).to eq(nil) - expect(issue_search_data_table.find_by(issue_id: issue2.id).search_vector) - .to include(title_node2) - end - - it 're-raises exceptions' do - allow(migration) - .to receive(:update_search_data_individually) - .and_raise(ActiveRecord::StatementTimeout) - - expect { perform_migration }.to raise_error(ActiveRecord::StatementTimeout) - end - end -end diff --git a/spec/lib/gitlab/background_migration/backfill_integrations_enable_ssl_verification_spec.rb b/spec/lib/gitlab/background_migration/backfill_integrations_enable_ssl_verification_spec.rb index 925fb0c9a20be..9813e92edc054 100644 --- a/spec/lib/gitlab/background_migration/backfill_integrations_enable_ssl_verification_spec.rb +++ b/spec/lib/gitlab/background_migration/backfill_integrations_enable_ssl_verification_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Gitlab::BackgroundMigration::BackfillIntegrationsEnableSslVerification, schema: 20221111123146 do +RSpec.describe Gitlab::BackgroundMigration::BackfillIntegrationsEnableSslVerification, schema: 20230216060333 do let(:migration) { described_class.new } let(:integrations) { described_class::Integration } diff --git a/spec/lib/gitlab/background_migration/backfill_namespace_id_of_vulnerability_reads_spec.rb b/spec/lib/gitlab/background_migration/backfill_namespace_id_of_vulnerability_reads_spec.rb index c2c5c3e9de05b..f92ec7e028b56 100644 --- a/spec/lib/gitlab/background_migration/backfill_namespace_id_of_vulnerability_reads_spec.rb +++ b/spec/lib/gitlab/background_migration/backfill_namespace_id_of_vulnerability_reads_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Gitlab::BackgroundMigration::BackfillNamespaceIdOfVulnerabilityReads, schema: 20221111123146 do +RSpec.describe Gitlab::BackgroundMigration::BackfillNamespaceIdOfVulnerabilityReads, schema: 20230216060333 do let(:namespaces) { table(:namespaces) } let(:projects) { table(:projects) } let(:users) { table(:users) } diff --git a/spec/lib/gitlab/background_migration/backfill_project_namespace_on_issues_spec.rb b/spec/lib/gitlab/background_migration/backfill_project_namespace_on_issues_spec.rb deleted file mode 100644 index 5fa92759cf948..0000000000000 --- a/spec/lib/gitlab/background_migration/backfill_project_namespace_on_issues_spec.rb +++ /dev/null @@ -1,76 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Gitlab::BackgroundMigration::BackfillProjectNamespaceOnIssues, - :migration, schema: 20221118103352, feature_category: :team_planning do - let(:namespaces) { table(:namespaces) } - let(:projects) { table(:projects) } - let(:issues) { table(:issues) } - let(:issue_base_type_enum_value) { 0 } - let(:issue_type) { table(:work_item_types).find_by!(namespace_id: nil, base_type: issue_base_type_enum_value) } - - let(:namespace1) { namespaces.create!(name: 'batchtest1', type: 'Group', path: 'space1') } - let(:namespace2) { namespaces.create!(name: 'batchtest2', type: 'Group', parent_id: namespace1.id, path: 'space2') } - - let(:proj_namespace1) { namespaces.create!(name: 'proj1', path: 'proj1', type: 'Project', parent_id: namespace1.id) } - let(:proj_namespace2) { namespaces.create!(name: 'proj2', path: 'proj2', type: 'Project', parent_id: namespace2.id) } - - # rubocop:disable Layout/LineLength - let(:proj1) { projects.create!(name: 'proj1', path: 'proj1', namespace_id: namespace1.id, project_namespace_id: proj_namespace1.id) } - let(:proj2) { projects.create!(name: 'proj2', path: 'proj2', namespace_id: namespace2.id, project_namespace_id: proj_namespace2.id) } - - let!(:proj1_issue_with_namespace) { issues.create!(title: 'issue1', project_id: proj1.id, namespace_id: proj_namespace1.id, work_item_type_id: issue_type.id) } - let!(:proj1_issue_without_namespace1) { issues.create!(title: 'issue2', project_id: proj1.id, work_item_type_id: issue_type.id) } - let!(:proj1_issue_without_namespace2) { issues.create!(title: 'issue3', project_id: proj1.id, work_item_type_id: issue_type.id) } - let!(:proj2_issue_with_namespace) { issues.create!(title: 'issue4', project_id: proj2.id, namespace_id: proj_namespace2.id, work_item_type_id: issue_type.id) } - let!(:proj2_issue_without_namespace1) { issues.create!(title: 'issue5', project_id: proj2.id, work_item_type_id: issue_type.id) } - let!(:proj2_issue_without_namespace2) { issues.create!(title: 'issue6', project_id: proj2.id, work_item_type_id: issue_type.id) } - # rubocop:enable Layout/LineLength - - let(:migration) do - described_class.new( - start_id: proj1_issue_with_namespace.id, - end_id: proj2_issue_without_namespace2.id, - batch_table: :issues, - batch_column: :id, - sub_batch_size: 2, - pause_ms: 2, - connection: ApplicationRecord.connection - ) - end - - subject(:perform_migration) { migration.perform } - - it 'backfills namespace_id for the selected records', :aggregate_failures do - perform_migration - - expected_namespaces = [proj_namespace1.id, proj_namespace2.id] - - expect(issues.where.not(namespace_id: nil).count).to eq(6) - expect(issues.where.not(namespace_id: nil).pluck(:namespace_id).uniq).to match_array(expected_namespaces) - end - - it 'tracks timings of queries' do - expect(migration.batch_metrics.timings).to be_empty - - expect { perform_migration }.to change { migration.batch_metrics.timings } - end - - context 'when database timeouts' do - using RSpec::Parameterized::TableSyntax - - where(error_class: [ActiveRecord::StatementTimeout, ActiveRecord::QueryCanceled]) - - with_them do - it 'retries on timeout error' do - expect(migration).to receive(:update_batch).exactly(3).times.and_raise(error_class) - expect(migration).to receive(:sleep).with(5).twice - - expect do - perform_migration - end.to raise_error(error_class) - end - end - end -end diff --git a/spec/lib/gitlab/background_migration/backfill_releases_author_id_spec.rb b/spec/lib/gitlab/background_migration/backfill_releases_author_id_spec.rb index 898f241a93035..b86cfa005cde8 100644 --- a/spec/lib/gitlab/background_migration/backfill_releases_author_id_spec.rb +++ b/spec/lib/gitlab/background_migration/backfill_releases_author_id_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' RSpec.describe Gitlab::BackgroundMigration::BackfillReleasesAuthorId, - :migration, schema: 20221215151822, feature_category: :release_orchestration do + :migration, schema: 20230216060333, feature_category: :release_orchestration do let(:releases_table) { table(:releases) } let(:user_table) { table(:users) } let(:date_time) { DateTime.now } diff --git a/spec/lib/gitlab/background_migration/backfill_topics_title_spec.rb b/spec/lib/gitlab/background_migration/backfill_topics_title_spec.rb index 3eb0000877d01..d1852d726e065 100644 --- a/spec/lib/gitlab/background_migration/backfill_topics_title_spec.rb +++ b/spec/lib/gitlab/background_migration/backfill_topics_title_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Gitlab::BackgroundMigration::BackfillTopicsTitle, schema: 20221111123146 do +RSpec.describe Gitlab::BackgroundMigration::BackfillTopicsTitle, schema: 20230216060333 do it 'correctly backfills the title of the topics' do topics = table(:topics) diff --git a/spec/lib/gitlab/background_migration/backfill_user_details_fields_spec.rb b/spec/lib/gitlab/background_migration/backfill_user_details_fields_spec.rb deleted file mode 100644 index 1d1853b032c72..0000000000000 --- a/spec/lib/gitlab/background_migration/backfill_user_details_fields_spec.rb +++ /dev/null @@ -1,222 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Gitlab::BackgroundMigration::BackfillUserDetailsFields, :migration, schema: 20221111123146 do - let(:users) { table(:users) } - let(:user_details) { table(:user_details) } - - let!(:user_all_fields_backfill) do - users.create!( - name: generate(:name), - email: generate(:email), - projects_limit: 1, - linkedin: 'linked-in', - twitter: '@twitter', - skype: 'skype', - website_url: 'https://example.com', - location: 'Antarctica', - organization: 'Gitlab' - ) - end - - let!(:user_long_details_fields) do - length = UserDetail::DEFAULT_FIELD_LENGTH + 1 - users.create!( - name: generate(:name), - email: generate(:email), - projects_limit: 1, - linkedin: 'l' * length, - twitter: 't' * length, - skype: 's' * length, - website_url: "https://#{'a' * (length - 12)}.com", - location: 'l' * length, - organization: 'o' * length - ) - end - - let!(:user_nil_details_fields) do - users.create!( - name: generate(:name), - email: generate(:email), - projects_limit: 1 - ) - end - - let!(:user_empty_details_fields) do - users.create!( - name: generate(:name), - email: generate(:email), - projects_limit: 1, - linkedin: '', - twitter: '', - skype: '', - website_url: '', - location: '', - organization: '' - ) - end - - let!(:user_with_bio) do - users.create!( - name: generate(:name), - email: generate(:email), - projects_limit: 1, - linkedin: 'linked-in', - twitter: '@twitter', - skype: 'skype', - website_url: 'https://example.com', - location: 'Antarctica', - organization: 'Gitlab' - ) - end - - let!(:bio_user_details) do - user_details - .find_or_create_by!(user_id: user_with_bio.id) - .update!(bio: 'bio') - end - - let!(:user_with_details) do - users.create!( - name: generate(:name), - email: generate(:email), - projects_limit: 1, - linkedin: 'linked-in', - twitter: '@twitter', - skype: 'skype', - website_url: 'https://example.com', - location: 'Antarctica', - organization: 'Gitlab' - ) - end - - let!(:existing_user_details) do - user_details - .find_or_create_by!(user_id: user_with_details.id) - .update!( - linkedin: 'linked-in', - twitter: '@twitter', - skype: 'skype', - website_url: 'https://example.com', - location: 'Antarctica', - organization: 'Gitlab' - ) - end - - let!(:user_different_details) do - users.create!( - name: generate(:name), - email: generate(:email), - projects_limit: 1, - linkedin: 'linked-in', - twitter: '@twitter', - skype: 'skype', - website_url: 'https://example.com', - location: 'Antarctica', - organization: 'Gitlab' - ) - end - - let!(:differing_details) do - user_details - .find_or_create_by!(user_id: user_different_details.id) - .update!( - linkedin: 'details-in', - twitter: '@details', - skype: 'details_skype', - website_url: 'https://details.site', - location: 'Details Location', - organization: 'Details Organization' - ) - end - - let(:user_ids) do - [ - user_all_fields_backfill, - user_long_details_fields, - user_nil_details_fields, - user_empty_details_fields, - user_with_bio, - user_with_details, - user_different_details - ].map(&:id) - end - - subject do - described_class.new( - start_id: user_ids.min, - end_id: user_ids.max, - batch_table: 'users', - batch_column: 'id', - sub_batch_size: 1_000, - pause_ms: 0, - connection: ApplicationRecord.connection - ) - end - - it 'processes all relevant records' do - expect { subject.perform }.to change { user_details.all.size }.to(5) - end - - it 'backfills new user_details fields' do - subject.perform - - user_detail = user_details.find_by!(user_id: user_all_fields_backfill.id) - expect(user_detail.linkedin).to eq('linked-in') - expect(user_detail.twitter).to eq('@twitter') - expect(user_detail.skype).to eq('skype') - expect(user_detail.website_url).to eq('https://example.com') - expect(user_detail.location).to eq('Antarctica') - expect(user_detail.organization).to eq('Gitlab') - end - - it 'does not migrate nil fields' do - subject.perform - - expect(user_details.find_by(user_id: user_nil_details_fields)).to be_nil - end - - it 'does not migrate empty fields' do - subject.perform - - expect(user_details.find_by(user_id: user_empty_details_fields)).to be_nil - end - - it 'backfills new fields without overwriting existing `bio` field' do - subject.perform - - user_detail = user_details.find_by!(user_id: user_with_bio.id) - expect(user_detail.bio).to eq('bio') - expect(user_detail.linkedin).to eq('linked-in') - expect(user_detail.twitter).to eq('@twitter') - expect(user_detail.skype).to eq('skype') - expect(user_detail.website_url).to eq('https://example.com') - expect(user_detail.location).to eq('Antarctica') - expect(user_detail.organization).to eq('Gitlab') - end - - context 'when user details are unchanged' do - it 'does not change existing details' do - expect { subject.perform }.not_to change { - user_details.find_by!(user_id: user_with_details.id).attributes - } - end - end - - context 'when user details are changed' do - it 'updates existing user details' do - expect { subject.perform }.to change { - user_details.find_by!(user_id: user_different_details.id).attributes - } - - user_detail = user_details.find_by!(user_id: user_different_details.id) - expect(user_detail.linkedin).to eq('linked-in') - expect(user_detail.twitter).to eq('@twitter') - expect(user_detail.skype).to eq('skype') - expect(user_detail.website_url).to eq('https://example.com') - expect(user_detail.location).to eq('Antarctica') - expect(user_detail.organization).to eq('Gitlab') - end - end -end diff --git a/spec/lib/gitlab/background_migration/backfill_vulnerability_reads_cluster_agent_spec.rb b/spec/lib/gitlab/background_migration/backfill_vulnerability_reads_cluster_agent_spec.rb index 63135971cd39a..f43440b922675 100644 --- a/spec/lib/gitlab/background_migration/backfill_vulnerability_reads_cluster_agent_spec.rb +++ b/spec/lib/gitlab/background_migration/backfill_vulnerability_reads_cluster_agent_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Gitlab::BackgroundMigration::BackfillVulnerabilityReadsClusterAgent, :migration, schema: 20221111123146 do # rubocop:disable Layout/LineLength +RSpec.describe Gitlab::BackgroundMigration::BackfillVulnerabilityReadsClusterAgent, :migration, schema: 20230216060333 do # rubocop:disable Layout/LineLength let(:migration) do described_class.new( start_id: 1, end_id: 10, diff --git a/spec/lib/gitlab/background_migration/backfill_work_item_type_id_for_issues_spec.rb b/spec/lib/gitlab/background_migration/backfill_work_item_type_id_for_issues_spec.rb deleted file mode 100644 index 4c1af279804ff..0000000000000 --- a/spec/lib/gitlab/background_migration/backfill_work_item_type_id_for_issues_spec.rb +++ /dev/null @@ -1,102 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Gitlab::BackgroundMigration::BackfillWorkItemTypeIdForIssues, - :migration, - schema: 20221111123146, - feature_category: :team_planning do - let(:batch_column) { 'id' } - let(:sub_batch_size) { 2 } - let(:pause_ms) { 0 } - - # let_it_be can't be used in migration specs because all tables but `work_item_types` are deleted after each spec - let(:issue_type_enum) { { issue: 0, incident: 1, test_case: 2, requirement: 3, task: 4 } } - let(:namespace) { table(:namespaces).create!(name: 'namespace', path: 'namespace') } - let(:project) { table(:projects).create!(namespace_id: namespace.id, project_namespace_id: namespace.id) } - let(:issues_table) { table(:issues) } - let(:issue_type) { table(:work_item_types).find_by!(namespace_id: nil, base_type: issue_type_enum[:issue]) } - let(:task_type) { table(:work_item_types).find_by!(namespace_id: nil, base_type: issue_type_enum[:task]) } - - let(:issue1) { issues_table.create!(project_id: project.id, issue_type: issue_type_enum[:issue]) } - let(:issue2) { issues_table.create!(project_id: project.id, issue_type: issue_type_enum[:issue]) } - let(:issue3) { issues_table.create!(project_id: project.id, issue_type: issue_type_enum[:issue]) } - let(:incident1) { issues_table.create!(project_id: project.id, issue_type: issue_type_enum[:incident]) } - # test_case and requirement are EE only, but enum values exist on the FOSS model - let(:test_case1) { issues_table.create!(project_id: project.id, issue_type: issue_type_enum[:test_case]) } - let(:requirement1) { issues_table.create!(project_id: project.id, issue_type: issue_type_enum[:requirement]) } - - let(:start_id) { issue1.id } - let(:end_id) { requirement1.id } - - let!(:all_issues) { [issue1, issue2, issue3, incident1, test_case1, requirement1] } - - let(:migration) do - described_class.new( - start_id: start_id, - end_id: end_id, - batch_table: :issues, - batch_column: :id, - sub_batch_size: sub_batch_size, - pause_ms: pause_ms, - job_arguments: [issue_type_enum[:issue], issue_type.id], - connection: ApplicationRecord.connection - ) - end - - subject(:migrate) { migration.perform } - - it 'sets work_item_type_id only for the given type' do - expect(all_issues).to all(have_attributes(work_item_type_id: nil)) - - expect { migrate }.to make_queries_matching(/UPDATE "issues" SET "work_item_type_id"/, 2) - all_issues.each(&:reload) - - expect([issue1, issue2, issue3]).to all(have_attributes(work_item_type_id: issue_type.id)) - expect(all_issues - [issue1, issue2, issue3]).to all(have_attributes(work_item_type_id: nil)) - end - - context 'when a record already had a work_item_type_id assigned' do - let!(:issue4) do - issues_table.create!( - project_id: project.id, - issue_type: issue_type_enum[:issue], - work_item_type_id: task_type.id - ) - end - - let(:end_id) { issue4.id } - - it 'ovewrites the work_item_type_id' do - # creating with the wrong issue_type/work_item_type_id on purpose so we can test - # that the migration is capable of fixing such inconsistencies - expect do - migrate - issue4.reload - end.to change { issue4.work_item_type_id }.from(task_type.id).to(issue_type.id) - end - end - - it 'tracks timings of queries' do - expect(migration.batch_metrics.timings).to be_empty - - expect { migrate }.to change { migration.batch_metrics.timings } - end - - context 'when database timeouts' do - using RSpec::Parameterized::TableSyntax - - where(error_class: [ActiveRecord::StatementTimeout, ActiveRecord::QueryCanceled]) - - with_them do - it 'retries on timeout error' do - expect(migration).to receive(:update_batch).exactly(3).times.and_raise(error_class) - expect(migration).to receive(:sleep).with(30).twice - - expect do - migrate - end.to raise_error(error_class) - end - end - end -end diff --git a/spec/lib/gitlab/background_migration/destroy_invalid_members_spec.rb b/spec/lib/gitlab/background_migration/destroy_invalid_members_spec.rb index 95c5a64bc7b1f..98c814902b4c3 100644 --- a/spec/lib/gitlab/background_migration/destroy_invalid_members_spec.rb +++ b/spec/lib/gitlab/background_migration/destroy_invalid_members_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' # rubocop: disable RSpec/MultipleMemoizedHelpers -RSpec.describe Gitlab::BackgroundMigration::DestroyInvalidMembers, :migration, schema: 20221111123146 do +RSpec.describe Gitlab::BackgroundMigration::DestroyInvalidMembers, :migration, schema: 20230216060333 do let!(:migration_attrs) do { start_id: 1, @@ -124,7 +124,7 @@ def create_members expect(Gitlab::AppLogger).to receive(:info).with({ message: 'Removing invalid member records', deleted_count: 4, - deleted_member_data: member_data }) + deleted_member_data: match_array(member_data) }) perform_migration end diff --git a/spec/lib/gitlab/background_migration/disable_legacy_open_source_license_for_no_issues_no_repo_projects_spec.rb b/spec/lib/gitlab/background_migration/disable_legacy_open_source_license_for_no_issues_no_repo_projects_spec.rb deleted file mode 100644 index 8afbd7403d30d..0000000000000 --- a/spec/lib/gitlab/background_migration/disable_legacy_open_source_license_for_no_issues_no_repo_projects_spec.rb +++ /dev/null @@ -1,63 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Gitlab::BackgroundMigration::DisableLegacyOpenSourceLicenseForNoIssuesNoRepoProjects, - :migration, - schema: 20221111123146 do - let(:namespaces_table) { table(:namespaces) } - let(:projects_table) { table(:projects) } - let(:project_settings_table) { table(:project_settings) } - let(:project_statistics_table) { table(:project_statistics) } - let(:issues_table) { table(:issues) } - - subject(:perform_migration) do - described_class.new( - start_id: projects_table.minimum(:id), - end_id: projects_table.maximum(:id), - batch_table: :projects, - batch_column: :id, - sub_batch_size: 2, - pause_ms: 0, - connection: ActiveRecord::Base.connection - ).perform - end - - it 'sets `legacy_open_source_license_available` to false only for public projects with no issues and no repo', - :aggregate_failures do - project_with_no_issues_no_repo = create_legacy_license_public_project('project-with-no-issues-no-repo') - project_with_repo = create_legacy_license_public_project('project-with-repo', repo_size: 1) - project_with_issues = create_legacy_license_public_project('project-with-issues', with_issue: true) - project_with_issues_and_repo = - create_legacy_license_public_project('project-with-issues-and-repo', repo_size: 1, with_issue: true) - - queries = ActiveRecord::QueryRecorder.new { perform_migration } - - expect(queries.count).to eq(7) - expect(migrated_attribute(project_with_no_issues_no_repo)).to be_falsey - expect(migrated_attribute(project_with_repo)).to be_truthy - expect(migrated_attribute(project_with_issues)).to be_truthy - expect(migrated_attribute(project_with_issues_and_repo)).to be_truthy - end - - def create_legacy_license_public_project(path, repo_size: 0, with_issue: false) - namespace = namespaces_table.create!(name: "namespace-#{path}", path: "namespace-#{path}") - project_namespace = namespaces_table.create!( - name: "-project-namespace-#{path}", path: "project-namespace-#{path}", type: 'Project' - ) - project = projects_table.create!( - name: path, path: path, namespace_id: namespace.id, - project_namespace_id: project_namespace.id, visibility_level: 20 - ) - - project_statistics_table.create!(project_id: project.id, namespace_id: namespace.id, repository_size: repo_size) - issues_table.create!(project_id: project.id, namespace_id: project.project_namespace_id) if with_issue - project_settings_table.create!(project_id: project.id, legacy_open_source_license_available: true) - - project - end - - def migrated_attribute(project) - project_settings_table.find(project.id).legacy_open_source_license_available - end -end diff --git a/spec/lib/gitlab/background_migration/disable_legacy_open_source_license_for_one_member_no_repo_projects_spec.rb b/spec/lib/gitlab/background_migration/disable_legacy_open_source_license_for_one_member_no_repo_projects_spec.rb index 185e2da6f1dbd..9ad54c3508710 100644 --- a/spec/lib/gitlab/background_migration/disable_legacy_open_source_license_for_one_member_no_repo_projects_spec.rb +++ b/spec/lib/gitlab/background_migration/disable_legacy_open_source_license_for_one_member_no_repo_projects_spec.rb @@ -4,7 +4,7 @@ RSpec.describe Gitlab::BackgroundMigration::DisableLegacyOpenSourceLicenseForOneMemberNoRepoProjects, :migration, - schema: 20221111123146 do + schema: 20230216060333 do let(:namespaces_table) { table(:namespaces) } let(:projects_table) { table(:projects) } let(:project_settings_table) { table(:project_settings) } diff --git a/spec/lib/gitlab/background_migration/disable_legacy_open_source_license_for_projects_less_than_five_mb_spec.rb b/spec/lib/gitlab/background_migration/disable_legacy_open_source_license_for_projects_less_than_five_mb_spec.rb index fedee9c506866..0c9c1dbde9a18 100644 --- a/spec/lib/gitlab/background_migration/disable_legacy_open_source_license_for_projects_less_than_five_mb_spec.rb +++ b/spec/lib/gitlab/background_migration/disable_legacy_open_source_license_for_projects_less_than_five_mb_spec.rb @@ -4,7 +4,7 @@ RSpec.describe Gitlab::BackgroundMigration::DisableLegacyOpenSourceLicenseForProjectsLessThanFiveMb, :migration, - schema: 20221018095434, + schema: 20230216060333, feature_category: :groups_and_projects do let(:namespaces_table) { table(:namespaces) } let(:projects_table) { table(:projects) } diff --git a/spec/lib/gitlab/background_migration/disable_legacy_open_source_license_for_projects_less_than_one_mb_spec.rb b/spec/lib/gitlab/background_migration/disable_legacy_open_source_license_for_projects_less_than_one_mb_spec.rb index f1ec09840abd7..16144643296e5 100644 --- a/spec/lib/gitlab/background_migration/disable_legacy_open_source_license_for_projects_less_than_one_mb_spec.rb +++ b/spec/lib/gitlab/background_migration/disable_legacy_open_source_license_for_projects_less_than_one_mb_spec.rb @@ -4,7 +4,7 @@ RSpec.describe Gitlab::BackgroundMigration::DisableLegacyOpenSourceLicenseForProjectsLessThanOneMb, :migration, - schema: 20221111123146 do + schema: 20230216060333 do let(:namespaces_table) { table(:namespaces) } let(:projects_table) { table(:projects) } let(:project_settings_table) { table(:project_settings) } diff --git a/spec/lib/gitlab/background_migration/expire_o_auth_tokens_spec.rb b/spec/lib/gitlab/background_migration/expire_o_auth_tokens_spec.rb deleted file mode 100644 index 4997ae3763e4b..0000000000000 --- a/spec/lib/gitlab/background_migration/expire_o_auth_tokens_spec.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Gitlab::BackgroundMigration::ExpireOAuthTokens, :migration, schema: 20221111123146 do - let(:migration) { described_class.new } - let(:oauth_access_tokens_table) { table(:oauth_access_tokens) } - - let(:table_name) { 'oauth_access_tokens' } - - subject(:perform_migration) do - described_class.new( - start_id: 1, - end_id: 30, - batch_table: :oauth_access_tokens, - batch_column: :id, - sub_batch_size: 2, - pause_ms: 0, - connection: ActiveRecord::Base.connection - ).perform - end - - before do - oauth_access_tokens_table.create!(id: 1, token: 's3cr3t-1', expires_in: nil) - oauth_access_tokens_table.create!(id: 2, token: 's3cr3t-2', expires_in: 42) - oauth_access_tokens_table.create!(id: 3, token: 's3cr3t-3', expires_in: nil) - end - - it 'adds expiry to oauth tokens', :aggregate_failures do - expect(ActiveRecord::QueryRecorder.new { perform_migration }.count).to eq(3) - - expect(oauth_access_tokens_table.find(1).expires_in).to eq(7_200) - expect(oauth_access_tokens_table.find(2).expires_in).to eq(42) - expect(oauth_access_tokens_table.find(3).expires_in).to eq(7_200) - end -end diff --git a/spec/lib/gitlab/background_migration/nullify_creator_id_column_of_orphaned_projects_spec.rb b/spec/lib/gitlab/background_migration/nullify_creator_id_column_of_orphaned_projects_spec.rb index facc3c435daf5..82a3f548e0221 100644 --- a/spec/lib/gitlab/background_migration/nullify_creator_id_column_of_orphaned_projects_spec.rb +++ b/spec/lib/gitlab/background_migration/nullify_creator_id_column_of_orphaned_projects_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' RSpec.describe Gitlab::BackgroundMigration::NullifyCreatorIdColumnOfOrphanedProjects, - feature_category: :groups_and_projects, schema: 20230130073109 do + feature_category: :groups_and_projects, schema: 20230216060333 do let(:users) { table(:users) } let(:projects) { table(:projects) } let(:namespaces) { table(:namespaces) } diff --git a/spec/lib/gitlab/background_migration/populate_projects_star_count_spec.rb b/spec/lib/gitlab/background_migration/populate_projects_star_count_spec.rb index 35f93c9982b99..c41eb98bc5db4 100644 --- a/spec/lib/gitlab/background_migration/populate_projects_star_count_spec.rb +++ b/spec/lib/gitlab/background_migration/populate_projects_star_count_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Gitlab::BackgroundMigration::PopulateProjectsStarCount, schema: 20221111123146 do +RSpec.describe Gitlab::BackgroundMigration::PopulateProjectsStarCount, schema: 20230216060333 do let(:namespaces) { table(:namespaces) } let(:projects) { table(:projects) } let(:users) { table(:users) } diff --git a/spec/lib/gitlab/background_migration/remove_project_group_link_with_missing_groups_spec.rb b/spec/lib/gitlab/background_migration/remove_project_group_link_with_missing_groups_spec.rb deleted file mode 100644 index 126e928fa778d..0000000000000 --- a/spec/lib/gitlab/background_migration/remove_project_group_link_with_missing_groups_spec.rb +++ /dev/null @@ -1,124 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Gitlab::BackgroundMigration::RemoveProjectGroupLinkWithMissingGroups, :migration, - feature_category: :groups_and_projects, schema: 20230206172702 do - let(:projects) { table(:projects) } - let(:namespaces) { table(:namespaces) } - let(:project_group_links) { table(:project_group_links) } - - let!(:group) do - namespaces.create!( - name: 'Group0', type: 'Group', path: 'space0' - ) - end - - let!(:group_1) do - namespaces.create!( - name: 'Group1', type: 'Group', path: 'space1' - ) - end - - let!(:group_2) do - namespaces.create!( - name: 'Group2', type: 'Group', path: 'space2' - ) - end - - let!(:group_3) do - namespaces.create!( - name: 'Group3', type: 'Group', path: 'space3' - ) - end - - let!(:project_namespace_1) do - namespaces.create!( - name: 'project_1', path: 'project_1', type: 'Project' - ) - end - - let!(:project_namespace_2) do - namespaces.create!( - name: 'project_2', path: 'project_2', type: 'Project' - ) - end - - let!(:project_namespace_3) do - namespaces.create!( - name: 'project_3', path: 'project_3', type: 'Project' - ) - end - - let!(:project_1) do - projects.create!( - name: 'project_1', path: 'project_1', namespace_id: group.id, project_namespace_id: project_namespace_1.id - ) - end - - let!(:project_2) do - projects.create!( - name: 'project_2', path: 'project_2', namespace_id: group.id, project_namespace_id: project_namespace_2.id - ) - end - - let!(:project_3) do - projects.create!( - name: 'project_3', path: 'project_3', namespace_id: group.id, project_namespace_id: project_namespace_3.id - ) - end - - let!(:project_group_link_1) do - project_group_links.create!( - project_id: project_1.id, group_id: group_1.id, group_access: Gitlab::Access::DEVELOPER - ) - end - - let!(:project_group_link_2) do - project_group_links.create!( - project_id: project_2.id, group_id: group_2.id, group_access: Gitlab::Access::DEVELOPER - ) - end - - let!(:project_group_link_3) do - project_group_links.create!( - project_id: project_3.id, group_id: group_3.id, group_access: Gitlab::Access::DEVELOPER - ) - end - - let!(:project_group_link_4) do - project_group_links.create!( - project_id: project_3.id, group_id: group_2.id, group_access: Gitlab::Access::DEVELOPER - ) - end - - subject do - described_class.new( - start_id: project_group_link_1.id, - end_id: project_group_link_4.id, - batch_table: :project_group_links, - batch_column: :id, - sub_batch_size: 1, - pause_ms: 0, - connection: ApplicationRecord.connection - ).perform - end - - it 'removes the `project_group_links` records whose associated group does not exist anymore' do - group_2.delete - - # Schema is fixed to `20230206172702` on this spec. - # This expectation is needed to make sure that the orphaned records are indeed deleted via the migration - # and not via the foreign_key relationship introduced after `20230206172702`, in `20230207002330` - expect(project_group_links.count).to eq(4) - - expect { subject } - .to change { project_group_links.count }.from(4).to(2) - .and change { - project_group_links.where(project_id: project_2.id, group_id: group_2.id).present? - }.from(true).to(false) - .and change { - project_group_links.where(project_id: project_3.id, group_id: group_2.id).present? - }.from(true).to(false) - end -end diff --git a/spec/lib/gitlab/background_migration/remove_self_managed_wiki_notes_spec.rb b/spec/lib/gitlab/background_migration/remove_self_managed_wiki_notes_spec.rb index 74fe2c6313975..c373323c0e3bf 100644 --- a/spec/lib/gitlab/background_migration/remove_self_managed_wiki_notes_spec.rb +++ b/spec/lib/gitlab/background_migration/remove_self_managed_wiki_notes_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Gitlab::BackgroundMigration::RemoveSelfManagedWikiNotes, :migration, schema: 20221111123146 do +RSpec.describe Gitlab::BackgroundMigration::RemoveSelfManagedWikiNotes, :migration, schema: 20230216060333 do let(:notes) { table(:notes) } subject(:perform_migration) do diff --git a/spec/lib/gitlab/background_migration/reset_too_many_tags_skipped_registry_imports_spec.rb b/spec/lib/gitlab/background_migration/reset_too_many_tags_skipped_registry_imports_spec.rb index 86c2ab35136ba..655d8dea739b8 100644 --- a/spec/lib/gitlab/background_migration/reset_too_many_tags_skipped_registry_imports_spec.rb +++ b/spec/lib/gitlab/background_migration/reset_too_many_tags_skipped_registry_imports_spec.rb @@ -4,7 +4,7 @@ RSpec.describe Gitlab::BackgroundMigration::ResetTooManyTagsSkippedRegistryImports, :migration, :aggregate_failures, - schema: 20221111123146 do + schema: 20230216060333 do let(:namespaces) { table(:namespaces) } let(:projects) { table(:projects) } let(:container_repositories) { table(:container_repositories) } diff --git a/spec/lib/gitlab/background_migration/set_legacy_open_source_license_available_for_non_public_projects_spec.rb b/spec/lib/gitlab/background_migration/set_legacy_open_source_license_available_for_non_public_projects_spec.rb index 5f7a699ac0bfd..91c5b60258fd6 100644 --- a/spec/lib/gitlab/background_migration/set_legacy_open_source_license_available_for_non_public_projects_spec.rb +++ b/spec/lib/gitlab/background_migration/set_legacy_open_source_license_available_for_non_public_projects_spec.rb @@ -4,7 +4,7 @@ RSpec.describe Gitlab::BackgroundMigration::SetLegacyOpenSourceLicenseAvailableForNonPublicProjects, :migration, - schema: 20221111123146 do + schema: 20230216060333 do let(:namespaces_table) { table(:namespaces) } let(:projects_table) { table(:projects) } let(:project_settings_table) { table(:project_settings) } diff --git a/spec/lib/gitlab/background_migration/truncate_overlong_vulnerability_html_titles_spec.rb b/spec/lib/gitlab/background_migration/truncate_overlong_vulnerability_html_titles_spec.rb index fcd88d523bcba..e4be70cb84fba 100644 --- a/spec/lib/gitlab/background_migration/truncate_overlong_vulnerability_html_titles_spec.rb +++ b/spec/lib/gitlab/background_migration/truncate_overlong_vulnerability_html_titles_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' # rubocop:disable Layout/LineLength -RSpec.describe Gitlab::BackgroundMigration::TruncateOverlongVulnerabilityHtmlTitles, schema: 20221110100602, feature_category: :vulnerability_management do +RSpec.describe Gitlab::BackgroundMigration::TruncateOverlongVulnerabilityHtmlTitles, schema: 20230216060333, feature_category: :vulnerability_management do # rubocop:enable Layout/LineLength let(:namespaces) { table(:namespaces) } diff --git a/spec/lib/gitlab/database/migration_helpers_spec.rb b/spec/lib/gitlab/database/migration_helpers_spec.rb index 8bf05f56b3ffd..13f7178924fcb 100644 --- a/spec/lib/gitlab/database/migration_helpers_spec.rb +++ b/spec/lib/gitlab/database/migration_helpers_spec.rb @@ -1055,11 +1055,16 @@ around do |ex| model.transaction do - require_migration!('add_columns_to_postgres_foreign_keys') - AddColumnsToPostgresForeignKeys.new.down + require_relative '../../../fixtures/migrations/db/migrate/schema_cache_migration_test' + + # Uses the init_schema migration, as it is always present in the codebase (not affected by squashing process) + require_migration!('init_schema') + + InitSchema.prepend(SchemaCacheMigrationTest) + InitSchema.new.down Gitlab::Database::PostgresForeignKey.reset_column_information Gitlab::Database::PostgresForeignKey.columns_hash # Force populate the column hash in the old schema - AddColumnsToPostgresForeignKeys.new.up + InitSchema.new.up # Rolling back reverts the schema cache information, so we need to run the example here before the rollback. ex.run diff --git a/spec/migrations/20221018095434_schedule_disable_legacy_open_source_license_for_projects_less_than_five_mb_spec.rb b/spec/migrations/20221018095434_schedule_disable_legacy_open_source_license_for_projects_less_than_five_mb_spec.rb deleted file mode 100644 index ba341ebe5cadd..0000000000000 --- a/spec/migrations/20221018095434_schedule_disable_legacy_open_source_license_for_projects_less_than_five_mb_spec.rb +++ /dev/null @@ -1,62 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe ScheduleDisableLegacyOpenSourceLicenseForProjectsLessThanFiveMb, feature_category: :groups_and_projects do - let!(:migration) { described_class.new } - let!(:post_migration) { described_class::MIGRATION } - - context 'when on gitlab.com' do - before do - allow(Gitlab).to receive(:com?).and_return(true) - end - - describe '#up' do - it 'schedules background jobs for each batch of project_settings' do - migration.up - - expect(post_migration).to( - have_scheduled_batched_migration( - table_name: :project_settings, - column_name: :project_id, - interval: described_class::INTERVAL, - batch_size: described_class::BATCH_SIZE, - max_batch_size: described_class::MAX_BATCH_SIZE, - sub_batch_size: described_class::SUB_BATCH_SIZE - ) - ) - end - end - - describe '#down' do - it 'deletes all batched migration records' do - migration.down - - expect(post_migration).not_to have_scheduled_batched_migration - end - end - end - - context 'when on self-managed instance' do - before do - allow(Gitlab).to receive(:com?).and_return(false) - end - - describe '#up' do - it 'does not schedule background job' do - expect(migration).not_to receive(:queue_batched_background_migration) - - migration.up - end - end - - describe '#down' do - it 'does not delete background job' do - expect(migration).not_to receive(:delete_batched_background_migration) - - migration.down - end - end - end -end diff --git a/spec/migrations/20221102231130_finalize_backfill_user_details_fields_spec.rb b/spec/migrations/20221102231130_finalize_backfill_user_details_fields_spec.rb deleted file mode 100644 index da2f4364e5cb6..0000000000000 --- a/spec/migrations/20221102231130_finalize_backfill_user_details_fields_spec.rb +++ /dev/null @@ -1,113 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -require_migration! - -RSpec.describe FinalizeBackfillUserDetailsFields, :migration, feature_category: :user_management do - let(:batched_migrations) { table(:batched_background_migrations) } - let(:batch_failed_status) { 2 } - let(:batch_finalized_status) { 3 } - - let!(:migration) { described_class::BACKFILL_MIGRATION } - - describe '#up' do - shared_examples 'finalizes the migration' do - it 'finalizes the migration' do - expect do - migrate! - - migration_record.reload - failed_job.reload - end.to change { migration_record.status }.from(migration_record.status).to(3).and( - change { failed_job.status }.from(batch_failed_status).to(batch_finalized_status) - ) - end - end - - context 'when migration is missing' do - before do - batched_migrations.where(job_class_name: migration).delete_all - end - - it 'warns migration not found' do - expect(Gitlab::AppLogger) - .to receive(:warn).with(/Could not find batched background migration for the given configuration:/) - - migrate! - end - end - - context 'with migration present' do - let!(:migration_record) do - batched_migrations.create!( - job_class_name: migration, - table_name: :users, - column_name: :id, - job_arguments: [], - interval: 2.minutes, - min_value: 1, - max_value: 2, - batch_size: 1000, - sub_batch_size: 500, - max_batch_size: 5000, - gitlab_schema: :gitlab_main, - status: 3 # finished - ) - end - - context 'when migration finished successfully' do - it 'does not raise exception' do - expect { migrate! }.not_to raise_error - end - end - - context 'when users.linkedin column has already been dropped' do - before do - table(:users).create!(id: 1, email: 'author@example.com', username: 'author', projects_limit: 10) - ActiveRecord::Base.connection.execute("ALTER TABLE users DROP COLUMN linkedin") - migration_record.update_column(:status, 1) - end - - after do - ActiveRecord::Base.connection.execute("ALTER TABLE users ADD COLUMN linkedin text DEFAULT '' NOT NULL") - end - - it 'does not raise exception' do - expect { migrate! }.not_to raise_error - end - end - - context 'with different migration statuses', :redis do - using RSpec::Parameterized::TableSyntax - - where(:status, :description) do - 0 | 'paused' - 1 | 'active' - 4 | 'failed' - 5 | 'finalizing' - end - - with_them do - let!(:failed_job) do - table(:batched_background_migration_jobs).create!( - batched_background_migration_id: migration_record.id, - status: batch_failed_status, - min_value: 1, - max_value: 10, - attempts: 2, - batch_size: 100, - sub_batch_size: 10 - ) - end - - before do - migration_record.update!(status: status) - end - - it_behaves_like 'finalizes the migration' - end - end - end - end -end diff --git a/spec/migrations/20221104115712_backfill_project_statistics_storage_size_without_uploads_size_spec.rb b/spec/migrations/20221104115712_backfill_project_statistics_storage_size_without_uploads_size_spec.rb deleted file mode 100644 index 9658b5a699a17..0000000000000 --- a/spec/migrations/20221104115712_backfill_project_statistics_storage_size_without_uploads_size_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe BackfillProjectStatisticsStorageSizeWithoutUploadsSize, - feature_category: :consumables_cost_management do - let!(:batched_migration) { described_class::MIGRATION_CLASS } - - it 'does not schedule background jobs when Gitlab.org_or_com? is false' do - allow(Gitlab).to receive(:dev_or_test_env?).and_return(false) - allow(Gitlab).to receive(:org_or_com?).and_return(false) - - reversible_migration do |migration| - migration.before -> { - expect(batched_migration).not_to have_scheduled_batched_migration - } - - migration.after -> { - expect(batched_migration).not_to have_scheduled_batched_migration - } - end - end - - it 'schedules background jobs for each batch of project_statistics' do - allow(Gitlab).to receive(:dev_or_test_env?).and_return(false) - allow(Gitlab).to receive(:org_or_com?).and_return(true) - - reversible_migration do |migration| - migration.before -> { - expect(batched_migration).not_to have_scheduled_batched_migration - } - - migration.after -> { - expect(batched_migration).to have_scheduled_batched_migration( - table_name: :project_statistics, - column_name: :project_id, - interval: described_class::DELAY_INTERVAL - ) - } - end - end -end diff --git a/spec/migrations/20221110152133_delete_orphans_approval_rules_spec.rb b/spec/migrations/20221110152133_delete_orphans_approval_rules_spec.rb deleted file mode 100644 index 3efee67f7af90..0000000000000 --- a/spec/migrations/20221110152133_delete_orphans_approval_rules_spec.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe DeleteOrphansApprovalRules, feature_category: :source_code_management do - describe '#up' do - it 'schedules background migration for both levels of approval rules' do - migrate! - - expect(described_class::MERGE_REQUEST_MIGRATION).to have_scheduled_batched_migration( - table_name: :approval_merge_request_rules, - column_name: :id, - interval: described_class::INTERVAL) - - expect(described_class::PROJECT_MIGRATION).to have_scheduled_batched_migration( - table_name: :approval_project_rules, - column_name: :id, - interval: described_class::INTERVAL) - end - end -end diff --git a/spec/migrations/20221115173607_ensure_work_item_type_backfill_migration_finished_spec.rb b/spec/migrations/20221115173607_ensure_work_item_type_backfill_migration_finished_spec.rb deleted file mode 100644 index d560da40c21ec..0000000000000 --- a/spec/migrations/20221115173607_ensure_work_item_type_backfill_migration_finished_spec.rb +++ /dev/null @@ -1,106 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe EnsureWorkItemTypeBackfillMigrationFinished, :migration, feature_category: :team_planning do - let(:batched_migrations) { table(:batched_background_migrations) } - let(:work_item_types) { table(:work_item_types) } - let(:batch_failed_status) { 2 } - let(:batch_finalized_status) { 3 } - - let!(:migration_class) { described_class::MIGRATION } - - describe '#up', :redis do - context 'when migration is missing' do - before do - batched_migrations.where(job_class_name: migration_class).delete_all - end - - it 'warns migration not found' do - expect(Gitlab::AppLogger) - .to receive(:warn).with(/Could not find batched background migration for the given configuration:/) - .exactly(5).times - - migrate! - end - end - - context 'with migration present' do - let(:relevant_types) do - { - issue: 0, - incident: 1, - test_case: 2, - requirement: 3, - task: 4 - } - end - - let!(:backfill_migrations) do - relevant_types.map do |_base_type, enum_value| - type_id = work_item_types.find_by!(namespace_id: nil, base_type: enum_value).id - - create_migration_with(status, enum_value, type_id) - end - end - - context 'when migrations have finished' do - let(:status) { 3 } # finished enum value - - it 'does not raise an error' do - expect { migrate! }.not_to raise_error - end - end - - context 'with different migration statuses' do - using RSpec::Parameterized::TableSyntax - - where(:status, :description) do - 0 | 'paused' - 1 | 'active' - 4 | 'failed' - 5 | 'finalizing' - end - - with_them do - it 'finalizes the migration' do - expect do - migrate! - - backfill_migrations.each(&:reload) - end.to change { backfill_migrations.map(&:status).uniq }.from([status]).to([3]) - end - end - end - end - end - - def create_migration_with(status, base_type, type_id) - migration = batched_migrations.create!( - job_class_name: migration_class, - table_name: :issues, - column_name: :id, - job_arguments: [base_type, type_id], - interval: 2.minutes, - min_value: 1, - max_value: 2, - batch_size: 1000, - sub_batch_size: 200, - gitlab_schema: :gitlab_main, - status: status - ) - - table(:batched_background_migration_jobs).create!( - batched_background_migration_id: migration.id, - status: batch_failed_status, - min_value: 1, - max_value: 10, - attempts: 2, - batch_size: 100, - sub_batch_size: 10 - ) - - migration - end -end diff --git a/spec/migrations/20221122132812_schedule_prune_stale_project_export_jobs_spec.rb b/spec/migrations/20221122132812_schedule_prune_stale_project_export_jobs_spec.rb deleted file mode 100644 index 9eaab56de7c5e..0000000000000 --- a/spec/migrations/20221122132812_schedule_prune_stale_project_export_jobs_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe SchedulePruneStaleProjectExportJobs, feature_category: :importers do - let!(:batched_migration) { described_class::MIGRATION } - - it 'schedules a new batched migration' do - reversible_migration do |migration| - migration.before -> { - expect(batched_migration).not_to have_scheduled_batched_migration - } - - migration.after -> { - expect(batched_migration).to have_scheduled_batched_migration( - table_name: :project_export_jobs, - column_name: :id, - interval: described_class::DELAY_INTERVAL - ) - } - end - end -end diff --git a/spec/migrations/20221123133054_queue_reset_status_on_container_repositories_spec.rb b/spec/migrations/20221123133054_queue_reset_status_on_container_repositories_spec.rb deleted file mode 100644 index 2951b7382434f..0000000000000 --- a/spec/migrations/20221123133054_queue_reset_status_on_container_repositories_spec.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe QueueResetStatusOnContainerRepositories, feature_category: :container_registry do - let!(:batched_migration) { described_class::MIGRATION } - - before do - stub_container_registry_config( - enabled: true, - api_url: 'http://example.com', - key: 'spec/fixtures/x509_certificate_pk.key' - ) - end - - it 'schedules a new batched migration' do - reversible_migration do |migration| - migration.before -> { - expect(batched_migration).not_to have_scheduled_batched_migration - } - - migration.after -> { - expect(batched_migration).to have_scheduled_batched_migration( - table_name: :container_repositories, - column_name: :id, - interval: described_class::DELAY_INTERVAL, - sub_batch_size: described_class::BATCH_SIZE - ) - } - end - end - - context 'with the container registry disabled' do - before do - allow(::Gitlab.config.registry).to receive(:enabled).and_return(false) - end - - it 'does not schedule a new batched migration' do - reversible_migration do |migration| - migration.before -> { - expect(batched_migration).not_to have_scheduled_batched_migration - } - - migration.after -> { - expect(batched_migration).not_to have_scheduled_batched_migration - } - end - end - end -end diff --git a/spec/migrations/20221205151917_schedule_backfill_environment_tier_spec.rb b/spec/migrations/20221205151917_schedule_backfill_environment_tier_spec.rb deleted file mode 100644 index e03fd9c9dafa9..0000000000000 --- a/spec/migrations/20221205151917_schedule_backfill_environment_tier_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe ScheduleBackfillEnvironmentTier, feature_category: :continuous_delivery do - let!(:batched_migration) { described_class::MIGRATION } - - it 'schedules a new batched migration' do - reversible_migration do |migration| - migration.before -> { - expect(batched_migration).not_to have_scheduled_batched_migration - } - - migration.after -> { - expect(batched_migration).to have_scheduled_batched_migration( - table_name: :environments, - column_name: :id, - interval: described_class::DELAY_INTERVAL - ) - } - end - end -end diff --git a/spec/migrations/20221209110934_update_import_sources_on_application_settings_spec.rb b/spec/migrations/20221209110934_update_import_sources_on_application_settings_spec.rb deleted file mode 100644 index d8270816afe9a..0000000000000 --- a/spec/migrations/20221209110934_update_import_sources_on_application_settings_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe UpdateImportSourcesOnApplicationSettings, feature_category: :importers do - let(:settings) { table(:application_settings) } - let(:import_sources_with_google) { %w[google_code github git bitbucket bitbucket_server] } - let(:import_sources_without_google) { %w[github git bitbucket bitbucket_server] } - - describe "#up" do - it 'removes google_code and preserves existing valid import sources' do - record = settings.create!(import_sources: import_sources_with_google.to_yaml) - - migrate! - - expect(record.reload.import_sources).to start_with('---') - expect(ApplicationSetting.last.import_sources).to eq(import_sources_without_google) - end - end -end diff --git a/spec/migrations/20221209110935_fix_update_import_sources_on_application_settings_spec.rb b/spec/migrations/20221209110935_fix_update_import_sources_on_application_settings_spec.rb deleted file mode 100644 index 1f276109b2474..0000000000000 --- a/spec/migrations/20221209110935_fix_update_import_sources_on_application_settings_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe FixUpdateImportSourcesOnApplicationSettings, feature_category: :importers do - let(:settings) { table(:application_settings) } - let(:import_sources) { %w[github git bitbucket bitbucket_server] } - - describe "#up" do - shared_examples 'fixes import_sources on application_settings' do - it 'ensures YAML is stored' do - record = settings.create!(import_sources: data) - - migrate! - - expect(record.reload.import_sources).to start_with('---') - expect(ApplicationSetting.last.import_sources).to eq(import_sources) - end - end - - context 'when import_sources is a String' do - let(:data) { import_sources.to_s } - - it_behaves_like 'fixes import_sources on application_settings' - end - - context 'when import_sources is already YAML' do - let(:data) { import_sources.to_yaml } - - it_behaves_like 'fixes import_sources on application_settings' - end - end -end diff --git a/spec/migrations/20221209235940_cleanup_o_auth_access_tokens_with_null_expires_in_spec.rb b/spec/migrations/20221209235940_cleanup_o_auth_access_tokens_with_null_expires_in_spec.rb deleted file mode 100644 index e5890ffce17e1..0000000000000 --- a/spec/migrations/20221209235940_cleanup_o_auth_access_tokens_with_null_expires_in_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe CleanupOAuthAccessTokensWithNullExpiresIn, feature_category: :system_access do - let(:batched_migration) { described_class::MIGRATION } - - it 'schedules background jobs for each batch of oauth_access_tokens' do - reversible_migration do |migration| - migration.before -> { - expect(batched_migration).not_to have_scheduled_batched_migration - } - - migration.after -> { - expect(batched_migration).to have_scheduled_batched_migration( - table_name: :oauth_access_tokens, - column_name: :id, - interval: described_class::INTERVAL - ) - } - end - end -end diff --git a/spec/migrations/20221210154044_update_active_billable_users_index_spec.rb b/spec/migrations/20221210154044_update_active_billable_users_index_spec.rb deleted file mode 100644 index 3341df2ce51e2..0000000000000 --- a/spec/migrations/20221210154044_update_active_billable_users_index_spec.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe UpdateActiveBillableUsersIndex, feature_category: :database do - let(:db) { described_class.new } - let(:table_name) { described_class::TABLE_NAME } - let(:old_index_name) { described_class::OLD_INDEX_NAME } - let(:new_index_name) { described_class::NEW_INDEX_NAME } - let(:old_filter_condition) { "(user_type <> ALL ('{2,6,1,3,7,8}'::smallint[])))" } - let(:new_filter_condition) { "(user_type <> ALL ('{1,2,3,4,5,6,7,8,9,11}'::smallint[])))" } - - it 'correctly migrates up and down' do - reversible_migration do |migration| - migration.before -> { - expect(subject.index_exists_by_name?(table_name, new_index_name)).to be_falsy - expect(subject.index_exists_by_name?(table_name, old_index_name)).to be_truthy - expect(db.connection.indexes(table_name).find do |i| - i.name == old_index_name - end.where).to include(old_filter_condition) - } - - migration.after -> { - expect(subject.index_exists_by_name?(table_name, old_index_name)).to be_falsy - expect(subject.index_exists_by_name?(table_name, new_index_name)).to be_truthy - expect(db.connection.indexes(table_name).find do |i| - i.name == new_index_name - end.where).to include(new_filter_condition) - } - end - end -end diff --git a/spec/migrations/20221215151822_schedule_backfill_releases_author_id_spec.rb b/spec/migrations/20221215151822_schedule_backfill_releases_author_id_spec.rb deleted file mode 100644 index 7cc0bd96a0dfe..0000000000000 --- a/spec/migrations/20221215151822_schedule_backfill_releases_author_id_spec.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe ScheduleBackfillReleasesAuthorId, feature_category: :release_orchestration do - context 'when there are releases without author' do - let(:releases_table) { table(:releases) } - let(:user_table) { table(:users) } - let(:date_time) { DateTime.now } - let!(:batched_migration) { described_class::MIGRATION } - let!(:test_user) do - user_table.create!( - name: 'test', - email: 'test@example.com', - username: 'test', - projects_limit: 10 - ) - end - - before do - releases_table.create!( - tag: 'tag1', name: 'tag1', released_at: (date_time - 1.minute), author_id: test_user.id - ) - releases_table.create!( - tag: 'tag2', name: 'tag2', released_at: (date_time - 2.minutes), author_id: test_user.id - ) - releases_table.new( - tag: 'tag3', name: 'tag3', released_at: (date_time - 3.minutes), author_id: nil - ).save!(validate: false) - releases_table.new( - tag: 'tag4', name: 'tag4', released_at: (date_time - 4.minutes), author_id: nil - ).save!(validate: false) - end - - it 'schedules a new batched migration' do - reversible_migration do |migration| - migration.before -> { - expect(batched_migration).not_to have_scheduled_batched_migration - } - - migration.after -> { - expect(batched_migration).to have_scheduled_batched_migration( - table_name: :releases, - column_name: :id, - interval: described_class::JOB_DELAY_INTERVAL, - job_arguments: [User.find_by(user_type: :ghost)&.id] - ) - } - end - end - end - - context 'when there are no releases without author' do - it 'does not schedule batched migration' do - expect(described_class.new.up).not_to have_scheduled_batched_migration - end - end -end diff --git a/spec/migrations/20221219122320_copy_clickhouse_connection_string_to_encrypted_var_spec.rb b/spec/migrations/20221219122320_copy_clickhouse_connection_string_to_encrypted_var_spec.rb deleted file mode 100644 index 48702e866e013..0000000000000 --- a/spec/migrations/20221219122320_copy_clickhouse_connection_string_to_encrypted_var_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe CopyClickhouseConnectionStringToEncryptedVar, feature_category: :product_analytics_data_management do - let!(:migration) { described_class.new } - let(:setting) { table(:application_settings).create!(clickhouse_connection_string: 'https://example.com/test') } - - it 'copies the clickhouse_connection_string to the encrypted column' do - expect(setting.clickhouse_connection_string).to eq('https://example.com/test') - - migrate! - - setting.reload - expect(setting.clickhouse_connection_string).to eq('https://example.com/test') - expect(setting.encrypted_product_analytics_clickhouse_connection_string).not_to be_nil - end -end diff --git a/spec/migrations/20221220131020_bump_default_partition_id_value_for_ci_tables_spec.rb b/spec/migrations/20221220131020_bump_default_partition_id_value_for_ci_tables_spec.rb deleted file mode 100644 index c4bd243e79f35..0000000000000 --- a/spec/migrations/20221220131020_bump_default_partition_id_value_for_ci_tables_spec.rb +++ /dev/null @@ -1,78 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -require_migration! - -RSpec.describe BumpDefaultPartitionIdValueForCiTables, :migration, feature_category: :continuous_integration do - context 'when on sass' do - before do - allow(Gitlab).to receive(:com?).and_return(true) - end - - it 'changes default values' do - reversible_migration do |migration| - migration.before -> { - expect(default_values).not_to include(101) - } - - migration.after -> { - expect(default_values).to match_array([101]) - } - end - end - - context 'with tables already changed' do - before do - active_record_base.connection.execute(<<~SQL) - ALTER TABLE ci_builds ALTER COLUMN partition_id SET DEFAULT 101 - SQL - end - - after do - schema_migrate_down! - end - - let(:alter_query) do - /ALTER TABLE "ci_builds" ALTER COLUMN "partition_id" SET DEFAULT 101/ - end - - it 'skips updating already changed tables' do - recorder = ActiveRecord::QueryRecorder.new { migrate! } - - expect(recorder.log.any?(alter_query)).to be_falsey - expect(default_values).to match_array([101]) - end - end - end - - context 'when self-managed' do - before do - allow(Gitlab).to receive(:com?).and_return(false) - end - - it 'does not change default values' do - reversible_migration do |migration| - migration.before -> { - expect(default_values).not_to include(101) - } - - migration.after -> { - expect(default_values).not_to include(101) - } - end - end - end - - def default_values - values = described_class::TABLES.flat_map do |table_name, columns| - active_record_base - .connection - .columns(table_name) - .select { |column| columns.include?(column.name.to_sym) } - .map { |column| column.default&.to_i } - end - - values.uniq - end -end diff --git a/spec/migrations/20221221110733_remove_temp_index_for_project_statistics_upload_size_migration_spec.rb b/spec/migrations/20221221110733_remove_temp_index_for_project_statistics_upload_size_migration_spec.rb deleted file mode 100644 index 440a932c76b04..0000000000000 --- a/spec/migrations/20221221110733_remove_temp_index_for_project_statistics_upload_size_migration_spec.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe RemoveTempIndexForProjectStatisticsUploadSizeMigration, - feature_category: :consumables_cost_management do - let(:table_name) { 'project_statistics' } - let(:index_name) { described_class::INDEX_NAME } - - it 'correctly migrates up and down' do - reversible_migration do |migration| - migration.before -> { - expect(subject.index_exists_by_name?(table_name, index_name)).to be_truthy - } - - migration.after -> { - expect(subject.index_exists_by_name?(table_name, index_name)).to be_falsy - } - end - end -end diff --git a/spec/migrations/20221222092958_sync_new_amount_used_with_amount_used_spec.rb b/spec/migrations/20221222092958_sync_new_amount_used_with_amount_used_spec.rb deleted file mode 100644 index 158560a243211..0000000000000 --- a/spec/migrations/20221222092958_sync_new_amount_used_with_amount_used_spec.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -require_migration! - -RSpec.describe SyncNewAmountUsedWithAmountUsed, migration: :gitlab_ci, feature_category: :continuous_integration do - let(:project_usages) { table(:ci_project_monthly_usages) } - let(:migration) { described_class.new } - - before do - # Disabling the trigger temporarily to allow records being created with out-of-sync - # `new_amount_used` and `amount_used`. This will simulate existing records before - # we add the trigger. - ActiveRecord::Base.connection - .execute("ALTER TABLE ci_project_monthly_usages DISABLE TRIGGER sync_projects_amount_used_columns") - - this_month = Time.now.utc.beginning_of_month - last_month = 1.month.ago.utc.beginning_of_month - last_year = 1.year.ago.utc.beginning_of_month - - project_usages.create!(project_id: 1, date: last_year) - project_usages.create!(project_id: 1, date: this_month, amount_used: 10, new_amount_used: 0) - project_usages.create!(project_id: 1, date: last_month, amount_used: 20, new_amount_used: 0) - - project_usages.create!(project_id: 2, date: last_year) - project_usages.create!(project_id: 2, date: this_month, amount_used: 30, new_amount_used: 0) - project_usages.create!(project_id: 2, date: last_month, amount_used: 40, new_amount_used: 0) - - ActiveRecord::Base.connection - .execute("ALTER TABLE ci_project_monthly_usages ENABLE TRIGGER sync_projects_amount_used_columns") - end - - describe '#up' do - it "doesnt change new_amount_used values" do - data = project_usages.all - data.each do |item| - expect { migration.up }.to not_change { item.new_amount_used } - end - end - end - - describe '#down' do - it 'updates `new_amount_used` with values from `amount_used`' do - expect(project_usages.where(new_amount_used: 0).count).to eq(6) - - migration.down - - expect(project_usages.where(new_amount_used: 0).count).to eq(2) - expect(project_usages.order(:id).pluck(:new_amount_used)) - .to contain_exactly(0, 0, 10, 20, 30, 40) - end - end -end diff --git a/spec/migrations/20221223123019_delete_queued_jobs_for_vulnerabilities_feedback_migration_spec.rb b/spec/migrations/20221223123019_delete_queued_jobs_for_vulnerabilities_feedback_migration_spec.rb deleted file mode 100644 index c5e1a25565398..0000000000000 --- a/spec/migrations/20221223123019_delete_queued_jobs_for_vulnerabilities_feedback_migration_spec.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe DeleteQueuedJobsForVulnerabilitiesFeedbackMigration, feature_category: :vulnerability_management do - let!(:migration) { described_class.new } - let(:batched_background_migrations) { table(:batched_background_migrations) } - - before do - batched_background_migrations.create!( - max_value: 10, - batch_size: 250, - sub_batch_size: 50, - interval: 300, - job_class_name: 'MigrateVulnerabilitiesFeedbackToVulnerabilitiesStateTransition', - table_name: 'vulnerability_feedback', - column_name: 'id', - job_arguments: [], - gitlab_schema: "gitlab_main" - ) - end - - describe "#up" do - it "deletes all batched migration records" do - expect(batched_background_migrations.count).to eq(1) - - migration.up - - expect(batched_background_migrations.count).to eq(0) - end - end -end diff --git a/spec/migrations/20221226153252_queue_fix_incoherent_packages_size_on_project_statistics_spec.rb b/spec/migrations/20221226153252_queue_fix_incoherent_packages_size_on_project_statistics_spec.rb deleted file mode 100644 index b375546b90eba..0000000000000 --- a/spec/migrations/20221226153252_queue_fix_incoherent_packages_size_on_project_statistics_spec.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe QueueFixIncoherentPackagesSizeOnProjectStatistics, feature_category: :package_registry do - let(:batched_migration) { described_class::MIGRATION } - - context 'with no packages' do - it 'does not schedule a new batched migration' do - reversible_migration do |migration| - migration.before -> { - expect(batched_migration).not_to have_scheduled_batched_migration - } - - migration.after -> { - expect(batched_migration).not_to have_scheduled_batched_migration - } - end - end - end - - context 'with some packages' do - before do - namespace = table(:namespaces) - .create!(name: 'project', path: 'project', type: 'Project') - project = table(:projects).create!( - name: 'project', - path: 'project', - project_namespace_id: namespace.id, - namespace_id: namespace.id - ) - table(:packages_packages) - .create!(name: 'test', version: '1.2.3', package_type: 2, project_id: project.id) - end - - it 'schedules a new batched migration' do - reversible_migration do |migration| - migration.before -> { - expect(batched_migration).not_to have_scheduled_batched_migration - } - - migration.after -> { - expect(batched_migration).to have_scheduled_batched_migration( - table_name: :project_statistics, - column_name: :id, - interval: described_class::DELAY_INTERVAL, - batch_size: described_class::BATCH_SIZE - ) - } - end - end - end -end diff --git a/spec/migrations/20230105172120_sync_new_amount_used_with_amount_used_on_ci_namespace_monthly_usages_table_spec.rb b/spec/migrations/20230105172120_sync_new_amount_used_with_amount_used_on_ci_namespace_monthly_usages_table_spec.rb deleted file mode 100644 index 70c9c1333b8b7..0000000000000 --- a/spec/migrations/20230105172120_sync_new_amount_used_with_amount_used_on_ci_namespace_monthly_usages_table_spec.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -require_migration! - -RSpec.describe SyncNewAmountUsedWithAmountUsedOnCiNamespaceMonthlyUsagesTable, migration: :gitlab_ci, - feature_category: :continuous_integration do - let(:namespace_usages) { table(:ci_namespace_monthly_usages) } - let(:migration) { described_class.new } - - before do - # Disabling the trigger temporarily to allow records being created with out-of-sync - # `new_amount_used` and `amount_used`. This will simulate existing records before - # we add the trigger. - ActiveRecord::Base.connection - .execute("ALTER TABLE ci_namespace_monthly_usages DISABLE TRIGGER sync_namespaces_amount_used_columns") - - this_month = Time.now.utc.beginning_of_month - last_month = 1.month.ago.utc.beginning_of_month - last_year = 1.year.ago.utc.beginning_of_month - - namespace_usages.create!(namespace_id: 1, date: last_year) - namespace_usages.create!(namespace_id: 1, date: this_month, amount_used: 10, new_amount_used: 0) - namespace_usages.create!(namespace_id: 1, date: last_month, amount_used: 20, new_amount_used: 0) - - namespace_usages.create!(namespace_id: 2, date: last_year) - namespace_usages.create!(namespace_id: 2, date: this_month, amount_used: 30, new_amount_used: 0) - namespace_usages.create!(namespace_id: 2, date: last_month, amount_used: 40, new_amount_used: 0) - - ActiveRecord::Base.connection - .execute("ALTER TABLE ci_namespace_monthly_usages ENABLE TRIGGER sync_namespaces_amount_used_columns") - end - - describe '#up' do - it "doesnt change new_amount_used values" do - data = namespace_usages.all - data.each do |item| - expect { migration.up }.to not_change { item.new_amount_used } - end - end - end - - describe '#down' do - it 'updates `new_amount_used` with values from `amount_used`' do - expect(namespace_usages.where(new_amount_used: 0).count).to eq(6) - - migration.down - - expect(namespace_usages.where(new_amount_used: 0).count).to eq(2) - expect(namespace_usages.order(:id).pluck(:new_amount_used)) - .to contain_exactly(0, 0, 10, 20, 30, 40) - end - end -end diff --git a/spec/migrations/20230116111252_finalize_todo_sanitization_spec.rb b/spec/migrations/20230116111252_finalize_todo_sanitization_spec.rb deleted file mode 100644 index cd7828bbae450..0000000000000 --- a/spec/migrations/20230116111252_finalize_todo_sanitization_spec.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe FinalizeTodoSanitization, :migration, feature_category: :portfolio_management do - let(:batched_migrations) { table(:batched_background_migrations) } - - let!(:migration) { described_class::MIGRATION } - - describe '#up' do - let!(:sanitize_todos_migration) do - batched_migrations.create!( - job_class_name: 'SanitizeConfidentialTodos', - table_name: :notes, - column_name: :id, - job_arguments: [], - interval: 2.minutes, - min_value: 1, - max_value: 2, - batch_size: 1000, - sub_batch_size: 200, - gitlab_schema: :gitlab_main, - status: 3 # finished - ) - end - - context 'when migration finished successfully' do - it 'does not raise exception' do - expect { migrate! }.not_to raise_error - end - end - - context 'with different migration statuses' do - using RSpec::Parameterized::TableSyntax - - where(:status, :description) do - 0 | 'paused' - 1 | 'active' - 4 | 'failed' - 5 | 'finalizing' - end - - with_them do - before do - sanitize_todos_migration.update!(status: status) - end - - it 'finalizes the migration' do - allow_next_instance_of(Gitlab::Database::BackgroundMigration::BatchedMigrationRunner) do |runner| - expect(runner).to receive(:finalize).with('SanitizeConfidentialTodos', :members, :id, []) - end - end - end - end - end -end diff --git a/spec/migrations/20230117114739_clear_duplicate_jobs_cookies_spec.rb b/spec/migrations/20230117114739_clear_duplicate_jobs_cookies_spec.rb deleted file mode 100644 index 5c572b49d3d17..0000000000000 --- a/spec/migrations/20230117114739_clear_duplicate_jobs_cookies_spec.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe ClearDuplicateJobsCookies, :migration, feature_category: :redis do - def with_redis(&block) - Gitlab::Redis::Queues.with(&block) - end - - it 'deletes duplicate jobs cookies' do - delete = ['resque:gitlab:duplicate:blabla:1:cookie:v2', 'resque:gitlab:duplicate:foobar:2:cookie:v2'] - keep = ['resque:gitlab:duplicate:something', 'something:cookie:v2'] - with_redis { |r| (delete + keep).each { |key| r.set(key, 'value') } } - - expect(with_redis { |r| r.exists(delete + keep) }).to eq(4) - - migrate! - - expect(with_redis { |r| r.exists(delete) }).to eq(0) - expect(with_redis { |r| r.exists(keep) }).to eq(2) - end -end diff --git a/spec/migrations/20230130073109_nullify_creator_id_of_orphaned_projects_spec.rb b/spec/migrations/20230130073109_nullify_creator_id_of_orphaned_projects_spec.rb deleted file mode 100644 index 196bacd99ba58..0000000000000 --- a/spec/migrations/20230130073109_nullify_creator_id_of_orphaned_projects_spec.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe NullifyCreatorIdOfOrphanedProjects, feature_category: :groups_and_projects do - let!(:migration) { described_class::MIGRATION } - - describe '#up' do - it 'schedules background migration' do - migrate! - - expect(migration).to have_scheduled_batched_migration( - table_name: :projects, - column_name: :id, - interval: described_class::INTERVAL, - batch_size: described_class::BATCH_SIZE, - max_batch_size: described_class::MAX_BATCH_SIZE, - sub_batch_size: described_class::SUB_BATCH_SIZE - ) - end - end - - describe '#down' do - it 'removes scheduled background migrations' do - migrate! - schema_migrate_down! - - expect(migration).not_to have_scheduled_batched_migration - end - end -end diff --git a/spec/migrations/20230131125844_add_project_id_name_id_version_index_to_installable_npm_packages_spec.rb b/spec/migrations/20230131125844_add_project_id_name_id_version_index_to_installable_npm_packages_spec.rb deleted file mode 100644 index 5d8c7ab4745a8..0000000000000 --- a/spec/migrations/20230131125844_add_project_id_name_id_version_index_to_installable_npm_packages_spec.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe AddProjectIdNameIdVersionIndexToInstallableNpmPackages, feature_category: :package_registry do - it 'schedules an index creation' do - reversible_migration do |migration| - migration.before -> { - expect(ActiveRecord::Base.connection.indexes('packages_packages').map(&:name)) - .not_to include('idx_packages_on_project_id_name_id_version_when_installable_npm') - } - - migration.after -> { - expect(ActiveRecord::Base.connection.indexes('packages_packages').map(&:name)) - .to include('idx_packages_on_project_id_name_id_version_when_installable_npm') - } - end - end -end diff --git a/spec/migrations/20230201171450_finalize_backfill_environment_tier_migration_spec.rb b/spec/migrations/20230201171450_finalize_backfill_environment_tier_migration_spec.rb deleted file mode 100644 index e7a78f11f1630..0000000000000 --- a/spec/migrations/20230201171450_finalize_backfill_environment_tier_migration_spec.rb +++ /dev/null @@ -1,76 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe FinalizeBackfillEnvironmentTierMigration, :migration, feature_category: :continuous_delivery do - let(:batched_migrations) { table(:batched_background_migrations) } - - let!(:migration) { described_class::MIGRATION } - - describe '#up' do - shared_examples 'finalizes the migration' do - it 'finalizes the migration' do - allow_next_instance_of(Gitlab::Database::BackgroundMigration::BatchedMigrationRunner) do |runner| - expect(runner).to receive(:finalize).with('BackfillEnvironmentTiers', :environments, :id, []) - end - end - end - - context 'when migration is missing' do - before do - batched_migrations.where(job_class_name: migration).delete_all - end - - it 'warns migration not found' do - expect(Gitlab::AppLogger) - .to receive(:warn).with(/Could not find batched background migration for the given configuration:/) - - migrate! - end - end - - context 'with migration present' do - let!(:group_member_namespace_id_backfill) do - batched_migrations.create!( - job_class_name: migration, - table_name: :environments, - column_name: :id, - job_arguments: [], - interval: 2.minutes, - min_value: 1, - max_value: 2, - batch_size: 1000, - sub_batch_size: 200, - gitlab_schema: :gitlab_main, - status: 3 # finished - ) - end - - context 'when migration finished successfully' do - it 'does not raise exception' do - expect { migrate! }.not_to raise_error - end - end - - context 'with different migration statuses' do - using RSpec::Parameterized::TableSyntax - - where(:status, :description) do - 0 | 'paused' - 1 | 'active' - 4 | 'failed' - 5 | 'finalizing' - end - - with_them do - before do - group_member_namespace_id_backfill.update!(status: status) - end - - it_behaves_like 'finalizes the migration' - end - end - end - end -end diff --git a/spec/migrations/20230202131928_encrypt_ci_trigger_token_spec.rb b/spec/migrations/20230202131928_encrypt_ci_trigger_token_spec.rb deleted file mode 100644 index 597cd7c1581ce..0000000000000 --- a/spec/migrations/20230202131928_encrypt_ci_trigger_token_spec.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe EncryptCiTriggerToken, migration: :gitlab_ci, feature_category: :continuous_integration do - let(:batched_migrations) { table(:batched_background_migrations) } - - let!(:migration) { described_class::MIGRATION } - - describe '#up' do - context 'with migration present' do - let!(:ci_trigger_token_encryption_migration) do - batched_migrations.create!( - job_class_name: 'EncryptCiTriggerToken', - table_name: :ci_triggers, - column_name: :token, - job_arguments: [], - interval: 2.minutes, - min_value: 1, - max_value: 2, - batch_size: 1000, - sub_batch_size: 100, - gitlab_schema: :gitlab_ci, - status: 3 # finished - ) - end - - context 'when migration finished successfully' do - it 'does not raise exception' do - expect { migrate! }.not_to raise_error - end - - it 'schedules background jobs for each batch of ci_triggers' do - migrate! - - expect(migration).to have_scheduled_batched_migration( - gitlab_schema: :gitlab_ci, - table_name: :ci_triggers, - column_name: :token, - batch_size: described_class::BATCH_SIZE, - sub_batch_size: described_class::SUB_BATCH_SIZE - ) - end - end - end - end - - describe '#down' do - it 'deletes all batched migration records' do - migrate! - schema_migrate_down! - - expect(migration).not_to have_scheduled_batched_migration - end - end -end diff --git a/spec/migrations/20230203122602_schedule_vulnerabilities_feedback_migration4_spec.rb b/spec/migrations/20230203122602_schedule_vulnerabilities_feedback_migration4_spec.rb deleted file mode 100644 index 26c63e6deb2e1..0000000000000 --- a/spec/migrations/20230203122602_schedule_vulnerabilities_feedback_migration4_spec.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe ScheduleVulnerabilitiesFeedbackMigration4, feature_category: :vulnerability_management do - let(:migration) { described_class::MIGRATION } - - describe '#up' do - it 'schedules background jobs for each batch of Vulnerabilities::Feedback' do - migrate! - - expect(migration).to have_scheduled_batched_migration( - table_name: :vulnerability_feedback, - column_name: :id, - interval: described_class::JOB_INTERVAL, - batch_size: described_class::BATCH_SIZE, - sub_batch_size: described_class::SUB_BATCH_SIZE - ) - end - end - - describe '#down' do - it 'deletes all batched migration records' do - migrate! - schema_migrate_down! - - expect(migration).not_to have_scheduled_batched_migration - end - end -end diff --git a/spec/migrations/add_namespaces_emails_enabled_column_data_spec.rb b/spec/migrations/add_namespaces_emails_enabled_column_data_spec.rb deleted file mode 100644 index c63724497c2dd..0000000000000 --- a/spec/migrations/add_namespaces_emails_enabled_column_data_spec.rb +++ /dev/null @@ -1,63 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe AddNamespacesEmailsEnabledColumnData, :migration, feature_category: :database do - let(:migration) { described_class::MIGRATION } - let(:projects) { table(:projects) } - let(:namespace_settings_table) { table(:namespace_settings) } - let(:namespaces) { table(:namespaces) } - - before do - stub_const("#{described_class.name}::SUB_BATCH_SIZE", 2) - end - - it 'schedules background migrations', :aggregate_failures do - migrate! - - expect(migration).to have_scheduled_batched_migration( - table_name: :namespaces, - column_name: :id, - interval: described_class::DELAY_INTERVAL - ) - end - - describe '#down' do - it 'deletes all batched migration records' do - migrate! - schema_migrate_down! - - expect(migration).not_to have_scheduled_batched_migration - end - end - - it 'sets emails_enabled to be the opposite of emails_disabled', type: :task do - Rake.application.rake_require 'active_record/railties/databases' - Rake.application.rake_require 'tasks/gitlab/db' - - disabled_records_to_migrate = 6 - enabled_records_to_migrate = 4 - - disabled_records_to_migrate.times do |i| - namespace = namespaces.create!(name: 'namespace', - path: "namespace#{i}", - emails_disabled: true) - namespace_settings_table.create!(namespace_id: namespace.id) - end - - enabled_records_to_migrate.times do |i| - namespace = namespaces.create!(name: 'namespace', - path: "namespace#{i}", - emails_disabled: false) - namespace_settings_table.create!(namespace_id: namespace.id) - end - - migrate! - run_rake_task('gitlab:db:execute_batched_migrations') - # rubocop: disable CodeReuse/ActiveRecord - expect(namespace_settings_table.where(emails_enabled: true).count).to eq(enabled_records_to_migrate) - expect(namespace_settings_table.where(emails_enabled: false).count).to eq(disabled_records_to_migrate) - # rubocop: enable CodeReuse/ActiveRecord - end -end diff --git a/spec/migrations/add_okr_hierarchy_restrictions_spec.rb b/spec/migrations/add_okr_hierarchy_restrictions_spec.rb deleted file mode 100644 index ace581c7e3c05..0000000000000 --- a/spec/migrations/add_okr_hierarchy_restrictions_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe AddOkrHierarchyRestrictions, :migration, feature_category: :portfolio_management do - include MigrationHelpers::WorkItemTypesHelper - - let!(:restrictions) { table(:work_item_hierarchy_restrictions) } - let!(:work_item_types) { table(:work_item_types) } - - it 'creates default restrictions' do - restrictions.delete_all - - reversible_migration do |migration| - migration.before -> { - expect(restrictions.count).to eq(0) - } - - migration.after -> { - expect(restrictions.count).to eq(4) - } - end - end - - context 'when work items are missing' do - before do - work_item_types.delete_all - end - - it 'does nothing' do - expect { migrate! }.not_to change { restrictions.count } - end - end -end diff --git a/spec/migrations/add_projects_emails_enabled_column_data_spec.rb b/spec/migrations/add_projects_emails_enabled_column_data_spec.rb deleted file mode 100644 index d10fa78f84649..0000000000000 --- a/spec/migrations/add_projects_emails_enabled_column_data_spec.rb +++ /dev/null @@ -1,69 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe AddProjectsEmailsEnabledColumnData, :migration, feature_category: :database do - let(:migration) { described_class::MIGRATION } - let(:project_settings) { table(:project_settings) } - let(:projects) { table(:projects) } - let(:namespaces) { table(:namespaces) } - - before do - stub_const("#{described_class.name}::SUB_BATCH_SIZE", 2) - end - - it 'schedules background migrations', :aggregate_failures do - migrate! - - expect(migration).to have_scheduled_batched_migration( - table_name: :projects, - column_name: :id, - interval: described_class::DELAY_INTERVAL - ) - end - - describe '#down' do - it 'deletes all batched migration records' do - migrate! - schema_migrate_down! - - expect(migration).not_to have_scheduled_batched_migration - end - end - - it 'sets emails_enabled to be the opposite of emails_disabled', type: :task do - Rake.application.rake_require 'active_record/railties/databases' - Rake.application.rake_require 'tasks/gitlab/db' - - disabled_records_to_migrate = 4 - enabled_records_to_migrate = 2 - - disabled_records_to_migrate.times do |i| - namespace = namespaces.create!(name: 'namespace', path: "namespace#{i}") - project = projects.create!(name: "Project Disabled #{i}", - path: "projectDisabled#{i}", - namespace_id: namespace.id, - project_namespace_id: namespace.id, - emails_disabled: true) - project_settings.create!(project_id: project.id) - end - - enabled_records_to_migrate.times do |i| - namespace = namespaces.create!(name: 'namespace', path: "namespace#{i}") - project = projects.create!(name: "Project Enabled #{i}", - path: "projectEnabled#{i}", - namespace_id: namespace.id, - project_namespace_id: namespace.id, - emails_disabled: false) - project_settings.create!(project_id: project.id) - end - - migrate! - run_rake_task('gitlab:db:execute_batched_migrations') - # rubocop: disable CodeReuse/ActiveRecord - expect(project_settings.where(emails_enabled: true).count).to eq(enabled_records_to_migrate) - expect(project_settings.where(emails_enabled: false).count).to eq(disabled_records_to_migrate) - # rubocop: enable CodeReuse/ActiveRecord - end -end diff --git a/spec/migrations/finalize_issues_namespace_id_backfilling_spec.rb b/spec/migrations/finalize_issues_namespace_id_backfilling_spec.rb deleted file mode 100644 index 0800a049767c6..0000000000000 --- a/spec/migrations/finalize_issues_namespace_id_backfilling_spec.rb +++ /dev/null @@ -1,76 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe FinalizeIssuesNamespaceIdBackfilling, :migration, feature_category: :team_planning do - let(:batched_migrations) { table(:batched_background_migrations) } - - let!(:migration) { described_class::MIGRATION } - - describe '#up' do - shared_examples 'finalizes the migration' do - it 'finalizes the migration' do - allow_next_instance_of(Gitlab::Database::BackgroundMigration::BatchedMigrationRunner) do |runner| - expect(runner).to receive(:finalize).with(migration, :projects, :id, []) - end - end - end - - context 'when routes backfilling migration is missing' do - before do - batched_migrations.where(job_class_name: migration).delete_all - end - - it 'warns migration not found' do - expect(Gitlab::AppLogger) - .to receive(:warn).with(/Could not find batched background migration for the given configuration:/) - - migrate! - end - end - - context 'with backfilling migration present' do - let!(:project_namespace_backfill) do - batched_migrations.create!( - job_class_name: migration, - table_name: :routes, - column_name: :id, - job_arguments: [], - interval: 2.minutes, - min_value: 1, - max_value: 2, - batch_size: 1000, - sub_batch_size: 200, - gitlab_schema: :gitlab_main, - status: 3 # finished - ) - end - - context 'when backfilling migration finished successfully' do - it 'does not raise exception' do - expect { migrate! }.not_to raise_error - end - end - - context 'with different backfilling migration statuses' do - using RSpec::Parameterized::TableSyntax - - where(:status, :description) do - 0 | 'paused' - 1 | 'active' - 4 | 'failed' - 5 | 'finalizing' - end - - with_them do - before do - project_namespace_backfill.update!(status: status) - end - - it_behaves_like 'finalizes the migration' - end - end - end - end -end diff --git a/spec/migrations/nullify_last_error_from_project_mirror_data_spec.rb b/spec/migrations/nullify_last_error_from_project_mirror_data_spec.rb deleted file mode 100644 index 6c5679b674e9a..0000000000000 --- a/spec/migrations/nullify_last_error_from_project_mirror_data_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -require_migration! - -RSpec.describe NullifyLastErrorFromProjectMirrorData, feature_category: :source_code_management do - let(:migration) { described_class::MIGRATION } - - before do - migrate! - end - - describe '#up' do - it 'schedules background jobs for each batch of projects' do - expect(migration).to( - have_scheduled_batched_migration( - table_name: :project_mirror_data, - column_name: :id, - interval: described_class::INTERVAL, - batch_size: described_class::BATCH_SIZE, - sub_batch_size: described_class::SUB_BATCH_SIZE - ) - ) - end - end - - describe '#down' do - before do - schema_migrate_down! - end - - it 'deletes all batched migration records' do - expect(migration).not_to have_scheduled_batched_migration - end - end -end diff --git a/spec/migrations/recount_epic_cache_counts_v3_spec.rb b/spec/migrations/recount_epic_cache_counts_v3_spec.rb deleted file mode 100644 index 24b89ab30cad2..0000000000000 --- a/spec/migrations/recount_epic_cache_counts_v3_spec.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe RecountEpicCacheCountsV3, :migration, feature_category: :portfolio_management do - let(:migration) { described_class::MIGRATION } - - describe '#up' do - it 'schedules a batched background migration' do - migrate! - - expect(migration).to have_scheduled_batched_migration( - table_name: :epics, - column_name: :id, - interval: described_class::DELAY_INTERVAL, - batch_size: described_class::BATCH_SIZE, - max_batch_size: described_class::MAX_BATCH_SIZE, - sub_batch_size: described_class::SUB_BATCH_SIZE - ) - end - end - - describe '#down' do - it 'deletes all batched migration records' do - migrate! - schema_migrate_down! - - expect(migration).not_to have_scheduled_batched_migration - end - end -end diff --git a/spec/migrations/remove_flowdock_integration_records_spec.rb b/spec/migrations/remove_flowdock_integration_records_spec.rb deleted file mode 100644 index 3f57515d18bcc..0000000000000 --- a/spec/migrations/remove_flowdock_integration_records_spec.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require Rails.root.join('db/post_migrate/20221129124240_remove_flowdock_integration_records.rb') - -RSpec.describe RemoveFlowdockIntegrationRecords, feature_category: :integrations do - let(:integrations) { table(:integrations) } - - before do - integrations.create!(type_new: 'Integrations::Flowdock') - integrations.create!(type_new: 'SomeOtherType') - end - - it 'removes integrations records of type_new Integrations::Flowdock' do - expect(integrations.count).to eq(2) - - migrate! - - expect(integrations.count).to eq(1) - expect(integrations.first.type_new).to eq('SomeOtherType') - expect(integrations.where(type_new: 'Integrations::Flowdock')).to be_empty - end -end diff --git a/spec/migrations/schedule_fixing_security_scan_statuses_spec.rb b/spec/migrations/schedule_fixing_security_scan_statuses_spec.rb deleted file mode 100644 index f43f58d3be222..0000000000000 --- a/spec/migrations/schedule_fixing_security_scan_statuses_spec.rb +++ /dev/null @@ -1,78 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe ScheduleFixingSecurityScanStatuses, - :suppress_gitlab_schemas_validate_connection, :suppress_partitioning_routing_analyzer, - feature_category: :vulnerability_management do - let!(:namespaces) { table(:namespaces) } - let!(:projects) { table(:projects) } - let!(:pipelines) { table(:ci_pipelines, database: :ci) } - let!(:builds) { table(:ci_builds, database: :ci) { |model| model.primary_key = :id } } - let!(:security_scans) { table(:security_scans) } - - let!(:namespace) { namespaces.create!(name: "foo", path: "bar") } - let!(:project) { projects.create!(namespace_id: namespace.id, project_namespace_id: namespace.id) } - let!(:pipeline) do - pipelines.create!(project_id: project.id, ref: 'master', sha: 'adf43c3a', status: 'success', partition_id: 100) - end - - let!(:ci_build) { builds.create!(commit_id: pipeline.id, retried: false, type: 'Ci::Build', partition_id: 100) } - - let!(:security_scan_1) { security_scans.create!(build_id: ci_build.id, scan_type: 1, created_at: 91.days.ago) } - let!(:security_scan_2) { security_scans.create!(build_id: ci_build.id, scan_type: 2) } - - let(:com?) { false } - let(:dev_or_test_env?) { false } - let(:migration) { described_class::MIGRATION } - - before do - allow(::Gitlab).to receive(:com?).and_return(com?) - allow(::Gitlab).to receive(:dev_or_test_env?).and_return(dev_or_test_env?) - - migrate! - end - - describe '#up' do - shared_examples_for 'scheduler for fixing the security scans status' do - it 'schedules background job' do - expect(migration).to have_scheduled_batched_migration( - table_name: :security_scans, - column_name: :id, - interval: 2.minutes, - batch_size: 10_000, - max_batch_size: 50_000, - sub_batch_size: 100, - batch_min_value: security_scan_2.id - ) - end - end - - context 'when the migration does not run on GitLab.com or development environment' do - it 'does not schedule the migration' do - expect('FixSecurityScanStatuses').not_to have_scheduled_batched_migration - end - end - - context 'when the migration runs on GitLab.com' do - let(:com?) { true } - - it_behaves_like 'scheduler for fixing the security scans status' - end - - context 'when the migration runs on dev environment' do - let(:dev_or_test_env?) { true } - - it_behaves_like 'scheduler for fixing the security scans status' - end - end - - describe '#down' do - it 'deletes all batched migration records' do - schema_migrate_down! - - expect(migration).not_to have_scheduled_batched_migration - end - end -end diff --git a/spec/migrations/second_recount_epic_cache_counts_spec.rb b/spec/migrations/second_recount_epic_cache_counts_spec.rb deleted file mode 100644 index ab4357264be62..0000000000000 --- a/spec/migrations/second_recount_epic_cache_counts_spec.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe SecondRecountEpicCacheCounts, :migration, feature_category: :portfolio_management do - let(:migration) { described_class::MIGRATION } - - describe '#up' do - it 'schedules a batched background migration' do - migrate! - - expect(migration).to have_scheduled_batched_migration( - table_name: :epics, - column_name: :id, - interval: described_class::DELAY_INTERVAL, - batch_size: described_class::BATCH_SIZE, - max_batch_size: described_class::MAX_BATCH_SIZE, - sub_batch_size: described_class::SUB_BATCH_SIZE - ) - end - end - - describe '#down' do - it 'deletes all batched migration records' do - migrate! - schema_migrate_down! - - expect(migration).not_to have_scheduled_batched_migration - end - end -end diff --git a/spec/migrations/set_email_confirmation_setting_before_removing_send_user_confirmation_email_column_spec.rb b/spec/migrations/set_email_confirmation_setting_before_removing_send_user_confirmation_email_column_spec.rb deleted file mode 100644 index 02ecbe90ee0b8..0000000000000 --- a/spec/migrations/set_email_confirmation_setting_before_removing_send_user_confirmation_email_column_spec.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe SetEmailConfirmationSettingBeforeRemovingSendUserConfirmationEmailColumn, - feature_category: :user_profile do - let(:migration) { described_class.new } - let(:application_settings_table) { table(:application_settings) } - - describe '#up' do - context "when 'send_user_confirmation_email' is set to 'true'" do - it "updates 'email_confirmation_setting' to '2' (hard)" do - application_settings_table.create!(send_user_confirmation_email: true, email_confirmation_setting: 0) - - migration.up - - expect(application_settings_table.last.email_confirmation_setting).to eq 2 - end - end - - context "when 'send_user_confirmation_email' is set to 'false'" do - it "updates 'email_confirmation_setting' to '0' (off)" do - application_settings_table.create!(send_user_confirmation_email: false, email_confirmation_setting: 0) - - migration.up - - expect(application_settings_table.last.email_confirmation_setting).to eq 0 - end - end - end - - describe '#down' do - it "updates 'email_confirmation_setting' to default value: '0' (off)" do - application_settings_table.create!(send_user_confirmation_email: true, email_confirmation_setting: 2) - - migration.down - - expect(application_settings_table.last.email_confirmation_setting).to eq 0 - end - end -end diff --git a/spec/support/rspec_order_todo.yml b/spec/support/rspec_order_todo.yml index 3a0e563f7f87b..1d63521c41298 100644 --- a/spec/support/rspec_order_todo.yml +++ b/spec/support/rspec_order_todo.yml @@ -5315,7 +5315,6 @@ - './spec/lib/gitlab/auth/unique_ips_limiter_spec.rb' - './spec/lib/gitlab/auth/user_access_denied_reason_spec.rb' - './spec/lib/gitlab/avatar_cache_spec.rb' -- './spec/lib/gitlab/background_migration/backfill_imported_issue_search_data_spec.rb' - './spec/lib/gitlab/background_migration/backfill_integrations_enable_ssl_verification_spec.rb' - './spec/lib/gitlab/background_migration/backfill_namespace_id_of_vulnerability_reads_spec.rb' - './spec/lib/gitlab/background_migration/backfill_note_discussion_id_spec.rb' @@ -5325,7 +5324,6 @@ - './spec/lib/gitlab/background_migration/backfill_snippet_repositories_spec.rb' - './spec/lib/gitlab/background_migration/backfill_topics_title_spec.rb' - './spec/lib/gitlab/background_migration/backfill_vulnerability_reads_cluster_agent_spec.rb' -- './spec/lib/gitlab/background_migration/backfill_work_item_type_id_for_issues_spec.rb' - './spec/lib/gitlab/background_migration/base_job_spec.rb' - './spec/lib/gitlab/background_migration/batched_migration_job_spec.rb' - './spec/lib/gitlab/background_migration/batching_strategies/backfill_project_statistics_with_container_registry_size_batching_strategy_spec.rb' @@ -5336,9 +5334,7 @@ - './spec/lib/gitlab/background_migration/copy_column_using_background_migration_job_spec.rb' - './spec/lib/gitlab/background_migration/disable_legacy_open_source_licence_for_recent_public_projects_spec.rb' - './spec/lib/gitlab/background_migration/disable_legacy_open_source_license_for_inactive_public_projects_spec.rb' -- './spec/lib/gitlab/background_migration/disable_legacy_open_source_license_for_no_issues_no_repo_projects_spec.rb' - './spec/lib/gitlab/background_migration/disable_legacy_open_source_license_for_one_member_no_repo_projects_spec.rb' -- './spec/lib/gitlab/background_migration/expire_o_auth_tokens_spec.rb' - './spec/lib/gitlab/background_migration/job_coordinator_spec.rb' - './spec/lib/gitlab/background_migration/legacy_upload_mover_spec.rb' - './spec/lib/gitlab/background_migration/legacy_uploads_migrator_spec.rb' -- GitLab