From 3c6c9864572fb487f318e4c665f0a89799c49127 Mon Sep 17 00:00:00 2001 From: Leonardo da Rosa <ldarosa@gitlab.com> Date: Mon, 11 Dec 2023 10:01:28 +0000 Subject: [PATCH] Removes database migrations up to 15-6-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 | 27 - .../layout/empty_line_after_magic_comment.yml | 6 - ...e_end_string_concatenation_indentation.yml | 1 - .rubocop_todo/layout/trailing_whitespace.yml | 2 - .../lint/assignment_in_condition.yml | 1 - .../lint/redundant_cop_disable_directive.yml | 2 - .rubocop_todo/rspec/expect_change.yml | 5 - .rubocop_todo/rspec/feature_category.yml | 3 - .rubocop_todo/rspec/named_subject.yml | 2 - .../style/inline_disable_annotation.yml | 23 - db/init_structure.sql | 1128 ++++++++++++++--- ...add_scan_file_path_to_dast_site_profile.rb | 14 - ...ests_forwarding_to_application_settings.rb | 13 - ..._preview_in_email_to_namespace_settings.rb | 9 - ..._add_namespace_id_to_protected_branches.rb | 9 - ...dexes_foreign_key_to_protected_branches.rb | 19 - ...roject_constraint_in_protected_branches.rb | 18 - ...e_project_id_null_in_protected_branches.rb | 13 - ..._preference_to_turn_off_automatic_lists.rb | 13 - ...low_enforcement_to_application_settings.rb | 10 - ...sue_branch_template_to_project_settings.rb | 17 - ...0726171440_create_ghost_user_migrations.rb | 12 - ...50_add_user_fk_to_ghost_user_migrations.rb | 15 - ...2200719_add_user_details_profile_fields.rb | 17 - ...802202505_add_user_details_field_limits.rb | 25 - ...add_auto_ban_user_to_namespace_settings.rb | 10 - ...d_auto_ban_user_to_application_settings.rb | 8 - ...e_index_on_sbom_component_type_and_name.rb | 15 - ...nt_versions_on_component_id_and_version.rb | 15 - ..._sbom_sources_on_source_type_and_source.rb | 15 - ...5152905_create_vulnerability_advisories.rb | 25 - ...eate_sbom_vulnerable_component_versions.rb | 18 - ...ff_preview_in_email_to_project_settings.rb | 9 - ...dd_max_pages_custom_domains_per_project.rb | 20 - ...racking_columns_to_application_settings.rb | 15 - ...mns_to_application_settings_text_limits.rb | 19 - ...132108_add_deleted_on_to_ml_experiments.rb | 7 - ...bom_occurrences_on_ingestion_attributes.rb | 22 - ...y_to_sbom_vulnerable_component_versions.rb | 19 - ...y_to_sbom_vulnerable_component_versions.rb | 19 - ...dashboard_limit_to_application_settings.rb | 11 - ...1_add_namespace_id_to_broadcast_message.rb | 9 - ...ex_and_foreign_key_to_broadcast_message.rb | 17 - ...s_sync_triggers_to_traversal_ids_update.rb | 35 - ...ting_work_item_type_backfill_migrations.rb | 22 - ...dd_cube_api_key_to_application_settings.rb | 11 - ..._null_constraint_for_confidence_columns.rb | 15 - ...11_add_rpm_max_file_size_to_plan_limits.rb | 9 - ...0828131848_create_packages_rpm_metadata.rb | 30 - ...eplace_index_on_credit_card_validations.rb | 20 - ...928_add_text_limit_to_cube_api_base_url.rb | 13 - ...0114228_create_dora_configuration_table.rb | 16 - .../20220831182105_add_constraints_view.rb | 32 - ...901035722_add_temp_project_member_index.rb | 16 - ...an_create_group_to_application_settings.rb | 7 - ...te_can_create_group_application_setting.rb | 26 - ...allow_merge_if_all_status_checks_passed.rb | 7 - ...4637_add_last_downloaded_at_to_packages.rb | 7 - ...ts_project_name_lower_pattern_ops_index.rb | 15 - ...27_add_merge_request_id_to_environments.rb | 7 - .../20220902065314_create_ci_partitions.rb | 9 - ...2065316_create_default_partition_record.rb | 21 - ...902065317_add_partition_id_to_ci_builds.rb | 11 - ..._add_partition_id_to_ci_builds_metadata.rb | 9 - ...11_add_partition_id_to_ci_job_artifacts.rb | 9 - ...065623_add_partition_id_to_ci_pipelines.rb | 9 - ...902065635_add_partition_id_to_ci_stages.rb | 9 - ...d_partition_id_to_ci_pipeline_variables.rb | 9 - ...1_index_evironments_on_merge_request_id.rb | 15 - ...traint_to_environments_merge_request_id.rb | 13 - ...umn_branch_filter_strategy_to_web_hooks.rb | 7 - ...nd_end_time_and_status_to_ml_candidates.rb | 9 - ...832_add_locked_to_ci_pipeline_artifacts.rb | 20 - ...y_orchestration_policy_configuration_id.rb | 58 - ...907124320_add_internal_to_notes_renamed.rb | 11 - ...ason_to_vulnerability_state_transitions.rb | 7 - ...r_limt_notified_at_to_namespace_details.rb | 20 - ...ject_name_lower_pattern_ops_state_index.rb | 15 - ...839_create_packages_rpm_repository_file.rb | 25 - ...180807_add_epoch_column_to_rpm_metadata.rb | 7 - ...28_create_user_phone_number_validations.rb | 29 - ...ex_cadence_create_iterations_automation.rb | 21 - ...4_finalize_invalid_group_member_cleanup.rb | 19 - ...cadences_last_run_date_to_next_run_date.rb | 13 - ...3_add_timestamp_to_ml_candidate_metrics.rb | 7 - ...change_namespace_id_not_null_in_members.rb | 13 - ...espace_foreign_key_on_delete_constraint.rb | 30 - ...finalize_invalid_project_member_cleanup.rb | 19 - ...date_id_and_name_on_ml_candidate_params.rb | 15 - ...dd_reject_non_dco_commits_to_push_rules.rb | 7 - ...0220914130800_add_jitsu_key_to_projects.rb | 20 - ...49_add_text_limit_to_projects_jitsu_key.rb | 13 - ...constraint_from_sbom_source_fingerprint.rb | 9 - ...140802_create_merge_request_predictions.rb | 20 - ...1_add_source_id_to_bulk_import_entities.rb | 7 - ...jira_connect_installations_instance_url.rb | 15 - ...d_reviewers_enabled_to_project_settings.rb | 9 - ...d_mirror_branch_regex_to_remote_mirrors.rb | 15 - ...roject_id_and_lower_version_to_packages.rb | 21 - ...ve_temp_index_null_project_namespace_id.rb | 15 - ...5632_add_jira_connect_proxy_url_setting.rb | 10 - ...limit_to_jira_connect_proxy_url_setting.rb | 13 - ...0220921174815_add_secure_files_metadata.rb | 8 - ...orwarding_to_namespace_package_settings.rb | 28 - ...nbound_ci_job_token_project_scope_links.rb | 13 - ...23103006_add_ci_pipeline_metadata_title.rb | 27 - ...mirror_branch_regex_to_project_settings.rb | 12 - ...ob_token_scope_enabled_to_ci_cd_setting.rb | 13 - ...0_create_project_wiki_repository_states.rb | 44 - ...orwarding_to_namespace_package_settings.rb | 28 - ...orwarding_to_namespace_package_settings.rb | 28 - ...te_transition_to_vulnerability_feedback.rb | 7 - ...dit_events_streaming_event_type_filters.rb | 18 - ...incident_management_timeline_event_tags.rb | 19 - ...ent_management_timeline_event_tag_links.rb | 33 - ..._on_scan_finding_approval_project_rules.rb | 22 - ..._limit_notified_at_to_namespace_details.rb | 20 - ...add_targets_to_elastic_reindexing_tasks.rb | 7 - ...32350_add_password_expiration_migration.rb | 12 - ...mr_checks_columns_to_namespace_settings.rb | 10 - ...alytics_enabled_to_application_settings.rb | 7 - ...ance_framework_id_to_namespace_settings.rb | 7 - ...mount_used_to_ci_project_monthly_usages.rb | 24 - ...201815_add_purl_type_to_sbom_components.rb | 7 - ..._index_on_sbom_components_type_and_name.rb | 15 - ...sbom_components_type_name_and_purl_type.rb | 15 - ...nt_settings_on_project_id_and_sla_timer.rb | 17 - ..._use_legacy_web_ide_to_user_preferences.rb | 9 - ...assword_last_changed_at_to_user_details.rb | 9 - ...n_file_path_limit_for_dast_site_profile.rb | 13 - ...13103738_add_disable_admin_oauth_scopes.rb | 7 - ...ere_releases_access_level_gt_repository.rb | 19 - ...e_releases_access_level_from_repository.rb | 21 - ...014190040_drop_notes_note_trigram_index.rb | 17 - ...rmation_setting_to_application_settings.rb | 7 - ...84208_rename_ci_pipeline_metadata_title.rb | 13 - ...ective_and_keyresult_to_work_item_types.rb | 53 - ...member_namespace_id_not_null_constraint.rb | 15 - ..._index_to_packages_rpm_repository_files.rb | 18 - ..._consume_after_to_ghost_user_migrations.rb | 7 - ...me_after_index_to_ghost_user_migrations.rb | 15 - ...524_create_dependency_proxy_blob_states.rb | 49 - ...te_started_at_to_container_repositories.rb | 11 - ...21213216_create_namespace_commit_emails.rb | 14 - ...dd_namespace_commit_emails_namespace_fk.rb | 15 - ...21_add_namespace_commit_emails_email_fk.rb | 15 - ...assword_last_changed_at_to_user_details.rb | 13 - ..._and_id_index_to_container_repositories.rb | 15 - ...hange_vulnerability_feedback_unique_idx.rb | 25 - ...ding_uuid_and_feedback_type_on_feedback.rb | 15 - ...to_project_settings_mirror_branch_regex.rb | 13 - ...mmit_committer_name_check_to_push_rules.rb | 7 - ...inding_data_column_to_security_findings.rb | 13 - ...02916_add_users_foreign_key_to_projects.rb | 15 - ...ferred_language_to_application_settings.rb | 10 - ...ferred_language_on_application_settings.rb | 15 - ...ange_email_confirmation_setting_default.rb | 7 - ...om_send_user_confirmation_email_setting.rb | 22 - ...0221102202130_extend_x509_subject_limit.rb | 11 - ...hanged_at_index_to_gitlab_subscriptions.rb | 15 - ..._index_on_primary_key_of_security_scans.rb | 15 - ...wnload_button_into_application_settings.rb | 8 - ...42_remove_users_foreign_key_to_projects.rb | 15 - ...ange_scim_identity_group_id_remove_null.rb | 10 - ...oauth_access_token_group_id_remove_null.rb | 10 - ...183222_create_project_wiki_repositories.rb | 11 - ...unt_used_to_ci_namespace_monthly_usages.rb | 24 - ...13_add_telesign_to_application_settings.rb | 11 - ...ry_id_to_project_wiki_repository_states.rb | 35 - ..._for_in_product_marketing_email_metrics.rb | 15 - ...ct_id_lower_name_index_remove_old_index.rb | 26 - ...schedule_remove_self_managed_wiki_notes.rb | 35 - ...mp_index_job_artifacts_id_and_expire_at.rb | 29 - ...9_fix_incorrect_job_artifacts_expire_at.rb | 31 - ...fill_cluster_agents_has_vulnerabilities.rb | 30 - ...bilities_project_id_id_active_cis_index.rb | 24 - ...6145113_backfill_namespace_id_on_issues.rb | 28 - ...tmp_idx_merge_requests_draft_and_status.rb | 18 - ...ex_group_membership_namespace_id_column.rb | 17 - ...urce_licence_for_recent_public_projects.rb | 33 - ..._schedule_destroy_invalid_group_members.rb | 22 - ...te_metadata_temp_index_on_id_where_task.rb | 15 - ...k_system_note_wording_to_checklist_item.rb | 28 - ..._web_hooks_service_id_to_integration_id.rb | 13 - ...uid_and_id_index_from_security_findings.rb | 15 - ...date_start_date_for_iterations_cadences.rb | 53 - ...igrated_index_on_container_repositories.rb | 25 - ...909_remove_other_role_from_user_details.rb | 9 - ..._drop_build_coverage_regex_from_project.rb | 13 - ...22094804_add_issues_authorization_index.rb | 15 - ...oval_partial_trigram_indexes_for_issues.rb | 16 - ..._tmp_index_approval_merge_request_rules.rb | 19 - ...ndex_todos_attention_request_action_idx.rb | 18 - ...2324_replace_issues_authorization_index.rb | 18 - ...26165048_drop_temporary_job_trace_index.rb | 13 - ..._fully_remove_temporary_job_trace_index.rb | 15 - ...rary_index_for_orphaned_invited_members.rb | 21 - ...061704_orphaned_invited_members_cleanup.rb | 29 - ...rary_index_for_orphaned_invited_members.rb | 21 - ...hedule_issue_work_item_type_id_backfill.rb | 40 - ...021358_add_index_on_issue_health_status.rb | 16 - ...0831090454_cleanup_web_hooks_service_id.rb | 13 - ...delete_approval_rules_for_vulnerability.rb | 42 - ...chedule_destroy_invalid_project_members.rb | 20 - ...outs_on_attention_request_feature_names.rb | 18 - ...cleanup_attention_request_user_callouts.rb | 18 - ...move_partial_trigram_indexes_for_issues.rb | 25 - ...d_not_null_to_board_group_recent_visits.rb | 17 - ...not_null_to_board_project_recent_visits.rb | 17 - ..._records_from_board_group_recent_visits.rb | 15 - ...ecords_from_board_project_recent_visits.rb | 15 - ...ble_to_gitlab_partitions_dynamic_schema.rb | 230 ---- ...ll_constraint_board_group_recent_visits.rb | 15 - ..._constraint_board_project_recent_visits.rb | 15 - ...quest_reviewers_attention_request_state.rb | 18 - ..._requests_reviewers_state_to_unreviewed.rb | 30 - ...c_index_to_todos_to_cover_pending_query.rb | 16 - ...220905120848_backfill_epic_cache_counts.rb | 29 - ...e_license_for_projects_less_than_one_mb.rb | 33 - ...eline_artifacts_unlocked_with_expire_at.rb | 17 - ...y_orchestration_policy_configuration_id.rb | 38 - ...remove_free_user_cap_remediation_worker.rb | 11 - ...ts_project_name_lower_pattern_ops_index.rb | 16 - ...085047_add_index_to_todos_pending_query.rb | 16 - ...epare_create_internal_notes_index_on_id.rb | 13 - ...e_metadata_on_attention_request_actions.rb | 17 - ..._attention_request_related_system_notes.rb | 30 - ...cadences_last_run_date_to_next_run_date.rb | 13 - ...partition_id_index_to_ci_build_metadata.rb | 14 - ...partition_id_index_to_ci_build_metadata.rb | 14 - ...or_vulnerability_reads_container_images.rb | 19 - ...16054103_remove_experience_level_column.rb | 13 - ...x_id_partition_id_to_ci_builds_metadata.rb | 16 - ...ld_id_partition_id_to_ci_build_metadata.rb | 16 - ...12841_remove_unused_aggregation_columns.rb | 59 - ...sed_fields_from_merge_request_assignees.rb | 40 - ...sed_fields_from_merge_request_reviewers.rb | 26 - ...outs_on_attention_request_feature_names.rb | 18 - ...e_migrate_shared_vulnerability_scanners.rb | 44 - ...e_migrate_shared_vulnerability_scanners.rb | 29 - ...s_metadata_for_partitioning_primary_key.rb | 36 - ...le_index_removal_for_ci_builds_metadata.rb | 16 - ...4709_backfill_internal_on_notes_renamed.rb | 28 - ...20220920135356_tiebreak_user_type_index.rb | 20 - ...20920141001_add_index_on_internal_notes.rb | 15 - ...3504_finalize_task_system_note_renaming.rb | 11 - ...move_task_system_note_rename_temp_index.rb | 11 - ...355_schedule_backfill_namespace_details.rb | 29 - ...pipeline_variables_raw_with_new_default.rb | 10 - ...ci_group_variables_raw_with_new_default.rb | 10 - ...instance_variables_raw_with_new_default.rb | 10 - ...d_ci_job_variables_raw_with_new_default.rb | 10 - ...schedule_variables_raw_with_new_default.rb | 10 - ...d_add_ci_variables_raw_with_new_default.rb | 10 - ...1144258_remove_orphan_group_token_users.rb | 40 - ...0236_remove_trace_column_from_ci_builds.rb | 9 - ...reset_duplicate_ci_runners_token_values.rb | 28 - ...icate_ci_runners_token_encrypted_values.rb | 28 - ..._requested_non_invited_awaiting_members.rb | 17 - ..._reviewers_on_attention_requested_state.rb | 18 - ...e_metadata_on_attention_request_actions.rb | 17 - ...bility_occurrences_uuid_type_transition.rb | 26 - ...ate_ci_pipeline_artifacts_locked_status.rb | 27 - ...081645_tmp_idx_null_member_namespace_id.rb | 17 - ...1500_add_tmp_index_vulns_on_report_type.rb | 22 - ..._delete_remove_invalid_member_migration.rb | 19 - ...194453_add_index_releases_project_id_id.rb | 15 - ...te_orphaned_operational_vulnerabilities.rb | 25 - ...ue_index_build_id_to_ci_builds_metadata.rb | 16 - ...ize_group_member_namespace_id_migration.rb | 22 - ..._default_branch_to_vulnerabilities_read.rb | 18 - ..._prepare_constraint_for_builds_metadata.rb | 30 - ...reate_routing_table_for_builds_metadata.rb | 7 - ...x_members_on_id_where_namespace_id_null.rb | 17 - ...094814_schedule_destroy_invalid_members.rb | 27 - ...an_finding_approval_merge_request_rules.rb | 17 - ...6070927_finalize_invalid_member_cleanup.rb | 22 - ...al_trigram_indexes_for_issues_attempt_2.rb | 25 - ...note_rename_background_migration_values.rb | 72 -- ...migrate_security_findings_delete_queues.rb | 16 - ..._id_target_project_id_on_merge_requests.rb | 15 - ..._id_target_project_id_on_merge_requests.rb | 15 - ...ings_on_default_compliance_framework_id.rb | 15 - ...ance_framework_fk_to_namespace_settings.rb | 16 - ..._id_target_project_id_on_merge_requests.rb | 15 - ...ndex_author_id_and_id_on_merge_requests.rb | 15 - ...ount_used_for_ci_project_monthly_usages.rb | 19 - ...d_ci_job_variables_raw_with_new_default.rb | 12 - ...e_settings_cohort_free_user_cap_columns.rb | 15 - ...159_update_invalid_dormant_user_setting.rb | 17 - ...ansitions_with_same_from_state_to_state.rb | 19 - ...eanup_rename_ci_pipeline_metadata_title.rb | 13 - ...dule_backfill_project_namespace_details.rb | 29 - ..._renaming_background_migration_finished.rb | 22 - ...x_system_note_metadata_on_id_where_task.rb | 15 - ..._add_temp_index_for_user_details_fields.rb | 24 - ...2459_queue_backfill_user_details_fields.rb | 16 - ...oval_merge_request_rules_on_report_type.rb | 18 - ...5041_queue_populate_projects_star_count.rb | 22 - ...test_reports_issue_id_created_at_and_id.rb | 16 - ...le_fastupdate_on_issues_title_gin_index.rb | 27 - ...tupdate_on_issues_description_gin_index.rb | 27 - ...pdate_on_merge_requests_title_gin_index.rb | 27 - ...on_merge_requests_description_gin_index.rb | 27 - ...21082720_drop_index_on_ci_runners_token.rb | 17 - ...rop_index_on_ci_runners_token_encrypted.rb | 17 - ...te_routing_table_for_builds_metadata_v2.rb | 41 - ...mon_finder_query_desc_with_namespace_id.rb | 18 - ...034228_remove_sprints_project_id_column.rb | 38 - ...1500_drop_fingerprint_from_sbom_sources.rb | 9 - ...ransition_from_state_not_equal_to_state.rb | 19 - ...an_finding_approval_merge_request_rules.rb | 17 - ...556_delete_experiment_user_foreign_keys.rb | 20 - ...21027203951_drop_experiment_users_table.rb | 21 - ...alid_partial_trigram_indexes_for_issues.rb | 15 - ...al_trigram_indexes_for_issues_attempt_3.rb | 25 - ...assword_last_changed_at_to_user_details.rb | 15 - ...090940_create_next_ci_partitions_record.rb | 29 - ...te_second_partition_for_builds_metadata.rb | 62 - ...328_change_member_namespace_id_not_null.rb | 13 - ...x_members_on_id_where_namespace_id_null.rb | 15 - ...21103150250_migrate_sidekiq_queued_jobs.rb | 11 - ...trigram_index_for_issue_title_attempt_2.rb | 19 - ...m_index_for_issue_description_attempt_2.rb | 19 - ...roject_statistics_upload_size_migration.rb | 19 - ...or_vulnerability_reads_container_images.rb | 21 - ...dd_vulnerability_reads_all_status_index.rb | 14 - ..._validate_environment_id_on_deployments.rb | 11 - ...0221107094359_recount_epic_cache_counts.rb | 29 - ...nt_used_for_ci_namespace_monthly_usages.rb | 19 - ..._null_constraint_on_member_namespace_id.rb | 15 - ...7220526_validate_fk_member_namespace_id.rb | 13 - ...22213_remove_old_member_namespace_id_fk.rb | 28 - ...5019_truncate_timeline_event_tags_table.rb | 15 - ..._for_vulnerabilities_feedback_migration.rb | 24 - ...ere_releases_access_level_gt_repository.rb | 18 - ...045406_sanitize_confidential_note_todos.rb | 15 - ...repare_removal_of_issue_trigram_indexes.rb | 16 - db/schema_migrations/20220126191624 | 1 - db/schema_migrations/20220406193806 | 1 - db/schema_migrations/20220601110011 | 1 - db/schema_migrations/20220603125200 | 1 - db/schema_migrations/20220606054503 | 1 - db/schema_migrations/20220606080509 | 1 - db/schema_migrations/20220613112029 | 1 - db/schema_migrations/20220613112030 | 1 - db/schema_migrations/20220613112031 | 1 - db/schema_migrations/20220613112032 | 1 - db/schema_migrations/20220615154500 | 1 - db/schema_migrations/20220615172230 | 1 - db/schema_migrations/20220616171355 | 1 - db/schema_migrations/20220706145113 | 1 - db/schema_migrations/20220707192420 | 1 - db/schema_migrations/20220711142148 | 1 - db/schema_migrations/20220721065723 | 1 - db/schema_migrations/20220726171440 | 1 - db/schema_migrations/20220726171450 | 1 - db/schema_migrations/20220726225114 | 1 - db/schema_migrations/20220801155858 | 1 - db/schema_migrations/20220802200719 | 1 - db/schema_migrations/20220802202505 | 1 - db/schema_migrations/20220803004853 | 1 - db/schema_migrations/20220803235114 | 1 - db/schema_migrations/20220805180311 | 1 - db/schema_migrations/20220805183952 | 1 - db/schema_migrations/20220805193117 | 1 - db/schema_migrations/20220809002011 | 1 - db/schema_migrations/20220809214730 | 1 - db/schema_migrations/20220809223215 | 1 - db/schema_migrations/20220815061621 | 1 - db/schema_migrations/20220815152905 | 1 - db/schema_migrations/20220816075638 | 1 - db/schema_migrations/20220816135816 | 1 - db/schema_migrations/20220816163444 | 1 - db/schema_migrations/20220817122907 | 1 - db/schema_migrations/20220818095225 | 1 - db/schema_migrations/20220818125332 | 1 - db/schema_migrations/20220818125703 | 1 - db/schema_migrations/20220818132108 | 1 - db/schema_migrations/20220818140553 | 1 - db/schema_migrations/20220819153725 | 1 - db/schema_migrations/20220819162852 | 1 - db/schema_migrations/20220819184945 | 1 - db/schema_migrations/20220820221036 | 1 - db/schema_migrations/20220822071909 | 1 - db/schema_migrations/20220822090656 | 1 - db/schema_migrations/20220822094804 | 1 - db/schema_migrations/20220822102651 | 1 - db/schema_migrations/20220822103638 | 1 - db/schema_migrations/20220823084747 | 1 - db/schema_migrations/20220824114218 | 1 - db/schema_migrations/20220824175648 | 1 - db/schema_migrations/20220824194103 | 1 - db/schema_migrations/20220825061250 | 1 - db/schema_migrations/20220825105631 | 1 - db/schema_migrations/20220825134827 | 1 - db/schema_migrations/20220825142324 | 1 - db/schema_migrations/20220826165048 | 1 - db/schema_migrations/20220826175058 | 1 - db/schema_migrations/20220828094411 | 1 - db/schema_migrations/20220828131848 | 1 - db/schema_migrations/20220829183356 | 1 - db/schema_migrations/20220830051704 | 1 - db/schema_migrations/20220830061704 | 1 - db/schema_migrations/20220830071704 | 1 - db/schema_migrations/20220830082928 | 1 - db/schema_migrations/20220830114228 | 1 - db/schema_migrations/20220830172142 | 1 - db/schema_migrations/20220831021358 | 1 - db/schema_migrations/20220831090454 | 1 - db/schema_migrations/20220831132802 | 1 - db/schema_migrations/20220831182105 | 1 - db/schema_migrations/20220901035722 | 1 - db/schema_migrations/20220901035725 | 1 - db/schema_migrations/20220901071310 | 1 - db/schema_migrations/20220901071355 | 1 - db/schema_migrations/20220901073300 | 1 - db/schema_migrations/20220901090004 | 1 - db/schema_migrations/20220901092853 | 1 - db/schema_migrations/20220901114501 | 1 - db/schema_migrations/20220901124637 | 1 - db/schema_migrations/20220901131828 | 1 - db/schema_migrations/20220901184106 | 1 - db/schema_migrations/20220901184246 | 1 - db/schema_migrations/20220901212027 | 1 - db/schema_migrations/20220902065314 | 1 - db/schema_migrations/20220902065316 | 1 - db/schema_migrations/20220902065317 | 1 - db/schema_migrations/20220902065558 | 1 - db/schema_migrations/20220902065611 | 1 - db/schema_migrations/20220902065623 | 1 - db/schema_migrations/20220902065635 | 1 - db/schema_migrations/20220902065647 | 1 - db/schema_migrations/20220902111016 | 1 - db/schema_migrations/20220902111038 | 1 - db/schema_migrations/20220902165931 | 1 - db/schema_migrations/20220902170131 | 1 - db/schema_migrations/20220902204048 | 1 - db/schema_migrations/20220904173342 | 1 - db/schema_migrations/20220904173430 | 1 - db/schema_migrations/20220905090300 | 1 - db/schema_migrations/20220905090339 | 1 - db/schema_migrations/20220905112710 | 1 - db/schema_migrations/20220905120848 | 1 - db/schema_migrations/20220906074449 | 1 - db/schema_migrations/20220906093857 | 1 - db/schema_migrations/20220906155105 | 1 - db/schema_migrations/20220906204832 | 1 - db/schema_migrations/20220906212931 | 1 - db/schema_migrations/20220907115806 | 1 - db/schema_migrations/20220907122648 | 1 - db/schema_migrations/20220907124320 | 1 - db/schema_migrations/20220908125146 | 1 - db/schema_migrations/20220909091410 | 1 - db/schema_migrations/20220909094752 | 1 - db/schema_migrations/20220909113809 | 1 - db/schema_migrations/20220909114220 | 1 - db/schema_migrations/20220912085047 | 1 - db/schema_migrations/20220912110433 | 1 - db/schema_migrations/20220912153839 | 1 - db/schema_migrations/20220912180807 | 1 - db/schema_migrations/20220913030552 | 1 - db/schema_migrations/20220913030624 | 1 - db/schema_migrations/20220913043728 | 1 - db/schema_migrations/20220913082728 | 1 - db/schema_migrations/20220913082824 | 1 - db/schema_migrations/20220913082930 | 1 - db/schema_migrations/20220913083015 | 1 - db/schema_migrations/20220913084123 | 1 - db/schema_migrations/20220914005141 | 1 - db/schema_migrations/20220914010233 | 1 - db/schema_migrations/20220914070927 | 1 - db/schema_migrations/20220914080716 | 1 - db/schema_migrations/20220914093408 | 1 - db/schema_migrations/20220914112457 | 1 - db/schema_migrations/20220914130800 | 1 - db/schema_migrations/20220914131449 | 1 - db/schema_migrations/20220914174705 | 1 - db/schema_migrations/20220915103831 | 1 - db/schema_migrations/20220915140802 | 1 - db/schema_migrations/20220915192521 | 1 - db/schema_migrations/20220916054103 | 1 - db/schema_migrations/20220916065418 | 1 - db/schema_migrations/20220916070101 | 1 - db/schema_migrations/20220916094641 | 1 - db/schema_migrations/20220916103311 | 1 - db/schema_migrations/20220916112841 | 1 - db/schema_migrations/20220918124223 | 1 - db/schema_migrations/20220919023208 | 1 - db/schema_migrations/20220919041604 | 1 - db/schema_migrations/20220919050555 | 1 - db/schema_migrations/20220919062640 | 1 - db/schema_migrations/20220919080303 | 1 - db/schema_migrations/20220919080304 | 1 - db/schema_migrations/20220919225631 | 1 - db/schema_migrations/20220920022404 | 1 - db/schema_migrations/20220920081631 | 1 - db/schema_migrations/20220920122121 | 1 - db/schema_migrations/20220920124709 | 1 - db/schema_migrations/20220920135356 | 1 - db/schema_migrations/20220920135632 | 1 - db/schema_migrations/20220920135717 | 1 - db/schema_migrations/20220920141001 | 1 - db/schema_migrations/20220920213504 | 1 - db/schema_migrations/20220920214524 | 1 - db/schema_migrations/20220921093355 | 1 - db/schema_migrations/20220921111823 | 1 - db/schema_migrations/20220921111831 | 1 - db/schema_migrations/20220921111840 | 1 - db/schema_migrations/20220921111849 | 1 - db/schema_migrations/20220921111857 | 1 - db/schema_migrations/20220921111907 | 1 - db/schema_migrations/20220921144258 | 1 - db/schema_migrations/20220921174815 | 1 - db/schema_migrations/20220921201347 | 1 - db/schema_migrations/20220922090236 | 1 - db/schema_migrations/20220922143143 | 1 - db/schema_migrations/20220922143612 | 1 - db/schema_migrations/20220922143634 | 1 - db/schema_migrations/20220922204106 | 1 - db/schema_migrations/20220923052531 | 1 - db/schema_migrations/20220923060226 | 1 - db/schema_migrations/20220923103006 | 1 - db/schema_migrations/20220926023734 | 1 - db/schema_migrations/20220927155407 | 1 - db/schema_migrations/20220927171740 | 1 - db/schema_migrations/20220928201920 | 1 - db/schema_migrations/20220928225711 | 1 - db/schema_migrations/20220929081645 | 1 - db/schema_migrations/20220929091500 | 1 - db/schema_migrations/20220929101947 | 1 - db/schema_migrations/20220929171925 | 1 - db/schema_migrations/20220929172356 | 1 - db/schema_migrations/20220929194453 | 1 - db/schema_migrations/20220929213730 | 1 - db/schema_migrations/20220930110127 | 1 - db/schema_migrations/20220930125609 | 1 - db/schema_migrations/20221002234454 | 1 - db/schema_migrations/20221003151747 | 1 - db/schema_migrations/20221003192827 | 1 - db/schema_migrations/20221004074910 | 1 - db/schema_migrations/20221004074914 | 1 - db/schema_migrations/20221004092038 | 1 - db/schema_migrations/20221004094814 | 1 - db/schema_migrations/20221005072353 | 1 - db/schema_migrations/20221005094926 | 1 - db/schema_migrations/20221005103000 | 1 - db/schema_migrations/20221005103010 | 1 - db/schema_migrations/20221006070927 | 1 - db/schema_migrations/20221006083240 | 1 - db/schema_migrations/20221006131506 | 1 - db/schema_migrations/20221006141145 | 1 - db/schema_migrations/20221006172302 | 1 - db/schema_migrations/20221008032350 | 1 - db/schema_migrations/20221009085130 | 1 - db/schema_migrations/20221010074914 | 1 - db/schema_migrations/20221010103207 | 1 - db/schema_migrations/20221010121510 | 1 - db/schema_migrations/20221010121807 | 1 - db/schema_migrations/20221010122138 | 1 - db/schema_migrations/20221010122352 | 1 - db/schema_migrations/20221010123040 | 1 - db/schema_migrations/20221010141500 | 1 - db/schema_migrations/20221010162137 | 1 - db/schema_migrations/20221010184839 | 1 - db/schema_migrations/20221010201815 | 1 - db/schema_migrations/20221010202339 | 1 - db/schema_migrations/20221010202408 | 1 - db/schema_migrations/20221011062254 | 1 - db/schema_migrations/20221011113928 | 1 - db/schema_migrations/20221011162637 | 1 - db/schema_migrations/20221011210455 | 1 - db/schema_migrations/20221012033107 | 1 - db/schema_migrations/20221012135524 | 1 - db/schema_migrations/20221012182701 | 1 - db/schema_migrations/20221013103738 | 1 - db/schema_migrations/20221013154159 | 1 - db/schema_migrations/20221013215832 | 1 - db/schema_migrations/20221014031033 | 1 - db/schema_migrations/20221014034338 | 1 - db/schema_migrations/20221014190040 | 1 - db/schema_migrations/20221015000511 | 1 - db/schema_migrations/20221017084208 | 1 - db/schema_migrations/20221017084227 | 1 - db/schema_migrations/20221018050323 | 1 - db/schema_migrations/20221018062308 | 1 - db/schema_migrations/20221018081416 | 1 - db/schema_migrations/20221018092552 | 1 - db/schema_migrations/20221018124029 | 1 - db/schema_migrations/20221018124035 | 1 - db/schema_migrations/20221018193635 | 1 - db/schema_migrations/20221018193827 | 1 - db/schema_migrations/20221018202524 | 1 - db/schema_migrations/20221018232820 | 1 - db/schema_migrations/20221019002459 | 1 - db/schema_migrations/20221019102426 | 1 - db/schema_migrations/20221019105041 | 1 - db/schema_migrations/20221019141508 | 1 - db/schema_migrations/20221019194751 | 1 - db/schema_migrations/20221019195754 | 1 - db/schema_migrations/20221019200033 | 1 - db/schema_migrations/20221019200206 | 1 - db/schema_migrations/20221020124018 | 1 - db/schema_migrations/20221021082720 | 1 - db/schema_migrations/20221021082734 | 1 - db/schema_migrations/20221021145820 | 1 - db/schema_migrations/20221021160735 | 1 - db/schema_migrations/20221021213216 | 1 - db/schema_migrations/20221022213505 | 1 - db/schema_migrations/20221022213521 | 1 - db/schema_migrations/20221024034228 | 1 - db/schema_migrations/20221024121500 | 1 - db/schema_migrations/20221025043930 | 1 - db/schema_migrations/20221025105205 | 1 - db/schema_migrations/20221025115006 | 1 - db/schema_migrations/20221025145452 | 1 - db/schema_migrations/20221025150202 | 1 - db/schema_migrations/20221025220607 | 1 - db/schema_migrations/20221027124848 | 1 - db/schema_migrations/20221027203556 | 1 - db/schema_migrations/20221027203951 | 1 - db/schema_migrations/20221028000041 | 1 - db/schema_migrations/20221028000603 | 1 - db/schema_migrations/20221028015347 | 1 - db/schema_migrations/20221028022627 | 1 - db/schema_migrations/20221028152422 | 1 - db/schema_migrations/20221031102916 | 1 - db/schema_migrations/20221101032521 | 1 - db/schema_migrations/20221101032600 | 1 - db/schema_migrations/20221101195903 | 1 - db/schema_migrations/20221101201031 | 1 - db/schema_migrations/20221102090940 | 1 - db/schema_migrations/20221102090943 | 1 - db/schema_migrations/20221102202130 | 1 - db/schema_migrations/20221102225800 | 1 - db/schema_migrations/20221103073328 | 1 - db/schema_migrations/20221103084213 | 1 - db/schema_migrations/20221103131409 | 1 - db/schema_migrations/20221103150250 | 1 - db/schema_migrations/20221104042137 | 1 - db/schema_migrations/20221104042159 | 1 - db/schema_migrations/20221104061320 | 1 - db/schema_migrations/20221104074652 | 1 - db/schema_migrations/20221104094042 | 1 - db/schema_migrations/20221104100203 | 1 - db/schema_migrations/20221104170500 | 1 - db/schema_migrations/20221104190203 | 1 - db/schema_migrations/20221107094359 | 1 - db/schema_migrations/20221107115247 | 1 - db/schema_migrations/20221107115413 | 1 - db/schema_migrations/20221107183222 | 1 - db/schema_migrations/20221107184542 | 1 - db/schema_migrations/20221107184758 | 1 - db/schema_migrations/20221107220420 | 1 - db/schema_migrations/20221107220526 | 1 - db/schema_migrations/20221107222213 | 1 - db/schema_migrations/20221108015813 | 1 - db/schema_migrations/20221108045019 | 1 - db/schema_migrations/20221108121322 | 1 - db/schema_migrations/20221108185442 | 1 - db/schema_migrations/20221108222015 | 1 - db/schema_migrations/20221110045406 | 1 - db/schema_migrations/20221110105857 | 1 - db/schema_migrations/20221110150942 | 1 - db/schema_migrations/20221111070314 | 1 - ...e_approval_rules_for_vulnerability_spec.rb | 22 - ...hestration_policy_configuration_id_spec.rb | 22 - ...n_create_group_application_setting_spec.rb | 83 -- scripts/verify-tff-mapping | 4 +- ...ackfill_imported_issue_search_data_spec.rb | 2 +- ...tegrations_enable_ssl_verification_spec.rb | 2 +- .../backfill_internal_on_notes_spec.rb | 2 +- ...amespace_id_of_vulnerability_reads_spec.rb | 2 +- ...ckfill_project_member_namespace_id_spec.rb | 124 -- .../backfill_topics_title_spec.rb | 2 +- .../backfill_user_details_fields_spec.rb | 2 +- ..._vulnerability_reads_cluster_agent_spec.rb | 2 +- ...kfill_work_item_type_id_for_issues_spec.rb | 2 +- .../destroy_invalid_group_members_spec.rb | 105 -- .../destroy_invalid_members_spec.rb | 2 +- .../destroy_invalid_project_members_spec.rb | 124 -- ...nse_for_no_issues_no_repo_projects_spec.rb | 2 +- ...se_for_one_member_no_repo_projects_spec.rb | 2 +- ...ense_for_projects_less_than_one_mb_spec.rb | 2 +- .../expire_o_auth_tokens_spec.rb | 2 +- .../populate_projects_star_count_spec.rb | 2 +- .../remove_self_managed_wiki_notes_spec.rb | 2 +- ...many_tags_skipped_registry_imports_spec.rb | 2 +- ..._available_for_non_public_projects_spec.rb | 2 +- ...roup_member_namespace_id_migration_spec.rb | 76 -- ...e_and_keyresult_to_work_item_types_spec.rb | 73 -- ...backfill_project_namespace_details_spec.rb | 37 - ...ming_background_migration_finished_spec.rb | 95 -- ...uting_table_for_builds_metadata_v2_spec.rb | 36 - ...rd_last_changed_at_to_user_details_spec.rb | 37 - ...rd_last_changed_at_to_user_details_spec.rb | 16 - ...d_language_to_application_settings_spec.rb | 27 - ...d_language_on_application_settings_spec.rb | 29 - ...0_create_next_ci_partitions_record_spec.rb | 63 - ...cond_partition_for_builds_metadata_spec.rb | 65 - ...ions_with_same_from_state_to_state_spec.rb | 50 - ...rate_shared_vulnerability_scanners_spec.rb | 73 -- .../finalize_invalid_member_cleanup_spec.rb | 76 -- ...queue_backfill_user_details_fields_spec.rb | 24 - ...queue_populate_projects_star_count_spec.rb | 24 - .../recount_epic_cache_counts_spec.rb | 32 - ...rate_shared_vulnerability_scanners_spec.rb | 41 - ...nd_user_confirmation_email_setting_spec.rb | 41 - ...ed_for_ci_namespace_monthly_usages_spec.rb | 43 - ...used_for_ci_project_monthly_usages_spec.rb | 43 - spec/support/rspec_order_todo.yml | 2 - 712 files changed, 953 insertions(+), 8359 deletions(-) delete mode 100644 db/migrate/20220126191624_add_scan_file_path_to_dast_site_profile.rb delete mode 100644 db/migrate/20220406193806_add_maven_package_requests_forwarding_to_application_settings.rb delete mode 100644 db/migrate/20220603125200_add_show_diff_preview_in_email_to_namespace_settings.rb delete mode 100644 db/migrate/20220613112029_add_namespace_id_to_protected_branches.rb delete mode 100644 db/migrate/20220613112030_add_namespace_id_indexes_foreign_key_to_protected_branches.rb delete mode 100644 db/migrate/20220613112031_add_group_or_project_constraint_in_protected_branches.rb delete mode 100644 db/migrate/20220613112032_change_project_id_null_in_protected_branches.rb delete mode 100644 db/migrate/20220615172230_add_user_preference_to_turn_off_automatic_lists.rb delete mode 100644 db/migrate/20220711142148_add_invitation_flow_enforcement_to_application_settings.rb delete mode 100644 db/migrate/20220721065723_add_issue_branch_template_to_project_settings.rb delete mode 100644 db/migrate/20220726171440_create_ghost_user_migrations.rb delete mode 100644 db/migrate/20220726171450_add_user_fk_to_ghost_user_migrations.rb delete mode 100644 db/migrate/20220802200719_add_user_details_profile_fields.rb delete mode 100644 db/migrate/20220802202505_add_user_details_field_limits.rb delete mode 100644 db/migrate/20220803004853_add_auto_ban_user_to_namespace_settings.rb delete mode 100644 db/migrate/20220803235114_add_auto_ban_user_to_application_settings.rb delete mode 100644 db/migrate/20220805180311_add_unique_index_on_sbom_component_type_and_name.rb delete mode 100644 db/migrate/20220805183952_add_unique_index_to_sbom_component_versions_on_component_id_and_version.rb delete mode 100644 db/migrate/20220805193117_add_unique_index_to_sbom_sources_on_source_type_and_source.rb delete mode 100644 db/migrate/20220815152905_create_vulnerability_advisories.rb delete mode 100644 db/migrate/20220816135816_create_sbom_vulnerable_component_versions.rb delete mode 100644 db/migrate/20220817122907_re_add_show_diff_preview_in_email_to_project_settings.rb delete mode 100644 db/migrate/20220818095225_add_max_pages_custom_domains_per_project.rb delete mode 100644 db/migrate/20220818125332_add_jitsu_tracking_columns_to_application_settings.rb delete mode 100644 db/migrate/20220818125703_add_jitsu_tracking_columns_to_application_settings_text_limits.rb delete mode 100644 db/migrate/20220818132108_add_deleted_on_to_ml_experiments.rb delete mode 100644 db/migrate/20220818140553_add_unique_index_to_sbom_occurrences_on_ingestion_attributes.rb delete mode 100644 db/migrate/20220819153725_add_vulnerability_advisory_foreign_key_to_sbom_vulnerable_component_versions.rb delete mode 100644 db/migrate/20220819162852_add_sbom_component_version_foreign_key_to_sbom_vulnerable_component_versions.rb delete mode 100644 db/migrate/20220819184945_add_dashboard_limit_to_application_settings.rb delete mode 100644 db/migrate/20220822102651_add_namespace_id_to_broadcast_message.rb delete mode 100644 db/migrate/20220822103638_add_index_and_foreign_key_to_broadcast_message.rb delete mode 100644 db/migrate/20220824175648_limit_namespaces_sync_triggers_to_traversal_ids_update.rb delete mode 100644 db/migrate/20220824194103_remove_existing_work_item_type_backfill_migrations.rb delete mode 100644 db/migrate/20220825105631_add_cube_api_key_to_application_settings.rb delete mode 100644 db/migrate/20220825134827_remove_not_null_constraint_for_confidence_columns.rb delete mode 100644 db/migrate/20220828094411_add_rpm_max_file_size_to_plan_limits.rb delete mode 100644 db/migrate/20220828131848_create_packages_rpm_metadata.rb delete mode 100644 db/migrate/20220829183356_replace_index_on_credit_card_validations.rb delete mode 100644 db/migrate/20220830082928_add_text_limit_to_cube_api_base_url.rb delete mode 100644 db/migrate/20220830114228_create_dora_configuration_table.rb delete mode 100644 db/migrate/20220831182105_add_constraints_view.rb delete mode 100644 db/migrate/20220901035722_add_temp_project_member_index.rb delete mode 100644 db/migrate/20220901090004_add_can_create_group_to_application_settings.rb delete mode 100644 db/migrate/20220901092853_update_can_create_group_application_setting.rb delete mode 100644 db/migrate/20220901114501_only_allow_merge_if_all_status_checks_passed.rb delete mode 100644 db/migrate/20220901124637_add_last_downloaded_at_to_packages.rb delete mode 100644 db/migrate/20220901131828_add_environments_project_name_lower_pattern_ops_index.rb delete mode 100644 db/migrate/20220901212027_add_merge_request_id_to_environments.rb delete mode 100644 db/migrate/20220902065314_create_ci_partitions.rb delete mode 100644 db/migrate/20220902065316_create_default_partition_record.rb delete mode 100644 db/migrate/20220902065317_add_partition_id_to_ci_builds.rb delete mode 100644 db/migrate/20220902065558_add_partition_id_to_ci_builds_metadata.rb delete mode 100644 db/migrate/20220902065611_add_partition_id_to_ci_job_artifacts.rb delete mode 100644 db/migrate/20220902065623_add_partition_id_to_ci_pipelines.rb delete mode 100644 db/migrate/20220902065635_add_partition_id_to_ci_stages.rb delete mode 100644 db/migrate/20220902065647_add_partition_id_to_ci_pipeline_variables.rb delete mode 100644 db/migrate/20220902165931_index_evironments_on_merge_request_id.rb delete mode 100644 db/migrate/20220902170131_add_fk_constraint_to_environments_merge_request_id.rb delete mode 100644 db/migrate/20220906093857_add_column_branch_filter_strategy_to_web_hooks.rb delete mode 100644 db/migrate/20220906155105_add_start_time_and_end_time_and_status_to_ml_candidates.rb delete mode 100644 db/migrate/20220906204832_add_locked_to_ci_pipeline_artifacts.rb delete mode 100644 db/migrate/20220907115806_add_security_orchestration_policy_configuration_id.rb delete mode 100644 db/migrate/20220907124320_add_internal_to_notes_renamed.rb delete mode 100644 db/migrate/20220909091410_add_dismissal_reason_to_vulnerability_state_transitions.rb delete mode 100644 db/migrate/20220909094752_add_free_user_cap_over_limt_notified_at_to_namespace_details.rb delete mode 100644 db/migrate/20220909113809_add_environments_project_name_lower_pattern_ops_state_index.rb delete mode 100644 db/migrate/20220912153839_create_packages_rpm_repository_file.rb delete mode 100644 db/migrate/20220912180807_add_epoch_column_to_rpm_metadata.rb delete mode 100644 db/migrate/20220913043728_create_user_phone_number_validations.rb delete mode 100644 db/migrate/20220913082728_drop_index_cadence_create_iterations_automation.rb delete mode 100644 db/migrate/20220913082824_finalize_invalid_group_member_cleanup.rb delete mode 100644 db/migrate/20220913082930_rename_iterations_cadences_last_run_date_to_next_run_date.rb delete mode 100644 db/migrate/20220913084123_add_timestamp_to_ml_candidate_metrics.rb delete mode 100644 db/migrate/20220914005141_change_namespace_id_not_null_in_members.rb delete mode 100644 db/migrate/20220914010233_change_members_namespace_foreign_key_on_delete_constraint.rb delete mode 100644 db/migrate/20220914070927_finalize_invalid_project_member_cleanup.rb delete mode 100644 db/migrate/20220914080716_add_index_to_candidate_id_and_name_on_ml_candidate_params.rb delete mode 100644 db/migrate/20220914112457_add_reject_non_dco_commits_to_push_rules.rb delete mode 100644 db/migrate/20220914130800_add_jitsu_key_to_projects.rb delete mode 100644 db/migrate/20220914131449_add_text_limit_to_projects_jitsu_key.rb delete mode 100644 db/migrate/20220914174705_remove_not_null_constraint_from_sbom_source_fingerprint.rb delete mode 100644 db/migrate/20220915140802_create_merge_request_predictions.rb delete mode 100644 db/migrate/20220916094641_add_source_id_to_bulk_import_entities.rb delete mode 100644 db/migrate/20220916103311_add_index_on_jira_connect_installations_instance_url.rb delete mode 100644 db/migrate/20220918124223_add_suggested_reviewers_enabled_to_project_settings.rb delete mode 100644 db/migrate/20220919062640_add_mirror_branch_regex_to_remote_mirrors.rb delete mode 100644 db/migrate/20220919225631_add_index_packages_packages_on_project_id_and_lower_version_to_packages.rb delete mode 100644 db/migrate/20220920022404_remove_temp_index_null_project_namespace_id.rb delete mode 100644 db/migrate/20220920135632_add_jira_connect_proxy_url_setting.rb delete mode 100644 db/migrate/20220920135717_add_textlimit_to_jira_connect_proxy_url_setting.rb delete mode 100644 db/migrate/20220921174815_add_secure_files_metadata.rb delete mode 100644 db/migrate/20220921201347_add_maven_package_requests_forwarding_to_namespace_package_settings.rb delete mode 100644 db/migrate/20220922143612_add_inbound_ci_job_token_project_scope_links.rb delete mode 100644 db/migrate/20220923103006_add_ci_pipeline_metadata_title.rb delete mode 100644 db/migrate/20220926023734_add_mirror_branch_regex_to_project_settings.rb delete mode 100644 db/migrate/20220927155407_add_column_inbound_job_token_scope_enabled_to_ci_cd_setting.rb delete mode 100644 db/migrate/20220928201920_create_project_wiki_repository_states.rb delete mode 100644 db/migrate/20220929171925_add_pypi_package_requests_forwarding_to_namespace_package_settings.rb delete mode 100644 db/migrate/20220929172356_add_npm_package_requests_forwarding_to_namespace_package_settings.rb delete mode 100644 db/migrate/20220930125609_add_migrated_to_state_transition_to_vulnerability_feedback.rb delete mode 100644 db/migrate/20221003151747_create_audit_events_streaming_event_type_filters.rb delete mode 100644 db/migrate/20221005072353_create_incident_management_timeline_event_tags.rb delete mode 100644 db/migrate/20221005094926_create_incident_management_timeline_event_tag_links.rb delete mode 100644 db/migrate/20221005103010_add_index_project_id_on_scan_finding_approval_project_rules.rb delete mode 100644 db/migrate/20221006131506_add_free_user_cap_over_limit_notified_at_to_namespace_details.rb delete mode 100644 db/migrate/20221006141145_add_targets_to_elastic_reindexing_tasks.rb delete mode 100644 db/migrate/20221008032350_add_password_expiration_migration.rb delete mode 100644 db/migrate/20221009085130_add_mr_checks_columns_to_namespace_settings.rb delete mode 100644 db/migrate/20221010103207_add_product_analytics_enabled_to_application_settings.rb delete mode 100644 db/migrate/20221010121807_add_compliance_framework_id_to_namespace_settings.rb delete mode 100644 db/migrate/20221010184839_add_new_amount_used_to_ci_project_monthly_usages.rb delete mode 100644 db/migrate/20221010201815_add_purl_type_to_sbom_components.rb delete mode 100644 db/migrate/20221010202339_remove_unique_index_on_sbom_components_type_and_name.rb delete mode 100644 db/migrate/20221010202408_add_unique_index_on_sbom_components_type_name_and_purl_type.rb delete mode 100644 db/migrate/20221011162637_add_partial_index_project_incident_management_settings_on_project_id_and_sla_timer.rb delete mode 100644 db/migrate/20221011210455_add_use_legacy_web_ide_to_user_preferences.rb delete mode 100644 db/migrate/20221012033107_add_password_last_changed_at_to_user_details.rb delete mode 100644 db/migrate/20221012135524_add_scan_file_path_limit_for_dast_site_profile.rb delete mode 100644 db/migrate/20221013103738_add_disable_admin_oauth_scopes.rb delete mode 100644 db/migrate/20221014031033_add_temp_index_to_project_features_where_releases_access_level_gt_repository.rb delete mode 100644 db/migrate/20221014034338_populate_releases_access_level_from_repository.rb delete mode 100644 db/migrate/20221014190040_drop_notes_note_trigram_index.rb delete mode 100644 db/migrate/20221015000511_add_email_confirmation_setting_to_application_settings.rb delete mode 100644 db/migrate/20221017084208_rename_ci_pipeline_metadata_title.rb delete mode 100644 db/migrate/20221018050323_add_objective_and_keyresult_to_work_item_types.rb delete mode 100644 db/migrate/20221018081416_members_remove_member_namespace_id_not_null_constraint.rb delete mode 100644 db/migrate/20221018092552_add_file_name_index_to_packages_rpm_repository_files.rb delete mode 100644 db/migrate/20221018124029_add_consume_after_to_ghost_user_migrations.rb delete mode 100644 db/migrate/20221018124035_add_consume_after_index_to_ghost_user_migrations.rb delete mode 100644 db/migrate/20221018202524_create_dependency_proxy_blob_states.rb delete mode 100644 db/migrate/20221020124018_add_delete_started_at_to_container_repositories.rb delete mode 100644 db/migrate/20221021213216_create_namespace_commit_emails.rb delete mode 100644 db/migrate/20221022213505_add_namespace_commit_emails_namespace_fk.rb delete mode 100644 db/migrate/20221022213521_add_namespace_commit_emails_email_fk.rb delete mode 100644 db/migrate/20221025043930_change_default_value_on_password_last_changed_at_to_user_details.rb delete mode 100644 db/migrate/20221025105205_add_status_and_id_index_to_container_repositories.rb delete mode 100644 db/migrate/20221025145452_change_vulnerability_feedback_unique_idx.rb delete mode 100644 db/migrate/20221025150202_add_index_for_finding_uuid_and_feedback_type_on_feedback.rb delete mode 100644 db/migrate/20221027124848_add_text_limit_to_project_settings_mirror_branch_regex.rb delete mode 100644 db/migrate/20221028015347_add_commit_committer_name_check_to_push_rules.rb delete mode 100644 db/migrate/20221028152422_add_finding_data_column_to_security_findings.rb delete mode 100644 db/migrate/20221031102916_add_users_foreign_key_to_projects.rb delete mode 100644 db/migrate/20221101032521_add_default_preferred_language_to_application_settings.rb delete mode 100644 db/migrate/20221101032600_add_text_limit_to_default_preferred_language_on_application_settings.rb delete mode 100644 db/migrate/20221101195903_change_email_confirmation_setting_default.rb delete mode 100644 db/migrate/20221101201031_set_email_confirmation_setting_from_send_user_confirmation_email_setting.rb delete mode 100644 db/migrate/20221102202130_extend_x509_subject_limit.rb delete mode 100644 db/migrate/20221102225800_add_max_seats_used_changed_at_index_to_gitlab_subscriptions.rb delete mode 100644 db/migrate/20221103131409_add_partial_index_on_primary_key_of_security_scans.rb delete mode 100644 db/migrate/20221104061320_add_disable_download_button_into_application_settings.rb delete mode 100644 db/migrate/20221104094042_remove_users_foreign_key_to_projects.rb delete mode 100644 db/migrate/20221107115247_change_scim_identity_group_id_remove_null.rb delete mode 100644 db/migrate/20221107115413_change_scim_oauth_access_token_group_id_remove_null.rb delete mode 100644 db/migrate/20221107183222_create_project_wiki_repositories.rb delete mode 100644 db/migrate/20221107184542_add_new_amount_used_to_ci_namespace_monthly_usages.rb delete mode 100644 db/migrate/20221108015813_add_telesign_to_application_settings.rb delete mode 100644 db/migrate/20221108185442_add_project_wiki_repository_id_to_project_wiki_repository_states.rb delete mode 100644 db/migrate/20221110105857_add_index_for_in_product_marketing_email_metrics.rb delete mode 100644 db/migrate/20221110150942_add_project_id_lower_name_index_remove_old_index.rb delete mode 100644 db/post_migrate/20220601110011_schedule_remove_self_managed_wiki_notes.rb delete mode 100644 db/post_migrate/20220606054503_add_tmp_index_job_artifacts_id_and_expire_at.rb delete mode 100644 db/post_migrate/20220606080509_fix_incorrect_job_artifacts_expire_at.rb delete mode 100644 db/post_migrate/20220615154500_schedule_backfill_cluster_agents_has_vulnerabilities.rb delete mode 100644 db/post_migrate/20220616171355_update_vulnerabilities_project_id_id_active_cis_index.rb delete mode 100644 db/post_migrate/20220706145113_backfill_namespace_id_on_issues.rb delete mode 100644 db/post_migrate/20220707192420_remove_tmp_idx_merge_requests_draft_and_status.rb delete mode 100644 db/post_migrate/20220726225114_remove_tmp_index_group_membership_namespace_id_column.rb delete mode 100644 db/post_migrate/20220801155858_schedule_disable_legacy_open_source_licence_for_recent_public_projects.rb delete mode 100644 db/post_migrate/20220809002011_schedule_destroy_invalid_group_members.rb delete mode 100644 db/post_migrate/20220809214730_add_note_metadata_temp_index_on_id_where_task.rb delete mode 100644 db/post_migrate/20220809223215_change_task_system_note_wording_to_checklist_item.rb delete mode 100644 db/post_migrate/20220815061621_rename_web_hooks_service_id_to_integration_id.rb delete mode 100644 db/post_migrate/20220816075638_drop_uuid_and_id_index_from_security_findings.rb delete mode 100644 db/post_migrate/20220816163444_update_start_date_for_iterations_cadences.rb delete mode 100644 db/post_migrate/20220820221036_update_tmp_non_migrated_index_on_container_repositories.rb delete mode 100644 db/post_migrate/20220822071909_remove_other_role_from_user_details.rb delete mode 100644 db/post_migrate/20220822090656_drop_build_coverage_regex_from_project.rb delete mode 100644 db/post_migrate/20220822094804_add_issues_authorization_index.rb delete mode 100644 db/post_migrate/20220823084747_prepare_removal_partial_trigram_indexes_for_issues.rb delete mode 100644 db/post_migrate/20220824114218_add_tmp_index_approval_merge_request_rules.rb delete mode 100644 db/post_migrate/20220825061250_drop_tmp_index_todos_attention_request_action_idx.rb delete mode 100644 db/post_migrate/20220825142324_replace_issues_authorization_index.rb delete mode 100644 db/post_migrate/20220826165048_drop_temporary_job_trace_index.rb delete mode 100644 db/post_migrate/20220826175058_fully_remove_temporary_job_trace_index.rb delete mode 100644 db/post_migrate/20220830051704_add_temporary_index_for_orphaned_invited_members.rb delete mode 100644 db/post_migrate/20220830061704_orphaned_invited_members_cleanup.rb delete mode 100644 db/post_migrate/20220830071704_remove_temporary_index_for_orphaned_invited_members.rb delete mode 100644 db/post_migrate/20220830172142_reschedule_issue_work_item_type_id_backfill.rb delete mode 100644 db/post_migrate/20220831021358_add_index_on_issue_health_status.rb delete mode 100644 db/post_migrate/20220831090454_cleanup_web_hooks_service_id.rb delete mode 100644 db/post_migrate/20220831132802_delete_approval_rules_for_vulnerability.rb delete mode 100644 db/post_migrate/20220901035725_schedule_destroy_invalid_project_members.rb delete mode 100644 db/post_migrate/20220901071310_add_tmp_index_user_callouts_on_attention_request_feature_names.rb delete mode 100644 db/post_migrate/20220901071355_cleanup_attention_request_user_callouts.rb delete mode 100644 db/post_migrate/20220901073300_remove_partial_trigram_indexes_for_issues.rb delete mode 100644 db/post_migrate/20220901184106_add_not_null_to_board_group_recent_visits.rb delete mode 100644 db/post_migrate/20220901184246_add_not_null_to_board_project_recent_visits.rb delete mode 100644 db/post_migrate/20220902111016_delete_null_records_from_board_group_recent_visits.rb delete mode 100644 db/post_migrate/20220902111038_delete_null_records_from_board_project_recent_visits.rb delete mode 100644 db/post_migrate/20220902204048_move_security_findings_table_to_gitlab_partitions_dynamic_schema.rb delete mode 100644 db/post_migrate/20220904173342_validate_not_null_constraint_board_group_recent_visits.rb delete mode 100644 db/post_migrate/20220904173430_validate_not_null_constraint_board_project_recent_visits.rb delete mode 100644 db/post_migrate/20220905090300_add_tmp_index_merge_request_reviewers_attention_request_state.rb delete mode 100644 db/post_migrate/20220905090339_reset_attention_requested_merge_requests_reviewers_state_to_unreviewed.rb delete mode 100644 db/post_migrate/20220905112710_add_async_index_to_todos_to_cover_pending_query.rb delete mode 100644 db/post_migrate/20220905120848_backfill_epic_cache_counts.rb delete mode 100644 db/post_migrate/20220906074449_schedule_disable_legacy_open_source_license_for_projects_less_than_one_mb.rb delete mode 100644 db/post_migrate/20220906212931_add_partial_index_for_ci_pipeline_artifacts_unlocked_with_expire_at.rb delete mode 100644 db/post_migrate/20220907122648_populate_security_orchestration_policy_configuration_id.rb delete mode 100644 db/post_migrate/20220908125146_remove_free_user_cap_remediation_worker.rb delete mode 100644 db/post_migrate/20220909114220_drop_environments_project_name_lower_pattern_ops_index.rb delete mode 100644 db/post_migrate/20220912085047_add_index_to_todos_pending_query.rb delete mode 100644 db/post_migrate/20220912110433_prepare_create_internal_notes_index_on_id.rb delete mode 100644 db/post_migrate/20220913030552_add_tmp_index_system_note_metadata_on_attention_request_actions.rb delete mode 100644 db/post_migrate/20220913030624_cleanup_attention_request_related_system_notes.rb delete mode 100644 db/post_migrate/20220913083015_clean_up_rename_iterations_cadences_last_run_date_to_next_run_date.rb delete mode 100644 db/post_migrate/20220914093408_add_unique_id_partition_id_index_to_ci_build_metadata.rb delete mode 100644 db/post_migrate/20220915103831_add_unique_build_id_partition_id_index_to_ci_build_metadata.rb delete mode 100644 db/post_migrate/20220915192521_prepare_async_trigram_index_for_vulnerability_reads_container_images.rb delete mode 100644 db/post_migrate/20220916054103_remove_experience_level_column.rb delete mode 100644 db/post_migrate/20220916065418_add_index_id_partition_id_to_ci_builds_metadata.rb delete mode 100644 db/post_migrate/20220916070101_add_index_build_id_partition_id_to_ci_build_metadata.rb delete mode 100644 db/post_migrate/20220916112841_remove_unused_aggregation_columns.rb delete mode 100644 db/post_migrate/20220919023208_drop_unused_fields_from_merge_request_assignees.rb delete mode 100644 db/post_migrate/20220919041604_drop_unused_fields_from_merge_request_reviewers.rb delete mode 100644 db/post_migrate/20220919050555_drop_tmp_index_user_callouts_on_attention_request_feature_names.rb delete mode 100644 db/post_migrate/20220919080303_delete_migrate_shared_vulnerability_scanners.rb delete mode 100644 db/post_migrate/20220919080304_reschedule_migrate_shared_vulnerability_scanners.rb delete mode 100644 db/post_migrate/20220920081631_prepare_ci_builds_metadata_for_partitioning_primary_key.rb delete mode 100644 db/post_migrate/20220920122121_schedule_index_removal_for_ci_builds_metadata.rb delete mode 100644 db/post_migrate/20220920124709_backfill_internal_on_notes_renamed.rb delete mode 100644 db/post_migrate/20220920135356_tiebreak_user_type_index.rb delete mode 100644 db/post_migrate/20220920141001_add_index_on_internal_notes.rb delete mode 100644 db/post_migrate/20220920213504_finalize_task_system_note_renaming.rb delete mode 100644 db/post_migrate/20220920214524_remove_task_system_note_rename_temp_index.rb delete mode 100644 db/post_migrate/20220921093355_schedule_backfill_namespace_details.rb delete mode 100644 db/post_migrate/20220921111823_remove_and_add_ci_pipeline_variables_raw_with_new_default.rb delete mode 100644 db/post_migrate/20220921111831_remove_and_add_ci_group_variables_raw_with_new_default.rb delete mode 100644 db/post_migrate/20220921111840_remove_and_add_ci_instance_variables_raw_with_new_default.rb delete mode 100644 db/post_migrate/20220921111849_remove_and_add_ci_job_variables_raw_with_new_default.rb delete mode 100644 db/post_migrate/20220921111857_remove_and_add_ci_pipeline_schedule_variables_raw_with_new_default.rb delete mode 100644 db/post_migrate/20220921111907_remove_and_add_ci_variables_raw_with_new_default.rb delete mode 100644 db/post_migrate/20220921144258_remove_orphan_group_token_users.rb delete mode 100644 db/post_migrate/20220922090236_remove_trace_column_from_ci_builds.rb delete mode 100644 db/post_migrate/20220922143143_schedule_reset_duplicate_ci_runners_token_values.rb delete mode 100644 db/post_migrate/20220922143634_schedule_reset_duplicate_ci_runners_token_encrypted_values.rb delete mode 100644 db/post_migrate/20220922204106_remove_index_for_requested_non_invited_awaiting_members.rb delete mode 100644 db/post_migrate/20220923052531_remove_tmp_index_merge_request_reviewers_on_attention_requested_state.rb delete mode 100644 db/post_migrate/20220923060226_remove_tmp_index_system_note_metadata_on_attention_request_actions.rb delete mode 100644 db/post_migrate/20220927171740_prepare_for_vulnerability_occurrences_uuid_type_transition.rb delete mode 100644 db/post_migrate/20220928225711_schedule_update_ci_pipeline_artifacts_locked_status.rb delete mode 100644 db/post_migrate/20220929081645_tmp_idx_null_member_namespace_id.rb delete mode 100644 db/post_migrate/20220929091500_add_tmp_index_vulns_on_report_type.rb delete mode 100644 db/post_migrate/20220929101947_delete_remove_invalid_member_migration.rb delete mode 100644 db/post_migrate/20220929194453_add_index_releases_project_id_id.rb delete mode 100644 db/post_migrate/20220929213730_schedule_delete_orphaned_operational_vulnerabilities.rb delete mode 100644 db/post_migrate/20220930110127_remove_unique_index_build_id_to_ci_builds_metadata.rb delete mode 100644 db/post_migrate/20221002234454_finalize_group_member_namespace_id_migration.rb delete mode 100644 db/post_migrate/20221003192827_add_index_resolved_on_default_branch_to_vulnerabilities_read.rb delete mode 100644 db/post_migrate/20221004074910_routing_table_prepare_constraint_for_builds_metadata.rb delete mode 100644 db/post_migrate/20221004074914_create_routing_table_for_builds_metadata.rb delete mode 100644 db/post_migrate/20221004092038_tmp_index_members_on_id_where_namespace_id_null.rb delete mode 100644 db/post_migrate/20221004094814_schedule_destroy_invalid_members.rb delete mode 100644 db/post_migrate/20221005103000_add_index_merge_request_id_on_scan_finding_approval_merge_request_rules.rb delete mode 100644 db/post_migrate/20221006070927_finalize_invalid_member_cleanup.rb delete mode 100644 db/post_migrate/20221006083240_prepare_partial_trigram_indexes_for_issues_attempt_2.rb delete mode 100644 db/post_migrate/20221006172302_adjust_task_note_rename_background_migration_values.rb delete mode 100644 db/post_migrate/20221010074914_migrate_security_findings_delete_queues.rb delete mode 100644 db/post_migrate/20221010121510_prepare_async_index_author_id_target_project_id_on_merge_requests.rb delete mode 100644 db/post_migrate/20221010122138_add_async_index_author_id_target_project_id_on_merge_requests.rb delete mode 100644 db/post_migrate/20221010122352_add_index_to_namespace_settings_on_default_compliance_framework_id.rb delete mode 100644 db/post_migrate/20221010123040_add_compliance_framework_fk_to_namespace_settings.rb delete mode 100644 db/post_migrate/20221010141500_add_index_author_id_target_project_id_on_merge_requests.rb delete mode 100644 db/post_migrate/20221010162137_add_index_author_id_and_id_on_merge_requests.rb delete mode 100644 db/post_migrate/20221011062254_sync_new_amount_used_for_ci_project_monthly_usages.rb delete mode 100644 db/post_migrate/20221011113928_redo_remove_and_add_ci_job_variables_raw_with_new_default.rb delete mode 100644 db/post_migrate/20221012182701_remove_namespace_settings_cohort_free_user_cap_columns.rb delete mode 100644 db/post_migrate/20221013154159_update_invalid_dormant_user_setting.rb delete mode 100644 db/post_migrate/20221013215832_cleanup_vulnerability_state_transitions_with_same_from_state_to_state.rb delete mode 100644 db/post_migrate/20221017084227_cleanup_rename_ci_pipeline_metadata_title.rb delete mode 100644 db/post_migrate/20221018062308_schedule_backfill_project_namespace_details.rb delete mode 100644 db/post_migrate/20221018193635_ensure_task_note_renaming_background_migration_finished.rb delete mode 100644 db/post_migrate/20221018193827_drop_tmp_index_system_note_metadata_on_id_where_task.rb delete mode 100644 db/post_migrate/20221018232820_add_temp_index_for_user_details_fields.rb delete mode 100644 db/post_migrate/20221019002459_queue_backfill_user_details_fields.rb delete mode 100644 db/post_migrate/20221019102426_remove_tmp_index_approval_merge_request_rules_on_report_type.rb delete mode 100644 db/post_migrate/20221019105041_queue_populate_projects_star_count.rb delete mode 100644 db/post_migrate/20221019141508_add_index_to_test_reports_issue_id_created_at_and_id.rb delete mode 100644 db/post_migrate/20221019194751_disable_fastupdate_on_issues_title_gin_index.rb delete mode 100644 db/post_migrate/20221019195754_disable_fastupdate_on_issues_description_gin_index.rb delete mode 100644 db/post_migrate/20221019200033_disable_fastupdate_on_merge_requests_title_gin_index.rb delete mode 100644 db/post_migrate/20221019200206_disable_fastupdate_on_merge_requests_description_gin_index.rb delete mode 100644 db/post_migrate/20221021082720_drop_index_on_ci_runners_token.rb delete mode 100644 db/post_migrate/20221021082734_drop_index_on_ci_runners_token_encrypted.rb delete mode 100644 db/post_migrate/20221021145820_create_routing_table_for_builds_metadata_v2.rb delete mode 100644 db/post_migrate/20221021160735_add_index_for_common_finder_query_desc_with_namespace_id.rb delete mode 100644 db/post_migrate/20221024034228_remove_sprints_project_id_column.rb delete mode 100644 db/post_migrate/20221024121500_drop_fingerprint_from_sbom_sources.rb delete mode 100644 db/post_migrate/20221025115006_check_vulnerabilities_state_transition_from_state_not_equal_to_state.rb delete mode 100644 db/post_migrate/20221025220607_add_index_id_on_scan_finding_approval_merge_request_rules.rb delete mode 100644 db/post_migrate/20221027203556_delete_experiment_user_foreign_keys.rb delete mode 100644 db/post_migrate/20221027203951_drop_experiment_users_table.rb delete mode 100644 db/post_migrate/20221028000041_remove_invalid_partial_trigram_indexes_for_issues.rb delete mode 100644 db/post_migrate/20221028000603_prepare_partial_trigram_indexes_for_issues_attempt_3.rb delete mode 100644 db/post_migrate/20221028022627_add_index_on_password_last_changed_at_to_user_details.rb delete mode 100644 db/post_migrate/20221102090940_create_next_ci_partitions_record.rb delete mode 100644 db/post_migrate/20221102090943_create_second_partition_for_builds_metadata.rb delete mode 100644 db/post_migrate/20221103073328_change_member_namespace_id_not_null.rb delete mode 100644 db/post_migrate/20221103084213_remove_tmp_index_members_on_id_where_namespace_id_null.rb delete mode 100644 db/post_migrate/20221103150250_migrate_sidekiq_queued_jobs.rb delete mode 100644 db/post_migrate/20221104042137_add_partial_trigram_index_for_issue_title_attempt_2.rb delete mode 100644 db/post_migrate/20221104042159_add_partial_trigram_index_for_issue_description_attempt_2.rb delete mode 100644 db/post_migrate/20221104074652_add_temp_index_for_project_statistics_upload_size_migration.rb delete mode 100644 db/post_migrate/20221104100203_recreate_async_trigram_index_for_vulnerability_reads_container_images.rb delete mode 100644 db/post_migrate/20221104170500_add_vulnerability_reads_all_status_index.rb delete mode 100644 db/post_migrate/20221104190203_validate_environment_id_on_deployments.rb delete mode 100644 db/post_migrate/20221107094359_recount_epic_cache_counts.rb delete mode 100644 db/post_migrate/20221107184758_sync_new_amount_used_for_ci_namespace_monthly_usages.rb delete mode 100644 db/post_migrate/20221107220420_validate_not_null_constraint_on_member_namespace_id.rb delete mode 100644 db/post_migrate/20221107220526_validate_fk_member_namespace_id.rb delete mode 100644 db/post_migrate/20221107222213_remove_old_member_namespace_id_fk.rb delete mode 100644 db/post_migrate/20221108045019_truncate_timeline_event_tags_table.rb delete mode 100644 db/post_migrate/20221108121322_add_supporting_index_for_vulnerabilities_feedback_migration.rb delete mode 100644 db/post_migrate/20221108222015_remove_temp_index_on_project_features_where_releases_access_level_gt_repository.rb delete mode 100644 db/post_migrate/20221110045406_sanitize_confidential_note_todos.rb delete mode 100644 db/post_migrate/20221111070314_prepare_removal_of_issue_trigram_indexes.rb delete mode 100644 db/schema_migrations/20220126191624 delete mode 100644 db/schema_migrations/20220406193806 delete mode 100644 db/schema_migrations/20220601110011 delete mode 100644 db/schema_migrations/20220603125200 delete mode 100644 db/schema_migrations/20220606054503 delete mode 100644 db/schema_migrations/20220606080509 delete mode 100644 db/schema_migrations/20220613112029 delete mode 100644 db/schema_migrations/20220613112030 delete mode 100644 db/schema_migrations/20220613112031 delete mode 100644 db/schema_migrations/20220613112032 delete mode 100644 db/schema_migrations/20220615154500 delete mode 100644 db/schema_migrations/20220615172230 delete mode 100644 db/schema_migrations/20220616171355 delete mode 100644 db/schema_migrations/20220706145113 delete mode 100644 db/schema_migrations/20220707192420 delete mode 100644 db/schema_migrations/20220711142148 delete mode 100644 db/schema_migrations/20220721065723 delete mode 100644 db/schema_migrations/20220726171440 delete mode 100644 db/schema_migrations/20220726171450 delete mode 100644 db/schema_migrations/20220726225114 delete mode 100644 db/schema_migrations/20220801155858 delete mode 100644 db/schema_migrations/20220802200719 delete mode 100644 db/schema_migrations/20220802202505 delete mode 100644 db/schema_migrations/20220803004853 delete mode 100644 db/schema_migrations/20220803235114 delete mode 100644 db/schema_migrations/20220805180311 delete mode 100644 db/schema_migrations/20220805183952 delete mode 100644 db/schema_migrations/20220805193117 delete mode 100644 db/schema_migrations/20220809002011 delete mode 100644 db/schema_migrations/20220809214730 delete mode 100644 db/schema_migrations/20220809223215 delete mode 100644 db/schema_migrations/20220815061621 delete mode 100644 db/schema_migrations/20220815152905 delete mode 100644 db/schema_migrations/20220816075638 delete mode 100644 db/schema_migrations/20220816135816 delete mode 100644 db/schema_migrations/20220816163444 delete mode 100644 db/schema_migrations/20220817122907 delete mode 100644 db/schema_migrations/20220818095225 delete mode 100644 db/schema_migrations/20220818125332 delete mode 100644 db/schema_migrations/20220818125703 delete mode 100644 db/schema_migrations/20220818132108 delete mode 100644 db/schema_migrations/20220818140553 delete mode 100644 db/schema_migrations/20220819153725 delete mode 100644 db/schema_migrations/20220819162852 delete mode 100644 db/schema_migrations/20220819184945 delete mode 100644 db/schema_migrations/20220820221036 delete mode 100644 db/schema_migrations/20220822071909 delete mode 100644 db/schema_migrations/20220822090656 delete mode 100644 db/schema_migrations/20220822094804 delete mode 100644 db/schema_migrations/20220822102651 delete mode 100644 db/schema_migrations/20220822103638 delete mode 100644 db/schema_migrations/20220823084747 delete mode 100644 db/schema_migrations/20220824114218 delete mode 100644 db/schema_migrations/20220824175648 delete mode 100644 db/schema_migrations/20220824194103 delete mode 100644 db/schema_migrations/20220825061250 delete mode 100644 db/schema_migrations/20220825105631 delete mode 100644 db/schema_migrations/20220825134827 delete mode 100644 db/schema_migrations/20220825142324 delete mode 100644 db/schema_migrations/20220826165048 delete mode 100644 db/schema_migrations/20220826175058 delete mode 100644 db/schema_migrations/20220828094411 delete mode 100644 db/schema_migrations/20220828131848 delete mode 100644 db/schema_migrations/20220829183356 delete mode 100644 db/schema_migrations/20220830051704 delete mode 100644 db/schema_migrations/20220830061704 delete mode 100644 db/schema_migrations/20220830071704 delete mode 100644 db/schema_migrations/20220830082928 delete mode 100644 db/schema_migrations/20220830114228 delete mode 100644 db/schema_migrations/20220830172142 delete mode 100644 db/schema_migrations/20220831021358 delete mode 100644 db/schema_migrations/20220831090454 delete mode 100644 db/schema_migrations/20220831132802 delete mode 100644 db/schema_migrations/20220831182105 delete mode 100644 db/schema_migrations/20220901035722 delete mode 100644 db/schema_migrations/20220901035725 delete mode 100644 db/schema_migrations/20220901071310 delete mode 100644 db/schema_migrations/20220901071355 delete mode 100644 db/schema_migrations/20220901073300 delete mode 100644 db/schema_migrations/20220901090004 delete mode 100644 db/schema_migrations/20220901092853 delete mode 100644 db/schema_migrations/20220901114501 delete mode 100644 db/schema_migrations/20220901124637 delete mode 100644 db/schema_migrations/20220901131828 delete mode 100644 db/schema_migrations/20220901184106 delete mode 100644 db/schema_migrations/20220901184246 delete mode 100644 db/schema_migrations/20220901212027 delete mode 100644 db/schema_migrations/20220902065314 delete mode 100644 db/schema_migrations/20220902065316 delete mode 100644 db/schema_migrations/20220902065317 delete mode 100644 db/schema_migrations/20220902065558 delete mode 100644 db/schema_migrations/20220902065611 delete mode 100644 db/schema_migrations/20220902065623 delete mode 100644 db/schema_migrations/20220902065635 delete mode 100644 db/schema_migrations/20220902065647 delete mode 100644 db/schema_migrations/20220902111016 delete mode 100644 db/schema_migrations/20220902111038 delete mode 100644 db/schema_migrations/20220902165931 delete mode 100644 db/schema_migrations/20220902170131 delete mode 100644 db/schema_migrations/20220902204048 delete mode 100644 db/schema_migrations/20220904173342 delete mode 100644 db/schema_migrations/20220904173430 delete mode 100644 db/schema_migrations/20220905090300 delete mode 100644 db/schema_migrations/20220905090339 delete mode 100644 db/schema_migrations/20220905112710 delete mode 100644 db/schema_migrations/20220905120848 delete mode 100644 db/schema_migrations/20220906074449 delete mode 100644 db/schema_migrations/20220906093857 delete mode 100644 db/schema_migrations/20220906155105 delete mode 100644 db/schema_migrations/20220906204832 delete mode 100644 db/schema_migrations/20220906212931 delete mode 100644 db/schema_migrations/20220907115806 delete mode 100644 db/schema_migrations/20220907122648 delete mode 100644 db/schema_migrations/20220907124320 delete mode 100644 db/schema_migrations/20220908125146 delete mode 100644 db/schema_migrations/20220909091410 delete mode 100644 db/schema_migrations/20220909094752 delete mode 100644 db/schema_migrations/20220909113809 delete mode 100644 db/schema_migrations/20220909114220 delete mode 100644 db/schema_migrations/20220912085047 delete mode 100644 db/schema_migrations/20220912110433 delete mode 100644 db/schema_migrations/20220912153839 delete mode 100644 db/schema_migrations/20220912180807 delete mode 100644 db/schema_migrations/20220913030552 delete mode 100644 db/schema_migrations/20220913030624 delete mode 100644 db/schema_migrations/20220913043728 delete mode 100644 db/schema_migrations/20220913082728 delete mode 100644 db/schema_migrations/20220913082824 delete mode 100644 db/schema_migrations/20220913082930 delete mode 100644 db/schema_migrations/20220913083015 delete mode 100644 db/schema_migrations/20220913084123 delete mode 100644 db/schema_migrations/20220914005141 delete mode 100644 db/schema_migrations/20220914010233 delete mode 100644 db/schema_migrations/20220914070927 delete mode 100644 db/schema_migrations/20220914080716 delete mode 100644 db/schema_migrations/20220914093408 delete mode 100644 db/schema_migrations/20220914112457 delete mode 100644 db/schema_migrations/20220914130800 delete mode 100644 db/schema_migrations/20220914131449 delete mode 100644 db/schema_migrations/20220914174705 delete mode 100644 db/schema_migrations/20220915103831 delete mode 100644 db/schema_migrations/20220915140802 delete mode 100644 db/schema_migrations/20220915192521 delete mode 100644 db/schema_migrations/20220916054103 delete mode 100644 db/schema_migrations/20220916065418 delete mode 100644 db/schema_migrations/20220916070101 delete mode 100644 db/schema_migrations/20220916094641 delete mode 100644 db/schema_migrations/20220916103311 delete mode 100644 db/schema_migrations/20220916112841 delete mode 100644 db/schema_migrations/20220918124223 delete mode 100644 db/schema_migrations/20220919023208 delete mode 100644 db/schema_migrations/20220919041604 delete mode 100644 db/schema_migrations/20220919050555 delete mode 100644 db/schema_migrations/20220919062640 delete mode 100644 db/schema_migrations/20220919080303 delete mode 100644 db/schema_migrations/20220919080304 delete mode 100644 db/schema_migrations/20220919225631 delete mode 100644 db/schema_migrations/20220920022404 delete mode 100644 db/schema_migrations/20220920081631 delete mode 100644 db/schema_migrations/20220920122121 delete mode 100644 db/schema_migrations/20220920124709 delete mode 100644 db/schema_migrations/20220920135356 delete mode 100644 db/schema_migrations/20220920135632 delete mode 100644 db/schema_migrations/20220920135717 delete mode 100644 db/schema_migrations/20220920141001 delete mode 100644 db/schema_migrations/20220920213504 delete mode 100644 db/schema_migrations/20220920214524 delete mode 100644 db/schema_migrations/20220921093355 delete mode 100644 db/schema_migrations/20220921111823 delete mode 100644 db/schema_migrations/20220921111831 delete mode 100644 db/schema_migrations/20220921111840 delete mode 100644 db/schema_migrations/20220921111849 delete mode 100644 db/schema_migrations/20220921111857 delete mode 100644 db/schema_migrations/20220921111907 delete mode 100644 db/schema_migrations/20220921144258 delete mode 100644 db/schema_migrations/20220921174815 delete mode 100644 db/schema_migrations/20220921201347 delete mode 100644 db/schema_migrations/20220922090236 delete mode 100644 db/schema_migrations/20220922143143 delete mode 100644 db/schema_migrations/20220922143612 delete mode 100644 db/schema_migrations/20220922143634 delete mode 100644 db/schema_migrations/20220922204106 delete mode 100644 db/schema_migrations/20220923052531 delete mode 100644 db/schema_migrations/20220923060226 delete mode 100644 db/schema_migrations/20220923103006 delete mode 100644 db/schema_migrations/20220926023734 delete mode 100644 db/schema_migrations/20220927155407 delete mode 100644 db/schema_migrations/20220927171740 delete mode 100644 db/schema_migrations/20220928201920 delete mode 100644 db/schema_migrations/20220928225711 delete mode 100644 db/schema_migrations/20220929081645 delete mode 100644 db/schema_migrations/20220929091500 delete mode 100644 db/schema_migrations/20220929101947 delete mode 100644 db/schema_migrations/20220929171925 delete mode 100644 db/schema_migrations/20220929172356 delete mode 100644 db/schema_migrations/20220929194453 delete mode 100644 db/schema_migrations/20220929213730 delete mode 100644 db/schema_migrations/20220930110127 delete mode 100644 db/schema_migrations/20220930125609 delete mode 100644 db/schema_migrations/20221002234454 delete mode 100644 db/schema_migrations/20221003151747 delete mode 100644 db/schema_migrations/20221003192827 delete mode 100644 db/schema_migrations/20221004074910 delete mode 100644 db/schema_migrations/20221004074914 delete mode 100644 db/schema_migrations/20221004092038 delete mode 100644 db/schema_migrations/20221004094814 delete mode 100644 db/schema_migrations/20221005072353 delete mode 100644 db/schema_migrations/20221005094926 delete mode 100644 db/schema_migrations/20221005103000 delete mode 100644 db/schema_migrations/20221005103010 delete mode 100644 db/schema_migrations/20221006070927 delete mode 100644 db/schema_migrations/20221006083240 delete mode 100644 db/schema_migrations/20221006131506 delete mode 100644 db/schema_migrations/20221006141145 delete mode 100644 db/schema_migrations/20221006172302 delete mode 100644 db/schema_migrations/20221008032350 delete mode 100644 db/schema_migrations/20221009085130 delete mode 100644 db/schema_migrations/20221010074914 delete mode 100644 db/schema_migrations/20221010103207 delete mode 100644 db/schema_migrations/20221010121510 delete mode 100644 db/schema_migrations/20221010121807 delete mode 100644 db/schema_migrations/20221010122138 delete mode 100644 db/schema_migrations/20221010122352 delete mode 100644 db/schema_migrations/20221010123040 delete mode 100644 db/schema_migrations/20221010141500 delete mode 100644 db/schema_migrations/20221010162137 delete mode 100644 db/schema_migrations/20221010184839 delete mode 100644 db/schema_migrations/20221010201815 delete mode 100644 db/schema_migrations/20221010202339 delete mode 100644 db/schema_migrations/20221010202408 delete mode 100644 db/schema_migrations/20221011062254 delete mode 100644 db/schema_migrations/20221011113928 delete mode 100644 db/schema_migrations/20221011162637 delete mode 100644 db/schema_migrations/20221011210455 delete mode 100644 db/schema_migrations/20221012033107 delete mode 100644 db/schema_migrations/20221012135524 delete mode 100644 db/schema_migrations/20221012182701 delete mode 100644 db/schema_migrations/20221013103738 delete mode 100644 db/schema_migrations/20221013154159 delete mode 100644 db/schema_migrations/20221013215832 delete mode 100644 db/schema_migrations/20221014031033 delete mode 100644 db/schema_migrations/20221014034338 delete mode 100644 db/schema_migrations/20221014190040 delete mode 100644 db/schema_migrations/20221015000511 delete mode 100644 db/schema_migrations/20221017084208 delete mode 100644 db/schema_migrations/20221017084227 delete mode 100644 db/schema_migrations/20221018050323 delete mode 100644 db/schema_migrations/20221018062308 delete mode 100644 db/schema_migrations/20221018081416 delete mode 100644 db/schema_migrations/20221018092552 delete mode 100644 db/schema_migrations/20221018124029 delete mode 100644 db/schema_migrations/20221018124035 delete mode 100644 db/schema_migrations/20221018193635 delete mode 100644 db/schema_migrations/20221018193827 delete mode 100644 db/schema_migrations/20221018202524 delete mode 100644 db/schema_migrations/20221018232820 delete mode 100644 db/schema_migrations/20221019002459 delete mode 100644 db/schema_migrations/20221019102426 delete mode 100644 db/schema_migrations/20221019105041 delete mode 100644 db/schema_migrations/20221019141508 delete mode 100644 db/schema_migrations/20221019194751 delete mode 100644 db/schema_migrations/20221019195754 delete mode 100644 db/schema_migrations/20221019200033 delete mode 100644 db/schema_migrations/20221019200206 delete mode 100644 db/schema_migrations/20221020124018 delete mode 100644 db/schema_migrations/20221021082720 delete mode 100644 db/schema_migrations/20221021082734 delete mode 100644 db/schema_migrations/20221021145820 delete mode 100644 db/schema_migrations/20221021160735 delete mode 100644 db/schema_migrations/20221021213216 delete mode 100644 db/schema_migrations/20221022213505 delete mode 100644 db/schema_migrations/20221022213521 delete mode 100644 db/schema_migrations/20221024034228 delete mode 100644 db/schema_migrations/20221024121500 delete mode 100644 db/schema_migrations/20221025043930 delete mode 100644 db/schema_migrations/20221025105205 delete mode 100644 db/schema_migrations/20221025115006 delete mode 100644 db/schema_migrations/20221025145452 delete mode 100644 db/schema_migrations/20221025150202 delete mode 100644 db/schema_migrations/20221025220607 delete mode 100644 db/schema_migrations/20221027124848 delete mode 100644 db/schema_migrations/20221027203556 delete mode 100644 db/schema_migrations/20221027203951 delete mode 100644 db/schema_migrations/20221028000041 delete mode 100644 db/schema_migrations/20221028000603 delete mode 100644 db/schema_migrations/20221028015347 delete mode 100644 db/schema_migrations/20221028022627 delete mode 100644 db/schema_migrations/20221028152422 delete mode 100644 db/schema_migrations/20221031102916 delete mode 100644 db/schema_migrations/20221101032521 delete mode 100644 db/schema_migrations/20221101032600 delete mode 100644 db/schema_migrations/20221101195903 delete mode 100644 db/schema_migrations/20221101201031 delete mode 100644 db/schema_migrations/20221102090940 delete mode 100644 db/schema_migrations/20221102090943 delete mode 100644 db/schema_migrations/20221102202130 delete mode 100644 db/schema_migrations/20221102225800 delete mode 100644 db/schema_migrations/20221103073328 delete mode 100644 db/schema_migrations/20221103084213 delete mode 100644 db/schema_migrations/20221103131409 delete mode 100644 db/schema_migrations/20221103150250 delete mode 100644 db/schema_migrations/20221104042137 delete mode 100644 db/schema_migrations/20221104042159 delete mode 100644 db/schema_migrations/20221104061320 delete mode 100644 db/schema_migrations/20221104074652 delete mode 100644 db/schema_migrations/20221104094042 delete mode 100644 db/schema_migrations/20221104100203 delete mode 100644 db/schema_migrations/20221104170500 delete mode 100644 db/schema_migrations/20221104190203 delete mode 100644 db/schema_migrations/20221107094359 delete mode 100644 db/schema_migrations/20221107115247 delete mode 100644 db/schema_migrations/20221107115413 delete mode 100644 db/schema_migrations/20221107183222 delete mode 100644 db/schema_migrations/20221107184542 delete mode 100644 db/schema_migrations/20221107184758 delete mode 100644 db/schema_migrations/20221107220420 delete mode 100644 db/schema_migrations/20221107220526 delete mode 100644 db/schema_migrations/20221107222213 delete mode 100644 db/schema_migrations/20221108015813 delete mode 100644 db/schema_migrations/20221108045019 delete mode 100644 db/schema_migrations/20221108121322 delete mode 100644 db/schema_migrations/20221108185442 delete mode 100644 db/schema_migrations/20221108222015 delete mode 100644 db/schema_migrations/20221110045406 delete mode 100644 db/schema_migrations/20221110105857 delete mode 100644 db/schema_migrations/20221110150942 delete mode 100644 db/schema_migrations/20221111070314 delete mode 100644 ee/spec/migrations/20220831132802_delete_approval_rules_for_vulnerability_spec.rb delete mode 100644 ee/spec/migrations/20220907122648_populate_security_orchestration_policy_configuration_id_spec.rb delete mode 100644 ee/spec/migrations/update_can_create_group_application_setting_spec.rb delete mode 100644 spec/lib/gitlab/background_migration/backfill_project_member_namespace_id_spec.rb delete mode 100644 spec/lib/gitlab/background_migration/destroy_invalid_group_members_spec.rb delete mode 100644 spec/lib/gitlab/background_migration/destroy_invalid_project_members_spec.rb delete mode 100644 spec/migrations/20221002234454_finalize_group_member_namespace_id_migration_spec.rb delete mode 100644 spec/migrations/20221018050323_add_objective_and_keyresult_to_work_item_types_spec.rb delete mode 100644 spec/migrations/20221018062308_schedule_backfill_project_namespace_details_spec.rb delete mode 100644 spec/migrations/20221018193635_ensure_task_note_renaming_background_migration_finished_spec.rb delete mode 100644 spec/migrations/20221021145820_create_routing_table_for_builds_metadata_v2_spec.rb delete mode 100644 spec/migrations/20221025043930_change_default_value_on_password_last_changed_at_to_user_details_spec.rb delete mode 100644 spec/migrations/20221028022627_add_index_on_password_last_changed_at_to_user_details_spec.rb delete mode 100644 spec/migrations/20221101032521_add_default_preferred_language_to_application_settings_spec.rb delete mode 100644 spec/migrations/20221101032600_add_text_limit_to_default_preferred_language_on_application_settings_spec.rb delete mode 100644 spec/migrations/20221102090940_create_next_ci_partitions_record_spec.rb delete mode 100644 spec/migrations/20221102090943_create_second_partition_for_builds_metadata_spec.rb delete mode 100644 spec/migrations/cleanup_vulnerability_state_transitions_with_same_from_state_to_state_spec.rb delete mode 100644 spec/migrations/delete_migrate_shared_vulnerability_scanners_spec.rb delete mode 100644 spec/migrations/finalize_invalid_member_cleanup_spec.rb delete mode 100644 spec/migrations/queue_backfill_user_details_fields_spec.rb delete mode 100644 spec/migrations/queue_populate_projects_star_count_spec.rb delete mode 100644 spec/migrations/recount_epic_cache_counts_spec.rb delete mode 100644 spec/migrations/reschedule_migrate_shared_vulnerability_scanners_spec.rb delete mode 100644 spec/migrations/set_email_confirmation_setting_from_send_user_confirmation_email_setting_spec.rb delete mode 100644 spec/migrations/sync_new_amount_used_for_ci_namespace_monthly_usages_spec.rb delete mode 100644 spec/migrations/sync_new_amount_used_for_ci_project_monthly_usages_spec.rb diff --git a/.gitlab/ci/database.gitlab-ci.yml b/.gitlab/ci/database.gitlab-ci.yml index 6ca8a9bbc36b..b01ba247ce7c 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=20220126191624 # 15.4 + - bundle exec rake db:migrate VERSION=20221111123146 # 15.7 - 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 052a1b1bb7e0..55d6c9799bbe 100644 --- a/.rubocop_todo/layout/argument_alignment.yml +++ b/.rubocop_todo/layout/argument_alignment.yml @@ -510,21 +510,8 @@ Layout/ArgumentAlignment: - 'config/initializers/rack_timeout.rb' - 'config/initializers/rest-client-hostname_override.rb' - 'config/initializers/zz_metrics.rb' - - 'db/migrate/20220711142148_add_invitation_flow_enforcement_to_application_settings.rb' - - 'db/migrate/20220816135816_create_sbom_vulnerable_component_versions.rb' - 'db/migrate/20220824082427_remove_tmp_idx_vulnerability_occurrences_on_id_and_scanner_id.rb' - - 'db/migrate/20220828131848_create_packages_rpm_metadata.rb' - - 'db/migrate/20220913043728_create_user_phone_number_validations.rb' - - 'db/migrate/20220923103006_add_ci_pipeline_metadata_title.rb' - - 'db/migrate/20221003151747_create_audit_events_streaming_event_type_filters.rb' - - 'db/migrate/20221008032350_add_password_expiration_migration.rb' - - 'db/migrate/20221009085130_add_mr_checks_columns_to_namespace_settings.rb' - - 'db/migrate/20221014031033_add_temp_index_to_project_features_where_releases_access_level_gt_repository.rb' - - 'db/migrate/20221020124018_add_delete_started_at_to_container_repositories.rb' - - 'db/migrate/20221025043930_change_default_value_on_password_last_changed_at_to_user_details.rb' - - 'db/migrate/20221025145452_change_vulnerability_feedback_unique_idx.rb' - 'db/migrate/20221103205317_create_dast_pre_scan_verification.rb' - - 'db/migrate/20221104061320_add_disable_download_button_into_application_settings.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' @@ -542,22 +529,8 @@ Layout/ArgumentAlignment: - '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/20220606054503_add_tmp_index_job_artifacts_id_and_expire_at.rb' - - 'db/post_migrate/20220616171355_update_vulnerabilities_project_id_id_active_cis_index.rb' - - 'db/post_migrate/20220726225114_remove_tmp_index_group_membership_namespace_id_column.rb' - - 'db/post_migrate/20220820221036_update_tmp_non_migrated_index_on_container_repositories.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/20220916112841_remove_unused_aggregation_columns.rb' - - 'db/post_migrate/20220919080303_delete_migrate_shared_vulnerability_scanners.rb' - - 'db/post_migrate/20220929081645_tmp_idx_null_member_namespace_id.rb' - - 'db/post_migrate/20221003192827_add_index_resolved_on_default_branch_to_vulnerabilities_read.rb' - - 'db/post_migrate/20221004092038_tmp_index_members_on_id_where_namespace_id_null.rb' - - 'db/post_migrate/20221010123040_add_compliance_framework_fk_to_namespace_settings.rb' - - 'db/post_migrate/20221021082720_drop_index_on_ci_runners_token.rb' - - 'db/post_migrate/20221021082734_drop_index_on_ci_runners_token_encrypted.rb' - - 'db/post_migrate/20221021160735_add_index_for_common_finder_query_desc_with_namespace_id.rb' - - 'db/post_migrate/20221108222015_remove_temp_index_on_project_features_where_releases_access_level_gt_repository.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' diff --git a/.rubocop_todo/layout/empty_line_after_magic_comment.yml b/.rubocop_todo/layout/empty_line_after_magic_comment.yml index b0ddd74796d0..409acc4b5c18 100644 --- a/.rubocop_todo/layout/empty_line_after_magic_comment.yml +++ b/.rubocop_todo/layout/empty_line_after_magic_comment.yml @@ -127,8 +127,6 @@ Layout/EmptyLineAfterMagicComment: - 'danger/ce_ee_vue_templates/Dangerfile' - 'danger/feature_flag/Dangerfile' - 'danger/pajamas/Dangerfile' - - 'db/migrate/20221107115247_change_scim_identity_group_id_remove_null.rb' - - 'db/migrate/20221107115413_change_scim_oauth_access_token_group_id_remove_null.rb' - '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' @@ -136,10 +134,6 @@ Layout/EmptyLineAfterMagicComment: - '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/20220901071355_cleanup_attention_request_user_callouts.rb' - - 'db/post_migrate/20220929091500_add_tmp_index_vulns_on_report_type.rb' - - 'db/post_migrate/20221004094814_schedule_destroy_invalid_members.rb' - - 'db/post_migrate/20221104170500_add_vulnerability_reads_all_status_index.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' diff --git a/.rubocop_todo/layout/line_end_string_concatenation_indentation.yml b/.rubocop_todo/layout/line_end_string_concatenation_indentation.yml index 68d0f57006e2..7bc8d0955852 100644 --- a/.rubocop_todo/layout/line_end_string_concatenation_indentation.yml +++ b/.rubocop_todo/layout/line_end_string_concatenation_indentation.yml @@ -39,7 +39,6 @@ Layout/LineEndStringConcatenationIndentation: - 'config/initializers/wikicloth_redos_patch.rb' - 'config/initializers/wikicloth_ruby_3_patch.rb' - 'danger/database/Dangerfile' - - 'db/post_migrate/20220920081631_prepare_ci_builds_metadata_for_partitioning_primary_key.rb' - 'ee/app/components/namespaces/free_user_cap/usage_quota_alert_component.rb' - 'ee/app/controllers/admin/licenses_controller.rb' - 'ee/app/controllers/concerns/insights_actions.rb' diff --git a/.rubocop_todo/layout/trailing_whitespace.yml b/.rubocop_todo/layout/trailing_whitespace.yml index 26d0b8f5f136..c7162b7c15aa 100644 --- a/.rubocop_todo/layout/trailing_whitespace.yml +++ b/.rubocop_todo/layout/trailing_whitespace.yml @@ -3,8 +3,6 @@ Layout/TrailingWhitespace: Exclude: - 'app/models/concerns/analytics/cycle_analytics/stage_event_model.rb' - - 'db/migrate/20220913082728_drop_index_cadence_create_iterations_automation.rb' - - 'db/post_migrate/20220816163444_update_start_date_for_iterations_cadences.rb' - 'lib/gitlab/pagination/keyset/sql_type_missing_error.rb' - 'spec/services/suggestions/apply_service_spec.rb' - 'spec/support/helpers/x509_helpers.rb' diff --git a/.rubocop_todo/lint/assignment_in_condition.yml b/.rubocop_todo/lint/assignment_in_condition.yml index 4d2158b7a9d3..20a51d0c774a 100644 --- a/.rubocop_todo/lint/assignment_in_condition.yml +++ b/.rubocop_todo/lint/assignment_in_condition.yml @@ -94,7 +94,6 @@ Lint/AssignmentInCondition: - 'config/initializers/peek.rb' - 'config/initializers/validate_database_config.rb' - 'config/initializers/zz_metrics.rb' - - 'db/post_migrate/20220919080303_delete_migrate_shared_vulnerability_scanners.rb' - 'ee/app/controllers/concerns/gitlab_subscriptions/seat_count_alert.rb' - 'ee/app/controllers/omniauth_kerberos_controller.rb' - 'ee/app/controllers/users/identity_verification_controller.rb' diff --git a/.rubocop_todo/lint/redundant_cop_disable_directive.yml b/.rubocop_todo/lint/redundant_cop_disable_directive.yml index a369c5271043..38c75390cc83 100644 --- a/.rubocop_todo/lint/redundant_cop_disable_directive.yml +++ b/.rubocop_todo/lint/redundant_cop_disable_directive.yml @@ -76,7 +76,6 @@ Lint/RedundantCopDisableDirective: - 'config/initializers/wikicloth_redos_patch.rb' - 'config/initializers/wikicloth_ruby_3_patch.rb' - 'config/routes/api.rb' - - 'db/post_migrate/20220902204048_move_security_findings_table_to_gitlab_partitions_dynamic_schema.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' @@ -240,7 +239,6 @@ Lint/RedundantCopDisableDirective: - 'spec/helpers/releases_helper_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_project_member_namespace_id_spec.rb' - 'spec/lib/gitlab/background_migration/backfill_vulnerability_reads_cluster_agent_spec.rb' - 'spec/lib/gitlab/background_migration/batching_strategies/backfill_project_statistics_with_container_registry_size_batching_strategy_spec.rb' - 'spec/lib/gitlab/background_migration/batching_strategies/remove_backfilled_job_artifacts_expire_at_batching_strategy_spec.rb' diff --git a/.rubocop_todo/rspec/expect_change.yml b/.rubocop_todo/rspec/expect_change.yml index fbd8acaf14cf..235ee63b230a 100644 --- a/.rubocop_todo/rspec/expect_change.yml +++ b/.rubocop_todo/rspec/expect_change.yml @@ -238,11 +238,6 @@ RSpec/ExpectChange: - 'spec/lib/gitlab/legacy_github_import/project_creator_spec.rb' - 'spec/lib/gitlab/query_limiting/transaction_spec.rb' - 'spec/lib/gitlab/usage_data_counters/kubernetes_agent_counter_spec.rb' - - 'spec/migrations/20221018050323_add_objective_and_keyresult_to_work_item_types_spec.rb' - - 'spec/migrations/20221018193635_ensure_task_note_renaming_background_migration_finished_spec.rb' - - 'spec/migrations/20221102090940_create_next_ci_partitions_record_spec.rb' - - 'spec/migrations/cleanup_vulnerability_state_transitions_with_same_from_state_to_state_spec.rb' - - 'spec/migrations/delete_migrate_shared_vulnerability_scanners_spec.rb' - 'spec/models/ci/build_metadata_spec.rb' - 'spec/models/ci/build_spec.rb' - 'spec/models/ci/job_artifact_spec.rb' diff --git a/.rubocop_todo/rspec/feature_category.yml b/.rubocop_todo/rspec/feature_category.yml index fb8e7eecc64f..ad42026a0793 100644 --- a/.rubocop_todo/rspec/feature_category.yml +++ b/.rubocop_todo/rspec/feature_category.yml @@ -2791,7 +2791,6 @@ RSpec/FeatureCategory: - 'spec/lib/gitlab/background_migration/backfill_note_discussion_id_spec.rb' - 'spec/lib/gitlab/background_migration/backfill_project_feature_package_registry_access_level_spec.rb' - 'spec/lib/gitlab/background_migration/backfill_project_import_level_spec.rb' - - 'spec/lib/gitlab/background_migration/backfill_project_member_namespace_id_spec.rb' - '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' @@ -2808,9 +2807,7 @@ RSpec/FeatureCategory: - 'spec/lib/gitlab/background_migration/delete_orphaned_operational_vulnerabilities_spec.rb' - 'spec/lib/gitlab/background_migration/delete_orphans_approval_merge_request_rules_spec.rb' - 'spec/lib/gitlab/background_migration/delete_orphans_approval_project_rules_spec.rb' - - 'spec/lib/gitlab/background_migration/destroy_invalid_group_members_spec.rb' - 'spec/lib/gitlab/background_migration/destroy_invalid_members_spec.rb' - - 'spec/lib/gitlab/background_migration/destroy_invalid_project_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' diff --git a/.rubocop_todo/rspec/named_subject.yml b/.rubocop_todo/rspec/named_subject.yml index 2c8c6dfd87a6..152d2068e0cf 100644 --- a/.rubocop_todo/rspec/named_subject.yml +++ b/.rubocop_todo/rspec/named_subject.yml @@ -2578,8 +2578,6 @@ RSpec/NamedSubject: - 'spec/mailers/emails/merge_requests_spec.rb' - 'spec/mailers/notify_spec.rb' - 'spec/metrics_server/metrics_server_spec.rb' - - 'spec/migrations/20221028022627_add_index_on_password_last_changed_at_to_user_details_spec.rb' - - 'spec/migrations/20221101032600_add_text_limit_to_default_preferred_language_on_application_settings_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' diff --git a/.rubocop_todo/style/inline_disable_annotation.yml b/.rubocop_todo/style/inline_disable_annotation.yml index 31641ee0dd80..644c6fa726b7 100644 --- a/.rubocop_todo/style/inline_disable_annotation.yml +++ b/.rubocop_todo/style/inline_disable_annotation.yml @@ -1120,16 +1120,6 @@ Style/InlineDisableAnnotation: - 'config/routes/project.rb' - 'danger/ce_ee_vue_templates/Dangerfile' - 'danger/roulette/Dangerfile' - - 'db/migrate/20220802200719_add_user_details_profile_fields.rb' - - 'db/migrate/20220818125332_add_jitsu_tracking_columns_to_application_settings.rb' - - 'db/migrate/20220825105631_add_cube_api_key_to_application_settings.rb' - - 'db/migrate/20220902065317_add_partition_id_to_ci_builds.rb' - - 'db/migrate/20220914130800_add_jitsu_key_to_projects.rb' - - 'db/migrate/20220920135632_add_jira_connect_proxy_url_setting.rb' - - 'db/migrate/20220926023734_add_mirror_branch_regex_to_project_settings.rb' - - 'db/migrate/20221014034338_populate_releases_access_level_from_repository.rb' - - 'db/migrate/20221025043930_change_default_value_on_password_last_changed_at_to_user_details.rb' - - 'db/migrate/20221101032521_add_default_preferred_language_to_application_settings.rb' - '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' @@ -1190,16 +1180,6 @@ 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/20220822090656_drop_build_coverage_regex_from_project.rb' - - 'db/post_migrate/20220830061704_orphaned_invited_members_cleanup.rb' - - 'db/post_migrate/20220901071355_cleanup_attention_request_user_callouts.rb' - - 'db/post_migrate/20220902204048_move_security_findings_table_to_gitlab_partitions_dynamic_schema.rb' - - 'db/post_migrate/20220919023208_drop_unused_fields_from_merge_request_assignees.rb' - - 'db/post_migrate/20220919080303_delete_migrate_shared_vulnerability_scanners.rb' - - 'db/post_migrate/20220920135356_tiebreak_user_type_index.rb' - - 'db/post_migrate/20221006172302_adjust_task_note_rename_background_migration_values.rb' - - 'db/post_migrate/20221013154159_update_invalid_dormant_user_setting.rb' - - 'db/post_migrate/20221018232820_add_temp_index_for_user_details_fields.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' @@ -2912,7 +2892,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_member_namespace_id_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' @@ -2927,9 +2906,7 @@ Style/InlineDisableAnnotation: - 'spec/lib/gitlab/background_migration/convert_credit_card_validation_data_to_hashes_spec.rb' - 'spec/lib/gitlab/background_migration/delete_orphans_approval_merge_request_rules2_spec.rb' - 'spec/lib/gitlab/background_migration/delete_orphans_approval_project_rules2_spec.rb' - - 'spec/lib/gitlab/background_migration/destroy_invalid_group_members_spec.rb' - 'spec/lib/gitlab/background_migration/destroy_invalid_members_spec.rb' - - 'spec/lib/gitlab/background_migration/destroy_invalid_project_members_spec.rb' - 'spec/lib/gitlab/background_migration/fix_allow_descendants_override_disabled_shared_runners_spec.rb' - 'spec/lib/gitlab/background_migration/fix_incoherent_packages_size_on_project_statistics_spec.rb' - 'spec/lib/gitlab/background_migration/fix_vulnerability_reads_has_issues_spec.rb' diff --git a/db/init_structure.sql b/db/init_structure.sql index 19e634df86e1..491ceb59332d 100644 --- a/db/init_structure.sql +++ b/db/init_structure.sql @@ -225,6 +225,33 @@ RETURN NULL; END $$; +CREATE FUNCTION sync_namespaces_amount_used_columns() RETURNS trigger + LANGUAGE plpgsql + AS $$ +BEGIN + NEW."new_amount_used" := NEW."amount_used"; + RETURN NEW; +END; +$$; + +CREATE FUNCTION sync_projects_amount_used_columns() RETURNS trigger + LANGUAGE plpgsql + AS $$ +BEGIN + NEW."new_amount_used" := NEW."amount_used"; + RETURN NEW; +END; +$$; + +CREATE FUNCTION trigger_1a857e8db6cd() RETURNS trigger + LANGUAGE plpgsql + AS $$ +BEGIN + NEW."uuid_convert_string_to_uuid" := NEW."uuid"; + RETURN NEW; +END; +$$; + CREATE FUNCTION unset_has_issues_on_vulnerability_reads() RETURNS trigger LANGUAGE plpgsql AS $$ @@ -423,6 +450,23 @@ CREATE TABLE loose_foreign_keys_deleted_records ( ) PARTITION BY LIST (partition); +CREATE TABLE security_findings ( + id bigint NOT NULL, + scan_id bigint NOT NULL, + scanner_id bigint NOT NULL, + severity smallint NOT NULL, + confidence smallint, + project_fingerprint text, + deduplicated boolean DEFAULT false NOT NULL, + uuid uuid, + overridden_uuid uuid, + partition_number integer DEFAULT 1 NOT NULL, + finding_data jsonb DEFAULT '{}'::jsonb NOT NULL, + CONSTRAINT check_6c2851a8c9 CHECK ((uuid IS NOT NULL)), + CONSTRAINT check_b9508c6df8 CHECK ((char_length(project_fingerprint) <= 40)) +) +PARTITION BY LIST (partition_number); + CREATE TABLE verification_codes ( created_at timestamp with time zone DEFAULT now() NOT NULL, visitor_id_code text NOT NULL, @@ -10767,18 +10811,12 @@ CREATE TABLE analytics_cycle_analytics_aggregations ( group_id bigint NOT NULL, incremental_runtimes_in_seconds integer[] DEFAULT '{}'::integer[] NOT NULL, incremental_processed_records integer[] DEFAULT '{}'::integer[] NOT NULL, - last_full_run_runtimes_in_seconds integer[] DEFAULT '{}'::integer[] NOT NULL, - last_full_run_processed_records integer[] DEFAULT '{}'::integer[] NOT NULL, last_incremental_issues_id integer, last_incremental_merge_requests_id integer, - last_full_run_issues_id integer, - last_full_run_merge_requests_id integer, last_incremental_run_at timestamp with time zone, last_incremental_issues_updated_at timestamp with time zone, last_incremental_merge_requests_updated_at timestamp with time zone, last_full_run_at timestamp with time zone, - last_full_run_issues_updated_at timestamp with time zone, - last_full_run_mrs_updated_at timestamp with time zone, last_consistency_check_updated_at timestamp with time zone, enabled boolean DEFAULT true NOT NULL, full_runtimes_in_seconds integer[] DEFAULT '{}'::integer[] NOT NULL, @@ -10796,8 +10834,6 @@ CREATE TABLE analytics_cycle_analytics_aggregations ( last_consistency_check_merge_requests_end_event_timestamp timestamp with time zone, last_consistency_check_merge_requests_issuable_id bigint, CONSTRAINT chk_rails_1ef688e577 CHECK ((cardinality(incremental_runtimes_in_seconds) <= 10)), - CONSTRAINT chk_rails_7810292ec9 CHECK ((cardinality(last_full_run_processed_records) <= 10)), - CONSTRAINT chk_rails_8b9e89687c CHECK ((cardinality(last_full_run_runtimes_in_seconds) <= 10)), CONSTRAINT chk_rails_e16bf3913a CHECK ((cardinality(incremental_processed_records) <= 10)), CONSTRAINT full_processed_records_size CHECK ((cardinality(full_processed_records) <= 10)), CONSTRAINT full_runtimes_in_seconds_size CHECK ((cardinality(full_runtimes_in_seconds) <= 10)) @@ -11426,6 +11462,7 @@ CREATE TABLE application_settings ( inactive_projects_min_size_mb integer DEFAULT 0 NOT NULL, inactive_projects_send_warning_email_after_months integer DEFAULT 1 NOT NULL, delayed_group_deletion boolean DEFAULT true NOT NULL, + maven_package_requests_forwarding boolean DEFAULT true NOT NULL, arkose_labs_namespace text DEFAULT 'client'::text NOT NULL, max_export_size integer DEFAULT 0, encrypted_slack_app_signing_secret bytea, @@ -11456,13 +11493,48 @@ CREATE TABLE application_settings ( error_tracking_api_url text, git_rate_limit_users_allowlist text[] DEFAULT '{}'::text[] NOT NULL, error_tracking_access_token_encrypted text, + invitation_flow_enforcement boolean DEFAULT false NOT NULL, package_registry_cleanup_policies_worker_capacity integer DEFAULT 2 NOT NULL, deactivate_dormant_users_period integer DEFAULT 90 NOT NULL, + auto_ban_user_on_excessive_projects_download boolean DEFAULT false NOT NULL, + max_pages_custom_domains_per_project integer DEFAULT 0 NOT NULL, + cube_api_base_url text, + encrypted_cube_api_key bytea, + encrypted_cube_api_key_iv bytea, + jitsu_host text, + jitsu_project_xid text, + clickhouse_connection_string text, + jitsu_administrator_email text, + encrypted_jitsu_administrator_password bytea, + encrypted_jitsu_administrator_password_iv bytea, + dashboard_limit_enabled boolean DEFAULT false NOT NULL, + dashboard_limit integer DEFAULT 0 NOT NULL, + dashboard_notification_limit integer DEFAULT 0 NOT NULL, + dashboard_enforcement_limit integer DEFAULT 0 NOT NULL, + dashboard_limit_new_namespace_creation_enforcement_date date, + can_create_group boolean DEFAULT true NOT NULL, + lock_maven_package_requests_forwarding boolean DEFAULT false NOT NULL, + lock_pypi_package_requests_forwarding boolean DEFAULT false NOT NULL, + lock_npm_package_requests_forwarding boolean DEFAULT false NOT NULL, + jira_connect_proxy_url text, + password_expiration_enabled boolean DEFAULT false NOT NULL, + password_expires_in_days integer DEFAULT 90 NOT NULL, + password_expires_notice_before_days integer DEFAULT 7 NOT NULL, + product_analytics_enabled boolean DEFAULT false NOT NULL, + email_confirmation_setting smallint DEFAULT 0, + disable_admin_oauth_scopes boolean DEFAULT false NOT NULL, + default_preferred_language text DEFAULT 'en'::text NOT NULL, + disable_download_button boolean DEFAULT false NOT NULL, + encrypted_telesign_customer_xid bytea, + encrypted_telesign_customer_xid_iv bytea, + encrypted_telesign_api_key bytea, + encrypted_telesign_api_key_iv bytea, 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_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_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)), @@ -11475,6 +11547,7 @@ CREATE TABLE application_settings ( CONSTRAINT check_3455368420 CHECK ((char_length(database_grafana_api_url) <= 255)), CONSTRAINT check_3559645ae5 CHECK ((char_length(container_registry_import_target_plan) <= 255)), CONSTRAINT check_3def0f1829 CHECK ((char_length(sentry_clientside_dsn) <= 255)), + CONSTRAINT check_4847426287 CHECK ((char_length(jira_connect_proxy_url) <= 255)), CONSTRAINT check_492cc1354d CHECK ((char_length(error_tracking_api_url) <= 255)), CONSTRAINT check_4f8b811780 CHECK ((char_length(sentry_dsn) <= 255)), CONSTRAINT check_51700b31b5 CHECK ((char_length(default_branch_name) <= 255)), @@ -11488,16 +11561,22 @@ CREATE TABLE application_settings ( CONSTRAINT check_7ccfe2764a CHECK ((char_length(arkose_labs_namespace) <= 255)), CONSTRAINT check_85a39b68ff CHECK ((char_length(encrypted_ci_jwt_signing_key_iv) <= 255)), CONSTRAINT check_8dca35398a CHECK ((char_length(public_runner_releases_url) <= 255)), + CONSTRAINT check_8e7df605a1 CHECK ((char_length(cube_api_base_url) <= 512)), 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_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)), + CONSTRAINT check_dea8792229 CHECK ((char_length(jitsu_host) <= 255)), + CONSTRAINT check_e2692d7523 CHECK ((char_length(default_preferred_language) <= 32)), CONSTRAINT check_e2dd6e290a CHECK ((char_length(jira_connect_application_key) <= 255)), CONSTRAINT check_e5024c8801 CHECK ((char_length(elasticsearch_username) <= 255)), CONSTRAINT check_e5aba18f02 CHECK ((char_length(container_registry_version) <= 255)), + CONSTRAINT check_ec3ca9aa8d CHECK ((char_length(jitsu_administrator_email) <= 255)), CONSTRAINT check_ef6176834f CHECK ((char_length(encrypted_cloud_license_auth_token_iv) <= 255)), - CONSTRAINT check_f6563bc000 CHECK ((char_length(arkose_labs_verify_api_url) <= 255)) + CONSTRAINT check_f6563bc000 CHECK ((char_length(arkose_labs_verify_api_url) <= 255)), + CONSTRAINT check_fc732c181e CHECK ((char_length(jitsu_project_xid) <= 255)) ); COMMENT ON COLUMN application_settings.content_validation_endpoint_url IS 'JiHu-specific column'; @@ -11534,6 +11613,14 @@ COMMENT ON COLUMN application_settings.encrypted_feishu_app_secret IS 'JiHu-spec COMMENT ON COLUMN application_settings.encrypted_feishu_app_secret_iv IS 'JiHu-specific column'; +COMMENT ON COLUMN application_settings.password_expiration_enabled IS 'JiHu-specific column'; + +COMMENT ON COLUMN application_settings.password_expires_in_days IS 'JiHu-specific column'; + +COMMENT ON COLUMN application_settings.password_expires_notice_before_days IS 'JiHu-specific column'; + +COMMENT ON COLUMN application_settings.disable_download_button IS 'JiHu-specific column'; + CREATE SEQUENCE application_settings_id_seq START WITH 1 INCREMENT BY 1 @@ -11574,6 +11661,7 @@ CREATE TABLE approval_merge_request_rules ( scanners text[] DEFAULT '{}'::text[] NOT NULL, severity_levels text[] DEFAULT '{}'::text[] NOT NULL, vulnerability_states text[] DEFAULT '{newly_detected}'::text[] NOT NULL, + security_orchestration_policy_configuration_id bigint, CONSTRAINT check_6fca5928b2 CHECK ((char_length(section) <= 255)) ); @@ -11645,7 +11733,8 @@ CREATE TABLE approval_project_rules ( 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 + applies_to_all_protected_branches boolean DEFAULT false NOT NULL, + security_orchestration_policy_configuration_id bigint ); CREATE TABLE approval_project_rules_groups ( @@ -11800,6 +11889,24 @@ CREATE SEQUENCE audit_events_id_seq ALTER SEQUENCE audit_events_id_seq OWNED BY audit_events.id; +CREATE TABLE audit_events_streaming_event_type_filters ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + external_audit_event_destination_id bigint NOT NULL, + audit_event_type text NOT NULL, + CONSTRAINT check_d20c8e5a51 CHECK ((char_length(audit_event_type) <= 255)) +); + +CREATE SEQUENCE audit_events_streaming_event_type_filters_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE audit_events_streaming_event_type_filters_id_seq OWNED BY audit_events_streaming_event_type_filters.id; + CREATE TABLE audit_events_streaming_headers ( id bigint NOT NULL, created_at timestamp with time zone NOT NULL, @@ -12015,7 +12122,10 @@ CREATE TABLE board_group_recent_visits ( updated_at timestamp with time zone NOT NULL, user_id integer, board_id integer, - group_id integer + group_id integer, + CONSTRAINT check_409f6caea4 CHECK ((user_id IS NOT NULL)), + CONSTRAINT check_ddc74243ef CHECK ((group_id IS NOT NULL)), + CONSTRAINT check_fa7711a898 CHECK ((board_id IS NOT NULL)) ); CREATE SEQUENCE board_group_recent_visits_id_seq @@ -12048,7 +12158,10 @@ CREATE TABLE board_project_recent_visits ( updated_at timestamp with time zone NOT NULL, user_id integer, project_id integer, - board_id integer + board_id integer, + CONSTRAINT check_0386e26981 CHECK ((board_id IS NOT NULL)), + CONSTRAINT check_d9cc9b79da CHECK ((project_id IS NOT NULL)), + CONSTRAINT check_df7762a99a CHECK ((user_id IS NOT NULL)) ); CREATE SEQUENCE board_project_recent_visits_id_seq @@ -12243,7 +12356,8 @@ CREATE TABLE broadcast_messages ( broadcast_type smallint DEFAULT 1 NOT NULL, dismissable boolean, target_access_levels integer[] DEFAULT '{}'::integer[] NOT NULL, - theme smallint DEFAULT 0 NOT NULL + theme smallint DEFAULT 0 NOT NULL, + namespace_id bigint ); CREATE SEQUENCE broadcast_messages_id_seq @@ -12289,6 +12403,7 @@ CREATE TABLE bulk_import_entities ( jid text, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, + source_xid integer, 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)), @@ -12530,7 +12645,6 @@ CREATE TABLE ci_build_trace_metadata ( CREATE TABLE ci_builds ( status character varying, finished_at timestamp without time zone, - trace text, created_at timestamp without time zone, updated_at timestamp without time zone, started_at timestamp without time zone, @@ -12572,6 +12686,7 @@ CREATE TABLE ci_builds ( scheduling_type smallint, id bigint NOT NULL, stage_id bigint, + partition_id bigint DEFAULT 100 NOT NULL, CONSTRAINT check_1e2fbd1b39 CHECK ((lock_version IS NOT NULL)) ); @@ -12584,7 +12699,7 @@ CREATE SEQUENCE ci_builds_id_seq ALTER SEQUENCE ci_builds_id_seq OWNED BY ci_builds.id; -CREATE TABLE ci_builds_metadata ( +CREATE TABLE p_ci_builds_metadata ( project_id integer NOT NULL, timeout integer, timeout_source integer DEFAULT 1 NOT NULL, @@ -12598,8 +12713,10 @@ CREATE TABLE ci_builds_metadata ( build_id bigint NOT NULL, id bigint NOT NULL, runtime_runner_features jsonb DEFAULT '{}'::jsonb NOT NULL, - id_tokens jsonb DEFAULT '{}'::jsonb NOT NULL -); + id_tokens jsonb DEFAULT '{}'::jsonb NOT NULL, + partition_id bigint DEFAULT 100 NOT NULL +) +PARTITION BY LIST (partition_id); CREATE SEQUENCE ci_builds_metadata_id_seq START WITH 1 @@ -12608,7 +12725,26 @@ CREATE SEQUENCE ci_builds_metadata_id_seq NO MAXVALUE CACHE 1; -ALTER SEQUENCE ci_builds_metadata_id_seq OWNED BY ci_builds_metadata.id; +ALTER SEQUENCE ci_builds_metadata_id_seq OWNED BY p_ci_builds_metadata.id; + +CREATE TABLE ci_builds_metadata ( + project_id integer NOT NULL, + timeout integer, + timeout_source integer DEFAULT 1 NOT NULL, + interruptible boolean, + config_options jsonb, + config_variables jsonb, + has_exposed_artifacts boolean, + environment_auto_stop_in character varying(255), + expanded_environment_name character varying(255), + secrets jsonb DEFAULT '{}'::jsonb NOT NULL, + build_id bigint NOT NULL, + 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 +); +ALTER TABLE ONLY p_ci_builds_metadata ATTACH PARTITION ci_builds_metadata FOR VALUES IN ('100'); CREATE TABLE ci_builds_runner_session ( id bigint NOT NULL, @@ -12699,7 +12835,7 @@ CREATE TABLE ci_group_variables ( masked boolean DEFAULT false NOT NULL, variable_type smallint DEFAULT 1 NOT NULL, environment_scope text DEFAULT '*'::text NOT NULL, - raw boolean DEFAULT true NOT NULL, + raw boolean DEFAULT false NOT NULL, CONSTRAINT check_dfe009485a CHECK ((char_length(environment_scope) <= 255)) ); @@ -12720,7 +12856,7 @@ CREATE TABLE ci_instance_variables ( key text NOT NULL, encrypted_value text, encrypted_value_iv text, - raw boolean DEFAULT true NOT NULL, + raw boolean DEFAULT false NOT NULL, CONSTRAINT check_07a45a5bcb CHECK ((char_length(encrypted_value_iv) <= 255)), CONSTRAINT check_5aede12208 CHECK ((char_length(key) <= 255)), CONSTRAINT check_956afd70f1 CHECK ((char_length(encrypted_value) <= 13579)) @@ -12763,6 +12899,7 @@ CREATE TABLE ci_job_artifacts ( 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)) ); @@ -12781,7 +12918,8 @@ CREATE TABLE ci_job_token_project_scope_links ( source_project_id bigint NOT NULL, target_project_id bigint NOT NULL, added_by_id bigint, - created_at timestamp with time zone NOT NULL + created_at timestamp with time zone NOT NULL, + direction smallint DEFAULT 0 NOT NULL ); CREATE SEQUENCE ci_job_token_project_scope_links_id_seq @@ -12801,7 +12939,7 @@ 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 true NOT NULL + raw boolean DEFAULT false NOT NULL ); CREATE SEQUENCE ci_job_variables_id_seq @@ -12856,6 +12994,7 @@ CREATE TABLE ci_namespace_monthly_usages ( 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, CONSTRAINT ci_namespace_monthly_usages_year_month_constraint CHECK ((date = date_trunc('month'::text, (date)::timestamp with time zone))) ); @@ -12868,6 +13007,21 @@ CREATE SEQUENCE ci_namespace_monthly_usages_id_seq ALTER SEQUENCE ci_namespace_monthly_usages_id_seq OWNED BY ci_namespace_monthly_usages.id; +CREATE TABLE ci_partitions ( + id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL +); + +CREATE SEQUENCE ci_partitions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ci_partitions_id_seq OWNED BY ci_partitions.id; + CREATE TABLE ci_pending_builds ( id bigint NOT NULL, build_id bigint NOT NULL, @@ -12909,6 +13063,7 @@ CREATE TABLE ci_pipeline_artifacts ( verification_retry_count smallint, verification_checksum bytea, verification_failure text, + locked smallint DEFAULT 2, CONSTRAINT check_191b5850ec CHECK ((char_length(file) <= 255)), CONSTRAINT check_abeeb71caf CHECK ((file IS NOT NULL)), CONSTRAINT ci_pipeline_artifacts_verification_failure_text_limit CHECK ((char_length(verification_failure) <= 255)) @@ -12956,6 +13111,14 @@ CREATE SEQUENCE ci_pipeline_messages_id_seq ALTER SEQUENCE ci_pipeline_messages_id_seq OWNED BY ci_pipeline_messages.id; +CREATE TABLE ci_pipeline_metadata ( + project_id bigint NOT NULL, + pipeline_id bigint NOT NULL, + name text, + CONSTRAINT check_25d23931f1 CHECK ((name IS NOT NULL)), + CONSTRAINT check_9d3665463c CHECK ((char_length(name) <= 255)) +); + CREATE TABLE ci_pipeline_schedule_variables ( id integer NOT NULL, key character varying NOT NULL, @@ -12967,7 +13130,7 @@ CREATE TABLE ci_pipeline_schedule_variables ( created_at timestamp with time zone, updated_at timestamp with time zone, variable_type smallint DEFAULT 1 NOT NULL, - raw boolean DEFAULT true NOT NULL + raw boolean DEFAULT false NOT NULL ); CREATE SEQUENCE ci_pipeline_schedule_variables_id_seq @@ -13011,7 +13174,8 @@ CREATE TABLE ci_pipeline_variables ( encrypted_value_iv character varying, pipeline_id integer NOT NULL, variable_type smallint DEFAULT 1 NOT NULL, - raw boolean DEFAULT true NOT NULL + partition_id bigint DEFAULT 100 NOT NULL, + raw boolean DEFAULT false NOT NULL ); CREATE SEQUENCE ci_pipeline_variables_id_seq @@ -13053,6 +13217,7 @@ CREATE TABLE ci_pipelines ( external_pull_request_id bigint, ci_ref_id bigint, locked smallint DEFAULT 1 NOT NULL, + partition_id bigint DEFAULT 100 NOT NULL, CONSTRAINT check_d7e99a025e CHECK ((lock_version IS NOT NULL)) ); @@ -13110,6 +13275,7 @@ CREATE TABLE ci_project_monthly_usages ( 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, CONSTRAINT ci_project_monthly_usages_year_month_constraint CHECK ((date = date_trunc('month'::text, (date)::timestamp with time zone))) ); @@ -13300,6 +13466,8 @@ CREATE TABLE ci_secure_files ( file text NOT NULL, checksum bytea NOT NULL, key_data text, + metadata jsonb, + expires_at timestamp with time zone, CONSTRAINT check_320790634d CHECK ((char_length(file) <= 255)), CONSTRAINT check_402c7b4a56 CHECK ((char_length(name) <= 255)), CONSTRAINT check_7279b4e293 CHECK ((char_length(key_data) <= 128)) @@ -13357,6 +13525,7 @@ CREATE TABLE ci_stages ( lock_version integer DEFAULT 0, "position" integer, id bigint NOT NULL, + partition_id bigint DEFAULT 100 NOT NULL, CONSTRAINT check_81b431e49b CHECK ((lock_version IS NOT NULL)) ); @@ -13471,7 +13640,7 @@ CREATE TABLE ci_variables ( environment_scope character varying DEFAULT '*'::character varying NOT NULL, masked boolean DEFAULT false NOT NULL, variable_type smallint DEFAULT 1 NOT NULL, - raw boolean DEFAULT true NOT NULL + raw boolean DEFAULT false NOT NULL ); CREATE SEQUENCE ci_variables_id_seq @@ -13991,6 +14160,7 @@ CREATE TABLE container_repositories ( migration_aborted_in_state text, migration_plan text, last_cleanup_deleted_tags_count integer, + delete_started_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)) @@ -14313,8 +14483,10 @@ CREATE TABLE dast_site_profiles ( target_type smallint DEFAULT 0 NOT NULL, scan_method smallint DEFAULT 0 NOT NULL, auth_submit_field text, + scan_file_path text, CONSTRAINT check_5203110fee CHECK ((char_length(auth_username_field) <= 255)), CONSTRAINT check_6cfab17b48 CHECK ((char_length(name) <= 255)), + CONSTRAINT check_8d2aa0f66d CHECK ((char_length(scan_file_path) <= 1024)), CONSTRAINT check_af44f54c96 CHECK ((char_length(auth_submit_field) <= 255)), CONSTRAINT check_c329dffdba CHECK ((char_length(auth_password_field) <= 255)), CONSTRAINT check_d446f7047b CHECK ((char_length(auth_url) <= 1024)), @@ -14411,6 +14583,20 @@ CREATE SEQUENCE dast_sites_id_seq ALTER SEQUENCE dast_sites_id_seq OWNED BY dast_sites.id; +CREATE TABLE dependency_proxy_blob_states ( + verification_started_at timestamp with time zone, + verification_retry_at timestamp with time zone, + verified_at timestamp with time zone, + dependency_proxy_blob_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_8e4f76fffe CHECK ((char_length(verification_failure) <= 255)) +); + +COMMENT ON TABLE dependency_proxy_blob_states IS '{"owner":"group::geo","description":"Geo-specific table to store the verification state of DependencyProxy::Blob objects"}'; + CREATE TABLE dependency_proxy_blobs ( id integer NOT NULL, group_id integer NOT NULL, @@ -14750,6 +14936,21 @@ CREATE SEQUENCE dingtalk_tracker_data_id_seq ALTER SEQUENCE dingtalk_tracker_data_id_seq OWNED BY dingtalk_tracker_data.id; +CREATE TABLE dora_configurations ( + id bigint NOT NULL, + project_id bigint NOT NULL, + branches_for_lead_time_for_changes text[] DEFAULT '{}'::text[] NOT NULL +); + +CREATE SEQUENCE dora_configurations_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE dora_configurations_id_seq OWNED BY dora_configurations.id; + CREATE TABLE dora_daily_metrics ( id bigint NOT NULL, environment_id bigint NOT NULL, @@ -14871,6 +15072,7 @@ CREATE TABLE elastic_reindexing_tasks ( delete_original_index_at timestamp with time zone, max_slices_running smallint DEFAULT 60 NOT NULL, slice_multiplier smallint DEFAULT 2 NOT NULL, + targets text[], CONSTRAINT check_7f64acda8e CHECK ((char_length(error_message) <= 255)) ); @@ -14927,7 +15129,8 @@ CREATE TABLE environments ( slug character varying NOT NULL, auto_stop_at timestamp with time zone, auto_delete_at timestamp with time zone, - tier smallint + tier smallint, + merge_request_id bigint ); CREATE SEQUENCE environments_id_seq @@ -15176,26 +15379,6 @@ CREATE SEQUENCE experiment_subjects_id_seq ALTER SEQUENCE experiment_subjects_id_seq OWNED BY experiment_subjects.id; -CREATE TABLE experiment_users ( - id bigint NOT NULL, - experiment_id bigint NOT NULL, - user_id bigint NOT NULL, - group_type 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 -); - -CREATE SEQUENCE experiment_users_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - -ALTER SEQUENCE experiment_users_id_seq OWNED BY experiment_users.id; - CREATE TABLE experiments ( id bigint NOT NULL, name text NOT NULL, @@ -15697,6 +15880,25 @@ CREATE SEQUENCE geo_reset_checksum_events_id_seq ALTER SEQUENCE geo_reset_checksum_events_id_seq OWNED BY geo_reset_checksum_events.id; +CREATE TABLE ghost_user_migrations ( + id bigint NOT NULL, + user_id bigint NOT NULL, + initiator_user_id bigint, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + hard_delete boolean DEFAULT false NOT NULL, + consume_after timestamp with time zone DEFAULT now() NOT NULL +); + +CREATE SEQUENCE ghost_user_migrations_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE ghost_user_migrations_id_seq OWNED BY ghost_user_migrations.id; + CREATE TABLE gitlab_subscription_histories ( id bigint NOT NULL, gitlab_subscription_created_at timestamp with time zone, @@ -16282,6 +16484,40 @@ CREATE SEQUENCE incident_management_pending_issue_escalations_id_seq ALTER SEQUENCE incident_management_pending_issue_escalations_id_seq OWNED BY incident_management_pending_issue_escalations.id; +CREATE TABLE incident_management_timeline_event_tag_links ( + id bigint NOT NULL, + timeline_event_id bigint NOT NULL, + timeline_event_tag_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL +); + +CREATE SEQUENCE incident_management_timeline_event_tag_links_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE incident_management_timeline_event_tag_links_id_seq OWNED BY incident_management_timeline_event_tag_links.id; + +CREATE TABLE incident_management_timeline_event_tags ( + 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, + name text NOT NULL, + CONSTRAINT check_8717184e2c CHECK ((char_length(name) <= 255)) +); + +CREATE SEQUENCE incident_management_timeline_event_tags_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE incident_management_timeline_event_tags_id_seq OWNED BY incident_management_timeline_event_tags.id; + CREATE TABLE incident_management_timeline_events ( id bigint NOT NULL, created_at timestamp with time zone NOT NULL, @@ -16702,7 +16938,6 @@ CREATE TABLE iterations_cadences ( created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, start_date date, - last_run_date date, duration_in_weeks integer, iterations_in_advance integer, active boolean DEFAULT true NOT NULL, @@ -16710,6 +16945,7 @@ CREATE TABLE iterations_cadences ( title text NOT NULL, roll_over boolean DEFAULT false NOT NULL, description text, + next_run_date date, CONSTRAINT check_5c5d2b44bd CHECK ((char_length(description) <= 5000)), CONSTRAINT check_fedff82d3b CHECK ((char_length(title) <= 255)) ); @@ -17132,7 +17368,8 @@ CREATE TABLE members ( state smallint DEFAULT 0, invite_email_success boolean DEFAULT true NOT NULL, member_namespace_id bigint, - member_role_id bigint + member_role_id bigint, + CONSTRAINT check_508774aac0 CHECK ((member_namespace_id IS NOT NULL)) ); CREATE SEQUENCE members_id_seq @@ -17148,9 +17385,7 @@ CREATE TABLE merge_request_assignees ( id bigint NOT NULL, user_id integer NOT NULL, merge_request_id integer NOT NULL, - created_at timestamp with time zone, - state smallint DEFAULT 0 NOT NULL, - updated_state_by_user_id bigint + created_at timestamp with time zone ); CREATE SEQUENCE merge_request_assignees_id_seq @@ -17371,13 +17606,28 @@ CREATE SEQUENCE merge_request_metrics_id_seq ALTER SEQUENCE merge_request_metrics_id_seq OWNED BY merge_request_metrics.id; +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 +); + +CREATE SEQUENCE merge_request_predictions_merge_request_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE merge_request_predictions_merge_request_id_seq OWNED BY merge_request_predictions.merge_request_id; + CREATE TABLE merge_request_reviewers ( id bigint NOT NULL, user_id bigint NOT NULL, merge_request_id bigint NOT NULL, created_at timestamp with time zone NOT NULL, - state smallint DEFAULT 0 NOT NULL, - updated_state_by_user_id bigint + state smallint DEFAULT 0 NOT NULL ); CREATE SEQUENCE merge_request_reviewers_id_seq @@ -17598,6 +17848,7 @@ CREATE TABLE ml_candidate_metrics ( step integer, is_nan bytea, name text NOT NULL, + tracked_at bigint, CONSTRAINT check_3bb4a3fbd9 CHECK ((char_length(name) <= 250)) ); @@ -17636,7 +17887,10 @@ CREATE TABLE ml_candidates ( updated_at timestamp with time zone NOT NULL, iid uuid NOT NULL, experiment_id bigint NOT NULL, - user_id bigint + user_id bigint, + start_time bigint, + end_time bigint, + status smallint DEFAULT 0 NOT NULL ); CREATE SEQUENCE ml_candidates_id_seq @@ -17656,6 +17910,7 @@ CREATE TABLE ml_experiments ( project_id bigint NOT NULL, user_id bigint, name text NOT NULL, + deleted_on timestamp with time zone, CONSTRAINT check_ee07a0be2c CHECK ((char_length(name) <= 255)) ); @@ -17712,13 +17967,33 @@ CREATE TABLE namespace_ci_cd_settings ( allow_stale_runner_pruning boolean DEFAULT false NOT NULL ); +CREATE TABLE namespace_commit_emails ( + id bigint NOT NULL, + user_id bigint NOT NULL, + namespace_id bigint NOT NULL, + email_id bigint NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL +); + +CREATE SEQUENCE namespace_commit_emails_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE namespace_commit_emails_id_seq OWNED BY namespace_commit_emails.id; + CREATE TABLE namespace_details ( namespace_id bigint NOT NULL, created_at timestamp with time zone, updated_at timestamp with time zone, cached_markdown_version integer, description text, - description_html 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 ); CREATE TABLE namespace_limits ( @@ -17734,6 +18009,12 @@ CREATE TABLE namespace_package_settings ( maven_duplicate_exception_regex text DEFAULT ''::text NOT NULL, generic_duplicates_allowed boolean DEFAULT true NOT NULL, generic_duplicate_exception_regex text DEFAULT ''::text NOT NULL, + maven_package_requests_forwarding boolean, + lock_maven_package_requests_forwarding boolean DEFAULT false NOT NULL, + pypi_package_requests_forwarding boolean, + lock_pypi_package_requests_forwarding boolean DEFAULT false NOT NULL, + npm_package_requests_forwarding boolean, + lock_npm_package_requests_forwarding boolean DEFAULT false NOT NULL, CONSTRAINT check_31340211b1 CHECK ((char_length(generic_duplicate_exception_regex) <= 255)), CONSTRAINT check_d63274b2b6 CHECK ((char_length(maven_duplicate_exception_regex) <= 255)) ); @@ -17773,13 +18054,17 @@ CREATE TABLE namespace_settings ( runner_token_expiration_interval integer, subgroup_runner_token_expiration_interval integer, project_runner_token_expiration_interval integer, - exclude_from_free_user_cap boolean DEFAULT false NOT NULL, + show_diff_preview_in_email boolean DEFAULT true NOT NULL, enabled_git_access_protocol smallint DEFAULT 0 NOT NULL, unique_project_download_limit smallint DEFAULT 0 NOT NULL, unique_project_download_limit_interval_in_seconds integer DEFAULT 0 NOT NULL, project_import_level smallint DEFAULT 50 NOT NULL, - include_for_free_user_cap_preview boolean DEFAULT false NOT NULL, unique_project_download_limit_allowlist text[] DEFAULT '{}'::text[] NOT NULL, + auto_ban_user_on_excessive_projects_download boolean DEFAULT false NOT NULL, + only_allow_merge_if_pipeline_succeeds boolean DEFAULT false NOT NULL, + 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, CONSTRAINT check_0ba93c78c7 CHECK ((char_length(default_branch_name) <= 255)), CONSTRAINT namespace_settings_unique_project_download_limit_allowlist_size CHECK ((cardinality(unique_project_download_limit_allowlist) <= 100)) ); @@ -17927,7 +18212,8 @@ CREATE TABLE notes ( resolved_by_push boolean, review_id bigint, confidential boolean, - last_edited_at timestamp with time zone + last_edited_at timestamp with time zone, + internal boolean DEFAULT false NOT NULL ); CREATE SEQUENCE notes_id_seq @@ -18764,7 +19050,8 @@ CREATE TABLE packages_packages ( version character varying, package_type smallint NOT NULL, creator_id integer, - status smallint DEFAULT 0 NOT NULL + status smallint DEFAULT 0 NOT NULL, + last_downloaded_at timestamp with time zone ); CREATE SEQUENCE packages_packages_id_seq @@ -18783,6 +19070,49 @@ CREATE TABLE packages_pypi_metadata ( CONSTRAINT check_379019d5da CHECK ((char_length(required_python) <= 255)) ); +CREATE TABLE packages_rpm_metadata ( + package_id bigint NOT NULL, + release text DEFAULT '1'::text NOT NULL, + summary text DEFAULT ''::text NOT NULL, + description text DEFAULT ''::text NOT NULL, + arch text DEFAULT ''::text NOT NULL, + license text, + url text, + epoch integer DEFAULT 0 NOT NULL, + CONSTRAINT check_3798bae3d6 CHECK ((char_length(arch) <= 255)), + CONSTRAINT check_5d29ba59ac CHECK ((char_length(description) <= 5000)), + CONSTRAINT check_6e8cbd536d CHECK ((char_length(url) <= 1000)), + CONSTRAINT check_845ba4d7d0 CHECK ((char_length(license) <= 1000)), + CONSTRAINT check_b010bf4870 CHECK ((char_length(summary) <= 1000)), + CONSTRAINT check_c3e2fc2e89 CHECK ((char_length(release) <= 128)) +); + +CREATE TABLE packages_rpm_repository_files ( + 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, + file_store integer DEFAULT 1, + status smallint DEFAULT 0 NOT NULL, + size integer, + file_md5 bytea, + file_sha1 bytea, + file_sha256 bytea, + file text NOT NULL, + file_name text NOT NULL, + CONSTRAINT check_a9fef187f5 CHECK ((char_length(file) <= 255)), + CONSTRAINT check_b6b721b275 CHECK ((char_length(file_name) <= 255)) +); + +CREATE SEQUENCE packages_rpm_repository_files_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE packages_rpm_repository_files_id_seq OWNED BY packages_rpm_repository_files.id; + CREATE TABLE packages_rubygems_metadata ( created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, @@ -19070,7 +19400,8 @@ CREATE TABLE plan_limits ( 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, - ci_max_artifact_size_cyclonedx integer DEFAULT 1 NOT NULL + ci_max_artifact_size_cyclonedx integer DEFAULT 1 NOT NULL, + rpm_max_file_size bigint DEFAULT '5368709120'::bigint NOT NULL ); CREATE SEQUENCE plan_limits_id_seq @@ -19153,6 +19484,21 @@ CREATE VIEW postgres_autovacuum_activity AS COMMENT ON VIEW postgres_autovacuum_activity IS 'Contains information about PostgreSQL backends currently performing autovacuum operations on the tables indicated here.'; +CREATE VIEW postgres_constraints AS + SELECT pg_constraint.oid, + pg_constraint.conname AS name, + pg_constraint.contype AS constraint_type, + pg_constraint.convalidated AS constraint_valid, + ( SELECT array_agg(pg_attribute.attname ORDER BY attnums.ordering) AS array_agg + FROM (unnest(pg_constraint.conkey) WITH ORDINALITY attnums(attnum, ordering) + JOIN pg_attribute ON (((pg_attribute.attnum = attnums.attnum) AND (pg_attribute.attrelid = pg_class.oid))))) AS column_names, + (((pg_namespace.nspname)::text || '.'::text) || (pg_class.relname)::text) AS table_identifier, + NULLIF(pg_constraint.conparentid, (0)::oid) AS parent_constraint_oid, + pg_get_constraintdef(pg_constraint.oid) AS definition + FROM ((pg_constraint + JOIN pg_class ON ((pg_constraint.conrelid = pg_class.oid))) + JOIN pg_namespace ON ((pg_class.relnamespace = pg_namespace.oid))); + CREATE VIEW postgres_foreign_keys AS SELECT pg_constraint.oid, pg_constraint.conname AS name, @@ -19483,7 +19829,8 @@ CREATE TABLE project_ci_cd_settings ( runner_token_expiration_interval integer, 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 + allow_fork_pipelines_to_run_in_parent_project boolean DEFAULT true NOT NULL, + inbound_job_token_scope_enabled boolean DEFAULT false NOT NULL ); CREATE SEQUENCE project_ci_cd_settings_id_seq @@ -19891,7 +20238,16 @@ CREATE TABLE project_settings ( target_platforms character varying[] DEFAULT '{}'::character varying[] NOT NULL, enforce_auth_checks_on_uploads boolean DEFAULT true NOT NULL, selective_code_owner_removals boolean DEFAULT false NOT NULL, + issue_branch_template text, + show_diff_preview_in_email boolean DEFAULT true NOT NULL, + jitsu_key text, + 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, + 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)), + CONSTRAINT check_67292e4b99 CHECK ((char_length(mirror_branch_regex) <= 255)), CONSTRAINT check_b09644994b CHECK ((char_length(squash_commit_template) <= 500)), CONSTRAINT check_bde223416c CHECK ((show_default_award_emojis IS NOT NULL)), CONSTRAINT check_eaf7cfb6a7 CHECK ((char_length(merge_commit_template) <= 500)) @@ -19944,6 +20300,35 @@ CREATE SEQUENCE project_topics_id_seq ALTER SEQUENCE project_topics_id_seq OWNED BY project_topics.id; +CREATE TABLE project_wiki_repositories ( + 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 +); + +CREATE SEQUENCE project_wiki_repositories_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE project_wiki_repositories_id_seq OWNED BY project_wiki_repositories.id; + +CREATE TABLE project_wiki_repository_states ( + verification_started_at timestamp with time zone, + verification_retry_at timestamp with time zone, + verified_at timestamp with time zone, + project_id bigint NOT NULL, + verification_state smallint DEFAULT 0 NOT NULL, + verification_retry_count smallint, + verification_checksum bytea, + verification_failure text, + project_wiki_repository_id bigint, + CONSTRAINT check_119f134b68 CHECK ((char_length(verification_failure) <= 255)) +); + CREATE TABLE projects ( id integer NOT NULL, name character varying, @@ -19973,7 +20358,6 @@ CREATE TABLE projects ( mirror_user_id integer, shared_runners_enabled boolean DEFAULT true NOT NULL, runners_token character varying, - build_coverage_regex character varying, build_allow_git_fetch boolean DEFAULT true NOT NULL, build_timeout integer DEFAULT 3600 NOT NULL, mirror_trigger_builds boolean DEFAULT false NOT NULL, @@ -20178,12 +20562,14 @@ ALTER SEQUENCE protected_branch_unprotect_access_levels_id_seq OWNED BY protecte CREATE TABLE protected_branches ( id integer NOT NULL, - project_id integer NOT NULL, + project_id integer, name character varying NOT NULL, created_at timestamp without time zone, updated_at timestamp without time zone, code_owner_approval_required boolean DEFAULT false NOT NULL, - allow_force_push boolean DEFAULT false NOT NULL + allow_force_push boolean DEFAULT false NOT NULL, + namespace_id bigint, + CONSTRAINT protected_branches_project_id_namespace_id_any_not_null CHECK (((project_id IS NULL) <> (namespace_id IS NULL))) ); CREATE SEQUENCE protected_branches_id_seq @@ -20326,7 +20712,9 @@ CREATE TABLE push_rules ( reject_unsigned_commits boolean, commit_committer_check boolean, regexp_uses_re2 boolean DEFAULT true, - commit_message_negative_regex character varying + commit_message_negative_regex character varying, + reject_non_dco_commits boolean, + commit_committer_name_check boolean DEFAULT false NOT NULL ); CREATE SEQUENCE push_rules_id_seq @@ -20455,7 +20843,9 @@ CREATE TABLE remote_mirrors ( only_protected_branches boolean DEFAULT false NOT NULL, remote_name character varying, error_notification_sent boolean, - keep_divergent_refs boolean + keep_divergent_refs boolean, + mirror_branch_regex text, + CONSTRAINT check_aa6b497785 CHECK ((char_length(mirror_branch_regex) <= 255)) ); CREATE SEQUENCE remote_mirrors_id_seq @@ -20761,6 +21151,7 @@ CREATE TABLE sbom_components ( updated_at timestamp with time zone NOT NULL, component_type smallint NOT NULL, name text NOT NULL, + purl_type smallint, CONSTRAINT check_91a8f6ad53 CHECK ((char_length(name) <= 255)) ); @@ -20799,8 +21190,7 @@ CREATE TABLE sbom_sources ( created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, source_type smallint NOT NULL, - source jsonb DEFAULT '{}'::jsonb NOT NULL, - fingerprint bytea NOT NULL + source jsonb DEFAULT '{}'::jsonb NOT NULL ); CREATE SEQUENCE sbom_sources_id_seq @@ -20812,10 +21202,26 @@ CREATE SEQUENCE sbom_sources_id_seq ALTER SEQUENCE sbom_sources_id_seq OWNED BY sbom_sources.id; +CREATE TABLE sbom_vulnerable_component_versions ( + id bigint NOT NULL, + vulnerability_advisory_id bigint, + sbom_component_version_id bigint, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL +); + +CREATE SEQUENCE sbom_vulnerable_component_versions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE sbom_vulnerable_component_versions_id_seq OWNED BY sbom_vulnerable_component_versions.id; CREATE TABLE scim_identities ( id bigint NOT NULL, - group_id bigint NOT NULL, + group_id bigint, user_id bigint NOT NULL, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, @@ -20836,7 +21242,7 @@ CREATE TABLE scim_oauth_access_tokens ( id integer NOT NULL, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - group_id integer NOT NULL, + group_id integer, token_encrypted character varying NOT NULL ); @@ -20849,22 +21255,6 @@ CREATE SEQUENCE scim_oauth_access_tokens_id_seq ALTER SEQUENCE scim_oauth_access_tokens_id_seq OWNED BY scim_oauth_access_tokens.id; -CREATE TABLE security_findings ( - id bigint NOT NULL, - scan_id bigint NOT NULL, - scanner_id bigint NOT NULL, - severity smallint NOT NULL, - confidence smallint NOT NULL, - project_fingerprint text, - deduplicated boolean DEFAULT false NOT NULL, - uuid uuid, - overridden_uuid uuid, - partition_number integer DEFAULT 1 NOT NULL, - CONSTRAINT check_6c2851a8c9 CHECK ((uuid IS NOT NULL)), - CONSTRAINT check_b9508c6df8 CHECK ((char_length(project_fingerprint) <= 40)), - CONSTRAINT check_partition_number CHECK ((partition_number = 1)) -); - CREATE SEQUENCE security_findings_id_seq START WITH 1 INCREMENT BY 1 @@ -21272,7 +21662,6 @@ CREATE TABLE sprints ( updated_at timestamp with time zone NOT NULL, start_date date, due_date date, - project_id bigint, group_id bigint, iid integer NOT NULL, cached_markdown_version integer, @@ -21283,7 +21672,6 @@ CREATE TABLE sprints ( state_enum smallint DEFAULT 1 NOT NULL, iterations_cadence_id integer, sequence integer, - CONSTRAINT sprints_must_belong_to_project_or_group CHECK ((((project_id <> NULL::bigint) AND (group_id IS NULL)) OR ((group_id <> NULL::bigint) AND (project_id IS NULL)))), CONSTRAINT sprints_title CHECK ((char_length(title) <= 255)) ); @@ -21842,22 +22230,35 @@ CREATE TABLE user_details ( job_title character varying(200) DEFAULT ''::character varying NOT NULL, bio character varying(255) DEFAULT ''::character varying NOT NULL, webauthn_xid text, - other_role text, provisioned_by_group_id bigint, pronouns text, pronunciation text, registration_objective smallint, phone text, requires_credit_card_verification boolean DEFAULT false NOT NULL, + linkedin text DEFAULT ''::text NOT NULL, + twitter text DEFAULT ''::text NOT NULL, + skype text DEFAULT ''::text NOT NULL, + website_url text DEFAULT ''::text NOT NULL, + location text DEFAULT ''::text NOT NULL, + organization text DEFAULT ''::text NOT NULL, + password_last_changed_at timestamp with time zone DEFAULT now() 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_7b246dad73 CHECK ((char_length(organization) <= 500)), + CONSTRAINT check_7d6489f8f3 CHECK ((char_length(linkedin) <= 500)), + CONSTRAINT check_7fe2044093 CHECK ((char_length(website_url) <= 500)), + CONSTRAINT check_8a7fcf8a60 CHECK ((char_length(location) <= 500)), CONSTRAINT check_a73b398c60 CHECK ((char_length(phone) <= 50)), - CONSTRAINT check_b132136b01 CHECK ((char_length(other_role) <= 100)), CONSTRAINT check_eeeaf8d4f0 CHECK ((char_length(pronouns) <= 50)), CONSTRAINT check_f932ed37db CHECK ((char_length(pronunciation) <= 255)) ); COMMENT ON COLUMN user_details.phone IS 'JiHu-specific column'; +COMMENT ON COLUMN user_details.password_last_changed_at IS 'JiHu-specific column'; + CREATE SEQUENCE user_details_user_id_seq START WITH 1 INCREMENT BY 1 @@ -21937,6 +22338,22 @@ CREATE SEQUENCE user_permission_export_uploads_id_seq ALTER SEQUENCE user_permission_export_uploads_id_seq OWNED BY user_permission_export_uploads.id; +CREATE TABLE user_phone_number_validations ( + user_id bigint NOT NULL, + validated_at timestamp with time zone, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + international_dial_code smallint NOT NULL, + verification_attempts smallint DEFAULT 0 NOT NULL, + risk_score smallint DEFAULT 0 NOT NULL, + country text NOT NULL, + phone_number text NOT NULL, + telesign_reference_xid text, + CONSTRAINT check_193736da9f CHECK ((char_length(country) <= 3)), + CONSTRAINT check_d2f31fc815 CHECK ((char_length(phone_number) <= 12)), + CONSTRAINT check_d7af4d3eb5 CHECK ((char_length(telesign_reference_xid) <= 255)) +); + CREATE TABLE user_preferences ( id integer NOT NULL, user_id integer NOT NULL, @@ -21960,12 +22377,13 @@ CREATE TABLE user_preferences ( setup_for_company boolean, render_whitespace_in_code boolean, tab_width smallint, - experience_level smallint, view_diffs_file_by_file boolean DEFAULT false NOT NULL, gitpod_enabled boolean DEFAULT false NOT NULL, markdown_surround_selection boolean DEFAULT true NOT NULL, diffs_deletion_color text, diffs_addition_color text, + markdown_automatic_lists boolean DEFAULT true NOT NULL, + use_legacy_web_ide boolean DEFAULT false NOT NULL, CONSTRAINT check_89bf269f41 CHECK ((char_length(diffs_deletion_color) <= 7)), CONSTRAINT check_d07ccd35f7 CHECK ((char_length(diffs_addition_color) <= 7)) ); @@ -22215,7 +22633,7 @@ CREATE TABLE vulnerabilities ( state smallint DEFAULT 1 NOT NULL, severity smallint NOT NULL, severity_overridden boolean DEFAULT false, - confidence smallint NOT NULL, + confidence smallint, confidence_overridden boolean DEFAULT false, resolved_by_id bigint, resolved_at timestamp with time zone, @@ -22239,6 +22657,44 @@ CREATE SEQUENCE vulnerabilities_id_seq ALTER SEQUENCE vulnerabilities_id_seq OWNED BY vulnerabilities.id; +CREATE TABLE vulnerability_advisories ( + uuid uuid NOT NULL, + created_at timestamp with time zone NOT NULL, + updated_at timestamp with time zone NOT NULL, + id bigint NOT NULL, + created_date date NOT NULL, + published_date date NOT NULL, + description text, + title text, + component_name text, + solution text, + not_impacted text, + cvss_v2 text, + cvss_v3 text, + affected_range text, + identifiers text[] DEFAULT '{}'::text[], + fixed_versions text[] DEFAULT '{}'::text[], + urls text[] DEFAULT '{}'::text[], + links text[] DEFAULT '{}'::text[], + CONSTRAINT check_3ab0544d19 CHECK ((char_length(title) <= 2048)), + CONSTRAINT check_3b57023409 CHECK ((char_length(affected_range) <= 32)), + CONSTRAINT check_4d5cd7be9c CHECK ((char_length(component_name) <= 2048)), + CONSTRAINT check_962f256a51 CHECK ((char_length(solution) <= 2048)), + CONSTRAINT check_aae93955fb CHECK ((char_length(cvss_v3) <= 128)), + CONSTRAINT check_b8a17497f3 CHECK ((char_length(cvss_v2) <= 128)), + CONSTRAINT check_c05a35f418 CHECK ((char_length(not_impacted) <= 2048)), + CONSTRAINT check_ff9f6483b6 CHECK ((char_length(description) <= 2048)) +); + +CREATE SEQUENCE vulnerability_advisories_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE vulnerability_advisories_id_seq OWNED BY vulnerability_advisories.id; + CREATE TABLE vulnerability_exports ( id bigint NOT NULL, created_at timestamp with time zone NOT NULL, @@ -22302,7 +22758,8 @@ CREATE TABLE vulnerability_feedback ( comment text, comment_timestamp timestamp with time zone, finding_uuid uuid, - dismissal_reason smallint + dismissal_reason smallint, + migrated_to_state_transition boolean DEFAULT false ); CREATE SEQUENCE vulnerability_feedback_id_seq @@ -22527,7 +22984,7 @@ CREATE TABLE vulnerability_occurrences ( created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, severity smallint NOT NULL, - confidence smallint NOT NULL, + confidence smallint, report_type smallint NOT NULL, project_id integer NOT NULL, scanner_id bigint NOT NULL, @@ -22546,6 +23003,7 @@ CREATE TABLE vulnerability_occurrences ( cve text, location jsonb, detection_method smallint DEFAULT 0 NOT NULL, + uuid_convert_string_to_uuid uuid DEFAULT '00000000-0000-0000-0000-000000000000'::uuid NOT NULL, CONSTRAINT check_4a3a60f2ba CHECK ((char_length(solution) <= 7000)), CONSTRAINT check_ade261da6b CHECK ((char_length(description) <= 15000)), CONSTRAINT check_df6dd20219 CHECK ((char_length(message) <= 3000)), @@ -22641,6 +23099,8 @@ CREATE TABLE vulnerability_state_transitions ( updated_at timestamp with time zone NOT NULL, author_id bigint, comment text, + dismissal_reason smallint, + CONSTRAINT check_d1ca8ec043 CHECK ((from_state <> to_state)), CONSTRAINT check_fca4a7ca39 CHECK ((char_length(comment) <= 255)) ); @@ -22711,7 +23171,6 @@ CREATE TABLE web_hooks ( created_at timestamp without time zone, updated_at timestamp without time zone, type character varying DEFAULT 'ProjectHook'::character varying, - service_id integer, push_events boolean DEFAULT true NOT NULL, issues_events boolean DEFAULT false NOT NULL, merge_requests_events boolean DEFAULT false NOT NULL, @@ -22739,7 +23198,9 @@ CREATE TABLE web_hooks ( backoff_count smallint DEFAULT 0 NOT NULL, disabled_until timestamp with time zone, encrypted_url_variables bytea, - encrypted_url_variables_iv bytea + encrypted_url_variables_iv bytea, + integration_id integer, + branch_filter_strategy smallint DEFAULT 0 NOT NULL ); CREATE SEQUENCE web_hooks_id_seq @@ -22856,7 +23317,7 @@ CREATE TABLE x509_certificates ( created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, subject_key_identifier character varying(255) NOT NULL, - subject character varying(255) NOT NULL, + subject character varying(512) NOT NULL, email character varying(255) NOT NULL, serial_number bytea NOT NULL, certificate_status smallint DEFAULT 0 NOT NULL, @@ -23022,6 +23483,8 @@ ALTER TABLE ONLY audit_events ALTER COLUMN id SET DEFAULT nextval('audit_events_ ALTER TABLE ONLY audit_events_external_audit_event_destinations ALTER COLUMN id SET DEFAULT nextval('audit_events_external_audit_event_destinations_id_seq'::regclass); +ALTER TABLE ONLY audit_events_streaming_event_type_filters ALTER COLUMN id SET DEFAULT nextval('audit_events_streaming_event_type_filters_id_seq'::regclass); + ALTER TABLE ONLY audit_events_streaming_headers ALTER COLUMN id SET DEFAULT nextval('audit_events_streaming_headers_id_seq'::regclass); ALTER TABLE ONLY authentication_events ALTER COLUMN id SET DEFAULT nextval('authentication_events_id_seq'::regclass); @@ -23092,8 +23555,6 @@ ALTER TABLE ONLY ci_build_trace_chunks ALTER COLUMN id SET DEFAULT nextval('ci_b ALTER TABLE ONLY ci_builds ALTER COLUMN id SET DEFAULT nextval('ci_builds_id_seq'::regclass); -ALTER TABLE ONLY ci_builds_metadata ALTER COLUMN id SET DEFAULT nextval('ci_builds_metadata_id_seq'::regclass); - ALTER TABLE ONLY ci_builds_runner_session ALTER COLUMN id SET DEFAULT nextval('ci_builds_runner_session_id_seq'::regclass); ALTER TABLE ONLY ci_daily_build_group_report_results ALTER COLUMN id SET DEFAULT nextval('ci_daily_build_group_report_results_id_seq'::regclass); @@ -23118,6 +23579,8 @@ ALTER TABLE ONLY ci_namespace_mirrors ALTER COLUMN id SET DEFAULT nextval('ci_na ALTER TABLE ONLY ci_namespace_monthly_usages ALTER COLUMN id SET DEFAULT nextval('ci_namespace_monthly_usages_id_seq'::regclass); +ALTER TABLE ONLY ci_partitions ALTER COLUMN id SET DEFAULT nextval('ci_partitions_id_seq'::regclass); + ALTER TABLE ONLY ci_pending_builds ALTER COLUMN id SET DEFAULT nextval('ci_pending_builds_id_seq'::regclass); ALTER TABLE ONLY ci_pipeline_artifacts ALTER COLUMN id SET DEFAULT nextval('ci_pipeline_artifacts_id_seq'::regclass); @@ -23280,6 +23743,8 @@ ALTER TABLE ONLY diff_note_positions ALTER COLUMN id SET DEFAULT nextval('diff_n ALTER TABLE ONLY dingtalk_tracker_data ALTER COLUMN id SET DEFAULT nextval('dingtalk_tracker_data_id_seq'::regclass); +ALTER TABLE ONLY dora_configurations ALTER COLUMN id SET DEFAULT nextval('dora_configurations_id_seq'::regclass); + ALTER TABLE ONLY dora_daily_metrics ALTER COLUMN id SET DEFAULT nextval('dora_daily_metrics_id_seq'::regclass); ALTER TABLE ONLY draft_notes ALTER COLUMN id SET DEFAULT nextval('draft_notes_id_seq'::regclass); @@ -23316,8 +23781,6 @@ ALTER TABLE ONLY evidences ALTER COLUMN id SET DEFAULT nextval('evidences_id_seq ALTER TABLE ONLY experiment_subjects ALTER COLUMN id SET DEFAULT nextval('experiment_subjects_id_seq'::regclass); -ALTER TABLE ONLY experiment_users ALTER COLUMN id SET DEFAULT nextval('experiment_users_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); @@ -23368,6 +23831,8 @@ ALTER TABLE ONLY geo_repository_updated_events ALTER COLUMN id SET DEFAULT nextv ALTER TABLE ONLY geo_reset_checksum_events ALTER COLUMN id SET DEFAULT nextval('geo_reset_checksum_events_id_seq'::regclass); +ALTER TABLE ONLY ghost_user_migrations ALTER COLUMN id SET DEFAULT nextval('ghost_user_migrations_id_seq'::regclass); + ALTER TABLE ONLY gitlab_subscription_histories ALTER COLUMN id SET DEFAULT nextval('gitlab_subscription_histories_id_seq'::regclass); ALTER TABLE ONLY gitlab_subscriptions ALTER COLUMN id SET DEFAULT nextval('gitlab_subscriptions_id_seq'::regclass); @@ -23424,6 +23889,10 @@ ALTER TABLE ONLY incident_management_pending_alert_escalations ALTER COLUMN id S ALTER TABLE ONLY incident_management_pending_issue_escalations ALTER COLUMN id SET DEFAULT nextval('incident_management_pending_issue_escalations_id_seq'::regclass); +ALTER TABLE ONLY incident_management_timeline_event_tag_links ALTER COLUMN id SET DEFAULT nextval('incident_management_timeline_event_tag_links_id_seq'::regclass); + +ALTER TABLE ONLY incident_management_timeline_event_tags ALTER COLUMN id SET DEFAULT nextval('incident_management_timeline_event_tags_id_seq'::regclass); + ALTER TABLE ONLY incident_management_timeline_events ALTER COLUMN id SET DEFAULT nextval('incident_management_timeline_events_id_seq'::regclass); ALTER TABLE ONLY index_statuses ALTER COLUMN id SET DEFAULT nextval('index_statuses_id_seq'::regclass); @@ -23518,6 +23987,8 @@ ALTER TABLE ONLY merge_request_diffs ALTER COLUMN id SET DEFAULT nextval('merge_ ALTER TABLE ONLY merge_request_metrics ALTER COLUMN id SET DEFAULT nextval('merge_request_metrics_id_seq'::regclass); +ALTER TABLE ONLY merge_request_predictions ALTER COLUMN merge_request_id SET DEFAULT nextval('merge_request_predictions_merge_request_id_seq'::regclass); + ALTER TABLE ONLY merge_request_reviewers ALTER COLUMN id SET DEFAULT nextval('merge_request_reviewers_id_seq'::regclass); ALTER TABLE ONLY merge_request_user_mentions ALTER COLUMN id SET DEFAULT nextval('merge_request_user_mentions_id_seq'::regclass); @@ -23548,6 +24019,8 @@ ALTER TABLE ONLY namespace_admin_notes ALTER COLUMN id SET DEFAULT nextval('name ALTER TABLE ONLY namespace_bans ALTER COLUMN id SET DEFAULT nextval('namespace_bans_id_seq'::regclass); +ALTER TABLE ONLY namespace_commit_emails ALTER COLUMN id SET DEFAULT nextval('namespace_commit_emails_id_seq'::regclass); + ALTER TABLE ONLY namespace_statistics ALTER COLUMN id SET DEFAULT nextval('namespace_statistics_id_seq'::regclass); ALTER TABLE ONLY namespaces ALTER COLUMN id SET DEFAULT nextval('namespaces_id_seq'::regclass); @@ -23586,6 +24059,8 @@ ALTER TABLE ONLY operations_strategies_user_lists ALTER COLUMN id SET DEFAULT ne ALTER TABLE ONLY operations_user_lists ALTER COLUMN id SET DEFAULT nextval('operations_user_lists_id_seq'::regclass); +ALTER TABLE ONLY p_ci_builds_metadata ALTER COLUMN id SET DEFAULT nextval('ci_builds_metadata_id_seq'::regclass); + ALTER TABLE ONLY packages_build_infos ALTER COLUMN id SET DEFAULT nextval('packages_build_infos_id_seq'::regclass); ALTER TABLE ONLY packages_composer_cache_files ALTER COLUMN id SET DEFAULT nextval('packages_composer_cache_files_id_seq'::regclass); @@ -23630,6 +24105,8 @@ ALTER TABLE ONLY packages_package_files ALTER COLUMN id SET DEFAULT nextval('pac ALTER TABLE ONLY packages_packages ALTER COLUMN id SET DEFAULT nextval('packages_packages_id_seq'::regclass); +ALTER TABLE ONLY packages_rpm_repository_files ALTER COLUMN id SET DEFAULT nextval('packages_rpm_repository_files_id_seq'::regclass); + ALTER TABLE ONLY packages_tags ALTER COLUMN id SET DEFAULT nextval('packages_tags_id_seq'::regclass); ALTER TABLE ONLY pages_deployment_states ALTER COLUMN pages_deployment_id SET DEFAULT nextval('pages_deployment_states_pages_deployment_id_seq'::regclass); @@ -23706,6 +24183,8 @@ ALTER TABLE ONLY project_statistics ALTER COLUMN id SET DEFAULT nextval('project ALTER TABLE ONLY project_topics ALTER COLUMN id SET DEFAULT nextval('project_topics_id_seq'::regclass); +ALTER TABLE ONLY project_wiki_repositories ALTER COLUMN id SET DEFAULT nextval('project_wiki_repositories_id_seq'::regclass); + ALTER TABLE ONLY projects ALTER COLUMN id SET DEFAULT nextval('projects_id_seq'::regclass); ALTER TABLE ONLY projects_sync_events ALTER COLUMN id SET DEFAULT nextval('projects_sync_events_id_seq'::regclass); @@ -23782,6 +24261,8 @@ ALTER TABLE ONLY sbom_occurrences ALTER COLUMN id SET DEFAULT nextval('sbom_occu ALTER TABLE ONLY sbom_sources ALTER COLUMN id SET DEFAULT nextval('sbom_sources_id_seq'::regclass); +ALTER TABLE ONLY sbom_vulnerable_component_versions ALTER COLUMN id SET DEFAULT nextval('sbom_vulnerable_component_versions_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); @@ -23902,6 +24383,8 @@ ALTER TABLE ONLY users_statistics ALTER COLUMN id SET DEFAULT nextval('users_sta ALTER TABLE ONLY vulnerabilities ALTER COLUMN id SET DEFAULT nextval('vulnerabilities_id_seq'::regclass); +ALTER TABLE ONLY vulnerability_advisories ALTER COLUMN id SET DEFAULT nextval('vulnerability_advisories_id_seq'::regclass); + ALTER TABLE ONLY vulnerability_exports ALTER COLUMN id SET DEFAULT nextval('vulnerability_exports_id_seq'::regclass); ALTER TABLE ONLY vulnerability_external_issue_links ALTER COLUMN id SET DEFAULT nextval('vulnerability_external_issue_links_id_seq'::regclass); @@ -24670,6 +25153,9 @@ ALTER TABLE ONLY audit_events_external_audit_event_destinations ALTER TABLE ONLY audit_events ADD CONSTRAINT audit_events_pkey PRIMARY KEY (id, created_at); +ALTER TABLE ONLY audit_events_streaming_event_type_filters + ADD CONSTRAINT audit_events_streaming_event_type_filters_pkey PRIMARY KEY (id); + ALTER TABLE ONLY audit_events_streaming_headers ADD CONSTRAINT audit_events_streaming_headers_pkey PRIMARY KEY (id); @@ -24799,8 +25285,11 @@ ALTER TABLE ONLY ci_build_trace_chunks ALTER TABLE ONLY ci_build_trace_metadata ADD CONSTRAINT ci_build_trace_metadata_pkey PRIMARY KEY (build_id); +ALTER TABLE ONLY p_ci_builds_metadata + ADD CONSTRAINT p_ci_builds_metadata_pkey PRIMARY KEY (id, partition_id); + ALTER TABLE ONLY ci_builds_metadata - ADD CONSTRAINT ci_builds_metadata_pkey PRIMARY KEY (id); + ADD CONSTRAINT ci_builds_metadata_pkey PRIMARY KEY (id, partition_id); ALTER TABLE ONLY ci_builds ADD CONSTRAINT ci_builds_pkey PRIMARY KEY (id); @@ -24844,6 +25333,9 @@ ALTER TABLE ONLY ci_namespace_mirrors ALTER TABLE ONLY ci_namespace_monthly_usages ADD CONSTRAINT ci_namespace_monthly_usages_pkey PRIMARY KEY (id); +ALTER TABLE ONLY ci_partitions + ADD CONSTRAINT ci_partitions_pkey PRIMARY KEY (id); + ALTER TABLE ONLY ci_pending_builds ADD CONSTRAINT ci_pending_builds_pkey PRIMARY KEY (id); @@ -24856,6 +25348,9 @@ ALTER TABLE ONLY ci_pipeline_chat_data ALTER TABLE ONLY ci_pipeline_messages ADD CONSTRAINT ci_pipeline_messages_pkey PRIMARY KEY (id); +ALTER TABLE ONLY ci_pipeline_metadata + ADD CONSTRAINT ci_pipeline_metadata_pkey PRIMARY KEY (pipeline_id); + ALTER TABLE ONLY ci_pipeline_schedule_variables ADD CONSTRAINT ci_pipeline_schedule_variables_pkey PRIMARY KEY (id); @@ -25066,6 +25561,9 @@ ALTER TABLE ONLY dast_site_validations ALTER TABLE ONLY dast_sites ADD CONSTRAINT dast_sites_pkey PRIMARY KEY (id); +ALTER TABLE ONLY dependency_proxy_blob_states + ADD CONSTRAINT dependency_proxy_blob_states_pkey PRIMARY KEY (dependency_proxy_blob_id); + ALTER TABLE ONLY dependency_proxy_blobs ADD CONSTRAINT dependency_proxy_blobs_pkey PRIMARY KEY (id); @@ -25120,6 +25618,9 @@ ALTER TABLE ONLY diff_note_positions ALTER TABLE ONLY dingtalk_tracker_data ADD CONSTRAINT dingtalk_tracker_data_pkey PRIMARY KEY (id); +ALTER TABLE ONLY dora_configurations + ADD CONSTRAINT dora_configurations_pkey PRIMARY KEY (id); + ALTER TABLE ONLY dora_daily_metrics ADD CONSTRAINT dora_daily_metrics_pkey PRIMARY KEY (id); @@ -25180,9 +25681,6 @@ ALTER TABLE ONLY evidences ALTER TABLE ONLY experiment_subjects ADD CONSTRAINT experiment_subjects_pkey PRIMARY KEY (id); -ALTER TABLE ONLY experiment_users - ADD CONSTRAINT experiment_users_pkey PRIMARY KEY (id); - ALTER TABLE ONLY experiments ADD CONSTRAINT experiments_pkey PRIMARY KEY (id); @@ -25258,6 +25756,9 @@ ALTER TABLE ONLY geo_repository_updated_events ALTER TABLE ONLY geo_reset_checksum_events ADD CONSTRAINT geo_reset_checksum_events_pkey PRIMARY KEY (id); +ALTER TABLE ONLY ghost_user_migrations + ADD CONSTRAINT ghost_user_migrations_pkey PRIMARY KEY (id); + ALTER TABLE ONLY gitlab_subscription_histories ADD CONSTRAINT gitlab_subscription_histories_pkey PRIMARY KEY (id); @@ -25357,6 +25858,12 @@ ALTER TABLE ONLY incident_management_pending_alert_escalations ALTER TABLE ONLY incident_management_pending_issue_escalations ADD CONSTRAINT incident_management_pending_issue_escalations_pkey PRIMARY KEY (id, process_at); +ALTER TABLE ONLY incident_management_timeline_event_tag_links + ADD CONSTRAINT incident_management_timeline_event_tag_links_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY incident_management_timeline_event_tags + ADD CONSTRAINT incident_management_timeline_event_tags_pkey PRIMARY KEY (id); + ALTER TABLE ONLY incident_management_timeline_events ADD CONSTRAINT incident_management_timeline_events_pkey PRIMARY KEY (id); @@ -25423,9 +25930,6 @@ ALTER TABLE ONLY issues_self_managed_prometheus_alert_events ALTER TABLE ONLY sprints ADD CONSTRAINT iteration_start_and_due_date_iterations_cadence_id_constraint EXCLUDE USING gist (iterations_cadence_id WITH =, daterange(start_date, due_date, '[]'::text) WITH &&) WHERE ((group_id IS NOT NULL)) DEFERRABLE INITIALLY DEFERRED; -ALTER TABLE ONLY sprints - ADD CONSTRAINT iteration_start_and_due_daterange_project_id_constraint EXCLUDE USING gist (project_id WITH =, daterange(start_date, due_date, '[]'::text) WITH &&) WHERE ((project_id IS NOT NULL)); - ALTER TABLE ONLY iterations_cadences ADD CONSTRAINT iterations_cadences_pkey PRIMARY KEY (id); @@ -25522,6 +26026,9 @@ ALTER TABLE ONLY merge_request_diffs ALTER TABLE ONLY merge_request_metrics ADD CONSTRAINT merge_request_metrics_pkey PRIMARY KEY (id); +ALTER TABLE ONLY merge_request_predictions + ADD CONSTRAINT merge_request_predictions_pkey PRIMARY KEY (merge_request_id); + ALTER TABLE ONLY merge_request_reviewers ADD CONSTRAINT merge_request_reviewers_pkey PRIMARY KEY (id); @@ -25576,6 +26083,9 @@ ALTER TABLE ONLY namespace_bans ALTER TABLE ONLY namespace_ci_cd_settings ADD CONSTRAINT namespace_ci_cd_settings_pkey PRIMARY KEY (namespace_id); +ALTER TABLE ONLY namespace_commit_emails + ADD CONSTRAINT namespace_commit_emails_pkey PRIMARY KEY (id); + ALTER TABLE ONLY namespace_details ADD CONSTRAINT namespace_details_pkey PRIMARY KEY (namespace_id); @@ -25738,6 +26248,12 @@ ALTER TABLE ONLY packages_packages ALTER TABLE ONLY packages_pypi_metadata ADD CONSTRAINT packages_pypi_metadata_pkey PRIMARY KEY (package_id); +ALTER TABLE ONLY packages_rpm_metadata + ADD CONSTRAINT packages_rpm_metadata_pkey PRIMARY KEY (package_id); + +ALTER TABLE ONLY packages_rpm_repository_files + ADD CONSTRAINT packages_rpm_repository_files_pkey PRIMARY KEY (id); + ALTER TABLE ONLY packages_rubygems_metadata ADD CONSTRAINT packages_rubygems_metadata_pkey PRIMARY KEY (package_id); @@ -25876,6 +26392,12 @@ ALTER TABLE ONLY project_statistics ALTER TABLE ONLY project_topics ADD CONSTRAINT project_topics_pkey PRIMARY KEY (id); +ALTER TABLE ONLY project_wiki_repositories + ADD CONSTRAINT project_wiki_repositories_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY project_wiki_repository_states + ADD CONSTRAINT project_wiki_repository_states_pkey PRIMARY KEY (project_id); + ALTER TABLE ONLY projects ADD CONSTRAINT projects_pkey PRIMARY KEY (id); @@ -25999,6 +26521,9 @@ ALTER TABLE ONLY sbom_occurrences ALTER TABLE ONLY sbom_sources ADD CONSTRAINT sbom_sources_pkey PRIMARY KEY (id); +ALTER TABLE ONLY sbom_vulnerable_component_versions + ADD CONSTRAINT sbom_vulnerable_component_versions_pkey PRIMARY KEY (id); + ALTER TABLE ONLY scim_identities ADD CONSTRAINT scim_identities_pkey PRIMARY KEY (id); @@ -26179,6 +26704,9 @@ ALTER TABLE ONLY user_namespace_callouts ALTER TABLE ONLY user_permission_export_uploads ADD CONSTRAINT user_permission_export_uploads_pkey PRIMARY KEY (id); +ALTER TABLE ONLY user_phone_number_validations + ADD CONSTRAINT user_phone_number_validations_pkey PRIMARY KEY (user_id); + ALTER TABLE ONLY user_preferences ADD CONSTRAINT user_preferences_pkey PRIMARY KEY (id); @@ -26212,6 +26740,9 @@ ALTER TABLE ONLY verification_codes ALTER TABLE ONLY vulnerabilities ADD CONSTRAINT vulnerabilities_pkey PRIMARY KEY (id); +ALTER TABLE ONLY vulnerability_advisories + ADD CONSTRAINT vulnerability_advisories_pkey PRIMARY KEY (id); + ALTER TABLE ONLY vulnerability_exports ADD CONSTRAINT vulnerability_exports_pkey PRIMARY KEY (id); @@ -27251,10 +27782,10 @@ CREATE INDEX ca_aggregations_last_full_run_at ON analytics_cycle_analytics_aggre CREATE INDEX ca_aggregations_last_incremental_run_at ON analytics_cycle_analytics_aggregations USING btree (last_incremental_run_at NULLS FIRST) WHERE (enabled IS TRUE); -CREATE INDEX cadence_create_iterations_automation ON iterations_cadences USING btree (automatic, duration_in_weeks, date((COALESCE(last_run_date, '1970-01-01'::date) + ((duration_in_weeks)::double precision * '7 days'::interval)))) WHERE (duration_in_weeks IS NOT NULL); - CREATE INDEX ci_builds_gitlab_monitor_metrics ON ci_builds USING btree (status, created_at, project_id) WHERE ((type)::text = 'Ci::Build'::text); +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); CREATE UNIQUE INDEX commit_user_mentions_on_commit_id_and_note_id_unique_index ON commit_user_mentions USING btree (commit_id, note_id); @@ -27291,6 +27822,10 @@ CREATE INDEX idx_analytics_devops_adoption_segments_on_namespace_id ON analytics CREATE INDEX idx_analytics_devops_adoption_snapshots_finalized ON analytics_devops_adoption_snapshots USING btree (namespace_id, end_time) WHERE (recorded_at >= end_time); +CREATE INDEX idx_approval_merge_request_rules_on_sec_orchestration_config_id ON approval_merge_request_rules USING btree (security_orchestration_policy_configuration_id); + +CREATE INDEX idx_approval_project_rules_on_sec_orchestration_config_id ON approval_project_rules USING btree (security_orchestration_policy_configuration_id); + CREATE INDEX idx_audit_events_part_on_entity_id_desc_author_id_created_at ON ONLY audit_events USING btree (entity_id, entity_type, id DESC, author_id, created_at); CREATE INDEX idx_award_emoji_on_user_emoji_name_awardable_type_awardable_id ON award_emoji USING btree (user_id, name, awardable_type, awardable_id); @@ -27377,6 +27912,8 @@ CREATE INDEX idx_mr_cc_diff_files_on_mr_cc_id_and_sha ON merge_request_context_c CREATE INDEX idx_mrs_on_target_id_and_created_at_and_state_id ON merge_requests USING btree (target_project_id, state_id, created_at, id); +CREATE UNIQUE INDEX idx_namespace_settings_on_default_compliance_framework_id ON namespace_settings USING btree (default_compliance_framework_id); + CREATE UNIQUE INDEX idx_on_compliance_management_frameworks_namespace_id_name ON compliance_management_frameworks USING btree (namespace_id, name); CREATE UNIQUE INDEX idx_on_external_approval_rules_project_id_external_url ON external_approval_rules USING btree (project_id, external_url); @@ -27387,7 +27924,7 @@ CREATE UNIQUE INDEX idx_on_external_status_checks_project_id_external_url ON ext CREATE UNIQUE INDEX idx_on_external_status_checks_project_id_name ON external_status_checks USING btree (project_id, name); -CREATE INDEX idx_open_issues_on_project_id_and_confidential ON issues USING btree (project_id, confidential) WHERE (state_id = 1); +CREATE INDEX idx_open_issues_on_project_and_confidential_and_author_and_id ON issues USING btree (project_id, confidential, author_id, id) WHERE (state_id = 1); CREATE INDEX idx_packages_debian_group_component_files_on_architecture_id ON packages_debian_group_component_files USING btree (architecture_id); @@ -27417,6 +27954,8 @@ CREATE UNIQUE INDEX idx_project_id_payload_key_self_managed_prometheus_alert_eve CREATE INDEX idx_project_repository_check_partial ON projects USING btree (repository_storage, created_at) WHERE (last_repository_check_at IS NULL); +CREATE INDEX idx_project_wiki_repository_states_project_wiki_repository_id ON project_wiki_repository_states USING btree (project_wiki_repository_id); + CREATE INDEX idx_projects_api_created_at_id_for_archived ON projects USING btree (created_at, id) WHERE ((archived = true) AND (pending_delete = false) AND (hidden = false)); CREATE INDEX idx_projects_api_created_at_id_for_archived_vis20 ON projects USING btree (created_at, id) WHERE ((archived = true) AND (visibility_level = 20) AND (pending_delete = false) AND (hidden = false)); @@ -27449,12 +27988,16 @@ CREATE UNIQUE INDEX idx_serverless_domain_cluster_on_clusters_applications_knati 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 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); CREATE UNIQUE INDEX idx_vuln_signatures_uniqueness_signature_sha ON vulnerability_finding_signatures USING btree (finding_id, algorithm_type, signature_sha); +CREATE INDEX idx_vulnerabilities_on_project_id_and_id_active_cis_dft_branch ON vulnerabilities USING btree (project_id, id) WHERE ((report_type = 7) AND (state = ANY (ARRAY[1, 4])) AND (present_on_default_branch IS TRUE)); + CREATE INDEX idx_vulnerabilities_partial_devops_adoption_and_default_branch ON vulnerabilities USING btree (project_id, created_at, present_on_default_branch) WHERE (state <> 1); CREATE UNIQUE INDEX idx_vulnerability_ext_issue_links_on_vulne_id_and_ext_issue ON vulnerability_external_issue_links USING btree (vulnerability_id, external_type, external_project_key, external_issue_key); @@ -27723,6 +28266,8 @@ CREATE INDEX index_boards_on_project_id ON boards USING btree (project_id); CREATE INDEX index_broadcast_message_on_ends_at_and_broadcast_type_and_id ON broadcast_messages USING btree (ends_at, broadcast_type, id); +CREATE INDEX index_broadcast_messages_on_namespace_id ON broadcast_messages USING btree (namespace_id); + CREATE INDEX index_btree_namespaces_traversal_ids ON namespaces USING btree (traversal_ids); CREATE INDEX index_bulk_import_configurations_on_bulk_import_id ON bulk_import_configurations USING btree (bulk_import_id); @@ -27759,12 +28304,24 @@ CREATE UNIQUE INDEX index_ci_build_trace_chunks_on_build_id_and_chunk_index ON c CREATE INDEX index_ci_build_trace_metadata_on_trace_artifact_id ON ci_build_trace_metadata USING btree (trace_artifact_id); -CREATE UNIQUE INDEX index_ci_builds_metadata_on_build_id ON ci_builds_metadata USING btree (build_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); CREATE INDEX index_ci_builds_metadata_on_build_id_and_has_exposed_artifacts ON ci_builds_metadata USING btree (build_id) WHERE (has_exposed_artifacts IS TRUE); +CREATE INDEX p_ci_builds_metadata_build_id_id_idx ON ONLY p_ci_builds_metadata USING btree (build_id) INCLUDE (id) WHERE (interruptible = true); + CREATE INDEX index_ci_builds_metadata_on_build_id_and_id_and_interruptible ON ci_builds_metadata USING btree (build_id) INCLUDE (id) WHERE (interruptible = true); +CREATE UNIQUE INDEX p_ci_builds_metadata_build_id_partition_id_idx ON ONLY p_ci_builds_metadata USING btree (build_id, partition_id); + +CREATE UNIQUE INDEX index_ci_builds_metadata_on_build_id_partition_id_unique ON ci_builds_metadata USING btree (build_id, partition_id); + +CREATE UNIQUE INDEX p_ci_builds_metadata_id_partition_id_idx ON ONLY p_ci_builds_metadata USING btree (id, partition_id); + +CREATE UNIQUE INDEX index_ci_builds_metadata_on_id_partition_id_unique ON ci_builds_metadata USING btree (id, partition_id); + +CREATE INDEX p_ci_builds_metadata_project_id_idx ON ONLY p_ci_builds_metadata USING btree (project_id); + CREATE INDEX index_ci_builds_metadata_on_project_id ON ci_builds_metadata USING btree (project_id); CREATE INDEX index_ci_builds_on_auto_canceled_by_id ON ci_builds USING btree (auto_canceled_by_id); @@ -27895,6 +28452,10 @@ 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_next_run_at_and_active ON ci_pipeline_schedules USING btree (next_run_at, active); @@ -27993,10 +28554,6 @@ 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_token ON ci_runners USING btree (token); - -CREATE INDEX index_ci_runners_on_token_encrypted ON ci_runners USING btree (token_encrypted); - CREATE INDEX index_ci_runners_on_token_expires_at_and_id_desc ON ci_runners USING btree (token_expires_at, id DESC); CREATE INDEX index_ci_runners_on_token_expires_at_desc_and_id_desc ON ci_runners USING btree (token_expires_at DESC, id DESC); @@ -28159,6 +28716,8 @@ CREATE INDEX index_container_repositories_on_project_id_and_id ON container_repo CREATE UNIQUE INDEX index_container_repositories_on_project_id_and_name ON container_repositories USING btree (project_id, name); +CREATE INDEX index_container_repositories_on_status_and_id ON container_repositories USING btree (status, id) WHERE (status IS NOT NULL); + CREATE INDEX index_container_repository_on_name_trigram ON container_repositories USING gin (name gin_trgm_ops); CREATE UNIQUE INDEX index_content_blocked_states_on_container_id_commit_sha_path ON content_blocked_states USING btree (container_identifier, commit_sha, path); @@ -28229,6 +28788,16 @@ 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_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)); + +CREATE INDEX index_dependency_proxy_blob_states_on_dependency_proxy_blob_id ON dependency_proxy_blob_states USING btree (dependency_proxy_blob_id); + +CREATE INDEX index_dependency_proxy_blob_states_on_verification_state ON dependency_proxy_blob_states USING btree (verification_state); + +CREATE INDEX index_dependency_proxy_blob_states_pending_verification ON dependency_proxy_blob_states USING btree (verified_at NULLS FIRST) WHERE (verification_state = 0); + CREATE INDEX index_dependency_proxy_blobs_on_group_id_and_file_name ON dependency_proxy_blobs USING btree (group_id, file_name); CREATE INDEX index_dependency_proxy_blobs_on_group_id_status_read_at_id ON dependency_proxy_blobs USING btree (group_id, status, read_at, id); @@ -28341,6 +28910,8 @@ CREATE UNIQUE INDEX index_diff_note_positions_on_note_id_and_diff_type ON diff_n CREATE INDEX index_dingtalk_tracker_data_on_integration_id ON dingtalk_tracker_data USING btree (integration_id); +CREATE UNIQUE INDEX index_dora_configurations_on_project_id ON dora_configurations USING btree (project_id); + CREATE UNIQUE INDEX index_dora_daily_metrics_on_environment_id_and_date ON dora_daily_metrics USING btree (environment_id, date); CREATE INDEX index_draft_notes_on_author_id ON draft_notes USING btree (author_id); @@ -28367,6 +28938,8 @@ 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_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 UNIQUE INDEX index_environments_on_project_id_and_name ON environments USING btree (project_id, name); @@ -28377,6 +28950,8 @@ CREATE INDEX index_environments_on_project_id_and_tier ON environments USING btr CREATE INDEX index_environments_on_project_id_state_environment_type ON environments USING btree (project_id, state, environment_type); +CREATE INDEX index_environments_on_project_name_varchar_pattern_ops_state ON environments USING btree (project_id, lower((name)::text) varchar_pattern_ops, state); + CREATE INDEX index_environments_on_state_and_auto_delete_at ON environments USING btree (auto_delete_at) WHERE ((auto_delete_at IS NOT NULL) AND ((state)::text = 'stopped'::text)); CREATE INDEX index_environments_on_state_and_auto_stop_at ON environments USING btree (state, auto_stop_at) WHERE ((auto_stop_at IS NOT NULL) AND ((state)::text = 'available'::text)); @@ -28481,10 +29056,6 @@ CREATE INDEX index_experiment_subjects_on_project_id ON experiment_subjects USIN CREATE INDEX index_experiment_subjects_on_user_id ON experiment_subjects USING btree (user_id); -CREATE INDEX index_experiment_users_on_experiment_id ON experiment_users USING btree (experiment_id); - -CREATE INDEX index_experiment_users_on_user_id ON experiment_users 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)); @@ -28565,6 +29136,10 @@ CREATE INDEX index_geo_repository_updated_events_on_source ON geo_repository_upd CREATE INDEX index_geo_reset_checksum_events_on_project_id ON geo_reset_checksum_events USING btree (project_id); +CREATE INDEX index_ghost_user_migrations_on_consume_after_id ON ghost_user_migrations USING btree (consume_after, id); + +CREATE UNIQUE INDEX index_ghost_user_migrations_on_user_id ON ghost_user_migrations USING btree (user_id); + CREATE INDEX index_gin_ci_namespace_mirrors_on_traversal_ids ON ci_namespace_mirrors USING gin (traversal_ids); CREATE INDEX index_gin_ci_pending_builds_on_namespace_traversal_ids ON ci_pending_builds USING gin (namespace_traversal_ids); @@ -28575,6 +29150,8 @@ CREATE INDEX index_gitlab_subscriptions_on_end_date_and_namespace_id ON gitlab_s CREATE INDEX index_gitlab_subscriptions_on_hosted_plan_id ON gitlab_subscriptions USING btree (hosted_plan_id); +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 UNIQUE INDEX index_gpg_key_subkeys_on_fingerprint ON gpg_key_subkeys USING btree (fingerprint); @@ -28643,6 +29220,8 @@ CREATE INDEX index_group_stages_on_stage_event_hash_id ON analytics_cycle_analyt CREATE UNIQUE INDEX index_group_user_callouts_feature ON user_group_callouts USING btree (user_id, feature_name, group_id); +CREATE INDEX index_group_vulnerability_reads_common_finder_query_desc ON vulnerability_reads USING btree (namespace_id, state, report_type, severity DESC, vulnerability_id DESC); + CREATE UNIQUE INDEX index_group_wiki_repositories_on_disk_path ON group_wiki_repositories USING btree (disk_path); CREATE INDEX index_group_wiki_repositories_on_shard_id ON group_wiki_repositories USING btree (shard_id); @@ -28661,6 +29240,12 @@ CREATE INDEX index_im_issuable_escalation_statuses_on_policy_id ON incident_mana CREATE UNIQUE INDEX index_im_oncall_schedules_on_project_id_and_iid ON incident_management_oncall_schedules USING btree (project_id, iid); +CREATE INDEX index_im_timeline_event_id ON incident_management_timeline_event_tag_links USING btree (timeline_event_id); + +CREATE UNIQUE INDEX index_im_timeline_event_tags_on_lower_name_and_project_id ON incident_management_timeline_event_tags USING btree (project_id, lower(name)); + +CREATE UNIQUE INDEX index_im_timeline_event_tags_on_tag_id_and_event_id ON incident_management_timeline_event_tag_links USING btree (timeline_event_tag_id, timeline_event_id); + CREATE INDEX index_im_timeline_events_author_id ON incident_management_timeline_events USING btree (author_id); CREATE INDEX index_im_timeline_events_issue_id ON incident_management_timeline_events USING btree (issue_id); @@ -28689,6 +29274,8 @@ CREATE INDEX index_imported_projects_on_import_type_creator_id_created_at ON pro CREATE INDEX index_imported_projects_on_import_type_id ON projects USING btree (import_type, id) WHERE (import_type IS NOT NULL); +CREATE INDEX index_in_product_marketing_emails_on_track_series_id_clicked ON in_product_marketing_emails USING btree (track, series, id, cta_clicked_at); + CREATE UNIQUE INDEX index_in_product_marketing_emails_on_user_campaign ON in_product_marketing_emails USING btree (user_id, campaign); CREATE INDEX index_in_product_marketing_emails_on_user_id ON in_product_marketing_emails USING btree (user_id); @@ -28793,9 +29380,9 @@ 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); +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-\u218F]*'::text, NULL::text)) OR (description !~ similar_escape('[\u0000-\u218F]*'::text, NULL::text))); +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); @@ -28825,13 +29412,15 @@ CREATE INDEX index_issues_on_project_id_closed_at_desc_state_id_and_id ON issues CREATE INDEX index_issues_on_project_id_closed_at_state_id_and_id ON issues USING btree (project_id, closed_at, state_id, id); +CREATE INDEX index_issues_on_project_id_health_status_created_at_id ON issues USING btree (project_id, health_status, created_at, id); + CREATE INDEX index_issues_on_promoted_to_epic_id ON issues USING btree (promoted_to_epic_id) WHERE (promoted_to_epic_id IS NOT NULL); 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); +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-\u218F]*'::text, NULL::text)) OR (description !~ similar_escape('[\u0000-\u218F]*'::text, NULL::text))); +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); @@ -28841,6 +29430,8 @@ CREATE INDEX index_iterations_cadences_on_group_id ON iterations_cadences USING CREATE UNIQUE INDEX index_jira_connect_installations_on_client_key ON jira_connect_installations USING btree (client_key); +CREATE INDEX index_jira_connect_installations_on_instance_url ON jira_connect_installations USING btree (instance_url); + CREATE INDEX index_jira_connect_subscriptions_on_namespace_id ON jira_connect_subscriptions USING btree (namespace_id); CREATE INDEX index_jira_imports_on_label_id ON jira_imports USING btree (label_id); @@ -28961,8 +29552,6 @@ CREATE INDEX index_members_on_member_namespace_id ON members USING btree (member CREATE INDEX index_members_on_member_role_id ON members USING btree (member_role_id); -CREATE INDEX index_members_on_non_requested_non_invited_and_state_awaiting ON members USING btree (source_id) WHERE ((requested_at IS NULL) AND (invite_token IS NULL) AND (access_level > 5) AND (state = 1)); - 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); @@ -29041,9 +29630,13 @@ 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_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); + CREATE INDEX index_merge_requests_on_created_at ON merge_requests USING btree (created_at); -CREATE INDEX index_merge_requests_on_description_trigram ON merge_requests USING gin (description gin_trgm_ops); +CREATE INDEX index_merge_requests_on_description_trigram ON merge_requests USING gin (description gin_trgm_ops) WITH (fastupdate='false'); CREATE INDEX index_merge_requests_on_head_pipeline_id ON merge_requests USING btree (head_pipeline_id); @@ -29079,7 +29672,7 @@ CREATE INDEX index_merge_requests_on_target_project_id_and_updated_at_and_id ON CREATE INDEX index_merge_requests_on_target_project_id_iid_jira_description ON merge_requests USING btree (target_project_id, iid) WHERE (description ~ '[A-Z][A-Z_0-9]+-\d+'::text); -CREATE INDEX index_merge_requests_on_title_trigram ON merge_requests USING gin (title gin_trgm_ops); +CREATE INDEX index_merge_requests_on_title_trigram ON merge_requests USING gin (title gin_trgm_ops) WITH (fastupdate='false'); CREATE INDEX index_merge_requests_on_tp_id_and_merge_commit_sha_and_id ON merge_requests USING btree (target_project_id, merge_commit_sha, id); @@ -29123,6 +29716,8 @@ CREATE INDEX index_ml_candidate_metrics_on_candidate_id ON ml_candidate_metrics CREATE INDEX index_ml_candidate_params_on_candidate_id ON ml_candidate_params USING btree (candidate_id); +CREATE UNIQUE INDEX index_ml_candidate_params_on_candidate_id_on_name ON ml_candidate_params USING btree (candidate_id, name); + CREATE UNIQUE INDEX index_ml_candidates_on_experiment_id_and_iid ON ml_candidates USING btree (experiment_id, iid); CREATE INDEX index_ml_candidates_on_user_id ON ml_candidates USING btree (user_id); @@ -29151,6 +29746,12 @@ CREATE UNIQUE INDEX index_namespace_bans_on_namespace_id_and_user_id ON namespac CREATE INDEX index_namespace_bans_on_user_id ON namespace_bans USING btree (user_id); +CREATE INDEX index_namespace_commit_emails_on_email_id ON namespace_commit_emails USING btree (email_id); + +CREATE INDEX index_namespace_commit_emails_on_namespace_id ON namespace_commit_emails USING btree (namespace_id); + +CREATE UNIQUE INDEX index_namespace_commit_emails_on_user_id_and_namespace_id ON namespace_commit_emails USING btree (user_id, namespace_id); + CREATE UNIQUE INDEX index_namespace_root_storage_statistics_on_namespace_id ON namespace_root_storage_statistics USING btree (namespace_id); CREATE UNIQUE INDEX index_namespace_statistics_on_namespace_id ON namespace_statistics USING btree (namespace_id); @@ -29215,6 +29816,8 @@ CREATE INDEX index_notes_on_discussion_id ON notes USING btree (discussion_id); CREATE INDEX index_notes_on_id_where_confidential ON notes USING btree (id) WHERE (confidential = true); +CREATE INDEX index_notes_on_id_where_internal ON notes USING btree (id) WHERE (internal = true); + CREATE INDEX index_notes_on_line_code ON notes USING btree (line_code); CREATE INDEX index_notes_on_noteable_id_and_noteable_type_and_system ON notes USING btree (noteable_id, noteable_type, system); @@ -29265,12 +29868,6 @@ CREATE INDEX index_on_issues_closed_incidents_by_project_id_and_closed_at ON iss 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_assignees_updated_state_by_user_id ON merge_request_assignees USING btree (updated_state_by_user_id); - -CREATE INDEX index_on_merge_request_assignees_user_id_and_state ON merge_request_assignees USING btree (user_id, state) WHERE (state = 2); - -CREATE INDEX index_on_merge_request_reviewers_updated_state_by_user_id ON merge_request_reviewers USING btree (updated_state_by_user_id); - CREATE INDEX index_on_merge_request_reviewers_user_id_and_state ON merge_request_reviewers USING btree (user_id, state) WHERE (state = 2); CREATE INDEX index_on_merge_requests_for_latest_diffs ON merge_requests USING btree (target_project_id) INCLUDE (id, latest_merge_request_diff_id); @@ -29293,7 +29890,7 @@ CREATE INDEX index_on_projects_path ON projects USING btree (path); CREATE INDEX index_on_routes_lower_path ON routes USING btree (lower((path)::text)); -CREATE INDEX index_on_security_findings_uuid_and_id_order_desc ON security_findings USING btree (uuid, id DESC); +CREATE INDEX index_on_todos_user_project_target_and_state ON todos USING btree (user_id, project_id, target_type, target_id, id) WHERE ((state)::text = 'pending'::text); CREATE INDEX index_on_users_lower_email ON users USING btree (lower((email)::text)); @@ -29407,6 +30004,8 @@ CREATE INDEX index_packages_packages_on_name_trigram ON packages_packages USING CREATE INDEX index_packages_packages_on_project_id_and_created_at ON packages_packages USING btree (project_id, created_at); +CREATE INDEX index_packages_packages_on_project_id_and_lower_version ON packages_packages USING btree (project_id, lower((version)::text)) WHERE (package_type = 4); + CREATE INDEX index_packages_packages_on_project_id_and_package_type ON packages_packages USING btree (project_id, package_type); CREATE INDEX index_packages_packages_on_project_id_and_status_and_id ON packages_packages USING btree (project_id, status, id); @@ -29415,6 +30014,10 @@ CREATE INDEX index_packages_packages_on_project_id_and_version ON packages_packa CREATE INDEX index_packages_project_id_name_partial_for_nuget ON packages_packages USING btree (project_id, name) WHERE (((name)::text <> 'NuGet.Temporary.Package'::text) AND (version IS NOT NULL) AND (package_type = 4)); +CREATE INDEX index_packages_rpm_metadata_on_package_id ON packages_rpm_metadata USING btree (package_id); + +CREATE INDEX index_packages_rpm_repository_files_on_project_id_and_file_name ON packages_rpm_repository_files USING btree (project_id, file_name); + CREATE INDEX index_packages_tags_on_package_id ON packages_tags USING btree (package_id); CREATE INDEX index_packages_tags_on_package_id_and_updated_at ON packages_tags USING btree (package_id, updated_at DESC); @@ -29555,6 +30158,10 @@ CREATE INDEX index_project_group_links_on_project_id ON project_group_links USIN CREATE INDEX index_project_import_data_on_project_id ON project_import_data USING btree (project_id); +CREATE INDEX index_project_incident_management_settings_on_p_id_sla_timer ON project_incident_management_settings USING btree (project_id) WHERE (sla_timer = true); + +CREATE INDEX index_project_members_on_id_temp ON members USING btree (id) WHERE ((source_type)::text = 'Project'::text); + CREATE INDEX index_project_mirror_data_on_last_successful_update_at ON project_mirror_data USING btree (last_successful_update_at); CREATE INDEX index_project_mirror_data_on_last_update_at_and_retry_count ON project_mirror_data USING btree (last_update_at, retry_count); @@ -29611,6 +30218,16 @@ CREATE INDEX index_project_topics_on_topic_id ON project_topics USING btree (top CREATE UNIQUE INDEX index_project_user_callouts_feature ON user_project_callouts USING btree (user_id, feature_name, project_id); +CREATE UNIQUE INDEX index_project_wiki_repositories_on_project_id ON project_wiki_repositories USING btree (project_id); + +CREATE INDEX index_project_wiki_repository_states_failed_verification ON project_wiki_repository_states USING btree (verification_retry_at NULLS FIRST) WHERE (verification_state = 3); + +CREATE INDEX index_project_wiki_repository_states_needs_verification ON project_wiki_repository_states USING btree (verification_state) WHERE ((verification_state = 0) OR (verification_state = 3)); + +CREATE INDEX index_project_wiki_repository_states_on_verification_state ON project_wiki_repository_states USING btree (verification_state); + +CREATE INDEX index_project_wiki_repository_states_pending_verification ON project_wiki_repository_states USING btree (verified_at NULLS FIRST) WHERE (verification_state = 0); + CREATE INDEX index_projects_aimed_for_deletion ON projects USING btree (marked_for_deletion_at) WHERE ((marked_for_deletion_at IS NOT NULL) AND (pending_delete = false)); CREATE INDEX index_projects_api_created_at_id_desc ON projects USING btree (created_at, id DESC); @@ -29733,6 +30350,8 @@ CREATE INDEX index_protected_branch_unprotect_access_levels_on_group_id ON prote CREATE INDEX index_protected_branch_unprotect_access_levels_on_user_id ON protected_branch_unprotect_access_levels USING btree (user_id); +CREATE INDEX index_protected_branches_namespace_id ON protected_branches USING btree (namespace_id) WHERE (namespace_id IS NOT NULL); + CREATE INDEX index_protected_branches_on_project_id ON protected_branches USING btree (project_id); CREATE INDEX index_protected_environment_approval_rules_on_group_id ON protected_environment_approval_rules USING btree (group_id); @@ -29789,6 +30408,8 @@ CREATE INDEX index_releases_on_author_id_id_created_at ON releases USING btree ( CREATE INDEX index_releases_on_project_id_and_released_at_and_id ON releases USING btree (project_id, released_at, id); +CREATE INDEX index_releases_on_project_id_id ON releases USING btree (project_id, id); + CREATE UNIQUE INDEX index_releases_on_project_tag_unique ON releases USING btree (project_id, tag); CREATE INDEX index_releases_on_released_at ON releases USING btree (released_at); @@ -29899,16 +30520,24 @@ CREATE UNIQUE INDEX index_saved_replies_on_name_text_pattern_ops ON saved_replie CREATE INDEX index_sbom_component_versions_on_component_id ON sbom_component_versions USING btree (component_id); +CREATE UNIQUE INDEX index_sbom_component_versions_on_component_id_and_version ON sbom_component_versions USING btree (component_id, version); + +CREATE UNIQUE INDEX index_sbom_components_on_component_type_name_and_purl_type ON sbom_components USING btree (name, purl_type, component_type); + CREATE INDEX index_sbom_occurrences_on_component_id ON sbom_occurrences USING btree (component_id); 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_sources_on_source_type_and_source ON sbom_sources USING btree (source_type, source); + 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); @@ -29921,24 +30550,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_findings_on_confidence ON security_findings USING btree (confidence); - -CREATE INDEX index_security_findings_on_project_fingerprint ON security_findings USING btree (project_fingerprint); - -CREATE INDEX index_security_findings_on_scan_id_and_deduplicated ON security_findings USING btree (scan_id, deduplicated); - -CREATE INDEX index_security_findings_on_scan_id_and_id ON security_findings USING btree (scan_id, id); - -CREATE INDEX index_security_findings_on_scanner_id ON security_findings USING btree (scanner_id); - -CREATE INDEX index_security_findings_on_severity ON security_findings USING btree (severity); - -CREATE UNIQUE INDEX index_security_findings_on_unique_columns ON security_findings USING btree (uuid, scan_id, partition_number); - 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))); @@ -30051,8 +30668,6 @@ CREATE INDEX index_sprints_on_due_date ON sprints USING btree (due_date); CREATE INDEX index_sprints_on_group_id ON sprints USING btree (group_id); -CREATE UNIQUE INDEX index_sprints_on_project_id_and_iid ON sprints USING btree (project_id, iid); - CREATE INDEX index_sprints_on_title ON sprints USING btree (title); CREATE INDEX index_sprints_on_title_trigram ON sprints USING gin (title gin_trgm_ops); @@ -30171,6 +30786,10 @@ CREATE INDEX index_u2f_registrations_on_key_handle ON u2f_registrations USING bt CREATE INDEX index_u2f_registrations_on_user_id ON u2f_registrations USING btree (user_id); +CREATE UNIQUE INDEX index_uniq_ci_runners_on_token ON ci_runners USING btree (token); + +CREATE UNIQUE INDEX index_uniq_ci_runners_on_token_encrypted ON ci_runners USING btree (token_encrypted); + CREATE UNIQUE INDEX index_uniq_im_issuable_escalation_statuses_on_issue_id ON incident_management_issuable_escalation_statuses USING btree (issue_id); CREATE UNIQUE INDEX index_uniq_projects_on_runners_token ON projects USING btree (runners_token); @@ -30221,7 +30840,7 @@ CREATE UNIQUE INDEX index_user_canonical_emails_on_user_id ON user_canonical_ema CREATE UNIQUE INDEX index_user_canonical_emails_on_user_id_and_canonical_email ON user_canonical_emails USING btree (user_id, canonical_email); -CREATE INDEX index_user_credit_card_validations_meta_data_full_match ON user_credit_card_validations USING btree (holder_name, expiration_date, last_digits, credit_card_validated_at); +CREATE INDEX index_user_credit_card_validations_meta_data_full_match_lower ON user_credit_card_validations USING btree (lower(holder_name), expiration_date, last_digits, credit_card_validated_at); CREATE INDEX index_user_credit_card_validations_meta_data_partial_match ON user_credit_card_validations USING btree (expiration_date, last_digits, network, credit_card_validated_at); @@ -30229,6 +30848,10 @@ CREATE INDEX index_user_custom_attributes_on_key_and_value ON user_custom_attrib CREATE UNIQUE INDEX index_user_custom_attributes_on_user_id_and_key ON user_custom_attributes USING btree (user_id, key); +CREATE INDEX index_user_details_on_password_last_changed_at ON user_details USING btree (password_last_changed_at); + +COMMENT ON INDEX index_user_details_on_password_last_changed_at IS 'JiHu-specific index'; + CREATE UNIQUE INDEX index_user_details_on_phone ON user_details USING btree (phone) WHERE (phone IS NOT NULL); COMMENT ON INDEX index_user_details_on_phone IS 'JiHu-specific index'; @@ -30245,6 +30868,8 @@ CREATE INDEX index_user_namespace_callouts_on_namespace_id ON user_namespace_cal CREATE INDEX index_user_permission_export_uploads_on_user_id_and_status ON user_permission_export_uploads USING btree (user_id, status); +CREATE INDEX index_user_phone_validations_on_dial_code_phone_number ON user_phone_number_validations USING btree (international_dial_code, phone_number); + CREATE INDEX index_user_preferences_on_gitpod_enabled ON user_preferences USING btree (gitpod_enabled); CREATE UNIQUE INDEX index_user_preferences_on_user_id ON user_preferences USING btree (user_id); @@ -30299,7 +30924,7 @@ CREATE INDEX index_users_on_unconfirmed_email ON users USING btree (unconfirmed_ CREATE UNIQUE INDEX index_users_on_unlock_token ON users USING btree (unlock_token); -CREATE INDEX index_users_on_user_type ON users USING btree (user_type); +CREATE INDEX index_users_on_user_type_and_id ON users USING btree (user_type, id); CREATE INDEX index_users_on_username ON users USING btree (username); @@ -30331,6 +30956,8 @@ CREATE INDEX index_vuln_reads_on_namespace_id_state_severity_and_vuln_id ON vuln 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); @@ -30347,8 +30974,6 @@ CREATE INDEX index_vulnerabilities_on_last_edited_by_id ON vulnerabilities USING CREATE INDEX index_vulnerabilities_on_milestone_id ON vulnerabilities USING btree (milestone_id); -CREATE INDEX index_vulnerabilities_on_project_id_and_id_active_cis ON vulnerabilities USING btree (project_id, id) WHERE ((report_type = 7) AND (state = ANY (ARRAY[1, 4]))); - CREATE INDEX index_vulnerabilities_on_project_id_and_state_and_severity ON vulnerabilities USING btree (project_id, state, severity); CREATE INDEX index_vulnerabilities_on_resolved_by_id ON vulnerabilities USING btree (resolved_by_id); @@ -30383,6 +31008,10 @@ CREATE INDEX index_vulnerability_feedback_on_author_id ON vulnerability_feedback CREATE INDEX index_vulnerability_feedback_on_comment_author_id ON vulnerability_feedback USING btree (comment_author_id); +CREATE INDEX index_vulnerability_feedback_on_common_attributes ON vulnerability_feedback USING btree (project_id, category, feedback_type, project_fingerprint); + +CREATE INDEX index_vulnerability_feedback_on_feedback_type_and_finding_uuid ON vulnerability_feedback USING btree (feedback_type, finding_uuid); + CREATE INDEX index_vulnerability_feedback_on_issue_id ON vulnerability_feedback USING btree (issue_id); CREATE INDEX index_vulnerability_feedback_on_issue_id_not_null ON vulnerability_feedback USING btree (id) WHERE (issue_id IS NOT NULL); @@ -30447,6 +31076,8 @@ CREATE INDEX index_vulnerability_reads_on_location_image ON vulnerability_reads CREATE INDEX index_vulnerability_reads_on_location_image_partial ON vulnerability_reads USING btree (project_id, location_image) WHERE ((report_type = ANY (ARRAY[2, 7])) AND (location_image IS NOT NULL)); +CREATE INDEX index_vulnerability_reads_on_namespace_type_severity_id ON vulnerability_reads USING btree (namespace_id, report_type, severity, vulnerability_id); + CREATE INDEX index_vulnerability_reads_on_scanner_id ON vulnerability_reads USING btree (scanner_id); CREATE UNIQUE INDEX index_vulnerability_reads_on_uuid ON vulnerability_reads USING btree (uuid); @@ -30469,6 +31100,10 @@ CREATE UNIQUE INDEX index_vulnerability_statistics_on_unique_project_id ON vulne CREATE UNIQUE INDEX index_vulnerability_user_mentions_on_note_id ON vulnerability_user_mentions USING btree (note_id) WHERE (note_id IS NOT NULL); +CREATE INDEX index_vulnerable_component_versions_on_sbom_component_version ON sbom_vulnerable_component_versions USING btree (sbom_component_version_id); + +CREATE INDEX index_vulnerable_component_versions_on_vulnerability_advisory ON sbom_vulnerable_component_versions USING btree (vulnerability_advisory_id); + CREATE UNIQUE INDEX index_vulns_user_mentions_on_vulnerability_id ON vulnerability_user_mentions USING btree (vulnerability_id) WHERE (note_id IS NULL); CREATE UNIQUE INDEX index_vulns_user_mentions_on_vulnerability_id_and_note_id ON vulnerability_user_mentions USING btree (vulnerability_id, note_id); @@ -30479,12 +31114,12 @@ CREATE INDEX index_web_hook_logs_part_on_web_hook_id ON ONLY web_hook_logs USING CREATE INDEX index_web_hooks_on_group_id ON web_hooks USING btree (group_id) WHERE ((type)::text = 'GroupHook'::text); +CREATE INDEX index_web_hooks_on_integration_id ON web_hooks USING btree (integration_id); + CREATE INDEX index_web_hooks_on_project_id ON web_hooks USING btree (project_id); CREATE INDEX index_web_hooks_on_project_id_recent_failures ON web_hooks USING btree (project_id, recent_failures); -CREATE INDEX index_web_hooks_on_service_id ON web_hooks USING btree (service_id); - CREATE INDEX index_web_hooks_on_type ON web_hooks USING btree (type); CREATE UNIQUE INDEX index_webauthn_registrations_on_credential_xid ON webauthn_registrations USING btree (credential_xid); @@ -30573,6 +31208,28 @@ CREATE UNIQUE INDEX partial_index_sop_configs_on_project_id ON security_orchestr CREATE INDEX partial_index_user_id_app_id_created_at_token_not_revoked ON oauth_access_tokens USING btree (resource_owner_id, application_id, created_at) WHERE (revoked_at IS NULL); +CREATE INDEX scan_finding_approval_mr_rule_index_id ON approval_merge_request_rules USING btree (id) WHERE (report_type = 4); + +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_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); + +CREATE INDEX security_findings_confidence_idx ON ONLY security_findings USING btree (confidence); + +CREATE INDEX security_findings_project_fingerprint_idx ON ONLY security_findings USING btree (project_fingerprint); + +CREATE INDEX security_findings_scan_id_deduplicated_idx ON ONLY security_findings USING btree (scan_id, deduplicated); + +CREATE INDEX security_findings_scan_id_id_idx ON ONLY security_findings USING btree (scan_id, id); + +CREATE INDEX security_findings_scanner_id_idx ON ONLY security_findings USING btree (scanner_id); + +CREATE INDEX security_findings_severity_idx ON ONLY security_findings USING btree (severity); + +CREATE UNIQUE INDEX security_findings_uuid_scan_id_partition_number_idx ON ONLY security_findings USING btree (uuid, scan_id, partition_number); + CREATE UNIQUE INDEX snippet_user_mentions_on_snippet_id_and_note_id_index ON snippet_user_mentions USING btree (snippet_id, note_id); CREATE UNIQUE INDEX snippet_user_mentions_on_snippet_id_index ON snippet_user_mentions USING btree (snippet_id) WHERE (note_id IS NULL); @@ -30581,19 +31238,23 @@ 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_container_repos_on_non_migrated ON container_repositories USING btree (project_id, id) WHERE ((migration_state <> 'import_done'::text) AND (created_at < '2022-01-23 00:00:00'::timestamp without time zone)); +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_vulnerabilities_on_id_where_report_type_7_99 ON vulnerabilities USING btree (id) WHERE (report_type = ANY (ARRAY[7, 99])); + +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_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)); -CREATE INDEX tmp_index_ci_job_artifacts_on_id_where_trace_and_expire_at ON ci_job_artifacts USING btree (id) WHERE ((file_type = 3) AND (expire_at = ANY (ARRAY['2021-04-22 00:00:00+00'::timestamp with time zone, '2021-05-22 00:00:00+00'::timestamp with time zone, '2021-06-22 00:00:00+00'::timestamp with time zone, '2022-01-22 00:00:00+00'::timestamp with time zone, '2022-02-22 00:00:00+00'::timestamp with time zone, '2022-03-22 00:00:00+00'::timestamp with time zone, '2022-04-22 00:00:00+00'::timestamp with time zone]))); +CREATE INDEX tmp_index_ci_job_artifacts_on_id_expire_at_file_type_trace ON ci_job_artifacts USING btree (id) WHERE (((date_part('day'::text, timezone('UTC'::text, expire_at)) = ANY (ARRAY[(21)::double precision, (22)::double precision, (23)::double precision])) AND (date_part('minute'::text, timezone('UTC'::text, expire_at)) = ANY (ARRAY[(0)::double precision, (30)::double precision, (45)::double precision])) AND (date_part('second'::text, timezone('UTC'::text, expire_at)) = (0)::double precision)) OR (file_type = 3)); CREATE INDEX tmp_index_cis_vulnerability_reads_on_id ON vulnerability_reads USING btree (id) WHERE (report_type = 7); -CREATE INDEX tmp_index_container_repositories_on_id_migration_state ON container_repositories USING btree (id, migration_state); +CREATE INDEX tmp_index_container_repos_on_non_migrated ON container_repositories USING btree (project_id, id) WHERE (migration_state <> 'import_done'::text); -CREATE INDEX tmp_index_for_namespace_id_migration_on_group_members ON members USING btree (id) WHERE ((member_namespace_id IS NULL) AND ((type)::text = 'GroupMember'::text)); +CREATE INDEX tmp_index_container_repositories_on_id_migration_state ON container_repositories USING btree (id, migration_state); -CREATE INDEX tmp_index_for_null_project_namespace_id ON projects USING btree (id) WHERE (project_namespace_id IS NULL); +CREATE INDEX tmp_index_for_null_member_namespace_id ON members USING btree (member_namespace_id) WHERE (member_namespace_id IS NULL); 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)); @@ -30601,8 +31262,6 @@ CREATE INDEX tmp_index_issues_on_issue_type_and_id ON issues USING btree (issue_ CREATE INDEX tmp_index_members_on_state ON members USING btree (state) WHERE (state = 2); -CREATE INDEX tmp_index_merge_requests_draft_and_status ON merge_requests USING btree (id) WHERE ((draft = false) AND (state_id = 1) AND ((title)::text ~* '^(\[draft\]|\(draft\)|draft:|draft|\[WIP\]|WIP:|WIP)'::text)); - 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); @@ -30611,7 +31270,7 @@ CREATE INDEX tmp_index_on_vulnerabilities_non_dismissed ON vulnerabilities USING 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_todos_attention_request_action ON todos USING btree (id) WHERE (action = 10); +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])); @@ -30635,14 +31294,14 @@ CREATE UNIQUE INDEX unique_merge_request_metrics_by_merge_request_id ON merge_re CREATE UNIQUE INDEX unique_projects_on_name_namespace_id ON projects USING btree (name, namespace_id); +CREATE UNIQUE INDEX unique_streaming_event_type_filters_destination_id ON audit_events_streaming_event_type_filters USING btree (external_audit_event_destination_id, audit_event_type); + CREATE UNIQUE INDEX unique_vuln_merge_request_link_vuln_id_and_mr_id ON vulnerability_merge_request_links USING btree (vulnerability_id, merge_request_id); CREATE INDEX user_follow_users_followee_id_idx ON user_follow_users USING btree (followee_id); CREATE INDEX users_forbidden_state_idx ON users USING btree (id) WHERE ((confirmed_at IS NOT NULL) AND ((state)::text <> ALL (ARRAY['blocked'::text, 'banned'::text, 'ldap_blocked'::text]))); -CREATE UNIQUE INDEX vulnerability_feedback_unique_idx ON vulnerability_feedback USING btree (project_id, category, feedback_type, project_fingerprint); - CREATE UNIQUE INDEX vulnerability_occurrence_pipelines_on_unique_keys ON vulnerability_occurrence_pipelines USING btree (occurrence_id, pipeline_id); CREATE UNIQUE INDEX work_item_types_namespace_id_and_name_unique ON work_item_types USING btree (namespace_id, btrim(lower(name))); @@ -31927,6 +32586,18 @@ ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_p ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_63_pkey; +ALTER INDEX p_ci_builds_metadata_pkey ATTACH PARTITION ci_builds_metadata_pkey; + +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; + +ALTER INDEX p_ci_builds_metadata_build_id_partition_id_idx ATTACH PARTITION index_ci_builds_metadata_on_build_id_partition_id_unique; + +ALTER INDEX p_ci_builds_metadata_id_partition_id_idx ATTACH PARTITION index_ci_builds_metadata_on_id_partition_id_unique; + +ALTER INDEX p_ci_builds_metadata_project_id_idx ATTACH PARTITION index_ci_builds_metadata_on_project_id; + CREATE TRIGGER chat_names_loose_fk_trigger AFTER DELETE ON chat_names REFERENCING OLD TABLE AS old_table FOR EACH STATEMENT EXECUTE FUNCTION insert_into_loose_foreign_keys_deleted_records(); CREATE TRIGGER ci_builds_loose_fk_trigger AFTER DELETE ON ci_builds REFERENCING OLD TABLE AS old_table FOR EACH STATEMENT EXECUTE FUNCTION insert_into_loose_foreign_keys_deleted_records(); @@ -31945,6 +32616,12 @@ 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 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_1a857e8db6cd BEFORE INSERT OR UPDATE ON vulnerability_occurrences FOR EACH ROW EXECUTE FUNCTION trigger_1a857e8db6cd(); + 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_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(); @@ -31965,9 +32642,7 @@ CREATE TRIGGER trigger_insert_or_update_vulnerability_reads_from_occurrences AFT CREATE TRIGGER trigger_insert_vulnerability_reads_from_vulnerability AFTER UPDATE ON vulnerabilities FOR EACH ROW WHEN (((old.present_on_default_branch IS NOT TRUE) AND (new.present_on_default_branch IS TRUE))) EXECUTE FUNCTION insert_vulnerability_reads_from_vulnerability(); -CREATE TRIGGER trigger_namespaces_parent_id_on_insert AFTER INSERT ON namespaces FOR EACH ROW EXECUTE FUNCTION insert_namespaces_sync_event(); - -CREATE TRIGGER trigger_namespaces_parent_id_on_update AFTER UPDATE ON namespaces FOR EACH ROW WHEN ((old.parent_id IS DISTINCT FROM new.parent_id)) EXECUTE FUNCTION insert_namespaces_sync_event(); +CREATE TRIGGER trigger_namespaces_traversal_ids_on_update AFTER UPDATE ON namespaces FOR EACH ROW WHEN ((old.traversal_ids IS DISTINCT FROM new.traversal_ids)) EXECUTE FUNCTION insert_namespaces_sync_event(); CREATE TRIGGER trigger_projects_parent_id_on_insert AFTER INSERT ON projects FOR EACH ROW EXECUTE FUNCTION insert_projects_sync_event(); @@ -31992,11 +32667,14 @@ CREATE TRIGGER trigger_update_vulnerability_reads_on_vulnerability_update AFTER CREATE TRIGGER users_loose_fk_trigger AFTER DELETE ON users REFERENCING OLD TABLE AS old_table FOR EACH STATEMENT EXECUTE FUNCTION insert_into_loose_foreign_keys_deleted_records(); ALTER TABLE ONLY deployments - ADD CONSTRAINT fk_009fd21147 FOREIGN KEY (environment_id) REFERENCES environments(id) ON DELETE CASCADE NOT VALID; + ADD CONSTRAINT fk_009fd21147 FOREIGN KEY (environment_id) REFERENCES environments(id) ON DELETE CASCADE; ALTER TABLE ONLY epics ADD CONSTRAINT fk_013c9f36ca FOREIGN KEY (due_date_sourcing_epic_id) REFERENCES epics(id) ON DELETE SET NULL; +ALTER TABLE ONLY environments + ADD CONSTRAINT fk_01a033a308 FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE SET NULL; + ALTER TABLE ONLY incident_management_escalation_rules ADD CONSTRAINT fk_0314ee86eb FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; @@ -32093,9 +32771,15 @@ ALTER TABLE ONLY boards ALTER TABLE ONLY epics ADD CONSTRAINT fk_1fbed67632 FOREIGN KEY (start_date_sourcing_milestone_id) REFERENCES milestones(id) ON DELETE SET NULL; +ALTER TABLE ONLY ghost_user_migrations + ADD CONSTRAINT fk_202e642a2f FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; + ALTER TABLE ONLY coverage_fuzzing_corpuses ADD CONSTRAINT fk_204d40056a FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +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; @@ -32156,6 +32840,9 @@ ALTER TABLE ONLY lfs_objects_projects ALTER TABLE ONLY vulnerability_merge_request_links ADD CONSTRAINT fk_2ef3954596 FOREIGN KEY (vulnerability_id) REFERENCES vulnerabilities(id) ON DELETE CASCADE; +ALTER TABLE ONLY members + ADD CONSTRAINT fk_2f85abf8f1 FOREIGN KEY (member_namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY analytics_cycle_analytics_group_stages ADD CONSTRAINT fk_3078345d6d FOREIGN KEY (stage_event_hash_id) REFERENCES analytics_cycle_analytics_stage_event_hashes(id) ON DELETE CASCADE; @@ -32213,9 +32900,6 @@ ALTER TABLE ONLY epics ALTER TABLE ONLY ci_pipelines ADD CONSTRAINT fk_3d34ab2e06 FOREIGN KEY (pipeline_schedule_id) REFERENCES ci_pipeline_schedules(id) ON DELETE SET NULL; -ALTER TABLE ONLY merge_request_reviewers - ADD CONSTRAINT fk_3d674b9f23 FOREIGN KEY (updated_state_by_user_id) REFERENCES users(id) ON DELETE SET NULL; - ALTER TABLE ONLY protected_environment_approval_rules ADD CONSTRAINT fk_405568b491 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; @@ -32249,6 +32933,9 @@ ALTER TABLE ONLY user_namespace_callouts ALTER TABLE ONLY sbom_occurrences ADD CONSTRAINT fk_4b88e5b255 FOREIGN KEY (component_version_id) REFERENCES sbom_component_versions(id) ON DELETE CASCADE; +ALTER TABLE ONLY namespace_commit_emails + ADD CONSTRAINT fk_4d6ba63ba5 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY vulnerability_reads ADD CONSTRAINT fk_4f593f6c62 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE; @@ -32279,6 +32966,9 @@ ALTER TABLE ONLY vulnerability_feedback ALTER TABLE ONLY ml_candidates ADD CONSTRAINT fk_56d6ed4d3d FOREIGN KEY (experiment_id) REFERENCES ml_experiments(id) ON DELETE CASCADE; +ALTER TABLE ONLY approval_merge_request_rules + ADD CONSTRAINT fk_5822f009ea FOREIGN KEY (security_orchestration_policy_configuration_id) REFERENCES security_orchestration_policy_configurations(id) ON DELETE CASCADE; + ALTER TABLE ONLY deploy_keys_projects ADD CONSTRAINT fk_58a901ca7e FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -32321,6 +33011,9 @@ ALTER TABLE ONLY ci_builds 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; @@ -32399,6 +33092,9 @@ ALTER TABLE ONLY vulnerabilities ALTER TABLE ONLY issue_customer_relations_contacts ADD CONSTRAINT fk_7b92f835bb FOREIGN KEY (contact_id) REFERENCES customer_relations_contacts(id) ON DELETE CASCADE; +ALTER TABLE ONLY broadcast_messages + ADD CONSTRAINT fk_7bf2ec43da FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY vulnerabilities ADD CONSTRAINT fk_7c5bb22a22 FOREIGN KEY (due_date_sourcing_milestone_id) REFERENCES milestones(id) ON DELETE SET NULL; @@ -32456,6 +33152,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 sbom_vulnerable_component_versions + ADD CONSTRAINT fk_8a2a1197f9 FOREIGN KEY (sbom_component_version_id) REFERENCES sbom_component_versions(id) ON DELETE CASCADE; + ALTER TABLE ONLY protected_branch_merge_access_levels ADD CONSTRAINT fk_8a3072ccb3 FOREIGN KEY (protected_branch_id) REFERENCES protected_branches(id) ON DELETE CASCADE; @@ -32558,9 +33257,6 @@ ALTER TABLE ONLY epics ALTER TABLE ONLY dast_profiles ADD CONSTRAINT fk_aa76ef30e9 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; -ALTER TABLE ONLY members - ADD CONSTRAINT fk_aa82dcc1c6 FOREIGN KEY (member_namespace_id) REFERENCES namespaces(id) ON DELETE SET NULL; - ALTER TABLE ONLY alert_management_alerts ADD CONSTRAINT fk_aad61aedca FOREIGN KEY (environment_id) REFERENCES environments(id) ON DELETE SET NULL; @@ -32588,9 +33284,6 @@ ALTER TABLE ONLY vulnerability_reads ALTER TABLE ONLY dast_profile_schedules ADD CONSTRAINT fk_aef03d62e5 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE SET NULL; -ALTER TABLE ONLY merge_request_assignees - ADD CONSTRAINT fk_af036e3261 FOREIGN KEY (updated_state_by_user_id) REFERENCES users(id) ON DELETE SET NULL; - ALTER TABLE ONLY analytics_cycle_analytics_group_stages ADD CONSTRAINT fk_analytics_cycle_analytics_group_stages_group_value_stream_id FOREIGN KEY (group_value_stream_id) REFERENCES analytics_cycle_analytics_group_value_streams(id) ON DELETE CASCADE; @@ -32627,6 +33320,9 @@ ALTER TABLE ONLY issue_assignees ALTER TABLE ONLY agent_project_authorizations ADD CONSTRAINT fk_b7fe9b4777 FOREIGN KEY (agent_id) REFERENCES cluster_agents(id) ON DELETE CASCADE; +ALTER TABLE ONLY namespace_commit_emails + ADD CONSTRAINT fk_b8d89d555e FOREIGN KEY (email_id) REFERENCES emails(id) ON DELETE CASCADE; + ALTER TABLE ONLY ci_trigger_requests ADD CONSTRAINT fk_b8ec8b7245 FOREIGN KEY (trigger_id) REFERENCES ci_triggers(id) ON DELETE CASCADE; @@ -32741,9 +33437,6 @@ ALTER TABLE ONLY environments ALTER TABLE ONLY ci_builds ADD CONSTRAINT fk_d3130c9a7f FOREIGN KEY (commit_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE; -ALTER TABLE ONLY web_hooks - ADD CONSTRAINT fk_d47999a98a FOREIGN KEY (service_id) REFERENCES integrations(id) ON DELETE CASCADE; - ALTER TABLE ONLY ci_sources_pipelines ADD CONSTRAINT fk_d4e29af7d7 FOREIGN KEY (source_pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE; @@ -32756,6 +33449,9 @@ ALTER TABLE ONLY lists ALTER TABLE ONLY agent_activity_events ADD CONSTRAINT fk_d6f785c9fc FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE SET NULL; +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 metrics_users_starred_dashboards ADD CONSTRAINT fk_d76a2b9a8c FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -32780,12 +33476,18 @@ ALTER TABLE ONLY project_group_links ALTER TABLE ONLY project_topics ADD CONSTRAINT fk_db13576296 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY web_hooks + ADD CONSTRAINT fk_db1ea5699b FOREIGN KEY (integration_id) REFERENCES integrations(id) ON DELETE CASCADE; + ALTER TABLE ONLY security_scans ADD CONSTRAINT fk_dbc89265b9 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; ALTER TABLE ONLY epics ADD CONSTRAINT fk_dccd3f98fc FOREIGN KEY (assignee_id) REFERENCES users(id) ON DELETE SET NULL; +ALTER TABLE ONLY protected_branches + ADD CONSTRAINT fk_de9216e774 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE; + ALTER TABLE ONLY issues ADD CONSTRAINT fk_df75a7c8b8 FOREIGN KEY (promoted_to_epic_id) REFERENCES epics(id) ON DELETE SET NULL; @@ -32798,7 +33500,7 @@ ALTER TABLE ONLY ci_resources ALTER TABLE ONLY ci_sources_pipelines ADD CONSTRAINT fk_e1bad85861 FOREIGN KEY (pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE; -ALTER TABLE ONLY ci_builds_metadata +ALTER TABLE p_ci_builds_metadata ADD CONSTRAINT fk_e20479742e FOREIGN KEY (build_id) REFERENCES ci_builds(id) ON DELETE CASCADE; ALTER TABLE ONLY gitlab_subscriptions @@ -32822,9 +33524,6 @@ 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 sprints - ADD CONSTRAINT fk_e8206c9686 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; - ALTER TABLE ONLY application_settings ADD CONSTRAINT fk_e8a145f3a7 FOREIGN KEY (instance_administrators_group_id) REFERENCES namespaces(id) ON DELETE SET NULL; @@ -32846,6 +33545,9 @@ ALTER TABLE ONLY events ALTER TABLE ONLY coverage_fuzzing_corpuses ADD CONSTRAINT fk_ef5ebf339f FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE CASCADE; +ALTER TABLE ONLY approval_project_rules + ADD CONSTRAINT fk_efa5a1e3fb FOREIGN KEY (security_orchestration_policy_configuration_id) REFERENCES security_orchestration_policy_configurations(id) ON DELETE CASCADE; + ALTER TABLE ONLY vulnerabilities ADD CONSTRAINT fk_efb96ab1e2 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -33410,6 +34112,9 @@ ALTER TABLE ONLY project_metrics_settings ALTER TABLE ONLY prometheus_metrics ADD CONSTRAINT fk_rails_4c8957a707 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY dependency_proxy_blob_states + ADD CONSTRAINT fk_rails_4cdbb92cbd FOREIGN KEY (dependency_proxy_blob_id) REFERENCES dependency_proxy_blobs(id) ON DELETE CASCADE; + ALTER TABLE ONLY scim_identities ADD CONSTRAINT fk_rails_4d2056ebd9 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; @@ -33437,6 +34142,9 @@ ALTER TABLE ONLY resource_iteration_events ALTER TABLE ONLY status_page_settings ADD CONSTRAINT fk_rails_506e5ba391 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; +ALTER TABLE ONLY ci_pipeline_metadata + ADD CONSTRAINT fk_rails_50c1e9ea10 FOREIGN KEY (pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE; + ALTER TABLE ONLY project_repository_storage_moves ADD CONSTRAINT fk_rails_5106dbd44a FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -33461,15 +34169,15 @@ ALTER TABLE ONLY issuable_metric_images ALTER TABLE ONLY group_deploy_keys ADD CONSTRAINT fk_rails_5682fc07f8 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE RESTRICT; -ALTER TABLE ONLY experiment_users - ADD CONSTRAINT fk_rails_56d4708b4a FOREIGN KEY (experiment_id) REFERENCES experiments(id) ON DELETE CASCADE; - ALTER TABLE ONLY issue_user_mentions ADD CONSTRAINT fk_rails_57581fda73 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE; ALTER TABLE ONLY merge_request_assignees ADD CONSTRAINT fk_rails_579d375628 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; +ALTER TABLE ONLY incident_management_timeline_event_tag_links + ADD CONSTRAINT fk_rails_57baccd7f9 FOREIGN KEY (timeline_event_id) REFERENCES incident_management_timeline_events(id) ON DELETE CASCADE; + ALTER TABLE ONLY packages_debian_project_architectures ADD CONSTRAINT fk_rails_5808663adf FOREIGN KEY (distribution_id) REFERENCES packages_debian_project_distributions(id) ON DELETE CASCADE; @@ -33647,7 +34355,7 @@ 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 security_findings +ALTER TABLE security_findings ADD CONSTRAINT fk_rails_729b763a54 FOREIGN KEY (scanner_id) REFERENCES vulnerability_scanners(id) ON DELETE CASCADE; ALTER TABLE ONLY dast_scanner_profiles @@ -33674,6 +34382,9 @@ ALTER TABLE ONLY group_crm_settings ALTER TABLE ONLY clusters_applications_ingress ADD CONSTRAINT fk_rails_753a7b41c1 FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE; +ALTER TABLE ONLY incident_management_timeline_event_tag_links + ADD CONSTRAINT fk_rails_753b8b6ee3 FOREIGN KEY (timeline_event_tag_id) REFERENCES incident_management_timeline_event_tags(id) ON DELETE CASCADE; + ALTER TABLE ONLY release_links ADD CONSTRAINT fk_rails_753be7ae29 FOREIGN KEY (release_id) REFERENCES releases(id) ON DELETE CASCADE; @@ -33863,6 +34574,9 @@ ALTER TABLE ONLY packages_debian_project_distributions ALTER TABLE ONLY packages_rubygems_metadata ADD CONSTRAINT fk_rails_95a3f5ce78 FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE CASCADE; +ALTER TABLE ONLY project_wiki_repository_states + ADD CONSTRAINT fk_rails_9647227ce1 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY packages_pypi_metadata ADD CONSTRAINT fk_rails_9698717cdd FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE CASCADE; @@ -34013,6 +34727,9 @@ ALTER TABLE ONLY clusters ALTER TABLE ONLY packages_composer_metadata ADD CONSTRAINT fk_rails_ad48c2e5bb FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE CASCADE; +ALTER TABLE ONLY user_phone_number_validations + ADD CONSTRAINT fk_rails_ad6686f3d8 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; + ALTER TABLE ONLY analytics_cycle_analytics_group_stages ADD CONSTRAINT fk_rails_ae5da3409b FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; @@ -34055,6 +34772,9 @@ ALTER TABLE ONLY issues_prometheus_alert_events ALTER TABLE ONLY merge_trains ADD CONSTRAINT fk_rails_b374b5225d FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE; +ALTER TABLE ONLY merge_request_predictions + ADD CONSTRAINT fk_rails_b3b78cbcd0 FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE; + 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; @@ -34076,6 +34796,9 @@ ALTER TABLE ONLY approval_project_rules_protected_branches ALTER TABLE ONLY packages_composer_cache_files ADD CONSTRAINT fk_rails_b82cea43a0 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE SET NULL; +ALTER TABLE ONLY dora_configurations + ADD CONSTRAINT fk_rails_b9b8d90ddb FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY merge_trains ADD CONSTRAINT fk_rails_b9d67af01d FOREIGN KEY (target_project_id) REFERENCES projects(id) ON DELETE CASCADE; @@ -34085,7 +34808,7 @@ ALTER TABLE ONLY approval_project_rules_users ALTER TABLE ONLY lists ADD CONSTRAINT fk_rails_baed5f39b7 FOREIGN KEY (milestone_id) REFERENCES milestones(id) ON DELETE CASCADE; -ALTER TABLE ONLY security_findings +ALTER TABLE security_findings ADD CONSTRAINT fk_rails_bb63863cf1 FOREIGN KEY (scan_id) REFERENCES security_scans(id) ON DELETE CASCADE; ALTER TABLE ONLY packages_debian_project_component_files @@ -34148,6 +34871,9 @@ ALTER TABLE ONLY packages_nuget_dependency_link_metadata ALTER TABLE ONLY group_deploy_keys_groups ADD CONSTRAINT fk_rails_c3854f19f5 FOREIGN KEY (group_deploy_key_id) REFERENCES group_deploy_keys(id) ON DELETE CASCADE; +ALTER TABLE ONLY project_wiki_repositories + ADD CONSTRAINT fk_rails_c3dd796199 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY merge_request_user_mentions ADD CONSTRAINT fk_rails_c440b9ea31 FOREIGN KEY (note_id) REFERENCES notes(id) ON DELETE CASCADE; @@ -34256,6 +34982,12 @@ ALTER TABLE ONLY geo_hashed_storage_attachments_events ALTER TABLE ONLY ml_candidate_params ADD CONSTRAINT fk_rails_d4a51d1185 FOREIGN KEY (candidate_id) REFERENCES ml_candidates(id); +ALTER TABLE ONLY packages_rpm_repository_files + ADD CONSTRAINT fk_rails_d545cfaed2 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + +ALTER TABLE ONLY packages_rpm_metadata + ADD CONSTRAINT fk_rails_d79f02264b FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE CASCADE; + ALTER TABLE ONLY merge_request_reviewers ADD CONSTRAINT fk_rails_d9fec24b9d FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE; @@ -34283,6 +35015,9 @@ ALTER TABLE ONLY deployment_merge_requests ALTER TABLE ONLY packages_debian_group_component_files ADD CONSTRAINT fk_rails_dd262386e9 FOREIGN KEY (component_id) REFERENCES packages_debian_group_components(id) ON DELETE RESTRICT; +ALTER TABLE ONLY incident_management_timeline_event_tags + ADD CONSTRAINT fk_rails_dd5c91484e FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + ALTER TABLE ONLY user_callouts ADD CONSTRAINT fk_rails_ddfdd80f3d FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; @@ -34295,6 +35030,9 @@ ALTER TABLE ONLY packages_debian_project_distributions ALTER TABLE ONLY incident_management_oncall_shifts ADD CONSTRAINT fk_rails_df4feb286a FOREIGN KEY (rotation_id) REFERENCES incident_management_oncall_rotations(id) ON DELETE CASCADE; +ALTER TABLE ONLY namespace_commit_emails + ADD CONSTRAINT fk_rails_dfa4c104f5 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; + ALTER TABLE ONLY analytics_cycle_analytics_group_stages ADD CONSTRAINT fk_rails_dfb37c880d FOREIGN KEY (end_event_label_id) REFERENCES labels(id) ON DELETE CASCADE; @@ -34358,6 +35096,9 @@ ALTER TABLE ONLY dast_site_tokens ALTER TABLE ONLY group_deploy_keys_groups ADD CONSTRAINT fk_rails_e87145115d FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE; +ALTER TABLE ONLY audit_events_streaming_event_type_filters + ADD CONSTRAINT fk_rails_e8bd011129 FOREIGN KEY (external_audit_event_destination_id) REFERENCES audit_events_external_audit_event_destinations(id) ON DELETE CASCADE; + ALTER TABLE ONLY description_versions ADD CONSTRAINT fk_rails_e8f4caf9c7 FOREIGN KEY (epic_id) REFERENCES epics(id) ON DELETE CASCADE; @@ -34493,9 +35234,6 @@ ALTER TABLE ONLY customer_relations_contacts ALTER TABLE ONLY external_approval_rules ADD CONSTRAINT fk_rails_fd4f9ac573 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; -ALTER TABLE ONLY experiment_users - ADD CONSTRAINT fk_rails_fd805f771a FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; - ALTER TABLE ONLY cluster_groups ADD CONSTRAINT fk_rails_fdb8648a96 FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE; diff --git a/db/migrate/20220126191624_add_scan_file_path_to_dast_site_profile.rb b/db/migrate/20220126191624_add_scan_file_path_to_dast_site_profile.rb deleted file mode 100644 index eab02663e26f..000000000000 --- a/db/migrate/20220126191624_add_scan_file_path_to_dast_site_profile.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -class AddScanFilePathToDastSiteProfile < Gitlab::Database::Migration[2.0] - # rubocop:disable Migration/AddLimitToTextColumns - # limit is added in 20221012135524_add_scan_file_path_limit_for_dast_site_profile - def up - add_column :dast_site_profiles, :scan_file_path, :text - end - # rubocop:enable Migration/AddLimitToTextColumns - - def down - remove_column :dast_site_profiles, :scan_file_path, :text - end -end diff --git a/db/migrate/20220406193806_add_maven_package_requests_forwarding_to_application_settings.rb b/db/migrate/20220406193806_add_maven_package_requests_forwarding_to_application_settings.rb deleted file mode 100644 index 60b2efd3e9ce..000000000000 --- a/db/migrate/20220406193806_add_maven_package_requests_forwarding_to_application_settings.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddMavenPackageRequestsForwardingToApplicationSettings < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def up - add_column(:application_settings, :maven_package_requests_forwarding, :boolean, default: true, null: false) - end - - def down - remove_column(:application_settings, :maven_package_requests_forwarding) - end -end diff --git a/db/migrate/20220603125200_add_show_diff_preview_in_email_to_namespace_settings.rb b/db/migrate/20220603125200_add_show_diff_preview_in_email_to_namespace_settings.rb deleted file mode 100644 index ad32d5898407..000000000000 --- a/db/migrate/20220603125200_add_show_diff_preview_in_email_to_namespace_settings.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddShowDiffPreviewInEmailToNamespaceSettings < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - add_column :namespace_settings, :show_diff_preview_in_email, :boolean, default: true, null: false - end -end diff --git a/db/migrate/20220613112029_add_namespace_id_to_protected_branches.rb b/db/migrate/20220613112029_add_namespace_id_to_protected_branches.rb deleted file mode 100644 index 1620a23d564b..000000000000 --- a/db/migrate/20220613112029_add_namespace_id_to_protected_branches.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddNamespaceIdToProtectedBranches < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - add_column :protected_branches, :namespace_id, :bigint - end -end diff --git a/db/migrate/20220613112030_add_namespace_id_indexes_foreign_key_to_protected_branches.rb b/db/migrate/20220613112030_add_namespace_id_indexes_foreign_key_to_protected_branches.rb deleted file mode 100644 index 18a917437464..000000000000 --- a/db/migrate/20220613112030_add_namespace_id_indexes_foreign_key_to_protected_branches.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddNamespaceIdIndexesForeignKeyToProtectedBranches < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_protected_branches_namespace_id' - - def up - add_concurrent_index :protected_branches, :namespace_id, name: INDEX_NAME, where: 'namespace_id IS NOT NULL' - add_concurrent_foreign_key :protected_branches, :namespaces, column: :namespace_id, on_delete: :cascade - end - - def down - with_lock_retries do - remove_foreign_key :protected_branches, column: :namespace_id - end - remove_concurrent_index :protected_branches, :namespace_id, name: INDEX_NAME - end -end diff --git a/db/migrate/20220613112031_add_group_or_project_constraint_in_protected_branches.rb b/db/migrate/20220613112031_add_group_or_project_constraint_in_protected_branches.rb deleted file mode 100644 index b7f204504807..000000000000 --- a/db/migrate/20220613112031_add_group_or_project_constraint_in_protected_branches.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddGroupOrProjectConstraintInProtectedBranches < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - CONSTRAINT_NAME = 'protected_branches_project_id_namespace_id_any_not_null' - - def up - constraint = <<~CONSTRAINT - (project_id IS NULL) <> (namespace_id IS NULL) - CONSTRAINT - add_check_constraint :protected_branches, constraint, CONSTRAINT_NAME - end - - def down - remove_check_constraint :protected_branches, CONSTRAINT_NAME - end -end diff --git a/db/migrate/20220613112032_change_project_id_null_in_protected_branches.rb b/db/migrate/20220613112032_change_project_id_null_in_protected_branches.rb deleted file mode 100644 index 4bf8437d4fb3..000000000000 --- a/db/migrate/20220613112032_change_project_id_null_in_protected_branches.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class ChangeProjectIdNullInProtectedBranches < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def up - change_column_null :protected_branches, :project_id, true - end - - def down - change_column_null :protected_branches, :project_id, false - end -end diff --git a/db/migrate/20220615172230_add_user_preference_to_turn_off_automatic_lists.rb b/db/migrate/20220615172230_add_user_preference_to_turn_off_automatic_lists.rb deleted file mode 100644 index 4a0255aad060..000000000000 --- a/db/migrate/20220615172230_add_user_preference_to_turn_off_automatic_lists.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddUserPreferenceToTurnOffAutomaticLists < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def up - add_column :user_preferences, :markdown_automatic_lists, :boolean, default: true, null: false - end - - def down - remove_column :user_preferences, :markdown_automatic_lists, :boolean - end -end diff --git a/db/migrate/20220711142148_add_invitation_flow_enforcement_to_application_settings.rb b/db/migrate/20220711142148_add_invitation_flow_enforcement_to_application_settings.rb deleted file mode 100644 index f323faf9aa18..000000000000 --- a/db/migrate/20220711142148_add_invitation_flow_enforcement_to_application_settings.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -class AddInvitationFlowEnforcementToApplicationSettings < Gitlab::Database::Migration[2.0] - def change - add_column :application_settings, :invitation_flow_enforcement, - :boolean, - default: false, - null: false - end -end diff --git a/db/migrate/20220721065723_add_issue_branch_template_to_project_settings.rb b/db/migrate/20220721065723_add_issue_branch_template_to_project_settings.rb deleted file mode 100644 index d65bd2c21e71..000000000000 --- a/db/migrate/20220721065723_add_issue_branch_template_to_project_settings.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIssueBranchTemplateToProjectSettings < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - with_lock_retries do - add_column :project_settings, :issue_branch_template, :text, if_not_exists: true - end - - add_text_limit :project_settings, :issue_branch_template, 255 - end - - def down - remove_column :project_settings, :issue_branch_template, if_exists: true - end -end diff --git a/db/migrate/20220726171440_create_ghost_user_migrations.rb b/db/migrate/20220726171440_create_ghost_user_migrations.rb deleted file mode 100644 index c64ca4f77650..000000000000 --- a/db/migrate/20220726171440_create_ghost_user_migrations.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -class CreateGhostUserMigrations < Gitlab::Database::Migration[2.0] - def change - create_table :ghost_user_migrations do |t| - t.bigint :user_id, index: { unique: true }, null: false - t.bigint :initiator_user_id - t.timestamps_with_timezone null: false - t.boolean :hard_delete, default: false, null: false - end - end -end diff --git a/db/migrate/20220726171450_add_user_fk_to_ghost_user_migrations.rb b/db/migrate/20220726171450_add_user_fk_to_ghost_user_migrations.rb deleted file mode 100644 index 5904d132d1bf..000000000000 --- a/db/migrate/20220726171450_add_user_fk_to_ghost_user_migrations.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddUserFkToGhostUserMigrations < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - add_concurrent_foreign_key :ghost_user_migrations, :users, column: :user_id, on_delete: :cascade - end - - def down - with_lock_retries do - remove_foreign_key :ghost_user_migrations, column: :user_id - end - end -end diff --git a/db/migrate/20220802200719_add_user_details_profile_fields.rb b/db/migrate/20220802200719_add_user_details_profile_fields.rb deleted file mode 100644 index 952b0bc1d9a8..000000000000 --- a/db/migrate/20220802200719_add_user_details_profile_fields.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddUserDetailsProfileFields < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - # rubocop:disable Migration/AddLimitToTextColumns - # limits are added in 20220802202505_add_user_details_field_limits - def change - add_column :user_details, :linkedin, :text, null: false, default: '' - add_column :user_details, :twitter, :text, null: false, default: '' - add_column :user_details, :skype, :text, null: false, default: '' - add_column :user_details, :website_url, :text, null: false, default: '' - add_column :user_details, :location, :text, null: false, default: '' - add_column :user_details, :organization, :text, null: false, default: '' - end - # rubocop:enable Migration/AddLimitToTextColumns -end diff --git a/db/migrate/20220802202505_add_user_details_field_limits.rb b/db/migrate/20220802202505_add_user_details_field_limits.rb deleted file mode 100644 index 83b6a4528d31..000000000000 --- a/db/migrate/20220802202505_add_user_details_field_limits.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class AddUserDetailsFieldLimits < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - USER_DETAILS_FIELD_LIMIT = 500 - - def up - add_text_limit :user_details, :linkedin, USER_DETAILS_FIELD_LIMIT - add_text_limit :user_details, :twitter, USER_DETAILS_FIELD_LIMIT - add_text_limit :user_details, :skype, USER_DETAILS_FIELD_LIMIT - add_text_limit :user_details, :website_url, USER_DETAILS_FIELD_LIMIT - add_text_limit :user_details, :location, USER_DETAILS_FIELD_LIMIT - add_text_limit :user_details, :organization, USER_DETAILS_FIELD_LIMIT - end - - def down - remove_text_limit :user_details, :linkedin - remove_text_limit :user_details, :twitter - remove_text_limit :user_details, :skype - remove_text_limit :user_details, :website_url - remove_text_limit :user_details, :location - remove_text_limit :user_details, :organization - end -end diff --git a/db/migrate/20220803004853_add_auto_ban_user_to_namespace_settings.rb b/db/migrate/20220803004853_add_auto_ban_user_to_namespace_settings.rb deleted file mode 100644 index 6e03177ce7af..000000000000 --- a/db/migrate/20220803004853_add_auto_ban_user_to_namespace_settings.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -class AddAutoBanUserToNamespaceSettings < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - add_column :namespace_settings, :auto_ban_user_on_excessive_projects_download, :boolean, - default: false, null: false - end -end diff --git a/db/migrate/20220803235114_add_auto_ban_user_to_application_settings.rb b/db/migrate/20220803235114_add_auto_ban_user_to_application_settings.rb deleted file mode 100644 index 3b57c340921c..000000000000 --- a/db/migrate/20220803235114_add_auto_ban_user_to_application_settings.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true - -class AddAutoBanUserToApplicationSettings < Gitlab::Database::Migration[2.0] - def change - add_column :application_settings, :auto_ban_user_on_excessive_projects_download, :boolean, - default: false, null: false - end -end diff --git a/db/migrate/20220805180311_add_unique_index_on_sbom_component_type_and_name.rb b/db/migrate/20220805180311_add_unique_index_on_sbom_component_type_and_name.rb deleted file mode 100644 index 852b1283e921..000000000000 --- a/db/migrate/20220805180311_add_unique_index_on_sbom_component_type_and_name.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddUniqueIndexOnSbomComponentTypeAndName < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'index_sbom_components_on_component_type_and_name' - - disable_ddl_transaction! - - def up - add_concurrent_index :sbom_components, [:component_type, :name], unique: true, name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :sbom_components, name: INDEX_NAME - end -end diff --git a/db/migrate/20220805183952_add_unique_index_to_sbom_component_versions_on_component_id_and_version.rb b/db/migrate/20220805183952_add_unique_index_to_sbom_component_versions_on_component_id_and_version.rb deleted file mode 100644 index 03023bc6f2c5..000000000000 --- a/db/migrate/20220805183952_add_unique_index_to_sbom_component_versions_on_component_id_and_version.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddUniqueIndexToSbomComponentVersionsOnComponentIdAndVersion < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'index_sbom_component_versions_on_component_id_and_version' - - disable_ddl_transaction! - - def up - add_concurrent_index :sbom_component_versions, [:component_id, :version], unique: true, name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :sbom_component_versions, name: INDEX_NAME - end -end diff --git a/db/migrate/20220805193117_add_unique_index_to_sbom_sources_on_source_type_and_source.rb b/db/migrate/20220805193117_add_unique_index_to_sbom_sources_on_source_type_and_source.rb deleted file mode 100644 index 973cacaec5b3..000000000000 --- a/db/migrate/20220805193117_add_unique_index_to_sbom_sources_on_source_type_and_source.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddUniqueIndexToSbomSourcesOnSourceTypeAndSource < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'index_sbom_sources_on_source_type_and_source' - - disable_ddl_transaction! - - def up - add_concurrent_index :sbom_sources, [:source_type, :source], unique: true, name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :sbom_sources, name: INDEX_NAME - end -end diff --git a/db/migrate/20220815152905_create_vulnerability_advisories.rb b/db/migrate/20220815152905_create_vulnerability_advisories.rb deleted file mode 100644 index f01a17c6352a..000000000000 --- a/db/migrate/20220815152905_create_vulnerability_advisories.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class CreateVulnerabilityAdvisories < Gitlab::Database::Migration[2.0] - def change - create_table :vulnerability_advisories, id: false do |t| - t.uuid :uuid, null: false - t.timestamps_with_timezone null: false - t.primary_key :id - t.date :created_date, null: false - t.date :published_date, null: false - t.text :description, limit: 2048 - t.text :title, limit: 2048 - t.text :component_name, limit: 2048 - t.text :solution, limit: 2048 - t.text :not_impacted, limit: 2048 - t.text :cvss_v2, limit: 128 - t.text :cvss_v3, limit: 128 - t.text :affected_range, limit: 32 - t.text :identifiers, array: true, default: [] - t.text :fixed_versions, array: true, default: [] - t.text :urls, array: true, default: [] - t.text :links, array: true, default: [] - end - end -end diff --git a/db/migrate/20220816135816_create_sbom_vulnerable_component_versions.rb b/db/migrate/20220816135816_create_sbom_vulnerable_component_versions.rb deleted file mode 100644 index 6f50376f6faf..000000000000 --- a/db/migrate/20220816135816_create_sbom_vulnerable_component_versions.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class CreateSbomVulnerableComponentVersions < Gitlab::Database::Migration[2.0] - ADVISORY_INDEX_NAME = "index_vulnerable_component_versions_on_vulnerability_advisory" - SBOM_COMPONENT_INDEX_NAME = "index_vulnerable_component_versions_on_sbom_component_version" - - def change - create_table :sbom_vulnerable_component_versions do |t| - t.references :vulnerability_advisory, - index: { name: ADVISORY_INDEX_NAME } - - t.references :sbom_component_version, - index: { name: SBOM_COMPONENT_INDEX_NAME } - - t.timestamps_with_timezone null: false - end - end -end diff --git a/db/migrate/20220817122907_re_add_show_diff_preview_in_email_to_project_settings.rb b/db/migrate/20220817122907_re_add_show_diff_preview_in_email_to_project_settings.rb deleted file mode 100644 index bb5649e3a997..000000000000 --- a/db/migrate/20220817122907_re_add_show_diff_preview_in_email_to_project_settings.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class ReAddShowDiffPreviewInEmailToProjectSettings < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - add_column :project_settings, :show_diff_preview_in_email, :boolean, default: true, null: false - end -end diff --git a/db/migrate/20220818095225_add_max_pages_custom_domains_per_project.rb b/db/migrate/20220818095225_add_max_pages_custom_domains_per_project.rb deleted file mode 100644 index c5e1f5aede65..000000000000 --- a/db/migrate/20220818095225_add_max_pages_custom_domains_per_project.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddMaxPagesCustomDomainsPerProject < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - CONSTRAINT_NAME = "app_settings_max_pages_custom_domains_per_project_check" - - def up - return if column_exists?(:application_settings, :max_pages_custom_domains_per_project) - - add_column :application_settings, :max_pages_custom_domains_per_project, :integer, null: false, default: 0 - add_check_constraint :application_settings, "max_pages_custom_domains_per_project >= 0", CONSTRAINT_NAME - end - - def down - return unless column_exists?(:application_settings, :max_pages_custom_domains_per_project) - - remove_column :application_settings, :max_pages_custom_domains_per_project - end -end diff --git a/db/migrate/20220818125332_add_jitsu_tracking_columns_to_application_settings.rb b/db/migrate/20220818125332_add_jitsu_tracking_columns_to_application_settings.rb deleted file mode 100644 index 9013168c2c57..000000000000 --- a/db/migrate/20220818125332_add_jitsu_tracking_columns_to_application_settings.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddJitsuTrackingColumnsToApplicationSettings < Gitlab::Database::Migration[2.0] - def change - # rubocop:disable Migration/AddLimitToTextColumns - # limit is added in 20220818125703_add_jitsu_tracking_columns_to_application_settings_text_limits.rb - add_column :application_settings, :jitsu_host, :text - add_column :application_settings, :jitsu_project_xid, :text - add_column :application_settings, :clickhouse_connection_string, :text - add_column :application_settings, :jitsu_administrator_email, :text - add_column :application_settings, :encrypted_jitsu_administrator_password, :binary - add_column :application_settings, :encrypted_jitsu_administrator_password_iv, :binary - # rubocop:enable Migration/AddLimitToTextColumns - end -end diff --git a/db/migrate/20220818125703_add_jitsu_tracking_columns_to_application_settings_text_limits.rb b/db/migrate/20220818125703_add_jitsu_tracking_columns_to_application_settings_text_limits.rb deleted file mode 100644 index 41de6e347241..000000000000 --- a/db/migrate/20220818125703_add_jitsu_tracking_columns_to_application_settings_text_limits.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddJitsuTrackingColumnsToApplicationSettingsTextLimits < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - add_text_limit :application_settings, :jitsu_host, 255 - add_text_limit :application_settings, :jitsu_project_xid, 255 - add_text_limit :application_settings, :clickhouse_connection_string, 1024 - add_text_limit :application_settings, :jitsu_administrator_email, 255 - end - - def down - remove_text_limit :application_settings, :jitsu_host - remove_text_limit :application_settings, :jitsu_project_xid - remove_text_limit :application_settings, :clickhouse_connection_string - remove_text_limit :application_settings, :jitsu_administrator_email - end -end diff --git a/db/migrate/20220818132108_add_deleted_on_to_ml_experiments.rb b/db/migrate/20220818132108_add_deleted_on_to_ml_experiments.rb deleted file mode 100644 index e6ba9f78553b..000000000000 --- a/db/migrate/20220818132108_add_deleted_on_to_ml_experiments.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddDeletedOnToMlExperiments < Gitlab::Database::Migration[2.0] - def change - add_column :ml_experiments, :deleted_on, :datetime_with_timezone, index: true - end -end diff --git a/db/migrate/20220818140553_add_unique_index_to_sbom_occurrences_on_ingestion_attributes.rb b/db/migrate/20220818140553_add_unique_index_to_sbom_occurrences_on_ingestion_attributes.rb deleted file mode 100644 index 2538017e2871..000000000000 --- a/db/migrate/20220818140553_add_unique_index_to_sbom_occurrences_on_ingestion_attributes.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class AddUniqueIndexToSbomOccurrencesOnIngestionAttributes < Gitlab::Database::Migration[2.0] - 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 - add_concurrent_index :sbom_occurrences, ATTRIBUTES, 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/20220819153725_add_vulnerability_advisory_foreign_key_to_sbom_vulnerable_component_versions.rb b/db/migrate/20220819153725_add_vulnerability_advisory_foreign_key_to_sbom_vulnerable_component_versions.rb deleted file mode 100644 index 7f0c817875f3..000000000000 --- a/db/migrate/20220819153725_add_vulnerability_advisory_foreign_key_to_sbom_vulnerable_component_versions.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddVulnerabilityAdvisoryForeignKeyToSbomVulnerableComponentVersions < Gitlab::Database::Migration[2.0] - SOURCE_TABLE = :sbom_vulnerable_component_versions - TARGET_TABLE = :vulnerability_advisories - COLUMN = :vulnerability_advisory_id - - disable_ddl_transaction! - - def up - add_concurrent_foreign_key SOURCE_TABLE, TARGET_TABLE, column: COLUMN, on_delete: :cascade - end - - def down - with_lock_retries do - remove_foreign_key SOURCE_TABLE, column: COLUMN - end - end -end diff --git a/db/migrate/20220819162852_add_sbom_component_version_foreign_key_to_sbom_vulnerable_component_versions.rb b/db/migrate/20220819162852_add_sbom_component_version_foreign_key_to_sbom_vulnerable_component_versions.rb deleted file mode 100644 index a4f2005693c7..000000000000 --- a/db/migrate/20220819162852_add_sbom_component_version_foreign_key_to_sbom_vulnerable_component_versions.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddSbomComponentVersionForeignKeyToSbomVulnerableComponentVersions < Gitlab::Database::Migration[2.0] - SOURCE_TABLE = :sbom_vulnerable_component_versions - TARGET_TABLE = :sbom_component_versions - COLUMN = :sbom_component_version_id - - disable_ddl_transaction! - - def up - add_concurrent_foreign_key SOURCE_TABLE, TARGET_TABLE, column: COLUMN, on_delete: :cascade - end - - def down - with_lock_retries do - remove_foreign_key SOURCE_TABLE, column: COLUMN - end - end -end diff --git a/db/migrate/20220819184945_add_dashboard_limit_to_application_settings.rb b/db/migrate/20220819184945_add_dashboard_limit_to_application_settings.rb deleted file mode 100644 index f2ab4a043eaa..000000000000 --- a/db/migrate/20220819184945_add_dashboard_limit_to_application_settings.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class AddDashboardLimitToApplicationSettings < Gitlab::Database::Migration[2.0] - def change - add_column :application_settings, :dashboard_limit_enabled, :boolean, default: false, null: false - add_column :application_settings, :dashboard_limit, :integer, default: 0, null: false - add_column :application_settings, :dashboard_notification_limit, :integer, default: 0, null: false - add_column :application_settings, :dashboard_enforcement_limit, :integer, default: 0, null: false - add_column :application_settings, :dashboard_limit_new_namespace_creation_enforcement_date, :date - end -end diff --git a/db/migrate/20220822102651_add_namespace_id_to_broadcast_message.rb b/db/migrate/20220822102651_add_namespace_id_to_broadcast_message.rb deleted file mode 100644 index 5413f4473668..000000000000 --- a/db/migrate/20220822102651_add_namespace_id_to_broadcast_message.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddNamespaceIdToBroadcastMessage < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - add_column :broadcast_messages, :namespace_id, :bigint - end -end diff --git a/db/migrate/20220822103638_add_index_and_foreign_key_to_broadcast_message.rb b/db/migrate/20220822103638_add_index_and_foreign_key_to_broadcast_message.rb deleted file mode 100644 index a577e5ad1573..000000000000 --- a/db/migrate/20220822103638_add_index_and_foreign_key_to_broadcast_message.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexAndForeignKeyToBroadcastMessage < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_broadcast_messages_on_namespace_id' - - def up - add_concurrent_index :broadcast_messages, :namespace_id, name: INDEX_NAME - add_concurrent_foreign_key :broadcast_messages, :namespaces, column: :namespace_id, on_delete: :cascade - end - - def down - remove_foreign_key_if_exists :broadcast_messages, column: :namespace_id - remove_concurrent_index_by_name :broadcast_messages, name: INDEX_NAME - end -end diff --git a/db/migrate/20220824175648_limit_namespaces_sync_triggers_to_traversal_ids_update.rb b/db/migrate/20220824175648_limit_namespaces_sync_triggers_to_traversal_ids_update.rb deleted file mode 100644 index 142744b5493a..000000000000 --- a/db/migrate/20220824175648_limit_namespaces_sync_triggers_to_traversal_ids_update.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -class LimitNamespacesSyncTriggersToTraversalIdsUpdate < Gitlab::Database::Migration[2.0] - include Gitlab::Database::SchemaHelpers - - enable_lock_retries! - - TABLE_NAME = 'namespaces' - EVENT_TABLE_NAME = 'namespaces_sync_events' - FUNCTION_NAME = 'insert_namespaces_sync_event' - OLD_TRIGGER_ON_INSERT = 'trigger_namespaces_parent_id_on_insert' - OLD_TRIGGER_ON_UPDATE = 'trigger_namespaces_parent_id_on_update' - NEW_TRIGGER_ON_UPDATE = 'trigger_namespaces_traversal_ids_on_update' - - def up - create_trigger(TABLE_NAME, NEW_TRIGGER_ON_UPDATE, FUNCTION_NAME, fires: 'AFTER UPDATE') do - <<~SQL - WHEN (OLD.traversal_ids IS DISTINCT FROM NEW.traversal_ids) - SQL - end - drop_trigger(TABLE_NAME, OLD_TRIGGER_ON_UPDATE) - drop_trigger(TABLE_NAME, OLD_TRIGGER_ON_INSERT) - end - - # Revert both triggers to the version defined in db/migrate/20211011141242_create_namespaces_sync_trigger.rb - def down - create_trigger(TABLE_NAME, OLD_TRIGGER_ON_INSERT, FUNCTION_NAME, fires: 'AFTER INSERT') - create_trigger(TABLE_NAME, OLD_TRIGGER_ON_UPDATE, FUNCTION_NAME, fires: 'AFTER UPDATE') do - <<~SQL - WHEN (OLD.parent_id IS DISTINCT FROM NEW.parent_id) - SQL - end - drop_trigger(TABLE_NAME, NEW_TRIGGER_ON_UPDATE) - end -end diff --git a/db/migrate/20220824194103_remove_existing_work_item_type_backfill_migrations.rb b/db/migrate/20220824194103_remove_existing_work_item_type_backfill_migrations.rb deleted file mode 100644 index ed970e300993..000000000000 --- a/db/migrate/20220824194103_remove_existing_work_item_type_backfill_migrations.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class RemoveExistingWorkItemTypeBackfillMigrations < Gitlab::Database::Migration[2.0] - restrict_gitlab_migration gitlab_schema: :gitlab_main - - JOB_CLASS_NAME = 'BackfillWorkItemTypeIdForIssues' - - class BatchedMigration < MigrationRecord - self.table_name = 'batched_background_migrations' - end - - def up - # cleaning up so we can remove a custom batching strategy that is no longer necessary - # some environments might already have this background migrations scheduled and probably completed - BatchedMigration.where(job_class_name: JOB_CLASS_NAME).delete_all - end - - def down - # no-op - # we will reschedule this migration in the future, no need to add back here - end -end diff --git a/db/migrate/20220825105631_add_cube_api_key_to_application_settings.rb b/db/migrate/20220825105631_add_cube_api_key_to_application_settings.rb deleted file mode 100644 index 6ee5ad523152..000000000000 --- a/db/migrate/20220825105631_add_cube_api_key_to_application_settings.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class AddCubeApiKeyToApplicationSettings < Gitlab::Database::Migration[2.0] - def change - # rubocop:disable Migration/AddLimitToTextColumns - add_column :application_settings, :cube_api_base_url, :text - add_column :application_settings, :encrypted_cube_api_key, :binary - add_column :application_settings, :encrypted_cube_api_key_iv, :binary - # rubocop:enable Migration/AddLimitToTextColumns - end -end diff --git a/db/migrate/20220825134827_remove_not_null_constraint_for_confidence_columns.rb b/db/migrate/20220825134827_remove_not_null_constraint_for_confidence_columns.rb deleted file mode 100644 index e41d93ebf8b1..000000000000 --- a/db/migrate/20220825134827_remove_not_null_constraint_for_confidence_columns.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class RemoveNotNullConstraintForConfidenceColumns < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - change_column_null :vulnerabilities, :confidence, true - change_column_null :vulnerability_occurrences, :confidence, true - change_column_null :security_findings, :confidence, true - end - - def down - # no-op: We can not set `NOT NULL` constraint here as there can be NULL values already. - end -end diff --git a/db/migrate/20220828094411_add_rpm_max_file_size_to_plan_limits.rb b/db/migrate/20220828094411_add_rpm_max_file_size_to_plan_limits.rb deleted file mode 100644 index 32489fd5bcee..000000000000 --- a/db/migrate/20220828094411_add_rpm_max_file_size_to_plan_limits.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddRpmMaxFileSizeToPlanLimits < Gitlab::Database::Migration[2.0] - DOWNTIME = false - - def change - add_column :plan_limits, :rpm_max_file_size, :bigint, default: 5.gigabytes, null: false - end -end diff --git a/db/migrate/20220828131848_create_packages_rpm_metadata.rb b/db/migrate/20220828131848_create_packages_rpm_metadata.rb deleted file mode 100644 index bfaa441fc78a..000000000000 --- a/db/migrate/20220828131848_create_packages_rpm_metadata.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class CreatePackagesRpmMetadata < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - with_lock_retries do - create_table :packages_rpm_metadata, id: false do |t| - t.references :package, - primary_key: true, - default: nil, - index: true, - foreign_key: { to_table: :packages_packages, on_delete: :cascade }, - type: :bigint - t.text :release, default: '1', null: false, limit: 128 - t.text :summary, default: '', null: false, limit: 1000 - t.text :description, default: '', null: false, limit: 5000 - t.text :arch, default: '', null: false, limit: 255 - t.text :license, null: true, limit: 1000 - t.text :url, null: true, limit: 1000 - end - end - end - - def down - with_lock_retries do - drop_table :packages_rpm_metadata - end - end -end diff --git a/db/migrate/20220829183356_replace_index_on_credit_card_validations.rb b/db/migrate/20220829183356_replace_index_on_credit_card_validations.rb deleted file mode 100644 index 05fa7f75feb7..000000000000 --- a/db/migrate/20220829183356_replace_index_on_credit_card_validations.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class ReplaceIndexOnCreditCardValidations < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - OLD_INDEX_NAME = 'index_user_credit_card_validations_meta_data_full_match' - NEW_INDEX_NAME = 'index_user_credit_card_validations_meta_data_full_match_lower' - OLD_FIELDS = [:holder_name, :expiration_date, :last_digits, :credit_card_validated_at] - NEW_FIELDS = 'lower(holder_name), expiration_date, last_digits, credit_card_validated_at' - - def up - add_concurrent_index :user_credit_card_validations, NEW_FIELDS, name: NEW_INDEX_NAME - remove_concurrent_index :user_credit_card_validations, OLD_FIELDS, name: OLD_INDEX_NAME - end - - def down - add_concurrent_index :user_credit_card_validations, OLD_FIELDS, name: OLD_INDEX_NAME - remove_concurrent_index :user_credit_card_validations, NEW_FIELDS, name: NEW_INDEX_NAME - end -end diff --git a/db/migrate/20220830082928_add_text_limit_to_cube_api_base_url.rb b/db/migrate/20220830082928_add_text_limit_to_cube_api_base_url.rb deleted file mode 100644 index 7bab796a47f3..000000000000 --- a/db/migrate/20220830082928_add_text_limit_to_cube_api_base_url.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitToCubeApiBaseUrl < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - add_text_limit :application_settings, :cube_api_base_url, 512 - end - - def down - remove_text_limit :application_settings, :cube_api_base_url - end -end diff --git a/db/migrate/20220830114228_create_dora_configuration_table.rb b/db/migrate/20220830114228_create_dora_configuration_table.rb deleted file mode 100644 index ee5960d14b6d..000000000000 --- a/db/migrate/20220830114228_create_dora_configuration_table.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class CreateDoraConfigurationTable < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - create_table :dora_configurations do |t| - t.references :project, null: false, index: { unique: true }, foreign_key: { on_delete: :cascade } - t.text :branches_for_lead_time_for_changes, null: false, array: true, default: [] - end - end - - def down - drop_table :dora_configurations - end -end diff --git a/db/migrate/20220831182105_add_constraints_view.rb b/db/migrate/20220831182105_add_constraints_view.rb deleted file mode 100644 index 03c183b6e9f9..000000000000 --- a/db/migrate/20220831182105_add_constraints_view.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -class AddConstraintsView < Gitlab::Database::Migration[2.0] - def up - execute(<<~SQL) - CREATE OR REPLACE VIEW postgres_constraints - AS - SELECT - pg_constraint.oid AS oid, - pg_constraint.conname AS name, - pg_constraint.contype AS constraint_type, - pg_constraint.convalidated AS constraint_valid, - (SELECT array_agg(attname ORDER BY ordering) - FROM unnest(pg_constraint.conkey) WITH ORDINALITY attnums(attnum, ordering) - INNER JOIN pg_attribute ON pg_attribute.attnum = attnums.attnum AND pg_attribute.attrelid = pg_class.oid - ) AS column_names, - pg_namespace.nspname::text || '.'::text || pg_class.relname::text AS table_identifier, - -- pg_constraint reports a 0 oid rather than null if the constraint is not a partition child constraint. - nullif(pg_constraint.conparentid, 0) AS parent_constraint_oid, - pg_get_constraintdef(pg_constraint.oid) AS definition - FROM pg_constraint - INNER JOIN pg_class ON pg_constraint.conrelid = pg_class.oid - INNER JOIN pg_namespace ON pg_class.relnamespace = pg_namespace.oid; - SQL - end - - def down - execute(<<~SQL) - DROP VIEW postgres_constraints; - SQL - end -end diff --git a/db/migrate/20220901035722_add_temp_project_member_index.rb b/db/migrate/20220901035722_add_temp_project_member_index.rb deleted file mode 100644 index 0765ef09b5c0..000000000000 --- a/db/migrate/20220901035722_add_temp_project_member_index.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class AddTempProjectMemberIndex < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - TABLE_NAME = :members - INDEX_NAME = 'index_project_members_on_id_temp' - - def up - add_concurrent_index TABLE_NAME, :id, name: INDEX_NAME, where: "source_type = 'Project'" - end - - def down - remove_concurrent_index TABLE_NAME, :id, name: INDEX_NAME - end -end diff --git a/db/migrate/20220901090004_add_can_create_group_to_application_settings.rb b/db/migrate/20220901090004_add_can_create_group_to_application_settings.rb deleted file mode 100644 index a61f7c9a080c..000000000000 --- a/db/migrate/20220901090004_add_can_create_group_to_application_settings.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddCanCreateGroupToApplicationSettings < Gitlab::Database::Migration[2.0] - def change - add_column(:application_settings, :can_create_group, :boolean, default: true, null: false) - end -end diff --git a/db/migrate/20220901092853_update_can_create_group_application_setting.rb b/db/migrate/20220901092853_update_can_create_group_application_setting.rb deleted file mode 100644 index 42508184d621..000000000000 --- a/db/migrate/20220901092853_update_can_create_group_application_setting.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -class UpdateCanCreateGroupApplicationSetting < Gitlab::Database::Migration[2.0] - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - value = gitlab_config.respond_to?(:default_can_create_group) ? gitlab_config.default_can_create_group : true - value = Gitlab::Utils.to_boolean(value, default: true) - - execute_update(value: value) - end - - def down - execute_update(value: true) - end - - private - - def execute_update(value:) - execute "UPDATE application_settings SET can_create_group = #{value}" - end - - def gitlab_config - Gitlab.config.gitlab - end -end diff --git a/db/migrate/20220901114501_only_allow_merge_if_all_status_checks_passed.rb b/db/migrate/20220901114501_only_allow_merge_if_all_status_checks_passed.rb deleted file mode 100644 index 059ed657264c..000000000000 --- a/db/migrate/20220901114501_only_allow_merge_if_all_status_checks_passed.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class OnlyAllowMergeIfAllStatusChecksPassed < Gitlab::Database::Migration[2.0] - def change - add_column :project_settings, :only_allow_merge_if_all_status_checks_passed, :boolean, default: false, null: false - end -end diff --git a/db/migrate/20220901124637_add_last_downloaded_at_to_packages.rb b/db/migrate/20220901124637_add_last_downloaded_at_to_packages.rb deleted file mode 100644 index 0172ab573ea6..000000000000 --- a/db/migrate/20220901124637_add_last_downloaded_at_to_packages.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddLastDownloadedAtToPackages < Gitlab::Database::Migration[2.0] - def change - add_column :packages_packages, :last_downloaded_at, :datetime_with_timezone - end -end diff --git a/db/migrate/20220901131828_add_environments_project_name_lower_pattern_ops_index.rb b/db/migrate/20220901131828_add_environments_project_name_lower_pattern_ops_index.rb deleted file mode 100644 index d8b7cd9be285..000000000000 --- a/db/migrate/20220901131828_add_environments_project_name_lower_pattern_ops_index.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddEnvironmentsProjectNameLowerPatternOpsIndex < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_environments_on_project_name_varchar_pattern_ops' - - def up - add_concurrent_index :environments, 'project_id, lower(name) varchar_pattern_ops', name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :environments, INDEX_NAME - end -end diff --git a/db/migrate/20220901212027_add_merge_request_id_to_environments.rb b/db/migrate/20220901212027_add_merge_request_id_to_environments.rb deleted file mode 100644 index 4a230c737aed..000000000000 --- a/db/migrate/20220901212027_add_merge_request_id_to_environments.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddMergeRequestIdToEnvironments < Gitlab::Database::Migration[2.0] - def change - add_column :environments, :merge_request_id, :bigint - end -end diff --git a/db/migrate/20220902065314_create_ci_partitions.rb b/db/migrate/20220902065314_create_ci_partitions.rb deleted file mode 100644 index 1a8a4f172f86..000000000000 --- a/db/migrate/20220902065314_create_ci_partitions.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class CreateCiPartitions < Gitlab::Database::Migration[2.0] - def change - create_table :ci_partitions do |t| - t.timestamps_with_timezone null: false - end - end -end diff --git a/db/migrate/20220902065316_create_default_partition_record.rb b/db/migrate/20220902065316_create_default_partition_record.rb deleted file mode 100644 index 6493fb23d4c5..000000000000 --- a/db/migrate/20220902065316_create_default_partition_record.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class CreateDefaultPartitionRecord < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - restrict_gitlab_migration gitlab_schema: :gitlab_ci - - def up - execute(<<~SQL) - INSERT INTO "ci_partitions" ("id", "created_at", "updated_at") - VALUES (100, now(), now()); - SQL - - reset_pk_sequence!('ci_partitions') - end - - def down - execute(<<~SQL) - DELETE FROM "ci_partitions" WHERE "ci_partitions"."id" = 100; - SQL - end -end diff --git a/db/migrate/20220902065317_add_partition_id_to_ci_builds.rb b/db/migrate/20220902065317_add_partition_id_to_ci_builds.rb deleted file mode 100644 index 6257164b44e5..000000000000 --- a/db/migrate/20220902065317_add_partition_id_to_ci_builds.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class AddPartitionIdToCiBuilds < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - # rubocop:disable Migration/AddColumnsToWideTables - def change - add_column :ci_builds, :partition_id, :bigint, default: 100, null: false - end - # rubocop:enable Migration/AddColumnsToWideTables -end diff --git a/db/migrate/20220902065558_add_partition_id_to_ci_builds_metadata.rb b/db/migrate/20220902065558_add_partition_id_to_ci_builds_metadata.rb deleted file mode 100644 index e04ea99539f6..000000000000 --- a/db/migrate/20220902065558_add_partition_id_to_ci_builds_metadata.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddPartitionIdToCiBuildsMetadata < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - add_column :ci_builds_metadata, :partition_id, :bigint, default: 100, null: false - end -end diff --git a/db/migrate/20220902065611_add_partition_id_to_ci_job_artifacts.rb b/db/migrate/20220902065611_add_partition_id_to_ci_job_artifacts.rb deleted file mode 100644 index 1d9eeb0330ef..000000000000 --- a/db/migrate/20220902065611_add_partition_id_to_ci_job_artifacts.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddPartitionIdToCiJobArtifacts < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - add_column :ci_job_artifacts, :partition_id, :bigint, default: 100, null: false - end -end diff --git a/db/migrate/20220902065623_add_partition_id_to_ci_pipelines.rb b/db/migrate/20220902065623_add_partition_id_to_ci_pipelines.rb deleted file mode 100644 index bb3e7c27ee88..000000000000 --- a/db/migrate/20220902065623_add_partition_id_to_ci_pipelines.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddPartitionIdToCiPipelines < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - add_column :ci_pipelines, :partition_id, :bigint, default: 100, null: false - end -end diff --git a/db/migrate/20220902065635_add_partition_id_to_ci_stages.rb b/db/migrate/20220902065635_add_partition_id_to_ci_stages.rb deleted file mode 100644 index 0ddbf491ee94..000000000000 --- a/db/migrate/20220902065635_add_partition_id_to_ci_stages.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddPartitionIdToCiStages < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - add_column :ci_stages, :partition_id, :bigint, default: 100, null: false - end -end diff --git a/db/migrate/20220902065647_add_partition_id_to_ci_pipeline_variables.rb b/db/migrate/20220902065647_add_partition_id_to_ci_pipeline_variables.rb deleted file mode 100644 index 14f17b371b46..000000000000 --- a/db/migrate/20220902065647_add_partition_id_to_ci_pipeline_variables.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddPartitionIdToCiPipelineVariables < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - add_column :ci_pipeline_variables, :partition_id, :bigint, default: 100, null: false - end -end diff --git a/db/migrate/20220902165931_index_evironments_on_merge_request_id.rb b/db/migrate/20220902165931_index_evironments_on_merge_request_id.rb deleted file mode 100644 index 9d9f84e94ee2..000000000000 --- a/db/migrate/20220902165931_index_evironments_on_merge_request_id.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class IndexEvironmentsOnMergeRequestId < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'index_environments_on_merge_request_id' - - disable_ddl_transaction! - - def up - add_concurrent_index :environments, :merge_request_id, name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :environments, INDEX_NAME - end -end diff --git a/db/migrate/20220902170131_add_fk_constraint_to_environments_merge_request_id.rb b/db/migrate/20220902170131_add_fk_constraint_to_environments_merge_request_id.rb deleted file mode 100644 index 863aefe56fb9..000000000000 --- a/db/migrate/20220902170131_add_fk_constraint_to_environments_merge_request_id.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddFkConstraintToEnvironmentsMergeRequestId < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - add_concurrent_foreign_key :environments, :merge_requests, column: :merge_request_id, on_delete: :nullify - end - - def down - remove_foreign_key_if_exists :environments, column: :merge_request_id - end -end diff --git a/db/migrate/20220906093857_add_column_branch_filter_strategy_to_web_hooks.rb b/db/migrate/20220906093857_add_column_branch_filter_strategy_to_web_hooks.rb deleted file mode 100644 index 739bedda9e0f..000000000000 --- a/db/migrate/20220906093857_add_column_branch_filter_strategy_to_web_hooks.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddColumnBranchFilterStrategyToWebHooks < Gitlab::Database::Migration[2.0] - def change - add_column :web_hooks, :branch_filter_strategy, :integer, null: false, default: 0, limit: 2 - end -end diff --git a/db/migrate/20220906155105_add_start_time_and_end_time_and_status_to_ml_candidates.rb b/db/migrate/20220906155105_add_start_time_and_end_time_and_status_to_ml_candidates.rb deleted file mode 100644 index 681388811396..000000000000 --- a/db/migrate/20220906155105_add_start_time_and_end_time_and_status_to_ml_candidates.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddStartTimeAndEndTimeAndStatusToMlCandidates < Gitlab::Database::Migration[2.0] - def change - add_column :ml_candidates, :start_time, :bigint - add_column :ml_candidates, :end_time, :bigint - add_column :ml_candidates, :status, :smallint, default: 0, null: false - end -end diff --git a/db/migrate/20220906204832_add_locked_to_ci_pipeline_artifacts.rb b/db/migrate/20220906204832_add_locked_to_ci_pipeline_artifacts.rb deleted file mode 100644 index dae4c560bb24..000000000000 --- a/db/migrate/20220906204832_add_locked_to_ci_pipeline_artifacts.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddLockedToCiPipelineArtifacts < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - TABLE_NAME = 'ci_pipeline_artifacts' - COLUMN_NAME = 'locked' - - def up - with_lock_retries do - add_column TABLE_NAME, COLUMN_NAME, :smallint, default: 2 - end - end - - def down - with_lock_retries do - remove_column TABLE_NAME, COLUMN_NAME - end - end -end diff --git a/db/migrate/20220907115806_add_security_orchestration_policy_configuration_id.rb b/db/migrate/20220907115806_add_security_orchestration_policy_configuration_id.rb deleted file mode 100644 index de83288a0cac..000000000000 --- a/db/migrate/20220907115806_add_security_orchestration_policy_configuration_id.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -class AddSecurityOrchestrationPolicyConfigurationId < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - PROJECT_INDEX_NAME = 'idx_approval_project_rules_on_sec_orchestration_config_id' - MERGE_REQUEST_INDEX_NAME = 'idx_approval_merge_request_rules_on_sec_orchestration_config_id' - - def up - with_lock_retries do - unless column_exists?(:approval_project_rules, :security_orchestration_policy_configuration_id) - add_column :approval_project_rules, :security_orchestration_policy_configuration_id, :bigint - end - end - - with_lock_retries do - unless column_exists?(:approval_merge_request_rules, :security_orchestration_policy_configuration_id) - add_column :approval_merge_request_rules, :security_orchestration_policy_configuration_id, :bigint - end - end - - add_concurrent_index :approval_project_rules, - :security_orchestration_policy_configuration_id, - name: PROJECT_INDEX_NAME - add_concurrent_index :approval_merge_request_rules, - :security_orchestration_policy_configuration_id, - name: MERGE_REQUEST_INDEX_NAME - - add_concurrent_foreign_key :approval_project_rules, - :security_orchestration_policy_configurations, - column: :security_orchestration_policy_configuration_id, - on_delete: :cascade - add_concurrent_foreign_key :approval_merge_request_rules, - :security_orchestration_policy_configurations, - column: :security_orchestration_policy_configuration_id, - on_delete: :cascade - end - - def down - with_lock_retries do - if column_exists?(:approval_project_rules, :security_orchestration_policy_configuration_id) - remove_column :approval_project_rules, :security_orchestration_policy_configuration_id - end - end - - with_lock_retries do - if column_exists?(:approval_merge_request_rules, :security_orchestration_policy_configuration_id) - remove_column :approval_merge_request_rules, :security_orchestration_policy_configuration_id - end - end - - remove_foreign_key_if_exists :approval_project_rules, column: :security_orchestration_policy_configuration_id - remove_foreign_key_if_exists :approval_merge_request_rules, column: :security_orchestration_policy_configuration_id - - remove_concurrent_index_by_name :approval_project_rules, name: PROJECT_INDEX_NAME - remove_concurrent_index_by_name :approval_merge_request_rules, name: MERGE_REQUEST_INDEX_NAME - end -end diff --git a/db/migrate/20220907124320_add_internal_to_notes_renamed.rb b/db/migrate/20220907124320_add_internal_to_notes_renamed.rb deleted file mode 100644 index e65bc503c049..000000000000 --- a/db/migrate/20220907124320_add_internal_to_notes_renamed.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -# Renamed from AddInternalToNotes to AddInternalToNotesRenamed to avoid collision with an Elasticsearch migration from -# the same name. See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/129012 -class AddInternalToNotesRenamed < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - add_column(:notes, :internal, :boolean, default: false, null: false) - end -end diff --git a/db/migrate/20220909091410_add_dismissal_reason_to_vulnerability_state_transitions.rb b/db/migrate/20220909091410_add_dismissal_reason_to_vulnerability_state_transitions.rb deleted file mode 100644 index 01fcb3aa6e18..000000000000 --- a/db/migrate/20220909091410_add_dismissal_reason_to_vulnerability_state_transitions.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddDismissalReasonToVulnerabilityStateTransitions < Gitlab::Database::Migration[2.0] - def change - add_column :vulnerability_state_transitions, :dismissal_reason, :smallint - end -end diff --git a/db/migrate/20220909094752_add_free_user_cap_over_limt_notified_at_to_namespace_details.rb b/db/migrate/20220909094752_add_free_user_cap_over_limt_notified_at_to_namespace_details.rb deleted file mode 100644 index 775705eae739..000000000000 --- a/db/migrate/20220909094752_add_free_user_cap_over_limt_notified_at_to_namespace_details.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddFreeUserCapOverLimtNotifiedAtToNamespaceDetails < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - TABLE_NAME = 'namespace_details' - COLUMN_NAME = 'free_user_cap_over_limt_notified_at' - - def up - with_lock_retries do - add_column(TABLE_NAME, COLUMN_NAME, :datetime_with_timezone) - end - end - - def down - with_lock_retries do - remove_column TABLE_NAME, COLUMN_NAME - end - end -end diff --git a/db/migrate/20220909113809_add_environments_project_name_lower_pattern_ops_state_index.rb b/db/migrate/20220909113809_add_environments_project_name_lower_pattern_ops_state_index.rb deleted file mode 100644 index 870c809beb62..000000000000 --- a/db/migrate/20220909113809_add_environments_project_name_lower_pattern_ops_state_index.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddEnvironmentsProjectNameLowerPatternOpsStateIndex < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_environments_on_project_name_varchar_pattern_ops_state' - - def up - add_concurrent_index :environments, 'project_id, lower(name) 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/20220912153839_create_packages_rpm_repository_file.rb b/db/migrate/20220912153839_create_packages_rpm_repository_file.rb deleted file mode 100644 index 889720df2331..000000000000 --- a/db/migrate/20220912153839_create_packages_rpm_repository_file.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class CreatePackagesRpmRepositoryFile < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def up - create_table :packages_rpm_repository_files do |t| - t.timestamps_with_timezone - - t.references :project, index: true, null: false, foreign_key: { on_delete: :cascade }, type: :bigint - t.integer :file_store, default: 1 - t.integer :status, default: 0, null: false, limit: 2 - t.integer :size - t.binary :file_md5 - t.binary :file_sha1 - t.binary :file_sha256 - t.text :file, null: false, limit: 255 - t.text :file_name, null: false, limit: 255 - end - end - - def down - drop_table :packages_rpm_repository_files - end -end diff --git a/db/migrate/20220912180807_add_epoch_column_to_rpm_metadata.rb b/db/migrate/20220912180807_add_epoch_column_to_rpm_metadata.rb deleted file mode 100644 index 842d917c8a38..000000000000 --- a/db/migrate/20220912180807_add_epoch_column_to_rpm_metadata.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddEpochColumnToRpmMetadata < Gitlab::Database::Migration[2.0] - def change - add_column :packages_rpm_metadata, :epoch, :integer, null: false, default: 0 - end -end diff --git a/db/migrate/20220913043728_create_user_phone_number_validations.rb b/db/migrate/20220913043728_create_user_phone_number_validations.rb deleted file mode 100644 index 21a5b4d55191..000000000000 --- a/db/migrate/20220913043728_create_user_phone_number_validations.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class CreateUserPhoneNumberValidations < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def up - create_table :user_phone_number_validations, id: false do |t| - t.references :user, primary_key: true, default: nil, type: :bigint, index: false, - foreign_key: { on_delete: :cascade } - - t.datetime_with_timezone :validated_at - t.timestamps_with_timezone null: false - - t.integer :international_dial_code, null: false, limit: 1 - t.integer :verification_attempts, null: false, default: 0, limit: 1 - t.integer :risk_score, null: false, default: 0, limit: 1 - - t.text :country, null: false, limit: 3 - t.text :phone_number, null: false, limit: 12 - t.text :telesign_reference_xid, limit: 255 - - t.index [:international_dial_code, :phone_number], name: :index_user_phone_validations_on_dial_code_phone_number - end - end - - def down - drop_table :user_phone_number_validations - end -end diff --git a/db/migrate/20220913082728_drop_index_cadence_create_iterations_automation.rb b/db/migrate/20220913082728_drop_index_cadence_create_iterations_automation.rb deleted file mode 100644 index 8b961bc1c7ef..000000000000 --- a/db/migrate/20220913082728_drop_index_cadence_create_iterations_automation.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class DropIndexCadenceCreateIterationsAutomation < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'cadence_create_iterations_automation' - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :iterations_cadences, INDEX_NAME - end - - def down - execute( - <<-SQL - CREATE INDEX CONCURRENTLY #{INDEX_NAME} ON iterations_cadences - USING BTREE(automatic, duration_in_weeks, (DATE ((COALESCE("iterations_cadences"."last_run_date", DATE('01-01-1970')) + "iterations_cadences"."duration_in_weeks" * INTERVAL '1 week')))) - WHERE duration_in_weeks IS NOT NULL - SQL - ) - end -end diff --git a/db/migrate/20220913082824_finalize_invalid_group_member_cleanup.rb b/db/migrate/20220913082824_finalize_invalid_group_member_cleanup.rb deleted file mode 100644 index d5fb04f3fa3c..000000000000 --- a/db/migrate/20220913082824_finalize_invalid_group_member_cleanup.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class FinalizeInvalidGroupMemberCleanup < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - # noop: this fails because the cleanup invalid members migration(ScheduleDestroyInvalidGroupMembers) - # cannot succeed, so we need to cleanup that first. - # - # issue with some details: https://gitlab.com/gitlab-org/gitlab/-/issues/365028#note_1107166816 - # # incident: https://gitlab.com/gitlab-com/gl-infra/production/-/issues/7779 - end - - def down - # noop - end -end diff --git a/db/migrate/20220913082930_rename_iterations_cadences_last_run_date_to_next_run_date.rb b/db/migrate/20220913082930_rename_iterations_cadences_last_run_date_to_next_run_date.rb deleted file mode 100644 index 2adc4202b794..000000000000 --- a/db/migrate/20220913082930_rename_iterations_cadences_last_run_date_to_next_run_date.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class RenameIterationsCadencesLastRunDateToNextRunDate < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - rename_column_concurrently :iterations_cadences, :last_run_date, :next_run_date - end - - def down - undo_rename_column_concurrently :iterations_cadences, :last_run_date, :next_run_date - end -end diff --git a/db/migrate/20220913084123_add_timestamp_to_ml_candidate_metrics.rb b/db/migrate/20220913084123_add_timestamp_to_ml_candidate_metrics.rb deleted file mode 100644 index 293bca2d6d7d..000000000000 --- a/db/migrate/20220913084123_add_timestamp_to_ml_candidate_metrics.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddTimestampToMlCandidateMetrics < Gitlab::Database::Migration[2.0] - def change - add_column :ml_candidate_metrics, :tracked_at, :bigint - end -end diff --git a/db/migrate/20220914005141_change_namespace_id_not_null_in_members.rb b/db/migrate/20220914005141_change_namespace_id_not_null_in_members.rb deleted file mode 100644 index 250746b95b85..000000000000 --- a/db/migrate/20220914005141_change_namespace_id_not_null_in_members.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class ChangeNamespaceIdNotNullInMembers < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - add_not_null_constraint :members, :member_namespace_id, validate: false - end - - def down - remove_not_null_constraint :members, :member_namespace_id - end -end diff --git a/db/migrate/20220914010233_change_members_namespace_foreign_key_on_delete_constraint.rb b/db/migrate/20220914010233_change_members_namespace_foreign_key_on_delete_constraint.rb deleted file mode 100644 index 2ee98d59c3ea..000000000000 --- a/db/migrate/20220914010233_change_members_namespace_foreign_key_on_delete_constraint.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class ChangeMembersNamespaceForeignKeyOnDeleteConstraint < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - TARGET_COLUMN = :member_namespace_id - - def up - # add the new FK before removing the old one - add_concurrent_foreign_key( - :members, - :namespaces, - column: TARGET_COLUMN, - name: fk_name("#{TARGET_COLUMN}_new"), - on_delete: :cascade, - validate: false - ) - end - - def down - with_lock_retries do - remove_foreign_key_if_exists(:members, column: TARGET_COLUMN, name: fk_name("#{TARGET_COLUMN}_new")) - end - end - - def fk_name(column_name) - # generate a FK name - concurrent_foreign_key_name(:members, column_name) - end -end diff --git a/db/migrate/20220914070927_finalize_invalid_project_member_cleanup.rb b/db/migrate/20220914070927_finalize_invalid_project_member_cleanup.rb deleted file mode 100644 index 30f6519ed0f6..000000000000 --- a/db/migrate/20220914070927_finalize_invalid_project_member_cleanup.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class FinalizeInvalidProjectMemberCleanup < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - # noop: this fails because the cleanup invalid members migration(ScheduleDestroyInvalidProjectMembers) - # cannot succeed, so we need to cleanup that first. - # - # issue with some details: https://gitlab.com/gitlab-org/gitlab/-/issues/365028#note_1107166816 - # # incident: https://gitlab.com/gitlab-com/gl-infra/production/-/issues/7779 - end - - def down - # noop - end -end diff --git a/db/migrate/20220914080716_add_index_to_candidate_id_and_name_on_ml_candidate_params.rb b/db/migrate/20220914080716_add_index_to_candidate_id_and_name_on_ml_candidate_params.rb deleted file mode 100644 index caf30961ace8..000000000000 --- a/db/migrate/20220914080716_add_index_to_candidate_id_and_name_on_ml_candidate_params.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToCandidateIdAndNameOnMlCandidateParams < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_ml_candidate_params_on_candidate_id_on_name' - - def up - add_concurrent_index :ml_candidate_params, [:candidate_id, :name], unique: true, name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name(:ml_candidate_params, INDEX_NAME) - end -end diff --git a/db/migrate/20220914112457_add_reject_non_dco_commits_to_push_rules.rb b/db/migrate/20220914112457_add_reject_non_dco_commits_to_push_rules.rb deleted file mode 100644 index 57b3c2096605..000000000000 --- a/db/migrate/20220914112457_add_reject_non_dco_commits_to_push_rules.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddRejectNonDcoCommitsToPushRules < Gitlab::Database::Migration[2.0] - def change - add_column :push_rules, :reject_non_dco_commits, :boolean - end -end diff --git a/db/migrate/20220914130800_add_jitsu_key_to_projects.rb b/db/migrate/20220914130800_add_jitsu_key_to_projects.rb deleted file mode 100644 index 91c0695c4a6d..000000000000 --- a/db/migrate/20220914130800_add_jitsu_key_to_projects.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -# rubocop:disable Migration/AddLimitToTextColumns -# limit is added in 20220914131449_add_text_limit_to_projects_jitsu_key.rb -class AddJitsuKeyToProjects < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - with_lock_retries do - add_column :project_settings, :jitsu_key, :text - end - end - - def down - with_lock_retries do - remove_column :project_settings, :jitsu_key - end - end -end -# rubocop:enable Migration/AddLimitToTextColumns diff --git a/db/migrate/20220914131449_add_text_limit_to_projects_jitsu_key.rb b/db/migrate/20220914131449_add_text_limit_to_projects_jitsu_key.rb deleted file mode 100644 index 93aa27ffaa2d..000000000000 --- a/db/migrate/20220914131449_add_text_limit_to_projects_jitsu_key.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitToProjectsJitsuKey < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - add_text_limit :project_settings, :jitsu_key, 100 - end - - def down - remove_text_limit :project_settings, :jitsu_key - end -end diff --git a/db/migrate/20220914174705_remove_not_null_constraint_from_sbom_source_fingerprint.rb b/db/migrate/20220914174705_remove_not_null_constraint_from_sbom_source_fingerprint.rb deleted file mode 100644 index 6e819b1cdefe..000000000000 --- a/db/migrate/20220914174705_remove_not_null_constraint_from_sbom_source_fingerprint.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class RemoveNotNullConstraintFromSbomSourceFingerprint < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - change_column_null :sbom_sources, :fingerprint, true - end -end diff --git a/db/migrate/20220915140802_create_merge_request_predictions.rb b/db/migrate/20220915140802_create_merge_request_predictions.rb deleted file mode 100644 index 20cd7e580926..000000000000 --- a/db/migrate/20220915140802_create_merge_request_predictions.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class CreateMergeRequestPredictions < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def up - create_table :merge_request_predictions, id: false do |t| - t.references :merge_request, - primary_key: true, null: false, type: :bigint, - index: false, foreign_key: { on_delete: :cascade } - - t.timestamps_with_timezone null: false - t.jsonb :suggested_reviewers, null: false, default: {} - end - end - - def down - drop_table :merge_request_predictions - end -end diff --git a/db/migrate/20220916094641_add_source_id_to_bulk_import_entities.rb b/db/migrate/20220916094641_add_source_id_to_bulk_import_entities.rb deleted file mode 100644 index b077fee9045f..000000000000 --- a/db/migrate/20220916094641_add_source_id_to_bulk_import_entities.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddSourceIdToBulkImportEntities < Gitlab::Database::Migration[2.0] - def change - add_column :bulk_import_entities, :source_xid, :integer - end -end diff --git a/db/migrate/20220916103311_add_index_on_jira_connect_installations_instance_url.rb b/db/migrate/20220916103311_add_index_on_jira_connect_installations_instance_url.rb deleted file mode 100644 index 806c7d65f162..000000000000 --- a/db/migrate/20220916103311_add_index_on_jira_connect_installations_instance_url.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnJiraConnectInstallationsInstanceUrl < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_jira_connect_installations_on_instance_url' - - def up - add_concurrent_index :jira_connect_installations, :instance_url, name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :jira_connect_installations, name: INDEX_NAME - end -end diff --git a/db/migrate/20220918124223_add_suggested_reviewers_enabled_to_project_settings.rb b/db/migrate/20220918124223_add_suggested_reviewers_enabled_to_project_settings.rb deleted file mode 100644 index 1a762d68bdc0..000000000000 --- a/db/migrate/20220918124223_add_suggested_reviewers_enabled_to_project_settings.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddSuggestedReviewersEnabledToProjectSettings < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - add_column :project_settings, :suggested_reviewers_enabled, :boolean, default: false, null: false - end -end diff --git a/db/migrate/20220919062640_add_mirror_branch_regex_to_remote_mirrors.rb b/db/migrate/20220919062640_add_mirror_branch_regex_to_remote_mirrors.rb deleted file mode 100644 index 0f27ba9488be..000000000000 --- a/db/migrate/20220919062640_add_mirror_branch_regex_to_remote_mirrors.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddMirrorBranchRegexToRemoteMirrors < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - add_column :remote_mirrors, :mirror_branch_regex, :text - add_text_limit :remote_mirrors, :mirror_branch_regex, 255 - end - - def down - remove_text_limit :remote_mirrors, :mirror_branch_regex - remove_column :remote_mirrors, :mirror_branch_regex - end -end diff --git a/db/migrate/20220919225631_add_index_packages_packages_on_project_id_and_lower_version_to_packages.rb b/db/migrate/20220919225631_add_index_packages_packages_on_project_id_and_lower_version_to_packages.rb deleted file mode 100644 index 23b585226394..000000000000 --- a/db/migrate/20220919225631_add_index_packages_packages_on_project_id_and_lower_version_to_packages.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddIndexPackagesPackagesOnProjectIdAndLowerVersionToPackages < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_packages_packages_on_project_id_and_lower_version' - NUGET_PACKAGE_TYPE = 4 - - def up - add_concurrent_index( - :packages_packages, - 'project_id, LOWER(version)', - name: INDEX_NAME, - where: "package_type = #{NUGET_PACKAGE_TYPE}" - ) - end - - def down - remove_concurrent_index_by_name(:packages_packages, INDEX_NAME) - end -end diff --git a/db/migrate/20220920022404_remove_temp_index_null_project_namespace_id.rb b/db/migrate/20220920022404_remove_temp_index_null_project_namespace_id.rb deleted file mode 100644 index 5541afcee403..000000000000 --- a/db/migrate/20220920022404_remove_temp_index_null_project_namespace_id.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class RemoveTempIndexNullProjectNamespaceId < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'tmp_index_for_null_project_namespace_id' - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :projects, INDEX_NAME - end - - def down - add_concurrent_index :projects, :id, name: INDEX_NAME, where: 'project_namespace_id IS NULL' - end -end diff --git a/db/migrate/20220920135632_add_jira_connect_proxy_url_setting.rb b/db/migrate/20220920135632_add_jira_connect_proxy_url_setting.rb deleted file mode 100644 index c5842b6c7873..000000000000 --- a/db/migrate/20220920135632_add_jira_connect_proxy_url_setting.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -class AddJiraConnectProxyUrlSetting < Gitlab::Database::Migration[2.0] - # rubocop:disable Migration/AddLimitToTextColumns - # limit is added in 20220920135717_add_textlimit_to_jira_connect_proxy_url_setting.rb - def change - add_column :application_settings, :jira_connect_proxy_url, :text - end - # rubocop:enable Migration/AddLimitToTextColumns -end diff --git a/db/migrate/20220920135717_add_textlimit_to_jira_connect_proxy_url_setting.rb b/db/migrate/20220920135717_add_textlimit_to_jira_connect_proxy_url_setting.rb deleted file mode 100644 index 3a571580e79c..000000000000 --- a/db/migrate/20220920135717_add_textlimit_to_jira_connect_proxy_url_setting.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddTextlimitToJiraConnectProxyUrlSetting < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - add_text_limit :application_settings, :jira_connect_proxy_url, 255 - end - - def down - remove_text_limit :application_settings, :jira_connect_proxy_url - end -end diff --git a/db/migrate/20220921174815_add_secure_files_metadata.rb b/db/migrate/20220921174815_add_secure_files_metadata.rb deleted file mode 100644 index 74cc1d95867a..000000000000 --- a/db/migrate/20220921174815_add_secure_files_metadata.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true - -class AddSecureFilesMetadata < Gitlab::Database::Migration[2.0] - def change - add_column :ci_secure_files, :metadata, :jsonb - add_column :ci_secure_files, :expires_at, :datetime_with_timezone - end -end diff --git a/db/migrate/20220921201347_add_maven_package_requests_forwarding_to_namespace_package_settings.rb b/db/migrate/20220921201347_add_maven_package_requests_forwarding_to_namespace_package_settings.rb deleted file mode 100644 index 8f858eb7960a..000000000000 --- a/db/migrate/20220921201347_add_maven_package_requests_forwarding_to_namespace_package_settings.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -class AddMavenPackageRequestsForwardingToNamespacePackageSettings < Gitlab::Database::Migration[2.0] - def change - # adds columns to match the format used in - # Gitlab::Database::MigrationHelpers::CascadingNamespaceSettings#add_cascading_namespace_setting - add_column(:namespace_package_settings, - :maven_package_requests_forwarding, - :boolean, - null: true, - default: nil - ) - - add_column(:namespace_package_settings, - :lock_maven_package_requests_forwarding, - :boolean, - default: false, - null: false - ) - - add_column(:application_settings, - :lock_maven_package_requests_forwarding, - :boolean, - default: false, - null: false - ) - end -end diff --git a/db/migrate/20220922143612_add_inbound_ci_job_token_project_scope_links.rb b/db/migrate/20220922143612_add_inbound_ci_job_token_project_scope_links.rb deleted file mode 100644 index 50b43ee4db8c..000000000000 --- a/db/migrate/20220922143612_add_inbound_ci_job_token_project_scope_links.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddInboundCiJobTokenProjectScopeLinks < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def up - add_column :ci_job_token_project_scope_links, :direction, :integer, limit: 2, default: 0, null: false - end - - def down - remove_column :ci_job_token_project_scope_links, :direction - end -end diff --git a/db/migrate/20220923103006_add_ci_pipeline_metadata_title.rb b/db/migrate/20220923103006_add_ci_pipeline_metadata_title.rb deleted file mode 100644 index 3b2f02924a17..000000000000 --- a/db/migrate/20220923103006_add_ci_pipeline_metadata_title.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class AddCiPipelineMetadataTitle < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def up - create_table :ci_pipeline_metadata, id: false do |t| - t.bigint :project_id, null: false - - t.references :pipeline, - null: false, - primary_key: true, - default: nil, - index: false, - foreign_key: { to_table: :ci_pipelines, on_delete: :cascade } - - t.text :title, null: false, limit: 255 - - t.index [:pipeline_id, :title], name: 'index_ci_pipeline_metadata_on_pipeline_id_title' - t.index [:project_id], name: 'index_ci_pipeline_metadata_on_project_id' - end - end - - def down - drop_table :ci_pipeline_metadata - end -end diff --git a/db/migrate/20220926023734_add_mirror_branch_regex_to_project_settings.rb b/db/migrate/20220926023734_add_mirror_branch_regex_to_project_settings.rb deleted file mode 100644 index 5032a9ff964b..000000000000 --- a/db/migrate/20220926023734_add_mirror_branch_regex_to_project_settings.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -class AddMirrorBranchRegexToProjectSettings < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - # rubocop:disable Migration/AddLimitToTextColumns - # limit is added in 20221027124848_add_text_limit_to_project_settings_mirror_branch_regex.rb - def change - add_column :project_settings, :mirror_branch_regex, :text - end - # rubocop:enable Migration/AddLimitToTextColumns -end diff --git a/db/migrate/20220927155407_add_column_inbound_job_token_scope_enabled_to_ci_cd_setting.rb b/db/migrate/20220927155407_add_column_inbound_job_token_scope_enabled_to_ci_cd_setting.rb deleted file mode 100644 index 811138cd2f20..000000000000 --- a/db/migrate/20220927155407_add_column_inbound_job_token_scope_enabled_to_ci_cd_setting.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddColumnInboundJobTokenScopeEnabledToCiCdSetting < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def up - add_column :project_ci_cd_settings, :inbound_job_token_scope_enabled, :boolean, default: false, null: false - end - - def down - remove_column :project_ci_cd_settings, :inbound_job_token_scope_enabled - end -end diff --git a/db/migrate/20220928201920_create_project_wiki_repository_states.rb b/db/migrate/20220928201920_create_project_wiki_repository_states.rb deleted file mode 100644 index 17ad5cf6b7aa..000000000000 --- a/db/migrate/20220928201920_create_project_wiki_repository_states.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true - -class CreateProjectWikiRepositoryStates < Gitlab::Database::Migration[2.0] - VERIFICATION_STATE_INDEX_NAME = "index_project_wiki_repository_states_on_verification_state" - PENDING_VERIFICATION_INDEX_NAME = "index_project_wiki_repository_states_pending_verification" - FAILED_VERIFICATION_INDEX_NAME = "index_project_wiki_repository_states_failed_verification" - NEEDS_VERIFICATION_INDEX_NAME = "index_project_wiki_repository_states_needs_verification" - - enable_lock_retries! - - def up - create_table :project_wiki_repository_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 :project, primary_key: true, default: nil, index: false, 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 :project_wiki_repository_states - end -end diff --git a/db/migrate/20220929171925_add_pypi_package_requests_forwarding_to_namespace_package_settings.rb b/db/migrate/20220929171925_add_pypi_package_requests_forwarding_to_namespace_package_settings.rb deleted file mode 100644 index e99640d471f4..000000000000 --- a/db/migrate/20220929171925_add_pypi_package_requests_forwarding_to_namespace_package_settings.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -class AddPypiPackageRequestsForwardingToNamespacePackageSettings < Gitlab::Database::Migration[2.0] - def change - # adds columns to match the format used in - # Gitlab::Database::MigrationHelpers::CascadingNamespaceSettings#add_cascading_namespace_setting - add_column(:namespace_package_settings, - :pypi_package_requests_forwarding, - :boolean, - null: true, - default: nil - ) - - add_column(:namespace_package_settings, - :lock_pypi_package_requests_forwarding, - :boolean, - default: false, - null: false - ) - - add_column(:application_settings, - :lock_pypi_package_requests_forwarding, - :boolean, - default: false, - null: false - ) - end -end diff --git a/db/migrate/20220929172356_add_npm_package_requests_forwarding_to_namespace_package_settings.rb b/db/migrate/20220929172356_add_npm_package_requests_forwarding_to_namespace_package_settings.rb deleted file mode 100644 index 61cc2c26ec7b..000000000000 --- a/db/migrate/20220929172356_add_npm_package_requests_forwarding_to_namespace_package_settings.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -class AddNpmPackageRequestsForwardingToNamespacePackageSettings < Gitlab::Database::Migration[2.0] - def change - # adds columns to match the format used in - # Gitlab::Database::MigrationHelpers::CascadingNamespaceSettings#add_cascading_namespace_setting - add_column(:namespace_package_settings, - :npm_package_requests_forwarding, - :boolean, - null: true, - default: nil - ) - - add_column(:namespace_package_settings, - :lock_npm_package_requests_forwarding, - :boolean, - default: false, - null: false - ) - - add_column(:application_settings, - :lock_npm_package_requests_forwarding, - :boolean, - default: false, - null: false - ) - end -end diff --git a/db/migrate/20220930125609_add_migrated_to_state_transition_to_vulnerability_feedback.rb b/db/migrate/20220930125609_add_migrated_to_state_transition_to_vulnerability_feedback.rb deleted file mode 100644 index b6736a71761f..000000000000 --- a/db/migrate/20220930125609_add_migrated_to_state_transition_to_vulnerability_feedback.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddMigratedToStateTransitionToVulnerabilityFeedback < Gitlab::Database::Migration[2.0] - def change - add_column :vulnerability_feedback, :migrated_to_state_transition, :boolean, default: false - end -end diff --git a/db/migrate/20221003151747_create_audit_events_streaming_event_type_filters.rb b/db/migrate/20221003151747_create_audit_events_streaming_event_type_filters.rb deleted file mode 100644 index c0acbe75d784..000000000000 --- a/db/migrate/20221003151747_create_audit_events_streaming_event_type_filters.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class CreateAuditEventsStreamingEventTypeFilters < Gitlab::Database::Migration[2.0] - UNIQ_INDEX_NAME = 'unique_streaming_event_type_filters_destination_id' - - def change - create_table :audit_events_streaming_event_type_filters do |t| - t.timestamps_with_timezone null: false - t.references :external_audit_event_destination, - null: false, - index: false, - foreign_key: { to_table: 'audit_events_external_audit_event_destinations', on_delete: :cascade } - t.text :audit_event_type, null: false, limit: 255 - - t.index [:external_audit_event_destination_id, :audit_event_type], unique: true, name: UNIQ_INDEX_NAME - end - end -end diff --git a/db/migrate/20221005072353_create_incident_management_timeline_event_tags.rb b/db/migrate/20221005072353_create_incident_management_timeline_event_tags.rb deleted file mode 100644 index c046548af019..000000000000 --- a/db/migrate/20221005072353_create_incident_management_timeline_event_tags.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class CreateIncidentManagementTimelineEventTags < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def up - create_table :incident_management_timeline_event_tags do |t| - t.timestamps_with_timezone null: false - t.references :project, null: false, index: false, foreign_key: { on_delete: :cascade } - t.text :name, limit: 255, null: false - - t.index [:project_id, :name], unique: true, name: 'index_im_timeline_event_tags_name_project_id' - end - end - - def down - drop_table :incident_management_timeline_event_tags - end -end diff --git a/db/migrate/20221005094926_create_incident_management_timeline_event_tag_links.rb b/db/migrate/20221005094926_create_incident_management_timeline_event_tag_links.rb deleted file mode 100644 index b3ec8f977385..000000000000 --- a/db/migrate/20221005094926_create_incident_management_timeline_event_tag_links.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -class CreateIncidentManagementTimelineEventTagLinks < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def up - create_table :incident_management_timeline_event_tag_links do |t| - t.references :timeline_event, - null: false, - index: { name: 'index_im_timeline_event_id' }, - foreign_key: { to_table: :incident_management_timeline_events, column: :timeline_event_id, on_delete: :cascade } - - t.references :timeline_event_tag, - null: false, - index: false, - foreign_key: { - to_table: :incident_management_timeline_event_tags, - column: :timeline_event_tag_id, - on_delete: :cascade - } - - t.index [:timeline_event_tag_id, :timeline_event_id], - unique: true, - name: 'index_im_timeline_event_tags_on_tag_id_and_event_id' - - t.datetime_with_timezone :created_at, null: false - end - end - - def down - drop_table :incident_management_timeline_event_tag_links - end -end diff --git a/db/migrate/20221005103010_add_index_project_id_on_scan_finding_approval_project_rules.rb b/db/migrate/20221005103010_add_index_project_id_on_scan_finding_approval_project_rules.rb deleted file mode 100644 index 990188aa4182..000000000000 --- a/db/migrate/20221005103010_add_index_project_id_on_scan_finding_approval_project_rules.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class AddIndexProjectIdOnScanFindingApprovalProjectRules < Gitlab::Database::Migration[2.0] - INDEX_NAME_ALL = 'scan_finding_approval_project_rule_index_project_id' - INDEX_NAME_28D = 'scan_finding_approval_project_rule_index_created_at_project_id' - SCAN_FINDING_REPORT_TYPE = 4 - - disable_ddl_transaction! - - def up - add_concurrent_index :approval_project_rules, %i[created_at project_id], - where: "report_type = #{SCAN_FINDING_REPORT_TYPE}", name: INDEX_NAME_28D - - add_concurrent_index :approval_project_rules, :project_id, - where: "report_type = #{SCAN_FINDING_REPORT_TYPE}", name: INDEX_NAME_ALL - end - - def down - remove_concurrent_index_by_name :approval_project_rules, INDEX_NAME_ALL - remove_concurrent_index_by_name :approval_project_rules, INDEX_NAME_28D - end -end diff --git a/db/migrate/20221006131506_add_free_user_cap_over_limit_notified_at_to_namespace_details.rb b/db/migrate/20221006131506_add_free_user_cap_over_limit_notified_at_to_namespace_details.rb deleted file mode 100644 index 7237eee18f07..000000000000 --- a/db/migrate/20221006131506_add_free_user_cap_over_limit_notified_at_to_namespace_details.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class AddFreeUserCapOverLimitNotifiedAtToNamespaceDetails < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - TABLE_NAME = 'namespace_details' - COLUMN_NAME = 'free_user_cap_over_limit_notified_at' - - def up - with_lock_retries do - add_column(TABLE_NAME, COLUMN_NAME, :datetime_with_timezone) - end - end - - def down - with_lock_retries do - remove_column TABLE_NAME, COLUMN_NAME - end - end -end diff --git a/db/migrate/20221006141145_add_targets_to_elastic_reindexing_tasks.rb b/db/migrate/20221006141145_add_targets_to_elastic_reindexing_tasks.rb deleted file mode 100644 index 1631f8ae57ec..000000000000 --- a/db/migrate/20221006141145_add_targets_to_elastic_reindexing_tasks.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddTargetsToElasticReindexingTasks < Gitlab::Database::Migration[2.0] - def change - add_column :elastic_reindexing_tasks, :targets, :text, array: true - end -end diff --git a/db/migrate/20221008032350_add_password_expiration_migration.rb b/db/migrate/20221008032350_add_password_expiration_migration.rb deleted file mode 100644 index 7dbc73294bbd..000000000000 --- a/db/migrate/20221008032350_add_password_expiration_migration.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -class AddPasswordExpirationMigration < Gitlab::Database::Migration[2.0] - def change - add_column :application_settings, :password_expiration_enabled, :boolean, default: false, null: false, - comment: 'JiHu-specific column' - add_column :application_settings, :password_expires_in_days, :integer, default: 90, null: false, - comment: 'JiHu-specific column' - add_column :application_settings, :password_expires_notice_before_days, :integer, default: 7, null: false, - comment: 'JiHu-specific column' - end -end diff --git a/db/migrate/20221009085130_add_mr_checks_columns_to_namespace_settings.rb b/db/migrate/20221009085130_add_mr_checks_columns_to_namespace_settings.rb deleted file mode 100644 index 947a662575a7..000000000000 --- a/db/migrate/20221009085130_add_mr_checks_columns_to_namespace_settings.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -class AddMrChecksColumnsToNamespaceSettings < Gitlab::Database::Migration[2.0] - def change - add_column :namespace_settings, :only_allow_merge_if_pipeline_succeeds, :boolean, default: false, null: false - add_column :namespace_settings, :allow_merge_on_skipped_pipeline, :boolean, default: false, null: false - add_column :namespace_settings, :only_allow_merge_if_all_discussions_are_resolved, \ - :boolean, default: false, null: false - end -end diff --git a/db/migrate/20221010103207_add_product_analytics_enabled_to_application_settings.rb b/db/migrate/20221010103207_add_product_analytics_enabled_to_application_settings.rb deleted file mode 100644 index 24887e7b9fba..000000000000 --- a/db/migrate/20221010103207_add_product_analytics_enabled_to_application_settings.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddProductAnalyticsEnabledToApplicationSettings < Gitlab::Database::Migration[2.0] - def change - add_column :application_settings, :product_analytics_enabled, :boolean, default: false, null: false - end -end diff --git a/db/migrate/20221010121807_add_compliance_framework_id_to_namespace_settings.rb b/db/migrate/20221010121807_add_compliance_framework_id_to_namespace_settings.rb deleted file mode 100644 index e07f19242d52..000000000000 --- a/db/migrate/20221010121807_add_compliance_framework_id_to_namespace_settings.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddComplianceFrameworkIdToNamespaceSettings < Gitlab::Database::Migration[2.0] - def change - add_column :namespace_settings, :default_compliance_framework_id, :bigint - end -end diff --git a/db/migrate/20221010184839_add_new_amount_used_to_ci_project_monthly_usages.rb b/db/migrate/20221010184839_add_new_amount_used_to_ci_project_monthly_usages.rb deleted file mode 100644 index 5c77dfe93344..000000000000 --- a/db/migrate/20221010184839_add_new_amount_used_to_ci_project_monthly_usages.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class AddNewAmountUsedToCiProjectMonthlyUsages < Gitlab::Database::Migration[2.0] - TABLE = :ci_project_monthly_usages - OLD_COLUMN = :amount_used - NEW_COLUMN = :new_amount_used - TRIGGER_NAME = 'sync_projects_amount_used_columns' - - disable_ddl_transaction! - - def up - check_trigger_permissions!(TABLE) - - add_column(TABLE, NEW_COLUMN, :decimal, default: 0.0, precision: 18, scale: 4, null: false, if_not_exists: true) - - install_rename_triggers(TABLE, OLD_COLUMN, NEW_COLUMN, trigger_name: TRIGGER_NAME) - end - - def down - remove_rename_triggers(TABLE, TRIGGER_NAME) - - remove_column(TABLE, NEW_COLUMN) - end -end diff --git a/db/migrate/20221010201815_add_purl_type_to_sbom_components.rb b/db/migrate/20221010201815_add_purl_type_to_sbom_components.rb deleted file mode 100644 index 3ab2aa262b1b..000000000000 --- a/db/migrate/20221010201815_add_purl_type_to_sbom_components.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddPurlTypeToSbomComponents < Gitlab::Database::Migration[2.0] - def change - add_column :sbom_components, :purl_type, :smallint - end -end diff --git a/db/migrate/20221010202339_remove_unique_index_on_sbom_components_type_and_name.rb b/db/migrate/20221010202339_remove_unique_index_on_sbom_components_type_and_name.rb deleted file mode 100644 index fe092232ca69..000000000000 --- a/db/migrate/20221010202339_remove_unique_index_on_sbom_components_type_and_name.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class RemoveUniqueIndexOnSbomComponentsTypeAndName < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'index_sbom_components_on_component_type_and_name' - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :sbom_components, name: INDEX_NAME - end - - def down - add_concurrent_index :sbom_components, [:component_type, :name], unique: true, name: INDEX_NAME - end -end diff --git a/db/migrate/20221010202408_add_unique_index_on_sbom_components_type_name_and_purl_type.rb b/db/migrate/20221010202408_add_unique_index_on_sbom_components_type_name_and_purl_type.rb deleted file mode 100644 index 5935db7c2c1a..000000000000 --- a/db/migrate/20221010202408_add_unique_index_on_sbom_components_type_name_and_purl_type.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddUniqueIndexOnSbomComponentsTypeNameAndPurlType < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'index_sbom_components_on_component_type_name_and_purl_type' - - disable_ddl_transaction! - - def up - add_concurrent_index :sbom_components, [:name, :purl_type, :component_type], unique: true, name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :sbom_components, name: INDEX_NAME - end -end diff --git a/db/migrate/20221011162637_add_partial_index_project_incident_management_settings_on_project_id_and_sla_timer.rb b/db/migrate/20221011162637_add_partial_index_project_incident_management_settings_on_project_id_and_sla_timer.rb deleted file mode 100644 index 4238311005ca..000000000000 --- a/db/migrate/20221011162637_add_partial_index_project_incident_management_settings_on_project_id_and_sla_timer.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddPartialIndexProjectIncidentManagementSettingsOnProjectIdAndSlaTimer < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_project_incident_management_settings_on_p_id_sla_timer' - - def up - add_concurrent_index :project_incident_management_settings, :project_id, - name: INDEX_NAME, - where: 'sla_timer = TRUE' - end - - def down - remove_concurrent_index_by_name :project_incident_management_settings, name: INDEX_NAME - end -end diff --git a/db/migrate/20221011210455_add_use_legacy_web_ide_to_user_preferences.rb b/db/migrate/20221011210455_add_use_legacy_web_ide_to_user_preferences.rb deleted file mode 100644 index 1b434e10ab01..000000000000 --- a/db/migrate/20221011210455_add_use_legacy_web_ide_to_user_preferences.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddUseLegacyWebIdeToUserPreferences < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - add_column :user_preferences, :use_legacy_web_ide, :boolean, default: false, null: false - end -end diff --git a/db/migrate/20221012033107_add_password_last_changed_at_to_user_details.rb b/db/migrate/20221012033107_add_password_last_changed_at_to_user_details.rb deleted file mode 100644 index db2f411ab928..000000000000 --- a/db/migrate/20221012033107_add_password_last_changed_at_to_user_details.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class AddPasswordLastChangedAtToUserDetails < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - add_column :user_details, :password_last_changed_at, :datetime_with_timezone, comment: 'JiHu-specific column' - end -end diff --git a/db/migrate/20221012135524_add_scan_file_path_limit_for_dast_site_profile.rb b/db/migrate/20221012135524_add_scan_file_path_limit_for_dast_site_profile.rb deleted file mode 100644 index ab8846c8043c..000000000000 --- a/db/migrate/20221012135524_add_scan_file_path_limit_for_dast_site_profile.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddScanFilePathLimitForDastSiteProfile < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - add_text_limit :dast_site_profiles, :scan_file_path, 1024 - end - - def down - remove_text_limit :dast_site_profiles, :scan_file_path - end -end diff --git a/db/migrate/20221013103738_add_disable_admin_oauth_scopes.rb b/db/migrate/20221013103738_add_disable_admin_oauth_scopes.rb deleted file mode 100644 index 3406252790d7..000000000000 --- a/db/migrate/20221013103738_add_disable_admin_oauth_scopes.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddDisableAdminOauthScopes < Gitlab::Database::Migration[2.0] - def change - add_column :application_settings, :disable_admin_oauth_scopes, :boolean, null: false, default: false - end -end diff --git a/db/migrate/20221014031033_add_temp_index_to_project_features_where_releases_access_level_gt_repository.rb b/db/migrate/20221014031033_add_temp_index_to_project_features_where_releases_access_level_gt_repository.rb deleted file mode 100644 index 14077e307801..000000000000 --- a/db/migrate/20221014031033_add_temp_index_to_project_features_where_releases_access_level_gt_repository.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddTempIndexToProjectFeaturesWhereReleasesAccessLevelGtRepository < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'tmp_idx_project_features_on_releases_al_and_repo_al_partial' - - # Temporary index to be removed in 15.6 https://gitlab.com/gitlab-org/gitlab/-/issues/377915 - def up - add_concurrent_index :project_features, - [:releases_access_level, :repository_access_level], - name: INDEX_NAME, - where: 'releases_access_level > repository_access_level' - end - - def down - remove_concurrent_index_by_name :project_features, INDEX_NAME - end -end diff --git a/db/migrate/20221014034338_populate_releases_access_level_from_repository.rb b/db/migrate/20221014034338_populate_releases_access_level_from_repository.rb deleted file mode 100644 index 37797aa65f3c..000000000000 --- a/db/migrate/20221014034338_populate_releases_access_level_from_repository.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class PopulateReleasesAccessLevelFromRepository < Gitlab::Database::Migration[2.0] - restrict_gitlab_migration gitlab_schema: :gitlab_main - - disable_ddl_transaction! - - def up - update_column_in_batches( # rubocop: disable Migration/UpdateColumnInBatches - :project_features, - :releases_access_level, - Arel.sql('repository_access_level') - ) do |table, query| - query.where(table[:releases_access_level].gt(table[:repository_access_level])) - end - end - - def down - # no-op - end -end diff --git a/db/migrate/20221014190040_drop_notes_note_trigram_index.rb b/db/migrate/20221014190040_drop_notes_note_trigram_index.rb deleted file mode 100644 index efa35b24d988..000000000000 --- a/db/migrate/20221014190040_drop_notes_note_trigram_index.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class DropNotesNoteTrigramIndex < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'index_notes_on_note_gin_trigram' - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :notes, INDEX_NAME - end - - def down - # no-op - # we never want to add this index back since it doesn't exist in production - # we are only using this migration to cleanup other environments where this index does exist - end -end diff --git a/db/migrate/20221015000511_add_email_confirmation_setting_to_application_settings.rb b/db/migrate/20221015000511_add_email_confirmation_setting_to_application_settings.rb deleted file mode 100644 index 42fa4c1baf5c..000000000000 --- a/db/migrate/20221015000511_add_email_confirmation_setting_to_application_settings.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddEmailConfirmationSettingToApplicationSettings < Gitlab::Database::Migration[2.0] - def change - add_column :application_settings, :email_confirmation_setting, :integer, limit: 2, default: 2 - end -end diff --git a/db/migrate/20221017084208_rename_ci_pipeline_metadata_title.rb b/db/migrate/20221017084208_rename_ci_pipeline_metadata_title.rb deleted file mode 100644 index 3c1a3bbd40ad..000000000000 --- a/db/migrate/20221017084208_rename_ci_pipeline_metadata_title.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class RenameCiPipelineMetadataTitle < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - rename_column_concurrently :ci_pipeline_metadata, :title, :name, batch_column_name: :pipeline_id - end - - def down - undo_rename_column_concurrently :ci_pipeline_metadata, :title, :name - end -end diff --git a/db/migrate/20221018050323_add_objective_and_keyresult_to_work_item_types.rb b/db/migrate/20221018050323_add_objective_and_keyresult_to_work_item_types.rb deleted file mode 100644 index d071c0484a77..000000000000 --- a/db/migrate/20221018050323_add_objective_and_keyresult_to_work_item_types.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -class AddObjectiveAndKeyresultToWorkItemTypes < Gitlab::Database::Migration[2.0] - # Added the following statements as per https://docs.gitlab.com/ee/development/database/migrations_for_multiple_databases.html - disable_ddl_transaction! - restrict_gitlab_migration gitlab_schema: :gitlab_main - - OBJECTIVE_ENUM_VALUE = 5 - KEY_RESULT_ENUM_VALUE = 6 - - class WorkItemType < MigrationRecord - self.inheritance_column = :_type_disabled - self.table_name = 'work_item_types' - end - - def up - # New instances will not run this migration and add this type via fixtures - # checking if record exists mostly because migration specs will run all migrations - # and that will conflict with the preloaded base work item types - objective_work_item = WorkItemType.find_by(base_type: OBJECTIVE_ENUM_VALUE, name: 'Objective', namespace_id: nil) - key_result_work_item = WorkItemType.find_by(base_type: KEY_RESULT_ENUM_VALUE, name: 'Key Result', namespace_id: nil) - - if objective_work_item - say('Objective item record exist, skipping creation') - else - execute( - <<~SQL - INSERT INTO work_item_types (base_type, icon_name, name, created_at, updated_at) VALUES( - #{OBJECTIVE_ENUM_VALUE}, 'issue-type-objective', 'Objective', NOW(), NOW() - ) ON CONFLICT DO NOTHING; - SQL - ) - end - - if key_result_work_item - say('Keyresult item record exist, skipping creation') - else - execute( - <<~SQL - INSERT INTO work_item_types (base_type, icon_name, name, created_at, updated_at) VALUES( - #{KEY_RESULT_ENUM_VALUE}, 'issue-type-keyresult', 'Key Result', NOW(), NOW() - ) ON CONFLICT DO NOTHING; - SQL - ) - end - end - - def down - # There's the remote possibility that issues could already be - # using this issue type, with a tight foreign constraint. - # Therefore we will not attempt to remove any data. - end -end diff --git a/db/migrate/20221018081416_members_remove_member_namespace_id_not_null_constraint.rb b/db/migrate/20221018081416_members_remove_member_namespace_id_not_null_constraint.rb deleted file mode 100644 index e4cbcd24bc42..000000000000 --- a/db/migrate/20221018081416_members_remove_member_namespace_id_not_null_constraint.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class MembersRemoveMemberNamespaceIdNotNullConstraint < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - CONSTRAINT_NAME = 'check_508774aac0' - - def up - remove_not_null_constraint :members, :member_namespace_id, constraint_name: CONSTRAINT_NAME - end - - def down - add_not_null_constraint :members, :member_namespace_id, validate: false, constraint_name: CONSTRAINT_NAME - end -end diff --git a/db/migrate/20221018092552_add_file_name_index_to_packages_rpm_repository_files.rb b/db/migrate/20221018092552_add_file_name_index_to_packages_rpm_repository_files.rb deleted file mode 100644 index fcec3a6800d2..000000000000 --- a/db/migrate/20221018092552_add_file_name_index_to_packages_rpm_repository_files.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddFileNameIndexToPackagesRpmRepositoryFiles < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - NEW_INDEX_NAME = 'index_packages_rpm_repository_files_on_project_id_and_file_name' - OLD_INDEX_NAME = 'index_packages_rpm_repository_files_on_project_id' - - def up - add_concurrent_index :packages_rpm_repository_files, %i[project_id file_name], name: NEW_INDEX_NAME - remove_concurrent_index :packages_rpm_repository_files, :project_id, name: OLD_INDEX_NAME - end - - def down - add_concurrent_index :packages_rpm_repository_files, :project_id, name: OLD_INDEX_NAME - remove_concurrent_index :packages_rpm_repository_files, %i[project_id file_name], name: NEW_INDEX_NAME - end -end diff --git a/db/migrate/20221018124029_add_consume_after_to_ghost_user_migrations.rb b/db/migrate/20221018124029_add_consume_after_to_ghost_user_migrations.rb deleted file mode 100644 index 148c6516dc9b..000000000000 --- a/db/migrate/20221018124029_add_consume_after_to_ghost_user_migrations.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddConsumeAfterToGhostUserMigrations < Gitlab::Database::Migration[2.0] - def change - add_column :ghost_user_migrations, :consume_after, :datetime_with_timezone, null: false, default: -> { 'NOW()' } - end -end diff --git a/db/migrate/20221018124035_add_consume_after_index_to_ghost_user_migrations.rb b/db/migrate/20221018124035_add_consume_after_index_to_ghost_user_migrations.rb deleted file mode 100644 index 543d91b3f335..000000000000 --- a/db/migrate/20221018124035_add_consume_after_index_to_ghost_user_migrations.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddConsumeAfterIndexToGhostUserMigrations < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'index_ghost_user_migrations_on_consume_after_id' - - disable_ddl_transaction! - - def up - add_concurrent_index :ghost_user_migrations, [:consume_after, :id], name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :ghost_user_migrations, INDEX_NAME - end -end diff --git a/db/migrate/20221018202524_create_dependency_proxy_blob_states.rb b/db/migrate/20221018202524_create_dependency_proxy_blob_states.rb deleted file mode 100644 index b042df43f049..000000000000 --- a/db/migrate/20221018202524_create_dependency_proxy_blob_states.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -class CreateDependencyProxyBlobStates < Gitlab::Database::Migration[2.0] - VERIFICATION_STATE_INDEX_NAME = "index_dependency_proxy_blob_states_on_verification_state" - PENDING_VERIFICATION_INDEX_NAME = "index_dependency_proxy_blob_states_pending_verification" - FAILED_VERIFICATION_INDEX_NAME = "index_dependency_proxy_blob_states_failed_verification" - NEEDS_VERIFICATION_INDEX_NAME = "index_dependency_proxy_blob_states_needs_verification" - - enable_lock_retries! - - def up - table_comment = { - owner: 'group::geo', - description: 'Geo-specific table to store the verification state of DependencyProxy::Blob objects' - } - - create_table :dependency_proxy_blob_states, id: false, comment: Gitlab::Json.dump(table_comment) 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_blob, - primary_key: true, - default: nil, - index: true, - foreign_key: { on_delete: :cascade } - t.integer :verification_state, default: 0, limit: 2, null: false - t.integer :verification_retry_count, default: 0, limit: 2, 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_blob_states - end -end diff --git a/db/migrate/20221020124018_add_delete_started_at_to_container_repositories.rb b/db/migrate/20221020124018_add_delete_started_at_to_container_repositories.rb deleted file mode 100644 index c225d9cc3439..000000000000 --- a/db/migrate/20221020124018_add_delete_started_at_to_container_repositories.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class AddDeleteStartedAtToContainerRepositories < Gitlab::Database::Migration[2.0] - def change - add_column :container_repositories, - :delete_started_at, - :datetime_with_timezone, - null: true, - default: nil - end -end diff --git a/db/migrate/20221021213216_create_namespace_commit_emails.rb b/db/migrate/20221021213216_create_namespace_commit_emails.rb deleted file mode 100644 index 07811bf7b75d..000000000000 --- a/db/migrate/20221021213216_create_namespace_commit_emails.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -class CreateNamespaceCommitEmails < Gitlab::Database::Migration[2.0] - def change - create_table :namespace_commit_emails do |t| - t.references :user, index: false, null: false, foreign_key: { on_delete: :cascade } - t.references :namespace, null: false - t.references :email, null: false - t.timestamps_with_timezone null: false - - t.index [:user_id, :namespace_id], unique: true - end - end -end diff --git a/db/migrate/20221022213505_add_namespace_commit_emails_namespace_fk.rb b/db/migrate/20221022213505_add_namespace_commit_emails_namespace_fk.rb deleted file mode 100644 index 0c543b033974..000000000000 --- a/db/migrate/20221022213505_add_namespace_commit_emails_namespace_fk.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddNamespaceCommitEmailsNamespaceFk < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - add_concurrent_foreign_key :namespace_commit_emails, :namespaces, column: :namespace_id, on_delete: :cascade - end - - def down - with_lock_retries do - remove_foreign_key :namespace_commit_emails, column: :namespace_id - end - end -end diff --git a/db/migrate/20221022213521_add_namespace_commit_emails_email_fk.rb b/db/migrate/20221022213521_add_namespace_commit_emails_email_fk.rb deleted file mode 100644 index 9dbde26475ce..000000000000 --- a/db/migrate/20221022213521_add_namespace_commit_emails_email_fk.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddNamespaceCommitEmailsEmailFk < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - add_concurrent_foreign_key :namespace_commit_emails, :emails, column: :email_id, on_delete: :cascade - end - - def down - with_lock_retries do - remove_foreign_key :namespace_commit_emails, column: :email_id - end - end -end diff --git a/db/migrate/20221025043930_change_default_value_on_password_last_changed_at_to_user_details.rb b/db/migrate/20221025043930_change_default_value_on_password_last_changed_at_to_user_details.rb deleted file mode 100644 index 49436043a669..000000000000 --- a/db/migrate/20221025043930_change_default_value_on_password_last_changed_at_to_user_details.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class ChangeDefaultValueOnPasswordLastChangedAtToUserDetails < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - # rubocop:disable Migration/RemoveColumn - def change - remove_column :user_details, :password_last_changed_at, :datetime_with_timezone - add_column :user_details, :password_last_changed_at, :datetime_with_timezone, - null: false, default: -> { 'NOW()' }, comment: 'JiHu-specific column' - end - # rubocop:enable Migration/RemoveColumn -end diff --git a/db/migrate/20221025105205_add_status_and_id_index_to_container_repositories.rb b/db/migrate/20221025105205_add_status_and_id_index_to_container_repositories.rb deleted file mode 100644 index 380ffd2e4840..000000000000 --- a/db/migrate/20221025105205_add_status_and_id_index_to_container_repositories.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddStatusAndIdIndexToContainerRepositories < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_container_repositories_on_status_and_id' - - def up - add_concurrent_index :container_repositories, [:status, :id], name: INDEX_NAME, where: 'status IS NOT NULL' - end - - def down - remove_concurrent_index :container_repositories, [:status, :id], name: INDEX_NAME - end -end diff --git a/db/migrate/20221025145452_change_vulnerability_feedback_unique_idx.rb b/db/migrate/20221025145452_change_vulnerability_feedback_unique_idx.rb deleted file mode 100644 index 677245e1f505..000000000000 --- a/db/migrate/20221025145452_change_vulnerability_feedback_unique_idx.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class ChangeVulnerabilityFeedbackUniqueIdx < Gitlab::Database::Migration[2.0] - NEW_INDEX_NAME = :index_vulnerability_feedback_on_common_attributes - OLD_INDEX_NAME = :vulnerability_feedback_unique_idx - - disable_ddl_transaction! - - def up - add_concurrent_index :vulnerability_feedback, - %i[project_id category feedback_type project_fingerprint], - name: NEW_INDEX_NAME - - remove_concurrent_index_by_name :vulnerability_feedback, OLD_INDEX_NAME - end - - def down - add_concurrent_index :vulnerability_feedback, - %i[project_id category feedback_type project_fingerprint], - name: OLD_INDEX_NAME, - unique: true - - remove_concurrent_index_by_name :vulnerability_feedback, NEW_INDEX_NAME - end -end diff --git a/db/migrate/20221025150202_add_index_for_finding_uuid_and_feedback_type_on_feedback.rb b/db/migrate/20221025150202_add_index_for_finding_uuid_and_feedback_type_on_feedback.rb deleted file mode 100644 index f909573937b5..000000000000 --- a/db/migrate/20221025150202_add_index_for_finding_uuid_and_feedback_type_on_feedback.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddIndexForFindingUuidAndFeedbackTypeOnFeedback < Gitlab::Database::Migration[2.0] - INDEX_NAME = :index_vulnerability_feedback_on_feedback_type_and_finding_uuid - - disable_ddl_transaction! - - def up - add_concurrent_index :vulnerability_feedback, %i[feedback_type finding_uuid], name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :vulnerability_feedback, INDEX_NAME - end -end diff --git a/db/migrate/20221027124848_add_text_limit_to_project_settings_mirror_branch_regex.rb b/db/migrate/20221027124848_add_text_limit_to_project_settings_mirror_branch_regex.rb deleted file mode 100644 index e87eb2072048..000000000000 --- a/db/migrate/20221027124848_add_text_limit_to_project_settings_mirror_branch_regex.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitToProjectSettingsMirrorBranchRegex < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - add_text_limit :project_settings, :mirror_branch_regex, 255 - end - - def down - remove_text_limit :project_settings, :mirror_branch_regex - end -end diff --git a/db/migrate/20221028015347_add_commit_committer_name_check_to_push_rules.rb b/db/migrate/20221028015347_add_commit_committer_name_check_to_push_rules.rb deleted file mode 100644 index e9a0887f3535..000000000000 --- a/db/migrate/20221028015347_add_commit_committer_name_check_to_push_rules.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddCommitCommitterNameCheckToPushRules < Gitlab::Database::Migration[2.0] - def change - add_column :push_rules, :commit_committer_name_check, :boolean, default: false, null: false - end -end diff --git a/db/migrate/20221028152422_add_finding_data_column_to_security_findings.rb b/db/migrate/20221028152422_add_finding_data_column_to_security_findings.rb deleted file mode 100644 index a5d3929579b4..000000000000 --- a/db/migrate/20221028152422_add_finding_data_column_to_security_findings.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class AddFindingDataColumnToSecurityFindings < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def up - add_column :security_findings, :finding_data, :jsonb, default: {}, null: false - end - - def down - remove_column :security_findings, :finding_data - end -end diff --git a/db/migrate/20221031102916_add_users_foreign_key_to_projects.rb b/db/migrate/20221031102916_add_users_foreign_key_to_projects.rb deleted file mode 100644 index fb37b3b37c22..000000000000 --- a/db/migrate/20221031102916_add_users_foreign_key_to_projects.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddUsersForeignKeyToProjects < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - add_concurrent_foreign_key :projects, :users, column: :creator_id, on_delete: :nullify, validate: false - end - - def down - with_lock_retries do - remove_foreign_key_if_exists :projects, column: :creator_id - end - end -end diff --git a/db/migrate/20221101032521_add_default_preferred_language_to_application_settings.rb b/db/migrate/20221101032521_add_default_preferred_language_to_application_settings.rb deleted file mode 100644 index d6941f95465f..000000000000 --- a/db/migrate/20221101032521_add_default_preferred_language_to_application_settings.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -class AddDefaultPreferredLanguageToApplicationSettings < Gitlab::Database::Migration[2.0] - def change - # rubocop:disable Migration/AddLimitToTextColumns - # limit is added in 20221101032600_add_text_limit_to_default_preferred_language_on_application_settings.rb - add_column :application_settings, :default_preferred_language, :text, default: 'en', null: false - # rubocop:enable Migration/AddLimitToTextColumns - end -end diff --git a/db/migrate/20221101032600_add_text_limit_to_default_preferred_language_on_application_settings.rb b/db/migrate/20221101032600_add_text_limit_to_default_preferred_language_on_application_settings.rb deleted file mode 100644 index 1f6b9815b936..000000000000 --- a/db/migrate/20221101032600_add_text_limit_to_default_preferred_language_on_application_settings.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddTextLimitToDefaultPreferredLanguageOnApplicationSettings < Gitlab::Database::Migration[2.0] - MAXIMUM_LIMIT = 32 - - disable_ddl_transaction! - - def up - add_text_limit :application_settings, :default_preferred_language, MAXIMUM_LIMIT - end - - def down - remove_text_limit :application_settings, :default_preferred_language - end -end diff --git a/db/migrate/20221101195903_change_email_confirmation_setting_default.rb b/db/migrate/20221101195903_change_email_confirmation_setting_default.rb deleted file mode 100644 index 86c1896f1848..000000000000 --- a/db/migrate/20221101195903_change_email_confirmation_setting_default.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class ChangeEmailConfirmationSettingDefault < Gitlab::Database::Migration[2.0] - def change - change_column_default(:application_settings, :email_confirmation_setting, from: 2, to: 0) - end -end diff --git a/db/migrate/20221101201031_set_email_confirmation_setting_from_send_user_confirmation_email_setting.rb b/db/migrate/20221101201031_set_email_confirmation_setting_from_send_user_confirmation_email_setting.rb deleted file mode 100644 index 0c0a0dc1a587..000000000000 --- a/db/migrate/20221101201031_set_email_confirmation_setting_from_send_user_confirmation_email_setting.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class SetEmailConfirmationSettingFromSendUserConfirmationEmailSetting < 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/20221102202130_extend_x509_subject_limit.rb b/db/migrate/20221102202130_extend_x509_subject_limit.rb deleted file mode 100644 index 3e6bfc7691ce..000000000000 --- a/db/migrate/20221102202130_extend_x509_subject_limit.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class ExtendX509SubjectLimit < Gitlab::Database::Migration[2.0] - def up - change_column :x509_certificates, :subject, :string, limit: 512 - end - - def down - change_column :x509_certificates, :subject, :string, limit: 255 - end -end diff --git a/db/migrate/20221102225800_add_max_seats_used_changed_at_index_to_gitlab_subscriptions.rb b/db/migrate/20221102225800_add_max_seats_used_changed_at_index_to_gitlab_subscriptions.rb deleted file mode 100644 index b5cf82896738..000000000000 --- a/db/migrate/20221102225800_add_max_seats_used_changed_at_index_to_gitlab_subscriptions.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddMaxSeatsUsedChangedAtIndexToGitlabSubscriptions < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'index_gitlab_subscriptions_on_max_seats_used_changed_at' - - disable_ddl_transaction! - - def up - add_concurrent_index :gitlab_subscriptions, [:max_seats_used_changed_at, :namespace_id], name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :gitlab_subscriptions, INDEX_NAME - end -end diff --git a/db/migrate/20221103131409_add_partial_index_on_primary_key_of_security_scans.rb b/db/migrate/20221103131409_add_partial_index_on_primary_key_of_security_scans.rb deleted file mode 100644 index f3defcd38c6a..000000000000 --- a/db/migrate/20221103131409_add_partial_index_on_primary_key_of_security_scans.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddPartialIndexOnPrimaryKeyOfSecurityScans < Gitlab::Database::Migration[2.0] - INDEX_NAME = :index_security_scans_on_id_for_non_purged_records - PURGED_STATE = 6 - disable_ddl_transaction! - - def up - add_concurrent_index :security_scans, :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/migrate/20221104061320_add_disable_download_button_into_application_settings.rb b/db/migrate/20221104061320_add_disable_download_button_into_application_settings.rb deleted file mode 100644 index b93085b86174..000000000000 --- a/db/migrate/20221104061320_add_disable_download_button_into_application_settings.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true - -class AddDisableDownloadButtonIntoApplicationSettings < Gitlab::Database::Migration[2.0] - def change - add_column :application_settings, :disable_download_button, :boolean, - null: false, default: false, comment: 'JiHu-specific column' - end -end diff --git a/db/migrate/20221104094042_remove_users_foreign_key_to_projects.rb b/db/migrate/20221104094042_remove_users_foreign_key_to_projects.rb deleted file mode 100644 index 19497c80b8eb..000000000000 --- a/db/migrate/20221104094042_remove_users_foreign_key_to_projects.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class RemoveUsersForeignKeyToProjects < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - with_lock_retries do - remove_foreign_key_if_exists :projects, column: :creator_id - end - end - - def down - add_concurrent_foreign_key :projects, :users, column: :creator_id, on_delete: :nullify, validate: false - end -end diff --git a/db/migrate/20221107115247_change_scim_identity_group_id_remove_null.rb b/db/migrate/20221107115247_change_scim_identity_group_id_remove_null.rb deleted file mode 100644 index f68cab682616..000000000000 --- a/db/migrate/20221107115247_change_scim_identity_group_id_remove_null.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true -class ChangeScimIdentityGroupIdRemoveNull < Gitlab::Database::Migration[2.0] - def up - change_column_null :scim_identities, :group_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/20221107115413_change_scim_oauth_access_token_group_id_remove_null.rb b/db/migrate/20221107115413_change_scim_oauth_access_token_group_id_remove_null.rb deleted file mode 100644 index c33e67291a41..000000000000 --- a/db/migrate/20221107115413_change_scim_oauth_access_token_group_id_remove_null.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true -class ChangeScimOauthAccessTokenGroupIdRemoveNull < Gitlab::Database::Migration[2.0] - def up - change_column_null :scim_oauth_access_tokens, :group_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/20221107183222_create_project_wiki_repositories.rb b/db/migrate/20221107183222_create_project_wiki_repositories.rb deleted file mode 100644 index 770c62604ff5..000000000000 --- a/db/migrate/20221107183222_create_project_wiki_repositories.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class CreateProjectWikiRepositories < Gitlab::Database::Migration[2.0] - def change - create_table :project_wiki_repositories do |t| - t.references :project, index: { unique: true }, foreign_key: { on_delete: :cascade }, null: false - - t.timestamps_with_timezone null: false - end - end -end diff --git a/db/migrate/20221107184542_add_new_amount_used_to_ci_namespace_monthly_usages.rb b/db/migrate/20221107184542_add_new_amount_used_to_ci_namespace_monthly_usages.rb deleted file mode 100644 index 23a5a7161642..000000000000 --- a/db/migrate/20221107184542_add_new_amount_used_to_ci_namespace_monthly_usages.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class AddNewAmountUsedToCiNamespaceMonthlyUsages < Gitlab::Database::Migration[2.0] - TABLE = :ci_namespace_monthly_usages - OLD_COLUMN = :amount_used - NEW_COLUMN = :new_amount_used - TRIGGER_NAME = 'sync_namespaces_amount_used_columns' - - disable_ddl_transaction! - - def up - check_trigger_permissions!(TABLE) - - add_column(TABLE, NEW_COLUMN, :decimal, default: 0.0, precision: 18, scale: 4, null: false, if_not_exists: true) - - install_rename_triggers(TABLE, OLD_COLUMN, NEW_COLUMN, trigger_name: TRIGGER_NAME) - end - - def down - remove_rename_triggers(TABLE, TRIGGER_NAME) - - remove_column(TABLE, NEW_COLUMN) - end -end diff --git a/db/migrate/20221108015813_add_telesign_to_application_settings.rb b/db/migrate/20221108015813_add_telesign_to_application_settings.rb deleted file mode 100644 index f8e4fb5340b7..000000000000 --- a/db/migrate/20221108015813_add_telesign_to_application_settings.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class AddTelesignToApplicationSettings < Gitlab::Database::Migration[2.0] - def change - add_column :application_settings, :encrypted_telesign_customer_xid, :binary - add_column :application_settings, :encrypted_telesign_customer_xid_iv, :binary - - add_column :application_settings, :encrypted_telesign_api_key, :binary - add_column :application_settings, :encrypted_telesign_api_key_iv, :binary - end -end diff --git a/db/migrate/20221108185442_add_project_wiki_repository_id_to_project_wiki_repository_states.rb b/db/migrate/20221108185442_add_project_wiki_repository_id_to_project_wiki_repository_states.rb deleted file mode 100644 index 317f58dac275..000000000000 --- a/db/migrate/20221108185442_add_project_wiki_repository_id_to_project_wiki_repository_states.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -class AddProjectWikiRepositoryIdToProjectWikiRepositoryStates < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'idx_project_wiki_repository_states_project_wiki_repository_id' - - def up - with_lock_retries do - unless column_exists?(:project_wiki_repository_states, :project_wiki_repository_id) - add_column :project_wiki_repository_states, :project_wiki_repository_id, :bigint - end - end - - add_concurrent_index :project_wiki_repository_states, - :project_wiki_repository_id, - name: INDEX_NAME - - add_concurrent_foreign_key :project_wiki_repository_states, - :project_wiki_repositories, - column: :project_wiki_repository_id, - on_delete: :cascade - end - - def down - with_lock_retries do - if column_exists?(:project_wiki_repository_states, :project_wiki_repository_id) - remove_column :project_wiki_repository_states, :project_wiki_repository_id - end - end - - remove_foreign_key_if_exists :project_wiki_repository_states, column: :project_wiki_repository_id - remove_concurrent_index_by_name :project_wiki_repository_states, name: INDEX_NAME - end -end diff --git a/db/migrate/20221110105857_add_index_for_in_product_marketing_email_metrics.rb b/db/migrate/20221110105857_add_index_for_in_product_marketing_email_metrics.rb deleted file mode 100644 index f1bc07e41970..000000000000 --- a/db/migrate/20221110105857_add_index_for_in_product_marketing_email_metrics.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddIndexForInProductMarketingEmailMetrics < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_in_product_marketing_emails_on_track_series_id_clicked' - - def up - add_concurrent_index :in_product_marketing_emails, %i[track series id cta_clicked_at], name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :in_product_marketing_emails, INDEX_NAME - end -end diff --git a/db/migrate/20221110150942_add_project_id_lower_name_index_remove_old_index.rb b/db/migrate/20221110150942_add_project_id_lower_name_index_remove_old_index.rb deleted file mode 100644 index dfff2f896103..000000000000 --- a/db/migrate/20221110150942_add_project_id_lower_name_index_remove_old_index.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -class AddProjectIdLowerNameIndexRemoveOldIndex < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'index_im_timeline_event_tags_name_project_id' - NEW_INDEX_NAME = 'index_im_timeline_event_tags_on_lower_name_and_project_id' - - disable_ddl_transaction! - - def up - # Add new index - add_concurrent_index :incident_management_timeline_event_tags, 'project_id, LOWER(name)', - unique: true, name: NEW_INDEX_NAME - - # Remove old index - remove_concurrent_index_by_name :incident_management_timeline_event_tags, INDEX_NAME - end - - def down - # Add old index - add_concurrent_index :incident_management_timeline_event_tags, [:project_id, :name], - unique: true, name: INDEX_NAME - - # Remove new index - remove_concurrent_index_by_name :incident_management_timeline_event_tags, NEW_INDEX_NAME - end -end diff --git a/db/post_migrate/20220601110011_schedule_remove_self_managed_wiki_notes.rb b/db/post_migrate/20220601110011_schedule_remove_self_managed_wiki_notes.rb deleted file mode 100644 index 9e6594bb9b6a..000000000000 --- a/db/post_migrate/20220601110011_schedule_remove_self_managed_wiki_notes.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -class ScheduleRemoveSelfManagedWikiNotes < Gitlab::Database::Migration[2.0] - restrict_gitlab_migration gitlab_schema: :gitlab_main - - MIGRATION = 'RemoveSelfManagedWikiNotes' - INTERVAL = 2.minutes - - disable_ddl_transaction! - - def up - return if skip_migration? - - queue_batched_background_migration( - MIGRATION, - :notes, - :id, - job_interval: INTERVAL, - batch_size: 10_000, - sub_batch_size: 1_000 - ) - end - - def down - return if skip_migration? - - delete_batched_background_migration(MIGRATION, :notes, :id, []) - end - - private - - def skip_migration? - Gitlab.staging? || Gitlab.com? - end -end diff --git a/db/post_migrate/20220606054503_add_tmp_index_job_artifacts_id_and_expire_at.rb b/db/post_migrate/20220606054503_add_tmp_index_job_artifacts_id_and_expire_at.rb deleted file mode 100644 index 28346eb1a976..000000000000 --- a/db/post_migrate/20220606054503_add_tmp_index_job_artifacts_id_and_expire_at.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class AddTmpIndexJobArtifactsIdAndExpireAt < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'tmp_index_ci_job_artifacts_on_id_expire_at_file_type_trace' - - EXPIRE_AT_ON_22_MIDNIGHT_IN_TIMEZONE_OR_TRACE = <<~SQL - (EXTRACT(day FROM timezone('UTC', expire_at)) IN (21, 22, 23) - AND EXTRACT(minute FROM timezone('UTC', expire_at)) IN (0, 30, 45) - AND EXTRACT(second FROM timezone('UTC', expire_at)) = 0) - OR file_type = 3 - SQL - - def up - return if Gitlab.com? - return if index_exists_by_name?(:ci_job_artifacts, INDEX_NAME) - - add_concurrent_index :ci_job_artifacts, :id, - where: EXPIRE_AT_ON_22_MIDNIGHT_IN_TIMEZONE_OR_TRACE, name: INDEX_NAME - end - - def down - return if Gitlab.com? - return unless index_exists_by_name?(:ci_job_artifacts, INDEX_NAME) - - remove_concurrent_index_by_name :ci_job_artifacts, INDEX_NAME - end -end diff --git a/db/post_migrate/20220606080509_fix_incorrect_job_artifacts_expire_at.rb b/db/post_migrate/20220606080509_fix_incorrect_job_artifacts_expire_at.rb deleted file mode 100644 index 8fea22f5579a..000000000000 --- a/db/post_migrate/20220606080509_fix_incorrect_job_artifacts_expire_at.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -class FixIncorrectJobArtifactsExpireAt < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - restrict_gitlab_migration gitlab_schema: :gitlab_ci - - MIGRATION = 'RemoveBackfilledJobArtifactsExpireAt' - BATCH_CLASS = 'RemoveBackfilledJobArtifactsExpireAtBatchingStrategy' - BATCH_SIZE = 500 - INTERVAL = 2.minutes.freeze - - def up - return if Gitlab.com? - - queue_batched_background_migration( - MIGRATION, - :ci_job_artifacts, - :id, - job_interval: INTERVAL, - batch_class_name: BATCH_CLASS, - batch_size: BATCH_SIZE - ) - end - - def down - return if Gitlab.com? - - delete_batched_background_migration(MIGRATION, :ci_job_artifacts, :id, []) - end -end diff --git a/db/post_migrate/20220615154500_schedule_backfill_cluster_agents_has_vulnerabilities.rb b/db/post_migrate/20220615154500_schedule_backfill_cluster_agents_has_vulnerabilities.rb deleted file mode 100644 index 74aeb2947a97..000000000000 --- a/db/post_migrate/20220615154500_schedule_backfill_cluster_agents_has_vulnerabilities.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class ScheduleBackfillClusterAgentsHasVulnerabilities < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - MIGRATION = 'BackfillClusterAgentsHasVulnerabilities' - DELAY_INTERVAL = 2.minutes - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - ensure_batched_background_migration_is_finished( - job_class_name: 'BackfillVulnerabilityReadsClusterAgent', - table_name: :vulnerability_reads, - column_name: :id, - job_arguments: [] - ) - - queue_batched_background_migration( - MIGRATION, - :cluster_agents, - :id, - job_interval: DELAY_INTERVAL - ) - end - - def down - delete_batched_background_migration(MIGRATION, :cluster_agents, :id, []) - end -end diff --git a/db/post_migrate/20220616171355_update_vulnerabilities_project_id_id_active_cis_index.rb b/db/post_migrate/20220616171355_update_vulnerabilities_project_id_id_active_cis_index.rb deleted file mode 100644 index 047ae0d1132e..000000000000 --- a/db/post_migrate/20220616171355_update_vulnerabilities_project_id_id_active_cis_index.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class UpdateVulnerabilitiesProjectIdIdActiveCisIndex < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - NEW_INDEX_NAME = 'idx_vulnerabilities_on_project_id_and_id_active_cis_dft_branch' - OLD_INDEX_NAME = 'index_vulnerabilities_on_project_id_and_id_active_cis' - OLD_INDEX_FILTER_CONDITION = 'report_type = 7 AND state = ANY(ARRAY[1, 4])' - NEW_INDEX_FILTER_CONDITION = 'report_type = 7 AND state = ANY(ARRAY[1, 4]) AND present_on_default_branch IS TRUE' - - def up - add_concurrent_index :vulnerabilities, [:project_id, :id], - where: NEW_INDEX_FILTER_CONDITION, - name: NEW_INDEX_NAME - - remove_concurrent_index_by_name(:vulnerabilities, OLD_INDEX_NAME) - end - - def down - add_concurrent_index :vulnerabilities, [:project_id, :id], where: OLD_INDEX_FILTER_CONDITION, name: OLD_INDEX_NAME - - remove_concurrent_index_by_name(:vulnerabilities, NEW_INDEX_NAME) - end -end diff --git a/db/post_migrate/20220706145113_backfill_namespace_id_on_issues.rb b/db/post_migrate/20220706145113_backfill_namespace_id_on_issues.rb deleted file mode 100644 index 8114967ac8e9..000000000000 --- a/db/post_migrate/20220706145113_backfill_namespace_id_on_issues.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -class BackfillNamespaceIdOnIssues < Gitlab::Database::Migration[2.0] - restrict_gitlab_migration gitlab_schema: :gitlab_main - disable_ddl_transaction! - - MIGRATION = 'BackfillProjectNamespaceOnIssues' - DELAY_INTERVAL = 2.minutes - BATCH_SIZE = 500 - MAX_BATCH_SIZE = 10_000 - SUB_BATCH_SIZE = 10 - - def up - queue_batched_background_migration( - MIGRATION, - :issues, - :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, :issues, :id, []) - end -end diff --git a/db/post_migrate/20220707192420_remove_tmp_idx_merge_requests_draft_and_status.rb b/db/post_migrate/20220707192420_remove_tmp_idx_merge_requests_draft_and_status.rb deleted file mode 100644 index a8cfea024639..000000000000 --- a/db/post_migrate/20220707192420_remove_tmp_idx_merge_requests_draft_and_status.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class RemoveTmpIdxMergeRequestsDraftAndStatus < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = "tmp_index_merge_requests_draft_and_status" - CORRECTED_REGEXP_STR = "^(\\[draft\\]|\\(draft\\)|draft:|draft|\\[WIP\\]|WIP:|WIP)" - - def up - remove_concurrent_index_by_name :merge_requests, INDEX_NAME - end - - def down - add_concurrent_index :merge_requests, :id, - where: "draft = false AND state_id = 1 AND ((title)::text ~* '#{CORRECTED_REGEXP_STR}'::text)", - name: INDEX_NAME - end -end diff --git a/db/post_migrate/20220726225114_remove_tmp_index_group_membership_namespace_id_column.rb b/db/post_migrate/20220726225114_remove_tmp_index_group_membership_namespace_id_column.rb deleted file mode 100644 index db47be6a1e3a..000000000000 --- a/db/post_migrate/20220726225114_remove_tmp_index_group_membership_namespace_id_column.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class RemoveTmpIndexGroupMembershipNamespaceIdColumn < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'tmp_index_for_namespace_id_migration_on_group_members' - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :members, INDEX_NAME - end - - def down - add_concurrent_index :members, :id, - where: "members.member_namespace_id IS NULL and members.type = 'GroupMember'", - name: INDEX_NAME - end -end diff --git a/db/post_migrate/20220801155858_schedule_disable_legacy_open_source_licence_for_recent_public_projects.rb b/db/post_migrate/20220801155858_schedule_disable_legacy_open_source_licence_for_recent_public_projects.rb deleted file mode 100644 index a662cfe4be35..000000000000 --- a/db/post_migrate/20220801155858_schedule_disable_legacy_open_source_licence_for_recent_public_projects.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -class ScheduleDisableLegacyOpenSourceLicenceForRecentPublicProjects < Gitlab::Database::Migration[2.0] - MIGRATION = 'DisableLegacyOpenSourceLicenceForRecentPublicProjects' - INTERVAL = 2.minutes - BATCH_SIZE = 1_000 - MAX_BATCH_SIZE = 5_000 - SUB_BATCH_SIZE = 200 - - disable_ddl_transaction! - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - return unless Gitlab.com? - - 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 - return unless Gitlab.com? - - delete_batched_background_migration(MIGRATION, :projects, :id, []) - end -end diff --git a/db/post_migrate/20220809002011_schedule_destroy_invalid_group_members.rb b/db/post_migrate/20220809002011_schedule_destroy_invalid_group_members.rb deleted file mode 100644 index e5d97d890ab8..000000000000 --- a/db/post_migrate/20220809002011_schedule_destroy_invalid_group_members.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class ScheduleDestroyInvalidGroupMembers < Gitlab::Database::Migration[2.0] - MIGRATION = 'DestroyInvalidGroupMembers' - DELAY_INTERVAL = 2.minutes - BATCH_SIZE = 1_000 - MAX_BATCH_SIZE = 2_000 - SUB_BATCH_SIZE = 50 - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - disable_ddl_transaction! - - def up - # no-op - # We want to no-op this due to potential inconsistencies in SM upgrade path - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20220809214730_add_note_metadata_temp_index_on_id_where_task.rb b/db/post_migrate/20220809214730_add_note_metadata_temp_index_on_id_where_task.rb deleted file mode 100644 index 1c5a1b68041b..000000000000 --- a/db/post_migrate/20220809214730_add_note_metadata_temp_index_on_id_where_task.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddNoteMetadataTempIndexOnIdWhereTask < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'tmp_index_system_note_metadata_on_id_where_task' - - disable_ddl_transaction! - - def up - add_concurrent_index :system_note_metadata, [:id, :action], where: "action = 'task'", name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :system_note_metadata, INDEX_NAME - end -end diff --git a/db/post_migrate/20220809223215_change_task_system_note_wording_to_checklist_item.rb b/db/post_migrate/20220809223215_change_task_system_note_wording_to_checklist_item.rb deleted file mode 100644 index df7c2d325d29..000000000000 --- a/db/post_migrate/20220809223215_change_task_system_note_wording_to_checklist_item.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -class ChangeTaskSystemNoteWordingToChecklistItem < Gitlab::Database::Migration[2.0] - restrict_gitlab_migration gitlab_schema: :gitlab_main - disable_ddl_transaction! - - MIGRATION = 'RenameTaskSystemNoteToChecklistItem' - DELAY_INTERVAL = 2.minutes - BATCH_SIZE = 10_000 - MAX_BATCH_SIZE = 20_000 - SUB_BATCH_SIZE = 100 - - def up - queue_batched_background_migration( - MIGRATION, - :system_note_metadata, - :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, :system_note_metadata, :id, []) - end -end diff --git a/db/post_migrate/20220815061621_rename_web_hooks_service_id_to_integration_id.rb b/db/post_migrate/20220815061621_rename_web_hooks_service_id_to_integration_id.rb deleted file mode 100644 index 6bcee7f51df9..000000000000 --- a/db/post_migrate/20220815061621_rename_web_hooks_service_id_to_integration_id.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class RenameWebHooksServiceIdToIntegrationId < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - rename_column_concurrently :web_hooks, :service_id, :integration_id - end - - def down - undo_rename_column_concurrently :web_hooks, :service_id, :integration_id - end -end diff --git a/db/post_migrate/20220816075638_drop_uuid_and_id_index_from_security_findings.rb b/db/post_migrate/20220816075638_drop_uuid_and_id_index_from_security_findings.rb deleted file mode 100644 index 7a41e0b7835b..000000000000 --- a/db/post_migrate/20220816075638_drop_uuid_and_id_index_from_security_findings.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class DropUuidAndIdIndexFromSecurityFindings < Gitlab::Database::Migration[2.0] - INDEX_NAME = :index_on_security_findings_uuid_and_id_order_desc - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :security_findings, name: INDEX_NAME - end - - def down - add_concurrent_index :security_findings, [:uuid, :id], order: { id: :desc }, name: INDEX_NAME - end -end diff --git a/db/post_migrate/20220816163444_update_start_date_for_iterations_cadences.rb b/db/post_migrate/20220816163444_update_start_date_for_iterations_cadences.rb deleted file mode 100644 index 631e8941addc..000000000000 --- a/db/post_migrate/20220816163444_update_start_date_for_iterations_cadences.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -class UpdateStartDateForIterationsCadences < Gitlab::Database::Migration[2.0] - include ::Gitlab::Database::DynamicModelHelpers - - restrict_gitlab_migration gitlab_schema: :gitlab_main - disable_ddl_transaction! - - def up - each_batch_range('iterations_cadences', connection: connection) do |min, max| - execute(<<~SQL) - UPDATE iterations_cadences - SET start_date=ic.first_upcoming_iteration_start_date - FROM ( - SELECT ic.id, sprints2.first_upcoming_iteration_start_date - FROM iterations_cadences as ic, - LATERAL ( - -- For each cadence, query for the due date of its current iteration - SELECT due_date as current_iteration_due_date FROM sprints - WHERE iterations_cadence_id=ic.id AND start_date <= current_date AND due_date >= current_date - LIMIT 1 - ) as sprints1, - LATERAL ( - -- For each cadence, query for the start date of the first upcoming iteration (i.e, it starts after the current iteration) - SELECT start_date as first_upcoming_iteration_start_date FROM sprints - WHERE iterations_cadence_id=ic.id AND start_date > sprints1.current_iteration_due_date - ORDER BY start_date ASC LIMIT 1 - ) as sprints2 - WHERE ic.automatic=true AND ic.id BETWEEN #{min} AND #{max} - ) as ic - WHERE iterations_cadences.id=ic.id; - SQL - end - end - - def down - each_batch_range('iterations_cadences', connection: connection) do |min, max| - execute(<<~SQL) - UPDATE iterations_cadences - SET start_date=ic.first_iteration_start_date - FROM ( - SELECT ic.id, sprints.start_date as first_iteration_start_date - FROM iterations_cadences as ic, - LATERAL ( - SELECT start_date FROM sprints WHERE iterations_cadence_id=ic.id ORDER BY start_date ASC LIMIT 1 - ) as sprints - WHERE ic.automatic=true AND ic.id BETWEEN #{min} AND #{max} - ) as ic - WHERE iterations_cadences.id=ic.id; - SQL - end - end -end diff --git a/db/post_migrate/20220820221036_update_tmp_non_migrated_index_on_container_repositories.rb b/db/post_migrate/20220820221036_update_tmp_non_migrated_index_on_container_repositories.rb deleted file mode 100644 index eea58ad79516..000000000000 --- a/db/post_migrate/20220820221036_update_tmp_non_migrated_index_on_container_repositories.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class UpdateTmpNonMigratedIndexOnContainerRepositories < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - NEW_INDEX_NAME = 'tmp_index_container_repos_on_non_migrated' - OLD_INDEX_NAME = 'tmp_idx_container_repos_on_non_migrated' - MIGRATION_PHASE_1_ENDED_AT = '2022-01-23' - - def up - add_concurrent_index :container_repositories, - [:project_id, :id], - name: NEW_INDEX_NAME, - where: "migration_state != 'import_done'" - remove_concurrent_index_by_name :container_repositories, OLD_INDEX_NAME - end - - def down - add_concurrent_index :container_repositories, - [:project_id, :id], - name: OLD_INDEX_NAME, - where: "migration_state != 'import_done' AND created_at < '#{MIGRATION_PHASE_1_ENDED_AT}'" - remove_concurrent_index_by_name :container_repositories, NEW_INDEX_NAME - end -end diff --git a/db/post_migrate/20220822071909_remove_other_role_from_user_details.rb b/db/post_migrate/20220822071909_remove_other_role_from_user_details.rb deleted file mode 100644 index a0177bf26058..000000000000 --- a/db/post_migrate/20220822071909_remove_other_role_from_user_details.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class RemoveOtherRoleFromUserDetails < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - remove_column :user_details, :other_role, :text - end -end diff --git a/db/post_migrate/20220822090656_drop_build_coverage_regex_from_project.rb b/db/post_migrate/20220822090656_drop_build_coverage_regex_from_project.rb deleted file mode 100644 index 70c6b6603189..000000000000 --- a/db/post_migrate/20220822090656_drop_build_coverage_regex_from_project.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class DropBuildCoverageRegexFromProject < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def up - remove_column :projects, :build_coverage_regex - end - - def down - add_column :projects, :build_coverage_regex, :string # rubocop: disable Migration/AddColumnsToWideTables - end -end diff --git a/db/post_migrate/20220822094804_add_issues_authorization_index.rb b/db/post_migrate/20220822094804_add_issues_authorization_index.rb deleted file mode 100644 index e09b5f8d93be..000000000000 --- a/db/post_migrate/20220822094804_add_issues_authorization_index.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddIssuesAuthorizationIndex < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'idx_open_issues_on_project_and_confidential_and_author_and_id' - - def up - prepare_async_index :issues, [:project_id, :confidential, :author_id, :id], name: INDEX_NAME, where: 'state_id = 1' - end - - def down - unprepare_async_index :issues, INDEX_NAME - end -end diff --git a/db/post_migrate/20220823084747_prepare_removal_partial_trigram_indexes_for_issues.rb b/db/post_migrate/20220823084747_prepare_removal_partial_trigram_indexes_for_issues.rb deleted file mode 100644 index a8ea6abdcba6..000000000000 --- a/db/post_migrate/20220823084747_prepare_removal_partial_trigram_indexes_for_issues.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class PrepareRemovalPartialTrigramIndexesForIssues < Gitlab::Database::Migration[2.0] - TITLE_INDEX_NAME = 'index_issues_on_title_trigram_non_latin' - DESCRIPTION_INDEX_NAME = 'index_issues_on_description_trigram_non_latin' - - def up - prepare_async_index_removal :issues, :title, name: TITLE_INDEX_NAME - prepare_async_index_removal :issues, :description, name: DESCRIPTION_INDEX_NAME - end - - def down - unprepare_async_index_by_name :issues, DESCRIPTION_INDEX_NAME - unprepare_async_index_by_name :issues, TITLE_INDEX_NAME - end -end diff --git a/db/post_migrate/20220824114218_add_tmp_index_approval_merge_request_rules.rb b/db/post_migrate/20220824114218_add_tmp_index_approval_merge_request_rules.rb deleted file mode 100644 index 64171b3053e8..000000000000 --- a/db/post_migrate/20220824114218_add_tmp_index_approval_merge_request_rules.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddTmpIndexApprovalMergeRequestRules < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - TMP_INDEX_NAME = 'tmp_index_approval_merge_request_rules_on_report_type_equal_one' - - def up - # to be removed as part of https://gitlab.com/gitlab-org/gitlab/-/issues/372224 - add_concurrent_index :approval_merge_request_rules, - [:id, :report_type], - name: TMP_INDEX_NAME, - where: "report_type = 1" - end - - def down - remove_concurrent_index_by_name :approval_merge_request_rules, TMP_INDEX_NAME - end -end diff --git a/db/post_migrate/20220825061250_drop_tmp_index_todos_attention_request_action_idx.rb b/db/post_migrate/20220825061250_drop_tmp_index_todos_attention_request_action_idx.rb deleted file mode 100644 index 091de49e1c96..000000000000 --- a/db/post_migrate/20220825061250_drop_tmp_index_todos_attention_request_action_idx.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class DropTmpIndexTodosAttentionRequestActionIdx < Gitlab::Database::Migration[2.0] - INDEX_NAME = "tmp_index_todos_attention_request_action" - ATTENTION_REQUESTED = 10 - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :todos, INDEX_NAME - end - - def down - add_concurrent_index :todos, [:id], - where: "action = #{ATTENTION_REQUESTED}", - name: INDEX_NAME - end -end diff --git a/db/post_migrate/20220825142324_replace_issues_authorization_index.rb b/db/post_migrate/20220825142324_replace_issues_authorization_index.rb deleted file mode 100644 index b033cb22490c..000000000000 --- a/db/post_migrate/20220825142324_replace_issues_authorization_index.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class ReplaceIssuesAuthorizationIndex < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'idx_open_issues_on_project_and_confidential_and_author_and_id' - OLD_INDEX_NAME = 'idx_open_issues_on_project_id_and_confidential' - - def up - add_concurrent_index :issues, [:project_id, :confidential, :author_id, :id], name: INDEX_NAME, where: 'state_id = 1' - remove_concurrent_index_by_name :issues, OLD_INDEX_NAME - end - - def down - add_concurrent_index :issues, [:project_id, :confidential], name: OLD_INDEX_NAME, where: 'state_id = 1' - remove_concurrent_index_by_name :issues, INDEX_NAME - end -end diff --git a/db/post_migrate/20220826165048_drop_temporary_job_trace_index.rb b/db/post_migrate/20220826165048_drop_temporary_job_trace_index.rb deleted file mode 100644 index 0cad7cd19684..000000000000 --- a/db/post_migrate/20220826165048_drop_temporary_job_trace_index.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class DropTemporaryJobTraceIndex < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'tmp_index_ci_job_artifacts_on_id_where_trace_and_expire_at' - - def up - prepare_async_index_removal :ci_job_artifacts, :id, name: INDEX_NAME - end - - def down - unprepare_async_index_by_name :ci_job_artifacts, INDEX_NAME - end -end diff --git a/db/post_migrate/20220826175058_fully_remove_temporary_job_trace_index.rb b/db/post_migrate/20220826175058_fully_remove_temporary_job_trace_index.rb deleted file mode 100644 index 2a18e63106ad..000000000000 --- a/db/post_migrate/20220826175058_fully_remove_temporary_job_trace_index.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class FullyRemoveTemporaryJobTraceIndex < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'tmp_index_ci_job_artifacts_on_id_where_trace_and_expire_at' - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :ci_job_artifacts, name: INDEX_NAME - end - - def down - add_concurrent_index :ci_job_artifacts, :id, name: INDEX_NAME - end -end diff --git a/db/post_migrate/20220830051704_add_temporary_index_for_orphaned_invited_members.rb b/db/post_migrate/20220830051704_add_temporary_index_for_orphaned_invited_members.rb deleted file mode 100644 index 90254ac3d86f..000000000000 --- a/db/post_migrate/20220830051704_add_temporary_index_for_orphaned_invited_members.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class AddTemporaryIndexForOrphanedInvitedMembers < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - TMP_INDEX_NAME = 'tmp_idx_orphaned_invited_members' - - def up - add_concurrent_index('members', :id, where: query_condition, name: TMP_INDEX_NAME) - end - - def down - remove_concurrent_index_by_name('members', TMP_INDEX_NAME) if index_exists_by_name?('members', TMP_INDEX_NAME) - end - - private - - def query_condition - 'invite_token IS NULL and invite_accepted_at IS NOT NULL AND user_id IS NULL' - end -end diff --git a/db/post_migrate/20220830061704_orphaned_invited_members_cleanup.rb b/db/post_migrate/20220830061704_orphaned_invited_members_cleanup.rb deleted file mode 100644 index c52495101648..000000000000 --- a/db/post_migrate/20220830061704_orphaned_invited_members_cleanup.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class OrphanedInvitedMembersCleanup < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - # rubocop:disable Style/SymbolProc - membership.where(query_condition).each_batch(of: 100) do |relation| - relation.delete_all - end - # rubocop:enable Style/SymbolProc - end - - def down - # This migration is irreversible - end - - private - - def membership - @membership ||= define_batchable_model('members') - end - - def query_condition - 'invite_token IS NULL and invite_accepted_at IS NOT NULL AND user_id IS NULL' - end -end diff --git a/db/post_migrate/20220830071704_remove_temporary_index_for_orphaned_invited_members.rb b/db/post_migrate/20220830071704_remove_temporary_index_for_orphaned_invited_members.rb deleted file mode 100644 index c6b712da4c04..000000000000 --- a/db/post_migrate/20220830071704_remove_temporary_index_for_orphaned_invited_members.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class RemoveTemporaryIndexForOrphanedInvitedMembers < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - TMP_INDEX_NAME = 'tmp_idx_orphaned_invited_members' - - def up - remove_concurrent_index_by_name('members', TMP_INDEX_NAME) if index_exists_by_name?('members', TMP_INDEX_NAME) - end - - def down - add_concurrent_index('members', :id, where: query_condition, name: TMP_INDEX_NAME) - end - - private - - def query_condition - 'invite_token IS NULL and invite_accepted_at IS NOT NULL AND user_id IS NULL' - end -end diff --git a/db/post_migrate/20220830172142_reschedule_issue_work_item_type_id_backfill.rb b/db/post_migrate/20220830172142_reschedule_issue_work_item_type_id_backfill.rb deleted file mode 100644 index 5495f0e53b46..000000000000 --- a/db/post_migrate/20220830172142_reschedule_issue_work_item_type_id_backfill.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -class RescheduleIssueWorkItemTypeIdBackfill < Gitlab::Database::Migration[2.0] - MIGRATION = 'BackfillWorkItemTypeIdForIssues' - BATCH_SIZE = 10_000 - MAX_BATCH_SIZE = 30_000 - SUB_BATCH_SIZE = 100 - INTERVAL = 1.minute - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - class MigrationWorkItemType < MigrationRecord - self.table_name = 'work_item_types' - - def self.id_by_type - where(namespace_id: nil).order(:base_type).pluck(:base_type, :id).to_h - end - end - - def up - # We expect no more than 5 types. Only 3 of them are expected to have associated issues at the moment - MigrationWorkItemType.id_by_type.each do |base_type, type_id| - queue_batched_background_migration( - MIGRATION, - :issues, - :id, - base_type, - type_id, - job_interval: INTERVAL, - batch_size: BATCH_SIZE, - max_batch_size: MAX_BATCH_SIZE, - sub_batch_size: SUB_BATCH_SIZE - ) - end - end - - def down - Gitlab::Database::BackgroundMigration::BatchedMigration.where(job_class_name: MIGRATION).delete_all - end -end diff --git a/db/post_migrate/20220831021358_add_index_on_issue_health_status.rb b/db/post_migrate/20220831021358_add_index_on_issue_health_status.rb deleted file mode 100644 index 940bf6b5c387..000000000000 --- a/db/post_migrate/20220831021358_add_index_on_issue_health_status.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnIssueHealthStatus < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - TABLE_NAME = :issues - INDEX_NAME = 'index_issues_on_project_id_health_status_created_at_id' - - def up - add_concurrent_index TABLE_NAME, [:project_id, :health_status, :created_at, :id], name: INDEX_NAME - end - - def down - remove_concurrent_index TABLE_NAME, [:project_id, :health_status, :created_at, :id], name: INDEX_NAME - end -end diff --git a/db/post_migrate/20220831090454_cleanup_web_hooks_service_id.rb b/db/post_migrate/20220831090454_cleanup_web_hooks_service_id.rb deleted file mode 100644 index 7beb89038e59..000000000000 --- a/db/post_migrate/20220831090454_cleanup_web_hooks_service_id.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class CleanupWebHooksServiceId < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - cleanup_concurrent_column_rename :web_hooks, :service_id, :integration_id - end - - def down - undo_cleanup_concurrent_column_rename :web_hooks, :service_id, :integration_id - end -end diff --git a/db/post_migrate/20220831132802_delete_approval_rules_for_vulnerability.rb b/db/post_migrate/20220831132802_delete_approval_rules_for_vulnerability.rb deleted file mode 100644 index b29678f18263..000000000000 --- a/db/post_migrate/20220831132802_delete_approval_rules_for_vulnerability.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -class DeleteApprovalRulesForVulnerability < Gitlab::Database::Migration[2.0] - restrict_gitlab_migration gitlab_schema: :gitlab_main - disable_ddl_transaction! - - BATCH_SIZE = 500 - MAX_BATCH_SIZE = 1_000 - SUB_BATCH_SIZE = 10 - MIGRATION = 'DeleteApprovalRulesWithVulnerability' - 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, - max_batch_size: MAX_BATCH_SIZE, - sub_batch_size: SUB_BATCH_SIZE - ) - - queue_batched_background_migration( - MIGRATION, - :approval_merge_request_rules, - :id, - job_interval: INTERVAL, - batch_size: BATCH_SIZE, - max_batch_size: MAX_BATCH_SIZE, - sub_batch_size: SUB_BATCH_SIZE - ) - end - - def down - # the data deleted is related to a feature removed in 15.0: https://gitlab.com/gitlab-org/gitlab/-/issues/357300 - delete_batched_background_migration(MIGRATION, :approval_project_rules, :id, []) - delete_batched_background_migration(MIGRATION, :approval_merge_request_rules, :id, []) - end -end diff --git a/db/post_migrate/20220901035725_schedule_destroy_invalid_project_members.rb b/db/post_migrate/20220901035725_schedule_destroy_invalid_project_members.rb deleted file mode 100644 index 9de3ac346692..000000000000 --- a/db/post_migrate/20220901035725_schedule_destroy_invalid_project_members.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class ScheduleDestroyInvalidProjectMembers < Gitlab::Database::Migration[2.0] - MIGRATION = 'DestroyInvalidProjectMembers' - DELAY_INTERVAL = 2.minutes - BATCH_SIZE = 50_000 - MAX_BATCH_SIZE = 100_000 - SUB_BATCH_SIZE = 200 - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - # no-op - # We want to no-op this due to potential inconsistencies in SM upgrade path - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20220901071310_add_tmp_index_user_callouts_on_attention_request_feature_names.rb b/db/post_migrate/20220901071310_add_tmp_index_user_callouts_on_attention_request_feature_names.rb deleted file mode 100644 index 10b339b90c16..000000000000 --- a/db/post_migrate/20220901071310_add_tmp_index_user_callouts_on_attention_request_feature_names.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddTmpIndexUserCalloutsOnAttentionRequestFeatureNames < Gitlab::Database::Migration[2.0] - INDEX_NAME = "tmp_index_user_callouts_on_attention_request_feature_names" - ATTENTION_REQUEST_CALLOUTS = [47, 48] - - disable_ddl_transaction! - - def up - add_concurrent_index :user_callouts, [:id], - where: "feature_name IN (#{ATTENTION_REQUEST_CALLOUTS.join(',')})", - name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :user_callouts, INDEX_NAME - end -end diff --git a/db/post_migrate/20220901071355_cleanup_attention_request_user_callouts.rb b/db/post_migrate/20220901071355_cleanup_attention_request_user_callouts.rb deleted file mode 100644 index cbd0d120bb8b..000000000000 --- a/db/post_migrate/20220901071355_cleanup_attention_request_user_callouts.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true -class CleanupAttentionRequestUserCallouts < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - restrict_gitlab_migration gitlab_schema: :gitlab_main - - ATTENTION_REQUEST_CALLOUTS = [47, 48] - # 47 and 48 were removed with https://gitlab.com/gitlab-org/gitlab/-/merge_requests/95446 - - def up - define_batchable_model('user_callouts') - .where(feature_name: ATTENTION_REQUEST_CALLOUTS) - .each_batch { |batch| batch.delete_all } # rubocop:disable Style/SymbolProc - end - - def down - # Attention request feature has been reverted. - end -end diff --git a/db/post_migrate/20220901073300_remove_partial_trigram_indexes_for_issues.rb b/db/post_migrate/20220901073300_remove_partial_trigram_indexes_for_issues.rb deleted file mode 100644 index 096b74bc1c61..000000000000 --- a/db/post_migrate/20220901073300_remove_partial_trigram_indexes_for_issues.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class RemovePartialTrigramIndexesForIssues < Gitlab::Database::Migration[2.0] - TITLE_INDEX_NAME = 'index_issues_on_title_trigram_non_latin' - DESCRIPTION_INDEX_NAME = 'index_issues_on_description_trigram_non_latin' - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :issues, TITLE_INDEX_NAME - remove_concurrent_index_by_name :issues, DESCRIPTION_INDEX_NAME - end - - def down - add_concurrent_index :issues, :title, - name: TITLE_INDEX_NAME, - using: :gin, opclass: { description: :gin_trgm_ops }, - where: "title NOT SIMILAR TO '[\\u0000-\\u218F]*' OR description NOT SIMILAR TO '[\\u0000-\\u218F]*'" - - add_concurrent_index :issues, :description, - name: DESCRIPTION_INDEX_NAME, - using: :gin, opclass: { description: :gin_trgm_ops }, - where: "title NOT SIMILAR TO '[\\u0000-\\u218F]*' OR description NOT SIMILAR TO '[\\u0000-\\u218F]*'" - end -end diff --git a/db/post_migrate/20220901184106_add_not_null_to_board_group_recent_visits.rb b/db/post_migrate/20220901184106_add_not_null_to_board_group_recent_visits.rb deleted file mode 100644 index 1dead32efb67..000000000000 --- a/db/post_migrate/20220901184106_add_not_null_to_board_group_recent_visits.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddNotNullToBoardGroupRecentVisits < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - add_not_null_constraint :board_group_recent_visits, :user_id, validate: false - add_not_null_constraint :board_group_recent_visits, :group_id, validate: false - add_not_null_constraint :board_group_recent_visits, :board_id, validate: false - end - - def down - remove_not_null_constraint :board_group_recent_visits, :user_id - remove_not_null_constraint :board_group_recent_visits, :board_id - remove_not_null_constraint :board_group_recent_visits, :group_id - end -end diff --git a/db/post_migrate/20220901184246_add_not_null_to_board_project_recent_visits.rb b/db/post_migrate/20220901184246_add_not_null_to_board_project_recent_visits.rb deleted file mode 100644 index 4f0cb4d3d68b..000000000000 --- a/db/post_migrate/20220901184246_add_not_null_to_board_project_recent_visits.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddNotNullToBoardProjectRecentVisits < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - add_not_null_constraint :board_project_recent_visits, :user_id, validate: false - add_not_null_constraint :board_project_recent_visits, :project_id, validate: false - add_not_null_constraint :board_project_recent_visits, :board_id, validate: false - end - - def down - remove_not_null_constraint :board_project_recent_visits, :user_id - remove_not_null_constraint :board_project_recent_visits, :project_id - remove_not_null_constraint :board_project_recent_visits, :board_id - end -end diff --git a/db/post_migrate/20220902111016_delete_null_records_from_board_group_recent_visits.rb b/db/post_migrate/20220902111016_delete_null_records_from_board_group_recent_visits.rb deleted file mode 100644 index 4b55ecc013d9..000000000000 --- a/db/post_migrate/20220902111016_delete_null_records_from_board_group_recent_visits.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class DeleteNullRecordsFromBoardGroupRecentVisits < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - execute('DELETE FROM board_group_recent_visits WHERE user_id is null OR group_id is null OR board_id is null') - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20220902111038_delete_null_records_from_board_project_recent_visits.rb b/db/post_migrate/20220902111038_delete_null_records_from_board_project_recent_visits.rb deleted file mode 100644 index bb261f80f731..000000000000 --- a/db/post_migrate/20220902111038_delete_null_records_from_board_project_recent_visits.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class DeleteNullRecordsFromBoardProjectRecentVisits < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - execute('DELETE FROM board_project_recent_visits WHERE user_id is null OR project_id is null OR board_id is null') - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20220902204048_move_security_findings_table_to_gitlab_partitions_dynamic_schema.rb b/db/post_migrate/20220902204048_move_security_findings_table_to_gitlab_partitions_dynamic_schema.rb deleted file mode 100644 index 62511e0e616d..000000000000 --- a/db/post_migrate/20220902204048_move_security_findings_table_to_gitlab_partitions_dynamic_schema.rb +++ /dev/null @@ -1,230 +0,0 @@ -# frozen_string_literal: true - -# rubocop:disable Migration/WithLockRetriesDisallowedMethod -class MoveSecurityFindingsTableToGitlabPartitionsDynamicSchema < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_MAPPING_OF_PARTITION = { - index_security_findings_on_unique_columns: :security_findings_1_uuid_scan_id_partition_number_idx, - index_security_findings_on_confidence: :security_findings_1_confidence_idx, - index_security_findings_on_project_fingerprint: :security_findings_1_project_fingerprint_idx, - index_security_findings_on_scan_id_and_deduplicated: :security_findings_1_scan_id_deduplicated_idx, - index_security_findings_on_scan_id_and_id: :security_findings_1_scan_id_id_idx, - index_security_findings_on_scanner_id: :security_findings_1_scanner_id_idx, - index_security_findings_on_severity: :security_findings_1_severity_idx - }.freeze - - INDEX_MAPPING_AFTER_CREATING_FROM_PARTITION = { - partition_name_placeholder_pkey: :security_findings_pkey, - partition_name_placeholder_uuid_scan_id_partition_number_idx: :index_security_findings_on_unique_columns, - partition_name_placeholder_confidence_idx: :index_security_findings_on_confidence, - partition_name_placeholder_project_fingerprint_idx: :index_security_findings_on_project_fingerprint, - partition_name_placeholder_scan_id_deduplicated_idx: :index_security_findings_on_scan_id_and_deduplicated, - partition_name_placeholder_scan_id_id_idx: :index_security_findings_on_scan_id_and_id, - partition_name_placeholder_scanner_id_idx: :index_security_findings_on_scanner_id, - partition_name_placeholder_severity_idx: :index_security_findings_on_severity - }.freeze - - INDEX_MAPPING_AFTER_CREATING_FROM_ITSELF = { - security_findings_pkey1: :security_findings_pkey, - security_findings_uuid_scan_id_partition_number_idx1: :index_security_findings_on_unique_columns, - security_findings_confidence_idx1: :index_security_findings_on_confidence, - security_findings_project_fingerprint_idx1: :index_security_findings_on_project_fingerprint, - security_findings_scan_id_deduplicated_idx1: :index_security_findings_on_scan_id_and_deduplicated, - security_findings_scan_id_id_idx1: :index_security_findings_on_scan_id_and_id, - security_findings_scanner_id_idx1: :index_security_findings_on_scanner_id, - security_findings_severity_idx1: :index_security_findings_on_severity - }.freeze - - LATEST_PARTITION_SQL = <<~SQL - SELECT - partitions.relname AS partition_name - FROM pg_inherits - JOIN pg_class parent ON pg_inherits.inhparent = parent.oid - JOIN pg_class partitions ON pg_inherits.inhrelid = partitions.oid - WHERE - parent.relname = 'security_findings' - ORDER BY (regexp_matches(partitions.relname, 'security_findings_(\\d+)'))[1]::int DESC - LIMIT 1 - SQL - - CURRENT_CHECK_CONSTRAINT_SQL = <<~SQL - SELECT - pg_get_constraintdef(pg_catalog.pg_constraint.oid) - FROM - pg_catalog.pg_constraint - INNER JOIN pg_class ON pg_class.oid = pg_catalog.pg_constraint.conrelid - WHERE - conname = 'check_partition_number' AND - pg_class.relname = 'security_findings' - SQL - - def up - with_lock_retries do - lock_tables - - execute(<<~SQL) - ALTER TABLE security_findings RENAME TO security_findings_#{candidate_partition_number}; - SQL - - execute(<<~SQL) - ALTER INDEX security_findings_pkey RENAME TO security_findings_#{candidate_partition_number}_pkey; - SQL - - execute(<<~SQL) - CREATE TABLE security_findings ( - LIKE security_findings_#{candidate_partition_number} INCLUDING ALL - ) PARTITION BY LIST (partition_number); - SQL - - execute(<<~SQL) - ALTER SEQUENCE security_findings_id_seq OWNED BY #{connection.current_schema}.security_findings.id; - SQL - - execute(<<~SQL) - ALTER TABLE security_findings - ADD CONSTRAINT fk_rails_729b763a54 FOREIGN KEY (scanner_id) REFERENCES vulnerability_scanners(id) ON DELETE CASCADE; - SQL - - execute(<<~SQL) - ALTER TABLE security_findings - ADD CONSTRAINT fk_rails_bb63863cf1 FOREIGN KEY (scan_id) REFERENCES security_scans(id) ON DELETE CASCADE; - SQL - - execute(<<~SQL) - ALTER TABLE security_findings_#{candidate_partition_number} SET SCHEMA gitlab_partitions_dynamic; - SQL - - execute(<<~SQL) - ALTER TABLE security_findings ATTACH PARTITION gitlab_partitions_dynamic.security_findings_#{candidate_partition_number} FOR VALUES IN (#{candidate_partition_number}); - SQL - - execute(<<~SQL) - ALTER TABLE security_findings DROP CONSTRAINT check_partition_number; - SQL - - index_mapping = INDEX_MAPPING_OF_PARTITION.transform_values do |value| - value.to_s.sub('partition_name_placeholder', "security_findings_#{candidate_partition_number}") - end - - rename_indices('gitlab_partitions_dynamic', index_mapping) - end - end - - def down - # If there is already a partition for the `security_findings` table, - # we can promote that table to be the original one to save the data. - # Otherwise, we have to bring back the non-partitioned `security_findings` - # table from the partitioned one. - if latest_partition - create_non_partitioned_security_findings_with_data - else - create_non_partitioned_security_findings_without_data - end - end - - private - - def lock_tables - execute(<<~SQL) - LOCK TABLE vulnerability_scanners, security_scans, security_findings IN ACCESS EXCLUSIVE MODE - SQL - end - - def current_check_constraint - execute(CURRENT_CHECK_CONSTRAINT_SQL).first['pg_get_constraintdef'] - end - - def candidate_partition_number - @candidate_partition_number ||= current_check_constraint.match(/partition_number\s?=\s?(\d+)/).captures.first - end - - def latest_partition - @latest_partition ||= execute(LATEST_PARTITION_SQL).first&.fetch('partition_name', nil) - end - - def latest_partition_number - latest_partition.match(/security_findings_(\d+)/).captures.first - end - - def create_non_partitioned_security_findings_with_data - with_lock_retries do - lock_tables - - execute(<<~SQL) - ALTER TABLE security_findings DETACH PARTITION gitlab_partitions_dynamic.#{latest_partition}; - SQL - - execute(<<~SQL) - ALTER TABLE gitlab_partitions_dynamic.#{latest_partition} SET SCHEMA #{connection.current_schema}; - SQL - - execute(<<~SQL) - ALTER SEQUENCE security_findings_id_seq OWNED BY #{latest_partition}.id; - SQL - - execute(<<~SQL) - DROP TABLE security_findings; - SQL - - execute(<<~SQL) - ALTER TABLE #{latest_partition} RENAME TO security_findings; - SQL - - index_mapping = INDEX_MAPPING_AFTER_CREATING_FROM_PARTITION.transform_keys do |key| - key.to_s.sub('partition_name_placeholder', latest_partition) - end - - rename_indices(connection.current_schema, index_mapping) - end - - add_check_constraint(:security_findings, "(partition_number = #{latest_partition_number})", :check_partition_number) - end - - def create_non_partitioned_security_findings_without_data - with_lock_retries do - lock_tables - - execute(<<~SQL) - ALTER TABLE security_findings RENAME TO security_findings_1; - SQL - - execute(<<~SQL) - CREATE TABLE security_findings ( - LIKE security_findings_1 INCLUDING ALL - ); - SQL - - execute(<<~SQL) - ALTER SEQUENCE security_findings_id_seq OWNED BY #{connection.current_schema}.security_findings.id; - SQL - - execute(<<~SQL) - DROP TABLE security_findings_1; - SQL - - execute(<<~SQL) - ALTER TABLE ONLY security_findings - ADD CONSTRAINT fk_rails_729b763a54 FOREIGN KEY (scanner_id) REFERENCES vulnerability_scanners(id) ON DELETE CASCADE; - SQL - - execute(<<~SQL) - ALTER TABLE ONLY security_findings - ADD CONSTRAINT fk_rails_bb63863cf1 FOREIGN KEY (scan_id) REFERENCES security_scans(id) ON DELETE CASCADE; - SQL - - rename_indices(connection.current_schema, INDEX_MAPPING_AFTER_CREATING_FROM_ITSELF) - end - - add_check_constraint(:security_findings, "(partition_number = 1)", :check_partition_number) - end - - def rename_indices(schema, mapping) - mapping.each do |index_name, new_index_name| - execute(<<~SQL) - ALTER INDEX #{schema}.#{index_name} RENAME TO #{new_index_name}; - SQL - end - end -end -# rubocop:enable Migration/WithLockRetriesDisallowedMethod diff --git a/db/post_migrate/20220904173342_validate_not_null_constraint_board_group_recent_visits.rb b/db/post_migrate/20220904173342_validate_not_null_constraint_board_group_recent_visits.rb deleted file mode 100644 index 0e5a504d0eba..000000000000 --- a/db/post_migrate/20220904173342_validate_not_null_constraint_board_group_recent_visits.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class ValidateNotNullConstraintBoardGroupRecentVisits < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - validate_not_null_constraint :board_group_recent_visits, :user_id - validate_not_null_constraint :board_group_recent_visits, :group_id - validate_not_null_constraint :board_group_recent_visits, :board_id - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20220904173430_validate_not_null_constraint_board_project_recent_visits.rb b/db/post_migrate/20220904173430_validate_not_null_constraint_board_project_recent_visits.rb deleted file mode 100644 index ff73a179f695..000000000000 --- a/db/post_migrate/20220904173430_validate_not_null_constraint_board_project_recent_visits.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class ValidateNotNullConstraintBoardProjectRecentVisits < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - validate_not_null_constraint :board_project_recent_visits, :user_id - validate_not_null_constraint :board_project_recent_visits, :project_id - validate_not_null_constraint :board_project_recent_visits, :board_id - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20220905090300_add_tmp_index_merge_request_reviewers_attention_request_state.rb b/db/post_migrate/20220905090300_add_tmp_index_merge_request_reviewers_attention_request_state.rb deleted file mode 100644 index e192f76484c9..000000000000 --- a/db/post_migrate/20220905090300_add_tmp_index_merge_request_reviewers_attention_request_state.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddTmpIndexMergeRequestReviewersAttentionRequestState < Gitlab::Database::Migration[2.0] - INDEX_NAME = "tmp_index_merge_request_reviewers_on_attention_requested_state" - ATTENTION_REQUESTED_STATE = 2 - - disable_ddl_transaction! - - def up - add_concurrent_index :merge_request_reviewers, [:id], - where: "state = #{ATTENTION_REQUESTED_STATE}", - name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :merge_request_reviewers, INDEX_NAME - end -end diff --git a/db/post_migrate/20220905090339_reset_attention_requested_merge_requests_reviewers_state_to_unreviewed.rb b/db/post_migrate/20220905090339_reset_attention_requested_merge_requests_reviewers_state_to_unreviewed.rb deleted file mode 100644 index d335095e6745..000000000000 --- a/db/post_migrate/20220905090339_reset_attention_requested_merge_requests_reviewers_state_to_unreviewed.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class ResetAttentionRequestedMergeRequestsReviewersStateToUnreviewed < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - restrict_gitlab_migration gitlab_schema: :gitlab_main - - BATCH_SIZE = 500 - - class MergeRequestReviewer < MigrationRecord - self.table_name = 'merge_request_reviewers' - - enum state: { - unreviewed: 0, - reviewed: 1, - attention_requested: 2 - } - - include ::EachBatch - end - - def up - MergeRequestReviewer - .where(state: MergeRequestReviewer.states['attention_requested']) - .each_batch(of: BATCH_SIZE) { |batch| batch.update_all(state: MergeRequestReviewer.states['unreviewed']) } - end - - def down - # no op - end -end diff --git a/db/post_migrate/20220905112710_add_async_index_to_todos_to_cover_pending_query.rb b/db/post_migrate/20220905112710_add_async_index_to_todos_to_cover_pending_query.rb deleted file mode 100644 index e2bca2fae1a6..000000000000 --- a/db/post_migrate/20220905112710_add_async_index_to_todos_to_cover_pending_query.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class AddAsyncIndexToTodosToCoverPendingQuery < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_on_todos_user_project_target_and_state' - COLUMNS = %i[user_id project_id target_type target_id id].freeze - - def up - prepare_async_index :todos, COLUMNS, name: INDEX_NAME, where: "state = 'pending'" - end - - def down - unprepare_async_index :todos, COLUMNS, name: INDEX_NAME, where: "state='pending'" - end -end diff --git a/db/post_migrate/20220905120848_backfill_epic_cache_counts.rb b/db/post_migrate/20220905120848_backfill_epic_cache_counts.rb deleted file mode 100644 index 32fe04eb99c3..000000000000 --- a/db/post_migrate/20220905120848_backfill_epic_cache_counts.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class BackfillEpicCacheCounts < Gitlab::Database::Migration[2.0] - MIGRATION = 'BackfillEpicCacheCounts' - 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/20220906074449_schedule_disable_legacy_open_source_license_for_projects_less_than_one_mb.rb b/db/post_migrate/20220906074449_schedule_disable_legacy_open_source_license_for_projects_less_than_one_mb.rb deleted file mode 100644 index ee48ace13e0c..000000000000 --- a/db/post_migrate/20220906074449_schedule_disable_legacy_open_source_license_for_projects_less_than_one_mb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -class ScheduleDisableLegacyOpenSourceLicenseForProjectsLessThanOneMb < Gitlab::Database::Migration[2.0] - MIGRATION = 'DisableLegacyOpenSourceLicenseForProjectsLessThanOneMb' - 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/20220906212931_add_partial_index_for_ci_pipeline_artifacts_unlocked_with_expire_at.rb b/db/post_migrate/20220906212931_add_partial_index_for_ci_pipeline_artifacts_unlocked_with_expire_at.rb deleted file mode 100644 index a24187dd56b3..000000000000 --- a/db/post_migrate/20220906212931_add_partial_index_for_ci_pipeline_artifacts_unlocked_with_expire_at.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddPartialIndexForCiPipelineArtifactsUnlockedWithExpireAt < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - TABLE_NAME = 'ci_pipeline_artifacts' - INDEX_NAME = 'ci_pipeline_artifacts_on_expire_at_for_removal' - CONDITIONS = 'locked = 0 AND expire_at IS NOT NULL' - - def up - add_concurrent_index TABLE_NAME, [:expire_at], where: CONDITIONS, name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME - end -end diff --git a/db/post_migrate/20220907122648_populate_security_orchestration_policy_configuration_id.rb b/db/post_migrate/20220907122648_populate_security_orchestration_policy_configuration_id.rb deleted file mode 100644 index 441113c0ba30..000000000000 --- a/db/post_migrate/20220907122648_populate_security_orchestration_policy_configuration_id.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -class PopulateSecurityOrchestrationPolicyConfigurationId < Gitlab::Database::Migration[2.0] - restrict_gitlab_migration gitlab_schema: :gitlab_main - - BATCH_SIZE = 1000 - SUB_BATCH_SIZE = 500 - MERGE_REQUEST_MIGRATION = 'PopulateApprovalMergeRequestRulesWithSecurityOrchestration' - PROJECT_MIGRATION = 'PopulateApprovalProjectRulesWithSecurityOrchestration' - INTERVAL = 2.minutes - - def up - return unless Gitlab.ee? - - 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/20220908125146_remove_free_user_cap_remediation_worker.rb b/db/post_migrate/20220908125146_remove_free_user_cap_remediation_worker.rb deleted file mode 100644 index e95ea9c58b4a..000000000000 --- a/db/post_migrate/20220908125146_remove_free_user_cap_remediation_worker.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class RemoveFreeUserCapRemediationWorker < Gitlab::Database::Migration[2.0] - def up - Sidekiq::Cron::Job.find('free_user_cap_data_remediation')&.destroy - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20220909114220_drop_environments_project_name_lower_pattern_ops_index.rb b/db/post_migrate/20220909114220_drop_environments_project_name_lower_pattern_ops_index.rb deleted file mode 100644 index 3ab718090398..000000000000 --- a/db/post_migrate/20220909114220_drop_environments_project_name_lower_pattern_ops_index.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -# reverts db/migrate/20220901131828_add_environments_project_name_lower_pattern_ops_index.rb -class DropEnvironmentsProjectNameLowerPatternOpsIndex < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_environments_on_project_name_varchar_pattern_ops' - - def up - remove_concurrent_index_by_name :environments, INDEX_NAME - end - - def down - add_concurrent_index :environments, 'project_id, lower(name) varchar_pattern_ops', name: INDEX_NAME - end -end diff --git a/db/post_migrate/20220912085047_add_index_to_todos_pending_query.rb b/db/post_migrate/20220912085047_add_index_to_todos_pending_query.rb deleted file mode 100644 index 7d7214214631..000000000000 --- a/db/post_migrate/20220912085047_add_index_to_todos_pending_query.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToTodosPendingQuery < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_on_todos_user_project_target_and_state' - COLUMNS = %i[user_id project_id target_type target_id id].freeze - - def up - add_concurrent_index :todos, COLUMNS, name: INDEX_NAME, where: "state = 'pending'" - end - - def down - remove_concurrent_index_by_name :todos, INDEX_NAME - end -end diff --git a/db/post_migrate/20220912110433_prepare_create_internal_notes_index_on_id.rb b/db/post_migrate/20220912110433_prepare_create_internal_notes_index_on_id.rb deleted file mode 100644 index 241bdfa47155..000000000000 --- a/db/post_migrate/20220912110433_prepare_create_internal_notes_index_on_id.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class PrepareCreateInternalNotesIndexOnId < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'index_notes_on_id_where_internal' - - def up - prepare_async_index :notes, :id, where: 'internal = true', name: INDEX_NAME - end - - def down - unprepare_async_index_by_name :notes, INDEX_NAME - end -end diff --git a/db/post_migrate/20220913030552_add_tmp_index_system_note_metadata_on_attention_request_actions.rb b/db/post_migrate/20220913030552_add_tmp_index_system_note_metadata_on_attention_request_actions.rb deleted file mode 100644 index 3418dabc0e92..000000000000 --- a/db/post_migrate/20220913030552_add_tmp_index_system_note_metadata_on_attention_request_actions.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddTmpIndexSystemNoteMetadataOnAttentionRequestActions < Gitlab::Database::Migration[2.0] - INDEX_NAME = "tmp_index_system_note_metadata_on_attention_request_actions" - - disable_ddl_transaction! - - def up - add_concurrent_index :system_note_metadata, [:id], - where: "action IN ('attention_requested', 'attention_request_removed')", - name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :system_note_metadata, INDEX_NAME - end -end diff --git a/db/post_migrate/20220913030624_cleanup_attention_request_related_system_notes.rb b/db/post_migrate/20220913030624_cleanup_attention_request_related_system_notes.rb deleted file mode 100644 index b7d6908696b1..000000000000 --- a/db/post_migrate/20220913030624_cleanup_attention_request_related_system_notes.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class CleanupAttentionRequestRelatedSystemNotes < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - restrict_gitlab_migration gitlab_schema: :gitlab_main - - BATCH_SIZE = 100 - - class SystemNoteMetadata < MigrationRecord - include EachBatch - - self.table_name = 'system_note_metadata' - end - - class Note < MigrationRecord - self.table_name = 'notes' - end - - def up - SystemNoteMetadata - .where(action: %w[attention_requested attention_request_removed]) - .each_batch(of: BATCH_SIZE) do |batch| - Note.where(id: batch.pluck(:note_id)).delete_all - end - end - - def down - # no op - end -end diff --git a/db/post_migrate/20220913083015_clean_up_rename_iterations_cadences_last_run_date_to_next_run_date.rb b/db/post_migrate/20220913083015_clean_up_rename_iterations_cadences_last_run_date_to_next_run_date.rb deleted file mode 100644 index 7618e1841bde..000000000000 --- a/db/post_migrate/20220913083015_clean_up_rename_iterations_cadences_last_run_date_to_next_run_date.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class CleanUpRenameIterationsCadencesLastRunDateToNextRunDate < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - cleanup_concurrent_column_rename :iterations_cadences, :last_run_date, :next_run_date - end - - def down - undo_cleanup_concurrent_column_rename :iterations_cadences, :last_run_date, :next_run_date - end -end diff --git a/db/post_migrate/20220914093408_add_unique_id_partition_id_index_to_ci_build_metadata.rb b/db/post_migrate/20220914093408_add_unique_id_partition_id_index_to_ci_build_metadata.rb deleted file mode 100644 index 1f40118c809e..000000000000 --- a/db/post_migrate/20220914093408_add_unique_id_partition_id_index_to_ci_build_metadata.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -class AddUniqueIdPartitionIdIndexToCiBuildMetadata < Gitlab::Database::Migration[2.0] - TABLE_NAME = :ci_builds_metadata - INDEX_NAME = :index_ci_builds_metadata_on_id_partition_id_unique - - def up - prepare_async_index(TABLE_NAME, %i[id partition_id], unique: true, name: INDEX_NAME) - end - - def down - unprepare_async_index(:ci_builds_metadata, %i[id partition_id], name: INDEX_NAME) - end -end diff --git a/db/post_migrate/20220915103831_add_unique_build_id_partition_id_index_to_ci_build_metadata.rb b/db/post_migrate/20220915103831_add_unique_build_id_partition_id_index_to_ci_build_metadata.rb deleted file mode 100644 index 74b603900578..000000000000 --- a/db/post_migrate/20220915103831_add_unique_build_id_partition_id_index_to_ci_build_metadata.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -class AddUniqueBuildIdPartitionIdIndexToCiBuildMetadata < Gitlab::Database::Migration[2.0] - TABLE_NAME = :ci_builds_metadata - INDEX_NAME = :index_ci_builds_metadata_on_build_id_partition_id_unique - - def up - prepare_async_index(TABLE_NAME, %i[build_id partition_id], unique: true, name: INDEX_NAME) - end - - def down - unprepare_async_index(:ci_builds_metadata, %i[build_id partition_id], name: INDEX_NAME) - end -end diff --git a/db/post_migrate/20220915192521_prepare_async_trigram_index_for_vulnerability_reads_container_images.rb b/db/post_migrate/20220915192521_prepare_async_trigram_index_for_vulnerability_reads_container_images.rb deleted file mode 100644 index 18ed1b2cd2b0..000000000000 --- a/db/post_migrate/20220915192521_prepare_async_trigram_index_for_vulnerability_reads_container_images.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class PrepareAsyncTrigramIndexForVulnerabilityReadsContainerImages < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_vulnerability_reads_on_location_image_trigram' - REPORT_TYPES = { container_scanning: 2, cluster_image_scanning: 7 }.freeze - - def up - prepare_async_index :vulnerability_reads, :location_image, - name: INDEX_NAME, - using: :gin, opclass: { location_image: :gin_trgm_ops }, - where: "report_type = ANY (ARRAY[#{REPORT_TYPES.values.join(', ')}]) AND location_image IS NOT NULL" - end - - def down - unprepare_async_index :vulnerability_reads, :location_image, name: INDEX_NAME - end -end diff --git a/db/post_migrate/20220916054103_remove_experience_level_column.rb b/db/post_migrate/20220916054103_remove_experience_level_column.rb deleted file mode 100644 index dff5a9a6580f..000000000000 --- a/db/post_migrate/20220916054103_remove_experience_level_column.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class RemoveExperienceLevelColumn < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def up - remove_column :user_preferences, :experience_level - end - - def down - add_column :user_preferences, :experience_level, :integer, limit: 2 - end -end diff --git a/db/post_migrate/20220916065418_add_index_id_partition_id_to_ci_builds_metadata.rb b/db/post_migrate/20220916065418_add_index_id_partition_id_to_ci_builds_metadata.rb deleted file mode 100644 index c781f2a9ef9c..000000000000 --- a/db/post_migrate/20220916065418_add_index_id_partition_id_to_ci_builds_metadata.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class AddIndexIdPartitionIdToCiBuildsMetadata < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - TABLE_NAME = :ci_builds_metadata - INDEX_NAME = :index_ci_builds_metadata_on_id_partition_id_unique - - def up - add_concurrent_index(TABLE_NAME, %i[id partition_id], 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/20220916070101_add_index_build_id_partition_id_to_ci_build_metadata.rb b/db/post_migrate/20220916070101_add_index_build_id_partition_id_to_ci_build_metadata.rb deleted file mode 100644 index 18c24c47325a..000000000000 --- a/db/post_migrate/20220916070101_add_index_build_id_partition_id_to_ci_build_metadata.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class AddIndexBuildIdPartitionIdToCiBuildMetadata < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - TABLE_NAME = :ci_builds_metadata - INDEX_NAME = :index_ci_builds_metadata_on_build_id_partition_id_unique - - def up - add_concurrent_index(TABLE_NAME, %i[build_id partition_id], 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/20220916112841_remove_unused_aggregation_columns.rb b/db/post_migrate/20220916112841_remove_unused_aggregation_columns.rb deleted file mode 100644 index f5333c840429..000000000000 --- a/db/post_migrate/20220916112841_remove_unused_aggregation_columns.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -class RemoveUnusedAggregationColumns < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - with_lock_retries do - remove_column :analytics_cycle_analytics_aggregations, :last_full_run_processed_records - remove_column :analytics_cycle_analytics_aggregations, :last_full_run_runtimes_in_seconds - remove_column :analytics_cycle_analytics_aggregations, :last_full_run_issues_updated_at - remove_column :analytics_cycle_analytics_aggregations, :last_full_run_mrs_updated_at - remove_column :analytics_cycle_analytics_aggregations, :last_full_run_issues_id - remove_column :analytics_cycle_analytics_aggregations, :last_full_run_merge_requests_id - end - end - - def down - with_lock_retries do - add_column(:analytics_cycle_analytics_aggregations, - :last_full_run_processed_records, - :integer, - array: true, - default: [], - null: false, - if_not_exists: true) - add_column(:analytics_cycle_analytics_aggregations, - :last_full_run_runtimes_in_seconds, - :integer, - array: true, - default: [], - null: false, - if_not_exists: true) - add_column(:analytics_cycle_analytics_aggregations, - :last_full_run_issues_updated_at, - :datetime_with_timezone, - if_not_exists: true) - add_column(:analytics_cycle_analytics_aggregations, - :last_full_run_mrs_updated_at, - :datetime_with_timezone, - if_not_exists: true) - add_column(:analytics_cycle_analytics_aggregations, - :last_full_run_issues_id, - :integer, - if_not_exists: true) - add_column(:analytics_cycle_analytics_aggregations, - :last_full_run_merge_requests_id, - :integer, - if_not_exists: true) - end - - add_check_constraint(:analytics_cycle_analytics_aggregations, - 'CARDINALITY(last_full_run_runtimes_in_seconds) <= 10', - 'chk_rails_7810292ec9') - - add_check_constraint(:analytics_cycle_analytics_aggregations, - 'CARDINALITY(last_full_run_processed_records) <= 10', - 'chk_rails_8b9e89687c') - end -end diff --git a/db/post_migrate/20220919023208_drop_unused_fields_from_merge_request_assignees.rb b/db/post_migrate/20220919023208_drop_unused_fields_from_merge_request_assignees.rb deleted file mode 100644 index f1afbb418933..000000000000 --- a/db/post_migrate/20220919023208_drop_unused_fields_from_merge_request_assignees.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -class DropUnusedFieldsFromMergeRequestAssignees < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - with_lock_retries do - if column_exists?(:merge_request_assignees, :state) # rubocop:disable Style/IfUnlessModifier - remove_column :merge_request_assignees, :state - end - - if column_exists?(:merge_request_assignees, :updated_state_by_user_id) - remove_column :merge_request_assignees, :updated_state_by_user_id - end - end - end - - def down - with_lock_retries do - unless column_exists?(:merge_request_assignees, :state) - add_column :merge_request_assignees, :state, :smallint, default: 0, null: false - end - - unless column_exists?(:merge_request_assignees, :updated_state_by_user_id) - add_column :merge_request_assignees, :updated_state_by_user_id, :bigint - end - end - - add_concurrent_index :merge_request_assignees, [:user_id, :state], - where: 'state = 2', - name: 'index_on_merge_request_assignees_user_id_and_state' - - add_concurrent_index :merge_request_assignees, :updated_state_by_user_id, - name: 'index_on_merge_request_assignees_updated_state_by_user_id' - - add_concurrent_foreign_key :merge_request_assignees, :users, - column: :updated_state_by_user_id, - on_delete: :nullify - end -end diff --git a/db/post_migrate/20220919041604_drop_unused_fields_from_merge_request_reviewers.rb b/db/post_migrate/20220919041604_drop_unused_fields_from_merge_request_reviewers.rb deleted file mode 100644 index d9f98557f752..000000000000 --- a/db/post_migrate/20220919041604_drop_unused_fields_from_merge_request_reviewers.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -class DropUnusedFieldsFromMergeRequestReviewers < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - with_lock_retries do - if column_exists?(:merge_request_reviewers, :updated_state_by_user_id) - remove_column :merge_request_reviewers, :updated_state_by_user_id - end - end - end - - def down - with_lock_retries do - unless column_exists?(:merge_request_reviewers, :updated_state_by_user_id) - add_column :merge_request_reviewers, :updated_state_by_user_id, :bigint - end - end - - add_concurrent_index :merge_request_reviewers, :updated_state_by_user_id, - name: 'index_on_merge_request_reviewers_updated_state_by_user_id' - - add_concurrent_foreign_key :merge_request_reviewers, :users, column: :updated_state_by_user_id, on_delete: :nullify - end -end diff --git a/db/post_migrate/20220919050555_drop_tmp_index_user_callouts_on_attention_request_feature_names.rb b/db/post_migrate/20220919050555_drop_tmp_index_user_callouts_on_attention_request_feature_names.rb deleted file mode 100644 index e456a91fe3f5..000000000000 --- a/db/post_migrate/20220919050555_drop_tmp_index_user_callouts_on_attention_request_feature_names.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class DropTmpIndexUserCalloutsOnAttentionRequestFeatureNames < Gitlab::Database::Migration[2.0] - INDEX_NAME = "tmp_index_user_callouts_on_attention_request_feature_names" - ATTENTION_REQUEST_CALLOUTS = [47, 48] - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :user_callouts, INDEX_NAME - end - - def down - add_concurrent_index :user_callouts, [:id], - where: "feature_name IN (#{ATTENTION_REQUEST_CALLOUTS.join(',')})", - name: INDEX_NAME - end -end diff --git a/db/post_migrate/20220919080303_delete_migrate_shared_vulnerability_scanners.rb b/db/post_migrate/20220919080303_delete_migrate_shared_vulnerability_scanners.rb deleted file mode 100644 index 4aedfcf16994..000000000000 --- a/db/post_migrate/20220919080303_delete_migrate_shared_vulnerability_scanners.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true - -class DeleteMigrateSharedVulnerabilityScanners < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - restrict_gitlab_migration gitlab_schema: :gitlab_main - - MIGRATION = "MigrateSharedVulnerabilityScanners" - TABLE_NAME = :vulnerability_occurrences - BATCH_COLUMN = :id - BATCH_SIZE = 250 - - class BatchedBackgroundMigration < MigrationRecord - self.table_name = "batched_background_migrations" - end - - class BatchedBackgroundMigrationJob < MigrationRecord - include ::EachBatch - - self.table_name = "batched_background_migration_jobs" - - belongs_to :batched_background_migration - end - - def up - return unless migration_id = BatchedBackgroundMigration.find_by(job_class_name: MIGRATION)&.id - - # rubocop:disable Style/SymbolProc - BatchedBackgroundMigrationJob - .where(batched_background_migration_id: migration_id) - .each_batch(of: BATCH_SIZE) do |relation| - relation.delete_all - end - # rubocop:enable Style/SymbolProc - - delete_batched_background_migration(MIGRATION, - TABLE_NAME, - BATCH_COLUMN, - []) - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20220919080304_reschedule_migrate_shared_vulnerability_scanners.rb b/db/post_migrate/20220919080304_reschedule_migrate_shared_vulnerability_scanners.rb deleted file mode 100644 index 697570855876..000000000000 --- a/db/post_migrate/20220919080304_reschedule_migrate_shared_vulnerability_scanners.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class RescheduleMigrateSharedVulnerabilityScanners < Gitlab::Database::Migration[2.0] - MIGRATION = "MigrateSharedVulnerabilityScanners" - TABLE_NAME = :vulnerability_occurrences - BATCH_COLUMN = :id - DELAY_INTERVAL = 5.minutes - BATCH_SIZE = 1000 - SUB_BATCH_SIZE = 100 - - disable_ddl_transaction! - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - queue_batched_background_migration( - MIGRATION, - TABLE_NAME, - BATCH_COLUMN, - job_interval: DELAY_INTERVAL, - batch_size: BATCH_SIZE, - max_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/20220920081631_prepare_ci_builds_metadata_for_partitioning_primary_key.rb b/db/post_migrate/20220920081631_prepare_ci_builds_metadata_for_partitioning_primary_key.rb deleted file mode 100644 index 907271786242..000000000000 --- a/db/post_migrate/20220920081631_prepare_ci_builds_metadata_for_partitioning_primary_key.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true - -class PrepareCiBuildsMetadataForPartitioningPrimaryKey < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - TABLE_NAME = 'ci_builds_metadata' - PRIMARY_KEY = 'ci_builds_metadata_pkey' - NEW_INDEX_NAME = 'index_ci_builds_metadata_on_id_partition_id_unique' - OLD_INDEX_NAME = 'index_ci_builds_metadata_on_id_unique' - - def up - with_lock_retries(raise_on_exhaustion: true) do - execute("ALTER TABLE #{TABLE_NAME} DROP CONSTRAINT #{PRIMARY_KEY} CASCADE") - - rename_index(TABLE_NAME, NEW_INDEX_NAME, PRIMARY_KEY) - - execute("ALTER TABLE #{TABLE_NAME} ADD CONSTRAINT #{PRIMARY_KEY} " \ - "PRIMARY KEY USING INDEX #{PRIMARY_KEY}") - end - end - - # rolling back this migration is time consuming with the creation of these two indexes - def down - add_concurrent_index(TABLE_NAME, :id, unique: true, name: OLD_INDEX_NAME) - add_concurrent_index(TABLE_NAME, [:id, :partition_id], unique: true, name: NEW_INDEX_NAME) - - with_lock_retries(raise_on_exhaustion: true) do - execute("ALTER TABLE #{TABLE_NAME} DROP CONSTRAINT #{PRIMARY_KEY} CASCADE") - - rename_index(TABLE_NAME, OLD_INDEX_NAME, PRIMARY_KEY) - - execute("ALTER TABLE #{TABLE_NAME} ADD CONSTRAINT #{PRIMARY_KEY} " \ - "PRIMARY KEY USING INDEX #{PRIMARY_KEY}") - end - end -end diff --git a/db/post_migrate/20220920122121_schedule_index_removal_for_ci_builds_metadata.rb b/db/post_migrate/20220920122121_schedule_index_removal_for_ci_builds_metadata.rb deleted file mode 100644 index 57475a08c933..000000000000 --- a/db/post_migrate/20220920122121_schedule_index_removal_for_ci_builds_metadata.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class ScheduleIndexRemovalForCiBuildsMetadata < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - TABLE_NAME = :ci_builds_metadata - INDEX_NAME = :index_ci_builds_metadata_on_build_id - - def up - prepare_async_index_removal(TABLE_NAME, :build_id, name: INDEX_NAME) - end - - def down - unprepare_async_index(TABLE_NAME, :build_id, name: INDEX_NAME) - end -end diff --git a/db/post_migrate/20220920124709_backfill_internal_on_notes_renamed.rb b/db/post_migrate/20220920124709_backfill_internal_on_notes_renamed.rb deleted file mode 100644 index a9de69243f65..000000000000 --- a/db/post_migrate/20220920124709_backfill_internal_on_notes_renamed.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Renamed from BackfillInternalOnNotes to BackfillInternalOnNotesRenamed to avoid collision with an Elasticsearch -# migration from the same name. See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/129012 -class BackfillInternalOnNotesRenamed < Gitlab::Database::Migration[2.0] - MIGRATION = 'BackfillInternalOnNotes' - DELAY_INTERVAL = 2.minutes - TABLE = :notes - BATCH_SIZE = 2000 - SUB_BATCH_SIZE = 10 - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - queue_batched_background_migration( - MIGRATION, - TABLE, - :id, - job_interval: DELAY_INTERVAL, - batch_size: BATCH_SIZE, - sub_batch_size: SUB_BATCH_SIZE - ) - end - - def down - delete_batched_background_migration(MIGRATION, TABLE, :id, []) - end -end diff --git a/db/post_migrate/20220920135356_tiebreak_user_type_index.rb b/db/post_migrate/20220920135356_tiebreak_user_type_index.rb deleted file mode 100644 index 489196c8eab6..000000000000 --- a/db/post_migrate/20220920135356_tiebreak_user_type_index.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class TiebreakUserTypeIndex < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - NEW_INDEX_NAME = 'index_users_on_user_type_and_id' - OLD_INDEX_NAME = 'index_users_on_user_type' - - def up - # rubocop:disable Migration/PreventIndexCreation - add_concurrent_index :users, [:user_type, :id], name: NEW_INDEX_NAME - # rubocop:enable Migration/PreventIndexCreation - remove_concurrent_index_by_name :users, OLD_INDEX_NAME - end - - def down - add_concurrent_index :users, :user_type, name: OLD_INDEX_NAME - remove_concurrent_index_by_name :users, NEW_INDEX_NAME - end -end diff --git a/db/post_migrate/20220920141001_add_index_on_internal_notes.rb b/db/post_migrate/20220920141001_add_index_on_internal_notes.rb deleted file mode 100644 index 466ad7b5a8dd..000000000000 --- a/db/post_migrate/20220920141001_add_index_on_internal_notes.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnInternalNotes < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'index_notes_on_id_where_internal' - - disable_ddl_transaction! - - def up - add_concurrent_index :notes, :id, where: 'internal = true', name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :notes, INDEX_NAME - end -end diff --git a/db/post_migrate/20220920213504_finalize_task_system_note_renaming.rb b/db/post_migrate/20220920213504_finalize_task_system_note_renaming.rb deleted file mode 100644 index d9307c14ccbd..000000000000 --- a/db/post_migrate/20220920213504_finalize_task_system_note_renaming.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class FinalizeTaskSystemNoteRenaming < Gitlab::Database::Migration[2.0] - def up - # no-op - end - - def down - # noop - end -end diff --git a/db/post_migrate/20220920214524_remove_task_system_note_rename_temp_index.rb b/db/post_migrate/20220920214524_remove_task_system_note_rename_temp_index.rb deleted file mode 100644 index d3671d245786..000000000000 --- a/db/post_migrate/20220920214524_remove_task_system_note_rename_temp_index.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class RemoveTaskSystemNoteRenameTempIndex < Gitlab::Database::Migration[2.0] - def up - # no-op - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20220921093355_schedule_backfill_namespace_details.rb b/db/post_migrate/20220921093355_schedule_backfill_namespace_details.rb deleted file mode 100644 index 16ce9bd5c858..000000000000 --- a/db/post_migrate/20220921093355_schedule_backfill_namespace_details.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class ScheduleBackfillNamespaceDetails < Gitlab::Database::Migration[2.0] - MIGRATION = 'BackfillNamespaceDetails' - 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, - :namespaces, - :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, :namespaces, :id, []) - end -end diff --git a/db/post_migrate/20220921111823_remove_and_add_ci_pipeline_variables_raw_with_new_default.rb b/db/post_migrate/20220921111823_remove_and_add_ci_pipeline_variables_raw_with_new_default.rb deleted file mode 100644 index fd56a8f320af..000000000000 --- a/db/post_migrate/20220921111823_remove_and_add_ci_pipeline_variables_raw_with_new_default.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -class RemoveAndAddCiPipelineVariablesRawWithNewDefault < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - remove_column :ci_pipeline_variables, :raw, :boolean, null: false, default: true - add_column :ci_pipeline_variables, :raw, :boolean, null: false, default: false - end -end diff --git a/db/post_migrate/20220921111831_remove_and_add_ci_group_variables_raw_with_new_default.rb b/db/post_migrate/20220921111831_remove_and_add_ci_group_variables_raw_with_new_default.rb deleted file mode 100644 index f4b7de3faf41..000000000000 --- a/db/post_migrate/20220921111831_remove_and_add_ci_group_variables_raw_with_new_default.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -class RemoveAndAddCiGroupVariablesRawWithNewDefault < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - remove_column :ci_group_variables, :raw, :boolean, null: false, default: true - add_column :ci_group_variables, :raw, :boolean, null: false, default: false - end -end diff --git a/db/post_migrate/20220921111840_remove_and_add_ci_instance_variables_raw_with_new_default.rb b/db/post_migrate/20220921111840_remove_and_add_ci_instance_variables_raw_with_new_default.rb deleted file mode 100644 index 019db1bbaa35..000000000000 --- a/db/post_migrate/20220921111840_remove_and_add_ci_instance_variables_raw_with_new_default.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -class RemoveAndAddCiInstanceVariablesRawWithNewDefault < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - remove_column :ci_instance_variables, :raw, :boolean, null: false, default: true - add_column :ci_instance_variables, :raw, :boolean, null: false, default: false - end -end diff --git a/db/post_migrate/20220921111849_remove_and_add_ci_job_variables_raw_with_new_default.rb b/db/post_migrate/20220921111849_remove_and_add_ci_job_variables_raw_with_new_default.rb deleted file mode 100644 index 736cd46382d9..000000000000 --- a/db/post_migrate/20220921111849_remove_and_add_ci_job_variables_raw_with_new_default.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -class RemoveAndAddCiJobVariablesRawWithNewDefault < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - remove_column :ci_job_variables, :raw, :boolean, null: false, default: true - add_column :ci_job_variables, :raw, :boolean, null: false, default: false - end -end diff --git a/db/post_migrate/20220921111857_remove_and_add_ci_pipeline_schedule_variables_raw_with_new_default.rb b/db/post_migrate/20220921111857_remove_and_add_ci_pipeline_schedule_variables_raw_with_new_default.rb deleted file mode 100644 index 159b0303d715..000000000000 --- a/db/post_migrate/20220921111857_remove_and_add_ci_pipeline_schedule_variables_raw_with_new_default.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -class RemoveAndAddCiPipelineScheduleVariablesRawWithNewDefault < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - remove_column :ci_pipeline_schedule_variables, :raw, :boolean, null: false, default: true - add_column :ci_pipeline_schedule_variables, :raw, :boolean, null: false, default: false - end -end diff --git a/db/post_migrate/20220921111907_remove_and_add_ci_variables_raw_with_new_default.rb b/db/post_migrate/20220921111907_remove_and_add_ci_variables_raw_with_new_default.rb deleted file mode 100644 index 129e5b1f0209..000000000000 --- a/db/post_migrate/20220921111907_remove_and_add_ci_variables_raw_with_new_default.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -class RemoveAndAddCiVariablesRawWithNewDefault < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - remove_column :ci_variables, :raw, :boolean, null: false, default: true - add_column :ci_variables, :raw, :boolean, null: false, default: false - end -end diff --git a/db/post_migrate/20220921144258_remove_orphan_group_token_users.rb b/db/post_migrate/20220921144258_remove_orphan_group_token_users.rb deleted file mode 100644 index a2483f611a32..000000000000 --- a/db/post_migrate/20220921144258_remove_orphan_group_token_users.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -class RemoveOrphanGroupTokenUsers < Gitlab::Database::Migration[2.0] - restrict_gitlab_migration gitlab_schema: :gitlab_main - - disable_ddl_transaction! - - class MigrationUser < MigrationRecord - include EachBatch - - self.table_name = 'users' - - scope :project_bots, -> { where(user_type: 6) } - scope :without_memberships, -> { where("NOT EXISTS (SELECT 1 FROM members where members.user_id = users.id)") } - end - - class MigrationPersonalAccessToken < MigrationRecord - self.table_name = 'personal_access_tokens' - end - - def up - delete_worker = 'DeleteUserWorker'.safe_constantize - - MigrationUser.project_bots.each_batch(of: 1000) do |batch| - bot_ids = batch.without_memberships.pluck(:id) - - MigrationPersonalAccessToken.where(user_id: bot_ids).delete_all - - next unless delete_worker && delete_worker.respond_to?(:perform_async) - - bot_ids.each do |bot_id| - delete_worker.perform_async(bot_id, bot_id, skip_authorization: true) - end - end - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20220922090236_remove_trace_column_from_ci_builds.rb b/db/post_migrate/20220922090236_remove_trace_column_from_ci_builds.rb deleted file mode 100644 index e1871a9799f7..000000000000 --- a/db/post_migrate/20220922090236_remove_trace_column_from_ci_builds.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class RemoveTraceColumnFromCiBuilds < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - remove_column :ci_builds, :trace, :text - end -end diff --git a/db/post_migrate/20220922143143_schedule_reset_duplicate_ci_runners_token_values.rb b/db/post_migrate/20220922143143_schedule_reset_duplicate_ci_runners_token_values.rb deleted file mode 100644 index fd02bda8004a..000000000000 --- a/db/post_migrate/20220922143143_schedule_reset_duplicate_ci_runners_token_values.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -class ScheduleResetDuplicateCiRunnersTokenValues < Gitlab::Database::Migration[2.0] - restrict_gitlab_migration gitlab_schema: :gitlab_ci - disable_ddl_transaction! - - MIGRATION = 'ResetDuplicateCiRunnersTokenValues' - DELAY_INTERVAL = 2.minutes - BATCH_SIZE = 2_000 - MAX_BATCH_SIZE = 100_000 - SUB_BATCH_SIZE = 500 - - def up - queue_batched_background_migration( - MIGRATION, - :ci_runners, - :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_runners, :id, []) - end -end diff --git a/db/post_migrate/20220922143634_schedule_reset_duplicate_ci_runners_token_encrypted_values.rb b/db/post_migrate/20220922143634_schedule_reset_duplicate_ci_runners_token_encrypted_values.rb deleted file mode 100644 index bbbf9a1db447..000000000000 --- a/db/post_migrate/20220922143634_schedule_reset_duplicate_ci_runners_token_encrypted_values.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -class ScheduleResetDuplicateCiRunnersTokenEncryptedValues < Gitlab::Database::Migration[2.0] - restrict_gitlab_migration gitlab_schema: :gitlab_ci - disable_ddl_transaction! - - MIGRATION = 'ResetDuplicateCiRunnersTokenEncryptedValues' - DELAY_INTERVAL = 2.minutes - BATCH_SIZE = 2_000 - MAX_BATCH_SIZE = 100_000 - SUB_BATCH_SIZE = 500 - - def up - queue_batched_background_migration( - MIGRATION, - :ci_runners, - :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_runners, :id, []) - end -end diff --git a/db/post_migrate/20220922204106_remove_index_for_requested_non_invited_awaiting_members.rb b/db/post_migrate/20220922204106_remove_index_for_requested_non_invited_awaiting_members.rb deleted file mode 100644 index 033b04a75f81..000000000000 --- a/db/post_migrate/20220922204106_remove_index_for_requested_non_invited_awaiting_members.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class RemoveIndexForRequestedNonInvitedAwaitingMembers < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'index_members_on_non_requested_non_invited_and_state_awaiting' - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :members, INDEX_NAME - end - - def down - clause = '((requested_at IS NULL) AND (invite_token IS NULL) AND (access_level > 5) AND (state = 1))' - - add_concurrent_index :members, :source_id, where: clause, name: INDEX_NAME - end -end diff --git a/db/post_migrate/20220923052531_remove_tmp_index_merge_request_reviewers_on_attention_requested_state.rb b/db/post_migrate/20220923052531_remove_tmp_index_merge_request_reviewers_on_attention_requested_state.rb deleted file mode 100644 index 27d9c1641bc8..000000000000 --- a/db/post_migrate/20220923052531_remove_tmp_index_merge_request_reviewers_on_attention_requested_state.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class RemoveTmpIndexMergeRequestReviewersOnAttentionRequestedState < Gitlab::Database::Migration[2.0] - INDEX_NAME = "tmp_index_merge_request_reviewers_on_attention_requested_state" - ATTENTION_REQUESTED_STATE = 2 - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :merge_request_reviewers, INDEX_NAME - end - - def down - add_concurrent_index :merge_request_reviewers, [:id], - where: "state = #{ATTENTION_REQUESTED_STATE}", - name: INDEX_NAME - end -end diff --git a/db/post_migrate/20220923060226_remove_tmp_index_system_note_metadata_on_attention_request_actions.rb b/db/post_migrate/20220923060226_remove_tmp_index_system_note_metadata_on_attention_request_actions.rb deleted file mode 100644 index 40e8c1cfdb54..000000000000 --- a/db/post_migrate/20220923060226_remove_tmp_index_system_note_metadata_on_attention_request_actions.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class RemoveTmpIndexSystemNoteMetadataOnAttentionRequestActions < Gitlab::Database::Migration[2.0] - INDEX_NAME = "tmp_index_system_note_metadata_on_attention_request_actions" - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :system_note_metadata, INDEX_NAME - end - - def down - add_concurrent_index :system_note_metadata, [:id], - where: "action IN ('attention_requested', 'attention_request_removed')", - name: INDEX_NAME - end -end diff --git a/db/post_migrate/20220927171740_prepare_for_vulnerability_occurrences_uuid_type_transition.rb b/db/post_migrate/20220927171740_prepare_for_vulnerability_occurrences_uuid_type_transition.rb deleted file mode 100644 index e6f3384514d1..000000000000 --- a/db/post_migrate/20220927171740_prepare_for_vulnerability_occurrences_uuid_type_transition.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -class PrepareForVulnerabilityOccurrencesUuidTypeTransition < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - TABLE = :vulnerability_occurrences - MAPPINGS = { - uuid: { - from_type: :string, - to_type: :uuid, - default_value: '00000000-0000-0000-0000-000000000000' - } - } - - def up - create_temporary_columns_and_triggers(TABLE, MAPPINGS) - end - - def down - columns = MAPPINGS.keys - temporary_columns = columns.map { |column| convert_to_type_column(column, :string, :uuid) } - trigger_name = rename_trigger_name(TABLE, columns, temporary_columns) - remove_rename_triggers(TABLE, trigger_name) - temporary_columns.each { |column| remove_column(TABLE, column) } - end -end diff --git a/db/post_migrate/20220928225711_schedule_update_ci_pipeline_artifacts_locked_status.rb b/db/post_migrate/20220928225711_schedule_update_ci_pipeline_artifacts_locked_status.rb deleted file mode 100644 index 0d7a5dc4becd..000000000000 --- a/db/post_migrate/20220928225711_schedule_update_ci_pipeline_artifacts_locked_status.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class ScheduleUpdateCiPipelineArtifactsLockedStatus < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - MIGRATION = 'UpdateCiPipelineArtifactsUnknownLockedStatus' - DELAY_INTERVAL = 2.minutes - BATCH_SIZE = 1_000 - SUB_BATCH_SIZE = 500 - - restrict_gitlab_migration gitlab_schema: :gitlab_ci - - def up - queue_batched_background_migration( - MIGRATION, - :ci_pipeline_artifacts, - :id, - job_interval: DELAY_INTERVAL, - batch_size: BATCH_SIZE, - sub_batch_size: SUB_BATCH_SIZE - ) - end - - def down - delete_batched_background_migration(MIGRATION, :ci_pipeline_artifacts, :id, []) - end -end diff --git a/db/post_migrate/20220929081645_tmp_idx_null_member_namespace_id.rb b/db/post_migrate/20220929081645_tmp_idx_null_member_namespace_id.rb deleted file mode 100644 index 58d6c653e6f7..000000000000 --- a/db/post_migrate/20220929081645_tmp_idx_null_member_namespace_id.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class TmpIdxNullMemberNamespaceId < Gitlab::Database::Migration[2.0] - TMP_INDEX_FOR_NULL_MEMBER_NAMESPACE_ID = 'tmp_index_for_null_member_namespace_id' - - disable_ddl_transaction! - - def up - add_concurrent_index :members, :member_namespace_id, - name: TMP_INDEX_FOR_NULL_MEMBER_NAMESPACE_ID, - where: 'member_namespace_id IS NULL' - end - - def down - remove_concurrent_index_by_name :members, name: TMP_INDEX_FOR_NULL_MEMBER_NAMESPACE_ID - end -end diff --git a/db/post_migrate/20220929091500_add_tmp_index_vulns_on_report_type.rb b/db/post_migrate/20220929091500_add_tmp_index_vulns_on_report_type.rb deleted file mode 100644 index 19100e1d0cc0..000000000000 --- a/db/post_migrate/20220929091500_add_tmp_index_vulns_on_report_type.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -class AddTmpIndexVulnsOnReportType < 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 - add_concurrent_index :vulnerabilities, :id, - where: "report_type IN (#{REPORT_TYPES.values.join(', ')})", - name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :vulnerabilities, INDEX_NAME - end -end diff --git a/db/post_migrate/20220929101947_delete_remove_invalid_member_migration.rb b/db/post_migrate/20220929101947_delete_remove_invalid_member_migration.rb deleted file mode 100644 index 6fb358e57ab1..000000000000 --- a/db/post_migrate/20220929101947_delete_remove_invalid_member_migration.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class DeleteRemoveInvalidMemberMigration < Gitlab::Database::Migration[2.0] - PROJECT_MEMBER_MIGRATION = 'ScheduleDestroyInvalidProjectMembers' - GROUP_MEMBER_MIGRATION = 'ScheduleDestroyInvalidGroupMembers' - - disable_ddl_transaction! - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - delete_batched_background_migration(PROJECT_MEMBER_MIGRATION, :members, :id, []) - delete_batched_background_migration(GROUP_MEMBER_MIGRATION, :members, :id, []) - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20220929194453_add_index_releases_project_id_id.rb b/db/post_migrate/20220929194453_add_index_releases_project_id_id.rb deleted file mode 100644 index 179b5a636f02..000000000000 --- a/db/post_migrate/20220929194453_add_index_releases_project_id_id.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddIndexReleasesProjectIdId < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'index_releases_on_project_id_id' - - disable_ddl_transaction! - - def up - add_concurrent_index :releases, %i[project_id id], name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :releases, name: INDEX_NAME - end -end diff --git a/db/post_migrate/20220929213730_schedule_delete_orphaned_operational_vulnerabilities.rb b/db/post_migrate/20220929213730_schedule_delete_orphaned_operational_vulnerabilities.rb deleted file mode 100644 index c03358b1fdad..000000000000 --- a/db/post_migrate/20220929213730_schedule_delete_orphaned_operational_vulnerabilities.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class ScheduleDeleteOrphanedOperationalVulnerabilities < Gitlab::Database::Migration[2.0] - MIGRATION = 'DeleteOrphanedOperationalVulnerabilities' - INTERVAL = 2.minutes - BATCH_SIZE = 10_000 - - 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 - ) - end - - def down - delete_batched_background_migration(MIGRATION, :vulnerabilities, :id, []) - end -end diff --git a/db/post_migrate/20220930110127_remove_unique_index_build_id_to_ci_builds_metadata.rb b/db/post_migrate/20220930110127_remove_unique_index_build_id_to_ci_builds_metadata.rb deleted file mode 100644 index 4c23cdc52845..000000000000 --- a/db/post_migrate/20220930110127_remove_unique_index_build_id_to_ci_builds_metadata.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class RemoveUniqueIndexBuildIdToCiBuildsMetadata < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - TABLE_NAME = :ci_builds_metadata - INDEX_NAME = :index_ci_builds_metadata_on_build_id - - def up - remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME) - end - - def down - add_concurrent_index(TABLE_NAME, :build_id, unique: true, name: INDEX_NAME) - end -end diff --git a/db/post_migrate/20221002234454_finalize_group_member_namespace_id_migration.rb b/db/post_migrate/20221002234454_finalize_group_member_namespace_id_migration.rb deleted file mode 100644 index 9c5ca6cbb422..000000000000 --- a/db/post_migrate/20221002234454_finalize_group_member_namespace_id_migration.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class FinalizeGroupMemberNamespaceIdMigration < Gitlab::Database::Migration[2.0] - MIGRATION = 'BackfillMemberNamespaceForGroupMembers' - disable_ddl_transaction! - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - ensure_batched_background_migration_is_finished( - job_class_name: MIGRATION, - table_name: :members, - column_name: :id, - job_arguments: [], - finalize: true - ) - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20221003192827_add_index_resolved_on_default_branch_to_vulnerabilities_read.rb b/db/post_migrate/20221003192827_add_index_resolved_on_default_branch_to_vulnerabilities_read.rb deleted file mode 100644 index e352e3241879..000000000000 --- a/db/post_migrate/20221003192827_add_index_resolved_on_default_branch_to_vulnerabilities_read.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexResolvedOnDefaultBranchToVulnerabilitiesRead < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_vuln_reads_on_resolved_on_default_branch' - COLUMNS = %i[project_id state id] - - def up - add_concurrent_index :vulnerability_reads, COLUMNS, - where: 'resolved_on_default_branch IS TRUE', - name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :vulnerability_reads, INDEX_NAME - end -end diff --git a/db/post_migrate/20221004074910_routing_table_prepare_constraint_for_builds_metadata.rb b/db/post_migrate/20221004074910_routing_table_prepare_constraint_for_builds_metadata.rb deleted file mode 100644 index 013984154ae1..000000000000 --- a/db/post_migrate/20221004074910_routing_table_prepare_constraint_for_builds_metadata.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -class RoutingTablePrepareConstraintForBuildsMetadata < Gitlab::Database::Migration[2.0] - include Gitlab::Database::PartitioningMigrationHelpers::TableManagementHelpers - - disable_ddl_transaction! - - TABLE_NAME = :ci_builds_metadata - PARENT_TABLE_NAME = :p_ci_builds_metadata - FIRST_PARTITION = 100 - PARTITION_COLUMN = :partition_id - - def up - prepare_constraint_for_list_partitioning( - table_name: TABLE_NAME, - partitioning_column: PARTITION_COLUMN, - parent_table_name: PARENT_TABLE_NAME, - initial_partitioning_value: FIRST_PARTITION - ) - end - - def down - revert_preparing_constraint_for_list_partitioning( - table_name: TABLE_NAME, - partitioning_column: PARTITION_COLUMN, - parent_table_name: PARENT_TABLE_NAME, - initial_partitioning_value: FIRST_PARTITION - ) - end -end diff --git a/db/post_migrate/20221004074914_create_routing_table_for_builds_metadata.rb b/db/post_migrate/20221004074914_create_routing_table_for_builds_metadata.rb deleted file mode 100644 index a792fc91d3d3..000000000000 --- a/db/post_migrate/20221004074914_create_routing_table_for_builds_metadata.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class CreateRoutingTableForBuildsMetadata < Gitlab::Database::Migration[2.0] - def up; end - - def down; end -end diff --git a/db/post_migrate/20221004092038_tmp_index_members_on_id_where_namespace_id_null.rb b/db/post_migrate/20221004092038_tmp_index_members_on_id_where_namespace_id_null.rb deleted file mode 100644 index 68a707e99c22..000000000000 --- a/db/post_migrate/20221004092038_tmp_index_members_on_id_where_namespace_id_null.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class TmpIndexMembersOnIdWhereNamespaceIdNull < Gitlab::Database::Migration[2.0] - TMP_INDEX = 'tmp_index_members_on_id_where_namespace_id_null' - - disable_ddl_transaction! - - def up - add_concurrent_index :members, :id, - name: TMP_INDEX, - where: 'member_namespace_id IS NULL' - end - - def down - remove_concurrent_index_by_name :members, name: TMP_INDEX - end -end diff --git a/db/post_migrate/20221004094814_schedule_destroy_invalid_members.rb b/db/post_migrate/20221004094814_schedule_destroy_invalid_members.rb deleted file mode 100644 index fa6a1fd5f72b..000000000000 --- a/db/post_migrate/20221004094814_schedule_destroy_invalid_members.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -class ScheduleDestroyInvalidMembers < Gitlab::Database::Migration[2.0] - MIGRATION = 'DestroyInvalidMembers' - DELAY_INTERVAL = 2.minutes - BATCH_SIZE = 1_000 - MAX_BATCH_SIZE = 10_000 - SUB_BATCH_SIZE = 200 - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - queue_batched_background_migration( - MIGRATION, - :members, - :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, :members, :id, []) - end -end diff --git a/db/post_migrate/20221005103000_add_index_merge_request_id_on_scan_finding_approval_merge_request_rules.rb b/db/post_migrate/20221005103000_add_index_merge_request_id_on_scan_finding_approval_merge_request_rules.rb deleted file mode 100644 index 06bf21b894a3..000000000000 --- a/db/post_migrate/20221005103000_add_index_merge_request_id_on_scan_finding_approval_merge_request_rules.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexMergeRequestIdOnScanFindingApprovalMergeRequestRules < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'scan_finding_approval_mr_rule_index_merge_request_id' - SCAN_FINDING_REPORT_TYPE = 4 - - disable_ddl_transaction! - - def up - add_concurrent_index :approval_merge_request_rules, :merge_request_id, - 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/20221006070927_finalize_invalid_member_cleanup.rb b/db/post_migrate/20221006070927_finalize_invalid_member_cleanup.rb deleted file mode 100644 index 78786e46f5cd..000000000000 --- a/db/post_migrate/20221006070927_finalize_invalid_member_cleanup.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class FinalizeInvalidMemberCleanup < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - MIGRATION = 'DestroyInvalidMembers' - - def up - ensure_batched_background_migration_is_finished( - job_class_name: MIGRATION, - table_name: :members, - column_name: :id, - job_arguments: [] - ) - end - - def down - # noop - end -end diff --git a/db/post_migrate/20221006083240_prepare_partial_trigram_indexes_for_issues_attempt_2.rb b/db/post_migrate/20221006083240_prepare_partial_trigram_indexes_for_issues_attempt_2.rb deleted file mode 100644 index 6ca2ba222ae8..000000000000 --- a/db/post_migrate/20221006083240_prepare_partial_trigram_indexes_for_issues_attempt_2.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class PreparePartialTrigramIndexesForIssuesAttempt2 < Gitlab::Database::Migration[2.0] - TITLE_INDEX_NAME = 'index_issues_on_title_trigram_non_latin' - DESCRIPTION_INDEX_NAME = 'index_issues_on_description_trigram_non_latin' - - def up - prepare_async_index :issues, :title, - name: TITLE_INDEX_NAME, - using: :gin, opclass: { description: :gin_trgm_ops }, - where: "title NOT SIMILAR TO '[\\u0000-\\u02FF\\u1E00-\\u1EFF\\u2070-\\u218F]*' " \ - "OR description NOT SIMILAR TO '[\\u0000-\\u02FF\\u1E00-\\u1EFF\\u2070-\\u218F]*'" - - prepare_async_index :issues, :description, - name: DESCRIPTION_INDEX_NAME, - using: :gin, opclass: { description: :gin_trgm_ops }, - where: "title NOT SIMILAR TO '[\\u0000-\\u02FF\\u1E00-\\u1EFF\\u2070-\\u218F]*' " \ - "OR description NOT SIMILAR TO '[\\u0000-\\u02FF\\u1E00-\\u1EFF\\u2070-\\u218F]*'" - end - - def down - unprepare_async_index_by_name :issues, DESCRIPTION_INDEX_NAME - unprepare_async_index_by_name :issues, TITLE_INDEX_NAME - end -end diff --git a/db/post_migrate/20221006172302_adjust_task_note_rename_background_migration_values.rb b/db/post_migrate/20221006172302_adjust_task_note_rename_background_migration_values.rb deleted file mode 100644 index b582b163e2d7..000000000000 --- a/db/post_migrate/20221006172302_adjust_task_note_rename_background_migration_values.rb +++ /dev/null @@ -1,72 +0,0 @@ -# frozen_string_literal: true - -class AdjustTaskNoteRenameBackgroundMigrationValues < Gitlab::Database::Migration[2.0] - restrict_gitlab_migration gitlab_schema: :gitlab_main - - JOB_CLASS_NAME = 'RenameTaskSystemNoteToChecklistItem' - MIGRATION_FAILED_STATUS = 4 - MIGRATION_FINISHED_STATUS = 3 - MIGRATION_ACTIVE_STATUS = 1 - JOB_FAILED_STATUS = 2 - - OLD_BATCH_SIZE = 10_000 - NEW_BATCH_SIZE = 5_000 - - OLD_SUB_BATCH_SIZE = 100 - NEW_SUB_BATCH_SIZE = 10 - - class InlineBatchedMigration < MigrationRecord - self.table_name = :batched_background_migrations - - scope :for_configuration, ->(job_class_name, table_name, column_name, job_arguments) do - where(job_class_name: job_class_name, table_name: table_name, column_name: column_name) - .where("job_arguments = ?", Gitlab::Json.dump(job_arguments)) # rubocop:disable Rails/WhereEquals - end - end - - class InlineBatchedJob < MigrationRecord - include EachBatch - self.table_name = :batched_background_migration_jobs - end - - def up - migration = InlineBatchedMigration.for_configuration( - JOB_CLASS_NAME, - :system_note_metadata, - :id, - [] - ).first - return if migration.blank? || migration.status == MIGRATION_FINISHED_STATUS - - InlineBatchedJob.where( - batched_background_migration_id: migration.id, - status: JOB_FAILED_STATUS - ).each_batch(of: 100) do |batch| - batch.update_all(attempts: 0, sub_batch_size: NEW_SUB_BATCH_SIZE) - end - - update_params = { batch_size: NEW_BATCH_SIZE, sub_batch_size: NEW_SUB_BATCH_SIZE } - - if migration.status == MIGRATION_FAILED_STATUS - update_params[:status] = MIGRATION_ACTIVE_STATUS - update_params[:started_at] = Time.zone.now if migration.respond_to?(:started_at) - end - - migration.update!(**update_params) - end - - def down - migration = InlineBatchedMigration.for_configuration( - JOB_CLASS_NAME, - :system_note_metadata, - :id, - [] - ).first - return if migration.blank? - - migration.update!( - batch_size: OLD_BATCH_SIZE, - sub_batch_size: OLD_SUB_BATCH_SIZE - ) - end -end diff --git a/db/post_migrate/20221010074914_migrate_security_findings_delete_queues.rb b/db/post_migrate/20221010074914_migrate_security_findings_delete_queues.rb deleted file mode 100644 index ce593e198591..000000000000 --- a/db/post_migrate/20221010074914_migrate_security_findings_delete_queues.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class MigrateSecurityFindingsDeleteQueues < Gitlab::Database::Migration[2.0] - restrict_gitlab_migration gitlab_schema: :gitlab_main - disable_ddl_transaction! - - def up - sidekiq_queue_migrate 'security_findings_delete_by_job_id', to: 'security_scans_purge_by_job_id' - sidekiq_queue_migrate 'cronjob:security_findings_cleanup', to: 'cronjob:security_scans_purge' - end - - def down - sidekiq_queue_migrate 'security_scans_purge_by_job_id', to: 'security_findings_delete_by_job_id' - sidekiq_queue_migrate 'cronjob:security_scans_purge', to: 'cronjob:security_findings_cleanup' - end -end diff --git a/db/post_migrate/20221010121510_prepare_async_index_author_id_target_project_id_on_merge_requests.rb b/db/post_migrate/20221010121510_prepare_async_index_author_id_target_project_id_on_merge_requests.rb deleted file mode 100644 index cd9035dd9f95..000000000000 --- a/db/post_migrate/20221010121510_prepare_async_index_author_id_target_project_id_on_merge_requests.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class PrepareAsyncIndexAuthorIdTargetProjectIdOnMergeRequests < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'index_merge_requests_on_author_id_and_target_project_id' - - disable_ddl_transaction! - - def up - prepare_async_index :merge_requests, %i[author_id target_project_id], name: INDEX_NAME - end - - def down - unprepare_async_index :merge_requests, %i[author_id target_project_id], name: INDEX_NAME - end -end diff --git a/db/post_migrate/20221010122138_add_async_index_author_id_target_project_id_on_merge_requests.rb b/db/post_migrate/20221010122138_add_async_index_author_id_target_project_id_on_merge_requests.rb deleted file mode 100644 index 0689c090d091..000000000000 --- a/db/post_migrate/20221010122138_add_async_index_author_id_target_project_id_on_merge_requests.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddAsyncIndexAuthorIdTargetProjectIdOnMergeRequests < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'index_merge_requests_on_author_id_and_id' - - disable_ddl_transaction! - - def up - prepare_async_index :merge_requests, %i[author_id id], name: INDEX_NAME - end - - def down - unprepare_async_index :merge_requests, %i[author_id id], name: INDEX_NAME - end -end diff --git a/db/post_migrate/20221010122352_add_index_to_namespace_settings_on_default_compliance_framework_id.rb b/db/post_migrate/20221010122352_add_index_to_namespace_settings_on_default_compliance_framework_id.rb deleted file mode 100644 index 63de79422081..000000000000 --- a/db/post_migrate/20221010122352_add_index_to_namespace_settings_on_default_compliance_framework_id.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToNamespaceSettingsOnDefaultComplianceFrameworkId < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'idx_namespace_settings_on_default_compliance_framework_id' - - def up - add_concurrent_index :namespace_settings, :default_compliance_framework_id, unique: true, name: INDEX_NAME - end - - def down - remove_concurrent_index :namespace_settings, :default_compliance_framework_id, name: INDEX_NAME - end -end diff --git a/db/post_migrate/20221010123040_add_compliance_framework_fk_to_namespace_settings.rb b/db/post_migrate/20221010123040_add_compliance_framework_fk_to_namespace_settings.rb deleted file mode 100644 index 5d4966fd5806..000000000000 --- a/db/post_migrate/20221010123040_add_compliance_framework_fk_to_namespace_settings.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class AddComplianceFrameworkFkToNamespaceSettings < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - add_concurrent_foreign_key :namespace_settings, :compliance_management_frameworks, - column: :default_compliance_framework_id, on_delete: :nullify, reverse_lock_order: true - end - - def down - with_lock_retries do - remove_foreign_key :namespace_settings, column: :default_compliance_framework_id - end - end -end diff --git a/db/post_migrate/20221010141500_add_index_author_id_target_project_id_on_merge_requests.rb b/db/post_migrate/20221010141500_add_index_author_id_target_project_id_on_merge_requests.rb deleted file mode 100644 index 5b9d5be2b3fa..000000000000 --- a/db/post_migrate/20221010141500_add_index_author_id_target_project_id_on_merge_requests.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddIndexAuthorIdTargetProjectIdOnMergeRequests < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'index_merge_requests_on_author_id_and_target_project_id' - - disable_ddl_transaction! - - def up - add_concurrent_index :merge_requests, %i[author_id target_project_id], name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :merge_requests, INDEX_NAME - end -end diff --git a/db/post_migrate/20221010162137_add_index_author_id_and_id_on_merge_requests.rb b/db/post_migrate/20221010162137_add_index_author_id_and_id_on_merge_requests.rb deleted file mode 100644 index 36184b5f573e..000000000000 --- a/db/post_migrate/20221010162137_add_index_author_id_and_id_on_merge_requests.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddIndexAuthorIdAndIdOnMergeRequests < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'index_merge_requests_on_author_id_and_id' - - disable_ddl_transaction! - - def up - add_concurrent_index :merge_requests, %i[author_id id], name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :merge_requests, INDEX_NAME - end -end diff --git a/db/post_migrate/20221011062254_sync_new_amount_used_for_ci_project_monthly_usages.rb b/db/post_migrate/20221011062254_sync_new_amount_used_for_ci_project_monthly_usages.rb deleted file mode 100644 index 32943f10fcf7..000000000000 --- a/db/post_migrate/20221011062254_sync_new_amount_used_for_ci_project_monthly_usages.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class SyncNewAmountUsedForCiProjectMonthlyUsages < Gitlab::Database::Migration[2.0] - restrict_gitlab_migration gitlab_schema: :gitlab_ci - - def up - 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 - - def down - # Non reversible migration. - # This data migration keeps `new_amount_used` in sync with the old `amount_used`. - # In case of failure or interruption the migration can be retried. - end -end diff --git a/db/post_migrate/20221011113928_redo_remove_and_add_ci_job_variables_raw_with_new_default.rb b/db/post_migrate/20221011113928_redo_remove_and_add_ci_job_variables_raw_with_new_default.rb deleted file mode 100644 index a377b78803e8..000000000000 --- a/db/post_migrate/20221011113928_redo_remove_and_add_ci_job_variables_raw_with_new_default.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -class RedoRemoveAndAddCiJobVariablesRawWithNewDefault < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - # We are removing and adding the same column with the same parameters to refresh the table - # because we have some wrong `ci_job_variables.raw` data (`TRUE`) in the database. - def change - remove_column :ci_job_variables, :raw, :boolean, null: false, default: false - add_column :ci_job_variables, :raw, :boolean, null: false, default: false - end -end diff --git a/db/post_migrate/20221012182701_remove_namespace_settings_cohort_free_user_cap_columns.rb b/db/post_migrate/20221012182701_remove_namespace_settings_cohort_free_user_cap_columns.rb deleted file mode 100644 index 36408ad19ed4..000000000000 --- a/db/post_migrate/20221012182701_remove_namespace_settings_cohort_free_user_cap_columns.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class RemoveNamespaceSettingsCohortFreeUserCapColumns < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def up - remove_column :namespace_settings, :exclude_from_free_user_cap - remove_column :namespace_settings, :include_for_free_user_cap_preview - end - - def down - add_column :namespace_settings, :exclude_from_free_user_cap, :boolean, null: false, default: false - add_column :namespace_settings, :include_for_free_user_cap_preview, :boolean, null: false, default: false - end -end diff --git a/db/post_migrate/20221013154159_update_invalid_dormant_user_setting.rb b/db/post_migrate/20221013154159_update_invalid_dormant_user_setting.rb deleted file mode 100644 index 1f1e47fdac11..000000000000 --- a/db/post_migrate/20221013154159_update_invalid_dormant_user_setting.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class UpdateInvalidDormantUserSetting < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - # rubocop:disable Layout/LineLength - def up - execute("update application_settings set deactivate_dormant_users_period=90 where deactivate_dormant_users_period < 90") - end - # rubocop:enable Layout/LineLength - - def down - # no-op - end -end diff --git a/db/post_migrate/20221013215832_cleanup_vulnerability_state_transitions_with_same_from_state_to_state.rb b/db/post_migrate/20221013215832_cleanup_vulnerability_state_transitions_with_same_from_state_to_state.rb deleted file mode 100644 index a81a80deb25a..000000000000 --- a/db/post_migrate/20221013215832_cleanup_vulnerability_state_transitions_with_same_from_state_to_state.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class CleanupVulnerabilityStateTransitionsWithSameFromStateToState < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - class VulnerabilityStateTransition < MigrationRecord - self.table_name = 'vulnerability_state_transitions' - end - - def up - VulnerabilityStateTransition.where('from_state = to_state').delete_all - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20221017084227_cleanup_rename_ci_pipeline_metadata_title.rb b/db/post_migrate/20221017084227_cleanup_rename_ci_pipeline_metadata_title.rb deleted file mode 100644 index 0829f3d87349..000000000000 --- a/db/post_migrate/20221017084227_cleanup_rename_ci_pipeline_metadata_title.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class CleanupRenameCiPipelineMetadataTitle < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - cleanup_concurrent_column_rename :ci_pipeline_metadata, :title, :name - end - - def down - undo_cleanup_concurrent_column_rename :ci_pipeline_metadata, :title, :name, batch_column_name: :pipeline_id - end -end diff --git a/db/post_migrate/20221018062308_schedule_backfill_project_namespace_details.rb b/db/post_migrate/20221018062308_schedule_backfill_project_namespace_details.rb deleted file mode 100644 index 74c8ef37ac2e..000000000000 --- a/db/post_migrate/20221018062308_schedule_backfill_project_namespace_details.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class ScheduleBackfillProjectNamespaceDetails < Gitlab::Database::Migration[2.0] - MIGRATION = 'BackfillProjectNamespaceDetails' - 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, - :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/20221018193635_ensure_task_note_renaming_background_migration_finished.rb b/db/post_migrate/20221018193635_ensure_task_note_renaming_background_migration_finished.rb deleted file mode 100644 index c6ae0f185d84..000000000000 --- a/db/post_migrate/20221018193635_ensure_task_note_renaming_background_migration_finished.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class EnsureTaskNoteRenamingBackgroundMigrationFinished < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - MIGRATION = 'RenameTaskSystemNoteToChecklistItem' - - def up - ensure_batched_background_migration_is_finished( - job_class_name: MIGRATION, - table_name: :system_note_metadata, - column_name: :id, - job_arguments: [] - ) - end - - def down - # noop - end -end diff --git a/db/post_migrate/20221018193827_drop_tmp_index_system_note_metadata_on_id_where_task.rb b/db/post_migrate/20221018193827_drop_tmp_index_system_note_metadata_on_id_where_task.rb deleted file mode 100644 index 5cc70c530c68..000000000000 --- a/db/post_migrate/20221018193827_drop_tmp_index_system_note_metadata_on_id_where_task.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class DropTmpIndexSystemNoteMetadataOnIdWhereTask < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'tmp_index_system_note_metadata_on_id_where_task' - - def up - remove_concurrent_index_by_name :system_note_metadata, INDEX_NAME - end - - def down - add_concurrent_index :system_note_metadata, [:id, :action], where: "action = 'task'", name: INDEX_NAME - end -end diff --git a/db/post_migrate/20221018232820_add_temp_index_for_user_details_fields.rb b/db/post_migrate/20221018232820_add_temp_index_for_user_details_fields.rb deleted file mode 100644 index 1cb93886ca3b..000000000000 --- a/db/post_migrate/20221018232820_add_temp_index_for_user_details_fields.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class AddTempIndexForUserDetailsFields < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'tmp_idx_where_user_details_fields_filled' - - disable_ddl_transaction! - - def up - # 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 - - def down - remove_concurrent_index_by_name :users, INDEX_NAME - end -end diff --git a/db/post_migrate/20221019002459_queue_backfill_user_details_fields.rb b/db/post_migrate/20221019002459_queue_backfill_user_details_fields.rb deleted file mode 100644 index 8ed4416a98d0..000000000000 --- a/db/post_migrate/20221019002459_queue_backfill_user_details_fields.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class QueueBackfillUserDetailsFields < Gitlab::Database::Migration[2.0] - MIGRATION = 'BackfillUserDetailsFields' - INTERVAL = 2.minutes - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - queue_batched_background_migration(MIGRATION, :users, :id, job_interval: INTERVAL) - end - - def down - delete_batched_background_migration(MIGRATION, :users, :id, []) - end -end diff --git a/db/post_migrate/20221019102426_remove_tmp_index_approval_merge_request_rules_on_report_type.rb b/db/post_migrate/20221019102426_remove_tmp_index_approval_merge_request_rules_on_report_type.rb deleted file mode 100644 index 7203d35de92b..000000000000 --- a/db/post_migrate/20221019102426_remove_tmp_index_approval_merge_request_rules_on_report_type.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class RemoveTmpIndexApprovalMergeRequestRulesOnReportType < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'tmp_index_approval_merge_request_rules_on_report_type_equal_one' - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :approval_merge_request_rules, INDEX_NAME - end - - def down - add_concurrent_index :approval_merge_request_rules, - [:id, :report_type], - name: INDEX_NAME, - where: "report_type = 1" - end -end diff --git a/db/post_migrate/20221019105041_queue_populate_projects_star_count.rb b/db/post_migrate/20221019105041_queue_populate_projects_star_count.rb deleted file mode 100644 index 768e0c7826fe..000000000000 --- a/db/post_migrate/20221019105041_queue_populate_projects_star_count.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class QueuePopulateProjectsStarCount < Gitlab::Database::Migration[2.0] - MIGRATION = 'PopulateProjectsStarCount' - DELAY_INTERVAL = 2.minutes - - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - queue_batched_background_migration( - MIGRATION, - :projects, - :id, - job_interval: DELAY_INTERVAL, - sub_batch_size: 50 - ) - end - - def down - delete_batched_background_migration(MIGRATION, :projects, :id, []) - end -end diff --git a/db/post_migrate/20221019141508_add_index_to_test_reports_issue_id_created_at_and_id.rb b/db/post_migrate/20221019141508_add_index_to_test_reports_issue_id_created_at_and_id.rb deleted file mode 100644 index 054512adf2e2..000000000000 --- a/db/post_migrate/20221019141508_add_index_to_test_reports_issue_id_created_at_and_id.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToTestReportsIssueIdCreatedAtAndId < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - TABLE_NAME = 'requirements_management_test_reports' - INDEX_NAME = 'idx_test_reports_on_issue_id_created_at_and_id' - - def up - add_concurrent_index TABLE_NAME, [:issue_id, :created_at, :id], name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME - end -end diff --git a/db/post_migrate/20221019194751_disable_fastupdate_on_issues_title_gin_index.rb b/db/post_migrate/20221019194751_disable_fastupdate_on_issues_title_gin_index.rb deleted file mode 100644 index 64d935489c2a..000000000000 --- a/db/post_migrate/20221019194751_disable_fastupdate_on_issues_title_gin_index.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class DisableFastupdateOnIssuesTitleGinIndex < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_issues_on_title_trigram' - - def up - return unless index_exists_by_name?(:issues, INDEX_NAME) - - with_lock_retries do - execute <<~SQL - ALTER INDEX #{INDEX_NAME} SET ( fastupdate = false ) ; - SQL - end - end - - def down - return unless index_exists_by_name?(:issues, INDEX_NAME) - - with_lock_retries do - execute <<~SQL - ALTER INDEX #{INDEX_NAME} RESET ( fastupdate ) ; - SQL - end - end -end diff --git a/db/post_migrate/20221019195754_disable_fastupdate_on_issues_description_gin_index.rb b/db/post_migrate/20221019195754_disable_fastupdate_on_issues_description_gin_index.rb deleted file mode 100644 index 8822cb3b4141..000000000000 --- a/db/post_migrate/20221019195754_disable_fastupdate_on_issues_description_gin_index.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class DisableFastupdateOnIssuesDescriptionGinIndex < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_issues_on_description_trigram' - - def up - return unless index_exists_by_name?(:issues, INDEX_NAME) - - with_lock_retries do - execute <<~SQL - ALTER INDEX #{INDEX_NAME} SET ( fastupdate = false ) ; - SQL - end - end - - def down - return unless index_exists_by_name?(:issues, INDEX_NAME) - - with_lock_retries do - execute <<~SQL - ALTER INDEX #{INDEX_NAME} RESET ( fastupdate ) ; - SQL - end - end -end diff --git a/db/post_migrate/20221019200033_disable_fastupdate_on_merge_requests_title_gin_index.rb b/db/post_migrate/20221019200033_disable_fastupdate_on_merge_requests_title_gin_index.rb deleted file mode 100644 index 3e1124dc2bb7..000000000000 --- a/db/post_migrate/20221019200033_disable_fastupdate_on_merge_requests_title_gin_index.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class DisableFastupdateOnMergeRequestsTitleGinIndex < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_merge_requests_on_title_trigram' - - def up - return unless index_exists_by_name?(:merge_requests, INDEX_NAME) - - with_lock_retries do - execute <<~SQL - ALTER INDEX #{INDEX_NAME} SET ( fastupdate = false ) ; - SQL - end - end - - def down - return unless index_exists_by_name?(:merge_requests, INDEX_NAME) - - with_lock_retries do - execute <<~SQL - ALTER INDEX #{INDEX_NAME} RESET ( fastupdate ) ; - SQL - end - end -end diff --git a/db/post_migrate/20221019200206_disable_fastupdate_on_merge_requests_description_gin_index.rb b/db/post_migrate/20221019200206_disable_fastupdate_on_merge_requests_description_gin_index.rb deleted file mode 100644 index 7ab6f40e206f..000000000000 --- a/db/post_migrate/20221019200206_disable_fastupdate_on_merge_requests_description_gin_index.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class DisableFastupdateOnMergeRequestsDescriptionGinIndex < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_merge_requests_on_description_trigram' - - def up - return unless index_exists_by_name?(:merge_requests, INDEX_NAME) - - with_lock_retries do - execute <<~SQL - ALTER INDEX #{INDEX_NAME} SET ( fastupdate = false ) ; - SQL - end - end - - def down - return unless index_exists_by_name?(:merge_requests, INDEX_NAME) - - with_lock_retries do - execute <<~SQL - ALTER INDEX #{INDEX_NAME} RESET ( fastupdate ) ; - SQL - end - end -end diff --git a/db/post_migrate/20221021082720_drop_index_on_ci_runners_token.rb b/db/post_migrate/20221021082720_drop_index_on_ci_runners_token.rb deleted file mode 100644 index 9125831fbf34..000000000000 --- a/db/post_migrate/20221021082720_drop_index_on_ci_runners_token.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class DropIndexOnCiRunnersToken < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_ci_runners_on_token' - - def up - remove_concurrent_index_by_name :ci_runners, INDEX_NAME - end - - def down - add_concurrent_index :ci_runners, - :token, - name: INDEX_NAME - end -end diff --git a/db/post_migrate/20221021082734_drop_index_on_ci_runners_token_encrypted.rb b/db/post_migrate/20221021082734_drop_index_on_ci_runners_token_encrypted.rb deleted file mode 100644 index 39771fb5f853..000000000000 --- a/db/post_migrate/20221021082734_drop_index_on_ci_runners_token_encrypted.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class DropIndexOnCiRunnersTokenEncrypted < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_ci_runners_on_token_encrypted' - - def up - remove_concurrent_index_by_name :ci_runners, INDEX_NAME - end - - def down - add_concurrent_index :ci_runners, - :token_encrypted, - name: INDEX_NAME - end -end diff --git a/db/post_migrate/20221021145820_create_routing_table_for_builds_metadata_v2.rb b/db/post_migrate/20221021145820_create_routing_table_for_builds_metadata_v2.rb deleted file mode 100644 index e5f1ba5cb876..000000000000 --- a/db/post_migrate/20221021145820_create_routing_table_for_builds_metadata_v2.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true - -class CreateRoutingTableForBuildsMetadataV2 < Gitlab::Database::Migration[2.0] - include Gitlab::Database::PartitioningMigrationHelpers::TableManagementHelpers - - disable_ddl_transaction! - - TABLE_NAME = :ci_builds_metadata - PARENT_TABLE_NAME = :p_ci_builds_metadata - FIRST_PARTITION = 100 - PARTITION_COLUMN = :partition_id - - def up - return if connection.table_exists?(PARENT_TABLE_NAME) && partition_attached? - - convert_table_to_first_list_partition( - table_name: TABLE_NAME, - partitioning_column: PARTITION_COLUMN, - parent_table_name: PARENT_TABLE_NAME, - initial_partitioning_value: FIRST_PARTITION, - lock_tables: [:ci_builds, :ci_builds_metadata] - ) - end - - def down - revert_converting_table_to_first_list_partition( - table_name: TABLE_NAME, - partitioning_column: PARTITION_COLUMN, - parent_table_name: PARENT_TABLE_NAME, - initial_partitioning_value: FIRST_PARTITION - ) - end - - private - - def partition_attached? - connection.select_value(<<~SQL) - SELECT true FROM postgres_partitions WHERE name = '#{TABLE_NAME}'; - SQL - end -end diff --git a/db/post_migrate/20221021160735_add_index_for_common_finder_query_desc_with_namespace_id.rb b/db/post_migrate/20221021160735_add_index_for_common_finder_query_desc_with_namespace_id.rb deleted file mode 100644 index d7c50010b723..000000000000 --- a/db/post_migrate/20221021160735_add_index_for_common_finder_query_desc_with_namespace_id.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class AddIndexForCommonFinderQueryDescWithNamespaceId < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'index_group_vulnerability_reads_common_finder_query_desc' - - disable_ddl_transaction! - - def up - add_concurrent_index :vulnerability_reads, - [:namespace_id, :state, :report_type, :severity, :vulnerability_id], - name: INDEX_NAME, - order: { severity: :desc, vulnerability_id: :desc } - end - - def down - remove_concurrent_index_by_name :vulnerability_reads, INDEX_NAME - end -end diff --git a/db/post_migrate/20221024034228_remove_sprints_project_id_column.rb b/db/post_migrate/20221024034228_remove_sprints_project_id_column.rb deleted file mode 100644 index e30d6dce4979..000000000000 --- a/db/post_migrate/20221024034228_remove_sprints_project_id_column.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -class RemoveSprintsProjectIdColumn < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - DATERANGE_CONSTRAINT_NAME = 'iteration_start_and_due_daterange_project_id_constraint' - - def up - with_lock_retries do - remove_column :sprints, :project_id, :bigint if column_exists?(:sprints, :project_id) - end - end - - def down - with_lock_retries do - add_column :sprints, :project_id, :bigint unless column_exists?(:sprints, :project_id) - end - - with_lock_retries do - next if check_constraint_exists?(:sprints, DATERANGE_CONSTRAINT_NAME) - - execute(<<~SQL) - ALTER TABLE sprints - ADD CONSTRAINT #{DATERANGE_CONSTRAINT_NAME} - EXCLUDE USING gist (project_id WITH =, daterange(start_date, due_date, '[]'::text) WITH &&) - WHERE (project_id IS NOT NULL) - SQL - end - - add_check_constraint(:sprints, - 'project_id <> NULL::bigint AND group_id IS NULL OR group_id <> NULL::bigint AND project_id IS NULL', - 'sprints_must_belong_to_project_or_group') - - add_concurrent_index :sprints, [:project_id, :iid], unique: true, name: 'index_sprints_on_project_id_and_iid' - - add_concurrent_foreign_key :sprints, :projects, column: :project_id, on_delete: :cascade - end -end diff --git a/db/post_migrate/20221024121500_drop_fingerprint_from_sbom_sources.rb b/db/post_migrate/20221024121500_drop_fingerprint_from_sbom_sources.rb deleted file mode 100644 index 83856cbe5dd3..000000000000 --- a/db/post_migrate/20221024121500_drop_fingerprint_from_sbom_sources.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true - -class DropFingerprintFromSbomSources < Gitlab::Database::Migration[2.0] - enable_lock_retries! - - def change - remove_column :sbom_sources, :fingerprint, :bytea - end -end diff --git a/db/post_migrate/20221025115006_check_vulnerabilities_state_transition_from_state_not_equal_to_state.rb b/db/post_migrate/20221025115006_check_vulnerabilities_state_transition_from_state_not_equal_to_state.rb deleted file mode 100644 index 2ab7f8a9c04c..000000000000 --- a/db/post_migrate/20221025115006_check_vulnerabilities_state_transition_from_state_not_equal_to_state.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class CheckVulnerabilitiesStateTransitionFromStateNotEqualToState < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - add_check_constraint(:vulnerability_state_transitions, '(from_state != to_state)', constraint_name) - end - - def down - remove_check_constraint(:vulnerability_state_transitions, constraint_name) - end - - private - - def constraint_name - check_constraint_name('vulnerability_state_transitions', 'fully_qualified_table_name', 'state_not_equal') - end -end diff --git a/db/post_migrate/20221025220607_add_index_id_on_scan_finding_approval_merge_request_rules.rb b/db/post_migrate/20221025220607_add_index_id_on_scan_finding_approval_merge_request_rules.rb deleted file mode 100644 index 4e72e7f95ecb..000000000000 --- a/db/post_migrate/20221025220607_add_index_id_on_scan_finding_approval_merge_request_rules.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class AddIndexIdOnScanFindingApprovalMergeRequestRules < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'scan_finding_approval_mr_rule_index_id' - SCAN_FINDING_REPORT_TYPE = 4 - - disable_ddl_transaction! - - def up - add_concurrent_index :approval_merge_request_rules, :id, - 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/20221027203556_delete_experiment_user_foreign_keys.rb b/db/post_migrate/20221027203556_delete_experiment_user_foreign_keys.rb deleted file mode 100644 index 564dc3d4899e..000000000000 --- a/db/post_migrate/20221027203556_delete_experiment_user_foreign_keys.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -class DeleteExperimentUserForeignKeys < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - with_lock_retries do - remove_foreign_key_if_exists :experiment_users, :experiments, name: 'fk_rails_56d4708b4a' - end - - with_lock_retries do - remove_foreign_key_if_exists :experiment_users, :users, name: 'fk_rails_fd805f771a' - end - end - - def down - add_concurrent_foreign_key :experiment_users, :experiments, column: :experiment_id, name: 'fk_rails_56d4708b4a' - add_concurrent_foreign_key :experiment_users, :users, column: :user_id, name: 'fk_rails_fd805f771a' - end -end diff --git a/db/post_migrate/20221027203951_drop_experiment_users_table.rb b/db/post_migrate/20221027203951_drop_experiment_users_table.rb deleted file mode 100644 index 838a96057400..000000000000 --- a/db/post_migrate/20221027203951_drop_experiment_users_table.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class DropExperimentUsersTable < Gitlab::Database::Migration[2.0] - def up - drop_table :experiment_users - end - - def down - create_table :experiment_users do |t| - t.bigint :experiment_id, null: false - t.bigint :user_id, null: false - t.integer :group_type, limit: 2, null: false, default: 0 - t.timestamps_with_timezone null: false - t.datetime_with_timezone :converted_at - t.jsonb :context, null: false, default: {} - end - - add_index :experiment_users, :experiment_id - add_index :experiment_users, :user_id - end -end diff --git a/db/post_migrate/20221028000041_remove_invalid_partial_trigram_indexes_for_issues.rb b/db/post_migrate/20221028000041_remove_invalid_partial_trigram_indexes_for_issues.rb deleted file mode 100644 index 9b46647047ab..000000000000 --- a/db/post_migrate/20221028000041_remove_invalid_partial_trigram_indexes_for_issues.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class RemoveInvalidPartialTrigramIndexesForIssues < Gitlab::Database::Migration[2.0] - TITLE_INDEX_NAME = 'index_issues_on_title_trigram_non_latin' - DESCRIPTION_INDEX_NAME = 'index_issues_on_description_trigram_non_latin' - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :issues, TITLE_INDEX_NAME - remove_concurrent_index_by_name :issues, DESCRIPTION_INDEX_NAME - end - - def down; end -end diff --git a/db/post_migrate/20221028000603_prepare_partial_trigram_indexes_for_issues_attempt_3.rb b/db/post_migrate/20221028000603_prepare_partial_trigram_indexes_for_issues_attempt_3.rb deleted file mode 100644 index 199a7a22d5bf..000000000000 --- a/db/post_migrate/20221028000603_prepare_partial_trigram_indexes_for_issues_attempt_3.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class PreparePartialTrigramIndexesForIssuesAttempt3 < Gitlab::Database::Migration[2.0] - TITLE_INDEX_NAME = 'index_issues_on_title_trigram_non_latin' - DESCRIPTION_INDEX_NAME = 'index_issues_on_description_trigram_non_latin' - - def up - prepare_async_index :issues, :title, - name: TITLE_INDEX_NAME, - using: :gin, opclass: { description: :gin_trgm_ops }, - where: "title NOT SIMILAR TO '[\\u0000-\\u02FF\\u1E00-\\u1EFF\\u2070-\\u218F]*' " \ - "OR description NOT SIMILAR TO '[\\u0000-\\u02FF\\u1E00-\\u1EFF\\u2070-\\u218F]*'" - - prepare_async_index :issues, :description, - name: DESCRIPTION_INDEX_NAME, - using: :gin, opclass: { description: :gin_trgm_ops }, - where: "title NOT SIMILAR TO '[\\u0000-\\u02FF\\u1E00-\\u1EFF\\u2070-\\u218F]*' " \ - "OR description NOT SIMILAR TO '[\\u0000-\\u02FF\\u1E00-\\u1EFF\\u2070-\\u218F]*'" - end - - def down - unprepare_async_index_by_name :issues, DESCRIPTION_INDEX_NAME - unprepare_async_index_by_name :issues, TITLE_INDEX_NAME - end -end diff --git a/db/post_migrate/20221028022627_add_index_on_password_last_changed_at_to_user_details.rb b/db/post_migrate/20221028022627_add_index_on_password_last_changed_at_to_user_details.rb deleted file mode 100644 index 8314767ade19..000000000000 --- a/db/post_migrate/20221028022627_add_index_on_password_last_changed_at_to_user_details.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AddIndexOnPasswordLastChangedAtToUserDetails < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'index_user_details_on_password_last_changed_at' - - disable_ddl_transaction! - - def up - add_concurrent_index :user_details, :password_last_changed_at, name: INDEX_NAME, comment: 'JiHu-specific index' - end - - def down - remove_concurrent_index_by_name :user_details, INDEX_NAME - end -end diff --git a/db/post_migrate/20221102090940_create_next_ci_partitions_record.rb b/db/post_migrate/20221102090940_create_next_ci_partitions_record.rb deleted file mode 100644 index 4bd89a70daa7..000000000000 --- a/db/post_migrate/20221102090940_create_next_ci_partitions_record.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class CreateNextCiPartitionsRecord < Gitlab::Database::Migration[2.0] - NEXT_PARTITION_ID = 101 - - disable_ddl_transaction! - restrict_gitlab_migration gitlab_schema: :gitlab_ci - - def up - return unless Gitlab.com? - - execute(<<~SQL) - INSERT INTO "ci_partitions" ("id", "created_at", "updated_at") - VALUES (#{NEXT_PARTITION_ID}, now(), now()) - ON CONFLICT DO NOTHING; - SQL - - reset_pk_sequence!('ci_partitions') - end - - def down - return unless Gitlab.com? - - execute(<<~SQL) - DELETE FROM "ci_partitions" - WHERE "ci_partitions"."id" = #{NEXT_PARTITION_ID}; - SQL - end -end diff --git a/db/post_migrate/20221102090943_create_second_partition_for_builds_metadata.rb b/db/post_migrate/20221102090943_create_second_partition_for_builds_metadata.rb deleted file mode 100644 index 6923e6f6cbaf..000000000000 --- a/db/post_migrate/20221102090943_create_second_partition_for_builds_metadata.rb +++ /dev/null @@ -1,62 +0,0 @@ -# frozen_string_literal: true - -class CreateSecondPartitionForBuildsMetadata < Gitlab::Database::Migration[2.0] - TABLE_NAME = 'p_ci_builds_metadata' - BUILDS_TABLE = 'ci_builds' - NEXT_PARTITION_ID = 101 - PARTITION_NAME = 'gitlab_partitions_dynamic.ci_builds_metadata_101' - - disable_ddl_transaction! - - def up - return unless Gitlab.com? - - with_lock_retries(**lock_args) do - connection.execute(<<~SQL) - LOCK TABLE #{BUILDS_TABLE} IN SHARE UPDATE EXCLUSIVE MODE; - LOCK TABLE ONLY #{TABLE_NAME} IN ACCESS EXCLUSIVE MODE; - SQL - - connection.execute(<<~SQL) - CREATE TABLE IF NOT EXISTS #{PARTITION_NAME} - PARTITION OF #{TABLE_NAME} - FOR VALUES IN (#{NEXT_PARTITION_ID}); - SQL - end - end - - def down - return unless Gitlab.com? - return unless table_exists?(PARTITION_NAME) - - with_lock_retries(**lock_args) do - connection.execute(<<~SQL) - LOCK TABLE #{BUILDS_TABLE}, #{TABLE_NAME}, #{PARTITION_NAME} IN ACCESS EXCLUSIVE MODE; - SQL - - connection.execute(<<~SQL) - ALTER TABLE #{TABLE_NAME} DETACH PARTITION #{PARTITION_NAME}; - SQL - - connection.execute(<<~SQL) - DROP TABLE IF EXISTS #{PARTITION_NAME} CASCADE; - SQL - end - end - - private - - def lock_args - { - raise_on_exhaustion: true, - timing_configuration: lock_timing_configuration - } - end - - def lock_timing_configuration - iterations = Gitlab::Database::WithLockRetries::DEFAULT_TIMING_CONFIGURATION - aggressive_iterations = Array.new(5) { [10.seconds, 1.minute] } - - iterations + aggressive_iterations - end -end diff --git a/db/post_migrate/20221103073328_change_member_namespace_id_not_null.rb b/db/post_migrate/20221103073328_change_member_namespace_id_not_null.rb deleted file mode 100644 index ef493e12f38d..000000000000 --- a/db/post_migrate/20221103073328_change_member_namespace_id_not_null.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class ChangeMemberNamespaceIdNotNull < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - add_not_null_constraint :members, :member_namespace_id, validate: false - end - - def down - remove_not_null_constraint :members, :member_namespace_id - end -end diff --git a/db/post_migrate/20221103084213_remove_tmp_index_members_on_id_where_namespace_id_null.rb b/db/post_migrate/20221103084213_remove_tmp_index_members_on_id_where_namespace_id_null.rb deleted file mode 100644 index 07908e697f5f..000000000000 --- a/db/post_migrate/20221103084213_remove_tmp_index_members_on_id_where_namespace_id_null.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class RemoveTmpIndexMembersOnIdWhereNamespaceIdNull < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'tmp_index_members_on_id_where_namespace_id_null' - - disable_ddl_transaction! - - def up - remove_concurrent_index_by_name :members, INDEX_NAME - end - - def down - add_concurrent_index :members, :id, name: INDEX_NAME, where: 'member_namespace_id IS NULL' - end -end diff --git a/db/post_migrate/20221103150250_migrate_sidekiq_queued_jobs.rb b/db/post_migrate/20221103150250_migrate_sidekiq_queued_jobs.rb deleted file mode 100644 index 1934711f9ef8..000000000000 --- a/db/post_migrate/20221103150250_migrate_sidekiq_queued_jobs.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class MigrateSidekiqQueuedJobs < Gitlab::Database::Migration[2.0] - def up - # no-op because of https://gitlab.com/gitlab-com/gl-infra/scalability/-/issues/1991 - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20221104042137_add_partial_trigram_index_for_issue_title_attempt_2.rb b/db/post_migrate/20221104042137_add_partial_trigram_index_for_issue_title_attempt_2.rb deleted file mode 100644 index 242045779597..000000000000 --- a/db/post_migrate/20221104042137_add_partial_trigram_index_for_issue_title_attempt_2.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddPartialTrigramIndexForIssueTitleAttempt2 < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_issues_on_title_trigram_non_latin' - - def up - add_concurrent_index :issues, :title, - name: INDEX_NAME, - using: :gin, opclass: { description: :gin_trgm_ops }, - where: "title NOT SIMILAR TO '[\\u0000-\\u02FF\\u1E00-\\u1EFF\\u2070-\\u218F]*' " \ - "OR description NOT SIMILAR TO '[\\u0000-\\u02FF\\u1E00-\\u1EFF\\u2070-\\u218F]*'" - end - - def down - remove_concurrent_index_by_name :issues, INDEX_NAME - end -end diff --git a/db/post_migrate/20221104042159_add_partial_trigram_index_for_issue_description_attempt_2.rb b/db/post_migrate/20221104042159_add_partial_trigram_index_for_issue_description_attempt_2.rb deleted file mode 100644 index 36b595d10679..000000000000 --- a/db/post_migrate/20221104042159_add_partial_trigram_index_for_issue_description_attempt_2.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddPartialTrigramIndexForIssueDescriptionAttempt2 < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_issues_on_description_trigram_non_latin' - - def up - add_concurrent_index :issues, :description, - name: INDEX_NAME, - using: :gin, opclass: { description: :gin_trgm_ops }, - where: "title NOT SIMILAR TO '[\\u0000-\\u02FF\\u1E00-\\u1EFF\\u2070-\\u218F]*' " \ - "OR description NOT SIMILAR TO '[\\u0000-\\u02FF\\u1E00-\\u1EFF\\u2070-\\u218F]*'" - end - - def down - remove_concurrent_index_by_name :issues, INDEX_NAME - end -end diff --git a/db/post_migrate/20221104074652_add_temp_index_for_project_statistics_upload_size_migration.rb b/db/post_migrate/20221104074652_add_temp_index_for_project_statistics_upload_size_migration.rb deleted file mode 100644 index b6ee636fa9b0..000000000000 --- a/db/post_migrate/20221104074652_add_temp_index_for_project_statistics_upload_size_migration.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class AddTempIndexForProjectStatisticsUploadSizeMigration < Gitlab::Database::Migration[2.0] - INDEX_PROJECT_STATSISTICS_UPLOADS_SIZE = 'tmp_index_project_statistics_uploads_size' - - disable_ddl_transaction! - - def up - # Temporary index is to be used to trigger refresh for all project_statistics with - # upload_size <> 0 - add_concurrent_index :project_statistics, [:project_id], - name: INDEX_PROJECT_STATSISTICS_UPLOADS_SIZE, - where: "uploads_size <> 0" - end - - def down - remove_concurrent_index_by_name :project_statistics, INDEX_PROJECT_STATSISTICS_UPLOADS_SIZE - end -end diff --git a/db/post_migrate/20221104100203_recreate_async_trigram_index_for_vulnerability_reads_container_images.rb b/db/post_migrate/20221104100203_recreate_async_trigram_index_for_vulnerability_reads_container_images.rb deleted file mode 100644 index ea2914f4dc4f..000000000000 --- a/db/post_migrate/20221104100203_recreate_async_trigram_index_for_vulnerability_reads_container_images.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class RecreateAsyncTrigramIndexForVulnerabilityReadsContainerImages < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'index_vulnerability_reads_on_location_image_trigram' - REPORT_TYPES = { container_scanning: 2, cluster_image_scanning: 7 }.freeze - - def up - remove_concurrent_index_by_name :vulnerability_reads, INDEX_NAME - - prepare_async_index :vulnerability_reads, :location_image, - name: INDEX_NAME, - using: :gin, opclass: { location_image: :gin_trgm_ops }, - where: "report_type = ANY (ARRAY[#{REPORT_TYPES.values.join(', ')}]) AND location_image IS NOT NULL" - end - - def down - unprepare_async_index :vulnerability_reads, :location_image, name: INDEX_NAME - end -end diff --git a/db/post_migrate/20221104170500_add_vulnerability_reads_all_status_index.rb b/db/post_migrate/20221104170500_add_vulnerability_reads_all_status_index.rb deleted file mode 100644 index 1dc1921ebaa0..000000000000 --- a/db/post_migrate/20221104170500_add_vulnerability_reads_all_status_index.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true -class AddVulnerabilityReadsAllStatusIndex < Gitlab::Database::Migration[2.0] - INDEX_NAME = 'index_vulnerability_reads_on_namespace_type_severity_id' - - disable_ddl_transaction! - - def up - add_concurrent_index :vulnerability_reads, %i[namespace_id report_type severity vulnerability_id], name: INDEX_NAME - end - - def down - remove_concurrent_index_by_name :vulnerability_reads, INDEX_NAME - end -end diff --git a/db/post_migrate/20221104190203_validate_environment_id_on_deployments.rb b/db/post_migrate/20221104190203_validate_environment_id_on_deployments.rb deleted file mode 100644 index 9546daa39751..000000000000 --- a/db/post_migrate/20221104190203_validate_environment_id_on_deployments.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -class ValidateEnvironmentIdOnDeployments < Gitlab::Database::Migration[2.0] - def up - validate_foreign_key :deployments, :environment_id - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20221107094359_recount_epic_cache_counts.rb b/db/post_migrate/20221107094359_recount_epic_cache_counts.rb deleted file mode 100644 index 37ab952edba7..000000000000 --- a/db/post_migrate/20221107094359_recount_epic_cache_counts.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -class RecountEpicCacheCounts < Gitlab::Database::Migration[2.0] - MIGRATION = 'RecountEpicCacheCounts' - 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/20221107184758_sync_new_amount_used_for_ci_namespace_monthly_usages.rb b/db/post_migrate/20221107184758_sync_new_amount_used_for_ci_namespace_monthly_usages.rb deleted file mode 100644 index 9a6014b5c947..000000000000 --- a/db/post_migrate/20221107184758_sync_new_amount_used_for_ci_namespace_monthly_usages.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -class SyncNewAmountUsedForCiNamespaceMonthlyUsages < Gitlab::Database::Migration[2.0] - restrict_gitlab_migration gitlab_schema: :gitlab_ci - - def up - namespace_usages = define_batchable_model('ci_namespace_monthly_usages') - - namespace_usages.each_batch(of: 500) do |batch| - batch.where('amount_used > 0').update_all('new_amount_used = amount_used') - end - end - - def down - # Non reversible migration. - # This data migration keeps `new_amount_used` in sync with the old `amount_used`. - # In case of failure or interruption the migration can be retried. - end -end diff --git a/db/post_migrate/20221107220420_validate_not_null_constraint_on_member_namespace_id.rb b/db/post_migrate/20221107220420_validate_not_null_constraint_on_member_namespace_id.rb deleted file mode 100644 index 48da0c1fd090..000000000000 --- a/db/post_migrate/20221107220420_validate_not_null_constraint_on_member_namespace_id.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class ValidateNotNullConstraintOnMemberNamespaceId < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - CONSTRAINT_NAME = 'check_508774aac0' - - def up - validate_not_null_constraint :members, :member_namespace_id, constraint_name: CONSTRAINT_NAME - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20221107220526_validate_fk_member_namespace_id.rb b/db/post_migrate/20221107220526_validate_fk_member_namespace_id.rb deleted file mode 100644 index f78dc5a36fde..000000000000 --- a/db/post_migrate/20221107220526_validate_fk_member_namespace_id.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class ValidateFkMemberNamespaceId < Gitlab::Database::Migration[2.0] - CONSTRAINT_NAME = 'fk_2f85abf8f1' - - def up - validate_foreign_key :members, :member_namespace_id, name: CONSTRAINT_NAME - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20221107222213_remove_old_member_namespace_id_fk.rb b/db/post_migrate/20221107222213_remove_old_member_namespace_id_fk.rb deleted file mode 100644 index d46fa80336e1..000000000000 --- a/db/post_migrate/20221107222213_remove_old_member_namespace_id_fk.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -class RemoveOldMemberNamespaceIdFk < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - TARGET_COLUMN = :member_namespace_id - - def up - with_lock_retries do - remove_foreign_key_if_exists(:members, column: TARGET_COLUMN, name: fk_name(TARGET_COLUMN)) - end - end - - def down - add_concurrent_foreign_key( - :members, - :namespaces, - column: TARGET_COLUMN, - name: fk_name(TARGET_COLUMN), - on_delete: :nullify - ) - end - - def fk_name(column_name) - # generate a FK name - concurrent_foreign_key_name(:members, column_name) - end -end diff --git a/db/post_migrate/20221108045019_truncate_timeline_event_tags_table.rb b/db/post_migrate/20221108045019_truncate_timeline_event_tags_table.rb deleted file mode 100644 index a576f9e860f9..000000000000 --- a/db/post_migrate/20221108045019_truncate_timeline_event_tags_table.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class TruncateTimelineEventTagsTable < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - def up - return unless Gitlab::Database.gitlab_schemas_for_connection(connection).include?(:gitlab_main) - - execute('TRUNCATE TABLE incident_management_timeline_event_tags, incident_management_timeline_event_tag_links') - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20221108121322_add_supporting_index_for_vulnerabilities_feedback_migration.rb b/db/post_migrate/20221108121322_add_supporting_index_for_vulnerabilities_feedback_migration.rb deleted file mode 100644 index c77930512d28..000000000000 --- a/db/post_migrate/20221108121322_add_supporting_index_for_vulnerabilities_feedback_migration.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class AddSupportingIndexForVulnerabilitiesFeedbackMigration < 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, - %i[migrated_to_state_transition feedback_type], - 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/20221108222015_remove_temp_index_on_project_features_where_releases_access_level_gt_repository.rb b/db/post_migrate/20221108222015_remove_temp_index_on_project_features_where_releases_access_level_gt_repository.rb deleted file mode 100644 index e7cc6786b4b8..000000000000 --- a/db/post_migrate/20221108222015_remove_temp_index_on_project_features_where_releases_access_level_gt_repository.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -class RemoveTempIndexOnProjectFeaturesWhereReleasesAccessLevelGtRepository < Gitlab::Database::Migration[2.0] - disable_ddl_transaction! - - INDEX_NAME = 'tmp_idx_project_features_on_releases_al_and_repo_al_partial' - - def up - remove_concurrent_index_by_name :project_features, INDEX_NAME - end - - def down - add_concurrent_index :project_features, - [:releases_access_level, :repository_access_level], - name: INDEX_NAME, - where: 'releases_access_level > repository_access_level' - end -end diff --git a/db/post_migrate/20221110045406_sanitize_confidential_note_todos.rb b/db/post_migrate/20221110045406_sanitize_confidential_note_todos.rb deleted file mode 100644 index d409a4dfdd17..000000000000 --- a/db/post_migrate/20221110045406_sanitize_confidential_note_todos.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class SanitizeConfidentialNoteTodos < Gitlab::Database::Migration[2.0] - restrict_gitlab_migration gitlab_schema: :gitlab_main - - def up - # no-op: this empty migration is left here only for compatibility reasons. - # It was a temporary migration which used not-isolated code. - # https://gitlab.com/gitlab-org/gitlab/-/issues/382557 - end - - def down - # no-op - end -end diff --git a/db/post_migrate/20221111070314_prepare_removal_of_issue_trigram_indexes.rb b/db/post_migrate/20221111070314_prepare_removal_of_issue_trigram_indexes.rb deleted file mode 100644 index c4cae19497e2..000000000000 --- a/db/post_migrate/20221111070314_prepare_removal_of_issue_trigram_indexes.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class PrepareRemovalOfIssueTrigramIndexes < Gitlab::Database::Migration[2.0] - TITLE_INDEX_NAME = 'index_issues_on_title_trigram' - DESCRIPTION_INDEX_NAME = 'index_issues_on_description_trigram' - - def up - prepare_async_index_removal :issues, :title, name: TITLE_INDEX_NAME - prepare_async_index_removal :issues, :description, name: DESCRIPTION_INDEX_NAME - end - - def down - unprepare_async_index_by_name :issues, DESCRIPTION_INDEX_NAME - unprepare_async_index_by_name :issues, TITLE_INDEX_NAME - end -end diff --git a/db/schema_migrations/20220126191624 b/db/schema_migrations/20220126191624 deleted file mode 100644 index f8cbab243796..000000000000 --- a/db/schema_migrations/20220126191624 +++ /dev/null @@ -1 +0,0 @@ -33170856a78b469c63d4821692929a1df0c41e4b9d98093e771b122b462c9c03 \ No newline at end of file diff --git a/db/schema_migrations/20220406193806 b/db/schema_migrations/20220406193806 deleted file mode 100644 index a5dfed18303c..000000000000 --- a/db/schema_migrations/20220406193806 +++ /dev/null @@ -1 +0,0 @@ -f2ed979f3af7aec03defc737add2e5d5bf4aad080d501003744ee42f902074d5 \ No newline at end of file diff --git a/db/schema_migrations/20220601110011 b/db/schema_migrations/20220601110011 deleted file mode 100644 index 64c766490955..000000000000 --- a/db/schema_migrations/20220601110011 +++ /dev/null @@ -1 +0,0 @@ -9dc41d0d5f1c87f27327b254c955eada4fcc5c6158c513128e6fbdadd6c34932 \ No newline at end of file diff --git a/db/schema_migrations/20220603125200 b/db/schema_migrations/20220603125200 deleted file mode 100644 index 5da1d1992ab7..000000000000 --- a/db/schema_migrations/20220603125200 +++ /dev/null @@ -1 +0,0 @@ -7631f2c1f9b2647ae6de47675305a2d5c1b213229c85b6f161412f83884bad87 \ No newline at end of file diff --git a/db/schema_migrations/20220606054503 b/db/schema_migrations/20220606054503 deleted file mode 100644 index 1ec25932ece6..000000000000 --- a/db/schema_migrations/20220606054503 +++ /dev/null @@ -1 +0,0 @@ -ed815f5e2766913ded3479c2cdc8a885ab7164ae280e309cba34394668392a2b \ No newline at end of file diff --git a/db/schema_migrations/20220606080509 b/db/schema_migrations/20220606080509 deleted file mode 100644 index 7403068a8daa..000000000000 --- a/db/schema_migrations/20220606080509 +++ /dev/null @@ -1 +0,0 @@ -3afc50d92878da71453cfb23ad29d16123e4986e3304aff62013f4655b065d38 \ No newline at end of file diff --git a/db/schema_migrations/20220613112029 b/db/schema_migrations/20220613112029 deleted file mode 100644 index d0bb2de83b57..000000000000 --- a/db/schema_migrations/20220613112029 +++ /dev/null @@ -1 +0,0 @@ -04a04a34de63b17f02a6b1333854638ae3b44d284e5ce2fcbee6fb3ec06b7757 \ No newline at end of file diff --git a/db/schema_migrations/20220613112030 b/db/schema_migrations/20220613112030 deleted file mode 100644 index 3dda586034db..000000000000 --- a/db/schema_migrations/20220613112030 +++ /dev/null @@ -1 +0,0 @@ -3d1b1394aa1b5db83867b284f119ec711255d2a01b78720d42c0a1acfe93c94f \ No newline at end of file diff --git a/db/schema_migrations/20220613112031 b/db/schema_migrations/20220613112031 deleted file mode 100644 index dc0d913e1eb8..000000000000 --- a/db/schema_migrations/20220613112031 +++ /dev/null @@ -1 +0,0 @@ -30d48cf8219cb4bcfeac454d7baf70d05f0285bdac519e4a1fb9f1c412267a9d \ No newline at end of file diff --git a/db/schema_migrations/20220613112032 b/db/schema_migrations/20220613112032 deleted file mode 100644 index f1c0d9c80e6a..000000000000 --- a/db/schema_migrations/20220613112032 +++ /dev/null @@ -1 +0,0 @@ -c8c26dad8d11b3715fce07ee9bedc9c4f66d2454646d58994e1568758f240299 \ No newline at end of file diff --git a/db/schema_migrations/20220615154500 b/db/schema_migrations/20220615154500 deleted file mode 100644 index 36e35ec7d3a5..000000000000 --- a/db/schema_migrations/20220615154500 +++ /dev/null @@ -1 +0,0 @@ -fd138239f6970b892fdb8190fb65b3364bb9ba5396100ba3d5d695eef6436dcf \ No newline at end of file diff --git a/db/schema_migrations/20220615172230 b/db/schema_migrations/20220615172230 deleted file mode 100644 index 43057debe67f..000000000000 --- a/db/schema_migrations/20220615172230 +++ /dev/null @@ -1 +0,0 @@ -364a2f729196e4bd4bde635f7550df3cf0c005fa002840fa12745d8919a99147 \ No newline at end of file diff --git a/db/schema_migrations/20220616171355 b/db/schema_migrations/20220616171355 deleted file mode 100644 index cd212025f70f..000000000000 --- a/db/schema_migrations/20220616171355 +++ /dev/null @@ -1 +0,0 @@ -63ec85b4f8b7eb15c232c4a25c1e63027c38c23caf81a89c4d05227a6be00e4b \ No newline at end of file diff --git a/db/schema_migrations/20220706145113 b/db/schema_migrations/20220706145113 deleted file mode 100644 index 8ed19a92025f..000000000000 --- a/db/schema_migrations/20220706145113 +++ /dev/null @@ -1 +0,0 @@ -e37da383a2e69e5e3157180b33017fc64af6ee009fc3dd317ae69931d37c6350 \ No newline at end of file diff --git a/db/schema_migrations/20220707192420 b/db/schema_migrations/20220707192420 deleted file mode 100644 index 2122f9ed9548..000000000000 --- a/db/schema_migrations/20220707192420 +++ /dev/null @@ -1 +0,0 @@ -b3d06405e0e0398579077d255901bed4b6f86f89a93dae8e97ddec9c2c496837 \ No newline at end of file diff --git a/db/schema_migrations/20220711142148 b/db/schema_migrations/20220711142148 deleted file mode 100644 index 709ce89616a1..000000000000 --- a/db/schema_migrations/20220711142148 +++ /dev/null @@ -1 +0,0 @@ -d7062e116066ac922d42f43ef8ee6783d6bc3a30d6c36b4d70788ce47bba076f \ No newline at end of file diff --git a/db/schema_migrations/20220721065723 b/db/schema_migrations/20220721065723 deleted file mode 100644 index 78b1fedaff1c..000000000000 --- a/db/schema_migrations/20220721065723 +++ /dev/null @@ -1 +0,0 @@ -5e3fbb2c033f8512e5fd14b8ce8c6088866c596a2b769e115dcc1feb9ce9d041 \ No newline at end of file diff --git a/db/schema_migrations/20220726171440 b/db/schema_migrations/20220726171440 deleted file mode 100644 index 3bd56cb83461..000000000000 --- a/db/schema_migrations/20220726171440 +++ /dev/null @@ -1 +0,0 @@ -5fce175152ab9c954b35d612800b381634248fe0c02b5dfc06c4650b8df9e787 \ No newline at end of file diff --git a/db/schema_migrations/20220726171450 b/db/schema_migrations/20220726171450 deleted file mode 100644 index 76a5597f9fee..000000000000 --- a/db/schema_migrations/20220726171450 +++ /dev/null @@ -1 +0,0 @@ -86d469a9dc2d22451728d310bd2b830c5cdb69033bdf6b5fe30d45c6c6b8ae4b \ No newline at end of file diff --git a/db/schema_migrations/20220726225114 b/db/schema_migrations/20220726225114 deleted file mode 100644 index 32f1eb44d17a..000000000000 --- a/db/schema_migrations/20220726225114 +++ /dev/null @@ -1 +0,0 @@ -24e39665566d86ddca2bfc134fd37e11840edc9bc34add077e39fa7e5b8272d5 \ No newline at end of file diff --git a/db/schema_migrations/20220801155858 b/db/schema_migrations/20220801155858 deleted file mode 100644 index 16e0ee3a0a4b..000000000000 --- a/db/schema_migrations/20220801155858 +++ /dev/null @@ -1 +0,0 @@ -aa09e7e3cdc7c7ee011b92a1ccbebdddefd9dfc2717af03a40073c6bc5be4001 \ No newline at end of file diff --git a/db/schema_migrations/20220802200719 b/db/schema_migrations/20220802200719 deleted file mode 100644 index a4798a7e79e3..000000000000 --- a/db/schema_migrations/20220802200719 +++ /dev/null @@ -1 +0,0 @@ -e27e9430a06f0586dd4ed9419c8f5747d64509e89f4f3481d8341261cfec82c5 \ No newline at end of file diff --git a/db/schema_migrations/20220802202505 b/db/schema_migrations/20220802202505 deleted file mode 100644 index f6a72f8c3c57..000000000000 --- a/db/schema_migrations/20220802202505 +++ /dev/null @@ -1 +0,0 @@ -aacf5e416de30f594ea012c3dd3cb1a3bd10d2edd2d312aedf7147a8cde32928 \ No newline at end of file diff --git a/db/schema_migrations/20220803004853 b/db/schema_migrations/20220803004853 deleted file mode 100644 index 59f9dcd0d50b..000000000000 --- a/db/schema_migrations/20220803004853 +++ /dev/null @@ -1 +0,0 @@ -39f8ae1258fa9cab98e5231d5adfe7fdf648b50fba29790aaa46786f2b2f6f04 \ No newline at end of file diff --git a/db/schema_migrations/20220803235114 b/db/schema_migrations/20220803235114 deleted file mode 100644 index 469005b8befe..000000000000 --- a/db/schema_migrations/20220803235114 +++ /dev/null @@ -1 +0,0 @@ -a669aca9370ecd086b582164e68366ca459754b26e096301c2dc7121a7e9ab58 \ No newline at end of file diff --git a/db/schema_migrations/20220805180311 b/db/schema_migrations/20220805180311 deleted file mode 100644 index dff18ebd3fc3..000000000000 --- a/db/schema_migrations/20220805180311 +++ /dev/null @@ -1 +0,0 @@ -35335f40a192889c45f71a8a3b25dd0e7024919ff823b01c2086c0e6959869e0 \ No newline at end of file diff --git a/db/schema_migrations/20220805183952 b/db/schema_migrations/20220805183952 deleted file mode 100644 index c1a1c03dcefd..000000000000 --- a/db/schema_migrations/20220805183952 +++ /dev/null @@ -1 +0,0 @@ -a90c4b56f6cf16ec62d4a37e03add702ce8d64640b1c61f6f0b18b2d9720f24e \ No newline at end of file diff --git a/db/schema_migrations/20220805193117 b/db/schema_migrations/20220805193117 deleted file mode 100644 index 36523ba08660..000000000000 --- a/db/schema_migrations/20220805193117 +++ /dev/null @@ -1 +0,0 @@ -f64b85003dde31c4f0ba37cb0b550fb50b8d7753bbae3043f28ed51858349572 \ No newline at end of file diff --git a/db/schema_migrations/20220809002011 b/db/schema_migrations/20220809002011 deleted file mode 100644 index 952c468b1cbf..000000000000 --- a/db/schema_migrations/20220809002011 +++ /dev/null @@ -1 +0,0 @@ -12bc6c4a89c4362024d66a21690412f8946b8f6eaf9dc09cccaf8d54b7f45b17 \ No newline at end of file diff --git a/db/schema_migrations/20220809214730 b/db/schema_migrations/20220809214730 deleted file mode 100644 index 0358f9b17988..000000000000 --- a/db/schema_migrations/20220809214730 +++ /dev/null @@ -1 +0,0 @@ -ac9e478c7aaa351059d38dddf9a94eda7481a2bbcd4e9e5361fffb0c999be945 \ No newline at end of file diff --git a/db/schema_migrations/20220809223215 b/db/schema_migrations/20220809223215 deleted file mode 100644 index 84f5e9314a5d..000000000000 --- a/db/schema_migrations/20220809223215 +++ /dev/null @@ -1 +0,0 @@ -1f383c2db106880e8a909b9292023ae099e224d733c87e356c61038bc84cf702 \ No newline at end of file diff --git a/db/schema_migrations/20220815061621 b/db/schema_migrations/20220815061621 deleted file mode 100644 index 66fc6a68014d..000000000000 --- a/db/schema_migrations/20220815061621 +++ /dev/null @@ -1 +0,0 @@ -60a7782e9eaed833362e314fe3ae35f881ee051d9b529c59638833ce92d2db2d \ No newline at end of file diff --git a/db/schema_migrations/20220815152905 b/db/schema_migrations/20220815152905 deleted file mode 100644 index 9e71fe96edcf..000000000000 --- a/db/schema_migrations/20220815152905 +++ /dev/null @@ -1 +0,0 @@ -8494a4a9c708ddfc63d86891b83f01c0883d8b88ebea2177980780a381d74704 \ No newline at end of file diff --git a/db/schema_migrations/20220816075638 b/db/schema_migrations/20220816075638 deleted file mode 100644 index 9f4e1fbc3ee8..000000000000 --- a/db/schema_migrations/20220816075638 +++ /dev/null @@ -1 +0,0 @@ -78e03575edb66cfaeea75f2ff653efc77156ca9e0b1ea0fa989172c3caa0b195 \ No newline at end of file diff --git a/db/schema_migrations/20220816135816 b/db/schema_migrations/20220816135816 deleted file mode 100644 index ff2b64004dde..000000000000 --- a/db/schema_migrations/20220816135816 +++ /dev/null @@ -1 +0,0 @@ -47dcd45d2b9c35c4e3ca707d54a983e8321dd86b2b66d4bccca9001884bc6d13 \ No newline at end of file diff --git a/db/schema_migrations/20220816163444 b/db/schema_migrations/20220816163444 deleted file mode 100644 index 83429df6a438..000000000000 --- a/db/schema_migrations/20220816163444 +++ /dev/null @@ -1 +0,0 @@ -acb8985c03358890280d3a0bbd52215896461cfdd7b4379b488a0aa87ed8182f \ No newline at end of file diff --git a/db/schema_migrations/20220817122907 b/db/schema_migrations/20220817122907 deleted file mode 100644 index fb6951e19d54..000000000000 --- a/db/schema_migrations/20220817122907 +++ /dev/null @@ -1 +0,0 @@ -4db4f50d2e23527516eccdeae60059803df7add21ca7a2c40f1670dba9744496 \ No newline at end of file diff --git a/db/schema_migrations/20220818095225 b/db/schema_migrations/20220818095225 deleted file mode 100644 index 9f420931b9d5..000000000000 --- a/db/schema_migrations/20220818095225 +++ /dev/null @@ -1 +0,0 @@ -ec31d14ce1a9f7b08985c2d304ab768a41139e81b694dcb1ec920623201504e6 \ No newline at end of file diff --git a/db/schema_migrations/20220818125332 b/db/schema_migrations/20220818125332 deleted file mode 100644 index 35c76c4318fd..000000000000 --- a/db/schema_migrations/20220818125332 +++ /dev/null @@ -1 +0,0 @@ -ebcf446aa6579d93c57c2e96e8b670a43bcb6e20216f33a7f535e1bed50ace62 \ No newline at end of file diff --git a/db/schema_migrations/20220818125703 b/db/schema_migrations/20220818125703 deleted file mode 100644 index 1bfebfc50ad7..000000000000 --- a/db/schema_migrations/20220818125703 +++ /dev/null @@ -1 +0,0 @@ -b60f36cd83174ce257baba4a74f0fcba6cd462fa2af6530ff5a3341536058e12 \ No newline at end of file diff --git a/db/schema_migrations/20220818132108 b/db/schema_migrations/20220818132108 deleted file mode 100644 index 77683e61f2e4..000000000000 --- a/db/schema_migrations/20220818132108 +++ /dev/null @@ -1 +0,0 @@ -7abea29f31054d1e0337d3fa434f55cc1c354701da89e257c764b85cd2cc2768 \ No newline at end of file diff --git a/db/schema_migrations/20220818140553 b/db/schema_migrations/20220818140553 deleted file mode 100644 index deedcc9d4b87..000000000000 --- a/db/schema_migrations/20220818140553 +++ /dev/null @@ -1 +0,0 @@ -f46a411a6519723cd2ee0a5b287f26f987195ba76e5753febe47502b1152a543 \ No newline at end of file diff --git a/db/schema_migrations/20220819153725 b/db/schema_migrations/20220819153725 deleted file mode 100644 index 617303214e42..000000000000 --- a/db/schema_migrations/20220819153725 +++ /dev/null @@ -1 +0,0 @@ -5819791e71e9118680e24eceef92364c78ed51dda375db9902f693147ddd9765 \ No newline at end of file diff --git a/db/schema_migrations/20220819162852 b/db/schema_migrations/20220819162852 deleted file mode 100644 index b1d1fcb4c708..000000000000 --- a/db/schema_migrations/20220819162852 +++ /dev/null @@ -1 +0,0 @@ -1e0109c4e1a0512864f3ed16d0a9bc82b40b5c6fb1586acaffe18191821df18f \ No newline at end of file diff --git a/db/schema_migrations/20220819184945 b/db/schema_migrations/20220819184945 deleted file mode 100644 index 511b13fc6cd4..000000000000 --- a/db/schema_migrations/20220819184945 +++ /dev/null @@ -1 +0,0 @@ -3655ee5c3c963d0e413bce86eb9c74cc7bc71c3ab5acb54c76daacff8ff07354 \ No newline at end of file diff --git a/db/schema_migrations/20220820221036 b/db/schema_migrations/20220820221036 deleted file mode 100644 index 6f7c40594877..000000000000 --- a/db/schema_migrations/20220820221036 +++ /dev/null @@ -1 +0,0 @@ -16825936e8e6a4f0a1f001a83ecf81f180ee2eb15589eebe821fee2706456cef \ No newline at end of file diff --git a/db/schema_migrations/20220822071909 b/db/schema_migrations/20220822071909 deleted file mode 100644 index fd8af68d1ee5..000000000000 --- a/db/schema_migrations/20220822071909 +++ /dev/null @@ -1 +0,0 @@ -60a72830780190214d6c86fc2d07dc0fc138f6cc258689c1d106bb456b130047 \ No newline at end of file diff --git a/db/schema_migrations/20220822090656 b/db/schema_migrations/20220822090656 deleted file mode 100644 index bc1ec6d44b94..000000000000 --- a/db/schema_migrations/20220822090656 +++ /dev/null @@ -1 +0,0 @@ -696550615046e26d4012d8b5a5fb741d85c23d4d0d08a4a781da0123c0543de1 \ No newline at end of file diff --git a/db/schema_migrations/20220822094804 b/db/schema_migrations/20220822094804 deleted file mode 100644 index 6e4e3b0d5e15..000000000000 --- a/db/schema_migrations/20220822094804 +++ /dev/null @@ -1 +0,0 @@ -035e918bcb674fdf1300a5bccbad87806311e6de8589f2db57d7af9cd0108ee9 \ No newline at end of file diff --git a/db/schema_migrations/20220822102651 b/db/schema_migrations/20220822102651 deleted file mode 100644 index 851535d2924c..000000000000 --- a/db/schema_migrations/20220822102651 +++ /dev/null @@ -1 +0,0 @@ -2bf5f851ee8919f2306a36ae299cd3c30943d5cc3356981bab2091ff104ef127 \ No newline at end of file diff --git a/db/schema_migrations/20220822103638 b/db/schema_migrations/20220822103638 deleted file mode 100644 index 5633f697b1b9..000000000000 --- a/db/schema_migrations/20220822103638 +++ /dev/null @@ -1 +0,0 @@ -9aee5b0e3475736170d7169fd3c8ac9933d976ee69a2769dea29ee4bc553af27 \ No newline at end of file diff --git a/db/schema_migrations/20220823084747 b/db/schema_migrations/20220823084747 deleted file mode 100644 index d748dee59167..000000000000 --- a/db/schema_migrations/20220823084747 +++ /dev/null @@ -1 +0,0 @@ -f192ab50bed6dd03ae9c9c51c89d870ad6d2d1cbae129ed2da31fc061b9901d4 \ No newline at end of file diff --git a/db/schema_migrations/20220824114218 b/db/schema_migrations/20220824114218 deleted file mode 100644 index bddb1a00d0b8..000000000000 --- a/db/schema_migrations/20220824114218 +++ /dev/null @@ -1 +0,0 @@ -7674883ca0ee06d9e70841ca8e01a8e4e74eb5958797032a134afa6790699c86 \ No newline at end of file diff --git a/db/schema_migrations/20220824175648 b/db/schema_migrations/20220824175648 deleted file mode 100644 index 7a54d9c2a41d..000000000000 --- a/db/schema_migrations/20220824175648 +++ /dev/null @@ -1 +0,0 @@ -5f2c56f9dd6f7ddbf34718f37fc9c37dfd9afeeae9cd2efb9fd465874b6ea8c0 \ No newline at end of file diff --git a/db/schema_migrations/20220824194103 b/db/schema_migrations/20220824194103 deleted file mode 100644 index 388bc5dfe663..000000000000 --- a/db/schema_migrations/20220824194103 +++ /dev/null @@ -1 +0,0 @@ -5bc756cf41923c2287c73e298d21ba49bae2ff6edad1629d078d192cb85dc5b8 \ No newline at end of file diff --git a/db/schema_migrations/20220825061250 b/db/schema_migrations/20220825061250 deleted file mode 100644 index 62ce31a672ac..000000000000 --- a/db/schema_migrations/20220825061250 +++ /dev/null @@ -1 +0,0 @@ -0338843ad56b423559e613f00df205122b4f6db194cf49712b2ff46b2ad030e0 \ No newline at end of file diff --git a/db/schema_migrations/20220825105631 b/db/schema_migrations/20220825105631 deleted file mode 100644 index 6d6691cc6a40..000000000000 --- a/db/schema_migrations/20220825105631 +++ /dev/null @@ -1 +0,0 @@ -2e5f7b79076a35fdb61aec46dea27d45f81e47c20f962f12b494fc7a8c714813 \ No newline at end of file diff --git a/db/schema_migrations/20220825134827 b/db/schema_migrations/20220825134827 deleted file mode 100644 index 256a203e005a..000000000000 --- a/db/schema_migrations/20220825134827 +++ /dev/null @@ -1 +0,0 @@ -f70447919b6346e3bcdc029e1493166efd28ae562b94013d80ac280e19787e2a \ No newline at end of file diff --git a/db/schema_migrations/20220825142324 b/db/schema_migrations/20220825142324 deleted file mode 100644 index 98f8863d3d76..000000000000 --- a/db/schema_migrations/20220825142324 +++ /dev/null @@ -1 +0,0 @@ -9df1108b41fdb4546d4c62edffba2a386bcdf486749096b3fb49d289e5c9698d \ No newline at end of file diff --git a/db/schema_migrations/20220826165048 b/db/schema_migrations/20220826165048 deleted file mode 100644 index 0539118356d0..000000000000 --- a/db/schema_migrations/20220826165048 +++ /dev/null @@ -1 +0,0 @@ -75cb9d7b4a0bc8ad26b3bf6bf41a4414bcc4307607de058fc35fe4ece7009423 \ No newline at end of file diff --git a/db/schema_migrations/20220826175058 b/db/schema_migrations/20220826175058 deleted file mode 100644 index 55449ae10475..000000000000 --- a/db/schema_migrations/20220826175058 +++ /dev/null @@ -1 +0,0 @@ -2553878c425173fc41e64723814d4bca8f3f59f98479080e74a85f327412f3d4 \ No newline at end of file diff --git a/db/schema_migrations/20220828094411 b/db/schema_migrations/20220828094411 deleted file mode 100644 index 50acfab59b96..000000000000 --- a/db/schema_migrations/20220828094411 +++ /dev/null @@ -1 +0,0 @@ -7373697e5064a5ecca5881e7b98a30deba033bf8d79d2121cd17200f72815252 \ No newline at end of file diff --git a/db/schema_migrations/20220828131848 b/db/schema_migrations/20220828131848 deleted file mode 100644 index 0cd8dbbebaaa..000000000000 --- a/db/schema_migrations/20220828131848 +++ /dev/null @@ -1 +0,0 @@ -d38668a9110a69f12c4d60886ace04da4f6dd7f250763a888d3c428a74032b7d \ No newline at end of file diff --git a/db/schema_migrations/20220829183356 b/db/schema_migrations/20220829183356 deleted file mode 100644 index 087a8a8ab6bf..000000000000 --- a/db/schema_migrations/20220829183356 +++ /dev/null @@ -1 +0,0 @@ -4d8be5080046eff9c3736cd2494c02b2d2cb1eeea2753479617cb344bc5b1cbb \ No newline at end of file diff --git a/db/schema_migrations/20220830051704 b/db/schema_migrations/20220830051704 deleted file mode 100644 index 5785862da4fd..000000000000 --- a/db/schema_migrations/20220830051704 +++ /dev/null @@ -1 +0,0 @@ -aa0b767ad0e38500e0eef83d5c8306054952363166f8cc2076ce48feeac1b0e1 \ No newline at end of file diff --git a/db/schema_migrations/20220830061704 b/db/schema_migrations/20220830061704 deleted file mode 100644 index 7a0db1acc651..000000000000 --- a/db/schema_migrations/20220830061704 +++ /dev/null @@ -1 +0,0 @@ -badc3556e1dea545bbf8b55fb33065f45598df9b3fda74bffd28e89d7485e0b4 \ No newline at end of file diff --git a/db/schema_migrations/20220830071704 b/db/schema_migrations/20220830071704 deleted file mode 100644 index bc9d7fd0f8b4..000000000000 --- a/db/schema_migrations/20220830071704 +++ /dev/null @@ -1 +0,0 @@ -85e401f0920c6eb13b6756f191ccdf70494ca40f8133f05bbd5f23ba295b115d \ No newline at end of file diff --git a/db/schema_migrations/20220830082928 b/db/schema_migrations/20220830082928 deleted file mode 100644 index 9c7cf011ab75..000000000000 --- a/db/schema_migrations/20220830082928 +++ /dev/null @@ -1 +0,0 @@ -4d7bde950a405f424c0bf3828d21e6bfd16746e091e177abfb397114c5b5b53c \ No newline at end of file diff --git a/db/schema_migrations/20220830114228 b/db/schema_migrations/20220830114228 deleted file mode 100644 index 44b26221fd5b..000000000000 --- a/db/schema_migrations/20220830114228 +++ /dev/null @@ -1 +0,0 @@ -fad5bab727bdaed1d17950d320baecd995dcc8a91816e2cfcdff6d1b393c637d \ No newline at end of file diff --git a/db/schema_migrations/20220830172142 b/db/schema_migrations/20220830172142 deleted file mode 100644 index 3db3c5f4948f..000000000000 --- a/db/schema_migrations/20220830172142 +++ /dev/null @@ -1 +0,0 @@ -77d17e190cc1b879960763ef32458480897e3da9483503d99c18b5aacd080ce3 \ No newline at end of file diff --git a/db/schema_migrations/20220831021358 b/db/schema_migrations/20220831021358 deleted file mode 100644 index 186bfbdb4c36..000000000000 --- a/db/schema_migrations/20220831021358 +++ /dev/null @@ -1 +0,0 @@ -a1bca159b3ea6abbe3f3178bb1106b3b1886de74dfcdf0a41ec8a48ac6bd421a \ No newline at end of file diff --git a/db/schema_migrations/20220831090454 b/db/schema_migrations/20220831090454 deleted file mode 100644 index 70f41257873f..000000000000 --- a/db/schema_migrations/20220831090454 +++ /dev/null @@ -1 +0,0 @@ -681514d675382385f77cbcb5ec22038555670f95a35f1ced42554452718bd193 \ No newline at end of file diff --git a/db/schema_migrations/20220831132802 b/db/schema_migrations/20220831132802 deleted file mode 100644 index 542bf0c240b8..000000000000 --- a/db/schema_migrations/20220831132802 +++ /dev/null @@ -1 +0,0 @@ -ce0fdbed5966929816028cdd27f597ebb722ff0058d4e78b700a96952dd1274f \ No newline at end of file diff --git a/db/schema_migrations/20220831182105 b/db/schema_migrations/20220831182105 deleted file mode 100644 index 6f4b0f46ff1a..000000000000 --- a/db/schema_migrations/20220831182105 +++ /dev/null @@ -1 +0,0 @@ -80828666cac381dde65dc208764b6e1c7fe703b63c708410f72afdd33886fc60 \ No newline at end of file diff --git a/db/schema_migrations/20220901035722 b/db/schema_migrations/20220901035722 deleted file mode 100644 index aa9ea1cdf217..000000000000 --- a/db/schema_migrations/20220901035722 +++ /dev/null @@ -1 +0,0 @@ -afcbf032220e9e40ab6ae25d6ac8ea9df7f46649bf70219be9b206af6d9d0c7c \ No newline at end of file diff --git a/db/schema_migrations/20220901035725 b/db/schema_migrations/20220901035725 deleted file mode 100644 index 3c60c0188a21..000000000000 --- a/db/schema_migrations/20220901035725 +++ /dev/null @@ -1 +0,0 @@ -877ff6aab260278dfa3e886f093f34ee8004bbdaec2aabc12cebee37a879fd8d \ No newline at end of file diff --git a/db/schema_migrations/20220901071310 b/db/schema_migrations/20220901071310 deleted file mode 100644 index 9134d6669a03..000000000000 --- a/db/schema_migrations/20220901071310 +++ /dev/null @@ -1 +0,0 @@ -dee16fbf6edef6da0c9c55b0dca290bc1a1939b8d747ace6594a4d73a70adc7d \ No newline at end of file diff --git a/db/schema_migrations/20220901071355 b/db/schema_migrations/20220901071355 deleted file mode 100644 index 5e8681b9ff08..000000000000 --- a/db/schema_migrations/20220901071355 +++ /dev/null @@ -1 +0,0 @@ -3fe94b8d0102c5b5ed7824477cf4a535e42da9a232a320f770442530c77eb960 \ No newline at end of file diff --git a/db/schema_migrations/20220901073300 b/db/schema_migrations/20220901073300 deleted file mode 100644 index 47cba2c6c052..000000000000 --- a/db/schema_migrations/20220901073300 +++ /dev/null @@ -1 +0,0 @@ -92ca7bd3f150c9d447e6ab2152b7039379fece41bdef85addcf59b464dc95eb8 \ No newline at end of file diff --git a/db/schema_migrations/20220901090004 b/db/schema_migrations/20220901090004 deleted file mode 100644 index a0302cfe1ede..000000000000 --- a/db/schema_migrations/20220901090004 +++ /dev/null @@ -1 +0,0 @@ -eab8630158a70df1246bf5c12c2d93d9fa855140c65bde4665d1d13f371b561c \ No newline at end of file diff --git a/db/schema_migrations/20220901092853 b/db/schema_migrations/20220901092853 deleted file mode 100644 index 2ebe0b9ffeec..000000000000 --- a/db/schema_migrations/20220901092853 +++ /dev/null @@ -1 +0,0 @@ -0d134b0f3ba5adcc515072a2c1f995f3f3a89f298ee84f1f58c2f7afb0b85a0f \ No newline at end of file diff --git a/db/schema_migrations/20220901114501 b/db/schema_migrations/20220901114501 deleted file mode 100644 index e3367fb76121..000000000000 --- a/db/schema_migrations/20220901114501 +++ /dev/null @@ -1 +0,0 @@ -2c18be04f3b5800c84a50763e7650229a6ae02619a2913966af2c936d3d9aec1 \ No newline at end of file diff --git a/db/schema_migrations/20220901124637 b/db/schema_migrations/20220901124637 deleted file mode 100644 index b5a08a248e08..000000000000 --- a/db/schema_migrations/20220901124637 +++ /dev/null @@ -1 +0,0 @@ -59ea43b60e0fb009823d82e99494a7fcb31eeaddc0a6ccbf43009977cdd32526 \ No newline at end of file diff --git a/db/schema_migrations/20220901131828 b/db/schema_migrations/20220901131828 deleted file mode 100644 index b41fef9415b8..000000000000 --- a/db/schema_migrations/20220901131828 +++ /dev/null @@ -1 +0,0 @@ -c32756c482bdda948f911d0405d2373673041c57ebc514cfc5f172ba6fda9185 \ No newline at end of file diff --git a/db/schema_migrations/20220901184106 b/db/schema_migrations/20220901184106 deleted file mode 100644 index d529617762a5..000000000000 --- a/db/schema_migrations/20220901184106 +++ /dev/null @@ -1 +0,0 @@ -3934393670a67a38e0e558f7be2cb2b2a51d268c49f5992624dedfb2bc826ee4 \ No newline at end of file diff --git a/db/schema_migrations/20220901184246 b/db/schema_migrations/20220901184246 deleted file mode 100644 index 556f3ff1b3ed..000000000000 --- a/db/schema_migrations/20220901184246 +++ /dev/null @@ -1 +0,0 @@ -fe06d38ab5a86850e5b915243dd70d0fe7fef9a61d9bd54c71651aa8eb1eb0e3 \ No newline at end of file diff --git a/db/schema_migrations/20220901212027 b/db/schema_migrations/20220901212027 deleted file mode 100644 index 8112c3492eb6..000000000000 --- a/db/schema_migrations/20220901212027 +++ /dev/null @@ -1 +0,0 @@ -3e29afa3670370b8f5801523711d0689f1228a880b1941c44798f4bc76bedbb0 \ No newline at end of file diff --git a/db/schema_migrations/20220902065314 b/db/schema_migrations/20220902065314 deleted file mode 100644 index 8197a41403d6..000000000000 --- a/db/schema_migrations/20220902065314 +++ /dev/null @@ -1 +0,0 @@ -d1ca445a17c742d435cba3d898e61242a3df9c92caeadecba147fce858d8cb80 \ No newline at end of file diff --git a/db/schema_migrations/20220902065316 b/db/schema_migrations/20220902065316 deleted file mode 100644 index e9c3598206ed..000000000000 --- a/db/schema_migrations/20220902065316 +++ /dev/null @@ -1 +0,0 @@ -910d87fbab226671b8e12b236be43970f6b2a3083f30df9586b3f8edf779f4af \ No newline at end of file diff --git a/db/schema_migrations/20220902065317 b/db/schema_migrations/20220902065317 deleted file mode 100644 index fa60ee97fef7..000000000000 --- a/db/schema_migrations/20220902065317 +++ /dev/null @@ -1 +0,0 @@ -11c65391a6744d7d7c303c6593dafa8e6dca392675974a2a1df2c164afbd4fe1 \ No newline at end of file diff --git a/db/schema_migrations/20220902065558 b/db/schema_migrations/20220902065558 deleted file mode 100644 index 2886e656d41e..000000000000 --- a/db/schema_migrations/20220902065558 +++ /dev/null @@ -1 +0,0 @@ -cce779cc52b2bb175ccd3d07ac6a7df3711ae362fa0a5004bfc58fa1eb440e1f \ No newline at end of file diff --git a/db/schema_migrations/20220902065611 b/db/schema_migrations/20220902065611 deleted file mode 100644 index 365cb0f6194e..000000000000 --- a/db/schema_migrations/20220902065611 +++ /dev/null @@ -1 +0,0 @@ -8ec0cc23559ba1b83042bed4abf8c47487ecb999fa66e602fbf4a9edac0569ec \ No newline at end of file diff --git a/db/schema_migrations/20220902065623 b/db/schema_migrations/20220902065623 deleted file mode 100644 index cf75e086f317..000000000000 --- a/db/schema_migrations/20220902065623 +++ /dev/null @@ -1 +0,0 @@ -4f2076138e65849d60cf093f140afa1abaa7beea4d6c95048e6743168a7f17a9 \ No newline at end of file diff --git a/db/schema_migrations/20220902065635 b/db/schema_migrations/20220902065635 deleted file mode 100644 index bd131598d788..000000000000 --- a/db/schema_migrations/20220902065635 +++ /dev/null @@ -1 +0,0 @@ -49a86fa87974f2c0cdc5a38726ab792f70c43e7f215495323d0999fd9f6e45f6 \ No newline at end of file diff --git a/db/schema_migrations/20220902065647 b/db/schema_migrations/20220902065647 deleted file mode 100644 index 31ee9352fe65..000000000000 --- a/db/schema_migrations/20220902065647 +++ /dev/null @@ -1 +0,0 @@ -812f25371d731d03bd4727328ad0daaf954595e24a314dd5f1adccdc3a4532c4 \ No newline at end of file diff --git a/db/schema_migrations/20220902111016 b/db/schema_migrations/20220902111016 deleted file mode 100644 index 33ea3c75bba8..000000000000 --- a/db/schema_migrations/20220902111016 +++ /dev/null @@ -1 +0,0 @@ -13a36d34ff1c812a8993be87721b9d9472c26cfb6fcd8f56e9aa3c59d97183a9 \ No newline at end of file diff --git a/db/schema_migrations/20220902111038 b/db/schema_migrations/20220902111038 deleted file mode 100644 index ecfad43fff18..000000000000 --- a/db/schema_migrations/20220902111038 +++ /dev/null @@ -1 +0,0 @@ -65c55f8fe4037d0e492f1c2a4ff83481a0da3ab17f6c63a56c181fba5d5822ba \ No newline at end of file diff --git a/db/schema_migrations/20220902165931 b/db/schema_migrations/20220902165931 deleted file mode 100644 index 3933f0d87fbb..000000000000 --- a/db/schema_migrations/20220902165931 +++ /dev/null @@ -1 +0,0 @@ -b29e850775a327dcf6e37e25a43066a0638a55a4e0bd6b818cf496f0b97c6f82 \ No newline at end of file diff --git a/db/schema_migrations/20220902170131 b/db/schema_migrations/20220902170131 deleted file mode 100644 index e598289a154d..000000000000 --- a/db/schema_migrations/20220902170131 +++ /dev/null @@ -1 +0,0 @@ -5b1c25848e3e890fe27c3a43effce093af5f0fe42118c7976919acef84387a0a \ No newline at end of file diff --git a/db/schema_migrations/20220902204048 b/db/schema_migrations/20220902204048 deleted file mode 100644 index c5fc6ee14485..000000000000 --- a/db/schema_migrations/20220902204048 +++ /dev/null @@ -1 +0,0 @@ -577a3808889d0e53af3c45ee38e852b8e653f7292c0144769811e4662e9c8c7b \ No newline at end of file diff --git a/db/schema_migrations/20220904173342 b/db/schema_migrations/20220904173342 deleted file mode 100644 index 951b667372c3..000000000000 --- a/db/schema_migrations/20220904173342 +++ /dev/null @@ -1 +0,0 @@ -407fd539c6ff5cb8e71a2da80fe9dfb0002a45d5fce84a391b2332a653d6e09e \ No newline at end of file diff --git a/db/schema_migrations/20220904173430 b/db/schema_migrations/20220904173430 deleted file mode 100644 index 6c1750b8784d..000000000000 --- a/db/schema_migrations/20220904173430 +++ /dev/null @@ -1 +0,0 @@ -28b91d351f3d23377d79116bdd268871f755675efb3df647e2bea51482e1aff8 \ No newline at end of file diff --git a/db/schema_migrations/20220905090300 b/db/schema_migrations/20220905090300 deleted file mode 100644 index 32d1ab47c9e3..000000000000 --- a/db/schema_migrations/20220905090300 +++ /dev/null @@ -1 +0,0 @@ -e15a37d20202e204fcf02ab68d3b616eec0501c2c323db69ed2fb39df0d017f6 \ No newline at end of file diff --git a/db/schema_migrations/20220905090339 b/db/schema_migrations/20220905090339 deleted file mode 100644 index 52c2e038c939..000000000000 --- a/db/schema_migrations/20220905090339 +++ /dev/null @@ -1 +0,0 @@ -f3a7e9c501498b22786960694a8c1f35d2db69c8c48319f99dfb81c41aa5c6ca \ No newline at end of file diff --git a/db/schema_migrations/20220905112710 b/db/schema_migrations/20220905112710 deleted file mode 100644 index 9f20a8cc9b62..000000000000 --- a/db/schema_migrations/20220905112710 +++ /dev/null @@ -1 +0,0 @@ -85db0670a8557421a59678f19324411d61220eae12ea68f565d458a7393f6b2e \ No newline at end of file diff --git a/db/schema_migrations/20220905120848 b/db/schema_migrations/20220905120848 deleted file mode 100644 index ebfd3a0b59c2..000000000000 --- a/db/schema_migrations/20220905120848 +++ /dev/null @@ -1 +0,0 @@ -f8196de8a4c8f6e8c6790c0d741b0deb455c533a35f665fffeb70c833d0ecd29 \ No newline at end of file diff --git a/db/schema_migrations/20220906074449 b/db/schema_migrations/20220906074449 deleted file mode 100644 index df657642eb3f..000000000000 --- a/db/schema_migrations/20220906074449 +++ /dev/null @@ -1 +0,0 @@ -fc34cdbddc61ee9c23b790101f911d21892cf2ace34e3615b920817374c803f9 \ No newline at end of file diff --git a/db/schema_migrations/20220906093857 b/db/schema_migrations/20220906093857 deleted file mode 100644 index a5bc36ab6ef9..000000000000 --- a/db/schema_migrations/20220906093857 +++ /dev/null @@ -1 +0,0 @@ -394f346e3a93f8a6b74fd0461eb59f569c6a18f90ae653c330a38e3a3706b5f6 \ No newline at end of file diff --git a/db/schema_migrations/20220906155105 b/db/schema_migrations/20220906155105 deleted file mode 100644 index b5aec9a82798..000000000000 --- a/db/schema_migrations/20220906155105 +++ /dev/null @@ -1 +0,0 @@ -a3eb4d190652c43f95f8823f11957064fcf097a1fd6641562a09de5ae02ceb6e \ No newline at end of file diff --git a/db/schema_migrations/20220906204832 b/db/schema_migrations/20220906204832 deleted file mode 100644 index a63248d6221e..000000000000 --- a/db/schema_migrations/20220906204832 +++ /dev/null @@ -1 +0,0 @@ -bda120b4684900c0763af116557930a77b2dfa3c3884ae7f8d4183db546fa019 \ No newline at end of file diff --git a/db/schema_migrations/20220906212931 b/db/schema_migrations/20220906212931 deleted file mode 100644 index 38f14a166e70..000000000000 --- a/db/schema_migrations/20220906212931 +++ /dev/null @@ -1 +0,0 @@ -0a6bd5578f5180fac269ffd8a78fc87b7bd95be4b0246890d5c57d79f2a856f8 \ No newline at end of file diff --git a/db/schema_migrations/20220907115806 b/db/schema_migrations/20220907115806 deleted file mode 100644 index 878ac9238800..000000000000 --- a/db/schema_migrations/20220907115806 +++ /dev/null @@ -1 +0,0 @@ -bfc9595c9e33afecd07721ab03548bdc5d9dda5be8fff180d84fc644f6c8c977 \ No newline at end of file diff --git a/db/schema_migrations/20220907122648 b/db/schema_migrations/20220907122648 deleted file mode 100644 index 1f743d593c23..000000000000 --- a/db/schema_migrations/20220907122648 +++ /dev/null @@ -1 +0,0 @@ -b576db8eb36b1d214788d301fd756d247c3fa33e13b7083e27c42735b48483e0 \ No newline at end of file diff --git a/db/schema_migrations/20220907124320 b/db/schema_migrations/20220907124320 deleted file mode 100644 index 59077465bf93..000000000000 --- a/db/schema_migrations/20220907124320 +++ /dev/null @@ -1 +0,0 @@ -5b645f66351e9515826be882767ad07671b7b5fad7b942bc74325b05c84130ac \ No newline at end of file diff --git a/db/schema_migrations/20220908125146 b/db/schema_migrations/20220908125146 deleted file mode 100644 index 2b8475f0d704..000000000000 --- a/db/schema_migrations/20220908125146 +++ /dev/null @@ -1 +0,0 @@ -d5d264f90203ba371edcf0688d1227aa69cbf0018033d141257e4c88072ee7d7 \ No newline at end of file diff --git a/db/schema_migrations/20220909091410 b/db/schema_migrations/20220909091410 deleted file mode 100644 index 49738ad23af9..000000000000 --- a/db/schema_migrations/20220909091410 +++ /dev/null @@ -1 +0,0 @@ -34e485c0c94960fc07a3f529aed749c2bbc1a72bb49d064225a37b85134f70f2 \ No newline at end of file diff --git a/db/schema_migrations/20220909094752 b/db/schema_migrations/20220909094752 deleted file mode 100644 index 4660f31f8d03..000000000000 --- a/db/schema_migrations/20220909094752 +++ /dev/null @@ -1 +0,0 @@ -2a0fb7dc05ed2949745cb85df20ad0f46f38f9efc6e7d84e559cff3f647fed9e \ No newline at end of file diff --git a/db/schema_migrations/20220909113809 b/db/schema_migrations/20220909113809 deleted file mode 100644 index 9bf2a6b0e03b..000000000000 --- a/db/schema_migrations/20220909113809 +++ /dev/null @@ -1 +0,0 @@ -ec9f278411b727587be787eabfa356f3c497b1927283a85063d7067495097fe0 \ No newline at end of file diff --git a/db/schema_migrations/20220909114220 b/db/schema_migrations/20220909114220 deleted file mode 100644 index 7100121ace6b..000000000000 --- a/db/schema_migrations/20220909114220 +++ /dev/null @@ -1 +0,0 @@ -2a5833aca02f3d42f0bd0c6861fb244166b9f8bd2a5b29a1d97df9b8cdea5c11 \ No newline at end of file diff --git a/db/schema_migrations/20220912085047 b/db/schema_migrations/20220912085047 deleted file mode 100644 index 7279f94eb21f..000000000000 --- a/db/schema_migrations/20220912085047 +++ /dev/null @@ -1 +0,0 @@ -30d9f3352daa48f529486030e30667a1339b04e96b207be815505477ab498adb \ No newline at end of file diff --git a/db/schema_migrations/20220912110433 b/db/schema_migrations/20220912110433 deleted file mode 100644 index 0e31168be7de..000000000000 --- a/db/schema_migrations/20220912110433 +++ /dev/null @@ -1 +0,0 @@ -3bf30b096f71664f5bfae88cc21b1d7992ebcbbb6eb9eb15348bc689291bffd2 \ No newline at end of file diff --git a/db/schema_migrations/20220912153839 b/db/schema_migrations/20220912153839 deleted file mode 100644 index 26666148feb7..000000000000 --- a/db/schema_migrations/20220912153839 +++ /dev/null @@ -1 +0,0 @@ -9cb59a045dd09fc956683e976d127f8f2346b2b26c25eeeadc4b0ef838fa1d02 \ No newline at end of file diff --git a/db/schema_migrations/20220912180807 b/db/schema_migrations/20220912180807 deleted file mode 100644 index 77fb556b1fd6..000000000000 --- a/db/schema_migrations/20220912180807 +++ /dev/null @@ -1 +0,0 @@ -6959c82221a22ac1a2aba39a1a023f227989ac26b08fc0aa5a0596f597e0098c \ No newline at end of file diff --git a/db/schema_migrations/20220913030552 b/db/schema_migrations/20220913030552 deleted file mode 100644 index 6d6a68788dc2..000000000000 --- a/db/schema_migrations/20220913030552 +++ /dev/null @@ -1 +0,0 @@ -39538feebc6f7f4e1822148567ed369eee1a7ed7ee718f7e913e2b585cc0e808 \ No newline at end of file diff --git a/db/schema_migrations/20220913030624 b/db/schema_migrations/20220913030624 deleted file mode 100644 index 8a0641b4f8c9..000000000000 --- a/db/schema_migrations/20220913030624 +++ /dev/null @@ -1 +0,0 @@ -baac0b236b7e91f9aacd03f3cf1ce84974f6c389529143e9b2813d9b70224e53 \ No newline at end of file diff --git a/db/schema_migrations/20220913043728 b/db/schema_migrations/20220913043728 deleted file mode 100644 index 80dd2b0c9a4c..000000000000 --- a/db/schema_migrations/20220913043728 +++ /dev/null @@ -1 +0,0 @@ -ae25d97cf0f867578fd0308ac4b2dea82710973bb2b6d9df58531b1586462838 \ No newline at end of file diff --git a/db/schema_migrations/20220913082728 b/db/schema_migrations/20220913082728 deleted file mode 100644 index 18b538fada97..000000000000 --- a/db/schema_migrations/20220913082728 +++ /dev/null @@ -1 +0,0 @@ -0143a083e7083e9324a0e27a3a42083b56939cf841eb3d9c26d26b4b774d55d0 \ No newline at end of file diff --git a/db/schema_migrations/20220913082824 b/db/schema_migrations/20220913082824 deleted file mode 100644 index 550ef78804bc..000000000000 --- a/db/schema_migrations/20220913082824 +++ /dev/null @@ -1 +0,0 @@ -8776d132d5f95969003edf7f56213206f2321bc1963b80a50006d07f0c9f3bf4 \ No newline at end of file diff --git a/db/schema_migrations/20220913082930 b/db/schema_migrations/20220913082930 deleted file mode 100644 index 8afd779b269b..000000000000 --- a/db/schema_migrations/20220913082930 +++ /dev/null @@ -1 +0,0 @@ -3ae91ffae238c36a8e5ea021acfca8faa1c817d87078a5df9cf8213f259548a7 \ No newline at end of file diff --git a/db/schema_migrations/20220913083015 b/db/schema_migrations/20220913083015 deleted file mode 100644 index 4f6b2a9459ae..000000000000 --- a/db/schema_migrations/20220913083015 +++ /dev/null @@ -1 +0,0 @@ -19012eef52669209fa487d8a72d3e4363a6588250d9cb068ce7ffed72f95ac11 \ No newline at end of file diff --git a/db/schema_migrations/20220913084123 b/db/schema_migrations/20220913084123 deleted file mode 100644 index 1791350c1fc9..000000000000 --- a/db/schema_migrations/20220913084123 +++ /dev/null @@ -1 +0,0 @@ -e43e754e52339fe333bb91c0b098a394cb211c1dcec36fad023cfa954ecfe5c0 \ No newline at end of file diff --git a/db/schema_migrations/20220914005141 b/db/schema_migrations/20220914005141 deleted file mode 100644 index 88859155884d..000000000000 --- a/db/schema_migrations/20220914005141 +++ /dev/null @@ -1 +0,0 @@ -df7862d3bab250feb867ecf60134bbfdffdfd6ea4f3a5a9b2c7e546e0aa89e3f \ No newline at end of file diff --git a/db/schema_migrations/20220914010233 b/db/schema_migrations/20220914010233 deleted file mode 100644 index 777c73c0be6a..000000000000 --- a/db/schema_migrations/20220914010233 +++ /dev/null @@ -1 +0,0 @@ -be86548616ce5b4e6f0caf6db79c49ac523766257d20c6f5465d21a0e53f46d0 \ No newline at end of file diff --git a/db/schema_migrations/20220914070927 b/db/schema_migrations/20220914070927 deleted file mode 100644 index 7ff18f80defb..000000000000 --- a/db/schema_migrations/20220914070927 +++ /dev/null @@ -1 +0,0 @@ -d8a610c72f2009f3beb89ef2da4d703d3d79e4abfc9c18579eecb03bde4e0683 \ No newline at end of file diff --git a/db/schema_migrations/20220914080716 b/db/schema_migrations/20220914080716 deleted file mode 100644 index 7c807e61c263..000000000000 --- a/db/schema_migrations/20220914080716 +++ /dev/null @@ -1 +0,0 @@ -ffa421a7ffc279cb2751ed9e74c212ab60a3b6f7722d15023d39f7ad97ff1e6c \ No newline at end of file diff --git a/db/schema_migrations/20220914093408 b/db/schema_migrations/20220914093408 deleted file mode 100644 index d18e80f8bfc4..000000000000 --- a/db/schema_migrations/20220914093408 +++ /dev/null @@ -1 +0,0 @@ -3dfa9c266943018e06463b1eaf80fed67df602a9f3ee22c2054c6a05040a7382 \ No newline at end of file diff --git a/db/schema_migrations/20220914112457 b/db/schema_migrations/20220914112457 deleted file mode 100644 index ab67d0abb990..000000000000 --- a/db/schema_migrations/20220914112457 +++ /dev/null @@ -1 +0,0 @@ -766866e84cdafce6506f18e574e1cfb760a581fa7464ce7e29c31d9778c687c0 \ No newline at end of file diff --git a/db/schema_migrations/20220914130800 b/db/schema_migrations/20220914130800 deleted file mode 100644 index 2fab1dfd4b91..000000000000 --- a/db/schema_migrations/20220914130800 +++ /dev/null @@ -1 +0,0 @@ -c0a3269fbd44428439932f3b12b154425eafaab0b0638f7f27a03e784d0f0e32 \ No newline at end of file diff --git a/db/schema_migrations/20220914131449 b/db/schema_migrations/20220914131449 deleted file mode 100644 index f735b7867d10..000000000000 --- a/db/schema_migrations/20220914131449 +++ /dev/null @@ -1 +0,0 @@ -205f1fee1ed33a2b069e51a76b94c72702300c72c4705569be2368f8804f3bce \ No newline at end of file diff --git a/db/schema_migrations/20220914174705 b/db/schema_migrations/20220914174705 deleted file mode 100644 index 2ef8c90a31fd..000000000000 --- a/db/schema_migrations/20220914174705 +++ /dev/null @@ -1 +0,0 @@ -f481a617b3fc4fa95daec75619029dc8ef3a02d55e86b940eda78d6a93e6e78b \ No newline at end of file diff --git a/db/schema_migrations/20220915103831 b/db/schema_migrations/20220915103831 deleted file mode 100644 index 29a516c0e601..000000000000 --- a/db/schema_migrations/20220915103831 +++ /dev/null @@ -1 +0,0 @@ -86eeefedacc05cd6d4da63fd24b55af8e32f00d1c4e21b3f507d08310504adee \ No newline at end of file diff --git a/db/schema_migrations/20220915140802 b/db/schema_migrations/20220915140802 deleted file mode 100644 index 676e295aa144..000000000000 --- a/db/schema_migrations/20220915140802 +++ /dev/null @@ -1 +0,0 @@ -9b0f19a59e104f0df6abac7d58012701dcf9a031116f5cc643e407506e186cc2 \ No newline at end of file diff --git a/db/schema_migrations/20220915192521 b/db/schema_migrations/20220915192521 deleted file mode 100644 index ce848d0f186a..000000000000 --- a/db/schema_migrations/20220915192521 +++ /dev/null @@ -1 +0,0 @@ -9686a948e67f25d64f66187db27699b838b2caef11f27884dd6e868e4bcf7d47 \ No newline at end of file diff --git a/db/schema_migrations/20220916054103 b/db/schema_migrations/20220916054103 deleted file mode 100644 index ab7f027f7ce8..000000000000 --- a/db/schema_migrations/20220916054103 +++ /dev/null @@ -1 +0,0 @@ -d410d105f8af6948dba3efc37469048435237c1e21faa10e66836c85acf33728 \ No newline at end of file diff --git a/db/schema_migrations/20220916065418 b/db/schema_migrations/20220916065418 deleted file mode 100644 index f78f7149e664..000000000000 --- a/db/schema_migrations/20220916065418 +++ /dev/null @@ -1 +0,0 @@ -2950f1826c77539072f66fcc46fefb77dcbcafe4cc8e5d0bdc090b19fc1600c7 \ No newline at end of file diff --git a/db/schema_migrations/20220916070101 b/db/schema_migrations/20220916070101 deleted file mode 100644 index 90afdffcddbc..000000000000 --- a/db/schema_migrations/20220916070101 +++ /dev/null @@ -1 +0,0 @@ -e63bd78b80b7a5a475f0246fb8d2dcb1164f410705dfae44579dce5579655841 \ No newline at end of file diff --git a/db/schema_migrations/20220916094641 b/db/schema_migrations/20220916094641 deleted file mode 100644 index d3ab02d6c59a..000000000000 --- a/db/schema_migrations/20220916094641 +++ /dev/null @@ -1 +0,0 @@ -a5fc50591f5070766ae1d8b4dee195ec91df5fb1aa635c0d39d3d897e54393a5 \ No newline at end of file diff --git a/db/schema_migrations/20220916103311 b/db/schema_migrations/20220916103311 deleted file mode 100644 index cc265c0800ea..000000000000 --- a/db/schema_migrations/20220916103311 +++ /dev/null @@ -1 +0,0 @@ -dbaeae67bb734a491dd40860159285b41d25a3336198f55a52f28190a8f6aeac \ No newline at end of file diff --git a/db/schema_migrations/20220916112841 b/db/schema_migrations/20220916112841 deleted file mode 100644 index 23013f9fdb3e..000000000000 --- a/db/schema_migrations/20220916112841 +++ /dev/null @@ -1 +0,0 @@ -0bc8cd07786c950037731a0443e0d7da9c9692da39f13787b24769dbd122ba88 \ No newline at end of file diff --git a/db/schema_migrations/20220918124223 b/db/schema_migrations/20220918124223 deleted file mode 100644 index 227bca2ab756..000000000000 --- a/db/schema_migrations/20220918124223 +++ /dev/null @@ -1 +0,0 @@ -ff995d7a3c23959c4d4e6c6d0adfd338be36f6c07c98bacd26f282d84b2fa33d \ No newline at end of file diff --git a/db/schema_migrations/20220919023208 b/db/schema_migrations/20220919023208 deleted file mode 100644 index 30c305baaeb0..000000000000 --- a/db/schema_migrations/20220919023208 +++ /dev/null @@ -1 +0,0 @@ -e4e86511961bf3618bd3683e1bc97a8382bfa1369bd76186f01cfac9e80e0593 \ No newline at end of file diff --git a/db/schema_migrations/20220919041604 b/db/schema_migrations/20220919041604 deleted file mode 100644 index e6943902bf31..000000000000 --- a/db/schema_migrations/20220919041604 +++ /dev/null @@ -1 +0,0 @@ -a4115d5542d236a030db180363cf2c816ff68cd2c2a54e74a6b3ba916a40816e \ No newline at end of file diff --git a/db/schema_migrations/20220919050555 b/db/schema_migrations/20220919050555 deleted file mode 100644 index 29d8d1508092..000000000000 --- a/db/schema_migrations/20220919050555 +++ /dev/null @@ -1 +0,0 @@ -ac61a72c2c197735404e6bccf3f2ceb9c3f5ff79c7df58f83b6ab1b55b81e532 \ No newline at end of file diff --git a/db/schema_migrations/20220919062640 b/db/schema_migrations/20220919062640 deleted file mode 100644 index 0284cadd6d6b..000000000000 --- a/db/schema_migrations/20220919062640 +++ /dev/null @@ -1 +0,0 @@ -6b4e0ed9d29ace12f6ae1d4b8177ef998f9a5a3915cca80fa546a9f90ccde887 \ No newline at end of file diff --git a/db/schema_migrations/20220919080303 b/db/schema_migrations/20220919080303 deleted file mode 100644 index 081e25c4ed59..000000000000 --- a/db/schema_migrations/20220919080303 +++ /dev/null @@ -1 +0,0 @@ -9a5ba202075e0022defd834184aa59c60980cdccf7f4111834af6a119713b4c2 \ No newline at end of file diff --git a/db/schema_migrations/20220919080304 b/db/schema_migrations/20220919080304 deleted file mode 100644 index 263128018ca3..000000000000 --- a/db/schema_migrations/20220919080304 +++ /dev/null @@ -1 +0,0 @@ -d5883d3edad5d8cc130f26feb4cc6fdb63e3b46c513ce463bdf7e45a8d7ffcdf \ No newline at end of file diff --git a/db/schema_migrations/20220919225631 b/db/schema_migrations/20220919225631 deleted file mode 100644 index e30af0fd9f73..000000000000 --- a/db/schema_migrations/20220919225631 +++ /dev/null @@ -1 +0,0 @@ -03accc241b8955f0ccfa3b40168e9f194360704d8937cd531683191b8fe4f8c8 \ No newline at end of file diff --git a/db/schema_migrations/20220920022404 b/db/schema_migrations/20220920022404 deleted file mode 100644 index cbf8fedc39d3..000000000000 --- a/db/schema_migrations/20220920022404 +++ /dev/null @@ -1 +0,0 @@ -eec898c4b2ab4d0585d8259b9d0c1e644720c0ba665429434abea9a1062be367 \ No newline at end of file diff --git a/db/schema_migrations/20220920081631 b/db/schema_migrations/20220920081631 deleted file mode 100644 index 071ef93fc7a2..000000000000 --- a/db/schema_migrations/20220920081631 +++ /dev/null @@ -1 +0,0 @@ -081480492cbe6e631f0357b181a883a2bc7f34566f23f119c0ba4df59ee363d6 \ No newline at end of file diff --git a/db/schema_migrations/20220920122121 b/db/schema_migrations/20220920122121 deleted file mode 100644 index 7da41e83a11b..000000000000 --- a/db/schema_migrations/20220920122121 +++ /dev/null @@ -1 +0,0 @@ -fb6b88494168ef86863f41570a2bad1141d6c6e2305522bf622413702e3b3493 \ No newline at end of file diff --git a/db/schema_migrations/20220920124709 b/db/schema_migrations/20220920124709 deleted file mode 100644 index e3b015d44a7f..000000000000 --- a/db/schema_migrations/20220920124709 +++ /dev/null @@ -1 +0,0 @@ -4a975867dc0539049902229521b4d94f940817ffd9196810856c8eb962c57e62 \ No newline at end of file diff --git a/db/schema_migrations/20220920135356 b/db/schema_migrations/20220920135356 deleted file mode 100644 index 714228b2518e..000000000000 --- a/db/schema_migrations/20220920135356 +++ /dev/null @@ -1 +0,0 @@ -477f7b75c7d9b162add500924e5bbd9240ef76f3c56851748af8c6a59d912b7e \ No newline at end of file diff --git a/db/schema_migrations/20220920135632 b/db/schema_migrations/20220920135632 deleted file mode 100644 index b20c7886bf9f..000000000000 --- a/db/schema_migrations/20220920135632 +++ /dev/null @@ -1 +0,0 @@ -ec4d492f229e78a8f0efd8691a0a3f04d5f8125d8e1c7d0f93b45faa034108f7 \ No newline at end of file diff --git a/db/schema_migrations/20220920135717 b/db/schema_migrations/20220920135717 deleted file mode 100644 index 7e64f02956c1..000000000000 --- a/db/schema_migrations/20220920135717 +++ /dev/null @@ -1 +0,0 @@ -06c73930dcc4ce0edfe5fa57ff721b6799f6458ff68f3c37c0eaf1745c8db1f1 \ No newline at end of file diff --git a/db/schema_migrations/20220920141001 b/db/schema_migrations/20220920141001 deleted file mode 100644 index 2e221e49afc6..000000000000 --- a/db/schema_migrations/20220920141001 +++ /dev/null @@ -1 +0,0 @@ -368d6e417d6ac9c4ed3815b67f3247d55a6e4ec8a6e7ac255c7f9f24d3721f59 \ No newline at end of file diff --git a/db/schema_migrations/20220920213504 b/db/schema_migrations/20220920213504 deleted file mode 100644 index 53d31de208d0..000000000000 --- a/db/schema_migrations/20220920213504 +++ /dev/null @@ -1 +0,0 @@ -e683bd10619f9ceee2a5d330ca4d6b9d396ad8934095b707a0eec5d49cdaf2be \ No newline at end of file diff --git a/db/schema_migrations/20220920214524 b/db/schema_migrations/20220920214524 deleted file mode 100644 index fc708e05214a..000000000000 --- a/db/schema_migrations/20220920214524 +++ /dev/null @@ -1 +0,0 @@ -6a4677165bca249c369214aee9fae331fde4dc716544bac93c06f0ee33222455 \ No newline at end of file diff --git a/db/schema_migrations/20220921093355 b/db/schema_migrations/20220921093355 deleted file mode 100644 index 6083a3702798..000000000000 --- a/db/schema_migrations/20220921093355 +++ /dev/null @@ -1 +0,0 @@ -d7640b3756cf8cddf9f798362d6d8445a1d37092e4dff9ae263fe39a661b1e55 \ No newline at end of file diff --git a/db/schema_migrations/20220921111823 b/db/schema_migrations/20220921111823 deleted file mode 100644 index eeca2c10dada..000000000000 --- a/db/schema_migrations/20220921111823 +++ /dev/null @@ -1 +0,0 @@ -f06d7555d3541abbb9fd671df3718645203aef111674b91ad386dac434c4ede2 \ No newline at end of file diff --git a/db/schema_migrations/20220921111831 b/db/schema_migrations/20220921111831 deleted file mode 100644 index a03ad3f67dd4..000000000000 --- a/db/schema_migrations/20220921111831 +++ /dev/null @@ -1 +0,0 @@ -a515d3e34f4b467c5e6fbd9b55135a676277ff6388eb1e3fc14df4b11d8eb3c0 \ No newline at end of file diff --git a/db/schema_migrations/20220921111840 b/db/schema_migrations/20220921111840 deleted file mode 100644 index 7e84d96f124e..000000000000 --- a/db/schema_migrations/20220921111840 +++ /dev/null @@ -1 +0,0 @@ -0fdbb888bdbd4f68619466a8f4384e44062b0cf854790c648a6a060ab1e71806 \ No newline at end of file diff --git a/db/schema_migrations/20220921111849 b/db/schema_migrations/20220921111849 deleted file mode 100644 index 3989dd78aeb5..000000000000 --- a/db/schema_migrations/20220921111849 +++ /dev/null @@ -1 +0,0 @@ -2041cb81c534be0cc45b1cc77fa7fd2e31615129e1ba60a146cca88d58b77605 \ No newline at end of file diff --git a/db/schema_migrations/20220921111857 b/db/schema_migrations/20220921111857 deleted file mode 100644 index 578b2c853f46..000000000000 --- a/db/schema_migrations/20220921111857 +++ /dev/null @@ -1 +0,0 @@ -cbef1d036abb0035d710cf912e554e32fa88df3abaed17cb938e0b18032c7448 \ No newline at end of file diff --git a/db/schema_migrations/20220921111907 b/db/schema_migrations/20220921111907 deleted file mode 100644 index 013f79024c90..000000000000 --- a/db/schema_migrations/20220921111907 +++ /dev/null @@ -1 +0,0 @@ -fbc4c12aedd9d0f183e9444f2cb42c11a2b894c11684e80a5dbe847c7bccb21f \ No newline at end of file diff --git a/db/schema_migrations/20220921144258 b/db/schema_migrations/20220921144258 deleted file mode 100644 index e3d9ad6a4de9..000000000000 --- a/db/schema_migrations/20220921144258 +++ /dev/null @@ -1 +0,0 @@ -531758adf94d39b646e47601989f5f969eda8e9cbc2b2d6285826f9704575d3d \ No newline at end of file diff --git a/db/schema_migrations/20220921174815 b/db/schema_migrations/20220921174815 deleted file mode 100644 index d67929e20298..000000000000 --- a/db/schema_migrations/20220921174815 +++ /dev/null @@ -1 +0,0 @@ -2e20cfa3c1ebe77968ba923b381e0c95cb427613f2bfbed212ced4023bd4334e \ No newline at end of file diff --git a/db/schema_migrations/20220921201347 b/db/schema_migrations/20220921201347 deleted file mode 100644 index d58f316fd026..000000000000 --- a/db/schema_migrations/20220921201347 +++ /dev/null @@ -1 +0,0 @@ -f7c4b6a31434a0f6487fef89ba0c60fd38169e901437667bb6ccf60ba1a3bd4d \ No newline at end of file diff --git a/db/schema_migrations/20220922090236 b/db/schema_migrations/20220922090236 deleted file mode 100644 index 9f873bd86c2c..000000000000 --- a/db/schema_migrations/20220922090236 +++ /dev/null @@ -1 +0,0 @@ -6ce159118651ec93989e8f111528ad2134e46f359c483b60239290d677f9f4f4 \ No newline at end of file diff --git a/db/schema_migrations/20220922143143 b/db/schema_migrations/20220922143143 deleted file mode 100644 index 72074c1efb39..000000000000 --- a/db/schema_migrations/20220922143143 +++ /dev/null @@ -1 +0,0 @@ -79aa2360fdf84d7bee402cf51e29813b9c25acfe809123ac5a3218644a63c71f \ No newline at end of file diff --git a/db/schema_migrations/20220922143612 b/db/schema_migrations/20220922143612 deleted file mode 100644 index 4f93a218c746..000000000000 --- a/db/schema_migrations/20220922143612 +++ /dev/null @@ -1 +0,0 @@ -4685b471f00f8ef5e8d8e521c50dc276c757c9f9caa50b1aa20c1f98b8b008c5 \ No newline at end of file diff --git a/db/schema_migrations/20220922143634 b/db/schema_migrations/20220922143634 deleted file mode 100644 index 50d07dcf9de6..000000000000 --- a/db/schema_migrations/20220922143634 +++ /dev/null @@ -1 +0,0 @@ -f48217567db22e6a4d3a32c607911da9f9a39a37d75be158a893ce840f718f02 \ No newline at end of file diff --git a/db/schema_migrations/20220922204106 b/db/schema_migrations/20220922204106 deleted file mode 100644 index 0eabc077b58d..000000000000 --- a/db/schema_migrations/20220922204106 +++ /dev/null @@ -1 +0,0 @@ -e1106d4b77704a1ac4c185e0a6b500966dc61f46569de55650875aa6a89b7f9d \ No newline at end of file diff --git a/db/schema_migrations/20220923052531 b/db/schema_migrations/20220923052531 deleted file mode 100644 index db7d24075f14..000000000000 --- a/db/schema_migrations/20220923052531 +++ /dev/null @@ -1 +0,0 @@ -198d1447a8a857ea18409fe99e5a5a616d966b480bb6fc8f05613a651fdcd8a9 \ No newline at end of file diff --git a/db/schema_migrations/20220923060226 b/db/schema_migrations/20220923060226 deleted file mode 100644 index daaf24076071..000000000000 --- a/db/schema_migrations/20220923060226 +++ /dev/null @@ -1 +0,0 @@ -19799d51a2b9acc7b1642edebea85ca8a19d2dd8368c4f0814c6c7a4c529ef98 \ No newline at end of file diff --git a/db/schema_migrations/20220923103006 b/db/schema_migrations/20220923103006 deleted file mode 100644 index 8a11ebc8f8fd..000000000000 --- a/db/schema_migrations/20220923103006 +++ /dev/null @@ -1 +0,0 @@ -184e634f62549f3fa2f183003957a2f5a5c53b34394ec3430eb0293076ae177a \ No newline at end of file diff --git a/db/schema_migrations/20220926023734 b/db/schema_migrations/20220926023734 deleted file mode 100644 index 2fd1175b02d0..000000000000 --- a/db/schema_migrations/20220926023734 +++ /dev/null @@ -1 +0,0 @@ -efa3d1c94b5de9c68ae3d007e95bbbae9582f4354e922b00a02ff5753dbe4d05 \ No newline at end of file diff --git a/db/schema_migrations/20220927155407 b/db/schema_migrations/20220927155407 deleted file mode 100644 index a704ba7cb416..000000000000 --- a/db/schema_migrations/20220927155407 +++ /dev/null @@ -1 +0,0 @@ -97bdc9d31ed93897f3133459779207b3b750530b615e243a625681d433090e94 \ No newline at end of file diff --git a/db/schema_migrations/20220927171740 b/db/schema_migrations/20220927171740 deleted file mode 100644 index e775b2112007..000000000000 --- a/db/schema_migrations/20220927171740 +++ /dev/null @@ -1 +0,0 @@ -5ba49d525d6238975f990c94972ee4f3587a2446a4873e6e8a7f4791cf015b7e \ No newline at end of file diff --git a/db/schema_migrations/20220928201920 b/db/schema_migrations/20220928201920 deleted file mode 100644 index e77f9abf6a0c..000000000000 --- a/db/schema_migrations/20220928201920 +++ /dev/null @@ -1 +0,0 @@ -b2492ebefc3738dfe706379ef664d3f28315102acc1c0681ba67e6aae62861d7 \ No newline at end of file diff --git a/db/schema_migrations/20220928225711 b/db/schema_migrations/20220928225711 deleted file mode 100644 index fd7a8b303d17..000000000000 --- a/db/schema_migrations/20220928225711 +++ /dev/null @@ -1 +0,0 @@ -5ec9b3f36a986cbb86c8005a4425307f0f4399a4a4030460e715370630cb9490 \ No newline at end of file diff --git a/db/schema_migrations/20220929081645 b/db/schema_migrations/20220929081645 deleted file mode 100644 index a6fb1a6a74d8..000000000000 --- a/db/schema_migrations/20220929081645 +++ /dev/null @@ -1 +0,0 @@ -ac34f2215272e69efc486affa8ad06347221d63ddadafe995f6e98f355a49936 \ No newline at end of file diff --git a/db/schema_migrations/20220929091500 b/db/schema_migrations/20220929091500 deleted file mode 100644 index 66997dd37d94..000000000000 --- a/db/schema_migrations/20220929091500 +++ /dev/null @@ -1 +0,0 @@ -c636f10079d7b718b777b78c22b66ca8828518d9dc8a3f6abe47e25af14ae20b \ No newline at end of file diff --git a/db/schema_migrations/20220929101947 b/db/schema_migrations/20220929101947 deleted file mode 100644 index 4969db4f2832..000000000000 --- a/db/schema_migrations/20220929101947 +++ /dev/null @@ -1 +0,0 @@ -946e773d09863fe029507ac44b41a61ed0b6b766f7296759743cf09addfacfcd \ No newline at end of file diff --git a/db/schema_migrations/20220929171925 b/db/schema_migrations/20220929171925 deleted file mode 100644 index b2e471bb32cb..000000000000 --- a/db/schema_migrations/20220929171925 +++ /dev/null @@ -1 +0,0 @@ -352e1b200a7e5074c58fdcfd0c9ae9b3535054a0b3d9852caabde635d9a1ad94 \ No newline at end of file diff --git a/db/schema_migrations/20220929172356 b/db/schema_migrations/20220929172356 deleted file mode 100644 index 3200898ddb5b..000000000000 --- a/db/schema_migrations/20220929172356 +++ /dev/null @@ -1 +0,0 @@ -9cdc6169dc4925f43aabb2f4bcf597333a4112135001a5d1a6961853a78c90da \ No newline at end of file diff --git a/db/schema_migrations/20220929194453 b/db/schema_migrations/20220929194453 deleted file mode 100644 index 25d512b792b0..000000000000 --- a/db/schema_migrations/20220929194453 +++ /dev/null @@ -1 +0,0 @@ -0f625bd9df16d035dd8cd73d5097e5b5f4d1b900183bd6ccf4b1489319535df6 \ No newline at end of file diff --git a/db/schema_migrations/20220929213730 b/db/schema_migrations/20220929213730 deleted file mode 100644 index 469e84f8217c..000000000000 --- a/db/schema_migrations/20220929213730 +++ /dev/null @@ -1 +0,0 @@ -f74b8524fcdabd1646bbb47a32f8e3a29a848eb457f465d33a9e81bf4462e2ea \ No newline at end of file diff --git a/db/schema_migrations/20220930110127 b/db/schema_migrations/20220930110127 deleted file mode 100644 index b88603e17d90..000000000000 --- a/db/schema_migrations/20220930110127 +++ /dev/null @@ -1 +0,0 @@ -6a37ea8ea1ae2b90d12db67b2fa6adac2ed5b936f6c45d2142dc8390883f764a \ No newline at end of file diff --git a/db/schema_migrations/20220930125609 b/db/schema_migrations/20220930125609 deleted file mode 100644 index 65e00dbd9454..000000000000 --- a/db/schema_migrations/20220930125609 +++ /dev/null @@ -1 +0,0 @@ -cba5fad6379efe681dfc19a02522de7c904705790de588d07ed12f032fab760e \ No newline at end of file diff --git a/db/schema_migrations/20221002234454 b/db/schema_migrations/20221002234454 deleted file mode 100644 index d01230136bed..000000000000 --- a/db/schema_migrations/20221002234454 +++ /dev/null @@ -1 +0,0 @@ -781ed5eaf05091e5d01ec23a9f66f3722c41b4a87ecdabe48158ce82c5cbb325 \ No newline at end of file diff --git a/db/schema_migrations/20221003151747 b/db/schema_migrations/20221003151747 deleted file mode 100644 index 70a8babf3080..000000000000 --- a/db/schema_migrations/20221003151747 +++ /dev/null @@ -1 +0,0 @@ -84b89419404d26f7d2783a3adf1fa7b7d89417d6533b393ae6e0de40a31e299a \ No newline at end of file diff --git a/db/schema_migrations/20221003192827 b/db/schema_migrations/20221003192827 deleted file mode 100644 index 803c269b6e0d..000000000000 --- a/db/schema_migrations/20221003192827 +++ /dev/null @@ -1 +0,0 @@ -7fe33b22601469d1f15ee67241775e7a14d96841a49129fe98bfd2f44cf6666f \ No newline at end of file diff --git a/db/schema_migrations/20221004074910 b/db/schema_migrations/20221004074910 deleted file mode 100644 index e316408ef0f2..000000000000 --- a/db/schema_migrations/20221004074910 +++ /dev/null @@ -1 +0,0 @@ -df8b2f83f93fecd3450cb7fc2619e7ddbfde014a885d0a414076908bbcbbdf9f \ No newline at end of file diff --git a/db/schema_migrations/20221004074914 b/db/schema_migrations/20221004074914 deleted file mode 100644 index a197fe1b9ea4..000000000000 --- a/db/schema_migrations/20221004074914 +++ /dev/null @@ -1 +0,0 @@ -d6459263b828e6807f473adb7ba534d78055ab1b5137478a8e96cd500297ff54 \ No newline at end of file diff --git a/db/schema_migrations/20221004092038 b/db/schema_migrations/20221004092038 deleted file mode 100644 index c7305a46cfdf..000000000000 --- a/db/schema_migrations/20221004092038 +++ /dev/null @@ -1 +0,0 @@ -584d43304f92cc638783ffc5c8ab2dc8e511169c76da7661cb4c5ddded6c02d1 \ No newline at end of file diff --git a/db/schema_migrations/20221004094814 b/db/schema_migrations/20221004094814 deleted file mode 100644 index f3ac2ccb0d3c..000000000000 --- a/db/schema_migrations/20221004094814 +++ /dev/null @@ -1 +0,0 @@ -b274eaa3ef886e5de6fe5dacb11ab72a724a07a5022da6c01b94309fdaebfd0b \ No newline at end of file diff --git a/db/schema_migrations/20221005072353 b/db/schema_migrations/20221005072353 deleted file mode 100644 index 3249a062aa78..000000000000 --- a/db/schema_migrations/20221005072353 +++ /dev/null @@ -1 +0,0 @@ -6b90dfb738c597a45ecaae792e97e1ae0decb93779ecc35fbc2fbaedafb5b9d1 \ No newline at end of file diff --git a/db/schema_migrations/20221005094926 b/db/schema_migrations/20221005094926 deleted file mode 100644 index 7606c06170fb..000000000000 --- a/db/schema_migrations/20221005094926 +++ /dev/null @@ -1 +0,0 @@ -ab93968543b6aec0bc304a2c0dc051f63a29b4765df11432fba45325e5e75e55 \ No newline at end of file diff --git a/db/schema_migrations/20221005103000 b/db/schema_migrations/20221005103000 deleted file mode 100644 index 6403e3106a29..000000000000 --- a/db/schema_migrations/20221005103000 +++ /dev/null @@ -1 +0,0 @@ -ac1aa3697f6e4230bfdc41f34e2e87ef49f697cfa46139fe3ac91a42b7bf4b91 \ No newline at end of file diff --git a/db/schema_migrations/20221005103010 b/db/schema_migrations/20221005103010 deleted file mode 100644 index 9bf2bba87ca9..000000000000 --- a/db/schema_migrations/20221005103010 +++ /dev/null @@ -1 +0,0 @@ -85deb0dcce9b1d43b3c978f2615afabe1f29304f65cf01a82d9b116d3276337f \ No newline at end of file diff --git a/db/schema_migrations/20221006070927 b/db/schema_migrations/20221006070927 deleted file mode 100644 index 804f77384e04..000000000000 --- a/db/schema_migrations/20221006070927 +++ /dev/null @@ -1 +0,0 @@ -933cb5a869696f2343b0b8dfc32f94a64ed7a5119c3f6b2b64ce30e3ae4e555c \ No newline at end of file diff --git a/db/schema_migrations/20221006083240 b/db/schema_migrations/20221006083240 deleted file mode 100644 index 51c509f471cb..000000000000 --- a/db/schema_migrations/20221006083240 +++ /dev/null @@ -1 +0,0 @@ -0ad92f76e14b2e9286b2f77f32c00dba8ae29b64035f79641451edfdc725c92a \ No newline at end of file diff --git a/db/schema_migrations/20221006131506 b/db/schema_migrations/20221006131506 deleted file mode 100644 index cafb6518fddb..000000000000 --- a/db/schema_migrations/20221006131506 +++ /dev/null @@ -1 +0,0 @@ -2652f733d5998b4dacc89a7c43af45e6d411235efcdc120be02bbf04eb1c55d6 \ No newline at end of file diff --git a/db/schema_migrations/20221006141145 b/db/schema_migrations/20221006141145 deleted file mode 100644 index 269913ca389a..000000000000 --- a/db/schema_migrations/20221006141145 +++ /dev/null @@ -1 +0,0 @@ -ae45bc7d67354b64e359ac7fadefec6a0d81cd529f5ae2517a6a6a5d250f9024 \ No newline at end of file diff --git a/db/schema_migrations/20221006172302 b/db/schema_migrations/20221006172302 deleted file mode 100644 index 361fdd78086d..000000000000 --- a/db/schema_migrations/20221006172302 +++ /dev/null @@ -1 +0,0 @@ -19e5ca6f9716fd41bfe8a103dab8a1dc37107f99503abedbdcb8175b699283f2 \ No newline at end of file diff --git a/db/schema_migrations/20221008032350 b/db/schema_migrations/20221008032350 deleted file mode 100644 index 8b76b056a77b..000000000000 --- a/db/schema_migrations/20221008032350 +++ /dev/null @@ -1 +0,0 @@ -c5e373b1b416455b67b7bc0affe244295e1f1a2f105fe8ef6efddf8b07da2a86 \ No newline at end of file diff --git a/db/schema_migrations/20221009085130 b/db/schema_migrations/20221009085130 deleted file mode 100644 index cbdfb3014cdc..000000000000 --- a/db/schema_migrations/20221009085130 +++ /dev/null @@ -1 +0,0 @@ -125ce9bf81966840774eb69be7995c1a8e2abd901fe5f19b73df43a577a9dc44 \ No newline at end of file diff --git a/db/schema_migrations/20221010074914 b/db/schema_migrations/20221010074914 deleted file mode 100644 index 272a8d038cca..000000000000 --- a/db/schema_migrations/20221010074914 +++ /dev/null @@ -1 +0,0 @@ -c5ef65edf6e87495bc4dc16c636b2f2d8cbd63f3903cf5ed1364206b83411ba9 \ No newline at end of file diff --git a/db/schema_migrations/20221010103207 b/db/schema_migrations/20221010103207 deleted file mode 100644 index 24fcfc34c41e..000000000000 --- a/db/schema_migrations/20221010103207 +++ /dev/null @@ -1 +0,0 @@ -04997da3ff51b8be05fd765c6534f92a15eea0a4ee4a535f1cb84c6da4e1bdd5 \ No newline at end of file diff --git a/db/schema_migrations/20221010121510 b/db/schema_migrations/20221010121510 deleted file mode 100644 index 4c73958df103..000000000000 --- a/db/schema_migrations/20221010121510 +++ /dev/null @@ -1 +0,0 @@ -ab9ab20d1a220e715a758f6175fcaf5c62cb240f49a2ad4227f7cd11f030fa1d \ No newline at end of file diff --git a/db/schema_migrations/20221010121807 b/db/schema_migrations/20221010121807 deleted file mode 100644 index e5ca80075193..000000000000 --- a/db/schema_migrations/20221010121807 +++ /dev/null @@ -1 +0,0 @@ -44e6b2519ef285366d1a2b4ea6efe18a9c22bfdb545c11502eae9383123b6001 \ No newline at end of file diff --git a/db/schema_migrations/20221010122138 b/db/schema_migrations/20221010122138 deleted file mode 100644 index 9a9898a37b05..000000000000 --- a/db/schema_migrations/20221010122138 +++ /dev/null @@ -1 +0,0 @@ -1275aff394d75cc254e664a81f52880bc248343dad7a07162973cafe268d40e6 \ No newline at end of file diff --git a/db/schema_migrations/20221010122352 b/db/schema_migrations/20221010122352 deleted file mode 100644 index a785dc225398..000000000000 --- a/db/schema_migrations/20221010122352 +++ /dev/null @@ -1 +0,0 @@ -a982eed3131805db693882a8da7c5c5d1572f7825eb51a45c468bd5dfbded58b \ No newline at end of file diff --git a/db/schema_migrations/20221010123040 b/db/schema_migrations/20221010123040 deleted file mode 100644 index 85ad72c702bc..000000000000 --- a/db/schema_migrations/20221010123040 +++ /dev/null @@ -1 +0,0 @@ -a3c66e57959f3e183a5b933138c9deedb5575e0b90b3a862b7b8e20331ffa31e \ No newline at end of file diff --git a/db/schema_migrations/20221010141500 b/db/schema_migrations/20221010141500 deleted file mode 100644 index 8479fb0519ca..000000000000 --- a/db/schema_migrations/20221010141500 +++ /dev/null @@ -1 +0,0 @@ -250ec3ff701dacd333d669f128762e9f035a626f2f7720c6e7e1dc61499d431d \ No newline at end of file diff --git a/db/schema_migrations/20221010162137 b/db/schema_migrations/20221010162137 deleted file mode 100644 index 567b788a5c6a..000000000000 --- a/db/schema_migrations/20221010162137 +++ /dev/null @@ -1 +0,0 @@ -c9f5827072920fdc52efeaf1ab39c67c48896a6288c5720e4be96070340ce6d8 \ No newline at end of file diff --git a/db/schema_migrations/20221010184839 b/db/schema_migrations/20221010184839 deleted file mode 100644 index de24fc0a4f0b..000000000000 --- a/db/schema_migrations/20221010184839 +++ /dev/null @@ -1 +0,0 @@ -062f807c0bf823b00e19cc55323faedd506b19d6492d1f23f09aaa662eaddcfb \ No newline at end of file diff --git a/db/schema_migrations/20221010201815 b/db/schema_migrations/20221010201815 deleted file mode 100644 index 8c4c06ba4f68..000000000000 --- a/db/schema_migrations/20221010201815 +++ /dev/null @@ -1 +0,0 @@ -f1f30c3581e35a92f3ede694e1eb70c6fc4dccfdb9e377b5f9046e18eaca2c54 \ No newline at end of file diff --git a/db/schema_migrations/20221010202339 b/db/schema_migrations/20221010202339 deleted file mode 100644 index c536fc8a3dc1..000000000000 --- a/db/schema_migrations/20221010202339 +++ /dev/null @@ -1 +0,0 @@ -33bbeaa1d94cfa936de422fcc2f0456d235dde13072f6907cd514a12956ef9aa \ No newline at end of file diff --git a/db/schema_migrations/20221010202408 b/db/schema_migrations/20221010202408 deleted file mode 100644 index 2007c27f7fd8..000000000000 --- a/db/schema_migrations/20221010202408 +++ /dev/null @@ -1 +0,0 @@ -0e985bac7558768e0b97316c1362cb411fed5605c0a313c3872e86f7242f8d36 \ No newline at end of file diff --git a/db/schema_migrations/20221011062254 b/db/schema_migrations/20221011062254 deleted file mode 100644 index a64a2dd4bfe1..000000000000 --- a/db/schema_migrations/20221011062254 +++ /dev/null @@ -1 +0,0 @@ -ae4f3c26acd69aa0c701651a246a1359c91a0daad0daad64ba8dc186268880a4 \ No newline at end of file diff --git a/db/schema_migrations/20221011113928 b/db/schema_migrations/20221011113928 deleted file mode 100644 index 1552b7193f34..000000000000 --- a/db/schema_migrations/20221011113928 +++ /dev/null @@ -1 +0,0 @@ -70f78c3af8d43ea71a795d0cd28bf74aa8a5232ea5e5b9dcb59699b5f8cccfaa \ No newline at end of file diff --git a/db/schema_migrations/20221011162637 b/db/schema_migrations/20221011162637 deleted file mode 100644 index c16e511e5168..000000000000 --- a/db/schema_migrations/20221011162637 +++ /dev/null @@ -1 +0,0 @@ -b39261356f0ca89d543f680e1b28f3e3bdf468b02d6f8ea21c6ea1a1af91420c \ No newline at end of file diff --git a/db/schema_migrations/20221011210455 b/db/schema_migrations/20221011210455 deleted file mode 100644 index 2a6a7349f5d8..000000000000 --- a/db/schema_migrations/20221011210455 +++ /dev/null @@ -1 +0,0 @@ -3c2445871613743560b2dd0a111fafab30f503b1c462e7ba7aee03f85e25f775 \ No newline at end of file diff --git a/db/schema_migrations/20221012033107 b/db/schema_migrations/20221012033107 deleted file mode 100644 index ba1df6370d31..000000000000 --- a/db/schema_migrations/20221012033107 +++ /dev/null @@ -1 +0,0 @@ -23252a63b8aab6a062cf22db563f8518213d40110449732866e6d8d5092d369e \ No newline at end of file diff --git a/db/schema_migrations/20221012135524 b/db/schema_migrations/20221012135524 deleted file mode 100644 index 7a4503dde086..000000000000 --- a/db/schema_migrations/20221012135524 +++ /dev/null @@ -1 +0,0 @@ -e5fc4ce0fdba01b55de0a1d5a968ab9b1ad3bc930ab61c6187a223e62252c8bc \ No newline at end of file diff --git a/db/schema_migrations/20221012182701 b/db/schema_migrations/20221012182701 deleted file mode 100644 index 5a6b47c40267..000000000000 --- a/db/schema_migrations/20221012182701 +++ /dev/null @@ -1 +0,0 @@ -82f67746e79bcc63e5674f2e009eb9a827e019409c9277f6cd1ce2e41c50c296 \ No newline at end of file diff --git a/db/schema_migrations/20221013103738 b/db/schema_migrations/20221013103738 deleted file mode 100644 index 8643304c5b1a..000000000000 --- a/db/schema_migrations/20221013103738 +++ /dev/null @@ -1 +0,0 @@ -704d0973ce5fec01228a28d5551ecc88ccf057e246ee75f8f5b0cc0a08815095 \ No newline at end of file diff --git a/db/schema_migrations/20221013154159 b/db/schema_migrations/20221013154159 deleted file mode 100644 index 2e147bb199dc..000000000000 --- a/db/schema_migrations/20221013154159 +++ /dev/null @@ -1 +0,0 @@ -dbf241baf6d3deb1ef29a7cdca012050cab51c5f86762a0363d9dc4dc14fd804 \ No newline at end of file diff --git a/db/schema_migrations/20221013215832 b/db/schema_migrations/20221013215832 deleted file mode 100644 index 106cb540d6e9..000000000000 --- a/db/schema_migrations/20221013215832 +++ /dev/null @@ -1 +0,0 @@ -2ab913b0b479fc29d939d03b5df95dc2a8c5a155f1b35a606e300802cb3aa9d3 \ No newline at end of file diff --git a/db/schema_migrations/20221014031033 b/db/schema_migrations/20221014031033 deleted file mode 100644 index 6a24a2027c78..000000000000 --- a/db/schema_migrations/20221014031033 +++ /dev/null @@ -1 +0,0 @@ -bc05939dc672c078161cd9b7dbd7f92601edb6888a77c62adb014964e30c6ae8 \ No newline at end of file diff --git a/db/schema_migrations/20221014034338 b/db/schema_migrations/20221014034338 deleted file mode 100644 index c90dfebb72b9..000000000000 --- a/db/schema_migrations/20221014034338 +++ /dev/null @@ -1 +0,0 @@ -58ee7f51a0da4ee4ec471d4492106d1fc3124419ba83591913967d6bd38105e5 \ No newline at end of file diff --git a/db/schema_migrations/20221014190040 b/db/schema_migrations/20221014190040 deleted file mode 100644 index ce6387c3e435..000000000000 --- a/db/schema_migrations/20221014190040 +++ /dev/null @@ -1 +0,0 @@ -2ac315a49a5026938abc21a98974fd42b39b7535d86530085a01fc7f5687bb0e \ No newline at end of file diff --git a/db/schema_migrations/20221015000511 b/db/schema_migrations/20221015000511 deleted file mode 100644 index 16845f8859c8..000000000000 --- a/db/schema_migrations/20221015000511 +++ /dev/null @@ -1 +0,0 @@ -001b43cc0006b8f936310171ff2d12993eece1378f64945e6835728f540815ba \ No newline at end of file diff --git a/db/schema_migrations/20221017084208 b/db/schema_migrations/20221017084208 deleted file mode 100644 index 3fb095585494..000000000000 --- a/db/schema_migrations/20221017084208 +++ /dev/null @@ -1 +0,0 @@ -d28932a3d52279446e3ef84806a6bb6b53dc10c5b9ae81e2c626203da4238a9a \ No newline at end of file diff --git a/db/schema_migrations/20221017084227 b/db/schema_migrations/20221017084227 deleted file mode 100644 index 9f57ca082673..000000000000 --- a/db/schema_migrations/20221017084227 +++ /dev/null @@ -1 +0,0 @@ -dc03ff5c63ada744d41e5e37e276306b1fe3bb2d8f925ebb0087be3a4b51791e \ No newline at end of file diff --git a/db/schema_migrations/20221018050323 b/db/schema_migrations/20221018050323 deleted file mode 100644 index 3e1d102da64b..000000000000 --- a/db/schema_migrations/20221018050323 +++ /dev/null @@ -1 +0,0 @@ -05754025966b87f6998a0801e76c811b0cd42b2a77f35e8129a0c47f935e9bc4 \ No newline at end of file diff --git a/db/schema_migrations/20221018062308 b/db/schema_migrations/20221018062308 deleted file mode 100644 index 1b408ed101a1..000000000000 --- a/db/schema_migrations/20221018062308 +++ /dev/null @@ -1 +0,0 @@ -58aec3260f2b26d5a49159b95de7c6486b16c8af354f716190d4c48f83324910 \ No newline at end of file diff --git a/db/schema_migrations/20221018081416 b/db/schema_migrations/20221018081416 deleted file mode 100644 index 4b92b46709a8..000000000000 --- a/db/schema_migrations/20221018081416 +++ /dev/null @@ -1 +0,0 @@ -25030e3ba7c6632fa86100c2db320d1e0c431f992e2b3e333a98e7e03bd31a49 \ No newline at end of file diff --git a/db/schema_migrations/20221018092552 b/db/schema_migrations/20221018092552 deleted file mode 100644 index 8416f7d72a33..000000000000 --- a/db/schema_migrations/20221018092552 +++ /dev/null @@ -1 +0,0 @@ -d7ec9ab32c5f58805bec64bea9bd32aedbd80f678d6b8e8c6914aa26523dcc95 \ No newline at end of file diff --git a/db/schema_migrations/20221018124029 b/db/schema_migrations/20221018124029 deleted file mode 100644 index 6c050ebf2488..000000000000 --- a/db/schema_migrations/20221018124029 +++ /dev/null @@ -1 +0,0 @@ -c3a38f280c8835e77953b69ba41ef5d58b76fd5f2f39e758a523c493306b0ab2 \ No newline at end of file diff --git a/db/schema_migrations/20221018124035 b/db/schema_migrations/20221018124035 deleted file mode 100644 index 1d0721c4bfb5..000000000000 --- a/db/schema_migrations/20221018124035 +++ /dev/null @@ -1 +0,0 @@ -77aca033a7c58af4e981136b96629acf5b82a42701072928532681dd91b05280 \ No newline at end of file diff --git a/db/schema_migrations/20221018193635 b/db/schema_migrations/20221018193635 deleted file mode 100644 index e29e4605d5bc..000000000000 --- a/db/schema_migrations/20221018193635 +++ /dev/null @@ -1 +0,0 @@ -de28d291a4a49dcb1743466ce61d95e47c28bdf293731e446b7b43d370d76e36 \ No newline at end of file diff --git a/db/schema_migrations/20221018193827 b/db/schema_migrations/20221018193827 deleted file mode 100644 index 267538271850..000000000000 --- a/db/schema_migrations/20221018193827 +++ /dev/null @@ -1 +0,0 @@ -fb64884e988fb0f3589fd189780f3ac5358d06b7599243935f1d4c3dd7e794fc \ No newline at end of file diff --git a/db/schema_migrations/20221018202524 b/db/schema_migrations/20221018202524 deleted file mode 100644 index ee738f3608c6..000000000000 --- a/db/schema_migrations/20221018202524 +++ /dev/null @@ -1 +0,0 @@ -a3266078f4760f0f5a4c7a43669cea1170924f29d6867e712620c2234dbf13c6 \ No newline at end of file diff --git a/db/schema_migrations/20221018232820 b/db/schema_migrations/20221018232820 deleted file mode 100644 index 870de8adb4a5..000000000000 --- a/db/schema_migrations/20221018232820 +++ /dev/null @@ -1 +0,0 @@ -cdf3e65f07f700617f47435b79743b4b35307f47cf46a9696350e55af1774d42 \ No newline at end of file diff --git a/db/schema_migrations/20221019002459 b/db/schema_migrations/20221019002459 deleted file mode 100644 index cab210037360..000000000000 --- a/db/schema_migrations/20221019002459 +++ /dev/null @@ -1 +0,0 @@ -6c3fe5bf01ac9e74f142ddb3e093867b62cf430f24ba885f8475ccf7f73899cb \ No newline at end of file diff --git a/db/schema_migrations/20221019102426 b/db/schema_migrations/20221019102426 deleted file mode 100644 index 482f7ab09801..000000000000 --- a/db/schema_migrations/20221019102426 +++ /dev/null @@ -1 +0,0 @@ -6990eb33313f6c0a82409fde69c74a88d0a9db2cd144322bcff4428261bbf1e4 \ No newline at end of file diff --git a/db/schema_migrations/20221019105041 b/db/schema_migrations/20221019105041 deleted file mode 100644 index 0dff355b3009..000000000000 --- a/db/schema_migrations/20221019105041 +++ /dev/null @@ -1 +0,0 @@ -186e7df4e7e81913981595a069c5c8b5fbb600ee5dcebf333bfff728c5019ab2 \ No newline at end of file diff --git a/db/schema_migrations/20221019141508 b/db/schema_migrations/20221019141508 deleted file mode 100644 index 2b4ecc805e41..000000000000 --- a/db/schema_migrations/20221019141508 +++ /dev/null @@ -1 +0,0 @@ -527b18e3bd89316c33b099d4e3cd622617b6e8dbb482a0f0ce983386b0210f7e \ No newline at end of file diff --git a/db/schema_migrations/20221019194751 b/db/schema_migrations/20221019194751 deleted file mode 100644 index e917d4ac1f69..000000000000 --- a/db/schema_migrations/20221019194751 +++ /dev/null @@ -1 +0,0 @@ -785ed2a3c711edf54f1b23bdbd4b333b7a4ee02b86f8581c1f4cc20003e5f832 \ No newline at end of file diff --git a/db/schema_migrations/20221019195754 b/db/schema_migrations/20221019195754 deleted file mode 100644 index 2be5ca3ce1a5..000000000000 --- a/db/schema_migrations/20221019195754 +++ /dev/null @@ -1 +0,0 @@ -b09530d7b72d70774624ef44683be6665bd1141be49db551a0dfe303ce67eefa \ No newline at end of file diff --git a/db/schema_migrations/20221019200033 b/db/schema_migrations/20221019200033 deleted file mode 100644 index 2826a18d7df4..000000000000 --- a/db/schema_migrations/20221019200033 +++ /dev/null @@ -1 +0,0 @@ -a72855a95f243d2a404d840fde900a99b9f568144dfde47e813c4e9bc81ef8cf \ No newline at end of file diff --git a/db/schema_migrations/20221019200206 b/db/schema_migrations/20221019200206 deleted file mode 100644 index 73eb8571a5a9..000000000000 --- a/db/schema_migrations/20221019200206 +++ /dev/null @@ -1 +0,0 @@ -1bd5d356d0a15737178eee70bce65c9883bd5daa2a672a9049ccecb4e73f431b \ No newline at end of file diff --git a/db/schema_migrations/20221020124018 b/db/schema_migrations/20221020124018 deleted file mode 100644 index 6f6c76eb5318..000000000000 --- a/db/schema_migrations/20221020124018 +++ /dev/null @@ -1 +0,0 @@ -c4b296345f45b6184e04181708eb2f55a1b3a621f331b75173b33b0036c3176f \ No newline at end of file diff --git a/db/schema_migrations/20221021082720 b/db/schema_migrations/20221021082720 deleted file mode 100644 index b3591da10218..000000000000 --- a/db/schema_migrations/20221021082720 +++ /dev/null @@ -1 +0,0 @@ -a9122e3772587b85a889740ccc54d48b6ead91a3b472d712e1e8bf5946655cf4 \ No newline at end of file diff --git a/db/schema_migrations/20221021082734 b/db/schema_migrations/20221021082734 deleted file mode 100644 index 6fc0aaa3fcaf..000000000000 --- a/db/schema_migrations/20221021082734 +++ /dev/null @@ -1 +0,0 @@ -d7c109cba935e1f355789dffa1d64b29b787f44ced7b0d3090e19a2dd0b8e266 \ No newline at end of file diff --git a/db/schema_migrations/20221021145820 b/db/schema_migrations/20221021145820 deleted file mode 100644 index e3d50c654ba0..000000000000 --- a/db/schema_migrations/20221021145820 +++ /dev/null @@ -1 +0,0 @@ -e9fd4d60833624e20fcf9b01b883dca15e6c135aa99f1afd1c7a365eebac17fb \ No newline at end of file diff --git a/db/schema_migrations/20221021160735 b/db/schema_migrations/20221021160735 deleted file mode 100644 index 73c10f7e23d9..000000000000 --- a/db/schema_migrations/20221021160735 +++ /dev/null @@ -1 +0,0 @@ -0b7727e942f6e3fa2e1b0ed9e22c504a64aceac19adf25f126baba587db4b764 \ No newline at end of file diff --git a/db/schema_migrations/20221021213216 b/db/schema_migrations/20221021213216 deleted file mode 100644 index 900a4f6701e6..000000000000 --- a/db/schema_migrations/20221021213216 +++ /dev/null @@ -1 +0,0 @@ -defe6e66c98648ea7fb77d8001392bc707ec022f639d346c42d23fad10958856 \ No newline at end of file diff --git a/db/schema_migrations/20221022213505 b/db/schema_migrations/20221022213505 deleted file mode 100644 index 4cf0b87eedfd..000000000000 --- a/db/schema_migrations/20221022213505 +++ /dev/null @@ -1 +0,0 @@ -c48015b2ff6ad4b58bffaf5342247d890f6bd2388c467751654bc705f5eb53ed \ No newline at end of file diff --git a/db/schema_migrations/20221022213521 b/db/schema_migrations/20221022213521 deleted file mode 100644 index c3bb483debf2..000000000000 --- a/db/schema_migrations/20221022213521 +++ /dev/null @@ -1 +0,0 @@ -739952c72f82b804b84d73107264804202ad102b425008d4dcb029c1f02e2118 \ No newline at end of file diff --git a/db/schema_migrations/20221024034228 b/db/schema_migrations/20221024034228 deleted file mode 100644 index 3df637a8198c..000000000000 --- a/db/schema_migrations/20221024034228 +++ /dev/null @@ -1 +0,0 @@ -7f83a1d04357f4f2e1e4ed92e0d9b0041f79d1850b28f41cee45d243e25741f0 \ No newline at end of file diff --git a/db/schema_migrations/20221024121500 b/db/schema_migrations/20221024121500 deleted file mode 100644 index 6db609001ad3..000000000000 --- a/db/schema_migrations/20221024121500 +++ /dev/null @@ -1 +0,0 @@ -8449de1e73e2fb46698e0e160641c4132b99918792b0b3379d6009bab9eab0b7 \ No newline at end of file diff --git a/db/schema_migrations/20221025043930 b/db/schema_migrations/20221025043930 deleted file mode 100644 index 37365baea277..000000000000 --- a/db/schema_migrations/20221025043930 +++ /dev/null @@ -1 +0,0 @@ -6762034e2dff9d6e6d146f1ce3b281f8886895b056c5ed54767ceb0d6c18bd59 \ No newline at end of file diff --git a/db/schema_migrations/20221025105205 b/db/schema_migrations/20221025105205 deleted file mode 100644 index 4003f74aa11c..000000000000 --- a/db/schema_migrations/20221025105205 +++ /dev/null @@ -1 +0,0 @@ -80daa2f50ae9f8c0dee206ed9d45eb04884e14a0331475cb8c9a2d57f4c86ef5 \ No newline at end of file diff --git a/db/schema_migrations/20221025115006 b/db/schema_migrations/20221025115006 deleted file mode 100644 index d831d6aeec92..000000000000 --- a/db/schema_migrations/20221025115006 +++ /dev/null @@ -1 +0,0 @@ -1529e1b436b65ff7b787f43fc5b8de7515aebe427719d2e4e62e9a7f923e877b \ No newline at end of file diff --git a/db/schema_migrations/20221025145452 b/db/schema_migrations/20221025145452 deleted file mode 100644 index df551b8bae69..000000000000 --- a/db/schema_migrations/20221025145452 +++ /dev/null @@ -1 +0,0 @@ -951ad9faf483d58778cd831a0ac949473d6eeb753322754eff3f02756d757583 \ No newline at end of file diff --git a/db/schema_migrations/20221025150202 b/db/schema_migrations/20221025150202 deleted file mode 100644 index aa6db23de6c4..000000000000 --- a/db/schema_migrations/20221025150202 +++ /dev/null @@ -1 +0,0 @@ -2185444f733eec25a2741764619516eecb1d2c6e3e4ec3b3ed5b72bfd9c4db46 \ No newline at end of file diff --git a/db/schema_migrations/20221025220607 b/db/schema_migrations/20221025220607 deleted file mode 100644 index 30322b1ab3fb..000000000000 --- a/db/schema_migrations/20221025220607 +++ /dev/null @@ -1 +0,0 @@ -d6eb5bb918f12c08f23c228916b7e21432e1e2958832c10be4e46dfa2079103d \ No newline at end of file diff --git a/db/schema_migrations/20221027124848 b/db/schema_migrations/20221027124848 deleted file mode 100644 index 249e4e4b83fb..000000000000 --- a/db/schema_migrations/20221027124848 +++ /dev/null @@ -1 +0,0 @@ -108dec45cbed3651aec46636a3009cb18296d0fa0ca720774dc2105123955dfd \ No newline at end of file diff --git a/db/schema_migrations/20221027203556 b/db/schema_migrations/20221027203556 deleted file mode 100644 index e386f0e6bbb9..000000000000 --- a/db/schema_migrations/20221027203556 +++ /dev/null @@ -1 +0,0 @@ -9ea13068b90797013677ec390de4222e00e80076080cf4e5335e9f90e2e59f2d \ No newline at end of file diff --git a/db/schema_migrations/20221027203951 b/db/schema_migrations/20221027203951 deleted file mode 100644 index 866ccf8c2084..000000000000 --- a/db/schema_migrations/20221027203951 +++ /dev/null @@ -1 +0,0 @@ -5f4fd4e64d398208e2d32573273a70106c9a4fd5ab350d75fcf7a6f4c824e00a \ No newline at end of file diff --git a/db/schema_migrations/20221028000041 b/db/schema_migrations/20221028000041 deleted file mode 100644 index 4160c4d26ed7..000000000000 --- a/db/schema_migrations/20221028000041 +++ /dev/null @@ -1 +0,0 @@ -b2e38680afc264fadd5fbaa7d07c95c7ba6e1fb7a32bdff267e35a7d9bde72c8 \ No newline at end of file diff --git a/db/schema_migrations/20221028000603 b/db/schema_migrations/20221028000603 deleted file mode 100644 index 0dc60ae68eba..000000000000 --- a/db/schema_migrations/20221028000603 +++ /dev/null @@ -1 +0,0 @@ -aee0c708436ae365e2469b2bb5b508dcbf6975326faa90bd1571dd400312eded \ No newline at end of file diff --git a/db/schema_migrations/20221028015347 b/db/schema_migrations/20221028015347 deleted file mode 100644 index ab633b763df0..000000000000 --- a/db/schema_migrations/20221028015347 +++ /dev/null @@ -1 +0,0 @@ -7b86ae0739c4c381b050539261c67dbf3d4716edf0f0bde9b281cbdc5143a4d2 \ No newline at end of file diff --git a/db/schema_migrations/20221028022627 b/db/schema_migrations/20221028022627 deleted file mode 100644 index 34c365800a6f..000000000000 --- a/db/schema_migrations/20221028022627 +++ /dev/null @@ -1 +0,0 @@ -0305d0fa4d95b0a1553c9ba7984af2cb74099988dbc9983e1048b54ead39a76e \ No newline at end of file diff --git a/db/schema_migrations/20221028152422 b/db/schema_migrations/20221028152422 deleted file mode 100644 index bfe9807b1c68..000000000000 --- a/db/schema_migrations/20221028152422 +++ /dev/null @@ -1 +0,0 @@ -c9322bdc7e862bd20ec548fbcd3ec6a9ef4da6abc0a688d503e1792acc262472 \ No newline at end of file diff --git a/db/schema_migrations/20221031102916 b/db/schema_migrations/20221031102916 deleted file mode 100644 index 53f927cfc32f..000000000000 --- a/db/schema_migrations/20221031102916 +++ /dev/null @@ -1 +0,0 @@ -e0065beaf2e1dc5e5850353244ba2c76477e855733f3683a1901a340a5826ae1 \ No newline at end of file diff --git a/db/schema_migrations/20221101032521 b/db/schema_migrations/20221101032521 deleted file mode 100644 index 995b034fa89a..000000000000 --- a/db/schema_migrations/20221101032521 +++ /dev/null @@ -1 +0,0 @@ -db7e477626aa34154db2d6ff30bcafc7c70a2a9c3a719bfb7e7ac0a8e0d7e579 \ No newline at end of file diff --git a/db/schema_migrations/20221101032600 b/db/schema_migrations/20221101032600 deleted file mode 100644 index 2b0606616574..000000000000 --- a/db/schema_migrations/20221101032600 +++ /dev/null @@ -1 +0,0 @@ -49449f2bb02e8dbe0cff73b6ac8dc291c00c7ce9c0d54bf7bb2b5cd9c599d713 \ No newline at end of file diff --git a/db/schema_migrations/20221101195903 b/db/schema_migrations/20221101195903 deleted file mode 100644 index 9b19cb05b667..000000000000 --- a/db/schema_migrations/20221101195903 +++ /dev/null @@ -1 +0,0 @@ -984a2bcc65364293cd110d3a917aecd37253f621150220000f99e8ea215e30ab \ No newline at end of file diff --git a/db/schema_migrations/20221101201031 b/db/schema_migrations/20221101201031 deleted file mode 100644 index 82544cf461d2..000000000000 --- a/db/schema_migrations/20221101201031 +++ /dev/null @@ -1 +0,0 @@ -6ed6a3fdd144b118c7f85960d08500f21a7f666abfdaafc9d681e03723ed22e8 \ No newline at end of file diff --git a/db/schema_migrations/20221102090940 b/db/schema_migrations/20221102090940 deleted file mode 100644 index c0ef78816880..000000000000 --- a/db/schema_migrations/20221102090940 +++ /dev/null @@ -1 +0,0 @@ -3be66e9f4239eb75f14118d1fd795f1a1bcd2d6bc4e34fe58a0c8422e33c893a \ No newline at end of file diff --git a/db/schema_migrations/20221102090943 b/db/schema_migrations/20221102090943 deleted file mode 100644 index bc7ff679c6e6..000000000000 --- a/db/schema_migrations/20221102090943 +++ /dev/null @@ -1 +0,0 @@ -8e907e086c4b23dd08163c4d946ec4a0202288f7da08eff565a159bccdd445f2 \ No newline at end of file diff --git a/db/schema_migrations/20221102202130 b/db/schema_migrations/20221102202130 deleted file mode 100644 index 82ee10885447..000000000000 --- a/db/schema_migrations/20221102202130 +++ /dev/null @@ -1 +0,0 @@ -76c2fe9422491d0bd457584580b383924b895574cec7e90cdfa5de9ed56a3639 \ No newline at end of file diff --git a/db/schema_migrations/20221102225800 b/db/schema_migrations/20221102225800 deleted file mode 100644 index fca933ed91b7..000000000000 --- a/db/schema_migrations/20221102225800 +++ /dev/null @@ -1 +0,0 @@ -2e7e55a23574d45e877712fb67b2c2b50d85905c95fe4ec3990cfd8fe5160122 \ No newline at end of file diff --git a/db/schema_migrations/20221103073328 b/db/schema_migrations/20221103073328 deleted file mode 100644 index 8a90e224a2f8..000000000000 --- a/db/schema_migrations/20221103073328 +++ /dev/null @@ -1 +0,0 @@ -6f0ce1b68310b3194aa7b6219d79570e8179d449f49d828800f90f70d9242f38 \ No newline at end of file diff --git a/db/schema_migrations/20221103084213 b/db/schema_migrations/20221103084213 deleted file mode 100644 index f9790952cf0e..000000000000 --- a/db/schema_migrations/20221103084213 +++ /dev/null @@ -1 +0,0 @@ -90794c6a9b8b9e08e8b0898e55bc581b8411fd0e85a17fefa916213d82e98099 \ No newline at end of file diff --git a/db/schema_migrations/20221103131409 b/db/schema_migrations/20221103131409 deleted file mode 100644 index 88be59197a3a..000000000000 --- a/db/schema_migrations/20221103131409 +++ /dev/null @@ -1 +0,0 @@ -cb301b88dc9b0f5bffd9d1a4419c5923e8145cb8770e576d88dc7881c1c9e39c \ No newline at end of file diff --git a/db/schema_migrations/20221103150250 b/db/schema_migrations/20221103150250 deleted file mode 100644 index cc6b55ba5ea5..000000000000 --- a/db/schema_migrations/20221103150250 +++ /dev/null @@ -1 +0,0 @@ -662c4df2d65a9259e2eafc11e828ffc15765b92fe3a5291ff869129aaf7bb1c0 \ No newline at end of file diff --git a/db/schema_migrations/20221104042137 b/db/schema_migrations/20221104042137 deleted file mode 100644 index 4e3a1d27d535..000000000000 --- a/db/schema_migrations/20221104042137 +++ /dev/null @@ -1 +0,0 @@ -3192407f3034683ba226d651e247385de200a06e26142e87978fa080eecda110 \ No newline at end of file diff --git a/db/schema_migrations/20221104042159 b/db/schema_migrations/20221104042159 deleted file mode 100644 index 3454e08597d9..000000000000 --- a/db/schema_migrations/20221104042159 +++ /dev/null @@ -1 +0,0 @@ -462fd09ac4c59b9fc3f865e984da4c83c4a75d60e557d634631d5eafd67741cc \ No newline at end of file diff --git a/db/schema_migrations/20221104061320 b/db/schema_migrations/20221104061320 deleted file mode 100644 index f1cc9a7e277d..000000000000 --- a/db/schema_migrations/20221104061320 +++ /dev/null @@ -1 +0,0 @@ -c181db849e3542570b4cc55337be8fbda87556773c989ce4e8259cefa1c74922 \ No newline at end of file diff --git a/db/schema_migrations/20221104074652 b/db/schema_migrations/20221104074652 deleted file mode 100644 index 460f21a3f6e1..000000000000 --- a/db/schema_migrations/20221104074652 +++ /dev/null @@ -1 +0,0 @@ -167032d562467c3d6be9e6c6c8c072f117e23798db35301f95386130ae115a00 \ No newline at end of file diff --git a/db/schema_migrations/20221104094042 b/db/schema_migrations/20221104094042 deleted file mode 100644 index 08694063f07a..000000000000 --- a/db/schema_migrations/20221104094042 +++ /dev/null @@ -1 +0,0 @@ -7ddb85c1acfd3fbeddbe96857d329ad09cd21210e6765ff36d4b9f516a7c10be \ No newline at end of file diff --git a/db/schema_migrations/20221104100203 b/db/schema_migrations/20221104100203 deleted file mode 100644 index df7b06eef5d4..000000000000 --- a/db/schema_migrations/20221104100203 +++ /dev/null @@ -1 +0,0 @@ -1d7912409bb5afc7de82b7507fb2aeb164253c70a58eaf88d502513577bad979 \ No newline at end of file diff --git a/db/schema_migrations/20221104170500 b/db/schema_migrations/20221104170500 deleted file mode 100644 index 58fd45b52235..000000000000 --- a/db/schema_migrations/20221104170500 +++ /dev/null @@ -1 +0,0 @@ -1826209494234355dd2014b3ae7f8ef5c2138a3d22ce143f744ab911e3ebb985 \ No newline at end of file diff --git a/db/schema_migrations/20221104190203 b/db/schema_migrations/20221104190203 deleted file mode 100644 index cf604255bc1c..000000000000 --- a/db/schema_migrations/20221104190203 +++ /dev/null @@ -1 +0,0 @@ -248aecf9fa53146f2c1f7771fd60adf720fa8c0d2bd33d71c6177b185e4248d1 \ No newline at end of file diff --git a/db/schema_migrations/20221107094359 b/db/schema_migrations/20221107094359 deleted file mode 100644 index f5cb6814e619..000000000000 --- a/db/schema_migrations/20221107094359 +++ /dev/null @@ -1 +0,0 @@ -47d2ac5130583e1a5d0b89d73f32d4af208f8800fc62726bce8ca86e3ce0ed40 \ No newline at end of file diff --git a/db/schema_migrations/20221107115247 b/db/schema_migrations/20221107115247 deleted file mode 100644 index e5426ef7be1c..000000000000 --- a/db/schema_migrations/20221107115247 +++ /dev/null @@ -1 +0,0 @@ -c3616b3184b29fb2dbe83ec18391b8c52a2ab23591803bb949226a7202e49c2b \ No newline at end of file diff --git a/db/schema_migrations/20221107115413 b/db/schema_migrations/20221107115413 deleted file mode 100644 index f8889bebe982..000000000000 --- a/db/schema_migrations/20221107115413 +++ /dev/null @@ -1 +0,0 @@ -71bacdb2d4c1c3c21fe39d4092cad803a4ebf44b6d621b8425baaa77b15b3891 \ No newline at end of file diff --git a/db/schema_migrations/20221107183222 b/db/schema_migrations/20221107183222 deleted file mode 100644 index e7049b0d3a12..000000000000 --- a/db/schema_migrations/20221107183222 +++ /dev/null @@ -1 +0,0 @@ -593bf8c98becf8300ccdd38403d805c9f185827a9a131b83d3b0aa571aa6f172 \ No newline at end of file diff --git a/db/schema_migrations/20221107184542 b/db/schema_migrations/20221107184542 deleted file mode 100644 index ac7a4c78f66d..000000000000 --- a/db/schema_migrations/20221107184542 +++ /dev/null @@ -1 +0,0 @@ -876dce84bbc5ee00cd7ee837be6c549c677ec7eb7ec8db39d7711877d57dd7be \ No newline at end of file diff --git a/db/schema_migrations/20221107184758 b/db/schema_migrations/20221107184758 deleted file mode 100644 index f327e45183b3..000000000000 --- a/db/schema_migrations/20221107184758 +++ /dev/null @@ -1 +0,0 @@ -1aa75f334b1b56e46e8e0985febba567b0eb55af0f1ced0e198bfc979e5e262c \ No newline at end of file diff --git a/db/schema_migrations/20221107220420 b/db/schema_migrations/20221107220420 deleted file mode 100644 index f56ca1204b17..000000000000 --- a/db/schema_migrations/20221107220420 +++ /dev/null @@ -1 +0,0 @@ -499f7b3951c9792d2a8f204b72c474a42e8301b487fa9f68080dd5bb5db0c64c \ No newline at end of file diff --git a/db/schema_migrations/20221107220526 b/db/schema_migrations/20221107220526 deleted file mode 100644 index 93be68808d78..000000000000 --- a/db/schema_migrations/20221107220526 +++ /dev/null @@ -1 +0,0 @@ -b633df04851493d7d4b5d7da79ba3057f6f2c302e507b4f963596edf9cbfcb88 \ No newline at end of file diff --git a/db/schema_migrations/20221107222213 b/db/schema_migrations/20221107222213 deleted file mode 100644 index 5950f0d5c5ad..000000000000 --- a/db/schema_migrations/20221107222213 +++ /dev/null @@ -1 +0,0 @@ -f5295b135cd395a59c7afc6a9d999201f9ea1174aab893d31ead398aa8c0f8bb \ No newline at end of file diff --git a/db/schema_migrations/20221108015813 b/db/schema_migrations/20221108015813 deleted file mode 100644 index 39263419da6e..000000000000 --- a/db/schema_migrations/20221108015813 +++ /dev/null @@ -1 +0,0 @@ -d6b24d6346bd9b32dd726d61048e7eea791d02016b9b4c3a8cb561b2430e1fdb \ No newline at end of file diff --git a/db/schema_migrations/20221108045019 b/db/schema_migrations/20221108045019 deleted file mode 100644 index 518b5118173b..000000000000 --- a/db/schema_migrations/20221108045019 +++ /dev/null @@ -1 +0,0 @@ -b8438bebe77ae835b754431d8d67c306714205bef11826a15d4c84d7b67a3581 \ No newline at end of file diff --git a/db/schema_migrations/20221108121322 b/db/schema_migrations/20221108121322 deleted file mode 100644 index d1880c9319a4..000000000000 --- a/db/schema_migrations/20221108121322 +++ /dev/null @@ -1 +0,0 @@ -4e5deb2f5be081eef7b3dab726b2877bc21a7afad1b6a12aca240f510cada0b3 \ No newline at end of file diff --git a/db/schema_migrations/20221108185442 b/db/schema_migrations/20221108185442 deleted file mode 100644 index ec32f966df9c..000000000000 --- a/db/schema_migrations/20221108185442 +++ /dev/null @@ -1 +0,0 @@ -fc1f31a717e8c5e8539138e612dcba4acafb5b7324534b6ca23220142c43de80 \ No newline at end of file diff --git a/db/schema_migrations/20221108222015 b/db/schema_migrations/20221108222015 deleted file mode 100644 index 2b9ce458ce9e..000000000000 --- a/db/schema_migrations/20221108222015 +++ /dev/null @@ -1 +0,0 @@ -555c69896e457b0b41c00926007b422ef34869e45fc0bde89b87ecc2df51de00 \ No newline at end of file diff --git a/db/schema_migrations/20221110045406 b/db/schema_migrations/20221110045406 deleted file mode 100644 index 264e4f5003b9..000000000000 --- a/db/schema_migrations/20221110045406 +++ /dev/null @@ -1 +0,0 @@ -d0a14750dfcf3bd7641c9f37fbf5f992d4d7be7be33565ed9dd14eb12a983005 \ No newline at end of file diff --git a/db/schema_migrations/20221110105857 b/db/schema_migrations/20221110105857 deleted file mode 100644 index f515180dcdfd..000000000000 --- a/db/schema_migrations/20221110105857 +++ /dev/null @@ -1 +0,0 @@ -5ef00449d9c5b4a44b99410839d3ba4c4d6d8cb152460822b882c6ac60f771e3 \ No newline at end of file diff --git a/db/schema_migrations/20221110150942 b/db/schema_migrations/20221110150942 deleted file mode 100644 index 1c627232e789..000000000000 --- a/db/schema_migrations/20221110150942 +++ /dev/null @@ -1 +0,0 @@ -fa663262d6d73637e7ffefecd0f06705456bc226024d5023377a527cf3498ac7 \ No newline at end of file diff --git a/db/schema_migrations/20221111070314 b/db/schema_migrations/20221111070314 deleted file mode 100644 index 754d584f0f2b..000000000000 --- a/db/schema_migrations/20221111070314 +++ /dev/null @@ -1 +0,0 @@ -4a85ceb76874c618fa21030838900ed1a7219e4ee40b2d88645f4025743034f9 \ No newline at end of file diff --git a/ee/spec/migrations/20220831132802_delete_approval_rules_for_vulnerability_spec.rb b/ee/spec/migrations/20220831132802_delete_approval_rules_for_vulnerability_spec.rb deleted file mode 100644 index 27eefc7d7ee3..000000000000 --- a/ee/spec/migrations/20220831132802_delete_approval_rules_for_vulnerability_spec.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe DeleteApprovalRulesForVulnerability, feature_category: :source_code_management do - describe '#up' do - it 'schedules background migration for both levels of approval rules with report_type equal to 1' do - migrate! - - expect(described_class::MIGRATION).to have_scheduled_batched_migration( - table_name: :approval_merge_request_rules, - column_name: :id, - interval: described_class::INTERVAL) - - 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/20220907122648_populate_security_orchestration_policy_configuration_id_spec.rb b/ee/spec/migrations/20220907122648_populate_security_orchestration_policy_configuration_id_spec.rb deleted file mode 100644 index 712bf8995ad4..000000000000 --- a/ee/spec/migrations/20220907122648_populate_security_orchestration_policy_configuration_id_spec.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe PopulateSecurityOrchestrationPolicyConfigurationId, 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/ee/spec/migrations/update_can_create_group_application_setting_spec.rb b/ee/spec/migrations/update_can_create_group_application_setting_spec.rb deleted file mode 100644 index d838dc176dd9..000000000000 --- a/ee/spec/migrations/update_can_create_group_application_setting_spec.rb +++ /dev/null @@ -1,83 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe UpdateCanCreateGroupApplicationSetting, :migration, feature_category: :groups_and_projects do - let(:application_setting) do - Class.new(ActiveRecord::Base) do - self.table_name = 'application_settings' - end - end - - shared_examples_for 'runs the migration successfully' do - it 'runs the migration successfully' do - reversible_migration do |migration| - application_setting.create! - - migration.before -> { - setting = application_setting.first - - expect(setting.can_create_group).to eq(true) - } - - migration.after -> { - application_setting.reset_column_information - setting = application_setting.first - - expect(setting.can_create_group).to eq(expected_value_after_migration) - } - end - end - end - - context 'when the setting currently is set to `false` in the configuration file' do - before do - stub_config(gitlab: { default_can_create_group: false }) - end - - it_behaves_like 'runs the migration successfully' do - let(:expected_value_after_migration) { false } - end - end - - context 'when the setting currently is set to `true` in the configuration file' do - before do - stub_config(gitlab: { default_can_create_group: true }) - end - - it_behaves_like 'runs the migration successfully' do - let(:expected_value_after_migration) { true } - end - end - - context 'when the setting currently is set to `nil` in the configuration file' do - before do - stub_config(gitlab: { default_can_create_group: nil }) - end - - it_behaves_like 'runs the migration successfully' do - let(:expected_value_after_migration) { true } - end - end - - context 'when the setting currently is set to a non-boolean value in the configuration file' do - before do - stub_config(gitlab: { default_can_create_group: 'something' }) - end - - it_behaves_like 'runs the migration successfully' do - let(:expected_value_after_migration) { true } - end - end - - context 'when the setting is not present in the configuration file' do - before do - allow(Gitlab.config.gitlab).to receive(:respond_to?).with(:default_can_create_group).and_return(false) - end - - it_behaves_like 'runs the migration successfully' do - let(:expected_value_after_migration) { true } - end - end -end diff --git a/scripts/verify-tff-mapping b/scripts/verify-tff-mapping index f4872276b949..ee6346bb7d44 100755 --- a/scripts/verify-tff-mapping +++ b/scripts/verify-tff-mapping @@ -90,8 +90,8 @@ tests = [ { explanation: 'Migration should map to its non-timestamped spec', - changed_file: 'db/migrate/20221011062254_sync_new_amount_used_for_ci_project_monthly_usages.rb', - expected: ['spec/migrations/sync_new_amount_used_for_ci_project_monthly_usages_spec.rb'] + changed_file: 'db/migrate/20230707003301_add_expiry_notified_at_to_member.rb', + expected: ['spec/migrations/add_expiry_notified_at_to_member_spec.rb'] }, # rubocop:disable Layout/LineLength { 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 index 8ead1940f161..edf972189b2a 100644 --- 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 @@ -4,7 +4,7 @@ RSpec.describe Gitlab::BackgroundMigration::BackfillImportedIssueSearchData, :migration, - schema: 20220126191624 do + schema: 20221111123146 do let!(:namespace) { table(:namespaces).create!(name: 'user', path: 'user') } let!(:issue_search_data_table) { table(:issue_search_data) } 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 74f9a26191a4..925fb0c9a20b 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: 20220126191624 do +RSpec.describe Gitlab::BackgroundMigration::BackfillIntegrationsEnableSslVerification, schema: 20221111123146 do let(:migration) { described_class.new } let(:integrations) { described_class::Integration } diff --git a/spec/lib/gitlab/background_migration/backfill_internal_on_notes_spec.rb b/spec/lib/gitlab/background_migration/backfill_internal_on_notes_spec.rb index 40a4758ba5f7..e948717d6934 100644 --- a/spec/lib/gitlab/background_migration/backfill_internal_on_notes_spec.rb +++ b/spec/lib/gitlab/background_migration/backfill_internal_on_notes_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Gitlab::BackgroundMigration::BackfillInternalOnNotes, :migration, schema: 20220920124709 do +RSpec.describe Gitlab::BackgroundMigration::BackfillInternalOnNotes, :migration, schema: 20211202041233 do let(:notes_table) { table(:notes) } let!(:confidential_note) { notes_table.create!(id: 1, confidential: true, internal: false) } 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 e574c9995329..c2c5c3e9de05 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: 20220126191624 do +RSpec.describe Gitlab::BackgroundMigration::BackfillNamespaceIdOfVulnerabilityReads, schema: 20221111123146 do let(:namespaces) { table(:namespaces) } let(:projects) { table(:projects) } let(:users) { table(:users) } diff --git a/spec/lib/gitlab/background_migration/backfill_project_member_namespace_id_spec.rb b/spec/lib/gitlab/background_migration/backfill_project_member_namespace_id_spec.rb deleted file mode 100644 index d95927a32803..000000000000 --- a/spec/lib/gitlab/background_migration/backfill_project_member_namespace_id_spec.rb +++ /dev/null @@ -1,124 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Gitlab::BackgroundMigration::BackfillProjectMemberNamespaceId, :migration, schema: 20220126191624 do - let(:migration) do - described_class.new( - start_id: 1, end_id: 10, - batch_table: table_name, batch_column: batch_column, - sub_batch_size: sub_batch_size, pause_ms: pause_ms, - connection: ApplicationRecord.connection - ) - end - - let(:members_table) { table(:members) } - let(:projects_table) { table(:projects) } - let(:namespaces_table) { table(:namespaces) } - - let(:table_name) { 'members' } - let(:batch_column) { :id } - let(:sub_batch_size) { 100 } - let(:pause_ms) { 0 } - - subject(:perform_migration) do - migration.perform - end - - before do - namespaces_table.create!(id: 201, name: 'group1', path: 'group1', type: 'Group') - namespaces_table.create!(id: 202, name: 'group2', path: 'group2', type: 'Group') - namespaces_table.create!(id: 300, name: 'project-namespace-1', path: 'project-namespace-1-path', type: 'Project') - namespaces_table.create!(id: 301, name: 'project-namespace-2', path: 'project-namespace-2-path', type: 'Project') - namespaces_table.create!(id: 302, name: 'project-namespace-3', path: 'project-namespace-3-path', type: 'Project') - - projects_table.create!(id: 100, name: 'project1', path: 'project1', namespace_id: 202, project_namespace_id: 300) - projects_table.create!(id: 101, name: 'project2', path: 'project2', namespace_id: 202, project_namespace_id: 301) - projects_table.create!(id: 102, name: 'project3', path: 'project3', namespace_id: 202, project_namespace_id: 302) - - # project1, no member namespace (fill in) - members_table.create!( - id: 1, source_id: 100, - source_type: 'Project', type: 'ProjectMember', - member_namespace_id: nil, access_level: 10, notification_level: 3 - ) - - # bogus source id, no member namespace id (do nothing) - members_table.create!( - id: 2, source_id: non_existing_record_id, - source_type: 'Project', type: 'ProjectMember', - member_namespace_id: nil, access_level: 10, notification_level: 3 - ) - - # project3, existing member namespace id (do nothing) - members_table.create!( - id: 3, source_id: 102, - source_type: 'Project', type: 'ProjectMember', - member_namespace_id: 300, access_level: 10, notification_level: 3 - ) - - # Group memberships (do not change) - # group1, no member namespace (do nothing) - members_table.create!( - id: 4, source_id: 201, - source_type: 'Namespace', type: 'GroupMember', - member_namespace_id: nil, access_level: 10, notification_level: 3 - ) - - # group2, existing member namespace (do nothing) - members_table.create!( - id: 5, source_id: 202, - source_type: 'Namespace', type: 'GroupMember', - member_namespace_id: 201, access_level: 10, notification_level: 3 - ) - - # Project Namespace memberships (do not change) - # project namespace, existing member namespace (do nothing) - members_table.create!( - id: 6, source_id: 300, - source_type: 'Namespace', type: 'ProjectNamespaceMember', - member_namespace_id: 201, access_level: 10, notification_level: 3 - ) - - # project namespace, not member namespace (do nothing) - members_table.create!( - id: 7, source_id: 301, - source_type: 'Namespace', type: 'ProjectNamespaceMember', - member_namespace_id: 201, access_level: 10, notification_level: 3 - ) - end - - it 'backfills `member_namespace_id` for the selected records', :aggregate_failures do - expect(members_table.where(type: 'ProjectMember', member_namespace_id: nil).count).to eq 2 - expect(members_table.where(type: 'GroupMember', member_namespace_id: nil).count).to eq 1 - - queries = ActiveRecord::QueryRecorder.new do - perform_migration - end - - # rubocop:disable Layout/LineLength - expect(queries.count).to eq(3) - expect(members_table.where(type: 'ProjectMember', member_namespace_id: nil).count).to eq 1 # just the bogus one - expect(members_table.where(type: 'ProjectMember').pluck(:member_namespace_id)).to match_array([nil, 300, 300]) - expect(members_table.where(type: 'GroupMember', member_namespace_id: nil).count).to eq 1 - expect(members_table.where(type: 'GroupMember').pluck(:member_namespace_id)).to match_array([nil, 201]) - # rubocop:enable Layout/LineLength - 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 given a negative pause_ms' do - let(:pause_ms) { -9 } - let(:sub_batch_size) { 2 } - - it 'uses 0 as a floor for pause_ms' do - expect(migration).to receive(:sleep).with(0) - - perform_migration - end - end -end 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 4f32fc3bebee..3eb0000877d0 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: 20220126191624 do +RSpec.describe Gitlab::BackgroundMigration::BackfillTopicsTitle, schema: 20221111123146 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 index 04ada1703bcd..1d1853b032c7 100644 --- a/spec/lib/gitlab/background_migration/backfill_user_details_fields_spec.rb +++ b/spec/lib/gitlab/background_migration/backfill_user_details_fields_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Gitlab::BackgroundMigration::BackfillUserDetailsFields, :migration, schema: 20221018232820 do +RSpec.describe Gitlab::BackgroundMigration::BackfillUserDetailsFields, :migration, schema: 20221111123146 do let(:users) { table(:users) } let(:user_details) { table(:user_details) } 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 9b7c498cfdc6..63135971cd39 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: 20220126191624 do # rubocop:disable Layout/LineLength +RSpec.describe Gitlab::BackgroundMigration::BackfillVulnerabilityReadsClusterAgent, :migration, schema: 20221111123146 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 index c7e4095a488d..4c1af279804f 100644 --- 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 @@ -4,7 +4,7 @@ RSpec.describe Gitlab::BackgroundMigration::BackfillWorkItemTypeIdForIssues, :migration, - schema: 20220825142324, + schema: 20221111123146, feature_category: :team_planning do let(:batch_column) { 'id' } let(:sub_batch_size) { 2 } diff --git a/spec/lib/gitlab/background_migration/destroy_invalid_group_members_spec.rb b/spec/lib/gitlab/background_migration/destroy_invalid_group_members_spec.rb deleted file mode 100644 index 4e136808a36e..000000000000 --- a/spec/lib/gitlab/background_migration/destroy_invalid_group_members_spec.rb +++ /dev/null @@ -1,105 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Gitlab::BackgroundMigration::DestroyInvalidGroupMembers, :migration, schema: 20220809002011 do - # rubocop: disable Layout/LineLength - # rubocop: disable RSpec/ScatteredLet - let!(:migration_attrs) do - { - start_id: 1, - end_id: 1000, - batch_table: :members, - batch_column: :id, - sub_batch_size: 100, - pause_ms: 0, - connection: ApplicationRecord.connection - } - end - - let!(:migration) { described_class.new(**migration_attrs) } - - subject(:perform_migration) { migration.perform } - - let(:users_table) { table(:users) } - let(:namespaces_table) { table(:namespaces) } - let(:members_table) { table(:members) } - let(:projects_table) { table(:projects) } - - let(:user1) { users_table.create!(name: 'user1', email: 'user1@example.com', projects_limit: 5) } - let(:user2) { users_table.create!(name: 'user2', email: 'user2@example.com', projects_limit: 5) } - let(:user3) { users_table.create!(name: 'user3', email: 'user3@example.com', projects_limit: 5) } - let(:user4) { users_table.create!(name: 'user4', email: 'user4@example.com', projects_limit: 5) } - let(:user5) { users_table.create!(name: 'user5', email: 'user5@example.com', projects_limit: 5) } - let(:user6) { users_table.create!(name: 'user6', email: 'user6@example.com', projects_limit: 5) } - - let!(:group1) { namespaces_table.create!(name: 'marvellous group 1', path: 'group-path-1', type: 'Group') } - - let!(:group2) { namespaces_table.create!(name: 'outstanding group 2', path: 'group-path-2', type: 'Group') } - - # create group member records, a mix of both valid and invalid - # project members will have already been filtered out. - let!(:group_member1) { create_invalid_group_member(id: 1, user_id: user1.id) } - - let!(:group_member4) { create_valid_group_member(id: 4, user_id: user2.id, group_id: group1.id) } - - let!(:group_member5) { create_valid_group_member(id: 5, user_id: user3.id, group_id: group2.id) } - - let!(:group_member6) { create_invalid_group_member(id: 6, user_id: user4.id) } - - let!(:group_member7) { create_valid_group_member(id: 7, user_id: user5.id, group_id: group1.id) } - - let!(:group_member8) { create_invalid_group_member(id: 8, user_id: user6.id) } - - it 'removes invalid memberships but keeps valid ones', :aggregate_failures do - expect(members_table.where(type: 'GroupMember').count).to eq 6 - - queries = ActiveRecord::QueryRecorder.new do - perform_migration - end - - expect(queries.count).to eq(4) - expect(members_table.where(type: 'GroupMember').pluck(:id)).to match_array([group_member4, group_member5, group_member7].map(&:id)) - 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 - - it 'logs IDs of deleted records' do - expect(Gitlab::AppLogger).to receive(:info).with({ message: 'Removing invalid group member records', - deleted_count: 3, ids: [group_member1, group_member6, group_member8].map(&:id) }) - - perform_migration - end - - def create_invalid_group_member(id:, user_id:) - members_table.create!( - id: id, - user_id: user_id, - source_id: non_existing_record_id, - access_level: Gitlab::Access::MAINTAINER, - type: "GroupMember", - source_type: "Namespace", - notification_level: 3, - member_namespace_id: nil - ) - end - - def create_valid_group_member(id:, user_id:, group_id:) - members_table.create!( - id: id, - user_id: user_id, - source_id: group_id, - access_level: Gitlab::Access::MAINTAINER, - type: "GroupMember", - source_type: "Namespace", - member_namespace_id: group_id, - notification_level: 3 - ) - end - # rubocop: enable Layout/LineLength - # rubocop: enable RSpec/ScatteredLet -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 e5965d4a1d88..95c5a64bc7b1 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: 20221004094814 do +RSpec.describe Gitlab::BackgroundMigration::DestroyInvalidMembers, :migration, schema: 20221111123146 do let!(:migration_attrs) do { start_id: 1, diff --git a/spec/lib/gitlab/background_migration/destroy_invalid_project_members_spec.rb b/spec/lib/gitlab/background_migration/destroy_invalid_project_members_spec.rb deleted file mode 100644 index 090c31049b4f..000000000000 --- a/spec/lib/gitlab/background_migration/destroy_invalid_project_members_spec.rb +++ /dev/null @@ -1,124 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Gitlab::BackgroundMigration::DestroyInvalidProjectMembers, :migration, schema: 20220901035725 do - # rubocop: disable RSpec/ScatteredLet - let!(:migration_attrs) do - { - start_id: 1, - end_id: 1000, - batch_table: :members, - batch_column: :id, - sub_batch_size: 100, - pause_ms: 0, - connection: ApplicationRecord.connection - } - end - - let!(:migration) { described_class.new(**migration_attrs) } - - subject(:perform_migration) { migration.perform } - - let(:users_table) { table(:users) } - let(:namespaces_table) { table(:namespaces) } - let(:members_table) { table(:members) } - let(:projects_table) { table(:projects) } - - let(:user1) { users_table.create!(name: 'user1', email: 'user1@example.com', projects_limit: 5) } - let(:user2) { users_table.create!(name: 'user2', email: 'user2@example.com', projects_limit: 5) } - let(:user3) { users_table.create!(name: 'user3', email: 'user3@example.com', projects_limit: 5) } - let(:user4) { users_table.create!(name: 'user4', email: 'user4@example.com', projects_limit: 5) } - let(:user5) { users_table.create!(name: 'user5', email: 'user5@example.com', projects_limit: 5) } - let(:user6) { users_table.create!(name: 'user6', email: 'user6@example.com', projects_limit: 5) } - - let!(:group1) { namespaces_table.create!(name: 'marvellous group 1', path: 'group-path-1', type: 'Group') } - - let!(:project_namespace1) do - namespaces_table.create!( - name: 'fabulous project', path: 'project-path-1', type: 'ProjectNamespace', parent_id: group1.id - ) - end - - let!(:project1) do - projects_table.create!( - name: 'fabulous project', - path: 'project-path-1', - project_namespace_id: project_namespace1.id, - namespace_id: group1.id - ) - end - - let!(:project_namespace2) do - namespaces_table.create!( - name: 'splendiferous project', path: 'project-path-2', type: 'ProjectNamespace', parent_id: group1.id - ) - end - - let!(:project2) do - projects_table.create!( - name: 'splendiferous project', - path: 'project-path-2', - project_namespace_id: project_namespace2.id, - namespace_id: group1.id - ) - end - - # create project member records, a mix of both valid and invalid - # group members will have already been filtered out. - let!(:project_member1) { create_invalid_project_member(id: 1, user_id: user1.id) } - let!(:project_member2) { create_valid_project_member(id: 4, user_id: user2.id, project: project1) } - let!(:project_member3) { create_valid_project_member(id: 5, user_id: user3.id, project: project2) } - let!(:project_member4) { create_invalid_project_member(id: 6, user_id: user4.id) } - let!(:project_member5) { create_valid_project_member(id: 7, user_id: user5.id, project: project2) } - let!(:project_member6) { create_invalid_project_member(id: 8, user_id: user6.id) } - - it 'removes invalid memberships but keeps valid ones', :aggregate_failures do - expect(members_table.where(type: 'ProjectMember').count).to eq 6 - - queries = ActiveRecord::QueryRecorder.new do - perform_migration - end - - expect(queries.count).to eq(4) - expect(members_table.where(type: 'ProjectMember')) - .to match_array([project_member2, project_member3, project_member5]) - 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 - - it 'logs IDs of deleted records' do - expect(Gitlab::AppLogger).to receive(:info).with({ - message: 'Removing invalid project member records', - deleted_count: 3, - ids: [project_member1, project_member4, project_member6].map(&:id) - }) - - perform_migration - end - - def create_invalid_project_member(id:, user_id:) - members_table.create!( - id: id, user_id: user_id, source_id: non_existing_record_id, access_level: Gitlab::Access::MAINTAINER, - type: "ProjectMember", source_type: "Project", notification_level: 3, member_namespace_id: nil - ) - end - - def create_valid_project_member(id:, user_id:, project:) - members_table.create!( - id: id, - user_id: user_id, - source_id: project.id, - access_level: Gitlab::Access::MAINTAINER, - type: "ProjectMember", - source_type: "Project", - member_namespace_id: project.project_namespace_id, - notification_level: 3 - ) - end - # rubocop: enable RSpec/ScatteredLet -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 index 33b09490a9a3..8afbd7403d30 100644 --- 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 @@ -4,7 +4,7 @@ RSpec.describe Gitlab::BackgroundMigration::DisableLegacyOpenSourceLicenseForNoIssuesNoRepoProjects, :migration, - schema: 20220126191624 do + schema: 20221111123146 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_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 ba8628c51039..185e2da6f1db 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: 20220126191624 do + schema: 20221111123146 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_one_mb_spec.rb b/spec/lib/gitlab/background_migration/disable_legacy_open_source_license_for_projects_less_than_one_mb_spec.rb index cf544c87b31d..f1ec09840abd 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: 20220906074449 do + schema: 20221111123146 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 index 65d20a00d9f7..4997ae3763e4 100644 --- a/spec/lib/gitlab/background_migration/expire_o_auth_tokens_spec.rb +++ b/spec/lib/gitlab/background_migration/expire_o_auth_tokens_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Gitlab::BackgroundMigration::ExpireOAuthTokens, :migration, schema: 20220126191624 do +RSpec.describe Gitlab::BackgroundMigration::ExpireOAuthTokens, :migration, schema: 20221111123146 do let(:migration) { described_class.new } let(:oauth_access_tokens_table) { table(:oauth_access_tokens) } 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 74f674e052d9..35f93c9982b9 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: 20221019105041 do +RSpec.describe Gitlab::BackgroundMigration::PopulateProjectsStarCount, schema: 20221111123146 do let(:namespaces) { table(:namespaces) } let(:projects) { table(:projects) } let(:users) { table(:users) } 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 59d5d56ebe8b..74fe2c631397 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: 20220601110011 do +RSpec.describe Gitlab::BackgroundMigration::RemoveSelfManagedWikiNotes, :migration, schema: 20221111123146 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 61ca8eff63cb..86c2ab35136b 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: 20220126191624 do + schema: 20221111123146 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 bea6705834e1..5f7a699ac0bf 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: 20220126191624 do + schema: 20221111123146 do let(:namespaces_table) { table(:namespaces) } let(:projects_table) { table(:projects) } let(:project_settings_table) { table(:project_settings) } diff --git a/spec/migrations/20221002234454_finalize_group_member_namespace_id_migration_spec.rb b/spec/migrations/20221002234454_finalize_group_member_namespace_id_migration_spec.rb deleted file mode 100644 index e3adea472731..000000000000 --- a/spec/migrations/20221002234454_finalize_group_member_namespace_id_migration_spec.rb +++ /dev/null @@ -1,76 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe FinalizeGroupMemberNamespaceIdMigration, :migration, feature_category: :groups_and_projects 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, :members, :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: :members, - 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/20221018050323_add_objective_and_keyresult_to_work_item_types_spec.rb b/spec/migrations/20221018050323_add_objective_and_keyresult_to_work_item_types_spec.rb deleted file mode 100644 index d591b370d657..000000000000 --- a/spec/migrations/20221018050323_add_objective_and_keyresult_to_work_item_types_spec.rb +++ /dev/null @@ -1,73 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe AddObjectiveAndKeyresultToWorkItemTypes, :migration, feature_category: :team_planning do - include MigrationHelpers::WorkItemTypesHelper - - let!(:work_item_types) { table(:work_item_types) } - - let(:base_types) do - { - issue: 0, - incident: 1, - test_case: 2, - requirement: 3, - task: 4, - objective: 5, - key_result: 6 - } - end - - append_after(:all) do - # Make sure base types are recreated after running the migration - # because migration specs are not run in a transaction - reset_work_item_types - end - - it 'skips creating both objective & keyresult type record if it already exists' do - reset_db_state_prior_to_migration - work_item_types.find_or_create_by!( - name: 'Key Result', namespace_id: nil, base_type: base_types[:key_result], icon_name: 'issue-type-keyresult' - ) - work_item_types.find_or_create_by!( - name: 'Objective', namespace_id: nil, base_type: base_types[:objective], icon_name: 'issue-type-objective' - ) - - expect do - migrate! - end.to not_change(work_item_types, :count) - end - - it 'adds both objective & keyresult to base work item types' do - reset_db_state_prior_to_migration - - expect do - migrate! - end.to change(work_item_types, :count).from(5).to(7) - - expect(work_item_types.all.pluck(:base_type)).to include(base_types[:objective]) - expect(work_item_types.all.pluck(:base_type)).to include(base_types[:key_result]) - end - - def reset_db_state_prior_to_migration - # Database needs to be in a similar state as when this migration was created - work_item_types.delete_all - work_item_types.find_or_create_by!( - name: 'Issue', namespace_id: nil, base_type: base_types[:issue], icon_name: 'issue-type-issue' - ) - work_item_types.find_or_create_by!( - name: 'Incident', namespace_id: nil, base_type: base_types[:incident], icon_name: 'issue-type-incident' - ) - work_item_types.find_or_create_by!( - name: 'Test Case', namespace_id: nil, base_type: base_types[:test_case], icon_name: 'issue-type-test-case' - ) - work_item_types.find_or_create_by!( - name: 'Requirement', namespace_id: nil, base_type: base_types[:requirement], icon_name: 'issue-type-requirements' - ) - work_item_types.find_or_create_by!( - name: 'Task', namespace_id: nil, base_type: base_types[:task], icon_name: 'issue-type-task' - ) - end -end diff --git a/spec/migrations/20221018062308_schedule_backfill_project_namespace_details_spec.rb b/spec/migrations/20221018062308_schedule_backfill_project_namespace_details_spec.rb deleted file mode 100644 index 9cca2a5adfca..000000000000 --- a/spec/migrations/20221018062308_schedule_backfill_project_namespace_details_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe ScheduleBackfillProjectNamespaceDetails, schema: 20221018062308, feature_category: :groups_and_projects do - context 'when on gitlab.com' do - let!(:background_migration) { described_class::MIGRATION } - let!(:migration) { described_class.new } - - before do - migration.up - end - - describe '#up' do - it 'schedules background jobs for each batch of projects' do - expect(background_migration).to( - have_scheduled_batched_migration( - table_name: :projects, - 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 - it 'deletes all batched migration records' do - migration.down - - expect(described_class::MIGRATION).not_to have_scheduled_batched_migration - end - end - end -end diff --git a/spec/migrations/20221018193635_ensure_task_note_renaming_background_migration_finished_spec.rb b/spec/migrations/20221018193635_ensure_task_note_renaming_background_migration_finished_spec.rb deleted file mode 100644 index da1df92691ea..000000000000 --- a/spec/migrations/20221018193635_ensure_task_note_renaming_background_migration_finished_spec.rb +++ /dev/null @@ -1,95 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe EnsureTaskNoteRenamingBackgroundMigrationFinished, :migration, feature_category: :team_planning do - let(:batched_migrations) { table(:batched_background_migrations) } - let(:batch_failed_status) { 2 } - let(:batch_finalized_status) { 3 } - - let!(:migration) { described_class::MIGRATION } - - describe '#up' do - shared_examples 'finalizes the migration' do - it 'finalizes the migration' do - expect do - migrate! - - task_renaming_migration.reload - failed_job.reload - end.to change(task_renaming_migration, :status).from(task_renaming_migration.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!(:task_renaming_migration) do - batched_migrations.create!( - job_class_name: migration, - table_name: :system_note_metadata, - 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', :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: task_renaming_migration.id, - status: batch_failed_status, - min_value: 1, - max_value: 10, - attempts: 2, - batch_size: 100, - sub_batch_size: 10 - ) - end - - before do - task_renaming_migration.update!(status: status) - end - - it_behaves_like 'finalizes the migration' - end - end - end - end -end diff --git a/spec/migrations/20221021145820_create_routing_table_for_builds_metadata_v2_spec.rb b/spec/migrations/20221021145820_create_routing_table_for_builds_metadata_v2_spec.rb deleted file mode 100644 index 235351956c49..000000000000 --- a/spec/migrations/20221021145820_create_routing_table_for_builds_metadata_v2_spec.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe CreateRoutingTableForBuildsMetadataV2, :migration, feature_category: :continuous_integration do - let!(:migration) { described_class.new } - - describe '#up' do - context 'when the table is already partitioned' do - before do - # `convert_table_to_first_list_partition` checks if it's being executed - # inside a transaction, but we're using transactional fixtures here so we - # need to tell it that it's not inside a transaction. - # We toggle the behavior depending on how many transactions we have open - # instead of just returning `false` because the migration could have the - # DDL transaction enabled. - # - open_transactions = ActiveRecord::Base.connection.open_transactions - allow(migration).to receive(:transaction_open?) do - ActiveRecord::Base.connection.open_transactions > open_transactions - end - - migration.convert_table_to_first_list_partition( - table_name: :ci_builds_metadata, - partitioning_column: :partition_id, - parent_table_name: :p_ci_builds_metadata, - initial_partitioning_value: 100) - end - - it 'skips the migration' do - expect { migrate! }.not_to raise_error - end - end - end -end diff --git a/spec/migrations/20221025043930_change_default_value_on_password_last_changed_at_to_user_details_spec.rb b/spec/migrations/20221025043930_change_default_value_on_password_last_changed_at_to_user_details_spec.rb deleted file mode 100644 index 0e5bb419e32d..000000000000 --- a/spec/migrations/20221025043930_change_default_value_on_password_last_changed_at_to_user_details_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe ChangeDefaultValueOnPasswordLastChangedAtToUserDetails, :migration, feature_category: :user_profile do - let(:namespace) { table(:namespaces).create!(name: 'user', path: 'user') } - let(:users) { table(:users) } - let(:user_details) { table(:user_details) } - - it 'correctly migrates up and down' do - user = create_user!(email: '1234@abc') - user_details.create!(user_id: user.id, provisioned_by_group_id: namespace.id) - - expect(UserDetail.find_by(user_id: user.id).password_last_changed_at).to be_nil - - migrate! - - user = create_user!(email: 'abc@1234') - user_details.create!(user_id: user.id, provisioned_by_group_id: namespace.id) - - expect(UserDetail.find_by(user_id: user.id).password_last_changed_at).not_to be_nil - end - - private - - def create_user!(name: "Example User", email: "user@example.com", user_type: nil) - users.create!( - name: name, - email: email, - username: name, - projects_limit: 0, - user_type: user_type, - confirmed_at: Time.current - ) - end -end diff --git a/spec/migrations/20221028022627_add_index_on_password_last_changed_at_to_user_details_spec.rb b/spec/migrations/20221028022627_add_index_on_password_last_changed_at_to_user_details_spec.rb deleted file mode 100644 index 332b3a5abba8..000000000000 --- a/spec/migrations/20221028022627_add_index_on_password_last_changed_at_to_user_details_spec.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe AddIndexOnPasswordLastChangedAtToUserDetails, :migration, feature_category: :user_profile do - let(:index_name) { 'index_user_details_on_password_last_changed_at' } - - it 'correctly migrates up and down' do - expect(subject).not_to be_index_exists_by_name(:user_details, index_name) - - migrate! - - expect(subject).to be_index_exists_by_name(:user_details, index_name) - end -end diff --git a/spec/migrations/20221101032521_add_default_preferred_language_to_application_settings_spec.rb b/spec/migrations/20221101032521_add_default_preferred_language_to_application_settings_spec.rb deleted file mode 100644 index deca498146bc..000000000000 --- a/spec/migrations/20221101032521_add_default_preferred_language_to_application_settings_spec.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -require_migration! - -RSpec.describe AddDefaultPreferredLanguageToApplicationSettings, feature_category: :internationalization do - let(:application_setting) { table(:application_settings).create! } - - describe "#up" do - it 'allows to read default_preferred_language field' do - migrate! - - expect(application_setting.attributes.keys).to include('default_preferred_language') - expect(application_setting.default_preferred_language).to eq 'en' - end - end - - describe "#down" do - it 'deletes default_preferred_language field' do - migrate! - schema_migrate_down! - - expect(application_setting.attributes.keys).not_to include('default_preferred_language') - end - end -end diff --git a/spec/migrations/20221101032600_add_text_limit_to_default_preferred_language_on_application_settings_spec.rb b/spec/migrations/20221101032600_add_text_limit_to_default_preferred_language_on_application_settings_spec.rb deleted file mode 100644 index 3e36e99a0ca3..000000000000 --- a/spec/migrations/20221101032600_add_text_limit_to_default_preferred_language_on_application_settings_spec.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -require_migration! - -RSpec.describe AddTextLimitToDefaultPreferredLanguageOnApplicationSettings, feature_category: :internationalization do - let(:application_setting) { table(:application_settings).create! } - let(:too_long_text) { SecureRandom.alphanumeric(described_class::MAXIMUM_LIMIT + 1) } - - subject { application_setting.update_column(:default_preferred_language, too_long_text) } - - describe "#up" do - it 'adds text limit to default_preferred_language' do - migrate! - - expect { subject }.to raise_error ActiveRecord::StatementInvalid - end - end - - describe "#down" do - it 'deletes text limit to default_preferred_language' do - migrate! - schema_migrate_down! - - expect { subject }.not_to raise_error - end - end -end diff --git a/spec/migrations/20221102090940_create_next_ci_partitions_record_spec.rb b/spec/migrations/20221102090940_create_next_ci_partitions_record_spec.rb deleted file mode 100644 index dc6f365fe2bc..000000000000 --- a/spec/migrations/20221102090940_create_next_ci_partitions_record_spec.rb +++ /dev/null @@ -1,63 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe CreateNextCiPartitionsRecord, migration: :gitlab_ci, feature_category: :continuous_integration do - let(:migration) { described_class.new } - let(:partitions) { table(:ci_partitions) } - - describe '#up' do - context 'when on sass' do - before do - allow(Gitlab).to receive(:com?).and_return(true) - end - - it 'creates next partitions record and resets the sequence' do - expect { migrate! } - .to change { partitions.where(id: 101).any? } - .from(false).to(true) - - expect { partitions.create! }.not_to raise_error - end - end - - context 'when self-managed' do - before do - allow(Gitlab).to receive(:com?).and_return(false) - end - - it 'does not create records' do - expect { migrate! }.not_to change(partitions, :count) - end - end - end - - describe '#down' do - context 'when on sass' do - before do - allow(Gitlab).to receive(:com?).and_return(true) - end - - it 'removes the record' do - migrate! - - expect { migration.down } - .to change { partitions.where(id: 101).any? } - .from(true).to(false) - end - end - - context 'when self-managed' do - before do - allow(Gitlab).to receive(:com?).and_return(true, false) - end - - it 'does not remove the record' do - expect { migrate! }.to change(partitions, :count).by(1) - - expect { migration.down }.not_to change(partitions, :count) - end - end - end -end diff --git a/spec/migrations/20221102090943_create_second_partition_for_builds_metadata_spec.rb b/spec/migrations/20221102090943_create_second_partition_for_builds_metadata_spec.rb deleted file mode 100644 index 52a6242f3839..000000000000 --- a/spec/migrations/20221102090943_create_second_partition_for_builds_metadata_spec.rb +++ /dev/null @@ -1,65 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe CreateSecondPartitionForBuildsMetadata, :migration, feature_category: :continuous_integration do - let(:migration) { described_class.new } - let(:partitions) { table(:ci_partitions) } - - describe '#up' do - context 'when on sass' do - before do - allow(Gitlab).to receive(:com?).and_return(true) - end - - it 'creates a new partition' do - migrate! - - expect(partition_101_exists?).to be(true) - end - end - - context 'when self-managed' do - before do - allow(Gitlab).to receive(:com?).and_return(false) - end - - it 'does not create the partition' do - expect { migrate! }.not_to change { partition_101_exists? } - end - end - end - - describe '#down' do - context 'when on sass' do - before do - allow(Gitlab).to receive(:com?).and_return(true) - end - - it 'removes the partition' do - migrate! - - expect { migration.down }.to change { partition_101_exists? }.to(false) - end - end - - context 'when self-managed' do - before do - allow(Gitlab).to receive(:com?).and_return(false) - end - - it 'does not change the partitions count' do - migrate! - - expect { migration.down }.not_to change { partition_101_exists? } - end - end - end - - def partition_101_exists? - Gitlab::Database::PostgresPartition - .for_parent_table(:p_ci_builds_metadata) - .where(name: :ci_builds_metadata_101).any? - end -end diff --git a/spec/migrations/cleanup_vulnerability_state_transitions_with_same_from_state_to_state_spec.rb b/spec/migrations/cleanup_vulnerability_state_transitions_with_same_from_state_to_state_spec.rb deleted file mode 100644 index b270f2b100f6..000000000000 --- a/spec/migrations/cleanup_vulnerability_state_transitions_with_same_from_state_to_state_spec.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe CleanupVulnerabilityStateTransitionsWithSameFromStateToState, :migration, - feature_category: :vulnerability_management do - let!(:namespace) { table(:namespaces).create!(name: 'namespace', type: 'Group', path: 'namespace') } - let!(:user) { table(:users).create!(email: 'author@example.com', username: 'author', projects_limit: 10) } - let!(:project) do - table(:projects).create!( - path: 'project', - namespace_id: namespace.id, - project_namespace_id: namespace.id - ) - end - - let!(:vulnerability) do - table(:vulnerabilities).create!( - project_id: project.id, - author_id: user.id, - title: 'test', - severity: 7, - confidence: 7, - report_type: 0 - ) - end - - let!(:state_transitions) { table(:vulnerability_state_transitions) } - - let!(:state_transition_with_no_state_change) do - state_transitions.create!( - vulnerability_id: vulnerability.id, - from_state: 2, - to_state: 2 - ) - end - - let!(:state_transition_with_state_change) do - state_transitions.create!( - vulnerability_id: vulnerability.id, - from_state: 1, - to_state: 2 - ) - end - - it 'deletes state transitions with no state change' do - expect { migrate! }.to change(state_transitions, :count).from(2).to(1) - end -end diff --git a/spec/migrations/delete_migrate_shared_vulnerability_scanners_spec.rb b/spec/migrations/delete_migrate_shared_vulnerability_scanners_spec.rb deleted file mode 100644 index 8a0c0250cdfb..000000000000 --- a/spec/migrations/delete_migrate_shared_vulnerability_scanners_spec.rb +++ /dev/null @@ -1,73 +0,0 @@ -# frozen_string_literal: true - -require "spec_helper" - -require_migration! - -RSpec.describe DeleteMigrateSharedVulnerabilityScanners, :migration, feature_category: :vulnerability_management do - let(:batched_background_migrations) { table(:batched_background_migrations) } - let(:batched_background_migration_jobs) { table(:batched_background_migration_jobs) } - - let(:migration) do - batched_background_migrations.create!( - created_at: Time.zone.now, - updated_at: Time.zone.now, - min_value: 1, - max_value: 1, - batch_size: described_class::BATCH_SIZE, - sub_batch_size: 100, - interval: 300, - status: 3, - job_class_name: described_class::MIGRATION, - batch_class_name: "PrimaryKeyBatchingStrategy", - table_name: described_class::TABLE_NAME, - column_name: described_class::BATCH_COLUMN, - job_arguments: [], - pause_ms: 100, - max_batch_size: 1000, - gitlab_schema: "gitlab_main" - ) - end - - let(:jobs) do - Array.new(10) do - batched_background_migration_jobs.create!( - batched_background_migration_id: migration.id, - created_at: Time.zone.now, - updated_at: Time.zone.now, - min_value: 1, - max_value: 1, - batch_size: 1, - sub_batch_size: 1, - status: 0, - attempts: 0, - metrics: {}, - pause_ms: 100 - ) - end - end - - describe "#up" do - it "deletes jobs" do - expect { migrate! }.to change(batched_background_migration_jobs, :count).from(jobs.count).to(0) - end - - it "deletes the migration" do - expect { migrate! }.to change { batched_background_migrations.find_by(id: migration.id) }.from(migration).to(nil) - end - - context "when background migration does not exist" do - before do - migration.destroy! - end - - it "does not delete jobs" do - expect { migrate! }.not_to change(batched_background_migration_jobs, :count) - end - - it "does not delete the migration" do - expect { migrate! }.not_to change { batched_background_migrations.find_by(id: migration.id) } - end - end - end -end diff --git a/spec/migrations/finalize_invalid_member_cleanup_spec.rb b/spec/migrations/finalize_invalid_member_cleanup_spec.rb deleted file mode 100644 index ace973ea1af4..000000000000 --- a/spec/migrations/finalize_invalid_member_cleanup_spec.rb +++ /dev/null @@ -1,76 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe FinalizeInvalidMemberCleanup, :migration, feature_category: :groups_and_projects 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('DestroyInvalidMembers', :members, :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!(:destroy_invalid_member_migration) do - batched_migrations.create!( - job_class_name: 'DestroyInvalidMembers', - table_name: :members, - 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 - destroy_invalid_member_migration.update!(status: status) - end - - it_behaves_like 'finalizes the migration' - end - end - end - end -end diff --git a/spec/migrations/queue_backfill_user_details_fields_spec.rb b/spec/migrations/queue_backfill_user_details_fields_spec.rb deleted file mode 100644 index 4613a85be407..000000000000 --- a/spec/migrations/queue_backfill_user_details_fields_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe QueueBackfillUserDetailsFields, feature_category: :user_profile 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: :users, - column_name: :id, - interval: described_class::INTERVAL - ) - } - end - end -end diff --git a/spec/migrations/queue_populate_projects_star_count_spec.rb b/spec/migrations/queue_populate_projects_star_count_spec.rb deleted file mode 100644 index b30bb6a578bb..000000000000 --- a/spec/migrations/queue_populate_projects_star_count_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe QueuePopulateProjectsStarCount, feature_category: :user_profile 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: :projects, - column_name: :id, - interval: described_class::DELAY_INTERVAL - ) - } - end - end -end diff --git a/spec/migrations/recount_epic_cache_counts_spec.rb b/spec/migrations/recount_epic_cache_counts_spec.rb deleted file mode 100644 index d065389a7267..000000000000 --- a/spec/migrations/recount_epic_cache_counts_spec.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe RecountEpicCacheCounts, :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/reschedule_migrate_shared_vulnerability_scanners_spec.rb b/spec/migrations/reschedule_migrate_shared_vulnerability_scanners_spec.rb deleted file mode 100644 index 48422de81fef..000000000000 --- a/spec/migrations/reschedule_migrate_shared_vulnerability_scanners_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true - -require "spec_helper" - -require_migration! - -RSpec.describe RescheduleMigrateSharedVulnerabilityScanners, :migration, feature_category: :vulnerability_management do - include Gitlab::Database::Migrations::BatchedBackgroundMigrationHelpers - - def connection - ApplicationRecord.connection - end - - describe "#up" do - before do - migrate! - end - - it "schedules" do - expect(described_class::MIGRATION).to have_scheduled_batched_migration( - table_name: described_class::TABLE_NAME, - column_name: described_class::BATCH_COLUMN, - interval: described_class::DELAY_INTERVAL, - batch_size: described_class::BATCH_SIZE, - max_batch_size: described_class::BATCH_SIZE, - sub_batch_size: described_class::SUB_BATCH_SIZE, - gitlab_schema: :gitlab_main - ) - end - end - - describe '#down' do - before do - schema_migrate_down! - end - - it "deletes" do - expect(described_class::MIGRATION).not_to have_scheduled_batched_migration - end - end -end diff --git a/spec/migrations/set_email_confirmation_setting_from_send_user_confirmation_email_setting_spec.rb b/spec/migrations/set_email_confirmation_setting_from_send_user_confirmation_email_setting_spec.rb deleted file mode 100644 index ef1ced530c9e..000000000000 --- a/spec/migrations/set_email_confirmation_setting_from_send_user_confirmation_email_setting_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe SetEmailConfirmationSettingFromSendUserConfirmationEmailSetting, 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/migrations/sync_new_amount_used_for_ci_namespace_monthly_usages_spec.rb b/spec/migrations/sync_new_amount_used_for_ci_namespace_monthly_usages_spec.rb deleted file mode 100644 index c60447d04a14..000000000000 --- a/spec/migrations/sync_new_amount_used_for_ci_namespace_monthly_usages_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -require_migration! - -RSpec.describe SyncNewAmountUsedForCiNamespaceMonthlyUsages, migration: :gitlab_ci, - feature_category: :continuous_integration do - let(:namespace_usages) { table(:ci_namespace_monthly_usages) } - - 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 - - it 'updates `new_amount_used` with values from `amount_used`' do - expect(namespace_usages.where(new_amount_used: 0).count).to eq(6) - - migrate! - - 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 diff --git a/spec/migrations/sync_new_amount_used_for_ci_project_monthly_usages_spec.rb b/spec/migrations/sync_new_amount_used_for_ci_project_monthly_usages_spec.rb deleted file mode 100644 index d7add66a97fb..000000000000 --- a/spec/migrations/sync_new_amount_used_for_ci_project_monthly_usages_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -require_migration! - -RSpec.describe SyncNewAmountUsedForCiProjectMonthlyUsages, migration: :gitlab_ci, - feature_category: :continuous_integration do - let(:project_usages) { table(:ci_project_monthly_usages) } - - 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 - - it 'updates `new_amount_used` with values from `amount_used`' do - expect(project_usages.where(new_amount_used: 0).count).to eq(6) - - migrate! - - 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 diff --git a/spec/support/rspec_order_todo.yml b/spec/support/rspec_order_todo.yml index d68331b855ab..48fb74b13f89 100644 --- a/spec/support/rspec_order_todo.yml +++ b/spec/support/rspec_order_todo.yml @@ -5340,7 +5340,6 @@ - './spec/lib/gitlab/background_migration/backfill_note_discussion_id_spec.rb' - './spec/lib/gitlab/background_migration/backfill_project_feature_package_registry_access_level_spec.rb' - './spec/lib/gitlab/background_migration/backfill_project_import_level_spec.rb' -- './spec/lib/gitlab/background_migration/backfill_project_member_namespace_id_spec.rb' - './spec/lib/gitlab/background_migration/backfill_project_repositories_spec.rb' - './spec/lib/gitlab/background_migration/backfill_snippet_repositories_spec.rb' - './spec/lib/gitlab/background_migration/backfill_topics_title_spec.rb' @@ -5354,7 +5353,6 @@ - './spec/lib/gitlab/background_migration/batching_strategies/loose_index_scan_batching_strategy_spec.rb' - './spec/lib/gitlab/background_migration/batching_strategies/primary_key_batching_strategy_spec.rb' - './spec/lib/gitlab/background_migration/copy_column_using_background_migration_job_spec.rb' -- './spec/lib/gitlab/background_migration/destroy_invalid_group_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' -- GitLab