Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-11-18 00:16:59 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-11-18 00:16:59 +0300
commit20082d14c8a188514703824d59f1a1a524477b68 (patch)
tree05dd2a49006d2a41804d412ecebcfa3552550215
parent7468e26195700e0f13081d49377a4ec03f29f6b7 (diff)
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--.gitlab/ci/database.gitlab-ci.yml2
-rw-r--r--.gitlab/ci/rules.gitlab-ci.yml1
-rw-r--r--.rubocop_todo/layout/argument_alignment.yml47
-rw-r--r--.rubocop_todo/layout/array_alignment.yml1
-rw-r--r--.rubocop_todo/layout/empty_line_after_magic_comment.yml5
-rw-r--r--.rubocop_todo/layout/line_end_string_concatenation_indentation.yml2
-rw-r--r--.rubocop_todo/layout/line_length.yml1
-rw-r--r--.rubocop_todo/lint/missing_cop_enable_directive.yml1
-rw-r--r--.rubocop_todo/lint/redundant_cop_disable_directive.yml7
-rw-r--r--.rubocop_todo/migration/avoid_finalize_background_migration.yml3
-rw-r--r--.rubocop_todo/migration/background_migrations.yml9
-rw-r--r--.rubocop_todo/rails/find_each.yml1
-rw-r--r--.rubocop_todo/rspec/expect_change.yml1
-rw-r--r--.rubocop_todo/rspec/feature_category.yml4
-rw-r--r--.rubocop_todo/style/empty_method.yml2
-rw-r--r--.rubocop_todo/style/if_unless_modifier.yml1
-rw-r--r--.rubocop_todo/style/inline_disable_annotation.yml27
-rw-r--r--.rubocop_todo/style/numeric_literal_prefix.yml1
-rw-r--r--.rubocop_todo/style/symbol_proc.yml1
-rw-r--r--app/assets/javascripts/ci/jobs_page/components/job_cells/actions_cell.vue5
-rw-r--r--app/assets/javascripts/ci/jobs_page/graphql/queries/get_jobs.query.graphql1
-rw-r--r--app/assets/javascripts/ci/pipeline_details/header/graphql/queries/get_pipeline_header_data.query.graphql1
-rw-r--r--app/assets/javascripts/ci/pipeline_details/header/pipeline_details_header.vue2
-rw-r--r--app/assets/javascripts/graphql_shared/constants.js1
-rw-r--r--app/helpers/vite_helper.rb2
-rw-r--r--app/models/concerns/pg_full_text_searchable.rb2
-rw-r--r--app/models/member.rb29
-rw-r--r--app/views/projects/settings/ci_cd/_form.html.haml2
-rw-r--r--config/locales/doorkeeper.en.yml12
-rw-r--r--config/metrics/settings/20210204124910_omniauth_enabled.yml1
-rw-r--r--config/metrics/settings/20210204124912_prometheus_enabled.yml1
-rw-r--r--config/metrics/settings/20210204124914_prometheus_metrics_enabled.yml1
-rw-r--r--config/metrics/settings/20210204124916_reply_by_email_enabled.yml1
-rw-r--r--db/init_structure.sql3956
-rw-r--r--db/migrate/20220213100000_remove_integration_type_triggers.rb32
-rw-r--r--db/migrate/20220221102333_change_maintainer_note_limit_in_ci_runner.rb24
-rw-r--r--db/migrate/20220314094841_add_package_registry_access_level_into_project_features.rb13
-rw-r--r--db/migrate/20220316022505_create_namespace_details.rb21
-rw-r--r--db/migrate/20220324091224_add_enforce_auth_checks_on_uploads_to_project_settings.rb9
-rw-r--r--db/migrate/20220329092245_add_password_chars_requirement_to_application_settings.rb10
-rw-r--r--db/migrate/20220329130330_add_author_to_ci_subscriptions_projects.rb20
-rw-r--r--db/migrate/20220331125725_add_title_to_topic.rb10
-rw-r--r--db/migrate/20220331130726_add_text_limit_to_topics_title.rb13
-rw-r--r--db/migrate/20220401071609_add_campaign_to_in_product_marketing_email.rb35
-rw-r--r--db/migrate/20220401151123_add_last_repository_updated_at_to_project_repository_state.rb8
-rw-r--r--db/migrate/20220406133049_add_delayed_group_deletion_to_application_settings.rb11
-rw-r--r--db/migrate/20220412060931_add_nullify_build_data_trigger_on_merge_request_metrics.rb28
-rw-r--r--db/migrate/20220412135446_add_unique_fingerprint_sha256_index_to_key.rb18
-rw-r--r--db/migrate/20220412140446_add_unique_fingerprint_sha256_index_to_group_deploy_key.rb18
-rw-r--r--db/migrate/20220412140755_drop_unique_fingerprint_md5_index_from_key.rb17
-rw-r--r--db/migrate/20220412141020_drop_unique_fingerprint_md5_index_from_group_deploy_key.rb17
-rw-r--r--db/migrate/20220413054910_backfill_delayed_group_deletion.rb21
-rw-r--r--db/migrate/20220413124200_add_view_for_per_table_autovacuum_status.rb45
-rw-r--r--db/migrate/20220413164146_remove_max_seats_used_indices.rb24
-rw-r--r--db/migrate/20220413235818_add_max_seats_used_changed_at_to_gitlab_subscriptions.rb7
-rw-r--r--db/migrate/20220414203622_add_index_for_columns_user_custom_attribute.rb14
-rw-r--r--db/migrate/20220415015143_replace_iterations_cadence_date_range_constraint.rb35
-rw-r--r--db/migrate/20220419223906_add_arkose_namespace_to_application_settings.rb23
-rw-r--r--db/migrate/20220420034519_add_text_limit_to_in_product_marketing_email_campaign.rb13
-rw-r--r--db/migrate/20220420135245_fix_batched_background_migration_default_arguments.rb7
-rw-r--r--db/migrate/20220420173247_add_group_inheritance_type_to_pe_authorizable.rb14
-rw-r--r--db/migrate/20220420192542_add_id_for_cleanup_index_packages_package_files.rb19
-rw-r--r--db/migrate/20220421114418_make_fingerprint_nullable_for_group_deploy_key.rb11
-rw-r--r--db/migrate/20220421141342_add_allowed_plans_to_ci_runners.rb9
-rw-r--r--db/migrate/20220421144758_change_dotenv_plan_limits_for_old_plans.rb19
-rw-r--r--db/migrate/20220421180321_add_last_cleanup_deleted_tags_count_to_container_repository.rb7
-rw-r--r--db/migrate/20220422200633_fix_view_for_per_table_autovacuum_status.rb73
-rw-r--r--db/migrate/20220422220507_remove_tmp_index_supporting_leaky_regex_cleanup.rb25
-rw-r--r--db/migrate/20220425120604_create_packages_cleanup_policies.rb22
-rw-r--r--db/migrate/20220426130217_add_max_export_size_to_application_settings.rb7
-rw-r--r--db/migrate/20220502125053_recreate_index_for_project_group_link_with_group_id_and_project_id.rb18
-rw-r--r--db/migrate/20220502150408_add_slack_integrations_bot_columns.rb11
-rw-r--r--db/migrate/20220502152633_add_slack_integrations_bot_user_id_text_limit.rb13
-rw-r--r--db/migrate/20220503035221_add_gitlab_schema_to_batched_background_migrations.rb11
-rw-r--r--db/migrate/20220503035437_add_text_limit_to_batched_background_migrations_gitlab_schema.rb13
-rw-r--r--db/migrate/20220503073401_recreate_index_for_group_group_link_with_both_group_ids.rb18
-rw-r--r--db/migrate/20220503102855_add_namespace_ci_cd_settings_table.rb16
-rw-r--r--db/migrate/20220504042847_add_slack_signing_key_to_application_settings.rb8
-rw-r--r--db/migrate/20220504140036_add_container_registry_size_to_namespace_root_storage_statistics.rb9
-rw-r--r--db/migrate/20220505092254_add_allow_stale_runner_pruning_index_to_namespace_ci_cd_settings.rb18
-rw-r--r--db/migrate/20220506154054_create_sync_namespace_details_trigger.rb70
-rw-r--r--db/migrate/20220506180411_add_index_to_vulnerability_feedback_finding_uuid.rb17
-rw-r--r--db/migrate/20220511090324_add_last_consistency_check_cursors_to_vsa_aggregations.rb28
-rw-r--r--db/migrate/20220511144946_add_work_item_parent_child_table.rb27
-rw-r--r--db/migrate/20220511151646_add_exclude_from_free_user_cap_to_namespace_settings.rb13
-rw-r--r--db/migrate/20220511191502_add_registry_migration_guard_thresholds_to_application_settings.rb15
-rw-r--r--db/migrate/20220511191503_add_pipeline_create_limit_per_project_user_sha_to_application_settings.rb7
-rw-r--r--db/migrate/20220512020500_index_batched_migrations_on_gitlab_schema_and_configuration.rb19
-rw-r--r--db/migrate/20220513093614_add_ding_talk_into_application_settings.rb14
-rw-r--r--db/migrate/20220513093615_add_ding_talk_tracker_data.rb15
-rw-r--r--db/migrate/20220513095545_create_timelog_categories.rb28
-rw-r--r--db/migrate/20220513114706_add_jira_connect_application_id_application_setting.rb10
-rw-r--r--db/migrate/20220513114850_add_text_limit_to_jira_connect_application_id_application_setting.rb13
-rw-r--r--db/migrate/20220516054002_temp_index_for_project_namespace_member_backfill.rb19
-rw-r--r--db/migrate/20220516092207_add_globally_allowed_ips_to_application_setting.rb11
-rw-r--r--db/migrate/20220516123101_add_text_limit_to_globally_allowed_ips_on_application_settings.rb13
-rw-r--r--db/migrate/20220516201245_add_security_policy_scan_execution_schedules_to_plan_limits.rb11
-rw-r--r--db/migrate/20220517182529_create_vulnerability_state_transition.rb18
-rw-r--r--db/migrate/20220518183504_create_ssh_signatures.rb13
-rw-r--r--db/migrate/20220518183548_add_projects_relation_to_ssh_signatures.rb15
-rw-r--r--db/migrate/20220519013213_create_cluster_enabled_grants.rb12
-rw-r--r--db/migrate/20220519141345_add_job_artifact_id_on_refresh_start_to_build_artifacts_size_refresh.rb7
-rw-r--r--db/migrate/20220520030504_drop_index_namespaces_on_name.rb15
-rw-r--r--db/migrate/20220520122755_unlock_delayed_project_removal.rb25
-rw-r--r--db/migrate/20220520143105_add_keys_relation_to_ssh_signatures.rb15
-rw-r--r--db/migrate/20220520144821_add_registry_migration_pre_import_tags_rate_to_application_settings.rb12
-rw-r--r--db/migrate/20220523030804_add_web_hook_calls_med_and_max_to_plan_limits.rb8
-rw-r--r--db/migrate/20220523030805_add_web_hook_calls_to_plan_limits_paid_tiers.rb81
-rw-r--r--db/migrate/20220523162734_add_vulnerability_reads_casted_cluster_agent_column.rb9
-rw-r--r--db/migrate/20220523163734_update_vulnerability_reads_trigger_functions.rb81
-rw-r--r--db/migrate/20220524021855_add_deleted_at_to_terraform_states.rb9
-rw-r--r--db/migrate/20220524141800_create_audit_events_streaming_headers.rb20
-rw-r--r--db/migrate/20220524164122_limit_project_and_group_variables.rb8
-rw-r--r--db/migrate/20220524184149_create_sync_project_namespace_details_trigger.rb68
-rw-r--r--db/migrate/20220524191259_add_application_settings_container_registry_pre_import_tags_rate_constraint.rb15
-rw-r--r--db/migrate/20220525082303_create_issuable_resource_links.rb14
-rw-r--r--db/migrate/20220525123825_add_raw_to_ci_pipeline_variables.rb9
-rw-r--r--db/migrate/20220525123851_add_raw_to_ci_group_variables.rb9
-rw-r--r--db/migrate/20220525123914_add_raw_to_ci_instance_variables.rb9
-rw-r--r--db/migrate/20220525123940_add_raw_to_ci_job_variables.rb9
-rw-r--r--db/migrate/20220525124104_add_raw_to_ci_pipeline_schedule_variables.rb9
-rw-r--r--db/migrate/20220525124125_add_raw_to_ci_variables.rb9
-rw-r--r--db/migrate/20220530103023_add_created_at_and_id_index_to_deployment_approvals.rb15
-rw-r--r--db/migrate/20220530104431_add_timestamps_to_compliance_frameworks.rb13
-rw-r--r--db/migrate/20220531024905_add_operations_access_levels_to_project_feature.rb24
-rw-r--r--db/migrate/20220531100920_add_license_usage_data_exported_to_application_settings.rb9
-rw-r--r--db/migrate/20220531140515_add_applies_to_all_protected_branches_to_approval_project_rule.rb7
-rw-r--r--db/migrate/20220601091804_add_semver_column_to_ci_runners.rb14
-rw-r--r--db/migrate/20220601091805_add_text_limit_to_ci_runners_semver.rb13
-rw-r--r--db/migrate/20220601101800_add_index_on_runner_id_and_semver_columns.rb17
-rw-r--r--db/migrate/20220601223501_add_vulnerability_related_columns.rb30
-rw-r--r--db/migrate/20220602130306_add_namespace_type_index.rb17
-rw-r--r--db/migrate/20220603095158_drop_ci_build_report_results_build_id_sequence.rb13
-rw-r--r--db/migrate/20220605170009_add_url_vars_to_web_hook.rb8
-rw-r--r--db/migrate/20220607011733_add_phone_verification_code_enabled_to_application_settings.rb16
-rw-r--r--db/migrate/20220607095219_drop_ci_pipelines_config_pipeline_id_sequence.rb13
-rw-r--r--db/migrate/20220607115703_drop_ci_job_artifact_states_job_artifact_id_sequence.rb11
-rw-r--r--db/migrate/20220608074738_add_max_repository_downloads_limit_to_application_settings.rb15
-rw-r--r--db/migrate/20220608114734_prepare_confidential_note_index_on_id.rb13
-rw-r--r--db/migrate/20220609150626_add_partial_index_on_slack_integrations_with_bot_user_id.rb15
-rw-r--r--db/migrate/20220610074326_add_epic_issue_weight.rb10
-rw-r--r--db/migrate/20220610125248_add_enabled_git_access_protocol_to_namespace_settings.rb7
-rw-r--r--db/migrate/20220610140605_change_public_projects_cost_factor.rb35
-rw-r--r--db/migrate/20220613054349_add_unique_project_download_limit_settings_to_namespace_settings.rb12
-rw-r--r--db/migrate/20220614095912_add_has_vulnerabilities_to_cluster_agents.rb9
-rw-r--r--db/migrate/20220614120415_add_toggle_opt_in_jwt.rb7
-rw-r--r--db/migrate/20220615091059_add_created_at_index_to_compliance_management_frameworks.rb17
-rw-r--r--db/migrate/20220615105811_add_index_on_clusters_agent_project_id_and_has_vulnerabilities_columns.rb17
-rw-r--r--db/migrate/20220616182001_create_sbom_components.rb11
-rw-r--r--db/migrate/20220616182015_create_sbom_component_versions.rb15
-rw-r--r--db/migrate/20220616182016_create_sbom_sources.rb12
-rw-r--r--db/migrate/20220616182038_create_sbom_occurrences.rb14
-rw-r--r--db/migrate/20220616183240_add_sbom_component_versions_foreign_key_to_sbom_occurrences.rb18
-rw-r--r--db/migrate/20220616183309_add_sbom_source_foreign_key_to_sbom_occurrences.rb15
-rw-r--r--db/migrate/20220616183310_add_project_foreign_key_to_sbom_occurrences.rb15
-rw-r--r--db/migrate/20220617123135_drop_temp_index_on_projects_on_id_and_runners_token.rb21
-rw-r--r--db/migrate/20220617123144_drop_temp_index_on_projects_on_id_and_runners_token_encrypted.rb21
-rw-r--r--db/migrate/20220617141347_create_ci_secure_file_states.rb34
-rw-r--r--db/migrate/20220619182308_create_project_relation_exports.rb20
-rw-r--r--db/migrate/20220619184931_create_project_relation_export_uploads.rb15
-rw-r--r--db/migrate/20220619212618_add_selective_code_owner_removals_to_project_settings.rb9
-rw-r--r--db/migrate/20220621202616_add_partial_index_on_oauth_access_tokens_revoked_at.rb19
-rw-r--r--db/migrate/20220624081524_add_ci_runner_versions_table.rb16
-rw-r--r--db/migrate/20220624090458_add_index_on_runner_version.rb15
-rw-r--r--db/migrate/20220627061008_add_fei_shu_integration.rb12
-rw-r--r--db/migrate/20220627122229_create_user_namespace_callouts.rb16
-rw-r--r--db/migrate/20220627122230_add_foreign_keys_to_user_namespace_callouts.rb28
-rw-r--r--db/migrate/20220627140315_add_last_feature_flag_updated_at_to_operations_feature_flags_clients.rb7
-rw-r--r--db/migrate/20220627171538_add_error_tracking_settings.rb21
-rw-r--r--db/migrate/20220628110214_add_namespace_id_column_to_issues_table.rb13
-rw-r--r--db/migrate/20220628120708_create_namespace_bans.rb15
-rw-r--r--db/migrate/20220628121644_add_namespace_bans_namespace_id_foreign_key.rb15
-rw-r--r--db/migrate/20220628121712_add_namespace_bans_user_id_foreign_key.rb15
-rw-r--r--db/migrate/20220629220129_increase_webauthn_xid_length.rb17
-rw-r--r--db/migrate/20220630202329_add_partial_index_on_oauth_access_tokens_revoked_at_with_order.rb20
-rw-r--r--db/migrate/20220701173859_remove_not_null_constraints_from_requirements.rb19
-rw-r--r--db/migrate/20220703182234_add_findings_partition_number_to_security_scans.rb9
-rw-r--r--db/migrate/20220703182254_add_partition_number_to_security_findings.rb9
-rw-r--r--db/migrate/20220704034050_add_users_allowlist_to_git_rate_limits.rb11
-rw-r--r--db/migrate/20220704034105_add_application_settings_git_users_allowlist_max_usernames_constraint.rb15
-rw-r--r--db/migrate/20220705145349_add_project_import_level_to_namespace_settings.rb9
-rw-r--r--db/migrate/20220706191627_add_encrypted_error_tracking_access_token.rb17
-rw-r--r--db/migrate/20220707105335_rename_chat_name_service_id_to_integration_id.rb13
-rw-r--r--db/migrate/20220707160707_rename_slack_integration_service_id_to_integration_id.rb13
-rw-r--r--db/migrate/20220707181910_create_member_roles.rb15
-rw-r--r--db/migrate/20220707181920_add_member_role_id_to_members.rb13
-rw-r--r--db/migrate/20220707181930_add_member_roles_relation_to_members.rb19
-rw-r--r--db/migrate/20220707190546_add_plan_limits_max_size_cyclonedx_report_column.rb7
-rw-r--r--db/migrate/20220708100532_add_unique_index_on_ci_runner_versions_on_status_and_version.rb15
-rw-r--r--db/migrate/20220708132701_create_vulnerability_merge_request_links.rb29
-rw-r--r--db/migrate/20220708142744_add_composite_index_for_protected_environments.rb16
-rw-r--r--db/migrate/20220708142803_add_composite_index_for_protected_environment_approval_rules.rb16
-rw-r--r--db/migrate/20220708150315_add_vulnerabilities_foreign_key_to_vulnerability_merge_request_links.rb16
-rw-r--r--db/migrate/20220708150335_add_merge_requests_foreign_key_to_vulnerability_merge_request_links.rb16
-rw-r--r--db/migrate/20220708184822_cleanup_backfill_draft_status_on_merge_requests.rb14
-rw-r--r--db/migrate/20220712025712_update_insert_or_update_vulnerability_reads_function.rb86
-rw-r--r--db/migrate/20220712031923_create_vulnerability_reads_for_an_existing_vulnerability_record.rb60
-rw-r--r--db/migrate/20220712094945_add_include_for_free_user_cap_preview_to_namespace_settings.rb13
-rw-r--r--db/migrate/20220712131513_rename_issue_tracker_data_service_id_to_integration_id.rb13
-rw-r--r--db/migrate/20220712144843_rename_jira_tracker_data_service_id_to_integration_id.rb13
-rw-r--r--db/migrate/20220713175658_add_packages_cleanup_policies_worker_capacity_to_application_settings.rb11
-rw-r--r--db/migrate/20220713175737_add_application_settings_packages_cleanup_policies_worker_capacity_constraint.rb17
-rw-r--r--db/migrate/20220713175812_add_enabled_policies_index_to_packages_cleanup_policies.rb18
-rw-r--r--db/migrate/20220714105122_update_default_project_import_level_on_namespace_settings.rb13
-rw-r--r--db/migrate/20220714142424_update_trigger_update_vulnerability_reads_on_vulnerability_update.rb48
-rw-r--r--db/migrate/20220718083945_add_unique_project_download_limit_allowlist_to_namespace_settings.rb11
-rw-r--r--db/migrate/20220720161816_add_namespace_id_to_vulnerability_reads_table.rb9
-rw-r--r--db/migrate/20220720162123_update_vulnerability_reads_triggers_to_set_namespace_id.rb159
-rw-r--r--db/migrate/20220720210446_add_start_date_to_issues_table.rb9
-rw-r--r--db/migrate/20220722123318_update_delayed_deletion_period.rb27
-rw-r--r--db/migrate/20220722150231_create_function_gitlab_schema_prevent_write.rb32
-rw-r--r--db/migrate/20220722203840_update_lock_writes_function_disabled_via_setting.rb36
-rw-r--r--db/migrate/20220723120039_add_author_id_to_vulnerability_state_transitions.rb7
-rw-r--r--db/migrate/20220726025516_add_namespace_settings_unique_project_download_limit_allowlist_size_constraint.rb17
-rw-r--r--db/migrate/20220726154012_ensure_sbom_occurrences_is_empty.rb18
-rw-r--r--db/migrate/20220726154013_add_component_id_to_sbom_occurrences.rb17
-rw-r--r--db/migrate/20220726154014_add_index_to_sbom_occurrences_component_id.rb15
-rw-r--r--db/migrate/20220726154015_add_component_foreign_key_to_sbom_occurrences.rb18
-rw-r--r--db/migrate/20220726154016_make_component_version_nullable.rb9
-rw-r--r--db/migrate/20220726230052_remove_tmp_index_project_membership_namespace_id_column.rb20
-rw-r--r--db/migrate/20220728114136_make_ssh_signature_key_nullable.rb9
-rw-r--r--db/migrate/20220729073603_index_personal_access_tokens_on_id_and_created_at.rb15
-rw-r--r--db/migrate/20220802154757_add_deactivate_dormant_user_time_setting.rb6
-rw-r--r--db/migrate/20220803145637_create_user_project_callout.rb19
-rw-r--r--db/migrate/20220803154543_add_project_id_fkey_for_user_project_callout.rb15
-rw-r--r--db/migrate/20220803154758_add_user_id_fkey_for_user_project_callout.rb15
-rw-r--r--db/migrate/20220805154101_add_allow_run_pipelines_in_the_parent_project_setting.rb8
-rw-r--r--db/migrate/20220808133824_add_timestamps_to_project_statistics.rb7
-rw-r--r--db/migrate/20220808190124_add_id_token_to_ci_builds_metadata.rb9
-rw-r--r--db/migrate/20220808194857_remove_description_html_limit.rb15
-rw-r--r--db/migrate/20220811092243_create_ml_experiments.rb18
-rw-r--r--db/migrate/20220811092244_create_ml_candidates.rb16
-rw-r--r--db/migrate/20220811092245_create_ml_candidate_params.rb14
-rw-r--r--db/migrate/20220811092246_create_ml_candidate_metrics.rb16
-rw-r--r--db/migrate/20220811092251_add_ml_candidates_reference_to_experiment.rb15
-rw-r--r--db/migrate/20220811092253_add_ml_experiments_reference_to_project.rb15
-rw-r--r--db/migrate/20231031192803_remove_not_null_constraint_from_member_role.rb14
-rw-r--r--db/post_migrate/20220128103042_schedule_delete_invalid_epic_issues_revised.rb27
-rw-r--r--db/post_migrate/20220213103859_remove_integrations_type.rb132
-rw-r--r--db/post_migrate/20220314154235_migrate_vulnerability_approval_rules.rb17
-rw-r--r--db/post_migrate/20220324165436_schedule_backfill_project_settings.rb25
-rw-r--r--db/post_migrate/20220328095848_delete_failed_reset_duplicate_ci_runners_token_migration_records.rb17
-rw-r--r--db/post_migrate/20220328100456_schedule20220328_reset_duplicate_ci_runners_token_encrypted_values_on_projects.rb31
-rw-r--r--db/post_migrate/20220328100457_schedule20220328_reset_duplicate_ci_runners_token_values_on_projects.rb31
-rw-r--r--db/post_migrate/20220331133802_schedule_backfill_topics_title.rb21
-rw-r--r--db/post_migrate/20220405092619_toggle_vsa_aggregations_enable.rb19
-rw-r--r--db/post_migrate/20220407163559_schedule_purging_stale_security_scans.rb32
-rw-r--r--db/post_migrate/20220411173544_cleanup_orphans_approval_project_rules.rb38
-rw-r--r--db/post_migrate/20220415124802_remove_job_artifact_deprecated_geo_fields.rb29
-rw-r--r--db/post_migrate/20220415124804_remove_job_artifact_deleted_event_table.rb16
-rw-r--r--db/post_migrate/20220418180958_remove_integrations_properties.rb9
-rw-r--r--db/post_migrate/20220420061439_add_notes_null_discussion_id_temp_index.rb16
-rw-r--r--db/post_migrate/20220420061450_backfill_null_note_discussion_ids.rb31
-rw-r--r--db/post_migrate/20220420135946_update_batched_background_migration_arguments.rb19
-rw-r--r--db/post_migrate/20220420214703_schedule_backfill_draft_status_on_merge_requests_corrected_regex.rb33
-rw-r--r--db/post_migrate/20220422121443_add_async_index_for_group_activity_events.rb13
-rw-r--r--db/post_migrate/20220425111114_add_async_index_for_project_activity_events.rb13
-rw-r--r--db/post_migrate/20220425111453_add_async_index_to_events_on_group_id_and_id.rb13
-rw-r--r--db/post_migrate/20220425121410_add_temporary_index_for_backfill_integrations_enable_ssl_verification.rb18
-rw-r--r--db/post_migrate/20220425121435_backfill_integrations_enable_ssl_verification.rb57
-rw-r--r--db/post_migrate/20220426185933_backfill_deployments_finished_at.rb20
-rw-r--r--db/post_migrate/20220428133724_schedule_expire_o_auth_tokens.rb11
-rw-r--r--db/post_migrate/20220502015011_clean_up_fix_merge_request_diff_commit_users.rb15
-rw-r--r--db/post_migrate/20220502173045_reset_too_many_tags_skipped_registry_imports.rb27
-rw-r--r--db/post_migrate/20220503114353_prepare_confidential_note_index.rb13
-rw-r--r--db/post_migrate/20220503134610_remove_requirements_management_test_reports_requirement_id.rb28
-rw-r--r--db/post_migrate/20220504083348_add_indexes_for_primary_email_post_regression_cleanup_migration.rb28
-rw-r--r--db/post_migrate/20220504083836_cleanup_after_fixing_regression_with_new_users_emails.rb59
-rw-r--r--db/post_migrate/20220504084136_drop_temporary_indexes_for_primary_email_post_regression_cleanup.rb28
-rw-r--r--db/post_migrate/20220505022001_add_index_to_deployments_on_created_at_cluster_id_and_project_id.rb29
-rw-r--r--db/post_migrate/20220505044348_fix_automatic_iterations_cadences_start_date.rb28
-rw-r--r--db/post_migrate/20220505053504_remove_namespaces_id_parent_id_inverse_partial_index.rb15
-rw-r--r--db/post_migrate/20220505060011_remove_namespaces_id_parent_id_partial_index.rb15
-rw-r--r--db/post_migrate/20220505174658_update_index_on_alerts_to_exclude_null_fingerprints.rb28
-rw-r--r--db/post_migrate/20220505193512_add_not_null_constraint_to_issues_work_item_type.rb13
-rw-r--r--db/post_migrate/20220506123922_add_not_null_constraint_without_validation_to_requirements_issue_id.rb20
-rw-r--r--db/post_migrate/20220506124021_schedule_populate_requirements_issue_id.rb34
-rw-r--r--db/post_migrate/20220506201639_remove_devops_adoption_security_scan_succeeded_column.rb11
-rw-r--r--db/post_migrate/20220510003916_remove_tmp_empty_traversal_ids_root_namespace_index.rb16
-rw-r--r--db/post_migrate/20220510004501_remove_tmp_empty_traversal_ids_child_namespace_index.rb16
-rw-r--r--db/post_migrate/20220510121338_remove_threat_monitoring_alerts.rb15
-rw-r--r--db/post_migrate/20220510192117_index_expirable_unknown_artifacts_for_removal.rb17
-rw-r--r--db/post_migrate/20220511152439_remove_not_null_constraint_from_work_item_type.rb16
-rw-r--r--db/post_migrate/20220511212620_add_index_on_expirable_unknown_artifacts_for_removal.rb17
-rw-r--r--db/post_migrate/20220512190659_remove_web_hooks_web_hook_logs_web_hook_id_fk.rb50
-rw-r--r--db/post_migrate/20220513043344_reschedule_expire_o_auth_tokens.rb27
-rw-r--r--db/post_migrate/20220516054011_schedule_backfill_project_member_namespace_id.rb29
-rw-r--r--db/post_migrate/20220516100652_drop_compliance_management_frameworks_regulated.rb11
-rw-r--r--db/post_migrate/20220516103353_finalize_routes_backfilling_for_projects.rb22
-rw-r--r--db/post_migrate/20220517101119_create_confidential_notes_index_synchronously.rb15
-rw-r--r--db/post_migrate/20220517133753_migrate_free_user_cap_remediation.rb11
-rw-r--r--db/post_migrate/20220517144749_remove_vulnerability_approval_rules.rb29
-rw-r--r--db/post_migrate/20220518102414_add_index_to_error_tracking_client_keys.rb20
-rw-r--r--db/post_migrate/20220519045133_bulk_insert_cluster_enabled_grants.rb46
-rw-r--r--db/post_migrate/20220520040416_schedule_set_legacy_open_source_license_available_for_non_public_projects.rb13
-rw-r--r--db/post_migrate/20220523164734_add_foreign_key_to_vulnerability_reads_casted_cluster_agent_id.rb16
-rw-r--r--db/post_migrate/20220523165734_add_index_to_vulnerability_reads_casted_cluster_agent_id.rb15
-rw-r--r--db/post_migrate/20220523171107_drop_deploy_tokens_token_column.rb20
-rw-r--r--db/post_migrate/20220524074947_finalize_backfill_null_note_discussion_ids.rb23
-rw-r--r--db/post_migrate/20220524080944_cleanup_orphaned_routes.rb29
-rw-r--r--db/post_migrate/20220524081955_remove_notes_null_discussion_id_temp_index.rb15
-rw-r--r--db/post_migrate/20220524132416_prepare_job_artifact_project_id_index.rb13
-rw-r--r--db/post_migrate/20220524202158_drop_index_on_deployments_on_created_at_cluster_id_and_project_id.rb18
-rw-r--r--db/post_migrate/20220525131557_cleanup_backfill_integrations_enable_ssl_verification.rb15
-rw-r--r--db/post_migrate/20220525131624_drop_temporary_index_for_backfill_integrations_enable_ssl_verification.rb18
-rw-r--r--db/post_migrate/20220525141540_migrate_project_service_worker_queue.rb11
-rw-r--r--db/post_migrate/20220525165334_migrate_irker_worker_queue.rb11
-rw-r--r--db/post_migrate/20220525172001_migrate_cluster_integration_worker_queues.rb17
-rw-r--r--db/post_migrate/20220525201022_add_temporary_index_for_vulnerability_reads_cluster_agent_id_migration.rb16
-rw-r--r--db/post_migrate/20220525221133_schedule_backfill_vulnerability_reads_cluster_agent.rb29
-rw-r--r--db/post_migrate/20220526042017_remove_geo_lfs_object_deleted_event_references.rb29
-rw-r--r--db/post_migrate/20220526044516_remove_geo_lfs_object_deleted_events_table.rb17
-rw-r--r--db/post_migrate/20220530044712_add_index_for_vulnerability_reads_location_image.rb27
-rw-r--r--db/post_migrate/20220530074027_add_project_id_index_to_job_artifacts.rb15
-rw-r--r--db/post_migrate/20220530082653_add_traversal_id_type_group_index.rb17
-rw-r--r--db/post_migrate/20220530170915_add_index_for_vulnerability_state_transition.rb19
-rw-r--r--db/post_migrate/20220531024142_track_clusters_deletions.rb15
-rw-r--r--db/post_migrate/20220531024143_remove_clusters_deployments_cluster_id_fk.rb29
-rw-r--r--db/post_migrate/20220531035113_populate_operation_visibility_permissions.rb29
-rw-r--r--db/post_migrate/20220531233600_remove_sse_usage_data_from_redis.rb17
-rw-r--r--db/post_migrate/20220601040233_finalize_backfill_issue_search_data.rb22
-rw-r--r--db/post_migrate/20220601151900_schedule_backfill_ci_runner_semver.rb31
-rw-r--r--db/post_migrate/20220601152916_add_user_id_and_ip_address_success_index_to_authentication_events.rb18
-rw-r--r--db/post_migrate/20220602070502_queue_backfill_project_feature_package_registry_access_level.rb23
-rw-r--r--db/post_migrate/20220602111923_prepare_index_for_open_issues_count.rb13
-rw-r--r--db/post_migrate/20220603173103_update_vulnerabilities_project_id_id_index.rb22
-rw-r--r--db/post_migrate/20220606060825_set_on_delete_cascade_on_namespace_id_on_routes_table.rb41
-rw-r--r--db/post_migrate/20220606060850_add_not_null_constraint_on_routes_namespace_id.rb13
-rw-r--r--db/post_migrate/20220606082910_add_tmp_index_for_potentially_misassociated_vulnerability_occurrences.rb20
-rw-r--r--db/post_migrate/20220607082910_add_sync_tmp_index_for_potentially_misassociated_vulnerability_occurrences.rb20
-rw-r--r--db/post_migrate/20220607140222_remove_invalid_integrations.rb22
-rw-r--r--db/post_migrate/20220609195803_remove_deployment_clusters_cluster_id_fk.rb29
-rw-r--r--db/post_migrate/20220610223040_add_index_on_available_pypi_packages.rb18
-rw-r--r--db/post_migrate/20220613095911_create_confidential_notes_index_on_id.rb19
-rw-r--r--db/post_migrate/20220614185644_update_index_vulnerabilities_project_id_id.rb22
-rw-r--r--db/post_migrate/20220616092541_prepare_index_issues_on_project_id_and_closed_at.rb20
-rw-r--r--db/post_migrate/20220616222253_remove_ci_secure_files_permissions_column.rb11
-rw-r--r--db/post_migrate/20220617073407_add_index_for_open_issues_count.rb15
-rw-r--r--db/post_migrate/20220617123022_add_unique_index_on_projects_on_runners_token.rb20
-rw-r--r--db/post_migrate/20220617123034_add_unique_index_on_projects_on_runners_token_encrypted.rb20
-rw-r--r--db/post_migrate/20220617123105_drop_index_on_projects_on_runners_token.rb17
-rw-r--r--db/post_migrate/20220617123113_drop_index_on_projects_on_runners_token_encrypted.rb17
-rw-r--r--db/post_migrate/20220617142124_add_index_on_installable_package_files.rb20
-rw-r--r--db/post_migrate/20220617143228_replace_packages_index_on_project_id_and_status.rb22
-rw-r--r--db/post_migrate/20220620060633_finalize_orphaned_routes_cleanup.rb22
-rw-r--r--db/post_migrate/20220620132300_update_last_run_date_for_iterations_cadences.rb19
-rw-r--r--db/post_migrate/20220620151740_add_indexes_issues_on_project_id_and_closed_at.rb31
-rw-r--r--db/post_migrate/20220621040800_backfill_imported_issue_search_data.rb11
-rw-r--r--db/post_migrate/20220621082245_remove_tmp_index_on_routes_namespace_id_column.rb18
-rw-r--r--db/post_migrate/20220621092245_validate_not_null_constraint_on_routes_namespace_id_column.rb14
-rw-r--r--db/post_migrate/20220621192541_add_project_id_state_severity_default_branch_index_for_vulnerabilities.rb16
-rw-r--r--db/post_migrate/20220622070547_add_temp_index_for_container_registry_size_migration.rb24
-rw-r--r--db/post_migrate/20220622080547_backfill_project_statistics_with_container_registry_size.rb33
-rw-r--r--db/post_migrate/20220624062300_delete_backfill_ci_runner_semver_migration.rb19
-rw-r--r--db/post_migrate/20220627090231_schedule_disable_legacy_open_source_license_for_inactive_public_projects.rb33
-rw-r--r--db/post_migrate/20220627152642_queue_update_delayed_project_removal_to_null_for_user_namespace.rb25
-rw-r--r--db/post_migrate/20220627223041_add_post_migrate_test_table.rb13
-rw-r--r--db/post_migrate/20220628012902_finalise_project_namespace_members.rb22
-rw-r--r--db/post_migrate/20220628110823_add_issues_namespace_id_fk_and_index.rb22
-rw-r--r--db/post_migrate/20220628111752_drop_token_index_from_ci_builds.rb17
-rw-r--r--db/post_migrate/20220628122622_rename_builds_sidekiq_queues_to_namespaces.rb22
-rw-r--r--db/post_migrate/20220629124942_remove_vulnerability_occurrences_migrated_to_new_structure_column.rb21
-rw-r--r--db/post_migrate/20220629184402_unset_escalation_policies_for_alert_incidents.rb46
-rw-r--r--db/post_migrate/20220630050050_index_vulnerability_reads_on_casted_cluster_agent_id_full.rb18
-rw-r--r--db/post_migrate/20220630085003_drop_project_successfull_pages_deploy_index_from_ci_builds.rb21
-rw-r--r--db/post_migrate/20220630091409_add_index_on_events_for_contribution_analytics_optimization.rb15
-rw-r--r--db/post_migrate/20220630151641_schedule_set_correct_vulnerability_state.rb29
-rw-r--r--db/post_migrate/20220701085523_schedule_index_on_events_for_contribution_analytics_optimization.rb13
-rw-r--r--db/post_migrate/20220703182314_add_check_constraint_for_security_findings_partition_number.rb15
-rw-r--r--db/post_migrate/20220704044408_remove_foreign_key_in_project_tracing_settings.rb16
-rw-r--r--db/post_migrate/20220704045440_drop_project_tracing_settings_table.rb17
-rw-r--r--db/post_migrate/20220705114635_drop_index_on_ci_runner_versions_on_version.rb15
-rw-r--r--db/post_migrate/20220705180843_validate_requirements_issue_id_not_null.rb15
-rw-r--r--db/post_migrate/20220706065245_remove_foreign_key_in_clusters_applications_elastic_stacks.rb16
-rw-r--r--db/post_migrate/20220706065611_remove_foreign_key_in_clusters_integration_elasticstack.rb16
-rw-r--r--db/post_migrate/20220706070804_drop_clusters_applications_elastic_stacks_table.rb17
-rw-r--r--db/post_migrate/20220706071304_drop_clusters_integration_elasticstack_table.rb22
-rw-r--r--db/post_migrate/20220706115138_create_async_index_on_security_findings.rb22
-rw-r--r--db/post_migrate/20220706122719_create_index_on_security_findings_uuid_id_desc.rb23
-rw-r--r--db/post_migrate/20220706132238_add_indices_on_security_scans_info_column.rb27
-rw-r--r--db/post_migrate/20220707075300_reschedule_backfill_imported_issue_search_data.rb48
-rw-r--r--db/post_migrate/20220707105529_cleanup_chat_name_service_id.rb13
-rw-r--r--db/post_migrate/20220707160921_cleanup_slack_integration_service_id.rb13
-rw-r--r--db/post_migrate/20220708100508_drop_index_on_ci_runner_versions_on_status.rb15
-rw-r--r--db/post_migrate/20220712131533_cleanup_issue_tracker_data_service_id.rb13
-rw-r--r--db/post_migrate/20220712144900_cleanup_jira_tracker_data_service_id.rb13
-rw-r--r--db/post_migrate/20220712175029_add_index_with_target_type_to_todos.rb18
-rw-r--r--db/post_migrate/20220712181304_remove_deprecated_indexes_from_todos.rb23
-rw-r--r--db/post_migrate/20220713133515_cleanup_backfill_draft_statuses_on_merge_requests.rb15
-rw-r--r--db/post_migrate/20220714122311_add_async_index_on_security_findings_id_and_partition_number.rb15
-rw-r--r--db/post_migrate/20220714122418_add_async_index_on_security_findings_unique_columns.rb15
-rw-r--r--db/post_migrate/20220715054506_add_parent_link_unique_work_item_index.rb19
-rw-r--r--db/post_migrate/20220715152108_backfill_project_import_level.rb22
-rw-r--r--db/post_migrate/20220715160023_drop_post_migration_test_table.rb13
-rw-r--r--db/post_migrate/20220715163254_update_notes_in_past.rb22
-rw-r--r--db/post_migrate/20220715185348_add_index_on_security_findings_id_and_partition_number.rb15
-rw-r--r--db/post_migrate/20220715185436_add_index_on_security_findings_unique_columns.rb15
-rw-r--r--db/post_migrate/20220715190612_drop_index_on_security_findings_uuid_and_scan_id.rb15
-rw-r--r--db/post_migrate/20220715191629_change_primary_key_of_security_findings_table.rb29
-rw-r--r--db/post_migrate/20220719081542_drop_queued_at_index_from_ci_builds.rb17
-rw-r--r--db/post_migrate/20220719165537_remove_ci_runners_semver_column.rb21
-rw-r--r--db/post_migrate/20220720090354_remove_pending_builds_covering_index_from_ci_builds.rb26
-rw-r--r--db/post_migrate/20220720121421_remove_pat_and_ssh_enforcement_columns_from_application_settings.rb8
-rw-r--r--db/post_migrate/20220720123249_remove_token_column_from_ci_builds.rb9
-rw-r--r--db/post_migrate/20220720171102_add_index_on_vulnerability_reads_namespace_id.rb18
-rw-r--r--db/post_migrate/20220720171801_add_foreign_key_on_vulnerability_reads_namespace_id.rb15
-rw-r--r--db/post_migrate/20220721031446_schedule_disable_legacy_open_source_license_for_one_member_no_repo_projects.rb33
-rw-r--r--db/post_migrate/20220721140252_prepare_partial_trigram_indexes_for_issues.rb23
-rw-r--r--db/post_migrate/20220722084543_schedule_disable_legacy_open_source_license_for_no_issues_no_repo_projects.rb33
-rw-r--r--db/post_migrate/20220722110026_reschedule_set_legacy_open_source_license_available_for_non_public_projects.rb35
-rw-r--r--db/post_migrate/20220722145845_schedule_backfilling_the_namespace_id_for_vulnerability_reads.rb23
-rw-r--r--db/post_migrate/20220725150127_update_jira_tracker_data_deployment_type_based_on_url.rb28
-rw-r--r--db/post_migrate/20220726182310_add_user_fk_to_vulnerability_state_transitions.rb20
-rw-r--r--db/post_migrate/20220728134255_update_index_vulnerabilities_common_finder.rb21
-rw-r--r--db/post_migrate/20220729033851_add_partial_legacy_open_source_license_available_index.rb18
-rw-r--r--db/post_migrate/20220729052031_add_index_on_vulnerability_reads_namespace_id_with_report_type.rb18
-rw-r--r--db/post_migrate/20220801144713_add_partial_trigram_index_for_issue_title.rb18
-rw-r--r--db/post_migrate/20220801150028_add_partial_trigram_index_for_issue_description.rb18
-rw-r--r--db/post_migrate/20220802112102_schedule_migrate_shared_vulnerability_scanners.rb14
-rw-r--r--db/post_migrate/20220802114351_reschedule_backfill_container_registry_size_into_project_statistics.rb37
-rw-r--r--db/post_migrate/20220802132158_index_on_integration_type_new_id_when_active_and_has_group.rb18
-rw-r--r--db/post_migrate/20220802204737_remove_deactivated_user_highest_role_stats.rb27
-rw-r--r--db/post_migrate/20220803042351_add_tmp_index_todos_attention_request_action.rb18
-rw-r--r--db/post_migrate/20220803042352_cleanup_mr_attention_request_todos.rb24
-rw-r--r--db/post_migrate/20220804235614_add_comment_to_vulnerability_state_transitions.rb10
-rw-r--r--db/post_migrate/20220805001210_add_text_limit_to_vulnerability_state_transitions_comment.rb13
-rw-r--r--db/post_migrate/20220808072054_prepare_index_removal_security_findings.rb13
-rw-r--r--db/post_migrate/20220808131659_remove_ci_namespace_monthly_usages_additional_amount_available_column.rb11
-rw-r--r--db/post_migrate/20220810093742_add_async_tmp_index_job_artifacts_id_and_expire_at.rb23
-rw-r--r--db/schema_migrations/202201281030421
-rw-r--r--db/schema_migrations/202202131000001
-rw-r--r--db/schema_migrations/202202131038591
-rw-r--r--db/schema_migrations/202202211023331
-rw-r--r--db/schema_migrations/202203140948411
-rw-r--r--db/schema_migrations/202203141542351
-rw-r--r--db/schema_migrations/202203160225051
-rw-r--r--db/schema_migrations/202203240912241
-rw-r--r--db/schema_migrations/202203241654361
-rw-r--r--db/schema_migrations/202203280958481
-rw-r--r--db/schema_migrations/202203281004561
-rw-r--r--db/schema_migrations/202203281004571
-rw-r--r--db/schema_migrations/202203290922451
-rw-r--r--db/schema_migrations/202203291303301
-rw-r--r--db/schema_migrations/202203311257251
-rw-r--r--db/schema_migrations/202203311307261
-rw-r--r--db/schema_migrations/202203311338021
-rw-r--r--db/schema_migrations/202204010716091
-rw-r--r--db/schema_migrations/202204011511231
-rw-r--r--db/schema_migrations/202204050926191
-rw-r--r--db/schema_migrations/202204061330491
-rw-r--r--db/schema_migrations/202204071635591
-rw-r--r--db/schema_migrations/202204111735441
-rw-r--r--db/schema_migrations/202204120609311
-rw-r--r--db/schema_migrations/202204121354461
-rw-r--r--db/schema_migrations/202204121404461
-rw-r--r--db/schema_migrations/202204121407551
-rw-r--r--db/schema_migrations/202204121410201
-rw-r--r--db/schema_migrations/202204130549101
-rw-r--r--db/schema_migrations/202204131242001
-rw-r--r--db/schema_migrations/202204131641461
-rw-r--r--db/schema_migrations/202204132358181
-rw-r--r--db/schema_migrations/202204142036221
-rw-r--r--db/schema_migrations/202204150151431
-rw-r--r--db/schema_migrations/202204151248021
-rw-r--r--db/schema_migrations/202204151248041
-rw-r--r--db/schema_migrations/202204181809581
-rw-r--r--db/schema_migrations/202204192239061
-rw-r--r--db/schema_migrations/202204200345191
-rw-r--r--db/schema_migrations/202204200614391
-rw-r--r--db/schema_migrations/202204200614501
-rw-r--r--db/schema_migrations/202204201352451
-rw-r--r--db/schema_migrations/202204201359461
-rw-r--r--db/schema_migrations/202204201732471
-rw-r--r--db/schema_migrations/202204201925421
-rw-r--r--db/schema_migrations/202204202147031
-rw-r--r--db/schema_migrations/202204211144181
-rw-r--r--db/schema_migrations/202204211413421
-rw-r--r--db/schema_migrations/202204211447581
-rw-r--r--db/schema_migrations/202204211803211
-rw-r--r--db/schema_migrations/202204221214431
-rw-r--r--db/schema_migrations/202204222006331
-rw-r--r--db/schema_migrations/202204222205071
-rw-r--r--db/schema_migrations/202204251111141
-rw-r--r--db/schema_migrations/202204251114531
-rw-r--r--db/schema_migrations/202204251206041
-rw-r--r--db/schema_migrations/202204251214101
-rw-r--r--db/schema_migrations/202204251214351
-rw-r--r--db/schema_migrations/202204261302171
-rw-r--r--db/schema_migrations/202204261859331
-rw-r--r--db/schema_migrations/202204281337241
-rw-r--r--db/schema_migrations/202205020150111
-rw-r--r--db/schema_migrations/202205021250531
-rw-r--r--db/schema_migrations/202205021504081
-rw-r--r--db/schema_migrations/202205021526331
-rw-r--r--db/schema_migrations/202205021730451
-rw-r--r--db/schema_migrations/202205030352211
-rw-r--r--db/schema_migrations/202205030354371
-rw-r--r--db/schema_migrations/202205030734011
-rw-r--r--db/schema_migrations/202205031028551
-rw-r--r--db/schema_migrations/202205031143531
-rw-r--r--db/schema_migrations/202205031346101
-rw-r--r--db/schema_migrations/202205040428471
-rw-r--r--db/schema_migrations/202205040833481
-rw-r--r--db/schema_migrations/202205040838361
-rw-r--r--db/schema_migrations/202205040841361
-rw-r--r--db/schema_migrations/202205041400361
-rw-r--r--db/schema_migrations/202205050220011
-rw-r--r--db/schema_migrations/202205050443481
-rw-r--r--db/schema_migrations/202205050535041
-rw-r--r--db/schema_migrations/202205050600111
-rw-r--r--db/schema_migrations/202205050922541
-rw-r--r--db/schema_migrations/202205051746581
-rw-r--r--db/schema_migrations/202205051935121
-rw-r--r--db/schema_migrations/202205061239221
-rw-r--r--db/schema_migrations/202205061240211
-rw-r--r--db/schema_migrations/202205061540541
-rw-r--r--db/schema_migrations/202205061804111
-rw-r--r--db/schema_migrations/202205062016391
-rw-r--r--db/schema_migrations/202205100039161
-rw-r--r--db/schema_migrations/202205100045011
-rw-r--r--db/schema_migrations/202205101213381
-rw-r--r--db/schema_migrations/202205101921171
-rw-r--r--db/schema_migrations/202205110903241
-rw-r--r--db/schema_migrations/202205111449461
-rw-r--r--db/schema_migrations/202205111516461
-rw-r--r--db/schema_migrations/202205111524391
-rw-r--r--db/schema_migrations/202205111915021
-rw-r--r--db/schema_migrations/202205111915031
-rw-r--r--db/schema_migrations/202205112126201
-rw-r--r--db/schema_migrations/202205120205001
-rw-r--r--db/schema_migrations/202205121906591
-rw-r--r--db/schema_migrations/202205130433441
-rw-r--r--db/schema_migrations/202205130936141
-rw-r--r--db/schema_migrations/202205130936151
-rw-r--r--db/schema_migrations/202205130955451
-rw-r--r--db/schema_migrations/202205131147061
-rw-r--r--db/schema_migrations/202205131148501
-rw-r--r--db/schema_migrations/202205160540021
-rw-r--r--db/schema_migrations/202205160540111
-rw-r--r--db/schema_migrations/202205160922071
-rw-r--r--db/schema_migrations/202205161006521
-rw-r--r--db/schema_migrations/202205161033531
-rw-r--r--db/schema_migrations/202205161231011
-rw-r--r--db/schema_migrations/202205162012451
-rw-r--r--db/schema_migrations/202205171011191
-rw-r--r--db/schema_migrations/202205171337531
-rw-r--r--db/schema_migrations/202205171447491
-rw-r--r--db/schema_migrations/202205171825291
-rw-r--r--db/schema_migrations/202205181024141
-rw-r--r--db/schema_migrations/202205181835041
-rw-r--r--db/schema_migrations/202205181835481
-rw-r--r--db/schema_migrations/202205190132131
-rw-r--r--db/schema_migrations/202205190451331
-rw-r--r--db/schema_migrations/202205191413451
-rw-r--r--db/schema_migrations/202205200305041
-rw-r--r--db/schema_migrations/202205200404161
-rw-r--r--db/schema_migrations/202205201227551
-rw-r--r--db/schema_migrations/202205201431051
-rw-r--r--db/schema_migrations/202205201448211
-rw-r--r--db/schema_migrations/202205230308041
-rw-r--r--db/schema_migrations/202205230308051
-rw-r--r--db/schema_migrations/202205231627341
-rw-r--r--db/schema_migrations/202205231637341
-rw-r--r--db/schema_migrations/202205231647341
-rw-r--r--db/schema_migrations/202205231657341
-rw-r--r--db/schema_migrations/202205231711071
-rw-r--r--db/schema_migrations/202205240218551
-rw-r--r--db/schema_migrations/202205240749471
-rw-r--r--db/schema_migrations/202205240809441
-rw-r--r--db/schema_migrations/202205240819551
-rw-r--r--db/schema_migrations/202205241324161
-rw-r--r--db/schema_migrations/202205241418001
-rw-r--r--db/schema_migrations/202205241641221
-rw-r--r--db/schema_migrations/202205241841491
-rw-r--r--db/schema_migrations/202205241912591
-rw-r--r--db/schema_migrations/202205242021581
-rw-r--r--db/schema_migrations/202205250823031
-rw-r--r--db/schema_migrations/202205251238251
-rw-r--r--db/schema_migrations/202205251238511
-rw-r--r--db/schema_migrations/202205251239141
-rw-r--r--db/schema_migrations/202205251239401
-rw-r--r--db/schema_migrations/202205251241041
-rw-r--r--db/schema_migrations/202205251241251
-rw-r--r--db/schema_migrations/202205251315571
-rw-r--r--db/schema_migrations/202205251316241
-rw-r--r--db/schema_migrations/202205251415401
-rw-r--r--db/schema_migrations/202205251653341
-rw-r--r--db/schema_migrations/202205251720011
-rw-r--r--db/schema_migrations/202205252010221
-rw-r--r--db/schema_migrations/202205252211331
-rw-r--r--db/schema_migrations/202205260420171
-rw-r--r--db/schema_migrations/202205260445161
-rw-r--r--db/schema_migrations/202205300447121
-rw-r--r--db/schema_migrations/202205300740271
-rw-r--r--db/schema_migrations/202205300826531
-rw-r--r--db/schema_migrations/202205301030231
-rw-r--r--db/schema_migrations/202205301044311
-rw-r--r--db/schema_migrations/202205301709151
-rw-r--r--db/schema_migrations/202205310241421
-rw-r--r--db/schema_migrations/202205310241431
-rw-r--r--db/schema_migrations/202205310249051
-rw-r--r--db/schema_migrations/202205310351131
-rw-r--r--db/schema_migrations/202205311009201
-rw-r--r--db/schema_migrations/202205311405151
-rw-r--r--db/schema_migrations/202205312336001
-rw-r--r--db/schema_migrations/202206010402331
-rw-r--r--db/schema_migrations/202206010918041
-rw-r--r--db/schema_migrations/202206010918051
-rw-r--r--db/schema_migrations/202206011018001
-rw-r--r--db/schema_migrations/202206011519001
-rw-r--r--db/schema_migrations/202206011529161
-rw-r--r--db/schema_migrations/202206012235011
-rw-r--r--db/schema_migrations/202206020705021
-rw-r--r--db/schema_migrations/202206021119231
-rw-r--r--db/schema_migrations/202206021303061
-rw-r--r--db/schema_migrations/202206030951581
-rw-r--r--db/schema_migrations/202206031731031
-rw-r--r--db/schema_migrations/202206051700091
-rw-r--r--db/schema_migrations/202206060608251
-rw-r--r--db/schema_migrations/202206060608501
-rw-r--r--db/schema_migrations/202206060829101
-rw-r--r--db/schema_migrations/202206070117331
-rw-r--r--db/schema_migrations/202206070829101
-rw-r--r--db/schema_migrations/202206070952191
-rw-r--r--db/schema_migrations/202206071157031
-rw-r--r--db/schema_migrations/202206071402221
-rw-r--r--db/schema_migrations/202206080747381
-rw-r--r--db/schema_migrations/202206081147341
-rw-r--r--db/schema_migrations/202206091506261
-rw-r--r--db/schema_migrations/202206091958031
-rw-r--r--db/schema_migrations/202206100743261
-rw-r--r--db/schema_migrations/202206101252481
-rw-r--r--db/schema_migrations/202206101406051
-rw-r--r--db/schema_migrations/202206102230401
-rw-r--r--db/schema_migrations/202206130543491
-rw-r--r--db/schema_migrations/202206130959111
-rw-r--r--db/schema_migrations/202206140959121
-rw-r--r--db/schema_migrations/202206141204151
-rw-r--r--db/schema_migrations/202206141856441
-rw-r--r--db/schema_migrations/202206150910591
-rw-r--r--db/schema_migrations/202206151058111
-rw-r--r--db/schema_migrations/202206160925411
-rw-r--r--db/schema_migrations/202206161820011
-rw-r--r--db/schema_migrations/202206161820151
-rw-r--r--db/schema_migrations/202206161820161
-rw-r--r--db/schema_migrations/202206161820381
-rw-r--r--db/schema_migrations/202206161832401
-rw-r--r--db/schema_migrations/202206161833091
-rw-r--r--db/schema_migrations/202206161833101
-rw-r--r--db/schema_migrations/202206162222531
-rw-r--r--db/schema_migrations/202206170734071
-rw-r--r--db/schema_migrations/202206171230221
-rw-r--r--db/schema_migrations/202206171230341
-rw-r--r--db/schema_migrations/202206171231051
-rw-r--r--db/schema_migrations/202206171231131
-rw-r--r--db/schema_migrations/202206171231351
-rw-r--r--db/schema_migrations/202206171231441
-rw-r--r--db/schema_migrations/202206171413471
-rw-r--r--db/schema_migrations/202206171421241
-rw-r--r--db/schema_migrations/202206171432281
-rw-r--r--db/schema_migrations/202206191823081
-rw-r--r--db/schema_migrations/202206191849311
-rw-r--r--db/schema_migrations/202206192126181
-rw-r--r--db/schema_migrations/202206200606331
-rw-r--r--db/schema_migrations/202206201323001
-rw-r--r--db/schema_migrations/202206201517401
-rw-r--r--db/schema_migrations/202206210408001
-rw-r--r--db/schema_migrations/202206210822451
-rw-r--r--db/schema_migrations/202206210922451
-rw-r--r--db/schema_migrations/202206211925411
-rw-r--r--db/schema_migrations/202206212026161
-rw-r--r--db/schema_migrations/202206220705471
-rw-r--r--db/schema_migrations/202206220805471
-rw-r--r--db/schema_migrations/202206240623001
-rw-r--r--db/schema_migrations/202206240815241
-rw-r--r--db/schema_migrations/202206240904581
-rw-r--r--db/schema_migrations/202206270610081
-rw-r--r--db/schema_migrations/202206270902311
-rw-r--r--db/schema_migrations/202206271222291
-rw-r--r--db/schema_migrations/202206271222301
-rw-r--r--db/schema_migrations/202206271403151
-rw-r--r--db/schema_migrations/202206271526421
-rw-r--r--db/schema_migrations/202206271715381
-rw-r--r--db/schema_migrations/202206272230411
-rw-r--r--db/schema_migrations/202206280129021
-rw-r--r--db/schema_migrations/202206281102141
-rw-r--r--db/schema_migrations/202206281108231
-rw-r--r--db/schema_migrations/202206281117521
-rw-r--r--db/schema_migrations/202206281207081
-rw-r--r--db/schema_migrations/202206281216441
-rw-r--r--db/schema_migrations/202206281217121
-rw-r--r--db/schema_migrations/202206281226221
-rw-r--r--db/schema_migrations/202206291249421
-rw-r--r--db/schema_migrations/202206291844021
-rw-r--r--db/schema_migrations/202206292201291
-rw-r--r--db/schema_migrations/202206300500501
-rw-r--r--db/schema_migrations/202206300850031
-rw-r--r--db/schema_migrations/202206300914091
-rw-r--r--db/schema_migrations/202206301516411
-rw-r--r--db/schema_migrations/202206302023291
-rw-r--r--db/schema_migrations/202207010855231
-rw-r--r--db/schema_migrations/202207011738591
-rw-r--r--db/schema_migrations/202207031822341
-rw-r--r--db/schema_migrations/202207031822541
-rw-r--r--db/schema_migrations/202207031823141
-rw-r--r--db/schema_migrations/202207040340501
-rw-r--r--db/schema_migrations/202207040341051
-rw-r--r--db/schema_migrations/202207040444081
-rw-r--r--db/schema_migrations/202207040454401
-rw-r--r--db/schema_migrations/202207051146351
-rw-r--r--db/schema_migrations/202207051453491
-rw-r--r--db/schema_migrations/202207051808431
-rw-r--r--db/schema_migrations/202207060652451
-rw-r--r--db/schema_migrations/202207060656111
-rw-r--r--db/schema_migrations/202207060708041
-rw-r--r--db/schema_migrations/202207060713041
-rw-r--r--db/schema_migrations/202207061151381
-rw-r--r--db/schema_migrations/202207061227191
-rw-r--r--db/schema_migrations/202207061322381
-rw-r--r--db/schema_migrations/202207061916271
-rw-r--r--db/schema_migrations/202207070753001
-rw-r--r--db/schema_migrations/202207071053351
-rw-r--r--db/schema_migrations/202207071055291
-rw-r--r--db/schema_migrations/202207071607071
-rw-r--r--db/schema_migrations/202207071609211
-rw-r--r--db/schema_migrations/202207071819101
-rw-r--r--db/schema_migrations/202207071819201
-rw-r--r--db/schema_migrations/202207071819301
-rw-r--r--db/schema_migrations/202207071905461
-rw-r--r--db/schema_migrations/202207081005081
-rw-r--r--db/schema_migrations/202207081005321
-rw-r--r--db/schema_migrations/202207081327011
-rw-r--r--db/schema_migrations/202207081427441
-rw-r--r--db/schema_migrations/202207081428031
-rw-r--r--db/schema_migrations/202207081503151
-rw-r--r--db/schema_migrations/202207081503351
-rw-r--r--db/schema_migrations/202207081848221
-rw-r--r--db/schema_migrations/202207120257121
-rw-r--r--db/schema_migrations/202207120319231
-rw-r--r--db/schema_migrations/202207120949451
-rw-r--r--db/schema_migrations/202207121315131
-rw-r--r--db/schema_migrations/202207121315331
-rw-r--r--db/schema_migrations/202207121448431
-rw-r--r--db/schema_migrations/202207121449001
-rw-r--r--db/schema_migrations/202207121750291
-rw-r--r--db/schema_migrations/202207121813041
-rw-r--r--db/schema_migrations/202207131335151
-rw-r--r--db/schema_migrations/202207131756581
-rw-r--r--db/schema_migrations/202207131757371
-rw-r--r--db/schema_migrations/202207131758121
-rw-r--r--db/schema_migrations/202207141051221
-rw-r--r--db/schema_migrations/202207141223111
-rw-r--r--db/schema_migrations/202207141224181
-rw-r--r--db/schema_migrations/202207141424241
-rw-r--r--db/schema_migrations/202207150545061
-rw-r--r--db/schema_migrations/202207151521081
-rw-r--r--db/schema_migrations/202207151600231
-rw-r--r--db/schema_migrations/202207151632541
-rw-r--r--db/schema_migrations/202207151853481
-rw-r--r--db/schema_migrations/202207151854361
-rw-r--r--db/schema_migrations/202207151906121
-rw-r--r--db/schema_migrations/202207151916291
-rw-r--r--db/schema_migrations/202207180839451
-rw-r--r--db/schema_migrations/202207190815421
-rw-r--r--db/schema_migrations/202207191655371
-rw-r--r--db/schema_migrations/202207200903541
-rw-r--r--db/schema_migrations/202207201214211
-rw-r--r--db/schema_migrations/202207201232491
-rw-r--r--db/schema_migrations/202207201618161
-rw-r--r--db/schema_migrations/202207201621231
-rw-r--r--db/schema_migrations/202207201711021
-rw-r--r--db/schema_migrations/202207201718011
-rw-r--r--db/schema_migrations/202207202104461
-rw-r--r--db/schema_migrations/202207210314461
-rw-r--r--db/schema_migrations/202207211402521
-rw-r--r--db/schema_migrations/202207220845431
-rw-r--r--db/schema_migrations/202207221100261
-rw-r--r--db/schema_migrations/202207221233181
-rw-r--r--db/schema_migrations/202207221458451
-rw-r--r--db/schema_migrations/202207221502311
-rw-r--r--db/schema_migrations/202207222038401
-rw-r--r--db/schema_migrations/202207231200391
-rw-r--r--db/schema_migrations/202207251501271
-rw-r--r--db/schema_migrations/202207260255161
-rw-r--r--db/schema_migrations/202207261540121
-rw-r--r--db/schema_migrations/202207261540131
-rw-r--r--db/schema_migrations/202207261540141
-rw-r--r--db/schema_migrations/202207261540151
-rw-r--r--db/schema_migrations/202207261540161
-rw-r--r--db/schema_migrations/202207261823101
-rw-r--r--db/schema_migrations/202207262300521
-rw-r--r--db/schema_migrations/202207281141361
-rw-r--r--db/schema_migrations/202207281342551
-rw-r--r--db/schema_migrations/202207290338511
-rw-r--r--db/schema_migrations/202207290520311
-rw-r--r--db/schema_migrations/202207290736031
-rw-r--r--db/schema_migrations/202208011447131
-rw-r--r--db/schema_migrations/202208011500281
-rw-r--r--db/schema_migrations/202208021121021
-rw-r--r--db/schema_migrations/202208021143511
-rw-r--r--db/schema_migrations/202208021321581
-rw-r--r--db/schema_migrations/202208021547571
-rw-r--r--db/schema_migrations/202208022047371
-rw-r--r--db/schema_migrations/202208030423511
-rw-r--r--db/schema_migrations/202208030423521
-rw-r--r--db/schema_migrations/202208031456371
-rw-r--r--db/schema_migrations/202208031545431
-rw-r--r--db/schema_migrations/202208031547581
-rw-r--r--db/schema_migrations/202208042356141
-rw-r--r--db/schema_migrations/202208050012101
-rw-r--r--db/schema_migrations/202208051541011
-rw-r--r--db/schema_migrations/202208080720541
-rw-r--r--db/schema_migrations/202208081316591
-rw-r--r--db/schema_migrations/202208081338241
-rw-r--r--db/schema_migrations/202208081901241
-rw-r--r--db/schema_migrations/202208081948571
-rw-r--r--db/schema_migrations/202208100937421
-rw-r--r--db/schema_migrations/202208110922431
-rw-r--r--db/schema_migrations/202208110922441
-rw-r--r--db/schema_migrations/202208110922451
-rw-r--r--db/schema_migrations/202208110922461
-rw-r--r--db/schema_migrations/202208110922511
-rw-r--r--db/schema_migrations/202208110922531
-rw-r--r--db/schema_migrations/202310311928031
-rw-r--r--db/structure.sql2
-rw-r--r--doc/architecture/blueprints/secret_detection/decisions/001_use_ruby_push_check_approach_within_monolith.md32
-rw-r--r--doc/architecture/blueprints/secret_detection/index.md339
-rw-r--r--doc/integration/oauth_provider.md2
-rw-r--r--doc/user/group/settings/group_access_tokens.md22
-rw-r--r--doc/user/packages/dependency_proxy/index.md4
-rw-r--r--doc/user/profile/personal_access_tokens.md26
-rw-r--r--doc/user/project/settings/project_access_tokens.md22
-rw-r--r--lib/gitlab/usage/metrics/instrumentations/omniauth_enabled_metric.rb15
-rw-r--r--lib/gitlab/usage/metrics/instrumentations/prometheus_enabled_metric.rb15
-rw-r--r--lib/gitlab/usage/metrics/instrumentations/prometheus_metrics_enabled_metric.rb15
-rw-r--r--lib/gitlab/usage/metrics/instrumentations/reply_by_email_enabled_metric.rb15
-rw-r--r--lib/gitlab/usage_data.rb13
-rw-r--r--lib/vite_gdk.rb3
-rw-r--r--locale/gitlab.pot32
-rw-r--r--spec/frontend/ci/jobs_page/components/job_cells/actions_cell_spec.js2
-rw-r--r--spec/frontend/ci/pipeline_details/header/pipeline_details_header_spec.js72
-rw-r--r--spec/frontend/ci/pipeline_details/mock_data.js3
-rw-r--r--spec/frontend/fixtures/pipeline_header.rb28
-rw-r--r--spec/lib/gitlab/background_migration/backfill_imported_issue_search_data_spec.rb3
-rw-r--r--spec/lib/gitlab/background_migration/backfill_integrations_enable_ssl_verification_spec.rb2
-rw-r--r--spec/lib/gitlab/background_migration/backfill_namespace_id_for_project_route_spec.rb53
-rw-r--r--spec/lib/gitlab/background_migration/backfill_namespace_id_of_vulnerability_reads_spec.rb2
-rw-r--r--spec/lib/gitlab/background_migration/backfill_project_import_level_spec.rb1
-rw-r--r--spec/lib/gitlab/background_migration/backfill_project_member_namespace_id_spec.rb2
-rw-r--r--spec/lib/gitlab/background_migration/backfill_topics_title_spec.rb2
-rw-r--r--spec/lib/gitlab/background_migration/backfill_vulnerability_reads_cluster_agent_spec.rb2
-rw-r--r--spec/lib/gitlab/background_migration/cleanup_orphaned_routes_spec.rb80
-rw-r--r--spec/lib/gitlab/background_migration/disable_legacy_open_source_license_for_no_issues_no_repo_projects_spec.rb2
-rw-r--r--spec/lib/gitlab/background_migration/disable_legacy_open_source_license_for_one_member_no_repo_projects_spec.rb23
-rw-r--r--spec/lib/gitlab/background_migration/expire_o_auth_tokens_spec.rb2
-rw-r--r--spec/lib/gitlab/background_migration/reset_too_many_tags_skipped_registry_imports_spec.rb2
-rw-r--r--spec/lib/gitlab/background_migration/set_legacy_open_source_license_available_for_non_public_projects_spec.rb2
-rw-r--r--spec/lib/gitlab/usage/metrics/instrumentations/omniauth_enabled_metric_spec.rb17
-rw-r--r--spec/lib/gitlab/usage/metrics/instrumentations/prometheus_enabled_metric_spec.rb17
-rw-r--r--spec/lib/gitlab/usage/metrics/instrumentations/prometheus_metrics_enabled_metric_spec.rb17
-rw-r--r--spec/lib/gitlab/usage/metrics/instrumentations/reply_by_email_enabled_metric_spec.rb17
-rw-r--r--spec/lib/gitlab/usage_data_spec.rb23
-rw-r--r--spec/lib/vite_gdk_spec.rb6
-rw-r--r--spec/models/ability_spec.rb5
-rw-r--r--spec/models/concerns/pg_full_text_searchable_spec.rb10
-rw-r--r--spec/support/helpers/usage_data_helpers.rb3
-rw-r--r--spec/support/rspec_order_todo.yml8
867 files changed, 2452 insertions, 10872 deletions
diff --git a/.gitlab/ci/database.gitlab-ci.yml b/.gitlab/ci/database.gitlab-ci.yml
index 285c99d2cbe..6ca8a9bbc36 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=20220502173045 # 14.10 (last 14.x version)
+ - bundle exec rake db:migrate VERSION=20220126191624 # 15.4
- bundle exec rake db:migrate
db:rollback single-db:
diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml
index 7b160a0efb5..f9690b0247c 100644
--- a/.gitlab/ci/rules.gitlab-ci.yml
+++ b/.gitlab/ci/rules.gitlab-ci.yml
@@ -2335,6 +2335,7 @@
.rails:rules:clickhouse-changes:
rules:
+ - <<: *if-dot-com-ee-schedule-default-branch-maintenance
- <<: *if-merge-request
changes: *backend-patterns
diff --git a/.rubocop_todo/layout/argument_alignment.yml b/.rubocop_todo/layout/argument_alignment.yml
index b2dc0b1f570..eecfaa8eb64 100644
--- a/.rubocop_todo/layout/argument_alignment.yml
+++ b/.rubocop_todo/layout/argument_alignment.yml
@@ -510,32 +510,7 @@ Layout/ArgumentAlignment:
- 'config/initializers/rack_timeout.rb'
- 'config/initializers/rest-client-hostname_override.rb'
- 'config/initializers/zz_metrics.rb'
- - 'db/migrate/20220413164146_remove_max_seats_used_indices.rb'
- - 'db/migrate/20220419223906_add_arkose_namespace_to_application_settings.rb'
- - 'db/migrate/20220420173247_add_group_inheritance_type_to_pe_authorizable.rb'
- - 'db/migrate/20220425120604_create_packages_cleanup_policies.rb'
- - 'db/migrate/20220511144946_add_work_item_parent_child_table.rb'
- - 'db/migrate/20220511191502_add_registry_migration_guard_thresholds_to_application_settings.rb'
- - 'db/migrate/20220513093615_add_ding_talk_tracker_data.rb'
- - 'db/migrate/20220513095545_create_timelog_categories.rb'
- - 'db/migrate/20220520144821_add_registry_migration_pre_import_tags_rate_to_application_settings.rb'
- - 'db/migrate/20220524141800_create_audit_events_streaming_headers.rb'
- - 'db/migrate/20220601101800_add_index_on_runner_id_and_semver_columns.rb'
- - 'db/migrate/20220607011733_add_phone_verification_code_enabled_to_application_settings.rb'
- - 'db/migrate/20220615091059_add_created_at_index_to_compliance_management_frameworks.rb'
- - 'db/migrate/20220615105811_add_index_on_clusters_agent_project_id_and_has_vulnerabilities_columns.rb'
- - 'db/migrate/20220617123135_drop_temp_index_on_projects_on_id_and_runners_token.rb'
- - 'db/migrate/20220617123144_drop_temp_index_on_projects_on_id_and_runners_token_encrypted.rb'
- - 'db/migrate/20220621202616_add_partial_index_on_oauth_access_tokens_revoked_at.rb'
- - 'db/migrate/20220630202329_add_partial_index_on_oauth_access_tokens_revoked_at_with_order.rb'
- - 'db/migrate/20220707181910_create_member_roles.rb'
- 'db/migrate/20220711142148_add_invitation_flow_enforcement_to_application_settings.rb'
- - 'db/migrate/20220713175658_add_packages_cleanup_policies_worker_capacity_to_application_settings.rb'
- - 'db/migrate/20220713175737_add_application_settings_packages_cleanup_policies_worker_capacity_constraint.rb'
- - 'db/migrate/20220713175812_add_enabled_policies_index_to_packages_cleanup_policies.rb'
- - 'db/migrate/20220726230052_remove_tmp_index_project_membership_namespace_id_column.rb'
- - 'db/migrate/20220811092245_create_ml_candidate_params.rb'
- - 'db/migrate/20220811092246_create_ml_candidate_metrics.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'
@@ -567,29 +542,9 @@ 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/20220415124802_remove_job_artifact_deprecated_geo_fields.rb'
- - 'db/post_migrate/20220425121435_backfill_integrations_enable_ssl_verification.rb'
- - 'db/post_migrate/20220523164734_add_foreign_key_to_vulnerability_reads_casted_cluster_agent_id.rb'
- - 'db/post_migrate/20220526042017_remove_geo_lfs_object_deleted_event_references.rb'
- - 'db/post_migrate/20220603173103_update_vulnerabilities_project_id_id_index.rb'
- 'db/post_migrate/20220606054503_add_tmp_index_job_artifacts_id_and_expire_at.rb'
- - 'db/post_migrate/20220606082910_add_tmp_index_for_potentially_misassociated_vulnerability_occurrences.rb'
- - 'db/post_migrate/20220607082910_add_sync_tmp_index_for_potentially_misassociated_vulnerability_occurrences.rb'
- - 'db/post_migrate/20220614185644_update_index_vulnerabilities_project_id_id.rb'
- 'db/post_migrate/20220616171355_update_vulnerabilities_project_id_id_active_cis_index.rb'
- - 'db/post_migrate/20220617123022_add_unique_index_on_projects_on_runners_token.rb'
- - 'db/post_migrate/20220617123034_add_unique_index_on_projects_on_runners_token_encrypted.rb'
- - 'db/post_migrate/20220617123105_drop_index_on_projects_on_runners_token.rb'
- - 'db/post_migrate/20220617123113_drop_index_on_projects_on_runners_token_encrypted.rb'
- - 'db/post_migrate/20220617142124_add_index_on_installable_package_files.rb'
- - 'db/post_migrate/20220617143228_replace_packages_index_on_project_id_and_status.rb'
- - 'db/post_migrate/20220621192541_add_project_id_state_severity_default_branch_index_for_vulnerabilities.rb'
- - 'db/post_migrate/20220720171102_add_index_on_vulnerability_reads_namespace_id.rb'
- 'db/post_migrate/20220726225114_remove_tmp_index_group_membership_namespace_id_column.rb'
- - 'db/post_migrate/20220729033851_add_partial_legacy_open_source_license_available_index.rb'
- - 'db/post_migrate/20220729052031_add_index_on_vulnerability_reads_namespace_id_with_report_type.rb'
- - 'db/post_migrate/20220802132158_index_on_integration_type_new_id_when_active_and_has_group.rb'
- - 'db/post_migrate/20220810093742_add_async_tmp_index_job_artifacts_id_and_expire_at.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'
@@ -986,7 +941,6 @@ Layout/ArgumentAlignment:
- 'ee/spec/lib/ee/gitlab/auth/ldap/sync/admin_users_spec.rb'
- 'ee/spec/lib/ee/gitlab/auth/ldap/sync/group_spec.rb'
- 'ee/spec/lib/ee/gitlab/background_migration/backfill_epic_cache_counts_spec.rb'
- - 'ee/spec/lib/ee/gitlab/background_migration/backfill_project_statistics_container_repository_size_spec.rb'
- 'ee/spec/lib/ee/gitlab/background_migration/backfill_project_statistics_storage_size_without_uploads_size_spec.rb'
- 'ee/spec/lib/ee/gitlab/background_migration/delete_invalid_epic_issues_spec.rb'
- 'ee/spec/lib/ee/gitlab/background_migration/fix_approval_project_rules_without_protected_branches_spec.rb'
@@ -995,7 +949,6 @@ Layout/ArgumentAlignment:
- 'ee/spec/lib/ee/gitlab/background_migration/migrate_vulnerabilities_feedback_to_vulnerabilities_state_transition_spec.rb'
- 'ee/spec/lib/ee/gitlab/background_migration/populate_approval_merge_request_rules_with_security_orchestration_spec.rb'
- 'ee/spec/lib/ee/gitlab/background_migration/populate_approval_project_rules_with_security_orchestration_spec.rb'
- - 'ee/spec/lib/ee/gitlab/background_migration/purge_stale_security_scans_spec.rb'
- 'ee/spec/lib/ee/gitlab/checks/push_rule_check_spec.rb'
- 'ee/spec/lib/ee/gitlab/checks/push_rules/commit_check_spec.rb'
- 'ee/spec/lib/ee/gitlab/ci/config/entry/bridge_spec.rb'
diff --git a/.rubocop_todo/layout/array_alignment.yml b/.rubocop_todo/layout/array_alignment.yml
index cb35ad520f0..0ca9129e17b 100644
--- a/.rubocop_todo/layout/array_alignment.yml
+++ b/.rubocop_todo/layout/array_alignment.yml
@@ -45,7 +45,6 @@ Layout/ArrayAlignment:
- 'config/application.rb'
- 'config/initializers/0_marginalia.rb'
- 'config/initializers/direct_upload_support.rb'
- - 'db/post_migrate/20220728134255_update_index_vulnerabilities_common_finder.rb'
- 'ee/app/controllers/admin/push_rules_controller.rb'
- 'ee/app/controllers/ee/admin/application_settings_controller.rb'
- 'ee/app/controllers/ee/projects/merge_requests_controller.rb'
diff --git a/.rubocop_todo/layout/empty_line_after_magic_comment.yml b/.rubocop_todo/layout/empty_line_after_magic_comment.yml
index 0bfdf721a2b..0db2439069e 100644
--- a/.rubocop_todo/layout/empty_line_after_magic_comment.yml
+++ b/.rubocop_todo/layout/empty_line_after_magic_comment.yml
@@ -127,10 +127,6 @@ Layout/EmptyLineAfterMagicComment:
- 'danger/ce_ee_vue_templates/Dangerfile'
- 'danger/feature_flag/Dangerfile'
- 'danger/pajamas/Dangerfile'
- - 'db/migrate/20220506154054_create_sync_namespace_details_trigger.rb'
- - 'db/migrate/20220524184149_create_sync_project_namespace_details_trigger.rb'
- - 'db/migrate/20220617141347_create_ci_secure_file_states.rb'
- - 'db/migrate/20220802154757_add_deactivate_dormant_user_time_setting.rb'
- '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'
@@ -319,7 +315,6 @@ Layout/EmptyLineAfterMagicComment:
- 'ee/spec/lib/gitlab/spdx/catalogue_spec.rb'
- 'ee/spec/lib/system_check/app/advanced_search_migrations_check_spec.rb'
- 'ee/spec/lib/system_check/geo/http_connection_check_spec.rb'
- - 'ee/spec/migrations/20220411173544_cleanup_orphans_approval_project_rules_spec.rb'
- 'ee/spec/models/analytics/cycle_analytics/aggregation_context_spec.rb'
- 'ee/spec/models/ci/minutes/quota_spec.rb'
- 'ee/spec/models/ci/minutes/usage_spec.rb'
diff --git a/.rubocop_todo/layout/line_end_string_concatenation_indentation.yml b/.rubocop_todo/layout/line_end_string_concatenation_indentation.yml
index f8e8bf5dc4b..cc901813afb 100644
--- a/.rubocop_todo/layout/line_end_string_concatenation_indentation.yml
+++ b/.rubocop_todo/layout/line_end_string_concatenation_indentation.yml
@@ -39,8 +39,6 @@ Layout/LineEndStringConcatenationIndentation:
- 'config/initializers/wikicloth_redos_patch.rb'
- 'config/initializers/wikicloth_ruby_3_patch.rb'
- 'danger/database/Dangerfile'
- - 'db/post_migrate/20220425121410_add_temporary_index_for_backfill_integrations_enable_ssl_verification.rb'
- - 'db/post_migrate/20220525131624_drop_temporary_index_for_backfill_integrations_enable_ssl_verification.rb'
- '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'
diff --git a/.rubocop_todo/layout/line_length.yml b/.rubocop_todo/layout/line_length.yml
index a3b6d17e24e..e8f79a6a75c 100644
--- a/.rubocop_todo/layout/line_length.yml
+++ b/.rubocop_todo/layout/line_length.yml
@@ -1630,7 +1630,6 @@ Layout/LineLength:
- 'ee/spec/lib/gitlab/auth/ldap/person_spec.rb'
- 'ee/spec/lib/gitlab/auth/ldap/user_spec.rb'
- 'ee/spec/lib/gitlab/auth/saml/user_spec.rb'
- - 'ee/spec/lib/gitlab/background_migration/migrate_requirements_to_work_items_spec.rb'
- 'ee/spec/lib/gitlab/checks/diff_check_spec.rb'
- 'ee/spec/lib/gitlab/ci/config/entry/job_spec.rb'
- 'ee/spec/lib/gitlab/ci/config/security_orchestration_policies/processor_spec.rb'
diff --git a/.rubocop_todo/lint/missing_cop_enable_directive.yml b/.rubocop_todo/lint/missing_cop_enable_directive.yml
index 00484af3b5d..6d505a609e2 100644
--- a/.rubocop_todo/lint/missing_cop_enable_directive.yml
+++ b/.rubocop_todo/lint/missing_cop_enable_directive.yml
@@ -60,7 +60,6 @@ Lint/MissingCopEnableDirective:
- 'app/services/search/global_service.rb'
- 'danger/feature_flag/Dangerfile'
- 'danger/pajamas/Dangerfile'
- - 'db/migrate/20220531024905_add_operations_access_levels_to_project_feature.rb'
- 'ee/app/controllers/ee/admin/dashboard_controller.rb'
- 'ee/app/controllers/ee/admin/groups_controller.rb'
- 'ee/app/controllers/ee/admin/users_controller.rb'
diff --git a/.rubocop_todo/lint/redundant_cop_disable_directive.yml b/.rubocop_todo/lint/redundant_cop_disable_directive.yml
index 6a9b68a832a..1d4a2264854 100644
--- a/.rubocop_todo/lint/redundant_cop_disable_directive.yml
+++ b/.rubocop_todo/lint/redundant_cop_disable_directive.yml
@@ -76,12 +76,6 @@ Lint/RedundantCopDisableDirective:
- 'config/initializers/wikicloth_redos_patch.rb'
- 'config/initializers/wikicloth_ruby_3_patch.rb'
- 'config/routes/api.rb'
- - 'db/migrate/20220316022505_create_namespace_details.rb'
- - 'db/migrate/20220421141342_add_allowed_plans_to_ci_runners.rb'
- - 'db/migrate/20220531024905_add_operations_access_levels_to_project_feature.rb'
- - 'db/post_migrate/20220328100456_schedule20220328_reset_duplicate_ci_runners_token_encrypted_values_on_projects.rb'
- - 'db/post_migrate/20220328100457_schedule20220328_reset_duplicate_ci_runners_token_values_on_projects.rb'
- - 'db/post_migrate/20220720090354_remove_pending_builds_covering_index_from_ci_builds.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'
@@ -145,7 +139,6 @@ Lint/RedundantCopDisableDirective:
- 'ee/spec/features/boards/user_visits_board_spec.rb'
- 'ee/spec/features/groups/settings/domain_verification_spec.rb'
- 'ee/spec/helpers/ee/releases_helper_spec.rb'
- - 'ee/spec/lib/ee/gitlab/background_migration/backfill_project_statistics_container_repository_size_spec.rb'
- 'ee/spec/lib/ee/gitlab/background_migration/backfill_project_statistics_storage_size_without_uploads_size_spec.rb'
- 'ee/spec/lib/ee/gitlab/issuable_metadata_spec.rb'
- 'ee/spec/lib/elastic/latest/project_instance_proxy_spec.rb'
diff --git a/.rubocop_todo/migration/avoid_finalize_background_migration.yml b/.rubocop_todo/migration/avoid_finalize_background_migration.yml
index 89adc410f22..5c7e50d0dd6 100644
--- a/.rubocop_todo/migration/avoid_finalize_background_migration.yml
+++ b/.rubocop_todo/migration/avoid_finalize_background_migration.yml
@@ -1,6 +1,3 @@
---
Migration/AvoidFinalizeBackgroundMigration:
Exclude:
- - 'db/post_migrate/20220502015011_clean_up_fix_merge_request_diff_commit_users.rb'
- - 'db/post_migrate/20220525131557_cleanup_backfill_integrations_enable_ssl_verification.rb'
- - 'db/post_migrate/20220713133515_cleanup_backfill_draft_statuses_on_merge_requests.rb'
diff --git a/.rubocop_todo/migration/background_migrations.yml b/.rubocop_todo/migration/background_migrations.yml
index 9071e3b2c87..07a965dbb2a 100644
--- a/.rubocop_todo/migration/background_migrations.yml
+++ b/.rubocop_todo/migration/background_migrations.yml
@@ -1,15 +1,6 @@
---
Migration/BackgroundMigrations:
Exclude:
- - 'db/post_migrate/20220328100456_schedule20220328_reset_duplicate_ci_runners_token_encrypted_values_on_projects.rb'
- - 'db/post_migrate/20220328100457_schedule20220328_reset_duplicate_ci_runners_token_values_on_projects.rb'
- - 'db/post_migrate/20220331133802_schedule_backfill_topics_title.rb'
- - 'db/post_migrate/20220407163559_schedule_purging_stale_security_scans.rb'
- - 'db/post_migrate/20220420061450_backfill_null_note_discussion_ids.rb'
- - 'db/post_migrate/20220420214703_schedule_backfill_draft_status_on_merge_requests_corrected_regex.rb'
- - 'db/post_migrate/20220425121435_backfill_integrations_enable_ssl_verification.rb'
- - 'db/post_migrate/20220502173045_reset_too_many_tags_skipped_registry_imports.rb'
- - 'db/post_migrate/20220506124021_schedule_populate_requirements_issue_id.rb'
- 'ee/db/geo/post_migrate/20220202101354_migrate_job_artifact_registry.rb'
- 'lib/gitlab/database/migrations/background_migration_helpers.rb'
- 'lib/gitlab/database/partitioning_migration_helpers/table_management_helpers.rb'
diff --git a/.rubocop_todo/rails/find_each.yml b/.rubocop_todo/rails/find_each.yml
index 4e2bbb62439..500852b2945 100644
--- a/.rubocop_todo/rails/find_each.yml
+++ b/.rubocop_todo/rails/find_each.yml
@@ -9,7 +9,6 @@ Rails/FindEach:
- 'app/services/groups/destroy_service.rb'
- 'app/services/merge_requests/refresh_service.rb'
- 'app/views/issues/_issues_calendar.ics.ruby'
- - 'db/post_migrate/20220411173544_cleanup_orphans_approval_project_rules.rb'
- 'db/post_migrate/20231003045342_migrate_sidekiq_namespaced_jobs.rb'
- 'ee/app/workers/compliance_management/merge_requests/compliance_violations_consistency_worker.rb'
- 'ee/lib/ee/gitlab/background_migration/backfill_compliance_violations.rb'
diff --git a/.rubocop_todo/rspec/expect_change.yml b/.rubocop_todo/rspec/expect_change.yml
index ba2068d8117..497a88f40ea 100644
--- a/.rubocop_todo/rspec/expect_change.yml
+++ b/.rubocop_todo/rspec/expect_change.yml
@@ -27,7 +27,6 @@ RSpec/ExpectChange:
- 'ee/spec/lib/gitlab/legacy_github_import/project_creator_spec.rb'
- 'ee/spec/lib/quality/seeders/vulnerabilities_spec.rb'
- 'ee/spec/mailers/license_mailer_spec.rb'
- - 'ee/spec/migrations/20220517144749_remove_vulnerability_approval_rules_spec.rb'
- 'ee/spec/models/ee/ci/pending_build_spec.rb'
- 'ee/spec/models/ee/group_spec.rb'
- 'ee/spec/models/ee/namespace_spec.rb'
diff --git a/.rubocop_todo/rspec/feature_category.yml b/.rubocop_todo/rspec/feature_category.yml
index 1aee8934702..8efe5ef8d0a 100644
--- a/.rubocop_todo/rspec/feature_category.yml
+++ b/.rubocop_todo/rspec/feature_category.yml
@@ -603,7 +603,6 @@ RSpec/FeatureCategory:
- 'ee/spec/lib/ee/gitlab/auth/saml/identity_linker_spec.rb'
- 'ee/spec/lib/ee/gitlab/background_migration/backfill_epic_cache_counts_spec.rb'
- 'ee/spec/lib/ee/gitlab/background_migration/backfill_iteration_cadence_id_for_boards_spec.rb'
- - 'ee/spec/lib/ee/gitlab/background_migration/backfill_project_statistics_container_repository_size_spec.rb'
- 'ee/spec/lib/ee/gitlab/background_migration/delete_approval_rules_with_vulnerability_spec.rb'
- 'ee/spec/lib/ee/gitlab/background_migration/delete_invalid_epic_issues_spec.rb'
- 'ee/spec/lib/ee/gitlab/background_migration/migrate_approver_to_approval_rules_check_progress_spec.rb'
@@ -612,7 +611,6 @@ RSpec/FeatureCategory:
- 'ee/spec/lib/ee/gitlab/background_migration/migrate_shared_vulnerability_scanners_spec.rb'
- 'ee/spec/lib/ee/gitlab/background_migration/populate_approval_merge_request_rules_with_security_orchestration_spec.rb'
- 'ee/spec/lib/ee/gitlab/background_migration/populate_approval_project_rules_with_security_orchestration_spec.rb'
- - 'ee/spec/lib/ee/gitlab/background_migration/purge_stale_security_scans_spec.rb'
- 'ee/spec/lib/ee/gitlab/checks/push_rules/branch_check_spec.rb'
- 'ee/spec/lib/ee/gitlab/checks/push_rules/commit_check_spec.rb'
- 'ee/spec/lib/ee/gitlab/checks/push_rules/file_size_check_spec.rb'
@@ -2821,7 +2819,6 @@ RSpec/FeatureCategory:
- 'spec/lib/gitlab/background_migration/backfill_integrations_enable_ssl_verification_spec.rb'
- 'spec/lib/gitlab/background_migration/backfill_internal_on_notes_spec.rb'
- 'spec/lib/gitlab/background_migration/backfill_namespace_details_spec.rb'
- - 'spec/lib/gitlab/background_migration/backfill_namespace_id_for_project_route_spec.rb'
- 'spec/lib/gitlab/background_migration/backfill_namespace_id_of_vulnerability_reads_spec.rb'
- 'spec/lib/gitlab/background_migration/backfill_note_discussion_id_spec.rb'
- 'spec/lib/gitlab/background_migration/backfill_project_feature_package_registry_access_level_spec.rb'
@@ -2839,7 +2836,6 @@ RSpec/FeatureCategory:
- '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/batching_strategies/remove_backfilled_job_artifacts_expire_at_batching_strategy_spec.rb'
- - 'spec/lib/gitlab/background_migration/cleanup_orphaned_routes_spec.rb'
- 'spec/lib/gitlab/background_migration/copy_column_using_background_migration_job_spec.rb'
- 'spec/lib/gitlab/background_migration/delete_orphaned_operational_vulnerabilities_spec.rb'
- 'spec/lib/gitlab/background_migration/delete_orphans_approval_merge_request_rules_spec.rb'
diff --git a/.rubocop_todo/style/empty_method.yml b/.rubocop_todo/style/empty_method.yml
index ff246e48364..4249507eeae 100644
--- a/.rubocop_todo/style/empty_method.yml
+++ b/.rubocop_todo/style/empty_method.yml
@@ -65,8 +65,6 @@ Style/EmptyMethod:
- 'app/services/issuable_base_service.rb'
- 'app/services/projects/transfer_service.rb'
- 'app/workers/namespaces/root_statistics_worker.rb'
- - 'db/post_migrate/20220425121435_backfill_integrations_enable_ssl_verification.rb'
- - 'db/post_migrate/20220524074947_finalize_backfill_null_note_discussion_ids.rb'
- 'ee/app/controllers/admin/emails_controller.rb'
- 'ee/app/controllers/admin/geo/designs_controller.rb'
- 'ee/app/controllers/admin/geo/settings_controller.rb'
diff --git a/.rubocop_todo/style/if_unless_modifier.yml b/.rubocop_todo/style/if_unless_modifier.yml
index 70727e74805..3527c4afcb5 100644
--- a/.rubocop_todo/style/if_unless_modifier.yml
+++ b/.rubocop_todo/style/if_unless_modifier.yml
@@ -374,7 +374,6 @@ Style/IfUnlessModifier:
- 'config/routes.rb'
- 'danger/database/Dangerfile'
- 'danger/pipeline/Dangerfile'
- - 'db/post_migrate/20220523171107_drop_deploy_tokens_token_column.rb'
- 'ee/app/components/namespaces/storage/limit_alert_component.rb'
- 'ee/app/controllers/admin/elasticsearch_controller.rb'
- 'ee/app/controllers/admin/emails_controller.rb'
diff --git a/.rubocop_todo/style/inline_disable_annotation.yml b/.rubocop_todo/style/inline_disable_annotation.yml
index ae0d5084358..1072cf397cb 100644
--- a/.rubocop_todo/style/inline_disable_annotation.yml
+++ b/.rubocop_todo/style/inline_disable_annotation.yml
@@ -1123,18 +1123,6 @@ Style/InlineDisableAnnotation:
- 'config/routes/project.rb'
- 'danger/ce_ee_vue_templates/Dangerfile'
- 'danger/roulette/Dangerfile'
- - 'db/migrate/20220316022505_create_namespace_details.rb'
- - 'db/migrate/20220331125725_add_title_to_topic.rb'
- - 'db/migrate/20220401071609_add_campaign_to_in_product_marketing_email.rb'
- - 'db/migrate/20220421141342_add_allowed_plans_to_ci_runners.rb'
- - 'db/migrate/20220503035221_add_gitlab_schema_to_batched_background_migrations.rb'
- - 'db/migrate/20220513114706_add_jira_connect_application_id_application_setting.rb'
- - 'db/migrate/20220516092207_add_globally_allowed_ips_to_application_setting.rb'
- - 'db/migrate/20220531024905_add_operations_access_levels_to_project_feature.rb'
- - 'db/migrate/20220601091804_add_semver_column_to_ci_runners.rb'
- - 'db/migrate/20220602130306_add_namespace_type_index.rb'
- - 'db/migrate/20220617141347_create_ci_secure_file_states.rb'
- - 'db/migrate/20220726154013_add_component_id_to_sbom_occurrences.rb'
- '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'
@@ -1205,17 +1193,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/20220328100456_schedule20220328_reset_duplicate_ci_runners_token_encrypted_values_on_projects.rb'
- - 'db/post_migrate/20220328100457_schedule20220328_reset_duplicate_ci_runners_token_values_on_projects.rb'
- - 'db/post_migrate/20220504083836_cleanup_after_fixing_regression_with_new_users_emails.rb'
- - 'db/post_migrate/20220530082653_add_traversal_id_type_group_index.rb'
- - 'db/post_migrate/20220617123022_add_unique_index_on_projects_on_runners_token.rb'
- - 'db/post_migrate/20220617123034_add_unique_index_on_projects_on_runners_token_encrypted.rb'
- - 'db/post_migrate/20220628111752_drop_token_index_from_ci_builds.rb'
- - 'db/post_migrate/20220630085003_drop_project_successfull_pages_deploy_index_from_ci_builds.rb'
- - 'db/post_migrate/20220719081542_drop_queued_at_index_from_ci_builds.rb'
- - 'db/post_migrate/20220720090354_remove_pending_builds_covering_index_from_ci_builds.rb'
- - 'db/post_migrate/20220804235614_add_comment_to_vulnerability_state_transitions.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'
@@ -2078,7 +2055,6 @@ Style/InlineDisableAnnotation:
- 'ee/spec/lib/ee/gitlab/background_migration/backfill_epic_cache_counts_spec.rb'
- 'ee/spec/lib/ee/gitlab/background_migration/backfill_iteration_cadence_id_for_boards_spec.rb'
- 'ee/spec/lib/ee/gitlab/background_migration/backfill_missing_vulnerability_dismissal_details_spec.rb'
- - 'ee/spec/lib/ee/gitlab/background_migration/backfill_project_statistics_container_repository_size_spec.rb'
- 'ee/spec/lib/ee/gitlab/background_migration/backfill_project_statistics_storage_size_without_uploads_size_spec.rb'
- 'ee/spec/lib/ee/gitlab/background_migration/delete_invalid_epic_issues_spec.rb'
- 'ee/spec/lib/ee/gitlab/background_migration/delete_orphaned_transferred_project_approval_rules_spec.rb'
@@ -2207,7 +2183,6 @@ Style/InlineDisableAnnotation:
- 'ee/spec/views/groups/group_members/index.html.haml_spec.rb'
- 'ee/spec/views/layouts/header/_new_dropdown.haml_spec.rb'
- 'ee/spec/views/projects/project_members/index.html.haml_spec.rb'
- - 'ee/spec/views/shared/_tier_badge.html.haml_spec.rb'
- 'ee/spec/workers/audit_events/audit_event_streaming_worker_spec.rb'
- 'ee/spec/workers/ee/ci/build_finished_worker_spec.rb'
- 'ee/spec/workers/ee/new_issue_worker_spec.rb'
@@ -2979,7 +2954,6 @@ Style/InlineDisableAnnotation:
- 'spec/lib/gitlab/background_migration/backfill_finding_id_in_vulnerabilities_spec.rb'
- '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_namespace_id_for_project_route_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'
@@ -2992,7 +2966,6 @@ Style/InlineDisableAnnotation:
- '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/loose_index_scan_batching_strategy_spec.rb'
- 'spec/lib/gitlab/background_migration/batching_strategies/remove_backfilled_job_artifacts_expire_at_batching_strategy_spec.rb'
- - 'spec/lib/gitlab/background_migration/cleanup_orphaned_routes_spec.rb'
- 'spec/lib/gitlab/background_migration/cleanup_personal_access_tokens_with_nil_expires_at_spec.rb'
- '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'
diff --git a/.rubocop_todo/style/numeric_literal_prefix.yml b/.rubocop_todo/style/numeric_literal_prefix.yml
index 35c05e19837..4d810dc95f0 100644
--- a/.rubocop_todo/style/numeric_literal_prefix.yml
+++ b/.rubocop_todo/style/numeric_literal_prefix.yml
@@ -9,7 +9,6 @@ Style/NumericLiteralPrefix:
- 'ee/lib/ee/gitlab/background_migration/backfill_project_statistics_container_repository_size.rb'
- 'ee/lib/gitlab/geo/replication/blob_downloader.rb'
- 'ee/spec/lib/bulk_imports/groups/pipelines/iterations_pipeline_spec.rb'
- - 'ee/spec/lib/ee/gitlab/background_migration/backfill_project_statistics_container_repository_size_spec.rb'
- 'ee/spec/lib/gitlab/geo/replication/blob_downloader_spec.rb'
- 'ee/spec/models/analytics/devops_adoption/snapshot_spec.rb'
- 'ee/spec/models/ci/minutes/usage_spec.rb'
diff --git a/.rubocop_todo/style/symbol_proc.yml b/.rubocop_todo/style/symbol_proc.yml
index 1ea64305016..f13bf0c2e2e 100644
--- a/.rubocop_todo/style/symbol_proc.yml
+++ b/.rubocop_todo/style/symbol_proc.yml
@@ -63,7 +63,6 @@ Style/SymbolProc:
- 'config/initializers/doorkeeper_openid_connect.rb'
- 'config/initializers/mail_encoding_patch.rb'
- 'config/settings.rb'
- - 'db/post_migrate/20220803042352_cleanup_mr_attention_request_todos.rb'
- 'ee/app/helpers/ee/mirror_helper.rb'
- 'ee/app/helpers/ee/registrations_helper.rb'
- 'ee/app/models/concerns/epic_tree_sorting.rb'
diff --git a/app/assets/javascripts/ci/jobs_page/components/job_cells/actions_cell.vue b/app/assets/javascripts/ci/jobs_page/components/job_cells/actions_cell.vue
index 3ad2582e36b..458281eb385 100644
--- a/app/assets/javascripts/ci/jobs_page/components/job_cells/actions_cell.vue
+++ b/app/assets/javascripts/ci/jobs_page/components/job_cells/actions_cell.vue
@@ -84,6 +84,9 @@ export default {
artifactDownloadPath() {
return this.hasArtifacts.downloadPath;
},
+ canCancelJob() {
+ return this.job.userPermissions?.cancelBuild;
+ },
canReadJob() {
return this.job.userPermissions?.readBuild;
},
@@ -185,7 +188,7 @@ export default {
<gl-button-group>
<template v-if="canReadJob && canUpdateJob">
<gl-button
- v-if="isActive"
+ v-if="isActive && canCancelJob"
v-gl-tooltip
icon="cancel"
:title="$options.CANCEL"
diff --git a/app/assets/javascripts/ci/jobs_page/graphql/queries/get_jobs.query.graphql b/app/assets/javascripts/ci/jobs_page/graphql/queries/get_jobs.query.graphql
index 69719011079..b1ce3a8597a 100644
--- a/app/assets/javascripts/ci/jobs_page/graphql/queries/get_jobs.query.graphql
+++ b/app/assets/javascripts/ci/jobs_page/graphql/queries/get_jobs.query.graphql
@@ -71,6 +71,7 @@ query getJobs($fullPath: ID!, $after: String, $first: Int = 30, $statuses: [CiJo
readBuild
readJobArtifacts
updateBuild
+ cancelBuild
}
}
}
diff --git a/app/assets/javascripts/ci/pipeline_details/header/graphql/queries/get_pipeline_header_data.query.graphql b/app/assets/javascripts/ci/pipeline_details/header/graphql/queries/get_pipeline_header_data.query.graphql
index eb5643126a2..00c4c1ae3b4 100644
--- a/app/assets/javascripts/ci/pipeline_details/header/graphql/queries/get_pipeline_header_data.query.graphql
+++ b/app/assets/javascripts/ci/pipeline_details/header/graphql/queries/get_pipeline_header_data.query.graphql
@@ -10,6 +10,7 @@ query getPipelineHeaderData($fullPath: ID!, $iid: ID!) {
userPermissions {
destroyPipeline
updatePipeline
+ cancelPipeline
}
detailedStatus {
id
diff --git a/app/assets/javascripts/ci/pipeline_details/header/pipeline_details_header.vue b/app/assets/javascripts/ci/pipeline_details/header/pipeline_details_header.vue
index c0bde3a4411..4572e25face 100644
--- a/app/assets/javascripts/ci/pipeline_details/header/pipeline_details_header.vue
+++ b/app/assets/javascripts/ci/pipeline_details/header/pipeline_details_header.vue
@@ -312,7 +312,7 @@ export default {
canCancelPipeline() {
const { cancelable, userPermissions } = this.pipeline;
- return cancelable && userPermissions.updatePipeline;
+ return cancelable && userPermissions.cancelPipeline;
},
showComputeMinutes() {
return this.isFinished && this.computeMinutes;
diff --git a/app/assets/javascripts/graphql_shared/constants.js b/app/assets/javascripts/graphql_shared/constants.js
index 8269a7790a5..7f2c41d9aaf 100644
--- a/app/assets/javascripts/graphql_shared/constants.js
+++ b/app/assets/javascripts/graphql_shared/constants.js
@@ -29,3 +29,4 @@ export const TYPENAME_WORK_ITEM = 'WorkItem';
export const TYPENAME_ORGANIZATION = 'Organization';
export const TYPE_USERS_SAVED_REPLY = 'Users::SavedReply';
export const TYPE_WORKSPACE = 'RemoteDevelopment::Workspace';
+export const TYPE_COMPLIANCE_FRAMEWORK = 'ComplianceManagement::Framework';
diff --git a/app/helpers/vite_helper.rb b/app/helpers/vite_helper.rb
index a8ecfe51f28..cf9a5008a69 100644
--- a/app/helpers/vite_helper.rb
+++ b/app/helpers/vite_helper.rb
@@ -5,7 +5,7 @@ module ViteHelper
# vite is not production ready yet
return false if Rails.env.production?
# Enable vite if explicitly turned on in the GDK
- return ViteRuby.env['VITE_ENABLED'] if ViteRuby.env.key?('VITE_ENABLED')
+ return Gitlab::Utils.to_boolean(ViteRuby.env['VITE_ENABLED'], false) if ViteRuby.env.key?('VITE_ENABLED')
# Enable vite the legacy way (in case GDK hasn't been updated)
# This is going to be removed with https://gitlab.com/gitlab-org/gitlab/-/issues/431041
diff --git a/app/models/concerns/pg_full_text_searchable.rb b/app/models/concerns/pg_full_text_searchable.rb
index f26330e1cba..d32c4c9baf1 100644
--- a/app/models/concerns/pg_full_text_searchable.rb
+++ b/app/models/concerns/pg_full_text_searchable.rb
@@ -29,6 +29,7 @@ module PgFullTextSearchable
TEXT_SEARCH_DICTIONARY = 'english'
URL_SCHEME_REGEX = %r{(?<=\A|\W)\w+://(?=\w+)}
TSQUERY_DISALLOWED_CHARACTERS_REGEX = %r{[^a-zA-Z0-9 .@/\-_"]}
+ XML_TAG_REGEX = %r{</?([^>]+)>}
def update_search_data!
tsvector_sql_nodes = self.class.pg_full_text_searchable_columns.map do |column, weight|
@@ -58,6 +59,7 @@ module PgFullTextSearchable
column_text = self[column].gsub(LONG_WORDS_REGEX, ' ')
column_text = column_text[0..(TSVECTOR_MAX_LENGTH - 1)]
column_text = ActiveSupport::Inflector.transliterate(column_text)
+ column_text = column_text.gsub(XML_TAG_REGEX, ' \1 ')
Arel::Nodes::NamedFunction.new(
'setweight',
diff --git a/app/models/member.rb b/app/models/member.rb
index 9690e16fd7d..efac1f52a38 100644
--- a/app/models/member.rb
+++ b/app/models/member.rb
@@ -57,9 +57,6 @@ class Member < ApplicationRecord
},
if: :project_bot?
validate :access_level_inclusion
- validate :validate_member_role_access_level
- validate :validate_access_level_locked_for_member_role, on: :update
- validate :validate_member_role_belongs_to_same_root_namespace
scope :with_invited_user_state, -> do
joins('LEFT JOIN users as invited_user ON invited_user.email = members.invite_email')
@@ -514,32 +511,6 @@ class Member < ApplicationRecord
errors.add(:access_level, "is not included in the list")
end
- def validate_member_role_access_level
- return unless member_role_id
-
- if access_level != member_role.base_access_level
- errors.add(:member_role_id, _("role's base access level does not match the access level of the membership"))
- end
- end
-
- def validate_access_level_locked_for_member_role
- return unless member_role_id
- return if member_role_changed? # it is ok to change the access level when changing member role
-
- if access_level_changed?
- errors.add(:access_level, _("cannot be changed since member is associated with a custom role"))
- end
- end
-
- def validate_member_role_belongs_to_same_root_namespace
- return unless member_role_id
-
- return if member_namespace.id == member_role.namespace_id
- return if member_namespace.root_ancestor.id == member_role.namespace_id
-
- errors.add(:member_namespace, _("must be in same hierarchy as custom role's namespace"))
- end
-
def send_invite
# override in subclass
end
diff --git a/app/views/projects/settings/ci_cd/_form.html.haml b/app/views/projects/settings/ci_cd/_form.html.haml
index d51acc5e708..0efd55f2e50 100644
--- a/app/views/projects/settings/ci_cd/_form.html.haml
+++ b/app/views/projects/settings/ci_cd/_form.html.haml
@@ -36,6 +36,8 @@
s_("CICD|Use separate caches for protected branches"),
help_text: (s_('CICD|Unprotected branches will not have access to the cache from protected branches.') + ' ' + help_link_separated_caches).html_safe
+ = render_if_exists 'projects/settings/ci_cd/pipeline_cancelation', form: f
+
.form-group
= f.label :ci_config_path, _('CI/CD configuration file'), class: 'label-bold'
= f.text_field :ci_config_path, class: 'form-control', placeholder: '.gitlab-ci.yml'
diff --git a/config/locales/doorkeeper.en.yml b/config/locales/doorkeeper.en.yml
index ae8eea3bbda..e4ecc4bbb83 100644
--- a/config/locales/doorkeeper.en.yml
+++ b/config/locales/doorkeeper.en.yml
@@ -81,7 +81,7 @@ en:
ai_features: Access to API endpoints needed for GitLab Duo features
scope_desc:
api:
- Grants complete read/write access to the API, including all groups and projects, the container registry, and the package registry.
+ Grants complete read/write access to the API, including all groups and projects, the container registry, the dependency proxy, and the package registry.
read_api:
Grants read access to the API, including all groups and projects, the container registry, and the package registry.
read_user:
@@ -116,9 +116,9 @@ en:
Grants permission to perform Kubernetes API calls using the agent for Kubernetes.
group_access_token_scope_desc:
api:
- Grants complete read and write access to the scoped group and related project API, including the Package Registry.
+ Grants complete read and write access to the scoped group and related project API, including the container registry, the dependency proxy, and the package registry.
read_api:
- Grants read access to the scoped group and related project API, including the Package Registry.
+ Grants read access to the scoped group and related project API, including the package registry.
read_user:
Grants read-only access to the authenticated user's profile through the /user API endpoint, which includes username, public email, and full name. Also grants access to read-only API endpoints under /users.
read_repository:
@@ -126,9 +126,9 @@ en:
write_repository:
Grants read and write access (pull and push) to all repositories within a group.
read_registry:
- Grants read access (pull) to the Container Registry images if any project within a group is private and authorization is required.
+ Grants read access (pull) to the container registry images if any project within a group is private and authorization is required.
write_registry:
- Grants write access (push) to the Container Registry.
+ Grants write access (push) to the container registry.
read_observability:
Grants read-only access to GitLab Observability.
write_observability:
@@ -151,7 +151,7 @@ en:
Grants permission to perform Kubernetes API calls using the agent for Kubernetes in a group.
project_access_token_scope_desc:
api:
- Grants complete read and write access to the scoped project API, including the Package Registry.
+ Grants complete read and write access to the scoped project API, including the container registry, the dependency proxy, and the package registry.
read_api:
Grants read access to the scoped project API, including the Package Registry.
read_repository:
diff --git a/config/metrics/settings/20210204124910_omniauth_enabled.yml b/config/metrics/settings/20210204124910_omniauth_enabled.yml
index 811202f8515..6d91d61d466 100644
--- a/config/metrics/settings/20210204124910_omniauth_enabled.yml
+++ b/config/metrics/settings/20210204124910_omniauth_enabled.yml
@@ -9,6 +9,7 @@ value_type: boolean
status: active
time_frame: none
data_source: system
+instrumentation_class: OmniauthEnabledMetric
distribution:
- ce
- ee
diff --git a/config/metrics/settings/20210204124912_prometheus_enabled.yml b/config/metrics/settings/20210204124912_prometheus_enabled.yml
index b9f175be23a..d43520b9b62 100644
--- a/config/metrics/settings/20210204124912_prometheus_enabled.yml
+++ b/config/metrics/settings/20210204124912_prometheus_enabled.yml
@@ -9,6 +9,7 @@ value_type: boolean
status: active
time_frame: none
data_source: system
+instrumentation_class: PrometheusEnabledMetric
distribution:
- ce
- ee
diff --git a/config/metrics/settings/20210204124914_prometheus_metrics_enabled.yml b/config/metrics/settings/20210204124914_prometheus_metrics_enabled.yml
index 7dd5fefa142..dae3e2ac15c 100644
--- a/config/metrics/settings/20210204124914_prometheus_metrics_enabled.yml
+++ b/config/metrics/settings/20210204124914_prometheus_metrics_enabled.yml
@@ -9,6 +9,7 @@ value_type: boolean
status: active
time_frame: none
data_source: system
+instrumentation_class: PrometheusMetricsEnabledMetric
distribution:
- ce
- ee
diff --git a/config/metrics/settings/20210204124916_reply_by_email_enabled.yml b/config/metrics/settings/20210204124916_reply_by_email_enabled.yml
index a68569d728e..b85427d8222 100644
--- a/config/metrics/settings/20210204124916_reply_by_email_enabled.yml
+++ b/config/metrics/settings/20210204124916_reply_by_email_enabled.yml
@@ -9,6 +9,7 @@ value_type: boolean
status: active
time_frame: none
data_source: system
+instrumentation_class: ReplyByEmailEnabledMetric
distribution:
- ce
- ee
diff --git a/db/init_structure.sql b/db/init_structure.sql
index bcdaa38c32f..19e634df86e 100644
--- a/db/init_structure.sql
+++ b/db/init_structure.sql
@@ -22,6 +22,19 @@ RETURN NULL;
END
$$;
+CREATE FUNCTION gitlab_schema_prevent_write() RETURNS trigger
+ LANGUAGE plpgsql
+ AS $$
+BEGIN
+ IF COALESCE(NULLIF(current_setting(CONCAT('lock_writes.', TG_TABLE_NAME), true), ''), 'true') THEN
+ RAISE EXCEPTION 'Table: "%" is write protected within this Gitlab database.', TG_TABLE_NAME
+ USING ERRCODE = 'modifying_sql_data_not_permitted',
+ HINT = 'Make sure you are using the right database connection';
+ END IF;
+ RETURN NEW;
+END
+$$;
+
CREATE FUNCTION insert_into_loose_foreign_keys_deleted_records() RETURNS trigger
LANGUAGE plpgsql
AS $$
@@ -53,6 +66,8 @@ DECLARE
state smallint;
report_type smallint;
resolved_on_default_branch boolean;
+ present_on_default_branch boolean;
+ namespace_id bigint;
BEGIN
IF (NEW.vulnerability_id IS NULL AND (TG_OP = 'INSERT' OR TG_OP = 'UPDATE')) THEN
RETURN NULL;
@@ -63,16 +78,29 @@ BEGIN
END IF;
SELECT
- vulnerabilities.severity, vulnerabilities.state, vulnerabilities.report_type, vulnerabilities.resolved_on_default_branch
+ vulnerabilities.severity, vulnerabilities.state, vulnerabilities.report_type, vulnerabilities.resolved_on_default_branch, vulnerabilities.present_on_default_branch
INTO
- severity, state, report_type, resolved_on_default_branch
+ severity, state, report_type, resolved_on_default_branch, present_on_default_branch
FROM
vulnerabilities
WHERE
vulnerabilities.id = NEW.vulnerability_id;
- INSERT INTO vulnerability_reads (vulnerability_id, project_id, scanner_id, report_type, severity, state, resolved_on_default_branch, uuid, location_image, cluster_agent_id)
- VALUES (NEW.vulnerability_id, NEW.project_id, NEW.scanner_id, report_type, severity, state, resolved_on_default_branch, NEW.uuid::uuid, NEW.location->>'image', NEW.location->'kubernetes_resource'->>'agent_id')
+ IF present_on_default_branch IS NOT true THEN
+ RETURN NULL;
+ END IF;
+
+ SELECT
+ projects.namespace_id
+ INTO
+ namespace_id
+ FROM
+ projects
+ WHERE
+ projects.id = NEW.project_id;
+
+ INSERT INTO vulnerability_reads (vulnerability_id, namespace_id, project_id, scanner_id, report_type, severity, state, resolved_on_default_branch, uuid, location_image, cluster_agent_id, casted_cluster_agent_id)
+ VALUES (NEW.vulnerability_id, namespace_id, NEW.project_id, NEW.scanner_id, report_type, severity, state, resolved_on_default_branch, NEW.uuid::uuid, NEW.location->>'image', NEW.location->'kubernetes_resource'->>'agent_id', CAST(NEW.location->'kubernetes_resource'->>'agent_id' AS bigint))
ON CONFLICT(vulnerability_id) DO NOTHING;
RETURN NULL;
END
@@ -89,11 +117,32 @@ RETURN NULL;
END
$$;
-CREATE FUNCTION integrations_set_type_new() RETURNS trigger
+CREATE FUNCTION insert_vulnerability_reads_from_vulnerability() RETURNS trigger
LANGUAGE plpgsql
AS $$
+DECLARE
+ scanner_id bigint;
+ uuid uuid;
+ location_image text;
+ cluster_agent_id text;
+ casted_cluster_agent_id bigint;
+ namespace_id bigint;
BEGIN
-UPDATE integrations SET type_new = COALESCE(NEW.type_new, regexp_replace(NEW.type, '\A(.+)Service\Z', 'Integrations::\1')) , type = COALESCE(NEW.type, regexp_replace(NEW.type_new, '\AIntegrations::(.+)\Z', '\1Service')) WHERE integrations.id = NEW.id; RETURN NULL;
+ SELECT
+ v_o.scanner_id, v_o.uuid, v_o.location->>'image', v_o.location->'kubernetes_resource'->>'agent_id', CAST(v_o.location->'kubernetes_resource'->>'agent_id' AS bigint), projects.namespace_id
+ INTO
+ scanner_id, uuid, location_image, cluster_agent_id, casted_cluster_agent_id, namespace_id
+ FROM
+ vulnerability_occurrences v_o
+ INNER JOIN projects ON projects.id = v_o.project_id
+ WHERE
+ v_o.vulnerability_id = NEW.id
+ LIMIT 1;
+
+ INSERT INTO vulnerability_reads (vulnerability_id, namespace_id, project_id, scanner_id, report_type, severity, state, resolved_on_default_branch, uuid, location_image, cluster_agent_id, casted_cluster_agent_id)
+ VALUES (NEW.id, namespace_id, NEW.project_id, scanner_id, NEW.report_type, NEW.severity, NEW.state, NEW.resolved_on_default_branch, uuid::uuid, location_image, cluster_agent_id, casted_cluster_agent_id)
+ ON CONFLICT(vulnerability_id) DO NOTHING;
+ RETURN NULL;
END
$$;
@@ -106,6 +155,30 @@ BEGIN
END;
$$;
+CREATE FUNCTION nullify_merge_request_metrics_build_data() RETURNS trigger
+ LANGUAGE plpgsql
+ AS $$
+BEGIN
+IF (OLD.pipeline_id IS NOT NULL) AND (NEW.pipeline_id IS NULL) THEN
+ NEW.latest_build_started_at = NULL;
+ NEW.latest_build_finished_at = NULL;
+END IF;
+RETURN NEW;
+
+END
+$$;
+
+CREATE FUNCTION postgres_pg_stat_activity_autovacuum() RETURNS TABLE(query text, query_start timestamp with time zone)
+ LANGUAGE sql SECURITY DEFINER
+ SET search_path TO 'pg_catalog', 'pg_temp'
+ AS $$
+ SELECT query, query_start
+ FROM pg_stat_activity
+ WHERE datname = current_database()
+ AND state = 'active'
+ AND backend_type = 'autovacuum worker'
+$$;
+
CREATE FUNCTION set_has_external_issue_tracker() RETURNS trigger
LANGUAGE plpgsql
AS $$
@@ -190,6 +263,7 @@ UPDATE
vulnerability_reads
SET
location_image = NEW.location->>'image',
+ casted_cluster_agent_id = CAST(NEW.location->'kubernetes_resource'->>'agent_id' AS bigint),
cluster_agent_id = NEW.location->'kubernetes_resource'->>'agent_id'
WHERE
vulnerability_id = NEW.vulnerability_id;
@@ -198,6 +272,74 @@ RETURN NULL;
END
$$;
+CREATE FUNCTION update_namespace_details_from_namespaces() RETURNS trigger
+ LANGUAGE plpgsql
+ AS $$
+BEGIN
+INSERT INTO
+ namespace_details (
+ description,
+ description_html,
+ cached_markdown_version,
+ updated_at,
+ created_at,
+ namespace_id
+ )
+VALUES
+ (
+ NEW.description,
+ NEW.description_html,
+ NEW.cached_markdown_version,
+ NEW.updated_at,
+ NEW.updated_at,
+ NEW.id
+ ) ON CONFLICT (namespace_id) DO
+UPDATE
+SET
+ description = NEW.description,
+ description_html = NEW.description_html,
+ cached_markdown_version = NEW.cached_markdown_version,
+ updated_at = NEW.updated_at
+WHERE
+ namespace_details.namespace_id = NEW.id;RETURN NULL;
+
+END
+$$;
+
+CREATE FUNCTION update_namespace_details_from_projects() RETURNS trigger
+ LANGUAGE plpgsql
+ AS $$
+BEGIN
+INSERT INTO
+ namespace_details (
+ description,
+ description_html,
+ cached_markdown_version,
+ updated_at,
+ created_at,
+ namespace_id
+ )
+VALUES
+ (
+ NEW.description,
+ NEW.description_html,
+ NEW.cached_markdown_version,
+ NEW.updated_at,
+ NEW.updated_at,
+ NEW.project_namespace_id
+ ) ON CONFLICT (namespace_id) DO
+UPDATE
+SET
+ description = NEW.description,
+ description_html = NEW.description_html,
+ cached_markdown_version = NEW.cached_markdown_version,
+ updated_at = NEW.updated_at
+WHERE
+ namespace_details.namespace_id = NEW.project_namespace_id;RETURN NULL;
+
+END
+$$;
+
CREATE FUNCTION update_vulnerability_reads_from_vulnerability() RETURNS trigger
LANGUAGE plpgsql
AS $$
@@ -222,170 +364,18 @@ CREATE TABLE audit_events (
details text,
ip_address inet,
author_name text,
- target_details text,
entity_path text,
+ target_details text,
created_at timestamp without time zone NOT NULL,
target_type text,
target_id bigint,
+ CONSTRAINT check_492aaa021d CHECK ((char_length(entity_path) <= 5500)),
CONSTRAINT check_83ff8406e2 CHECK ((char_length(author_name) <= 255)),
- CONSTRAINT check_97a8c868e7 CHECK ((char_length(target_type) <= 255))
+ CONSTRAINT check_97a8c868e7 CHECK ((char_length(target_type) <= 255)),
+ CONSTRAINT check_d493ec90b5 CHECK ((char_length(target_details) <= 5500))
)
PARTITION BY RANGE (created_at);
-CREATE SEQUENCE audit_events_id_seq
- AS integer
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
-
-ALTER SEQUENCE audit_events_id_seq OWNED BY audit_events.id;
-
-CREATE TABLE gitlab_partitions_dynamic.audit_events_000000 (
- id bigint DEFAULT nextval('audit_events_id_seq'::regclass) NOT NULL,
- author_id integer NOT NULL,
- entity_id integer NOT NULL,
- entity_type character varying NOT NULL,
- details text,
- ip_address inet,
- author_name text,
- target_details text,
- entity_path text,
- created_at timestamp without time zone NOT NULL,
- target_type text,
- target_id bigint,
- CONSTRAINT check_83ff8406e2 CHECK ((char_length(author_name) <= 255)),
- CONSTRAINT check_97a8c868e7 CHECK ((char_length(target_type) <= 255))
-);
-ALTER TABLE ONLY audit_events ATTACH PARTITION gitlab_partitions_dynamic.audit_events_000000 FOR VALUES FROM (MINVALUE) TO ('2023-05-01 00:00:00');
-
-CREATE TABLE gitlab_partitions_dynamic.audit_events_202305 (
- id bigint DEFAULT nextval('audit_events_id_seq'::regclass) NOT NULL,
- author_id integer NOT NULL,
- entity_id integer NOT NULL,
- entity_type character varying NOT NULL,
- details text,
- ip_address inet,
- author_name text,
- target_details text,
- entity_path text,
- created_at timestamp without time zone NOT NULL,
- target_type text,
- target_id bigint,
- CONSTRAINT check_83ff8406e2 CHECK ((char_length(author_name) <= 255)),
- CONSTRAINT check_97a8c868e7 CHECK ((char_length(target_type) <= 255))
-);
-ALTER TABLE ONLY audit_events ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202305 FOR VALUES FROM ('2023-05-01 00:00:00') TO ('2023-06-01 00:00:00');
-
-CREATE TABLE gitlab_partitions_dynamic.audit_events_202306 (
- id bigint DEFAULT nextval('audit_events_id_seq'::regclass) NOT NULL,
- author_id integer NOT NULL,
- entity_id integer NOT NULL,
- entity_type character varying NOT NULL,
- details text,
- ip_address inet,
- author_name text,
- target_details text,
- entity_path text,
- created_at timestamp without time zone NOT NULL,
- target_type text,
- target_id bigint,
- CONSTRAINT check_83ff8406e2 CHECK ((char_length(author_name) <= 255)),
- CONSTRAINT check_97a8c868e7 CHECK ((char_length(target_type) <= 255))
-);
-ALTER TABLE ONLY audit_events ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202306 FOR VALUES FROM ('2023-06-01 00:00:00') TO ('2023-07-01 00:00:00');
-
-CREATE TABLE gitlab_partitions_dynamic.audit_events_202307 (
- id bigint DEFAULT nextval('audit_events_id_seq'::regclass) NOT NULL,
- author_id integer NOT NULL,
- entity_id integer NOT NULL,
- entity_type character varying NOT NULL,
- details text,
- ip_address inet,
- author_name text,
- target_details text,
- entity_path text,
- created_at timestamp without time zone NOT NULL,
- target_type text,
- target_id bigint,
- CONSTRAINT check_83ff8406e2 CHECK ((char_length(author_name) <= 255)),
- CONSTRAINT check_97a8c868e7 CHECK ((char_length(target_type) <= 255))
-);
-ALTER TABLE ONLY audit_events ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202307 FOR VALUES FROM ('2023-07-01 00:00:00') TO ('2023-08-01 00:00:00');
-
-CREATE TABLE gitlab_partitions_dynamic.audit_events_202308 (
- id bigint DEFAULT nextval('audit_events_id_seq'::regclass) NOT NULL,
- author_id integer NOT NULL,
- entity_id integer NOT NULL,
- entity_type character varying NOT NULL,
- details text,
- ip_address inet,
- author_name text,
- target_details text,
- entity_path text,
- created_at timestamp without time zone NOT NULL,
- target_type text,
- target_id bigint,
- CONSTRAINT check_83ff8406e2 CHECK ((char_length(author_name) <= 255)),
- CONSTRAINT check_97a8c868e7 CHECK ((char_length(target_type) <= 255))
-);
-ALTER TABLE ONLY audit_events ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202308 FOR VALUES FROM ('2023-08-01 00:00:00') TO ('2023-09-01 00:00:00');
-
-CREATE TABLE gitlab_partitions_dynamic.audit_events_202309 (
- id bigint DEFAULT nextval('audit_events_id_seq'::regclass) NOT NULL,
- author_id integer NOT NULL,
- entity_id integer NOT NULL,
- entity_type character varying NOT NULL,
- details text,
- ip_address inet,
- author_name text,
- target_details text,
- entity_path text,
- created_at timestamp without time zone NOT NULL,
- target_type text,
- target_id bigint,
- CONSTRAINT check_83ff8406e2 CHECK ((char_length(author_name) <= 255)),
- CONSTRAINT check_97a8c868e7 CHECK ((char_length(target_type) <= 255))
-);
-ALTER TABLE ONLY audit_events ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202309 FOR VALUES FROM ('2023-09-01 00:00:00') TO ('2023-10-01 00:00:00');
-
-CREATE TABLE gitlab_partitions_dynamic.audit_events_202310 (
- id bigint DEFAULT nextval('audit_events_id_seq'::regclass) NOT NULL,
- author_id integer NOT NULL,
- entity_id integer NOT NULL,
- entity_type character varying NOT NULL,
- details text,
- ip_address inet,
- author_name text,
- target_details text,
- entity_path text,
- created_at timestamp without time zone NOT NULL,
- target_type text,
- target_id bigint,
- CONSTRAINT check_83ff8406e2 CHECK ((char_length(author_name) <= 255)),
- CONSTRAINT check_97a8c868e7 CHECK ((char_length(target_type) <= 255))
-);
-ALTER TABLE ONLY audit_events ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202310 FOR VALUES FROM ('2023-10-01 00:00:00') TO ('2023-11-01 00:00:00');
-
-CREATE TABLE gitlab_partitions_dynamic.audit_events_202311 (
- id bigint DEFAULT nextval('audit_events_id_seq'::regclass) NOT NULL,
- author_id integer NOT NULL,
- entity_id integer NOT NULL,
- entity_type character varying NOT NULL,
- details text,
- ip_address inet,
- author_name text,
- target_details text,
- entity_path text,
- created_at timestamp without time zone NOT NULL,
- target_type text,
- target_id bigint,
- CONSTRAINT check_83ff8406e2 CHECK ((char_length(author_name) <= 255)),
- CONSTRAINT check_97a8c868e7 CHECK ((char_length(target_type) <= 255))
-);
-ALTER TABLE ONLY audit_events ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202311 FOR VALUES FROM ('2023-11-01 00:00:00') TO ('2023-12-01 00:00:00');
-
CREATE TABLE batched_background_migration_job_transition_logs (
id bigint NOT NULL,
batched_background_migration_job_id bigint NOT NULL,
@@ -400,127 +390,6 @@ CREATE TABLE batched_background_migration_job_transition_logs (
)
PARTITION BY RANGE (created_at);
-CREATE SEQUENCE batched_background_migration_job_transition_logs_id_seq
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
-
-ALTER SEQUENCE batched_background_migration_job_transition_logs_id_seq OWNED BY batched_background_migration_job_transition_logs.id;
-
-CREATE TABLE gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_000000 (
- id bigint DEFAULT nextval('batched_background_migration_job_transition_logs_id_seq'::regclass) NOT NULL,
- batched_background_migration_job_id bigint NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- previous_status smallint NOT NULL,
- next_status smallint NOT NULL,
- exception_class text,
- exception_message text,
- CONSTRAINT check_50e580811a CHECK ((char_length(exception_message) <= 1000)),
- CONSTRAINT check_76e202c37a CHECK ((char_length(exception_class) <= 100))
-);
-ALTER TABLE ONLY batched_background_migration_job_transition_logs ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_000000 FOR VALUES FROM (MINVALUE) TO ('2023-05-01 00:00:00+00');
-
-CREATE TABLE gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202305 (
- id bigint DEFAULT nextval('batched_background_migration_job_transition_logs_id_seq'::regclass) NOT NULL,
- batched_background_migration_job_id bigint NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- previous_status smallint NOT NULL,
- next_status smallint NOT NULL,
- exception_class text,
- exception_message text,
- CONSTRAINT check_50e580811a CHECK ((char_length(exception_message) <= 1000)),
- CONSTRAINT check_76e202c37a CHECK ((char_length(exception_class) <= 100))
-);
-ALTER TABLE ONLY batched_background_migration_job_transition_logs ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202305 FOR VALUES FROM ('2023-05-01 00:00:00+00') TO ('2023-06-01 00:00:00+00');
-
-CREATE TABLE gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202306 (
- id bigint DEFAULT nextval('batched_background_migration_job_transition_logs_id_seq'::regclass) NOT NULL,
- batched_background_migration_job_id bigint NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- previous_status smallint NOT NULL,
- next_status smallint NOT NULL,
- exception_class text,
- exception_message text,
- CONSTRAINT check_50e580811a CHECK ((char_length(exception_message) <= 1000)),
- CONSTRAINT check_76e202c37a CHECK ((char_length(exception_class) <= 100))
-);
-ALTER TABLE ONLY batched_background_migration_job_transition_logs ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202306 FOR VALUES FROM ('2023-06-01 00:00:00+00') TO ('2023-07-01 00:00:00+00');
-
-CREATE TABLE gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202307 (
- id bigint DEFAULT nextval('batched_background_migration_job_transition_logs_id_seq'::regclass) NOT NULL,
- batched_background_migration_job_id bigint NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- previous_status smallint NOT NULL,
- next_status smallint NOT NULL,
- exception_class text,
- exception_message text,
- CONSTRAINT check_50e580811a CHECK ((char_length(exception_message) <= 1000)),
- CONSTRAINT check_76e202c37a CHECK ((char_length(exception_class) <= 100))
-);
-ALTER TABLE ONLY batched_background_migration_job_transition_logs ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202307 FOR VALUES FROM ('2023-07-01 00:00:00+00') TO ('2023-08-01 00:00:00+00');
-
-CREATE TABLE gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202308 (
- id bigint DEFAULT nextval('batched_background_migration_job_transition_logs_id_seq'::regclass) NOT NULL,
- batched_background_migration_job_id bigint NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- previous_status smallint NOT NULL,
- next_status smallint NOT NULL,
- exception_class text,
- exception_message text,
- CONSTRAINT check_50e580811a CHECK ((char_length(exception_message) <= 1000)),
- CONSTRAINT check_76e202c37a CHECK ((char_length(exception_class) <= 100))
-);
-ALTER TABLE ONLY batched_background_migration_job_transition_logs ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202308 FOR VALUES FROM ('2023-08-01 00:00:00+00') TO ('2023-09-01 00:00:00+00');
-
-CREATE TABLE gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202309 (
- id bigint DEFAULT nextval('batched_background_migration_job_transition_logs_id_seq'::regclass) NOT NULL,
- batched_background_migration_job_id bigint NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- previous_status smallint NOT NULL,
- next_status smallint NOT NULL,
- exception_class text,
- exception_message text,
- CONSTRAINT check_50e580811a CHECK ((char_length(exception_message) <= 1000)),
- CONSTRAINT check_76e202c37a CHECK ((char_length(exception_class) <= 100))
-);
-ALTER TABLE ONLY batched_background_migration_job_transition_logs ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202309 FOR VALUES FROM ('2023-09-01 00:00:00+00') TO ('2023-10-01 00:00:00+00');
-
-CREATE TABLE gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202310 (
- id bigint DEFAULT nextval('batched_background_migration_job_transition_logs_id_seq'::regclass) NOT NULL,
- batched_background_migration_job_id bigint NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- previous_status smallint NOT NULL,
- next_status smallint NOT NULL,
- exception_class text,
- exception_message text,
- CONSTRAINT check_50e580811a CHECK ((char_length(exception_message) <= 1000)),
- CONSTRAINT check_76e202c37a CHECK ((char_length(exception_class) <= 100))
-);
-ALTER TABLE ONLY batched_background_migration_job_transition_logs ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202310 FOR VALUES FROM ('2023-10-01 00:00:00+00') TO ('2023-11-01 00:00:00+00');
-
-CREATE TABLE gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202311 (
- id bigint DEFAULT nextval('batched_background_migration_job_transition_logs_id_seq'::regclass) NOT NULL,
- batched_background_migration_job_id bigint NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- previous_status smallint NOT NULL,
- next_status smallint NOT NULL,
- exception_class text,
- exception_message text,
- CONSTRAINT check_50e580811a CHECK ((char_length(exception_message) <= 1000)),
- CONSTRAINT check_76e202c37a CHECK ((char_length(exception_class) <= 100))
-);
-ALTER TABLE ONLY batched_background_migration_job_transition_logs ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202311 FOR VALUES FROM ('2023-11-01 00:00:00+00') TO ('2023-12-01 00:00:00+00');
-
CREATE TABLE incident_management_pending_alert_escalations (
id bigint NOT NULL,
rule_id bigint NOT NULL,
@@ -531,95 +400,6 @@ CREATE TABLE incident_management_pending_alert_escalations (
)
PARTITION BY RANGE (process_at);
-CREATE SEQUENCE incident_management_pending_alert_escalations_id_seq
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
-
-ALTER SEQUENCE incident_management_pending_alert_escalations_id_seq OWNED BY incident_management_pending_alert_escalations.id;
-
-CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_alert_escalations_000000 (
- id bigint DEFAULT nextval('incident_management_pending_alert_escalations_id_seq'::regclass) NOT NULL,
- rule_id bigint NOT NULL,
- alert_id bigint NOT NULL,
- process_at timestamp with time zone NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL
-);
-ALTER TABLE ONLY incident_management_pending_alert_escalations ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_000000 FOR VALUES FROM (MINVALUE) TO ('2023-05-01 00:00:00+00');
-
-CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202305 (
- id bigint DEFAULT nextval('incident_management_pending_alert_escalations_id_seq'::regclass) NOT NULL,
- rule_id bigint NOT NULL,
- alert_id bigint NOT NULL,
- process_at timestamp with time zone NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL
-);
-ALTER TABLE ONLY incident_management_pending_alert_escalations ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202305 FOR VALUES FROM ('2023-05-01 00:00:00+00') TO ('2023-06-01 00:00:00+00');
-
-CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202306 (
- id bigint DEFAULT nextval('incident_management_pending_alert_escalations_id_seq'::regclass) NOT NULL,
- rule_id bigint NOT NULL,
- alert_id bigint NOT NULL,
- process_at timestamp with time zone NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL
-);
-ALTER TABLE ONLY incident_management_pending_alert_escalations ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202306 FOR VALUES FROM ('2023-06-01 00:00:00+00') TO ('2023-07-01 00:00:00+00');
-
-CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202307 (
- id bigint DEFAULT nextval('incident_management_pending_alert_escalations_id_seq'::regclass) NOT NULL,
- rule_id bigint NOT NULL,
- alert_id bigint NOT NULL,
- process_at timestamp with time zone NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL
-);
-ALTER TABLE ONLY incident_management_pending_alert_escalations ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202307 FOR VALUES FROM ('2023-07-01 00:00:00+00') TO ('2023-08-01 00:00:00+00');
-
-CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202308 (
- id bigint DEFAULT nextval('incident_management_pending_alert_escalations_id_seq'::regclass) NOT NULL,
- rule_id bigint NOT NULL,
- alert_id bigint NOT NULL,
- process_at timestamp with time zone NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL
-);
-ALTER TABLE ONLY incident_management_pending_alert_escalations ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202308 FOR VALUES FROM ('2023-08-01 00:00:00+00') TO ('2023-09-01 00:00:00+00');
-
-CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202309 (
- id bigint DEFAULT nextval('incident_management_pending_alert_escalations_id_seq'::regclass) NOT NULL,
- rule_id bigint NOT NULL,
- alert_id bigint NOT NULL,
- process_at timestamp with time zone NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL
-);
-ALTER TABLE ONLY incident_management_pending_alert_escalations ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202309 FOR VALUES FROM ('2023-09-01 00:00:00+00') TO ('2023-10-01 00:00:00+00');
-
-CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202310 (
- id bigint DEFAULT nextval('incident_management_pending_alert_escalations_id_seq'::regclass) NOT NULL,
- rule_id bigint NOT NULL,
- alert_id bigint NOT NULL,
- process_at timestamp with time zone NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL
-);
-ALTER TABLE ONLY incident_management_pending_alert_escalations ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202310 FOR VALUES FROM ('2023-10-01 00:00:00+00') TO ('2023-11-01 00:00:00+00');
-
-CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202311 (
- id bigint DEFAULT nextval('incident_management_pending_alert_escalations_id_seq'::regclass) NOT NULL,
- rule_id bigint NOT NULL,
- alert_id bigint NOT NULL,
- process_at timestamp with time zone NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL
-);
-ALTER TABLE ONLY incident_management_pending_alert_escalations ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202311 FOR VALUES FROM ('2023-11-01 00:00:00+00') TO ('2023-12-01 00:00:00+00');
-
CREATE TABLE incident_management_pending_issue_escalations (
id bigint NOT NULL,
rule_id bigint NOT NULL,
@@ -630,95 +410,6 @@ CREATE TABLE incident_management_pending_issue_escalations (
)
PARTITION BY RANGE (process_at);
-CREATE SEQUENCE incident_management_pending_issue_escalations_id_seq
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
-
-ALTER SEQUENCE incident_management_pending_issue_escalations_id_seq OWNED BY incident_management_pending_issue_escalations.id;
-
-CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_issue_escalations_000000 (
- id bigint DEFAULT nextval('incident_management_pending_issue_escalations_id_seq'::regclass) NOT NULL,
- rule_id bigint NOT NULL,
- issue_id bigint NOT NULL,
- process_at timestamp with time zone NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL
-);
-ALTER TABLE ONLY incident_management_pending_issue_escalations ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_000000 FOR VALUES FROM (MINVALUE) TO ('2023-05-01 00:00:00+00');
-
-CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202305 (
- id bigint DEFAULT nextval('incident_management_pending_issue_escalations_id_seq'::regclass) NOT NULL,
- rule_id bigint NOT NULL,
- issue_id bigint NOT NULL,
- process_at timestamp with time zone NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL
-);
-ALTER TABLE ONLY incident_management_pending_issue_escalations ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202305 FOR VALUES FROM ('2023-05-01 00:00:00+00') TO ('2023-06-01 00:00:00+00');
-
-CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202306 (
- id bigint DEFAULT nextval('incident_management_pending_issue_escalations_id_seq'::regclass) NOT NULL,
- rule_id bigint NOT NULL,
- issue_id bigint NOT NULL,
- process_at timestamp with time zone NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL
-);
-ALTER TABLE ONLY incident_management_pending_issue_escalations ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202306 FOR VALUES FROM ('2023-06-01 00:00:00+00') TO ('2023-07-01 00:00:00+00');
-
-CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202307 (
- id bigint DEFAULT nextval('incident_management_pending_issue_escalations_id_seq'::regclass) NOT NULL,
- rule_id bigint NOT NULL,
- issue_id bigint NOT NULL,
- process_at timestamp with time zone NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL
-);
-ALTER TABLE ONLY incident_management_pending_issue_escalations ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202307 FOR VALUES FROM ('2023-07-01 00:00:00+00') TO ('2023-08-01 00:00:00+00');
-
-CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202308 (
- id bigint DEFAULT nextval('incident_management_pending_issue_escalations_id_seq'::regclass) NOT NULL,
- rule_id bigint NOT NULL,
- issue_id bigint NOT NULL,
- process_at timestamp with time zone NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL
-);
-ALTER TABLE ONLY incident_management_pending_issue_escalations ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202308 FOR VALUES FROM ('2023-08-01 00:00:00+00') TO ('2023-09-01 00:00:00+00');
-
-CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202309 (
- id bigint DEFAULT nextval('incident_management_pending_issue_escalations_id_seq'::regclass) NOT NULL,
- rule_id bigint NOT NULL,
- issue_id bigint NOT NULL,
- process_at timestamp with time zone NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL
-);
-ALTER TABLE ONLY incident_management_pending_issue_escalations ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202309 FOR VALUES FROM ('2023-09-01 00:00:00+00') TO ('2023-10-01 00:00:00+00');
-
-CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202310 (
- id bigint DEFAULT nextval('incident_management_pending_issue_escalations_id_seq'::regclass) NOT NULL,
- rule_id bigint NOT NULL,
- issue_id bigint NOT NULL,
- process_at timestamp with time zone NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL
-);
-ALTER TABLE ONLY incident_management_pending_issue_escalations ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202310 FOR VALUES FROM ('2023-10-01 00:00:00+00') TO ('2023-11-01 00:00:00+00');
-
-CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202311 (
- id bigint DEFAULT nextval('incident_management_pending_issue_escalations_id_seq'::regclass) NOT NULL,
- rule_id bigint NOT NULL,
- issue_id bigint NOT NULL,
- process_at timestamp with time zone NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL
-);
-ALTER TABLE ONLY incident_management_pending_issue_escalations ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202311 FOR VALUES FROM ('2023-11-01 00:00:00+00') TO ('2023-12-01 00:00:00+00');
-
CREATE TABLE loose_foreign_keys_deleted_records (
id bigint NOT NULL,
partition bigint DEFAULT 1 NOT NULL,
@@ -732,28 +423,6 @@ CREATE TABLE loose_foreign_keys_deleted_records (
)
PARTITION BY LIST (partition);
-CREATE SEQUENCE loose_foreign_keys_deleted_records_id_seq
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
-
-ALTER SEQUENCE loose_foreign_keys_deleted_records_id_seq OWNED BY loose_foreign_keys_deleted_records.id;
-
-CREATE TABLE gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_1 (
- id bigint DEFAULT nextval('loose_foreign_keys_deleted_records_id_seq'::regclass) NOT NULL,
- partition bigint DEFAULT 1 NOT NULL,
- primary_key_value bigint NOT NULL,
- status smallint DEFAULT 1 NOT NULL,
- created_at timestamp with time zone DEFAULT now() NOT NULL,
- fully_qualified_table_name text NOT NULL,
- consume_after timestamp with time zone DEFAULT now(),
- cleanup_attempts smallint DEFAULT 0,
- CONSTRAINT check_1a541f3235 CHECK ((char_length(fully_qualified_table_name) <= 150))
-);
-ALTER TABLE ONLY loose_foreign_keys_deleted_records ATTACH PARTITION gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_1 FOR VALUES IN ('1');
-
CREATE TABLE verification_codes (
created_at timestamp with time zone DEFAULT now() NOT NULL,
visitor_id_code text NOT NULL,
@@ -767,105 +436,6 @@ PARTITION BY RANGE (created_at);
COMMENT ON TABLE verification_codes IS 'JiHu-specific table';
-CREATE TABLE gitlab_partitions_dynamic.verification_codes_000000 (
- created_at timestamp with time zone DEFAULT now() NOT NULL,
- visitor_id_code text NOT NULL,
- code text NOT NULL,
- phone text NOT NULL,
- CONSTRAINT check_9b84e6aaff CHECK ((char_length(code) <= 8)),
- CONSTRAINT check_ccc542256b CHECK ((char_length(visitor_id_code) <= 64)),
- CONSTRAINT check_f5684c195b CHECK ((char_length(phone) <= 50))
-);
-ALTER TABLE ONLY verification_codes ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_000000 FOR VALUES FROM (MINVALUE) TO ('2023-04-01 00:00:00+00');
-
-CREATE TABLE gitlab_partitions_dynamic.verification_codes_202304 (
- created_at timestamp with time zone DEFAULT now() NOT NULL,
- visitor_id_code text NOT NULL,
- code text NOT NULL,
- phone text NOT NULL,
- CONSTRAINT check_9b84e6aaff CHECK ((char_length(code) <= 8)),
- CONSTRAINT check_ccc542256b CHECK ((char_length(visitor_id_code) <= 64)),
- CONSTRAINT check_f5684c195b CHECK ((char_length(phone) <= 50))
-);
-ALTER TABLE ONLY verification_codes ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202304 FOR VALUES FROM ('2023-04-01 00:00:00+00') TO ('2023-05-01 00:00:00+00');
-
-CREATE TABLE gitlab_partitions_dynamic.verification_codes_202305 (
- created_at timestamp with time zone DEFAULT now() NOT NULL,
- visitor_id_code text NOT NULL,
- code text NOT NULL,
- phone text NOT NULL,
- CONSTRAINT check_9b84e6aaff CHECK ((char_length(code) <= 8)),
- CONSTRAINT check_ccc542256b CHECK ((char_length(visitor_id_code) <= 64)),
- CONSTRAINT check_f5684c195b CHECK ((char_length(phone) <= 50))
-);
-ALTER TABLE ONLY verification_codes ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202305 FOR VALUES FROM ('2023-05-01 00:00:00+00') TO ('2023-06-01 00:00:00+00');
-
-CREATE TABLE gitlab_partitions_dynamic.verification_codes_202306 (
- created_at timestamp with time zone DEFAULT now() NOT NULL,
- visitor_id_code text NOT NULL,
- code text NOT NULL,
- phone text NOT NULL,
- CONSTRAINT check_9b84e6aaff CHECK ((char_length(code) <= 8)),
- CONSTRAINT check_ccc542256b CHECK ((char_length(visitor_id_code) <= 64)),
- CONSTRAINT check_f5684c195b CHECK ((char_length(phone) <= 50))
-);
-ALTER TABLE ONLY verification_codes ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202306 FOR VALUES FROM ('2023-06-01 00:00:00+00') TO ('2023-07-01 00:00:00+00');
-
-CREATE TABLE gitlab_partitions_dynamic.verification_codes_202307 (
- created_at timestamp with time zone DEFAULT now() NOT NULL,
- visitor_id_code text NOT NULL,
- code text NOT NULL,
- phone text NOT NULL,
- CONSTRAINT check_9b84e6aaff CHECK ((char_length(code) <= 8)),
- CONSTRAINT check_ccc542256b CHECK ((char_length(visitor_id_code) <= 64)),
- CONSTRAINT check_f5684c195b CHECK ((char_length(phone) <= 50))
-);
-ALTER TABLE ONLY verification_codes ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202307 FOR VALUES FROM ('2023-07-01 00:00:00+00') TO ('2023-08-01 00:00:00+00');
-
-CREATE TABLE gitlab_partitions_dynamic.verification_codes_202308 (
- created_at timestamp with time zone DEFAULT now() NOT NULL,
- visitor_id_code text NOT NULL,
- code text NOT NULL,
- phone text NOT NULL,
- CONSTRAINT check_9b84e6aaff CHECK ((char_length(code) <= 8)),
- CONSTRAINT check_ccc542256b CHECK ((char_length(visitor_id_code) <= 64)),
- CONSTRAINT check_f5684c195b CHECK ((char_length(phone) <= 50))
-);
-ALTER TABLE ONLY verification_codes ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202308 FOR VALUES FROM ('2023-08-01 00:00:00+00') TO ('2023-09-01 00:00:00+00');
-
-CREATE TABLE gitlab_partitions_dynamic.verification_codes_202309 (
- created_at timestamp with time zone DEFAULT now() NOT NULL,
- visitor_id_code text NOT NULL,
- code text NOT NULL,
- phone text NOT NULL,
- CONSTRAINT check_9b84e6aaff CHECK ((char_length(code) <= 8)),
- CONSTRAINT check_ccc542256b CHECK ((char_length(visitor_id_code) <= 64)),
- CONSTRAINT check_f5684c195b CHECK ((char_length(phone) <= 50))
-);
-ALTER TABLE ONLY verification_codes ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202309 FOR VALUES FROM ('2023-09-01 00:00:00+00') TO ('2023-10-01 00:00:00+00');
-
-CREATE TABLE gitlab_partitions_dynamic.verification_codes_202310 (
- created_at timestamp with time zone DEFAULT now() NOT NULL,
- visitor_id_code text NOT NULL,
- code text NOT NULL,
- phone text NOT NULL,
- CONSTRAINT check_9b84e6aaff CHECK ((char_length(code) <= 8)),
- CONSTRAINT check_ccc542256b CHECK ((char_length(visitor_id_code) <= 64)),
- CONSTRAINT check_f5684c195b CHECK ((char_length(phone) <= 50))
-);
-ALTER TABLE ONLY verification_codes ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202310 FOR VALUES FROM ('2023-10-01 00:00:00+00') TO ('2023-11-01 00:00:00+00');
-
-CREATE TABLE gitlab_partitions_dynamic.verification_codes_202311 (
- created_at timestamp with time zone DEFAULT now() NOT NULL,
- visitor_id_code text NOT NULL,
- code text NOT NULL,
- phone text NOT NULL,
- CONSTRAINT check_9b84e6aaff CHECK ((char_length(code) <= 8)),
- CONSTRAINT check_ccc542256b CHECK ((char_length(visitor_id_code) <= 64)),
- CONSTRAINT check_f5684c195b CHECK ((char_length(phone) <= 50))
-);
-ALTER TABLE ONLY verification_codes ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202311 FOR VALUES FROM ('2023-11-01 00:00:00+00') TO ('2023-12-01 00:00:00+00');
-
CREATE TABLE web_hook_logs (
id bigint NOT NULL,
web_hook_id integer NOT NULL,
@@ -883,152 +453,6 @@ CREATE TABLE web_hook_logs (
)
PARTITION BY RANGE (created_at);
-CREATE SEQUENCE web_hook_logs_id_seq
- AS integer
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
-
-ALTER SEQUENCE web_hook_logs_id_seq OWNED BY web_hook_logs.id;
-
-CREATE TABLE gitlab_partitions_dynamic.web_hook_logs_000000 (
- id bigint DEFAULT nextval('web_hook_logs_id_seq'::regclass) NOT NULL,
- web_hook_id integer NOT NULL,
- trigger character varying,
- url character varying,
- request_headers text,
- request_data text,
- response_headers text,
- response_body text,
- response_status character varying,
- execution_duration double precision,
- internal_error_message character varying,
- updated_at timestamp without time zone NOT NULL,
- created_at timestamp without time zone NOT NULL
-);
-ALTER TABLE ONLY web_hook_logs ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_000000 FOR VALUES FROM (MINVALUE) TO ('2023-05-01 00:00:00');
-
-CREATE TABLE gitlab_partitions_dynamic.web_hook_logs_202305 (
- id bigint DEFAULT nextval('web_hook_logs_id_seq'::regclass) NOT NULL,
- web_hook_id integer NOT NULL,
- trigger character varying,
- url character varying,
- request_headers text,
- request_data text,
- response_headers text,
- response_body text,
- response_status character varying,
- execution_duration double precision,
- internal_error_message character varying,
- updated_at timestamp without time zone NOT NULL,
- created_at timestamp without time zone NOT NULL
-);
-ALTER TABLE ONLY web_hook_logs ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202305 FOR VALUES FROM ('2023-05-01 00:00:00') TO ('2023-06-01 00:00:00');
-
-CREATE TABLE gitlab_partitions_dynamic.web_hook_logs_202306 (
- id bigint DEFAULT nextval('web_hook_logs_id_seq'::regclass) NOT NULL,
- web_hook_id integer NOT NULL,
- trigger character varying,
- url character varying,
- request_headers text,
- request_data text,
- response_headers text,
- response_body text,
- response_status character varying,
- execution_duration double precision,
- internal_error_message character varying,
- updated_at timestamp without time zone NOT NULL,
- created_at timestamp without time zone NOT NULL
-);
-ALTER TABLE ONLY web_hook_logs ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202306 FOR VALUES FROM ('2023-06-01 00:00:00') TO ('2023-07-01 00:00:00');
-
-CREATE TABLE gitlab_partitions_dynamic.web_hook_logs_202307 (
- id bigint DEFAULT nextval('web_hook_logs_id_seq'::regclass) NOT NULL,
- web_hook_id integer NOT NULL,
- trigger character varying,
- url character varying,
- request_headers text,
- request_data text,
- response_headers text,
- response_body text,
- response_status character varying,
- execution_duration double precision,
- internal_error_message character varying,
- updated_at timestamp without time zone NOT NULL,
- created_at timestamp without time zone NOT NULL
-);
-ALTER TABLE ONLY web_hook_logs ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202307 FOR VALUES FROM ('2023-07-01 00:00:00') TO ('2023-08-01 00:00:00');
-
-CREATE TABLE gitlab_partitions_dynamic.web_hook_logs_202308 (
- id bigint DEFAULT nextval('web_hook_logs_id_seq'::regclass) NOT NULL,
- web_hook_id integer NOT NULL,
- trigger character varying,
- url character varying,
- request_headers text,
- request_data text,
- response_headers text,
- response_body text,
- response_status character varying,
- execution_duration double precision,
- internal_error_message character varying,
- updated_at timestamp without time zone NOT NULL,
- created_at timestamp without time zone NOT NULL
-);
-ALTER TABLE ONLY web_hook_logs ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202308 FOR VALUES FROM ('2023-08-01 00:00:00') TO ('2023-09-01 00:00:00');
-
-CREATE TABLE gitlab_partitions_dynamic.web_hook_logs_202309 (
- id bigint DEFAULT nextval('web_hook_logs_id_seq'::regclass) NOT NULL,
- web_hook_id integer NOT NULL,
- trigger character varying,
- url character varying,
- request_headers text,
- request_data text,
- response_headers text,
- response_body text,
- response_status character varying,
- execution_duration double precision,
- internal_error_message character varying,
- updated_at timestamp without time zone NOT NULL,
- created_at timestamp without time zone NOT NULL
-);
-ALTER TABLE ONLY web_hook_logs ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202309 FOR VALUES FROM ('2023-09-01 00:00:00') TO ('2023-10-01 00:00:00');
-
-CREATE TABLE gitlab_partitions_dynamic.web_hook_logs_202310 (
- id bigint DEFAULT nextval('web_hook_logs_id_seq'::regclass) NOT NULL,
- web_hook_id integer NOT NULL,
- trigger character varying,
- url character varying,
- request_headers text,
- request_data text,
- response_headers text,
- response_body text,
- response_status character varying,
- execution_duration double precision,
- internal_error_message character varying,
- updated_at timestamp without time zone NOT NULL,
- created_at timestamp without time zone NOT NULL
-);
-ALTER TABLE ONLY web_hook_logs ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202310 FOR VALUES FROM ('2023-10-01 00:00:00') TO ('2023-11-01 00:00:00');
-
-CREATE TABLE gitlab_partitions_dynamic.web_hook_logs_202311 (
- id bigint DEFAULT nextval('web_hook_logs_id_seq'::regclass) NOT NULL,
- web_hook_id integer NOT NULL,
- trigger character varying,
- url character varying,
- request_headers text,
- request_data text,
- response_headers text,
- response_body text,
- response_status character varying,
- execution_duration double precision,
- internal_error_message character varying,
- updated_at timestamp without time zone NOT NULL,
- created_at timestamp without time zone NOT NULL
-);
-ALTER TABLE ONLY web_hook_logs ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202311 FOR VALUES FROM ('2023-11-01 00:00:00') TO ('2023-12-01 00:00:00');
-
CREATE TABLE analytics_cycle_analytics_issue_stage_events (
stage_event_hash_id bigint NOT NULL,
issue_id bigint NOT NULL,
@@ -11138,7 +10562,6 @@ CREATE TABLE abuse_reports (
);
CREATE SEQUENCE abuse_reports_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -11364,6 +10787,14 @@ CREATE TABLE analytics_cycle_analytics_aggregations (
last_full_issues_updated_at timestamp with time zone,
last_full_issues_id integer,
last_full_merge_requests_id integer,
+ last_consistency_check_issues_stage_event_hash_id bigint,
+ last_consistency_check_issues_start_event_timestamp timestamp with time zone,
+ last_consistency_check_issues_end_event_timestamp timestamp with time zone,
+ last_consistency_check_issues_issuable_id bigint,
+ last_consistency_check_merge_requests_stage_event_hash_id bigint,
+ last_consistency_check_merge_requests_start_event_timestamp timestamp with time zone,
+ 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)),
@@ -11503,7 +10934,6 @@ CREATE TABLE analytics_devops_adoption_snapshots (
runner_configured boolean NOT NULL,
pipeline_succeeded boolean NOT NULL,
deploy_succeeded boolean NOT NULL,
- security_scan_succeeded boolean,
end_time timestamp with time zone NOT NULL,
total_projects_count integer,
code_owners_used_count integer,
@@ -11555,13 +10985,13 @@ CREATE TABLE appearances (
id integer NOT NULL,
title character varying NOT NULL,
description text NOT NULL,
- header_logo character varying,
logo character varying,
+ updated_by integer,
+ header_logo character varying,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
description_html text,
cached_markdown_version integer,
- favicon character varying,
new_project_guidelines text,
new_project_guidelines_html text,
header_message text,
@@ -11570,15 +11000,14 @@ CREATE TABLE appearances (
footer_message_html text,
message_background_color text,
message_font_color text,
+ favicon character varying,
email_header_and_footer_enabled boolean DEFAULT false NOT NULL,
- updated_by integer,
profile_image_guidelines text,
profile_image_guidelines_html text,
CONSTRAINT appearances_profile_image_guidelines CHECK ((char_length(profile_image_guidelines) <= 4096))
);
CREATE SEQUENCE appearances_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -11595,7 +11024,6 @@ CREATE TABLE application_setting_terms (
);
CREATE SEQUENCE application_setting_terms_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -11614,6 +11042,7 @@ CREATE TABLE application_settings (
updated_at timestamp without time zone,
home_page_url character varying,
default_branch_protection integer DEFAULT 2,
+ help_text text,
restricted_visibility_levels text,
version_check_enabled boolean DEFAULT true,
max_attachment_size integer DEFAULT 10 NOT NULL,
@@ -11650,6 +11079,8 @@ CREATE TABLE application_settings (
container_registry_token_expire_delay integer DEFAULT 5,
after_sign_up_text text,
user_default_external boolean DEFAULT false NOT NULL,
+ elasticsearch_indexing boolean DEFAULT false NOT NULL,
+ elasticsearch_search boolean DEFAULT false NOT NULL,
repository_storages character varying DEFAULT 'default'::character varying,
enabled_git_access_protocol character varying,
usage_ping_enabled boolean DEFAULT true NOT NULL,
@@ -11669,19 +11100,33 @@ CREATE TABLE application_settings (
html_emails_enabled boolean DEFAULT true,
plantuml_url character varying,
plantuml_enabled boolean,
+ shared_runners_minutes integer DEFAULT 0 NOT NULL,
+ repository_size_limit bigint DEFAULT 0,
terminal_max_session_time integer DEFAULT 0 NOT NULL,
unique_ips_limit_per_user integer,
unique_ips_limit_time_window integer,
unique_ips_limit_enabled boolean DEFAULT false NOT NULL,
default_artifacts_expire_in character varying DEFAULT '0'::character varying NOT NULL,
+ elasticsearch_url character varying DEFAULT 'http://localhost:9200'::character varying,
+ elasticsearch_aws boolean DEFAULT false NOT NULL,
+ elasticsearch_aws_region character varying DEFAULT 'us-east-1'::character varying,
+ elasticsearch_aws_access_key character varying,
+ geo_status_timeout integer DEFAULT 10,
uuid character varying,
polling_interval_multiplier numeric DEFAULT 1.0 NOT NULL,
cached_markdown_version integer,
+ check_namespace_plan boolean DEFAULT false NOT NULL,
+ mirror_max_delay integer DEFAULT 300 NOT NULL,
+ mirror_max_capacity integer DEFAULT 100 NOT NULL,
+ mirror_capacity_threshold integer DEFAULT 50 NOT NULL,
prometheus_metrics_enabled boolean DEFAULT true NOT NULL,
authorized_keys_enabled boolean DEFAULT true NOT NULL,
help_page_hide_commercial_content boolean DEFAULT false,
help_page_support_url character varying,
+ slack_app_enabled boolean DEFAULT false,
+ slack_app_id character varying,
performance_bar_allowed_group_id integer,
+ allow_group_owners_to_manage_ldap boolean DEFAULT true NOT NULL,
hashed_storage_enabled boolean DEFAULT true NOT NULL,
project_export_enabled boolean DEFAULT true NOT NULL,
auto_devops_enabled boolean DEFAULT true NOT NULL,
@@ -11697,13 +11142,13 @@ CREATE TABLE application_settings (
gitaly_timeout_default integer DEFAULT 55 NOT NULL,
gitaly_timeout_medium integer DEFAULT 30 NOT NULL,
gitaly_timeout_fast integer DEFAULT 10 NOT NULL,
+ mirror_available boolean DEFAULT true NOT NULL,
password_authentication_enabled_for_web boolean,
password_authentication_enabled_for_git boolean DEFAULT true NOT NULL,
+ auto_devops_domain character varying,
external_authorization_service_enabled boolean DEFAULT false NOT NULL,
external_authorization_service_url character varying,
external_authorization_service_default_label character varying,
- default_project_creation integer DEFAULT 2 NOT NULL,
- auto_devops_domain character varying,
pages_domain_verification_enabled boolean DEFAULT true NOT NULL,
user_default_internal_regex character varying,
external_authorization_service_timeout double precision DEFAULT 0.5,
@@ -11712,51 +11157,30 @@ CREATE TABLE application_settings (
encrypted_external_auth_client_key_iv character varying,
encrypted_external_auth_client_key_pass character varying,
encrypted_external_auth_client_key_pass_iv character varying,
+ email_additional_text character varying,
enforce_terms boolean DEFAULT false,
- mirror_available boolean DEFAULT true NOT NULL,
+ file_template_project_id integer,
+ pseudonymizer_enabled boolean DEFAULT false NOT NULL,
hide_third_party_offers boolean DEFAULT false NOT NULL,
- receive_max_input_size integer,
+ snowplow_enabled boolean DEFAULT false NOT NULL,
+ snowplow_collector_hostname character varying,
+ snowplow_cookie_domain character varying,
web_ide_clientside_preview_enabled boolean DEFAULT false NOT NULL,
user_show_add_ssh_key_message boolean DEFAULT true NOT NULL,
- outbound_local_requests_whitelist character varying(255)[] DEFAULT '{}'::character varying[] NOT NULL,
+ custom_project_templates_group_id integer,
usage_stats_set_by_user_id integer,
+ receive_max_input_size integer,
diff_max_patch_bytes integer DEFAULT 204800 NOT NULL,
archive_builds_in_seconds integer,
commit_email_hostname character varying,
- first_day_of_week integer DEFAULT 0 NOT NULL,
protected_ci_variables boolean DEFAULT true NOT NULL,
runners_registration_token_encrypted character varying,
local_markdown_version integer DEFAULT 0 NOT NULL,
- asset_proxy_enabled boolean DEFAULT false NOT NULL,
- asset_proxy_url character varying,
- encrypted_asset_proxy_secret_key text,
- encrypted_asset_proxy_secret_key_iv character varying,
+ first_day_of_week integer DEFAULT 0 NOT NULL,
+ elasticsearch_limit_indexing boolean DEFAULT false NOT NULL,
+ default_project_creation integer DEFAULT 2 NOT NULL,
lets_encrypt_notification_email character varying,
lets_encrypt_terms_of_service_accepted boolean DEFAULT false NOT NULL,
- help_text text,
- elasticsearch_indexing boolean DEFAULT false NOT NULL,
- elasticsearch_search boolean DEFAULT false NOT NULL,
- shared_runners_minutes integer DEFAULT 0 NOT NULL,
- repository_size_limit bigint DEFAULT 0,
- elasticsearch_url character varying DEFAULT 'http://localhost:9200'::character varying,
- elasticsearch_aws boolean DEFAULT false NOT NULL,
- elasticsearch_aws_region character varying DEFAULT 'us-east-1'::character varying,
- elasticsearch_aws_access_key character varying,
- geo_status_timeout integer DEFAULT 10,
- check_namespace_plan boolean DEFAULT false NOT NULL,
- mirror_max_delay integer DEFAULT 300 NOT NULL,
- mirror_max_capacity integer DEFAULT 100 NOT NULL,
- mirror_capacity_threshold integer DEFAULT 50 NOT NULL,
- slack_app_enabled boolean DEFAULT false,
- slack_app_id character varying,
- allow_group_owners_to_manage_ldap boolean DEFAULT true NOT NULL,
- email_additional_text character varying,
- file_template_project_id integer,
- pseudonymizer_enabled boolean DEFAULT false NOT NULL,
- snowplow_enabled boolean DEFAULT false NOT NULL,
- snowplow_cookie_domain character varying,
- custom_project_templates_group_id integer,
- elasticsearch_limit_indexing boolean DEFAULT false NOT NULL,
geo_node_allowed_ips character varying DEFAULT '0.0.0.0/0, ::/0'::character varying,
elasticsearch_shards integer DEFAULT 5 NOT NULL,
elasticsearch_replicas integer DEFAULT 1 NOT NULL,
@@ -11764,44 +11188,49 @@ CREATE TABLE application_settings (
encrypted_lets_encrypt_private_key_iv text,
required_instance_ci_template character varying,
dns_rebinding_protection_enabled boolean DEFAULT true NOT NULL,
- lock_memberships_to_ldap boolean DEFAULT false NOT NULL,
default_project_deletion_protection boolean DEFAULT false NOT NULL,
- time_tracking_limit_to_hours boolean DEFAULT false NOT NULL,
grafana_enabled boolean DEFAULT false NOT NULL,
+ lock_memberships_to_ldap boolean DEFAULT false NOT NULL,
+ time_tracking_limit_to_hours boolean DEFAULT false NOT NULL,
grafana_url character varying DEFAULT '/-/grafana'::character varying NOT NULL,
- raw_blob_request_limit integer DEFAULT 300 NOT NULL,
login_recaptcha_protection_enabled boolean DEFAULT false NOT NULL,
+ outbound_local_requests_whitelist character varying(255)[] DEFAULT '{}'::character varying[] NOT NULL,
+ raw_blob_request_limit integer DEFAULT 300 NOT NULL,
+ allow_local_requests_from_web_hooks_and_services boolean DEFAULT false NOT NULL,
+ allow_local_requests_from_system_hooks boolean DEFAULT true NOT NULL,
+ instance_administration_project_id bigint,
+ asset_proxy_enabled boolean DEFAULT false NOT NULL,
+ asset_proxy_url character varying,
+ encrypted_asset_proxy_secret_key text,
+ encrypted_asset_proxy_secret_key_iv character varying,
static_objects_external_storage_url character varying(255),
static_objects_external_storage_auth_token character varying(255),
- instance_administration_project_id bigint,
- allow_local_requests_from_web_hooks_and_services boolean DEFAULT false,
- allow_local_requests_from_system_hooks boolean DEFAULT true NOT NULL,
+ max_personal_access_token_lifetime integer,
throttle_protected_paths_enabled boolean DEFAULT false NOT NULL,
throttle_protected_paths_requests_per_period integer DEFAULT 10 NOT NULL,
throttle_protected_paths_period_in_seconds integer DEFAULT 60 NOT NULL,
protected_paths character varying(255)[] DEFAULT '{/users/password,/users/sign_in,/api/v3/session.json,/api/v3/session,/api/v4/session.json,/api/v4/session,/users,/users/confirmation,/unsubscribes/,/import/github/personal_access_token,/admin/session}'::character varying[],
- snowplow_collector_hostname character varying,
- sourcegraph_enabled boolean DEFAULT false NOT NULL,
- sourcegraph_url character varying(255),
- max_personal_access_token_lifetime integer,
throttle_incident_management_notification_enabled boolean DEFAULT false NOT NULL,
throttle_incident_management_notification_period_in_seconds integer DEFAULT 3600,
throttle_incident_management_notification_per_period integer DEFAULT 3600,
push_event_hooks_limit integer DEFAULT 3 NOT NULL,
- productivity_analytics_start_date timestamp with time zone,
push_event_activities_limit integer DEFAULT 3 NOT NULL,
custom_http_clone_url_root character varying(511),
deletion_adjourned_period integer DEFAULT 7 NOT NULL,
- snowplow_app_id character varying,
+ license_trial_ends_on date,
eks_integration_enabled boolean DEFAULT false NOT NULL,
eks_account_id character varying(128),
eks_access_key_id character varying(128),
encrypted_eks_secret_access_key_iv character varying(255),
encrypted_eks_secret_access_key text,
- license_trial_ends_on date,
- sourcegraph_public_only boolean DEFAULT true NOT NULL,
+ snowplow_app_id character varying,
+ productivity_analytics_start_date timestamp with time zone,
default_ci_config_path character varying(255),
+ sourcegraph_enabled boolean DEFAULT false NOT NULL,
+ sourcegraph_url character varying(255),
+ sourcegraph_public_only boolean DEFAULT true NOT NULL,
snippet_size_limit bigint DEFAULT 52428800 NOT NULL,
+ minimum_password_length integer DEFAULT 8 NOT NULL,
encrypted_akismet_api_key text,
encrypted_akismet_api_key_iv character varying(255),
encrypted_elasticsearch_aws_secret_access_key text,
@@ -11814,22 +11243,21 @@ CREATE TABLE application_settings (
encrypted_slack_app_secret_iv character varying(255),
encrypted_slack_app_verification_token text,
encrypted_slack_app_verification_token_iv character varying(255),
- minimum_password_length integer DEFAULT 8 NOT NULL,
- updating_name_disabled_for_users boolean DEFAULT false NOT NULL,
force_pages_access_control boolean DEFAULT false NOT NULL,
+ updating_name_disabled_for_users boolean DEFAULT false NOT NULL,
instance_administrators_group_id integer,
- disable_overriding_approvers_per_merge_request boolean DEFAULT false NOT NULL,
- prevent_merge_requests_author_approval boolean DEFAULT false NOT NULL,
- prevent_merge_requests_committers_approval boolean DEFAULT false NOT NULL,
elasticsearch_indexed_field_length_limit integer DEFAULT 0 NOT NULL,
elasticsearch_max_bulk_size_mb smallint DEFAULT 10 NOT NULL,
elasticsearch_max_bulk_concurrency smallint DEFAULT 10 NOT NULL,
+ disable_overriding_approvers_per_merge_request boolean DEFAULT false NOT NULL,
+ prevent_merge_requests_author_approval boolean DEFAULT false NOT NULL,
+ prevent_merge_requests_committers_approval boolean DEFAULT false NOT NULL,
email_restrictions_enabled boolean DEFAULT false NOT NULL,
email_restrictions text,
npm_package_requests_forwarding boolean DEFAULT true NOT NULL,
- push_rule_id bigint,
- issues_create_limit integer DEFAULT 0 NOT NULL,
container_expiration_policies_enable_historic_entries boolean DEFAULT false NOT NULL,
+ issues_create_limit integer DEFAULT 0 NOT NULL,
+ push_rule_id bigint,
group_owners_can_manage_default_branch_protection boolean DEFAULT true NOT NULL,
container_registry_vendor text DEFAULT ''::text NOT NULL,
container_registry_version text DEFAULT ''::text NOT NULL,
@@ -11839,39 +11267,37 @@ CREATE TABLE application_settings (
elasticsearch_pause_indexing boolean DEFAULT false NOT NULL,
repository_storages_weighted jsonb DEFAULT '{}'::jsonb NOT NULL,
max_import_size integer DEFAULT 0 NOT NULL,
- enforce_pat_expiration boolean DEFAULT true NOT NULL,
compliance_frameworks smallint[] DEFAULT '{}'::smallint[] NOT NULL,
notify_on_unknown_sign_in boolean DEFAULT true NOT NULL,
default_branch_name text,
- maintenance_mode boolean DEFAULT false NOT NULL,
- maintenance_mode_message text,
project_import_limit integer DEFAULT 6 NOT NULL,
project_export_limit integer DEFAULT 6 NOT NULL,
project_download_export_limit integer DEFAULT 1 NOT NULL,
group_import_limit integer DEFAULT 6 NOT NULL,
group_export_limit integer DEFAULT 6 NOT NULL,
group_download_export_limit integer DEFAULT 1 NOT NULL,
- container_registry_delete_tags_service_timeout integer DEFAULT 250 NOT NULL,
+ maintenance_mode boolean DEFAULT false NOT NULL,
+ maintenance_mode_message text,
wiki_page_max_content_bytes bigint DEFAULT 52428800 NOT NULL,
elasticsearch_indexed_file_size_limit_kb integer DEFAULT 1024 NOT NULL,
enforce_namespace_storage_limit boolean DEFAULT false NOT NULL,
+ container_registry_delete_tags_service_timeout integer DEFAULT 250 NOT NULL,
+ kroki_url character varying,
+ kroki_enabled boolean,
+ elasticsearch_client_request_timeout integer DEFAULT 0 NOT NULL,
gitpod_enabled boolean DEFAULT false NOT NULL,
gitpod_url text DEFAULT 'https://gitpod.io/'::text,
- elasticsearch_client_request_timeout integer DEFAULT 0 NOT NULL,
abuse_notification_email character varying,
- kroki_url text,
- kroki_enabled boolean DEFAULT false NOT NULL,
- help_page_documentation_base_url text,
- container_registry_expiration_policies_worker_capacity integer DEFAULT 4 NOT NULL,
require_admin_approval_after_user_signup boolean DEFAULT true NOT NULL,
+ help_page_documentation_base_url text,
automatic_purchased_storage_allocation boolean DEFAULT false NOT NULL,
encrypted_ci_jwt_signing_key text,
encrypted_ci_jwt_signing_key_iv text,
+ container_registry_expiration_policies_worker_capacity integer DEFAULT 4 NOT NULL,
elasticsearch_analyzers_smartcn_enabled boolean DEFAULT false NOT NULL,
elasticsearch_analyzers_smartcn_search boolean DEFAULT false NOT NULL,
elasticsearch_analyzers_kuromoji_enabled boolean DEFAULT false NOT NULL,
elasticsearch_analyzers_kuromoji_search boolean DEFAULT false NOT NULL,
- new_user_signups_cap integer,
secret_detection_token_revocation_enabled boolean DEFAULT false NOT NULL,
secret_detection_token_revocation_url text,
encrypted_secret_detection_token_revocation_token text,
@@ -11879,46 +11305,46 @@ CREATE TABLE application_settings (
domain_denylist_enabled boolean DEFAULT false,
domain_denylist text,
domain_allowlist text,
- secret_detection_revocation_token_types_url text,
+ new_user_signups_cap integer,
encrypted_cloud_license_auth_token text,
encrypted_cloud_license_auth_token_iv text,
- personal_access_token_prefix text DEFAULT 'glpat-'::text,
- kroki_formats jsonb DEFAULT '{}'::jsonb NOT NULL,
+ secret_detection_revocation_token_types_url text,
disable_feed_token boolean DEFAULT false NOT NULL,
- container_registry_cleanup_tags_service_max_list_size integer DEFAULT 200 NOT NULL,
- invisible_captcha_enabled boolean DEFAULT false NOT NULL,
+ personal_access_token_prefix text DEFAULT 'glpat-'::text,
rate_limiting_response_text text,
- keep_latest_artifact boolean DEFAULT true NOT NULL,
- enforce_ssh_key_expiration boolean DEFAULT true NOT NULL,
+ invisible_captcha_enabled boolean DEFAULT false NOT NULL,
+ container_registry_cleanup_tags_service_max_list_size integer DEFAULT 200 NOT NULL,
git_two_factor_session_expiry integer DEFAULT 15 NOT NULL,
+ keep_latest_artifact boolean DEFAULT true NOT NULL,
notes_create_limit integer DEFAULT 300 NOT NULL,
notes_create_limit_allowlist text[] DEFAULT '{}'::text[] NOT NULL,
+ kroki_formats jsonb DEFAULT '{}'::jsonb NOT NULL,
in_product_marketing_emails_enabled boolean DEFAULT true NOT NULL,
asset_proxy_whitelist text,
+ admin_mode boolean DEFAULT false NOT NULL,
delayed_project_removal boolean DEFAULT false NOT NULL,
lock_delayed_project_removal boolean DEFAULT false NOT NULL,
- admin_mode boolean DEFAULT false NOT NULL,
+ external_pipeline_validation_service_timeout integer,
+ encrypted_external_pipeline_validation_service_token text,
+ encrypted_external_pipeline_validation_service_token_iv text,
+ external_pipeline_validation_service_url text,
throttle_unauthenticated_packages_api_requests_per_period integer DEFAULT 800 NOT NULL,
throttle_unauthenticated_packages_api_period_in_seconds integer DEFAULT 15 NOT NULL,
throttle_authenticated_packages_api_requests_per_period integer DEFAULT 1000 NOT NULL,
throttle_authenticated_packages_api_period_in_seconds integer DEFAULT 15 NOT NULL,
throttle_unauthenticated_packages_api_enabled boolean DEFAULT false NOT NULL,
throttle_authenticated_packages_api_enabled boolean DEFAULT false NOT NULL,
- valid_runner_registrars character varying[] DEFAULT '{project,group}'::character varying[],
- whats_new_variant smallint DEFAULT 0,
- external_pipeline_validation_service_timeout integer,
- encrypted_external_pipeline_validation_service_token text,
- encrypted_external_pipeline_validation_service_token_iv text,
- external_pipeline_validation_service_url text,
deactivate_dormant_users boolean DEFAULT false NOT NULL,
+ whats_new_variant smallint DEFAULT 0,
encrypted_spam_check_api_key bytea,
encrypted_spam_check_api_key_iv bytea,
+ floc_enabled boolean DEFAULT false NOT NULL,
elasticsearch_username text,
encrypted_elasticsearch_password bytea,
encrypted_elasticsearch_password_iv bytea,
- floc_enabled boolean DEFAULT false NOT NULL,
diff_max_lines integer DEFAULT 50000 NOT NULL,
diff_max_files integer DEFAULT 1000 NOT NULL,
+ valid_runner_registrars character varying[] DEFAULT '{project,group}'::character varying[],
encrypted_mailgun_signing_key bytea,
encrypted_mailgun_signing_key_iv bytea,
mailgun_events_enabled boolean DEFAULT false NOT NULL,
@@ -11926,33 +11352,33 @@ CREATE TABLE application_settings (
encrypted_customers_dot_jwt_signing_key bytea,
encrypted_customers_dot_jwt_signing_key_iv bytea,
pypi_package_requests_forwarding boolean DEFAULT true NOT NULL,
- max_yaml_size_bytes bigint DEFAULT 1048576 NOT NULL,
- max_yaml_depth integer DEFAULT 100 NOT NULL,
throttle_unauthenticated_files_api_requests_per_period integer DEFAULT 125 NOT NULL,
throttle_unauthenticated_files_api_period_in_seconds integer DEFAULT 15 NOT NULL,
throttle_authenticated_files_api_requests_per_period integer DEFAULT 500 NOT NULL,
throttle_authenticated_files_api_period_in_seconds integer DEFAULT 15 NOT NULL,
throttle_unauthenticated_files_api_enabled boolean DEFAULT false NOT NULL,
throttle_authenticated_files_api_enabled boolean DEFAULT false NOT NULL,
+ max_yaml_size_bytes bigint DEFAULT 1048576 NOT NULL,
+ max_yaml_depth integer DEFAULT 100 NOT NULL,
+ throttle_authenticated_git_lfs_requests_per_period integer DEFAULT 1000 NOT NULL,
+ throttle_authenticated_git_lfs_period_in_seconds integer DEFAULT 60 NOT NULL,
+ throttle_authenticated_git_lfs_enabled boolean DEFAULT false NOT NULL,
user_deactivation_emails_enabled boolean DEFAULT true NOT NULL,
throttle_unauthenticated_api_enabled boolean DEFAULT false NOT NULL,
throttle_unauthenticated_api_requests_per_period integer DEFAULT 3600 NOT NULL,
throttle_unauthenticated_api_period_in_seconds integer DEFAULT 3600 NOT NULL,
- throttle_authenticated_git_lfs_requests_per_period integer DEFAULT 1000 NOT NULL,
- throttle_authenticated_git_lfs_period_in_seconds integer DEFAULT 60 NOT NULL,
- throttle_authenticated_git_lfs_enabled boolean DEFAULT false NOT NULL,
jobs_per_stage_page_size integer DEFAULT 200 NOT NULL,
sidekiq_job_limiter_mode smallint DEFAULT 1 NOT NULL,
sidekiq_job_limiter_compression_threshold_bytes integer DEFAULT 100000 NOT NULL,
sidekiq_job_limiter_limit_bytes integer DEFAULT 0 NOT NULL,
- dependency_proxy_ttl_group_policy_worker_capacity smallint DEFAULT 2 NOT NULL,
+ suggest_pipeline_enabled boolean DEFAULT true NOT NULL,
throttle_unauthenticated_deprecated_api_requests_per_period integer DEFAULT 1800 NOT NULL,
throttle_unauthenticated_deprecated_api_period_in_seconds integer DEFAULT 3600 NOT NULL,
throttle_unauthenticated_deprecated_api_enabled boolean DEFAULT false NOT NULL,
throttle_authenticated_deprecated_api_requests_per_period integer DEFAULT 3600 NOT NULL,
throttle_authenticated_deprecated_api_period_in_seconds integer DEFAULT 3600 NOT NULL,
throttle_authenticated_deprecated_api_enabled boolean DEFAULT false NOT NULL,
- suggest_pipeline_enabled boolean DEFAULT true NOT NULL,
+ dependency_proxy_ttl_group_policy_worker_capacity smallint DEFAULT 2 NOT NULL,
content_validation_endpoint_url text,
encrypted_content_validation_api_key bytea,
encrypted_content_validation_api_key_iv bytea,
@@ -11986,6 +11412,10 @@ CREATE TABLE application_settings (
database_grafana_api_url text,
database_grafana_tag text,
public_runner_releases_url text DEFAULT 'https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-runner/releases'::text NOT NULL,
+ password_uppercase_required boolean DEFAULT false NOT NULL,
+ password_lowercase_required boolean DEFAULT false NOT NULL,
+ password_number_required boolean DEFAULT false NOT NULL,
+ password_symbol_required boolean DEFAULT false NOT NULL,
encrypted_arkose_labs_public_api_key bytea,
encrypted_arkose_labs_public_api_key_iv bytea,
encrypted_arkose_labs_private_api_key bytea,
@@ -11995,35 +11425,75 @@ CREATE TABLE application_settings (
inactive_projects_delete_after_months integer DEFAULT 2 NOT NULL,
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,
+ arkose_labs_namespace text DEFAULT 'client'::text NOT NULL,
+ max_export_size integer DEFAULT 0,
+ encrypted_slack_app_signing_secret bytea,
+ encrypted_slack_app_signing_secret_iv bytea,
+ container_registry_pre_import_timeout integer DEFAULT 1800 NOT NULL,
+ container_registry_import_timeout integer DEFAULT 600 NOT NULL,
+ pipeline_limit_per_project_user_sha integer DEFAULT 0 NOT NULL,
+ dingtalk_integration_enabled boolean DEFAULT false NOT NULL,
+ encrypted_dingtalk_corpid bytea,
+ encrypted_dingtalk_corpid_iv bytea,
+ encrypted_dingtalk_app_key bytea,
+ encrypted_dingtalk_app_key_iv bytea,
+ encrypted_dingtalk_app_secret bytea,
+ encrypted_dingtalk_app_secret_iv bytea,
+ jira_connect_application_key text,
+ globally_allowed_ips text DEFAULT ''::text NOT NULL,
+ container_registry_pre_import_tags_rate numeric(6,2) DEFAULT 0.5 NOT NULL,
+ license_usage_data_exported boolean DEFAULT false NOT NULL,
+ phone_verification_code_enabled boolean DEFAULT false NOT NULL,
+ max_number_of_repository_downloads smallint DEFAULT 0 NOT NULL,
+ max_number_of_repository_downloads_within_time_period integer DEFAULT 0 NOT NULL,
+ feishu_integration_enabled boolean DEFAULT false NOT NULL,
+ encrypted_feishu_app_key bytea,
+ encrypted_feishu_app_key_iv bytea,
+ encrypted_feishu_app_secret bytea,
+ encrypted_feishu_app_secret_iv bytea,
+ error_tracking_enabled boolean DEFAULT false NOT NULL,
+ error_tracking_api_url text,
+ git_rate_limit_users_allowlist text[] DEFAULT '{}'::text[] NOT NULL,
+ error_tracking_access_token_encrypted text,
+ package_registry_cleanup_policies_worker_capacity integer DEFAULT 2 NOT NULL,
+ deactivate_dormant_users_period integer DEFAULT 90 NOT NULL,
CONSTRAINT app_settings_container_reg_cleanup_tags_max_list_size_positive CHECK ((container_registry_cleanup_tags_service_max_list_size >= 0)),
+ CONSTRAINT app_settings_container_registry_pre_import_tags_rate_positive CHECK ((container_registry_pre_import_tags_rate >= (0)::numeric)),
CONSTRAINT app_settings_dep_proxy_ttl_policies_worker_capacity_positive CHECK ((dependency_proxy_ttl_group_policy_worker_capacity >= 0)),
CONSTRAINT app_settings_ext_pipeline_validation_service_url_text_limit CHECK ((char_length(external_pipeline_validation_service_url) <= 255)),
+ CONSTRAINT app_settings_git_rate_limit_users_allowlist_max_usernames CHECK ((cardinality(git_rate_limit_users_allowlist) <= 100)),
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)),
CONSTRAINT app_settings_yaml_max_depth_positive CHECK ((max_yaml_depth > 0)),
CONSTRAINT app_settings_yaml_max_size_positive CHECK ((max_yaml_size_bytes > 0)),
- CONSTRAINT check_17d9558205 CHECK ((char_length(kroki_url) <= 1024)),
+ CONSTRAINT check_17d9558205 CHECK ((char_length((kroki_url)::text) <= 1024)),
CONSTRAINT check_2b820eaac3 CHECK ((char_length(database_grafana_tag) <= 255)),
CONSTRAINT check_2dba05b802 CHECK ((char_length(gitpod_url) <= 255)),
CONSTRAINT check_32710817e9 CHECK ((char_length(static_objects_external_storage_auth_token_encrypted) <= 255)),
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_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)),
+ CONSTRAINT check_5688c70478 CHECK ((char_length(error_tracking_access_token_encrypted) <= 255)),
CONSTRAINT check_57123c9593 CHECK ((char_length(help_page_documentation_base_url) <= 255)),
CONSTRAINT check_5a84c3ffdc CHECK ((char_length(content_validation_endpoint_url) <= 255)),
CONSTRAINT check_5bcba483c4 CHECK ((char_length(sentry_environment) <= 255)),
CONSTRAINT check_718b4458ae CHECK ((char_length(personal_access_token_prefix) <= 20)),
CONSTRAINT check_7227fad848 CHECK ((char_length(rate_limiting_response_text) <= 255)),
+ CONSTRAINT check_734cc9407a CHECK ((char_length(globally_allowed_ips) <= 255)),
+ 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_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_b4f67a6296 CHECK ((allow_local_requests_from_web_hooks_and_services IS NOT NULL)),
CONSTRAINT check_d03919528d CHECK ((char_length(container_registry_vendor) <= 255)),
CONSTRAINT check_d820146492 CHECK ((char_length(spam_check_endpoint_url) <= 255)),
+ 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_ef6176834f CHECK ((char_length(encrypted_cloud_license_auth_token_iv) <= 255)),
@@ -12038,8 +11508,33 @@ COMMENT ON COLUMN application_settings.encrypted_content_validation_api_key_iv I
COMMENT ON COLUMN application_settings.content_validation_endpoint_enabled IS 'JiHu-specific column';
+COMMENT ON COLUMN application_settings.dingtalk_integration_enabled IS 'JiHu-specific column';
+
+COMMENT ON COLUMN application_settings.encrypted_dingtalk_corpid IS 'JiHu-specific column';
+
+COMMENT ON COLUMN application_settings.encrypted_dingtalk_corpid_iv IS 'JiHu-specific column';
+
+COMMENT ON COLUMN application_settings.encrypted_dingtalk_app_key IS 'JiHu-specific column';
+
+COMMENT ON COLUMN application_settings.encrypted_dingtalk_app_key_iv IS 'JiHu-specific column';
+
+COMMENT ON COLUMN application_settings.encrypted_dingtalk_app_secret IS 'JiHu-specific column';
+
+COMMENT ON COLUMN application_settings.encrypted_dingtalk_app_secret_iv IS 'JiHu-specific column';
+
+COMMENT ON COLUMN application_settings.phone_verification_code_enabled IS 'JiHu-specific column';
+
+COMMENT ON COLUMN application_settings.feishu_integration_enabled IS 'JiHu-specific column';
+
+COMMENT ON COLUMN application_settings.encrypted_feishu_app_key IS 'JiHu-specific column';
+
+COMMENT ON COLUMN application_settings.encrypted_feishu_app_key_iv IS 'JiHu-specific column';
+
+COMMENT ON COLUMN application_settings.encrypted_feishu_app_secret IS 'JiHu-specific column';
+
+COMMENT ON COLUMN application_settings.encrypted_feishu_app_secret_iv IS 'JiHu-specific column';
+
CREATE SEQUENCE application_settings_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -12075,6 +11570,10 @@ CREATE TABLE approval_merge_request_rules (
section text,
modified_from_project_rule boolean DEFAULT false NOT NULL,
orchestration_policy_idx smallint,
+ vulnerabilities_allowed smallint DEFAULT 0 NOT NULL,
+ scanners text[] DEFAULT '{}'::text[] NOT NULL,
+ severity_levels text[] DEFAULT '{}'::text[] NOT NULL,
+ vulnerability_states text[] DEFAULT '{newly_detected}'::text[] NOT NULL,
CONSTRAINT check_6fca5928b2 CHECK ((char_length(section) <= 255))
);
@@ -12145,7 +11644,8 @@ CREATE TABLE approval_project_rules (
severity_levels text[] DEFAULT '{}'::text[] NOT NULL,
report_type smallint,
vulnerability_states text[] DEFAULT '{newly_detected}'::text[] NOT NULL,
- orchestration_policy_idx smallint
+ orchestration_policy_idx smallint,
+ applies_to_all_protected_branches boolean DEFAULT false NOT NULL
);
CREATE TABLE approval_project_rules_groups (
@@ -12201,7 +11701,6 @@ CREATE TABLE approvals (
);
CREATE SEQUENCE approvals_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -12220,7 +11719,6 @@ CREATE TABLE approver_groups (
);
CREATE SEQUENCE approver_groups_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -12239,7 +11737,6 @@ CREATE TABLE approvers (
);
CREATE SEQUENCE approvers_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -12294,6 +11791,35 @@ CREATE SEQUENCE audit_events_external_audit_event_destinations_id_seq
ALTER SEQUENCE audit_events_external_audit_event_destinations_id_seq OWNED BY audit_events_external_audit_event_destinations.id;
+CREATE SEQUENCE audit_events_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE audit_events_id_seq OWNED BY audit_events.id;
+
+CREATE TABLE audit_events_streaming_headers (
+ 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,
+ key text NOT NULL,
+ value text NOT NULL,
+ CONSTRAINT check_53c3152034 CHECK ((char_length(key) <= 255)),
+ CONSTRAINT check_ac213cca22 CHECK ((char_length(value) <= 255))
+);
+
+CREATE SEQUENCE audit_events_streaming_headers_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE audit_events_streaming_headers_id_seq OWNED BY audit_events_streaming_headers.id;
+
CREATE TABLE authentication_events (
id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
@@ -12319,14 +11845,13 @@ CREATE TABLE award_emoji (
id integer NOT NULL,
name character varying,
user_id integer,
- awardable_type character varying,
awardable_id integer,
+ awardable_type character varying,
created_at timestamp without time zone,
updated_at timestamp without time zone
);
CREATE SEQUENCE award_emoji_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -12371,13 +11896,12 @@ CREATE TABLE badges (
project_id integer,
group_id integer,
type character varying NOT NULL,
+ name character varying(255),
created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- name character varying(255)
+ updated_at timestamp with time zone NOT NULL
);
CREATE SEQUENCE badges_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -12392,6 +11916,15 @@ CREATE TABLE banned_users (
user_id bigint NOT NULL
);
+CREATE SEQUENCE batched_background_migration_job_transition_logs_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE batched_background_migration_job_transition_logs_id_seq OWNED BY batched_background_migration_job_transition_logs.id;
+
CREATE TABLE batched_background_migration_jobs (
id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
@@ -12432,12 +11965,14 @@ CREATE TABLE batched_background_migrations (
batch_class_name text DEFAULT 'PrimaryKeyBatchingStrategy'::text NOT NULL,
table_name text NOT NULL,
column_name text NOT NULL,
- job_arguments jsonb DEFAULT '"[]"'::jsonb NOT NULL,
+ job_arguments jsonb DEFAULT '[]'::jsonb NOT NULL,
total_tuple_count bigint,
pause_ms integer DEFAULT 100 NOT NULL,
max_batch_size integer,
started_at timestamp with time zone,
on_hold_until timestamp with time zone,
+ gitlab_schema text NOT NULL,
+ CONSTRAINT check_0406d9776f CHECK ((char_length(gitlab_schema) <= 255)),
CONSTRAINT check_5bb0382d6f CHECK ((char_length(column_name) <= 63)),
CONSTRAINT check_6b6a06254a CHECK ((char_length(table_name) <= 63)),
CONSTRAINT check_batch_size_in_range CHECK ((batch_size >= sub_batch_size)),
@@ -12466,7 +12001,6 @@ CREATE TABLE board_assignees (
);
CREATE SEQUENCE board_assignees_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -12500,7 +12034,6 @@ CREATE TABLE board_labels (
);
CREATE SEQUENCE board_labels_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -12550,10 +12083,10 @@ CREATE TABLE boards (
project_id integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
- group_id integer,
+ name character varying DEFAULT 'Development'::character varying NOT NULL,
milestone_id integer,
+ group_id integer,
weight integer,
- name character varying DEFAULT 'Development'::character varying NOT NULL,
hide_backlog_list boolean DEFAULT false NOT NULL,
hide_closed_list boolean DEFAULT false NOT NULL,
iteration_id bigint,
@@ -12687,7 +12220,6 @@ CREATE SEQUENCE boards_epic_user_preferences_id_seq
ALTER SEQUENCE boards_epic_user_preferences_id_seq OWNED BY boards_epic_user_preferences.id;
CREATE SEQUENCE boards_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -12707,15 +12239,14 @@ CREATE TABLE broadcast_messages (
font character varying,
message_html text NOT NULL,
cached_markdown_version integer,
- dismissable boolean,
target_path character varying(255),
broadcast_type smallint DEFAULT 1 NOT NULL,
+ dismissable boolean,
target_access_levels integer[] DEFAULT '{}'::integer[] NOT NULL,
theme smallint DEFAULT 0 NOT NULL
);
CREATE SEQUENCE broadcast_messages_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -12886,18 +12417,18 @@ ALTER SEQUENCE bulk_imports_id_seq OWNED BY bulk_imports.id;
CREATE TABLE chat_names (
id integer NOT NULL,
user_id integer NOT NULL,
- service_id integer NOT NULL,
team_id character varying NOT NULL,
team_domain character varying,
chat_id character varying NOT NULL,
chat_name character varying,
last_used_at timestamp without time zone,
created_at timestamp without time zone NOT NULL,
- updated_at timestamp without time zone NOT NULL
+ updated_at timestamp without time zone NOT NULL,
+ integration_id integer,
+ CONSTRAINT check_2b0a0d0f0f CHECK ((integration_id IS NOT NULL))
);
CREATE SEQUENCE chat_names_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -12916,7 +12447,6 @@ CREATE TABLE chat_teams (
);
CREATE SEQUENCE chat_teams_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -12934,7 +12464,6 @@ CREATE TABLE ci_build_needs (
);
CREATE SEQUENCE ci_build_needs_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -12969,15 +12498,6 @@ CREATE TABLE ci_build_report_results (
data jsonb DEFAULT '{}'::jsonb NOT NULL
);
-CREATE SEQUENCE ci_build_report_results_build_id_seq
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
-
-ALTER SEQUENCE ci_build_report_results_build_id_seq OWNED BY ci_build_report_results.build_id;
-
CREATE TABLE ci_build_trace_chunks (
id bigint NOT NULL,
chunk_index integer NOT NULL,
@@ -13037,7 +12557,6 @@ CREATE TABLE ci_builds (
"when" character varying,
yaml_variables text,
queued_at timestamp without time zone,
- token character varying,
lock_version integer DEFAULT 0,
coverage_regex character varying,
auto_canceled_by_id integer,
@@ -13047,16 +12566,16 @@ CREATE TABLE ci_builds (
scheduled_at timestamp with time zone,
token_encrypted character varying,
upstream_pipeline_id integer,
- processed boolean,
resource_group_id bigint,
waiting_for_resource_at timestamp with time zone,
+ processed boolean,
scheduling_type smallint,
id bigint NOT NULL,
- stage_id bigint
+ stage_id bigint,
+ CONSTRAINT check_1e2fbd1b39 CHECK ((lock_version IS NOT NULL))
);
CREATE SEQUENCE ci_builds_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -13069,21 +12588,20 @@ 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,
- interruptible boolean,
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 NOT NULL,
- runner_features jsonb DEFAULT '{}'::jsonb NOT NULL,
- runtime_runner_features jsonb DEFAULT '{}'::jsonb NOT NULL
+ runtime_runner_features jsonb DEFAULT '{}'::jsonb NOT NULL,
+ id_tokens jsonb DEFAULT '{}'::jsonb NOT NULL
);
CREATE SEQUENCE ci_builds_metadata_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -13151,14 +12669,11 @@ ALTER SEQUENCE ci_deleted_objects_id_seq OWNED BY ci_deleted_objects.id;
CREATE TABLE ci_freeze_periods (
id bigint NOT NULL,
project_id bigint NOT NULL,
- freeze_start text NOT NULL,
- freeze_end text NOT NULL,
- cron_timezone text NOT NULL,
+ freeze_start character varying(998) NOT NULL,
+ freeze_end character varying(998) NOT NULL,
+ cron_timezone character varying(255) NOT NULL,
created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- CONSTRAINT check_4a7939e04e CHECK ((char_length(freeze_end) <= 998)),
- CONSTRAINT check_a92607bd2b CHECK ((char_length(freeze_start) <= 998)),
- CONSTRAINT check_b14055adc3 CHECK ((char_length(cron_timezone) <= 255))
+ updated_at timestamp with time zone NOT NULL
);
CREATE SEQUENCE ci_freeze_periods_id_seq
@@ -13184,11 +12699,11 @@ 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,
CONSTRAINT check_dfe009485a CHECK ((char_length(environment_scope) <= 255))
);
CREATE SEQUENCE ci_group_variables_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -13205,6 +12720,7 @@ CREATE TABLE ci_instance_variables (
key text NOT NULL,
encrypted_value text,
encrypted_value_iv text,
+ raw boolean DEFAULT true 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))
@@ -13231,15 +12747,6 @@ CREATE TABLE ci_job_artifact_states (
CONSTRAINT check_df832b66ea CHECK ((char_length(verification_failure) <= 255))
);
-CREATE SEQUENCE ci_job_artifact_states_job_artifact_id_seq
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
-
-ALTER SEQUENCE ci_job_artifact_states_job_artifact_id_seq OWNED BY ci_job_artifact_states.job_artifact_id;
-
CREATE TABLE ci_job_artifacts (
project_id integer NOT NULL,
file_type integer NOT NULL,
@@ -13261,7 +12768,6 @@ CREATE TABLE ci_job_artifacts (
);
CREATE SEQUENCE ci_job_artifacts_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -13294,7 +12800,8 @@ CREATE TABLE ci_job_variables (
encrypted_value_iv character varying,
job_id bigint NOT NULL,
variable_type smallint DEFAULT 1 NOT NULL,
- source smallint DEFAULT 0 NOT NULL
+ source smallint DEFAULT 0 NOT NULL,
+ raw boolean DEFAULT true NOT NULL
);
CREATE SEQUENCE ci_job_variables_id_seq
@@ -13345,7 +12852,6 @@ CREATE TABLE ci_namespace_monthly_usages (
id bigint NOT NULL,
namespace_id bigint NOT NULL,
date date NOT NULL,
- additional_amount_available integer DEFAULT 0 NOT NULL,
amount_used numeric(18,2) DEFAULT 0.0 NOT NULL,
notification_level smallint DEFAULT 100 NOT NULL,
shared_runners_duration integer DEFAULT 0 NOT NULL,
@@ -13460,11 +12966,11 @@ CREATE TABLE ci_pipeline_schedule_variables (
pipeline_schedule_id integer NOT NULL,
created_at timestamp with time zone,
updated_at timestamp with time zone,
- variable_type smallint DEFAULT 1 NOT NULL
+ variable_type smallint DEFAULT 1 NOT NULL,
+ raw boolean DEFAULT true NOT NULL
);
CREATE SEQUENCE ci_pipeline_schedule_variables_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -13488,7 +12994,6 @@ CREATE TABLE ci_pipeline_schedules (
);
CREATE SEQUENCE ci_pipeline_schedules_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -13505,11 +13010,11 @@ CREATE TABLE ci_pipeline_variables (
encrypted_value_salt character varying,
encrypted_value_iv character varying,
pipeline_id integer NOT NULL,
- variable_type smallint DEFAULT 1 NOT NULL
+ variable_type smallint DEFAULT 1 NOT NULL,
+ raw boolean DEFAULT true NOT NULL
);
CREATE SEQUENCE ci_pipeline_variables_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -13538,8 +13043,8 @@ CREATE TABLE ci_pipelines (
auto_canceled_by_id integer,
pipeline_schedule_id integer,
source integer,
- protected boolean,
config_source integer,
+ protected boolean,
failure_reason integer,
iid integer,
merge_request_id integer,
@@ -13547,7 +13052,8 @@ CREATE TABLE ci_pipelines (
target_sha bytea,
external_pull_request_id bigint,
ci_ref_id bigint,
- locked smallint DEFAULT 1 NOT NULL
+ locked smallint DEFAULT 1 NOT NULL,
+ CONSTRAINT check_d7e99a025e CHECK ((lock_version IS NOT NULL))
);
CREATE TABLE ci_pipelines_config (
@@ -13555,17 +13061,7 @@ CREATE TABLE ci_pipelines_config (
content text NOT NULL
);
-CREATE SEQUENCE ci_pipelines_config_pipeline_id_seq
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
-
-ALTER SEQUENCE ci_pipelines_config_pipeline_id_seq OWNED BY ci_pipelines_config.pipeline_id;
-
CREATE SEQUENCE ci_pipelines_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -13685,7 +13181,6 @@ CREATE TABLE ci_runner_namespaces (
);
CREATE SEQUENCE ci_runner_namespaces_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -13703,7 +13198,6 @@ CREATE TABLE ci_runner_projects (
);
CREATE SEQUENCE ci_runner_projects_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -13712,6 +13206,12 @@ CREATE SEQUENCE ci_runner_projects_id_seq
ALTER SEQUENCE ci_runner_projects_id_seq OWNED BY ci_runner_projects.id;
+CREATE TABLE ci_runner_versions (
+ version text NOT NULL,
+ status smallint,
+ CONSTRAINT check_b5a3714594 CHECK ((char_length(version) <= 2048))
+);
+
CREATE TABLE ci_runners (
id integer NOT NULL,
token character varying,
@@ -13728,8 +13228,8 @@ CREATE TABLE ci_runners (
run_untagged boolean DEFAULT true NOT NULL,
locked boolean DEFAULT false NOT NULL,
access_level integer DEFAULT 0 NOT NULL,
- maximum_timeout integer,
ip_address character varying,
+ maximum_timeout integer,
runner_type smallint NOT NULL,
token_encrypted character varying,
public_projects_minutes_cost_factor double precision DEFAULT 0.0 NOT NULL,
@@ -13738,11 +13238,11 @@ CREATE TABLE ci_runners (
executor_type smallint,
maintainer_note text,
token_expires_at timestamp with time zone,
+ allowed_plans text[] DEFAULT '{}'::text[] NOT NULL,
CONSTRAINT check_ce275cee06 CHECK ((char_length(maintainer_note) <= 1024))
);
CREATE SEQUENCE ci_runners_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -13769,13 +13269,33 @@ CREATE SEQUENCE ci_running_builds_id_seq
ALTER SEQUENCE ci_running_builds_id_seq OWNED BY ci_running_builds.id;
+CREATE TABLE ci_secure_file_states (
+ verification_started_at timestamp with time zone,
+ verification_retry_at timestamp with time zone,
+ verified_at timestamp with time zone,
+ ci_secure_file_id bigint NOT NULL,
+ verification_state smallint DEFAULT 0 NOT NULL,
+ verification_retry_count smallint,
+ verification_checksum bytea,
+ verification_failure text,
+ CONSTRAINT check_a79e5a9261 CHECK ((char_length(verification_failure) <= 255))
+);
+
+CREATE SEQUENCE ci_secure_file_states_ci_secure_file_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE ci_secure_file_states_ci_secure_file_id_seq OWNED BY ci_secure_file_states.ci_secure_file_id;
+
CREATE TABLE ci_secure_files (
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,
file_store smallint DEFAULT 1 NOT NULL,
- permissions smallint DEFAULT 0 NOT NULL,
name text NOT NULL,
file text NOT NULL,
checksum bytea NOT NULL,
@@ -13804,7 +13324,6 @@ CREATE TABLE ci_sources_pipelines (
);
CREATE SEQUENCE ci_sources_pipelines_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -13837,11 +13356,11 @@ CREATE TABLE ci_stages (
status integer,
lock_version integer DEFAULT 0,
"position" integer,
- id bigint NOT NULL
+ id bigint NOT NULL,
+ CONSTRAINT check_81b431e49b CHECK ((lock_version IS NOT NULL))
);
CREATE SEQUENCE ci_stages_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -13853,7 +13372,8 @@ ALTER SEQUENCE ci_stages_id_seq OWNED BY ci_stages.id;
CREATE TABLE ci_subscriptions_projects (
id bigint NOT NULL,
downstream_project_id bigint NOT NULL,
- upstream_project_id bigint NOT NULL
+ upstream_project_id bigint NOT NULL,
+ author_id bigint
);
CREATE SEQUENCE ci_subscriptions_projects_id_seq
@@ -13875,7 +13395,6 @@ CREATE TABLE ci_trigger_requests (
);
CREATE SEQUENCE ci_trigger_requests_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -13896,7 +13415,6 @@ CREATE TABLE ci_triggers (
);
CREATE SEQUENCE ci_triggers_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -13952,11 +13470,11 @@ CREATE TABLE ci_variables (
protected boolean DEFAULT false NOT NULL,
environment_scope character varying DEFAULT '*'::character varying NOT NULL,
masked boolean DEFAULT false NOT NULL,
- variable_type smallint DEFAULT 1 NOT NULL
+ variable_type smallint DEFAULT 1 NOT NULL,
+ raw boolean DEFAULT true NOT NULL
);
CREATE SEQUENCE ci_variables_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -13998,6 +13516,7 @@ CREATE TABLE cluster_agents (
project_id bigint NOT NULL,
name text NOT NULL,
created_by_user_id bigint,
+ has_vulnerabilities boolean DEFAULT false NOT NULL,
CONSTRAINT check_3498369510 CHECK ((char_length(name) <= 255))
);
@@ -14010,6 +13529,21 @@ CREATE SEQUENCE cluster_agents_id_seq
ALTER SEQUENCE cluster_agents_id_seq OWNED BY cluster_agents.id;
+CREATE TABLE cluster_enabled_grants (
+ id bigint NOT NULL,
+ namespace_id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL
+);
+
+CREATE SEQUENCE cluster_enabled_grants_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE cluster_enabled_grants_id_seq OWNED BY cluster_enabled_grants.id;
+
CREATE TABLE cluster_groups (
id integer NOT NULL,
cluster_id integer NOT NULL,
@@ -14017,7 +13551,6 @@ CREATE TABLE cluster_groups (
);
CREATE SEQUENCE cluster_groups_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -14029,8 +13562,8 @@ ALTER SEQUENCE cluster_groups_id_seq OWNED BY cluster_groups.id;
CREATE TABLE cluster_platforms_kubernetes (
id integer NOT NULL,
cluster_id integer NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
+ created_at timestamp without time zone NOT NULL,
+ updated_at timestamp without time zone NOT NULL,
api_url text,
ca_cert text,
namespace character varying,
@@ -14043,7 +13576,6 @@ CREATE TABLE cluster_platforms_kubernetes (
);
CREATE SEQUENCE cluster_platforms_kubernetes_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -14056,12 +13588,11 @@ CREATE TABLE cluster_projects (
id integer NOT NULL,
project_id integer NOT NULL,
cluster_id integer NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL
+ created_at timestamp without time zone NOT NULL,
+ updated_at timestamp without time zone NOT NULL
);
CREATE SEQUENCE cluster_projects_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -14107,8 +13638,8 @@ CREATE TABLE cluster_providers_gcp (
cluster_id integer NOT NULL,
status integer,
num_nodes integer NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
+ created_at timestamp without time zone NOT NULL,
+ updated_at timestamp without time zone NOT NULL,
status_reason text,
gcp_project_id character varying NOT NULL,
zone character varying NOT NULL,
@@ -14122,7 +13653,6 @@ CREATE TABLE cluster_providers_gcp (
);
CREATE SEQUENCE cluster_providers_gcp_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -14136,8 +13666,8 @@ CREATE TABLE clusters (
user_id integer,
provider_type integer,
platform_type integer,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
+ created_at timestamp without time zone NOT NULL,
+ updated_at timestamp without time zone NOT NULL,
enabled boolean DEFAULT true,
name character varying NOT NULL,
environment_scope character varying DEFAULT '*'::character varying NOT NULL,
@@ -14145,9 +13675,9 @@ CREATE TABLE clusters (
domain character varying,
managed boolean DEFAULT true NOT NULL,
namespace_per_environment boolean DEFAULT true NOT NULL,
+ management_project_id integer,
cleanup_status smallint DEFAULT 1 NOT NULL,
cleanup_status_reason text,
- management_project_id integer,
helm_major_version integer DEFAULT 3 NOT NULL
);
@@ -14163,7 +13693,6 @@ CREATE TABLE clusters_applications_cert_managers (
);
CREATE SEQUENCE clusters_applications_cert_managers_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -14191,7 +13720,7 @@ CREATE SEQUENCE clusters_applications_cilium_id_seq
ALTER SEQUENCE clusters_applications_cilium_id_seq OWNED BY clusters_applications_cilium.id;
CREATE TABLE clusters_applications_crossplane (
- id bigint NOT NULL,
+ id integer NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
cluster_id bigint NOT NULL,
@@ -14210,30 +13739,11 @@ CREATE SEQUENCE clusters_applications_crossplane_id_seq
ALTER SEQUENCE clusters_applications_crossplane_id_seq OWNED BY clusters_applications_crossplane.id;
-CREATE TABLE clusters_applications_elastic_stacks (
- id bigint NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- cluster_id bigint NOT NULL,
- status integer NOT NULL,
- version character varying(255) NOT NULL,
- status_reason text
-);
-
-CREATE SEQUENCE clusters_applications_elastic_stacks_id_seq
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
-
-ALTER SEQUENCE clusters_applications_elastic_stacks_id_seq OWNED BY clusters_applications_elastic_stacks.id;
-
CREATE TABLE clusters_applications_helm (
id integer NOT NULL,
cluster_id integer NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
+ created_at timestamp without time zone NOT NULL,
+ updated_at timestamp without time zone NOT NULL,
status integer NOT NULL,
version character varying NOT NULL,
status_reason text,
@@ -14243,7 +13753,6 @@ CREATE TABLE clusters_applications_helm (
);
CREATE SEQUENCE clusters_applications_helm_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -14255,8 +13764,8 @@ ALTER SEQUENCE clusters_applications_helm_id_seq OWNED BY clusters_applications_
CREATE TABLE clusters_applications_ingress (
id integer NOT NULL,
cluster_id integer NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
+ created_at timestamp without time zone NOT NULL,
+ updated_at timestamp without time zone NOT NULL,
status integer NOT NULL,
ingress_type integer NOT NULL,
version character varying NOT NULL,
@@ -14267,7 +13776,6 @@ CREATE TABLE clusters_applications_ingress (
);
CREATE SEQUENCE clusters_applications_ingress_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -14289,7 +13797,6 @@ CREATE TABLE clusters_applications_jupyter (
);
CREATE SEQUENCE clusters_applications_jupyter_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -14312,7 +13819,6 @@ CREATE TABLE clusters_applications_knative (
);
CREATE SEQUENCE clusters_applications_knative_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -14329,14 +13835,13 @@ CREATE TABLE clusters_applications_prometheus (
status_reason text,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
+ last_update_started_at timestamp with time zone,
encrypted_alert_manager_token character varying,
encrypted_alert_manager_token_iv character varying,
- last_update_started_at timestamp with time zone,
healthy boolean
);
CREATE SEQUENCE clusters_applications_prometheus_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -14358,7 +13863,6 @@ CREATE TABLE clusters_applications_runners (
);
CREATE SEQUENCE clusters_applications_runners_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -14368,7 +13872,6 @@ CREATE SEQUENCE clusters_applications_runners_id_seq
ALTER SEQUENCE clusters_applications_runners_id_seq OWNED BY clusters_applications_runners.id;
CREATE SEQUENCE clusters_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -14377,15 +13880,6 @@ CREATE SEQUENCE clusters_id_seq
ALTER SEQUENCE clusters_id_seq OWNED BY clusters.id;
-CREATE TABLE clusters_integration_elasticstack (
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- cluster_id bigint NOT NULL,
- enabled boolean DEFAULT false NOT NULL,
- chart_version text,
- CONSTRAINT check_f8d671ce04 CHECK ((char_length(chart_version) <= 10))
-);
-
CREATE TABLE clusters_integration_prometheus (
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
@@ -14403,10 +13897,10 @@ CREATE TABLE clusters_kubernetes_namespaces (
cluster_project_id integer,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
+ encrypted_service_account_token text,
encrypted_service_account_token_iv character varying,
namespace character varying NOT NULL,
service_account_name character varying,
- encrypted_service_account_token text,
environment_id bigint
);
@@ -14425,8 +13919,7 @@ CREATE TABLE commit_user_mentions (
mentioned_users_ids integer[],
mentioned_projects_ids integer[],
mentioned_groups_ids integer[],
- commit_id character varying,
- CONSTRAINT check_724d773807 CHECK ((commit_id IS NOT NULL))
+ commit_id character varying NOT NULL
);
CREATE SEQUENCE commit_user_mentions_id_seq
@@ -14444,8 +13937,9 @@ CREATE TABLE compliance_management_frameworks (
description text NOT NULL,
color text NOT NULL,
namespace_id integer NOT NULL,
- regulated boolean DEFAULT true NOT NULL,
pipeline_configuration_full_path text,
+ created_at timestamp with time zone,
+ updated_at timestamp with time zone,
CONSTRAINT check_08cd34b2c2 CHECK ((char_length(color) <= 10)),
CONSTRAINT check_1617e0b87e CHECK ((char_length(description) <= 255)),
CONSTRAINT check_ab00bc2193 CHECK ((char_length(name) <= 255)),
@@ -14462,10 +13956,10 @@ CREATE SEQUENCE compliance_management_frameworks_id_seq
ALTER SEQUENCE compliance_management_frameworks_id_seq OWNED BY compliance_management_frameworks.id;
CREATE TABLE container_expiration_policies (
+ project_id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
next_run_at timestamp with time zone,
- project_id bigint NOT NULL,
name_regex character varying(255) DEFAULT '.*'::character varying,
cadence character varying(12) DEFAULT '1d'::character varying NOT NULL,
older_than character varying(12) DEFAULT '90d'::character varying,
@@ -14496,13 +13990,13 @@ CREATE TABLE container_repositories (
migration_state text DEFAULT 'default'::text NOT NULL,
migration_aborted_in_state text,
migration_plan text,
+ last_cleanup_deleted_tags_count integer,
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))
);
CREATE SEQUENCE container_repositories_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -14571,7 +14065,6 @@ CREATE TABLE conversational_development_index_metrics (
);
CREATE SEQUENCE conversational_development_index_metrics_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -14920,19 +14413,18 @@ ALTER SEQUENCE dast_sites_id_seq OWNED BY dast_sites.id;
CREATE TABLE dependency_proxy_blobs (
id integer NOT NULL,
- created_at timestamp with time zone NOT NULL,
- file text NOT NULL,
- file_name character varying NOT NULL,
- file_store integer,
group_id integer NOT NULL,
- size bigint,
+ created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
+ size bigint,
+ file_store integer,
+ file_name character varying NOT NULL,
+ file text NOT NULL,
status smallint DEFAULT 0 NOT NULL,
read_at timestamp with time zone DEFAULT now() NOT NULL
);
CREATE SEQUENCE dependency_proxy_blobs_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -14943,14 +14435,13 @@ ALTER SEQUENCE dependency_proxy_blobs_id_seq OWNED BY dependency_proxy_blobs.id;
CREATE TABLE dependency_proxy_group_settings (
id integer NOT NULL,
- created_at timestamp with time zone NOT NULL,
- enabled boolean DEFAULT false NOT NULL,
group_id integer NOT NULL,
- updated_at timestamp with time zone NOT NULL
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ enabled boolean DEFAULT false NOT NULL
);
CREATE SEQUENCE dependency_proxy_group_settings_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -15005,7 +14496,6 @@ CREATE TABLE deploy_keys_projects (
);
CREATE SEQUENCE deploy_keys_projects_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -15022,7 +14512,6 @@ CREATE TABLE deploy_tokens (
expires_at timestamp with time zone NOT NULL,
created_at timestamp with time zone NOT NULL,
name character varying NOT NULL,
- token character varying,
username character varying,
token_encrypted character varying(255),
deploy_token_type smallint DEFAULT 2 NOT NULL,
@@ -15033,7 +14522,6 @@ CREATE TABLE deploy_tokens (
);
CREATE SEQUENCE deploy_tokens_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -15088,15 +14576,14 @@ CREATE TABLE deployments (
created_at timestamp without time zone,
updated_at timestamp without time zone,
on_stop character varying,
- finished_at timestamp with time zone,
status smallint NOT NULL,
+ finished_at timestamp with time zone,
cluster_id integer,
deployable_id bigint,
archived boolean DEFAULT false NOT NULL
);
CREATE SEQUENCE deployments_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -15146,11 +14633,11 @@ CREATE SEQUENCE design_management_designs_id_seq
ALTER SEQUENCE design_management_designs_id_seq OWNED BY design_management_designs.id;
CREATE TABLE design_management_designs_versions (
+ id bigint NOT NULL,
design_id bigint NOT NULL,
version_id bigint NOT NULL,
event smallint DEFAULT 0 NOT NULL,
- image_v432x230 character varying(255),
- id bigint NOT NULL
+ image_v432x230 character varying(255)
);
CREATE SEQUENCE design_management_designs_versions_id_seq
@@ -15239,6 +14726,30 @@ CREATE SEQUENCE diff_note_positions_id_seq
ALTER SEQUENCE diff_note_positions_id_seq OWNED BY diff_note_positions.id;
+CREATE TABLE dingtalk_tracker_data (
+ id bigint NOT NULL,
+ integration_id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ corpid text,
+ CONSTRAINT check_d3fe332e6a CHECK ((char_length(corpid) <= 255))
+);
+
+COMMENT ON TABLE dingtalk_tracker_data IS 'JiHu-specific table';
+
+COMMENT ON COLUMN dingtalk_tracker_data.integration_id IS 'JiHu-specific column';
+
+COMMENT ON COLUMN dingtalk_tracker_data.corpid IS 'JiHu-specific column';
+
+CREATE SEQUENCE dingtalk_tracker_data_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE dingtalk_tracker_data_id_seq OWNED BY dingtalk_tracker_data.id;
+
CREATE TABLE dora_daily_metrics (
id bigint NOT NULL,
environment_id bigint NOT NULL,
@@ -15391,12 +14902,11 @@ CREATE TABLE emails (
created_at timestamp without time zone,
updated_at timestamp without time zone,
confirmation_token character varying,
- confirmed_at timestamp with time zone,
- confirmation_sent_at timestamp with time zone
+ confirmed_at timestamp without time zone,
+ confirmation_sent_at timestamp without time zone
);
CREATE SEQUENCE emails_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -15421,7 +14931,6 @@ CREATE TABLE environments (
);
CREATE SEQUENCE environments_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -15438,7 +14947,6 @@ CREATE TABLE epic_issues (
);
CREATE SEQUENCE epic_issues_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -15455,7 +14963,6 @@ CREATE TABLE epic_metrics (
);
CREATE SEQUENCE epic_metrics_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -15511,18 +15018,21 @@ CREATE TABLE epics (
closed_at timestamp without time zone,
parent_id integer,
relative_position integer,
+ state_id smallint DEFAULT 1 NOT NULL,
start_date_sourcing_epic_id integer,
due_date_sourcing_epic_id integer,
- state_id smallint DEFAULT 1,
- external_key character varying(255),
confidential boolean DEFAULT false NOT NULL,
+ external_key character varying(255),
color text DEFAULT '#1068bf'::text,
- CONSTRAINT check_57ee003890 CHECK ((state_id IS NOT NULL)),
- CONSTRAINT check_ca608c40b3 CHECK ((char_length(color) <= 7))
+ total_opened_issue_weight integer DEFAULT 0 NOT NULL,
+ total_closed_issue_weight integer DEFAULT 0 NOT NULL,
+ total_opened_issue_count integer DEFAULT 0 NOT NULL,
+ total_closed_issue_count integer DEFAULT 0 NOT NULL,
+ CONSTRAINT check_ca608c40b3 CHECK ((char_length(color) <= 7)),
+ CONSTRAINT check_fcfb4a93ff CHECK ((lock_version IS NOT NULL))
);
CREATE SEQUENCE epics_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -15617,7 +15127,6 @@ CREATE TABLE events (
);
CREATE SEQUENCE events_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -15806,7 +15315,6 @@ CREATE TABLE feature_gates (
);
CREATE SEQUENCE feature_gates_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -15823,7 +15331,6 @@ CREATE TABLE features (
);
CREATE SEQUENCE features_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -15840,7 +15347,6 @@ CREATE TABLE fork_network_members (
);
CREATE SEQUENCE fork_network_members_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -15856,7 +15362,6 @@ CREATE TABLE fork_networks (
);
CREATE SEQUENCE fork_networks_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -15902,9 +15407,7 @@ CREATE TABLE geo_event_log (
repositories_changed_event_id bigint,
repository_created_event_id bigint,
hashed_storage_migrated_event_id bigint,
- lfs_object_deleted_event_id bigint,
hashed_storage_attachments_event_id bigint,
- job_artifact_deleted_event_id bigint,
reset_checksum_event_id bigint,
cache_invalidation_event_id bigint,
container_repository_updated_event_id bigint,
@@ -15976,37 +15479,6 @@ CREATE SEQUENCE geo_hashed_storage_migrated_events_id_seq
ALTER SEQUENCE geo_hashed_storage_migrated_events_id_seq OWNED BY geo_hashed_storage_migrated_events.id;
-CREATE TABLE geo_job_artifact_deleted_events (
- id bigint NOT NULL,
- file_path character varying NOT NULL,
- job_artifact_id bigint NOT NULL
-);
-
-CREATE SEQUENCE geo_job_artifact_deleted_events_id_seq
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
-
-ALTER SEQUENCE geo_job_artifact_deleted_events_id_seq OWNED BY geo_job_artifact_deleted_events.id;
-
-CREATE TABLE geo_lfs_object_deleted_events (
- id bigint NOT NULL,
- lfs_object_id integer NOT NULL,
- oid character varying NOT NULL,
- file_path character varying NOT NULL
-);
-
-CREATE SEQUENCE geo_lfs_object_deleted_events_id_seq
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
-
-ALTER SEQUENCE geo_lfs_object_deleted_events_id_seq OWNED BY geo_lfs_object_deleted_events.id;
-
CREATE TABLE geo_node_namespace_links (
id integer NOT NULL,
geo_node_id integer NOT NULL,
@@ -16016,7 +15488,6 @@ CREATE TABLE geo_node_namespace_links (
);
CREATE SEQUENCE geo_node_namespace_links_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -16080,7 +15551,6 @@ CREATE TABLE geo_node_statuses (
);
CREATE SEQUENCE geo_node_statuses_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -16108,13 +15578,12 @@ CREATE TABLE geo_nodes (
internal_url character varying,
name character varying NOT NULL,
container_repositories_max_capacity integer DEFAULT 10 NOT NULL,
- sync_object_storage boolean DEFAULT false NOT NULL,
created_at timestamp with time zone,
- updated_at timestamp with time zone
+ updated_at timestamp with time zone,
+ sync_object_storage boolean DEFAULT false NOT NULL
);
CREATE SEQUENCE geo_nodes_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -16274,6 +15743,7 @@ CREATE TABLE gitlab_subscriptions (
seats_in_use integer DEFAULT 0 NOT NULL,
seats_owed integer DEFAULT 0 NOT NULL,
trial_extension_type smallint,
+ max_seats_used_changed_at timestamp with time zone,
CONSTRAINT check_77fea3f0e7 CHECK ((namespace_id IS NOT NULL))
);
@@ -16294,7 +15764,6 @@ CREATE TABLE gpg_key_subkeys (
);
CREATE SEQUENCE gpg_key_subkeys_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -16314,7 +15783,6 @@ CREATE TABLE gpg_keys (
);
CREATE SEQUENCE gpg_keys_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -16338,7 +15806,6 @@ CREATE TABLE gpg_signatures (
);
CREATE SEQUENCE gpg_signatures_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -16393,7 +15860,6 @@ CREATE TABLE group_custom_attributes (
);
CREATE SEQUENCE group_custom_attributes_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -16417,7 +15883,7 @@ CREATE TABLE group_deploy_keys (
expires_at timestamp with time zone,
key text NOT NULL,
title text,
- fingerprint text NOT NULL,
+ fingerprint text,
fingerprint_sha256 bytea,
CONSTRAINT check_cc0365908d CHECK ((char_length(title) <= 255)),
CONSTRAINT check_e4526dcf91 CHECK ((char_length(fingerprint) <= 255)),
@@ -16565,7 +16031,6 @@ CREATE TABLE historical_data (
);
CREATE SEQUENCE historical_data_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -16581,12 +16046,11 @@ CREATE TABLE identities (
user_id integer,
created_at timestamp without time zone,
updated_at timestamp without time zone,
- saml_provider_id integer,
- secondary_extern_uid character varying
+ secondary_extern_uid character varying,
+ saml_provider_id integer
);
CREATE SEQUENCE identities_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -16607,7 +16071,6 @@ CREATE TABLE import_export_uploads (
);
CREATE SEQUENCE import_export_uploads_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -16643,10 +16106,13 @@ CREATE TABLE in_product_marketing_emails (
id bigint NOT NULL,
user_id bigint NOT NULL,
cta_clicked_at timestamp with time zone,
- track smallint NOT NULL,
- series smallint NOT NULL,
+ track smallint,
+ series smallint,
created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL
+ updated_at timestamp with time zone NOT NULL,
+ campaign text,
+ CONSTRAINT check_9d8b29f74f CHECK ((char_length(campaign) <= 255)),
+ CONSTRAINT in_product_marketing_emails_track_and_series_or_campaign CHECK ((((track IS NOT NULL) AND (series IS NOT NULL) AND (campaign IS NULL)) OR ((track IS NULL) AND (series IS NULL) AND (campaign IS NOT NULL))))
);
CREATE SEQUENCE in_product_marketing_emails_id_seq
@@ -16743,9 +16209,9 @@ CREATE TABLE incident_management_oncall_rotations (
length_unit smallint NOT NULL,
starts_at timestamp with time zone NOT NULL,
name text NOT NULL,
+ ends_at timestamp with time zone,
active_period_start time without time zone,
active_period_end time without time zone,
- ends_at timestamp with time zone,
CONSTRAINT check_5209fb5d02 CHECK ((char_length(name) <= 200))
);
@@ -16798,6 +16264,24 @@ CREATE SEQUENCE incident_management_oncall_shifts_id_seq
ALTER SEQUENCE incident_management_oncall_shifts_id_seq OWNED BY incident_management_oncall_shifts.id;
+CREATE SEQUENCE incident_management_pending_alert_escalations_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE incident_management_pending_alert_escalations_id_seq OWNED BY incident_management_pending_alert_escalations.id;
+
+CREATE SEQUENCE incident_management_pending_issue_escalations_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE incident_management_pending_issue_escalations_id_seq OWNED BY incident_management_pending_issue_escalations.id;
+
CREATE TABLE incident_management_timeline_events (
id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
@@ -16840,7 +16324,6 @@ CREATE TABLE index_statuses (
);
CREATE SEQUENCE index_statuses_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -16856,7 +16339,6 @@ CREATE TABLE insights (
);
CREATE SEQUENCE insights_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -16867,12 +16349,10 @@ ALTER SEQUENCE insights_id_seq OWNED BY insights.id;
CREATE TABLE integrations (
id integer NOT NULL,
- type character varying,
project_id integer,
created_at timestamp without time zone,
updated_at timestamp without time zone,
active boolean DEFAULT false NOT NULL,
- properties text,
push_events boolean DEFAULT true,
issues_events boolean DEFAULT true,
merge_requests_events boolean DEFAULT true,
@@ -16892,8 +16372,8 @@ CREATE TABLE integrations (
inherit_from_id bigint,
alert_events boolean,
group_id bigint,
- vulnerability_events boolean DEFAULT false NOT NULL,
type_new text,
+ vulnerability_events boolean DEFAULT false NOT NULL,
archive_trace_events boolean DEFAULT false NOT NULL,
encrypted_properties bytea,
encrypted_properties_iv bytea,
@@ -16901,7 +16381,6 @@ CREATE TABLE integrations (
);
CREATE SEQUENCE integrations_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -16965,6 +16444,27 @@ CREATE SEQUENCE issuable_metric_images_id_seq
ALTER SEQUENCE issuable_metric_images_id_seq OWNED BY issuable_metric_images.id;
+CREATE TABLE issuable_resource_links (
+ id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ link_text text,
+ link text NOT NULL,
+ link_type smallint DEFAULT 0 NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ CONSTRAINT check_67be6729db CHECK ((char_length(link) <= 2200)),
+ CONSTRAINT check_b137147e0b CHECK ((char_length(link_text) <= 255))
+);
+
+CREATE SEQUENCE issuable_resource_links_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE issuable_resource_links_id_seq OWNED BY issuable_resource_links.id;
+
CREATE TABLE issuable_severities (
id bigint NOT NULL,
issue_id bigint NOT NULL,
@@ -17063,7 +16563,6 @@ CREATE TABLE issue_links (
);
CREATE SEQUENCE issue_links_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -17083,7 +16582,6 @@ CREATE TABLE issue_metrics (
);
CREATE SEQUENCE issue_metrics_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -17094,7 +16592,6 @@ ALTER SEQUENCE issue_metrics_id_seq OWNED BY issue_metrics.id;
CREATE TABLE issue_tracker_data (
id bigint NOT NULL,
- service_id integer NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
encrypted_project_url character varying,
@@ -17102,7 +16599,9 @@ CREATE TABLE issue_tracker_data (
encrypted_issues_url character varying,
encrypted_issues_url_iv character varying,
encrypted_new_issue_url character varying,
- encrypted_new_issue_url_iv character varying
+ encrypted_new_issue_url_iv character varying,
+ integration_id integer,
+ CONSTRAINT check_7ca00cd891 CHECK ((integration_id IS NOT NULL))
);
CREATE SEQUENCE issue_tracker_data_id_seq
@@ -17143,6 +16642,7 @@ CREATE TABLE issues (
milestone_id integer,
iid integer,
updated_by_id integer,
+ weight integer,
confidential boolean DEFAULT false NOT NULL,
due_date date,
moved_to_id integer,
@@ -17151,6 +16651,7 @@ CREATE TABLE issues (
description_html text,
time_estimate integer,
relative_position integer,
+ service_desk_reply_to character varying,
cached_markdown_version integer,
last_edited_at timestamp without time zone,
last_edited_by_id integer,
@@ -17158,21 +16659,21 @@ CREATE TABLE issues (
closed_at timestamp with time zone,
closed_by_id integer,
state_id smallint DEFAULT 1 NOT NULL,
- service_desk_reply_to character varying,
- weight integer,
duplicated_to_id integer,
promoted_to_epic_id integer,
health_status smallint,
- sprint_id bigint,
external_key character varying(255),
- blocking_issues_count integer DEFAULT 0 NOT NULL,
+ sprint_id bigint,
issue_type smallint DEFAULT 0 NOT NULL,
+ blocking_issues_count integer DEFAULT 0 NOT NULL,
upvotes_count integer DEFAULT 0 NOT NULL,
- work_item_type_id bigint
+ work_item_type_id bigint,
+ namespace_id bigint,
+ start_date date,
+ CONSTRAINT check_fba63f706d CHECK ((lock_version IS NOT NULL))
);
CREATE SEQUENCE issues_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -17243,9 +16744,9 @@ ALTER SEQUENCE jira_connect_installations_id_seq OWNED BY jira_connect_installat
CREATE TABLE jira_connect_subscriptions (
id bigint NOT NULL,
- created_at timestamp with time zone NOT NULL,
jira_connect_installation_id bigint NOT NULL,
namespace_id integer NOT NULL,
+ created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL
);
@@ -17290,7 +16791,6 @@ ALTER SEQUENCE jira_imports_id_seq OWNED BY jira_imports.id;
CREATE TABLE jira_tracker_data (
id bigint NOT NULL,
- service_id integer NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
encrypted_url character varying,
@@ -17308,7 +16808,9 @@ CREATE TABLE jira_tracker_data (
vulnerabilities_issuetype text,
vulnerabilities_enabled boolean DEFAULT false NOT NULL,
jira_issue_transition_automatic boolean DEFAULT false NOT NULL,
+ integration_id integer,
CONSTRAINT check_0bf84b76e9 CHECK ((char_length(vulnerabilities_issuetype) <= 255)),
+ CONSTRAINT check_0fbd71d9f2 CHECK ((integration_id IS NOT NULL)),
CONSTRAINT check_214cf6a48b CHECK ((char_length(project_key) <= 255))
);
@@ -17339,7 +16841,6 @@ CREATE TABLE keys (
);
CREATE SEQUENCE keys_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -17358,7 +16859,6 @@ CREATE TABLE label_links (
);
CREATE SEQUENCE label_links_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -17377,7 +16877,6 @@ CREATE TABLE label_priorities (
);
CREATE SEQUENCE label_priorities_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -17402,7 +16901,6 @@ CREATE TABLE labels (
);
CREATE SEQUENCE labels_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -17423,7 +16921,6 @@ CREATE TABLE ldap_group_links (
);
CREATE SEQUENCE ldap_group_links_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -17441,7 +16938,6 @@ CREATE TABLE lfs_file_locks (
);
CREATE SEQUENCE lfs_file_locks_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -17483,7 +16979,6 @@ CREATE TABLE lfs_objects (
);
CREATE SEQUENCE lfs_objects_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -17502,7 +16997,6 @@ CREATE TABLE lfs_objects_projects (
);
CREATE SEQUENCE lfs_objects_projects_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -17521,7 +17015,6 @@ CREATE TABLE licenses (
);
CREATE SEQUENCE licenses_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -17556,8 +17049,8 @@ CREATE TABLE lists (
"position" integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
- milestone_id integer,
user_id integer,
+ milestone_id integer,
max_issue_count integer DEFAULT 0 NOT NULL,
max_issue_weight integer DEFAULT 0 NOT NULL,
limit_metric character varying(20),
@@ -17565,7 +17058,6 @@ CREATE TABLE lists (
);
CREATE SEQUENCE lists_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -17574,6 +17066,33 @@ CREATE SEQUENCE lists_id_seq
ALTER SEQUENCE lists_id_seq OWNED BY lists.id;
+CREATE SEQUENCE loose_foreign_keys_deleted_records_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE loose_foreign_keys_deleted_records_id_seq OWNED BY loose_foreign_keys_deleted_records.id;
+
+CREATE TABLE member_roles (
+ id bigint NOT NULL,
+ namespace_id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ base_access_level integer NOT NULL,
+ download_code boolean DEFAULT false
+);
+
+CREATE SEQUENCE member_roles_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE member_roles_id_seq OWNED BY member_roles.id;
+
CREATE TABLE member_tasks (
id bigint NOT NULL,
member_id bigint NOT NULL,
@@ -17610,13 +17129,13 @@ CREATE TABLE members (
expires_at date,
ldap boolean DEFAULT false NOT NULL,
override boolean DEFAULT false NOT NULL,
- invite_email_success boolean DEFAULT true NOT NULL,
state smallint DEFAULT 0,
- member_namespace_id bigint
+ invite_email_success boolean DEFAULT true NOT NULL,
+ member_namespace_id bigint,
+ member_role_id bigint
);
CREATE SEQUENCE members_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -17626,7 +17145,7 @@ CREATE SEQUENCE members_id_seq
ALTER SEQUENCE members_id_seq OWNED BY members.id;
CREATE TABLE merge_request_assignees (
- id integer NOT NULL,
+ id bigint NOT NULL,
user_id integer NOT NULL,
merge_request_id integer NOT NULL,
created_at timestamp with time zone,
@@ -17635,7 +17154,6 @@ CREATE TABLE merge_request_assignees (
);
CREATE SEQUENCE merge_request_assignees_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -17681,33 +17199,33 @@ CREATE SEQUENCE merge_request_cleanup_schedules_merge_request_id_seq
ALTER SEQUENCE merge_request_cleanup_schedules_merge_request_id_seq OWNED BY merge_request_cleanup_schedules.merge_request_id;
CREATE TABLE merge_request_context_commit_diff_files (
- merge_request_context_commit_id bigint NOT NULL,
sha bytea NOT NULL,
relative_order integer NOT NULL,
- a_mode character varying(255) NOT NULL,
- b_mode character varying(255) NOT NULL,
new_file boolean NOT NULL,
renamed_file boolean NOT NULL,
deleted_file boolean NOT NULL,
too_large boolean NOT NULL,
- "binary" boolean,
+ a_mode character varying(255) NOT NULL,
+ b_mode character varying(255) NOT NULL,
new_path text NOT NULL,
old_path text NOT NULL,
- diff text
+ diff text,
+ "binary" boolean,
+ merge_request_context_commit_id bigint NOT NULL
);
CREATE TABLE merge_request_context_commits (
id bigint NOT NULL,
- merge_request_id bigint,
authored_date timestamp with time zone,
committed_date timestamp with time zone,
- sha bytea NOT NULL,
relative_order integer NOT NULL,
+ sha bytea NOT NULL,
author_name text,
author_email text,
committer_name text,
committer_email text,
message text,
+ merge_request_id bigint,
trailers jsonb DEFAULT '{}'::jsonb NOT NULL
);
@@ -17739,8 +17257,8 @@ CREATE SEQUENCE merge_request_diff_commit_users_id_seq
ALTER SEQUENCE merge_request_diff_commit_users_id_seq OWNED BY merge_request_diff_commit_users.id;
CREATE TABLE merge_request_diff_commits (
- authored_date timestamp with time zone,
- committed_date timestamp with time zone,
+ authored_date timestamp without time zone,
+ committed_date timestamp without time zone,
merge_request_diff_id integer NOT NULL,
relative_order integer NOT NULL,
sha bytea NOT NULL,
@@ -17809,7 +17327,6 @@ CREATE TABLE merge_request_diffs (
);
CREATE SEQUENCE merge_request_diffs_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -17846,7 +17363,6 @@ CREATE TABLE merge_request_metrics (
);
CREATE SEQUENCE merge_request_metrics_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -17912,12 +17428,14 @@ CREATE TABLE merge_requests (
merge_when_pipeline_succeeds boolean DEFAULT false NOT NULL,
merge_user_id integer,
merge_commit_sha character varying,
+ approvals_before_merge integer,
rebase_commit_sha character varying,
in_progress_merge_commit_sha character varying,
lock_version integer DEFAULT 0,
title_html text,
description_html text,
time_estimate integer,
+ squash boolean DEFAULT false NOT NULL,
cached_markdown_version integer,
last_edited_at timestamp without time zone,
last_edited_by_id integer,
@@ -17926,14 +17444,13 @@ CREATE TABLE merge_requests (
discussion_locked boolean,
latest_merge_request_diff_id integer,
allow_maintainer_to_push boolean DEFAULT true,
- squash boolean DEFAULT false NOT NULL,
state_id smallint DEFAULT 1 NOT NULL,
- approvals_before_merge integer,
rebase_jid character varying,
squash_commit_sha bytea,
sprint_id bigint,
merge_ref_sha bytea,
- draft boolean DEFAULT false NOT NULL
+ draft boolean DEFAULT false NOT NULL,
+ CONSTRAINT check_970d272570 CHECK ((lock_version IS NOT NULL))
);
CREATE TABLE merge_requests_closing_issues (
@@ -17945,7 +17462,6 @@ CREATE TABLE merge_requests_closing_issues (
);
CREATE SEQUENCE merge_requests_closing_issues_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -17972,7 +17488,6 @@ CREATE SEQUENCE merge_requests_compliance_violations_id_seq
ALTER SEQUENCE merge_requests_compliance_violations_id_seq OWNED BY merge_requests_compliance_violations.id;
CREATE SEQUENCE merge_requests_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -18066,7 +17581,6 @@ CREATE TABLE milestones (
);
CREATE SEQUENCE milestones_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -18075,6 +17589,85 @@ CREATE SEQUENCE milestones_id_seq
ALTER SEQUENCE milestones_id_seq OWNED BY milestones.id;
+CREATE TABLE ml_candidate_metrics (
+ id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ candidate_id bigint,
+ value double precision,
+ step integer,
+ is_nan bytea,
+ name text NOT NULL,
+ CONSTRAINT check_3bb4a3fbd9 CHECK ((char_length(name) <= 250))
+);
+
+CREATE SEQUENCE ml_candidate_metrics_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE ml_candidate_metrics_id_seq OWNED BY ml_candidate_metrics.id;
+
+CREATE TABLE ml_candidate_params (
+ id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ candidate_id bigint,
+ name text NOT NULL,
+ value text NOT NULL,
+ CONSTRAINT check_093034d049 CHECK ((char_length(name) <= 250)),
+ CONSTRAINT check_28a3c29e43 CHECK ((char_length(value) <= 250))
+);
+
+CREATE SEQUENCE ml_candidate_params_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE ml_candidate_params_id_seq OWNED BY ml_candidate_params.id;
+
+CREATE TABLE ml_candidates (
+ id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ iid uuid NOT NULL,
+ experiment_id bigint NOT NULL,
+ user_id bigint
+);
+
+CREATE SEQUENCE ml_candidates_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE ml_candidates_id_seq OWNED BY ml_candidates.id;
+
+CREATE TABLE ml_experiments (
+ id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ iid bigint NOT NULL,
+ project_id bigint NOT NULL,
+ user_id bigint,
+ name text NOT NULL,
+ CONSTRAINT check_ee07a0be2c CHECK ((char_length(name) <= 255))
+);
+
+CREATE SEQUENCE ml_experiments_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE ml_experiments_id_seq OWNED BY ml_experiments.id;
+
CREATE TABLE namespace_admin_notes (
id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
@@ -18097,15 +17690,36 @@ CREATE TABLE namespace_aggregation_schedules (
namespace_id integer NOT NULL
);
-CREATE SEQUENCE namespace_aggregation_schedules_namespace_id_seq
- AS integer
+CREATE TABLE namespace_bans (
+ id bigint NOT NULL,
+ namespace_id bigint NOT NULL,
+ user_id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL
+);
+
+CREATE SEQUENCE namespace_bans_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE namespace_aggregation_schedules_namespace_id_seq OWNED BY namespace_aggregation_schedules.namespace_id;
+ALTER SEQUENCE namespace_bans_id_seq OWNED BY namespace_bans.id;
+
+CREATE TABLE namespace_ci_cd_settings (
+ namespace_id bigint NOT NULL,
+ allow_stale_runner_pruning boolean DEFAULT false NOT NULL
+);
+
+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
+);
CREATE TABLE namespace_limits (
additional_purchased_storage_size bigint DEFAULT 0 NOT NULL,
@@ -18137,19 +17751,10 @@ CREATE TABLE namespace_root_storage_statistics (
pipeline_artifacts_size bigint DEFAULT 0 NOT NULL,
uploads_size bigint DEFAULT 0 NOT NULL,
dependency_proxy_size bigint DEFAULT 0 NOT NULL,
- notification_level smallint DEFAULT 100 NOT NULL
+ notification_level smallint DEFAULT 100 NOT NULL,
+ container_registry_size bigint DEFAULT 0 NOT NULL
);
-CREATE SEQUENCE namespace_root_storage_statistics_namespace_id_seq
- AS integer
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
-
-ALTER SEQUENCE namespace_root_storage_statistics_namespace_id_seq OWNED BY namespace_root_storage_statistics.namespace_id;
-
CREATE TABLE namespace_settings (
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
@@ -18159,8 +17764,8 @@ CREATE TABLE namespace_settings (
default_branch_name text,
repository_read_only boolean DEFAULT false NOT NULL,
delayed_project_removal boolean,
- lock_delayed_project_removal boolean DEFAULT false NOT NULL,
resource_access_token_creation_allowed boolean DEFAULT true NOT NULL,
+ lock_delayed_project_removal boolean DEFAULT false NOT NULL,
prevent_sharing_groups_outside_hierarchy boolean DEFAULT false NOT NULL,
new_user_signups_cap integer,
setup_for_company boolean,
@@ -18168,7 +17773,15 @@ CREATE TABLE namespace_settings (
runner_token_expiration_interval integer,
subgroup_runner_token_expiration_interval integer,
project_runner_token_expiration_interval integer,
- CONSTRAINT check_0ba93c78c7 CHECK ((char_length(default_branch_name) <= 255))
+ exclude_from_free_user_cap boolean DEFAULT false 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,
+ 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))
);
CREATE TABLE namespace_statistics (
@@ -18182,7 +17795,6 @@ CREATE TABLE namespace_statistics (
);
CREATE SEQUENCE namespace_statistics_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -18201,31 +17813,31 @@ CREATE TABLE namespaces (
type character varying DEFAULT 'User'::character varying NOT NULL,
description character varying DEFAULT ''::character varying NOT NULL,
avatar character varying,
+ membership_lock boolean DEFAULT false,
share_with_group_lock boolean DEFAULT false,
visibility_level integer DEFAULT 20 NOT NULL,
request_access_enabled boolean DEFAULT true NOT NULL,
+ ldap_sync_status character varying DEFAULT 'ready'::character varying NOT NULL,
+ ldap_sync_error character varying,
+ ldap_sync_last_update_at timestamp without time zone,
+ ldap_sync_last_successful_update_at timestamp without time zone,
+ ldap_sync_last_sync_at timestamp without time zone,
description_html text,
lfs_enabled boolean,
parent_id integer,
+ shared_runners_minutes_limit integer,
+ repository_size_limit bigint,
require_two_factor_authentication boolean DEFAULT false NOT NULL,
two_factor_grace_period integer DEFAULT 48 NOT NULL,
cached_markdown_version integer,
- runners_token character varying,
project_creation_level integer,
- runners_token_encrypted character varying,
- auto_devops_enabled boolean,
- custom_project_templates_group_id integer,
+ runners_token character varying,
file_template_project_id integer,
- ldap_sync_error character varying,
- ldap_sync_last_successful_update_at timestamp without time zone,
- ldap_sync_last_sync_at timestamp without time zone,
- ldap_sync_last_update_at timestamp without time zone,
- repository_size_limit bigint,
saml_discovery_token character varying,
- shared_runners_minutes_limit integer,
+ runners_token_encrypted character varying,
+ custom_project_templates_group_id integer,
+ auto_devops_enabled boolean,
extra_shared_runners_minutes_limit integer,
- ldap_sync_status character varying DEFAULT 'ready'::character varying NOT NULL,
- membership_lock boolean DEFAULT false,
last_ci_minutes_notification_at timestamp with time zone,
last_ci_minutes_usage_notification_level integer,
subgroup_creation_level integer DEFAULT 1,
@@ -18244,7 +17856,6 @@ CREATE TABLE namespaces (
);
CREATE SEQUENCE namespaces_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -18281,7 +17892,6 @@ CREATE TABLE note_diff_files (
);
CREATE SEQUENCE note_diff_files_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -18321,7 +17931,6 @@ CREATE TABLE notes (
);
CREATE SEQUENCE notes_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -18333,8 +17942,8 @@ ALTER SEQUENCE notes_id_seq OWNED BY notes.id;
CREATE TABLE notification_settings (
id integer NOT NULL,
user_id integer NOT NULL,
- source_type character varying,
source_id integer,
+ source_type character varying,
level integer DEFAULT 0 NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
@@ -18352,17 +17961,16 @@ CREATE TABLE notification_settings (
success_pipeline boolean,
push_to_merge_request boolean,
issue_due boolean,
- notification_email character varying,
new_epic boolean,
- new_release boolean,
+ notification_email character varying,
fixed_pipeline boolean,
+ new_release boolean,
moved_project boolean DEFAULT true NOT NULL,
change_reviewer_merge_request boolean,
merge_when_pipeline_succeeds boolean DEFAULT false NOT NULL
);
CREATE SEQUENCE notification_settings_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -18388,7 +17996,6 @@ CREATE TABLE oauth_access_grants (
);
CREATE SEQUENCE oauth_access_grants_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -18410,7 +18017,6 @@ CREATE TABLE oauth_access_tokens (
);
CREATE SEQUENCE oauth_access_tokens_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -18436,7 +18042,6 @@ CREATE TABLE oauth_applications (
);
CREATE SEQUENCE oauth_applications_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -18452,7 +18057,6 @@ CREATE TABLE oauth_openid_requests (
);
CREATE SEQUENCE oauth_openid_requests_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -18534,7 +18138,8 @@ CREATE TABLE operations_feature_flags (
CREATE TABLE operations_feature_flags_clients (
id bigint NOT NULL,
project_id integer NOT NULL,
- token_encrypted character varying
+ token_encrypted character varying,
+ last_feature_flag_updated_at timestamp with time zone
);
CREATE SEQUENCE operations_feature_flags_clients_id_seq
@@ -18650,6 +18255,15 @@ CREATE SEQUENCE packages_build_infos_id_seq
ALTER SEQUENCE packages_build_infos_id_seq OWNED BY packages_build_infos.id;
+CREATE TABLE packages_cleanup_policies (
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ project_id bigint NOT NULL,
+ next_run_at timestamp with time zone,
+ keep_n_duplicated_package_files text DEFAULT 'all'::text NOT NULL,
+ CONSTRAINT check_e53f35ab7b CHECK ((char_length(keep_n_duplicated_package_files) <= 255))
+);
+
CREATE TABLE packages_composer_cache_files (
id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
@@ -19120,11 +18734,11 @@ CREATE TABLE packages_package_files (
file_sha1 bytea,
file_name character varying NOT NULL,
file text NOT NULL,
+ file_sha256 bytea,
verification_retry_at timestamp with time zone,
verified_at timestamp with time zone,
verification_failure character varying(255),
verification_retry_count integer,
- file_sha256 bytea,
verification_checksum bytea,
verification_state smallint DEFAULT 0 NOT NULL,
verification_started_at timestamp with time zone,
@@ -19323,13 +18937,11 @@ CREATE TABLE pages_domains (
certificate_source smallint DEFAULT 0 NOT NULL,
wildcard boolean DEFAULT false NOT NULL,
usage smallint DEFAULT 0 NOT NULL,
- scope smallint DEFAULT 2,
- auto_ssl_failed boolean DEFAULT false NOT NULL,
- CONSTRAINT check_ab7cf26a46 CHECK ((scope IS NOT NULL))
+ scope smallint DEFAULT 2 NOT NULL,
+ auto_ssl_failed boolean DEFAULT false NOT NULL
);
CREATE SEQUENCE pages_domains_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -19348,7 +18960,6 @@ CREATE TABLE path_locks (
);
CREATE SEQUENCE path_locks_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -19375,7 +18986,6 @@ CREATE TABLE personal_access_tokens (
);
CREATE SEQUENCE personal_access_tokens_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -19385,17 +18995,18 @@ CREATE SEQUENCE personal_access_tokens_id_seq
ALTER SEQUENCE personal_access_tokens_id_seq OWNED BY personal_access_tokens.id;
CREATE TABLE plan_limits (
+ id bigint NOT NULL,
plan_id bigint NOT NULL,
ci_active_pipelines integer DEFAULT 0 NOT NULL,
ci_pipeline_size integer DEFAULT 0 NOT NULL,
ci_active_jobs integer DEFAULT 0 NOT NULL,
- id bigint NOT NULL,
project_hooks integer DEFAULT 100 NOT NULL,
group_hooks integer DEFAULT 50 NOT NULL,
ci_project_subscriptions integer DEFAULT 2 NOT NULL,
ci_pipeline_schedules integer DEFAULT 10 NOT NULL,
offset_pagination_limit integer DEFAULT 50000 NOT NULL,
ci_instance_level_variables integer DEFAULT 25 NOT NULL,
+ storage_size_limit integer DEFAULT 0 NOT NULL,
ci_max_artifact_size_lsif integer DEFAULT 100 NOT NULL,
ci_max_artifact_size_archive integer DEFAULT 0 NOT NULL,
ci_max_artifact_size_metadata integer DEFAULT 0 NOT NULL,
@@ -19420,7 +19031,6 @@ CREATE TABLE plan_limits (
ci_max_artifact_size_secret_detection integer DEFAULT 0 NOT NULL,
ci_max_artifact_size_requirements integer DEFAULT 0 NOT NULL,
ci_max_artifact_size_coverage_fuzzing integer DEFAULT 0 NOT NULL,
- storage_size_limit integer DEFAULT 0 NOT NULL,
ci_max_artifact_size_browser_performance integer DEFAULT 0 NOT NULL,
ci_max_artifact_size_load_performance integer DEFAULT 0 NOT NULL,
ci_needs_size_limit integer DEFAULT 50 NOT NULL,
@@ -19430,13 +19040,13 @@ CREATE TABLE plan_limits (
nuget_max_file_size bigint DEFAULT 524288000 NOT NULL,
pypi_max_file_size bigint DEFAULT '3221225472'::bigint NOT NULL,
generic_packages_max_file_size bigint DEFAULT '5368709120'::bigint NOT NULL,
- project_feature_flags integer DEFAULT 200 NOT NULL,
golang_max_file_size bigint DEFAULT 104857600 NOT NULL,
debian_max_file_size bigint DEFAULT '3221225472'::bigint NOT NULL,
+ project_feature_flags integer DEFAULT 200 NOT NULL,
ci_max_artifact_size_api_fuzzing integer DEFAULT 0 NOT NULL,
- daily_invites integer DEFAULT 0 NOT NULL,
ci_pipeline_deployments integer DEFAULT 500 NOT NULL,
pull_mirror_interval_seconds integer DEFAULT 300 NOT NULL,
+ daily_invites integer DEFAULT 0 NOT NULL,
rubygems_max_file_size bigint DEFAULT '3221225472'::bigint NOT NULL,
terraform_module_max_file_size bigint DEFAULT 1073741824 NOT NULL,
helm_max_file_size bigint DEFAULT 5242880 NOT NULL,
@@ -19444,17 +19054,23 @@ CREATE TABLE plan_limits (
ci_registered_project_runners integer DEFAULT 1000 NOT NULL,
web_hook_calls integer DEFAULT 0 NOT NULL,
ci_daily_pipeline_schedule_triggers integer DEFAULT 0 NOT NULL,
- pages_file_entries integer DEFAULT 200000 NOT NULL,
ci_max_artifact_size_running_container_scanning integer DEFAULT 0 NOT NULL,
ci_max_artifact_size_cluster_image_scanning integer DEFAULT 0 NOT NULL,
ci_jobs_trace_size_limit integer DEFAULT 100 NOT NULL,
+ pages_file_entries integer DEFAULT 200000 NOT NULL,
dast_profile_schedules integer DEFAULT 1 NOT NULL,
external_audit_event_destinations integer DEFAULT 5 NOT NULL,
dotenv_variables integer DEFAULT 20 NOT NULL,
dotenv_size integer DEFAULT 5120 NOT NULL,
pipeline_triggers integer DEFAULT 25000 NOT NULL,
project_ci_secure_files integer DEFAULT 100 NOT NULL,
- repository_size bigint DEFAULT 0 NOT NULL
+ repository_size bigint DEFAULT 0 NOT NULL,
+ security_policy_scan_execution_schedules integer DEFAULT 0 NOT NULL,
+ web_hook_calls_mid integer DEFAULT 0 NOT NULL,
+ web_hook_calls_low integer DEFAULT 0 NOT NULL,
+ project_ci_variables integer DEFAULT 200 NOT NULL,
+ group_ci_variables integer DEFAULT 200 NOT NULL,
+ ci_max_artifact_size_cyclonedx integer DEFAULT 1 NOT NULL
);
CREATE SEQUENCE plan_limits_id_seq
@@ -19475,7 +19091,6 @@ CREATE TABLE plans (
);
CREATE SEQUENCE plans_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -19522,6 +19137,22 @@ CREATE SEQUENCE postgres_async_indexes_id_seq
ALTER SEQUENCE postgres_async_indexes_id_seq OWNED BY postgres_async_indexes.id;
+CREATE VIEW postgres_autovacuum_activity AS
+ WITH processes AS (
+ SELECT postgres_pg_stat_activity_autovacuum.query,
+ postgres_pg_stat_activity_autovacuum.query_start,
+ regexp_matches(postgres_pg_stat_activity_autovacuum.query, '^autovacuum: VACUUM (w+).(w+)'::text) AS matches
+ FROM postgres_pg_stat_activity_autovacuum() postgres_pg_stat_activity_autovacuum(query, query_start)
+ WHERE (postgres_pg_stat_activity_autovacuum.query ~* '^autovacuum: VACUUM w+.w+'::text)
+ )
+ SELECT ((processes.matches[1] || '.'::text) || processes.matches[2]) AS table_identifier,
+ processes.matches[1] AS schema,
+ processes.matches[2] AS "table",
+ processes.query_start AS vacuum_start
+ FROM processes;
+
+COMMENT ON VIEW postgres_autovacuum_activity IS 'Contains information about PostgreSQL backends currently performing autovacuum operations on the tables indicated here.';
+
CREATE VIEW postgres_foreign_keys AS
SELECT pg_constraint.oid,
pg_constraint.conname AS name,
@@ -19757,7 +19388,6 @@ CREATE TABLE programming_languages (
);
CREATE SEQUENCE programming_languages_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -19810,7 +19440,6 @@ CREATE TABLE project_auto_devops (
);
CREATE SEQUENCE project_auto_devops_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -19826,7 +19455,8 @@ CREATE TABLE project_build_artifacts_size_refreshes (
state smallint DEFAULT 1 NOT NULL,
refresh_started_at timestamp with time zone,
created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL
+ updated_at timestamp with time zone NOT NULL,
+ last_job_artifact_id_on_refresh_start bigint DEFAULT 0
);
CREATE SEQUENCE project_build_artifacts_size_refreshes_id_seq
@@ -19851,11 +19481,12 @@ CREATE TABLE project_ci_cd_settings (
restrict_user_defined_variables boolean DEFAULT false NOT NULL,
job_token_scope_enabled boolean DEFAULT false NOT NULL,
runner_token_expiration_interval integer,
- separated_caches boolean DEFAULT true NOT NULL
+ 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
);
CREATE SEQUENCE project_ci_cd_settings_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -19905,7 +19536,6 @@ CREATE TABLE project_custom_attributes (
);
CREATE SEQUENCE project_custom_attributes_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -19938,7 +19568,6 @@ CREATE TABLE project_deploy_tokens (
);
CREATE SEQUENCE project_deploy_tokens_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -19997,15 +19626,20 @@ CREATE TABLE project_features (
pages_access_level integer NOT NULL,
forking_access_level integer,
metrics_dashboard_access_level integer,
- analytics_access_level integer DEFAULT 20 NOT NULL,
requirements_access_level integer DEFAULT 20 NOT NULL,
operations_access_level integer DEFAULT 20 NOT NULL,
+ analytics_access_level integer DEFAULT 20 NOT NULL,
security_and_compliance_access_level integer DEFAULT 10 NOT NULL,
- container_registry_access_level integer DEFAULT 0 NOT NULL
+ container_registry_access_level integer DEFAULT 0 NOT NULL,
+ package_registry_access_level integer DEFAULT 0 NOT NULL,
+ monitor_access_level integer DEFAULT 20 NOT NULL,
+ infrastructure_access_level integer DEFAULT 20 NOT NULL,
+ feature_flags_access_level integer DEFAULT 20 NOT NULL,
+ environments_access_level integer DEFAULT 20 NOT NULL,
+ releases_access_level integer DEFAULT 20 NOT NULL
);
CREATE SEQUENCE project_features_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -20025,7 +19659,6 @@ CREATE TABLE project_group_links (
);
CREATE SEQUENCE project_group_links_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -20044,7 +19677,6 @@ CREATE TABLE project_import_data (
);
CREATE SEQUENCE project_import_data_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -20068,6 +19700,15 @@ CREATE TABLE project_incident_management_settings (
CONSTRAINT pagerduty_token_length_constraint CHECK ((octet_length(encrypted_pagerduty_token) <= 255))
);
+CREATE SEQUENCE project_incident_management_settings_project_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE project_incident_management_settings_project_id_seq OWNED BY project_incident_management_settings.project_id;
+
CREATE TABLE project_metrics_settings (
project_id integer NOT NULL,
external_dashboard_url character varying,
@@ -20077,20 +19718,19 @@ CREATE TABLE project_metrics_settings (
CREATE TABLE project_mirror_data (
id integer NOT NULL,
project_id integer NOT NULL,
+ retry_count integer DEFAULT 0 NOT NULL,
+ last_update_started_at timestamp without time zone,
+ last_update_scheduled_at timestamp without time zone,
+ next_execution_timestamp timestamp without time zone,
status character varying,
jid character varying,
last_error text,
- last_successful_update_at timestamp with time zone,
last_update_at timestamp with time zone,
- last_update_scheduled_at timestamp without time zone,
- last_update_started_at timestamp without time zone,
- next_execution_timestamp timestamp without time zone,
- retry_count integer DEFAULT 0 NOT NULL,
+ last_successful_update_at timestamp with time zone,
correlation_id_value character varying(128)
);
CREATE SEQUENCE project_mirror_data_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -20106,6 +19746,47 @@ CREATE TABLE project_pages_metadata (
onboarding_complete boolean DEFAULT false NOT NULL
);
+CREATE TABLE project_relation_export_uploads (
+ id bigint NOT NULL,
+ project_relation_export_id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ export_file text NOT NULL,
+ CONSTRAINT check_d8ee243e9e CHECK ((char_length(export_file) <= 255))
+);
+
+CREATE SEQUENCE project_relation_export_uploads_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE project_relation_export_uploads_id_seq OWNED BY project_relation_export_uploads.id;
+
+CREATE TABLE project_relation_exports (
+ id bigint NOT NULL,
+ project_export_job_id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ status smallint DEFAULT 0 NOT NULL,
+ relation text NOT NULL,
+ jid text,
+ export_error text,
+ CONSTRAINT check_15e644d856 CHECK ((char_length(jid) <= 255)),
+ CONSTRAINT check_4b5880b795 CHECK ((char_length(relation) <= 255)),
+ CONSTRAINT check_dbd1cf73d0 CHECK ((char_length(export_error) <= 300))
+);
+
+CREATE SEQUENCE project_relation_exports_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE project_relation_exports_id_seq OWNED BY project_relation_exports.id;
+
CREATE TABLE project_repositories (
id bigint NOT NULL,
shard_id integer NOT NULL,
@@ -20134,11 +19815,12 @@ CREATE TABLE project_repository_states (
repository_retry_count integer,
wiki_retry_count integer,
last_repository_verification_ran_at timestamp with time zone,
- last_wiki_verification_ran_at timestamp with time zone
+ last_wiki_verification_ran_at timestamp with time zone,
+ last_repository_updated_at timestamp with time zone,
+ last_wiki_updated_at timestamp with time zone
);
CREATE SEQUENCE project_repository_states_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -20188,17 +19870,17 @@ CREATE SEQUENCE project_security_settings_project_id_seq
ALTER SEQUENCE project_security_settings_project_id_seq OWNED BY project_security_settings.project_id;
CREATE TABLE project_settings (
+ project_id integer NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
- project_id integer NOT NULL,
- show_default_award_emojis boolean DEFAULT true NOT NULL,
- allow_merge_on_skipped_pipeline boolean,
push_rule_id bigint,
+ show_default_award_emojis boolean DEFAULT true,
+ allow_merge_on_skipped_pipeline boolean,
squash_option smallint DEFAULT 3,
has_confluence boolean DEFAULT false NOT NULL,
- cve_id_request_enabled boolean DEFAULT true NOT NULL,
has_vulnerabilities boolean DEFAULT false NOT NULL,
prevent_merge_without_jira_issue boolean DEFAULT false NOT NULL,
+ cve_id_request_enabled boolean DEFAULT true NOT NULL,
mr_default_target_self boolean DEFAULT false NOT NULL,
previous_default_branch text,
warn_about_potentially_unwanted_characters boolean DEFAULT true NOT NULL,
@@ -20207,8 +19889,11 @@ CREATE TABLE project_settings (
squash_commit_template text,
legacy_open_source_license_available boolean DEFAULT true NOT NULL,
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,
CONSTRAINT check_3a03e7557a CHECK ((char_length(previous_default_branch) <= 4096)),
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))
);
@@ -20228,11 +19913,12 @@ CREATE TABLE project_statistics (
snippets_size bigint,
pipeline_artifacts_size bigint DEFAULT 0 NOT NULL,
uploads_size bigint DEFAULT 0 NOT NULL,
- container_registry_size bigint DEFAULT 0 NOT NULL
+ container_registry_size bigint DEFAULT 0 NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL
);
CREATE SEQUENCE project_statistics_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -20258,23 +19944,6 @@ CREATE SEQUENCE project_topics_id_seq
ALTER SEQUENCE project_topics_id_seq OWNED BY project_topics.id;
-CREATE TABLE project_tracing_settings (
- id bigint NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- project_id integer NOT NULL,
- external_url character varying NOT NULL
-);
-
-CREATE SEQUENCE project_tracing_settings_id_seq
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
-
-ALTER SEQUENCE project_tracing_settings_id_seq OWNED BY project_tracing_settings.id;
-
CREATE TABLE projects (
id integer NOT NULL,
name character varying,
@@ -20289,16 +19958,25 @@ CREATE TABLE projects (
visibility_level integer DEFAULT 0 NOT NULL,
archived boolean DEFAULT false NOT NULL,
avatar character varying,
+ merge_requests_template text,
star_count integer DEFAULT 0 NOT NULL,
merge_requests_rebase_enabled boolean DEFAULT false,
import_type character varying,
import_source character varying,
- merge_requests_ff_only_enabled boolean DEFAULT false NOT NULL,
+ approvals_before_merge integer DEFAULT 0 NOT NULL,
+ reset_approvals_on_push boolean DEFAULT true,
+ merge_requests_ff_only_enabled boolean DEFAULT false,
+ issues_template text,
+ mirror boolean DEFAULT false NOT NULL,
+ mirror_last_update_at timestamp without time zone,
+ mirror_last_successful_update_at timestamp without time zone,
+ 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,
pending_delete boolean DEFAULT false,
public_builds boolean DEFAULT true NOT NULL,
last_repository_check_failed boolean,
@@ -20313,56 +19991,46 @@ CREATE TABLE projects (
lfs_enabled boolean,
description_html text,
only_allow_merge_if_all_discussions_are_resolved boolean,
+ repository_size_limit bigint,
printing_merge_request_link_enabled boolean DEFAULT true NOT NULL,
auto_cancel_pending_pipelines integer DEFAULT 1 NOT NULL,
+ service_desk_enabled boolean DEFAULT true,
cached_markdown_version integer,
delete_error text,
last_repository_updated_at timestamp without time zone,
+ disable_overriding_approvers_per_merge_request boolean,
storage_version smallint,
resolve_outdated_diff_discussions boolean,
- external_authorization_classification_label character varying,
+ remote_mirror_available_overridden boolean,
+ only_mirror_protected_branches boolean,
+ pull_mirror_available_overridden boolean,
jobs_cache_index integer,
+ external_authorization_classification_label character varying,
+ mirror_overwrites_diverged_branches boolean,
pages_https_only boolean DEFAULT true,
- remote_mirror_available_overridden boolean,
+ external_webhook_token character varying,
+ packages_enabled boolean,
+ merge_requests_author_approval boolean DEFAULT false,
pool_repository_id bigint,
runners_token_encrypted character varying,
bfg_object_map character varying,
detected_repository_languages boolean,
- disable_overriding_approvers_per_merge_request boolean,
- external_webhook_token character varying,
- issues_template text,
- merge_requests_author_approval boolean DEFAULT false,
merge_requests_disable_committers_approval boolean,
- merge_requests_template text,
- mirror_last_successful_update_at timestamp without time zone,
- mirror_last_update_at timestamp without time zone,
- mirror_overwrites_diverged_branches boolean,
- mirror_user_id integer,
- only_mirror_protected_branches boolean,
- packages_enabled boolean,
- pull_mirror_available_overridden boolean,
- repository_size_limit bigint,
require_password_to_approve boolean,
- mirror boolean DEFAULT false NOT NULL,
- mirror_trigger_builds boolean DEFAULT false NOT NULL,
- reset_approvals_on_push boolean DEFAULT true,
- service_desk_enabled boolean DEFAULT true,
- approvals_before_merge integer DEFAULT 0 NOT NULL,
emails_disabled boolean,
max_pages_size integer,
max_artifacts_size integer,
pull_mirror_branch_prefix character varying(50),
+ remove_source_branch_after_merge boolean,
marked_for_deletion_at date,
marked_for_deletion_by_user_id integer,
- remove_source_branch_after_merge boolean,
- suggestion_commit_message character varying(255),
autoclose_referenced_issues boolean,
+ suggestion_commit_message character varying(255),
project_namespace_id bigint,
hidden boolean DEFAULT false NOT NULL
);
CREATE SEQUENCE projects_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -20418,7 +20086,6 @@ CREATE TABLE prometheus_alerts (
);
CREATE SEQUENCE prometheus_alerts_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -20445,7 +20112,6 @@ CREATE TABLE prometheus_metrics (
);
CREATE SEQUENCE prometheus_metrics_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -20460,12 +20126,11 @@ CREATE TABLE protected_branch_merge_access_levels (
access_level integer DEFAULT 40,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
- group_id integer,
- user_id integer
+ user_id integer,
+ group_id integer
);
CREATE SEQUENCE protected_branch_merge_access_levels_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -20480,13 +20145,12 @@ CREATE TABLE protected_branch_push_access_levels (
access_level integer DEFAULT 40,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
- group_id integer,
user_id integer,
+ group_id integer,
deploy_key_id integer
);
CREATE SEQUENCE protected_branch_push_access_levels_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -20504,7 +20168,6 @@ CREATE TABLE protected_branch_unprotect_access_levels (
);
CREATE SEQUENCE protected_branch_unprotect_access_levels_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -20524,7 +20187,6 @@ CREATE TABLE protected_branches (
);
CREATE SEQUENCE protected_branches_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -20542,6 +20204,7 @@ CREATE TABLE protected_environment_approval_rules (
updated_at timestamp with time zone NOT NULL,
access_level smallint,
required_approvals smallint NOT NULL,
+ group_inheritance_type smallint DEFAULT 0 NOT NULL,
CONSTRAINT chk_rails_bed75249bc CHECK ((((access_level IS NOT NULL) AND (group_id IS NULL) AND (user_id IS NULL)) OR ((user_id IS NOT NULL) AND (access_level IS NULL) AND (group_id IS NULL)) OR ((group_id IS NOT NULL) AND (user_id IS NULL) AND (access_level IS NULL)))),
CONSTRAINT chk_rails_cfa90ae3b5 CHECK ((required_approvals > 0))
);
@@ -20562,11 +20225,11 @@ CREATE TABLE protected_environment_deploy_access_levels (
access_level integer DEFAULT 40,
protected_environment_id integer NOT NULL,
user_id integer,
- group_id integer
+ group_id integer,
+ group_inheritance_type smallint DEFAULT 0 NOT NULL
);
CREATE SEQUENCE protected_environment_deploy_access_levels_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -20588,7 +20251,6 @@ CREATE TABLE protected_environments (
);
CREATE SEQUENCE protected_environments_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -20608,7 +20270,6 @@ CREATE TABLE protected_tag_create_access_levels (
);
CREATE SEQUENCE protected_tag_create_access_levels_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -20626,7 +20287,6 @@ CREATE TABLE protected_tags (
);
CREATE SEQUENCE protected_tags_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -20670,7 +20330,6 @@ CREATE TABLE push_rules (
);
CREATE SEQUENCE push_rules_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -20708,7 +20367,6 @@ CREATE TABLE redirect_routes (
);
CREATE SEQUENCE redirect_routes_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -20771,7 +20429,6 @@ CREATE TABLE releases (
);
CREATE SEQUENCE releases_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -20788,21 +20445,20 @@ CREATE TABLE remote_mirrors (
update_status character varying,
last_update_at timestamp without time zone,
last_successful_update_at timestamp without time zone,
- last_update_started_at timestamp without time zone,
last_error character varying,
- only_protected_branches boolean DEFAULT false NOT NULL,
- remote_name character varying,
encrypted_credentials text,
encrypted_credentials_iv character varying,
encrypted_credentials_salt character varying,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
+ last_update_started_at timestamp without time zone,
+ only_protected_branches boolean DEFAULT false NOT NULL,
+ remote_name character varying,
error_notification_sent boolean,
keep_divergent_refs boolean
);
CREATE SEQUENCE remote_mirrors_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -20835,19 +20491,20 @@ ALTER SEQUENCE required_code_owners_sections_id_seq OWNED BY required_code_owner
CREATE TABLE requirements (
id bigint NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
+ created_at timestamp with time zone,
+ updated_at timestamp with time zone,
project_id integer NOT NULL,
author_id integer,
iid integer NOT NULL,
cached_markdown_version integer,
- state smallint DEFAULT 1 NOT NULL,
- title character varying(255) NOT NULL,
+ state smallint DEFAULT 1,
+ title character varying(255),
title_html text,
description text,
description_html text,
issue_id bigint,
- CONSTRAINT check_785ae25b9d CHECK ((char_length(description) <= 10000))
+ CONSTRAINT check_785ae25b9d CHECK ((char_length(description) <= 10000)),
+ CONSTRAINT check_requirement_issue_not_null CHECK ((issue_id IS NOT NULL))
);
CREATE SEQUENCE requirements_id_seq
@@ -20862,7 +20519,6 @@ ALTER SEQUENCE requirements_id_seq OWNED BY requirements.id;
CREATE TABLE requirements_management_test_reports (
id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
- requirement_id bigint,
author_id bigint,
state smallint NOT NULL,
build_id bigint,
@@ -20902,13 +20558,13 @@ CREATE TABLE resource_label_events (
action integer NOT NULL,
issue_id integer,
merge_request_id integer,
+ epic_id integer,
label_id integer,
user_id integer,
created_at timestamp with time zone NOT NULL,
cached_markdown_version integer,
reference text,
- reference_html text,
- epic_id integer
+ reference_html text
);
CREATE SEQUENCE resource_label_events_id_seq
@@ -21007,11 +20663,11 @@ CREATE TABLE routes (
created_at timestamp without time zone,
updated_at timestamp without time zone,
name character varying,
- namespace_id bigint
+ namespace_id bigint,
+ CONSTRAINT check_af84c6c93f CHECK ((namespace_id IS NOT NULL))
);
CREATE SEQUENCE routes_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21053,7 +20709,6 @@ CREATE TABLE saml_providers (
);
CREATE SEQUENCE saml_providers_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21082,6 +20737,82 @@ CREATE SEQUENCE saved_replies_id_seq
ALTER SEQUENCE saved_replies_id_seq OWNED BY saved_replies.id;
+CREATE TABLE sbom_component_versions (
+ id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ component_id bigint NOT NULL,
+ version text NOT NULL,
+ CONSTRAINT check_e71cad08d3 CHECK ((char_length(version) <= 255))
+);
+
+CREATE SEQUENCE sbom_component_versions_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE sbom_component_versions_id_seq OWNED BY sbom_component_versions.id;
+
+CREATE TABLE sbom_components (
+ id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ component_type smallint NOT NULL,
+ name text NOT NULL,
+ CONSTRAINT check_91a8f6ad53 CHECK ((char_length(name) <= 255))
+);
+
+CREATE SEQUENCE sbom_components_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE sbom_components_id_seq OWNED BY sbom_components.id;
+
+CREATE TABLE sbom_occurrences (
+ id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ component_version_id bigint,
+ project_id bigint NOT NULL,
+ pipeline_id bigint,
+ source_id bigint,
+ commit_sha bytea NOT NULL,
+ component_id bigint NOT NULL
+);
+
+CREATE SEQUENCE sbom_occurrences_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE sbom_occurrences_id_seq OWNED BY sbom_occurrences.id;
+
+CREATE TABLE sbom_sources (
+ id bigint NOT NULL,
+ 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
+);
+
+CREATE SEQUENCE sbom_sources_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE sbom_sources_id_seq OWNED BY sbom_sources.id;
+
+
CREATE TABLE scim_identities (
id bigint NOT NULL,
group_id bigint NOT NULL,
@@ -21110,7 +20841,6 @@ CREATE TABLE scim_oauth_access_tokens (
);
CREATE SEQUENCE scim_oauth_access_tokens_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21129,8 +20859,10 @@ CREATE TABLE security_findings (
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_b9508c6df8 CHECK ((char_length(project_fingerprint) <= 40)),
+ CONSTRAINT check_partition_number CHECK ((partition_number = 1))
);
CREATE SEQUENCE security_findings_id_seq
@@ -21198,7 +20930,8 @@ CREATE TABLE security_scans (
project_id bigint,
pipeline_id bigint,
latest boolean DEFAULT true NOT NULL,
- status smallint DEFAULT 0 NOT NULL
+ status smallint DEFAULT 0 NOT NULL,
+ findings_partition_number integer DEFAULT 1 NOT NULL
);
CREATE SEQUENCE security_scans_id_seq
@@ -21275,8 +21008,8 @@ ALTER SEQUENCE self_managed_prometheus_alert_events_id_seq OWNED BY self_managed
CREATE TABLE sent_notifications (
id integer NOT NULL,
project_id integer,
- noteable_type character varying,
noteable_id integer,
+ noteable_type character varying,
recipient_id integer,
commit_id character varying,
reply_key character varying NOT NULL,
@@ -21287,7 +21020,6 @@ CREATE TABLE sent_notifications (
);
CREATE SEQUENCE sent_notifications_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21312,12 +21044,12 @@ CREATE SEQUENCE sentry_issues_id_seq
ALTER SEQUENCE sentry_issues_id_seq OWNED BY sentry_issues.id;
CREATE TABLE serverless_domain_cluster (
+ uuid character varying(14) NOT NULL,
pages_domain_id bigint NOT NULL,
clusters_applications_knative_id bigint NOT NULL,
creator_id bigint,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
- uuid character varying(14) NOT NULL,
encrypted_key text,
encrypted_key_iv character varying(255),
certificate text
@@ -21337,7 +21069,6 @@ CREATE TABLE shards (
);
CREATE SEQUENCE shards_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21348,17 +21079,21 @@ ALTER SEQUENCE shards_id_seq OWNED BY shards.id;
CREATE TABLE slack_integrations (
id integer NOT NULL,
- service_id integer NOT NULL,
team_id character varying NOT NULL,
team_name character varying NOT NULL,
alias character varying NOT NULL,
user_id character varying NOT NULL,
created_at timestamp without time zone NOT NULL,
- updated_at timestamp without time zone NOT NULL
+ updated_at timestamp without time zone NOT NULL,
+ bot_user_id text,
+ encrypted_bot_access_token bytea,
+ encrypted_bot_access_token_iv bytea,
+ integration_id integer,
+ CONSTRAINT check_bc553aea8a CHECK ((char_length(bot_user_id) <= 255)),
+ CONSTRAINT check_c9ca9ae80d CHECK ((integration_id IS NOT NULL))
);
CREATE SEQUENCE slack_integrations_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21384,8 +21119,8 @@ CREATE SEQUENCE smartcard_identities_id_seq
ALTER SEQUENCE smartcard_identities_id_seq OWNED BY smartcard_identities.id;
CREATE TABLE snippet_repositories (
- shard_id bigint NOT NULL,
snippet_id bigint NOT NULL,
+ shard_id bigint NOT NULL,
disk_path character varying(80) NOT NULL,
verification_retry_count smallint,
verification_retry_at timestamp with time zone,
@@ -21466,7 +21201,6 @@ CREATE TABLE snippets (
);
CREATE SEQUENCE snippets_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21479,14 +21213,12 @@ CREATE TABLE software_license_policies (
id integer NOT NULL,
project_id integer NOT NULL,
software_license_id integer NOT NULL,
- classification integer DEFAULT 0,
+ classification integer DEFAULT 0 NOT NULL,
created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- CONSTRAINT check_8e8751b568 CHECK ((classification IS NOT NULL))
+ updated_at timestamp with time zone NOT NULL
);
CREATE SEQUENCE software_license_policies_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21502,7 +21234,6 @@ CREATE TABLE software_licenses (
);
CREATE SEQUENCE software_licenses_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21527,7 +21258,6 @@ CREATE TABLE spam_logs (
);
CREATE SEQUENCE spam_logs_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21566,6 +21296,25 @@ CREATE SEQUENCE sprints_id_seq
ALTER SEQUENCE sprints_id_seq OWNED BY sprints.id;
+CREATE TABLE ssh_signatures (
+ 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,
+ key_id bigint,
+ verification_status smallint DEFAULT 0 NOT NULL,
+ commit_sha bytea NOT NULL
+);
+
+CREATE SEQUENCE ssh_signatures_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE ssh_signatures_id_seq OWNED BY ssh_signatures.id;
+
CREATE TABLE status_check_responses (
id bigint NOT NULL,
merge_request_id bigint NOT NULL,
@@ -21626,8 +21375,8 @@ ALTER SEQUENCE status_page_settings_project_id_seq OWNED BY status_page_settings
CREATE TABLE subscriptions (
id integer NOT NULL,
user_id integer,
- subscribable_type character varying,
subscribable_id integer,
+ subscribable_type character varying,
subscribed boolean,
created_at timestamp without time zone,
updated_at timestamp without time zone,
@@ -21635,7 +21384,6 @@ CREATE TABLE subscriptions (
);
CREATE SEQUENCE subscriptions_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21677,7 +21425,6 @@ CREATE TABLE system_note_metadata (
);
CREATE SEQUENCE system_note_metadata_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21698,7 +21445,6 @@ CREATE TABLE taggings (
);
CREATE SEQUENCE taggings_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21714,7 +21460,6 @@ CREATE TABLE tags (
);
CREATE SEQUENCE tags_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21733,7 +21478,6 @@ CREATE TABLE term_agreements (
);
CREATE SEQUENCE term_agreements_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21784,7 +21528,8 @@ CREATE TABLE terraform_states (
locked_by_user_id bigint,
uuid character varying(32) NOT NULL,
name character varying(255) NOT NULL,
- versioning_enabled boolean DEFAULT true NOT NULL
+ versioning_enabled boolean DEFAULT true NOT NULL,
+ deleted_at timestamp with time zone
);
CREATE SEQUENCE terraform_states_id_seq
@@ -21796,6 +21541,30 @@ CREATE SEQUENCE terraform_states_id_seq
ALTER SEQUENCE terraform_states_id_seq OWNED BY terraform_states.id;
+CREATE TABLE timelog_categories (
+ id bigint NOT NULL,
+ namespace_id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ billing_rate numeric(18,4) DEFAULT 0.0,
+ billable boolean DEFAULT false NOT NULL,
+ name text NOT NULL,
+ description text,
+ color text DEFAULT '#6699cc'::text NOT NULL,
+ CONSTRAINT check_37ad5f23d7 CHECK ((char_length(name) <= 255)),
+ CONSTRAINT check_4ba862ba3e CHECK ((char_length(color) <= 7)),
+ CONSTRAINT check_c4b8aec13a CHECK ((char_length(description) <= 1024))
+);
+
+CREATE SEQUENCE timelog_categories_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE timelog_categories_id_seq OWNED BY timelog_categories.id;
+
CREATE TABLE timelogs (
id integer NOT NULL,
time_spent integer NOT NULL,
@@ -21804,7 +21573,7 @@ CREATE TABLE timelogs (
updated_at timestamp without time zone NOT NULL,
issue_id integer,
merge_request_id integer,
- spent_at timestamp with time zone DEFAULT now(),
+ spent_at timestamp without time zone DEFAULT now(),
note_id integer,
project_id integer,
summary text,
@@ -21812,7 +21581,6 @@ CREATE TABLE timelogs (
);
CREATE SEQUENCE timelogs_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21825,8 +21593,8 @@ CREATE TABLE todos (
id integer NOT NULL,
user_id integer NOT NULL,
project_id integer,
- target_type character varying NOT NULL,
target_id integer,
+ target_type character varying NOT NULL,
author_id integer NOT NULL,
action integer NOT NULL,
state character varying NOT NULL,
@@ -21839,7 +21607,6 @@ CREATE TABLE todos (
);
CREATE SEQUENCE todos_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21873,6 +21640,8 @@ CREATE TABLE topics (
description text,
total_projects_count bigint DEFAULT 0 NOT NULL,
non_private_projects_count bigint DEFAULT 0 NOT NULL,
+ title text,
+ CONSTRAINT check_223b50f9be CHECK ((char_length(title) <= 255)),
CONSTRAINT check_26753fb43a CHECK ((char_length(avatar) <= 255)),
CONSTRAINT check_5d1a07c8c8 CHECK ((char_length(description) <= 1024)),
CONSTRAINT check_7a90d4c757 CHECK ((char_length(name) <= 255))
@@ -21893,7 +21662,6 @@ CREATE TABLE trending_projects (
);
CREATE SEQUENCE trending_projects_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21915,7 +21683,6 @@ CREATE TABLE u2f_registrations (
);
CREATE SEQUENCE u2f_registrations_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21968,8 +21735,8 @@ CREATE TABLE uploads (
size bigint NOT NULL,
path character varying(511) NOT NULL,
checksum character varying(64),
- model_type character varying,
model_id integer,
+ model_type character varying,
uploader character varying NOT NULL,
created_at timestamp without time zone NOT NULL,
store integer DEFAULT 1,
@@ -21979,7 +21746,6 @@ CREATE TABLE uploads (
);
CREATE SEQUENCE uploads_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -22000,7 +21766,6 @@ CREATE TABLE user_agent_details (
);
CREATE SEQUENCE user_agent_details_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -22017,7 +21782,6 @@ CREATE TABLE user_callouts (
);
CREATE SEQUENCE user_callouts_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -22057,15 +21821,14 @@ CREATE TABLE user_credit_card_validations (
CREATE TABLE user_custom_attributes (
id integer NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
+ created_at timestamp without time zone NOT NULL,
+ updated_at timestamp without time zone NOT NULL,
user_id integer NOT NULL,
key character varying NOT NULL,
value character varying NOT NULL
);
CREATE SEQUENCE user_custom_attributes_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -22079,8 +21842,8 @@ 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,
- provisioned_by_group_id bigint,
other_role text,
+ provisioned_by_group_id bigint,
pronouns text,
pronunciation text,
registration_objective smallint,
@@ -22127,8 +21890,8 @@ CREATE SEQUENCE user_group_callouts_id_seq
ALTER SEQUENCE user_group_callouts_id_seq OWNED BY user_group_callouts.id;
CREATE TABLE user_highest_roles (
- updated_at timestamp with time zone NOT NULL,
user_id bigint NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
highest_access_level integer
);
@@ -22137,6 +21900,23 @@ CREATE TABLE user_interacted_projects (
project_id integer NOT NULL
);
+CREATE TABLE user_namespace_callouts (
+ id bigint NOT NULL,
+ user_id bigint NOT NULL,
+ namespace_id bigint NOT NULL,
+ dismissed_at timestamp with time zone,
+ feature_name smallint NOT NULL
+);
+
+CREATE SEQUENCE user_namespace_callouts_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE user_namespace_callouts_id_seq OWNED BY user_namespace_callouts.id;
+
CREATE TABLE user_permission_export_uploads (
id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
@@ -22164,20 +21944,20 @@ CREATE TABLE user_preferences (
merge_request_notes_filter smallint DEFAULT 0 NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
- first_day_of_week integer,
+ epics_sort character varying,
+ roadmap_epics_state integer,
+ epic_notes_filter smallint DEFAULT 0 NOT NULL,
issues_sort character varying,
merge_requests_sort character varying,
+ roadmaps_sort character varying,
+ first_day_of_week integer,
timezone character varying,
time_display_relative boolean,
time_format_in_24h boolean,
- epic_notes_filter smallint DEFAULT 0 NOT NULL,
- epics_sort character varying,
- roadmap_epics_state integer,
- roadmaps_sort character varying,
projects_sort character varying(64),
show_whitespace_in_diffs boolean DEFAULT true NOT NULL,
- setup_for_company boolean,
sourcegraph_enabled boolean,
+ setup_for_company boolean,
render_whitespace_in_code boolean,
tab_width smallint,
experience_level smallint,
@@ -22191,7 +21971,6 @@ CREATE TABLE user_preferences (
);
CREATE SEQUENCE user_preferences_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -22200,6 +21979,23 @@ CREATE SEQUENCE user_preferences_id_seq
ALTER SEQUENCE user_preferences_id_seq OWNED BY user_preferences.id;
+CREATE TABLE user_project_callouts (
+ id bigint NOT NULL,
+ user_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ feature_name smallint NOT NULL,
+ dismissed_at timestamp with time zone
+);
+
+CREATE SEQUENCE user_project_callouts_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE user_project_callouts_id_seq OWNED BY user_project_callouts.id;
+
CREATE TABLE user_statuses (
user_id integer NOT NULL,
cached_markdown_version integer,
@@ -22211,7 +22007,6 @@ CREATE TABLE user_statuses (
);
CREATE SEQUENCE user_statuses_user_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -22230,7 +22025,6 @@ CREATE TABLE user_synced_attributes_metadata (
);
CREATE SEQUENCE user_synced_attributes_metadata_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -22276,6 +22070,7 @@ CREATE TABLE users (
unconfirmed_email character varying,
hide_no_ssh_key boolean DEFAULT false,
website_url character varying DEFAULT ''::character varying NOT NULL,
+ admin_email_unsubscribed_at timestamp without time zone,
notification_email character varying,
hide_no_password boolean DEFAULT false,
password_automatically_set boolean DEFAULT false,
@@ -22291,35 +22086,34 @@ CREATE TABLE users (
consumed_timestep integer,
layout integer DEFAULT 0,
hide_project_limit boolean DEFAULT false,
+ note text,
unlock_token character varying,
otp_grace_period_started_at timestamp without time zone,
external boolean DEFAULT false,
incoming_email_token character varying,
organization character varying,
+ auditor boolean DEFAULT false NOT NULL,
require_two_factor_authentication_from_group boolean DEFAULT false NOT NULL,
two_factor_grace_period integer DEFAULT 48 NOT NULL,
last_activity_on date,
notified_of_own_activity boolean,
preferred_language character varying,
+ email_opted_in boolean,
+ email_opted_in_ip character varying,
+ email_opted_in_source_id integer,
+ email_opted_in_at timestamp without time zone,
theme_id smallint,
- include_private_contributions boolean,
- feed_token character varying,
accepted_term_id integer,
+ feed_token character varying,
private_profile boolean DEFAULT false NOT NULL,
+ roadmap_layout smallint,
+ include_private_contributions boolean,
commit_email character varying,
- auditor boolean DEFAULT false NOT NULL,
- admin_email_unsubscribed_at timestamp without time zone,
- email_opted_in boolean,
- email_opted_in_at timestamp without time zone,
- email_opted_in_ip character varying,
- email_opted_in_source_id integer,
group_view integer,
managing_group_id integer,
- note text,
- roadmap_layout smallint,
- static_object_token character varying(255),
first_name character varying(255),
last_name character varying(255),
+ static_object_token character varying(255),
role smallint,
user_type smallint,
static_object_token_encrypted text,
@@ -22328,7 +22122,6 @@ CREATE TABLE users (
);
CREATE SEQUENCE users_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -22368,7 +22161,6 @@ CREATE TABLE users_star_projects (
);
CREATE SEQUENCE users_star_projects_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -22409,26 +22201,26 @@ CREATE TABLE vulnerabilities (
author_id bigint NOT NULL,
updated_by_id bigint,
last_edited_by_id bigint,
- start_date_sourcing_milestone_id bigint,
- due_date_sourcing_milestone_id bigint,
+ start_date date,
+ due_date date,
last_edited_at timestamp with time zone,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
- start_date date,
- due_date date,
- state smallint DEFAULT 1 NOT NULL,
- severity smallint NOT NULL,
- confidence smallint NOT NULL,
- severity_overridden boolean DEFAULT false,
- confidence_overridden boolean DEFAULT false,
title character varying(255) NOT NULL,
title_html text,
description text,
description_html text,
- report_type smallint NOT NULL,
- cached_markdown_version integer,
+ start_date_sourcing_milestone_id bigint,
+ due_date_sourcing_milestone_id bigint,
+ state smallint DEFAULT 1 NOT NULL,
+ severity smallint NOT NULL,
+ severity_overridden boolean DEFAULT false,
+ confidence smallint NOT NULL,
+ confidence_overridden boolean DEFAULT false,
resolved_by_id bigint,
resolved_at timestamp with time zone,
+ report_type smallint NOT NULL,
+ cached_markdown_version integer,
confirmed_by_id bigint,
confirmed_at timestamp with time zone,
dismissed_at timestamp with time zone,
@@ -22514,7 +22306,6 @@ CREATE TABLE vulnerability_feedback (
);
CREATE SEQUENCE vulnerability_feedback_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -22680,6 +22471,23 @@ CREATE SEQUENCE vulnerability_issue_links_id_seq
ALTER SEQUENCE vulnerability_issue_links_id_seq OWNED BY vulnerability_issue_links.id;
+CREATE TABLE vulnerability_merge_request_links (
+ id bigint NOT NULL,
+ vulnerability_id bigint NOT NULL,
+ merge_request_id integer NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL
+);
+
+CREATE SEQUENCE vulnerability_merge_request_links_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE vulnerability_merge_request_links_id_seq OWNED BY vulnerability_merge_request_links.id;
+
CREATE TABLE vulnerability_occurrence_identifiers (
id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
@@ -22738,7 +22546,6 @@ CREATE TABLE vulnerability_occurrences (
cve text,
location jsonb,
detection_method smallint DEFAULT 0 NOT NULL,
- migrated_to_new_structure boolean DEFAULT false 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)),
@@ -22767,6 +22574,8 @@ CREATE TABLE vulnerability_reads (
uuid uuid NOT NULL,
location_image text,
cluster_agent_id text,
+ casted_cluster_agent_id bigint,
+ namespace_id bigint,
CONSTRAINT check_380451bdbe CHECK ((char_length(location_image) <= 2048)),
CONSTRAINT check_a105eb825a CHECK ((char_length(cluster_agent_id) <= 10))
);
@@ -22823,6 +22632,27 @@ CREATE SEQUENCE vulnerability_scanners_id_seq
ALTER SEQUENCE vulnerability_scanners_id_seq OWNED BY vulnerability_scanners.id;
+CREATE TABLE vulnerability_state_transitions (
+ id bigint NOT NULL,
+ vulnerability_id bigint NOT NULL,
+ to_state smallint NOT NULL,
+ from_state smallint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ author_id bigint,
+ comment text,
+ CONSTRAINT check_fca4a7ca39 CHECK ((char_length(comment) <= 255))
+);
+
+CREATE SEQUENCE vulnerability_state_transitions_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE vulnerability_state_transitions_id_seq OWNED BY vulnerability_state_transitions.id;
+
CREATE TABLE vulnerability_statistics (
id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
@@ -22866,6 +22696,15 @@ CREATE SEQUENCE vulnerability_user_mentions_id_seq
ALTER SEQUENCE vulnerability_user_mentions_id_seq OWNED BY vulnerability_user_mentions.id;
+CREATE SEQUENCE web_hook_logs_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE web_hook_logs_id_seq OWNED BY web_hook_logs.id;
+
CREATE TABLE web_hooks (
id integer NOT NULL,
project_id integer,
@@ -22877,6 +22716,7 @@ CREATE TABLE web_hooks (
issues_events boolean DEFAULT false NOT NULL,
merge_requests_events boolean DEFAULT false NOT NULL,
tag_push_events boolean DEFAULT false,
+ group_id integer,
note_events boolean DEFAULT false NOT NULL,
enable_ssl_verification boolean DEFAULT true,
wiki_page_events boolean DEFAULT false NOT NULL,
@@ -22890,19 +22730,19 @@ CREATE TABLE web_hooks (
encrypted_token_iv character varying,
encrypted_url character varying,
encrypted_url_iv character varying,
- group_id integer,
deployment_events boolean DEFAULT false NOT NULL,
- feature_flag_events boolean DEFAULT false NOT NULL,
releases_events boolean DEFAULT false NOT NULL,
+ feature_flag_events boolean DEFAULT false NOT NULL,
member_events boolean DEFAULT false NOT NULL,
subgroup_events boolean DEFAULT false NOT NULL,
recent_failures smallint DEFAULT 0 NOT NULL,
backoff_count smallint DEFAULT 0 NOT NULL,
- disabled_until timestamp with time zone
+ disabled_until timestamp with time zone,
+ encrypted_url_variables bytea,
+ encrypted_url_variables_iv bytea
);
CREATE SEQUENCE web_hooks_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -22922,7 +22762,7 @@ CREATE TABLE webauthn_registrations (
public_key text NOT NULL,
u2f_registration_id integer,
CONSTRAINT check_2f02e74321 CHECK ((char_length(name) <= 255)),
- CONSTRAINT check_e54008d9ce CHECK ((char_length(credential_xid) <= 340))
+ CONSTRAINT check_f5ab2b551a CHECK ((char_length(credential_xid) <= 1364))
);
CREATE SEQUENCE webauthn_registrations_id_seq
@@ -22943,7 +22783,6 @@ CREATE TABLE wiki_page_meta (
);
CREATE SEQUENCE wiki_page_meta_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -22962,7 +22801,6 @@ CREATE TABLE wiki_page_slugs (
);
CREATE SEQUENCE wiki_page_slugs_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -22971,6 +22809,24 @@ CREATE SEQUENCE wiki_page_slugs_id_seq
ALTER SEQUENCE wiki_page_slugs_id_seq OWNED BY wiki_page_slugs.id;
+CREATE TABLE work_item_parent_links (
+ id bigint NOT NULL,
+ work_item_id bigint NOT NULL,
+ work_item_parent_id bigint NOT NULL,
+ relative_position integer,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL
+);
+
+CREATE SEQUENCE work_item_parent_links_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE work_item_parent_links_id_seq OWNED BY work_item_parent_links.id;
+
CREATE TABLE work_item_types (
id bigint NOT NULL,
base_type smallint DEFAULT 0 NOT NULL,
@@ -23166,6 +23022,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_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);
ALTER TABLE ONLY award_emoji ALTER COLUMN id SET DEFAULT nextval('award_emoji_id_seq'::regclass);
@@ -23230,8 +23088,6 @@ ALTER TABLE ONLY ci_build_needs ALTER COLUMN id SET DEFAULT nextval('ci_build_ne
ALTER TABLE ONLY ci_build_pending_states ALTER COLUMN id SET DEFAULT nextval('ci_build_pending_states_id_seq'::regclass);
-ALTER TABLE ONLY ci_build_report_results ALTER COLUMN build_id SET DEFAULT nextval('ci_build_report_results_build_id_seq'::regclass);
-
ALTER TABLE ONLY ci_build_trace_chunks ALTER COLUMN id SET DEFAULT nextval('ci_build_trace_chunks_id_seq'::regclass);
ALTER TABLE ONLY ci_builds ALTER COLUMN id SET DEFAULT nextval('ci_builds_id_seq'::regclass);
@@ -23250,8 +23106,6 @@ ALTER TABLE ONLY ci_group_variables ALTER COLUMN id SET DEFAULT nextval('ci_grou
ALTER TABLE ONLY ci_instance_variables ALTER COLUMN id SET DEFAULT nextval('ci_instance_variables_id_seq'::regclass);
-ALTER TABLE ONLY ci_job_artifact_states ALTER COLUMN job_artifact_id SET DEFAULT nextval('ci_job_artifact_states_job_artifact_id_seq'::regclass);
-
ALTER TABLE ONLY ci_job_artifacts ALTER COLUMN id SET DEFAULT nextval('ci_job_artifacts_id_seq'::regclass);
ALTER TABLE ONLY ci_job_token_project_scope_links ALTER COLUMN id SET DEFAULT nextval('ci_job_token_project_scope_links_id_seq'::regclass);
@@ -23280,8 +23134,6 @@ ALTER TABLE ONLY ci_pipeline_variables ALTER COLUMN id SET DEFAULT nextval('ci_p
ALTER TABLE ONLY ci_pipelines ALTER COLUMN id SET DEFAULT nextval('ci_pipelines_id_seq'::regclass);
-ALTER TABLE ONLY ci_pipelines_config ALTER COLUMN pipeline_id SET DEFAULT nextval('ci_pipelines_config_pipeline_id_seq'::regclass);
-
ALTER TABLE ONLY ci_platform_metrics ALTER COLUMN id SET DEFAULT nextval('ci_platform_metrics_id_seq'::regclass);
ALTER TABLE ONLY ci_project_mirrors ALTER COLUMN id SET DEFAULT nextval('ci_project_mirrors_id_seq'::regclass);
@@ -23302,6 +23154,8 @@ ALTER TABLE ONLY ci_runners ALTER COLUMN id SET DEFAULT nextval('ci_runners_id_s
ALTER TABLE ONLY ci_running_builds ALTER COLUMN id SET DEFAULT nextval('ci_running_builds_id_seq'::regclass);
+ALTER TABLE ONLY ci_secure_file_states ALTER COLUMN ci_secure_file_id SET DEFAULT nextval('ci_secure_file_states_ci_secure_file_id_seq'::regclass);
+
ALTER TABLE ONLY ci_secure_files ALTER COLUMN id SET DEFAULT nextval('ci_secure_files_id_seq'::regclass);
ALTER TABLE ONLY ci_sources_pipelines ALTER COLUMN id SET DEFAULT nextval('ci_sources_pipelines_id_seq'::regclass);
@@ -23326,6 +23180,8 @@ ALTER TABLE ONLY cluster_agent_tokens ALTER COLUMN id SET DEFAULT nextval('clust
ALTER TABLE ONLY cluster_agents ALTER COLUMN id SET DEFAULT nextval('cluster_agents_id_seq'::regclass);
+ALTER TABLE ONLY cluster_enabled_grants ALTER COLUMN id SET DEFAULT nextval('cluster_enabled_grants_id_seq'::regclass);
+
ALTER TABLE ONLY cluster_groups ALTER COLUMN id SET DEFAULT nextval('cluster_groups_id_seq'::regclass);
ALTER TABLE ONLY cluster_platforms_kubernetes ALTER COLUMN id SET DEFAULT nextval('cluster_platforms_kubernetes_id_seq'::regclass);
@@ -23344,8 +23200,6 @@ ALTER TABLE ONLY clusters_applications_cilium ALTER COLUMN id SET DEFAULT nextva
ALTER TABLE ONLY clusters_applications_crossplane ALTER COLUMN id SET DEFAULT nextval('clusters_applications_crossplane_id_seq'::regclass);
-ALTER TABLE ONLY clusters_applications_elastic_stacks ALTER COLUMN id SET DEFAULT nextval('clusters_applications_elastic_stacks_id_seq'::regclass);
-
ALTER TABLE ONLY clusters_applications_helm ALTER COLUMN id SET DEFAULT nextval('clusters_applications_helm_id_seq'::regclass);
ALTER TABLE ONLY clusters_applications_ingress ALTER COLUMN id SET DEFAULT nextval('clusters_applications_ingress_id_seq'::regclass);
@@ -23424,6 +23278,8 @@ ALTER TABLE ONLY detached_partitions ALTER COLUMN id SET DEFAULT nextval('detach
ALTER TABLE ONLY diff_note_positions ALTER COLUMN id SET DEFAULT nextval('diff_note_positions_id_seq'::regclass);
+ALTER TABLE ONLY dingtalk_tracker_data ALTER COLUMN id SET DEFAULT nextval('dingtalk_tracker_data_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);
@@ -23494,10 +23350,6 @@ ALTER TABLE ONLY geo_hashed_storage_attachments_events ALTER COLUMN id SET DEFAU
ALTER TABLE ONLY geo_hashed_storage_migrated_events ALTER COLUMN id SET DEFAULT nextval('geo_hashed_storage_migrated_events_id_seq'::regclass);
-ALTER TABLE ONLY geo_job_artifact_deleted_events ALTER COLUMN id SET DEFAULT nextval('geo_job_artifact_deleted_events_id_seq'::regclass);
-
-ALTER TABLE ONLY geo_lfs_object_deleted_events ALTER COLUMN id SET DEFAULT nextval('geo_lfs_object_deleted_events_id_seq'::regclass);
-
ALTER TABLE ONLY geo_node_namespace_links ALTER COLUMN id SET DEFAULT nextval('geo_node_namespace_links_id_seq'::regclass);
ALTER TABLE ONLY geo_node_statuses ALTER COLUMN id SET DEFAULT nextval('geo_node_statuses_id_seq'::regclass);
@@ -23586,6 +23438,8 @@ ALTER TABLE ONLY ip_restrictions ALTER COLUMN id SET DEFAULT nextval('ip_restric
ALTER TABLE ONLY issuable_metric_images ALTER COLUMN id SET DEFAULT nextval('issuable_metric_images_id_seq'::regclass);
+ALTER TABLE ONLY issuable_resource_links ALTER COLUMN id SET DEFAULT nextval('issuable_resource_links_id_seq'::regclass);
+
ALTER TABLE ONLY issuable_severities ALTER COLUMN id SET DEFAULT nextval('issuable_severities_id_seq'::regclass);
ALTER TABLE ONLY issuable_slas ALTER COLUMN id SET DEFAULT nextval('issuable_slas_id_seq'::regclass);
@@ -23642,6 +23496,8 @@ ALTER TABLE ONLY lists ALTER COLUMN id SET DEFAULT nextval('lists_id_seq'::regcl
ALTER TABLE ONLY loose_foreign_keys_deleted_records ALTER COLUMN id SET DEFAULT nextval('loose_foreign_keys_deleted_records_id_seq'::regclass);
+ALTER TABLE ONLY member_roles ALTER COLUMN id SET DEFAULT nextval('member_roles_id_seq'::regclass);
+
ALTER TABLE ONLY member_tasks ALTER COLUMN id SET DEFAULT nextval('member_tasks_id_seq'::regclass);
ALTER TABLE ONLY members ALTER COLUMN id SET DEFAULT nextval('members_id_seq'::regclass);
@@ -23680,11 +23536,17 @@ ALTER TABLE ONLY metrics_users_starred_dashboards ALTER COLUMN id SET DEFAULT ne
ALTER TABLE ONLY milestones ALTER COLUMN id SET DEFAULT nextval('milestones_id_seq'::regclass);
-ALTER TABLE ONLY namespace_admin_notes ALTER COLUMN id SET DEFAULT nextval('namespace_admin_notes_id_seq'::regclass);
+ALTER TABLE ONLY ml_candidate_metrics ALTER COLUMN id SET DEFAULT nextval('ml_candidate_metrics_id_seq'::regclass);
+
+ALTER TABLE ONLY ml_candidate_params ALTER COLUMN id SET DEFAULT nextval('ml_candidate_params_id_seq'::regclass);
-ALTER TABLE ONLY namespace_aggregation_schedules ALTER COLUMN namespace_id SET DEFAULT nextval('namespace_aggregation_schedules_namespace_id_seq'::regclass);
+ALTER TABLE ONLY ml_candidates ALTER COLUMN id SET DEFAULT nextval('ml_candidates_id_seq'::regclass);
-ALTER TABLE ONLY namespace_root_storage_statistics ALTER COLUMN namespace_id SET DEFAULT nextval('namespace_root_storage_statistics_namespace_id_seq'::regclass);
+ALTER TABLE ONLY ml_experiments ALTER COLUMN id SET DEFAULT nextval('ml_experiments_id_seq'::regclass);
+
+ALTER TABLE ONLY namespace_admin_notes ALTER COLUMN id SET DEFAULT nextval('namespace_admin_notes_id_seq'::regclass);
+
+ALTER TABLE ONLY namespace_bans ALTER COLUMN id SET DEFAULT nextval('namespace_bans_id_seq'::regclass);
ALTER TABLE ONLY namespace_statistics ALTER COLUMN id SET DEFAULT nextval('namespace_statistics_id_seq'::regclass);
@@ -23824,8 +23686,14 @@ ALTER TABLE ONLY project_group_links ALTER COLUMN id SET DEFAULT nextval('projec
ALTER TABLE ONLY project_import_data ALTER COLUMN id SET DEFAULT nextval('project_import_data_id_seq'::regclass);
+ALTER TABLE ONLY project_incident_management_settings ALTER COLUMN project_id SET DEFAULT nextval('project_incident_management_settings_project_id_seq'::regclass);
+
ALTER TABLE ONLY project_mirror_data ALTER COLUMN id SET DEFAULT nextval('project_mirror_data_id_seq'::regclass);
+ALTER TABLE ONLY project_relation_export_uploads ALTER COLUMN id SET DEFAULT nextval('project_relation_export_uploads_id_seq'::regclass);
+
+ALTER TABLE ONLY project_relation_exports ALTER COLUMN id SET DEFAULT nextval('project_relation_exports_id_seq'::regclass);
+
ALTER TABLE ONLY project_repositories ALTER COLUMN id SET DEFAULT nextval('project_repositories_id_seq'::regclass);
ALTER TABLE ONLY project_repository_states ALTER COLUMN id SET DEFAULT nextval('project_repository_states_id_seq'::regclass);
@@ -23838,8 +23706,6 @@ 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_tracing_settings ALTER COLUMN id SET DEFAULT nextval('project_tracing_settings_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);
@@ -23908,6 +23774,14 @@ ALTER TABLE ONLY saml_providers ALTER COLUMN id SET DEFAULT nextval('saml_provid
ALTER TABLE ONLY saved_replies ALTER COLUMN id SET DEFAULT nextval('saved_replies_id_seq'::regclass);
+ALTER TABLE ONLY sbom_component_versions ALTER COLUMN id SET DEFAULT nextval('sbom_component_versions_id_seq'::regclass);
+
+ALTER TABLE ONLY sbom_components ALTER COLUMN id SET DEFAULT nextval('sbom_components_id_seq'::regclass);
+
+ALTER TABLE ONLY sbom_occurrences ALTER COLUMN id SET DEFAULT nextval('sbom_occurrences_id_seq'::regclass);
+
+ALTER TABLE ONLY sbom_sources ALTER COLUMN id SET DEFAULT nextval('sbom_sources_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);
@@ -23950,6 +23824,8 @@ ALTER TABLE ONLY spam_logs ALTER COLUMN id SET DEFAULT nextval('spam_logs_id_seq
ALTER TABLE ONLY sprints ALTER COLUMN id SET DEFAULT nextval('sprints_id_seq'::regclass);
+ALTER TABLE ONLY ssh_signatures ALTER COLUMN id SET DEFAULT nextval('ssh_signatures_id_seq'::regclass);
+
ALTER TABLE ONLY status_check_responses ALTER COLUMN id SET DEFAULT nextval('status_check_responses_id_seq'::regclass);
ALTER TABLE ONLY status_page_published_incidents ALTER COLUMN id SET DEFAULT nextval('status_page_published_incidents_id_seq'::regclass);
@@ -23972,6 +23848,8 @@ ALTER TABLE ONLY terraform_state_versions ALTER COLUMN id SET DEFAULT nextval('t
ALTER TABLE ONLY terraform_states ALTER COLUMN id SET DEFAULT nextval('terraform_states_id_seq'::regclass);
+ALTER TABLE ONLY timelog_categories ALTER COLUMN id SET DEFAULT nextval('timelog_categories_id_seq'::regclass);
+
ALTER TABLE ONLY timelogs ALTER COLUMN id SET DEFAULT nextval('timelogs_id_seq'::regclass);
ALTER TABLE ONLY todos ALTER COLUMN id SET DEFAULT nextval('todos_id_seq'::regclass);
@@ -24002,10 +23880,14 @@ ALTER TABLE ONLY user_details ALTER COLUMN user_id SET DEFAULT nextval('user_det
ALTER TABLE ONLY user_group_callouts ALTER COLUMN id SET DEFAULT nextval('user_group_callouts_id_seq'::regclass);
+ALTER TABLE ONLY user_namespace_callouts ALTER COLUMN id SET DEFAULT nextval('user_namespace_callouts_id_seq'::regclass);
+
ALTER TABLE ONLY user_permission_export_uploads ALTER COLUMN id SET DEFAULT nextval('user_permission_export_uploads_id_seq'::regclass);
ALTER TABLE ONLY user_preferences ALTER COLUMN id SET DEFAULT nextval('user_preferences_id_seq'::regclass);
+ALTER TABLE ONLY user_project_callouts ALTER COLUMN id SET DEFAULT nextval('user_project_callouts_id_seq'::regclass);
+
ALTER TABLE ONLY user_statuses ALTER COLUMN user_id SET DEFAULT nextval('user_statuses_user_id_seq'::regclass);
ALTER TABLE ONLY user_synced_attributes_metadata ALTER COLUMN id SET DEFAULT nextval('user_synced_attributes_metadata_id_seq'::regclass);
@@ -24042,6 +23924,8 @@ ALTER TABLE ONLY vulnerability_identifiers ALTER COLUMN id SET DEFAULT nextval('
ALTER TABLE ONLY vulnerability_issue_links ALTER COLUMN id SET DEFAULT nextval('vulnerability_issue_links_id_seq'::regclass);
+ALTER TABLE ONLY vulnerability_merge_request_links ALTER COLUMN id SET DEFAULT nextval('vulnerability_merge_request_links_id_seq'::regclass);
+
ALTER TABLE ONLY vulnerability_occurrence_identifiers ALTER COLUMN id SET DEFAULT nextval('vulnerability_occurrence_identifiers_id_seq'::regclass);
ALTER TABLE ONLY vulnerability_occurrence_pipelines ALTER COLUMN id SET DEFAULT nextval('vulnerability_occurrence_pipelines_id_seq'::regclass);
@@ -24054,6 +23938,8 @@ ALTER TABLE ONLY vulnerability_remediations ALTER COLUMN id SET DEFAULT nextval(
ALTER TABLE ONLY vulnerability_scanners ALTER COLUMN id SET DEFAULT nextval('vulnerability_scanners_id_seq'::regclass);
+ALTER TABLE ONLY vulnerability_state_transitions ALTER COLUMN id SET DEFAULT nextval('vulnerability_state_transitions_id_seq'::regclass);
+
ALTER TABLE ONLY vulnerability_statistics ALTER COLUMN id SET DEFAULT nextval('vulnerability_statistics_id_seq'::regclass);
ALTER TABLE ONLY vulnerability_user_mentions ALTER COLUMN id SET DEFAULT nextval('vulnerability_user_mentions_id_seq'::regclass);
@@ -24068,6 +23954,8 @@ ALTER TABLE ONLY wiki_page_meta ALTER COLUMN id SET DEFAULT nextval('wiki_page_m
ALTER TABLE ONLY wiki_page_slugs ALTER COLUMN id SET DEFAULT nextval('wiki_page_slugs_id_seq'::regclass);
+ALTER TABLE ONLY work_item_parent_links ALTER COLUMN id SET DEFAULT nextval('work_item_parent_links_id_seq'::regclass);
+
ALTER TABLE ONLY work_item_types ALTER COLUMN id SET DEFAULT nextval('work_item_types_id_seq'::regclass);
ALTER TABLE ONLY x509_certificates ALTER COLUMN id SET DEFAULT nextval('x509_certificates_id_seq'::regclass);
@@ -24080,177 +23968,6 @@ ALTER TABLE ONLY zentao_tracker_data ALTER COLUMN id SET DEFAULT nextval('zentao
ALTER TABLE ONLY zoom_meetings ALTER COLUMN id SET DEFAULT nextval('zoom_meetings_id_seq'::regclass);
-ALTER TABLE ONLY audit_events
- ADD CONSTRAINT audit_events_pkey PRIMARY KEY (id, created_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.audit_events_000000
- ADD CONSTRAINT audit_events_000000_pkey PRIMARY KEY (id, created_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.audit_events_202305
- ADD CONSTRAINT audit_events_202305_pkey PRIMARY KEY (id, created_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.audit_events_202306
- ADD CONSTRAINT audit_events_202306_pkey PRIMARY KEY (id, created_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.audit_events_202307
- ADD CONSTRAINT audit_events_202307_pkey PRIMARY KEY (id, created_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.audit_events_202308
- ADD CONSTRAINT audit_events_202308_pkey PRIMARY KEY (id, created_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.audit_events_202309
- ADD CONSTRAINT audit_events_202309_pkey PRIMARY KEY (id, created_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.audit_events_202310
- ADD CONSTRAINT audit_events_202310_pkey PRIMARY KEY (id, created_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.audit_events_202311
- ADD CONSTRAINT audit_events_202311_pkey PRIMARY KEY (id, created_at);
-
-ALTER TABLE ONLY batched_background_migration_job_transition_logs
- ADD CONSTRAINT batched_background_migration_job_transition_logs_pkey PRIMARY KEY (id, created_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_000000
- ADD CONSTRAINT batched_background_migration_job_transition_logs_000000_pkey PRIMARY KEY (id, created_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202305
- ADD CONSTRAINT batched_background_migration_job_transition_logs_202305_pkey PRIMARY KEY (id, created_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202306
- ADD CONSTRAINT batched_background_migration_job_transition_logs_202306_pkey PRIMARY KEY (id, created_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202307
- ADD CONSTRAINT batched_background_migration_job_transition_logs_202307_pkey PRIMARY KEY (id, created_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202308
- ADD CONSTRAINT batched_background_migration_job_transition_logs_202308_pkey PRIMARY KEY (id, created_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202309
- ADD CONSTRAINT batched_background_migration_job_transition_logs_202309_pkey PRIMARY KEY (id, created_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202310
- ADD CONSTRAINT batched_background_migration_job_transition_logs_202310_pkey PRIMARY KEY (id, created_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202311
- ADD CONSTRAINT batched_background_migration_job_transition_logs_202311_pkey PRIMARY KEY (id, created_at);
-
-ALTER TABLE ONLY incident_management_pending_alert_escalations
- ADD CONSTRAINT incident_management_pending_alert_escalations_pkey PRIMARY KEY (id, process_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_alert_escalations_000000
- ADD CONSTRAINT incident_management_pending_alert_escalations_000000_pkey PRIMARY KEY (id, process_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202305
- ADD CONSTRAINT incident_management_pending_alert_escalations_202305_pkey PRIMARY KEY (id, process_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202306
- ADD CONSTRAINT incident_management_pending_alert_escalations_202306_pkey PRIMARY KEY (id, process_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202307
- ADD CONSTRAINT incident_management_pending_alert_escalations_202307_pkey PRIMARY KEY (id, process_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202308
- ADD CONSTRAINT incident_management_pending_alert_escalations_202308_pkey PRIMARY KEY (id, process_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202309
- ADD CONSTRAINT incident_management_pending_alert_escalations_202309_pkey PRIMARY KEY (id, process_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202310
- ADD CONSTRAINT incident_management_pending_alert_escalations_202310_pkey PRIMARY KEY (id, process_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202311
- ADD CONSTRAINT incident_management_pending_alert_escalations_202311_pkey PRIMARY KEY (id, process_at);
-
-ALTER TABLE ONLY incident_management_pending_issue_escalations
- ADD CONSTRAINT incident_management_pending_issue_escalations_pkey PRIMARY KEY (id, process_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_issue_escalations_000000
- ADD CONSTRAINT incident_management_pending_issue_escalations_000000_pkey PRIMARY KEY (id, process_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202305
- ADD CONSTRAINT incident_management_pending_issue_escalations_202305_pkey PRIMARY KEY (id, process_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202306
- ADD CONSTRAINT incident_management_pending_issue_escalations_202306_pkey PRIMARY KEY (id, process_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202307
- ADD CONSTRAINT incident_management_pending_issue_escalations_202307_pkey PRIMARY KEY (id, process_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202308
- ADD CONSTRAINT incident_management_pending_issue_escalations_202308_pkey PRIMARY KEY (id, process_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202309
- ADD CONSTRAINT incident_management_pending_issue_escalations_202309_pkey PRIMARY KEY (id, process_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202310
- ADD CONSTRAINT incident_management_pending_issue_escalations_202310_pkey PRIMARY KEY (id, process_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202311
- ADD CONSTRAINT incident_management_pending_issue_escalations_202311_pkey PRIMARY KEY (id, process_at);
-
-ALTER TABLE ONLY loose_foreign_keys_deleted_records
- ADD CONSTRAINT loose_foreign_keys_deleted_records_pkey PRIMARY KEY (partition, id);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_1
- ADD CONSTRAINT loose_foreign_keys_deleted_records_1_pkey PRIMARY KEY (partition, id);
-
-ALTER TABLE ONLY verification_codes
- ADD CONSTRAINT verification_codes_pkey PRIMARY KEY (created_at, visitor_id_code, code, phone);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.verification_codes_000000
- ADD CONSTRAINT verification_codes_000000_pkey PRIMARY KEY (created_at, visitor_id_code, code, phone);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.verification_codes_202304
- ADD CONSTRAINT verification_codes_202304_pkey PRIMARY KEY (created_at, visitor_id_code, code, phone);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.verification_codes_202305
- ADD CONSTRAINT verification_codes_202305_pkey PRIMARY KEY (created_at, visitor_id_code, code, phone);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.verification_codes_202306
- ADD CONSTRAINT verification_codes_202306_pkey PRIMARY KEY (created_at, visitor_id_code, code, phone);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.verification_codes_202307
- ADD CONSTRAINT verification_codes_202307_pkey PRIMARY KEY (created_at, visitor_id_code, code, phone);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.verification_codes_202308
- ADD CONSTRAINT verification_codes_202308_pkey PRIMARY KEY (created_at, visitor_id_code, code, phone);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.verification_codes_202309
- ADD CONSTRAINT verification_codes_202309_pkey PRIMARY KEY (created_at, visitor_id_code, code, phone);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.verification_codes_202310
- ADD CONSTRAINT verification_codes_202310_pkey PRIMARY KEY (created_at, visitor_id_code, code, phone);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.verification_codes_202311
- ADD CONSTRAINT verification_codes_202311_pkey PRIMARY KEY (created_at, visitor_id_code, code, phone);
-
-ALTER TABLE ONLY web_hook_logs
- ADD CONSTRAINT web_hook_logs_pkey PRIMARY KEY (id, created_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.web_hook_logs_000000
- ADD CONSTRAINT web_hook_logs_000000_pkey PRIMARY KEY (id, created_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.web_hook_logs_202305
- ADD CONSTRAINT web_hook_logs_202305_pkey PRIMARY KEY (id, created_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.web_hook_logs_202306
- ADD CONSTRAINT web_hook_logs_202306_pkey PRIMARY KEY (id, created_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.web_hook_logs_202307
- ADD CONSTRAINT web_hook_logs_202307_pkey PRIMARY KEY (id, created_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.web_hook_logs_202308
- ADD CONSTRAINT web_hook_logs_202308_pkey PRIMARY KEY (id, created_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.web_hook_logs_202309
- ADD CONSTRAINT web_hook_logs_202309_pkey PRIMARY KEY (id, created_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.web_hook_logs_202310
- ADD CONSTRAINT web_hook_logs_202310_pkey PRIMARY KEY (id, created_at);
-
-ALTER TABLE ONLY gitlab_partitions_dynamic.web_hook_logs_202311
- ADD CONSTRAINT web_hook_logs_202311_pkey PRIMARY KEY (id, created_at);
-
ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events
ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_pkey PRIMARY KEY (stage_event_hash_id, issue_id);
@@ -24950,6 +24667,12 @@ ALTER TABLE ONLY atlassian_identities
ALTER TABLE ONLY audit_events_external_audit_event_destinations
ADD CONSTRAINT audit_events_external_audit_event_destinations_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY audit_events
+ ADD CONSTRAINT audit_events_pkey PRIMARY KEY (id, created_at);
+
+ALTER TABLE ONLY audit_events_streaming_headers
+ ADD CONSTRAINT audit_events_streaming_headers_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY authentication_events
ADD CONSTRAINT authentication_events_pkey PRIMARY KEY (id);
@@ -24968,6 +24691,9 @@ ALTER TABLE ONLY badges
ALTER TABLE ONLY banned_users
ADD CONSTRAINT banned_users_pkey PRIMARY KEY (user_id);
+ALTER TABLE ONLY batched_background_migration_job_transition_logs
+ ADD CONSTRAINT batched_background_migration_job_transition_logs_pkey PRIMARY KEY (id, created_at);
+
ALTER TABLE ONLY batched_background_migration_jobs
ADD CONSTRAINT batched_background_migration_jobs_pkey PRIMARY KEY (id);
@@ -25169,12 +24895,18 @@ ALTER TABLE ONLY ci_runner_namespaces
ALTER TABLE ONLY ci_runner_projects
ADD CONSTRAINT ci_runner_projects_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY ci_runner_versions
+ ADD CONSTRAINT ci_runner_versions_pkey PRIMARY KEY (version);
+
ALTER TABLE ONLY ci_runners
ADD CONSTRAINT ci_runners_pkey PRIMARY KEY (id);
ALTER TABLE ONLY ci_running_builds
ADD CONSTRAINT ci_running_builds_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY ci_secure_file_states
+ ADD CONSTRAINT ci_secure_file_states_pkey PRIMARY KEY (ci_secure_file_id);
+
ALTER TABLE ONLY ci_secure_files
ADD CONSTRAINT ci_secure_files_pkey PRIMARY KEY (id);
@@ -25211,6 +24943,9 @@ ALTER TABLE ONLY cluster_agent_tokens
ALTER TABLE ONLY cluster_agents
ADD CONSTRAINT cluster_agents_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY cluster_enabled_grants
+ ADD CONSTRAINT cluster_enabled_grants_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY cluster_groups
ADD CONSTRAINT cluster_groups_pkey PRIMARY KEY (id);
@@ -25235,9 +24970,6 @@ ALTER TABLE ONLY clusters_applications_cilium
ALTER TABLE ONLY clusters_applications_crossplane
ADD CONSTRAINT clusters_applications_crossplane_pkey PRIMARY KEY (id);
-ALTER TABLE ONLY clusters_applications_elastic_stacks
- ADD CONSTRAINT clusters_applications_elastic_stacks_pkey PRIMARY KEY (id);
-
ALTER TABLE ONLY clusters_applications_helm
ADD CONSTRAINT clusters_applications_helm_pkey PRIMARY KEY (id);
@@ -25256,9 +24988,6 @@ ALTER TABLE ONLY clusters_applications_prometheus
ALTER TABLE ONLY clusters_applications_runners
ADD CONSTRAINT clusters_applications_runners_pkey PRIMARY KEY (id);
-ALTER TABLE ONLY clusters_integration_elasticstack
- ADD CONSTRAINT clusters_integration_elasticstack_pkey PRIMARY KEY (cluster_id);
-
ALTER TABLE ONLY clusters_integration_prometheus
ADD CONSTRAINT clusters_integration_prometheus_pkey PRIMARY KEY (cluster_id);
@@ -25388,6 +25117,9 @@ ALTER TABLE ONLY detached_partitions
ALTER TABLE ONLY diff_note_positions
ADD CONSTRAINT diff_note_positions_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY dingtalk_tracker_data
+ ADD CONSTRAINT dingtalk_tracker_data_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY dora_daily_metrics
ADD CONSTRAINT dora_daily_metrics_pkey PRIMARY KEY (id);
@@ -25499,12 +25231,6 @@ ALTER TABLE ONLY geo_hashed_storage_attachments_events
ALTER TABLE ONLY geo_hashed_storage_migrated_events
ADD CONSTRAINT geo_hashed_storage_migrated_events_pkey PRIMARY KEY (id);
-ALTER TABLE ONLY geo_job_artifact_deleted_events
- ADD CONSTRAINT geo_job_artifact_deleted_events_pkey PRIMARY KEY (id);
-
-ALTER TABLE ONLY geo_lfs_object_deleted_events
- ADD CONSTRAINT geo_lfs_object_deleted_events_pkey PRIMARY KEY (id);
-
ALTER TABLE ONLY geo_node_namespace_links
ADD CONSTRAINT geo_node_namespace_links_pkey PRIMARY KEY (id);
@@ -25625,6 +25351,12 @@ ALTER TABLE ONLY incident_management_oncall_schedules
ALTER TABLE ONLY incident_management_oncall_shifts
ADD CONSTRAINT incident_management_oncall_shifts_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY incident_management_pending_alert_escalations
+ ADD CONSTRAINT incident_management_pending_alert_escalations_pkey PRIMARY KEY (id, process_at);
+
+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_events
ADD CONSTRAINT incident_management_timeline_events_pkey PRIMARY KEY (id);
@@ -25646,6 +25378,9 @@ ALTER TABLE ONLY ip_restrictions
ALTER TABLE ONLY issuable_metric_images
ADD CONSTRAINT issuable_metric_images_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY issuable_resource_links
+ ADD CONSTRAINT issuable_resource_links_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY issuable_severities
ADD CONSTRAINT issuable_severities_pkey PRIMARY KEY (id);
@@ -25686,7 +25421,7 @@ ALTER TABLE ONLY issues_self_managed_prometheus_alert_events
ADD CONSTRAINT issues_self_managed_prometheus_alert_events_pkey PRIMARY KEY (issue_id, self_managed_prometheus_alert_event_id);
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));
+ 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));
@@ -25742,6 +25477,12 @@ ALTER TABLE ONLY list_user_preferences
ALTER TABLE ONLY lists
ADD CONSTRAINT lists_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY loose_foreign_keys_deleted_records
+ ADD CONSTRAINT loose_foreign_keys_deleted_records_pkey PRIMARY KEY (partition, id);
+
+ALTER TABLE ONLY member_roles
+ ADD CONSTRAINT member_roles_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY member_tasks
ADD CONSTRAINT member_tasks_pkey PRIMARY KEY (id);
@@ -25811,12 +25552,33 @@ ALTER TABLE ONLY milestone_releases
ALTER TABLE ONLY milestones
ADD CONSTRAINT milestones_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY ml_candidate_metrics
+ ADD CONSTRAINT ml_candidate_metrics_pkey PRIMARY KEY (id);
+
+ALTER TABLE ONLY ml_candidate_params
+ ADD CONSTRAINT ml_candidate_params_pkey PRIMARY KEY (id);
+
+ALTER TABLE ONLY ml_candidates
+ ADD CONSTRAINT ml_candidates_pkey PRIMARY KEY (id);
+
+ALTER TABLE ONLY ml_experiments
+ ADD CONSTRAINT ml_experiments_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY namespace_admin_notes
ADD CONSTRAINT namespace_admin_notes_pkey PRIMARY KEY (id);
ALTER TABLE ONLY namespace_aggregation_schedules
ADD CONSTRAINT namespace_aggregation_schedules_pkey PRIMARY KEY (namespace_id);
+ALTER TABLE ONLY namespace_bans
+ ADD CONSTRAINT namespace_bans_pkey PRIMARY KEY (id);
+
+ALTER TABLE ONLY namespace_ci_cd_settings
+ ADD CONSTRAINT namespace_ci_cd_settings_pkey PRIMARY KEY (namespace_id);
+
+ALTER TABLE ONLY namespace_details
+ ADD CONSTRAINT namespace_details_pkey PRIMARY KEY (namespace_id);
+
ALTER TABLE ONLY namespace_limits
ADD CONSTRAINT namespace_limits_pkey PRIMARY KEY (namespace_id);
@@ -25889,6 +25651,9 @@ ALTER TABLE ONLY operations_user_lists
ALTER TABLE ONLY packages_build_infos
ADD CONSTRAINT packages_build_infos_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY packages_cleanup_policies
+ ADD CONSTRAINT packages_cleanup_policies_pkey PRIMARY KEY (project_id);
+
ALTER TABLE ONLY packages_composer_cache_files
ADD CONSTRAINT packages_composer_cache_files_pkey PRIMARY KEY (id);
@@ -26084,6 +25849,12 @@ ALTER TABLE ONLY project_mirror_data
ALTER TABLE ONLY project_pages_metadata
ADD CONSTRAINT project_pages_metadata_pkey PRIMARY KEY (project_id);
+ALTER TABLE ONLY project_relation_export_uploads
+ ADD CONSTRAINT project_relation_export_uploads_pkey PRIMARY KEY (id);
+
+ALTER TABLE ONLY project_relation_exports
+ ADD CONSTRAINT project_relation_exports_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY project_repositories
ADD CONSTRAINT project_repositories_pkey PRIMARY KEY (id);
@@ -26105,9 +25876,6 @@ ALTER TABLE ONLY project_statistics
ALTER TABLE ONLY project_topics
ADD CONSTRAINT project_topics_pkey PRIMARY KEY (id);
-ALTER TABLE ONLY project_tracing_settings
- ADD CONSTRAINT project_tracing_settings_pkey PRIMARY KEY (id);
-
ALTER TABLE ONLY projects
ADD CONSTRAINT projects_pkey PRIMARY KEY (id);
@@ -26219,6 +25987,18 @@ ALTER TABLE ONLY saml_providers
ALTER TABLE ONLY saved_replies
ADD CONSTRAINT saved_replies_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY sbom_component_versions
+ ADD CONSTRAINT sbom_component_versions_pkey PRIMARY KEY (id);
+
+ALTER TABLE ONLY sbom_components
+ ADD CONSTRAINT sbom_components_pkey PRIMARY KEY (id);
+
+ALTER TABLE ONLY sbom_occurrences
+ ADD CONSTRAINT sbom_occurrences_pkey PRIMARY KEY (id);
+
+ALTER TABLE ONLY sbom_sources
+ ADD CONSTRAINT sbom_sources_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY scim_identities
ADD CONSTRAINT scim_identities_pkey PRIMARY KEY (id);
@@ -26226,7 +26006,7 @@ ALTER TABLE ONLY scim_oauth_access_tokens
ADD CONSTRAINT scim_oauth_access_tokens_pkey PRIMARY KEY (id);
ALTER TABLE ONLY security_findings
- ADD CONSTRAINT security_findings_pkey PRIMARY KEY (id);
+ ADD CONSTRAINT security_findings_pkey PRIMARY KEY (id, partition_number);
ALTER TABLE ONLY security_orchestration_policy_configurations
ADD CONSTRAINT security_orchestration_policy_configurations_pkey PRIMARY KEY (id);
@@ -26297,6 +26077,9 @@ ALTER TABLE ONLY spam_logs
ALTER TABLE ONLY sprints
ADD CONSTRAINT sprints_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY ssh_signatures
+ ADD CONSTRAINT ssh_signatures_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY status_check_responses
ADD CONSTRAINT status_check_responses_pkey PRIMARY KEY (id);
@@ -26330,6 +26113,9 @@ ALTER TABLE ONLY terraform_state_versions
ALTER TABLE ONLY terraform_states
ADD CONSTRAINT terraform_states_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY timelog_categories
+ ADD CONSTRAINT timelog_categories_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY timelogs
ADD CONSTRAINT timelogs_pkey PRIMARY KEY (id);
@@ -26387,12 +26173,18 @@ ALTER TABLE ONLY user_highest_roles
ALTER TABLE ONLY user_interacted_projects
ADD CONSTRAINT user_interacted_projects_pkey PRIMARY KEY (project_id, user_id);
+ALTER TABLE ONLY user_namespace_callouts
+ ADD CONSTRAINT user_namespace_callouts_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY user_permission_export_uploads
ADD CONSTRAINT user_permission_export_uploads_pkey PRIMARY KEY (id);
ALTER TABLE ONLY user_preferences
ADD CONSTRAINT user_preferences_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY user_project_callouts
+ ADD CONSTRAINT user_project_callouts_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY user_statuses
ADD CONSTRAINT user_statuses_pkey PRIMARY KEY (user_id);
@@ -26414,6 +26206,9 @@ ALTER TABLE ONLY users_star_projects
ALTER TABLE ONLY users_statistics
ADD CONSTRAINT users_statistics_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY verification_codes
+ ADD CONSTRAINT verification_codes_pkey PRIMARY KEY (created_at, visitor_id_code, code, phone);
+
ALTER TABLE ONLY vulnerabilities
ADD CONSTRAINT vulnerabilities_pkey PRIMARY KEY (id);
@@ -26450,6 +26245,9 @@ ALTER TABLE ONLY vulnerability_identifiers
ALTER TABLE ONLY vulnerability_issue_links
ADD CONSTRAINT vulnerability_issue_links_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY vulnerability_merge_request_links
+ ADD CONSTRAINT vulnerability_merge_request_links_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY vulnerability_occurrence_identifiers
ADD CONSTRAINT vulnerability_occurrence_identifiers_pkey PRIMARY KEY (id);
@@ -26468,12 +26266,18 @@ ALTER TABLE ONLY vulnerability_remediations
ALTER TABLE ONLY vulnerability_scanners
ADD CONSTRAINT vulnerability_scanners_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY vulnerability_state_transitions
+ ADD CONSTRAINT vulnerability_state_transitions_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY vulnerability_statistics
ADD CONSTRAINT vulnerability_statistics_pkey PRIMARY KEY (id);
ALTER TABLE ONLY vulnerability_user_mentions
ADD CONSTRAINT vulnerability_user_mentions_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY web_hook_logs
+ ADD CONSTRAINT web_hook_logs_pkey PRIMARY KEY (id, created_at);
+
ALTER TABLE ONLY web_hooks
ADD CONSTRAINT web_hooks_pkey PRIMARY KEY (id);
@@ -26486,6 +26290,9 @@ ALTER TABLE ONLY wiki_page_meta
ALTER TABLE ONLY wiki_page_slugs
ADD CONSTRAINT wiki_page_slugs_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY work_item_parent_links
+ ADD CONSTRAINT work_item_parent_links_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY work_item_types
ADD CONSTRAINT work_item_types_pkey PRIMARY KEY (id);
@@ -26504,194 +26311,6 @@ ALTER TABLE ONLY zentao_tracker_data
ALTER TABLE ONLY zoom_meetings
ADD CONSTRAINT zoom_meetings_pkey PRIMARY KEY (id);
-CREATE INDEX analytics_index_audit_events_part_on_created_at_and_author_id ON ONLY audit_events USING btree (created_at, author_id);
-
-CREATE INDEX audit_events_000000_created_at_author_id_idx ON gitlab_partitions_dynamic.audit_events_000000 USING btree (created_at, author_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 audit_events_000000_entity_id_entity_type_id_author_id_crea_idx ON gitlab_partitions_dynamic.audit_events_000000 USING btree (entity_id, entity_type, id DESC, author_id, created_at);
-
-CREATE INDEX audit_events_202305_created_at_author_id_idx ON gitlab_partitions_dynamic.audit_events_202305 USING btree (created_at, author_id);
-
-CREATE INDEX audit_events_202305_entity_id_entity_type_id_author_id_crea_idx ON gitlab_partitions_dynamic.audit_events_202305 USING btree (entity_id, entity_type, id DESC, author_id, created_at);
-
-CREATE INDEX audit_events_202306_created_at_author_id_idx ON gitlab_partitions_dynamic.audit_events_202306 USING btree (created_at, author_id);
-
-CREATE INDEX audit_events_202306_entity_id_entity_type_id_author_id_crea_idx ON gitlab_partitions_dynamic.audit_events_202306 USING btree (entity_id, entity_type, id DESC, author_id, created_at);
-
-CREATE INDEX audit_events_202307_created_at_author_id_idx ON gitlab_partitions_dynamic.audit_events_202307 USING btree (created_at, author_id);
-
-CREATE INDEX audit_events_202307_entity_id_entity_type_id_author_id_crea_idx ON gitlab_partitions_dynamic.audit_events_202307 USING btree (entity_id, entity_type, id DESC, author_id, created_at);
-
-CREATE INDEX audit_events_202308_created_at_author_id_idx ON gitlab_partitions_dynamic.audit_events_202308 USING btree (created_at, author_id);
-
-CREATE INDEX audit_events_202308_entity_id_entity_type_id_author_id_crea_idx ON gitlab_partitions_dynamic.audit_events_202308 USING btree (entity_id, entity_type, id DESC, author_id, created_at);
-
-CREATE INDEX audit_events_202309_created_at_author_id_idx ON gitlab_partitions_dynamic.audit_events_202309 USING btree (created_at, author_id);
-
-CREATE INDEX audit_events_202309_entity_id_entity_type_id_author_id_crea_idx ON gitlab_partitions_dynamic.audit_events_202309 USING btree (entity_id, entity_type, id DESC, author_id, created_at);
-
-CREATE INDEX audit_events_202310_created_at_author_id_idx ON gitlab_partitions_dynamic.audit_events_202310 USING btree (created_at, author_id);
-
-CREATE INDEX audit_events_202310_entity_id_entity_type_id_author_id_crea_idx ON gitlab_partitions_dynamic.audit_events_202310 USING btree (entity_id, entity_type, id DESC, author_id, created_at);
-
-CREATE INDEX audit_events_202311_created_at_author_id_idx ON gitlab_partitions_dynamic.audit_events_202311 USING btree (created_at, author_id);
-
-CREATE INDEX audit_events_202311_entity_id_entity_type_id_author_id_crea_idx ON gitlab_partitions_dynamic.audit_events_202311 USING btree (entity_id, entity_type, id DESC, author_id, created_at);
-
-CREATE INDEX i_batched_background_migration_job_transition_logs_on_job_id ON ONLY batched_background_migration_job_transition_logs USING btree (batched_background_migration_job_id);
-
-CREATE INDEX batched_background_migration__batched_background_migration__idx ON gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_000000 USING btree (batched_background_migration_job_id);
-
-CREATE INDEX batched_background_migration__batched_background_migration_idx1 ON gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202305 USING btree (batched_background_migration_job_id);
-
-CREATE INDEX batched_background_migration__batched_background_migration_idx2 ON gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202306 USING btree (batched_background_migration_job_id);
-
-CREATE INDEX batched_background_migration__batched_background_migration_idx3 ON gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202307 USING btree (batched_background_migration_job_id);
-
-CREATE INDEX batched_background_migration__batched_background_migration_idx4 ON gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202308 USING btree (batched_background_migration_job_id);
-
-CREATE INDEX batched_background_migration__batched_background_migration_idx5 ON gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202309 USING btree (batched_background_migration_job_id);
-
-CREATE INDEX batched_background_migration__batched_background_migration_idx6 ON gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202310 USING btree (batched_background_migration_job_id);
-
-CREATE INDEX batched_background_migration__batched_background_migration_idx7 ON gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202311 USING btree (batched_background_migration_job_id);
-
-CREATE INDEX index_incident_management_pending_alert_escalations_on_rule_id ON ONLY incident_management_pending_alert_escalations USING btree (rule_id);
-
-CREATE INDEX incident_management_pending_alert_escalations_00000_rule_id_idx ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_000000 USING btree (rule_id);
-
-CREATE INDEX index_incident_management_pending_alert_escalations_on_alert_id ON ONLY incident_management_pending_alert_escalations USING btree (alert_id);
-
-CREATE INDEX incident_management_pending_alert_escalations_0000_alert_id_idx ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_000000 USING btree (alert_id);
-
-CREATE INDEX incident_management_pending_alert_escalations_20230_rule_id_idx ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202305 USING btree (rule_id);
-
-CREATE INDEX incident_management_pending_alert_escalations_20231_rule_id_idx ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202310 USING btree (rule_id);
-
-CREATE INDEX incident_management_pending_alert_escalations_2023_alert_id_idx ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202305 USING btree (alert_id);
-
-CREATE INDEX incident_management_pending_alert_escalations_2023_rule_id_idx1 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202306 USING btree (rule_id);
-
-CREATE INDEX incident_management_pending_alert_escalations_2023_rule_id_idx2 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202307 USING btree (rule_id);
-
-CREATE INDEX incident_management_pending_alert_escalations_2023_rule_id_idx3 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202308 USING btree (rule_id);
-
-CREATE INDEX incident_management_pending_alert_escalations_2023_rule_id_idx4 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202309 USING btree (rule_id);
-
-CREATE INDEX incident_management_pending_alert_escalations_2023_rule_id_idx5 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202311 USING btree (rule_id);
-
-CREATE INDEX incident_management_pending_alert_escalations_202_alert_id_idx1 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202306 USING btree (alert_id);
-
-CREATE INDEX incident_management_pending_alert_escalations_202_alert_id_idx2 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202307 USING btree (alert_id);
-
-CREATE INDEX incident_management_pending_alert_escalations_202_alert_id_idx3 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202308 USING btree (alert_id);
-
-CREATE INDEX incident_management_pending_alert_escalations_202_alert_id_idx4 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202309 USING btree (alert_id);
-
-CREATE INDEX incident_management_pending_alert_escalations_202_alert_id_idx5 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202310 USING btree (alert_id);
-
-CREATE INDEX incident_management_pending_alert_escalations_202_alert_id_idx6 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202311 USING btree (alert_id);
-
-CREATE INDEX index_incident_management_pending_issue_escalations_on_rule_id ON ONLY incident_management_pending_issue_escalations USING btree (rule_id);
-
-CREATE INDEX incident_management_pending_issue_escalations_00000_rule_id_idx ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_000000 USING btree (rule_id);
-
-CREATE INDEX index_incident_management_pending_issue_escalations_on_issue_id ON ONLY incident_management_pending_issue_escalations USING btree (issue_id);
-
-CREATE INDEX incident_management_pending_issue_escalations_0000_issue_id_idx ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_000000 USING btree (issue_id);
-
-CREATE INDEX incident_management_pending_issue_escalations_20230_rule_id_idx ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202305 USING btree (rule_id);
-
-CREATE INDEX incident_management_pending_issue_escalations_20231_rule_id_idx ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202310 USING btree (rule_id);
-
-CREATE INDEX incident_management_pending_issue_escalations_2023_issue_id_idx ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202305 USING btree (issue_id);
-
-CREATE INDEX incident_management_pending_issue_escalations_2023_rule_id_idx1 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202306 USING btree (rule_id);
-
-CREATE INDEX incident_management_pending_issue_escalations_2023_rule_id_idx2 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202307 USING btree (rule_id);
-
-CREATE INDEX incident_management_pending_issue_escalations_2023_rule_id_idx3 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202308 USING btree (rule_id);
-
-CREATE INDEX incident_management_pending_issue_escalations_2023_rule_id_idx4 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202309 USING btree (rule_id);
-
-CREATE INDEX incident_management_pending_issue_escalations_2023_rule_id_idx5 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202311 USING btree (rule_id);
-
-CREATE INDEX incident_management_pending_issue_escalations_202_issue_id_idx1 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202306 USING btree (issue_id);
-
-CREATE INDEX incident_management_pending_issue_escalations_202_issue_id_idx2 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202307 USING btree (issue_id);
-
-CREATE INDEX incident_management_pending_issue_escalations_202_issue_id_idx3 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202308 USING btree (issue_id);
-
-CREATE INDEX incident_management_pending_issue_escalations_202_issue_id_idx4 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202309 USING btree (issue_id);
-
-CREATE INDEX incident_management_pending_issue_escalations_202_issue_id_idx5 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202310 USING btree (issue_id);
-
-CREATE INDEX incident_management_pending_issue_escalations_202_issue_id_idx6 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202311 USING btree (issue_id);
-
-CREATE INDEX index_loose_foreign_keys_deleted_records_for_partitioned_query ON ONLY loose_foreign_keys_deleted_records USING btree (partition, fully_qualified_table_name, consume_after, id) WHERE (status = 1);
-
-CREATE INDEX index_01e3390fac ON gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_1 USING btree (partition, fully_qualified_table_name, consume_after, id) WHERE (status = 1);
-
-CREATE INDEX index_web_hook_logs_part_on_created_at_and_web_hook_id ON ONLY web_hook_logs USING btree (created_at, web_hook_id);
-
-CREATE INDEX index_2eb8964745 ON gitlab_partitions_dynamic.web_hook_logs_202306 USING btree (created_at, web_hook_id);
-
-CREATE INDEX index_7185e24460 ON gitlab_partitions_dynamic.web_hook_logs_202305 USING btree (created_at, web_hook_id);
-
-CREATE INDEX index_web_hook_logs_part_on_web_hook_id ON ONLY web_hook_logs USING btree (web_hook_id);
-
-CREATE INDEX index_7a0f3a9930 ON gitlab_partitions_dynamic.web_hook_logs_202305 USING btree (web_hook_id);
-
-CREATE INDEX index_80bf138a51 ON gitlab_partitions_dynamic.web_hook_logs_000000 USING btree (web_hook_id);
-
-CREATE INDEX index_a548862389 ON gitlab_partitions_dynamic.web_hook_logs_202306 USING btree (web_hook_id);
-
-CREATE INDEX index_eecfac613f ON gitlab_partitions_dynamic.web_hook_logs_000000 USING btree (created_at, web_hook_id);
-
-CREATE UNIQUE INDEX index_verification_codes_on_phone_and_visitor_id_code ON ONLY verification_codes USING btree (visitor_id_code, phone, created_at);
-
-COMMENT ON INDEX index_verification_codes_on_phone_and_visitor_id_code IS 'JiHu-specific index';
-
-CREATE UNIQUE INDEX verification_codes_000000_visitor_id_code_phone_created_at_idx ON gitlab_partitions_dynamic.verification_codes_000000 USING btree (visitor_id_code, phone, created_at);
-
-CREATE UNIQUE INDEX verification_codes_202304_visitor_id_code_phone_created_at_idx ON gitlab_partitions_dynamic.verification_codes_202304 USING btree (visitor_id_code, phone, created_at);
-
-CREATE UNIQUE INDEX verification_codes_202305_visitor_id_code_phone_created_at_idx ON gitlab_partitions_dynamic.verification_codes_202305 USING btree (visitor_id_code, phone, created_at);
-
-CREATE UNIQUE INDEX verification_codes_202306_visitor_id_code_phone_created_at_idx ON gitlab_partitions_dynamic.verification_codes_202306 USING btree (visitor_id_code, phone, created_at);
-
-CREATE UNIQUE INDEX verification_codes_202307_visitor_id_code_phone_created_at_idx ON gitlab_partitions_dynamic.verification_codes_202307 USING btree (visitor_id_code, phone, created_at);
-
-CREATE UNIQUE INDEX verification_codes_202308_visitor_id_code_phone_created_at_idx ON gitlab_partitions_dynamic.verification_codes_202308 USING btree (visitor_id_code, phone, created_at);
-
-CREATE UNIQUE INDEX verification_codes_202309_visitor_id_code_phone_created_at_idx ON gitlab_partitions_dynamic.verification_codes_202309 USING btree (visitor_id_code, phone, created_at);
-
-CREATE UNIQUE INDEX verification_codes_202310_visitor_id_code_phone_created_at_idx ON gitlab_partitions_dynamic.verification_codes_202310 USING btree (visitor_id_code, phone, created_at);
-
-CREATE UNIQUE INDEX verification_codes_202311_visitor_id_code_phone_created_at_idx ON gitlab_partitions_dynamic.verification_codes_202311 USING btree (visitor_id_code, phone, created_at);
-
-CREATE INDEX web_hook_logs_202307_created_at_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202307 USING btree (created_at, web_hook_id);
-
-CREATE INDEX web_hook_logs_202307_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202307 USING btree (web_hook_id);
-
-CREATE INDEX web_hook_logs_202308_created_at_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202308 USING btree (created_at, web_hook_id);
-
-CREATE INDEX web_hook_logs_202308_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202308 USING btree (web_hook_id);
-
-CREATE INDEX web_hook_logs_202309_created_at_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202309 USING btree (created_at, web_hook_id);
-
-CREATE INDEX web_hook_logs_202309_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202309 USING btree (web_hook_id);
-
-CREATE INDEX web_hook_logs_202310_created_at_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202310 USING btree (created_at, web_hook_id);
-
-CREATE INDEX web_hook_logs_202310_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202310 USING btree (web_hook_id);
-
-CREATE INDEX web_hook_logs_202311_created_at_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202311 USING btree (created_at, web_hook_id);
-
-CREATE INDEX web_hook_logs_202311_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202311 USING btree (web_hook_id);
-
CREATE INDEX index_issue_stage_events_project_duration ON ONLY analytics_cycle_analytics_issue_stage_events USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
CREATE INDEX index_000925dbd7 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_11 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
@@ -27612,6 +27231,8 @@ CREATE INDEX product_analytics_events_experi_project_id_collector_tstamp_idx ON
CREATE INDEX active_billable_users ON users USING btree (id) WHERE (((state)::text = 'active'::text) AND ((user_type IS NULL) OR (user_type = ANY (ARRAY[NULL::integer, 6, 4]))) AND ((user_type IS NULL) OR (user_type <> ALL ('{2,6,1,3,7,8}'::smallint[]))));
+CREATE INDEX analytics_index_audit_events_part_on_created_at_and_author_id ON ONLY audit_events USING btree (created_at, author_id);
+
CREATE INDEX analytics_index_events_on_created_at_and_author_id ON events USING btree (created_at, author_id);
CREATE INDEX analytics_repository_languages_on_project_id ON analytics_language_trend_repository_languages USING btree (project_id);
@@ -27660,12 +27281,18 @@ CREATE UNIQUE INDEX finding_link_url_idx ON vulnerability_finding_links USING bt
CREATE INDEX finding_links_on_vulnerability_occurrence_id ON vulnerability_finding_links USING btree (vulnerability_occurrence_id);
+CREATE INDEX i_batched_background_migration_job_transition_logs_on_job_id ON ONLY batched_background_migration_job_transition_logs USING btree (batched_background_migration_job_id);
+
CREATE UNIQUE INDEX i_ci_job_token_project_scope_links_on_source_and_target_project ON ci_job_token_project_scope_links USING btree (source_project_id, target_project_id);
+CREATE INDEX i_compliance_frameworks_on_id_and_created_at ON compliance_management_frameworks USING btree (id, created_at, pipeline_configuration_full_path);
+
CREATE INDEX idx_analytics_devops_adoption_segments_on_namespace_id ON analytics_devops_adoption_segments USING btree (namespace_id);
CREATE INDEX idx_analytics_devops_adoption_snapshots_finalized ON analytics_devops_adoption_snapshots USING btree (namespace_id, end_time) WHERE (recorded_at >= end_time);
+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);
CREATE INDEX idx_build_artifacts_size_refreshes_state_updated_at ON project_build_artifacts_size_refreshes USING btree (state, updated_at);
@@ -27698,8 +27325,12 @@ CREATE INDEX idx_eaprpb_external_approval_rule_id ON external_approval_rules_pro
CREATE INDEX idx_elastic_reindexing_slices_on_elastic_reindexing_subtask_id ON elastic_reindexing_slices USING btree (elastic_reindexing_subtask_id);
+CREATE INDEX idx_enabled_pkgs_cleanup_policies_on_next_run_at_project_id ON packages_cleanup_policies USING btree (next_run_at, project_id) WHERE (keep_n_duplicated_package_files <> 'all'::text);
+
CREATE UNIQUE INDEX idx_environment_merge_requests_unique_index ON deployment_merge_requests USING btree (environment_id, merge_request_id);
+CREATE UNIQUE INDEX idx_external_audit_event_destination_id_key_uniq ON audit_events_streaming_headers USING btree (key, external_audit_event_destination_id);
+
CREATE INDEX idx_geo_con_rep_updated_events_on_container_repository_id ON geo_container_repository_updated_events USING btree (container_repository_id);
CREATE INDEX idx_installable_conan_pkgs_on_project_id_id ON packages_packages USING btree (project_id, id) WHERE ((package_type = 3) AND (status = ANY (ARRAY[0, 1])));
@@ -27756,6 +27387,8 @@ 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_packages_debian_group_component_files_on_architecture_id ON packages_debian_group_component_files USING btree (architecture_id);
CREATE INDEX idx_packages_debian_project_component_files_on_architecture_id ON packages_debian_project_component_files USING btree (architecture_id);
@@ -27774,6 +27407,8 @@ CREATE INDEX idx_pkgs_debian_project_distribution_keys_on_distribution_id ON pac
CREATE UNIQUE INDEX idx_pkgs_dep_links_on_pkg_id_dependency_id_dependency_type ON packages_dependency_links USING btree (package_id, dependency_id, dependency_type);
+CREATE INDEX idx_pkgs_installable_package_files_on_package_id_id_file_name ON packages_package_files USING btree (package_id, id, file_name) WHERE (status = 0);
+
CREATE INDEX idx_proj_feat_usg_on_jira_dvcs_cloud_last_sync_at_and_proj_id ON project_feature_usages USING btree (jira_dvcs_cloud_last_sync_at, project_id) WHERE (jira_dvcs_cloud_last_sync_at IS NOT NULL);
CREATE INDEX idx_proj_feat_usg_on_jira_dvcs_server_last_sync_at_and_proj_id ON project_feature_usages USING btree (jira_dvcs_server_last_sync_at, project_id) WHERE (jira_dvcs_server_last_sync_at IS NOT NULL);
@@ -27812,13 +27447,15 @@ CREATE INDEX idx_security_scans_on_scan_type ON security_scans USING btree (scan
CREATE UNIQUE INDEX idx_serverless_domain_cluster_on_clusters_applications_knative ON serverless_domain_cluster USING btree (clusters_applications_knative_id);
+CREATE 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_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_partial_devops_adoption ON vulnerabilities USING btree (project_id, created_at) WHERE (state <> 1);
+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);
@@ -27982,7 +27619,7 @@ CREATE INDEX index_authentication_events_on_provider ON authentication_events US
CREATE INDEX index_authentication_events_on_provider_user_id_created_at ON authentication_events USING btree (provider, user_id, created_at) WHERE (result = 1);
-CREATE INDEX index_authentication_events_on_user_id ON authentication_events USING btree (user_id);
+CREATE INDEX index_authentication_events_on_user_and_ip_address_and_result ON authentication_events USING btree (user_id, ip_address, result);
CREATE INDEX index_award_emoji_on_awardable_type_and_awardable_id ON award_emoji USING btree (awardable_type, awardable_id);
@@ -28008,6 +27645,8 @@ CREATE INDEX index_batched_jobs_by_batched_migration_id_and_id ON batched_backgr
CREATE INDEX index_batched_jobs_on_batched_migration_id_and_status ON batched_background_migration_jobs USING btree (batched_background_migration_id, status);
+CREATE UNIQUE INDEX index_batched_migrations_on_gl_schema_and_unique_configuration ON batched_background_migrations USING btree (gitlab_schema, job_class_name, table_name, column_name, job_arguments);
+
CREATE INDEX index_board_assignees_on_assignee_id ON board_assignees USING btree (assignee_id);
CREATE UNIQUE INDEX index_board_assignees_on_board_id_and_assignee_id ON board_assignees USING btree (board_id, assignee_id);
@@ -28104,9 +27743,9 @@ CREATE INDEX index_bulk_import_failures_on_correlation_id_value ON bulk_import_f
CREATE INDEX index_bulk_imports_on_user_id ON bulk_imports USING btree (user_id);
-CREATE UNIQUE INDEX index_chat_names_on_service_id_and_team_id_and_chat_id ON chat_names USING btree (service_id, team_id, chat_id);
+CREATE UNIQUE INDEX index_chat_names_on_integration_id_and_team_id_and_chat_id ON chat_names USING btree (integration_id, team_id, chat_id);
-CREATE UNIQUE INDEX index_chat_names_on_user_id_and_service_id ON chat_names USING btree (user_id, service_id);
+CREATE UNIQUE INDEX index_chat_names_on_user_id_and_integration_id ON chat_names USING btree (user_id, integration_id);
CREATE UNIQUE INDEX index_chat_teams_on_namespace_id ON chat_teams USING btree (namespace_id);
@@ -28144,10 +27783,6 @@ CREATE INDEX index_ci_builds_on_project_id_and_id ON ci_builds USING btree (proj
CREATE INDEX index_ci_builds_on_project_id_and_name_and_ref ON ci_builds USING btree (project_id, name, ref) WHERE (((type)::text = 'Ci::Build'::text) AND ((status)::text = 'success'::text) AND ((retried = false) OR (retried IS NULL)));
-CREATE INDEX index_ci_builds_on_project_id_for_successfull_pages_deploy ON ci_builds USING btree (project_id) WHERE (((type)::text = 'GenericCommitStatus'::text) AND ((stage)::text = 'deploy'::text) AND ((name)::text = 'pages:deploy'::text) AND ((status)::text = 'success'::text));
-
-CREATE INDEX index_ci_builds_on_queued_at ON ci_builds USING btree (queued_at);
-
CREATE INDEX index_ci_builds_on_resource_group_and_status_and_commit_id ON ci_builds USING btree (resource_group_id, status, commit_id) WHERE (resource_group_id IS NOT NULL);
CREATE INDEX index_ci_builds_on_runner_id_and_id_desc ON ci_builds USING btree (runner_id, id DESC);
@@ -28158,8 +27793,6 @@ CREATE INDEX index_ci_builds_on_status_and_type_and_runner_id ON ci_builds USING
CREATE UNIQUE INDEX index_ci_builds_on_token_encrypted ON ci_builds USING btree (token_encrypted) WHERE (token_encrypted IS NOT NULL);
-CREATE UNIQUE INDEX index_ci_builds_on_token_partial ON ci_builds USING btree (token) WHERE (token IS NOT NULL);
-
CREATE INDEX index_ci_builds_on_updated_at ON ci_builds USING btree (updated_at);
CREATE INDEX index_ci_builds_on_upstream_pipeline_id ON ci_builds USING btree (upstream_pipeline_id) WHERE (upstream_pipeline_id IS NOT NULL);
@@ -28170,8 +27803,6 @@ CREATE INDEX index_ci_builds_on_user_id_and_created_at_and_type_eq_ci_build ON c
CREATE INDEX index_ci_builds_project_id_and_status_for_live_jobs_partial2 ON ci_builds USING btree (project_id, status) WHERE (((type)::text = 'Ci::Build'::text) AND ((status)::text = ANY (ARRAY[('running'::character varying)::text, ('pending'::character varying)::text, ('created'::character varying)::text])));
-CREATE INDEX index_ci_builds_runner_id_pending_covering ON ci_builds USING btree (runner_id, id) INCLUDE (project_id) WHERE (((status)::text = 'pending'::text) AND ((type)::text = 'Ci::Build'::text));
-
CREATE INDEX index_ci_builds_runner_id_running ON ci_builds USING btree (runner_id) WHERE (((status)::text = 'running'::text) AND ((type)::text = 'Ci::Build'::text));
CREATE UNIQUE INDEX index_ci_builds_runner_session_on_build_id ON ci_builds_runner_session USING btree (build_id);
@@ -28212,6 +27843,8 @@ CREATE UNIQUE INDEX index_ci_job_artifacts_on_job_id_and_file_type ON ci_job_art
CREATE INDEX index_ci_job_artifacts_on_project_id ON ci_job_artifacts USING btree (project_id);
+CREATE INDEX index_ci_job_artifacts_on_project_id_and_id ON ci_job_artifacts USING btree (project_id, id);
+
CREATE INDEX index_ci_job_artifacts_on_project_id_for_security_reports ON ci_job_artifacts USING btree (project_id) WHERE (file_type = ANY (ARRAY[5, 6, 7, 8]));
CREATE INDEX index_ci_job_token_project_scope_links_on_added_by_id ON ci_job_token_project_scope_links USING btree (added_by_id);
@@ -28338,6 +27971,8 @@ CREATE UNIQUE INDEX index_ci_runner_namespaces_on_runner_id_and_namespace_id ON
CREATE INDEX index_ci_runner_projects_on_project_id ON ci_runner_projects USING btree (project_id);
+CREATE UNIQUE INDEX index_ci_runner_versions_on_unique_status_and_version ON ci_runner_versions USING btree (status, version);
+
CREATE INDEX index_ci_runners_on_active ON ci_runners USING btree (active, id);
CREATE INDEX index_ci_runners_on_contacted_at_and_id_desc ON ci_runners USING btree (contacted_at, id DESC);
@@ -28366,12 +28001,24 @@ CREATE INDEX index_ci_runners_on_token_expires_at_and_id_desc ON ci_runners USIN
CREATE INDEX index_ci_runners_on_token_expires_at_desc_and_id_desc ON ci_runners USING btree (token_expires_at DESC, id DESC);
+CREATE INDEX index_ci_runners_on_version ON ci_runners USING btree (version);
+
CREATE UNIQUE INDEX index_ci_running_builds_on_build_id ON ci_running_builds USING btree (build_id);
CREATE INDEX index_ci_running_builds_on_project_id ON ci_running_builds USING btree (project_id);
CREATE INDEX index_ci_running_builds_on_runner_id ON ci_running_builds USING btree (runner_id);
+CREATE INDEX index_ci_secure_file_states_failed_verification ON ci_secure_file_states USING btree (verification_retry_at NULLS FIRST) WHERE (verification_state = 3);
+
+CREATE INDEX index_ci_secure_file_states_needs_verification ON ci_secure_file_states USING btree (verification_state) WHERE ((verification_state = 0) OR (verification_state = 3));
+
+CREATE INDEX index_ci_secure_file_states_on_ci_secure_file_id ON ci_secure_file_states USING btree (ci_secure_file_id);
+
+CREATE INDEX index_ci_secure_file_states_on_verification_state ON ci_secure_file_states USING btree (verification_state);
+
+CREATE INDEX index_ci_secure_file_states_pending_verification ON ci_secure_file_states USING btree (verified_at NULLS FIRST) WHERE (verification_state = 0);
+
CREATE INDEX index_ci_secure_files_on_project_id ON ci_secure_files USING btree (project_id);
CREATE INDEX index_ci_sources_pipelines_on_pipeline_id ON ci_sources_pipelines USING btree (pipeline_id);
@@ -28398,6 +28045,8 @@ CREATE INDEX index_ci_stages_on_pipeline_id_and_position ON ci_stages USING btre
CREATE INDEX index_ci_stages_on_project_id ON ci_stages USING btree (project_id);
+CREATE INDEX index_ci_subscriptions_projects_author_id ON ci_subscriptions_projects USING btree (author_id);
+
CREATE INDEX index_ci_subscriptions_projects_on_upstream_project_id ON ci_subscriptions_projects USING btree (upstream_project_id);
CREATE UNIQUE INDEX index_ci_subscriptions_projects_unique_subscription ON ci_subscriptions_projects USING btree (downstream_project_id, upstream_project_id);
@@ -28418,6 +28067,10 @@ CREATE INDEX index_ci_variables_on_key ON ci_variables USING btree (key);
CREATE UNIQUE INDEX index_ci_variables_on_project_id_and_key_and_environment_scope ON ci_variables USING btree (project_id, key, environment_scope);
+CREATE INDEX index_cicd_settings_on_namespace_id_where_stale_pruning_enabled ON namespace_ci_cd_settings USING btree (namespace_id) WHERE (allow_stale_runner_pruning = true);
+
+CREATE INDEX index_cis_vulnerability_reads_on_cluster_agent_id ON vulnerability_reads USING btree (casted_cluster_agent_id) WHERE (report_type = 7);
+
CREATE INDEX index_cluster_agent_tokens_on_agent_id_status_last_used_at ON cluster_agent_tokens USING btree (agent_id, status, last_used_at DESC NULLS LAST);
CREATE INDEX index_cluster_agent_tokens_on_created_by_user_id ON cluster_agent_tokens USING btree (created_by_user_id);
@@ -28426,8 +28079,12 @@ CREATE UNIQUE INDEX index_cluster_agent_tokens_on_token_encrypted ON cluster_age
CREATE INDEX index_cluster_agents_on_created_by_user_id ON cluster_agents USING btree (created_by_user_id);
+CREATE INDEX index_cluster_agents_on_project_id_and_has_vulnerabilities ON cluster_agents USING btree (project_id, has_vulnerabilities);
+
CREATE UNIQUE INDEX index_cluster_agents_on_project_id_and_name ON cluster_agents USING btree (project_id, name);
+CREATE UNIQUE INDEX index_cluster_enabled_grants_on_namespace_id ON cluster_enabled_grants USING btree (namespace_id);
+
CREATE UNIQUE INDEX index_cluster_groups_on_cluster_id_and_group_id ON cluster_groups USING btree (cluster_id, group_id);
CREATE INDEX index_cluster_groups_on_group_id ON cluster_groups USING btree (group_id);
@@ -28452,8 +28109,6 @@ CREATE UNIQUE INDEX index_clusters_applications_cilium_on_cluster_id ON clusters
CREATE UNIQUE INDEX index_clusters_applications_crossplane_on_cluster_id ON clusters_applications_crossplane USING btree (cluster_id);
-CREATE UNIQUE INDEX index_clusters_applications_elastic_stacks_on_cluster_id ON clusters_applications_elastic_stacks USING btree (cluster_id);
-
CREATE UNIQUE INDEX index_clusters_applications_helm_on_cluster_id ON clusters_applications_helm USING btree (cluster_id);
CREATE UNIQUE INDEX index_clusters_applications_ingress_on_cluster_id ON clusters_applications_ingress USING btree (cluster_id);
@@ -28470,8 +28125,6 @@ CREATE UNIQUE INDEX index_clusters_applications_runners_on_cluster_id ON cluster
CREATE INDEX index_clusters_applications_runners_on_runner_id ON clusters_applications_runners USING btree (runner_id);
-CREATE INDEX index_clusters_integration_elasticstack_enabled ON clusters_integration_elasticstack USING btree (enabled, created_at, cluster_id);
-
CREATE INDEX index_clusters_integration_prometheus_enabled ON clusters_integration_prometheus USING btree (enabled, created_at, cluster_id);
CREATE INDEX index_clusters_kubernetes_namespaces_on_cluster_project_id ON clusters_kubernetes_namespaces USING btree (cluster_project_id);
@@ -28596,14 +28249,12 @@ CREATE INDEX index_deploy_keys_projects_on_project_id ON deploy_keys_projects US
CREATE INDEX index_deploy_tokens_on_creator_id ON deploy_tokens USING btree (creator_id);
-CREATE UNIQUE INDEX index_deploy_tokens_on_token ON deploy_tokens USING btree (token);
-
-CREATE INDEX index_deploy_tokens_on_token_and_expires_at_and_id ON deploy_tokens USING btree (token, expires_at, id) WHERE (revoked IS FALSE);
-
CREATE UNIQUE INDEX index_deploy_tokens_on_token_encrypted ON deploy_tokens USING btree (token_encrypted);
CREATE INDEX index_deployment_approvals_on_approval_rule_id ON deployment_approvals USING btree (approval_rule_id);
+CREATE INDEX index_deployment_approvals_on_created_at_and_id ON deployment_approvals USING btree (created_at, id);
+
CREATE UNIQUE INDEX index_deployment_approvals_on_deployment_id_and_user_id ON deployment_approvals USING btree (deployment_id, user_id);
CREATE INDEX index_deployment_approvals_on_user_id ON deployment_approvals USING btree (user_id);
@@ -28688,6 +28339,8 @@ CREATE UNIQUE INDEX index_design_user_mentions_on_note_id ON design_user_mention
CREATE UNIQUE INDEX index_diff_note_positions_on_note_id_and_diff_type ON diff_note_positions USING btree (note_id, diff_type);
+CREATE INDEX index_dingtalk_tracker_data_on_integration_id ON dingtalk_tracker_data USING btree (integration_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);
@@ -28772,6 +28425,8 @@ CREATE INDEX index_epics_on_start_date_sourcing_epic_id ON epics USING btree (st
CREATE INDEX index_epics_on_start_date_sourcing_milestone_id ON epics USING btree (start_date_sourcing_milestone_id);
+CREATE INDEX index_error_tracking_client_for_enabled_check ON error_tracking_client_keys USING btree (project_id, public_key) WHERE (active = true);
+
CREATE INDEX index_error_tracking_client_keys_on_project_id ON error_tracking_client_keys USING btree (project_id);
CREATE INDEX index_error_tracking_error_events_on_error_id ON error_tracking_error_events USING btree (error_id);
@@ -28866,10 +28521,6 @@ CREATE INDEX index_geo_event_log_on_hashed_storage_attachments_event_id ON geo_e
CREATE INDEX index_geo_event_log_on_hashed_storage_migrated_event_id ON geo_event_log USING btree (hashed_storage_migrated_event_id) WHERE (hashed_storage_migrated_event_id IS NOT NULL);
-CREATE INDEX index_geo_event_log_on_job_artifact_deleted_event_id ON geo_event_log USING btree (job_artifact_deleted_event_id) WHERE (job_artifact_deleted_event_id IS NOT NULL);
-
-CREATE INDEX index_geo_event_log_on_lfs_object_deleted_event_id ON geo_event_log USING btree (lfs_object_deleted_event_id) WHERE (lfs_object_deleted_event_id IS NOT NULL);
-
CREATE INDEX index_geo_event_log_on_repositories_changed_event_id ON geo_event_log USING btree (repositories_changed_event_id) WHERE (repositories_changed_event_id IS NOT NULL);
CREATE INDEX index_geo_event_log_on_repository_created_event_id ON geo_event_log USING btree (repository_created_event_id) WHERE (repository_created_event_id IS NOT NULL);
@@ -28886,10 +28537,6 @@ CREATE INDEX index_geo_hashed_storage_attachments_events_on_project_id ON geo_ha
CREATE INDEX index_geo_hashed_storage_migrated_events_on_project_id ON geo_hashed_storage_migrated_events USING btree (project_id);
-CREATE INDEX index_geo_job_artifact_deleted_events_on_job_artifact_id ON geo_job_artifact_deleted_events USING btree (job_artifact_id);
-
-CREATE INDEX index_geo_lfs_object_deleted_events_on_lfs_object_id ON geo_lfs_object_deleted_events USING btree (lfs_object_id);
-
CREATE INDEX index_geo_node_namespace_links_on_geo_node_id ON geo_node_namespace_links USING btree (geo_node_id);
CREATE UNIQUE INDEX index_geo_node_namespace_links_on_geo_node_id_and_namespace_id ON geo_node_namespace_links USING btree (geo_node_id, namespace_id);
@@ -28970,9 +28617,9 @@ CREATE UNIQUE INDEX index_group_deploy_keys_group_on_group_deploy_key_and_group_
CREATE INDEX index_group_deploy_keys_groups_on_group_deploy_key_id ON group_deploy_keys_groups USING btree (group_deploy_key_id);
-CREATE UNIQUE INDEX index_group_deploy_keys_on_fingerprint ON group_deploy_keys USING btree (fingerprint);
+CREATE INDEX index_group_deploy_keys_on_fingerprint ON group_deploy_keys USING btree (fingerprint);
-CREATE INDEX index_group_deploy_keys_on_fingerprint_sha256 ON group_deploy_keys USING btree (fingerprint_sha256);
+CREATE UNIQUE INDEX index_group_deploy_keys_on_fingerprint_sha256_unique ON group_deploy_keys USING btree (fingerprint_sha256);
CREATE INDEX index_group_deploy_keys_on_user_id ON group_deploy_keys USING btree (user_id);
@@ -28982,7 +28629,7 @@ CREATE UNIQUE INDEX index_group_deploy_tokens_on_group_and_deploy_token_ids ON g
CREATE UNIQUE INDEX index_group_group_links_on_shared_group_and_shared_with_group ON group_group_links USING btree (shared_group_id, shared_with_group_id);
-CREATE INDEX index_group_group_links_on_shared_with_group_id ON group_group_links USING btree (shared_with_group_id);
+CREATE INDEX index_group_group_links_on_shared_with_group_and_shared_group ON group_group_links USING btree (shared_with_group_id, shared_group_id);
CREATE INDEX index_group_import_states_on_group_id ON group_import_states USING btree (group_id);
@@ -29000,6 +28647,8 @@ CREATE UNIQUE INDEX index_group_wiki_repositories_on_disk_path ON group_wiki_rep
CREATE INDEX index_group_wiki_repositories_on_shard_id ON group_wiki_repositories USING btree (shard_id);
+CREATE INDEX index_groups_on_parent_id_id ON namespaces USING btree (parent_id, id) WHERE ((type)::text = 'Group'::text);
+
CREATE INDEX index_historical_data_on_recorded_at ON historical_data USING btree (recorded_at);
CREATE UNIQUE INDEX index_http_integrations_on_active_and_project_and_endpoint ON alert_management_http_integrations USING btree (active, project_id, endpoint_identifier) WHERE active;
@@ -29040,6 +28689,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 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);
CREATE UNIQUE INDEX index_in_product_marketing_emails_on_user_track_series ON in_product_marketing_emails USING btree (user_id, track, series);
@@ -29058,6 +28709,14 @@ CREATE INDEX index_incident_management_oncall_schedules_on_project_id ON inciden
CREATE INDEX index_incident_management_oncall_shifts_on_participant_id ON incident_management_oncall_shifts USING btree (participant_id);
+CREATE INDEX index_incident_management_pending_alert_escalations_on_alert_id ON ONLY incident_management_pending_alert_escalations USING btree (alert_id);
+
+CREATE INDEX index_incident_management_pending_alert_escalations_on_rule_id ON ONLY incident_management_pending_alert_escalations USING btree (rule_id);
+
+CREATE INDEX index_incident_management_pending_issue_escalations_on_issue_id ON ONLY incident_management_pending_issue_escalations USING btree (issue_id);
+
+CREATE INDEX index_incident_management_pending_issue_escalations_on_rule_id ON ONLY incident_management_pending_issue_escalations USING btree (rule_id);
+
CREATE UNIQUE INDEX index_index_statuses_on_project_id ON index_statuses USING btree (project_id);
CREATE INDEX index_insights_on_namespace_id ON insights USING btree (namespace_id);
@@ -29068,25 +28727,15 @@ CREATE INDEX index_integrations_on_inherit_from_id ON integrations USING btree (
CREATE INDEX index_integrations_on_project_and_type_new_where_inherit_null ON integrations USING btree (project_id, type_new) WHERE (inherit_from_id IS NULL);
-CREATE INDEX index_integrations_on_project_and_type_where_inherit_null ON integrations USING btree (project_id, type) WHERE (inherit_from_id IS NULL);
-
CREATE UNIQUE INDEX index_integrations_on_project_id_and_type_new_unique ON integrations USING btree (project_id, type_new);
-CREATE UNIQUE INDEX index_integrations_on_project_id_and_type_unique ON integrations USING btree (project_id, type);
-
-CREATE INDEX index_integrations_on_type ON integrations USING btree (type);
-
-CREATE UNIQUE INDEX index_integrations_on_type_and_instance_partial ON integrations USING btree (type, instance) WHERE (instance = true);
-
-CREATE INDEX index_integrations_on_type_id_when_active_and_project_id_not_nu ON integrations USING btree (type, id) WHERE ((active = true) AND (project_id IS NOT NULL));
-
CREATE INDEX index_integrations_on_type_new ON integrations USING btree (type_new);
CREATE INDEX index_integrations_on_type_new_and_instance_partial ON integrations USING btree (type_new, instance) WHERE (instance = true);
-CREATE INDEX index_integrations_on_type_new_id_when_active_and_has_project ON integrations USING btree (type_new, id) WHERE ((active = true) AND (project_id IS NOT NULL));
+CREATE INDEX index_integrations_on_type_new_id_when_active_and_has_group ON integrations USING btree (type_new, id, inherit_from_id) WHERE ((active = true) AND (group_id IS NOT NULL));
-CREATE UNIQUE INDEX index_integrations_on_unique_group_id_and_type ON integrations USING btree (group_id, type);
+CREATE INDEX index_integrations_on_type_new_id_when_active_and_has_project ON integrations USING btree (type_new, id) WHERE ((active = true) AND (project_id IS NOT NULL));
CREATE INDEX index_integrations_on_unique_group_id_and_type_new ON integrations USING btree (group_id, type_new);
@@ -29102,6 +28751,8 @@ CREATE INDEX index_ip_restrictions_on_group_id ON ip_restrictions USING btree (g
CREATE INDEX index_issuable_metric_images_on_issue_id ON issuable_metric_images USING btree (issue_id);
+CREATE INDEX index_issuable_resource_links_on_issue_id ON issuable_resource_links USING btree (issue_id);
+
CREATE UNIQUE INDEX index_issuable_severities_on_issue_id ON issuable_severities USING btree (issue_id);
CREATE INDEX index_issuable_slas_on_due_at_id_label_applied_issuable_closed ON issuable_slas USING btree (due_at, id) WHERE ((label_applied = false) AND (issuable_closed = false));
@@ -29130,7 +28781,7 @@ CREATE INDEX index_issue_metrics_on_issue_id_and_timestamps ON issue_metrics USI
CREATE INDEX index_issue_on_project_id_state_id_and_blocking_issues_count ON issues USING btree (project_id, state_id, blocking_issues_count);
-CREATE INDEX index_issue_tracker_data_on_service_id ON issue_tracker_data USING btree (service_id);
+CREATE INDEX index_issue_tracker_data_on_integration_id ON issue_tracker_data USING btree (integration_id);
CREATE UNIQUE INDEX index_issue_user_mentions_on_note_id ON issue_user_mentions USING btree (note_id) WHERE (note_id IS NOT NULL);
@@ -29144,6 +28795,8 @@ 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_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_duplicated_to_id ON issues USING btree (duplicated_to_id) WHERE (duplicated_to_id IS NOT NULL);
CREATE INDEX index_issues_on_id_and_weight ON issues USING btree (id, weight);
@@ -29156,7 +28809,7 @@ CREATE INDEX index_issues_on_milestone_id ON issues USING btree (milestone_id);
CREATE INDEX index_issues_on_moved_to_id ON issues USING btree (moved_to_id) WHERE (moved_to_id IS NOT NULL);
-CREATE INDEX index_issues_on_project_id_and_closed_at ON issues USING btree (project_id, closed_at);
+CREATE INDEX index_issues_on_namespace_id ON issues USING btree (namespace_id);
CREATE INDEX index_issues_on_project_id_and_created_at_issue_type_incident ON issues USING btree (project_id, created_at) WHERE (issue_type = 1);
@@ -29168,12 +28821,18 @@ CREATE INDEX index_issues_on_project_id_and_state_id_and_created_at_and_id ON is
CREATE INDEX index_issues_on_project_id_and_upvotes_count ON issues USING btree (project_id, upvotes_count);
+CREATE INDEX index_issues_on_project_id_closed_at_desc_state_id_and_id ON issues USING btree (project_id, closed_at DESC NULLS LAST, state_id, id);
+
+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_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_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_updated_at ON issues USING btree (updated_at);
CREATE INDEX index_issues_on_updated_by_id ON issues USING btree (updated_by_id) WHERE (updated_by_id IS NOT NULL);
@@ -29190,7 +28849,7 @@ CREATE INDEX index_jira_imports_on_project_id_and_jira_project_key ON jira_impor
CREATE INDEX index_jira_imports_on_user_id ON jira_imports USING btree (user_id);
-CREATE INDEX index_jira_tracker_data_on_service_id ON jira_tracker_data USING btree (service_id);
+CREATE INDEX index_jira_tracker_data_on_integration_id ON jira_tracker_data USING btree (integration_id);
CREATE INDEX index_job_artifact_states_failed_verification ON ci_job_artifact_states USING btree (verification_retry_at NULLS FIRST) WHERE (verification_state = 3);
@@ -29200,11 +28859,13 @@ CREATE INDEX index_job_artifact_states_on_verification_state ON ci_job_artifact_
CREATE INDEX index_job_artifact_states_pending_verification ON ci_job_artifact_states USING btree (verified_at NULLS FIRST) WHERE (verification_state = 0);
+CREATE INDEX index_key_updated_at_on_user_custom_attribute ON user_custom_attributes USING btree (key, updated_at);
+
CREATE INDEX index_keys_on_expires_at_and_id ON keys USING btree (date(timezone('UTC'::text, expires_at)), id) WHERE (expiry_notification_delivered_at IS NULL);
-CREATE UNIQUE INDEX index_keys_on_fingerprint ON keys USING btree (fingerprint);
+CREATE INDEX index_keys_on_fingerprint ON keys USING btree (fingerprint);
-CREATE INDEX index_keys_on_fingerprint_sha256 ON keys USING btree (fingerprint_sha256);
+CREATE UNIQUE INDEX index_keys_on_fingerprint_sha256_unique ON keys USING btree (fingerprint_sha256);
CREATE INDEX index_keys_on_id_and_ldap_key_type ON keys USING btree (id) WHERE ((type)::text = 'LDAPKey'::text);
@@ -29278,6 +28939,10 @@ CREATE INDEX index_lists_on_milestone_id ON lists USING btree (milestone_id);
CREATE INDEX index_lists_on_user_id ON lists USING btree (user_id);
+CREATE INDEX index_loose_foreign_keys_deleted_records_for_partitioned_query ON ONLY loose_foreign_keys_deleted_records USING btree (partition, fully_qualified_table_name, consume_after, id) WHERE (status = 1);
+
+CREATE INDEX index_member_roles_on_namespace_id ON member_roles USING btree (namespace_id);
+
CREATE INDEX index_member_tasks_on_member_id ON member_tasks USING btree (member_id);
CREATE UNIQUE INDEX index_member_tasks_on_member_id_and_project_id ON member_tasks USING btree (member_id, project_id);
@@ -29294,6 +28959,8 @@ CREATE UNIQUE INDEX index_members_on_invite_token ON members USING btree (invite
CREATE INDEX index_members_on_member_namespace_id ON members USING btree (member_namespace_id);
+CREATE INDEX index_members_on_member_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);
@@ -29452,6 +29119,20 @@ CREATE INDEX index_milestones_on_title_trigram ON milestones USING gin (title gi
CREATE INDEX index_mirror_data_non_scheduled_or_started ON project_mirror_data USING btree (next_execution_timestamp, retry_count) WHERE ((status)::text <> ALL ('{scheduled,started}'::text[]));
+CREATE INDEX index_ml_candidate_metrics_on_candidate_id ON ml_candidate_metrics USING btree (candidate_id);
+
+CREATE INDEX index_ml_candidate_params_on_candidate_id ON ml_candidate_params USING btree (candidate_id);
+
+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);
+
+CREATE UNIQUE INDEX index_ml_experiments_on_project_id_and_iid ON ml_experiments USING btree (project_id, iid);
+
+CREATE UNIQUE INDEX index_ml_experiments_on_project_id_and_name ON ml_experiments USING btree (project_id, name);
+
+CREATE INDEX index_ml_experiments_on_user_id ON ml_experiments USING btree (user_id);
+
CREATE UNIQUE INDEX index_mr_blocks_on_blocking_and_blocked_mr_ids ON merge_request_blocks USING btree (blocking_merge_request_id, blocked_merge_request_id);
CREATE INDEX index_mr_cleanup_schedules_timestamps_status ON merge_request_cleanup_schedules USING btree (scheduled_at) WHERE ((completed_at IS NULL) AND (status = 0));
@@ -29466,13 +29147,13 @@ CREATE INDEX index_namespace_admin_notes_on_namespace_id ON namespace_admin_note
CREATE UNIQUE INDEX index_namespace_aggregation_schedules_on_namespace_id ON namespace_aggregation_schedules USING btree (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_bans_on_namespace_id_and_user_id ON namespace_bans USING btree (namespace_id, user_id);
-CREATE UNIQUE INDEX index_namespace_statistics_on_namespace_id ON namespace_statistics USING btree (namespace_id);
+CREATE INDEX index_namespace_bans_on_user_id ON namespace_bans USING btree (user_id);
-CREATE INDEX index_namespaces_id_parent_id_is_not_null ON namespaces USING btree (id) WHERE (parent_id IS NOT NULL);
+CREATE UNIQUE INDEX index_namespace_root_storage_statistics_on_namespace_id ON namespace_root_storage_statistics USING btree (namespace_id);
-CREATE INDEX index_namespaces_id_parent_id_is_null ON namespaces USING btree (id) WHERE (parent_id IS NULL);
+CREATE UNIQUE INDEX index_namespace_statistics_on_namespace_id ON namespace_statistics USING btree (namespace_id);
CREATE UNIQUE INDEX index_namespaces_name_parent_id_type ON namespaces USING btree (name, parent_id, type);
@@ -29510,6 +29191,8 @@ CREATE INDEX index_namespaces_on_traversal_ids ON namespaces USING gin (traversa
CREATE INDEX index_namespaces_on_traversal_ids_for_groups ON namespaces USING gin (traversal_ids) WHERE ((type)::text = 'Group'::text);
+CREATE INDEX index_namespaces_on_traversal_ids_for_groups_btree ON namespaces USING btree (traversal_ids) WHERE ((type)::text = 'Group'::text);
+
CREATE INDEX index_namespaces_on_type_and_id ON namespaces USING btree (type, id);
CREATE INDEX index_namespaces_public_groups_name_id ON namespaces USING btree (name, id) WHERE (((type)::text = 'Group'::text) AND (visibility_level = 20));
@@ -29530,6 +29213,8 @@ CREATE INDEX index_notes_on_created_at ON notes USING btree (created_at);
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_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);
@@ -29544,6 +29229,8 @@ CREATE INDEX index_notification_settings_on_source_and_level_and_user ON notific
CREATE UNIQUE INDEX index_notifications_on_user_id_and_source_id_and_source_type ON notification_settings USING btree (user_id, source_id, source_type);
+CREATE UNIQUE INDEX index_ns_user_callouts_feature ON user_namespace_callouts USING btree (user_id, feature_name, namespace_id);
+
CREATE INDEX index_oauth_access_grants_on_resource_owner_id ON oauth_access_grants USING btree (resource_owner_id, application_id, created_at);
CREATE UNIQUE INDEX index_oauth_access_grants_on_token ON oauth_access_grants USING btree (token);
@@ -29552,8 +29239,6 @@ CREATE INDEX index_oauth_access_tokens_on_application_id ON oauth_access_tokens
CREATE UNIQUE INDEX index_oauth_access_tokens_on_refresh_token ON oauth_access_tokens USING btree (refresh_token);
-CREATE INDEX index_oauth_access_tokens_on_resource_owner_id ON oauth_access_tokens USING btree (resource_owner_id);
-
CREATE UNIQUE INDEX index_oauth_access_tokens_on_token ON oauth_access_tokens USING btree (token);
CREATE INDEX index_oauth_applications_on_owner_id_and_owner_type ON oauth_applications USING btree (owner_id, owner_type);
@@ -29564,6 +29249,12 @@ CREATE INDEX index_oauth_openid_requests_on_access_grant_id ON oauth_openid_requ
CREATE UNIQUE INDEX index_on_deploy_keys_id_and_type_and_public ON keys USING btree (id, type) WHERE (public = true);
+CREATE INDEX index_on_dingtalk_tracker_data_corpid ON dingtalk_tracker_data USING btree (corpid) WHERE (corpid IS NOT NULL);
+
+COMMENT ON INDEX index_on_dingtalk_tracker_data_corpid IS 'JiHu-specific index';
+
+CREATE INDEX index_on_events_to_improve_contribution_analytics_performance ON events USING btree (project_id, target_type, action, created_at, author_id, id);
+
CREATE INDEX index_on_group_id_on_webhooks ON web_hooks USING btree (group_id);
CREATE INDEX index_on_identities_lower_extern_uid_and_provider ON identities USING btree (lower((extern_uid)::text), provider);
@@ -29602,6 +29293,8 @@ 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_users_lower_email ON users USING btree (lower((email)::text));
CREATE INDEX index_on_users_lower_username ON users USING btree (lower((username)::text));
@@ -29686,12 +29379,16 @@ CREATE INDEX index_packages_maven_metadata_on_path ON packages_maven_metadata US
CREATE INDEX index_packages_nuget_dl_metadata_on_dependency_link_id ON packages_nuget_dependency_link_metadata USING btree (dependency_link_id);
+CREATE INDEX index_packages_on_available_pypi_packages ON packages_packages USING btree (project_id, id) WHERE ((status = ANY (ARRAY[0, 1])) AND (package_type = 5) AND (version IS NOT NULL));
+
CREATE INDEX index_packages_package_file_build_infos_on_package_file_id ON packages_package_file_build_infos USING btree (package_file_id);
CREATE INDEX index_packages_package_file_build_infos_on_pipeline_id ON packages_package_file_build_infos USING btree (pipeline_id);
CREATE INDEX index_packages_package_files_on_file_store ON packages_package_files USING btree (file_store);
+CREATE INDEX index_packages_package_files_on_id_for_cleanup ON packages_package_files USING btree (id) WHERE (status = 1);
+
CREATE INDEX index_packages_package_files_on_package_id_and_file_name ON packages_package_files USING btree (package_id, file_name);
CREATE INDEX index_packages_package_files_on_package_id_id ON packages_package_files USING btree (package_id, id);
@@ -29712,7 +29409,7 @@ CREATE INDEX index_packages_packages_on_project_id_and_created_at ON packages_pa
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 ON packages_packages USING btree (project_id, status);
+CREATE INDEX index_packages_packages_on_project_id_and_status_and_id ON packages_packages USING btree (project_id, status, id);
CREATE INDEX index_packages_packages_on_project_id_and_version ON packages_packages USING btree (project_id, version);
@@ -29766,8 +29463,6 @@ CREATE INDEX index_pages_domains_on_verified_at_and_enabled_until ON pages_domai
CREATE INDEX index_pages_domains_on_wildcard ON pages_domains USING btree (wildcard);
-CREATE UNIQUE INDEX index_partial_am_alerts_on_project_id_and_fingerprint ON alert_management_alerts USING btree (project_id, fingerprint) WHERE (status <> 2);
-
CREATE INDEX index_partial_ci_builds_on_user_id_name_parser_features ON ci_builds USING btree (user_id, name) WHERE (((type)::text = 'Ci::Build'::text) AND ((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, ('dast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('license_management'::character varying)::text, ('license_scanning'::character varying)::text, ('sast'::character varying)::text, ('coverage_fuzzing'::character varying)::text, ('secret_detection'::character varying)::text])));
CREATE INDEX index_pat_on_user_id_and_expires_at ON personal_access_tokens USING btree (user_id, expires_at);
@@ -29778,6 +29473,10 @@ CREATE INDEX index_path_locks_on_project_id ON path_locks USING btree (project_i
CREATE INDEX index_path_locks_on_user_id ON path_locks USING btree (user_id);
+CREATE INDEX index_pe_approval_rules_on_required_approvals_and_created_at ON protected_environment_approval_rules USING btree (required_approvals, created_at);
+
+CREATE INDEX index_personal_access_tokens_on_id_and_created_at ON personal_access_tokens USING btree (id, created_at);
+
CREATE UNIQUE INDEX index_personal_access_tokens_on_token_digest ON personal_access_tokens USING btree (token_digest);
CREATE INDEX index_personal_access_tokens_on_user_id ON personal_access_tokens USING btree (user_id);
@@ -29828,6 +29527,8 @@ CREATE INDEX index_project_deploy_tokens_on_deploy_token_id ON project_deploy_to
CREATE UNIQUE INDEX index_project_deploy_tokens_on_project_id_and_deploy_token_id ON project_deploy_tokens USING btree (project_id, deploy_token_id);
+CREATE UNIQUE INDEX index_project_export_job_relation ON project_relation_exports USING btree (project_export_job_id, relation);
+
CREATE UNIQUE INDEX index_project_export_jobs_on_jid ON project_export_jobs USING btree (jid);
CREATE INDEX index_project_export_jobs_on_project_id_and_jid ON project_export_jobs USING btree (project_id, jid);
@@ -29848,7 +29549,7 @@ COMMENT ON INDEX index_project_features_on_project_id_include_container_registry
CREATE INDEX index_project_features_on_project_id_ral_20 ON project_features USING btree (project_id) WHERE (repository_access_level = 20);
-CREATE INDEX index_project_group_links_on_group_id ON project_group_links USING btree (group_id);
+CREATE INDEX index_project_group_links_on_group_id_and_project_id ON project_group_links USING btree (group_id, project_id);
CREATE INDEX index_project_group_links_on_project_id ON project_group_links USING btree (project_id);
@@ -29866,6 +29567,10 @@ CREATE INDEX index_project_pages_metadata_on_pages_deployment_id ON project_page
CREATE INDEX index_project_pages_metadata_on_project_id_and_deployed_is_true ON project_pages_metadata USING btree (project_id) WHERE (deployed = true);
+CREATE INDEX index_project_relation_export_upload_id ON project_relation_export_uploads USING btree (project_relation_export_id);
+
+CREATE INDEX index_project_relation_exports_on_project_export_job_id ON project_relation_exports USING btree (project_export_job_id);
+
CREATE UNIQUE INDEX index_project_repositories_on_disk_path ON project_repositories USING btree (disk_path);
CREATE UNIQUE INDEX index_project_repositories_on_project_id ON project_repositories USING btree (project_id);
@@ -29878,6 +29583,8 @@ CREATE UNIQUE INDEX index_project_repository_states_on_project_id ON project_rep
CREATE INDEX index_project_repository_storage_moves_on_project_id ON project_repository_storage_moves USING btree (project_id);
+CREATE INDEX index_project_settings_on_legacy_open_source_license_available ON project_settings USING btree (legacy_open_source_license_available) WHERE (legacy_open_source_license_available = true);
+
CREATE INDEX index_project_settings_on_project_id_partially ON project_settings USING btree (project_id) WHERE (has_vulnerabilities IS TRUE);
CREATE UNIQUE INDEX index_project_settings_on_push_rule_id ON project_settings USING btree (push_rule_id);
@@ -29902,7 +29609,7 @@ CREATE UNIQUE INDEX index_project_topics_on_project_id_and_topic_id ON project_t
CREATE INDEX index_project_topics_on_topic_id ON project_topics USING btree (topic_id);
-CREATE UNIQUE INDEX index_project_tracing_settings_on_project_id ON project_tracing_settings USING btree (project_id);
+CREATE UNIQUE INDEX index_project_user_callouts_feature ON user_project_callouts USING btree (user_id, feature_name, project_id);
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));
@@ -29982,10 +29689,6 @@ CREATE UNIQUE INDEX index_projects_on_project_namespace_id ON projects USING btr
CREATE INDEX index_projects_on_repository_storage ON projects USING btree (repository_storage);
-CREATE INDEX index_projects_on_runners_token ON projects USING btree (runners_token);
-
-CREATE INDEX index_projects_on_runners_token_encrypted ON projects USING btree (runners_token_encrypted);
-
CREATE INDEX index_projects_on_star_count ON projects USING btree (star_count);
CREATE INDEX index_projects_on_updated_at_and_id ON projects USING btree (updated_at, id);
@@ -30042,6 +29745,8 @@ CREATE INDEX index_protected_environment_deploy_access_levels_on_group_id ON pro
CREATE INDEX index_protected_environment_deploy_access_levels_on_user_id ON protected_environment_deploy_access_levels USING btree (user_id);
+CREATE INDEX index_protected_environments_on_approval_count_and_created_at ON protected_environments USING btree (required_approval_count, created_at);
+
CREATE UNIQUE INDEX index_protected_environments_on_group_id_and_name ON protected_environments USING btree (group_id, name) WHERE (group_id IS NOT NULL);
CREATE INDEX index_protected_environments_on_project_id ON protected_environments USING btree (project_id);
@@ -30100,8 +29805,6 @@ CREATE INDEX index_requirements_management_test_reports_on_build_id ON requireme
CREATE INDEX index_requirements_management_test_reports_on_issue_id ON requirements_management_test_reports USING btree (issue_id);
-CREATE INDEX index_requirements_management_test_reports_on_requirement_id ON requirements_management_test_reports USING btree (requirement_id);
-
CREATE INDEX index_requirements_on_author_id ON requirements USING btree (author_id);
CREATE INDEX index_requirements_on_created_at ON requirements USING btree (created_at);
@@ -30118,6 +29821,10 @@ CREATE INDEX index_requirements_on_title_trigram ON requirements USING gin (titl
CREATE INDEX index_requirements_on_updated_at ON requirements USING btree (updated_at);
+CREATE INDEX index_requirements_project_id_user_id_id_and_target_type ON todos USING btree (project_id, user_id, id, target_type);
+
+CREATE INDEX index_requirements_user_id_and_target_type ON todos USING btree (user_id, target_type);
+
CREATE INDEX index_resource_iteration_events_on_issue_id ON resource_iteration_events USING btree (issue_id);
CREATE INDEX index_resource_iteration_events_on_iteration_id ON resource_iteration_events USING btree (iteration_id);
@@ -30190,6 +29897,18 @@ CREATE INDEX index_saml_providers_on_group_id ON saml_providers USING btree (gro
CREATE UNIQUE INDEX index_saved_replies_on_name_text_pattern_ops ON saved_replies USING btree (user_id, name text_pattern_ops);
+CREATE INDEX index_sbom_component_versions_on_component_id ON sbom_component_versions USING btree (component_id);
+
+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 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 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);
@@ -30214,12 +29933,16 @@ CREATE INDEX index_security_findings_on_scanner_id ON security_findings USING bt
CREATE INDEX index_security_findings_on_severity ON security_findings USING btree (severity);
-CREATE UNIQUE INDEX index_security_findings_on_uuid_and_scan_id ON security_findings USING btree (uuid, scan_id);
+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_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)));
+
CREATE INDEX index_security_scans_on_pipeline_id ON security_scans USING btree (pipeline_id);
CREATE INDEX index_security_scans_on_project_id ON security_scans USING btree (project_id);
@@ -30254,7 +29977,7 @@ CREATE UNIQUE INDEX index_shards_on_name ON shards USING btree (name);
CREATE UNIQUE INDEX index_site_profile_secret_variables_on_site_profile_id_and_key ON dast_site_profile_secret_variables USING btree (dast_site_profile_id, key);
-CREATE INDEX index_slack_integrations_on_service_id ON slack_integrations USING btree (service_id);
+CREATE INDEX index_slack_integrations_on_integration_id ON slack_integrations USING btree (integration_id);
CREATE UNIQUE INDEX index_slack_integrations_on_team_id_and_alias ON slack_integrations USING btree (team_id, alias);
@@ -30334,6 +30057,12 @@ 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);
+CREATE UNIQUE INDEX index_ssh_signatures_on_commit_sha ON ssh_signatures USING btree (commit_sha);
+
+CREATE INDEX index_ssh_signatures_on_key_id ON ssh_signatures USING btree (key_id);
+
+CREATE INDEX index_ssh_signatures_on_project_id ON ssh_signatures USING btree (project_id);
+
CREATE INDEX index_status_check_responses_on_external_approval_rule_id ON status_check_responses USING btree (external_approval_rule_id);
CREATE INDEX index_status_check_responses_on_external_status_check_id ON status_check_responses USING btree (external_status_check_id);
@@ -30390,6 +30119,8 @@ CREATE UNIQUE INDEX index_terraform_states_on_project_id_and_name ON terraform_s
CREATE UNIQUE INDEX index_terraform_states_on_uuid ON terraform_states USING btree (uuid);
+CREATE UNIQUE INDEX index_timelog_categories_on_unique_name_per_namespace ON timelog_categories USING btree (namespace_id, lower(name));
+
CREATE INDEX index_timelogs_on_issue_id ON timelogs USING btree (issue_id);
CREATE INDEX index_timelogs_on_merge_request_id ON timelogs USING btree (merge_request_id);
@@ -30414,12 +30145,8 @@ CREATE INDEX index_todos_on_note_id ON todos USING btree (note_id);
CREATE INDEX index_todos_on_project_id_and_id ON todos USING btree (project_id, id);
-CREATE INDEX index_todos_on_project_id_and_user_id_and_id ON todos USING btree (project_id, user_id, id);
-
CREATE INDEX index_todos_on_target_type_and_target_id ON todos USING btree (target_type, target_id);
-CREATE INDEX index_todos_on_user_id ON todos USING btree (user_id);
-
CREATE INDEX index_todos_on_user_id_and_id_done ON todos USING btree (user_id, id) WHERE ((state)::text = 'done'::text);
CREATE INDEX index_todos_on_user_id_and_id_pending ON todos USING btree (user_id, id) WHERE ((state)::text = 'pending'::text);
@@ -30446,6 +30173,10 @@ CREATE INDEX index_u2f_registrations_on_user_id ON u2f_registrations USING btree
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);
+
+CREATE UNIQUE INDEX index_uniq_projects_on_runners_token_encrypted ON projects USING btree (runners_token_encrypted);
+
CREATE UNIQUE INDEX index_unique_ci_runner_projects_on_runner_id_and_project_id ON ci_runner_projects USING btree (runner_id, project_id);
CREATE UNIQUE INDEX index_unique_issue_metrics_issue_id ON issue_metrics USING btree (issue_id);
@@ -30456,6 +30187,8 @@ CREATE INDEX index_unit_test_failures_failed_at ON ci_unit_test_failures USING b
CREATE UNIQUE INDEX index_unit_test_failures_unique_columns ON ci_unit_test_failures USING btree (unit_test_id, failed_at DESC, build_id);
+CREATE UNIQUE INDEX index_unresolved_alerts_on_project_id_and_fingerprint ON alert_management_alerts USING btree (project_id, fingerprint) WHERE ((fingerprint IS NOT NULL) AND (status <> 2));
+
CREATE UNIQUE INDEX index_upcoming_reconciliations_on_namespace_id ON upcoming_reconciliations USING btree (namespace_id);
CREATE INDEX index_upload_states_failed_verification ON upload_states USING btree (verification_retry_at NULLS FIRST) WHERE (verification_state = 3);
@@ -30508,12 +30241,16 @@ CREATE INDEX index_user_highest_roles_on_user_id_and_highest_access_level ON use
CREATE INDEX index_user_interacted_projects_on_user_id ON user_interacted_projects USING btree (user_id);
+CREATE INDEX index_user_namespace_callouts_on_namespace_id ON user_namespace_callouts USING btree (namespace_id);
+
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_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);
+CREATE INDEX index_user_project_callouts_on_project_id ON user_project_callouts USING btree (project_id);
+
CREATE INDEX index_user_statuses_on_clear_status_at_not_null ON user_statuses USING btree (clear_status_at) WHERE (clear_status_at IS NOT NULL);
CREATE INDEX index_user_statuses_on_user_id ON user_statuses USING btree (user_id);
@@ -30582,11 +30319,19 @@ CREATE UNIQUE INDEX index_users_star_projects_on_user_id_and_project_id ON users
CREATE INDEX index_users_with_static_object_token ON users USING btree (id) WHERE ((static_object_token IS NOT NULL) AND (static_object_token_encrypted IS NULL));
+CREATE UNIQUE INDEX index_verification_codes_on_phone_and_visitor_id_code ON ONLY verification_codes USING btree (visitor_id_code, phone, created_at);
+
+COMMENT ON INDEX index_verification_codes_on_phone_and_visitor_id_code IS 'JiHu-specific index';
+
CREATE UNIQUE INDEX index_vuln_historical_statistics_on_project_id_and_date ON vulnerability_historical_statistics USING btree (project_id, date);
+CREATE INDEX index_vuln_reads_on_casted_cluster_agent_id_where_it_is_null ON vulnerability_reads USING btree (casted_cluster_agent_id) WHERE (casted_cluster_agent_id IS NOT NULL);
+
+CREATE INDEX index_vuln_reads_on_namespace_id_state_severity_and_vuln_id ON vulnerability_reads USING btree (namespace_id, state, severity, vulnerability_id DESC);
+
CREATE INDEX index_vuln_reads_on_project_id_state_severity_and_vuln_id ON vulnerability_reads USING btree (project_id, state, severity, vulnerability_id DESC);
-CREATE INDEX index_vulnerabilites_common_finder_query ON vulnerabilities USING btree (project_id, state, report_type, severity, id);
+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);
@@ -30602,8 +30347,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 ON vulnerabilities USING btree (project_id, 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);
@@ -30618,6 +30361,10 @@ CREATE INDEX index_vulnerabilities_on_state_case_id_desc ON vulnerabilities USIN
CREATE INDEX index_vulnerabilities_on_updated_by_id ON vulnerabilities USING btree (updated_by_id);
+CREATE INDEX index_vulnerabilities_project_id_and_id_on_default_branch ON vulnerabilities USING btree (project_id, id) WHERE (present_on_default_branch IS TRUE);
+
+CREATE INDEX index_vulnerabilities_project_id_state_severity_default_branch ON vulnerabilities USING btree (project_id, state, severity, present_on_default_branch);
+
CREATE INDEX index_vulnerability_exports_on_author_id ON vulnerability_exports USING btree (author_id);
CREATE INDEX index_vulnerability_exports_on_file_store ON vulnerability_exports USING btree (file_store);
@@ -30630,6 +30377,8 @@ CREATE INDEX index_vulnerability_external_issue_links_on_author_id ON vulnerabil
CREATE INDEX index_vulnerability_external_issue_links_on_vulnerability_id ON vulnerability_external_issue_links USING btree (vulnerability_id);
+CREATE INDEX index_vulnerability_feedback_finding_uuid ON vulnerability_feedback USING hash (finding_uuid);
+
CREATE INDEX index_vulnerability_feedback_on_author_id ON vulnerability_feedback USING btree (author_id);
CREATE INDEX index_vulnerability_feedback_on_comment_author_id ON vulnerability_feedback USING btree (comment_author_id);
@@ -30658,6 +30407,8 @@ CREATE UNIQUE INDEX index_vulnerability_identifiers_on_project_id_and_fingerprin
CREATE INDEX index_vulnerability_issue_links_on_issue_id ON vulnerability_issue_links USING btree (issue_id);
+CREATE INDEX index_vulnerability_merge_request_links_on_merge_request_id ON vulnerability_merge_request_links USING btree (merge_request_id);
+
CREATE INDEX index_vulnerability_occurrence_identifiers_on_identifier_id ON vulnerability_occurrence_identifiers USING btree (identifier_id);
CREATE UNIQUE INDEX index_vulnerability_occurrence_identifiers_on_unique_keys ON vulnerability_occurrence_identifiers USING btree (occurrence_id, identifier_id);
@@ -30676,8 +30427,6 @@ CREATE INDEX index_vulnerability_occurrences_on_location_k8s_agent_id ON vulnera
CREATE INDEX index_vulnerability_occurrences_on_location_k8s_cluster_id ON vulnerability_occurrences USING gin ((((location -> 'kubernetes_resource'::text) -> 'cluster_id'::text))) WHERE (report_type = 7);
-CREATE INDEX index_vulnerability_occurrences_on_migrated_to_new_structure ON vulnerability_occurrences USING btree (migrated_to_new_structure, id);
-
CREATE INDEX index_vulnerability_occurrences_on_primary_identifier_id ON vulnerability_occurrences USING btree (primary_identifier_id);
CREATE INDEX index_vulnerability_occurrences_on_project_fingerprint ON vulnerability_occurrences USING btree (project_fingerprint);
@@ -30690,10 +30439,14 @@ CREATE INDEX index_vulnerability_occurrences_on_vulnerability_id ON vulnerabilit
CREATE INDEX index_vulnerability_reads_common_finder_query ON vulnerability_reads USING btree (project_id, state, report_type, severity, vulnerability_id DESC);
+CREATE INDEX index_vulnerability_reads_common_finder_query_with_namespace_id ON vulnerability_reads USING btree (namespace_id, state, report_type, severity, vulnerability_id DESC);
+
CREATE INDEX index_vulnerability_reads_on_cluster_agent_id ON vulnerability_reads USING btree (cluster_agent_id) WHERE (report_type = 7);
CREATE INDEX index_vulnerability_reads_on_location_image ON vulnerability_reads USING btree (location_image) WHERE (report_type = ANY (ARRAY[2, 7]));
+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_scanner_id ON vulnerability_reads USING btree (scanner_id);
CREATE UNIQUE INDEX index_vulnerability_reads_on_uuid ON vulnerability_reads USING btree (uuid);
@@ -30704,6 +30457,10 @@ CREATE UNIQUE INDEX index_vulnerability_remediations_on_project_id_and_checksum
CREATE UNIQUE INDEX index_vulnerability_scanners_on_project_id_and_external_id ON vulnerability_scanners USING btree (project_id, external_id);
+CREATE INDEX index_vulnerability_state_transitions_id_and_vulnerability_id ON vulnerability_state_transitions USING btree (vulnerability_id, id);
+
+CREATE INDEX index_vulnerability_state_transitions_on_author_id ON vulnerability_state_transitions USING btree (author_id);
+
CREATE INDEX index_vulnerability_statistics_on_latest_pipeline_id ON vulnerability_statistics USING btree (latest_pipeline_id);
CREATE INDEX index_vulnerability_statistics_on_letter_grade ON vulnerability_statistics USING btree (letter_grade);
@@ -30716,6 +30473,10 @@ CREATE UNIQUE INDEX index_vulns_user_mentions_on_vulnerability_id ON vulnerabili
CREATE UNIQUE INDEX index_vulns_user_mentions_on_vulnerability_id_and_note_id ON vulnerability_user_mentions USING btree (vulnerability_id, note_id);
+CREATE INDEX index_web_hook_logs_part_on_created_at_and_web_hook_id ON ONLY web_hook_logs USING btree (created_at, web_hook_id);
+
+CREATE INDEX index_web_hook_logs_part_on_web_hook_id ON ONLY web_hook_logs USING btree (web_hook_id);
+
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_project_id ON web_hooks USING btree (project_id);
@@ -30738,6 +30499,10 @@ CREATE UNIQUE INDEX index_wiki_page_slugs_on_slug_and_wiki_page_meta_id ON wiki_
CREATE INDEX index_wiki_page_slugs_on_wiki_page_meta_id ON wiki_page_slugs USING btree (wiki_page_meta_id);
+CREATE UNIQUE INDEX index_work_item_parent_links_on_work_item_id ON work_item_parent_links USING btree (work_item_id);
+
+CREATE INDEX index_work_item_parent_links_on_work_item_parent_id ON work_item_parent_links USING btree (work_item_parent_id);
+
CREATE INDEX index_x509_certificates_on_subject_key_identifier ON x509_certificates USING btree (subject_key_identifier);
CREATE INDEX index_x509_certificates_on_x509_issuer_id ON x509_certificates USING btree (x509_issuer_id);
@@ -30800,10 +30565,14 @@ CREATE INDEX partial_index_deployments_for_legacy_successful_deployments ON depl
CREATE INDEX partial_index_deployments_for_project_id_and_tag ON deployments USING btree (project_id) WHERE (tag IS TRUE);
+CREATE INDEX partial_index_slack_integrations_with_bot_user_id ON slack_integrations USING btree (id) WHERE (bot_user_id IS NOT NULL);
+
CREATE UNIQUE INDEX partial_index_sop_configs_on_namespace_id ON security_orchestration_policy_configurations USING btree (namespace_id) WHERE (namespace_id IS NOT NULL);
CREATE UNIQUE INDEX partial_index_sop_configs_on_project_id ON security_orchestration_policy_configurations USING btree (project_id) WHERE (project_id IS NOT NULL);
+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 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);
@@ -30812,20 +30581,18 @@ 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_gitlab_subscriptions_max_seats_used_migration ON gitlab_subscriptions USING btree (id) WHERE ((start_date >= '2021-08-02'::date) AND (start_date <= '2021-11-20'::date) AND (max_seats_used <> 0) AND (max_seats_used > seats_in_use) AND (max_seats_used > seats));
-
-CREATE INDEX tmp_gitlab_subscriptions_max_seats_used_migration_2 ON gitlab_subscriptions USING btree (id) WHERE ((start_date < '2021-08-02'::date) AND (max_seats_used <> 0) AND (max_seats_used > seats_in_use) AND (max_seats_used > seats));
-
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_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_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_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_for_namespace_id_migration_on_routes ON routes USING btree (id) WHERE ((namespace_id IS NULL) AND ((source_type)::text = 'Namespace'::text));
-
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_project_namespace_id_migration_on_routes ON routes USING btree (id) WHERE ((namespace_id IS NULL) AND ((source_type)::text = 'Project'::text));
@@ -30834,19 +30601,19 @@ 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_leaky_regex ON merge_requests USING btree (id) WHERE ((draft = true) AND (state_id = 1) AND ((title)::text ~* '^\[draft\]|\(draft\)|draft:|draft|\[WIP\]|WIP:|WIP'::text) AND ((title)::text !~* '^(\[draft\]|\(draft\)|draft:|draft|\[WIP\]|WIP:|WIP)'::text));
-
-CREATE INDEX tmp_index_namespaces_empty_traversal_ids_with_child_namespaces ON namespaces USING btree (id) WHERE ((parent_id IS NOT NULL) AND (traversal_ids = '{}'::integer[]));
+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_namespaces_empty_traversal_ids_with_root_namespaces ON namespaces USING btree (id) WHERE ((parent_id IS NULL) AND (traversal_ids = '{}'::integer[]));
+CREATE INDEX tmp_index_migrated_container_registries ON container_repositories USING btree (project_id) WHERE ((migration_state = 'import_done'::text) OR (created_at >= '2022-01-23 00:00:00'::timestamp without time zone));
CREATE UNIQUE INDEX tmp_index_on_tmp_project_id_on_namespaces ON namespaces USING btree (tmp_project_id);
CREATE INDEX tmp_index_on_vulnerabilities_non_dismissed ON vulnerabilities USING btree (id) WHERE (state <> 2);
-CREATE INDEX tmp_index_projects_on_id_and_runners_token ON projects USING btree (id, runners_token) WHERE (runners_token IS NOT NULL);
+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_projects_on_id_and_runners_token_encrypted ON projects USING btree (id, runners_token_encrypted) WHERE (runners_token_encrypted IS NOT NULL);
+CREATE INDEX tmp_index_todos_attention_request_action ON todos USING btree (id) WHERE (action = 10);
+
+CREATE INDEX tmp_index_vulnerability_occurrences_on_id_and_scanner_id ON vulnerability_occurrences USING btree (id, scanner_id) WHERE (report_type = ANY (ARRAY[7, 99]));
CREATE UNIQUE INDEX uniq_pkgs_deb_grp_architectures_on_distribution_id_and_name ON packages_debian_group_architectures USING btree (distribution_id, name);
@@ -30868,6 +30635,8 @@ 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_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])));
@@ -30878,270 +30647,6 @@ CREATE UNIQUE INDEX vulnerability_occurrence_pipelines_on_unique_keys ON vulnera
CREATE UNIQUE INDEX work_item_types_namespace_id_and_name_unique ON work_item_types USING btree (namespace_id, btrim(lower(name)));
-ALTER INDEX analytics_index_audit_events_part_on_created_at_and_author_id ATTACH PARTITION gitlab_partitions_dynamic.audit_events_000000_created_at_author_id_idx;
-
-ALTER INDEX idx_audit_events_part_on_entity_id_desc_author_id_created_at ATTACH PARTITION gitlab_partitions_dynamic.audit_events_000000_entity_id_entity_type_id_author_id_crea_idx;
-
-ALTER INDEX audit_events_pkey ATTACH PARTITION gitlab_partitions_dynamic.audit_events_000000_pkey;
-
-ALTER INDEX analytics_index_audit_events_part_on_created_at_and_author_id ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202305_created_at_author_id_idx;
-
-ALTER INDEX idx_audit_events_part_on_entity_id_desc_author_id_created_at ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202305_entity_id_entity_type_id_author_id_crea_idx;
-
-ALTER INDEX audit_events_pkey ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202305_pkey;
-
-ALTER INDEX analytics_index_audit_events_part_on_created_at_and_author_id ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202306_created_at_author_id_idx;
-
-ALTER INDEX idx_audit_events_part_on_entity_id_desc_author_id_created_at ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202306_entity_id_entity_type_id_author_id_crea_idx;
-
-ALTER INDEX audit_events_pkey ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202306_pkey;
-
-ALTER INDEX analytics_index_audit_events_part_on_created_at_and_author_id ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202307_created_at_author_id_idx;
-
-ALTER INDEX idx_audit_events_part_on_entity_id_desc_author_id_created_at ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202307_entity_id_entity_type_id_author_id_crea_idx;
-
-ALTER INDEX audit_events_pkey ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202307_pkey;
-
-ALTER INDEX analytics_index_audit_events_part_on_created_at_and_author_id ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202308_created_at_author_id_idx;
-
-ALTER INDEX idx_audit_events_part_on_entity_id_desc_author_id_created_at ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202308_entity_id_entity_type_id_author_id_crea_idx;
-
-ALTER INDEX audit_events_pkey ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202308_pkey;
-
-ALTER INDEX analytics_index_audit_events_part_on_created_at_and_author_id ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202309_created_at_author_id_idx;
-
-ALTER INDEX idx_audit_events_part_on_entity_id_desc_author_id_created_at ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202309_entity_id_entity_type_id_author_id_crea_idx;
-
-ALTER INDEX audit_events_pkey ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202309_pkey;
-
-ALTER INDEX analytics_index_audit_events_part_on_created_at_and_author_id ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202310_created_at_author_id_idx;
-
-ALTER INDEX idx_audit_events_part_on_entity_id_desc_author_id_created_at ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202310_entity_id_entity_type_id_author_id_crea_idx;
-
-ALTER INDEX audit_events_pkey ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202310_pkey;
-
-ALTER INDEX analytics_index_audit_events_part_on_created_at_and_author_id ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202311_created_at_author_id_idx;
-
-ALTER INDEX idx_audit_events_part_on_entity_id_desc_author_id_created_at ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202311_entity_id_entity_type_id_author_id_crea_idx;
-
-ALTER INDEX audit_events_pkey ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202311_pkey;
-
-ALTER INDEX i_batched_background_migration_job_transition_logs_on_job_id ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration__batched_background_migration__idx;
-
-ALTER INDEX i_batched_background_migration_job_transition_logs_on_job_id ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration__batched_background_migration_idx1;
-
-ALTER INDEX i_batched_background_migration_job_transition_logs_on_job_id ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration__batched_background_migration_idx2;
-
-ALTER INDEX i_batched_background_migration_job_transition_logs_on_job_id ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration__batched_background_migration_idx3;
-
-ALTER INDEX i_batched_background_migration_job_transition_logs_on_job_id ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration__batched_background_migration_idx4;
-
-ALTER INDEX i_batched_background_migration_job_transition_logs_on_job_id ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration__batched_background_migration_idx5;
-
-ALTER INDEX i_batched_background_migration_job_transition_logs_on_job_id ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration__batched_background_migration_idx6;
-
-ALTER INDEX i_batched_background_migration_job_transition_logs_on_job_id ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration__batched_background_migration_idx7;
-
-ALTER INDEX batched_background_migration_job_transition_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_000000_pkey;
-
-ALTER INDEX batched_background_migration_job_transition_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202305_pkey;
-
-ALTER INDEX batched_background_migration_job_transition_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202306_pkey;
-
-ALTER INDEX batched_background_migration_job_transition_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202307_pkey;
-
-ALTER INDEX batched_background_migration_job_transition_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202308_pkey;
-
-ALTER INDEX batched_background_migration_job_transition_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202309_pkey;
-
-ALTER INDEX batched_background_migration_job_transition_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202310_pkey;
-
-ALTER INDEX batched_background_migration_job_transition_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202311_pkey;
-
-ALTER INDEX incident_management_pending_alert_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_000000_pkey;
-
-ALTER INDEX index_incident_management_pending_alert_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_00000_rule_id_idx;
-
-ALTER INDEX index_incident_management_pending_alert_escalations_on_alert_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_0000_alert_id_idx;
-
-ALTER INDEX incident_management_pending_alert_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202305_pkey;
-
-ALTER INDEX incident_management_pending_alert_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202306_pkey;
-
-ALTER INDEX incident_management_pending_alert_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202307_pkey;
-
-ALTER INDEX incident_management_pending_alert_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202308_pkey;
-
-ALTER INDEX incident_management_pending_alert_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202309_pkey;
-
-ALTER INDEX index_incident_management_pending_alert_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_20230_rule_id_idx;
-
-ALTER INDEX incident_management_pending_alert_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202310_pkey;
-
-ALTER INDEX incident_management_pending_alert_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202311_pkey;
-
-ALTER INDEX index_incident_management_pending_alert_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_20231_rule_id_idx;
-
-ALTER INDEX index_incident_management_pending_alert_escalations_on_alert_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_2023_alert_id_idx;
-
-ALTER INDEX index_incident_management_pending_alert_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_2023_rule_id_idx1;
-
-ALTER INDEX index_incident_management_pending_alert_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_2023_rule_id_idx2;
-
-ALTER INDEX index_incident_management_pending_alert_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_2023_rule_id_idx3;
-
-ALTER INDEX index_incident_management_pending_alert_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_2023_rule_id_idx4;
-
-ALTER INDEX index_incident_management_pending_alert_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_2023_rule_id_idx5;
-
-ALTER INDEX index_incident_management_pending_alert_escalations_on_alert_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202_alert_id_idx1;
-
-ALTER INDEX index_incident_management_pending_alert_escalations_on_alert_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202_alert_id_idx2;
-
-ALTER INDEX index_incident_management_pending_alert_escalations_on_alert_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202_alert_id_idx3;
-
-ALTER INDEX index_incident_management_pending_alert_escalations_on_alert_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202_alert_id_idx4;
-
-ALTER INDEX index_incident_management_pending_alert_escalations_on_alert_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202_alert_id_idx5;
-
-ALTER INDEX index_incident_management_pending_alert_escalations_on_alert_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202_alert_id_idx6;
-
-ALTER INDEX incident_management_pending_issue_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_000000_pkey;
-
-ALTER INDEX index_incident_management_pending_issue_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_00000_rule_id_idx;
-
-ALTER INDEX index_incident_management_pending_issue_escalations_on_issue_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_0000_issue_id_idx;
-
-ALTER INDEX incident_management_pending_issue_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202305_pkey;
-
-ALTER INDEX incident_management_pending_issue_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202306_pkey;
-
-ALTER INDEX incident_management_pending_issue_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202307_pkey;
-
-ALTER INDEX incident_management_pending_issue_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202308_pkey;
-
-ALTER INDEX incident_management_pending_issue_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202309_pkey;
-
-ALTER INDEX index_incident_management_pending_issue_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_20230_rule_id_idx;
-
-ALTER INDEX incident_management_pending_issue_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202310_pkey;
-
-ALTER INDEX incident_management_pending_issue_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202311_pkey;
-
-ALTER INDEX index_incident_management_pending_issue_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_20231_rule_id_idx;
-
-ALTER INDEX index_incident_management_pending_issue_escalations_on_issue_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_2023_issue_id_idx;
-
-ALTER INDEX index_incident_management_pending_issue_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_2023_rule_id_idx1;
-
-ALTER INDEX index_incident_management_pending_issue_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_2023_rule_id_idx2;
-
-ALTER INDEX index_incident_management_pending_issue_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_2023_rule_id_idx3;
-
-ALTER INDEX index_incident_management_pending_issue_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_2023_rule_id_idx4;
-
-ALTER INDEX index_incident_management_pending_issue_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_2023_rule_id_idx5;
-
-ALTER INDEX index_incident_management_pending_issue_escalations_on_issue_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202_issue_id_idx1;
-
-ALTER INDEX index_incident_management_pending_issue_escalations_on_issue_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202_issue_id_idx2;
-
-ALTER INDEX index_incident_management_pending_issue_escalations_on_issue_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202_issue_id_idx3;
-
-ALTER INDEX index_incident_management_pending_issue_escalations_on_issue_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202_issue_id_idx4;
-
-ALTER INDEX index_incident_management_pending_issue_escalations_on_issue_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202_issue_id_idx5;
-
-ALTER INDEX index_incident_management_pending_issue_escalations_on_issue_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202_issue_id_idx6;
-
-ALTER INDEX index_loose_foreign_keys_deleted_records_for_partitioned_query ATTACH PARTITION gitlab_partitions_dynamic.index_01e3390fac;
-
-ALTER INDEX index_web_hook_logs_part_on_created_at_and_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.index_2eb8964745;
-
-ALTER INDEX index_web_hook_logs_part_on_created_at_and_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.index_7185e24460;
-
-ALTER INDEX index_web_hook_logs_part_on_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.index_7a0f3a9930;
-
-ALTER INDEX index_web_hook_logs_part_on_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.index_80bf138a51;
-
-ALTER INDEX index_web_hook_logs_part_on_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.index_a548862389;
-
-ALTER INDEX index_web_hook_logs_part_on_created_at_and_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.index_eecfac613f;
-
-ALTER INDEX loose_foreign_keys_deleted_records_pkey ATTACH PARTITION gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_1_pkey;
-
-ALTER INDEX verification_codes_pkey ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_000000_pkey;
-
-ALTER INDEX index_verification_codes_on_phone_and_visitor_id_code ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_000000_visitor_id_code_phone_created_at_idx;
-
-ALTER INDEX verification_codes_pkey ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202304_pkey;
-
-ALTER INDEX index_verification_codes_on_phone_and_visitor_id_code ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202304_visitor_id_code_phone_created_at_idx;
-
-ALTER INDEX verification_codes_pkey ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202305_pkey;
-
-ALTER INDEX index_verification_codes_on_phone_and_visitor_id_code ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202305_visitor_id_code_phone_created_at_idx;
-
-ALTER INDEX verification_codes_pkey ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202306_pkey;
-
-ALTER INDEX index_verification_codes_on_phone_and_visitor_id_code ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202306_visitor_id_code_phone_created_at_idx;
-
-ALTER INDEX verification_codes_pkey ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202307_pkey;
-
-ALTER INDEX index_verification_codes_on_phone_and_visitor_id_code ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202307_visitor_id_code_phone_created_at_idx;
-
-ALTER INDEX verification_codes_pkey ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202308_pkey;
-
-ALTER INDEX index_verification_codes_on_phone_and_visitor_id_code ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202308_visitor_id_code_phone_created_at_idx;
-
-ALTER INDEX verification_codes_pkey ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202309_pkey;
-
-ALTER INDEX index_verification_codes_on_phone_and_visitor_id_code ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202309_visitor_id_code_phone_created_at_idx;
-
-ALTER INDEX verification_codes_pkey ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202310_pkey;
-
-ALTER INDEX index_verification_codes_on_phone_and_visitor_id_code ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202310_visitor_id_code_phone_created_at_idx;
-
-ALTER INDEX verification_codes_pkey ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202311_pkey;
-
-ALTER INDEX index_verification_codes_on_phone_and_visitor_id_code ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202311_visitor_id_code_phone_created_at_idx;
-
-ALTER INDEX web_hook_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_000000_pkey;
-
-ALTER INDEX web_hook_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202305_pkey;
-
-ALTER INDEX web_hook_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202306_pkey;
-
-ALTER INDEX index_web_hook_logs_part_on_created_at_and_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202307_created_at_web_hook_id_idx;
-
-ALTER INDEX web_hook_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202307_pkey;
-
-ALTER INDEX index_web_hook_logs_part_on_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202307_web_hook_id_idx;
-
-ALTER INDEX index_web_hook_logs_part_on_created_at_and_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202308_created_at_web_hook_id_idx;
-
-ALTER INDEX web_hook_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202308_pkey;
-
-ALTER INDEX index_web_hook_logs_part_on_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202308_web_hook_id_idx;
-
-ALTER INDEX index_web_hook_logs_part_on_created_at_and_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202309_created_at_web_hook_id_idx;
-
-ALTER INDEX web_hook_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202309_pkey;
-
-ALTER INDEX index_web_hook_logs_part_on_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202309_web_hook_id_idx;
-
-ALTER INDEX index_web_hook_logs_part_on_created_at_and_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202310_created_at_web_hook_id_idx;
-
-ALTER INDEX web_hook_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202310_pkey;
-
-ALTER INDEX index_web_hook_logs_part_on_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202310_web_hook_id_idx;
-
-ALTER INDEX index_web_hook_logs_part_on_created_at_and_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202311_created_at_web_hook_id_idx;
-
-ALTER INDEX web_hook_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202311_pkey;
-
-ALTER INDEX index_web_hook_logs_part_on_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202311_web_hook_id_idx;
-
ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_00_pkey;
ALTER INDEX analytics_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_01_pkey;
@@ -32430,10 +31935,14 @@ CREATE TRIGGER ci_pipelines_loose_fk_trigger AFTER DELETE ON ci_pipelines REFERE
CREATE TRIGGER ci_runners_loose_fk_trigger AFTER DELETE ON ci_runners REFERENCING OLD TABLE AS old_table FOR EACH STATEMENT EXECUTE FUNCTION insert_into_loose_foreign_keys_deleted_records();
+CREATE TRIGGER clusters_loose_fk_trigger AFTER DELETE ON clusters REFERENCING OLD TABLE AS old_table FOR EACH STATEMENT EXECUTE FUNCTION insert_into_loose_foreign_keys_deleted_records();
+
CREATE TRIGGER merge_requests_loose_fk_trigger AFTER DELETE ON merge_requests REFERENCING OLD TABLE AS old_table FOR EACH STATEMENT EXECUTE FUNCTION insert_into_loose_foreign_keys_deleted_records();
CREATE TRIGGER namespaces_loose_fk_trigger AFTER DELETE ON namespaces REFERENCING OLD TABLE AS old_table FOR EACH STATEMENT EXECUTE FUNCTION insert_into_loose_foreign_keys_deleted_records();
+CREATE TRIGGER nullify_merge_request_metrics_build_data_on_update BEFORE UPDATE ON merge_request_metrics FOR EACH ROW EXECUTE FUNCTION nullify_merge_request_metrics_build_data();
+
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 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();
@@ -32454,6 +31963,8 @@ CREATE TRIGGER trigger_has_external_wiki_on_update AFTER UPDATE ON integrations
CREATE TRIGGER trigger_insert_or_update_vulnerability_reads_from_occurrences AFTER INSERT OR UPDATE ON vulnerability_occurrences FOR EACH ROW EXECUTE FUNCTION insert_or_update_vulnerability_reads();
+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();
@@ -32462,7 +31973,13 @@ CREATE TRIGGER trigger_projects_parent_id_on_insert AFTER INSERT ON projects FOR
CREATE TRIGGER trigger_projects_parent_id_on_update AFTER UPDATE ON projects FOR EACH ROW WHEN ((old.namespace_id IS DISTINCT FROM new.namespace_id)) EXECUTE FUNCTION insert_projects_sync_event();
-CREATE TRIGGER trigger_type_new_on_insert AFTER INSERT ON integrations FOR EACH ROW EXECUTE FUNCTION integrations_set_type_new();
+CREATE TRIGGER trigger_update_details_on_namespace_insert AFTER INSERT ON namespaces FOR EACH ROW WHEN (((new.type)::text <> 'Project'::text)) EXECUTE FUNCTION update_namespace_details_from_namespaces();
+
+CREATE TRIGGER trigger_update_details_on_namespace_update AFTER UPDATE ON namespaces FOR EACH ROW WHEN ((((new.type)::text <> 'Project'::text) AND (((old.description)::text IS DISTINCT FROM (new.description)::text) OR (old.description_html IS DISTINCT FROM new.description_html) OR (old.cached_markdown_version IS DISTINCT FROM new.cached_markdown_version)))) EXECUTE FUNCTION update_namespace_details_from_namespaces();
+
+CREATE TRIGGER trigger_update_details_on_project_insert AFTER INSERT ON projects FOR EACH ROW EXECUTE FUNCTION update_namespace_details_from_projects();
+
+CREATE TRIGGER trigger_update_details_on_project_update AFTER UPDATE ON projects FOR EACH ROW WHEN (((old.description IS DISTINCT FROM new.description) OR (old.description_html IS DISTINCT FROM new.description_html) OR (old.cached_markdown_version IS DISTINCT FROM new.cached_markdown_version))) EXECUTE FUNCTION update_namespace_details_from_projects();
CREATE TRIGGER trigger_update_has_issues_on_vulnerability_issue_links_delete AFTER DELETE ON vulnerability_issue_links FOR EACH ROW EXECUTE FUNCTION unset_has_issues_on_vulnerability_reads();
@@ -32470,13 +31987,10 @@ CREATE TRIGGER trigger_update_has_issues_on_vulnerability_issue_links_update AFT
CREATE TRIGGER trigger_update_location_on_vulnerability_occurrences_update AFTER UPDATE ON vulnerability_occurrences FOR EACH ROW WHEN (((new.report_type = ANY (ARRAY[2, 7])) AND (((old.location ->> 'image'::text) IS DISTINCT FROM (new.location ->> 'image'::text)) OR (((old.location -> 'kubernetes_resource'::text) ->> 'agent_id'::text) IS DISTINCT FROM ((new.location -> 'kubernetes_resource'::text) ->> 'agent_id'::text))))) EXECUTE FUNCTION update_location_from_vulnerability_occurrences();
-CREATE TRIGGER trigger_update_vulnerability_reads_on_vulnerability_update AFTER UPDATE ON vulnerabilities FOR EACH ROW WHEN (((old.severity IS DISTINCT FROM new.severity) OR (old.state IS DISTINCT FROM new.state) OR (old.resolved_on_default_branch IS DISTINCT FROM new.resolved_on_default_branch))) EXECUTE FUNCTION update_vulnerability_reads_from_vulnerability();
+CREATE TRIGGER trigger_update_vulnerability_reads_on_vulnerability_update AFTER UPDATE ON vulnerabilities FOR EACH ROW WHEN (((old.present_on_default_branch IS TRUE) AND ((old.severity IS DISTINCT FROM new.severity) OR (old.state IS DISTINCT FROM new.state) OR (old.resolved_on_default_branch IS DISTINCT FROM new.resolved_on_default_branch)))) EXECUTE FUNCTION update_vulnerability_reads_from_vulnerability();
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 chat_names
- ADD CONSTRAINT fk_00797a2bf9 FOREIGN KEY (service_id) REFERENCES integrations(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY deployments
ADD CONSTRAINT fk_009fd21147 FOREIGN KEY (environment_id) REFERENCES environments(id) ON DELETE CASCADE NOT VALID;
@@ -32498,8 +32012,8 @@ ALTER TABLE ONLY issues
ALTER TABLE ONLY merge_requests
ADD CONSTRAINT fk_06067f5644 FOREIGN KEY (latest_merge_request_diff_id) REFERENCES merge_request_diffs(id) ON DELETE SET NULL;
-ALTER TABLE ONLY projects
- ADD CONSTRAINT fk_0a31cca0b8 FOREIGN KEY (marked_for_deletion_by_user_id) REFERENCES users(id) ON DELETE SET NULL;
+ALTER TABLE ONLY user_interacted_projects
+ ADD CONSTRAINT fk_0894651f08 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
ALTER TABLE ONLY dast_sites
ADD CONSTRAINT fk_0a57f2271b FOREIGN KEY (dast_site_validation_id) REFERENCES dast_site_validations(id) ON DELETE SET NULL;
@@ -32540,15 +32054,15 @@ ALTER TABLE ONLY vulnerabilities
ALTER TABLE ONLY webauthn_registrations
ADD CONSTRAINT fk_13e04d719a FOREIGN KEY (u2f_registration_id) REFERENCES u2f_registrations(id) ON DELETE CASCADE;
+ALTER TABLE ONLY sbom_occurrences
+ ADD CONSTRAINT fk_157506c0e2 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY protected_branch_push_access_levels
ADD CONSTRAINT fk_15d2a7a4ae FOREIGN KEY (deploy_key_id) REFERENCES keys(id) ON DELETE CASCADE;
ALTER TABLE ONLY internal_ids
ADD CONSTRAINT fk_162941d509 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
-ALTER TABLE ONLY geo_event_log
- ADD CONSTRAINT fk_176d3fbb5d FOREIGN KEY (job_artifact_deleted_event_id) REFERENCES geo_job_artifact_deleted_events(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY incident_management_timeline_events
ADD CONSTRAINT fk_17a5fafbd4 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE;
@@ -32573,6 +32087,9 @@ ALTER TABLE ONLY agent_project_authorizations
ALTER TABLE ONLY vulnerabilities
ADD CONSTRAINT fk_1d37cddf91 FOREIGN KEY (epic_id) REFERENCES epics(id) ON DELETE SET NULL;
+ALTER TABLE ONLY boards
+ ADD CONSTRAINT fk_1e9a074a35 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY epics
ADD CONSTRAINT fk_1fbed67632 FOREIGN KEY (start_date_sourcing_milestone_id) REFERENCES milestones(id) ON DELETE SET NULL;
@@ -32603,14 +32120,17 @@ ALTER TABLE ONLY agent_activity_events
ALTER TABLE ONLY epics
ADD CONSTRAINT fk_25b99c1be3 FOREIGN KEY (parent_id) REFERENCES epics(id) ON DELETE CASCADE;
+ALTER TABLE ONLY projects
+ ADD CONSTRAINT fk_25d8780d11 FOREIGN KEY (marked_for_deletion_by_user_id) REFERENCES users(id) ON DELETE SET NULL;
+
ALTER TABLE ONLY ci_pipelines
ADD CONSTRAINT fk_262d4c2d19 FOREIGN KEY (auto_canceled_by_id) REFERENCES ci_pipelines(id) ON DELETE SET NULL;
ALTER TABLE ONLY geo_event_log
ADD CONSTRAINT fk_27548c6db3 FOREIGN KEY (hashed_storage_migrated_event_id) REFERENCES geo_hashed_storage_migrated_events(id) ON DELETE CASCADE;
-ALTER TABLE ONLY deployments
- ADD CONSTRAINT fk_289bba3222 FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE SET NULL;
+ALTER TABLE ONLY user_namespace_callouts
+ ADD CONSTRAINT fk_27a69fd1bd FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
ALTER TABLE ONLY merge_requests_compliance_violations
ADD CONSTRAINT fk_290ec1ab02 FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE;
@@ -32633,6 +32153,9 @@ ALTER TABLE ONLY members
ALTER TABLE ONLY lfs_objects_projects
ADD CONSTRAINT fk_2eb33f7a78 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE NOT VALID;
+ALTER TABLE ONLY vulnerability_merge_request_links
+ ADD CONSTRAINT fk_2ef3954596 FOREIGN KEY (vulnerability_id) REFERENCES vulnerabilities(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;
@@ -32645,6 +32168,12 @@ ALTER TABLE ONLY approvals
ALTER TABLE ONLY namespaces
ADD CONSTRAINT fk_319256d87a FOREIGN KEY (file_template_project_id) REFERENCES projects(id) ON DELETE SET NULL;
+ALTER TABLE ONLY issue_tracker_data
+ ADD CONSTRAINT fk_33921c0ee1 FOREIGN KEY (integration_id) REFERENCES integrations(id) ON DELETE CASCADE;
+
+ALTER TABLE ONLY user_project_callouts
+ ADD CONSTRAINT fk_33b4814f6b FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY namespaces
ADD CONSTRAINT fk_3448c97865 FOREIGN KEY (push_rule_id) REFERENCES push_rules(id) ON DELETE SET NULL;
@@ -32693,9 +32222,15 @@ ALTER TABLE ONLY protected_environment_approval_rules
ALTER TABLE ONLY ci_pipeline_schedule_variables
ADD CONSTRAINT fk_41c35fda51 FOREIGN KEY (pipeline_schedule_id) REFERENCES ci_pipeline_schedules(id) ON DELETE CASCADE;
+ALTER TABLE ONLY namespace_bans
+ ADD CONSTRAINT fk_4275fbb1d7 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY geo_event_log
ADD CONSTRAINT fk_42c3b54bed FOREIGN KEY (cache_invalidation_event_id) REFERENCES geo_cache_invalidation_events(id) ON DELETE CASCADE;
+ALTER TABLE ONLY remote_mirrors
+ ADD CONSTRAINT fk_43a9aa4ca8 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY incident_management_timeline_events
ADD CONSTRAINT fk_4432fc4d78 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -32708,6 +32243,15 @@ ALTER TABLE ONLY releases
ALTER TABLE ONLY geo_event_log
ADD CONSTRAINT fk_4a99ebfd60 FOREIGN KEY (repositories_changed_event_id) REFERENCES geo_repositories_changed_events(id) ON DELETE CASCADE;
+ALTER TABLE ONLY user_namespace_callouts
+ ADD CONSTRAINT fk_4b1257f385 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
+
+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 vulnerability_reads
+ ADD CONSTRAINT fk_4f593f6c62 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY vulnerability_reads
ADD CONSTRAINT fk_5001652292 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -32717,6 +32261,9 @@ ALTER TABLE ONLY alert_management_alerts
ALTER TABLE ONLY path_locks
ADD CONSTRAINT fk_5265c98f24 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ALTER TABLE ONLY clusters_applications_prometheus
+ ADD CONSTRAINT fk_557e773639 FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY terraform_states
ADD CONSTRAINT fk_558901b030 FOREIGN KEY (locked_by_user_id) REFERENCES users(id) ON DELETE SET NULL;
@@ -32729,6 +32276,9 @@ ALTER TABLE ONLY merge_request_metrics
ALTER TABLE ONLY vulnerability_feedback
ADD CONSTRAINT fk_563ff1912e FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE SET NULL;
+ALTER TABLE ONLY ml_candidates
+ ADD CONSTRAINT fk_56d6ed4d3d FOREIGN KEY (experiment_id) REFERENCES ml_experiments(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY deploy_keys_projects
ADD CONSTRAINT fk_58a901ca7e FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -32738,6 +32288,9 @@ ALTER TABLE ONLY dast_scanner_profiles_builds
ALTER TABLE ONLY issue_assignees
ADD CONSTRAINT fk_5e0c8d9154 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
+ALTER TABLE ONLY members
+ ADD CONSTRAINT fk_5e12d50db3 FOREIGN KEY (member_role_id) REFERENCES member_roles(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY csv_issue_imports
ADD CONSTRAINT fk_5e1572387c FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
@@ -32747,9 +32300,6 @@ ALTER TABLE ONLY project_access_tokens
ALTER TABLE ONLY merge_requests
ADD CONSTRAINT fk_6149611a04 FOREIGN KEY (assignee_id) REFERENCES users(id) ON DELETE SET NULL;
-ALTER TABLE ONLY dependency_proxy_group_settings
- ADD CONSTRAINT fk_616ddd680a FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY deployment_approvals
ADD CONSTRAINT fk_61cdbdc5b9 FOREIGN KEY (approval_rule_id) REFERENCES protected_environment_approval_rules(id) ON DELETE SET NULL;
@@ -32768,9 +32318,6 @@ ALTER TABLE ONLY merge_requests
ALTER TABLE ONLY ci_builds
ADD CONSTRAINT fk_6661f4f0e8 FOREIGN KEY (resource_group_id) REFERENCES ci_resource_groups(id) ON DELETE SET NULL;
-ALTER TABLE ONLY routes
- ADD CONSTRAINT fk_679ff8213d FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE SET NULL;
-
ALTER TABLE ONLY application_settings
ADD CONSTRAINT fk_693b8795e4 FOREIGN KEY (push_rule_id) REFERENCES push_rules(id) ON DELETE SET NULL;
@@ -32789,6 +32336,12 @@ ALTER TABLE ONLY projects
ALTER TABLE ONLY dast_profile_schedules
ADD CONSTRAINT fk_6cca0d8800 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ALTER TABLE ONLY vulnerability_merge_request_links
+ ADD CONSTRAINT fk_6d7aa8796e FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE;
+
+ALTER TABLE ONLY issues
+ ADD CONSTRAINT fk_6e10d4d38a FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE SET NULL;
+
ALTER TABLE ONLY projects
ADD CONSTRAINT fk_6e5c14658a FOREIGN KEY (pool_repository_id) REFERENCES pool_repositories(id) ON DELETE SET NULL;
@@ -32807,6 +32360,9 @@ ALTER TABLE ONLY protected_branch_push_access_levels
ALTER TABLE ONLY integrations
ADD CONSTRAINT fk_71cce407f9 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ALTER TABLE ONLY user_interacted_projects
+ ADD CONSTRAINT fk_722ceba4f7 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY vulnerabilities
ADD CONSTRAINT fk_725465b774 FOREIGN KEY (dismissed_by_id) REFERENCES users(id) ON DELETE SET NULL;
@@ -32846,6 +32402,9 @@ ALTER TABLE ONLY issue_customer_relations_contacts
ALTER TABLE ONLY vulnerabilities
ADD CONSTRAINT fk_7c5bb22a22 FOREIGN KEY (due_date_sourcing_milestone_id) REFERENCES milestones(id) ON DELETE SET NULL;
+ALTER TABLE ONLY ssh_signatures
+ ADD CONSTRAINT fk_7d2f93996c FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY labels
ADD CONSTRAINT fk_7de4989a69 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -32939,6 +32498,9 @@ ALTER TABLE ONLY vulnerability_occurrences
ALTER TABLE ONLY protected_branch_merge_access_levels
ADD CONSTRAINT fk_98f3d044fe FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+ALTER TABLE ONLY chat_names
+ ADD CONSTRAINT fk_99a1348daf FOREIGN KEY (integration_id) REFERENCES integrations(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY notes
ADD CONSTRAINT fk_99e097b079 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -32975,12 +32537,6 @@ ALTER TABLE ONLY issues
ALTER TABLE ONLY ci_builds
ADD CONSTRAINT fk_a2141b1522 FOREIGN KEY (auto_canceled_by_id) REFERENCES ci_pipelines(id) ON DELETE SET NULL;
-ALTER TABLE ONLY todos
- ADD CONSTRAINT fk_a27c483435 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
-
-ALTER TABLE ONLY jira_connect_subscriptions
- ADD CONSTRAINT fk_a3c10bcf7d FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY bulk_import_entities
ADD CONSTRAINT fk_a44ff95be5 FOREIGN KEY (parent_id) REFERENCES bulk_import_entities(id) ON DELETE CASCADE;
@@ -33020,9 +32576,15 @@ ALTER TABLE ONLY member_tasks
ALTER TABLE ONLY merge_requests
ADD CONSTRAINT fk_ad525e1f87 FOREIGN KEY (merge_user_id) REFERENCES users(id) ON DELETE SET NULL;
+ALTER TABLE ONLY ml_experiments
+ ADD CONSTRAINT fk_ad89c59858 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY merge_request_metrics
ADD CONSTRAINT fk_ae440388cc FOREIGN KEY (latest_closed_by_id) REFERENCES users(id) ON DELETE SET NULL;
+ALTER TABLE ONLY vulnerability_reads
+ ADD CONSTRAINT fk_aee839e611 FOREIGN KEY (casted_cluster_agent_id) REFERENCES cluster_agents(id) ON DELETE SET NULL;
+
ALTER TABLE ONLY dast_profile_schedules
ADD CONSTRAINT fk_aef03d62e5 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE SET NULL;
@@ -33074,6 +32636,12 @@ ALTER TABLE ONLY customer_relations_contacts
ALTER TABLE ONLY deployments
ADD CONSTRAINT fk_b9a3851b82 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ALTER TABLE ONLY routes
+ ADD CONSTRAINT fk_bb2e5b8968 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+
+ALTER TABLE ONLY namespace_bans
+ ADD CONSTRAINT fk_bcc024eef2 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY gitlab_subscriptions
ADD CONSTRAINT fk_bd0c4019c3 FOREIGN KEY (hosted_plan_id) REFERENCES plans(id) ON DELETE CASCADE;
@@ -33098,6 +32666,9 @@ ALTER TABLE ONLY design_management_versions
ALTER TABLE ONLY packages_packages
ADD CONSTRAINT fk_c188f0dba4 FOREIGN KEY (creator_id) REFERENCES users(id) ON DELETE SET NULL;
+ALTER TABLE ONLY sbom_occurrences
+ ADD CONSTRAINT fk_c2a5562923 FOREIGN KEY (source_id) REFERENCES sbom_sources(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY analytics_cycle_analytics_project_stages
ADD CONSTRAINT fk_c3339bdfc9 FOREIGN KEY (stage_event_hash_id) REFERENCES analytics_cycle_analytics_stage_event_hashes(id) ON DELETE CASCADE;
@@ -33125,12 +32696,18 @@ ALTER TABLE ONLY agent_activity_events
ALTER TABLE ONLY issue_links
ADD CONSTRAINT fk_c900194ff2 FOREIGN KEY (source_id) REFERENCES issues(id) ON DELETE CASCADE;
+ALTER TABLE ONLY jira_tracker_data
+ ADD CONSTRAINT fk_c98abcd54c FOREIGN KEY (integration_id) REFERENCES integrations(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY external_approval_rules_protected_branches
ADD CONSTRAINT fk_c9a037a926 FOREIGN KEY (external_approval_rule_id) REFERENCES external_approval_rules(id) ON DELETE CASCADE;
ALTER TABLE ONLY external_approval_rules_protected_branches
ADD CONSTRAINT fk_ca2ffb55e6 FOREIGN KEY (protected_branch_id) REFERENCES protected_branches(id) ON DELETE CASCADE;
+ALTER TABLE ONLY slack_integrations
+ ADD CONSTRAINT fk_cbe270434e FOREIGN KEY (integration_id) REFERENCES integrations(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY external_status_checks_protected_branches
ADD CONSTRAINT fk_cc0dcc36d1 FOREIGN KEY (external_status_check_id) REFERENCES external_status_checks(id) ON DELETE CASCADE;
@@ -33155,6 +32732,9 @@ ALTER TABLE ONLY custom_emoji
ALTER TABLE ONLY bulk_import_entities
ADD CONSTRAINT fk_d06d023c30 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ALTER TABLE ONLY project_mirror_data
+ ADD CONSTRAINT fk_d1aad367d7 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY environments
ADD CONSTRAINT fk_d1c8c1da6a FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -33167,9 +32747,6 @@ ALTER TABLE ONLY web_hooks
ALTER TABLE ONLY ci_sources_pipelines
ADD CONSTRAINT fk_d4e29af7d7 FOREIGN KEY (source_pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE;
-ALTER TABLE ONLY geo_event_log
- ADD CONSTRAINT fk_d5af95fcd9 FOREIGN KEY (lfs_object_deleted_event_id) REFERENCES geo_lfs_object_deleted_events(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY incident_management_timeline_events
ADD CONSTRAINT fk_d606a2a890 FOREIGN KEY (promoted_from_note_id) REFERENCES notes(id) ON DELETE SET NULL;
@@ -33188,18 +32765,21 @@ ALTER TABLE ONLY ci_pipelines
ALTER TABLE ONLY system_note_metadata
ADD CONSTRAINT fk_d83a918cb1 FOREIGN KEY (note_id) REFERENCES notes(id) ON DELETE CASCADE;
+ALTER TABLE ONLY sbom_occurrences
+ ADD CONSTRAINT fk_d857c6edc1 FOREIGN KEY (component_id) REFERENCES sbom_components(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY todos
ADD CONSTRAINT fk_d94154aa95 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
+ALTER TABLE ONLY label_links
+ ADD CONSTRAINT fk_d97dd08678 FOREIGN KEY (label_id) REFERENCES labels(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY project_group_links
ADD CONSTRAINT fk_daa8cee94c FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
ALTER TABLE ONLY project_topics
ADD CONSTRAINT fk_db13576296 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-ALTER TABLE ONLY dependency_proxy_blobs
- ADD CONSTRAINT fk_db58bbc5d7 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY security_scans
ADD CONSTRAINT fk_dbc89265b9 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -33227,6 +32807,9 @@ ALTER TABLE ONLY gitlab_subscriptions
ALTER TABLE ONLY merge_requests
ADD CONSTRAINT fk_e719a85f8a FOREIGN KEY (author_id) REFERENCES users(id) ON DELETE SET NULL;
+ALTER TABLE ONLY vulnerability_state_transitions
+ ADD CONSTRAINT fk_e719dc63df FOREIGN KEY (author_id) REFERENCES users(id) ON DELETE SET NULL;
+
ALTER TABLE ONLY issue_links
ADD CONSTRAINT fk_e71bb44f1f FOREIGN KEY (target_id) REFERENCES issues(id) ON DELETE CASCADE;
@@ -33281,8 +32864,8 @@ ALTER TABLE ONLY epics
ALTER TABLE ONLY boards
ADD CONSTRAINT fk_f15266b5f9 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-ALTER TABLE ONLY jira_connect_subscriptions
- ADD CONSTRAINT fk_f1d617343f FOREIGN KEY (jira_connect_installation_id) REFERENCES jira_connect_installations(id) ON DELETE CASCADE;
+ALTER TABLE ONLY ssh_signatures
+ ADD CONSTRAINT fk_f177ea6aa5 FOREIGN KEY (key_id) REFERENCES keys(id) ON DELETE CASCADE;
ALTER TABLE ONLY ci_pipeline_variables
ADD CONSTRAINT fk_f29c5f4380 FOREIGN KEY (pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE;
@@ -33299,6 +32882,9 @@ ALTER TABLE ONLY analytics_devops_adoption_segments
ALTER TABLE ONLY boards_epic_list_user_preferences
ADD CONSTRAINT fk_f5f2fe5c1f FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
+ALTER TABLE ONLY user_project_callouts
+ ADD CONSTRAINT fk_f62dd11a33 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY cluster_agents
ADD CONSTRAINT fk_f7d43dee13 FOREIGN KEY (created_by_user_id) REFERENCES users(id) ON DELETE SET NULL;
@@ -33353,9 +32939,6 @@ ALTER TABLE ONLY approval_merge_request_rules
ALTER TABLE ONLY namespace_statistics
ADD CONSTRAINT fk_rails_0062050394 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
-ALTER TABLE ONLY clusters_applications_elastic_stacks
- ADD CONSTRAINT fk_rails_026f219f46 FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY incident_management_oncall_participants
ADD CONSTRAINT fk_rails_032b12996a FOREIGN KEY (oncall_rotation_id) REFERENCES incident_management_oncall_rotations(id) ON DELETE CASCADE;
@@ -33371,9 +32954,6 @@ ALTER TABLE ONLY ip_restrictions
ALTER TABLE ONLY terraform_state_versions
ADD CONSTRAINT fk_rails_04f176e239 FOREIGN KEY (terraform_state_id) REFERENCES terraform_states(id) ON DELETE CASCADE;
-ALTER TABLE ONLY user_interacted_projects
- ADD CONSTRAINT fk_rails_0894651f08 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY trending_projects
ADD CONSTRAINT fk_rails_09feecd872 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -33431,6 +33011,9 @@ ALTER TABLE ONLY vulnerability_exports
ALTER TABLE ONLY prometheus_alert_events
ADD CONSTRAINT fk_rails_106f901176 FOREIGN KEY (prometheus_alert_id) REFERENCES prometheus_alerts(id) ON DELETE CASCADE;
+ALTER TABLE ONLY audit_events_streaming_headers
+ ADD CONSTRAINT fk_rails_109fcf96e2 FOREIGN KEY (external_audit_event_destination_id) REFERENCES audit_events_external_audit_event_destinations(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY ci_sources_projects
ADD CONSTRAINT fk_rails_10a1eb379a FOREIGN KEY (pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE;
@@ -33506,6 +33089,9 @@ ALTER TABLE ONLY vulnerability_user_mentions
ALTER TABLE ONLY packages_debian_file_metadata
ADD CONSTRAINT fk_rails_1ae85be112 FOREIGN KEY (package_file_id) REFERENCES packages_package_files(id) ON DELETE CASCADE;
+ALTER TABLE ONLY ml_candidates
+ ADD CONSTRAINT fk_rails_1b37441fe5 FOREIGN KEY (user_id) REFERENCES users(id);
+
ALTER TABLE ONLY issuable_slas
ADD CONSTRAINT fk_rails_1b8768cd63 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE;
@@ -33521,8 +33107,8 @@ ALTER TABLE ONLY approver_groups
ALTER TABLE ONLY project_ci_feature_usages
ADD CONSTRAINT fk_rails_1deedbf64b FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-ALTER TABLE ONLY boards
- ADD CONSTRAINT fk_rails_1e9a074a35 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+ALTER TABLE ONLY packages_tags
+ ADD CONSTRAINT fk_rails_1dfc868911 FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE CASCADE;
ALTER TABLE ONLY boards_epic_board_positions
ADD CONSTRAINT fk_rails_1ecfd9f2de FOREIGN KEY (epic_id) REFERENCES epics(id) ON DELETE CASCADE;
@@ -33533,6 +33119,9 @@ ALTER TABLE ONLY geo_repository_created_events
ALTER TABLE ONLY external_status_checks
ADD CONSTRAINT fk_rails_1f5a8aa809 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ALTER TABLE ONLY ml_experiments
+ ADD CONSTRAINT fk_rails_1fbc5e001f FOREIGN KEY (user_id) REFERENCES users(id);
+
ALTER TABLE ONLY dora_daily_metrics
ADD CONSTRAINT fk_rails_1fd07aff6f FOREIGN KEY (environment_id) REFERENCES environments(id) ON DELETE CASCADE;
@@ -33560,6 +33149,9 @@ ALTER TABLE ONLY service_desk_settings
ALTER TABLE ONLY saml_group_links
ADD CONSTRAINT fk_rails_22e312c530 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+ALTER TABLE ONLY work_item_parent_links
+ ADD CONSTRAINT fk_rails_231dba8959 FOREIGN KEY (work_item_parent_id) REFERENCES issues(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY dast_profiles
ADD CONSTRAINT fk_rails_23cae5abe1 FOREIGN KEY (dast_scanner_profile_id) REFERENCES dast_scanner_profiles(id) ON DELETE CASCADE;
@@ -33611,9 +33203,6 @@ ALTER TABLE ONLY draft_notes
ALTER TABLE ONLY dependency_proxy_image_ttl_group_policies
ADD CONSTRAINT fk_rails_2b1896d021 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
-ALTER TABLE ONLY packages_tags
- ADD CONSTRAINT fk_rails_2b18ae9256 FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY group_group_links
ADD CONSTRAINT fk_rails_2b2353ca49 FOREIGN KEY (shared_with_group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
@@ -33704,6 +33293,9 @@ ALTER TABLE ONLY namespace_settings
ALTER TABLE ONLY self_managed_prometheus_alert_events
ADD CONSTRAINT fk_rails_3936dadc62 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ALTER TABLE ONLY packages_cleanup_policies
+ ADD CONSTRAINT fk_rails_393ba98591 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY approval_project_rules_groups
ADD CONSTRAINT fk_rails_396841e79e FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
@@ -33734,6 +33326,9 @@ ALTER TABLE ONLY epic_user_mentions
ALTER TABLE ONLY analytics_cycle_analytics_project_stages
ADD CONSTRAINT fk_rails_3ec9fd7912 FOREIGN KEY (end_event_label_id) REFERENCES labels(id) ON DELETE CASCADE;
+ALTER TABLE ONLY issuable_resource_links
+ ADD CONSTRAINT fk_rails_3f0ec6b1cf FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY board_assignees
ADD CONSTRAINT fk_rails_3f6f926bd5 FOREIGN KEY (board_id) REFERENCES boards(id) ON DELETE CASCADE;
@@ -33761,9 +33356,6 @@ ALTER TABLE ONLY batched_background_migration_jobs
ALTER TABLE ONLY operations_strategies_user_lists
ADD CONSTRAINT fk_rails_43241e8d29 FOREIGN KEY (strategy_id) REFERENCES operations_strategies(id) ON DELETE CASCADE;
-ALTER TABLE ONLY remote_mirrors
- ADD CONSTRAINT fk_rails_43a9aa4ca8 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY lfs_file_locks
ADD CONSTRAINT fk_rails_43df7a0412 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -33827,9 +33419,6 @@ ALTER TABLE ONLY snippet_user_mentions
ALTER TABLE ONLY protected_environment_approval_rules
ADD CONSTRAINT fk_rails_4e554f96f5 FOREIGN KEY (protected_environment_id) REFERENCES protected_environments(id) ON DELETE CASCADE;
-ALTER TABLE ONLY deployment_clusters
- ADD CONSTRAINT fk_rails_4e6243e120 FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY geo_repository_renamed_events
ADD CONSTRAINT fk_rails_4e6524febb FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -33866,9 +33455,6 @@ ALTER TABLE ONLY geo_node_namespace_links
ALTER TABLE ONLY clusters_applications_knative
ADD CONSTRAINT fk_rails_54fc91e0a0 FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE;
-ALTER TABLE ONLY clusters_applications_prometheus
- ADD CONSTRAINT fk_rails_557e773639 FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY issuable_metric_images
ADD CONSTRAINT fk_rails_56417a5a7f FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE;
@@ -33899,6 +33485,9 @@ ALTER TABLE ONLY badges
ALTER TABLE ONLY resource_label_events
ADD CONSTRAINT fk_rails_5ac1d2fc24 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE;
+ALTER TABLE ONLY ci_secure_file_states
+ ADD CONSTRAINT fk_rails_5adba40c5f FOREIGN KEY (ci_secure_file_id) REFERENCES ci_secure_files(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY approval_merge_request_rules_groups
ADD CONSTRAINT fk_rails_5b2ecf6139 FOREIGN KEY (approval_merge_request_rule_id) REFERENCES approval_merge_request_rules(id) ON DELETE CASCADE;
@@ -33938,12 +33527,24 @@ ALTER TABLE ONLY approval_project_rules
ALTER TABLE ONLY incident_management_oncall_participants
ADD CONSTRAINT fk_rails_5fe86ea341 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
+ALTER TABLE ONLY work_item_parent_links
+ ADD CONSTRAINT fk_rails_601d5bec3a FOREIGN KEY (work_item_id) REFERENCES issues(id) ON DELETE CASCADE;
+
+ALTER TABLE ONLY vulnerability_state_transitions
+ ADD CONSTRAINT fk_rails_60e4899648 FOREIGN KEY (vulnerability_id) REFERENCES vulnerabilities(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY user_highest_roles
ADD CONSTRAINT fk_rails_60f6c325a6 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
+ALTER TABLE ONLY dependency_proxy_group_settings
+ ADD CONSTRAINT fk_rails_616ddd680a FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY group_deploy_tokens
ADD CONSTRAINT fk_rails_61a572b41a FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+ALTER TABLE ONLY sbom_component_versions
+ ADD CONSTRAINT fk_rails_61a83aa892 FOREIGN KEY (component_id) REFERENCES sbom_components(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY status_page_published_incidents
ADD CONSTRAINT fk_rails_61e5493940 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE;
@@ -33986,6 +33587,9 @@ ALTER TABLE ONLY design_management_versions
ALTER TABLE ONLY approval_merge_request_rules_approved_approvers
ADD CONSTRAINT fk_rails_6577725edb FOREIGN KEY (approval_merge_request_rule_id) REFERENCES approval_merge_request_rules(id) ON DELETE CASCADE;
+ALTER TABLE ONLY project_relation_export_uploads
+ ADD CONSTRAINT fk_rails_660ada90c9 FOREIGN KEY (project_relation_export_id) REFERENCES project_relation_exports(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY operations_feature_flags_clients
ADD CONSTRAINT fk_rails_6650ed902c FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -34040,9 +33644,6 @@ ALTER TABLE ONLY list_user_preferences
ALTER TABLE ONLY project_custom_attributes
ADD CONSTRAINT fk_rails_719c3dccc5 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-ALTER TABLE ONLY user_interacted_projects
- ADD CONSTRAINT fk_rails_722ceba4f7 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY ci_pending_builds
ADD CONSTRAINT fk_rails_725a2644a3 FOREIGN KEY (build_id) REFERENCES ci_builds(id) ON DELETE CASCADE;
@@ -34055,9 +33656,6 @@ ALTER TABLE ONLY dast_scanner_profiles
ALTER TABLE ONLY vulnerability_historical_statistics
ADD CONSTRAINT fk_rails_72b73ed023 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-ALTER TABLE ONLY slack_integrations
- ADD CONSTRAINT fk_rails_73db19721a FOREIGN KEY (service_id) REFERENCES integrations(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY custom_emoji
ADD CONSTRAINT fk_rails_745925b412 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
@@ -34139,6 +33737,9 @@ ALTER TABLE ONLY approval_merge_request_rules_users
ALTER TABLE ONLY required_code_owners_sections
ADD CONSTRAINT fk_rails_817708cf2d FOREIGN KEY (protected_branch_id) REFERENCES protected_branches(id) ON DELETE CASCADE;
+ALTER TABLE ONLY cluster_enabled_grants
+ ADD CONSTRAINT fk_rails_8336ce35af FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY dast_site_profiles
ADD CONSTRAINT fk_rails_83e309d69e FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -34319,12 +33920,18 @@ ALTER TABLE ONLY vulnerability_finding_signatures
ALTER TABLE ONLY clusters_applications_cert_managers
ADD CONSTRAINT fk_rails_9e4f2cb4b2 FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE;
+ALTER TABLE ONLY timelog_categories
+ ADD CONSTRAINT fk_rails_9f27b821a8 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY resource_milestone_events
ADD CONSTRAINT fk_rails_a006df5590 FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE;
ALTER TABLE ONLY namespace_root_storage_statistics
ADD CONSTRAINT fk_rails_a0702c430b FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+ALTER TABLE ONLY dingtalk_tracker_data
+ ADD CONSTRAINT fk_rails_a138e0d542 FOREIGN KEY (integration_id) REFERENCES integrations(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY elastic_reindexing_slices
ADD CONSTRAINT fk_rails_a17d86aeb9 FOREIGN KEY (elastic_reindexing_subtask_id) REFERENCES elastic_reindexing_subtasks(id) ON DELETE CASCADE;
@@ -34334,12 +33941,15 @@ ALTER TABLE ONLY project_aliases
ALTER TABLE ONLY vulnerability_user_mentions
ADD CONSTRAINT fk_rails_a18600f210 FOREIGN KEY (note_id) REFERENCES notes(id) ON DELETE CASCADE;
-ALTER TABLE ONLY jira_tracker_data
- ADD CONSTRAINT fk_rails_a299066916 FOREIGN KEY (service_id) REFERENCES integrations(id) ON DELETE CASCADE;
+ALTER TABLE ONLY todos
+ ADD CONSTRAINT fk_rails_a27c483435 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
ALTER TABLE ONLY protected_environments
ADD CONSTRAINT fk_rails_a354313d11 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ALTER TABLE ONLY jira_connect_subscriptions
+ ADD CONSTRAINT fk_rails_a3c10bcf7d FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY fork_network_members
ADD CONSTRAINT fk_rails_a40860a1ca FOREIGN KEY (fork_network_id) REFERENCES fork_networks(id) ON DELETE CASCADE;
@@ -34475,9 +34085,6 @@ 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 web_hook_logs
- ADD CONSTRAINT fk_rails_bb3355782d FOREIGN KEY (web_hook_id) REFERENCES web_hooks(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY security_findings
ADD CONSTRAINT fk_rails_bb63863cf1 FOREIGN KEY (scan_id) REFERENCES security_scans(id) ON DELETE CASCADE;
@@ -34502,6 +34109,9 @@ ALTER TABLE ONLY vulnerability_occurrence_identifiers
ALTER TABLE ONLY alert_management_http_integrations
ADD CONSTRAINT fk_rails_bec49f52cc FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ALTER TABLE ONLY namespace_ci_cd_settings
+ ADD CONSTRAINT fk_rails_bf04185d54 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY vulnerability_occurrences
ADD CONSTRAINT fk_rails_bf5b788ca7 FOREIGN KEY (scanner_id) REFERENCES vulnerability_scanners(id) ON DELETE CASCADE;
@@ -34589,8 +34199,8 @@ ALTER TABLE ONLY boards_epic_board_positions
ALTER TABLE ONLY vulnerability_finding_links
ADD CONSTRAINT fk_rails_cbdfde27ce FOREIGN KEY (vulnerability_occurrence_id) REFERENCES vulnerability_occurrences(id) ON DELETE CASCADE;
-ALTER TABLE ONLY clusters_integration_elasticstack
- ADD CONSTRAINT fk_rails_cc5ba8f658 FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE;
+ALTER TABLE ONLY namespace_details
+ ADD CONSTRAINT fk_rails_cc11a451f8 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
ALTER TABLE ONLY issues_self_managed_prometheus_alert_events
ADD CONSTRAINT fk_rails_cc5d88bbb0 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE;
@@ -34598,15 +34208,15 @@ ALTER TABLE ONLY issues_self_managed_prometheus_alert_events
ALTER TABLE ONLY operations_strategies_user_lists
ADD CONSTRAINT fk_rails_ccb7e4bc0b FOREIGN KEY (user_list_id) REFERENCES operations_user_lists(id) ON DELETE CASCADE;
-ALTER TABLE ONLY issue_tracker_data
- ADD CONSTRAINT fk_rails_ccc0840427 FOREIGN KEY (service_id) REFERENCES integrations(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY resource_milestone_events
ADD CONSTRAINT fk_rails_cedf8cce4d FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE SET NULL;
ALTER TABLE ONLY resource_iteration_events
ADD CONSTRAINT fk_rails_cee126f66c FOREIGN KEY (iteration_id) REFERENCES sprints(id) ON DELETE CASCADE;
+ALTER TABLE ONLY member_roles
+ ADD CONSTRAINT fk_rails_cf0ee35814 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY upload_states
ADD CONSTRAINT fk_rails_d00f153613 FOREIGN KEY (upload_id) REFERENCES uploads(id) ON DELETE CASCADE;
@@ -34619,9 +34229,6 @@ ALTER TABLE ONLY subscriptions
ALTER TABLE ONLY operations_strategies
ADD CONSTRAINT fk_rails_d183b6e6dd FOREIGN KEY (feature_flag_id) REFERENCES operations_feature_flags(id) ON DELETE CASCADE;
-ALTER TABLE ONLY project_mirror_data
- ADD CONSTRAINT fk_rails_d1aad367d7 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY cluster_agent_tokens
ADD CONSTRAINT fk_rails_d1d26abc25 FOREIGN KEY (agent_id) REFERENCES cluster_agents(id) ON DELETE CASCADE;
@@ -34646,6 +34253,9 @@ ALTER TABLE ONLY alert_management_alert_assignees
ALTER TABLE ONLY geo_hashed_storage_attachments_events
ADD CONSTRAINT fk_rails_d496b088e9 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ALTER TABLE ONLY ml_candidate_params
+ ADD CONSTRAINT fk_rails_d4a51d1185 FOREIGN KEY (candidate_id) REFERENCES ml_candidates(id);
+
ALTER TABLE ONLY merge_request_reviewers
ADD CONSTRAINT fk_rails_d9fec24b9d FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE;
@@ -34655,6 +34265,9 @@ ALTER TABLE ONLY ci_running_builds
ALTER TABLE ONLY jira_imports
ADD CONSTRAINT fk_rails_da617096ce FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE SET NULL;
+ALTER TABLE ONLY dependency_proxy_blobs
+ ADD CONSTRAINT fk_rails_db58bbc5d7 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY issues_prometheus_alert_events
ADD CONSTRAINT fk_rails_db5b756534 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE;
@@ -34784,9 +34397,15 @@ ALTER TABLE ONLY ci_daily_build_group_report_results
ALTER TABLE ONLY packages_debian_group_architectures
ADD CONSTRAINT fk_rails_ef667d1b03 FOREIGN KEY (distribution_id) REFERENCES packages_debian_group_distributions(id) ON DELETE CASCADE;
+ALTER TABLE ONLY project_relation_exports
+ ADD CONSTRAINT fk_rails_ef89b354fc FOREIGN KEY (project_export_job_id) REFERENCES project_export_jobs(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY label_priorities
ADD CONSTRAINT fk_rails_ef916d14fa FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ALTER TABLE ONLY ml_candidate_metrics
+ ADD CONSTRAINT fk_rails_efb613a25a FOREIGN KEY (candidate_id) REFERENCES ml_candidates(id);
+
ALTER TABLE ONLY fork_network_members
ADD CONSTRAINT fk_rails_efccadc4ec FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -34799,6 +34418,9 @@ ALTER TABLE ONLY prometheus_alerts
ALTER TABLE ONLY import_export_uploads
ADD CONSTRAINT fk_rails_f129140f9e FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ALTER TABLE ONLY jira_connect_subscriptions
+ ADD CONSTRAINT fk_rails_f1d617343f FOREIGN KEY (jira_connect_installation_id) REFERENCES jira_connect_installations(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY requirements
ADD CONSTRAINT fk_rails_f212e67e63 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -34850,9 +34472,6 @@ ALTER TABLE ONLY merge_requests_closing_issues
ALTER TABLE ONLY banned_users
ADD CONSTRAINT fk_rails_fa5bb598e5 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
-ALTER TABLE ONLY requirements_management_test_reports
- ADD CONSTRAINT fk_rails_fb3308ad55 FOREIGN KEY (requirement_id) REFERENCES requirements(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY operations_feature_flags_issues
ADD CONSTRAINT fk_rails_fb4d2a7cb1 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE;
@@ -34880,9 +34499,6 @@ ALTER TABLE ONLY experiment_users
ALTER TABLE ONLY cluster_groups
ADD CONSTRAINT fk_rails_fdb8648a96 FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE;
-ALTER TABLE ONLY project_tracing_settings
- ADD CONSTRAINT fk_rails_fe56f57fc6 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY resource_label_events
ADD CONSTRAINT fk_rails_fe91ece594 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE SET NULL;
diff --git a/db/migrate/20220213100000_remove_integration_type_triggers.rb b/db/migrate/20220213100000_remove_integration_type_triggers.rb
deleted file mode 100644
index 137e5648125..00000000000
--- a/db/migrate/20220213100000_remove_integration_type_triggers.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveIntegrationTypeTriggers < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::SchemaHelpers
-
- FUNCTION_NAME = 'integrations_set_type_new'
- TRIGGER_ON_INSERT_NAME = 'trigger_type_new_on_insert'
-
- def up
- drop_trigger(:integrations, TRIGGER_ON_INSERT_NAME)
- drop_function(FUNCTION_NAME)
- end
-
- def down
- create_trigger_function(FUNCTION_NAME, replace: true) do
- <<~SQL.squish
- UPDATE integrations
- SET type_new = COALESCE(NEW.type_new, regexp_replace(NEW.type, '\\A(.+)Service\\Z', 'Integrations::\\1'))
- , type = COALESCE(NEW.type, regexp_replace(NEW.type_new, '\\AIntegrations::(.+)\\Z', '\\1Service'))
- WHERE integrations.id = NEW.id;
- RETURN NULL;
- SQL
- end
-
- execute(<<~SQL)
- CREATE TRIGGER #{TRIGGER_ON_INSERT_NAME}
- AFTER INSERT ON integrations
- FOR EACH ROW
- EXECUTE FUNCTION #{FUNCTION_NAME}();
- SQL
- end
-end
diff --git a/db/migrate/20220221102333_change_maintainer_note_limit_in_ci_runner.rb b/db/migrate/20220221102333_change_maintainer_note_limit_in_ci_runner.rb
deleted file mode 100644
index a3d71a060b8..00000000000
--- a/db/migrate/20220221102333_change_maintainer_note_limit_in_ci_runner.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# frozen_string_literal: true
-
-class ChangeMaintainerNoteLimitInCiRunner < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit(
- :ci_runners,
- :maintainer_note,
- 1024,
- constraint_name: check_constraint_name(:ci_runners, :maintainer_note, 'max_length_1MB')
- )
-
- remove_text_limit(
- :ci_runners,
- :maintainer_note,
- constraint_name: check_constraint_name(:ci_runners, :maintainer_note, 'max_length')
- )
- end
-
- def down
- # no-op: Danger of failing if there are records with length(maintainer_note) > 255
- end
-end
diff --git a/db/migrate/20220314094841_add_package_registry_access_level_into_project_features.rb b/db/migrate/20220314094841_add_package_registry_access_level_into_project_features.rb
deleted file mode 100644
index 4effdfa6a5e..00000000000
--- a/db/migrate/20220314094841_add_package_registry_access_level_into_project_features.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddPackageRegistryAccessLevelIntoProjectFeatures < Gitlab::Database::Migration[1.0]
- DISABLED = 0 # ProjectFeature::DISABLED
-
- def up
- add_column :project_features, :package_registry_access_level, :integer, default: DISABLED, null: false
- end
-
- def down
- remove_column :project_features, :package_registry_access_level
- end
-end
diff --git a/db/migrate/20220316022505_create_namespace_details.rb b/db/migrate/20220316022505_create_namespace_details.rb
deleted file mode 100644
index 6df8606c726..00000000000
--- a/db/migrate/20220316022505_create_namespace_details.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-class CreateNamespaceDetails < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- create_table :namespace_details, id: false do |t|
- t.references :namespace, primary_key: true, null: false, default: nil, type: :bigint, index: false, foreign_key: { on_delete: :cascade } # rubocop:disable Layout/LineLength
- t.timestamps_with_timezone null: true
- t.integer :cached_markdown_version
- t.text :description, limit: 255
- t.text :description_html, limit: 255
- end
- end
- end
-
- def down
- drop_table :namespace_details
- end
-end
diff --git a/db/migrate/20220324091224_add_enforce_auth_checks_on_uploads_to_project_settings.rb b/db/migrate/20220324091224_add_enforce_auth_checks_on_uploads_to_project_settings.rb
deleted file mode 100644
index 2c86d1d346d..00000000000
--- a/db/migrate/20220324091224_add_enforce_auth_checks_on_uploads_to_project_settings.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddEnforceAuthChecksOnUploadsToProjectSettings < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def change
- add_column :project_settings, :enforce_auth_checks_on_uploads, :boolean, null: false, default: true
- end
-end
diff --git a/db/migrate/20220329092245_add_password_chars_requirement_to_application_settings.rb b/db/migrate/20220329092245_add_password_chars_requirement_to_application_settings.rb
deleted file mode 100644
index 152ee10df74..00000000000
--- a/db/migrate/20220329092245_add_password_chars_requirement_to_application_settings.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# frozen_string_literal: true
-
-class AddPasswordCharsRequirementToApplicationSettings < Gitlab::Database::Migration[2.0]
- def change
- add_column :application_settings, :password_uppercase_required, :boolean, default: false, null: false
- add_column :application_settings, :password_lowercase_required, :boolean, default: false, null: false
- add_column :application_settings, :password_number_required, :boolean, default: false, null: false
- add_column :application_settings, :password_symbol_required, :boolean, default: false, null: false
- end
-end
diff --git a/db/migrate/20220329130330_add_author_to_ci_subscriptions_projects.rb b/db/migrate/20220329130330_add_author_to_ci_subscriptions_projects.rb
deleted file mode 100644
index b1d0ac64d42..00000000000
--- a/db/migrate/20220329130330_add_author_to_ci_subscriptions_projects.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class AddAuthorToCiSubscriptionsProjects < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_ci_subscriptions_projects_author_id'
-
- def up
- unless column_exists?(:ci_subscriptions_projects, :author_id)
- add_column :ci_subscriptions_projects, :author_id, :bigint
- end
-
- add_concurrent_index :ci_subscriptions_projects, :author_id, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :ci_subscriptions_projects, INDEX_NAME
- remove_column :ci_subscriptions_projects, :author_id
- end
-end
diff --git a/db/migrate/20220331125725_add_title_to_topic.rb b/db/migrate/20220331125725_add_title_to_topic.rb
deleted file mode 100644
index 0c6ccb6beb9..00000000000
--- a/db/migrate/20220331125725_add_title_to_topic.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# frozen_string_literal: true
-
-class AddTitleToTopic < Gitlab::Database::Migration[1.0]
- # rubocop:disable Migration/AddLimitToTextColumns
- # limit is added in 20220331130726_add_text_limit_to_topics_title.rb
- def change
- add_column :topics, :title, :text
- end
- # rubocop:enable Migration/AddLimitToTextColumns
-end
diff --git a/db/migrate/20220331130726_add_text_limit_to_topics_title.rb b/db/migrate/20220331130726_add_text_limit_to_topics_title.rb
deleted file mode 100644
index 4a4b30edc0d..00000000000
--- a/db/migrate/20220331130726_add_text_limit_to_topics_title.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddTextLimitToTopicsTitle < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :topics, :title, 255
- end
-
- def down
- remove_text_limit :topics, :title
- end
-end
diff --git a/db/migrate/20220401071609_add_campaign_to_in_product_marketing_email.rb b/db/migrate/20220401071609_add_campaign_to_in_product_marketing_email.rb
deleted file mode 100644
index f8d027cfd2e..00000000000
--- a/db/migrate/20220401071609_add_campaign_to_in_product_marketing_email.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-# frozen_string_literal: true
-
-class AddCampaignToInProductMarketingEmail < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- TARGET_TABLE = :in_product_marketing_emails
- UNIQUE_INDEX_NAME = :index_in_product_marketing_emails_on_user_campaign
- CONSTRAINT_NAME = :in_product_marketing_emails_track_and_series_or_campaign
- TRACK_AND_SERIES_NOT_NULL_CONSTRAINT = 'track IS NOT NULL AND series IS NOT NULL AND campaign IS NULL'
- CAMPAIGN_NOT_NULL_CONSTRAINT = 'track IS NULL AND series IS NULL AND campaign IS NOT NULL'
-
- def up
- change_column_null TARGET_TABLE, :track, true
- change_column_null TARGET_TABLE, :series, true
-
- # rubocop:disable Migration/AddLimitToTextColumns
- # limit is added in 20220420034519_add_text_limit_to_in_product_marketing_email_campaign.rb
- add_column :in_product_marketing_emails, :campaign, :text, if_not_exists: true
- # rubocop:enable Migration/AddLimitToTextColumns
- add_concurrent_index TARGET_TABLE, [:user_id, :campaign], unique: true, name: UNIQUE_INDEX_NAME
- add_check_constraint TARGET_TABLE,
- "(#{TRACK_AND_SERIES_NOT_NULL_CONSTRAINT}) OR (#{CAMPAIGN_NOT_NULL_CONSTRAINT})",
- CONSTRAINT_NAME
- end
-
- def down
- remove_check_constraint TARGET_TABLE, CONSTRAINT_NAME
- remove_concurrent_index TARGET_TABLE, [:user_id, :campaign], name: UNIQUE_INDEX_NAME
- remove_column :in_product_marketing_emails, :campaign, if_exists: true
-
- # Records that previously had a value for campaign column will have NULL
- # values for track and series columns so we can't reverse
- # change_column_null.
- end
-end
diff --git a/db/migrate/20220401151123_add_last_repository_updated_at_to_project_repository_state.rb b/db/migrate/20220401151123_add_last_repository_updated_at_to_project_repository_state.rb
deleted file mode 100644
index d8ef5865576..00000000000
--- a/db/migrate/20220401151123_add_last_repository_updated_at_to_project_repository_state.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-# frozen_string_literal: true
-
-class AddLastRepositoryUpdatedAtToProjectRepositoryState < Gitlab::Database::Migration[1.0]
- def change
- add_column :project_repository_states, :last_repository_updated_at, :datetime_with_timezone
- add_column :project_repository_states, :last_wiki_updated_at, :datetime_with_timezone
- end
-end
diff --git a/db/migrate/20220406133049_add_delayed_group_deletion_to_application_settings.rb b/db/migrate/20220406133049_add_delayed_group_deletion_to_application_settings.rb
deleted file mode 100644
index 16ee7033021..00000000000
--- a/db/migrate/20220406133049_add_delayed_group_deletion_to_application_settings.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class AddDelayedGroupDeletionToApplicationSettings < Gitlab::Database::Migration[1.0]
- def up
- add_column :application_settings, :delayed_group_deletion, :boolean, default: true, null: false
- end
-
- def down
- remove_column :application_settings, :delayed_group_deletion
- end
-end
diff --git a/db/migrate/20220412060931_add_nullify_build_data_trigger_on_merge_request_metrics.rb b/db/migrate/20220412060931_add_nullify_build_data_trigger_on_merge_request_metrics.rb
deleted file mode 100644
index 96ec44c16c5..00000000000
--- a/db/migrate/20220412060931_add_nullify_build_data_trigger_on_merge_request_metrics.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-class AddNullifyBuildDataTriggerOnMergeRequestMetrics < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::SchemaHelpers
-
- TABLE_NAME = 'merge_request_metrics'
- FUNCTION_NAME = 'nullify_merge_request_metrics_build_data'
- TRIGGER_NAME = 'nullify_merge_request_metrics_build_data_on_update'
-
- def up
- create_trigger_function(FUNCTION_NAME) do
- <<~SQL
- IF (OLD.pipeline_id IS NOT NULL) AND (NEW.pipeline_id IS NULL) THEN
- NEW.latest_build_started_at = NULL;
- NEW.latest_build_finished_at = NULL;
- END IF;
- RETURN NEW;
- SQL
- end
-
- create_trigger(TABLE_NAME, TRIGGER_NAME, FUNCTION_NAME, fires: 'BEFORE UPDATE')
- end
-
- def down
- drop_trigger(TABLE_NAME, TRIGGER_NAME)
- drop_function(FUNCTION_NAME)
- end
-end
diff --git a/db/migrate/20220412135446_add_unique_fingerprint_sha256_index_to_key.rb b/db/migrate/20220412135446_add_unique_fingerprint_sha256_index_to_key.rb
deleted file mode 100644
index 3f2ea80ef30..00000000000
--- a/db/migrate/20220412135446_add_unique_fingerprint_sha256_index_to_key.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddUniqueFingerprintSha256IndexToKey < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- OLD_INDEX_NAME = 'index_keys_on_fingerprint_sha256'
- NEW_INDEX_NAME = 'index_keys_on_fingerprint_sha256_unique'
-
- def up
- add_concurrent_index :keys, :fingerprint_sha256, unique: true, name: NEW_INDEX_NAME
- remove_concurrent_index_by_name :keys, OLD_INDEX_NAME
- end
-
- def down
- add_concurrent_index :keys, :fingerprint_sha256, name: OLD_INDEX_NAME
- remove_concurrent_index_by_name :keys, NEW_INDEX_NAME
- end
-end
diff --git a/db/migrate/20220412140446_add_unique_fingerprint_sha256_index_to_group_deploy_key.rb b/db/migrate/20220412140446_add_unique_fingerprint_sha256_index_to_group_deploy_key.rb
deleted file mode 100644
index db238394dd6..00000000000
--- a/db/migrate/20220412140446_add_unique_fingerprint_sha256_index_to_group_deploy_key.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddUniqueFingerprintSha256IndexToGroupDeployKey < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- OLD_INDEX_NAME = 'index_group_deploy_keys_on_fingerprint_sha256'
- NEW_INDEX_NAME = 'index_group_deploy_keys_on_fingerprint_sha256_unique'
-
- def up
- add_concurrent_index :group_deploy_keys, :fingerprint_sha256, unique: true, name: NEW_INDEX_NAME
- remove_concurrent_index_by_name :group_deploy_keys, OLD_INDEX_NAME
- end
-
- def down
- add_concurrent_index :group_deploy_keys, :fingerprint_sha256, name: OLD_INDEX_NAME
- remove_concurrent_index_by_name :group_deploy_keys, NEW_INDEX_NAME
- end
-end
diff --git a/db/migrate/20220412140755_drop_unique_fingerprint_md5_index_from_key.rb b/db/migrate/20220412140755_drop_unique_fingerprint_md5_index_from_key.rb
deleted file mode 100644
index 09fb7de0798..00000000000
--- a/db/migrate/20220412140755_drop_unique_fingerprint_md5_index_from_key.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class DropUniqueFingerprintMd5IndexFromKey < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_keys_on_fingerprint'
-
- def up
- remove_concurrent_index_by_name :keys, INDEX_NAME
- add_concurrent_index :keys, :fingerprint, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :keys, INDEX_NAME
- add_concurrent_index :keys, :fingerprint, unique: true, name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20220412141020_drop_unique_fingerprint_md5_index_from_group_deploy_key.rb b/db/migrate/20220412141020_drop_unique_fingerprint_md5_index_from_group_deploy_key.rb
deleted file mode 100644
index 51ae664ed4a..00000000000
--- a/db/migrate/20220412141020_drop_unique_fingerprint_md5_index_from_group_deploy_key.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class DropUniqueFingerprintMd5IndexFromGroupDeployKey < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_group_deploy_keys_on_fingerprint'
-
- def up
- remove_concurrent_index_by_name :group_deploy_keys, INDEX_NAME
- add_concurrent_index :group_deploy_keys, :fingerprint, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :group_deploy_keys, INDEX_NAME
- add_concurrent_index :group_deploy_keys, :fingerprint, unique: true, name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20220413054910_backfill_delayed_group_deletion.rb b/db/migrate/20220413054910_backfill_delayed_group_deletion.rb
deleted file mode 100644
index 420f200be02..00000000000
--- a/db/migrate/20220413054910_backfill_delayed_group_deletion.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-class BackfillDelayedGroupDeletion < Gitlab::Database::Migration[1.0]
- class ApplicationSetting < ActiveRecord::Base
- self.table_name = 'application_settings'
- end
-
- def up
- ApplicationSetting.reset_column_information
-
- ApplicationSetting.find_each do |application_setting|
- application_setting.update!(delayed_group_deletion: application_setting.deletion_adjourned_period > 0)
- end
- end
-
- def down
- ApplicationSetting.reset_column_information
-
- ApplicationSetting.update_all(delayed_group_deletion: true)
- end
-end
diff --git a/db/migrate/20220413124200_add_view_for_per_table_autovacuum_status.rb b/db/migrate/20220413124200_add_view_for_per_table_autovacuum_status.rb
deleted file mode 100644
index 977a16d1b54..00000000000
--- a/db/migrate/20220413124200_add_view_for_per_table_autovacuum_status.rb
+++ /dev/null
@@ -1,45 +0,0 @@
-# frozen_string_literal: true
-
-class AddViewForPerTableAutovacuumStatus < Gitlab::Database::Migration[1.0]
- def up
- execute <<~SQL
- DROP VIEW IF EXISTS postgres_autovacuum_activity;
- DROP FUNCTION IF EXISTS postgres_pg_stat_activity_autovacuum;
-
- CREATE FUNCTION postgres_pg_stat_activity_autovacuum() RETURNS SETOF pg_catalog.pg_stat_activity AS
- $$
- SELECT *
- FROM pg_stat_activity
- WHERE datname = current_database()
- AND state = 'active'
- AND backend_type = 'autovacuum worker'
- $$
- LANGUAGE sql
- VOLATILE
- SECURITY DEFINER
- SET search_path = 'pg_catalog', 'pg_temp';
-
- CREATE VIEW postgres_autovacuum_activity AS
- WITH processes as
- (
- SELECT query, query_start, (regexp_matches(query, '^autovacuum: VACUUM (\w+)\.(\w+)')) as matches
- FROM postgres_pg_stat_activity_autovacuum()
- WHERE query ~* '^autovacuum: VACUUM \w+\.\w+'
- )
- SELECT matches[1] || '.' || matches[2] as table_identifier,
- matches[1] as schema,
- matches[2] as table,
- query_start as vacuum_start
- FROM processes;
-
- COMMENT ON VIEW postgres_autovacuum_activity IS 'Contains information about PostgreSQL backends currently performing autovacuum operations on the tables indicated here.';
- SQL
- end
-
- def down
- execute <<~SQL
- DROP VIEW IF EXISTS postgres_autovacuum_activity;
- DROP FUNCTION IF EXISTS postgres_pg_stat_activity_autovacuum;
- SQL
- end
-end
diff --git a/db/migrate/20220413164146_remove_max_seats_used_indices.rb b/db/migrate/20220413164146_remove_max_seats_used_indices.rb
deleted file mode 100644
index d89ce6de4a4..00000000000
--- a/db/migrate/20220413164146_remove_max_seats_used_indices.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveMaxSeatsUsedIndices < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- MAX_SEATS_USED_INDEX = 'tmp_gitlab_subscriptions_max_seats_used_migration'
- MAX_SEATS_USED_INDEX_2 = 'tmp_gitlab_subscriptions_max_seats_used_migration_2'
-
- def up
- remove_concurrent_index_by_name :gitlab_subscriptions, MAX_SEATS_USED_INDEX
- remove_concurrent_index_by_name :gitlab_subscriptions, MAX_SEATS_USED_INDEX_2
- end
-
- def down
- add_concurrent_index :gitlab_subscriptions, :id,
- where: "start_date >= '2021-08-02' AND start_date <= '2021-11-20' AND max_seats_used != 0 " \
- "AND max_seats_used > seats_in_use AND max_seats_used > seats",
- name: MAX_SEATS_USED_INDEX
- add_concurrent_index :gitlab_subscriptions, :id,
- where: "start_date < '2021-08-02' AND max_seats_used != 0 AND max_seats_used > seats_in_use " \
- "AND max_seats_used > seats",
- name: MAX_SEATS_USED_INDEX_2
- end
-end
diff --git a/db/migrate/20220413235818_add_max_seats_used_changed_at_to_gitlab_subscriptions.rb b/db/migrate/20220413235818_add_max_seats_used_changed_at_to_gitlab_subscriptions.rb
deleted file mode 100644
index 34e3a59cfb7..00000000000
--- a/db/migrate/20220413235818_add_max_seats_used_changed_at_to_gitlab_subscriptions.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddMaxSeatsUsedChangedAtToGitlabSubscriptions < Gitlab::Database::Migration[2.0]
- def change
- add_column :gitlab_subscriptions, :max_seats_used_changed_at, :datetime_with_timezone
- end
-end
diff --git a/db/migrate/20220414203622_add_index_for_columns_user_custom_attribute.rb b/db/migrate/20220414203622_add_index_for_columns_user_custom_attribute.rb
deleted file mode 100644
index b461e656f1f..00000000000
--- a/db/migrate/20220414203622_add_index_for_columns_user_custom_attribute.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexForColumnsUserCustomAttribute < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
- INDEX_NAME = 'index_key_updated_at_on_user_custom_attribute'
-
- def up
- add_concurrent_index(:user_custom_attributes, [:key, :updated_at], name: INDEX_NAME)
- end
-
- def down
- remove_concurrent_index_by_name(:user_custom_attributes, INDEX_NAME)
- end
-end
diff --git a/db/migrate/20220415015143_replace_iterations_cadence_date_range_constraint.rb b/db/migrate/20220415015143_replace_iterations_cadence_date_range_constraint.rb
deleted file mode 100644
index 9788fd4a32b..00000000000
--- a/db/migrate/20220415015143_replace_iterations_cadence_date_range_constraint.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-# frozen_string_literal: true
-
-class ReplaceIterationsCadenceDateRangeConstraint < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def up
- execute <<~SQL
- ALTER TABLE sprints
- DROP CONSTRAINT IF EXISTS iteration_start_and_due_date_iterations_cadence_id_constraint;
-
- ALTER TABLE sprints
- ADD CONSTRAINT iteration_start_and_due_date_iterations_cadence_id_constraint
- EXCLUDE USING gist
- ( iterations_cadence_id WITH =,
- daterange(start_date, due_date, '[]') WITH &&
- )
- WHERE (group_id IS NOT NULL) DEFERRABLE INITIALLY DEFERRED;
- SQL
- end
-
- def down
- execute <<~SQL
- ALTER TABLE sprints
- DROP CONSTRAINT IF EXISTS iteration_start_and_due_date_iterations_cadence_id_constraint;
-
- ALTER TABLE sprints
- ADD CONSTRAINT iteration_start_and_due_date_iterations_cadence_id_constraint
- EXCLUDE USING gist
- ( iterations_cadence_id WITH =,
- daterange(start_date, due_date, '[]') WITH &&
- )
- WHERE (group_id IS NOT NULL);
- SQL
- end
-end
diff --git a/db/migrate/20220419223906_add_arkose_namespace_to_application_settings.rb b/db/migrate/20220419223906_add_arkose_namespace_to_application_settings.rb
deleted file mode 100644
index 1fc655228db..00000000000
--- a/db/migrate/20220419223906_add_arkose_namespace_to_application_settings.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-class AddArkoseNamespaceToApplicationSettings < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- ARKOSE_LABS_DEFAULT_NAMESPACE = 'client'
-
- def up
- unless column_exists?(:application_settings, :arkose_labs_namespace)
- add_column :application_settings,
- :arkose_labs_namespace,
- :text,
- default: ARKOSE_LABS_DEFAULT_NAMESPACE,
- null: false
- end
-
- add_text_limit :application_settings, :arkose_labs_namespace, 255
- end
-
- def down
- remove_column :application_settings, :arkose_labs_namespace
- end
-end
diff --git a/db/migrate/20220420034519_add_text_limit_to_in_product_marketing_email_campaign.rb b/db/migrate/20220420034519_add_text_limit_to_in_product_marketing_email_campaign.rb
deleted file mode 100644
index c590111da21..00000000000
--- a/db/migrate/20220420034519_add_text_limit_to_in_product_marketing_email_campaign.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddTextLimitToInProductMarketingEmailCampaign < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :in_product_marketing_emails, :campaign, 255
- end
-
- def down
- remove_text_limit :in_product_marketing_emails, :campaign
- end
-end
diff --git a/db/migrate/20220420135245_fix_batched_background_migration_default_arguments.rb b/db/migrate/20220420135245_fix_batched_background_migration_default_arguments.rb
deleted file mode 100644
index 42a0ee32ecb..00000000000
--- a/db/migrate/20220420135245_fix_batched_background_migration_default_arguments.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class FixBatchedBackgroundMigrationDefaultArguments < Gitlab::Database::Migration[1.0]
- def change
- change_column_default :batched_background_migrations, :job_arguments, from: '[]', to: []
- end
-end
diff --git a/db/migrate/20220420173247_add_group_inheritance_type_to_pe_authorizable.rb b/db/migrate/20220420173247_add_group_inheritance_type_to_pe_authorizable.rb
deleted file mode 100644
index f1ddf48304e..00000000000
--- a/db/migrate/20220420173247_add_group_inheritance_type_to_pe_authorizable.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: true
-
-class AddGroupInheritanceTypeToPeAuthorizable < Gitlab::Database::Migration[2.0]
- def change
- add_column :protected_environment_deploy_access_levels,
- :group_inheritance_type,
- :smallint,
- default: 0, limit: 2, null: false
- add_column :protected_environment_approval_rules,
- :group_inheritance_type,
- :smallint,
- default: 0, limit: 2, null: false
- end
-end
diff --git a/db/migrate/20220420192542_add_id_for_cleanup_index_packages_package_files.rb b/db/migrate/20220420192542_add_id_for_cleanup_index_packages_package_files.rb
deleted file mode 100644
index a5a0001ab69..00000000000
--- a/db/migrate/20220420192542_add_id_for_cleanup_index_packages_package_files.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class AddIdForCleanupIndexPackagesPackageFiles < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_packages_package_files_on_id_for_cleanup'
-
- PACKAGE_FILE_STATUS_PENDING_DESTRUCTION = 1
-
- def up
- where = "status = #{PACKAGE_FILE_STATUS_PENDING_DESTRUCTION}"
-
- add_concurrent_index :packages_package_files, :id, name: INDEX_NAME, where: where
- end
-
- def down
- remove_concurrent_index_by_name :packages_package_files, name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20220421114418_make_fingerprint_nullable_for_group_deploy_key.rb b/db/migrate/20220421114418_make_fingerprint_nullable_for_group_deploy_key.rb
deleted file mode 100644
index 587ebf1289d..00000000000
--- a/db/migrate/20220421114418_make_fingerprint_nullable_for_group_deploy_key.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class MakeFingerprintNullableForGroupDeployKey < Gitlab::Database::Migration[2.0]
- def up
- change_column_null :group_deploy_keys, :fingerprint, 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/20220421141342_add_allowed_plans_to_ci_runners.rb b/db/migrate/20220421141342_add_allowed_plans_to_ci_runners.rb
deleted file mode 100644
index 46da684cfe2..00000000000
--- a/db/migrate/20220421141342_add_allowed_plans_to_ci_runners.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddAllowedPlansToCiRunners < Gitlab::Database::Migration[1.0]
- def change
- # rubocop:disable Migration/AddLimitToTextColumns
- add_column :ci_runners, :allowed_plans, :text, array: true, null: false, default: []
- # rubocop:enable Migration/AddLimitToTextColumns
- end
-end
diff --git a/db/migrate/20220421144758_change_dotenv_plan_limits_for_old_plans.rb b/db/migrate/20220421144758_change_dotenv_plan_limits_for_old_plans.rb
deleted file mode 100644
index a4dede974e2..00000000000
--- a/db/migrate/20220421144758_change_dotenv_plan_limits_for_old_plans.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class ChangeDotenvPlanLimitsForOldPlans < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- create_or_update_plan_limit('dotenv_variables', 'early_adopter', 50)
- create_or_update_plan_limit('dotenv_variables', 'bronze', 50)
- create_or_update_plan_limit('dotenv_variables', 'silver', 100)
- create_or_update_plan_limit('dotenv_variables', 'gold', 150)
- end
-
- def down
- create_or_update_plan_limit('dotenv_variables', 'early_adopter', 20)
- create_or_update_plan_limit('dotenv_variables', 'bronze', 20)
- create_or_update_plan_limit('dotenv_variables', 'silver', 20)
- create_or_update_plan_limit('dotenv_variables', 'gold', 20)
- end
-end
diff --git a/db/migrate/20220421180321_add_last_cleanup_deleted_tags_count_to_container_repository.rb b/db/migrate/20220421180321_add_last_cleanup_deleted_tags_count_to_container_repository.rb
deleted file mode 100644
index 141bc4b49e6..00000000000
--- a/db/migrate/20220421180321_add_last_cleanup_deleted_tags_count_to_container_repository.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddLastCleanupDeletedTagsCountToContainerRepository < Gitlab::Database::Migration[2.0]
- def change
- add_column :container_repositories, :last_cleanup_deleted_tags_count, :integer
- end
-end
diff --git a/db/migrate/20220422200633_fix_view_for_per_table_autovacuum_status.rb b/db/migrate/20220422200633_fix_view_for_per_table_autovacuum_status.rb
deleted file mode 100644
index 0af56d32674..00000000000
--- a/db/migrate/20220422200633_fix_view_for_per_table_autovacuum_status.rb
+++ /dev/null
@@ -1,73 +0,0 @@
-# frozen_string_literal: true
-
-class FixViewForPerTableAutovacuumStatus < Gitlab::Database::Migration[2.0]
- def up
- execute <<~SQL
- DROP VIEW IF EXISTS postgres_autovacuum_activity;
- DROP FUNCTION IF EXISTS postgres_pg_stat_activity_autovacuum;
-
- CREATE FUNCTION postgres_pg_stat_activity_autovacuum() RETURNS TABLE(query text, query_start timestamptz) AS
- $$
- SELECT query, query_start
- FROM pg_stat_activity
- WHERE datname = current_database()
- AND state = 'active'
- AND backend_type = 'autovacuum worker'
- $$
- LANGUAGE sql
- VOLATILE
- SECURITY DEFINER
- SET search_path = 'pg_catalog', 'pg_temp';
-
- CREATE VIEW postgres_autovacuum_activity AS
- WITH processes as
- (
- SELECT query, query_start, (regexp_matches(query, '^autovacuum: VACUUM (\w+)\.(\w+)')) as matches
- FROM postgres_pg_stat_activity_autovacuum()
- WHERE query ~* '^autovacuum: VACUUM \w+\.\w+'
- )
- SELECT matches[1] || '.' || matches[2] as table_identifier,
- matches[1] as schema,
- matches[2] as table,
- query_start as vacuum_start
- FROM processes;
-
- COMMENT ON VIEW postgres_autovacuum_activity IS 'Contains information about PostgreSQL backends currently performing autovacuum operations on the tables indicated here.';
- SQL
- end
-
- def down
- execute(<<~SQL)
- DROP VIEW IF EXISTS postgres_autovacuum_activity;
- DROP FUNCTION IF EXISTS postgres_pg_stat_activity_autovacuum;
-
- CREATE FUNCTION postgres_pg_stat_activity_autovacuum() RETURNS SETOF pg_catalog.pg_stat_activity AS
- $$
- SELECT *
- FROM pg_stat_activity
- WHERE datname = current_database()
- AND state = 'active'
- AND backend_type = 'autovacuum worker'
- $$
- LANGUAGE sql
- VOLATILE
- SECURITY DEFINER
- SET search_path = 'pg_catalog', 'pg_temp';
-
- CREATE VIEW postgres_autovacuum_activity AS
- WITH processes as
- (
- SELECT query, query_start, (regexp_matches(query, '^autovacuum: VACUUM (\w+)\.(\w+)')) as matches
- FROM postgres_pg_stat_activity_autovacuum()
- WHERE query ~* '^autovacuum: VACUUM \w+\.\w+'
- )
- SELECT matches[1] || '.' || matches[2] as table_identifier,
- matches[1] as schema,
- matches[2] as table,
- query_start as vacuum_start
- FROM processes;
-
- COMMENT ON VIEW postgres_autovacuum_activity IS 'Contains information about PostgreSQL backends currently performing autovacuum operations on the tables indicated here.';
- SQL
- end
-end
diff --git a/db/migrate/20220422220507_remove_tmp_index_supporting_leaky_regex_cleanup.rb b/db/migrate/20220422220507_remove_tmp_index_supporting_leaky_regex_cleanup.rb
deleted file mode 100644
index 15a3c4d579e..00000000000
--- a/db/migrate/20220422220507_remove_tmp_index_supporting_leaky_regex_cleanup.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveTmpIndexSupportingLeakyRegexCleanup < Gitlab::Database::Migration[2.0]
- INDEX_NAME = "tmp_index_merge_requests_draft_and_status_leaky_regex"
- LEAKY_REGEXP_STR = "^\\[draft\\]|\\(draft\\)|draft:|draft|\\[WIP\\]|WIP:|WIP"
- CORRECTED_REGEXP_STR = "^(\\[draft\\]|\\(draft\\)|draft:|draft|\\[WIP\\]|WIP:|WIP)"
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :merge_requests, INDEX_NAME
- end
-
- def down
- where_clause = <<~SQL
- draft = true AND
- state_id = 1 AND
- ((title)::text ~* '#{LEAKY_REGEXP_STR}'::text) AND ((title)::text !~* '#{CORRECTED_REGEXP_STR}'::text)
- SQL
-
- add_concurrent_index :merge_requests, :id,
- where: where_clause,
- name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20220425120604_create_packages_cleanup_policies.rb b/db/migrate/20220425120604_create_packages_cleanup_policies.rb
deleted file mode 100644
index 0b04457235e..00000000000
--- a/db/migrate/20220425120604_create_packages_cleanup_policies.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class CreatePackagesCleanupPolicies < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def up
- create_table :packages_cleanup_policies, id: false do |t|
- t.timestamps_with_timezone null: false
- t.references :project,
- primary_key: true,
- default: nil,
- index: false,
- foreign_key: { to_table: :projects, on_delete: :cascade }
- t.datetime_with_timezone :next_run_at, null: true
- t.text :keep_n_duplicated_package_files, default: 'all', null: false, limit: 255
- end
- end
-
- def down
- drop_table :packages_cleanup_policies
- end
-end
diff --git a/db/migrate/20220426130217_add_max_export_size_to_application_settings.rb b/db/migrate/20220426130217_add_max_export_size_to_application_settings.rb
deleted file mode 100644
index d1488a77d14..00000000000
--- a/db/migrate/20220426130217_add_max_export_size_to_application_settings.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddMaxExportSizeToApplicationSettings < Gitlab::Database::Migration[2.0]
- def change
- add_column :application_settings, :max_export_size, :integer, default: 0
- end
-end
diff --git a/db/migrate/20220502125053_recreate_index_for_project_group_link_with_group_id_and_project_id.rb b/db/migrate/20220502125053_recreate_index_for_project_group_link_with_group_id_and_project_id.rb
deleted file mode 100644
index 1d9a18b7b23..00000000000
--- a/db/migrate/20220502125053_recreate_index_for_project_group_link_with_group_id_and_project_id.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class RecreateIndexForProjectGroupLinkWithGroupIdAndProjectId < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- OLD_INDEX_NAME = 'index_project_group_links_on_group_id'
- NEW_INDEX_NAME = 'index_project_group_links_on_group_id_and_project_id'
-
- def up
- add_concurrent_index :project_group_links, [:group_id, :project_id], name: NEW_INDEX_NAME
- remove_concurrent_index_by_name :project_group_links, OLD_INDEX_NAME
- end
-
- def down
- add_concurrent_index :project_group_links, [:group_id], name: OLD_INDEX_NAME
- remove_concurrent_index_by_name :project_group_links, NEW_INDEX_NAME
- end
-end
diff --git a/db/migrate/20220502150408_add_slack_integrations_bot_columns.rb b/db/migrate/20220502150408_add_slack_integrations_bot_columns.rb
deleted file mode 100644
index cb5b201e71e..00000000000
--- a/db/migrate/20220502150408_add_slack_integrations_bot_columns.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class AddSlackIntegrationsBotColumns < Gitlab::Database::Migration[2.0]
- def change
- change_table :slack_integrations do |t|
- t.column :bot_user_id, :text
- t.column :encrypted_bot_access_token, :binary
- t.column :encrypted_bot_access_token_iv, :binary
- end
- end
-end
diff --git a/db/migrate/20220502152633_add_slack_integrations_bot_user_id_text_limit.rb b/db/migrate/20220502152633_add_slack_integrations_bot_user_id_text_limit.rb
deleted file mode 100644
index 649d6ccf9d4..00000000000
--- a/db/migrate/20220502152633_add_slack_integrations_bot_user_id_text_limit.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddSlackIntegrationsBotUserIdTextLimit < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :slack_integrations, :bot_user_id, 255
- end
-
- def down
- remove_text_limit :slack_integrations, :bot_user_id
- end
-end
diff --git a/db/migrate/20220503035221_add_gitlab_schema_to_batched_background_migrations.rb b/db/migrate/20220503035221_add_gitlab_schema_to_batched_background_migrations.rb
deleted file mode 100644
index eaebe979ff3..00000000000
--- a/db/migrate/20220503035221_add_gitlab_schema_to_batched_background_migrations.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class AddGitlabSchemaToBatchedBackgroundMigrations < Gitlab::Database::Migration[2.0]
- # rubocop:disable Migration/AddLimitToTextColumns
- # limit is added in 20220503035437_add_text_limit_to_batched_background_migrations_gitlab_schema
- def change
- add_column :batched_background_migrations, :gitlab_schema, :text, null: false, default: :gitlab_main
- change_column_default(:batched_background_migrations, :gitlab_schema, from: :gitlab_main, to: nil)
- end
- # rubocop:enable Migration/AddLimitToTextColumns
-end
diff --git a/db/migrate/20220503035437_add_text_limit_to_batched_background_migrations_gitlab_schema.rb b/db/migrate/20220503035437_add_text_limit_to_batched_background_migrations_gitlab_schema.rb
deleted file mode 100644
index d5629cd1b8d..00000000000
--- a/db/migrate/20220503035437_add_text_limit_to_batched_background_migrations_gitlab_schema.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddTextLimitToBatchedBackgroundMigrationsGitlabSchema < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :batched_background_migrations, :gitlab_schema, 255
- end
-
- def down
- remove_text_limit :batched_background_migrations, :gitlab_schema
- end
-end
diff --git a/db/migrate/20220503073401_recreate_index_for_group_group_link_with_both_group_ids.rb b/db/migrate/20220503073401_recreate_index_for_group_group_link_with_both_group_ids.rb
deleted file mode 100644
index 214e9c5e0a7..00000000000
--- a/db/migrate/20220503073401_recreate_index_for_group_group_link_with_both_group_ids.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class RecreateIndexForGroupGroupLinkWithBothGroupIds < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- OLD_INDEX_NAME = 'index_group_group_links_on_shared_with_group_id'
- NEW_INDEX_NAME = 'index_group_group_links_on_shared_with_group_and_shared_group'
-
- def up
- add_concurrent_index :group_group_links, [:shared_with_group_id, :shared_group_id], name: NEW_INDEX_NAME
- remove_concurrent_index_by_name :group_group_links, OLD_INDEX_NAME
- end
-
- def down
- add_concurrent_index :group_group_links, [:shared_with_group_id], name: OLD_INDEX_NAME
- remove_concurrent_index_by_name :group_group_links, NEW_INDEX_NAME
- end
-end
diff --git a/db/migrate/20220503102855_add_namespace_ci_cd_settings_table.rb b/db/migrate/20220503102855_add_namespace_ci_cd_settings_table.rb
deleted file mode 100644
index 532e80d1567..00000000000
--- a/db/migrate/20220503102855_add_namespace_ci_cd_settings_table.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class AddNamespaceCiCdSettingsTable < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def up
- create_table :namespace_ci_cd_settings, id: false do |t|
- t.references :namespace, primary_key: true, default: nil, index: false, foreign_key: { on_delete: :cascade }
- t.boolean :allow_stale_runner_pruning, null: false, default: false
- end
- end
-
- def down
- drop_table :namespace_ci_cd_settings, if_exists: true
- end
-end
diff --git a/db/migrate/20220504042847_add_slack_signing_key_to_application_settings.rb b/db/migrate/20220504042847_add_slack_signing_key_to_application_settings.rb
deleted file mode 100644
index ddfa7c63370..00000000000
--- a/db/migrate/20220504042847_add_slack_signing_key_to_application_settings.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-# frozen_string_literal: true
-
-class AddSlackSigningKeyToApplicationSettings < Gitlab::Database::Migration[2.0]
- def change
- add_column :application_settings, :encrypted_slack_app_signing_secret, :binary
- add_column :application_settings, :encrypted_slack_app_signing_secret_iv, :binary
- end
-end
diff --git a/db/migrate/20220504140036_add_container_registry_size_to_namespace_root_storage_statistics.rb b/db/migrate/20220504140036_add_container_registry_size_to_namespace_root_storage_statistics.rb
deleted file mode 100644
index 0197b418cd8..00000000000
--- a/db/migrate/20220504140036_add_container_registry_size_to_namespace_root_storage_statistics.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddContainerRegistrySizeToNamespaceRootStorageStatistics < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- add_column :namespace_root_storage_statistics, :container_registry_size, :bigint, default: 0, null: false
- end
-end
diff --git a/db/migrate/20220505092254_add_allow_stale_runner_pruning_index_to_namespace_ci_cd_settings.rb b/db/migrate/20220505092254_add_allow_stale_runner_pruning_index_to_namespace_ci_cd_settings.rb
deleted file mode 100644
index b7fd8fdee4f..00000000000
--- a/db/migrate/20220505092254_add_allow_stale_runner_pruning_index_to_namespace_ci_cd_settings.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddAllowStaleRunnerPruningIndexToNamespaceCiCdSettings < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_cicd_settings_on_namespace_id_where_stale_pruning_enabled'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :namespace_ci_cd_settings,
- :namespace_id,
- where: '(allow_stale_runner_pruning = true)',
- name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :namespace_ci_cd_settings, INDEX_NAME
- end
-end
diff --git a/db/migrate/20220506154054_create_sync_namespace_details_trigger.rb b/db/migrate/20220506154054_create_sync_namespace_details_trigger.rb
deleted file mode 100644
index 1351fe91318..00000000000
--- a/db/migrate/20220506154054_create_sync_namespace_details_trigger.rb
+++ /dev/null
@@ -1,70 +0,0 @@
-# frozen_string_literal: true
-class CreateSyncNamespaceDetailsTrigger < Gitlab::Database::Migration[2.0]
- include Gitlab::Database::SchemaHelpers
-
- UPDATE_TRIGGER_NAME = 'trigger_update_details_on_namespace_update'
- INSERT_TRIGGER_NAME = 'trigger_update_details_on_namespace_insert'
- FUNCTION_NAME = 'update_namespace_details_from_namespaces'
-
- enable_lock_retries!
-
- def up
- create_trigger_function(FUNCTION_NAME, replace: true) do
- <<~SQL
- INSERT INTO
- namespace_details (
- description,
- description_html,
- cached_markdown_version,
- updated_at,
- created_at,
- namespace_id
- )
- VALUES
- (
- NEW.description,
- NEW.description_html,
- NEW.cached_markdown_version,
- NEW.updated_at,
- NEW.updated_at,
- NEW.id
- ) ON CONFLICT (namespace_id) DO
- UPDATE
- SET
- description = NEW.description,
- description_html = NEW.description_html,
- cached_markdown_version = NEW.cached_markdown_version,
- updated_at = NEW.updated_at
- WHERE
- namespace_details.namespace_id = NEW.id;RETURN NULL;
- SQL
- end
-
- execute(<<~SQL)
- CREATE TRIGGER #{UPDATE_TRIGGER_NAME}
- AFTER UPDATE ON namespaces
- FOR EACH ROW
- WHEN (
- NEW.type <> 'Project' AND (
- OLD.description IS DISTINCT FROM NEW.description OR
- OLD.description_html IS DISTINCT FROM NEW.description_html OR
- OLD.cached_markdown_version IS DISTINCT FROM NEW.cached_markdown_version)
- )
- EXECUTE PROCEDURE #{FUNCTION_NAME}();
- SQL
-
- execute(<<~SQL)
- CREATE TRIGGER #{INSERT_TRIGGER_NAME}
- AFTER INSERT ON namespaces
- FOR EACH ROW
- WHEN (NEW.type <> 'Project')
- EXECUTE PROCEDURE #{FUNCTION_NAME}();
- SQL
- end
-
- def down
- drop_trigger(:namespaces, UPDATE_TRIGGER_NAME)
- drop_trigger(:namespaces, INSERT_TRIGGER_NAME)
- drop_function(FUNCTION_NAME)
- end
-end
diff --git a/db/migrate/20220506180411_add_index_to_vulnerability_feedback_finding_uuid.rb b/db/migrate/20220506180411_add_index_to_vulnerability_feedback_finding_uuid.rb
deleted file mode 100644
index a6f01ce5a0e..00000000000
--- a/db/migrate/20220506180411_add_index_to_vulnerability_feedback_finding_uuid.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexToVulnerabilityFeedbackFindingUuid < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_vulnerability_feedback_finding_uuid'
-
- # We are indexing on UUID, a hash index should be smaller and faster
- # details on https://gitlab.com/gitlab-org/gitlab/-/merge_requests/86808#note_943330140
- def up
- add_concurrent_index :vulnerability_feedback, :finding_uuid, using: :hash, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index :vulnerability_feedback, :finding_uuid, using: :hash, name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20220511090324_add_last_consistency_check_cursors_to_vsa_aggregations.rb b/db/migrate/20220511090324_add_last_consistency_check_cursors_to_vsa_aggregations.rb
deleted file mode 100644
index 53c09597be5..00000000000
--- a/db/migrate/20220511090324_add_last_consistency_check_cursors_to_vsa_aggregations.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-class AddLastConsistencyCheckCursorsToVsaAggregations < Gitlab::Database::Migration[2.0]
- def up
- change_table(:analytics_cycle_analytics_aggregations, bulk: true) do |t|
- t.column :last_consistency_check_issues_stage_event_hash_id, :bigint, null: true
- t.column :last_consistency_check_issues_start_event_timestamp, :datetime_with_timezone, null: true
- t.column :last_consistency_check_issues_end_event_timestamp, :datetime_with_timezone, null: true
- t.column :last_consistency_check_issues_issuable_id, :bigint, null: true
-
- t.column :last_consistency_check_merge_requests_stage_event_hash_id, :bigint, null: true
- t.column :last_consistency_check_merge_requests_start_event_timestamp, :datetime_with_timezone, null: true
- t.column :last_consistency_check_merge_requests_end_event_timestamp, :datetime_with_timezone, null: true
- t.column :last_consistency_check_merge_requests_issuable_id, :bigint, null: true
- end
- end
-
- def down
- remove_column :analytics_cycle_analytics_aggregations, :last_consistency_check_issues_stage_event_hash_id
- remove_column :analytics_cycle_analytics_aggregations, :last_consistency_check_issues_start_event_timestamp
- remove_column :analytics_cycle_analytics_aggregations, :last_consistency_check_issues_end_event_timestamp
- remove_column :analytics_cycle_analytics_aggregations, :last_consistency_check_issues_issuable_id
- remove_column :analytics_cycle_analytics_aggregations, :last_consistency_check_merge_requests_stage_event_hash_id
- remove_column :analytics_cycle_analytics_aggregations, :last_consistency_check_merge_requests_start_event_timestamp
- remove_column :analytics_cycle_analytics_aggregations, :last_consistency_check_merge_requests_end_event_timestamp
- remove_column :analytics_cycle_analytics_aggregations, :last_consistency_check_merge_requests_issuable_id
- end
-end
diff --git a/db/migrate/20220511144946_add_work_item_parent_child_table.rb b/db/migrate/20220511144946_add_work_item_parent_child_table.rb
deleted file mode 100644
index 160dac78160..00000000000
--- a/db/migrate/20220511144946_add_work_item_parent_child_table.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-class AddWorkItemParentChildTable < Gitlab::Database::Migration[2.0]
- def up
- create_table :work_item_parent_links do |t|
- t.references :work_item,
- index: false,
- unique: true,
- foreign_key: { to_table: :issues, on_delete: :cascade },
- null: false
- t.references :work_item_parent,
- index: true,
- foreign_key: { to_table: :issues, on_delete: :cascade },
- null: false
- t.integer :relative_position
- t.timestamps_with_timezone null: false
-
- t.index [:work_item_id, :work_item_parent_id],
- unique: true,
- name: :index_parent_links_on_work_item_id_and_work_item_parent_id
- end
- end
-
- def down
- drop_table :work_item_parent_links
- end
-end
diff --git a/db/migrate/20220511151646_add_exclude_from_free_user_cap_to_namespace_settings.rb b/db/migrate/20220511151646_add_exclude_from_free_user_cap_to_namespace_settings.rb
deleted file mode 100644
index 03f6ad5911c..00000000000
--- a/db/migrate/20220511151646_add_exclude_from_free_user_cap_to_namespace_settings.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddExcludeFromFreeUserCapToNamespaceSettings < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def up
- add_column :namespace_settings, :exclude_from_free_user_cap, :boolean, null: false, default: false
- end
-
- def down
- remove_column :namespace_settings, :exclude_from_free_user_cap
- end
-end
diff --git a/db/migrate/20220511191502_add_registry_migration_guard_thresholds_to_application_settings.rb b/db/migrate/20220511191502_add_registry_migration_guard_thresholds_to_application_settings.rb
deleted file mode 100644
index 87a29bd5889..00000000000
--- a/db/migrate/20220511191502_add_registry_migration_guard_thresholds_to_application_settings.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddRegistryMigrationGuardThresholdsToApplicationSettings < Gitlab::Database::Migration[2.0]
- def change
- add_column :application_settings, :container_registry_pre_import_timeout,
- :integer,
- default: 30.minutes,
- null: false
-
- add_column :application_settings, :container_registry_import_timeout,
- :integer,
- default: 10.minutes,
- null: false
- end
-end
diff --git a/db/migrate/20220511191503_add_pipeline_create_limit_per_project_user_sha_to_application_settings.rb b/db/migrate/20220511191503_add_pipeline_create_limit_per_project_user_sha_to_application_settings.rb
deleted file mode 100644
index 6454bac629a..00000000000
--- a/db/migrate/20220511191503_add_pipeline_create_limit_per_project_user_sha_to_application_settings.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddPipelineCreateLimitPerProjectUserShaToApplicationSettings < Gitlab::Database::Migration[2.0]
- def change
- add_column :application_settings, :pipeline_limit_per_project_user_sha, :integer, default: 0, null: false
- end
-end
diff --git a/db/migrate/20220512020500_index_batched_migrations_on_gitlab_schema_and_configuration.rb b/db/migrate/20220512020500_index_batched_migrations_on_gitlab_schema_and_configuration.rb
deleted file mode 100644
index 077a60856cd..00000000000
--- a/db/migrate/20220512020500_index_batched_migrations_on_gitlab_schema_and_configuration.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class IndexBatchedMigrationsOnGitlabSchemaAndConfiguration < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- TABLE_NAME = :batched_background_migrations
- INDEX_NAME = 'index_batched_migrations_on_gl_schema_and_unique_configuration'
-
- def up
- add_concurrent_index TABLE_NAME,
- %i[gitlab_schema job_class_name table_name column_name job_arguments],
- unique: true,
- name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
- end
-end
diff --git a/db/migrate/20220513093614_add_ding_talk_into_application_settings.rb b/db/migrate/20220513093614_add_ding_talk_into_application_settings.rb
deleted file mode 100644
index 4af8071f564..00000000000
--- a/db/migrate/20220513093614_add_ding_talk_into_application_settings.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: true
-
-class AddDingTalkIntoApplicationSettings < Gitlab::Database::Migration[2.0]
- def change
- add_column :application_settings, :dingtalk_integration_enabled, :boolean,
- null: false, default: false, comment: 'JiHu-specific column'
- add_column :application_settings, :encrypted_dingtalk_corpid, :binary, comment: 'JiHu-specific column'
- add_column :application_settings, :encrypted_dingtalk_corpid_iv, :binary, comment: 'JiHu-specific column'
- add_column :application_settings, :encrypted_dingtalk_app_key, :binary, comment: 'JiHu-specific column'
- add_column :application_settings, :encrypted_dingtalk_app_key_iv, :binary, comment: 'JiHu-specific column'
- add_column :application_settings, :encrypted_dingtalk_app_secret, :binary, comment: 'JiHu-specific column'
- add_column :application_settings, :encrypted_dingtalk_app_secret_iv, :binary, comment: 'JiHu-specific column'
- end
-end
diff --git a/db/migrate/20220513093615_add_ding_talk_tracker_data.rb b/db/migrate/20220513093615_add_ding_talk_tracker_data.rb
deleted file mode 100644
index 0289b983a48..00000000000
--- a/db/migrate/20220513093615_add_ding_talk_tracker_data.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddDingTalkTrackerData < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_on_dingtalk_tracker_data_corpid'
-
- def change
- create_table :dingtalk_tracker_data, comment: 'JiHu-specific table' do |t|
- t.references :integration, foreign_key: { on_delete: :cascade },
- type: :bigint, index: true, null: false, comment: 'JiHu-specific column'
- t.timestamps_with_timezone
- t.text :corpid, comment: 'JiHu-specific column', limit: 255
- t.index :corpid, where: "(corpid IS NOT NULL)", name: INDEX_NAME, comment: 'JiHu-specific index'
- end
- end
-end
diff --git a/db/migrate/20220513095545_create_timelog_categories.rb b/db/migrate/20220513095545_create_timelog_categories.rb
deleted file mode 100644
index aaf4a833ce0..00000000000
--- a/db/migrate/20220513095545_create_timelog_categories.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-class CreateTimelogCategories < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def up
- create_table :timelog_categories do |t|
- t.references :namespace,
- index: false,
- null: false,
- foreign_key: { on_delete: :cascade }
- t.timestamps_with_timezone null: false
- t.decimal :billing_rate, precision: 18, scale: 4, default: 0
- t.boolean :billable, default: false, null: false
- t.text :name, null: false, limit: 255
- t.text :description, limit: 1024
- t.text :color, limit: 7, default: '#6699cc', null: false
-
- t.index 'namespace_id, LOWER(name)',
- unique: true,
- name: :index_timelog_categories_on_unique_name_per_namespace
- end
- end
-
- def down
- drop_table :timelog_categories
- end
-end
diff --git a/db/migrate/20220513114706_add_jira_connect_application_id_application_setting.rb b/db/migrate/20220513114706_add_jira_connect_application_id_application_setting.rb
deleted file mode 100644
index 2557ec94167..00000000000
--- a/db/migrate/20220513114706_add_jira_connect_application_id_application_setting.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# frozen_string_literal: true
-
-class AddJiraConnectApplicationIdApplicationSetting < Gitlab::Database::Migration[2.0]
- # rubocop:disable Migration/AddLimitToTextColumns
- # limit is added in 20220513114850_add_text_limit_to_jira_connect_application_id_application_setting.rb
- def change
- add_column :application_settings, :jira_connect_application_key, :text
- end
- # rubocop:enable Migration/AddLimitToTextColumns
-end
diff --git a/db/migrate/20220513114850_add_text_limit_to_jira_connect_application_id_application_setting.rb b/db/migrate/20220513114850_add_text_limit_to_jira_connect_application_id_application_setting.rb
deleted file mode 100644
index a379a273bb6..00000000000
--- a/db/migrate/20220513114850_add_text_limit_to_jira_connect_application_id_application_setting.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddTextLimitToJiraConnectApplicationIdApplicationSetting < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :application_settings, :jira_connect_application_key, 255
- end
-
- def down
- remove_text_limit :application_settings, :jira_connect_application_key
- end
-end
diff --git a/db/migrate/20220516054002_temp_index_for_project_namespace_member_backfill.rb b/db/migrate/20220516054002_temp_index_for_project_namespace_member_backfill.rb
deleted file mode 100644
index fc2fef582f5..00000000000
--- a/db/migrate/20220516054002_temp_index_for_project_namespace_member_backfill.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class TempIndexForProjectNamespaceMemberBackfill < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'tmp_index_for_namespace_id_migration_on_project_members'
-
- disable_ddl_transaction!
-
- def up
- # Temporary index to be removed in future
- # https://gitlab.com/gitlab-org/gitlab/-/issues/356509
- add_concurrent_index :members, :id,
- where: "members.member_namespace_id IS NULL and members.type = 'ProjectMember'",
- name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :members, INDEX_NAME
- end
-end
diff --git a/db/migrate/20220516092207_add_globally_allowed_ips_to_application_setting.rb b/db/migrate/20220516092207_add_globally_allowed_ips_to_application_setting.rb
deleted file mode 100644
index 895400aedc4..00000000000
--- a/db/migrate/20220516092207_add_globally_allowed_ips_to_application_setting.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-# See https://docs.gitlab.com/ee/development/migration_style_guide.html
-class AddGloballyAllowedIpsToApplicationSetting < Gitlab::Database::Migration[2.0]
- # rubocop:disable Migration/AddLimitToTextColumns
- # limit is added in 20220516123101_add_text_limit_to_globally_allowed_ips_on_application_settings
- def change
- add_column :application_settings, :globally_allowed_ips, :text, null: false, default: ""
- end
- # rubocop:enable Migration/AddLimitToTextColumns
-end
diff --git a/db/migrate/20220516123101_add_text_limit_to_globally_allowed_ips_on_application_settings.rb b/db/migrate/20220516123101_add_text_limit_to_globally_allowed_ips_on_application_settings.rb
deleted file mode 100644
index 887a7da0a74..00000000000
--- a/db/migrate/20220516123101_add_text_limit_to_globally_allowed_ips_on_application_settings.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddTextLimitToGloballyAllowedIpsOnApplicationSettings < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :application_settings, :globally_allowed_ips, 255
- end
-
- def down
- remove_text_limit :application_settings, :globally_allowed_ips
- end
-end
diff --git a/db/migrate/20220516201245_add_security_policy_scan_execution_schedules_to_plan_limits.rb b/db/migrate/20220516201245_add_security_policy_scan_execution_schedules_to_plan_limits.rb
deleted file mode 100644
index 733ac971b98..00000000000
--- a/db/migrate/20220516201245_add_security_policy_scan_execution_schedules_to_plan_limits.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class AddSecurityPolicyScanExecutionSchedulesToPlanLimits < Gitlab::Database::Migration[2.0]
- def up
- add_column(:plan_limits, :security_policy_scan_execution_schedules, :integer, default: 0, null: false)
- end
-
- def down
- remove_column(:plan_limits, :security_policy_scan_execution_schedules)
- end
-end
diff --git a/db/migrate/20220517182529_create_vulnerability_state_transition.rb b/db/migrate/20220517182529_create_vulnerability_state_transition.rb
deleted file mode 100644
index 6ffa10ae597..00000000000
--- a/db/migrate/20220517182529_create_vulnerability_state_transition.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class CreateVulnerabilityStateTransition < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def up
- create_table :vulnerability_state_transitions do |t|
- t.references :vulnerability, index: true, null: false, foreign_key: { on_delete: :cascade }
- t.integer :to_state, limit: 2, null: false
- t.integer :from_state, limit: 2, null: false
- t.timestamps_with_timezone null: false
- end
- end
-
- def down
- drop_table :vulnerability_state_transitions
- end
-end
diff --git a/db/migrate/20220518183504_create_ssh_signatures.rb b/db/migrate/20220518183504_create_ssh_signatures.rb
deleted file mode 100644
index 6708d3f295c..00000000000
--- a/db/migrate/20220518183504_create_ssh_signatures.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class CreateSshSignatures < Gitlab::Database::Migration[2.0]
- def change
- create_table :ssh_signatures do |t|
- t.timestamps_with_timezone null: false
- t.bigint :project_id, null: false, index: true
- t.bigint :key_id, null: false, index: true
- t.integer :verification_status, default: 0, null: false, limit: 2
- t.binary :commit_sha, null: false, index: { unique: true }
- end
- end
-end
diff --git a/db/migrate/20220518183548_add_projects_relation_to_ssh_signatures.rb b/db/migrate/20220518183548_add_projects_relation_to_ssh_signatures.rb
deleted file mode 100644
index 459d1bc4bf9..00000000000
--- a/db/migrate/20220518183548_add_projects_relation_to_ssh_signatures.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddProjectsRelationToSshSignatures < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :ssh_signatures, :projects, column: :project_id, on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :ssh_signatures, column: :project_id
- end
- end
-end
diff --git a/db/migrate/20220519013213_create_cluster_enabled_grants.rb b/db/migrate/20220519013213_create_cluster_enabled_grants.rb
deleted file mode 100644
index 45c18ecca45..00000000000
--- a/db/migrate/20220519013213_create_cluster_enabled_grants.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-# frozen_string_literal: true
-
-class CreateClusterEnabledGrants < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- create_table :cluster_enabled_grants do |t|
- t.references :namespace, index: { unique: true }, null: false, foreign_key: { on_delete: :cascade }
- t.datetime_with_timezone :created_at, null: false
- end
- end
-end
diff --git a/db/migrate/20220519141345_add_job_artifact_id_on_refresh_start_to_build_artifacts_size_refresh.rb b/db/migrate/20220519141345_add_job_artifact_id_on_refresh_start_to_build_artifacts_size_refresh.rb
deleted file mode 100644
index ee19fd9da23..00000000000
--- a/db/migrate/20220519141345_add_job_artifact_id_on_refresh_start_to_build_artifacts_size_refresh.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddJobArtifactIdOnRefreshStartToBuildArtifactsSizeRefresh < Gitlab::Database::Migration[2.0]
- def change
- add_column :project_build_artifacts_size_refreshes, :last_job_artifact_id_on_refresh_start, :bigint, default: 0
- end
-end
diff --git a/db/migrate/20220520030504_drop_index_namespaces_on_name.rb b/db/migrate/20220520030504_drop_index_namespaces_on_name.rb
deleted file mode 100644
index 74019f726aa..00000000000
--- a/db/migrate/20220520030504_drop_index_namespaces_on_name.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class DropIndexNamespacesOnName < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_namespaces_on_name'
-
- def up
- remove_concurrent_index_by_name :namespaces, INDEX_NAME, if_exists: true
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/migrate/20220520122755_unlock_delayed_project_removal.rb b/db/migrate/20220520122755_unlock_delayed_project_removal.rb
deleted file mode 100644
index aaecf601e2b..00000000000
--- a/db/migrate/20220520122755_unlock_delayed_project_removal.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# frozen_string_literal: true
-
-class UnlockDelayedProjectRemoval < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- class ApplicationSetting < MigrationRecord
- self.table_name = 'application_settings'
- end
-
- # As part of https://gitlab.com/gitlab-org/gitlab/-/merge_requests/86568 the
- # lock_delayed_project_removal setting is updated for the first time. No up
- # migration is needed because the column existsted. However a down migration
- # is needed to disable the settting because users would have no way to edit it
- # and would have the cascading setting permanently locked on groups.
-
- def up
- # no-op
- end
-
- def down
- ApplicationSetting.reset_column_information
-
- ApplicationSetting.update_all(lock_delayed_project_removal: false)
- end
-end
diff --git a/db/migrate/20220520143105_add_keys_relation_to_ssh_signatures.rb b/db/migrate/20220520143105_add_keys_relation_to_ssh_signatures.rb
deleted file mode 100644
index 15fc3e19439..00000000000
--- a/db/migrate/20220520143105_add_keys_relation_to_ssh_signatures.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddKeysRelationToSshSignatures < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :ssh_signatures, :keys, column: :key_id, on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :ssh_signatures, column: :key_id
- end
- end
-end
diff --git a/db/migrate/20220520144821_add_registry_migration_pre_import_tags_rate_to_application_settings.rb b/db/migrate/20220520144821_add_registry_migration_pre_import_tags_rate_to_application_settings.rb
deleted file mode 100644
index f9451b38b82..00000000000
--- a/db/migrate/20220520144821_add_registry_migration_pre_import_tags_rate_to_application_settings.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-# frozen_string_literal: true
-
-class AddRegistryMigrationPreImportTagsRateToApplicationSettings < Gitlab::Database::Migration[2.0]
- def change
- add_column :application_settings, :container_registry_pre_import_tags_rate,
- :decimal,
- precision: 6,
- scale: 2,
- default: 0.5,
- null: false
- end
-end
diff --git a/db/migrate/20220523030804_add_web_hook_calls_med_and_max_to_plan_limits.rb b/db/migrate/20220523030804_add_web_hook_calls_med_and_max_to_plan_limits.rb
deleted file mode 100644
index c1ed306551f..00000000000
--- a/db/migrate/20220523030804_add_web_hook_calls_med_and_max_to_plan_limits.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-# frozen_string_literal: true
-
-class AddWebHookCallsMedAndMaxToPlanLimits < Gitlab::Database::Migration[2.0]
- def change
- add_column :plan_limits, :web_hook_calls_mid, :integer, null: false, default: 0
- add_column :plan_limits, :web_hook_calls_low, :integer, null: false, default: 0
- end
-end
diff --git a/db/migrate/20220523030805_add_web_hook_calls_to_plan_limits_paid_tiers.rb b/db/migrate/20220523030805_add_web_hook_calls_to_plan_limits_paid_tiers.rb
deleted file mode 100644
index 842bb297803..00000000000
--- a/db/migrate/20220523030805_add_web_hook_calls_to_plan_limits_paid_tiers.rb
+++ /dev/null
@@ -1,81 +0,0 @@
-# frozen_string_literal: true
-
-class AddWebHookCallsToPlanLimitsPaidTiers < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- MAX_RATE_LIMIT_NAME = 'web_hook_calls'
- MID_RATE_LIMIT_NAME = 'web_hook_calls_mid'
- MIN_RATE_LIMIT_NAME = 'web_hook_calls_low'
-
- UP_FREE_LIMITS = {
- MAX_RATE_LIMIT_NAME => 500,
- MID_RATE_LIMIT_NAME => 500,
- MIN_RATE_LIMIT_NAME => 500
- }.freeze
-
- UP_PREMIUM_LIMITS = {
- MAX_RATE_LIMIT_NAME => 4_000,
- MID_RATE_LIMIT_NAME => 2_800,
- MIN_RATE_LIMIT_NAME => 1_600
- }.freeze
-
- UP_ULTIMATE_LIMITS = {
- MAX_RATE_LIMIT_NAME => 13_000,
- MID_RATE_LIMIT_NAME => 9_000,
- MIN_RATE_LIMIT_NAME => 6_000
- }.freeze
-
- DOWN_FREE_LIMITS = {
- # 120 is the value for 'free' migrated in `db/migrate/20210601131742_update_web_hook_calls_limit.rb`
- MAX_RATE_LIMIT_NAME => 120,
- MID_RATE_LIMIT_NAME => 0,
- MIN_RATE_LIMIT_NAME => 0
- }.freeze
-
- DOWN_PAID_LIMITS = {
- MAX_RATE_LIMIT_NAME => 0,
- MID_RATE_LIMIT_NAME => 0,
- MIN_RATE_LIMIT_NAME => 0
- }.freeze
-
- def up
- return unless Gitlab.com?
-
- apply_limits('free', UP_FREE_LIMITS)
-
- # Apply Premium limits
- apply_limits('bronze', UP_PREMIUM_LIMITS)
- apply_limits('silver', UP_PREMIUM_LIMITS)
- apply_limits('premium', UP_PREMIUM_LIMITS)
- apply_limits('premium_trial', UP_PREMIUM_LIMITS)
-
- # Apply Ultimate limits
- apply_limits('gold', UP_ULTIMATE_LIMITS)
- apply_limits('ultimate', UP_ULTIMATE_LIMITS)
- apply_limits('ultimate_trial', UP_ULTIMATE_LIMITS)
- apply_limits('opensource', UP_ULTIMATE_LIMITS)
- end
-
- def down
- return unless Gitlab.com?
-
- apply_limits('free', DOWN_FREE_LIMITS)
-
- apply_limits('bronze', DOWN_PAID_LIMITS)
- apply_limits('silver', DOWN_PAID_LIMITS)
- apply_limits('premium', DOWN_PAID_LIMITS)
- apply_limits('premium_trial', DOWN_PAID_LIMITS)
- apply_limits('gold', DOWN_PAID_LIMITS)
- apply_limits('ultimate', DOWN_PAID_LIMITS)
- apply_limits('ultimate_trial', DOWN_PAID_LIMITS)
- apply_limits('opensource', DOWN_PAID_LIMITS)
- end
-
- private
-
- def apply_limits(plan_name, limits)
- limits.each_pair do |limit_name, limit|
- create_or_update_plan_limit(limit_name, plan_name, limit)
- end
- end
-end
diff --git a/db/migrate/20220523162734_add_vulnerability_reads_casted_cluster_agent_column.rb b/db/migrate/20220523162734_add_vulnerability_reads_casted_cluster_agent_column.rb
deleted file mode 100644
index ce222906e25..00000000000
--- a/db/migrate/20220523162734_add_vulnerability_reads_casted_cluster_agent_column.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddVulnerabilityReadsCastedClusterAgentColumn < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- add_column :vulnerability_reads, :casted_cluster_agent_id, :bigint
- end
-end
diff --git a/db/migrate/20220523163734_update_vulnerability_reads_trigger_functions.rb b/db/migrate/20220523163734_update_vulnerability_reads_trigger_functions.rb
deleted file mode 100644
index 645d19c8f51..00000000000
--- a/db/migrate/20220523163734_update_vulnerability_reads_trigger_functions.rb
+++ /dev/null
@@ -1,81 +0,0 @@
-# frozen_string_literal: true
-
-class UpdateVulnerabilityReadsTriggerFunctions < Gitlab::Database::Migration[2.0]
- AGENT_ID_VALUE = "NEW.location->'kubernetes_resource'->>'agent_id'"
- CASTED_AGENT_ID_VALUE = "CAST(#{AGENT_ID_VALUE} AS bigint)"
-
- def up
- update_insert_or_update_vulnerability_reads_function(with_casted_cluster_agent_id: true)
- update_update_location_from_vulnerability_occurrences_function(with_casted_cluster_agent_id: true)
- end
-
- def down
- update_insert_or_update_vulnerability_reads_function(with_casted_cluster_agent_id: false)
- update_update_location_from_vulnerability_occurrences_function(with_casted_cluster_agent_id: false)
- end
-
- private
-
- def update_insert_or_update_vulnerability_reads_function(with_casted_cluster_agent_id: false)
- insert_fields = with_casted_cluster_agent_id ? 'cluster_agent_id, casted_cluster_agent_id' : 'cluster_agent_id'
- insert_values = with_casted_cluster_agent_id ? [AGENT_ID_VALUE, CASTED_AGENT_ID_VALUE].join(', ') : AGENT_ID_VALUE
-
- execute(<<~SQL)
- CREATE OR REPLACE FUNCTION insert_or_update_vulnerability_reads()
- RETURNS TRIGGER
- LANGUAGE plpgsql
- AS $$
- DECLARE
- severity smallint;
- state smallint;
- report_type smallint;
- resolved_on_default_branch boolean;
- BEGIN
- IF (NEW.vulnerability_id IS NULL AND (TG_OP = 'INSERT' OR TG_OP = 'UPDATE')) THEN
- RETURN NULL;
- END IF;
-
- IF (TG_OP = 'UPDATE' AND OLD.vulnerability_id IS NOT NULL AND NEW.vulnerability_id IS NOT NULL) THEN
- RETURN NULL;
- END IF;
-
- SELECT
- vulnerabilities.severity, vulnerabilities.state, vulnerabilities.report_type, vulnerabilities.resolved_on_default_branch
- INTO
- severity, state, report_type, resolved_on_default_branch
- FROM
- vulnerabilities
- WHERE
- vulnerabilities.id = NEW.vulnerability_id;
-
- INSERT INTO vulnerability_reads (vulnerability_id, project_id, scanner_id, report_type, severity, state, resolved_on_default_branch, uuid, location_image, #{insert_fields})
- VALUES (NEW.vulnerability_id, NEW.project_id, NEW.scanner_id, report_type, severity, state, resolved_on_default_branch, NEW.uuid::uuid, NEW.location->>'image', #{insert_values})
- ON CONFLICT(vulnerability_id) DO NOTHING;
- RETURN NULL;
- END
- $$;
- SQL
- end
-
- def update_update_location_from_vulnerability_occurrences_function(with_casted_cluster_agent_id: false)
- execute(<<~SQL)
- CREATE OR REPLACE FUNCTION update_location_from_vulnerability_occurrences()
- RETURNS trigger
- LANGUAGE plpgsql
- AS $$
- BEGIN
- UPDATE
- vulnerability_reads
- SET
- location_image = NEW.location->>'image',
- #{with_casted_cluster_agent_id ? "casted_cluster_agent_id = #{CASTED_AGENT_ID_VALUE}," : ''}
- cluster_agent_id = #{AGENT_ID_VALUE}
- WHERE
- vulnerability_id = NEW.vulnerability_id;
- RETURN NULL;
-
- END
- $$;
- SQL
- end
-end
diff --git a/db/migrate/20220524021855_add_deleted_at_to_terraform_states.rb b/db/migrate/20220524021855_add_deleted_at_to_terraform_states.rb
deleted file mode 100644
index 01bbeb17db7..00000000000
--- a/db/migrate/20220524021855_add_deleted_at_to_terraform_states.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddDeletedAtToTerraformStates < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- add_column :terraform_states, :deleted_at, :datetime_with_timezone
- end
-end
diff --git a/db/migrate/20220524141800_create_audit_events_streaming_headers.rb b/db/migrate/20220524141800_create_audit_events_streaming_headers.rb
deleted file mode 100644
index 2bd0362874c..00000000000
--- a/db/migrate/20220524141800_create_audit_events_streaming_headers.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class CreateAuditEventsStreamingHeaders < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'idx_streaming_headers_on_external_audit_event_destination_id'
- UNIQ_INDEX_NAME = 'idx_external_audit_event_destination_id_key_uniq'
-
- def change
- create_table :audit_events_streaming_headers do |t|
- t.timestamps_with_timezone null: false
- t.references :external_audit_event_destination,
- null: false,
- index: { name: INDEX_NAME },
- foreign_key: { to_table: 'audit_events_external_audit_event_destinations', on_delete: :cascade }
- t.text :key, null: false, limit: 255
- t.text :value, null: false, limit: 255
-
- t.index [:key, :external_audit_event_destination_id], unique: true, name: UNIQ_INDEX_NAME
- end
- end
-end
diff --git a/db/migrate/20220524164122_limit_project_and_group_variables.rb b/db/migrate/20220524164122_limit_project_and_group_variables.rb
deleted file mode 100644
index e8776e35730..00000000000
--- a/db/migrate/20220524164122_limit_project_and_group_variables.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-# frozen_string_literal: true
-
-class LimitProjectAndGroupVariables < Gitlab::Database::Migration[2.0]
- def change
- add_column(:plan_limits, :project_ci_variables, :integer, default: 200, null: false)
- add_column(:plan_limits, :group_ci_variables, :integer, default: 200, null: false)
- end
-end
diff --git a/db/migrate/20220524184149_create_sync_project_namespace_details_trigger.rb b/db/migrate/20220524184149_create_sync_project_namespace_details_trigger.rb
deleted file mode 100644
index efce35b443a..00000000000
--- a/db/migrate/20220524184149_create_sync_project_namespace_details_trigger.rb
+++ /dev/null
@@ -1,68 +0,0 @@
-# frozen_string_literal: true
-class CreateSyncProjectNamespaceDetailsTrigger < Gitlab::Database::Migration[2.0]
- include Gitlab::Database::SchemaHelpers
-
- UPDATE_TRIGGER_NAME = 'trigger_update_details_on_project_update'
- INSERT_TRIGGER_NAME = 'trigger_update_details_on_project_insert'
- FUNCTION_NAME = 'update_namespace_details_from_projects'
-
- enable_lock_retries!
-
- def up
- create_trigger_function(FUNCTION_NAME, replace: true) do
- <<~SQL
- INSERT INTO
- namespace_details (
- description,
- description_html,
- cached_markdown_version,
- updated_at,
- created_at,
- namespace_id
- )
- VALUES
- (
- NEW.description,
- NEW.description_html,
- NEW.cached_markdown_version,
- NEW.updated_at,
- NEW.updated_at,
- NEW.project_namespace_id
- ) ON CONFLICT (namespace_id) DO
- UPDATE
- SET
- description = NEW.description,
- description_html = NEW.description_html,
- cached_markdown_version = NEW.cached_markdown_version,
- updated_at = NEW.updated_at
- WHERE
- namespace_details.namespace_id = NEW.project_namespace_id;RETURN NULL;
- SQL
- end
-
- execute(<<~SQL)
- CREATE TRIGGER #{UPDATE_TRIGGER_NAME}
- AFTER UPDATE ON projects
- FOR EACH ROW
- WHEN (
- OLD.description IS DISTINCT FROM NEW.description OR
- OLD.description_html IS DISTINCT FROM NEW.description_html OR
- OLD.cached_markdown_version IS DISTINCT FROM NEW.cached_markdown_version
- )
- EXECUTE PROCEDURE #{FUNCTION_NAME}();
- SQL
-
- execute(<<~SQL)
- CREATE TRIGGER #{INSERT_TRIGGER_NAME}
- AFTER INSERT ON projects
- FOR EACH ROW
- EXECUTE PROCEDURE #{FUNCTION_NAME}();
- SQL
- end
-
- def down
- drop_trigger(:projects, UPDATE_TRIGGER_NAME)
- drop_trigger(:projects, INSERT_TRIGGER_NAME)
- drop_function(FUNCTION_NAME)
- end
-end
diff --git a/db/migrate/20220524191259_add_application_settings_container_registry_pre_import_tags_rate_constraint.rb b/db/migrate/20220524191259_add_application_settings_container_registry_pre_import_tags_rate_constraint.rb
deleted file mode 100644
index 020db30d529..00000000000
--- a/db/migrate/20220524191259_add_application_settings_container_registry_pre_import_tags_rate_constraint.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddApplicationSettingsContainerRegistryPreImportTagsRateConstraint < Gitlab::Database::Migration[2.0]
- CONSTRAINT_NAME = 'app_settings_container_registry_pre_import_tags_rate_positive'
-
- disable_ddl_transaction!
-
- def up
- add_check_constraint :application_settings, 'container_registry_pre_import_tags_rate >= 0', CONSTRAINT_NAME
- end
-
- def down
- remove_check_constraint :application_settings, CONSTRAINT_NAME
- end
-end
diff --git a/db/migrate/20220525082303_create_issuable_resource_links.rb b/db/migrate/20220525082303_create_issuable_resource_links.rb
deleted file mode 100644
index d6cf3057821..00000000000
--- a/db/migrate/20220525082303_create_issuable_resource_links.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: true
-
-class CreateIssuableResourceLinks < Gitlab::Database::Migration[2.0]
- def change
- create_table :issuable_resource_links do |t|
- t.references :issue, null: false, foreign_key: { on_delete: :cascade }, index: true
- t.text :link_text, null: true, limit: 255
- t.text :link, null: false, limit: 2200
- t.integer :link_type, null: false, limit: 2, default: 0 # general resource link
-
- t.timestamps_with_timezone null: false
- end
- end
-end
diff --git a/db/migrate/20220525123825_add_raw_to_ci_pipeline_variables.rb b/db/migrate/20220525123825_add_raw_to_ci_pipeline_variables.rb
deleted file mode 100644
index 258b4631643..00000000000
--- a/db/migrate/20220525123825_add_raw_to_ci_pipeline_variables.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddRawToCiPipelineVariables < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- add_column :ci_pipeline_variables, :raw, :boolean, null: false, default: true
- end
-end
diff --git a/db/migrate/20220525123851_add_raw_to_ci_group_variables.rb b/db/migrate/20220525123851_add_raw_to_ci_group_variables.rb
deleted file mode 100644
index 9eae210d8c3..00000000000
--- a/db/migrate/20220525123851_add_raw_to_ci_group_variables.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddRawToCiGroupVariables < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- add_column :ci_group_variables, :raw, :boolean, null: false, default: true
- end
-end
diff --git a/db/migrate/20220525123914_add_raw_to_ci_instance_variables.rb b/db/migrate/20220525123914_add_raw_to_ci_instance_variables.rb
deleted file mode 100644
index 71674b48e39..00000000000
--- a/db/migrate/20220525123914_add_raw_to_ci_instance_variables.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddRawToCiInstanceVariables < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- add_column :ci_instance_variables, :raw, :boolean, null: false, default: true
- end
-end
diff --git a/db/migrate/20220525123940_add_raw_to_ci_job_variables.rb b/db/migrate/20220525123940_add_raw_to_ci_job_variables.rb
deleted file mode 100644
index abd1f1eb211..00000000000
--- a/db/migrate/20220525123940_add_raw_to_ci_job_variables.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddRawToCiJobVariables < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- add_column :ci_job_variables, :raw, :boolean, null: false, default: true
- end
-end
diff --git a/db/migrate/20220525124104_add_raw_to_ci_pipeline_schedule_variables.rb b/db/migrate/20220525124104_add_raw_to_ci_pipeline_schedule_variables.rb
deleted file mode 100644
index c7a3b832552..00000000000
--- a/db/migrate/20220525124104_add_raw_to_ci_pipeline_schedule_variables.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddRawToCiPipelineScheduleVariables < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- add_column :ci_pipeline_schedule_variables, :raw, :boolean, null: false, default: true
- end
-end
diff --git a/db/migrate/20220525124125_add_raw_to_ci_variables.rb b/db/migrate/20220525124125_add_raw_to_ci_variables.rb
deleted file mode 100644
index 168cd107d1c..00000000000
--- a/db/migrate/20220525124125_add_raw_to_ci_variables.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddRawToCiVariables < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- add_column :ci_variables, :raw, :boolean, null: false, default: true
- end
-end
diff --git a/db/migrate/20220530103023_add_created_at_and_id_index_to_deployment_approvals.rb b/db/migrate/20220530103023_add_created_at_and_id_index_to_deployment_approvals.rb
deleted file mode 100644
index 88117b310c9..00000000000
--- a/db/migrate/20220530103023_add_created_at_and_id_index_to_deployment_approvals.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddCreatedAtAndIdIndexToDeploymentApprovals < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_deployment_approvals_on_created_at_and_id'
-
- def up
- add_concurrent_index :deployment_approvals, %i[created_at id], name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index :deployment_approvals, %i[created_at id], name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20220530104431_add_timestamps_to_compliance_frameworks.rb b/db/migrate/20220530104431_add_timestamps_to_compliance_frameworks.rb
deleted file mode 100644
index 88013fddc81..00000000000
--- a/db/migrate/20220530104431_add_timestamps_to_compliance_frameworks.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddTimestampsToComplianceFrameworks < Gitlab::Database::Migration[2.0]
- def up
- add_column :compliance_management_frameworks, :created_at, :datetime_with_timezone, null: true
- add_column :compliance_management_frameworks, :updated_at, :datetime_with_timezone, null: true
- end
-
- def down
- remove_column :compliance_management_frameworks, :created_at
- remove_column :compliance_management_frameworks, :updated_at
- end
-end
diff --git a/db/migrate/20220531024905_add_operations_access_levels_to_project_feature.rb b/db/migrate/20220531024905_add_operations_access_levels_to_project_feature.rb
deleted file mode 100644
index 68921cd1468..00000000000
--- a/db/migrate/20220531024905_add_operations_access_levels_to_project_feature.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# frozen_string_literal: true
-
-class AddOperationsAccessLevelsToProjectFeature < Gitlab::Database::Migration[2.0]
- OPERATIONS_DEFAULT_VALUE = 20
-
- enable_lock_retries!
-
- # rubocop:disable Layout/LineLength
- def up
- add_column :project_features, :monitor_access_level, :integer, null: false, default: OPERATIONS_DEFAULT_VALUE
- add_column :project_features, :infrastructure_access_level, :integer, null: false, default: OPERATIONS_DEFAULT_VALUE
- add_column :project_features, :feature_flags_access_level, :integer, null: false, default: OPERATIONS_DEFAULT_VALUE
- add_column :project_features, :environments_access_level, :integer, null: false, default: OPERATIONS_DEFAULT_VALUE
- add_column :project_features, :releases_access_level, :integer, null: false, default: OPERATIONS_DEFAULT_VALUE
- end
-
- def down
- remove_column :project_features, :monitor_access_level
- remove_column :project_features, :infrastructure_access_level
- remove_column :project_features, :feature_flags_access_level
- remove_column :project_features, :environments_access_level
- remove_column :project_features, :releases_access_level
- end
-end
diff --git a/db/migrate/20220531100920_add_license_usage_data_exported_to_application_settings.rb b/db/migrate/20220531100920_add_license_usage_data_exported_to_application_settings.rb
deleted file mode 100644
index 825697d5387..00000000000
--- a/db/migrate/20220531100920_add_license_usage_data_exported_to_application_settings.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddLicenseUsageDataExportedToApplicationSettings < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- add_column :application_settings, :license_usage_data_exported, :boolean, default: false, null: false
- end
-end
diff --git a/db/migrate/20220531140515_add_applies_to_all_protected_branches_to_approval_project_rule.rb b/db/migrate/20220531140515_add_applies_to_all_protected_branches_to_approval_project_rule.rb
deleted file mode 100644
index 4015d3fa1f7..00000000000
--- a/db/migrate/20220531140515_add_applies_to_all_protected_branches_to_approval_project_rule.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddAppliesToAllProtectedBranchesToApprovalProjectRule < Gitlab::Database::Migration[2.0]
- def change
- add_column :approval_project_rules, :applies_to_all_protected_branches, :boolean, default: false, null: false
- end
-end
diff --git a/db/migrate/20220601091804_add_semver_column_to_ci_runners.rb b/db/migrate/20220601091804_add_semver_column_to_ci_runners.rb
deleted file mode 100644
index 4d4739a03e0..00000000000
--- a/db/migrate/20220601091804_add_semver_column_to_ci_runners.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: true
-
-class AddSemverColumnToCiRunners < Gitlab::Database::Migration[2.0]
- # rubocop:disable Migration/AddLimitToTextColumns
- # limit is added in 20220601091805_add_text_limit_to_ci_runners_semver
- def up
- add_column :ci_runners, :semver, :text, null: true
- end
- # rubocop:enable Migration/AddLimitToTextColumns
-
- def down
- remove_column :ci_runners, :semver
- end
-end
diff --git a/db/migrate/20220601091805_add_text_limit_to_ci_runners_semver.rb b/db/migrate/20220601091805_add_text_limit_to_ci_runners_semver.rb
deleted file mode 100644
index dac067add90..00000000000
--- a/db/migrate/20220601091805_add_text_limit_to_ci_runners_semver.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddTextLimitToCiRunnersSemver < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :ci_runners, :semver, 16
- end
-
- def down
- remove_text_limit :ci_runners, :semver
- end
-end
diff --git a/db/migrate/20220601101800_add_index_on_runner_id_and_semver_columns.rb b/db/migrate/20220601101800_add_index_on_runner_id_and_semver_columns.rb
deleted file mode 100644
index 1b5aa6237f6..00000000000
--- a/db/migrate/20220601101800_add_index_on_runner_id_and_semver_columns.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexOnRunnerIdAndSemverColumns < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_ci_runners_on_id_and_semver_cidr'
-
- def up
- add_concurrent_index :ci_runners,
- 'id, (semver::cidr)',
- name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :ci_runners, INDEX_NAME
- end
-end
diff --git a/db/migrate/20220601223501_add_vulnerability_related_columns.rb b/db/migrate/20220601223501_add_vulnerability_related_columns.rb
deleted file mode 100644
index be310b02467..00000000000
--- a/db/migrate/20220601223501_add_vulnerability_related_columns.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-# frozen_string_literal: true
-
-class AddVulnerabilityRelatedColumns < Gitlab::Database::Migration[2.0]
- def change
- add_column :approval_merge_request_rules,
- :vulnerabilities_allowed,
- :integer,
- limit: 2,
- null: false,
- default: 0
- add_column :approval_merge_request_rules,
- :scanners,
- :text,
- array: true,
- null: false,
- default: []
- add_column :approval_merge_request_rules,
- :severity_levels,
- :text,
- array: true,
- null: false,
- default: []
- add_column :approval_merge_request_rules,
- :vulnerability_states,
- :text,
- array: true,
- null: false,
- default: ['newly_detected']
- end
-end
diff --git a/db/migrate/20220602130306_add_namespace_type_index.rb b/db/migrate/20220602130306_add_namespace_type_index.rb
deleted file mode 100644
index 14e017c1dc8..00000000000
--- a/db/migrate/20220602130306_add_namespace_type_index.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddNamespaceTypeIndex < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_groups_on_parent_id_id'
-
- # rubocop:disable Migration/PreventIndexCreation
- def up
- add_concurrent_index :namespaces, [:parent_id, :id], where: "type = 'Group'", name: INDEX_NAME
- end
- # rubocop:enable Migration/PreventIndexCreation
-
- def down
- remove_concurrent_index_by_name(:namespaces, INDEX_NAME)
- end
-end
diff --git a/db/migrate/20220603095158_drop_ci_build_report_results_build_id_sequence.rb b/db/migrate/20220603095158_drop_ci_build_report_results_build_id_sequence.rb
deleted file mode 100644
index 370eddf4390..00000000000
--- a/db/migrate/20220603095158_drop_ci_build_report_results_build_id_sequence.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class DropCiBuildReportResultsBuildIdSequence < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def up
- drop_sequence(:ci_build_report_results, :build_id, :ci_build_report_results_build_id_seq)
- end
-
- def down
- add_sequence(:ci_build_report_results, :build_id, :ci_build_report_results_build_id_seq, 1)
- end
-end
diff --git a/db/migrate/20220605170009_add_url_vars_to_web_hook.rb b/db/migrate/20220605170009_add_url_vars_to_web_hook.rb
deleted file mode 100644
index 207b0fc10c2..00000000000
--- a/db/migrate/20220605170009_add_url_vars_to_web_hook.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-# frozen_string_literal: true
-
-class AddUrlVarsToWebHook < Gitlab::Database::Migration[2.0]
- def change
- add_column :web_hooks, :encrypted_url_variables, :binary
- add_column :web_hooks, :encrypted_url_variables_iv, :binary
- end
-end
diff --git a/db/migrate/20220607011733_add_phone_verification_code_enabled_to_application_settings.rb b/db/migrate/20220607011733_add_phone_verification_code_enabled_to_application_settings.rb
deleted file mode 100644
index 321e55a2abf..00000000000
--- a/db/migrate/20220607011733_add_phone_verification_code_enabled_to_application_settings.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class AddPhoneVerificationCodeEnabledToApplicationSettings < Gitlab::Database::Migration[2.0]
- def up
- add_column :application_settings,
- :phone_verification_code_enabled,
- :boolean,
- null: false,
- default: false,
- comment: 'JiHu-specific column'
- end
-
- def down
- remove_column :application_settings, :phone_verification_code_enabled
- end
-end
diff --git a/db/migrate/20220607095219_drop_ci_pipelines_config_pipeline_id_sequence.rb b/db/migrate/20220607095219_drop_ci_pipelines_config_pipeline_id_sequence.rb
deleted file mode 100644
index fb7e14330cd..00000000000
--- a/db/migrate/20220607095219_drop_ci_pipelines_config_pipeline_id_sequence.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class DropCiPipelinesConfigPipelineIdSequence < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def up
- drop_sequence(:ci_pipelines_config, :pipeline_id, :ci_pipelines_config_pipeline_id_seq)
- end
-
- def down
- add_sequence(:ci_pipelines_config, :pipeline_id, :ci_pipelines_config_pipeline_id_seq, 1)
- end
-end
diff --git a/db/migrate/20220607115703_drop_ci_job_artifact_states_job_artifact_id_sequence.rb b/db/migrate/20220607115703_drop_ci_job_artifact_states_job_artifact_id_sequence.rb
deleted file mode 100644
index d3d56f72cee..00000000000
--- a/db/migrate/20220607115703_drop_ci_job_artifact_states_job_artifact_id_sequence.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class DropCiJobArtifactStatesJobArtifactIdSequence < Gitlab::Database::Migration[2.0]
- def up
- drop_sequence(:ci_job_artifact_states, :job_artifact_id, :ci_job_artifact_states_job_artifact_id_seq)
- end
-
- def down
- add_sequence(:ci_job_artifact_states, :job_artifact_id, :ci_job_artifact_states_job_artifact_id_seq, 1)
- end
-end
diff --git a/db/migrate/20220608074738_add_max_repository_downloads_limit_to_application_settings.rb b/db/migrate/20220608074738_add_max_repository_downloads_limit_to_application_settings.rb
deleted file mode 100644
index 9252262c26f..00000000000
--- a/db/migrate/20220608074738_add_max_repository_downloads_limit_to_application_settings.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddMaxRepositoryDownloadsLimitToApplicationSettings < Gitlab::Database::Migration[2.0]
- def change
- add_column :application_settings, :max_number_of_repository_downloads,
- :smallint,
- default: 0,
- null: false
-
- add_column :application_settings, :max_number_of_repository_downloads_within_time_period,
- :integer,
- default: 0,
- null: false
- end
-end
diff --git a/db/migrate/20220608114734_prepare_confidential_note_index_on_id.rb b/db/migrate/20220608114734_prepare_confidential_note_index_on_id.rb
deleted file mode 100644
index 7c23029283c..00000000000
--- a/db/migrate/20220608114734_prepare_confidential_note_index_on_id.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class PrepareConfidentialNoteIndexOnId < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_notes_on_id_where_confidential'
-
- def up
- prepare_async_index :notes, :id, where: 'confidential = true', name: INDEX_NAME
- end
-
- def down
- unprepare_async_index :notes, :id, name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20220609150626_add_partial_index_on_slack_integrations_with_bot_user_id.rb b/db/migrate/20220609150626_add_partial_index_on_slack_integrations_with_bot_user_id.rb
deleted file mode 100644
index 498c1da9e19..00000000000
--- a/db/migrate/20220609150626_add_partial_index_on_slack_integrations_with_bot_user_id.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddPartialIndexOnSlackIntegrationsWithBotUserId < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'partial_index_slack_integrations_with_bot_user_id'
-
- def up
- add_concurrent_index :slack_integrations, :id, name: INDEX_NAME, where: 'bot_user_id IS NOT NULL'
- end
-
- def down
- remove_concurrent_index :slack_integrations, :id, name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20220610074326_add_epic_issue_weight.rb b/db/migrate/20220610074326_add_epic_issue_weight.rb
deleted file mode 100644
index b1c1f1c56c7..00000000000
--- a/db/migrate/20220610074326_add_epic_issue_weight.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# frozen_string_literal: true
-
-class AddEpicIssueWeight < Gitlab::Database::Migration[2.0]
- def change
- add_column :epics, :total_opened_issue_weight, :integer, default: 0, null: false
- add_column :epics, :total_closed_issue_weight, :integer, default: 0, null: false
- add_column :epics, :total_opened_issue_count, :integer, default: 0, null: false
- add_column :epics, :total_closed_issue_count, :integer, default: 0, null: false
- end
-end
diff --git a/db/migrate/20220610125248_add_enabled_git_access_protocol_to_namespace_settings.rb b/db/migrate/20220610125248_add_enabled_git_access_protocol_to_namespace_settings.rb
deleted file mode 100644
index 2f16467acd1..00000000000
--- a/db/migrate/20220610125248_add_enabled_git_access_protocol_to_namespace_settings.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddEnabledGitAccessProtocolToNamespaceSettings < Gitlab::Database::Migration[2.0]
- def change
- add_column :namespace_settings, :enabled_git_access_protocol, :integer, default: 0, null: false, limit: 2
- end
-end
diff --git a/db/migrate/20220610140605_change_public_projects_cost_factor.rb b/db/migrate/20220610140605_change_public_projects_cost_factor.rb
deleted file mode 100644
index cf0c275828c..00000000000
--- a/db/migrate/20220610140605_change_public_projects_cost_factor.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-# frozen_string_literal: true
-
-class ChangePublicProjectsCostFactor < Gitlab::Database::Migration[2.0]
- # This migration updates SaaS Runner cost factors for public projects.
- # Previously we had a disabled cost factor for public projects, meaning
- # that no CI minutes were counted by default. With a low cost factor
- # we count CI minutes consumption at a very low rate to prevent
- # abuses.
- disable_ddl_transaction!
-
- restrict_gitlab_migration gitlab_schema: :gitlab_ci
-
- DISABLED_COST_FACTOR = 0
- LOW_COST_FACTOR = 0.008
-
- class Runner < MigrationRecord
- self.table_name = 'ci_runners'
-
- scope :shared, -> { where(runner_type: 1) }
- end
-
- def up
- return unless Gitlab.com?
-
- Runner.shared.where(public_projects_minutes_cost_factor: DISABLED_COST_FACTOR)
- .update_all(public_projects_minutes_cost_factor: LOW_COST_FACTOR)
- end
-
- def down
- return unless Gitlab.com?
-
- Runner.shared.where(public_projects_minutes_cost_factor: LOW_COST_FACTOR)
- .update_all(public_projects_minutes_cost_factor: DISABLED_COST_FACTOR)
- end
-end
diff --git a/db/migrate/20220613054349_add_unique_project_download_limit_settings_to_namespace_settings.rb b/db/migrate/20220613054349_add_unique_project_download_limit_settings_to_namespace_settings.rb
deleted file mode 100644
index 7e821cb17a2..00000000000
--- a/db/migrate/20220613054349_add_unique_project_download_limit_settings_to_namespace_settings.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-# frozen_string_literal: true
-
-class AddUniqueProjectDownloadLimitSettingsToNamespaceSettings < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- add_column :namespace_settings, :unique_project_download_limit, :smallint,
- default: 0, null: false
- add_column :namespace_settings, :unique_project_download_limit_interval_in_seconds, :integer,
- default: 0, null: false
- end
-end
diff --git a/db/migrate/20220614095912_add_has_vulnerabilities_to_cluster_agents.rb b/db/migrate/20220614095912_add_has_vulnerabilities_to_cluster_agents.rb
deleted file mode 100644
index e4e4e3ab7ae..00000000000
--- a/db/migrate/20220614095912_add_has_vulnerabilities_to_cluster_agents.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddHasVulnerabilitiesToClusterAgents < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- add_column :cluster_agents, :has_vulnerabilities, :boolean, default: false, null: false
- end
-end
diff --git a/db/migrate/20220614120415_add_toggle_opt_in_jwt.rb b/db/migrate/20220614120415_add_toggle_opt_in_jwt.rb
deleted file mode 100644
index 40e07504ac6..00000000000
--- a/db/migrate/20220614120415_add_toggle_opt_in_jwt.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddToggleOptInJwt < Gitlab::Database::Migration[2.0]
- def change
- add_column :project_ci_cd_settings, :opt_in_jwt, :boolean, default: false, null: false
- end
-end
diff --git a/db/migrate/20220615091059_add_created_at_index_to_compliance_management_frameworks.rb b/db/migrate/20220615091059_add_created_at_index_to_compliance_management_frameworks.rb
deleted file mode 100644
index a930dde9a83..00000000000
--- a/db/migrate/20220615091059_add_created_at_index_to_compliance_management_frameworks.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddCreatedAtIndexToComplianceManagementFrameworks < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = "i_compliance_frameworks_on_id_and_created_at"
-
- def up
- add_concurrent_index :compliance_management_frameworks,
- [:id, :created_at, :pipeline_configuration_full_path],
- name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :compliance_management_frameworks, INDEX_NAME
- end
-end
diff --git a/db/migrate/20220615105811_add_index_on_clusters_agent_project_id_and_has_vulnerabilities_columns.rb b/db/migrate/20220615105811_add_index_on_clusters_agent_project_id_and_has_vulnerabilities_columns.rb
deleted file mode 100644
index 007f36c26ed..00000000000
--- a/db/migrate/20220615105811_add_index_on_clusters_agent_project_id_and_has_vulnerabilities_columns.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexOnClustersAgentProjectIdAndHasVulnerabilitiesColumns < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_cluster_agents_on_project_id_and_has_vulnerabilities'
-
- def up
- add_concurrent_index :cluster_agents,
- [:project_id, :has_vulnerabilities],
- name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :cluster_agents, INDEX_NAME
- end
-end
diff --git a/db/migrate/20220616182001_create_sbom_components.rb b/db/migrate/20220616182001_create_sbom_components.rb
deleted file mode 100644
index 59e8e76393a..00000000000
--- a/db/migrate/20220616182001_create_sbom_components.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class CreateSbomComponents < Gitlab::Database::Migration[2.0]
- def change
- create_table :sbom_components do |t|
- t.timestamps_with_timezone
- t.integer :component_type, null: false, limit: 2
- t.text :name, null: false, limit: 255
- end
- end
-end
diff --git a/db/migrate/20220616182015_create_sbom_component_versions.rb b/db/migrate/20220616182015_create_sbom_component_versions.rb
deleted file mode 100644
index aea99c8c0ce..00000000000
--- a/db/migrate/20220616182015_create_sbom_component_versions.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class CreateSbomComponentVersions < Gitlab::Database::Migration[2.0]
- def change
- create_table :sbom_component_versions do |t|
- t.timestamps_with_timezone
- t.references :component,
- index: true,
- null: false,
- foreign_key: { to_table: :sbom_components, on_delete: :cascade }
-
- t.text :version, null: false, limit: 255
- end
- end
-end
diff --git a/db/migrate/20220616182016_create_sbom_sources.rb b/db/migrate/20220616182016_create_sbom_sources.rb
deleted file mode 100644
index b4fe9519f7b..00000000000
--- a/db/migrate/20220616182016_create_sbom_sources.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-# frozen_string_literal: true
-
-class CreateSbomSources < Gitlab::Database::Migration[2.0]
- def change
- create_table :sbom_sources do |t|
- t.timestamps_with_timezone
- t.integer :source_type, null: false, limit: 2
- t.jsonb :source, null: false, default: {}
- t.binary :fingerprint, null: false
- end
- end
-end
diff --git a/db/migrate/20220616182038_create_sbom_occurrences.rb b/db/migrate/20220616182038_create_sbom_occurrences.rb
deleted file mode 100644
index 8fc80970d45..00000000000
--- a/db/migrate/20220616182038_create_sbom_occurrences.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: true
-
-class CreateSbomOccurrences < Gitlab::Database::Migration[2.0]
- def change
- create_table :sbom_occurrences do |t|
- t.timestamps_with_timezone
- t.bigint :component_version_id, null: false, index: true
- t.bigint :project_id, null: false, index: true
- t.bigint :pipeline_id, index: true
- t.bigint :source_id, index: true
- t.binary :commit_sha, null: false
- end
- end
-end
diff --git a/db/migrate/20220616183240_add_sbom_component_versions_foreign_key_to_sbom_occurrences.rb b/db/migrate/20220616183240_add_sbom_component_versions_foreign_key_to_sbom_occurrences.rb
deleted file mode 100644
index abaf9939456..00000000000
--- a/db/migrate/20220616183240_add_sbom_component_versions_foreign_key_to_sbom_occurrences.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddSbomComponentVersionsForeignKeyToSbomOccurrences < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :sbom_occurrences,
- :sbom_component_versions,
- column: :component_version_id,
- on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :sbom_occurrences, column: :component_version_id
- end
- end
-end
diff --git a/db/migrate/20220616183309_add_sbom_source_foreign_key_to_sbom_occurrences.rb b/db/migrate/20220616183309_add_sbom_source_foreign_key_to_sbom_occurrences.rb
deleted file mode 100644
index 3818e5f51c7..00000000000
--- a/db/migrate/20220616183309_add_sbom_source_foreign_key_to_sbom_occurrences.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddSbomSourceForeignKeyToSbomOccurrences < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :sbom_occurrences, :sbom_sources, column: :source_id, on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :sbom_occurrences, column: :source_id
- end
- end
-end
diff --git a/db/migrate/20220616183310_add_project_foreign_key_to_sbom_occurrences.rb b/db/migrate/20220616183310_add_project_foreign_key_to_sbom_occurrences.rb
deleted file mode 100644
index d2e32ffbb3f..00000000000
--- a/db/migrate/20220616183310_add_project_foreign_key_to_sbom_occurrences.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddProjectForeignKeyToSbomOccurrences < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :sbom_occurrences, :projects, column: :project_id, on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :sbom_occurrences, column: :project_id
- end
- end
-end
diff --git a/db/migrate/20220617123135_drop_temp_index_on_projects_on_id_and_runners_token.rb b/db/migrate/20220617123135_drop_temp_index_on_projects_on_id_and_runners_token.rb
deleted file mode 100644
index c860a2208fe..00000000000
--- a/db/migrate/20220617123135_drop_temp_index_on_projects_on_id_and_runners_token.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-class DropTempIndexOnProjectsOnIdAndRunnersToken < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- TEMP_INDEX_NAME = 'tmp_index_projects_on_id_and_runners_token'
-
- def up
- finalize_background_migration 'ResetDuplicateCiRunnersTokenValuesOnProjects'
-
- remove_concurrent_index_by_name :projects, TEMP_INDEX_NAME
- end
-
- def down
- add_concurrent_index :projects,
- [:id, :runners_token],
- where: "runners_token IS NOT NULL",
- unique: false,
- name: TEMP_INDEX_NAME
- end
-end
diff --git a/db/migrate/20220617123144_drop_temp_index_on_projects_on_id_and_runners_token_encrypted.rb b/db/migrate/20220617123144_drop_temp_index_on_projects_on_id_and_runners_token_encrypted.rb
deleted file mode 100644
index 254a73a9b1f..00000000000
--- a/db/migrate/20220617123144_drop_temp_index_on_projects_on_id_and_runners_token_encrypted.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-class DropTempIndexOnProjectsOnIdAndRunnersTokenEncrypted < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- TEMP_INDEX_NAME = 'tmp_index_projects_on_id_and_runners_token_encrypted'
-
- def up
- finalize_background_migration 'ResetDuplicateCiRunnersTokenEncryptedValuesOnProjects'
-
- remove_concurrent_index_by_name :projects, TEMP_INDEX_NAME
- end
-
- def down
- add_concurrent_index :projects,
- [:id, :runners_token_encrypted],
- where: "runners_token_encrypted IS NOT NULL",
- unique: false,
- name: TEMP_INDEX_NAME
- end
-end
diff --git a/db/migrate/20220617141347_create_ci_secure_file_states.rb b/db/migrate/20220617141347_create_ci_secure_file_states.rb
deleted file mode 100644
index 63cbcca2913..00000000000
--- a/db/migrate/20220617141347_create_ci_secure_file_states.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-# frozen_string_literal: true
-# rubocop:disable Layout/LineLength
-
-class CreateCiSecureFileStates < Gitlab::Database::Migration[2.0]
- VERIFICATION_STATE_INDEX_NAME = "index_ci_secure_file_states_on_verification_state"
- PENDING_VERIFICATION_INDEX_NAME = "index_ci_secure_file_states_pending_verification"
- FAILED_VERIFICATION_INDEX_NAME = "index_ci_secure_file_states_failed_verification"
- NEEDS_VERIFICATION_INDEX_NAME = "index_ci_secure_file_states_needs_verification"
-
- enable_lock_retries!
-
- def up
- create_table :ci_secure_file_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 :ci_secure_file, primary_key: true, null: 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 :ci_secure_file_states
- end
-end
-# rubocop:enable Layout/LineLength
diff --git a/db/migrate/20220619182308_create_project_relation_exports.rb b/db/migrate/20220619182308_create_project_relation_exports.rb
deleted file mode 100644
index 7b92ca5110f..00000000000
--- a/db/migrate/20220619182308_create_project_relation_exports.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class CreateProjectRelationExports < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- UNIQUE_INDEX_NAME = 'index_project_export_job_relation'
-
- def change
- create_table :project_relation_exports do |t|
- t.references :project_export_job, null: false, foreign_key: { on_delete: :cascade }
- t.timestamps_with_timezone null: false
- t.integer :status, limit: 2, null: false, default: 0
- t.text :relation, null: false, limit: 255
- t.text :jid, limit: 255
- t.text :export_error, limit: 300
-
- t.index [:project_export_job_id, :relation], unique: true, name: UNIQUE_INDEX_NAME
- end
- end
-end
diff --git a/db/migrate/20220619184931_create_project_relation_export_uploads.rb b/db/migrate/20220619184931_create_project_relation_export_uploads.rb
deleted file mode 100644
index 03abf980f13..00000000000
--- a/db/migrate/20220619184931_create_project_relation_export_uploads.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class CreateProjectRelationExportUploads < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- INDEX = 'index_project_relation_export_upload_id'
-
- def change
- create_table :project_relation_export_uploads do |t|
- t.references :project_relation_export, null: false, foreign_key: { on_delete: :cascade }, index: { name: INDEX }
- t.timestamps_with_timezone null: false
- t.text :export_file, null: false, limit: 255
- end
- end
-end
diff --git a/db/migrate/20220619212618_add_selective_code_owner_removals_to_project_settings.rb b/db/migrate/20220619212618_add_selective_code_owner_removals_to_project_settings.rb
deleted file mode 100644
index 435a1d7a40e..00000000000
--- a/db/migrate/20220619212618_add_selective_code_owner_removals_to_project_settings.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddSelectiveCodeOwnerRemovalsToProjectSettings < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- add_column :project_settings, :selective_code_owner_removals, :boolean, default: false, null: false
- end
-end
diff --git a/db/migrate/20220621202616_add_partial_index_on_oauth_access_tokens_revoked_at.rb b/db/migrate/20220621202616_add_partial_index_on_oauth_access_tokens_revoked_at.rb
deleted file mode 100644
index 2222698dcea..00000000000
--- a/db/migrate/20220621202616_add_partial_index_on_oauth_access_tokens_revoked_at.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class AddPartialIndexOnOauthAccessTokensRevokedAt < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'partial_index_resource_owner_id_created_at_token_not_revoked'
- EXISTING_INDEX_NAME = 'index_oauth_access_tokens_on_resource_owner_id'
-
- def up
- add_concurrent_index :oauth_access_tokens, [:resource_owner_id, :created_at],
- name: INDEX_NAME, where: 'revoked_at IS NULL'
- remove_concurrent_index :oauth_access_tokens, :resource_owner_id, name: EXISTING_INDEX_NAME
- end
-
- def down
- add_concurrent_index :oauth_access_tokens, :resource_owner_id, name: EXISTING_INDEX_NAME
- remove_concurrent_index :oauth_access_tokens, [:resource_owner_id, :created_at], name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20220624081524_add_ci_runner_versions_table.rb b/db/migrate/20220624081524_add_ci_runner_versions_table.rb
deleted file mode 100644
index 844c5898d75..00000000000
--- a/db/migrate/20220624081524_add_ci_runner_versions_table.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class AddCiRunnerVersionsTable < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def up
- create_table :ci_runner_versions, id: false do |t|
- t.text :version, primary_key: true, index: true, null: false, limit: 2048
- t.integer :status, null: true, limit: 2, index: true
- end
- end
-
- def down
- drop_table :ci_runner_versions, if_exists: true
- end
-end
diff --git a/db/migrate/20220624090458_add_index_on_runner_version.rb b/db/migrate/20220624090458_add_index_on_runner_version.rb
deleted file mode 100644
index e28bf0d8a76..00000000000
--- a/db/migrate/20220624090458_add_index_on_runner_version.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexOnRunnerVersion < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_ci_runners_on_version'
-
- def up
- add_concurrent_index :ci_runners, :version, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :ci_runners, INDEX_NAME
- end
-end
diff --git a/db/migrate/20220627061008_add_fei_shu_integration.rb b/db/migrate/20220627061008_add_fei_shu_integration.rb
deleted file mode 100644
index 6a3bdb0a2e9..00000000000
--- a/db/migrate/20220627061008_add_fei_shu_integration.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-# frozen_string_literal: true
-
-class AddFeiShuIntegration < Gitlab::Database::Migration[2.0]
- def change
- add_column :application_settings, :feishu_integration_enabled, :boolean,
- null: false, default: false, comment: 'JiHu-specific column'
- add_column :application_settings, :encrypted_feishu_app_key, :binary, comment: 'JiHu-specific column'
- add_column :application_settings, :encrypted_feishu_app_key_iv, :binary, comment: 'JiHu-specific column'
- add_column :application_settings, :encrypted_feishu_app_secret, :binary, comment: 'JiHu-specific column'
- add_column :application_settings, :encrypted_feishu_app_secret_iv, :binary, comment: 'JiHu-specific column'
- end
-end
diff --git a/db/migrate/20220627122229_create_user_namespace_callouts.rb b/db/migrate/20220627122229_create_user_namespace_callouts.rb
deleted file mode 100644
index fc85c02d2db..00000000000
--- a/db/migrate/20220627122229_create_user_namespace_callouts.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class CreateUserNamespaceCallouts < Gitlab::Database::Migration[2.0]
- def up
- create_table :user_namespace_callouts do |t|
- t.bigint :user_id, null: false
- t.bigint :namespace_id, null: false, index: true
- t.datetime_with_timezone :dismissed_at
- t.integer :feature_name, limit: 2, null: false
- end
- end
-
- def down
- drop_table :user_namespace_callouts
- end
-end
diff --git a/db/migrate/20220627122230_add_foreign_keys_to_user_namespace_callouts.rb b/db/migrate/20220627122230_add_foreign_keys_to_user_namespace_callouts.rb
deleted file mode 100644
index f78eb978a9b..00000000000
--- a/db/migrate/20220627122230_add_foreign_keys_to_user_namespace_callouts.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-class AddForeignKeysToUserNamespaceCallouts < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :user_namespace_callouts, :users,
- column: :user_id,
- on_delete: :cascade
-
- add_concurrent_foreign_key :user_namespace_callouts, :namespaces,
- column: :namespace_id,
- on_delete: :cascade
-
- add_concurrent_index :user_namespace_callouts, [:user_id, :feature_name, :namespace_id],
- unique: true,
- name: 'index_ns_user_callouts_feature'
- end
-
- def down
- remove_concurrent_index_by_name :user_namespace_callouts, 'index_ns_user_callouts_feature'
-
- with_lock_retries do
- remove_foreign_key :user_namespace_callouts, column: :user_id
- remove_foreign_key :user_namespace_callouts, column: :namespace_id
- end
- end
-end
diff --git a/db/migrate/20220627140315_add_last_feature_flag_updated_at_to_operations_feature_flags_clients.rb b/db/migrate/20220627140315_add_last_feature_flag_updated_at_to_operations_feature_flags_clients.rb
deleted file mode 100644
index 9309f4899ab..00000000000
--- a/db/migrate/20220627140315_add_last_feature_flag_updated_at_to_operations_feature_flags_clients.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddLastFeatureFlagUpdatedAtToOperationsFeatureFlagsClients < Gitlab::Database::Migration[2.0]
- def change
- add_column :operations_feature_flags_clients, :last_feature_flag_updated_at, :datetime_with_timezone
- end
-end
diff --git a/db/migrate/20220627171538_add_error_tracking_settings.rb b/db/migrate/20220627171538_add_error_tracking_settings.rb
deleted file mode 100644
index f3bf086b58a..00000000000
--- a/db/migrate/20220627171538_add_error_tracking_settings.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-# See https://docs.gitlab.com/ee/development/migration_style_guide.html
-# for more information on how to write migrations for GitLab.
-
-class AddErrorTrackingSettings < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_column :application_settings, :error_tracking_enabled, :boolean,
- default: false, null: false, if_not_exists: true
-
- add_column :application_settings, :error_tracking_api_url, :text, if_not_exists: true
- add_text_limit :application_settings, :error_tracking_api_url, 255
- end
-
- def down
- remove_column :application_settings, :error_tracking_enabled, if_exists: true
- remove_column :application_settings, :error_tracking_api_url, if_exists: true
- end
-end
diff --git a/db/migrate/20220628110214_add_namespace_id_column_to_issues_table.rb b/db/migrate/20220628110214_add_namespace_id_column_to_issues_table.rb
deleted file mode 100644
index 111ef8babae..00000000000
--- a/db/migrate/20220628110214_add_namespace_id_column_to_issues_table.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddNamespaceIdColumnToIssuesTable < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def up
- add_column :issues, :namespace_id, :bigint
- end
-
- def down
- remove_column :issues, :namespace_id
- end
-end
diff --git a/db/migrate/20220628120708_create_namespace_bans.rb b/db/migrate/20220628120708_create_namespace_bans.rb
deleted file mode 100644
index 657d13f6448..00000000000
--- a/db/migrate/20220628120708_create_namespace_bans.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class CreateNamespaceBans < Gitlab::Database::Migration[2.0]
- UNIQUE_INDEX_NAME = 'index_namespace_bans_on_namespace_id_and_user_id'
-
- def change
- create_table :namespace_bans do |t|
- t.bigint :namespace_id, null: false
- t.bigint :user_id, null: false, index: true
- t.timestamps_with_timezone
-
- t.index [:namespace_id, :user_id], unique: true, name: UNIQUE_INDEX_NAME
- end
- end
-end
diff --git a/db/migrate/20220628121644_add_namespace_bans_namespace_id_foreign_key.rb b/db/migrate/20220628121644_add_namespace_bans_namespace_id_foreign_key.rb
deleted file mode 100644
index 30928123618..00000000000
--- a/db/migrate/20220628121644_add_namespace_bans_namespace_id_foreign_key.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddNamespaceBansNamespaceIdForeignKey < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :namespace_bans, :namespaces, column: :namespace_id, on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :namespace_bans, column: :namespace_id
- end
- end
-end
diff --git a/db/migrate/20220628121712_add_namespace_bans_user_id_foreign_key.rb b/db/migrate/20220628121712_add_namespace_bans_user_id_foreign_key.rb
deleted file mode 100644
index 16a73c29cae..00000000000
--- a/db/migrate/20220628121712_add_namespace_bans_user_id_foreign_key.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddNamespaceBansUserIdForeignKey < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :namespace_bans, :users, column: :user_id, on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :namespace_bans, column: :user_id
- end
- end
-end
diff --git a/db/migrate/20220629220129_increase_webauthn_xid_length.rb b/db/migrate/20220629220129_increase_webauthn_xid_length.rb
deleted file mode 100644
index c5b107ce3f6..00000000000
--- a/db/migrate/20220629220129_increase_webauthn_xid_length.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class IncreaseWebauthnXidLength < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- new_constraint_name = check_constraint_name(:webauthn_registrations, :credential_xid, 'max_length_v3')
- add_text_limit :webauthn_registrations, :credential_xid, 1364, constraint_name: new_constraint_name
-
- prev_constraint_name = check_constraint_name(:webauthn_registrations, :credential_xid, 'max_length_v2')
- remove_text_limit :webauthn_registrations, :credential_xid, constraint_name: prev_constraint_name
- end
-
- def down
- # no-op: Danger of failling if there are records with length(credential_xid) > 1364
- end
-end
diff --git a/db/migrate/20220630202329_add_partial_index_on_oauth_access_tokens_revoked_at_with_order.rb b/db/migrate/20220630202329_add_partial_index_on_oauth_access_tokens_revoked_at_with_order.rb
deleted file mode 100644
index 03eb8c2f29d..00000000000
--- a/db/migrate/20220630202329_add_partial_index_on_oauth_access_tokens_revoked_at_with_order.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class AddPartialIndexOnOauthAccessTokensRevokedAtWithOrder < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'partial_index_user_id_app_id_created_at_token_not_revoked'
- EXISTING_INDEX_NAME = 'partial_index_resource_owner_id_created_at_token_not_revoked'
-
- def up
- add_concurrent_index :oauth_access_tokens, [:resource_owner_id, :application_id, :created_at],
- name: INDEX_NAME, where: 'revoked_at IS NULL'
- remove_concurrent_index :oauth_access_tokens, [:resource_owner_id, :created_at], name: EXISTING_INDEX_NAME
- end
-
- def down
- add_concurrent_index :oauth_access_tokens, [:resource_owner_id, :created_at],
- name: EXISTING_INDEX_NAME, where: 'revoked_at IS NULL'
- remove_concurrent_index :oauth_access_tokens, [:resource_owner_id, :application_id, :created_at], name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20220701173859_remove_not_null_constraints_from_requirements.rb b/db/migrate/20220701173859_remove_not_null_constraints_from_requirements.rb
deleted file mode 100644
index 97b223f1800..00000000000
--- a/db/migrate/20220701173859_remove_not_null_constraints_from_requirements.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveNotNullConstraintsFromRequirements < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- change_column_null :requirements, :created_at, true
- change_column_null :requirements, :updated_at, true
- change_column_null :requirements, :title, true
- change_column_null :requirements, :state, true
- end
-
- def down
- # No OP
- # The columns could have nil values again at this point. Rolling back
- # would cause an exception, also we cannot insert data and modify the schema within the same migration.
- # More details at https://gitlab.com/gitlab-org/gitlab/-/merge_requests/91611#note_1017066470
- end
-end
diff --git a/db/migrate/20220703182234_add_findings_partition_number_to_security_scans.rb b/db/migrate/20220703182234_add_findings_partition_number_to_security_scans.rb
deleted file mode 100644
index f7d50a6d5cf..00000000000
--- a/db/migrate/20220703182234_add_findings_partition_number_to_security_scans.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddFindingsPartitionNumberToSecurityScans < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- add_column :security_scans, :findings_partition_number, :integer, default: 1, null: false
- end
-end
diff --git a/db/migrate/20220703182254_add_partition_number_to_security_findings.rb b/db/migrate/20220703182254_add_partition_number_to_security_findings.rb
deleted file mode 100644
index 85ff4f2eb7c..00000000000
--- a/db/migrate/20220703182254_add_partition_number_to_security_findings.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddPartitionNumberToSecurityFindings < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- add_column :security_findings, :partition_number, :integer, default: 1, null: false
- end
-end
diff --git a/db/migrate/20220704034050_add_users_allowlist_to_git_rate_limits.rb b/db/migrate/20220704034050_add_users_allowlist_to_git_rate_limits.rb
deleted file mode 100644
index 7dd1bb45e4c..00000000000
--- a/db/migrate/20220704034050_add_users_allowlist_to_git_rate_limits.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class AddUsersAllowlistToGitRateLimits < Gitlab::Database::Migration[2.0]
- def change
- add_column :application_settings, :git_rate_limit_users_allowlist,
- :text,
- array: true,
- default: [],
- null: false
- end
-end
diff --git a/db/migrate/20220704034105_add_application_settings_git_users_allowlist_max_usernames_constraint.rb b/db/migrate/20220704034105_add_application_settings_git_users_allowlist_max_usernames_constraint.rb
deleted file mode 100644
index ceb3807f817..00000000000
--- a/db/migrate/20220704034105_add_application_settings_git_users_allowlist_max_usernames_constraint.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddApplicationSettingsGitUsersAllowlistMaxUsernamesConstraint < Gitlab::Database::Migration[2.0]
- CONSTRAINT_NAME = 'app_settings_git_rate_limit_users_allowlist_max_usernames'
-
- disable_ddl_transaction!
-
- def up
- add_check_constraint :application_settings, 'CARDINALITY(git_rate_limit_users_allowlist) <= 100', CONSTRAINT_NAME
- end
-
- def down
- remove_check_constraint :application_settings, CONSTRAINT_NAME
- end
-end
diff --git a/db/migrate/20220705145349_add_project_import_level_to_namespace_settings.rb b/db/migrate/20220705145349_add_project_import_level_to_namespace_settings.rb
deleted file mode 100644
index e46f0221782..00000000000
--- a/db/migrate/20220705145349_add_project_import_level_to_namespace_settings.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddProjectImportLevelToNamespaceSettings < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- add_column :namespace_settings, :project_import_level, :smallint, default: 0, null: false
- end
-end
diff --git a/db/migrate/20220706191627_add_encrypted_error_tracking_access_token.rb b/db/migrate/20220706191627_add_encrypted_error_tracking_access_token.rb
deleted file mode 100644
index b73556e6caa..00000000000
--- a/db/migrate/20220706191627_add_encrypted_error_tracking_access_token.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-# See https://docs.gitlab.com/ee/development/migration_style_guide.html
-# for more information on how to write migrations for GitLab.
-
-class AddEncryptedErrorTrackingAccessToken < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_column :application_settings, :error_tracking_access_token_encrypted, :text, if_not_exists: true
- add_text_limit :application_settings, :error_tracking_access_token_encrypted, 255
- end
-
- def down
- remove_column :application_settings, :error_tracking_access_token_encrypted, if_exists: true
- end
-end
diff --git a/db/migrate/20220707105335_rename_chat_name_service_id_to_integration_id.rb b/db/migrate/20220707105335_rename_chat_name_service_id_to_integration_id.rb
deleted file mode 100644
index a6625d030a4..00000000000
--- a/db/migrate/20220707105335_rename_chat_name_service_id_to_integration_id.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class RenameChatNameServiceIdToIntegrationId < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- rename_column_concurrently :chat_names, :service_id, :integration_id
- end
-
- def down
- undo_rename_column_concurrently :chat_names, :service_id, :integration_id
- end
-end
diff --git a/db/migrate/20220707160707_rename_slack_integration_service_id_to_integration_id.rb b/db/migrate/20220707160707_rename_slack_integration_service_id_to_integration_id.rb
deleted file mode 100644
index d553e349fc1..00000000000
--- a/db/migrate/20220707160707_rename_slack_integration_service_id_to_integration_id.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class RenameSlackIntegrationServiceIdToIntegrationId < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- rename_column_concurrently :slack_integrations, :service_id, :integration_id
- end
-
- def down
- undo_rename_column_concurrently :slack_integrations, :service_id, :integration_id
- end
-end
diff --git a/db/migrate/20220707181910_create_member_roles.rb b/db/migrate/20220707181910_create_member_roles.rb
deleted file mode 100644
index 271ec064f08..00000000000
--- a/db/migrate/20220707181910_create_member_roles.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class CreateMemberRoles < Gitlab::Database::Migration[2.0]
- def change
- create_table :member_roles do |t|
- t.references :namespace,
- index: true,
- null: false,
- foreign_key: { on_delete: :cascade }
- t.timestamps_with_timezone null: false
- t.integer :base_access_level, null: false
- t.boolean :download_code, default: false
- end
- end
-end
diff --git a/db/migrate/20220707181920_add_member_role_id_to_members.rb b/db/migrate/20220707181920_add_member_role_id_to_members.rb
deleted file mode 100644
index f335d2da6f5..00000000000
--- a/db/migrate/20220707181920_add_member_role_id_to_members.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddMemberRoleIdToMembers < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def up
- add_column :members, :member_role_id, :bigint
- end
-
- def down
- remove_column :members, :member_role_id
- end
-end
diff --git a/db/migrate/20220707181930_add_member_roles_relation_to_members.rb b/db/migrate/20220707181930_add_member_roles_relation_to_members.rb
deleted file mode 100644
index ede168fe51e..00000000000
--- a/db/migrate/20220707181930_add_member_roles_relation_to_members.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class AddMemberRolesRelationToMembers < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
- INDEX_NAME = 'index_members_on_member_role_id'
-
- def up
- add_concurrent_index :members, :member_role_id, name: INDEX_NAME
- add_concurrent_foreign_key :members, :member_roles, column: :member_role_id, on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :members, column: :member_role_id
- end
-
- remove_concurrent_index_by_name :members, INDEX_NAME
- end
-end
diff --git a/db/migrate/20220707190546_add_plan_limits_max_size_cyclonedx_report_column.rb b/db/migrate/20220707190546_add_plan_limits_max_size_cyclonedx_report_column.rb
deleted file mode 100644
index 5ccc6362d2b..00000000000
--- a/db/migrate/20220707190546_add_plan_limits_max_size_cyclonedx_report_column.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddPlanLimitsMaxSizeCyclonedxReportColumn < Gitlab::Database::Migration[2.0]
- def change
- add_column :plan_limits, :ci_max_artifact_size_cyclonedx, :integer, null: false, default: 1
- end
-end
diff --git a/db/migrate/20220708100532_add_unique_index_on_ci_runner_versions_on_status_and_version.rb b/db/migrate/20220708100532_add_unique_index_on_ci_runner_versions_on_status_and_version.rb
deleted file mode 100644
index 663614a321b..00000000000
--- a/db/migrate/20220708100532_add_unique_index_on_ci_runner_versions_on_status_and_version.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddUniqueIndexOnCiRunnerVersionsOnStatusAndVersion < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_ci_runner_versions_on_unique_status_and_version'
-
- def up
- add_concurrent_index :ci_runner_versions, [:status, :version], name: INDEX_NAME, unique: true
- end
-
- def down
- remove_concurrent_index_by_name :ci_runner_versions, INDEX_NAME
- end
-end
diff --git a/db/migrate/20220708132701_create_vulnerability_merge_request_links.rb b/db/migrate/20220708132701_create_vulnerability_merge_request_links.rb
deleted file mode 100644
index 51fe15bee6e..00000000000
--- a/db/migrate/20220708132701_create_vulnerability_merge_request_links.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-class CreateVulnerabilityMergeRequestLinks < Gitlab::Database::Migration[2.0]
- INDEX_NAME = "unique_vuln_merge_request_link_vuln_id_and_mr_id"
-
- def up
- create_table :vulnerability_merge_request_links do |t|
- t.bigint :vulnerability_id, null: false
- t.integer :merge_request_id, null: false
-
- t.index :merge_request_id
- t.timestamps_with_timezone null: false
- end
-
- add_index(
- :vulnerability_merge_request_links,
- %i[vulnerability_id merge_request_id],
- unique: true,
- name: INDEX_NAME
- )
- end
-
- def down
- drop_table(
- :vulnerability_merge_request_links,
- if_exists: true
- )
- end
-end
diff --git a/db/migrate/20220708142744_add_composite_index_for_protected_environments.rb b/db/migrate/20220708142744_add_composite_index_for_protected_environments.rb
deleted file mode 100644
index ab93f5ca9ca..00000000000
--- a/db/migrate/20220708142744_add_composite_index_for_protected_environments.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class AddCompositeIndexForProtectedEnvironments < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- # skips the `required_` part because index limit is 63 characters
- INDEX_NAME = 'index_protected_environments_on_approval_count_and_created_at'
-
- def up
- add_concurrent_index :protected_environments, %i[required_approval_count created_at], name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index :protected_environments, %i[required_approval_count created_at], name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20220708142803_add_composite_index_for_protected_environment_approval_rules.rb b/db/migrate/20220708142803_add_composite_index_for_protected_environment_approval_rules.rb
deleted file mode 100644
index 6952489588d..00000000000
--- a/db/migrate/20220708142803_add_composite_index_for_protected_environment_approval_rules.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class AddCompositeIndexForProtectedEnvironmentApprovalRules < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- # uses `pe_` instead of `protected_environment_` because index limit is 63 characters
- INDEX_NAME = 'index_pe_approval_rules_on_required_approvals_and_created_at'
-
- def up
- add_concurrent_index :protected_environment_approval_rules, %i[required_approvals created_at], name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index :protected_environment_approval_rules, %i[required_approvals created_at], name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20220708150315_add_vulnerabilities_foreign_key_to_vulnerability_merge_request_links.rb b/db/migrate/20220708150315_add_vulnerabilities_foreign_key_to_vulnerability_merge_request_links.rb
deleted file mode 100644
index 6a1123a2c00..00000000000
--- a/db/migrate/20220708150315_add_vulnerabilities_foreign_key_to_vulnerability_merge_request_links.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class AddVulnerabilitiesForeignKeyToVulnerabilityMergeRequestLinks < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :vulnerability_merge_request_links, :vulnerabilities,
- column: :vulnerability_id, on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :vulnerability_merge_request_links, column: :vulnerability_id
- end
- end
-end
diff --git a/db/migrate/20220708150335_add_merge_requests_foreign_key_to_vulnerability_merge_request_links.rb b/db/migrate/20220708150335_add_merge_requests_foreign_key_to_vulnerability_merge_request_links.rb
deleted file mode 100644
index af9cef19b75..00000000000
--- a/db/migrate/20220708150335_add_merge_requests_foreign_key_to_vulnerability_merge_request_links.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class AddMergeRequestsForeignKeyToVulnerabilityMergeRequestLinks < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :vulnerability_merge_request_links, :merge_requests, column:
- :merge_request_id, on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :vulnerability_merge_request_links, column: :merge_request_id
- end
- end
-end
diff --git a/db/migrate/20220708184822_cleanup_backfill_draft_status_on_merge_requests.rb b/db/migrate/20220708184822_cleanup_backfill_draft_status_on_merge_requests.rb
deleted file mode 100644
index 5d91054763e..00000000000
--- a/db/migrate/20220708184822_cleanup_backfill_draft_status_on_merge_requests.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: true
-
-class CleanupBackfillDraftStatusOnMergeRequests < Gitlab::Database::Migration[2.0]
- def up
- # no-op
- #
- # moved to post-deployment migration:
- # db/post_migrate/20220713133515_cleanup_backfill_draft_statuses_on_merge_requests.rb
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/migrate/20220712025712_update_insert_or_update_vulnerability_reads_function.rb b/db/migrate/20220712025712_update_insert_or_update_vulnerability_reads_function.rb
deleted file mode 100644
index 55aeacfbecd..00000000000
--- a/db/migrate/20220712025712_update_insert_or_update_vulnerability_reads_function.rb
+++ /dev/null
@@ -1,86 +0,0 @@
-# frozen_string_literal: true
-
-class UpdateInsertOrUpdateVulnerabilityReadsFunction < Gitlab::Database::Migration[2.0]
- FUNCTION_NAME = 'insert_or_update_vulnerability_reads'
-
- enable_lock_retries!
-
- def up
- execute(<<~SQL)
- CREATE OR REPLACE FUNCTION #{FUNCTION_NAME}() RETURNS trigger
- LANGUAGE plpgsql
- AS $$
- DECLARE
- severity smallint;
- state smallint;
- report_type smallint;
- resolved_on_default_branch boolean;
- present_on_default_branch boolean;
- BEGIN
- IF (NEW.vulnerability_id IS NULL AND (TG_OP = 'INSERT' OR TG_OP = 'UPDATE')) THEN
- RETURN NULL;
- END IF;
-
- IF (TG_OP = 'UPDATE' AND OLD.vulnerability_id IS NOT NULL AND NEW.vulnerability_id IS NOT NULL) THEN
- RETURN NULL;
- END IF;
-
- SELECT
- vulnerabilities.severity, vulnerabilities.state, vulnerabilities.report_type, vulnerabilities.resolved_on_default_branch, vulnerabilities.present_on_default_branch
- INTO
- severity, state, report_type, resolved_on_default_branch, present_on_default_branch
- FROM
- vulnerabilities
- WHERE
- vulnerabilities.id = NEW.vulnerability_id;
-
- IF present_on_default_branch IS NOT true THEN
- RETURN NULL;
- END IF;
-
- INSERT INTO vulnerability_reads (vulnerability_id, project_id, scanner_id, report_type, severity, state, resolved_on_default_branch, uuid, location_image, cluster_agent_id, casted_cluster_agent_id)
- VALUES (NEW.vulnerability_id, NEW.project_id, NEW.scanner_id, report_type, severity, state, resolved_on_default_branch, NEW.uuid::uuid, NEW.location->>'image', NEW.location->'kubernetes_resource'->>'agent_id', CAST(NEW.location->'kubernetes_resource'->>'agent_id' AS bigint))
- ON CONFLICT(vulnerability_id) DO NOTHING;
- RETURN NULL;
- END
- $$;
- SQL
- end
-
- def down
- execute(<<~SQL)
- CREATE OR REPLACE FUNCTION #{FUNCTION_NAME}() RETURNS trigger
- LANGUAGE plpgsql
- AS $$
- DECLARE
- severity smallint;
- state smallint;
- report_type smallint;
- resolved_on_default_branch boolean;
- BEGIN
- IF (NEW.vulnerability_id IS NULL AND (TG_OP = 'INSERT' OR TG_OP = 'UPDATE')) THEN
- RETURN NULL;
- END IF;
-
- IF (TG_OP = 'UPDATE' AND OLD.vulnerability_id IS NOT NULL AND NEW.vulnerability_id IS NOT NULL) THEN
- RETURN NULL;
- END IF;
-
- SELECT
- vulnerabilities.severity, vulnerabilities.state, vulnerabilities.report_type, vulnerabilities.resolved_on_default_branch
- INTO
- severity, state, report_type, resolved_on_default_branch
- FROM
- vulnerabilities
- WHERE
- vulnerabilities.id = NEW.vulnerability_id;
-
- INSERT INTO vulnerability_reads (vulnerability_id, project_id, scanner_id, report_type, severity, state, resolved_on_default_branch, uuid, location_image, cluster_agent_id, casted_cluster_agent_id)
- VALUES (NEW.vulnerability_id, NEW.project_id, NEW.scanner_id, report_type, severity, state, resolved_on_default_branch, NEW.uuid::uuid, NEW.location->>'image', NEW.location->'kubernetes_resource'->>'agent_id', CAST(NEW.location->'kubernetes_resource'->>'agent_id' AS bigint))
- ON CONFLICT(vulnerability_id) DO NOTHING;
- RETURN NULL;
- END
- $$;
- SQL
- end
-end
diff --git a/db/migrate/20220712031923_create_vulnerability_reads_for_an_existing_vulnerability_record.rb b/db/migrate/20220712031923_create_vulnerability_reads_for_an_existing_vulnerability_record.rb
deleted file mode 100644
index f3c57692a0d..00000000000
--- a/db/migrate/20220712031923_create_vulnerability_reads_for_an_existing_vulnerability_record.rb
+++ /dev/null
@@ -1,60 +0,0 @@
-# frozen_string_literal: true
-
-class CreateVulnerabilityReadsForAnExistingVulnerabilityRecord < Gitlab::Database::Migration[2.0]
- include Gitlab::Database::SchemaHelpers
-
- FUNCTION_NAME = 'insert_vulnerability_reads_from_vulnerability'
- TRIGGER_NAME = 'trigger_insert_vulnerability_reads_from_vulnerability'
-
- enable_lock_retries!
-
- def up
- execute(<<~SQL)
- CREATE OR REPLACE FUNCTION #{FUNCTION_NAME}() RETURNS trigger
- LANGUAGE plpgsql
- AS $$
- DECLARE
- scanner_id bigint;
- uuid uuid;
- location_image text;
- cluster_agent_id text;
- casted_cluster_agent_id bigint;
- BEGIN
- SELECT
- v_o.scanner_id, v_o.uuid, v_o.location->>'image', v_o.location->'kubernetes_resource'->>'agent_id', CAST(v_o.location->'kubernetes_resource'->>'agent_id' AS bigint)
- INTO
- scanner_id, uuid, location_image, cluster_agent_id, casted_cluster_agent_id
- FROM
- vulnerability_occurrences v_o
- WHERE
- v_o.vulnerability_id = NEW.id
- LIMIT 1;
-
- INSERT INTO vulnerability_reads (vulnerability_id, project_id, scanner_id, report_type, severity, state, resolved_on_default_branch, uuid, location_image, cluster_agent_id, casted_cluster_agent_id)
- VALUES (NEW.id, NEW.project_id, scanner_id, NEW.report_type, NEW.severity, NEW.state, NEW.resolved_on_default_branch, uuid::uuid, location_image, cluster_agent_id, casted_cluster_agent_id)
- ON CONFLICT(vulnerability_id) DO NOTHING;
- RETURN NULL;
- END
- $$;
- SQL
-
- execute(<<~SQL)
- DROP TRIGGER IF EXISTS #{TRIGGER_NAME} ON vulnerabilities;
- SQL
-
- execute(<<~SQL)
- CREATE TRIGGER #{TRIGGER_NAME}
- 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 PROCEDURE #{FUNCTION_NAME}();
- SQL
- end
-
- def down
- drop_trigger(:vulnerabilities, TRIGGER_NAME)
- drop_function(FUNCTION_NAME)
- end
-end
diff --git a/db/migrate/20220712094945_add_include_for_free_user_cap_preview_to_namespace_settings.rb b/db/migrate/20220712094945_add_include_for_free_user_cap_preview_to_namespace_settings.rb
deleted file mode 100644
index 79e71827408..00000000000
--- a/db/migrate/20220712094945_add_include_for_free_user_cap_preview_to_namespace_settings.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddIncludeForFreeUserCapPreviewToNamespaceSettings < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def up
- add_column :namespace_settings, :include_for_free_user_cap_preview, :boolean, null: false, default: false
- end
-
- def down
- remove_column :namespace_settings, :include_for_free_user_cap_preview
- end
-end
diff --git a/db/migrate/20220712131513_rename_issue_tracker_data_service_id_to_integration_id.rb b/db/migrate/20220712131513_rename_issue_tracker_data_service_id_to_integration_id.rb
deleted file mode 100644
index e6a59b66df9..00000000000
--- a/db/migrate/20220712131513_rename_issue_tracker_data_service_id_to_integration_id.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class RenameIssueTrackerDataServiceIdToIntegrationId < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- rename_column_concurrently :issue_tracker_data, :service_id, :integration_id
- end
-
- def down
- undo_rename_column_concurrently :issue_tracker_data, :service_id, :integration_id
- end
-end
diff --git a/db/migrate/20220712144843_rename_jira_tracker_data_service_id_to_integration_id.rb b/db/migrate/20220712144843_rename_jira_tracker_data_service_id_to_integration_id.rb
deleted file mode 100644
index 5971c68bd93..00000000000
--- a/db/migrate/20220712144843_rename_jira_tracker_data_service_id_to_integration_id.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class RenameJiraTrackerDataServiceIdToIntegrationId < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- rename_column_concurrently :jira_tracker_data, :service_id, :integration_id
- end
-
- def down
- undo_rename_column_concurrently :jira_tracker_data, :service_id, :integration_id
- end
-end
diff --git a/db/migrate/20220713175658_add_packages_cleanup_policies_worker_capacity_to_application_settings.rb b/db/migrate/20220713175658_add_packages_cleanup_policies_worker_capacity_to_application_settings.rb
deleted file mode 100644
index 8768786410a..00000000000
--- a/db/migrate/20220713175658_add_packages_cleanup_policies_worker_capacity_to_application_settings.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class AddPackagesCleanupPoliciesWorkerCapacityToApplicationSettings < Gitlab::Database::Migration[2.0]
- def change
- add_column :application_settings,
- :package_registry_cleanup_policies_worker_capacity,
- :integer,
- default: 2,
- null: false
- end
-end
diff --git a/db/migrate/20220713175737_add_application_settings_packages_cleanup_policies_worker_capacity_constraint.rb b/db/migrate/20220713175737_add_application_settings_packages_cleanup_policies_worker_capacity_constraint.rb
deleted file mode 100644
index 9aba85570ea..00000000000
--- a/db/migrate/20220713175737_add_application_settings_packages_cleanup_policies_worker_capacity_constraint.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddApplicationSettingsPackagesCleanupPoliciesWorkerCapacityConstraint < Gitlab::Database::Migration[2.0]
- CONSTRAINT_NAME = 'app_settings_pkg_registry_cleanup_pol_worker_capacity_gte_zero'
-
- disable_ddl_transaction!
-
- def up
- add_check_constraint :application_settings,
- 'package_registry_cleanup_policies_worker_capacity >= 0',
- CONSTRAINT_NAME
- end
-
- def down
- remove_check_constraint :application_settings, CONSTRAINT_NAME
- end
-end
diff --git a/db/migrate/20220713175812_add_enabled_policies_index_to_packages_cleanup_policies.rb b/db/migrate/20220713175812_add_enabled_policies_index_to_packages_cleanup_policies.rb
deleted file mode 100644
index fe4162e8ac3..00000000000
--- a/db/migrate/20220713175812_add_enabled_policies_index_to_packages_cleanup_policies.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddEnabledPoliciesIndexToPackagesCleanupPolicies < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'idx_enabled_pkgs_cleanup_policies_on_next_run_at_project_id'
-
- def up
- add_concurrent_index :packages_cleanup_policies,
- [:next_run_at, :project_id],
- where: "keep_n_duplicated_package_files <> 'all'",
- name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :packages_cleanup_policies, INDEX_NAME
- end
-end
diff --git a/db/migrate/20220714105122_update_default_project_import_level_on_namespace_settings.rb b/db/migrate/20220714105122_update_default_project_import_level_on_namespace_settings.rb
deleted file mode 100644
index 30357ded9ce..00000000000
--- a/db/migrate/20220714105122_update_default_project_import_level_on_namespace_settings.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class UpdateDefaultProjectImportLevelOnNamespaceSettings < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def up
- change_column :namespace_settings, :project_import_level, :smallint, default: 50, null: false
- end
-
- def down
- change_column :namespace_settings, :project_import_level, :smallint, default: 0, null: false
- end
-end
diff --git a/db/migrate/20220714142424_update_trigger_update_vulnerability_reads_on_vulnerability_update.rb b/db/migrate/20220714142424_update_trigger_update_vulnerability_reads_on_vulnerability_update.rb
deleted file mode 100644
index 00fc4ac1ed6..00000000000
--- a/db/migrate/20220714142424_update_trigger_update_vulnerability_reads_on_vulnerability_update.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-# frozen_string_literal: true
-
-class UpdateTriggerUpdateVulnerabilityReadsOnVulnerabilityUpdate < Gitlab::Database::Migration[2.0]
- include Gitlab::Database::SchemaHelpers
-
- TRIGGER_NAME = 'trigger_update_vulnerability_reads_on_vulnerability_update'
- FUNCTION_NAME = 'update_vulnerability_reads_from_vulnerability'
-
- enable_lock_retries!
-
- def up
- drop_trigger(:vulnerabilities, TRIGGER_NAME)
-
- # If the vulnerability record was not already marked as `present_on_default_branch`,
- # we shouldn't try to update `vulnerability_records` since there will be no records
- # anyway.
- execute(<<~SQL)
- CREATE TRIGGER #{TRIGGER_NAME}
- AFTER UPDATE ON vulnerabilities
- FOR EACH ROW
- WHEN (
- OLD.present_on_default_branch IS TRUE AND
- (
- OLD.severity IS DISTINCT FROM NEW.severity OR
- OLD.state IS DISTINCT FROM NEW.state OR
- OLD.resolved_on_default_branch IS DISTINCT FROM NEW.resolved_on_default_branch
- )
- )
- EXECUTE PROCEDURE #{FUNCTION_NAME}();
- SQL
- end
-
- def down
- drop_trigger(:vulnerabilities, TRIGGER_NAME)
-
- execute(<<~SQL)
- CREATE TRIGGER #{TRIGGER_NAME}
- AFTER UPDATE ON vulnerabilities
- FOR EACH ROW
- WHEN (
- OLD.severity IS DISTINCT FROM NEW.severity OR
- OLD.state IS DISTINCT FROM NEW.state OR
- OLD.resolved_on_default_branch IS DISTINCT FROM NEW.resolved_on_default_branch
- )
- EXECUTE PROCEDURE #{FUNCTION_NAME}();
- SQL
- end
-end
diff --git a/db/migrate/20220718083945_add_unique_project_download_limit_allowlist_to_namespace_settings.rb b/db/migrate/20220718083945_add_unique_project_download_limit_allowlist_to_namespace_settings.rb
deleted file mode 100644
index 49d9a652472..00000000000
--- a/db/migrate/20220718083945_add_unique_project_download_limit_allowlist_to_namespace_settings.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class AddUniqueProjectDownloadLimitAllowlistToNamespaceSettings < Gitlab::Database::Migration[2.0]
- def change
- add_column :namespace_settings, :unique_project_download_limit_allowlist,
- :text,
- array: true,
- default: [],
- null: false
- end
-end
diff --git a/db/migrate/20220720161816_add_namespace_id_to_vulnerability_reads_table.rb b/db/migrate/20220720161816_add_namespace_id_to_vulnerability_reads_table.rb
deleted file mode 100644
index b6af71eb088..00000000000
--- a/db/migrate/20220720161816_add_namespace_id_to_vulnerability_reads_table.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddNamespaceIdToVulnerabilityReadsTable < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- add_column :vulnerability_reads, :namespace_id, :bigint
- end
-end
diff --git a/db/migrate/20220720162123_update_vulnerability_reads_triggers_to_set_namespace_id.rb b/db/migrate/20220720162123_update_vulnerability_reads_triggers_to_set_namespace_id.rb
deleted file mode 100644
index 25ecf45bfd5..00000000000
--- a/db/migrate/20220720162123_update_vulnerability_reads_triggers_to_set_namespace_id.rb
+++ /dev/null
@@ -1,159 +0,0 @@
-# frozen_string_literal: true
-
-class UpdateVulnerabilityReadsTriggersToSetNamespaceId < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def up
- execute(<<~SQL)
- CREATE OR REPLACE FUNCTION insert_or_update_vulnerability_reads() RETURNS trigger
- LANGUAGE plpgsql
- AS $$
- DECLARE
- severity smallint;
- state smallint;
- report_type smallint;
- resolved_on_default_branch boolean;
- present_on_default_branch boolean;
- namespace_id bigint;
- BEGIN
- IF (NEW.vulnerability_id IS NULL AND (TG_OP = 'INSERT' OR TG_OP = 'UPDATE')) THEN
- RETURN NULL;
- END IF;
-
- IF (TG_OP = 'UPDATE' AND OLD.vulnerability_id IS NOT NULL AND NEW.vulnerability_id IS NOT NULL) THEN
- RETURN NULL;
- END IF;
-
- SELECT
- vulnerabilities.severity, vulnerabilities.state, vulnerabilities.report_type, vulnerabilities.resolved_on_default_branch, vulnerabilities.present_on_default_branch
- INTO
- severity, state, report_type, resolved_on_default_branch, present_on_default_branch
- FROM
- vulnerabilities
- WHERE
- vulnerabilities.id = NEW.vulnerability_id;
-
- IF present_on_default_branch IS NOT true THEN
- RETURN NULL;
- END IF;
-
- SELECT
- projects.namespace_id
- INTO
- namespace_id
- FROM
- projects
- WHERE
- projects.id = NEW.project_id;
-
- INSERT INTO vulnerability_reads (vulnerability_id, namespace_id, project_id, scanner_id, report_type, severity, state, resolved_on_default_branch, uuid, location_image, cluster_agent_id, casted_cluster_agent_id)
- VALUES (NEW.vulnerability_id, namespace_id, NEW.project_id, NEW.scanner_id, report_type, severity, state, resolved_on_default_branch, NEW.uuid::uuid, NEW.location->>'image', NEW.location->'kubernetes_resource'->>'agent_id', CAST(NEW.location->'kubernetes_resource'->>'agent_id' AS bigint))
- ON CONFLICT(vulnerability_id) DO NOTHING;
- RETURN NULL;
- END
- $$;
- SQL
-
- execute(<<~SQL)
- CREATE OR REPLACE FUNCTION insert_vulnerability_reads_from_vulnerability() RETURNS trigger
- LANGUAGE plpgsql
- AS $$
- DECLARE
- scanner_id bigint;
- uuid uuid;
- location_image text;
- cluster_agent_id text;
- casted_cluster_agent_id bigint;
- namespace_id bigint;
- BEGIN
- SELECT
- v_o.scanner_id, v_o.uuid, v_o.location->>'image', v_o.location->'kubernetes_resource'->>'agent_id', CAST(v_o.location->'kubernetes_resource'->>'agent_id' AS bigint), projects.namespace_id
- INTO
- scanner_id, uuid, location_image, cluster_agent_id, casted_cluster_agent_id, namespace_id
- FROM
- vulnerability_occurrences v_o
- INNER JOIN projects ON projects.id = v_o.project_id
- WHERE
- v_o.vulnerability_id = NEW.id
- LIMIT 1;
-
- INSERT INTO vulnerability_reads (vulnerability_id, namespace_id, project_id, scanner_id, report_type, severity, state, resolved_on_default_branch, uuid, location_image, cluster_agent_id, casted_cluster_agent_id)
- VALUES (NEW.id, namespace_id, NEW.project_id, scanner_id, NEW.report_type, NEW.severity, NEW.state, NEW.resolved_on_default_branch, uuid::uuid, location_image, cluster_agent_id, casted_cluster_agent_id)
- ON CONFLICT(vulnerability_id) DO NOTHING;
- RETURN NULL;
- END
- $$;
- SQL
- end
-
- def down
- execute(<<~SQL)
- CREATE OR REPLACE FUNCTION insert_or_update_vulnerability_reads() RETURNS trigger
- LANGUAGE plpgsql
- AS $$
- DECLARE
- severity smallint;
- state smallint;
- report_type smallint;
- resolved_on_default_branch boolean;
- present_on_default_branch boolean;
- BEGIN
- IF (NEW.vulnerability_id IS NULL AND (TG_OP = 'INSERT' OR TG_OP = 'UPDATE')) THEN
- RETURN NULL;
- END IF;
-
- IF (TG_OP = 'UPDATE' AND OLD.vulnerability_id IS NOT NULL AND NEW.vulnerability_id IS NOT NULL) THEN
- RETURN NULL;
- END IF;
-
- SELECT
- vulnerabilities.severity, vulnerabilities.state, vulnerabilities.report_type, vulnerabilities.resolved_on_default_branch, vulnerabilities.present_on_default_branch
- INTO
- severity, state, report_type, resolved_on_default_branch, present_on_default_branch
- FROM
- vulnerabilities
- WHERE
- vulnerabilities.id = NEW.vulnerability_id;
-
- IF present_on_default_branch IS NOT true THEN
- RETURN NULL;
- END IF;
-
- INSERT INTO vulnerability_reads (vulnerability_id, project_id, scanner_id, report_type, severity, state, resolved_on_default_branch, uuid, location_image, cluster_agent_id, casted_cluster_agent_id)
- VALUES (NEW.vulnerability_id, NEW.project_id, NEW.scanner_id, report_type, severity, state, resolved_on_default_branch, NEW.uuid::uuid, NEW.location->>'image', NEW.location->'kubernetes_resource'->>'agent_id', CAST(NEW.location->'kubernetes_resource'->>'agent_id' AS bigint))
- ON CONFLICT(vulnerability_id) DO NOTHING;
- RETURN NULL;
- END
- $$;
- SQL
-
- execute(<<~SQL)
- CREATE OR REPLACE FUNCTION insert_vulnerability_reads_from_vulnerability() RETURNS trigger
- LANGUAGE plpgsql
- AS $$
- DECLARE
- scanner_id bigint;
- uuid uuid;
- location_image text;
- cluster_agent_id text;
- casted_cluster_agent_id bigint;
- BEGIN
- SELECT
- v_o.scanner_id, v_o.uuid, v_o.location->>'image', v_o.location->'kubernetes_resource'->>'agent_id', CAST(v_o.location->'kubernetes_resource'->>'agent_id' AS bigint)
- INTO
- scanner_id, uuid, location_image, cluster_agent_id, casted_cluster_agent_id
- FROM
- vulnerability_occurrences v_o
- WHERE
- v_o.vulnerability_id = NEW.id
- LIMIT 1;
-
- INSERT INTO vulnerability_reads (vulnerability_id, project_id, scanner_id, report_type, severity, state, resolved_on_default_branch, uuid, location_image, cluster_agent_id, casted_cluster_agent_id)
- VALUES (NEW.id, NEW.project_id, scanner_id, NEW.report_type, NEW.severity, NEW.state, NEW.resolved_on_default_branch, uuid::uuid, location_image, cluster_agent_id, casted_cluster_agent_id)
- ON CONFLICT(vulnerability_id) DO NOTHING;
- RETURN NULL;
- END
- $$;
- SQL
- end
-end
diff --git a/db/migrate/20220720210446_add_start_date_to_issues_table.rb b/db/migrate/20220720210446_add_start_date_to_issues_table.rb
deleted file mode 100644
index 315d80fa654..00000000000
--- a/db/migrate/20220720210446_add_start_date_to_issues_table.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddStartDateToIssuesTable < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- add_column :issues, :start_date, :date
- end
-end
diff --git a/db/migrate/20220722123318_update_delayed_deletion_period.rb b/db/migrate/20220722123318_update_delayed_deletion_period.rb
deleted file mode 100644
index 4d928a41259..00000000000
--- a/db/migrate/20220722123318_update_delayed_deletion_period.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-# See https://docs.gitlab.com/ee/development/migration_style_guide.html
-# for more information on how to write migrations for GitLab.
-
-class UpdateDelayedDeletionPeriod < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- # Before 15.1 the only way to disable delayed deletion was to set
- # the period to 0, as of 15.1 zero is no longer a valid value (1-90).
- # This migration sets the period to a valid value and disables
- # delayed deletion using the delayed_* boolean attributes.
-
- def up
- execute <<~SQL
- UPDATE application_settings SET
- deletion_adjourned_period = 1,
- delayed_group_deletion = 'f',
- delayed_project_removal ='f'
- WHERE deletion_adjourned_period = 0;
- SQL
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/migrate/20220722150231_create_function_gitlab_schema_prevent_write.rb b/db/migrate/20220722150231_create_function_gitlab_schema_prevent_write.rb
deleted file mode 100644
index 29c6d9ce87d..00000000000
--- a/db/migrate/20220722150231_create_function_gitlab_schema_prevent_write.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-# frozen_string_literal: true
-
-class CreateFunctionGitlabSchemaPreventWrite < Gitlab::Database::Migration[2.0]
- TRIGGER_FUNCTION_NAME = 'gitlab_schema_prevent_write'
-
- enable_lock_retries!
-
- # This migration is only to make sure that the lock-write trigger function
- # matches what we already have on staging/production for Gitlab.com
-
- def up
- execute(<<~SQL)
- CREATE OR REPLACE FUNCTION #{TRIGGER_FUNCTION_NAME}()
- RETURNS TRIGGER AS
- $$
- BEGIN
- RAISE EXCEPTION 'Table: "%" is write protected within this Gitlab database.', TG_TABLE_NAME
- USING ERRCODE = 'modifying_sql_data_not_permitted',
- HINT = 'Make sure you are using the right database connection';
- END
- $$ LANGUAGE PLPGSQL
- SQL
- end
-
- def down
- return if Gitlab.com?
-
- execute(<<~SQL)
- DROP FUNCTION #{TRIGGER_FUNCTION_NAME} CASCADE
- SQL
- end
-end
diff --git a/db/migrate/20220722203840_update_lock_writes_function_disabled_via_setting.rb b/db/migrate/20220722203840_update_lock_writes_function_disabled_via_setting.rb
deleted file mode 100644
index f78d2b7f155..00000000000
--- a/db/migrate/20220722203840_update_lock_writes_function_disabled_via_setting.rb
+++ /dev/null
@@ -1,36 +0,0 @@
-# frozen_string_literal: true
-
-class UpdateLockWritesFunctionDisabledViaSetting < Gitlab::Database::Migration[2.0]
- TRIGGER_FUNCTION_NAME = 'gitlab_schema_prevent_write'
-
- def up
- execute(<<~SQL)
- CREATE OR REPLACE FUNCTION #{TRIGGER_FUNCTION_NAME}()
- RETURNS TRIGGER AS
- $$
- BEGIN
- IF COALESCE(NULLIF(current_setting(CONCAT('lock_writes.', TG_TABLE_NAME), true), ''), 'true') THEN
- RAISE EXCEPTION 'Table: "%" is write protected within this Gitlab database.', TG_TABLE_NAME
- USING ERRCODE = 'modifying_sql_data_not_permitted',
- HINT = 'Make sure you are using the right database connection';
- END IF;
- RETURN NEW;
- END
- $$ LANGUAGE PLPGSQL;
- SQL
- end
-
- def down
- execute(<<~SQL)
- CREATE OR REPLACE FUNCTION #{TRIGGER_FUNCTION_NAME}()
- RETURNS TRIGGER AS
- $$
- BEGIN
- RAISE EXCEPTION 'Table: "%" is write protected within this Gitlab database.', TG_TABLE_NAME
- USING ERRCODE = 'modifying_sql_data_not_permitted',
- HINT = 'Make sure you are using the right database connection';
- END
- $$ LANGUAGE PLPGSQL
- SQL
- end
-end
diff --git a/db/migrate/20220723120039_add_author_id_to_vulnerability_state_transitions.rb b/db/migrate/20220723120039_add_author_id_to_vulnerability_state_transitions.rb
deleted file mode 100644
index 4b16ba2bb82..00000000000
--- a/db/migrate/20220723120039_add_author_id_to_vulnerability_state_transitions.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddAuthorIdToVulnerabilityStateTransitions < Gitlab::Database::Migration[2.0]
- def change
- add_column :vulnerability_state_transitions, :author_id, :bigint
- end
-end
diff --git a/db/migrate/20220726025516_add_namespace_settings_unique_project_download_limit_allowlist_size_constraint.rb b/db/migrate/20220726025516_add_namespace_settings_unique_project_download_limit_allowlist_size_constraint.rb
deleted file mode 100644
index bded83f7941..00000000000
--- a/db/migrate/20220726025516_add_namespace_settings_unique_project_download_limit_allowlist_size_constraint.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddNamespaceSettingsUniqueProjectDownloadLimitAllowlistSizeConstraint < Gitlab::Database::Migration[2.0]
- CONSTRAINT_NAME = 'namespace_settings_unique_project_download_limit_allowlist_size'
-
- disable_ddl_transaction!
-
- def up
- add_check_constraint :namespace_settings,
- 'CARDINALITY(unique_project_download_limit_allowlist) <= 100',
- CONSTRAINT_NAME
- end
-
- def down
- remove_check_constraint :namespace_settings, CONSTRAINT_NAME
- end
-end
diff --git a/db/migrate/20220726154012_ensure_sbom_occurrences_is_empty.rb b/db/migrate/20220726154012_ensure_sbom_occurrences_is_empty.rb
deleted file mode 100644
index 18c48d1202d..00000000000
--- a/db/migrate/20220726154012_ensure_sbom_occurrences_is_empty.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class EnsureSbomOccurrencesIsEmpty < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- # Ensure that the sbom_occurrences table is empty to ensure that the
- # following migration adding a not-null column succeeds.
- # The code which creates records in this table has not been implemented yet.
- execute('DELETE FROM sbom_occurrences')
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/migrate/20220726154013_add_component_id_to_sbom_occurrences.rb b/db/migrate/20220726154013_add_component_id_to_sbom_occurrences.rb
deleted file mode 100644
index 9631dadc938..00000000000
--- a/db/migrate/20220726154013_add_component_id_to_sbom_occurrences.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddComponentIdToSbomOccurrences < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def up
- # Code using this table has not been implemented yet.
- # The migration prior to this one ensures that it is empty.
- # rubocop:disable Rails/NotNullColumn
- add_column :sbom_occurrences, :component_id, :bigint, null: false
- # rubocop:enable Rails/NotNullColumn
- end
-
- def down
- remove_column :sbom_occurrences, :component_id
- end
-end
diff --git a/db/migrate/20220726154014_add_index_to_sbom_occurrences_component_id.rb b/db/migrate/20220726154014_add_index_to_sbom_occurrences_component_id.rb
deleted file mode 100644
index ed944fd0b90..00000000000
--- a/db/migrate/20220726154014_add_index_to_sbom_occurrences_component_id.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexToSbomOccurrencesComponentId < Gitlab::Database::Migration[2.0]
- INDEX_NAME = "index_sbom_occurrences_on_component_id"
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :sbom_occurrences, :component_id, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :sbom_occurrences, name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20220726154015_add_component_foreign_key_to_sbom_occurrences.rb b/db/migrate/20220726154015_add_component_foreign_key_to_sbom_occurrences.rb
deleted file mode 100644
index 1c7341c4aa2..00000000000
--- a/db/migrate/20220726154015_add_component_foreign_key_to_sbom_occurrences.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddComponentForeignKeyToSbomOccurrences < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :sbom_occurrences,
- :sbom_components,
- column: :component_id,
- on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :sbom_occurrences, column: :component_id
- end
- end
-end
diff --git a/db/migrate/20220726154016_make_component_version_nullable.rb b/db/migrate/20220726154016_make_component_version_nullable.rb
deleted file mode 100644
index 8619b9dad12..00000000000
--- a/db/migrate/20220726154016_make_component_version_nullable.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class MakeComponentVersionNullable < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- change_column_null :sbom_occurrences, :component_version_id, true
- end
-end
diff --git a/db/migrate/20220726230052_remove_tmp_index_project_membership_namespace_id_column.rb b/db/migrate/20220726230052_remove_tmp_index_project_membership_namespace_id_column.rb
deleted file mode 100644
index e50665c106b..00000000000
--- a/db/migrate/20220726230052_remove_tmp_index_project_membership_namespace_id_column.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-# See https://docs.gitlab.com/ee/development/migration_style_guide.html
-# for more information on how to write migrations for GitLab.
-
-class RemoveTmpIndexProjectMembershipNamespaceIdColumn < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'tmp_index_for_namespace_id_migration_on_project_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 = 'ProjectMember'",
- name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20220728114136_make_ssh_signature_key_nullable.rb b/db/migrate/20220728114136_make_ssh_signature_key_nullable.rb
deleted file mode 100644
index 5d724e9f406..00000000000
--- a/db/migrate/20220728114136_make_ssh_signature_key_nullable.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class MakeSshSignatureKeyNullable < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- change_column_null :ssh_signatures, :key_id, true
- end
-end
diff --git a/db/migrate/20220729073603_index_personal_access_tokens_on_id_and_created_at.rb b/db/migrate/20220729073603_index_personal_access_tokens_on_id_and_created_at.rb
deleted file mode 100644
index b865f76fec1..00000000000
--- a/db/migrate/20220729073603_index_personal_access_tokens_on_id_and_created_at.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class IndexPersonalAccessTokensOnIdAndCreatedAt < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_personal_access_tokens_on_id_and_created_at'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :personal_access_tokens, [:id, :created_at], name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :personal_access_tokens, INDEX_NAME
- end
-end
diff --git a/db/migrate/20220802154757_add_deactivate_dormant_user_time_setting.rb b/db/migrate/20220802154757_add_deactivate_dormant_user_time_setting.rb
deleted file mode 100644
index ca887cc2255..00000000000
--- a/db/migrate/20220802154757_add_deactivate_dormant_user_time_setting.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-# frozen_string_literal: true
-class AddDeactivateDormantUserTimeSetting < Gitlab::Database::Migration[2.0]
- def change
- add_column :application_settings, :deactivate_dormant_users_period, :integer, default: 90, null: false
- end
-end
diff --git a/db/migrate/20220803145637_create_user_project_callout.rb b/db/migrate/20220803145637_create_user_project_callout.rb
deleted file mode 100644
index 1d0baf741a9..00000000000
--- a/db/migrate/20220803145637_create_user_project_callout.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class CreateUserProjectCallout < Gitlab::Database::Migration[2.0]
- def up
- create_table :user_project_callouts do |t|
- t.bigint :user_id, null: false
- t.bigint :project_id, null: false
- t.integer :feature_name, limit: 2, null: false
- t.datetime_with_timezone :dismissed_at
-
- t.index :project_id
- t.index [:user_id, :feature_name, :project_id], unique: true, name: 'index_project_user_callouts_feature'
- end
- end
-
- def down
- drop_table :user_project_callouts
- end
-end
diff --git a/db/migrate/20220803154543_add_project_id_fkey_for_user_project_callout.rb b/db/migrate/20220803154543_add_project_id_fkey_for_user_project_callout.rb
deleted file mode 100644
index 3cea53dc127..00000000000
--- a/db/migrate/20220803154543_add_project_id_fkey_for_user_project_callout.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddProjectIdFkeyForUserProjectCallout < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :user_project_callouts, :projects, column: :project_id, on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :user_project_callouts, column: :project_id
- end
- end
-end
diff --git a/db/migrate/20220803154758_add_user_id_fkey_for_user_project_callout.rb b/db/migrate/20220803154758_add_user_id_fkey_for_user_project_callout.rb
deleted file mode 100644
index 01a05f816da..00000000000
--- a/db/migrate/20220803154758_add_user_id_fkey_for_user_project_callout.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddUserIdFkeyForUserProjectCallout < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :user_project_callouts, :users, column: :user_id, on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :user_project_callouts, column: :user_id
- end
- end
-end
diff --git a/db/migrate/20220805154101_add_allow_run_pipelines_in_the_parent_project_setting.rb b/db/migrate/20220805154101_add_allow_run_pipelines_in_the_parent_project_setting.rb
deleted file mode 100644
index dbc76e8ccfd..00000000000
--- a/db/migrate/20220805154101_add_allow_run_pipelines_in_the_parent_project_setting.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-# frozen_string_literal: true
-
-class AddAllowRunPipelinesInTheParentProjectSetting < Gitlab::Database::Migration[2.0]
- def change
- add_column :project_ci_cd_settings, :allow_fork_pipelines_to_run_in_parent_project, :boolean,
- default: true, null: false
- end
-end
diff --git a/db/migrate/20220808133824_add_timestamps_to_project_statistics.rb b/db/migrate/20220808133824_add_timestamps_to_project_statistics.rb
deleted file mode 100644
index c5125ebc8ff..00000000000
--- a/db/migrate/20220808133824_add_timestamps_to_project_statistics.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddTimestampsToProjectStatistics < Gitlab::Database::Migration[2.0]
- def change
- add_timestamps_with_timezone(:project_statistics, null: false, default: -> { 'NOW()' })
- end
-end
diff --git a/db/migrate/20220808190124_add_id_token_to_ci_builds_metadata.rb b/db/migrate/20220808190124_add_id_token_to_ci_builds_metadata.rb
deleted file mode 100644
index 00d27d7c516..00000000000
--- a/db/migrate/20220808190124_add_id_token_to_ci_builds_metadata.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddIdTokenToCiBuildsMetadata < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- add_column :ci_builds_metadata, :id_tokens, :jsonb, null: false, default: {}
- end
-end
diff --git a/db/migrate/20220808194857_remove_description_html_limit.rb b/db/migrate/20220808194857_remove_description_html_limit.rb
deleted file mode 100644
index f7444594566..00000000000
--- a/db/migrate/20220808194857_remove_description_html_limit.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveDescriptionHtmlLimit < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- remove_text_limit :namespace_details, :description_html
- remove_text_limit :namespace_details, :description
- end
-
- def down
- add_text_limit :namespace_details, :description_html, 255
- add_text_limit :namespace_details, :description, 255
- end
-end
diff --git a/db/migrate/20220811092243_create_ml_experiments.rb b/db/migrate/20220811092243_create_ml_experiments.rb
deleted file mode 100644
index a357d62133c..00000000000
--- a/db/migrate/20220811092243_create_ml_experiments.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class CreateMlExperiments < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- create_table :ml_experiments do |t|
- t.timestamps_with_timezone null: false
- t.bigint :iid, null: false
- t.bigint :project_id, null: false
- t.references :user, foreign_key: true, index: true, on_delete: :nullify
- t.text :name, limit: 255, null: false
-
- t.index [:project_id, :iid], unique: true
- t.index [:project_id, :name], unique: true
- end
- end
-end
diff --git a/db/migrate/20220811092244_create_ml_candidates.rb b/db/migrate/20220811092244_create_ml_candidates.rb
deleted file mode 100644
index fe9fc293b03..00000000000
--- a/db/migrate/20220811092244_create_ml_candidates.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class CreateMlCandidates < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- create_table :ml_candidates do |t|
- t.timestamps_with_timezone null: false
- t.uuid :iid, null: false
- t.bigint :experiment_id, null: false
- t.references :user, foreign_key: true, index: true, on_delete: :nullify
-
- t.index [:experiment_id, :iid], unique: true
- end
- end
-end
diff --git a/db/migrate/20220811092245_create_ml_candidate_params.rb b/db/migrate/20220811092245_create_ml_candidate_params.rb
deleted file mode 100644
index 55fc1cbe7af..00000000000
--- a/db/migrate/20220811092245_create_ml_candidate_params.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: true
-
-class CreateMlCandidateParams < Gitlab::Database::Migration[2.0]
- def change
- create_table :ml_candidate_params do |t|
- t.timestamps_with_timezone null: false
- t.references :candidate,
- foreign_key: { to_table: :ml_candidates },
- index: true
- t.text :name, limit: 250, null: false
- t.text :value, limit: 250, null: false
- end
- end
-end
diff --git a/db/migrate/20220811092246_create_ml_candidate_metrics.rb b/db/migrate/20220811092246_create_ml_candidate_metrics.rb
deleted file mode 100644
index a4d417f270e..00000000000
--- a/db/migrate/20220811092246_create_ml_candidate_metrics.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class CreateMlCandidateMetrics < Gitlab::Database::Migration[2.0]
- def change
- create_table :ml_candidate_metrics do |t|
- t.timestamps_with_timezone null: false
- t.references :candidate,
- foreign_key: { to_table: :ml_candidates },
- index: true
- t.float :value
- t.integer :step
- t.binary :is_nan
- t.text :name, limit: 250, null: false
- end
- end
-end
diff --git a/db/migrate/20220811092251_add_ml_candidates_reference_to_experiment.rb b/db/migrate/20220811092251_add_ml_candidates_reference_to_experiment.rb
deleted file mode 100644
index a3be644552c..00000000000
--- a/db/migrate/20220811092251_add_ml_candidates_reference_to_experiment.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddMlCandidatesReferenceToExperiment < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :ml_candidates, :ml_experiments, column: :experiment_id
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :ml_candidates, column: :experiment_id
- end
- end
-end
diff --git a/db/migrate/20220811092253_add_ml_experiments_reference_to_project.rb b/db/migrate/20220811092253_add_ml_experiments_reference_to_project.rb
deleted file mode 100644
index 4fd832dfe14..00000000000
--- a/db/migrate/20220811092253_add_ml_experiments_reference_to_project.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddMlExperimentsReferenceToProject < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :ml_experiments, :projects, column: :project_id, on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :ml_experiments, column: :project_id
- end
- end
-end
diff --git a/db/migrate/20231031192803_remove_not_null_constraint_from_member_role.rb b/db/migrate/20231031192803_remove_not_null_constraint_from_member_role.rb
new file mode 100644
index 00000000000..52004cbd10b
--- /dev/null
+++ b/db/migrate/20231031192803_remove_not_null_constraint_from_member_role.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+class RemoveNotNullConstraintFromMemberRole < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+ milestone '16.6'
+
+ def up
+ remove_not_null_constraint :member_roles, :namespace_id
+ end
+
+ def down
+ add_not_null_constraint :member_roles, :namespace_id
+ end
+end
diff --git a/db/post_migrate/20220128103042_schedule_delete_invalid_epic_issues_revised.rb b/db/post_migrate/20220128103042_schedule_delete_invalid_epic_issues_revised.rb
deleted file mode 100644
index 642bf012ce0..00000000000
--- a/db/post_migrate/20220128103042_schedule_delete_invalid_epic_issues_revised.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleDeleteInvalidEpicIssuesRevised < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- MIGRATION = 'DeleteInvalidEpicIssues'
- INTERVAL = 2.minutes
- BATCH_SIZE = 1_000
- MAX_BATCH_SIZE = 2_000
- SUB_BATCH_SIZE = 50
-
- def up
- queue_batched_background_migration(
- MIGRATION,
- :epics,
- :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, :epics, :id, [])
- end
-end
diff --git a/db/post_migrate/20220213103859_remove_integrations_type.rb b/db/post_migrate/20220213103859_remove_integrations_type.rb
deleted file mode 100644
index 3c420760a2d..00000000000
--- a/db/post_migrate/20220213103859_remove_integrations_type.rb
+++ /dev/null
@@ -1,132 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveIntegrationsType < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- MIGRATION = 'BackfillIntegrationsTypeNew'
- BATCH_SIZE = 50
- TABLE_NAME = :integrations
- COLUMN = :type
-
- # see db/post_migrate/20220213104531_create_indexes_on_integration_type_new.rb
- def indices
- [
- {
- name: "index_integrations_on_project_and_#{COLUMN}_where_inherit_null",
- columns: [:project_id, COLUMN],
- where: 'inherit_from_id IS NULL'
- },
- {
- name: "index_integrations_on_project_id_and_#{COLUMN}_unique",
- columns: [:project_id, COLUMN],
- unique: true
- },
- {
- name: "index_integrations_on_#{COLUMN}",
- columns: [COLUMN]
- },
- {
- name: "index_integrations_on_#{COLUMN}_and_instance_partial",
- columns: [COLUMN, :instance],
- where: 'instance = true',
- unique: true
- },
- {
- name: 'index_integrations_on_type_id_when_active_and_project_id_not_nu',
- columns: [COLUMN, :id],
- where: '((active = true) AND (project_id IS NOT NULL))'
- },
- {
- name: "index_integrations_on_unique_group_id_and_#{COLUMN}",
- columns: [:group_id, COLUMN],
- unique: true
- }
- ]
- end
-
- def up
- ensure_batched_background_migration_is_finished(
- job_class_name: MIGRATION,
- table_name: TABLE_NAME,
- column_name: :id,
- job_arguments: [])
-
- cleanup_unmigrated_rows!
-
- remove_column :integrations, :type, :text
- end
-
- # WARNING: this migration is not really safe to be reverted, since doing so
- # will leave the type column empty. If this migration is reverted, we will
- # need to backfill it from type_new
- def down
- add_column :integrations, :type, 'character varying'
-
- indices.each do |index|
- add_concurrent_index TABLE_NAME, index[:columns], index.except(:columns)
- end
- end
-
- # Convert any remaining unmigrated rows
- def cleanup_unmigrated_rows!
- tmp_index_name = 'tmp_idx_integrations_unmigrated_type_new'
- add_concurrent_index :integrations, :id, where: 'type_new is null', name: tmp_index_name
-
- define_batchable_model(:integrations).where(type_new: nil).each_batch do |batch|
- min_id, max_id = batch.pick(Arel.sql('MIN(id), MAX(id)'))
-
- connection.execute(<<~SQL)
- WITH mapping(old_type, new_type) AS (VALUES
- ('AsanaService', 'Integrations::Asana'),
- ('AssemblaService', 'Integrations::Assembla'),
- ('BambooService', 'Integrations::Bamboo'),
- ('BugzillaService', 'Integrations::Bugzilla'),
- ('BuildkiteService', 'Integrations::Buildkite'),
- ('CampfireService', 'Integrations::Campfire'),
- ('ConfluenceService', 'Integrations::Confluence'),
- ('CustomIssueTrackerService', 'Integrations::CustomIssueTracker'),
- ('DatadogService', 'Integrations::Datadog'),
- ('DiscordService', 'Integrations::Discord'),
- ('DroneCiService', 'Integrations::DroneCi'),
- ('EmailsOnPushService', 'Integrations::EmailsOnPush'),
- ('EwmService', 'Integrations::Ewm'),
- ('ExternalWikiService', 'Integrations::ExternalWiki'),
- ('FlowdockService', 'Integrations::Flowdock'),
- ('HangoutsChatService', 'Integrations::HangoutsChat'),
- ('IrkerService', 'Integrations::Irker'),
- ('JenkinsService', 'Integrations::Jenkins'),
- ('JiraService', 'Integrations::Jira'),
- ('MattermostService', 'Integrations::Mattermost'),
- ('MattermostSlashCommandsService', 'Integrations::MattermostSlashCommands'),
- ('MicrosoftTeamsService', 'Integrations::MicrosoftTeams'),
- ('MockCiService', 'Integrations::MockCi'),
- ('MockMonitoringService', 'Integrations::MockMonitoring'),
- ('PackagistService', 'Integrations::Packagist'),
- ('PipelinesEmailService', 'Integrations::PipelinesEmail'),
- ('PivotaltrackerService', 'Integrations::Pivotaltracker'),
- ('PrometheusService', 'Integrations::Prometheus'),
- ('PushoverService', 'Integrations::Pushover'),
- ('RedmineService', 'Integrations::Redmine'),
- ('SlackService', 'Integrations::Slack'),
- ('SlackSlashCommandsService', 'Integrations::SlackSlashCommands'),
- ('TeamcityService', 'Integrations::Teamcity'),
- ('UnifyCircuitService', 'Integrations::UnifyCircuit'),
- ('WebexTeamsService', 'Integrations::WebexTeams'),
- ('YoutrackService', 'Integrations::Youtrack'),
-
- -- EE-only integrations
- ('GithubService', 'Integrations::Github'),
- ('GitlabSlackApplicationService', 'Integrations::GitlabSlackApplication')
- )
-
- UPDATE integrations SET type_new = mapping.new_type
- FROM mapping
- WHERE integrations.type_new IS NULL
- AND integrations.id BETWEEN #{min_id} AND #{max_id}
- AND integrations.type = mapping.old_type
- SQL
- end
- ensure
- remove_concurrent_index_by_name(:integrations, tmp_index_name)
- end
-end
diff --git a/db/post_migrate/20220314154235_migrate_vulnerability_approval_rules.rb b/db/post_migrate/20220314154235_migrate_vulnerability_approval_rules.rb
deleted file mode 100644
index f9ad2ba4f0c..00000000000
--- a/db/post_migrate/20220314154235_migrate_vulnerability_approval_rules.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-# See https://docs.gitlab.com/ee/development/migration_style_guide.html
-# for more information on how to write migrations for GitLab.
-
-class MigrateVulnerabilityApprovalRules < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- # no-op
- end
-
- def down
- # no-op
- # Vulnerability-Check feature has been removed as part of 15.0
- end
-end
diff --git a/db/post_migrate/20220324165436_schedule_backfill_project_settings.rb b/db/post_migrate/20220324165436_schedule_backfill_project_settings.rb
deleted file mode 100644
index 07a7b8b8989..00000000000
--- a/db/post_migrate/20220324165436_schedule_backfill_project_settings.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleBackfillProjectSettings < Gitlab::Database::Migration[1.0]
- MIGRATION = 'BackfillProjectSettings'
- INTERVAL = 2.minutes
- BATCH_SIZE = 5_000
- SUB_BATCH_SIZE = 200
-
- disable_ddl_transaction!
-
- def up
- queue_batched_background_migration(
- MIGRATION,
- :projects,
- :id,
- job_interval: INTERVAL,
- batch_size: 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/20220328095848_delete_failed_reset_duplicate_ci_runners_token_migration_records.rb b/db/post_migrate/20220328095848_delete_failed_reset_duplicate_ci_runners_token_migration_records.rb
deleted file mode 100644
index 3c1a6a48ef5..00000000000
--- a/db/post_migrate/20220328095848_delete_failed_reset_duplicate_ci_runners_token_migration_records.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class DeleteFailedResetDuplicateCiRunnersTokenMigrationRecords < Gitlab::Database::Migration[1.0]
- def up
- # Delete remaining records of botched migrations before we start the new migrations
- Gitlab::Database::BackgroundMigrationJob
- .for_migration_class('ResetDuplicateCiRunnersTokenValuesOnProjects')
- .delete_all
- Gitlab::Database::BackgroundMigrationJob
- .for_migration_class('ResetDuplicateCiRunnersTokenEncryptedValuesOnProjects')
- .delete_all
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220328100456_schedule20220328_reset_duplicate_ci_runners_token_encrypted_values_on_projects.rb b/db/post_migrate/20220328100456_schedule20220328_reset_duplicate_ci_runners_token_encrypted_values_on_projects.rb
deleted file mode 100644
index 326a8e30ecb..00000000000
--- a/db/post_migrate/20220328100456_schedule20220328_reset_duplicate_ci_runners_token_encrypted_values_on_projects.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-# frozen_string_literal: true
-
-class Schedule20220328ResetDuplicateCiRunnersTokenEncryptedValuesOnProjects < Gitlab::Database::Migration[1.0]
- MIGRATION = 'ResetDuplicateCiRunnersTokenEncryptedValuesOnProjects'
- BATCH_SIZE = 2_000
- DELAY_INTERVAL = 2.minutes
-
- disable_ddl_transaction!
-
- class Project < ActiveRecord::Base # rubocop:disable Style/Documentation
- include ::EachBatch
-
- self.table_name = 'projects'
-
- scope :base_query, -> { where.not(runners_token_encrypted: nil) }
- end
-
- def up
- queue_background_migration_jobs_by_range_at_intervals(
- Project.base_query,
- MIGRATION,
- DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- track_jobs: true
- )
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220328100457_schedule20220328_reset_duplicate_ci_runners_token_values_on_projects.rb b/db/post_migrate/20220328100457_schedule20220328_reset_duplicate_ci_runners_token_values_on_projects.rb
deleted file mode 100644
index d999def0078..00000000000
--- a/db/post_migrate/20220328100457_schedule20220328_reset_duplicate_ci_runners_token_values_on_projects.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-# frozen_string_literal: true
-
-class Schedule20220328ResetDuplicateCiRunnersTokenValuesOnProjects < Gitlab::Database::Migration[1.0]
- MIGRATION = 'ResetDuplicateCiRunnersTokenValuesOnProjects'
- BATCH_SIZE = 2_000
- DELAY_INTERVAL = 2.minutes
-
- disable_ddl_transaction!
-
- class Project < ActiveRecord::Base # rubocop:disable Style/Documentation
- include ::EachBatch
-
- self.table_name = 'projects'
-
- scope :base_query, -> { where.not(runners_token: nil) }
- end
-
- def up
- queue_background_migration_jobs_by_range_at_intervals(
- Project.base_query,
- MIGRATION,
- DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- track_jobs: true
- )
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220331133802_schedule_backfill_topics_title.rb b/db/post_migrate/20220331133802_schedule_backfill_topics_title.rb
deleted file mode 100644
index 8e594a9df52..00000000000
--- a/db/post_migrate/20220331133802_schedule_backfill_topics_title.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleBackfillTopicsTitle < Gitlab::Database::Migration[1.0]
- MIGRATION = 'BackfillTopicsTitle'
- DELAY_INTERVAL = 2.minutes
-
- disable_ddl_transaction!
-
- def up
- queue_background_migration_jobs_by_range_at_intervals(
- define_batchable_model('topics'),
- MIGRATION,
- DELAY_INTERVAL,
- track_jobs: true
- )
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220405092619_toggle_vsa_aggregations_enable.rb b/db/post_migrate/20220405092619_toggle_vsa_aggregations_enable.rb
deleted file mode 100644
index da1353b5cf9..00000000000
--- a/db/post_migrate/20220405092619_toggle_vsa_aggregations_enable.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class ToggleVsaAggregationsEnable < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- model = define_batchable_model('analytics_cycle_analytics_aggregations')
-
- model.each_batch(of: 100) do |relation|
- relation.where('enabled IS FALSE').update_all(enabled: true)
- end
- end
-
- def down
- # noop
- end
-end
diff --git a/db/post_migrate/20220407163559_schedule_purging_stale_security_scans.rb b/db/post_migrate/20220407163559_schedule_purging_stale_security_scans.rb
deleted file mode 100644
index fdceb2f2594..00000000000
--- a/db/post_migrate/20220407163559_schedule_purging_stale_security_scans.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-# frozen_string_literal: true
-
-class SchedulePurgingStaleSecurityScans < Gitlab::Database::Migration[2.0]
- MIGRATION = 'PurgeStaleSecurityScans'
- BATCH_SIZE = 10_000
- DELAY_INTERVAL = 2.minutes
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
- disable_ddl_transaction!
-
- def up
- return unless should_run?
-
- queue_background_migration_jobs_by_range_at_intervals(
- Gitlab::BackgroundMigration::PurgeStaleSecurityScans::SecurityScan.to_purge,
- MIGRATION,
- DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- track_jobs: true
- )
- end
-
- def down
- # no-op
- end
-
- private
-
- def should_run?
- Gitlab.dev_or_test_env? || Gitlab.com?
- end
-end
diff --git a/db/post_migrate/20220411173544_cleanup_orphans_approval_project_rules.rb b/db/post_migrate/20220411173544_cleanup_orphans_approval_project_rules.rb
deleted file mode 100644
index f7132407adb..00000000000
--- a/db/post_migrate/20220411173544_cleanup_orphans_approval_project_rules.rb
+++ /dev/null
@@ -1,38 +0,0 @@
-# frozen_string_literal: true
-
-# See https://docs.gitlab.com/ee/development/migration_style_guide.html
-# for more information on how to write migrations for GitLab.
-
-class CleanupOrphansApprovalProjectRules < Gitlab::Database::Migration[1.0]
- class ApprovalProjectRule < ActiveRecord::Base
- self.table_name = 'approval_project_rules'
- end
-
- def up
- return unless Gitlab.ee?
-
- ApprovalProjectRule.reset_column_information
-
- logger = ::Gitlab::BackgroundMigration::Logger.build
- records_ids = []
-
- # Related enum: report_type: { vulnerability: 1, license_scanning: 2, code_coverage: 3, scan_finding: 4 }
- ApprovalProjectRule.where(report_type: 4)
- .joins("LEFT JOIN security_orchestration_policy_configurations
- ON approval_project_rules.project_id = security_orchestration_policy_configurations.project_id")
- .where(security_orchestration_policy_configurations: { project_id: nil }).each do |record|
- records_ids << record.id
- logger.info(
- message: "CleanupOrphansApprovalProjectRules with record id: #{record.id}",
- class: ApprovalProjectRule.name,
- attributes: record.attributes
- )
- end
-
- ApprovalProjectRule.where(id: records_ids).delete_all
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220415124802_remove_job_artifact_deprecated_geo_fields.rb b/db/post_migrate/20220415124802_remove_job_artifact_deprecated_geo_fields.rb
deleted file mode 100644
index 65432ba3ce1..00000000000
--- a/db/post_migrate/20220415124802_remove_job_artifact_deprecated_geo_fields.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveJobArtifactDeprecatedGeoFields < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- remove_column :geo_event_log, :job_artifact_deleted_event_id, :bigint
- end
- end
-
- def down
- with_lock_retries do
- unless column_exists?(:geo_event_log, :job_artifact_deleted_event_id)
- add_column(:geo_event_log, :job_artifact_deleted_event_id, :bigint)
- end
- end
-
- add_concurrent_foreign_key :geo_event_log, :geo_job_artifact_deleted_events,
- column: :job_artifact_deleted_event_id,
- name: 'fk_176d3fbb5d',
- on_delete: :cascade
-
- add_concurrent_index :geo_event_log,
- :job_artifact_deleted_event_id,
- name: 'index_geo_event_log_on_job_artifact_deleted_event_id',
- where: "(job_artifact_deleted_event_id IS NOT NULL)"
- end
-end
diff --git a/db/post_migrate/20220415124804_remove_job_artifact_deleted_event_table.rb b/db/post_migrate/20220415124804_remove_job_artifact_deleted_event_table.rb
deleted file mode 100644
index 05b716f26ab..00000000000
--- a/db/post_migrate/20220415124804_remove_job_artifact_deleted_event_table.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveJobArtifactDeletedEventTable < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- drop_table :geo_job_artifact_deleted_events
- end
-
- def down
- create_table :geo_job_artifact_deleted_events, id: :bigserial do |t|
- t.bigint :job_artifact_id, null: false, index: true
- t.string :file_path, null: false
- end
- end
-end
diff --git a/db/post_migrate/20220418180958_remove_integrations_properties.rb b/db/post_migrate/20220418180958_remove_integrations_properties.rb
deleted file mode 100644
index 781b8c8ac72..00000000000
--- a/db/post_migrate/20220418180958_remove_integrations_properties.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveIntegrationsProperties < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def change
- remove_column :integrations, :properties, :text
- end
-end
diff --git a/db/post_migrate/20220420061439_add_notes_null_discussion_id_temp_index.rb b/db/post_migrate/20220420061439_add_notes_null_discussion_id_temp_index.rb
deleted file mode 100644
index 35a6d5f5b10..00000000000
--- a/db/post_migrate/20220420061439_add_notes_null_discussion_id_temp_index.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class AddNotesNullDiscussionIdTempIndex < Gitlab::Database::Migration[2.0]
- # Temporary index to be removed in 15.0 https://gitlab.com/gitlab-org/gitlab/-/issues/357581
- INDEX_NAME = 'tmp_index_notes_on_id_where_discussion_id_is_null'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :notes, :id, where: 'discussion_id IS NULL', name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :notes, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220420061450_backfill_null_note_discussion_ids.rb b/db/post_migrate/20220420061450_backfill_null_note_discussion_ids.rb
deleted file mode 100644
index 8880bc2f748..00000000000
--- a/db/post_migrate/20220420061450_backfill_null_note_discussion_ids.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-# frozen_string_literal: true
-
-class BackfillNullNoteDiscussionIds < Gitlab::Database::Migration[2.0]
- MIGRATION = 'BackfillNoteDiscussionId'
- DELAY_INTERVAL = 2.minutes
- BATCH_SIZE = 10_000
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- disable_ddl_transaction!
-
- class Note < MigrationRecord
- include EachBatch
-
- self.table_name = 'notes'
- self.inheritance_column = :_type_disabled
- end
-
- def up
- queue_background_migration_jobs_by_range_at_intervals(
- Note.where(discussion_id: nil),
- MIGRATION,
- DELAY_INTERVAL,
- batch_size: BATCH_SIZE
- )
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220420135946_update_batched_background_migration_arguments.rb b/db/post_migrate/20220420135946_update_batched_background_migration_arguments.rb
deleted file mode 100644
index 40ed98dcb5e..00000000000
--- a/db/post_migrate/20220420135946_update_batched_background_migration_arguments.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class UpdateBatchedBackgroundMigrationArguments < Gitlab::Database::Migration[1.0]
- def up
- execute(<<~SQL)
- UPDATE batched_background_migrations
- SET job_arguments = '[]'
- WHERE job_arguments = '"[]"';
- SQL
- end
-
- def down
- execute(<<~SQL)
- UPDATE batched_background_migrations
- SET job_arguments = '"[]"'
- WHERE job_arguments = '[]';
- SQL
- end
-end
diff --git a/db/post_migrate/20220420214703_schedule_backfill_draft_status_on_merge_requests_corrected_regex.rb b/db/post_migrate/20220420214703_schedule_backfill_draft_status_on_merge_requests_corrected_regex.rb
deleted file mode 100644
index 9640d5d2516..00000000000
--- a/db/post_migrate/20220420214703_schedule_backfill_draft_status_on_merge_requests_corrected_regex.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleBackfillDraftStatusOnMergeRequestsCorrectedRegex < Gitlab::Database::Migration[1.0]
- INDEX_NAME = "tmp_index_merge_requests_draft_and_status"
- MIGRATION = "BackfillDraftStatusOnMergeRequestsWithCorrectedRegex"
- DELAY_INTERVAL = 2.minutes
- BATCH_SIZE = 50
- CORRECTED_REGEXP_STR = "^(\\[draft\\]|\\(draft\\)|draft:|draft|\\[WIP\\]|WIP:|WIP)"
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :merge_requests, :id,
- where: "draft = false AND state_id = 1 AND ((title)::text ~* '#{CORRECTED_REGEXP_STR}'::text)",
- name: INDEX_NAME
-
- eligible_mrs = MergeRequest.where(state_id: 1)
- .where(draft: false)
- .where("title ~* ?", CORRECTED_REGEXP_STR)
-
- queue_background_migration_jobs_by_range_at_intervals(
- eligible_mrs,
- MIGRATION,
- DELAY_INTERVAL,
- track_jobs: true,
- batch_size: BATCH_SIZE
- )
- end
-
- def down
- remove_concurrent_index_by_name :merge_requests, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220422121443_add_async_index_for_group_activity_events.rb b/db/post_migrate/20220422121443_add_async_index_for_group_activity_events.rb
deleted file mode 100644
index 92b97203eed..00000000000
--- a/db/post_migrate/20220422121443_add_async_index_for_group_activity_events.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddAsyncIndexForGroupActivityEvents < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_events_for_group_activity'
-
- def up
- prepare_async_index :events, %I[group_id target_type action id], name: INDEX_NAME, where: 'group_id IS NOT NULL'
- end
-
- def down
- unprepare_async_index :events, %I[group_id target_type action id], name: INDEX_NAME, where: 'group_id IS NOT NULL'
- end
-end
diff --git a/db/post_migrate/20220425111114_add_async_index_for_project_activity_events.rb b/db/post_migrate/20220425111114_add_async_index_for_project_activity_events.rb
deleted file mode 100644
index b203ceca976..00000000000
--- a/db/post_migrate/20220425111114_add_async_index_for_project_activity_events.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddAsyncIndexForProjectActivityEvents < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_events_for_project_activity'
-
- def up
- prepare_async_index :events, %I[project_id target_type action id], name: INDEX_NAME
- end
-
- def down
- unprepare_async_index :events, %I[project_id target_type action id], name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220425111453_add_async_index_to_events_on_group_id_and_id.rb b/db/post_migrate/20220425111453_add_async_index_to_events_on_group_id_and_id.rb
deleted file mode 100644
index 313a31d8964..00000000000
--- a/db/post_migrate/20220425111453_add_async_index_to_events_on_group_id_and_id.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddAsyncIndexToEventsOnGroupIdAndId < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_events_on_group_id_and_id'
-
- def up
- prepare_async_index :events, %I[group_id id], name: INDEX_NAME, where: 'group_id IS NOT NULL'
- end
-
- def down
- unprepare_async_index :events, %I[group_id id], name: INDEX_NAME, where: 'group_id IS NOT NULL'
- end
-end
diff --git a/db/post_migrate/20220425121410_add_temporary_index_for_backfill_integrations_enable_ssl_verification.rb b/db/post_migrate/20220425121410_add_temporary_index_for_backfill_integrations_enable_ssl_verification.rb
deleted file mode 100644
index d0f8e60fa54..00000000000
--- a/db/post_migrate/20220425121410_add_temporary_index_for_backfill_integrations_enable_ssl_verification.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddTemporaryIndexForBackfillIntegrationsEnableSslVerification < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'tmp_index_integrations_on_id_where_type_droneci_or_teamcity'
- INDEX_CONDITION = "type_new IN ('Integrations::DroneCi', 'Integrations::Teamcity') " \
- "AND encrypted_properties IS NOT NULL"
-
- def up
- # this index is used in 20220209121435_backfill_integrations_enable_ssl_verification
- add_concurrent_index :integrations, :id, where: INDEX_CONDITION, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :integrations, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220425121435_backfill_integrations_enable_ssl_verification.rb b/db/post_migrate/20220425121435_backfill_integrations_enable_ssl_verification.rb
deleted file mode 100644
index 101bde975db..00000000000
--- a/db/post_migrate/20220425121435_backfill_integrations_enable_ssl_verification.rb
+++ /dev/null
@@ -1,57 +0,0 @@
-# frozen_string_literal: true
-
-class BackfillIntegrationsEnableSslVerification < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- MIGRATION = 'BackfillIntegrationsEnableSslVerification'
- INTERVAL = 5.minutes
- BATCH_SIZE = 1_000
-
- class Integration < MigrationRecord
- include EachBatch
- include IgnorableColumns
-
- self.table_name = :integrations
- self.inheritance_column = :_type_disabled
-
- ignore_column :template, remove_with: '15.0', remove_after: '2022-04-22'
- ignore_column :type, remove_with: '15.0', remove_after: '2022-04-22'
- ignore_column :properties, remove_with: '15.1', remove_after: '2022-05-22'
-
- scope :affected, -> do
- where(type_new: %w[Integrations::DroneCi Integrations::Teamcity]).where.not(encrypted_properties: nil)
- end
-
- attr_encrypted :properties,
- mode: :per_attribute_iv,
- key: Settings.attr_encrypted_db_key_base_32,
- algorithm: 'aes-256-gcm',
- marshal: true,
- marshaler: ::Gitlab::Json,
- encode: false,
- encode_iv: false
-
- # Handle assignment of props with symbol keys.
- # To do this correctly, we need to call the method generated by attr_encrypted.
- alias_method :attr_encrypted_props=, :properties=
- private :attr_encrypted_props=
-
- def properties=(props)
- self.attr_encrypted_props = props&.with_indifferent_access&.freeze
- end
- end
-
- def up
- queue_background_migration_jobs_by_range_at_intervals(
- Integration.affected,
- MIGRATION,
- INTERVAL,
- batch_size: BATCH_SIZE,
- track_jobs: true
- )
- end
-
- def down
- end
-end
diff --git a/db/post_migrate/20220426185933_backfill_deployments_finished_at.rb b/db/post_migrate/20220426185933_backfill_deployments_finished_at.rb
deleted file mode 100644
index 860756de298..00000000000
--- a/db/post_migrate/20220426185933_backfill_deployments_finished_at.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class BackfillDeploymentsFinishedAt < Gitlab::Database::Migration[2.0]
- DEPLOYMENT_STATUS_SUCCESS = 2 # Equivalent to Deployment.statuses[:success]
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- BATCH_SIZE = 100
-
- def up
- define_batchable_model('deployments')
- .where(finished_at: nil)
- .where(status: DEPLOYMENT_STATUS_SUCCESS)
- .each_batch(of: BATCH_SIZE) { |relation| relation.update_all('finished_at = created_at') }
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220428133724_schedule_expire_o_auth_tokens.rb b/db/post_migrate/20220428133724_schedule_expire_o_auth_tokens.rb
deleted file mode 100644
index 3e0e9b8af0e..00000000000
--- a/db/post_migrate/20220428133724_schedule_expire_o_auth_tokens.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleExpireOAuthTokens < Gitlab::Database::Migration[2.0]
- def up
- # reschedulled with db/post_migrate/20220513043344_reschedule_expire_o_auth_tokens.rb
- end
-
- def down
- # reschedulled with db/post_migrate/20220513043344_reschedule_expire_o_auth_tokens.rb
- end
-end
diff --git a/db/post_migrate/20220502015011_clean_up_fix_merge_request_diff_commit_users.rb b/db/post_migrate/20220502015011_clean_up_fix_merge_request_diff_commit_users.rb
deleted file mode 100644
index a3e59b38975..00000000000
--- a/db/post_migrate/20220502015011_clean_up_fix_merge_request_diff_commit_users.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class CleanUpFixMergeRequestDiffCommitUsers < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- MIGRATION_CLASS = 'FixMergeRequestDiffCommitUsers'
-
- def up
- finalize_background_migration(MIGRATION_CLASS)
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220502173045_reset_too_many_tags_skipped_registry_imports.rb b/db/post_migrate/20220502173045_reset_too_many_tags_skipped_registry_imports.rb
deleted file mode 100644
index e327035d6c9..00000000000
--- a/db/post_migrate/20220502173045_reset_too_many_tags_skipped_registry_imports.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-class ResetTooManyTagsSkippedRegistryImports < Gitlab::Database::Migration[2.0]
- MIGRATION = 'ResetTooManyTagsSkippedRegistryImports'
- DELAY_INTERVAL = 2.minutes.to_i
- BATCH_SIZE = 10_000
-
- disable_ddl_transaction!
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- queue_background_migration_jobs_by_range_at_intervals(
- define_batchable_model('container_repositories').where(
- migration_state: 'import_skipped',
- migration_skipped_reason: 2
- ),
- MIGRATION,
- DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- track_jobs: true
- )
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220503114353_prepare_confidential_note_index.rb b/db/post_migrate/20220503114353_prepare_confidential_note_index.rb
deleted file mode 100644
index 08e60f3d935..00000000000
--- a/db/post_migrate/20220503114353_prepare_confidential_note_index.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class PrepareConfidentialNoteIndex < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_notes_on_confidential'
-
- def up
- prepare_async_index :notes, :confidential, where: 'confidential = true', name: INDEX_NAME
- end
-
- def down
- unprepare_async_index :notes, :confidential, name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220503134610_remove_requirements_management_test_reports_requirement_id.rb b/db/post_migrate/20220503134610_remove_requirements_management_test_reports_requirement_id.rb
deleted file mode 100644
index 4c46a02c99f..00000000000
--- a/db/post_migrate/20220503134610_remove_requirements_management_test_reports_requirement_id.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveRequirementsManagementTestReportsRequirementId < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- TARGET_TABLE = :requirements_management_test_reports
- CONSTRAINT_NAME = 'fk_rails_fb3308ad55'
-
- def up
- with_lock_retries do
- remove_column TARGET_TABLE, :requirement_id
- end
- end
-
- def down
- unless column_exists?(TARGET_TABLE, :requirement_id)
- with_lock_retries do
- add_column TARGET_TABLE, :requirement_id, :bigint, after: :created_at
- end
- end
-
- add_concurrent_index TARGET_TABLE, :requirement_id,
- name: :index_requirements_management_test_reports_on_requirement_id
-
- add_concurrent_foreign_key TARGET_TABLE, :requirements,
- column: :requirement_id, name: CONSTRAINT_NAME, on_delete: :cascade
- end
-end
diff --git a/db/post_migrate/20220504083348_add_indexes_for_primary_email_post_regression_cleanup_migration.rb b/db/post_migrate/20220504083348_add_indexes_for_primary_email_post_regression_cleanup_migration.rb
deleted file mode 100644
index ba0457fa36e..00000000000
--- a/db/post_migrate/20220504083348_add_indexes_for_primary_email_post_regression_cleanup_migration.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexesForPrimaryEmailPostRegressionCleanupMigration < Gitlab::Database::Migration[2.0]
- USERS_INDEX = :index_users_on_id_for_primary_email_migration
- EMAIL_INDEX = :index_emails_on_email_user_id
-
- disable_ddl_transaction!
-
- def up
- unless index_exists_by_name?(:users, USERS_INDEX)
-
- disable_statement_timeout do
- execute <<~SQL
- CREATE INDEX CONCURRENTLY #{USERS_INDEX}
- ON users (id) INCLUDE (email, confirmed_at)
- WHERE confirmed_at IS NOT NULL
- SQL
- end
- end
-
- add_concurrent_index :emails, [:email, :user_id], name: EMAIL_INDEX
- end
-
- def down
- remove_concurrent_index_by_name :users, USERS_INDEX
- remove_concurrent_index_by_name :emails, EMAIL_INDEX
- end
-end
diff --git a/db/post_migrate/20220504083836_cleanup_after_fixing_regression_with_new_users_emails.rb b/db/post_migrate/20220504083836_cleanup_after_fixing_regression_with_new_users_emails.rb
deleted file mode 100644
index 110e2578cd5..00000000000
--- a/db/post_migrate/20220504083836_cleanup_after_fixing_regression_with_new_users_emails.rb
+++ /dev/null
@@ -1,59 +0,0 @@
-# frozen_string_literal: true
-
-class CleanupAfterFixingRegressionWithNewUsersEmails < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- BATCH_SIZE = 10_000
-
- # Stubbed class to access the User table
- class User < MigrationRecord
- include ::EachBatch
-
- self.table_name = 'users'
- self.inheritance_column = :_type_disabled
-
- scope :confirmed, -> { where.not(confirmed_at: nil) }
-
- has_many :emails
- end
-
- # Stubbed class to access the Emails table
- class Email < MigrationRecord
- self.table_name = 'emails'
- self.inheritance_column = :_type_disabled
-
- belongs_to :user
- end
-
- # rubocop: disable Layout/LineLength
- def up
- # Select confirmed users that do not have their primary email in the emails table,
- # and create the email record.
- not_exists_condition = 'NOT EXISTS (SELECT 1 FROM emails WHERE emails.email = users.email AND emails.user_id = users.id)'
-
- User.confirmed.each_batch(of: BATCH_SIZE) do |user_batch|
- user_batch.select(:id, :email, :confirmed_at).where(not_exists_condition).each do |user|
- current_time = Time.now.utc
-
- begin
- Email.create(
- user_id: user.id,
- email: user.email,
- confirmed_at: user.confirmed_at,
- created_at: current_time,
- updated_at: current_time
- )
- rescue StandardError => error
- Gitlab::AppLogger.error("Could not add primary email #{user.email} to emails for user with ID #{user.id} due to #{error}")
- end
- end
- end
- end
- # rubocop: enable Layout/LineLength
-
- def down
- # Intentionally left blank
- end
-end
diff --git a/db/post_migrate/20220504084136_drop_temporary_indexes_for_primary_email_post_regression_cleanup.rb b/db/post_migrate/20220504084136_drop_temporary_indexes_for_primary_email_post_regression_cleanup.rb
deleted file mode 100644
index 60c69426a8a..00000000000
--- a/db/post_migrate/20220504084136_drop_temporary_indexes_for_primary_email_post_regression_cleanup.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-class DropTemporaryIndexesForPrimaryEmailPostRegressionCleanup < Gitlab::Database::Migration[2.0]
- USERS_INDEX = :index_users_on_id_for_primary_email_migration
- EMAIL_INDEX = :index_emails_on_email_user_id
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :users, USERS_INDEX
- remove_concurrent_index_by_name :emails, EMAIL_INDEX
- end
-
- def down
- unless index_exists_by_name?(:users, USERS_INDEX)
-
- disable_statement_timeout do
- execute <<~SQL
- CREATE INDEX CONCURRENTLY #{USERS_INDEX}
- ON users (id) INCLUDE (email, confirmed_at)
- WHERE confirmed_at IS NOT NULL
- SQL
- end
- end
-
- add_concurrent_index :emails, [:email, :user_id], name: EMAIL_INDEX
- end
-end
diff --git a/db/post_migrate/20220505022001_add_index_to_deployments_on_created_at_cluster_id_and_project_id.rb b/db/post_migrate/20220505022001_add_index_to_deployments_on_created_at_cluster_id_and_project_id.rb
deleted file mode 100644
index c78c3a86cf3..00000000000
--- a/db/post_migrate/20220505022001_add_index_to_deployments_on_created_at_cluster_id_and_project_id.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexToDeploymentsOnCreatedAtClusterIdAndProjectId < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- # This temporary index was created to support the script that will be run as part o this
- # Change Request: https://gitlab.com/gitlab-com/gl-infra/production/-/issues/6981
- #
- # Issue to remove the temporary index: https://gitlab.com/gitlab-org/gitlab/-/issues/361389
- INDEX_NAME = 'tp_index_created_at_cluster_id_project_id_on_deployments'
-
- # The change request will only run for deployments newer than this date. This is what we'll
- # be considering as "Active certificate based cluster Kubernetes Deployments". Namespaces with
- # deployments older than this will have to be migrated to the agent and won't have their
- # certificate based clusters life extended.
- DEPLOYMENTS_START_DATE = '2022-04-03 00:00:00'
-
- def up
- add_concurrent_index(
- :deployments,
- [:created_at, :cluster_id, :project_id],
- name: INDEX_NAME,
- where: "cluster_id is not null and created_at > '#{DEPLOYMENTS_START_DATE}'")
- end
-
- def down
- remove_concurrent_index_by_name(:deployments, INDEX_NAME)
- end
-end
diff --git a/db/post_migrate/20220505044348_fix_automatic_iterations_cadences_start_date.rb b/db/post_migrate/20220505044348_fix_automatic_iterations_cadences_start_date.rb
deleted file mode 100644
index 90d70da1a28..00000000000
--- a/db/post_migrate/20220505044348_fix_automatic_iterations_cadences_start_date.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-class FixAutomaticIterationsCadencesStartDate < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- execute(<<~SQL)
- UPDATE iterations_cadences
- SET start_date=COALESCE(
- (
- SELECT start_date
- FROM sprints
- WHERE iterations_cadences.id=sprints.iterations_cadence_id
- ORDER BY sprints.start_date ASC
- LIMIT 1
- ),
- start_date
- )
- WHERE iterations_cadences.automatic=true;
- SQL
- end
-
- def down
- # no-op
- # The migration updates the records for the feature used behind a non-default feature flag.
- # The correct data can be computed with the records from 'sprints' table.
- end
-end
diff --git a/db/post_migrate/20220505053504_remove_namespaces_id_parent_id_inverse_partial_index.rb b/db/post_migrate/20220505053504_remove_namespaces_id_parent_id_inverse_partial_index.rb
deleted file mode 100644
index aca3ccaa03e..00000000000
--- a/db/post_migrate/20220505053504_remove_namespaces_id_parent_id_inverse_partial_index.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveNamespacesIdParentIdInversePartialIndex < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- NAME = 'index_namespaces_id_parent_id_is_not_null'
-
- def up
- remove_concurrent_index :namespaces, :id, name: NAME
- end
-
- def down
- add_concurrent_index :namespaces, :id, where: 'parent_id IS NOT NULL', name: NAME
- end
-end
diff --git a/db/post_migrate/20220505060011_remove_namespaces_id_parent_id_partial_index.rb b/db/post_migrate/20220505060011_remove_namespaces_id_parent_id_partial_index.rb
deleted file mode 100644
index 5125a97af7e..00000000000
--- a/db/post_migrate/20220505060011_remove_namespaces_id_parent_id_partial_index.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveNamespacesIdParentIdPartialIndex < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- NAME = 'index_namespaces_id_parent_id_is_null'
-
- def up
- remove_concurrent_index :namespaces, :id, name: NAME
- end
-
- def down
- add_concurrent_index :namespaces, :id, where: 'parent_id IS NULL', name: NAME
- end
-end
diff --git a/db/post_migrate/20220505174658_update_index_on_alerts_to_exclude_null_fingerprints.rb b/db/post_migrate/20220505174658_update_index_on_alerts_to_exclude_null_fingerprints.rb
deleted file mode 100644
index 5cffdb641d6..00000000000
--- a/db/post_migrate/20220505174658_update_index_on_alerts_to_exclude_null_fingerprints.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-class UpdateIndexOnAlertsToExcludeNullFingerprints < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- OLD_INDEX_NAME = 'index_partial_am_alerts_on_project_id_and_fingerprint'
- NEW_INDEX_NAME = 'index_unresolved_alerts_on_project_id_and_fingerprint'
-
- def up
- add_concurrent_index :alert_management_alerts,
- [:project_id, :fingerprint],
- where: "fingerprint IS NOT NULL and status <> 2",
- name: NEW_INDEX_NAME,
- unique: true
-
- remove_concurrent_index_by_name :alert_management_alerts, OLD_INDEX_NAME
- end
-
- def down
- add_concurrent_index :alert_management_alerts,
- [:project_id, :fingerprint],
- where: "status <> 2",
- name: OLD_INDEX_NAME,
- unique: true
-
- remove_concurrent_index_by_name :alert_management_alerts, NEW_INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220505193512_add_not_null_constraint_to_issues_work_item_type.rb b/db/post_migrate/20220505193512_add_not_null_constraint_to_issues_work_item_type.rb
deleted file mode 100644
index 3ea003383a6..00000000000
--- a/db/post_migrate/20220505193512_add_not_null_constraint_to_issues_work_item_type.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddNotNullConstraintToIssuesWorkItemType < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_not_null_constraint :issues, :work_item_type_id, validate: false
- end
-
- def down
- remove_not_null_constraint :issues, :work_item_type_id
- end
-end
diff --git a/db/post_migrate/20220506123922_add_not_null_constraint_without_validation_to_requirements_issue_id.rb b/db/post_migrate/20220506123922_add_not_null_constraint_without_validation_to_requirements_issue_id.rb
deleted file mode 100644
index 1484a96d27b..00000000000
--- a/db/post_migrate/20220506123922_add_not_null_constraint_without_validation_to_requirements_issue_id.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class AddNotNullConstraintWithoutValidationToRequirementsIssueId < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- CONSTRAINT_NAME = 'check_requirement_issue_not_null'
-
- def up
- add_not_null_constraint(
- :requirements,
- :issue_id,
- constraint_name: CONSTRAINT_NAME,
- validate: false
- )
- end
-
- def down
- remove_not_null_constraint :requirements, :issue_id, constraint_name: CONSTRAINT_NAME
- end
-end
diff --git a/db/post_migrate/20220506124021_schedule_populate_requirements_issue_id.rb b/db/post_migrate/20220506124021_schedule_populate_requirements_issue_id.rb
deleted file mode 100644
index 8f22324bf8d..00000000000
--- a/db/post_migrate/20220506124021_schedule_populate_requirements_issue_id.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-# frozen_string_literal: true
-
-class SchedulePopulateRequirementsIssueId < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- # 2022-05-06 There are no requirements with nil issue_id on .com
- # this migration is supposed to fix records that could have nil issue_id
- # on self managed instances.
- BATCH_SIZE = 100
-
- MIGRATION = 'MigrateRequirementsToWorkItems'
-
- disable_ddl_transaction!
-
- class Requirement < MigrationRecord
- include EachBatch
-
- self.table_name = 'requirements'
- end
-
- def up
- queue_background_migration_jobs_by_range_at_intervals(
- Requirement.where(issue_id: nil),
- MIGRATION,
- 2.minutes,
- batch_size: BATCH_SIZE,
- track_jobs: true
- )
- end
-
- def down
- # NO OP
- end
-end
diff --git a/db/post_migrate/20220506201639_remove_devops_adoption_security_scan_succeeded_column.rb b/db/post_migrate/20220506201639_remove_devops_adoption_security_scan_succeeded_column.rb
deleted file mode 100644
index 64722919aff..00000000000
--- a/db/post_migrate/20220506201639_remove_devops_adoption_security_scan_succeeded_column.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveDevopsAdoptionSecurityScanSucceededColumn < Gitlab::Database::Migration[2.0]
- def up
- remove_column :analytics_devops_adoption_snapshots, :security_scan_succeeded
- end
-
- def down
- add_column :analytics_devops_adoption_snapshots, :security_scan_succeeded, :boolean
- end
-end
diff --git a/db/post_migrate/20220510003916_remove_tmp_empty_traversal_ids_root_namespace_index.rb b/db/post_migrate/20220510003916_remove_tmp_empty_traversal_ids_root_namespace_index.rb
deleted file mode 100644
index 424c6f164e7..00000000000
--- a/db/post_migrate/20220510003916_remove_tmp_empty_traversal_ids_root_namespace_index.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveTmpEmptyTraversalIdsRootNamespaceIndex < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- ROOT_NS_INDEX_NAME = 'tmp_index_namespaces_empty_traversal_ids_with_root_namespaces'
-
- def up
- remove_concurrent_index :namespaces, :id, name: ROOT_NS_INDEX_NAME
- end
-
- def down
- where_sql = "parent_id IS NULL AND traversal_ids = '{}'"
- add_concurrent_index :namespaces, :id, where: where_sql, name: ROOT_NS_INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220510004501_remove_tmp_empty_traversal_ids_child_namespace_index.rb b/db/post_migrate/20220510004501_remove_tmp_empty_traversal_ids_child_namespace_index.rb
deleted file mode 100644
index 804b20a38e9..00000000000
--- a/db/post_migrate/20220510004501_remove_tmp_empty_traversal_ids_child_namespace_index.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveTmpEmptyTraversalIdsChildNamespaceIndex < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- CHILD_INDEX_NAME = 'tmp_index_namespaces_empty_traversal_ids_with_child_namespaces'
-
- def up
- remove_concurrent_index :namespaces, :id, name: CHILD_INDEX_NAME
- end
-
- def down
- where_sql = "parent_id IS NOT NULL AND traversal_ids = '{}'"
- add_concurrent_index :namespaces, :id, where: where_sql, name: CHILD_INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220510121338_remove_threat_monitoring_alerts.rb b/db/post_migrate/20220510121338_remove_threat_monitoring_alerts.rb
deleted file mode 100644
index ff171ee516c..00000000000
--- a/db/post_migrate/20220510121338_remove_threat_monitoring_alerts.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveThreatMonitoringAlerts < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- execute("DELETE FROM alert_management_alerts WHERE domain = 1")
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220510192117_index_expirable_unknown_artifacts_for_removal.rb b/db/post_migrate/20220510192117_index_expirable_unknown_artifacts_for_removal.rb
deleted file mode 100644
index 3e25ca6c7b9..00000000000
--- a/db/post_migrate/20220510192117_index_expirable_unknown_artifacts_for_removal.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class IndexExpirableUnknownArtifactsForRemoval < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- TABLE_NAME = 'ci_job_artifacts'
- INDEX_NAME = 'tmp_index_ci_job_artifacts_on_expire_at_where_locked_unknown'
- CONDITIONS = 'locked = 2 AND expire_at IS NOT NULL'
-
- def up
- prepare_async_index TABLE_NAME, [:expire_at, :job_id], name: INDEX_NAME, where: CONDITIONS
- end
-
- def down
- unprepare_async_index_by_name TABLE_NAME, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220511152439_remove_not_null_constraint_from_work_item_type.rb b/db/post_migrate/20220511152439_remove_not_null_constraint_from_work_item_type.rb
deleted file mode 100644
index f56763cdafb..00000000000
--- a/db/post_migrate/20220511152439_remove_not_null_constraint_from_work_item_type.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveNotNullConstraintFromWorkItemType < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- # https://gitlab.com/gitlab-org/gitlab/-/merge_requests/85866 introduced a NOT NULL constraint on
- # `issues` which caused QA failures (https://gitlab.com/gitlab-org/gitlab/-/issues/362023), and
- # Helm database issues resulting in broken tests after restoring the database.
- def up
- remove_not_null_constraint :issues, :work_item_type_id, constraint_name: 'check_2addf801cd'
- end
-
- def down
- add_not_null_constraint :issues, :work_item_type_id, validate: false
- end
-end
diff --git a/db/post_migrate/20220511212620_add_index_on_expirable_unknown_artifacts_for_removal.rb b/db/post_migrate/20220511212620_add_index_on_expirable_unknown_artifacts_for_removal.rb
deleted file mode 100644
index fc9912d714e..00000000000
--- a/db/post_migrate/20220511212620_add_index_on_expirable_unknown_artifacts_for_removal.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexOnExpirableUnknownArtifactsForRemoval < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- TABLE_NAME = 'ci_job_artifacts'
- INDEX_NAME = 'tmp_index_ci_job_artifacts_on_expire_at_where_locked_unknown'
- CONDITIONS = 'locked = 2 AND expire_at IS NOT NULL'
-
- def up
- add_concurrent_index TABLE_NAME, [:expire_at, :job_id], name: INDEX_NAME, where: CONDITIONS
- end
-
- def down
- remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220512190659_remove_web_hooks_web_hook_logs_web_hook_id_fk.rb b/db/post_migrate/20220512190659_remove_web_hooks_web_hook_logs_web_hook_id_fk.rb
deleted file mode 100644
index b73d3a7f102..00000000000
--- a/db/post_migrate/20220512190659_remove_web_hooks_web_hook_logs_web_hook_id_fk.rb
+++ /dev/null
@@ -1,50 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveWebHooksWebHookLogsWebHookIdFk < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- PARENT_TABLE_NAME = :web_hook_logs
- FK_NAME = "fk_rails_bb3355782d"
-
- def up
- with_lock_retries do
- execute('LOCK web_hooks, web_hook_logs IN ACCESS EXCLUSIVE MODE') if transaction_open?
-
- remove_foreign_key_if_exists(:web_hook_logs, :web_hooks, name: FK_NAME)
- end
- end
-
- def down
- fk_attrs = {
- name: FK_NAME, # Note we need the same name for every partition
- column: :web_hook_id,
- target_column: :id,
- on_delete: :cascade
- }
-
- # Must add child FK's first, then to the partitioned table.
- child_tables.each do |tbl|
- add_concurrent_foreign_key(
- tbl, :web_hooks,
- # This embeds the lock table statement in the with_lock_retries inside add_concurrent_foreign_key
- reverse_lock_order: true,
- **fk_attrs)
- end
-
- with_lock_retries do
- execute("LOCK web_hooks, #{PARENT_TABLE_NAME} IN ACCESS EXCLUSIVE MODE") if transaction_open?
- add_foreign_key(:web_hook_logs, :web_hooks, **fk_attrs)
- end
- end
-
- # This table is partitioned: we need to apply the index changes to each
- # partition separately.
- def child_tables
- @child_tables ||= execute(<<~SQL.squish).pluck("child")
- SELECT inhrelid::regclass AS child
- FROM pg_catalog.pg_inherits
- WHERE inhparent = '#{PARENT_TABLE_NAME}'::regclass
- ORDER BY inhrelid ASC
- SQL
- end
-end
diff --git a/db/post_migrate/20220513043344_reschedule_expire_o_auth_tokens.rb b/db/post_migrate/20220513043344_reschedule_expire_o_auth_tokens.rb
deleted file mode 100644
index 4b24b1cf65a..00000000000
--- a/db/post_migrate/20220513043344_reschedule_expire_o_auth_tokens.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-class RescheduleExpireOAuthTokens < Gitlab::Database::Migration[2.0]
- MIGRATION = 'ExpireOAuthTokens'
- INTERVAL = 2.minutes.freeze
-
- disable_ddl_transaction!
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- # remove the original migration from db/post_migrate/20220428133724_schedule_expire_o_auth_tokens.rb
- delete_batched_background_migration(MIGRATION, :oauth_access_tokens, :id, [])
-
- # reschedule
- queue_batched_background_migration(
- MIGRATION,
- :oauth_access_tokens,
- :id,
- job_interval: INTERVAL
- )
- end
-
- def down
- delete_batched_background_migration(MIGRATION, :oauth_access_tokens, :id, [])
- end
-end
diff --git a/db/post_migrate/20220516054011_schedule_backfill_project_member_namespace_id.rb b/db/post_migrate/20220516054011_schedule_backfill_project_member_namespace_id.rb
deleted file mode 100644
index e721fdf8c44..00000000000
--- a/db/post_migrate/20220516054011_schedule_backfill_project_member_namespace_id.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleBackfillProjectMemberNamespaceId < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- MIGRATION = 'BackfillProjectMemberNamespaceId'
- INTERVAL = 2.minutes
- BATCH_SIZE = 1_000
- MAX_BATCH_SIZE = 2_000
- SUB_BATCH_SIZE = 200
-
- disable_ddl_transaction!
-
- def up
- queue_batched_background_migration(
- MIGRATION,
- :members,
- :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, :members, :id, [])
- end
-end
diff --git a/db/post_migrate/20220516100652_drop_compliance_management_frameworks_regulated.rb b/db/post_migrate/20220516100652_drop_compliance_management_frameworks_regulated.rb
deleted file mode 100644
index f9d3405d486..00000000000
--- a/db/post_migrate/20220516100652_drop_compliance_management_frameworks_regulated.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class DropComplianceManagementFrameworksRegulated < Gitlab::Database::Migration[2.0]
- def up
- remove_column :compliance_management_frameworks, :regulated
- end
-
- def down
- add_column :compliance_management_frameworks, :regulated, :boolean, default: true
- end
-end
diff --git a/db/post_migrate/20220516103353_finalize_routes_backfilling_for_projects.rb b/db/post_migrate/20220516103353_finalize_routes_backfilling_for_projects.rb
deleted file mode 100644
index f65003b5da9..00000000000
--- a/db/post_migrate/20220516103353_finalize_routes_backfilling_for_projects.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class FinalizeRoutesBackfillingForProjects < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- MIGRATION = 'BackfillNamespaceIdForProjectRoute'
-
- def up
- ensure_batched_background_migration_is_finished(
- job_class_name: MIGRATION,
- table_name: :routes,
- column_name: :id,
- job_arguments: []
- )
- end
-
- def down
- # noop
- end
-end
diff --git a/db/post_migrate/20220517101119_create_confidential_notes_index_synchronously.rb b/db/post_migrate/20220517101119_create_confidential_notes_index_synchronously.rb
deleted file mode 100644
index 25b7fe7f7bb..00000000000
--- a/db/post_migrate/20220517101119_create_confidential_notes_index_synchronously.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class CreateConfidentialNotesIndexSynchronously < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_notes_on_confidential'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :notes, :confidential, where: 'confidential = true', name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :notes, name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220517133753_migrate_free_user_cap_remediation.rb b/db/post_migrate/20220517133753_migrate_free_user_cap_remediation.rb
deleted file mode 100644
index 44f30134c94..00000000000
--- a/db/post_migrate/20220517133753_migrate_free_user_cap_remediation.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class MigrateFreeUserCapRemediation < Gitlab::Database::Migration[2.0]
- def up
- sidekiq_queue_migrate 'cronjob:namespaces_free_user_cap', to: 'cronjob:namespaces_free_user_cap_remediation'
- end
-
- def down
- sidekiq_queue_migrate 'cronjob:namespaces_free_user_cap_remediation', to: 'cronjob:namespaces_free_user_cap'
- end
-end
diff --git a/db/post_migrate/20220517144749_remove_vulnerability_approval_rules.rb b/db/post_migrate/20220517144749_remove_vulnerability_approval_rules.rb
deleted file mode 100644
index 83e3784c3aa..00000000000
--- a/db/post_migrate/20220517144749_remove_vulnerability_approval_rules.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-# See https://docs.gitlab.com/ee/development/migration_style_guide.html
-# for more information on how to write migrations for GitLab.
-
-class RemoveVulnerabilityApprovalRules < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- class ApprovalProjectRule < MigrationRecord
- self.table_name = 'approval_project_rules'
-
- enum report_type: { vulnerability: 1, license_scanning: 2, code_coverage: 3, scan_finding: 4 }
- end
-
- def up
- return unless Gitlab.ee?
-
- ApprovalProjectRule.reset_column_information
-
- ApprovalProjectRule.vulnerability.delete_all
- end
-
- def down
- # no-op
- # Vulnerability-Check feature has been removed as part of 15.0
- end
-end
diff --git a/db/post_migrate/20220518102414_add_index_to_error_tracking_client_keys.rb b/db/post_migrate/20220518102414_add_index_to_error_tracking_client_keys.rb
deleted file mode 100644
index 25923bf00f6..00000000000
--- a/db/post_migrate/20220518102414_add_index_to_error_tracking_client_keys.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexToErrorTrackingClientKeys < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_error_tracking_client_for_enabled_check'
-
- def up
- add_concurrent_index(
- :error_tracking_client_keys,
- [:project_id, :public_key],
- where: 'active = true',
- name: INDEX_NAME
- )
- end
-
- def down
- remove_concurrent_index_by_name(:error_tracking_client_keys, INDEX_NAME)
- end
-end
diff --git a/db/post_migrate/20220519045133_bulk_insert_cluster_enabled_grants.rb b/db/post_migrate/20220519045133_bulk_insert_cluster_enabled_grants.rb
deleted file mode 100644
index 6c1d9058673..00000000000
--- a/db/post_migrate/20220519045133_bulk_insert_cluster_enabled_grants.rb
+++ /dev/null
@@ -1,46 +0,0 @@
-# frozen_string_literal: true
-
-class BulkInsertClusterEnabledGrants < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- disable_ddl_transaction!
-
- def up
- return unless Gitlab.dev_or_test_env? || Gitlab.com?
-
- define_batchable_model('cluster_groups').each_batch do |batch|
- min, max = batch.pick('MIN(id), MAX(id)')
-
- bulk_insert = <<-SQL
- INSERT INTO cluster_enabled_grants (namespace_id, created_at)
- SELECT DISTINCT(traversal_ids[1]), NOW()
- FROM cluster_groups
- INNER JOIN namespaces ON cluster_groups.group_id = namespaces.id
- WHERE cluster_groups.id BETWEEN #{min} AND #{max}
- ON CONFLICT (namespace_id) DO NOTHING
- SQL
-
- connection.execute(bulk_insert)
- end
-
- define_batchable_model('cluster_projects').each_batch do |batch|
- min, max = batch.pick('MIN(id), MAX(id)')
-
- bulk_insert = <<-SQL
- INSERT INTO cluster_enabled_grants (namespace_id, created_at)
- SELECT DISTINCT(traversal_ids[1]), NOW()
- FROM cluster_projects
- INNER JOIN projects ON cluster_projects.project_id = projects.id
- INNER JOIN namespaces on projects.namespace_id = namespaces.id
- WHERE cluster_projects.id BETWEEN #{min} AND #{max}
- ON CONFLICT (namespace_id) DO NOTHING
- SQL
-
- connection.execute(bulk_insert)
- end
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220520040416_schedule_set_legacy_open_source_license_available_for_non_public_projects.rb b/db/post_migrate/20220520040416_schedule_set_legacy_open_source_license_available_for_non_public_projects.rb
deleted file mode 100644
index a9bb09b3378..00000000000
--- a/db/post_migrate/20220520040416_schedule_set_legacy_open_source_license_available_for_non_public_projects.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleSetLegacyOpenSourceLicenseAvailableForNonPublicProjects < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- # Replaced by 20220722110026_reschedule_set_legacy_open_source_license_available_for_non_public_projects.rb
- end
-
- def down
- # Replaced by 20220722110026_reschedule_set_legacy_open_source_license_available_for_non_public_projects.rb
- end
-end
diff --git a/db/post_migrate/20220523164734_add_foreign_key_to_vulnerability_reads_casted_cluster_agent_id.rb b/db/post_migrate/20220523164734_add_foreign_key_to_vulnerability_reads_casted_cluster_agent_id.rb
deleted file mode 100644
index 364570973ab..00000000000
--- a/db/post_migrate/20220523164734_add_foreign_key_to_vulnerability_reads_casted_cluster_agent_id.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class AddForeignKeyToVulnerabilityReadsCastedClusterAgentId < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :vulnerability_reads, :cluster_agents,
- column: :casted_cluster_agent_id, on_delete: :nullify
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :vulnerability_reads, :cluster_agents, column: :casted_cluster_agent_id
- end
- end
-end
diff --git a/db/post_migrate/20220523165734_add_index_to_vulnerability_reads_casted_cluster_agent_id.rb b/db/post_migrate/20220523165734_add_index_to_vulnerability_reads_casted_cluster_agent_id.rb
deleted file mode 100644
index 51842af3f12..00000000000
--- a/db/post_migrate/20220523165734_add_index_to_vulnerability_reads_casted_cluster_agent_id.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexToVulnerabilityReadsCastedClusterAgentId < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_cis_vulnerability_reads_on_cluster_agent_id'
-
- def up
- add_concurrent_index :vulnerability_reads, :casted_cluster_agent_id, name: INDEX_NAME, where: 'report_type = 7'
- end
-
- def down
- remove_concurrent_index_by_name :vulnerability_reads, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220523171107_drop_deploy_tokens_token_column.rb b/db/post_migrate/20220523171107_drop_deploy_tokens_token_column.rb
deleted file mode 100644
index 79a145bc466..00000000000
--- a/db/post_migrate/20220523171107_drop_deploy_tokens_token_column.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class DropDeployTokensTokenColumn < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- COMPOSITE_INDEX_NAME = 'index_deploy_tokens_on_token_and_expires_at_and_id'
-
- def up
- remove_column :deploy_tokens, :token
- end
-
- def down
- unless column_exists?(:deploy_tokens, :token)
- add_column :deploy_tokens, :token, :string
- end
-
- add_concurrent_index(:deploy_tokens, :token, unique: true)
- add_concurrent_index(:deploy_tokens, %i[token expires_at id], where: 'revoked IS FALSE', name: COMPOSITE_INDEX_NAME)
- end
-end
diff --git a/db/post_migrate/20220524074947_finalize_backfill_null_note_discussion_ids.rb b/db/post_migrate/20220524074947_finalize_backfill_null_note_discussion_ids.rb
deleted file mode 100644
index 45dbc028b18..00000000000
--- a/db/post_migrate/20220524074947_finalize_backfill_null_note_discussion_ids.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-class FinalizeBackfillNullNoteDiscussionIds < Gitlab::Database::Migration[2.0]
- MIGRATION = 'BackfillNoteDiscussionId'
- BATCH_SIZE = 10_000
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- disable_ddl_transaction!
-
- def up
- Gitlab::BackgroundMigration.steal(MIGRATION)
-
- define_batchable_model('notes').where(discussion_id: nil).each_batch(of: BATCH_SIZE) do |batch|
- range = batch.pick('MIN(id)', 'MAX(id)')
-
- Gitlab::BackgroundMigration::BackfillNoteDiscussionId.new.perform(*range)
- end
- end
-
- def down
- end
-end
diff --git a/db/post_migrate/20220524080944_cleanup_orphaned_routes.rb b/db/post_migrate/20220524080944_cleanup_orphaned_routes.rb
deleted file mode 100644
index a5ce0ba4646..00000000000
--- a/db/post_migrate/20220524080944_cleanup_orphaned_routes.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-class CleanupOrphanedRoutes < Gitlab::Database::Migration[2.0]
- MIGRATION = 'CleanupOrphanedRoutes'
- DELAY_INTERVAL = 2.minutes
- BATCH_SIZE = 100_000
- MAX_BATCH_SIZE = 100_000
- SUB_BATCH_SIZE = 100
-
- disable_ddl_transaction!
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- queue_batched_background_migration(
- MIGRATION,
- :routes,
- :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, :routes, :id, [])
- end
-end
diff --git a/db/post_migrate/20220524081955_remove_notes_null_discussion_id_temp_index.rb b/db/post_migrate/20220524081955_remove_notes_null_discussion_id_temp_index.rb
deleted file mode 100644
index caca7b0b092..00000000000
--- a/db/post_migrate/20220524081955_remove_notes_null_discussion_id_temp_index.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveNotesNullDiscussionIdTempIndex < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'tmp_index_notes_on_id_where_discussion_id_is_null'
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :notes, INDEX_NAME
- end
-
- def down
- add_concurrent_index :notes, :id, where: 'discussion_id IS NULL', name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220524132416_prepare_job_artifact_project_id_index.rb b/db/post_migrate/20220524132416_prepare_job_artifact_project_id_index.rb
deleted file mode 100644
index 4e27e7f0624..00000000000
--- a/db/post_migrate/20220524132416_prepare_job_artifact_project_id_index.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class PrepareJobArtifactProjectIdIndex < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_ci_job_artifacts_on_project_id_and_id'
-
- def up
- prepare_async_index :ci_job_artifacts, [:project_id, :id], name: INDEX_NAME
- end
-
- def down
- unprepare_async_index :notes, [:project_id, :id], name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220524202158_drop_index_on_deployments_on_created_at_cluster_id_and_project_id.rb b/db/post_migrate/20220524202158_drop_index_on_deployments_on_created_at_cluster_id_and_project_id.rb
deleted file mode 100644
index 91b1e5f8ce3..00000000000
--- a/db/post_migrate/20220524202158_drop_index_on_deployments_on_created_at_cluster_id_and_project_id.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class DropIndexOnDeploymentsOnCreatedAtClusterIdAndProjectId < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'tp_index_created_at_cluster_id_project_id_on_deployments'
-
- def up
- remove_concurrent_index_by_name :deployments, INDEX_NAME
- end
-
- def down
- # no-op
- #
- # There's no need to re-add this index as it's purpose was temporary, served only
- # for a specific CR query which is now closed, and should not be re-opened.
- end
-end
diff --git a/db/post_migrate/20220525131557_cleanup_backfill_integrations_enable_ssl_verification.rb b/db/post_migrate/20220525131557_cleanup_backfill_integrations_enable_ssl_verification.rb
deleted file mode 100644
index 3bd4b21c6fd..00000000000
--- a/db/post_migrate/20220525131557_cleanup_backfill_integrations_enable_ssl_verification.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class CleanupBackfillIntegrationsEnableSslVerification < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- MIGRATION = 'BackfillIntegrationsEnableSslVerification'
-
- def up
- finalize_background_migration(MIGRATION)
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220525131624_drop_temporary_index_for_backfill_integrations_enable_ssl_verification.rb b/db/post_migrate/20220525131624_drop_temporary_index_for_backfill_integrations_enable_ssl_verification.rb
deleted file mode 100644
index 95abac4b7ac..00000000000
--- a/db/post_migrate/20220525131624_drop_temporary_index_for_backfill_integrations_enable_ssl_verification.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class DropTemporaryIndexForBackfillIntegrationsEnableSslVerification < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'tmp_index_integrations_on_id_where_type_droneci_or_teamcity'
- INDEX_CONDITION = "type_new IN ('Integrations::DroneCi', 'Integrations::Teamcity') " \
- "AND encrypted_properties IS NOT NULL"
-
- def up
- remove_concurrent_index_by_name :integrations, INDEX_NAME
- end
-
- def down
- # this index is used in 20220209121435_backfill_integrations_enable_ssl_verification
- add_concurrent_index :integrations, :id, where: INDEX_CONDITION, name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220525141540_migrate_project_service_worker_queue.rb b/db/post_migrate/20220525141540_migrate_project_service_worker_queue.rb
deleted file mode 100644
index acfb8b227fe..00000000000
--- a/db/post_migrate/20220525141540_migrate_project_service_worker_queue.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class MigrateProjectServiceWorkerQueue < Gitlab::Database::Migration[2.0]
- def up
- sidekiq_queue_migrate 'project_service', to: 'integrations_execute'
- end
-
- def down
- sidekiq_queue_migrate 'integrations_execute', to: 'project_service'
- end
-end
diff --git a/db/post_migrate/20220525165334_migrate_irker_worker_queue.rb b/db/post_migrate/20220525165334_migrate_irker_worker_queue.rb
deleted file mode 100644
index 19454c007c8..00000000000
--- a/db/post_migrate/20220525165334_migrate_irker_worker_queue.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class MigrateIrkerWorkerQueue < Gitlab::Database::Migration[2.0]
- def up
- sidekiq_queue_migrate 'irker', to: 'integrations_irker'
- end
-
- def down
- sidekiq_queue_migrate 'integrations_irker', to: 'irker'
- end
-end
diff --git a/db/post_migrate/20220525172001_migrate_cluster_integration_worker_queues.rb b/db/post_migrate/20220525172001_migrate_cluster_integration_worker_queues.rb
deleted file mode 100644
index 4372ca9f965..00000000000
--- a/db/post_migrate/20220525172001_migrate_cluster_integration_worker_queues.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class MigrateClusterIntegrationWorkerQueues < Gitlab::Database::Migration[2.0]
- def up
- sidekiq_queue_migrate 'gcp_cluster:clusters_applications_activate_service',
- to: 'gcp_cluster:clusters_applications_activate_integration'
- sidekiq_queue_migrate 'gcp_cluster:clusters_applications_deactivate_service',
- to: 'gcp_cluster:clusters_applications_deactivate_integration'
- end
-
- def down
- sidekiq_queue_migrate 'gcp_cluster:clusters_applications_activate_integration',
- to: 'gcp_cluster:clusters_applications_activate_service'
- sidekiq_queue_migrate 'gcp_cluster:clusters_applications_deactivate_integration',
- to: 'gcp_cluster:clusters_applications_deactivate_service'
- end
-end
diff --git a/db/post_migrate/20220525201022_add_temporary_index_for_vulnerability_reads_cluster_agent_id_migration.rb b/db/post_migrate/20220525201022_add_temporary_index_for_vulnerability_reads_cluster_agent_id_migration.rb
deleted file mode 100644
index b795a41e9cd..00000000000
--- a/db/post_migrate/20220525201022_add_temporary_index_for_vulnerability_reads_cluster_agent_id_migration.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class AddTemporaryIndexForVulnerabilityReadsClusterAgentIdMigration < Gitlab::Database::Migration[2.0]
- INDEX_VULNERABILITY_READS_NAME = 'tmp_index_cis_vulnerability_reads_on_id'
-
- disable_ddl_transaction!
-
- def up
- # this index is used in 20220525221133_schedule_backfill_vulnerability_reads_cluster_agent
- add_concurrent_index :vulnerability_reads, :id, name: INDEX_VULNERABILITY_READS_NAME, where: 'report_type = 7'
- end
-
- def down
- remove_concurrent_index_by_name :vulnerability_reads, INDEX_VULNERABILITY_READS_NAME
- end
-end
diff --git a/db/post_migrate/20220525221133_schedule_backfill_vulnerability_reads_cluster_agent.rb b/db/post_migrate/20220525221133_schedule_backfill_vulnerability_reads_cluster_agent.rb
deleted file mode 100644
index bf83781e89c..00000000000
--- a/db/post_migrate/20220525221133_schedule_backfill_vulnerability_reads_cluster_agent.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleBackfillVulnerabilityReadsClusterAgent < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- BATCH_SIZE = 10_000
- SUB_BATCH_SIZE = 1_000
- DELAY_INTERVAL = 2.minutes
- MIGRATION_NAME = 'BackfillVulnerabilityReadsClusterAgent'
- BATCH_CLASS_NAME = 'BackfillVulnerabilityReadsClusterAgentBatchingStrategy'
-
- disable_ddl_transaction!
-
- def up
- queue_batched_background_migration(
- MIGRATION_NAME,
- :vulnerability_reads,
- :id,
- job_interval: DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- batch_class_name: BATCH_CLASS_NAME,
- sub_batch_size: SUB_BATCH_SIZE
- )
- end
-
- def down
- delete_batched_background_migration(MIGRATION_NAME, :vulnerability_reads, :id, [])
- end
-end
diff --git a/db/post_migrate/20220526042017_remove_geo_lfs_object_deleted_event_references.rb b/db/post_migrate/20220526042017_remove_geo_lfs_object_deleted_event_references.rb
deleted file mode 100644
index 4569424dca0..00000000000
--- a/db/post_migrate/20220526042017_remove_geo_lfs_object_deleted_event_references.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveGeoLfsObjectDeletedEventReferences < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- remove_column :geo_event_log, :lfs_object_deleted_event_id, :bigint
- end
- end
-
- def down
- with_lock_retries do
- unless column_exists?(:geo_event_log, :lfs_object_deleted_event_id)
- add_column(:geo_event_log, :lfs_object_deleted_event_id, :bigint)
- end
- end
-
- add_concurrent_foreign_key :geo_event_log, :geo_lfs_object_deleted_events,
- column: :lfs_object_deleted_event_id,
- name: 'fk_d5af95fcd9',
- on_delete: :cascade
-
- add_concurrent_index :geo_event_log,
- :lfs_object_deleted_event_id,
- name: 'index_geo_event_log_on_lfs_object_deleted_event_id',
- where: "(lfs_object_deleted_event_id IS NOT NULL)"
- end
-end
diff --git a/db/post_migrate/20220526044516_remove_geo_lfs_object_deleted_events_table.rb b/db/post_migrate/20220526044516_remove_geo_lfs_object_deleted_events_table.rb
deleted file mode 100644
index 29a2e34aefa..00000000000
--- a/db/post_migrate/20220526044516_remove_geo_lfs_object_deleted_events_table.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveGeoLfsObjectDeletedEventsTable < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- drop_table :geo_lfs_object_deleted_events
- end
-
- def down
- create_table :geo_lfs_object_deleted_events, id: :bigserial do |t|
- t.integer :lfs_object_id, null: false, index: true
- t.string :oid, null: false
- t.string :file_path, null: false
- end
- end
-end
diff --git a/db/post_migrate/20220530044712_add_index_for_vulnerability_reads_location_image.rb b/db/post_migrate/20220530044712_add_index_for_vulnerability_reads_location_image.rb
deleted file mode 100644
index 384924941c1..00000000000
--- a/db/post_migrate/20220530044712_add_index_for_vulnerability_reads_location_image.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexForVulnerabilityReadsLocationImage < Gitlab::Database::Migration[2.0]
- INDEX = :index_vulnerability_reads_on_location_image_partial
-
- disable_ddl_transaction!
-
- REPORT_TYPES = {
- container_scanning: 2,
- cluster_image_scanning: 7
- }
-
- QUERY = <<~SQL
- report_type in (#{REPORT_TYPES[:container_scanning]}, #{REPORT_TYPES[:cluster_image_scanning]}) AND
- location_image IS NOT NULL
- SQL
-
- def up
- add_concurrent_index :vulnerability_reads, [:project_id, :location_image],
- where: QUERY,
- name: INDEX
- end
-
- def down
- remove_concurrent_index_by_name :vulnerability_reads, INDEX
- end
-end
diff --git a/db/post_migrate/20220530074027_add_project_id_index_to_job_artifacts.rb b/db/post_migrate/20220530074027_add_project_id_index_to_job_artifacts.rb
deleted file mode 100644
index fb75f368835..00000000000
--- a/db/post_migrate/20220530074027_add_project_id_index_to_job_artifacts.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddProjectIdIndexToJobArtifacts < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_ci_job_artifacts_on_project_id_and_id'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :ci_job_artifacts, [:project_id, :id], name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :ci_job_artifacts, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220530082653_add_traversal_id_type_group_index.rb b/db/post_migrate/20220530082653_add_traversal_id_type_group_index.rb
deleted file mode 100644
index e8080bc89dc..00000000000
--- a/db/post_migrate/20220530082653_add_traversal_id_type_group_index.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddTraversalIdTypeGroupIndex < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_namespaces_on_traversal_ids_for_groups_btree'
-
- disable_ddl_transaction!
-
- # rubocop:disable Migration/PreventIndexCreation
- def up
- add_concurrent_index :namespaces, :traversal_ids, using: :btree, where: "type='Group'", name: INDEX_NAME
- end
- # rubocop:enable Migration/PreventIndexCreation
-
- def down
- remove_concurrent_index_by_name :namespaces, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220530170915_add_index_for_vulnerability_state_transition.rb b/db/post_migrate/20220530170915_add_index_for_vulnerability_state_transition.rb
deleted file mode 100644
index 46ff79c2441..00000000000
--- a/db/post_migrate/20220530170915_add_index_for_vulnerability_state_transition.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexForVulnerabilityStateTransition < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
- NEW_INDEX_NAME = 'index_vulnerability_state_transitions_id_and_vulnerability_id'
- OLD_INDEX_NAME = 'index_vulnerability_state_transitions_on_vulnerability_id'
-
- def up
- add_concurrent_index(:vulnerability_state_transitions, [:vulnerability_id, :id], name: NEW_INDEX_NAME)
-
- remove_concurrent_index_by_name(:vulnerability_state_transitions, OLD_INDEX_NAME)
- end
-
- def down
- remove_concurrent_index_by_name(:vulnerability_state_transitions, NEW_INDEX_NAME)
-
- add_concurrent_index(:vulnerability_state_transitions, [:vulnerability_id], name: OLD_INDEX_NAME)
- end
-end
diff --git a/db/post_migrate/20220531024142_track_clusters_deletions.rb b/db/post_migrate/20220531024142_track_clusters_deletions.rb
deleted file mode 100644
index a9c4e50f7dc..00000000000
--- a/db/post_migrate/20220531024142_track_clusters_deletions.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class TrackClustersDeletions < Gitlab::Database::Migration[2.0]
- include Gitlab::Database::MigrationHelpers::LooseForeignKeyHelpers
-
- enable_lock_retries!
-
- def up
- track_record_deletions(:clusters)
- end
-
- def down
- untrack_record_deletions(:clusters)
- end
-end
diff --git a/db/post_migrate/20220531024143_remove_clusters_deployments_cluster_id_fk.rb b/db/post_migrate/20220531024143_remove_clusters_deployments_cluster_id_fk.rb
deleted file mode 100644
index 261a06a9b9c..00000000000
--- a/db/post_migrate/20220531024143_remove_clusters_deployments_cluster_id_fk.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveClustersDeploymentsClusterIdFk < Gitlab::Database::Migration[2.0]
- FK_NAME = 'fk_289bba3222'
-
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- remove_foreign_key_if_exists(
- :deployments,
- :clusters,
- name: FK_NAME,
- reverse_lock_order: true
- )
- end
- end
-
- def down
- add_concurrent_foreign_key(
- :deployments,
- :clusters,
- name: FK_NAME,
- column: :cluster_id,
- target_column: :id,
- on_delete: :nullify
- )
- end
-end
diff --git a/db/post_migrate/20220531035113_populate_operation_visibility_permissions.rb b/db/post_migrate/20220531035113_populate_operation_visibility_permissions.rb
deleted file mode 100644
index 1d385b13f75..00000000000
--- a/db/post_migrate/20220531035113_populate_operation_visibility_permissions.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-class PopulateOperationVisibilityPermissions < Gitlab::Database::Migration[2.0]
- BATCH_SIZE = 50_000
- MAX_BATCH_SIZE = 50_000
- SUB_BATCH_SIZE = 1_000
- INTERVAL = 2.minutes
- MIGRATION = 'PopulateOperationVisibilityPermissionsFromOperations'
-
- disable_ddl_transaction!
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- queue_batched_background_migration(
- MIGRATION,
- :project_features,
- :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, :project_features, :id, [])
- end
-end
diff --git a/db/post_migrate/20220531233600_remove_sse_usage_data_from_redis.rb b/db/post_migrate/20220531233600_remove_sse_usage_data_from_redis.rb
deleted file mode 100644
index 26ae9aed5cc..00000000000
--- a/db/post_migrate/20220531233600_remove_sse_usage_data_from_redis.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveSseUsageDataFromRedis < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- Gitlab::Redis::SharedState.with { |r| r.del("USAGE_STATIC_SITE_EDITOR_VIEWS") }
- Gitlab::Redis::SharedState.with { |r| r.del("USAGE_STATIC_SITE_EDITOR_COMMITS") }
- Gitlab::Redis::SharedState.with { |r| r.del("USAGE_STATIC_SITE_EDITOR_MERGE_REQUESTS") }
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220601040233_finalize_backfill_issue_search_data.rb b/db/post_migrate/20220601040233_finalize_backfill_issue_search_data.rb
deleted file mode 100644
index 7b5cd405fa8..00000000000
--- a/db/post_migrate/20220601040233_finalize_backfill_issue_search_data.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class FinalizeBackfillIssueSearchData < Gitlab::Database::Migration[2.0]
- MIGRATION = 'BackfillIssueSearchData'
- disable_ddl_transaction!
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- ensure_batched_background_migration_is_finished(
- job_class_name: MIGRATION,
- table_name: :issues,
- column_name: :id,
- job_arguments: [],
- finalize: true
- )
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220601151900_schedule_backfill_ci_runner_semver.rb b/db/post_migrate/20220601151900_schedule_backfill_ci_runner_semver.rb
deleted file mode 100644
index 9c62ec1b87b..00000000000
--- a/db/post_migrate/20220601151900_schedule_backfill_ci_runner_semver.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleBackfillCiRunnerSemver < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_ci
-
- MIGRATION = 'BackfillCiRunnerSemver'
- INTERVAL = 2.minutes.freeze
- BATCH_SIZE = 500
- MAX_BATCH_SIZE = 10_000
- SUB_BATCH_SIZE = 100
-
- disable_ddl_transaction!
-
- def up
- # Disabled background migration introduced in same milestone as it was decided to change approach
- # and the semver column will no longer be needed
- # queue_batched_background_migration(
- # MIGRATION,
- # :ci_runners,
- # :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, :ci_runners, :id, [])
- end
-end
diff --git a/db/post_migrate/20220601152916_add_user_id_and_ip_address_success_index_to_authentication_events.rb b/db/post_migrate/20220601152916_add_user_id_and_ip_address_success_index_to_authentication_events.rb
deleted file mode 100644
index aa860959c20..00000000000
--- a/db/post_migrate/20220601152916_add_user_id_and_ip_address_success_index_to_authentication_events.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddUserIdAndIpAddressSuccessIndexToAuthenticationEvents < Gitlab::Database::Migration[2.0]
- OLD_INDEX_NAME = 'index_authentication_events_on_user_id'
- NEW_INDEX_NAME = 'index_authentication_events_on_user_and_ip_address_and_result'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :authentication_events, [:user_id, :ip_address, :result], name: NEW_INDEX_NAME
- remove_concurrent_index_by_name :authentication_events, OLD_INDEX_NAME
- end
-
- def down
- add_concurrent_index :authentication_events, :user_id, name: OLD_INDEX_NAME
- remove_concurrent_index_by_name :authentication_events, NEW_INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220602070502_queue_backfill_project_feature_package_registry_access_level.rb b/db/post_migrate/20220602070502_queue_backfill_project_feature_package_registry_access_level.rb
deleted file mode 100644
index 2c772a79327..00000000000
--- a/db/post_migrate/20220602070502_queue_backfill_project_feature_package_registry_access_level.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-class QueueBackfillProjectFeaturePackageRegistryAccessLevel < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- MIGRATION = 'BackfillProjectFeaturePackageRegistryAccessLevel'
- DELAY_INTERVAL = 2.minutes
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- queue_batched_background_migration(
- MIGRATION,
- :projects,
- :id,
- job_interval: DELAY_INTERVAL
- )
- end
-
- def down
- delete_batched_background_migration(MIGRATION, :projects, :id, [])
- end
-end
diff --git a/db/post_migrate/20220602111923_prepare_index_for_open_issues_count.rb b/db/post_migrate/20220602111923_prepare_index_for_open_issues_count.rb
deleted file mode 100644
index e90524df1ba..00000000000
--- a/db/post_migrate/20220602111923_prepare_index_for_open_issues_count.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class PrepareIndexForOpenIssuesCount < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'idx_open_issues_on_project_id_and_confidential'
-
- def up
- prepare_async_index :issues, [:project_id, :confidential], where: 'state_id = 1', name: INDEX_NAME
- end
-
- def down
- unprepare_async_index_by_name :issues, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220603173103_update_vulnerabilities_project_id_id_index.rb b/db/post_migrate/20220603173103_update_vulnerabilities_project_id_id_index.rb
deleted file mode 100644
index 8f10fd61273..00000000000
--- a/db/post_migrate/20220603173103_update_vulnerabilities_project_id_id_index.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class UpdateVulnerabilitiesProjectIdIdIndex < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- NEW_INDEX_NAME = 'idx_vulnerabilities_partial_devops_adoption_and_default_branch'
- OLD_INDEX_NAME = 'idx_vulnerabilities_partial_devops_adoption'
-
- def up
- add_concurrent_index :vulnerabilities, [:project_id, :created_at, :present_on_default_branch],
- where: 'state != 1',
- name: NEW_INDEX_NAME
-
- remove_concurrent_index_by_name(:vulnerabilities, OLD_INDEX_NAME)
- end
-
- def down
- add_concurrent_index :vulnerabilities, [:project_id, :created_at], where: 'state != 1', name: OLD_INDEX_NAME
-
- remove_concurrent_index_by_name(:vulnerabilities, NEW_INDEX_NAME)
- end
-end
diff --git a/db/post_migrate/20220606060825_set_on_delete_cascade_on_namespace_id_on_routes_table.rb b/db/post_migrate/20220606060825_set_on_delete_cascade_on_namespace_id_on_routes_table.rb
deleted file mode 100644
index 74660d1474c..00000000000
--- a/db/post_migrate/20220606060825_set_on_delete_cascade_on_namespace_id_on_routes_table.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-# frozen_string_literal: true
-
-class SetOnDeleteCascadeOnNamespaceIdOnRoutesTable < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- TARGET_COLUMN = :namespace_id
-
- def up
- # add the new FK before removing the old one
- add_concurrent_foreign_key(
- :routes,
- :namespaces,
- column: TARGET_COLUMN,
- name: fk_name("#{TARGET_COLUMN}_new"),
- on_delete: :cascade
- )
-
- with_lock_retries do
- remove_foreign_key_if_exists(:routes, column: TARGET_COLUMN, name: fk_name(TARGET_COLUMN))
- end
- end
-
- def down
- add_concurrent_foreign_key(
- :routes,
- :namespaces,
- column: TARGET_COLUMN,
- name: fk_name(TARGET_COLUMN),
- on_delete: :nullify
- )
-
- with_lock_retries do
- remove_foreign_key_if_exists(:routes, column: TARGET_COLUMN, name: fk_name("#{TARGET_COLUMN}_new"))
- end
- end
-
- def fk_name(column_name)
- # generate a FK name
- concurrent_foreign_key_name(:routes, column_name)
- end
-end
diff --git a/db/post_migrate/20220606060850_add_not_null_constraint_on_routes_namespace_id.rb b/db/post_migrate/20220606060850_add_not_null_constraint_on_routes_namespace_id.rb
deleted file mode 100644
index 4c9f087f62d..00000000000
--- a/db/post_migrate/20220606060850_add_not_null_constraint_on_routes_namespace_id.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddNotNullConstraintOnRoutesNamespaceId < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_not_null_constraint :routes, :namespace_id, validate: false
- end
-
- def down
- remove_not_null_constraint :routes, :namespace_id
- end
-end
diff --git a/db/post_migrate/20220606082910_add_tmp_index_for_potentially_misassociated_vulnerability_occurrences.rb b/db/post_migrate/20220606082910_add_tmp_index_for_potentially_misassociated_vulnerability_occurrences.rb
deleted file mode 100644
index 1207b51f190..00000000000
--- a/db/post_migrate/20220606082910_add_tmp_index_for_potentially_misassociated_vulnerability_occurrences.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class AddTmpIndexForPotentiallyMisassociatedVulnerabilityOccurrences < Gitlab::Database::Migration[2.0]
- INDEX_NAME = "tmp_index_vulnerability_occurrences_on_id_and_scanner_id"
- REPORT_TYPES = { cluster_image_scanning: 7, generic: 99 }.freeze
- CLAUSE = "report_type IN (#{REPORT_TYPES.values.join(',')})"
-
- disable_ddl_transaction!
-
- def up
- prepare_async_index :vulnerability_occurrences,
- [:id, :scanner_id],
- where: CLAUSE,
- name: INDEX_NAME
- end
-
- def down
- unprepare_async_index_by_name :vulnerability_occurrences, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220607082910_add_sync_tmp_index_for_potentially_misassociated_vulnerability_occurrences.rb b/db/post_migrate/20220607082910_add_sync_tmp_index_for_potentially_misassociated_vulnerability_occurrences.rb
deleted file mode 100644
index fe4ffbf6cc3..00000000000
--- a/db/post_migrate/20220607082910_add_sync_tmp_index_for_potentially_misassociated_vulnerability_occurrences.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class AddSyncTmpIndexForPotentiallyMisassociatedVulnerabilityOccurrences < Gitlab::Database::Migration[2.0]
- INDEX_NAME = "tmp_index_vulnerability_occurrences_on_id_and_scanner_id"
- REPORT_TYPES = { cluster_image_scanning: 7, generic: 99 }.freeze
- CLAUSE = "report_type IN (#{REPORT_TYPES.values.join(',')})"
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :vulnerability_occurrences,
- [:id, :scanner_id],
- where: CLAUSE,
- name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :vulnerability_occurrences, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220607140222_remove_invalid_integrations.rb b/db/post_migrate/20220607140222_remove_invalid_integrations.rb
deleted file mode 100644
index 49834d7b120..00000000000
--- a/db/post_migrate/20220607140222_remove_invalid_integrations.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveInvalidIntegrations < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- BATCH_SIZE = 100
-
- def up
- loop do
- deleted = Integration.where(type_new: nil).limit(BATCH_SIZE).delete_all
-
- break if deleted < BATCH_SIZE
- end
- end
-
- # Isolated version of the Integration model
- class Integration < MigrationRecord
- self.table_name = 'integrations'
- self.inheritance_column = :_type_disabled
- end
-end
diff --git a/db/post_migrate/20220609195803_remove_deployment_clusters_cluster_id_fk.rb b/db/post_migrate/20220609195803_remove_deployment_clusters_cluster_id_fk.rb
deleted file mode 100644
index 2d81816fcfd..00000000000
--- a/db/post_migrate/20220609195803_remove_deployment_clusters_cluster_id_fk.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveDeploymentClustersClusterIdFk < Gitlab::Database::Migration[2.0]
- FK_NAME = 'fk_rails_4e6243e120'
-
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- remove_foreign_key_if_exists(
- :deployment_clusters,
- :clusters,
- name: FK_NAME,
- reverse_lock_order: true
- )
- end
- end
-
- def down
- add_concurrent_foreign_key(
- :deployment_clusters,
- :clusters,
- name: FK_NAME,
- column: :cluster_id,
- target_column: :id,
- on_delete: :cascade
- )
- end
-end
diff --git a/db/post_migrate/20220610223040_add_index_on_available_pypi_packages.rb b/db/post_migrate/20220610223040_add_index_on_available_pypi_packages.rb
deleted file mode 100644
index 891272c8a51..00000000000
--- a/db/post_migrate/20220610223040_add_index_on_available_pypi_packages.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexOnAvailablePypiPackages < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_packages_on_available_pypi_packages'
-
- def up
- add_concurrent_index :packages_packages,
- [:project_id, :id],
- where: "status IN (0,1) AND package_type = 5 AND version IS NOT NULL",
- name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :packages_packages, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220613095911_create_confidential_notes_index_on_id.rb b/db/post_migrate/20220613095911_create_confidential_notes_index_on_id.rb
deleted file mode 100644
index 80c26c3ea8a..00000000000
--- a/db/post_migrate/20220613095911_create_confidential_notes_index_on_id.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class CreateConfidentialNotesIndexOnId < Gitlab::Database::Migration[2.0]
- OLD_INDEX_NAME = 'index_notes_on_confidential'
- INDEX_NAME = 'index_notes_on_id_where_confidential'
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :notes, name: OLD_INDEX_NAME
- add_concurrent_index :notes, :id, where: 'confidential = true', name: INDEX_NAME
- end
-
- def down
- # we don't have to re-create OLD_INDEX_NAME index
- # because it wasn't used yet, also its creation might be expensive
- remove_concurrent_index_by_name :notes, name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220614185644_update_index_vulnerabilities_project_id_id.rb b/db/post_migrate/20220614185644_update_index_vulnerabilities_project_id_id.rb
deleted file mode 100644
index 142cac09a01..00000000000
--- a/db/post_migrate/20220614185644_update_index_vulnerabilities_project_id_id.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class UpdateIndexVulnerabilitiesProjectIdId < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- NEW_INDEX_NAME = 'index_vulnerabilities_project_id_and_id_on_default_branch'
- OLD_INDEX_NAME = 'index_vulnerabilities_on_project_id_and_id'
-
- def up
- add_concurrent_index :vulnerabilities, [:project_id, :id],
- where: 'present_on_default_branch IS TRUE',
- name: NEW_INDEX_NAME
-
- remove_concurrent_index_by_name(:vulnerabilities, OLD_INDEX_NAME)
- end
-
- def down
- add_concurrent_index :vulnerabilities, [:project_id, :id], name: OLD_INDEX_NAME
-
- remove_concurrent_index_by_name(:vulnerabilities, NEW_INDEX_NAME)
- end
-end
diff --git a/db/post_migrate/20220616092541_prepare_index_issues_on_project_id_and_closed_at.rb b/db/post_migrate/20220616092541_prepare_index_issues_on_project_id_and_closed_at.rb
deleted file mode 100644
index 084cdb6166d..00000000000
--- a/db/post_migrate/20220616092541_prepare_index_issues_on_project_id_and_closed_at.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class PrepareIndexIssuesOnProjectIdAndClosedAt < Gitlab::Database::Migration[2.0]
- NEW_INDEX_NAME_1 = 'index_issues_on_project_id_closed_at_desc_state_id_and_id'
- NEW_INDEX_NAME_2 = 'index_issues_on_project_id_closed_at_state_id_and_id'
-
- def up
- # Index to improve performance when sorting issues by closed_at desc
- prepare_async_index :issues, 'project_id, closed_at DESC NULLS LAST, state_id, id', name: NEW_INDEX_NAME_1
-
- # Index to improve performance when sorting issues by closed_at asc
- # This replaces the old index which didn't account for state_id and id
- prepare_async_index :issues, [:project_id, :closed_at, :state_id, :id], name: NEW_INDEX_NAME_2
- end
-
- def down
- unprepare_async_index_by_name :issues, NEW_INDEX_NAME_1
- unprepare_async_index_by_name :issues, NEW_INDEX_NAME_2
- end
-end
diff --git a/db/post_migrate/20220616222253_remove_ci_secure_files_permissions_column.rb b/db/post_migrate/20220616222253_remove_ci_secure_files_permissions_column.rb
deleted file mode 100644
index 31c559a9d44..00000000000
--- a/db/post_migrate/20220616222253_remove_ci_secure_files_permissions_column.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveCiSecureFilesPermissionsColumn < Gitlab::Database::Migration[2.0]
- def up
- remove_column :ci_secure_files, :permissions
- end
-
- def down
- add_column :ci_secure_files, :permissions, :integer, null: false, default: 0, limit: 2
- end
-end
diff --git a/db/post_migrate/20220617073407_add_index_for_open_issues_count.rb b/db/post_migrate/20220617073407_add_index_for_open_issues_count.rb
deleted file mode 100644
index 5c11e7b1b9a..00000000000
--- a/db/post_migrate/20220617073407_add_index_for_open_issues_count.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexForOpenIssuesCount < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'idx_open_issues_on_project_id_and_confidential'
-
- def up
- add_concurrent_index :issues, [:project_id, :confidential], where: 'state_id = 1', name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :issues, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220617123022_add_unique_index_on_projects_on_runners_token.rb b/db/post_migrate/20220617123022_add_unique_index_on_projects_on_runners_token.rb
deleted file mode 100644
index abd730685d7..00000000000
--- a/db/post_migrate/20220617123022_add_unique_index_on_projects_on_runners_token.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class AddUniqueIndexOnProjectsOnRunnersToken < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_uniq_projects_on_runners_token'
-
- def up
- # rubocop:disable Migration/PreventIndexCreation
- add_concurrent_index :projects,
- :runners_token,
- name: INDEX_NAME,
- unique: true
- # rubocop:enable Migration/PreventIndexCreation
- end
-
- def down
- remove_concurrent_index_by_name :projects, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220617123034_add_unique_index_on_projects_on_runners_token_encrypted.rb b/db/post_migrate/20220617123034_add_unique_index_on_projects_on_runners_token_encrypted.rb
deleted file mode 100644
index 51b630397dc..00000000000
--- a/db/post_migrate/20220617123034_add_unique_index_on_projects_on_runners_token_encrypted.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class AddUniqueIndexOnProjectsOnRunnersTokenEncrypted < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_uniq_projects_on_runners_token_encrypted'
-
- def up
- # rubocop:disable Migration/PreventIndexCreation
- add_concurrent_index :projects,
- :runners_token_encrypted,
- name: INDEX_NAME,
- unique: true
- # rubocop:enable Migration/PreventIndexCreation
- end
-
- def down
- remove_concurrent_index_by_name :projects, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220617123105_drop_index_on_projects_on_runners_token.rb b/db/post_migrate/20220617123105_drop_index_on_projects_on_runners_token.rb
deleted file mode 100644
index 6b76a92a9f4..00000000000
--- a/db/post_migrate/20220617123105_drop_index_on_projects_on_runners_token.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class DropIndexOnProjectsOnRunnersToken < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_projects_on_runners_token'
-
- def up
- remove_concurrent_index_by_name :projects, INDEX_NAME
- end
-
- def down
- add_concurrent_index :projects,
- :runners_token,
- name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220617123113_drop_index_on_projects_on_runners_token_encrypted.rb b/db/post_migrate/20220617123113_drop_index_on_projects_on_runners_token_encrypted.rb
deleted file mode 100644
index 213f55bfcc4..00000000000
--- a/db/post_migrate/20220617123113_drop_index_on_projects_on_runners_token_encrypted.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class DropIndexOnProjectsOnRunnersTokenEncrypted < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_projects_on_runners_token_encrypted'
-
- def up
- remove_concurrent_index_by_name :projects, INDEX_NAME
- end
-
- def down
- add_concurrent_index :projects,
- :runners_token_encrypted,
- name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220617142124_add_index_on_installable_package_files.rb b/db/post_migrate/20220617142124_add_index_on_installable_package_files.rb
deleted file mode 100644
index e74c6c0935e..00000000000
--- a/db/post_migrate/20220617142124_add_index_on_installable_package_files.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexOnInstallablePackageFiles < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'idx_pkgs_installable_package_files_on_package_id_id_file_name'
- # See https://gitlab.com/gitlab-org/gitlab/-/blob/e3ed2c1f65df2e137fc714485d7d42264a137968/app/models/packages/package_file.rb#L16
- DEFAULT_STATUS = 0
-
- def up
- add_concurrent_index :packages_package_files,
- [:package_id, :id, :file_name],
- where: "(status = #{DEFAULT_STATUS})",
- name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :packages_package_files, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220617143228_replace_packages_index_on_project_id_and_status.rb b/db/post_migrate/20220617143228_replace_packages_index_on_project_id_and_status.rb
deleted file mode 100644
index d1e70f04468..00000000000
--- a/db/post_migrate/20220617143228_replace_packages_index_on_project_id_and_status.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class ReplacePackagesIndexOnProjectIdAndStatus < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- NEW_INDEX_NAME = 'index_packages_packages_on_project_id_and_status_and_id'
- OLD_INDEX_NAME = 'index_packages_packages_on_project_id_and_status'
-
- def up
- add_concurrent_index :packages_packages,
- [:project_id, :status, :id],
- name: NEW_INDEX_NAME
- remove_concurrent_index_by_name :packages_packages, OLD_INDEX_NAME
- end
-
- def down
- add_concurrent_index :packages_packages,
- [:project_id, :status],
- name: OLD_INDEX_NAME
- remove_concurrent_index_by_name :packages_packages, NEW_INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220620060633_finalize_orphaned_routes_cleanup.rb b/db/post_migrate/20220620060633_finalize_orphaned_routes_cleanup.rb
deleted file mode 100644
index 4a3218af2c0..00000000000
--- a/db/post_migrate/20220620060633_finalize_orphaned_routes_cleanup.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class FinalizeOrphanedRoutesCleanup < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- MIGRATION = 'CleanupOrphanedRoutes'
-
- def up
- ensure_batched_background_migration_is_finished(
- job_class_name: MIGRATION,
- table_name: :routes,
- column_name: :id,
- job_arguments: []
- )
- end
-
- def down
- # noop
- end
-end
diff --git a/db/post_migrate/20220620132300_update_last_run_date_for_iterations_cadences.rb b/db/post_migrate/20220620132300_update_last_run_date_for_iterations_cadences.rb
deleted file mode 100644
index 50b0b25d469..00000000000
--- a/db/post_migrate/20220620132300_update_last_run_date_for_iterations_cadences.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class UpdateLastRunDateForIterationsCadences < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- execute <<~SQL
- UPDATE iterations_cadences SET last_run_date=CURRENT_DATE WHERE automatic=true;
- SQL
- end
-
- def down
- # no op
- # 'last_run_date' stores the date on which the cadence record should be
- # updated using `CreateIterationsInAdvance` service that is idempotent
- # and the column is only useful for optimizing when to run the service
- # ('last_run_date' is also a misnomer as it can be better-named 'next_run_date'.)
- end
-end
diff --git a/db/post_migrate/20220620151740_add_indexes_issues_on_project_id_and_closed_at.rb b/db/post_migrate/20220620151740_add_indexes_issues_on_project_id_and_closed_at.rb
deleted file mode 100644
index 066e72dce45..00000000000
--- a/db/post_migrate/20220620151740_add_indexes_issues_on_project_id_and_closed_at.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexesIssuesOnProjectIdAndClosedAt < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- OLD_INDEX_NAME = 'index_issues_on_project_id_and_closed_at'
- NEW_INDEX_NAME_1 = 'index_issues_on_project_id_closed_at_desc_state_id_and_id'
- NEW_INDEX_NAME_2 = 'index_issues_on_project_id_closed_at_state_id_and_id'
-
- def up
- # Index to improve performance when sorting issues by closed_at desc
- unless index_exists_by_name?(:issues, NEW_INDEX_NAME_1)
- add_concurrent_index :issues, 'project_id, closed_at DESC NULLS LAST, state_id, id', name: NEW_INDEX_NAME_1
- end
-
- # Index to improve performance when sorting issues by closed_at asc
- # This replaces the old index which didn't account for state_id and id
- unless index_exists_by_name?(:issues, NEW_INDEX_NAME_2)
- add_concurrent_index :issues, [:project_id, :closed_at, :state_id, :id], name: NEW_INDEX_NAME_2
- end
-
- remove_concurrent_index_by_name :issues, OLD_INDEX_NAME
- end
-
- def down
- add_concurrent_index :issues, [:project_id, :closed_at], name: OLD_INDEX_NAME
-
- remove_concurrent_index_by_name :issues, NEW_INDEX_NAME_1
- remove_concurrent_index_by_name :issues, NEW_INDEX_NAME_2
- end
-end
diff --git a/db/post_migrate/20220621040800_backfill_imported_issue_search_data.rb b/db/post_migrate/20220621040800_backfill_imported_issue_search_data.rb
deleted file mode 100644
index bc7d0eb3a13..00000000000
--- a/db/post_migrate/20220621040800_backfill_imported_issue_search_data.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class BackfillImportedIssueSearchData < Gitlab::Database::Migration[2.0]
- def up
- # replaced by 20220707075300_reschedule_backfill_imported_issue_search_data.rb
- end
-
- def down
- # replaced by 20220707075300_reschedule_backfill_imported_issue_search_data.rb
- end
-end
diff --git a/db/post_migrate/20220621082245_remove_tmp_index_on_routes_namespace_id_column.rb b/db/post_migrate/20220621082245_remove_tmp_index_on_routes_namespace_id_column.rb
deleted file mode 100644
index 4aa125d3c14..00000000000
--- a/db/post_migrate/20220621082245_remove_tmp_index_on_routes_namespace_id_column.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveTmpIndexOnRoutesNamespaceIdColumn < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'tmp_index_for_namespace_id_migration_on_routes'
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :routes, INDEX_NAME
- end
-
- def down
- add_concurrent_index :routes,
- :id,
- where: "routes.namespace_id is null and routes.source_type = 'Namespace'",
- name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220621092245_validate_not_null_constraint_on_routes_namespace_id_column.rb b/db/post_migrate/20220621092245_validate_not_null_constraint_on_routes_namespace_id_column.rb
deleted file mode 100644
index 73e2f6b2b38..00000000000
--- a/db/post_migrate/20220621092245_validate_not_null_constraint_on_routes_namespace_id_column.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: true
-
-class ValidateNotNullConstraintOnRoutesNamespaceIdColumn < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- validate_not_null_constraint :routes, :namespace_id
- end
-
- def down
- remove_not_null_constraint :routes, :namespace_id
- add_not_null_constraint :routes, :namespace_id, validate: false
- end
-end
diff --git a/db/post_migrate/20220621192541_add_project_id_state_severity_default_branch_index_for_vulnerabilities.rb b/db/post_migrate/20220621192541_add_project_id_state_severity_default_branch_index_for_vulnerabilities.rb
deleted file mode 100644
index 76753cdd737..00000000000
--- a/db/post_migrate/20220621192541_add_project_id_state_severity_default_branch_index_for_vulnerabilities.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class AddProjectIdStateSeverityDefaultBranchIndexForVulnerabilities < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_vulnerabilities_project_id_state_severity_default_branch'
-
- def up
- add_concurrent_index :vulnerabilities, [:project_id, :state, :severity, :present_on_default_branch],
- name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :vulnerabilities, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220622070547_add_temp_index_for_container_registry_size_migration.rb b/db/post_migrate/20220622070547_add_temp_index_for_container_registry_size_migration.rb
deleted file mode 100644
index 1533c502b3d..00000000000
--- a/db/post_migrate/20220622070547_add_temp_index_for_container_registry_size_migration.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# frozen_string_literal: true
-
-class AddTempIndexForContainerRegistrySizeMigration < Gitlab::Database::Migration[2.0]
- INDEX_CONTAINER_REGISTRY_SIZE = 'tmp_index_migrated_container_registries'
- INDEX_PROJECT_STATS_CONT_REG_SIZE = 'tmp_index_project_statistics_cont_registry_size'
-
- disable_ddl_transaction!
-
- def up
- # Temporary index used in 20220622080547_backfill_project_statistics_with_container_registry_size
- # Temporary index to be remove via https://gitlab.com/gitlab-org/gitlab/-/issues/366392
- add_concurrent_index :container_repositories, [:project_id],
- name: INDEX_CONTAINER_REGISTRY_SIZE,
- where: "migration_state = 'import_done' OR created_at >= '2022-01-23'"
- add_concurrent_index :project_statistics, [:project_id],
- name: INDEX_PROJECT_STATS_CONT_REG_SIZE,
- where: "container_registry_size = 0"
- end
-
- def down
- remove_concurrent_index_by_name :container_repositories, INDEX_CONTAINER_REGISTRY_SIZE
- remove_concurrent_index_by_name :project_statistics, INDEX_PROJECT_STATS_CONT_REG_SIZE
- end
-end
diff --git a/db/post_migrate/20220622080547_backfill_project_statistics_with_container_registry_size.rb b/db/post_migrate/20220622080547_backfill_project_statistics_with_container_registry_size.rb
deleted file mode 100644
index 2cab7ae25f5..00000000000
--- a/db/post_migrate/20220622080547_backfill_project_statistics_with_container_registry_size.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-# frozen_string_literal: true
-
-class BackfillProjectStatisticsWithContainerRegistrySize < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- DELAY_INTERVAL = 2.minutes.to_i
- BATCH_SIZE = 500
- MIGRATION_CLASS = 'BackfillProjectStatisticsContainerRepositorySize'
- BATCH_CLASS_NAME = 'BackfillProjectStatisticsWithContainerRegistrySizeBatchingStrategy'
- SUB_BATCH_SIZE = 100
-
- disable_ddl_transaction!
-
- def up
- return unless Gitlab.dev_or_test_env? || Gitlab.com?
-
- queue_batched_background_migration(
- MIGRATION_CLASS,
- :container_repositories,
- :project_id,
- job_interval: DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- batch_class_name: BATCH_CLASS_NAME,
- sub_batch_size: SUB_BATCH_SIZE
- )
- end
-
- def down
- return unless Gitlab.dev_or_test_env? || Gitlab.com?
-
- delete_batched_background_migration(MIGRATION_CLASS, :container_repositories, :project_id, [])
- end
-end
diff --git a/db/post_migrate/20220624062300_delete_backfill_ci_runner_semver_migration.rb b/db/post_migrate/20220624062300_delete_backfill_ci_runner_semver_migration.rb
deleted file mode 100644
index 4632d9104ea..00000000000
--- a/db/post_migrate/20220624062300_delete_backfill_ci_runner_semver_migration.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class DeleteBackfillCiRunnerSemverMigration < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_ci
-
- MIGRATION = 'BackfillCiRunnerSemver'
-
- disable_ddl_transaction!
-
- def up
- # Disabled background migration introduced in same milestone as it was decided to change approach
- # and the semver column will no longer be needed
- delete_batched_background_migration(MIGRATION, :ci_runners, :id, [])
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220627090231_schedule_disable_legacy_open_source_license_for_inactive_public_projects.rb b/db/post_migrate/20220627090231_schedule_disable_legacy_open_source_license_for_inactive_public_projects.rb
deleted file mode 100644
index 06bdb78698d..00000000000
--- a/db/post_migrate/20220627090231_schedule_disable_legacy_open_source_license_for_inactive_public_projects.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleDisableLegacyOpenSourceLicenseForInactivePublicProjects < Gitlab::Database::Migration[2.0]
- MIGRATION = 'DisableLegacyOpenSourceLicenseForInactivePublicProjects'
- 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/20220627152642_queue_update_delayed_project_removal_to_null_for_user_namespace.rb b/db/post_migrate/20220627152642_queue_update_delayed_project_removal_to_null_for_user_namespace.rb
deleted file mode 100644
index 2f407b78b6d..00000000000
--- a/db/post_migrate/20220627152642_queue_update_delayed_project_removal_to_null_for_user_namespace.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# frozen_string_literal: true
-
-class QueueUpdateDelayedProjectRemovalToNullForUserNamespace < Gitlab::Database::Migration[2.0]
- MIGRATION = 'UpdateDelayedProjectRemovalToNullForUserNamespaces'
- INTERVAL = 2.minutes
- BATCH_SIZE = 10_000
-
- disable_ddl_transaction!
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- queue_batched_background_migration(
- MIGRATION,
- :namespace_settings,
- :namespace_id,
- job_interval: INTERVAL,
- batch_size: BATCH_SIZE
- )
- end
-
- def down
- delete_batched_background_migration(MIGRATION, :namespace_settings, :namespace_id, [])
- end
-end
diff --git a/db/post_migrate/20220627223041_add_post_migrate_test_table.rb b/db/post_migrate/20220627223041_add_post_migrate_test_table.rb
deleted file mode 100644
index 8d97444f8c1..00000000000
--- a/db/post_migrate/20220627223041_add_post_migrate_test_table.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddPostMigrateTestTable < Gitlab::Database::Migration[2.0]
- # Fake table to be used for testing the post-deploy pipeline,
- # details can be seen on https://gitlab.com/gitlab-com/gl-infra/delivery/-/issues/2352.
- #
- # It should be deleted after the testing is completed.
- def change
- create_table :post_migration_test_table do |t|
- t.integer :status, null: false
- end
- end
-end
diff --git a/db/post_migrate/20220628012902_finalise_project_namespace_members.rb b/db/post_migrate/20220628012902_finalise_project_namespace_members.rb
deleted file mode 100644
index 29b11fb4357..00000000000
--- a/db/post_migrate/20220628012902_finalise_project_namespace_members.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class FinaliseProjectNamespaceMembers < Gitlab::Database::Migration[2.0]
- MIGRATION = 'BackfillProjectMemberNamespaceId'
- 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/20220628110823_add_issues_namespace_id_fk_and_index.rb b/db/post_migrate/20220628110823_add_issues_namespace_id_fk_and_index.rb
deleted file mode 100644
index 5a7ca428383..00000000000
--- a/db/post_migrate/20220628110823_add_issues_namespace_id_fk_and_index.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class AddIssuesNamespaceIdFkAndIndex < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
- INDEX_NAME = 'index_issues_on_namespace_id'
-
- def up
- add_concurrent_index :issues, :namespace_id, name: INDEX_NAME
- add_concurrent_foreign_key :issues, :namespaces,
- column: :namespace_id,
- on_delete: :nullify,
- reverse_lock_order: true
- end
-
- def down
- with_lock_retries do
- remove_foreign_key_if_exists :issues, column: :namespace_id
- end
-
- remove_concurrent_index_by_name :issues, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220628111752_drop_token_index_from_ci_builds.rb b/db/post_migrate/20220628111752_drop_token_index_from_ci_builds.rb
deleted file mode 100644
index d551eeebeb6..00000000000
--- a/db/post_migrate/20220628111752_drop_token_index_from_ci_builds.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class DropTokenIndexFromCiBuilds < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_ci_builds_on_token_partial'
-
- def up
- remove_concurrent_index_by_name :ci_builds, INDEX_NAME
- end
-
- # rubocop:disable Migration/PreventIndexCreation
- def down
- add_concurrent_index :ci_builds, :token, unique: true, where: 'token IS NOT NULL', name: INDEX_NAME
- end
- # rubocop:enable Migration/PreventIndexCreation
-end
diff --git a/db/post_migrate/20220628122622_rename_builds_sidekiq_queues_to_namespaces.rb b/db/post_migrate/20220628122622_rename_builds_sidekiq_queues_to_namespaces.rb
deleted file mode 100644
index f692d1476ce..00000000000
--- a/db/post_migrate/20220628122622_rename_builds_sidekiq_queues_to_namespaces.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class RenameBuildsSidekiqQueuesToNamespaces < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_main
- disable_ddl_transaction!
-
- BUILD_OLD_QUEUE = 'pipeline_processing:build_finished'
- BUILD_NEW_QUEUE = 'pipeline_processing:ci_build_finished'
-
- TRACE_OLD_QUEUE = 'pipeline_background:archive_trace'
- TRACE_NEW_QUEUE = 'pipeline_background:ci_archive_trace'
-
- def up
- sidekiq_queue_migrate BUILD_OLD_QUEUE, to: BUILD_NEW_QUEUE
- sidekiq_queue_migrate TRACE_OLD_QUEUE, to: TRACE_NEW_QUEUE
- end
-
- def down
- sidekiq_queue_migrate BUILD_NEW_QUEUE, to: BUILD_OLD_QUEUE
- sidekiq_queue_migrate TRACE_NEW_QUEUE, to: TRACE_OLD_QUEUE
- end
-end
diff --git a/db/post_migrate/20220629124942_remove_vulnerability_occurrences_migrated_to_new_structure_column.rb b/db/post_migrate/20220629124942_remove_vulnerability_occurrences_migrated_to_new_structure_column.rb
deleted file mode 100644
index 2a980290cc9..00000000000
--- a/db/post_migrate/20220629124942_remove_vulnerability_occurrences_migrated_to_new_structure_column.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveVulnerabilityOccurrencesMigratedToNewStructureColumn < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_vulnerability_occurrences_on_migrated_to_new_structure'
-
- def up
- with_lock_retries do
- remove_column :vulnerability_occurrences, :migrated_to_new_structure
- end
- end
-
- def down
- unless column_exists?(:vulnerability_occurrences, :migrated_to_new_structure)
- add_column :vulnerability_occurrences, :migrated_to_new_structure, :boolean, default: false, null: false
- end
-
- add_concurrent_index :vulnerability_occurrences, [:migrated_to_new_structure, :id], name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220629184402_unset_escalation_policies_for_alert_incidents.rb b/db/post_migrate/20220629184402_unset_escalation_policies_for_alert_incidents.rb
deleted file mode 100644
index 89adc4b2703..00000000000
--- a/db/post_migrate/20220629184402_unset_escalation_policies_for_alert_incidents.rb
+++ /dev/null
@@ -1,46 +0,0 @@
-# frozen_string_literal: true
-
-class UnsetEscalationPoliciesForAlertIncidents < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- class EscalationStatus < MigrationRecord
- include EachBatch
-
- self.table_name = 'incident_management_issuable_escalation_statuses'
-
- scope :having_alert_policy, -> do
- joins(
- 'INNER JOIN alert_management_alerts ' \
- 'ON alert_management_alerts.issue_id ' \
- '= incident_management_issuable_escalation_statuses.issue_id'
- )
- end
- end
-
- def up
- EscalationStatus.each_batch do |escalation_statuses|
- escalation_statuses
- .where.not(policy_id: nil)
- .having_alert_policy
- .update_all(policy_id: nil, escalations_started_at: nil)
- end
- end
-
- def down
- # no-op
- #
- # We cannot retrieve the exact nullified values. We could
- # approximately guess what the values are via the alert's
- # escalation policy. However, that may not be accurate
- # in all cases, as an alert's escalation policy is implictly
- # inferred from the project rather than explicit, like an incident.
- # So we won't backfill potentially incorrect data.
- #
- # This data is functionally safe to delete, as the relevant
- # fields are read-only, and exclusively informational.
- #
- # Re-running the migration will have no effect.
- end
-end
diff --git a/db/post_migrate/20220630050050_index_vulnerability_reads_on_casted_cluster_agent_id_full.rb b/db/post_migrate/20220630050050_index_vulnerability_reads_on_casted_cluster_agent_id_full.rb
deleted file mode 100644
index 58b6342e30f..00000000000
--- a/db/post_migrate/20220630050050_index_vulnerability_reads_on_casted_cluster_agent_id_full.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class IndexVulnerabilityReadsOnCastedClusterAgentIdFull < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_vuln_reads_on_casted_cluster_agent_id_where_it_is_null'
-
- def up
- add_concurrent_index :vulnerability_reads,
- :casted_cluster_agent_id,
- name: INDEX_NAME,
- where: 'casted_cluster_agent_id IS NOT NULL'
- end
-
- def down
- remove_concurrent_index_by_name :vulnerability_reads, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220630085003_drop_project_successfull_pages_deploy_index_from_ci_builds.rb b/db/post_migrate/20220630085003_drop_project_successfull_pages_deploy_index_from_ci_builds.rb
deleted file mode 100644
index 0810419a4e8..00000000000
--- a/db/post_migrate/20220630085003_drop_project_successfull_pages_deploy_index_from_ci_builds.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-class DropProjectSuccessfullPagesDeployIndexFromCiBuilds < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_ci_builds_on_project_id_for_successfull_pages_deploy'
-
- def up
- remove_concurrent_index_by_name :ci_builds, INDEX_NAME
- end
-
- # rubocop:disable Migration/PreventIndexCreation
- def down
- add_concurrent_index :ci_builds,
- :project_id,
- where: "(((type)::text = 'GenericCommitStatus'::text) AND ((stage)::text = 'deploy'::text) AND " \
- "((name)::text = 'pages:deploy'::text) AND ((status)::text = 'success'::text))",
- name: INDEX_NAME
- end
- # rubocop:enable Migration/PreventIndexCreation
-end
diff --git a/db/post_migrate/20220630091409_add_index_on_events_for_contribution_analytics_optimization.rb b/db/post_migrate/20220630091409_add_index_on_events_for_contribution_analytics_optimization.rb
deleted file mode 100644
index de16b17f489..00000000000
--- a/db/post_migrate/20220630091409_add_index_on_events_for_contribution_analytics_optimization.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexOnEventsForContributionAnalyticsOptimization < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_on_events_to_improve_contribution_analytics_performance'
-
- def up
- add_concurrent_index :events, [:project_id, :target_type, :action, :created_at, :author_id, :id], name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :events, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220630151641_schedule_set_correct_vulnerability_state.rb b/db/post_migrate/20220630151641_schedule_set_correct_vulnerability_state.rb
deleted file mode 100644
index 7c9211ff282..00000000000
--- a/db/post_migrate/20220630151641_schedule_set_correct_vulnerability_state.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleSetCorrectVulnerabilityState < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- MAX_BATCH_SIZE = 5_000
- JOB_INTERVAL = 2.minutes
- MIGRATION_NAME = 'SetCorrectVulnerabilityState'
- BATCH_CLASS_NAME = 'DismissedVulnerabilitiesStrategy'
- SUB_BATCH_SIZE = 100
-
- def up
- queue_batched_background_migration(
- MIGRATION_NAME,
- :vulnerabilities,
- :id,
- job_interval: JOB_INTERVAL,
- batch_size: MAX_BATCH_SIZE,
- max_batch_size: MAX_BATCH_SIZE,
- batch_class_name: BATCH_CLASS_NAME,
- sub_batch_size: SUB_BATCH_SIZE
- )
- end
-
- def down
- delete_batched_background_migration(MIGRATION_NAME, :vulnerabilities, :id, [])
- end
-end
diff --git a/db/post_migrate/20220701085523_schedule_index_on_events_for_contribution_analytics_optimization.rb b/db/post_migrate/20220701085523_schedule_index_on_events_for_contribution_analytics_optimization.rb
deleted file mode 100644
index 10be7a25965..00000000000
--- a/db/post_migrate/20220701085523_schedule_index_on_events_for_contribution_analytics_optimization.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleIndexOnEventsForContributionAnalyticsOptimization < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_on_events_to_improve_contribution_analytics_performance'
-
- def up
- prepare_async_index :events, [:project_id, :target_type, :action, :created_at, :author_id, :id], name: INDEX_NAME
- end
-
- def down
- unprepare_async_index :events, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220703182314_add_check_constraint_for_security_findings_partition_number.rb b/db/post_migrate/20220703182314_add_check_constraint_for_security_findings_partition_number.rb
deleted file mode 100644
index 82b5d0b165d..00000000000
--- a/db/post_migrate/20220703182314_add_check_constraint_for_security_findings_partition_number.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddCheckConstraintForSecurityFindingsPartitionNumber < Gitlab::Database::Migration[2.0]
- CONSTRAINT_NAME = 'check_partition_number'
-
- disable_ddl_transaction!
-
- def up
- add_check_constraint(:security_findings, 'partition_number = 1', CONSTRAINT_NAME)
- end
-
- def down
- remove_check_constraint(:security_findings, CONSTRAINT_NAME)
- end
-end
diff --git a/db/post_migrate/20220704044408_remove_foreign_key_in_project_tracing_settings.rb b/db/post_migrate/20220704044408_remove_foreign_key_in_project_tracing_settings.rb
deleted file mode 100644
index 95eb461238f..00000000000
--- a/db/post_migrate/20220704044408_remove_foreign_key_in_project_tracing_settings.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveForeignKeyInProjectTracingSettings < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- remove_foreign_key_if_exists(:project_tracing_settings, column: :project_id)
- end
- end
-
- def down
- add_concurrent_foreign_key :project_tracing_settings, :projects,
- column: :project_id, on_delete: :cascade, name: 'fk_rails_fe56f57fc6'
- end
-end
diff --git a/db/post_migrate/20220704045440_drop_project_tracing_settings_table.rb b/db/post_migrate/20220704045440_drop_project_tracing_settings_table.rb
deleted file mode 100644
index 1ce8b05a08d..00000000000
--- a/db/post_migrate/20220704045440_drop_project_tracing_settings_table.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class DropProjectTracingSettingsTable < Gitlab::Database::Migration[2.0]
- def up
- drop_table :project_tracing_settings
- end
-
- def down
- create_table :project_tracing_settings, id: :bigserial do |t|
- t.timestamps_with_timezone null: false
-
- t.references :project, type: :integer, null: false, index: { unique: true }
-
- t.string :external_url, null: false
- end
- end
-end
diff --git a/db/post_migrate/20220705114635_drop_index_on_ci_runner_versions_on_version.rb b/db/post_migrate/20220705114635_drop_index_on_ci_runner_versions_on_version.rb
deleted file mode 100644
index 22ff65f6fc3..00000000000
--- a/db/post_migrate/20220705114635_drop_index_on_ci_runner_versions_on_version.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class DropIndexOnCiRunnerVersionsOnVersion < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_ci_runner_versions_on_version'
-
- def up
- remove_concurrent_index_by_name :ci_runner_versions, INDEX_NAME
- end
-
- def down
- add_concurrent_index :ci_runner_versions, :version, name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220705180843_validate_requirements_issue_id_not_null.rb b/db/post_migrate/20220705180843_validate_requirements_issue_id_not_null.rb
deleted file mode 100644
index a0c8954b481..00000000000
--- a/db/post_migrate/20220705180843_validate_requirements_issue_id_not_null.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class ValidateRequirementsIssueIdNotNull < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- constraint_name = 'check_requirement_issue_not_null'
-
- validate_not_null_constraint(:requirements, :issue_id, constraint_name: constraint_name)
- end
-
- def down
- # No op
- end
-end
diff --git a/db/post_migrate/20220706065245_remove_foreign_key_in_clusters_applications_elastic_stacks.rb b/db/post_migrate/20220706065245_remove_foreign_key_in_clusters_applications_elastic_stacks.rb
deleted file mode 100644
index bfe60099bfa..00000000000
--- a/db/post_migrate/20220706065245_remove_foreign_key_in_clusters_applications_elastic_stacks.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveForeignKeyInClustersApplicationsElasticStacks < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- remove_foreign_key_if_exists(:clusters_applications_elastic_stacks, column: :cluster_id)
- end
- end
-
- def down
- add_concurrent_foreign_key :clusters_applications_elastic_stacks, :clusters,
- column: :cluster_id, on_delete: :cascade, name: 'fk_rails_026f219f46'
- end
-end
diff --git a/db/post_migrate/20220706065611_remove_foreign_key_in_clusters_integration_elasticstack.rb b/db/post_migrate/20220706065611_remove_foreign_key_in_clusters_integration_elasticstack.rb
deleted file mode 100644
index eeec465f6b9..00000000000
--- a/db/post_migrate/20220706065611_remove_foreign_key_in_clusters_integration_elasticstack.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveForeignKeyInClustersIntegrationElasticstack < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- remove_foreign_key_if_exists(:clusters_integration_elasticstack, column: :cluster_id)
- end
- end
-
- def down
- add_concurrent_foreign_key :clusters_integration_elasticstack, :clusters,
- column: :cluster_id, on_delete: :cascade, name: 'fk_rails_cc5ba8f658'
- end
-end
diff --git a/db/post_migrate/20220706070804_drop_clusters_applications_elastic_stacks_table.rb b/db/post_migrate/20220706070804_drop_clusters_applications_elastic_stacks_table.rb
deleted file mode 100644
index cedf666e428..00000000000
--- a/db/post_migrate/20220706070804_drop_clusters_applications_elastic_stacks_table.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class DropClustersApplicationsElasticStacksTable < Gitlab::Database::Migration[2.0]
- def up
- drop_table :clusters_applications_elastic_stacks
- end
-
- def down
- create_table :clusters_applications_elastic_stacks do |t|
- t.timestamps_with_timezone null: false
- t.references :cluster, type: :bigint, null: false, index: { unique: true }
- t.integer :status, null: false
- t.string :version, null: false, limit: 255
- t.text :status_reason
- end
- end
-end
diff --git a/db/post_migrate/20220706071304_drop_clusters_integration_elasticstack_table.rb b/db/post_migrate/20220706071304_drop_clusters_integration_elasticstack_table.rb
deleted file mode 100644
index 206652b5dcf..00000000000
--- a/db/post_migrate/20220706071304_drop_clusters_integration_elasticstack_table.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class DropClustersIntegrationElasticstackTable < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_clusters_integration_elasticstack_enabled'
-
- def up
- drop_table :clusters_integration_elasticstack
- end
-
- def down
- create_table :clusters_integration_elasticstack, id: false do |t|
- t.timestamps_with_timezone null: false
- t.references :cluster, primary_key: true, type: :bigint, default: nil, index: false
- t.boolean :enabled, null: false, default: false
- t.text :chart_version, limit: 10
- end
-
- add_concurrent_index(:clusters_integration_elasticstack, [:enabled, :created_at, :cluster_id], name: INDEX_NAME)
- end
-end
diff --git a/db/post_migrate/20220706115138_create_async_index_on_security_findings.rb b/db/post_migrate/20220706115138_create_async_index_on_security_findings.rb
deleted file mode 100644
index 30baa1af91c..00000000000
--- a/db/post_migrate/20220706115138_create_async_index_on_security_findings.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class CreateAsyncIndexOnSecurityFindings < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_on_security_findings_uuid_and_id_order_desc'
-
- def up
- prepare_async_index(
- :security_findings,
- %i[uuid id],
- order: { id: :desc },
- name: INDEX_NAME
- )
- end
-
- def down
- unprepare_async_index(
- :security_findings,
- %i[uuid id],
- name: INDEX_NAME
- )
- end
-end
diff --git a/db/post_migrate/20220706122719_create_index_on_security_findings_uuid_id_desc.rb b/db/post_migrate/20220706122719_create_index_on_security_findings_uuid_id_desc.rb
deleted file mode 100644
index 0c2e2cb4b70..00000000000
--- a/db/post_migrate/20220706122719_create_index_on_security_findings_uuid_id_desc.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-class CreateIndexOnSecurityFindingsUuidIdDesc < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_on_security_findings_uuid_and_id_order_desc'
-
- def up
- add_concurrent_index(
- :security_findings,
- %i[uuid id],
- order: { id: :desc },
- name: INDEX_NAME
- )
- end
-
- def down
- remove_concurrent_index_by_name(
- :security_findings,
- INDEX_NAME
- )
- end
-end
diff --git a/db/post_migrate/20220706132238_add_indices_on_security_scans_info_column.rb b/db/post_migrate/20220706132238_add_indices_on_security_scans_info_column.rb
deleted file mode 100644
index 48dc5b5d84a..00000000000
--- a/db/post_migrate/20220706132238_add_indices_on_security_scans_info_column.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndicesOnSecurityScansInfoColumn < Gitlab::Database::Migration[2.0]
- INDEX_NAME_ON_ERRORS = :index_security_scans_on_length_of_errors
- INDEX_NAME_ON_WARNINGS = :index_security_scans_on_length_of_warnings
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index(
- :security_scans,
- "pipeline_id, jsonb_array_length(COALESCE((security_scans.info -> 'errors'::text), '[]'::jsonb))",
- name: INDEX_NAME_ON_ERRORS
- )
-
- add_concurrent_index(
- :security_scans,
- "pipeline_id, jsonb_array_length(COALESCE((security_scans.info -> 'warnings'::text), '[]'::jsonb))",
- name: INDEX_NAME_ON_WARNINGS
- )
- end
-
- def down
- remove_concurrent_index_by_name :security_scans, INDEX_NAME_ON_ERRORS
- remove_concurrent_index_by_name :security_scans, INDEX_NAME_ON_WARNINGS
- end
-end
diff --git a/db/post_migrate/20220707075300_reschedule_backfill_imported_issue_search_data.rb b/db/post_migrate/20220707075300_reschedule_backfill_imported_issue_search_data.rb
deleted file mode 100644
index 912578d6b7c..00000000000
--- a/db/post_migrate/20220707075300_reschedule_backfill_imported_issue_search_data.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-# frozen_string_literal: true
-
-class RescheduleBackfillImportedIssueSearchData < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- MIGRATION = 'BackfillImportedIssueSearchData'
- DELAY_INTERVAL = 120.seconds
- BATCH_SIZE = 50_000
- SUB_BATCH_SIZE = 1_000
-
- def up
- # remove the original migration
- delete_batched_background_migration(MIGRATION, :issues, :id, [])
-
- # reschedule the migration
- queue_batched_background_migration(
- MIGRATION,
- :issues,
- :id,
- job_interval: DELAY_INTERVAL,
- batch_min_value: min_value,
- batch_size: BATCH_SIZE,
- sub_batch_size: SUB_BATCH_SIZE
- )
- end
-
- def down
- delete_batched_background_migration(MIGRATION, :issues, :id, [])
- end
-
- private
-
- def min_value
- start_value = Gitlab::Database::BackgroundMigration::BatchedMigration.find_by(
- job_class_name: "BackfillIssueSearchData"
- )&.max_value
-
- return BATCH_MIN_VALUE unless start_value
-
- max_value = Issue.maximum(:id)
-
- return BATCH_MIN_VALUE unless max_value
-
- # Just in case the issue's max ID is now lower than the history in the table
- [start_value, max_value].min
- end
-end
diff --git a/db/post_migrate/20220707105529_cleanup_chat_name_service_id.rb b/db/post_migrate/20220707105529_cleanup_chat_name_service_id.rb
deleted file mode 100644
index aa3af4acf31..00000000000
--- a/db/post_migrate/20220707105529_cleanup_chat_name_service_id.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class CleanupChatNameServiceId < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- cleanup_concurrent_column_rename :chat_names, :service_id, :integration_id
- end
-
- def down
- undo_cleanup_concurrent_column_rename :chat_names, :service_id, :integration_id
- end
-end
diff --git a/db/post_migrate/20220707160921_cleanup_slack_integration_service_id.rb b/db/post_migrate/20220707160921_cleanup_slack_integration_service_id.rb
deleted file mode 100644
index 25b4252e48b..00000000000
--- a/db/post_migrate/20220707160921_cleanup_slack_integration_service_id.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class CleanupSlackIntegrationServiceId < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- cleanup_concurrent_column_rename :slack_integrations, :service_id, :integration_id
- end
-
- def down
- undo_cleanup_concurrent_column_rename :slack_integrations, :service_id, :integration_id
- end
-end
diff --git a/db/post_migrate/20220708100508_drop_index_on_ci_runner_versions_on_status.rb b/db/post_migrate/20220708100508_drop_index_on_ci_runner_versions_on_status.rb
deleted file mode 100644
index 71eb5a0867e..00000000000
--- a/db/post_migrate/20220708100508_drop_index_on_ci_runner_versions_on_status.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class DropIndexOnCiRunnerVersionsOnStatus < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_ci_runner_versions_on_status'
-
- def up
- remove_concurrent_index_by_name :ci_runner_versions, INDEX_NAME
- end
-
- def down
- add_concurrent_index :ci_runner_versions, :version, name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220712131533_cleanup_issue_tracker_data_service_id.rb b/db/post_migrate/20220712131533_cleanup_issue_tracker_data_service_id.rb
deleted file mode 100644
index be304c5fe6d..00000000000
--- a/db/post_migrate/20220712131533_cleanup_issue_tracker_data_service_id.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class CleanupIssueTrackerDataServiceId < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- cleanup_concurrent_column_rename :issue_tracker_data, :service_id, :integration_id
- end
-
- def down
- undo_cleanup_concurrent_column_rename :issue_tracker_data, :service_id, :integration_id
- end
-end
diff --git a/db/post_migrate/20220712144900_cleanup_jira_tracker_data_service_id.rb b/db/post_migrate/20220712144900_cleanup_jira_tracker_data_service_id.rb
deleted file mode 100644
index 90b35f03054..00000000000
--- a/db/post_migrate/20220712144900_cleanup_jira_tracker_data_service_id.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class CleanupJiraTrackerDataServiceId < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- cleanup_concurrent_column_rename :jira_tracker_data, :service_id, :integration_id
- end
-
- def down
- undo_cleanup_concurrent_column_rename :jira_tracker_data, :service_id, :integration_id
- end
-end
diff --git a/db/post_migrate/20220712175029_add_index_with_target_type_to_todos.rb b/db/post_migrate/20220712175029_add_index_with_target_type_to_todos.rb
deleted file mode 100644
index 077e8ed4bbe..00000000000
--- a/db/post_migrate/20220712175029_add_index_with_target_type_to_todos.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexWithTargetTypeToTodos < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_FOR_PROJECTS_NAME = 'index_requirements_project_id_user_id_id_and_target_type'
- INDEX_FOR_TARGET_TYPE_NAME = 'index_requirements_user_id_and_target_type'
-
- def up
- add_concurrent_index :todos, [:project_id, :user_id, :id, :target_type], name: INDEX_FOR_PROJECTS_NAME
- add_concurrent_index :todos, [:user_id, :target_type], name: INDEX_FOR_TARGET_TYPE_NAME
- end
-
- def down
- remove_concurrent_index_by_name :todos, INDEX_FOR_PROJECTS_NAME
- remove_concurrent_index_by_name :todos, INDEX_FOR_TARGET_TYPE_NAME
- end
-end
diff --git a/db/post_migrate/20220712181304_remove_deprecated_indexes_from_todos.rb b/db/post_migrate/20220712181304_remove_deprecated_indexes_from_todos.rb
deleted file mode 100644
index 4f99caa10a4..00000000000
--- a/db/post_migrate/20220712181304_remove_deprecated_indexes_from_todos.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveDeprecatedIndexesFromTodos < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- PROJECTS_INDEX = 'index_todos_on_project_id_and_user_id_and_id'
- USERS_INDEX = 'index_todos_on_user_id'
-
- # These indexes are deprecated in favor of two new ones
- # added in a previous migration:
- #
- # * index_requirements_project_id_user_id_target_type_and_id
- # * index_requirements_user_id_and_target_type
- def up
- remove_concurrent_index_by_name :todos, PROJECTS_INDEX
- remove_concurrent_index_by_name :todos, USERS_INDEX
- end
-
- def down
- add_concurrent_index :todos, [:project_id, :user_id, :id], name: PROJECTS_INDEX
- add_concurrent_index :todos, :user_id, name: USERS_INDEX
- end
-end
diff --git a/db/post_migrate/20220713133515_cleanup_backfill_draft_statuses_on_merge_requests.rb b/db/post_migrate/20220713133515_cleanup_backfill_draft_statuses_on_merge_requests.rb
deleted file mode 100644
index eb612a98ae6..00000000000
--- a/db/post_migrate/20220713133515_cleanup_backfill_draft_statuses_on_merge_requests.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class CleanupBackfillDraftStatusesOnMergeRequests < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- MIGRATION = 'BackfillDraftStatusOnMergeRequests'
-
- def up
- finalize_background_migration(MIGRATION)
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220714122311_add_async_index_on_security_findings_id_and_partition_number.rb b/db/post_migrate/20220714122311_add_async_index_on_security_findings_id_and_partition_number.rb
deleted file mode 100644
index 02d18ba8b40..00000000000
--- a/db/post_migrate/20220714122311_add_async_index_on_security_findings_id_and_partition_number.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddAsyncIndexOnSecurityFindingsIdAndPartitionNumber < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'security_findings_partitioned_pkey'
-
- disable_ddl_transaction!
-
- def up
- prepare_async_index :security_findings, [:id, :partition_number], unique: true, name: INDEX_NAME
- end
-
- def down
- unprepare_async_index_by_name :security_findings, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220714122418_add_async_index_on_security_findings_unique_columns.rb b/db/post_migrate/20220714122418_add_async_index_on_security_findings_unique_columns.rb
deleted file mode 100644
index e21d3db6798..00000000000
--- a/db/post_migrate/20220714122418_add_async_index_on_security_findings_unique_columns.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddAsyncIndexOnSecurityFindingsUniqueColumns < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_security_findings_on_unique_columns'
-
- disable_ddl_transaction!
-
- def up
- prepare_async_index :security_findings, [:uuid, :scan_id, :partition_number], unique: true, name: INDEX_NAME
- end
-
- def down
- unprepare_async_index_by_name :security_findings, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220715054506_add_parent_link_unique_work_item_index.rb b/db/post_migrate/20220715054506_add_parent_link_unique_work_item_index.rb
deleted file mode 100644
index ed5b85b711c..00000000000
--- a/db/post_migrate/20220715054506_add_parent_link_unique_work_item_index.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class AddParentLinkUniqueWorkItemIndex < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_work_item_parent_links_on_work_item_id'
- OLD_INDEX_NAME = 'index_parent_links_on_work_item_id_and_work_item_parent_id'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :work_item_parent_links, :work_item_id, unique: true, name: INDEX_NAME
- remove_concurrent_index_by_name :work_item_parent_links, OLD_INDEX_NAME
- end
-
- def down
- add_concurrent_index :work_item_parent_links, [:work_item_id, :work_item_parent_id],
- unique: true, name: OLD_INDEX_NAME
- remove_concurrent_index_by_name :work_item_parent_links, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220715152108_backfill_project_import_level.rb b/db/post_migrate/20220715152108_backfill_project_import_level.rb
deleted file mode 100644
index 65a0dc0a58a..00000000000
--- a/db/post_migrate/20220715152108_backfill_project_import_level.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class BackfillProjectImportLevel < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- MIGRATION = 'BackfillProjectImportLevel'
- INTERVAL = 120.seconds
-
- def up
- queue_batched_background_migration(
- MIGRATION,
- :namespaces,
- :id,
- job_interval: INTERVAL
- )
- end
-
- def down
- delete_batched_background_migration(MIGRATION, :namespaces, :id, [])
- end
-end
diff --git a/db/post_migrate/20220715160023_drop_post_migration_test_table.rb b/db/post_migrate/20220715160023_drop_post_migration_test_table.rb
deleted file mode 100644
index 98b4cbcf972..00000000000
--- a/db/post_migrate/20220715160023_drop_post_migration_test_table.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class DropPostMigrationTestTable < Gitlab::Database::Migration[2.0]
- def up
- drop_table :post_migration_test_table
- end
-
- def down
- create_table :post_migration_test_table do |t|
- t.integer :status, null: false
- end
- end
-end
diff --git a/db/post_migrate/20220715163254_update_notes_in_past.rb b/db/post_migrate/20220715163254_update_notes_in_past.rb
deleted file mode 100644
index 1c46a3bc9dc..00000000000
--- a/db/post_migrate/20220715163254_update_notes_in_past.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-# See https://docs.gitlab.com/ee/development/migration_style_guide.html
-# for more information on how to write migrations for GitLab.
-
-class UpdateNotesInPast < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- loop do
- update_count = define_batchable_model('notes')
- .where('created_at < ?', '1970-01-01').limit(100)
- .update_all(created_at: '1970-01-01 00:00:00')
-
- break if update_count == 0
- end
- end
-
- def down
- # no op
- end
-end
diff --git a/db/post_migrate/20220715185348_add_index_on_security_findings_id_and_partition_number.rb b/db/post_migrate/20220715185348_add_index_on_security_findings_id_and_partition_number.rb
deleted file mode 100644
index e867ef81381..00000000000
--- a/db/post_migrate/20220715185348_add_index_on_security_findings_id_and_partition_number.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexOnSecurityFindingsIdAndPartitionNumber < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'security_findings_partitioned_pkey'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :security_findings, [:id, :partition_number], unique: true, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :security_findings, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220715185436_add_index_on_security_findings_unique_columns.rb b/db/post_migrate/20220715185436_add_index_on_security_findings_unique_columns.rb
deleted file mode 100644
index 33b069a27d4..00000000000
--- a/db/post_migrate/20220715185436_add_index_on_security_findings_unique_columns.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexOnSecurityFindingsUniqueColumns < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_security_findings_on_unique_columns'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :security_findings, [:uuid, :scan_id, :partition_number], unique: true, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :security_findings, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220715190612_drop_index_on_security_findings_uuid_and_scan_id.rb b/db/post_migrate/20220715190612_drop_index_on_security_findings_uuid_and_scan_id.rb
deleted file mode 100644
index a8a9bab2c84..00000000000
--- a/db/post_migrate/20220715190612_drop_index_on_security_findings_uuid_and_scan_id.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class DropIndexOnSecurityFindingsUuidAndScanId < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_security_findings_on_uuid_and_scan_id'
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :security_findings, INDEX_NAME
- end
-
- def down
- add_concurrent_index :security_findings, [:uuid, :scan_id], unique: true, name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220715191629_change_primary_key_of_security_findings_table.rb b/db/post_migrate/20220715191629_change_primary_key_of_security_findings_table.rb
deleted file mode 100644
index c2859c68c52..00000000000
--- a/db/post_migrate/20220715191629_change_primary_key_of_security_findings_table.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-class ChangePrimaryKeyOfSecurityFindingsTable < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def up
- execute(<<~SQL)
- ALTER TABLE security_findings DROP CONSTRAINT security_findings_pkey;
- SQL
-
- execute(<<~SQL)
- ALTER TABLE security_findings ADD CONSTRAINT security_findings_pkey PRIMARY KEY USING index security_findings_partitioned_pkey;
- SQL
- end
-
- def down
- execute(<<~SQL)
- ALTER TABLE security_findings DROP CONSTRAINT security_findings_pkey;
- SQL
-
- execute(<<~SQL)
- ALTER TABLE security_findings ADD CONSTRAINT security_findings_pkey PRIMARY KEY (id);
- SQL
-
- execute(<<~SQL)
- CREATE UNIQUE INDEX security_findings_partitioned_pkey ON security_findings USING btree(id, partition_number);
- SQL
- end
-end
diff --git a/db/post_migrate/20220719081542_drop_queued_at_index_from_ci_builds.rb b/db/post_migrate/20220719081542_drop_queued_at_index_from_ci_builds.rb
deleted file mode 100644
index 4a16d022c70..00000000000
--- a/db/post_migrate/20220719081542_drop_queued_at_index_from_ci_builds.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class DropQueuedAtIndexFromCiBuilds < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_ci_builds_on_queued_at'
-
- def up
- remove_concurrent_index_by_name :ci_builds, INDEX_NAME
- end
-
- # rubocop:disable Migration/PreventIndexCreation
- def down
- add_concurrent_index :ci_builds, :queued_at, name: INDEX_NAME
- end
- # rubocop:enable Migration/PreventIndexCreation
-end
diff --git a/db/post_migrate/20220719165537_remove_ci_runners_semver_column.rb b/db/post_migrate/20220719165537_remove_ci_runners_semver_column.rb
deleted file mode 100644
index a6929153d10..00000000000
--- a/db/post_migrate/20220719165537_remove_ci_runners_semver_column.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveCiRunnersSemverColumn < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_ci_runners_on_id_and_semver_cidr'
-
- def up
- with_lock_retries do
- remove_column :ci_runners, :semver
- end
- end
-
- def down
- with_lock_retries do
- add_column :ci_runners, :semver, :text, null: true
- end
- add_text_limit :ci_runners, :semver, 16
- add_concurrent_index :ci_runners, 'id, (semver::cidr)', name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220720090354_remove_pending_builds_covering_index_from_ci_builds.rb b/db/post_migrate/20220720090354_remove_pending_builds_covering_index_from_ci_builds.rb
deleted file mode 100644
index fb3d12840cc..00000000000
--- a/db/post_migrate/20220720090354_remove_pending_builds_covering_index_from_ci_builds.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# frozen_string_literal: true
-
-class RemovePendingBuildsCoveringIndexFromCiBuilds < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_ci_builds_runner_id_pending_covering'
-
- def up
- remove_concurrent_index_by_name :ci_builds, INDEX_NAME
- end
-
- # rubocop:disable Migration/PreventIndexCreation
- def down
- disable_statement_timeout do
- unless index_exists_by_name?(:ci_builds, INDEX_NAME)
- execute <<~SQL.squish
- CREATE INDEX CONCURRENTLY #{INDEX_NAME}
- ON ci_builds (runner_id, id)
- INCLUDE (project_id)
- WHERE status = 'pending' AND type = 'Ci::Build'
- SQL
- end
- end
- end
- # rubocop:enable Migration/PreventIndexCreation
-end
diff --git a/db/post_migrate/20220720121421_remove_pat_and_ssh_enforcement_columns_from_application_settings.rb b/db/post_migrate/20220720121421_remove_pat_and_ssh_enforcement_columns_from_application_settings.rb
deleted file mode 100644
index b03cad08f35..00000000000
--- a/db/post_migrate/20220720121421_remove_pat_and_ssh_enforcement_columns_from_application_settings.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-# frozen_string_literal: true
-
-class RemovePatAndSshEnforcementColumnsFromApplicationSettings < Gitlab::Database::Migration[2.0]
- def change
- remove_column :application_settings, :enforce_pat_expiration, :boolean, default: true, null: false
- remove_column :application_settings, :enforce_ssh_key_expiration, :boolean, default: true, null: false
- end
-end
diff --git a/db/post_migrate/20220720123249_remove_token_column_from_ci_builds.rb b/db/post_migrate/20220720123249_remove_token_column_from_ci_builds.rb
deleted file mode 100644
index 1bc13b6ea05..00000000000
--- a/db/post_migrate/20220720123249_remove_token_column_from_ci_builds.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveTokenColumnFromCiBuilds < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- remove_column :ci_builds, :token, :string
- end
-end
diff --git a/db/post_migrate/20220720171102_add_index_on_vulnerability_reads_namespace_id.rb b/db/post_migrate/20220720171102_add_index_on_vulnerability_reads_namespace_id.rb
deleted file mode 100644
index e90fcfd3016..00000000000
--- a/db/post_migrate/20220720171102_add_index_on_vulnerability_reads_namespace_id.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexOnVulnerabilityReadsNamespaceId < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_vuln_reads_on_namespace_id_state_severity_and_vuln_id'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :vulnerability_reads,
- [:namespace_id, :state, :severity, :vulnerability_id],
- name: INDEX_NAME,
- order: { vulnerability_id: :desc }
- end
-
- def down
- remove_concurrent_index_by_name :vulnerability_reads, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220720171801_add_foreign_key_on_vulnerability_reads_namespace_id.rb b/db/post_migrate/20220720171801_add_foreign_key_on_vulnerability_reads_namespace_id.rb
deleted file mode 100644
index c1b6a9d6909..00000000000
--- a/db/post_migrate/20220720171801_add_foreign_key_on_vulnerability_reads_namespace_id.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddForeignKeyOnVulnerabilityReadsNamespaceId < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :vulnerability_reads, :namespaces, column: :namespace_id, on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key_if_exists :vulnerability_reads, column: :namespace_id
- end
- end
-end
diff --git a/db/post_migrate/20220721031446_schedule_disable_legacy_open_source_license_for_one_member_no_repo_projects.rb b/db/post_migrate/20220721031446_schedule_disable_legacy_open_source_license_for_one_member_no_repo_projects.rb
deleted file mode 100644
index 7665d49b1d9..00000000000
--- a/db/post_migrate/20220721031446_schedule_disable_legacy_open_source_license_for_one_member_no_repo_projects.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleDisableLegacyOpenSourceLicenseForOneMemberNoRepoProjects < Gitlab::Database::Migration[2.0]
- MIGRATION = 'DisableLegacyOpenSourceLicenseForOneMemberNoRepoProjects'
- INTERVAL = 2.minutes
- BATCH_SIZE = 5_000
- MAX_BATCH_SIZE = 10_000
- SUB_BATCH_SIZE = 500
-
- 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/20220721140252_prepare_partial_trigram_indexes_for_issues.rb b/db/post_migrate/20220721140252_prepare_partial_trigram_indexes_for_issues.rb
deleted file mode 100644
index 00a51f3024e..00000000000
--- a/db/post_migrate/20220721140252_prepare_partial_trigram_indexes_for_issues.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-class PreparePartialTrigramIndexesForIssues < 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-\\u218F]*' OR description NOT SIMILAR TO '[\\u0000-\\u218F]*'"
-
- prepare_async_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
-
- 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/20220722084543_schedule_disable_legacy_open_source_license_for_no_issues_no_repo_projects.rb b/db/post_migrate/20220722084543_schedule_disable_legacy_open_source_license_for_no_issues_no_repo_projects.rb
deleted file mode 100644
index 7fbf09846cf..00000000000
--- a/db/post_migrate/20220722084543_schedule_disable_legacy_open_source_license_for_no_issues_no_repo_projects.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleDisableLegacyOpenSourceLicenseForNoIssuesNoRepoProjects < Gitlab::Database::Migration[2.0]
- MIGRATION = 'DisableLegacyOpenSourceLicenseForNoIssuesNoRepoProjects'
- INTERVAL = 2.minutes
- BATCH_SIZE = 5_000
- MAX_BATCH_SIZE = 10_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/20220722110026_reschedule_set_legacy_open_source_license_available_for_non_public_projects.rb b/db/post_migrate/20220722110026_reschedule_set_legacy_open_source_license_available_for_non_public_projects.rb
deleted file mode 100644
index 546923141e2..00000000000
--- a/db/post_migrate/20220722110026_reschedule_set_legacy_open_source_license_available_for_non_public_projects.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-# frozen_string_literal: true
-
-class RescheduleSetLegacyOpenSourceLicenseAvailableForNonPublicProjects < Gitlab::Database::Migration[2.0]
- MIGRATION = 'SetLegacyOpenSourceLicenseAvailableForNonPublicProjects'
- INTERVAL = 2.minutes
- BATCH_SIZE = 5_000
- MAX_BATCH_SIZE = 10_000
- SUB_BATCH_SIZE = 200
-
- disable_ddl_transaction!
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- return unless Gitlab.com?
-
- delete_batched_background_migration(MIGRATION, :projects, :id, [])
-
- 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/20220722145845_schedule_backfilling_the_namespace_id_for_vulnerability_reads.rb b/db/post_migrate/20220722145845_schedule_backfilling_the_namespace_id_for_vulnerability_reads.rb
deleted file mode 100644
index e2d1846f8f6..00000000000
--- a/db/post_migrate/20220722145845_schedule_backfilling_the_namespace_id_for_vulnerability_reads.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleBackfillingTheNamespaceIdForVulnerabilityReads < Gitlab::Database::Migration[2.0]
- MIGRATION_NAME = 'BackfillNamespaceIdOfVulnerabilityReads'
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
- disable_ddl_transaction!
-
- def up
- queue_batched_background_migration(
- MIGRATION_NAME,
- :vulnerability_reads,
- :vulnerability_id,
- job_interval: 2.minutes,
- batch_size: 10_000,
- sub_batch_size: 200
- )
- end
-
- def down
- delete_batched_background_migration(MIGRATION_NAME, :vulnerability_reads, :vulnerability_id, [])
- end
-end
diff --git a/db/post_migrate/20220725150127_update_jira_tracker_data_deployment_type_based_on_url.rb b/db/post_migrate/20220725150127_update_jira_tracker_data_deployment_type_based_on_url.rb
deleted file mode 100644
index 0deba9b3e81..00000000000
--- a/db/post_migrate/20220725150127_update_jira_tracker_data_deployment_type_based_on_url.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-class UpdateJiraTrackerDataDeploymentTypeBasedOnUrl < Gitlab::Database::Migration[2.0]
- MIGRATION = 'UpdateJiraTrackerDataDeploymentTypeBasedOnUrl'
- DELAY_INTERVAL = 2.minutes.to_i
- BATCH_SIZE = 2_500
- SUB_BATCH_SIZE = 2_500
-
- disable_ddl_transaction!
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- say "Scheduling #{MIGRATION} jobs"
- delete_queued_jobs(MIGRATION)
- queue_batched_background_migration(
- MIGRATION,
- :jira_tracker_data,
- :id,
- job_interval: DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- sub_batch_size: SUB_BATCH_SIZE
- )
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220726182310_add_user_fk_to_vulnerability_state_transitions.rb b/db/post_migrate/20220726182310_add_user_fk_to_vulnerability_state_transitions.rb
deleted file mode 100644
index ad0bf6141b2..00000000000
--- a/db/post_migrate/20220726182310_add_user_fk_to_vulnerability_state_transitions.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class AddUserFkToVulnerabilityStateTransitions < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_vulnerability_state_transitions_on_author_id'
-
- def up
- add_concurrent_index :vulnerability_state_transitions, :author_id, name: INDEX_NAME
- add_concurrent_foreign_key :vulnerability_state_transitions, :users, column: :author_id, on_delete: :nullify
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :vulnerability_state_transitions, column: :author_id
- end
-
- remove_concurrent_index_by_name :vulnerability_state_transitions, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220728134255_update_index_vulnerabilities_common_finder.rb b/db/post_migrate/20220728134255_update_index_vulnerabilities_common_finder.rb
deleted file mode 100644
index 617d7661b5b..00000000000
--- a/db/post_migrate/20220728134255_update_index_vulnerabilities_common_finder.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-class UpdateIndexVulnerabilitiesCommonFinder < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- NEW_INDEX_NAME = 'index_vulnerabilities_common_finder_query_on_default_branch'
- OLD_INDEX_NAME = 'index_vulnerabilites_common_finder_query'
-
- def up
- add_concurrent_index :vulnerabilities, [:project_id, :state, :report_type, :present_on_default_branch,
- :severity, :id], name: NEW_INDEX_NAME
-
- remove_concurrent_index_by_name(:vulnerabilities, OLD_INDEX_NAME)
- end
-
- def down
- add_concurrent_index :vulnerabilities, [:project_id, :state, :report_type, :severity, :id], name: OLD_INDEX_NAME
-
- remove_concurrent_index_by_name(:vulnerabilities, NEW_INDEX_NAME)
- end
-end
diff --git a/db/post_migrate/20220729033851_add_partial_legacy_open_source_license_available_index.rb b/db/post_migrate/20220729033851_add_partial_legacy_open_source_license_available_index.rb
deleted file mode 100644
index c99c452c149..00000000000
--- a/db/post_migrate/20220729033851_add_partial_legacy_open_source_license_available_index.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddPartialLegacyOpenSourceLicenseAvailableIndex < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_project_settings_on_legacy_open_source_license_available'
-
- def up
- add_concurrent_index :project_settings,
- %i[legacy_open_source_license_available],
- where: "legacy_open_source_license_available = TRUE",
- name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name(:project_settings, INDEX_NAME)
- end
-end
diff --git a/db/post_migrate/20220729052031_add_index_on_vulnerability_reads_namespace_id_with_report_type.rb b/db/post_migrate/20220729052031_add_index_on_vulnerability_reads_namespace_id_with_report_type.rb
deleted file mode 100644
index 53b2c1728e1..00000000000
--- a/db/post_migrate/20220729052031_add_index_on_vulnerability_reads_namespace_id_with_report_type.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexOnVulnerabilityReadsNamespaceIdWithReportType < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_vulnerability_reads_common_finder_query_with_namespace_id'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :vulnerability_reads,
- [:namespace_id, :state, :report_type, :severity, :vulnerability_id],
- name: INDEX_NAME,
- order: { vulnerability_id: :desc }
- end
-
- def down
- remove_concurrent_index_by_name :vulnerability_reads, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220801144713_add_partial_trigram_index_for_issue_title.rb b/db/post_migrate/20220801144713_add_partial_trigram_index_for_issue_title.rb
deleted file mode 100644
index c4db8232eba..00000000000
--- a/db/post_migrate/20220801144713_add_partial_trigram_index_for_issue_title.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddPartialTrigramIndexForIssueTitle < 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-\\u218F]*' OR description NOT SIMILAR TO '[\\u0000-\\u218F]*'"
- end
-
- def down
- remove_concurrent_index_by_name :issues, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220801150028_add_partial_trigram_index_for_issue_description.rb b/db/post_migrate/20220801150028_add_partial_trigram_index_for_issue_description.rb
deleted file mode 100644
index 79f25718e15..00000000000
--- a/db/post_migrate/20220801150028_add_partial_trigram_index_for_issue_description.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddPartialTrigramIndexForIssueDescription < 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-\\u218F]*' OR description NOT SIMILAR TO '[\\u0000-\\u218F]*'"
- end
-
- def down
- remove_concurrent_index_by_name :issues, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220802112102_schedule_migrate_shared_vulnerability_scanners.rb b/db/post_migrate/20220802112102_schedule_migrate_shared_vulnerability_scanners.rb
deleted file mode 100644
index 724bd323169..00000000000
--- a/db/post_migrate/20220802112102_schedule_migrate_shared_vulnerability_scanners.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleMigrateSharedVulnerabilityScanners < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- # no-op
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220802114351_reschedule_backfill_container_registry_size_into_project_statistics.rb b/db/post_migrate/20220802114351_reschedule_backfill_container_registry_size_into_project_statistics.rb
deleted file mode 100644
index 46b98d319fd..00000000000
--- a/db/post_migrate/20220802114351_reschedule_backfill_container_registry_size_into_project_statistics.rb
+++ /dev/null
@@ -1,37 +0,0 @@
-# frozen_string_literal: true
-
-class RescheduleBackfillContainerRegistrySizeIntoProjectStatistics < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- DELAY_INTERVAL = 2.minutes.to_i
- BATCH_SIZE = 500
- MIGRATION_CLASS = 'BackfillProjectStatisticsContainerRepositorySize'
- BATCH_CLASS_NAME = 'BackfillProjectStatisticsWithContainerRegistrySizeBatchingStrategy'
- SUB_BATCH_SIZE = 100
-
- disable_ddl_transaction!
-
- def up
- return unless Gitlab.dev_or_test_env? || Gitlab.com?
-
- # remove the original migration
- delete_batched_background_migration(MIGRATION_CLASS, :container_repositories, :project_id, [])
-
- # reschedule the migration
- queue_batched_background_migration(
- MIGRATION_CLASS,
- :container_repositories,
- :project_id,
- job_interval: DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- batch_class_name: BATCH_CLASS_NAME,
- sub_batch_size: SUB_BATCH_SIZE
- )
- end
-
- def down
- return unless Gitlab.dev_or_test_env? || Gitlab.com?
-
- delete_batched_background_migration(MIGRATION_CLASS, :container_repositories, :project_id, [])
- end
-end
diff --git a/db/post_migrate/20220802132158_index_on_integration_type_new_id_when_active_and_has_group.rb b/db/post_migrate/20220802132158_index_on_integration_type_new_id_when_active_and_has_group.rb
deleted file mode 100644
index 81e95f531c1..00000000000
--- a/db/post_migrate/20220802132158_index_on_integration_type_new_id_when_active_and_has_group.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class IndexOnIntegrationTypeNewIdWhenActiveAndHasGroup < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_integrations_on_type_new_id_when_active_and_has_group'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :integrations,
- [:type_new, :id, :inherit_from_id],
- name: INDEX_NAME,
- where: '((active = true) AND (group_id IS NOT NULL))'
- end
-
- def down
- remove_concurrent_index_by_name :integrations, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220802204737_remove_deactivated_user_highest_role_stats.rb b/db/post_migrate/20220802204737_remove_deactivated_user_highest_role_stats.rb
deleted file mode 100644
index e23fbfdf7f2..00000000000
--- a/db/post_migrate/20220802204737_remove_deactivated_user_highest_role_stats.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveDeactivatedUserHighestRoleStats < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- # This migration is applicable to self-managed instances that may utilize the
- # dormant user deactivation feature. This feature is not enabled on Gitlab.com.
- return if Gitlab.com?
-
- users_table = define_batchable_model('users')
- user_highest_roles_table = define_batchable_model('user_highest_roles')
-
- users_table.where(state: 'deactivated').each_batch do |users_batch|
- user_ids = users_batch.pluck(:id)
- user_highest_roles_table.where(user_id: user_ids).delete_all
- end
- end
-
- def down
- # no-op
-
- # This migration removes entries from the UserHighestRole table and cannot be reversed
- end
-end
diff --git a/db/post_migrate/20220803042351_add_tmp_index_todos_attention_request_action.rb b/db/post_migrate/20220803042351_add_tmp_index_todos_attention_request_action.rb
deleted file mode 100644
index fa80b2b95e7..00000000000
--- a/db/post_migrate/20220803042351_add_tmp_index_todos_attention_request_action.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddTmpIndexTodosAttentionRequestAction < Gitlab::Database::Migration[2.0]
- INDEX_NAME = "tmp_index_todos_attention_request_action"
- ATTENTION_REQUESTED = 10
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :todos, [:id],
- where: "action = #{ATTENTION_REQUESTED}",
- name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :todos, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220803042352_cleanup_mr_attention_request_todos.rb b/db/post_migrate/20220803042352_cleanup_mr_attention_request_todos.rb
deleted file mode 100644
index d3b281b08ad..00000000000
--- a/db/post_migrate/20220803042352_cleanup_mr_attention_request_todos.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# frozen_string_literal: true
-
-class CleanupMrAttentionRequestTodos < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- class Todo < MigrationRecord
- self.table_name = 'todos'
-
- include ::EachBatch
-
- ATTENTION_REQUESTED = 10
- end
-
- def up
- Todo.where(action: Todo::ATTENTION_REQUESTED).each_batch do |todos_batch|
- todos_batch.delete_all
- end
- end
-
- def down
- # Attention request feature has been reverted.
- end
-end
diff --git a/db/post_migrate/20220804235614_add_comment_to_vulnerability_state_transitions.rb b/db/post_migrate/20220804235614_add_comment_to_vulnerability_state_transitions.rb
deleted file mode 100644
index 3e3cb5746bc..00000000000
--- a/db/post_migrate/20220804235614_add_comment_to_vulnerability_state_transitions.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# frozen_string_literal: true
-
-class AddCommentToVulnerabilityStateTransitions < Gitlab::Database::Migration[2.0]
- # rubocop:disable Migration/AddLimitToTextColumns
- # limit is added in db/post_migrate/20220805001210_add_text_limit_to_vulnerability_state_transitions_comment.rb
- def change
- add_column :vulnerability_state_transitions, :comment, :text
- end
- # rubocop:enable Migration/AddLimitToTextColumns
-end
diff --git a/db/post_migrate/20220805001210_add_text_limit_to_vulnerability_state_transitions_comment.rb b/db/post_migrate/20220805001210_add_text_limit_to_vulnerability_state_transitions_comment.rb
deleted file mode 100644
index dd84c0620ce..00000000000
--- a/db/post_migrate/20220805001210_add_text_limit_to_vulnerability_state_transitions_comment.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddTextLimitToVulnerabilityStateTransitionsComment < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :vulnerability_state_transitions, :comment, 255
- end
-
- def down
- remove_text_limit :vulnerability_state_transitions, :comment
- end
-end
diff --git a/db/post_migrate/20220808072054_prepare_index_removal_security_findings.rb b/db/post_migrate/20220808072054_prepare_index_removal_security_findings.rb
deleted file mode 100644
index eb4158fa9dd..00000000000
--- a/db/post_migrate/20220808072054_prepare_index_removal_security_findings.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class PrepareIndexRemovalSecurityFindings < Gitlab::Database::Migration[2.0]
- INDEX_NAME = :index_on_security_findings_uuid_and_id_order_desc
-
- def up
- prepare_async_index_removal :security_findings, [:uuid, :id], name: INDEX_NAME
- end
-
- def down
- unprepare_async_index_by_name :security_findings, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220808131659_remove_ci_namespace_monthly_usages_additional_amount_available_column.rb b/db/post_migrate/20220808131659_remove_ci_namespace_monthly_usages_additional_amount_available_column.rb
deleted file mode 100644
index 70a1e425e0d..00000000000
--- a/db/post_migrate/20220808131659_remove_ci_namespace_monthly_usages_additional_amount_available_column.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveCiNamespaceMonthlyUsagesAdditionalAmountAvailableColumn < Gitlab::Database::Migration[2.0]
- def up
- remove_column :ci_namespace_monthly_usages, :additional_amount_available
- end
-
- def down
- add_column :ci_namespace_monthly_usages, :additional_amount_available, :integer, default: 0, null: false
- end
-end
diff --git a/db/post_migrate/20220810093742_add_async_tmp_index_job_artifacts_id_and_expire_at.rb b/db/post_migrate/20220810093742_add_async_tmp_index_job_artifacts_id_and_expire_at.rb
deleted file mode 100644
index 5a52b26ed92..00000000000
--- a/db/post_migrate/20220810093742_add_async_tmp_index_job_artifacts_id_and_expire_at.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-class AddAsyncTmpIndexJobArtifactsIdAndExpireAt < 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
- prepare_async_index :ci_job_artifacts, :id,
- where: EXPIRE_AT_ON_22_MIDNIGHT_IN_TIMEZONE_OR_TRACE, name: INDEX_NAME
- end
-
- def down
- unprepare_async_index :ci_job_artifacts, INDEX_NAME
- end
-end
diff --git a/db/schema_migrations/20220128103042 b/db/schema_migrations/20220128103042
deleted file mode 100644
index de1e50b66bf..00000000000
--- a/db/schema_migrations/20220128103042
+++ /dev/null
@@ -1 +0,0 @@
-57813d4c107938d8e58d6223719c2c67206172342b52655ca4a068c845edeb3a \ No newline at end of file
diff --git a/db/schema_migrations/20220213100000 b/db/schema_migrations/20220213100000
deleted file mode 100644
index a62215351cd..00000000000
--- a/db/schema_migrations/20220213100000
+++ /dev/null
@@ -1 +0,0 @@
-a6c1438ebcffca03e1c42ca9a233d087932fabcfd1eacf20dd801b9f574226e5 \ No newline at end of file
diff --git a/db/schema_migrations/20220213103859 b/db/schema_migrations/20220213103859
deleted file mode 100644
index 8950d31675e..00000000000
--- a/db/schema_migrations/20220213103859
+++ /dev/null
@@ -1 +0,0 @@
-ffc9a2dd97ace1f34e0cfca0c407dcf98dabf30379a441ba948261aec531fe85 \ No newline at end of file
diff --git a/db/schema_migrations/20220221102333 b/db/schema_migrations/20220221102333
deleted file mode 100644
index dfc13fd28a0..00000000000
--- a/db/schema_migrations/20220221102333
+++ /dev/null
@@ -1 +0,0 @@
-7aa2cf28363e914ad83c61d45321f701a68111122c75abeb54430c4035d56677 \ No newline at end of file
diff --git a/db/schema_migrations/20220314094841 b/db/schema_migrations/20220314094841
deleted file mode 100644
index f214ecaa9b3..00000000000
--- a/db/schema_migrations/20220314094841
+++ /dev/null
@@ -1 +0,0 @@
-eabdb1e45a67947401963a971f24ae1b19068c72f5d4dd61d7fd47b8e61f1ed2 \ No newline at end of file
diff --git a/db/schema_migrations/20220314154235 b/db/schema_migrations/20220314154235
deleted file mode 100644
index 911a5dc9854..00000000000
--- a/db/schema_migrations/20220314154235
+++ /dev/null
@@ -1 +0,0 @@
-b3015220caeb1d21856de8c5026e2db052e98e4fb1c4b4f3a931b8481c2b8240 \ No newline at end of file
diff --git a/db/schema_migrations/20220316022505 b/db/schema_migrations/20220316022505
deleted file mode 100644
index dd6bed30e8a..00000000000
--- a/db/schema_migrations/20220316022505
+++ /dev/null
@@ -1 +0,0 @@
-c974e1a600323bac9b913e9e382384c302037ed6d1fc1df3b747471810293167 \ No newline at end of file
diff --git a/db/schema_migrations/20220324091224 b/db/schema_migrations/20220324091224
deleted file mode 100644
index 4be0647a91b..00000000000
--- a/db/schema_migrations/20220324091224
+++ /dev/null
@@ -1 +0,0 @@
-7418b98f33ada13dedab493ad8a969808a18db2fa0188e428b1c685aabb3bc66 \ No newline at end of file
diff --git a/db/schema_migrations/20220324165436 b/db/schema_migrations/20220324165436
deleted file mode 100644
index e2e366134f6..00000000000
--- a/db/schema_migrations/20220324165436
+++ /dev/null
@@ -1 +0,0 @@
-6fcf6e2ecc7d9b62adf20add28b1eeeebde449dfa52d2af67d9098768d3cb67e \ No newline at end of file
diff --git a/db/schema_migrations/20220328095848 b/db/schema_migrations/20220328095848
deleted file mode 100644
index 83af691ee8e..00000000000
--- a/db/schema_migrations/20220328095848
+++ /dev/null
@@ -1 +0,0 @@
-4d75e2180a30d3cdd4efa3b6a7d107e146b755faf0316e985a8813a85644af35 \ No newline at end of file
diff --git a/db/schema_migrations/20220328100456 b/db/schema_migrations/20220328100456
deleted file mode 100644
index a6017220eb0..00000000000
--- a/db/schema_migrations/20220328100456
+++ /dev/null
@@ -1 +0,0 @@
-a27caa521761ff1f4513318eb4ce3ea0e29d101f260493598caf4c8cb0fcc931 \ No newline at end of file
diff --git a/db/schema_migrations/20220328100457 b/db/schema_migrations/20220328100457
deleted file mode 100644
index 531ea3cd432..00000000000
--- a/db/schema_migrations/20220328100457
+++ /dev/null
@@ -1 +0,0 @@
-954217de622b1ee360edbd89dd31c5a051001cf6879ce97c7b49c228321d48d7 \ No newline at end of file
diff --git a/db/schema_migrations/20220329092245 b/db/schema_migrations/20220329092245
deleted file mode 100644
index 5d7ceab6d6d..00000000000
--- a/db/schema_migrations/20220329092245
+++ /dev/null
@@ -1 +0,0 @@
-79643fafa7ebc5374980fc1ef34b3f5ee5a231172420192895b227a31c552e6a \ No newline at end of file
diff --git a/db/schema_migrations/20220329130330 b/db/schema_migrations/20220329130330
deleted file mode 100644
index 367d43a89a2..00000000000
--- a/db/schema_migrations/20220329130330
+++ /dev/null
@@ -1 +0,0 @@
-8726707f9f4bb8d256886c592b6a11ba8487de24f5340c837800f5ce0c32df9d \ No newline at end of file
diff --git a/db/schema_migrations/20220331125725 b/db/schema_migrations/20220331125725
deleted file mode 100644
index 6f10644b517..00000000000
--- a/db/schema_migrations/20220331125725
+++ /dev/null
@@ -1 +0,0 @@
-a7e5490e9b53cbbed01c03690cbe0bb4668adb17ec4fe14ca96e021f2e313b38 \ No newline at end of file
diff --git a/db/schema_migrations/20220331130726 b/db/schema_migrations/20220331130726
deleted file mode 100644
index d88e56d14c9..00000000000
--- a/db/schema_migrations/20220331130726
+++ /dev/null
@@ -1 +0,0 @@
-bcaf6139100dc5658d33292e8e5484d1d6278f022eeb6e3bcd519efdccdf4470 \ No newline at end of file
diff --git a/db/schema_migrations/20220331133802 b/db/schema_migrations/20220331133802
deleted file mode 100644
index 780876ac02e..00000000000
--- a/db/schema_migrations/20220331133802
+++ /dev/null
@@ -1 +0,0 @@
-0e96430b245f6f04447ee50b6e0c0b9d7828cfeaf1f08e303aa04bb40a117a7f \ No newline at end of file
diff --git a/db/schema_migrations/20220401071609 b/db/schema_migrations/20220401071609
deleted file mode 100644
index 1fa11a31867..00000000000
--- a/db/schema_migrations/20220401071609
+++ /dev/null
@@ -1 +0,0 @@
-fa1651c066191279fe922b311be3e112b87648c52b1af7a81d7b73ebfe2f7177 \ No newline at end of file
diff --git a/db/schema_migrations/20220401151123 b/db/schema_migrations/20220401151123
deleted file mode 100644
index 9dd7ec7854c..00000000000
--- a/db/schema_migrations/20220401151123
+++ /dev/null
@@ -1 +0,0 @@
-eeb0e38915de7053811e36b0829a21472c041131d1399ebaf14811d407a43f1b \ No newline at end of file
diff --git a/db/schema_migrations/20220405092619 b/db/schema_migrations/20220405092619
deleted file mode 100644
index 599f60fe611..00000000000
--- a/db/schema_migrations/20220405092619
+++ /dev/null
@@ -1 +0,0 @@
-c5cd7bd6ad1dff678aaa2eea89dde757cdbc159cecc8abc5d098e9ce91d55c40 \ No newline at end of file
diff --git a/db/schema_migrations/20220406133049 b/db/schema_migrations/20220406133049
deleted file mode 100644
index 4c67d7fd780..00000000000
--- a/db/schema_migrations/20220406133049
+++ /dev/null
@@ -1 +0,0 @@
-bfd9afc3245a311f905548c18535a2d4216b3973b505b1e3217037e4c0a39a2e \ No newline at end of file
diff --git a/db/schema_migrations/20220407163559 b/db/schema_migrations/20220407163559
deleted file mode 100644
index e0517db3672..00000000000
--- a/db/schema_migrations/20220407163559
+++ /dev/null
@@ -1 +0,0 @@
-dabbd8b95ec49b4267d53768013b4e62ae1219a4575dc8b0fccb0e117e725885 \ No newline at end of file
diff --git a/db/schema_migrations/20220411173544 b/db/schema_migrations/20220411173544
deleted file mode 100644
index e56cd4d9cfc..00000000000
--- a/db/schema_migrations/20220411173544
+++ /dev/null
@@ -1 +0,0 @@
-0bb23775f65b9997e04dffe701ba609d26dde89796406941fbd27bf810b174ae \ No newline at end of file
diff --git a/db/schema_migrations/20220412060931 b/db/schema_migrations/20220412060931
deleted file mode 100644
index 145d3aaf101..00000000000
--- a/db/schema_migrations/20220412060931
+++ /dev/null
@@ -1 +0,0 @@
-504e7df63be512fb4f6d3abbf9ebe381752f2c24b63b2d6a4d11c64894c1555b \ No newline at end of file
diff --git a/db/schema_migrations/20220412135446 b/db/schema_migrations/20220412135446
deleted file mode 100644
index 29fd0a2befc..00000000000
--- a/db/schema_migrations/20220412135446
+++ /dev/null
@@ -1 +0,0 @@
-ec0dbbc2963943fd1449503c141fd8e84e5c0f58ab6b845734a61bedcd7da44a \ No newline at end of file
diff --git a/db/schema_migrations/20220412140446 b/db/schema_migrations/20220412140446
deleted file mode 100644
index c9c06daa26f..00000000000
--- a/db/schema_migrations/20220412140446
+++ /dev/null
@@ -1 +0,0 @@
-28d84269536b34084bf060d72592119c580ad92ff9de481dd67770f07fc26ab4 \ No newline at end of file
diff --git a/db/schema_migrations/20220412140755 b/db/schema_migrations/20220412140755
deleted file mode 100644
index 3a34d98162d..00000000000
--- a/db/schema_migrations/20220412140755
+++ /dev/null
@@ -1 +0,0 @@
-95353be853064cd1038e8a416254017f33c42bfadf97eca6732a62c0796018f9 \ No newline at end of file
diff --git a/db/schema_migrations/20220412141020 b/db/schema_migrations/20220412141020
deleted file mode 100644
index 6487e30776f..00000000000
--- a/db/schema_migrations/20220412141020
+++ /dev/null
@@ -1 +0,0 @@
-bf0696047c736e361225ce33ee750def26ae2f9bd2ece9065799fd9514edbfcc \ No newline at end of file
diff --git a/db/schema_migrations/20220413054910 b/db/schema_migrations/20220413054910
deleted file mode 100644
index 6f6c0321d53..00000000000
--- a/db/schema_migrations/20220413054910
+++ /dev/null
@@ -1 +0,0 @@
-5d386a9eb1602afcaf44442c5696e03721a265cf104564258f4adee60b70b0f2 \ No newline at end of file
diff --git a/db/schema_migrations/20220413124200 b/db/schema_migrations/20220413124200
deleted file mode 100644
index cbf9676b231..00000000000
--- a/db/schema_migrations/20220413124200
+++ /dev/null
@@ -1 +0,0 @@
-f5d7722ee4b0288294b08b470e7f9c072cf50f888a33fa7ed234eaafa5684843 \ No newline at end of file
diff --git a/db/schema_migrations/20220413164146 b/db/schema_migrations/20220413164146
deleted file mode 100644
index a78ab62884e..00000000000
--- a/db/schema_migrations/20220413164146
+++ /dev/null
@@ -1 +0,0 @@
-bae5ea4ce48e44704ed37a400222fd9d09ac6da43ca878747ba3fd1105d16360 \ No newline at end of file
diff --git a/db/schema_migrations/20220413235818 b/db/schema_migrations/20220413235818
deleted file mode 100644
index 449b2d61115..00000000000
--- a/db/schema_migrations/20220413235818
+++ /dev/null
@@ -1 +0,0 @@
-41913029290e231d17f108fadf62e629b8919f5edf8854a4a7ae92e233329af3 \ No newline at end of file
diff --git a/db/schema_migrations/20220414203622 b/db/schema_migrations/20220414203622
deleted file mode 100644
index 80a4196677d..00000000000
--- a/db/schema_migrations/20220414203622
+++ /dev/null
@@ -1 +0,0 @@
-d966d06f88e31be3e310bb1e414484c95fa458680d4cc7f04f20f2a297feb8fd \ No newline at end of file
diff --git a/db/schema_migrations/20220415015143 b/db/schema_migrations/20220415015143
deleted file mode 100644
index 5014ff7b005..00000000000
--- a/db/schema_migrations/20220415015143
+++ /dev/null
@@ -1 +0,0 @@
-6dc4a3e617d9a6a42a0c226c95c377112ae852aabb93d12825be66ee36803b2c \ No newline at end of file
diff --git a/db/schema_migrations/20220415124802 b/db/schema_migrations/20220415124802
deleted file mode 100644
index 3f5c99b675b..00000000000
--- a/db/schema_migrations/20220415124802
+++ /dev/null
@@ -1 +0,0 @@
-aaf55d3f4a82789695ce1107d045a6230e111d5058733f72ccf4a1e5563a2636 \ No newline at end of file
diff --git a/db/schema_migrations/20220415124804 b/db/schema_migrations/20220415124804
deleted file mode 100644
index 1c325f0fdbc..00000000000
--- a/db/schema_migrations/20220415124804
+++ /dev/null
@@ -1 +0,0 @@
-728ce5b9d0986fa55a43841b2a5961f9716b3e2933d1e77e3ac00e30244c6f8e \ No newline at end of file
diff --git a/db/schema_migrations/20220418180958 b/db/schema_migrations/20220418180958
deleted file mode 100644
index 74aaa9c2f46..00000000000
--- a/db/schema_migrations/20220418180958
+++ /dev/null
@@ -1 +0,0 @@
-0108fa3b92704107f712552b51eb3addd53f1482db4866a3b8ccaba2a52239ba \ No newline at end of file
diff --git a/db/schema_migrations/20220419223906 b/db/schema_migrations/20220419223906
deleted file mode 100644
index 8d07b0a30b6..00000000000
--- a/db/schema_migrations/20220419223906
+++ /dev/null
@@ -1 +0,0 @@
-ea53a3b454314f6f87f33659f30e408fb4be4b17b9aac36cee2c19855f458802 \ No newline at end of file
diff --git a/db/schema_migrations/20220420034519 b/db/schema_migrations/20220420034519
deleted file mode 100644
index 0b46a4df4a9..00000000000
--- a/db/schema_migrations/20220420034519
+++ /dev/null
@@ -1 +0,0 @@
-8ce9e197aa590d01755541a9f1c53d6835a9d4ae389e011c5050778d19e80f00 \ No newline at end of file
diff --git a/db/schema_migrations/20220420061439 b/db/schema_migrations/20220420061439
deleted file mode 100644
index cde4753761c..00000000000
--- a/db/schema_migrations/20220420061439
+++ /dev/null
@@ -1 +0,0 @@
-02ff5492367d5a0b0f6b1164c33a9fe0475e72b8fba5d2f8affc4c5a118d4192 \ No newline at end of file
diff --git a/db/schema_migrations/20220420061450 b/db/schema_migrations/20220420061450
deleted file mode 100644
index 04ee97a7e4d..00000000000
--- a/db/schema_migrations/20220420061450
+++ /dev/null
@@ -1 +0,0 @@
-17046780fbe87b7eab87034dfffed239b9da48b5ef78dd1c547575158fc1d37f \ No newline at end of file
diff --git a/db/schema_migrations/20220420135245 b/db/schema_migrations/20220420135245
deleted file mode 100644
index 65ac71d8af3..00000000000
--- a/db/schema_migrations/20220420135245
+++ /dev/null
@@ -1 +0,0 @@
-8b3978648b92209ac691d014e1f54a7aa6a9023163094593d64d2b8e54b7248e \ No newline at end of file
diff --git a/db/schema_migrations/20220420135946 b/db/schema_migrations/20220420135946
deleted file mode 100644
index 55bd78a0373..00000000000
--- a/db/schema_migrations/20220420135946
+++ /dev/null
@@ -1 +0,0 @@
-de813cf367628504ac0a017fa600725042c4653574c15eda52db21531ce7d39c \ No newline at end of file
diff --git a/db/schema_migrations/20220420173247 b/db/schema_migrations/20220420173247
deleted file mode 100644
index 9ab6dac867e..00000000000
--- a/db/schema_migrations/20220420173247
+++ /dev/null
@@ -1 +0,0 @@
-a4113363674f268a3beaef22e29b2aba4e5ba7566bc47dc5676ddc8f8733d331 \ No newline at end of file
diff --git a/db/schema_migrations/20220420192542 b/db/schema_migrations/20220420192542
deleted file mode 100644
index fe62709c7a7..00000000000
--- a/db/schema_migrations/20220420192542
+++ /dev/null
@@ -1 +0,0 @@
-f9f2dc1f24f02571a7919da72b78e54922fd4fe202bc326235485610264d137c \ No newline at end of file
diff --git a/db/schema_migrations/20220420214703 b/db/schema_migrations/20220420214703
deleted file mode 100644
index ff519126cc2..00000000000
--- a/db/schema_migrations/20220420214703
+++ /dev/null
@@ -1 +0,0 @@
-fdf562fd8681b104ef91842e036b1153e7a4786529bcd2e35fcb964ecd25345e \ No newline at end of file
diff --git a/db/schema_migrations/20220421114418 b/db/schema_migrations/20220421114418
deleted file mode 100644
index 48a1862b29b..00000000000
--- a/db/schema_migrations/20220421114418
+++ /dev/null
@@ -1 +0,0 @@
-33f834b8588ad7a618f39668b2546d0945d283c005e6b822a870d6bf5a8ea03d \ No newline at end of file
diff --git a/db/schema_migrations/20220421141342 b/db/schema_migrations/20220421141342
deleted file mode 100644
index f28b4c06a1d..00000000000
--- a/db/schema_migrations/20220421141342
+++ /dev/null
@@ -1 +0,0 @@
-cd332bdb33335750855cd0d6e49bed12a841defa24bc5ffb14ad49a39bd663aa \ No newline at end of file
diff --git a/db/schema_migrations/20220421144758 b/db/schema_migrations/20220421144758
deleted file mode 100644
index 225aaeb5a01..00000000000
--- a/db/schema_migrations/20220421144758
+++ /dev/null
@@ -1 +0,0 @@
-e774ed2d502ce6ef749a048894fa81a51ec521a3bbf8420709b82a6d72058e61 \ No newline at end of file
diff --git a/db/schema_migrations/20220421180321 b/db/schema_migrations/20220421180321
deleted file mode 100644
index b2ffb29adf1..00000000000
--- a/db/schema_migrations/20220421180321
+++ /dev/null
@@ -1 +0,0 @@
-71cde7610713f9e2e21f87a2176cc4ec5fdc797021edab144adfaaf463acb8ef \ No newline at end of file
diff --git a/db/schema_migrations/20220422121443 b/db/schema_migrations/20220422121443
deleted file mode 100644
index 79a69c6af87..00000000000
--- a/db/schema_migrations/20220422121443
+++ /dev/null
@@ -1 +0,0 @@
-5febc5341ccfd930c8dbc77ca2b2bbadb351444a616e657f8ce8cd477c73280f \ No newline at end of file
diff --git a/db/schema_migrations/20220422200633 b/db/schema_migrations/20220422200633
deleted file mode 100644
index 3cb52317fa0..00000000000
--- a/db/schema_migrations/20220422200633
+++ /dev/null
@@ -1 +0,0 @@
-666eff0892b795c7f1a84dfcdb6fad6266f952bb91b69c81e803d16ecdc0d11d \ No newline at end of file
diff --git a/db/schema_migrations/20220422220507 b/db/schema_migrations/20220422220507
deleted file mode 100644
index cd9385a2ec1..00000000000
--- a/db/schema_migrations/20220422220507
+++ /dev/null
@@ -1 +0,0 @@
-4042ca84ca23fafa3943705704c68606f1c423832395170d93988f90255c3249 \ No newline at end of file
diff --git a/db/schema_migrations/20220425111114 b/db/schema_migrations/20220425111114
deleted file mode 100644
index ca0b2c6f908..00000000000
--- a/db/schema_migrations/20220425111114
+++ /dev/null
@@ -1 +0,0 @@
-a9ba21d5f1fcff29b0f14d5bab99dd867ec101667f021914da845e286aabe2a5 \ No newline at end of file
diff --git a/db/schema_migrations/20220425111453 b/db/schema_migrations/20220425111453
deleted file mode 100644
index 45326d41fdd..00000000000
--- a/db/schema_migrations/20220425111453
+++ /dev/null
@@ -1 +0,0 @@
-30d5d5538f965562f594a78b9430a11ea87ea900216ee9c03df422ea47de8f0c \ No newline at end of file
diff --git a/db/schema_migrations/20220425120604 b/db/schema_migrations/20220425120604
deleted file mode 100644
index dd68ec935d8..00000000000
--- a/db/schema_migrations/20220425120604
+++ /dev/null
@@ -1 +0,0 @@
-56ebfb7a97217af23f12db7f93c47104be30da7633a22caf9e74547d5a27d29b \ No newline at end of file
diff --git a/db/schema_migrations/20220425121410 b/db/schema_migrations/20220425121410
deleted file mode 100644
index 8b8b6029483..00000000000
--- a/db/schema_migrations/20220425121410
+++ /dev/null
@@ -1 +0,0 @@
-73ab85c5ef724f6aba4a964f42e586db0a198affd134ba598189629fb95989a4 \ No newline at end of file
diff --git a/db/schema_migrations/20220425121435 b/db/schema_migrations/20220425121435
deleted file mode 100644
index d62359b6bef..00000000000
--- a/db/schema_migrations/20220425121435
+++ /dev/null
@@ -1 +0,0 @@
-fd00d3d8104cba09134853976cf4f1dea7abb5e1dd2c4ea8b46adc4742c71030 \ No newline at end of file
diff --git a/db/schema_migrations/20220426130217 b/db/schema_migrations/20220426130217
deleted file mode 100644
index d8df97c8516..00000000000
--- a/db/schema_migrations/20220426130217
+++ /dev/null
@@ -1 +0,0 @@
-5a55099d1f50c3059778e340bbbe519d4fcd6c1eefb235191f8db02f92b7b49e \ No newline at end of file
diff --git a/db/schema_migrations/20220426185933 b/db/schema_migrations/20220426185933
deleted file mode 100644
index 46a67db3499..00000000000
--- a/db/schema_migrations/20220426185933
+++ /dev/null
@@ -1 +0,0 @@
-56001affed339a7184ee20c7e34707aa33ba405db4f83d8926228b1bf72d5af8 \ No newline at end of file
diff --git a/db/schema_migrations/20220428133724 b/db/schema_migrations/20220428133724
deleted file mode 100644
index 9b9f36980f1..00000000000
--- a/db/schema_migrations/20220428133724
+++ /dev/null
@@ -1 +0,0 @@
-9daf43ece9531540c942ade3939bf86f332701af8a9a0e50bd8ef3b90322baa2 \ No newline at end of file
diff --git a/db/schema_migrations/20220502015011 b/db/schema_migrations/20220502015011
deleted file mode 100644
index dff75369b56..00000000000
--- a/db/schema_migrations/20220502015011
+++ /dev/null
@@ -1 +0,0 @@
-fbc4aa4bc958a5b3d9b184d459e1e540a5f83f01c5a8206d9546ccb28817c143 \ No newline at end of file
diff --git a/db/schema_migrations/20220502125053 b/db/schema_migrations/20220502125053
deleted file mode 100644
index 9b026e23576..00000000000
--- a/db/schema_migrations/20220502125053
+++ /dev/null
@@ -1 +0,0 @@
-b87e7b69f4d88a5620180648568c499e6e86fe001a8cfd235eebf050d5cdc9a1 \ No newline at end of file
diff --git a/db/schema_migrations/20220502150408 b/db/schema_migrations/20220502150408
deleted file mode 100644
index 2bab54bbe7d..00000000000
--- a/db/schema_migrations/20220502150408
+++ /dev/null
@@ -1 +0,0 @@
-a730ff7969895be95e92fff5bb9b468ed407bd65bccb9daf40f892e18b4d18b6 \ No newline at end of file
diff --git a/db/schema_migrations/20220502152633 b/db/schema_migrations/20220502152633
deleted file mode 100644
index b5dd2256ac8..00000000000
--- a/db/schema_migrations/20220502152633
+++ /dev/null
@@ -1 +0,0 @@
-f8f34dc48e55723d868d1a247a92731ed1f1d5d185791c3202d0ed2cdedb41d3 \ No newline at end of file
diff --git a/db/schema_migrations/20220502173045 b/db/schema_migrations/20220502173045
deleted file mode 100644
index d17f403df8d..00000000000
--- a/db/schema_migrations/20220502173045
+++ /dev/null
@@ -1 +0,0 @@
-893f211ebd0dceae4e375e644ed6213a066fe8b5985f226f5f256651fdd4b483 \ No newline at end of file
diff --git a/db/schema_migrations/20220503035221 b/db/schema_migrations/20220503035221
deleted file mode 100644
index 40b89d95db8..00000000000
--- a/db/schema_migrations/20220503035221
+++ /dev/null
@@ -1 +0,0 @@
-0eeb96f26d8f8372c70f9aef59e976c4d403ec6aec01ad8784d31a7594bbaee2 \ No newline at end of file
diff --git a/db/schema_migrations/20220503035437 b/db/schema_migrations/20220503035437
deleted file mode 100644
index 964d0bb4944..00000000000
--- a/db/schema_migrations/20220503035437
+++ /dev/null
@@ -1 +0,0 @@
-78306ca94e5f8e595d496efff983ed4749ee841ca8e2633afdb0cc5cb077e96a \ No newline at end of file
diff --git a/db/schema_migrations/20220503073401 b/db/schema_migrations/20220503073401
deleted file mode 100644
index bccca17138b..00000000000
--- a/db/schema_migrations/20220503073401
+++ /dev/null
@@ -1 +0,0 @@
-3e05b07c5a3a0912884e0bdda08e0f4ef93ce95b6e3f5deb30b10eca74c6ea79 \ No newline at end of file
diff --git a/db/schema_migrations/20220503102855 b/db/schema_migrations/20220503102855
deleted file mode 100644
index e63b6ebe429..00000000000
--- a/db/schema_migrations/20220503102855
+++ /dev/null
@@ -1 +0,0 @@
-e573f8f4ebca77bae3f3ecc68d4e5a9fe015f4a1040e72615b74cc158a7f7e5f \ No newline at end of file
diff --git a/db/schema_migrations/20220503114353 b/db/schema_migrations/20220503114353
deleted file mode 100644
index 26c027548eb..00000000000
--- a/db/schema_migrations/20220503114353
+++ /dev/null
@@ -1 +0,0 @@
-2750d11c933db0404f9a32ea5c8a7f028e07f720f83b288e9476c33326ec63c5 \ No newline at end of file
diff --git a/db/schema_migrations/20220503134610 b/db/schema_migrations/20220503134610
deleted file mode 100644
index 555f0dbcc0d..00000000000
--- a/db/schema_migrations/20220503134610
+++ /dev/null
@@ -1 +0,0 @@
-0e38608a14abd18ab257531f11e31e0a5d7d3801d9725ae02731b6b5ce881db7 \ No newline at end of file
diff --git a/db/schema_migrations/20220504042847 b/db/schema_migrations/20220504042847
deleted file mode 100644
index e27d4835f51..00000000000
--- a/db/schema_migrations/20220504042847
+++ /dev/null
@@ -1 +0,0 @@
-cf3c125a0a8e8410abac5aaa68289d9548f77c29c2e46f1e93299fba5ba77a2b \ No newline at end of file
diff --git a/db/schema_migrations/20220504083348 b/db/schema_migrations/20220504083348
deleted file mode 100644
index ef9c042e036..00000000000
--- a/db/schema_migrations/20220504083348
+++ /dev/null
@@ -1 +0,0 @@
-bb01480d2108f02bb6adcc671afc40de88655644e78397f1395fbb5af32cd24a \ No newline at end of file
diff --git a/db/schema_migrations/20220504083836 b/db/schema_migrations/20220504083836
deleted file mode 100644
index cfde07ab90d..00000000000
--- a/db/schema_migrations/20220504083836
+++ /dev/null
@@ -1 +0,0 @@
-686d7d3266e7df938827f34a65fe73c0b92d0a76df34789751e609627a0768f6 \ No newline at end of file
diff --git a/db/schema_migrations/20220504084136 b/db/schema_migrations/20220504084136
deleted file mode 100644
index 49ed93714c2..00000000000
--- a/db/schema_migrations/20220504084136
+++ /dev/null
@@ -1 +0,0 @@
-6d4b1755e342c6608b95d7abca028353d2f0e84efb63e06b9cc230c23f737565 \ No newline at end of file
diff --git a/db/schema_migrations/20220504140036 b/db/schema_migrations/20220504140036
deleted file mode 100644
index 34f7f6b4ea9..00000000000
--- a/db/schema_migrations/20220504140036
+++ /dev/null
@@ -1 +0,0 @@
-726f09e0f6dd7f53a5e1928c9cb86e1499a9af7d84fe6d4cab847ab54db12711 \ No newline at end of file
diff --git a/db/schema_migrations/20220505022001 b/db/schema_migrations/20220505022001
deleted file mode 100644
index cfa4871ffbd..00000000000
--- a/db/schema_migrations/20220505022001
+++ /dev/null
@@ -1 +0,0 @@
-4d93c3c0234171212aca73b7f3ed471a918fd30091e76e3427696c41c2842fce \ No newline at end of file
diff --git a/db/schema_migrations/20220505044348 b/db/schema_migrations/20220505044348
deleted file mode 100644
index 0c537719a8f..00000000000
--- a/db/schema_migrations/20220505044348
+++ /dev/null
@@ -1 +0,0 @@
-50c34d341ad1d989b865e2d9f6ac11d19e18c756436b8385518d1210bc2e6fe1 \ No newline at end of file
diff --git a/db/schema_migrations/20220505053504 b/db/schema_migrations/20220505053504
deleted file mode 100644
index 5a1594ccac7..00000000000
--- a/db/schema_migrations/20220505053504
+++ /dev/null
@@ -1 +0,0 @@
-e1b5a06c0a72e361d308f599d446125aaf5882a986423cc0b29c5faa9bc3954b \ No newline at end of file
diff --git a/db/schema_migrations/20220505060011 b/db/schema_migrations/20220505060011
deleted file mode 100644
index dd31c727827..00000000000
--- a/db/schema_migrations/20220505060011
+++ /dev/null
@@ -1 +0,0 @@
-aa0e6f29d918bff13cbf499e465f63320dbb6ed5a6940c2c438fe015dcc7fcd6 \ No newline at end of file
diff --git a/db/schema_migrations/20220505092254 b/db/schema_migrations/20220505092254
deleted file mode 100644
index b720f68248e..00000000000
--- a/db/schema_migrations/20220505092254
+++ /dev/null
@@ -1 +0,0 @@
-d37359ba5f697c4aaec738073c7705a64b54b97d2548f72571f3cb33848cfc3b \ No newline at end of file
diff --git a/db/schema_migrations/20220505174658 b/db/schema_migrations/20220505174658
deleted file mode 100644
index 67dfd7ca827..00000000000
--- a/db/schema_migrations/20220505174658
+++ /dev/null
@@ -1 +0,0 @@
-57dd9ed105c0380b660e8cc450848b8662bf6a41e47cbfac1bcc061934cbc24c \ No newline at end of file
diff --git a/db/schema_migrations/20220505193512 b/db/schema_migrations/20220505193512
deleted file mode 100644
index 635cf9dd443..00000000000
--- a/db/schema_migrations/20220505193512
+++ /dev/null
@@ -1 +0,0 @@
-bad94788a101a4567442e4e5a008896323ef00f7c0a98e4439e3b58e2095f30e \ No newline at end of file
diff --git a/db/schema_migrations/20220506123922 b/db/schema_migrations/20220506123922
deleted file mode 100644
index b905016fab3..00000000000
--- a/db/schema_migrations/20220506123922
+++ /dev/null
@@ -1 +0,0 @@
-df23d0cae2b318de6f1426f21cf895ba6118f3e5397ac28ad6c95c709648614c \ No newline at end of file
diff --git a/db/schema_migrations/20220506124021 b/db/schema_migrations/20220506124021
deleted file mode 100644
index b435705c554..00000000000
--- a/db/schema_migrations/20220506124021
+++ /dev/null
@@ -1 +0,0 @@
-07b19935546757b89800ef681eefd8de915caaa709bed038347a262e1da49553 \ No newline at end of file
diff --git a/db/schema_migrations/20220506154054 b/db/schema_migrations/20220506154054
deleted file mode 100644
index 8240d040c25..00000000000
--- a/db/schema_migrations/20220506154054
+++ /dev/null
@@ -1 +0,0 @@
-a931441890bd5d472f88dcef82bb42e3c8046a981788f2362a8deb89f4ac049a \ No newline at end of file
diff --git a/db/schema_migrations/20220506180411 b/db/schema_migrations/20220506180411
deleted file mode 100644
index 44b12faf69e..00000000000
--- a/db/schema_migrations/20220506180411
+++ /dev/null
@@ -1 +0,0 @@
-c8d61ae69828d0f234473092ea4a481e05aeffb61f777c5085836558f2fbe062 \ No newline at end of file
diff --git a/db/schema_migrations/20220506201639 b/db/schema_migrations/20220506201639
deleted file mode 100644
index 5aba0b7c055..00000000000
--- a/db/schema_migrations/20220506201639
+++ /dev/null
@@ -1 +0,0 @@
-ddc86a14dbd512ee87654fa12fc2ef55f0f705341f628c2b26d0a80b6b2708a0 \ No newline at end of file
diff --git a/db/schema_migrations/20220510003916 b/db/schema_migrations/20220510003916
deleted file mode 100644
index 35584f5f55f..00000000000
--- a/db/schema_migrations/20220510003916
+++ /dev/null
@@ -1 +0,0 @@
-ccafdc28ff28fc758fe67084f3a837c72f91470467bda2acdb6282de89b46e34 \ No newline at end of file
diff --git a/db/schema_migrations/20220510004501 b/db/schema_migrations/20220510004501
deleted file mode 100644
index 6342258af5d..00000000000
--- a/db/schema_migrations/20220510004501
+++ /dev/null
@@ -1 +0,0 @@
-ef9c231a917e4beacff9689c4bbfea0885c4223d3d8b59823a5ffac7f3b2364f \ No newline at end of file
diff --git a/db/schema_migrations/20220510121338 b/db/schema_migrations/20220510121338
deleted file mode 100644
index 8d41973afd1..00000000000
--- a/db/schema_migrations/20220510121338
+++ /dev/null
@@ -1 +0,0 @@
-6f77ac586d48274a8f88384808b56ecad33a8ce00488595c0f82a074b45d5634 \ No newline at end of file
diff --git a/db/schema_migrations/20220510192117 b/db/schema_migrations/20220510192117
deleted file mode 100644
index 949b14b83e5..00000000000
--- a/db/schema_migrations/20220510192117
+++ /dev/null
@@ -1 +0,0 @@
-bb3c52967d818984d1f5350c8fefa6e83e38f2c105e89ebd7ceb39f59587f2b2 \ No newline at end of file
diff --git a/db/schema_migrations/20220511090324 b/db/schema_migrations/20220511090324
deleted file mode 100644
index 186512ca91a..00000000000
--- a/db/schema_migrations/20220511090324
+++ /dev/null
@@ -1 +0,0 @@
-4904ea4034a58dadb9b84deaade823f1e50085b5a4bce69da7fa44c38e588858 \ No newline at end of file
diff --git a/db/schema_migrations/20220511144946 b/db/schema_migrations/20220511144946
deleted file mode 100644
index c443848a5fb..00000000000
--- a/db/schema_migrations/20220511144946
+++ /dev/null
@@ -1 +0,0 @@
-a11b32eeb9269e70ab0457eea3fbd42520e15fa6c089b349e4f9655190678cff \ No newline at end of file
diff --git a/db/schema_migrations/20220511151646 b/db/schema_migrations/20220511151646
deleted file mode 100644
index d6ff140cdf8..00000000000
--- a/db/schema_migrations/20220511151646
+++ /dev/null
@@ -1 +0,0 @@
-cf49c37edf23372a0117895bd2036cefd42616871f42511c6ecbe03a47b96e9f \ No newline at end of file
diff --git a/db/schema_migrations/20220511152439 b/db/schema_migrations/20220511152439
deleted file mode 100644
index f58f97f4962..00000000000
--- a/db/schema_migrations/20220511152439
+++ /dev/null
@@ -1 +0,0 @@
-ef899952453ddd870c45f2b4eded754152972944037309cf96701fe27a5db6cb \ No newline at end of file
diff --git a/db/schema_migrations/20220511191502 b/db/schema_migrations/20220511191502
deleted file mode 100644
index caebd721aa6..00000000000
--- a/db/schema_migrations/20220511191502
+++ /dev/null
@@ -1 +0,0 @@
-432214f4683800e1f5b5e42d05d9a6de07c317fec0dffd6b1eb312ccfd437e0c \ No newline at end of file
diff --git a/db/schema_migrations/20220511191503 b/db/schema_migrations/20220511191503
deleted file mode 100644
index c8860c56eb6..00000000000
--- a/db/schema_migrations/20220511191503
+++ /dev/null
@@ -1 +0,0 @@
-dd2733b77f86e108c5015edcdbc715dd011b00479828a7087af9120cc5ae5661 \ No newline at end of file
diff --git a/db/schema_migrations/20220511212620 b/db/schema_migrations/20220511212620
deleted file mode 100644
index 6d86b6701c1..00000000000
--- a/db/schema_migrations/20220511212620
+++ /dev/null
@@ -1 +0,0 @@
-6f8ddb4ba8931d00caa05e193a238add12176e82e25692186595ab0d847c74ea \ No newline at end of file
diff --git a/db/schema_migrations/20220512020500 b/db/schema_migrations/20220512020500
deleted file mode 100644
index 86830de0c9d..00000000000
--- a/db/schema_migrations/20220512020500
+++ /dev/null
@@ -1 +0,0 @@
-16071cd85b772d86242ced867ba2f8c5e317222f6c3297e15dd456de13b4926e \ No newline at end of file
diff --git a/db/schema_migrations/20220512190659 b/db/schema_migrations/20220512190659
deleted file mode 100644
index a3ea4c1b46e..00000000000
--- a/db/schema_migrations/20220512190659
+++ /dev/null
@@ -1 +0,0 @@
-bbd6be6772f4fc5aecf393d6c043c1fdc38fdde6efd1586ba4be08ddbb5886dd \ No newline at end of file
diff --git a/db/schema_migrations/20220513043344 b/db/schema_migrations/20220513043344
deleted file mode 100644
index af72eebc3b9..00000000000
--- a/db/schema_migrations/20220513043344
+++ /dev/null
@@ -1 +0,0 @@
-33928e6cb39e42efae6c8bc12291317a08197c0fe5a1f912aac8972eabc96de7 \ No newline at end of file
diff --git a/db/schema_migrations/20220513093614 b/db/schema_migrations/20220513093614
deleted file mode 100644
index 2fd5b217597..00000000000
--- a/db/schema_migrations/20220513093614
+++ /dev/null
@@ -1 +0,0 @@
-a10b3c81942eacdd4d378e8f1d1e28b974e973ef163ddfbe0cdea1f63b275dd1 \ No newline at end of file
diff --git a/db/schema_migrations/20220513093615 b/db/schema_migrations/20220513093615
deleted file mode 100644
index 3b306069feb..00000000000
--- a/db/schema_migrations/20220513093615
+++ /dev/null
@@ -1 +0,0 @@
-a070aa428ef721bccfc1499dae04d0796877796339380370c3f32f7e12c029df \ No newline at end of file
diff --git a/db/schema_migrations/20220513095545 b/db/schema_migrations/20220513095545
deleted file mode 100644
index 4fcca18a7ee..00000000000
--- a/db/schema_migrations/20220513095545
+++ /dev/null
@@ -1 +0,0 @@
-0afca448dc191db604d35f1e675f4342390f77542851c2ff716fd9225a9fa5a0 \ No newline at end of file
diff --git a/db/schema_migrations/20220513114706 b/db/schema_migrations/20220513114706
deleted file mode 100644
index da89cabb56c..00000000000
--- a/db/schema_migrations/20220513114706
+++ /dev/null
@@ -1 +0,0 @@
-b7b0de56866be5e598ba18c4e94ebc9e7deae3c8d62e789f83db34729e080c7b \ No newline at end of file
diff --git a/db/schema_migrations/20220513114850 b/db/schema_migrations/20220513114850
deleted file mode 100644
index 2e78bcd93a2..00000000000
--- a/db/schema_migrations/20220513114850
+++ /dev/null
@@ -1 +0,0 @@
-3519e7552ea0e7f76c5ce3e853072afdfa5485387398565a9c222e4761b4fa9b \ No newline at end of file
diff --git a/db/schema_migrations/20220516054002 b/db/schema_migrations/20220516054002
deleted file mode 100644
index 3a9f63f2122..00000000000
--- a/db/schema_migrations/20220516054002
+++ /dev/null
@@ -1 +0,0 @@
-72412b4e47f69737ecc50f234d182b2bb9c7d0a03426baffec137651613468c6 \ No newline at end of file
diff --git a/db/schema_migrations/20220516054011 b/db/schema_migrations/20220516054011
deleted file mode 100644
index 0a1dff834ce..00000000000
--- a/db/schema_migrations/20220516054011
+++ /dev/null
@@ -1 +0,0 @@
-23e7a5c3ea535b7faf0e9ba3e95d8ca1431ba96f5f431e0fed0e0c8df340d882 \ No newline at end of file
diff --git a/db/schema_migrations/20220516092207 b/db/schema_migrations/20220516092207
deleted file mode 100644
index 8731d03e39e..00000000000
--- a/db/schema_migrations/20220516092207
+++ /dev/null
@@ -1 +0,0 @@
-c55f8c6e45e933207eae2036cd2705530bce5c79ff54ac3e33cef111949c736d \ No newline at end of file
diff --git a/db/schema_migrations/20220516100652 b/db/schema_migrations/20220516100652
deleted file mode 100644
index a50dc3ff36c..00000000000
--- a/db/schema_migrations/20220516100652
+++ /dev/null
@@ -1 +0,0 @@
-ee255f9340fe64793636217a5115c368e0bd067cba057bb58aa78f370efae423 \ No newline at end of file
diff --git a/db/schema_migrations/20220516103353 b/db/schema_migrations/20220516103353
deleted file mode 100644
index 0f0d30f0ec6..00000000000
--- a/db/schema_migrations/20220516103353
+++ /dev/null
@@ -1 +0,0 @@
-68327ee0eb01df152d2420fc31e586be0c5d40460c09cc43a1e955e84e5f00fc \ No newline at end of file
diff --git a/db/schema_migrations/20220516123101 b/db/schema_migrations/20220516123101
deleted file mode 100644
index ea64cc0ea46..00000000000
--- a/db/schema_migrations/20220516123101
+++ /dev/null
@@ -1 +0,0 @@
-e1421ae1b1f021c5aa1546b7ffdbab4fb26e6fbbe0d1d0d4f57cb39735bc0221 \ No newline at end of file
diff --git a/db/schema_migrations/20220516201245 b/db/schema_migrations/20220516201245
deleted file mode 100644
index eabfba67df8..00000000000
--- a/db/schema_migrations/20220516201245
+++ /dev/null
@@ -1 +0,0 @@
-4b979c4ae290efdbc7c4bfe7105f0b30d00e532ac11c579db7417a317fd35db8 \ No newline at end of file
diff --git a/db/schema_migrations/20220517101119 b/db/schema_migrations/20220517101119
deleted file mode 100644
index 18c25e858dc..00000000000
--- a/db/schema_migrations/20220517101119
+++ /dev/null
@@ -1 +0,0 @@
-74585dbb76b6744533a1df5dc995b461798fe8d0e0cd37fb6f9d52958f87a403 \ No newline at end of file
diff --git a/db/schema_migrations/20220517133753 b/db/schema_migrations/20220517133753
deleted file mode 100644
index 295658d34a2..00000000000
--- a/db/schema_migrations/20220517133753
+++ /dev/null
@@ -1 +0,0 @@
-eadee7b8b85cce48f48dbdab2f5e0b8cd633ef4ef8363960b7de1eb73a6fe1aa \ No newline at end of file
diff --git a/db/schema_migrations/20220517144749 b/db/schema_migrations/20220517144749
deleted file mode 100644
index 99f5bf6730a..00000000000
--- a/db/schema_migrations/20220517144749
+++ /dev/null
@@ -1 +0,0 @@
-437e4ddcf1e6071a37ab1d407108c98fedd4f93ed1d975d2306440318f67c996 \ No newline at end of file
diff --git a/db/schema_migrations/20220517182529 b/db/schema_migrations/20220517182529
deleted file mode 100644
index 29afb5009d5..00000000000
--- a/db/schema_migrations/20220517182529
+++ /dev/null
@@ -1 +0,0 @@
-b47c2ddd218df29117d3c69d59819eed67b83a6d687547a44c1b31b302c005a5 \ No newline at end of file
diff --git a/db/schema_migrations/20220518102414 b/db/schema_migrations/20220518102414
deleted file mode 100644
index 4c614b132b0..00000000000
--- a/db/schema_migrations/20220518102414
+++ /dev/null
@@ -1 +0,0 @@
-753b40cdcd5d7b23098c1f7a7f68e25132a75bf1343f59dee583d5a55168f8be \ No newline at end of file
diff --git a/db/schema_migrations/20220518183504 b/db/schema_migrations/20220518183504
deleted file mode 100644
index 6eb9eb50a53..00000000000
--- a/db/schema_migrations/20220518183504
+++ /dev/null
@@ -1 +0,0 @@
-925cd6bbfc67d0f5748c48b960ef1f932370fe078a979440b6bb32d049c2a9a8 \ No newline at end of file
diff --git a/db/schema_migrations/20220518183548 b/db/schema_migrations/20220518183548
deleted file mode 100644
index 6023c31fe51..00000000000
--- a/db/schema_migrations/20220518183548
+++ /dev/null
@@ -1 +0,0 @@
-a79526f7eb59fc93d66ff1a58471c9a3de27f8e620b5f3d4a255c88687a5bf2a \ No newline at end of file
diff --git a/db/schema_migrations/20220519013213 b/db/schema_migrations/20220519013213
deleted file mode 100644
index c3575b668e4..00000000000
--- a/db/schema_migrations/20220519013213
+++ /dev/null
@@ -1 +0,0 @@
-d8ae65034a7768c238a65c4c36d709364dee65652da93c368774e3828b0edb41 \ No newline at end of file
diff --git a/db/schema_migrations/20220519045133 b/db/schema_migrations/20220519045133
deleted file mode 100644
index 099a74f8b34..00000000000
--- a/db/schema_migrations/20220519045133
+++ /dev/null
@@ -1 +0,0 @@
-99fd05c3102300c115edf09a54feddfd9721bf63ae09063e6dc9d568be6d8f1f \ No newline at end of file
diff --git a/db/schema_migrations/20220519141345 b/db/schema_migrations/20220519141345
deleted file mode 100644
index 45b67d9cc53..00000000000
--- a/db/schema_migrations/20220519141345
+++ /dev/null
@@ -1 +0,0 @@
-ff20989814782030135a9c55831896b89275293f04d7edbb4a5b6ae568d2a455 \ No newline at end of file
diff --git a/db/schema_migrations/20220520030504 b/db/schema_migrations/20220520030504
deleted file mode 100644
index 284d859b42d..00000000000
--- a/db/schema_migrations/20220520030504
+++ /dev/null
@@ -1 +0,0 @@
-4d44b5cd1bcd731e841849c65f64a19960fa13cd90d1bda023e797db20b8b8c6 \ No newline at end of file
diff --git a/db/schema_migrations/20220520040416 b/db/schema_migrations/20220520040416
deleted file mode 100644
index 2444438b2e4..00000000000
--- a/db/schema_migrations/20220520040416
+++ /dev/null
@@ -1 +0,0 @@
-5055a0f5fd7125d353654be2425c881afa42a3b09eb0ab34dd0929b3440aa643 \ No newline at end of file
diff --git a/db/schema_migrations/20220520122755 b/db/schema_migrations/20220520122755
deleted file mode 100644
index 5f627846e88..00000000000
--- a/db/schema_migrations/20220520122755
+++ /dev/null
@@ -1 +0,0 @@
-aac34066922d445a3dfe0c527b500000e0296cae84e38e9e31f721cd4b213d17 \ No newline at end of file
diff --git a/db/schema_migrations/20220520143105 b/db/schema_migrations/20220520143105
deleted file mode 100644
index f0cdbdfa734..00000000000
--- a/db/schema_migrations/20220520143105
+++ /dev/null
@@ -1 +0,0 @@
-f31157879c1d7e2f08a63b4c68ed0353fd6df1e885cb7f3838aba7e1c782394c \ No newline at end of file
diff --git a/db/schema_migrations/20220520144821 b/db/schema_migrations/20220520144821
deleted file mode 100644
index 47cb5507cb7..00000000000
--- a/db/schema_migrations/20220520144821
+++ /dev/null
@@ -1 +0,0 @@
-422c8b5559d262be47da020fe43628db1b19cb638c9c9c4dbe5af1ee03c5cdc9 \ No newline at end of file
diff --git a/db/schema_migrations/20220523030804 b/db/schema_migrations/20220523030804
deleted file mode 100644
index 6a9bdd4f66d..00000000000
--- a/db/schema_migrations/20220523030804
+++ /dev/null
@@ -1 +0,0 @@
-80535374849c10d41663d339b95b9ffddbec9b40a8af4585c18602cbe92c14d1 \ No newline at end of file
diff --git a/db/schema_migrations/20220523030805 b/db/schema_migrations/20220523030805
deleted file mode 100644
index 3714e71a3f3..00000000000
--- a/db/schema_migrations/20220523030805
+++ /dev/null
@@ -1 +0,0 @@
-92a7ed079521ccb8ab04e59826947778c37bccd30d47f1b0e29727f769e3ff32 \ No newline at end of file
diff --git a/db/schema_migrations/20220523162734 b/db/schema_migrations/20220523162734
deleted file mode 100644
index dd319042965..00000000000
--- a/db/schema_migrations/20220523162734
+++ /dev/null
@@ -1 +0,0 @@
-af6f954426b714649a3b19e80a20cf99475cdc8496c23add8032cda27072d31d \ No newline at end of file
diff --git a/db/schema_migrations/20220523163734 b/db/schema_migrations/20220523163734
deleted file mode 100644
index 622ea4abb95..00000000000
--- a/db/schema_migrations/20220523163734
+++ /dev/null
@@ -1 +0,0 @@
-02821039feda457c1fb61dc6ff62756752c0c1c0ad01e12ecf28c265462529d4 \ No newline at end of file
diff --git a/db/schema_migrations/20220523164734 b/db/schema_migrations/20220523164734
deleted file mode 100644
index 3538f55712d..00000000000
--- a/db/schema_migrations/20220523164734
+++ /dev/null
@@ -1 +0,0 @@
-ef078bbcf8415a7bb49ed919739005d22c21199da1a0e5e5c0971d2a8e1b2a40 \ No newline at end of file
diff --git a/db/schema_migrations/20220523165734 b/db/schema_migrations/20220523165734
deleted file mode 100644
index b1d8fa16dd5..00000000000
--- a/db/schema_migrations/20220523165734
+++ /dev/null
@@ -1 +0,0 @@
-89a03d69c44ed95133446275bb9b39dfe91ad3022cefdfa438ea3c96ab4f8e69 \ No newline at end of file
diff --git a/db/schema_migrations/20220523171107 b/db/schema_migrations/20220523171107
deleted file mode 100644
index 470edcb4633..00000000000
--- a/db/schema_migrations/20220523171107
+++ /dev/null
@@ -1 +0,0 @@
-5b21dda35554a77388dae289e24df405852ae60bb5947edd061bc3dc595b000d \ No newline at end of file
diff --git a/db/schema_migrations/20220524021855 b/db/schema_migrations/20220524021855
deleted file mode 100644
index 2738ba4fb41..00000000000
--- a/db/schema_migrations/20220524021855
+++ /dev/null
@@ -1 +0,0 @@
-549bca1a8f6f33b4044da0ff453cf3e55615697be98366ecdcdc7bbbac2533ef \ No newline at end of file
diff --git a/db/schema_migrations/20220524074947 b/db/schema_migrations/20220524074947
deleted file mode 100644
index 2f6988c8ada..00000000000
--- a/db/schema_migrations/20220524074947
+++ /dev/null
@@ -1 +0,0 @@
-377a05674a9f0fb3a2e77ec25effe8b380381d6b827d987afd5a717f73d6d782 \ No newline at end of file
diff --git a/db/schema_migrations/20220524080944 b/db/schema_migrations/20220524080944
deleted file mode 100644
index d6a7c196dc8..00000000000
--- a/db/schema_migrations/20220524080944
+++ /dev/null
@@ -1 +0,0 @@
-af9fd2e51f9781c16528cdb929328346a87c7199275f101efb1c21b7d56b4255 \ No newline at end of file
diff --git a/db/schema_migrations/20220524081955 b/db/schema_migrations/20220524081955
deleted file mode 100644
index 62c3483e581..00000000000
--- a/db/schema_migrations/20220524081955
+++ /dev/null
@@ -1 +0,0 @@
-5defac462c6b6bf9e1af542d07bfe23af52ed01ddbb77f43bb206f08090fc098 \ No newline at end of file
diff --git a/db/schema_migrations/20220524132416 b/db/schema_migrations/20220524132416
deleted file mode 100644
index b9e08078784..00000000000
--- a/db/schema_migrations/20220524132416
+++ /dev/null
@@ -1 +0,0 @@
-e4b944d4b2107b203593187e8cefc89df276ce01a93e6b0795c0d710e8f81da2 \ No newline at end of file
diff --git a/db/schema_migrations/20220524141800 b/db/schema_migrations/20220524141800
deleted file mode 100644
index fd15c443b08..00000000000
--- a/db/schema_migrations/20220524141800
+++ /dev/null
@@ -1 +0,0 @@
-9dddbbdb3e72763cc331b5690536312970c92c64d66d7cb2efc118c107ae204c \ No newline at end of file
diff --git a/db/schema_migrations/20220524164122 b/db/schema_migrations/20220524164122
deleted file mode 100644
index 26e3b596910..00000000000
--- a/db/schema_migrations/20220524164122
+++ /dev/null
@@ -1 +0,0 @@
-dc449f4ea28da3662fce663dcd5cdc9e37417e14b39e26897cc35a2bebfa22f0 \ No newline at end of file
diff --git a/db/schema_migrations/20220524184149 b/db/schema_migrations/20220524184149
deleted file mode 100644
index b75a7640a76..00000000000
--- a/db/schema_migrations/20220524184149
+++ /dev/null
@@ -1 +0,0 @@
-f28bf2a6fe412342eef053b57cce14c0681d04f9e978e37bbd505f1efa36e92e \ No newline at end of file
diff --git a/db/schema_migrations/20220524191259 b/db/schema_migrations/20220524191259
deleted file mode 100644
index 3b9ff7652a3..00000000000
--- a/db/schema_migrations/20220524191259
+++ /dev/null
@@ -1 +0,0 @@
-995c41ab830a9635bef37031d8fa741f5759ba9bb22bb02141502bf322165c77 \ No newline at end of file
diff --git a/db/schema_migrations/20220524202158 b/db/schema_migrations/20220524202158
deleted file mode 100644
index 3df81f0c5c2..00000000000
--- a/db/schema_migrations/20220524202158
+++ /dev/null
@@ -1 +0,0 @@
-21f37004086f6d7f606791dd7caeb7c5ca701b009689932eb9ea4eb653e3e0dc \ No newline at end of file
diff --git a/db/schema_migrations/20220525082303 b/db/schema_migrations/20220525082303
deleted file mode 100644
index 9189c9713a0..00000000000
--- a/db/schema_migrations/20220525082303
+++ /dev/null
@@ -1 +0,0 @@
-265effde7f2abd222d5b7101c6d03a185ee3deeb6be772016f06e1eade84c1f3 \ No newline at end of file
diff --git a/db/schema_migrations/20220525123825 b/db/schema_migrations/20220525123825
deleted file mode 100644
index 47d4bc2c8a3..00000000000
--- a/db/schema_migrations/20220525123825
+++ /dev/null
@@ -1 +0,0 @@
-8a30ec71e2c28929e0a7ebf744941246e460c37745e60dcd9f13a94b7d005772 \ No newline at end of file
diff --git a/db/schema_migrations/20220525123851 b/db/schema_migrations/20220525123851
deleted file mode 100644
index fd16775f784..00000000000
--- a/db/schema_migrations/20220525123851
+++ /dev/null
@@ -1 +0,0 @@
-f6fcea6f6beef6c2d4848bd4bc11f0854acc9e19771438778f763171e0eaa3c7 \ No newline at end of file
diff --git a/db/schema_migrations/20220525123914 b/db/schema_migrations/20220525123914
deleted file mode 100644
index 564ceb0dbe2..00000000000
--- a/db/schema_migrations/20220525123914
+++ /dev/null
@@ -1 +0,0 @@
-504e43ab17c644707c65e396b8aa88a11472372a9c3b8d2b9ef88b9de978b0c3 \ No newline at end of file
diff --git a/db/schema_migrations/20220525123940 b/db/schema_migrations/20220525123940
deleted file mode 100644
index 7bb5b598247..00000000000
--- a/db/schema_migrations/20220525123940
+++ /dev/null
@@ -1 +0,0 @@
-7ddd1f03efe86f45b6105c6b0816e28e318e9de219dcd38801a11451745ae5f9 \ No newline at end of file
diff --git a/db/schema_migrations/20220525124104 b/db/schema_migrations/20220525124104
deleted file mode 100644
index 229fb6ae2a6..00000000000
--- a/db/schema_migrations/20220525124104
+++ /dev/null
@@ -1 +0,0 @@
-8c1ccabb6d2b3054398a015836bb9fe06f28936625f7a8220b4c58000a891b8a \ No newline at end of file
diff --git a/db/schema_migrations/20220525124125 b/db/schema_migrations/20220525124125
deleted file mode 100644
index 8ccc434a7ac..00000000000
--- a/db/schema_migrations/20220525124125
+++ /dev/null
@@ -1 +0,0 @@
-5e9f67479903590d5118e04811bc3c4aacf92fd11b90efa011975d4292dd0207 \ No newline at end of file
diff --git a/db/schema_migrations/20220525131557 b/db/schema_migrations/20220525131557
deleted file mode 100644
index c1b29410ef0..00000000000
--- a/db/schema_migrations/20220525131557
+++ /dev/null
@@ -1 +0,0 @@
-fe0e9acc39c2408853ea3fc35574c553172ad381a5b6f243578f44ed77dc75f8 \ No newline at end of file
diff --git a/db/schema_migrations/20220525131624 b/db/schema_migrations/20220525131624
deleted file mode 100644
index 71a3d6d26d2..00000000000
--- a/db/schema_migrations/20220525131624
+++ /dev/null
@@ -1 +0,0 @@
-f34c6e7b75d375342f5c88a9c7b98e15031a6dcdadf7e7dad862ef5f32a54e68 \ No newline at end of file
diff --git a/db/schema_migrations/20220525141540 b/db/schema_migrations/20220525141540
deleted file mode 100644
index 5d44edb76dd..00000000000
--- a/db/schema_migrations/20220525141540
+++ /dev/null
@@ -1 +0,0 @@
-ecb575072a1176378b180e95090915b191792ce350df84c6a0c198dfb816df96 \ No newline at end of file
diff --git a/db/schema_migrations/20220525165334 b/db/schema_migrations/20220525165334
deleted file mode 100644
index 6e30325b09f..00000000000
--- a/db/schema_migrations/20220525165334
+++ /dev/null
@@ -1 +0,0 @@
-18e144b7ab897f77679096db30a84c491b94552ff34e6b9ff66d106a59fdb412 \ No newline at end of file
diff --git a/db/schema_migrations/20220525172001 b/db/schema_migrations/20220525172001
deleted file mode 100644
index 25755af7ae6..00000000000
--- a/db/schema_migrations/20220525172001
+++ /dev/null
@@ -1 +0,0 @@
-37f90c51322b961933b0aaa5b4d2b8d1f82bd3ee42209b241b9e1198f16adb59 \ No newline at end of file
diff --git a/db/schema_migrations/20220525201022 b/db/schema_migrations/20220525201022
deleted file mode 100644
index 7b4ce7c509c..00000000000
--- a/db/schema_migrations/20220525201022
+++ /dev/null
@@ -1 +0,0 @@
-c2b2fc7674b99791f6d239e42add7db3c72f2b27e653e2348887d0178f77686a \ No newline at end of file
diff --git a/db/schema_migrations/20220525221133 b/db/schema_migrations/20220525221133
deleted file mode 100644
index 0e78ee5df45..00000000000
--- a/db/schema_migrations/20220525221133
+++ /dev/null
@@ -1 +0,0 @@
-b22a0dd285d383f556a5402441f3e82a6db6dd47008444b94303351b295b414e \ No newline at end of file
diff --git a/db/schema_migrations/20220526042017 b/db/schema_migrations/20220526042017
deleted file mode 100644
index ac391e2aa5b..00000000000
--- a/db/schema_migrations/20220526042017
+++ /dev/null
@@ -1 +0,0 @@
-2f814744441d104b0d5e533c7f27f4b9284563f20f3bd332a876fee2b4a8b6a0 \ No newline at end of file
diff --git a/db/schema_migrations/20220526044516 b/db/schema_migrations/20220526044516
deleted file mode 100644
index 71241178af6..00000000000
--- a/db/schema_migrations/20220526044516
+++ /dev/null
@@ -1 +0,0 @@
-e9f7958f28a6dc22d907052e3c58c2213b97110fdfedffee97b37bd1293e2dd0 \ No newline at end of file
diff --git a/db/schema_migrations/20220530044712 b/db/schema_migrations/20220530044712
deleted file mode 100644
index 0277bc87f9f..00000000000
--- a/db/schema_migrations/20220530044712
+++ /dev/null
@@ -1 +0,0 @@
-e76914c24f23d352e275387330a8731afb409fe9ae1168c1ee25f5acf5424c07 \ No newline at end of file
diff --git a/db/schema_migrations/20220530074027 b/db/schema_migrations/20220530074027
deleted file mode 100644
index 418f778a8c3..00000000000
--- a/db/schema_migrations/20220530074027
+++ /dev/null
@@ -1 +0,0 @@
-3cef4a4f50ebe3d8e23e9c014a57e4c98f8fd27a9f071725a882c5a1a4d228cc \ No newline at end of file
diff --git a/db/schema_migrations/20220530082653 b/db/schema_migrations/20220530082653
deleted file mode 100644
index 7a0bc6f25d6..00000000000
--- a/db/schema_migrations/20220530082653
+++ /dev/null
@@ -1 +0,0 @@
-c049b15e29578180f42701764f27b5301561f2dfb7a2d289f84d69feae70b33f \ No newline at end of file
diff --git a/db/schema_migrations/20220530103023 b/db/schema_migrations/20220530103023
deleted file mode 100644
index f4a0d805208..00000000000
--- a/db/schema_migrations/20220530103023
+++ /dev/null
@@ -1 +0,0 @@
-8ad5a7cb60abd381850569ddf5ab274d66cf1960d11073825a283f902171b343 \ No newline at end of file
diff --git a/db/schema_migrations/20220530104431 b/db/schema_migrations/20220530104431
deleted file mode 100644
index 4e809f44d25..00000000000
--- a/db/schema_migrations/20220530104431
+++ /dev/null
@@ -1 +0,0 @@
-f49e691c46ddaaf1b18d95726e7c2473fab946ea79885727ba09bb92591e4a01 \ No newline at end of file
diff --git a/db/schema_migrations/20220530170915 b/db/schema_migrations/20220530170915
deleted file mode 100644
index 9fa7d0128a2..00000000000
--- a/db/schema_migrations/20220530170915
+++ /dev/null
@@ -1 +0,0 @@
-6182d4a468348076aab761714990dd55f69f44a5fafcf566fd11b73486c7d656 \ No newline at end of file
diff --git a/db/schema_migrations/20220531024142 b/db/schema_migrations/20220531024142
deleted file mode 100644
index 7d62f03921c..00000000000
--- a/db/schema_migrations/20220531024142
+++ /dev/null
@@ -1 +0,0 @@
-d2f51bc463e31d4097c86232b85fff0c4cffe091aac23ba30b4b2851e12a253c \ No newline at end of file
diff --git a/db/schema_migrations/20220531024143 b/db/schema_migrations/20220531024143
deleted file mode 100644
index 72293d5a72f..00000000000
--- a/db/schema_migrations/20220531024143
+++ /dev/null
@@ -1 +0,0 @@
-50839e8a00962e423093c9f80534efb1d11b750c11d0602537a83033d1c3638f \ No newline at end of file
diff --git a/db/schema_migrations/20220531024905 b/db/schema_migrations/20220531024905
deleted file mode 100644
index 3892c437701..00000000000
--- a/db/schema_migrations/20220531024905
+++ /dev/null
@@ -1 +0,0 @@
-3470fa801f5d6c343c95d78a710aa1907a581575465718c8d971f4b8f305a39b \ No newline at end of file
diff --git a/db/schema_migrations/20220531035113 b/db/schema_migrations/20220531035113
deleted file mode 100644
index 133741d8a36..00000000000
--- a/db/schema_migrations/20220531035113
+++ /dev/null
@@ -1 +0,0 @@
-4e4e158655d40797c4f9152ad3e4f8b9b4894ce1ce92bf89c6219f9c69847c45 \ No newline at end of file
diff --git a/db/schema_migrations/20220531100920 b/db/schema_migrations/20220531100920
deleted file mode 100644
index 8010729a4a1..00000000000
--- a/db/schema_migrations/20220531100920
+++ /dev/null
@@ -1 +0,0 @@
-55c13dd2cf8db2ca54d3fb1bd09d459e90a90e01b3c1f7ad950e4b618df241af \ No newline at end of file
diff --git a/db/schema_migrations/20220531140515 b/db/schema_migrations/20220531140515
deleted file mode 100644
index 1e89b902026..00000000000
--- a/db/schema_migrations/20220531140515
+++ /dev/null
@@ -1 +0,0 @@
-2c0c801506c47adb74c4a91a5fcf37b02355b35570ffbdd18c8aa6a11a8397ac \ No newline at end of file
diff --git a/db/schema_migrations/20220531233600 b/db/schema_migrations/20220531233600
deleted file mode 100644
index 9c3ff7531bd..00000000000
--- a/db/schema_migrations/20220531233600
+++ /dev/null
@@ -1 +0,0 @@
-10676671b1893267c3c466d74a2e9a66525df7c5706eed56afe4fdcb734211cd \ No newline at end of file
diff --git a/db/schema_migrations/20220601040233 b/db/schema_migrations/20220601040233
deleted file mode 100644
index 5acfd2851ca..00000000000
--- a/db/schema_migrations/20220601040233
+++ /dev/null
@@ -1 +0,0 @@
-d7e3650b7f83a324c6c7f8da0ec37096c0e538072ab8fd0ac00672fa02e92c77 \ No newline at end of file
diff --git a/db/schema_migrations/20220601091804 b/db/schema_migrations/20220601091804
deleted file mode 100644
index 097486be77c..00000000000
--- a/db/schema_migrations/20220601091804
+++ /dev/null
@@ -1 +0,0 @@
-3d3c9b4aa88008c907b583db08e1246cd227414147b41f45b63e4ca1cc24de66 \ No newline at end of file
diff --git a/db/schema_migrations/20220601091805 b/db/schema_migrations/20220601091805
deleted file mode 100644
index 72668b26307..00000000000
--- a/db/schema_migrations/20220601091805
+++ /dev/null
@@ -1 +0,0 @@
-930a6a853626c3a9f5a529105bf4e4cb8cef9b6f948ccb4faaaf0dcb7a5a2544 \ No newline at end of file
diff --git a/db/schema_migrations/20220601101800 b/db/schema_migrations/20220601101800
deleted file mode 100644
index c1abb83e472..00000000000
--- a/db/schema_migrations/20220601101800
+++ /dev/null
@@ -1 +0,0 @@
-c75a7375240fdd785f873b1a39173efec51d23e16808d23c24a6550604f080ad \ No newline at end of file
diff --git a/db/schema_migrations/20220601151900 b/db/schema_migrations/20220601151900
deleted file mode 100644
index d758b7aa67c..00000000000
--- a/db/schema_migrations/20220601151900
+++ /dev/null
@@ -1 +0,0 @@
-c215c9ef738ab0d466d9244c0596164d6860728ac92fac90bef5a987c2cef6b7 \ No newline at end of file
diff --git a/db/schema_migrations/20220601152916 b/db/schema_migrations/20220601152916
deleted file mode 100644
index 4858976aa3a..00000000000
--- a/db/schema_migrations/20220601152916
+++ /dev/null
@@ -1 +0,0 @@
-f460407888e289580dec15ea27e19fa5cc2d2116a831105b71b980c617971743 \ No newline at end of file
diff --git a/db/schema_migrations/20220601223501 b/db/schema_migrations/20220601223501
deleted file mode 100644
index 86abed4fa45..00000000000
--- a/db/schema_migrations/20220601223501
+++ /dev/null
@@ -1 +0,0 @@
-5012f2becb04485a67df5fa0acdf7c73a9410368493256f4774af297de5f86e8 \ No newline at end of file
diff --git a/db/schema_migrations/20220602070502 b/db/schema_migrations/20220602070502
deleted file mode 100644
index 68cfe781ef8..00000000000
--- a/db/schema_migrations/20220602070502
+++ /dev/null
@@ -1 +0,0 @@
-9c66d020895c534280862136a08477fe3715465bdeb9d3e7dd632005c19de474 \ No newline at end of file
diff --git a/db/schema_migrations/20220602111923 b/db/schema_migrations/20220602111923
deleted file mode 100644
index 9092decdc13..00000000000
--- a/db/schema_migrations/20220602111923
+++ /dev/null
@@ -1 +0,0 @@
-9e11ca08c76940af55e74c7d590ca835db1903b11139f64085fdd59fd6ea9206 \ No newline at end of file
diff --git a/db/schema_migrations/20220602130306 b/db/schema_migrations/20220602130306
deleted file mode 100644
index 836f2385b65..00000000000
--- a/db/schema_migrations/20220602130306
+++ /dev/null
@@ -1 +0,0 @@
-493009101e8b1340507ff8cf5d6add16f848d8d99f0b6091bf7b07105f711304 \ No newline at end of file
diff --git a/db/schema_migrations/20220603095158 b/db/schema_migrations/20220603095158
deleted file mode 100644
index 3b5bf052908..00000000000
--- a/db/schema_migrations/20220603095158
+++ /dev/null
@@ -1 +0,0 @@
-7948214753beae50164c7ffa4783ca32d8a974223730c788a527c0218da06cbc \ No newline at end of file
diff --git a/db/schema_migrations/20220603173103 b/db/schema_migrations/20220603173103
deleted file mode 100644
index cf2a199ee5b..00000000000
--- a/db/schema_migrations/20220603173103
+++ /dev/null
@@ -1 +0,0 @@
-4a618d15ee56e7cb9a20385824cc63cf12f8a2eb3604c787f79356398094a3b6 \ No newline at end of file
diff --git a/db/schema_migrations/20220605170009 b/db/schema_migrations/20220605170009
deleted file mode 100644
index d32297ec7d1..00000000000
--- a/db/schema_migrations/20220605170009
+++ /dev/null
@@ -1 +0,0 @@
-b3661dbf8254ed37356a1164718c372cf5828fe7aa0218fd02feb1c00370e86f \ No newline at end of file
diff --git a/db/schema_migrations/20220606060825 b/db/schema_migrations/20220606060825
deleted file mode 100644
index 21ba4a16ba6..00000000000
--- a/db/schema_migrations/20220606060825
+++ /dev/null
@@ -1 +0,0 @@
-3c0e1b1bdf658a1335ecd61e5409d428d1ff1827a9f13a9dbb8df7757a899b59 \ No newline at end of file
diff --git a/db/schema_migrations/20220606060850 b/db/schema_migrations/20220606060850
deleted file mode 100644
index 33e7ce68d44..00000000000
--- a/db/schema_migrations/20220606060850
+++ /dev/null
@@ -1 +0,0 @@
-86abe66430f55f57cd528af90bbc364d75466ea44f8016c54b9734d123ae69a4 \ No newline at end of file
diff --git a/db/schema_migrations/20220606082910 b/db/schema_migrations/20220606082910
deleted file mode 100644
index 5917ba95971..00000000000
--- a/db/schema_migrations/20220606082910
+++ /dev/null
@@ -1 +0,0 @@
-ecab80f469d2aea061b5c8371a243e4b6686d637c3df284f23e575606ef8c1a6 \ No newline at end of file
diff --git a/db/schema_migrations/20220607011733 b/db/schema_migrations/20220607011733
deleted file mode 100644
index 7581765679c..00000000000
--- a/db/schema_migrations/20220607011733
+++ /dev/null
@@ -1 +0,0 @@
-2d4dd4b889b5fc9c3f329669734f086997ebb514ed62afe6ca4220fc525797c9 \ No newline at end of file
diff --git a/db/schema_migrations/20220607082910 b/db/schema_migrations/20220607082910
deleted file mode 100644
index db9c63e20c5..00000000000
--- a/db/schema_migrations/20220607082910
+++ /dev/null
@@ -1 +0,0 @@
-2ce59d4c11daec217cd55148476f123f25727c5519f0f180f68e07b4fa33be97 \ No newline at end of file
diff --git a/db/schema_migrations/20220607095219 b/db/schema_migrations/20220607095219
deleted file mode 100644
index e33cda54391..00000000000
--- a/db/schema_migrations/20220607095219
+++ /dev/null
@@ -1 +0,0 @@
-64d492cca82603147226c9b0e6f424d2d2ba7a17ea0fe022510fb376016028e1 \ No newline at end of file
diff --git a/db/schema_migrations/20220607115703 b/db/schema_migrations/20220607115703
deleted file mode 100644
index 9a4c705041b..00000000000
--- a/db/schema_migrations/20220607115703
+++ /dev/null
@@ -1 +0,0 @@
-2103b06971a8c41172a046b61bf62fea4312c29391aaf747e30e1aa8b2c6313c \ No newline at end of file
diff --git a/db/schema_migrations/20220607140222 b/db/schema_migrations/20220607140222
deleted file mode 100644
index 6a8c7b5bedd..00000000000
--- a/db/schema_migrations/20220607140222
+++ /dev/null
@@ -1 +0,0 @@
-cbbcc9c2439ff583489239afaadb6b18fc86286360745565af52b9baebbf436e \ No newline at end of file
diff --git a/db/schema_migrations/20220608074738 b/db/schema_migrations/20220608074738
deleted file mode 100644
index 035979d8f04..00000000000
--- a/db/schema_migrations/20220608074738
+++ /dev/null
@@ -1 +0,0 @@
-0bf44279d1fd78a8df1ec2898b6170e587fb2dd5d692b9c31648aa19dffa5fe8 \ No newline at end of file
diff --git a/db/schema_migrations/20220608114734 b/db/schema_migrations/20220608114734
deleted file mode 100644
index 7f9a1972827..00000000000
--- a/db/schema_migrations/20220608114734
+++ /dev/null
@@ -1 +0,0 @@
-282fb55b257baa432f9e7aa97901ef61c58fd8e5dee2e687b21af54db9d37d03 \ No newline at end of file
diff --git a/db/schema_migrations/20220609150626 b/db/schema_migrations/20220609150626
deleted file mode 100644
index f0f54d885cf..00000000000
--- a/db/schema_migrations/20220609150626
+++ /dev/null
@@ -1 +0,0 @@
-93e90cbe1fff08de997134dab382dce7c341dd9f4cc16302cac09ce34a419d2d \ No newline at end of file
diff --git a/db/schema_migrations/20220609195803 b/db/schema_migrations/20220609195803
deleted file mode 100644
index c657c73693e..00000000000
--- a/db/schema_migrations/20220609195803
+++ /dev/null
@@ -1 +0,0 @@
-8f9a2af299249b0472e9f1e4b17cdd442abfbeaffa658733cfa9b6db7574fc88 \ No newline at end of file
diff --git a/db/schema_migrations/20220610074326 b/db/schema_migrations/20220610074326
deleted file mode 100644
index 8ab6ca66af9..00000000000
--- a/db/schema_migrations/20220610074326
+++ /dev/null
@@ -1 +0,0 @@
-fdd1282379c79b3d638baf35257c276ec38c7b70a924cc678db55d6af3b701b1 \ No newline at end of file
diff --git a/db/schema_migrations/20220610125248 b/db/schema_migrations/20220610125248
deleted file mode 100644
index 25e863f8c14..00000000000
--- a/db/schema_migrations/20220610125248
+++ /dev/null
@@ -1 +0,0 @@
-8ba7386e21ebb3ac082e322059b41d423cede484e60748222de6a0673c3ca41f \ No newline at end of file
diff --git a/db/schema_migrations/20220610140605 b/db/schema_migrations/20220610140605
deleted file mode 100644
index c2ae3528d21..00000000000
--- a/db/schema_migrations/20220610140605
+++ /dev/null
@@ -1 +0,0 @@
-9c64f9fb286992b6cdad8f7f22084c2d538bccf97e9c649f47284c5828a850e3 \ No newline at end of file
diff --git a/db/schema_migrations/20220610223040 b/db/schema_migrations/20220610223040
deleted file mode 100644
index 8aee145e29d..00000000000
--- a/db/schema_migrations/20220610223040
+++ /dev/null
@@ -1 +0,0 @@
-1b670d02f021f81e3541a789915244238c78e234e6eb0e9a6476328f92686667 \ No newline at end of file
diff --git a/db/schema_migrations/20220613054349 b/db/schema_migrations/20220613054349
deleted file mode 100644
index 1c3806a80c8..00000000000
--- a/db/schema_migrations/20220613054349
+++ /dev/null
@@ -1 +0,0 @@
-4c3e4852614dd1a59d63809c40417887794bcbbcf8d3ea3a96f8846e2bd5f795 \ No newline at end of file
diff --git a/db/schema_migrations/20220613095911 b/db/schema_migrations/20220613095911
deleted file mode 100644
index c2f60fafd11..00000000000
--- a/db/schema_migrations/20220613095911
+++ /dev/null
@@ -1 +0,0 @@
-1d2dc45d6fae911d75eaf5970afbae6d2f31d2efd1c27b75fce5feacbcc319d3 \ No newline at end of file
diff --git a/db/schema_migrations/20220614095912 b/db/schema_migrations/20220614095912
deleted file mode 100644
index e84b4a2fb3d..00000000000
--- a/db/schema_migrations/20220614095912
+++ /dev/null
@@ -1 +0,0 @@
-96d899efc1fa39cf3433987ee4d8062456f7a6af6248b97eda2ddc5491dcf7f5 \ No newline at end of file
diff --git a/db/schema_migrations/20220614120415 b/db/schema_migrations/20220614120415
deleted file mode 100644
index 2357871c8d8..00000000000
--- a/db/schema_migrations/20220614120415
+++ /dev/null
@@ -1 +0,0 @@
-a18f38b1f25ab3344c3ce8dcefc4579370c79e70354dc1665dbb8026892e1e37 \ No newline at end of file
diff --git a/db/schema_migrations/20220614185644 b/db/schema_migrations/20220614185644
deleted file mode 100644
index dcc2d926276..00000000000
--- a/db/schema_migrations/20220614185644
+++ /dev/null
@@ -1 +0,0 @@
-f1d4faf4d32a3271a97b389d53c9d3accbfa3fa2bd47d63257fe589efa4bb665 \ No newline at end of file
diff --git a/db/schema_migrations/20220615091059 b/db/schema_migrations/20220615091059
deleted file mode 100644
index 1d1b35fc8f6..00000000000
--- a/db/schema_migrations/20220615091059
+++ /dev/null
@@ -1 +0,0 @@
-bbfcaf59734b67142b237b7ea479c5eaa3c2152cdd84c87ad541e5a0e75466ef \ No newline at end of file
diff --git a/db/schema_migrations/20220615105811 b/db/schema_migrations/20220615105811
deleted file mode 100644
index e2ada7879b8..00000000000
--- a/db/schema_migrations/20220615105811
+++ /dev/null
@@ -1 +0,0 @@
-33456ce3af299e010011b1346b4097ffa1ee642ffb90d342ea22171c3f079d7a \ No newline at end of file
diff --git a/db/schema_migrations/20220616092541 b/db/schema_migrations/20220616092541
deleted file mode 100644
index bccdcd90ed6..00000000000
--- a/db/schema_migrations/20220616092541
+++ /dev/null
@@ -1 +0,0 @@
-2c177b0199019ebdbc06b43d21d47a35453e3b376ccbde21163128c77826478b \ No newline at end of file
diff --git a/db/schema_migrations/20220616182001 b/db/schema_migrations/20220616182001
deleted file mode 100644
index 8167bae8550..00000000000
--- a/db/schema_migrations/20220616182001
+++ /dev/null
@@ -1 +0,0 @@
-7276612cf3f2fd968405c1bb31afe2eafeca3dc9e145f5f4c2e1609a93926e04 \ No newline at end of file
diff --git a/db/schema_migrations/20220616182015 b/db/schema_migrations/20220616182015
deleted file mode 100644
index 00f4825677c..00000000000
--- a/db/schema_migrations/20220616182015
+++ /dev/null
@@ -1 +0,0 @@
-4c2d89fc0aae46c08fc03018de7fafc9a040fa94284224a89ae626a1ddd2cfa9 \ No newline at end of file
diff --git a/db/schema_migrations/20220616182016 b/db/schema_migrations/20220616182016
deleted file mode 100644
index a2c9beba76b..00000000000
--- a/db/schema_migrations/20220616182016
+++ /dev/null
@@ -1 +0,0 @@
-ebb53cf83d85c5b1b07e206e7190a3d17e37ec35f085e8e57e1245ba1a3acbf6 \ No newline at end of file
diff --git a/db/schema_migrations/20220616182038 b/db/schema_migrations/20220616182038
deleted file mode 100644
index 1bf761987d8..00000000000
--- a/db/schema_migrations/20220616182038
+++ /dev/null
@@ -1 +0,0 @@
-969b07e2aa0422f9eae171b7c345f2fdaf061bd0ea05bc76618d986364b9223c \ No newline at end of file
diff --git a/db/schema_migrations/20220616183240 b/db/schema_migrations/20220616183240
deleted file mode 100644
index 39d0cab11ca..00000000000
--- a/db/schema_migrations/20220616183240
+++ /dev/null
@@ -1 +0,0 @@
-7714fa874067ab65a0374617e83a53986105cafe0d92319b21a4f7d7ad2fc600 \ No newline at end of file
diff --git a/db/schema_migrations/20220616183309 b/db/schema_migrations/20220616183309
deleted file mode 100644
index cd44061963f..00000000000
--- a/db/schema_migrations/20220616183309
+++ /dev/null
@@ -1 +0,0 @@
-717dd5d40fca276c49b42909e5e3ec9e0cef7f0e534c428d849528003af44fd8 \ No newline at end of file
diff --git a/db/schema_migrations/20220616183310 b/db/schema_migrations/20220616183310
deleted file mode 100644
index a854df90812..00000000000
--- a/db/schema_migrations/20220616183310
+++ /dev/null
@@ -1 +0,0 @@
-c175c13b220873cea28ea3963cf461aaeb570051ef3834b8520b7ad9520a0f19 \ No newline at end of file
diff --git a/db/schema_migrations/20220616222253 b/db/schema_migrations/20220616222253
deleted file mode 100644
index dbf34a2a8e1..00000000000
--- a/db/schema_migrations/20220616222253
+++ /dev/null
@@ -1 +0,0 @@
-547c20f7e583e820093a68fa127ea530e6e2e50135e38e72246f4a400e816742 \ No newline at end of file
diff --git a/db/schema_migrations/20220617073407 b/db/schema_migrations/20220617073407
deleted file mode 100644
index 4914915f1e6..00000000000
--- a/db/schema_migrations/20220617073407
+++ /dev/null
@@ -1 +0,0 @@
-aff0fb4359747e74fd8275774f1644f0d0acd9f22469c88874cfcd0c7d44752f \ No newline at end of file
diff --git a/db/schema_migrations/20220617123022 b/db/schema_migrations/20220617123022
deleted file mode 100644
index 043b16b6cb6..00000000000
--- a/db/schema_migrations/20220617123022
+++ /dev/null
@@ -1 +0,0 @@
-247c6cba3cee4413a17193aeebd77eae79a7ced17a5a2b785f0ecd682e823c02 \ No newline at end of file
diff --git a/db/schema_migrations/20220617123034 b/db/schema_migrations/20220617123034
deleted file mode 100644
index f0ecdc68113..00000000000
--- a/db/schema_migrations/20220617123034
+++ /dev/null
@@ -1 +0,0 @@
-d72ffd09437a576edb2d046963e8d004c5a2b13586f7318361fea6d673f5cece \ No newline at end of file
diff --git a/db/schema_migrations/20220617123105 b/db/schema_migrations/20220617123105
deleted file mode 100644
index a3ffe22bca4..00000000000
--- a/db/schema_migrations/20220617123105
+++ /dev/null
@@ -1 +0,0 @@
-d382bfcfcf79ba38a388ac5496a194adc0c392ba6685c024d7bd55a14d57c1b8 \ No newline at end of file
diff --git a/db/schema_migrations/20220617123113 b/db/schema_migrations/20220617123113
deleted file mode 100644
index deb71083ab0..00000000000
--- a/db/schema_migrations/20220617123113
+++ /dev/null
@@ -1 +0,0 @@
-ebe1b2db48b987720e7c561b30ce41e7542d8cd190e4b454bd28d6fdfa8bff0d \ No newline at end of file
diff --git a/db/schema_migrations/20220617123135 b/db/schema_migrations/20220617123135
deleted file mode 100644
index 3cafd00560c..00000000000
--- a/db/schema_migrations/20220617123135
+++ /dev/null
@@ -1 +0,0 @@
-2fcb9e7ecdc387d5dd4dfe78544289026bb2626eca2650da590f6181deeaadef \ No newline at end of file
diff --git a/db/schema_migrations/20220617123144 b/db/schema_migrations/20220617123144
deleted file mode 100644
index 6f9c5e33092..00000000000
--- a/db/schema_migrations/20220617123144
+++ /dev/null
@@ -1 +0,0 @@
-5a03ed4bc5791d0feb72203553f77ed37f37127309eda6c7dc75c7ac950e28e3 \ No newline at end of file
diff --git a/db/schema_migrations/20220617141347 b/db/schema_migrations/20220617141347
deleted file mode 100644
index d8c8ff580cf..00000000000
--- a/db/schema_migrations/20220617141347
+++ /dev/null
@@ -1 +0,0 @@
-64473c05cc67d6d87d921921ea09e0962f51092d5bb565cc387def8d91676728 \ No newline at end of file
diff --git a/db/schema_migrations/20220617142124 b/db/schema_migrations/20220617142124
deleted file mode 100644
index c8fd06f2c10..00000000000
--- a/db/schema_migrations/20220617142124
+++ /dev/null
@@ -1 +0,0 @@
-668404076e9cfc91817b8ae3ec995a69ec0db283153bbe497a81eb83c2188ceb \ No newline at end of file
diff --git a/db/schema_migrations/20220617143228 b/db/schema_migrations/20220617143228
deleted file mode 100644
index cb4ac555bc3..00000000000
--- a/db/schema_migrations/20220617143228
+++ /dev/null
@@ -1 +0,0 @@
-547fc0071177395133497cbcec9a9d9ed058fe74f632f5e84d9a6416047503f2 \ No newline at end of file
diff --git a/db/schema_migrations/20220619182308 b/db/schema_migrations/20220619182308
deleted file mode 100644
index 7d85fb1c487..00000000000
--- a/db/schema_migrations/20220619182308
+++ /dev/null
@@ -1 +0,0 @@
-f8830ecd0c49aea19857fec9b07d238f4bc269a758b6a3495d57222ab1604c74 \ No newline at end of file
diff --git a/db/schema_migrations/20220619184931 b/db/schema_migrations/20220619184931
deleted file mode 100644
index a98c1f3e847..00000000000
--- a/db/schema_migrations/20220619184931
+++ /dev/null
@@ -1 +0,0 @@
-2cdbc5b29e11a2ce0679f218adc57c95d483139ca0bcd1801ea97fbd4ba68ddf \ No newline at end of file
diff --git a/db/schema_migrations/20220619212618 b/db/schema_migrations/20220619212618
deleted file mode 100644
index 1ecfdb6aed4..00000000000
--- a/db/schema_migrations/20220619212618
+++ /dev/null
@@ -1 +0,0 @@
-34a9ec48e8480f3a235089f01944f60e93e4b87909a660f18a42bc47a3a0fe51 \ No newline at end of file
diff --git a/db/schema_migrations/20220620060633 b/db/schema_migrations/20220620060633
deleted file mode 100644
index d6a627ff611..00000000000
--- a/db/schema_migrations/20220620060633
+++ /dev/null
@@ -1 +0,0 @@
-29b2e0496736ae09f7d2b6a971a7a9a946379469de0f5488a3ff16efd896e306 \ No newline at end of file
diff --git a/db/schema_migrations/20220620132300 b/db/schema_migrations/20220620132300
deleted file mode 100644
index 8355b33c868..00000000000
--- a/db/schema_migrations/20220620132300
+++ /dev/null
@@ -1 +0,0 @@
-cc7a1d81c9de121380b7b1a4bbbb1947313635c6ae16ce15184b586765333a8e \ No newline at end of file
diff --git a/db/schema_migrations/20220620151740 b/db/schema_migrations/20220620151740
deleted file mode 100644
index fae240f63f9..00000000000
--- a/db/schema_migrations/20220620151740
+++ /dev/null
@@ -1 +0,0 @@
-b54da707978fc5e90183331250ab66b5438c6c9f9ecd50a50db5b63a5993bd6b \ No newline at end of file
diff --git a/db/schema_migrations/20220621040800 b/db/schema_migrations/20220621040800
deleted file mode 100644
index dbdc38367be..00000000000
--- a/db/schema_migrations/20220621040800
+++ /dev/null
@@ -1 +0,0 @@
-effd82de862e39edcba7793010bdd377b8141c49edebdd380276a8b558886835 \ No newline at end of file
diff --git a/db/schema_migrations/20220621082245 b/db/schema_migrations/20220621082245
deleted file mode 100644
index 42e34952c30..00000000000
--- a/db/schema_migrations/20220621082245
+++ /dev/null
@@ -1 +0,0 @@
-290ff026a11ac5eadd71fb9fb3ba21bed535d148c56b3176f115e973cdb41369 \ No newline at end of file
diff --git a/db/schema_migrations/20220621092245 b/db/schema_migrations/20220621092245
deleted file mode 100644
index 86274a80e6d..00000000000
--- a/db/schema_migrations/20220621092245
+++ /dev/null
@@ -1 +0,0 @@
-c414443040bb168009bcbe00f874b1f474c1d1dcf563e621cfdf641f21846d59 \ No newline at end of file
diff --git a/db/schema_migrations/20220621192541 b/db/schema_migrations/20220621192541
deleted file mode 100644
index 6a638616894..00000000000
--- a/db/schema_migrations/20220621192541
+++ /dev/null
@@ -1 +0,0 @@
-b5bc058c3a0217dc6a62af717861f4bce052c8b86d6c053919e2b10bcc9af845 \ No newline at end of file
diff --git a/db/schema_migrations/20220621202616 b/db/schema_migrations/20220621202616
deleted file mode 100644
index 187ff41b3c1..00000000000
--- a/db/schema_migrations/20220621202616
+++ /dev/null
@@ -1 +0,0 @@
-6567c86c14f741b7ea8f49b04c3ad82f226f04c0ab2e68212b5f6e7bf4ef615f \ No newline at end of file
diff --git a/db/schema_migrations/20220622070547 b/db/schema_migrations/20220622070547
deleted file mode 100644
index da1b4231b0d..00000000000
--- a/db/schema_migrations/20220622070547
+++ /dev/null
@@ -1 +0,0 @@
-e259a91d467b3ec3e09c4514de0e798cffa697a8bc492edd6ad0dcab7f9a9623 \ No newline at end of file
diff --git a/db/schema_migrations/20220622080547 b/db/schema_migrations/20220622080547
deleted file mode 100644
index c7b3e676a30..00000000000
--- a/db/schema_migrations/20220622080547
+++ /dev/null
@@ -1 +0,0 @@
-366f0819ce42bc84fc88871872d4b5870e63894fa2e32fbd7808cce2afe4815b \ No newline at end of file
diff --git a/db/schema_migrations/20220624062300 b/db/schema_migrations/20220624062300
deleted file mode 100644
index a13fda7e34b..00000000000
--- a/db/schema_migrations/20220624062300
+++ /dev/null
@@ -1 +0,0 @@
-d09b9359b871c96511c255abdc1ff82640420f469a16c5e76461ca47dca58770 \ No newline at end of file
diff --git a/db/schema_migrations/20220624081524 b/db/schema_migrations/20220624081524
deleted file mode 100644
index f643b1223a8..00000000000
--- a/db/schema_migrations/20220624081524
+++ /dev/null
@@ -1 +0,0 @@
-3245905956e4781629bbf6398c9534cf35eab469e8a703f755ed26de90dee0e1 \ No newline at end of file
diff --git a/db/schema_migrations/20220624090458 b/db/schema_migrations/20220624090458
deleted file mode 100644
index 62473bf8bd3..00000000000
--- a/db/schema_migrations/20220624090458
+++ /dev/null
@@ -1 +0,0 @@
-cf3c6e8d720ce48272b8b9658d3c240e8fe3c9a26284a9e169f7bb6a40c862bc \ No newline at end of file
diff --git a/db/schema_migrations/20220627061008 b/db/schema_migrations/20220627061008
deleted file mode 100644
index 8a576f791ad..00000000000
--- a/db/schema_migrations/20220627061008
+++ /dev/null
@@ -1 +0,0 @@
-80c35cd4dbc2e00e721ccb9313ff0f2f4f85e781c7961680e14769c308f067ed \ No newline at end of file
diff --git a/db/schema_migrations/20220627090231 b/db/schema_migrations/20220627090231
deleted file mode 100644
index ca24023b011..00000000000
--- a/db/schema_migrations/20220627090231
+++ /dev/null
@@ -1 +0,0 @@
-e0038cb5687098e93a250e6fb0449d0ae2eb7c534219b3f24a9258f2a3c0fedb \ No newline at end of file
diff --git a/db/schema_migrations/20220627122229 b/db/schema_migrations/20220627122229
deleted file mode 100644
index 040376e1aa0..00000000000
--- a/db/schema_migrations/20220627122229
+++ /dev/null
@@ -1 +0,0 @@
-29ab69647b53c331aefdd62e8fbcc1567df4424a8e7ae6f8eb7b1e9afa7a6911 \ No newline at end of file
diff --git a/db/schema_migrations/20220627122230 b/db/schema_migrations/20220627122230
deleted file mode 100644
index 82ba0d503ee..00000000000
--- a/db/schema_migrations/20220627122230
+++ /dev/null
@@ -1 +0,0 @@
-6d65af0d20cd80cf3367f48c5447ff33046e982ac1cfd55aaf52a7cc2330e428 \ No newline at end of file
diff --git a/db/schema_migrations/20220627140315 b/db/schema_migrations/20220627140315
deleted file mode 100644
index 1ff8388f109..00000000000
--- a/db/schema_migrations/20220627140315
+++ /dev/null
@@ -1 +0,0 @@
-0511a510621fec3b4b22ac55f151ec3fd83206cc39e97ac3b93a61a80e7a43f8 \ No newline at end of file
diff --git a/db/schema_migrations/20220627152642 b/db/schema_migrations/20220627152642
deleted file mode 100644
index b92fde2e5ca..00000000000
--- a/db/schema_migrations/20220627152642
+++ /dev/null
@@ -1 +0,0 @@
-24b07a6966c6fd7ab680cf5a9052b7c2f6d20944eaae5d06ef42934364dce222 \ No newline at end of file
diff --git a/db/schema_migrations/20220627171538 b/db/schema_migrations/20220627171538
deleted file mode 100644
index a2c269b4348..00000000000
--- a/db/schema_migrations/20220627171538
+++ /dev/null
@@ -1 +0,0 @@
-1f44130f3f8af92bfaa7de488da2f5f0804045afa6e2ac233d2660a7937a9e32 \ No newline at end of file
diff --git a/db/schema_migrations/20220627223041 b/db/schema_migrations/20220627223041
deleted file mode 100644
index 3292e76e1de..00000000000
--- a/db/schema_migrations/20220627223041
+++ /dev/null
@@ -1 +0,0 @@
-225606ccdf0979aaf70ff8b9a44269e69b1598718e3d7c1944ed41c07b5e33f6 \ No newline at end of file
diff --git a/db/schema_migrations/20220628012902 b/db/schema_migrations/20220628012902
deleted file mode 100644
index ef7325629ca..00000000000
--- a/db/schema_migrations/20220628012902
+++ /dev/null
@@ -1 +0,0 @@
-5881441f8a6c0f25cff00aa9e164a1c19bcc34d4db678fc50712824fff82b24e \ No newline at end of file
diff --git a/db/schema_migrations/20220628110214 b/db/schema_migrations/20220628110214
deleted file mode 100644
index 97bab836225..00000000000
--- a/db/schema_migrations/20220628110214
+++ /dev/null
@@ -1 +0,0 @@
-f95de3ed746d6f661358a3826587da37009f20ba3cd0e8a332e57f9276fb856c \ No newline at end of file
diff --git a/db/schema_migrations/20220628110823 b/db/schema_migrations/20220628110823
deleted file mode 100644
index 1c5bb0f3320..00000000000
--- a/db/schema_migrations/20220628110823
+++ /dev/null
@@ -1 +0,0 @@
-50d788ced675b3773bbb84122040c775c24c0993c95542f5130a6456fcd4ee69 \ No newline at end of file
diff --git a/db/schema_migrations/20220628111752 b/db/schema_migrations/20220628111752
deleted file mode 100644
index 747546f1ba4..00000000000
--- a/db/schema_migrations/20220628111752
+++ /dev/null
@@ -1 +0,0 @@
-5a4a6355d1954735a05831e17c97e2879320f2cb313be56fb72e1cd2c20d9090 \ No newline at end of file
diff --git a/db/schema_migrations/20220628120708 b/db/schema_migrations/20220628120708
deleted file mode 100644
index b6961491c93..00000000000
--- a/db/schema_migrations/20220628120708
+++ /dev/null
@@ -1 +0,0 @@
-75027a5b09491b156837707af20406b2672d5ee3ce2272ecf1496e98da2861bf \ No newline at end of file
diff --git a/db/schema_migrations/20220628121644 b/db/schema_migrations/20220628121644
deleted file mode 100644
index cac9b9d9a0b..00000000000
--- a/db/schema_migrations/20220628121644
+++ /dev/null
@@ -1 +0,0 @@
-90b9b47ef3671b73117205264589f895a083b0d00db00e684b25e60673d2e840 \ No newline at end of file
diff --git a/db/schema_migrations/20220628121712 b/db/schema_migrations/20220628121712
deleted file mode 100644
index e1c0ed37cff..00000000000
--- a/db/schema_migrations/20220628121712
+++ /dev/null
@@ -1 +0,0 @@
-d64a9c41376bbb3bc2c9df846668b1a67b0bed1b1410d97dba17c19a2f322b38 \ No newline at end of file
diff --git a/db/schema_migrations/20220628122622 b/db/schema_migrations/20220628122622
deleted file mode 100644
index ce29140a862..00000000000
--- a/db/schema_migrations/20220628122622
+++ /dev/null
@@ -1 +0,0 @@
-aeaa386b52a2a5e30b59fbe57e9c701298fea45219b3ec419866d40c6d2a5e5d \ No newline at end of file
diff --git a/db/schema_migrations/20220629124942 b/db/schema_migrations/20220629124942
deleted file mode 100644
index a5f9968b622..00000000000
--- a/db/schema_migrations/20220629124942
+++ /dev/null
@@ -1 +0,0 @@
-d0e6dda681ec7980d1aeccd7976425edbe212b0676e6c57c6941f0ba73bbb8b4 \ No newline at end of file
diff --git a/db/schema_migrations/20220629184402 b/db/schema_migrations/20220629184402
deleted file mode 100644
index 7e8b0c47bd1..00000000000
--- a/db/schema_migrations/20220629184402
+++ /dev/null
@@ -1 +0,0 @@
-9414b08c3eacadffd8759739da163eb378776d3ecdb06dab7c66e259ff1bed29 \ No newline at end of file
diff --git a/db/schema_migrations/20220629220129 b/db/schema_migrations/20220629220129
deleted file mode 100644
index 580da9df82a..00000000000
--- a/db/schema_migrations/20220629220129
+++ /dev/null
@@ -1 +0,0 @@
-2f5e08212b2f733ce5812d7154879768532e31e642b647648d1c03fd4ddf8b13 \ No newline at end of file
diff --git a/db/schema_migrations/20220630050050 b/db/schema_migrations/20220630050050
deleted file mode 100644
index 2ec998847eb..00000000000
--- a/db/schema_migrations/20220630050050
+++ /dev/null
@@ -1 +0,0 @@
-dfb314ef76efc54a2464e6b84e71753caf58bc8508f9e64b403066ea4847fe56 \ No newline at end of file
diff --git a/db/schema_migrations/20220630085003 b/db/schema_migrations/20220630085003
deleted file mode 100644
index 9e020afbe84..00000000000
--- a/db/schema_migrations/20220630085003
+++ /dev/null
@@ -1 +0,0 @@
-c1fb356eb437f9511c0af324f9f4a173245a427d20e2bbda0557dfaff28911c3 \ No newline at end of file
diff --git a/db/schema_migrations/20220630091409 b/db/schema_migrations/20220630091409
deleted file mode 100644
index e36a91febe6..00000000000
--- a/db/schema_migrations/20220630091409
+++ /dev/null
@@ -1 +0,0 @@
-f8c8489ecded214bbc4ab615a23eceaef3b6f650e98514f8e2b4b2fa6d328f4e \ No newline at end of file
diff --git a/db/schema_migrations/20220630151641 b/db/schema_migrations/20220630151641
deleted file mode 100644
index f32c607c840..00000000000
--- a/db/schema_migrations/20220630151641
+++ /dev/null
@@ -1 +0,0 @@
-55794a6bb6380adc662fb90f60596477ff81d83b05b4cca83d72332d869d08fb \ No newline at end of file
diff --git a/db/schema_migrations/20220630202329 b/db/schema_migrations/20220630202329
deleted file mode 100644
index c45ba56ad4b..00000000000
--- a/db/schema_migrations/20220630202329
+++ /dev/null
@@ -1 +0,0 @@
-5b12e0fbebef2979cfc31aab16ce78988a2f94662dbe1048791413347edb3c99 \ No newline at end of file
diff --git a/db/schema_migrations/20220701085523 b/db/schema_migrations/20220701085523
deleted file mode 100644
index c835395cd6d..00000000000
--- a/db/schema_migrations/20220701085523
+++ /dev/null
@@ -1 +0,0 @@
-eb28e690d810a6b23454b0b5a2ebc1ff802cdf52f7c41faae7519ea8f018b96a \ No newline at end of file
diff --git a/db/schema_migrations/20220701173859 b/db/schema_migrations/20220701173859
deleted file mode 100644
index c5f72bfb817..00000000000
--- a/db/schema_migrations/20220701173859
+++ /dev/null
@@ -1 +0,0 @@
-7c9b8b433553e83bb05208e62541e3d51bcc1083ff33d1146e93b92d954f9cb0 \ No newline at end of file
diff --git a/db/schema_migrations/20220703182234 b/db/schema_migrations/20220703182234
deleted file mode 100644
index 7d977a4ea9f..00000000000
--- a/db/schema_migrations/20220703182234
+++ /dev/null
@@ -1 +0,0 @@
-cb1457d19b058add7a966690f8d83e4f7e1612f2de3d6d8a87873bb7fb19960b \ No newline at end of file
diff --git a/db/schema_migrations/20220703182254 b/db/schema_migrations/20220703182254
deleted file mode 100644
index 9d454d07600..00000000000
--- a/db/schema_migrations/20220703182254
+++ /dev/null
@@ -1 +0,0 @@
-aa4e72f0f6596a609a7620c32e2a5def1ce3ee7200cf7513dd3c6569f68db342 \ No newline at end of file
diff --git a/db/schema_migrations/20220703182314 b/db/schema_migrations/20220703182314
deleted file mode 100644
index 94d06e2075e..00000000000
--- a/db/schema_migrations/20220703182314
+++ /dev/null
@@ -1 +0,0 @@
-e52d274075c18c3b80ed8306138eabd6dd3d1157dd1093f7f769b0a6cfb56791 \ No newline at end of file
diff --git a/db/schema_migrations/20220704034050 b/db/schema_migrations/20220704034050
deleted file mode 100644
index 4ddb8267bf5..00000000000
--- a/db/schema_migrations/20220704034050
+++ /dev/null
@@ -1 +0,0 @@
-3c2e9dfb0bbd31f01a9f1b3bc7d5e1865b0ae0c94dcfd6e900890677ca276e6c \ No newline at end of file
diff --git a/db/schema_migrations/20220704034105 b/db/schema_migrations/20220704034105
deleted file mode 100644
index 5d08da1b417..00000000000
--- a/db/schema_migrations/20220704034105
+++ /dev/null
@@ -1 +0,0 @@
-45347ab01c723358a736268c40f04efd7f4ce4be0570072f3740acdc73b6a203 \ No newline at end of file
diff --git a/db/schema_migrations/20220704044408 b/db/schema_migrations/20220704044408
deleted file mode 100644
index 083554d2ffd..00000000000
--- a/db/schema_migrations/20220704044408
+++ /dev/null
@@ -1 +0,0 @@
-4fd3bd4f3f3fd521b5491c38636c4c6e73470367b7510ebe517e7557c6b341ff \ No newline at end of file
diff --git a/db/schema_migrations/20220704045440 b/db/schema_migrations/20220704045440
deleted file mode 100644
index 3d8be03c87f..00000000000
--- a/db/schema_migrations/20220704045440
+++ /dev/null
@@ -1 +0,0 @@
-0494aa671826be96811e2985560c70b0ba4bce4272ca7d94222eff6761d305ed \ No newline at end of file
diff --git a/db/schema_migrations/20220705114635 b/db/schema_migrations/20220705114635
deleted file mode 100644
index 1ab54b47282..00000000000
--- a/db/schema_migrations/20220705114635
+++ /dev/null
@@ -1 +0,0 @@
-b9d37f6b3f59c4d2a08533fd1e2dc91403081fdf5691c86a1874079cb7937588 \ No newline at end of file
diff --git a/db/schema_migrations/20220705145349 b/db/schema_migrations/20220705145349
deleted file mode 100644
index 6c309d401db..00000000000
--- a/db/schema_migrations/20220705145349
+++ /dev/null
@@ -1 +0,0 @@
-7f5288a47ce5d548bf47fbcd107e31f5448ec1d730ce5b13a760c155c50b44fb \ No newline at end of file
diff --git a/db/schema_migrations/20220705180843 b/db/schema_migrations/20220705180843
deleted file mode 100644
index 4e39726e61e..00000000000
--- a/db/schema_migrations/20220705180843
+++ /dev/null
@@ -1 +0,0 @@
-755e06f8bd3a0a28820f6ec2ee52a39a7920eb9d8ae0315a8a179139c78645d9 \ No newline at end of file
diff --git a/db/schema_migrations/20220706065245 b/db/schema_migrations/20220706065245
deleted file mode 100644
index 46abcb3e7c8..00000000000
--- a/db/schema_migrations/20220706065245
+++ /dev/null
@@ -1 +0,0 @@
-3583de8dc55a1e9835b64542bb11a94084d34c2409f63cd7e402bd3c5c0009ef \ No newline at end of file
diff --git a/db/schema_migrations/20220706065611 b/db/schema_migrations/20220706065611
deleted file mode 100644
index 24b6523f24f..00000000000
--- a/db/schema_migrations/20220706065611
+++ /dev/null
@@ -1 +0,0 @@
-eab26142f1314caa9ff6a6f07b6c787d276653d9bf6702bce9355c0e9605a909 \ No newline at end of file
diff --git a/db/schema_migrations/20220706070804 b/db/schema_migrations/20220706070804
deleted file mode 100644
index 08943e8fe00..00000000000
--- a/db/schema_migrations/20220706070804
+++ /dev/null
@@ -1 +0,0 @@
-7bf55a7614afcb210b22df1ea38cf16fde9510bbe66d9b19f0fb63d668ac4e72 \ No newline at end of file
diff --git a/db/schema_migrations/20220706071304 b/db/schema_migrations/20220706071304
deleted file mode 100644
index e2e0ba301e5..00000000000
--- a/db/schema_migrations/20220706071304
+++ /dev/null
@@ -1 +0,0 @@
-ed72bfafe1c04826ce57b9068c537df563bc193f231f4f223348b084c68a8bde \ No newline at end of file
diff --git a/db/schema_migrations/20220706115138 b/db/schema_migrations/20220706115138
deleted file mode 100644
index 0c139470b47..00000000000
--- a/db/schema_migrations/20220706115138
+++ /dev/null
@@ -1 +0,0 @@
-c0c4a18cb711e0288bf1d385e06151e0e329dc40d4e9cd51e6437fe73d6bfc21 \ No newline at end of file
diff --git a/db/schema_migrations/20220706122719 b/db/schema_migrations/20220706122719
deleted file mode 100644
index 6341be22a00..00000000000
--- a/db/schema_migrations/20220706122719
+++ /dev/null
@@ -1 +0,0 @@
-b80d15b0176f0372a1553920ba72c43a2f9831f786358397f820a83b1b840cdc \ No newline at end of file
diff --git a/db/schema_migrations/20220706132238 b/db/schema_migrations/20220706132238
deleted file mode 100644
index 32ae901bfb9..00000000000
--- a/db/schema_migrations/20220706132238
+++ /dev/null
@@ -1 +0,0 @@
-ea387b35bfb7f15a036aca9413b8fd15ede6b16048fa9e9be5a62b9e21ca362d \ No newline at end of file
diff --git a/db/schema_migrations/20220706191627 b/db/schema_migrations/20220706191627
deleted file mode 100644
index 3b66876ff9a..00000000000
--- a/db/schema_migrations/20220706191627
+++ /dev/null
@@ -1 +0,0 @@
-28aecb58b63bdc910c3a37b5ff0f99d2feb42dcb49ba894bb017115f2b33f531 \ No newline at end of file
diff --git a/db/schema_migrations/20220707075300 b/db/schema_migrations/20220707075300
deleted file mode 100644
index 1374cbd2036..00000000000
--- a/db/schema_migrations/20220707075300
+++ /dev/null
@@ -1 +0,0 @@
-f796c973e95ad95fb95e72214ba664382757c5127bdd19b00934bf99b394fde3 \ No newline at end of file
diff --git a/db/schema_migrations/20220707105335 b/db/schema_migrations/20220707105335
deleted file mode 100644
index 1f1a4d8b41b..00000000000
--- a/db/schema_migrations/20220707105335
+++ /dev/null
@@ -1 +0,0 @@
-2f3dc1952c43a6786f8a66713ac89ca24f828f683a57f7373c91d5e629242909 \ No newline at end of file
diff --git a/db/schema_migrations/20220707105529 b/db/schema_migrations/20220707105529
deleted file mode 100644
index df01b63f89c..00000000000
--- a/db/schema_migrations/20220707105529
+++ /dev/null
@@ -1 +0,0 @@
-82504ed0c287565d9b9eadf929badaa893beaac36224c7c2c7b4e14a663fa9e5 \ No newline at end of file
diff --git a/db/schema_migrations/20220707160707 b/db/schema_migrations/20220707160707
deleted file mode 100644
index f9b10cb637f..00000000000
--- a/db/schema_migrations/20220707160707
+++ /dev/null
@@ -1 +0,0 @@
-772af1dd1d9d7a0cc9ec35b23db66cf2f43767f1f8351023e951090d91544d23 \ No newline at end of file
diff --git a/db/schema_migrations/20220707160921 b/db/schema_migrations/20220707160921
deleted file mode 100644
index 644d56898ca..00000000000
--- a/db/schema_migrations/20220707160921
+++ /dev/null
@@ -1 +0,0 @@
-ce50506f9e56f26b5e773888c0ec8d1465b3b4aed152bf8c9a20bf1215e9fa19 \ No newline at end of file
diff --git a/db/schema_migrations/20220707181910 b/db/schema_migrations/20220707181910
deleted file mode 100644
index d9aef7bdba0..00000000000
--- a/db/schema_migrations/20220707181910
+++ /dev/null
@@ -1 +0,0 @@
-78bb335a94237bfb5c5401807c9fc5e8ff9ec331af0ca0d3c5626253af5cde3f \ No newline at end of file
diff --git a/db/schema_migrations/20220707181920 b/db/schema_migrations/20220707181920
deleted file mode 100644
index de6972176f9..00000000000
--- a/db/schema_migrations/20220707181920
+++ /dev/null
@@ -1 +0,0 @@
-179c400efd7d31b78b4314104c5e9cbdf744c5e2966cecf724d1b7088b515fd1 \ No newline at end of file
diff --git a/db/schema_migrations/20220707181930 b/db/schema_migrations/20220707181930
deleted file mode 100644
index 11594611609..00000000000
--- a/db/schema_migrations/20220707181930
+++ /dev/null
@@ -1 +0,0 @@
-431392f5f88f493371b77263bbe380d08e486e8ba0d013213e6fe7fdcda3c7db \ No newline at end of file
diff --git a/db/schema_migrations/20220707190546 b/db/schema_migrations/20220707190546
deleted file mode 100644
index b46b27e60c8..00000000000
--- a/db/schema_migrations/20220707190546
+++ /dev/null
@@ -1 +0,0 @@
-fd68f63f6ec50233c99b5173b69fa6ff99b1ae9b2d023cdccdff3cd94be35b36 \ No newline at end of file
diff --git a/db/schema_migrations/20220708100508 b/db/schema_migrations/20220708100508
deleted file mode 100644
index 73de59b95ab..00000000000
--- a/db/schema_migrations/20220708100508
+++ /dev/null
@@ -1 +0,0 @@
-041c729542e7bf418ee805d6c1878aa62fd274a97583cc11dfebae9e7bdac896 \ No newline at end of file
diff --git a/db/schema_migrations/20220708100532 b/db/schema_migrations/20220708100532
deleted file mode 100644
index 8f4f3876515..00000000000
--- a/db/schema_migrations/20220708100532
+++ /dev/null
@@ -1 +0,0 @@
-28cf54895ada6e5d501bd5dcb9e7e161fd44ce51494b984dde7beadd0895c952 \ No newline at end of file
diff --git a/db/schema_migrations/20220708132701 b/db/schema_migrations/20220708132701
deleted file mode 100644
index 01fdd550b06..00000000000
--- a/db/schema_migrations/20220708132701
+++ /dev/null
@@ -1 +0,0 @@
-a91b2e3c9f89c6b7a0e4330fe617b22ee3b22100fc868ef13b5c656580175816 \ No newline at end of file
diff --git a/db/schema_migrations/20220708142744 b/db/schema_migrations/20220708142744
deleted file mode 100644
index 980c0b43c52..00000000000
--- a/db/schema_migrations/20220708142744
+++ /dev/null
@@ -1 +0,0 @@
-b93ab540270a4b743c12fe5d1d6963cfeb29ee3b0a1e4e012cd4b3d1b3a08cde \ No newline at end of file
diff --git a/db/schema_migrations/20220708142803 b/db/schema_migrations/20220708142803
deleted file mode 100644
index 4eb59905dd0..00000000000
--- a/db/schema_migrations/20220708142803
+++ /dev/null
@@ -1 +0,0 @@
-7929540cf382f282f75f2f9c9dd6196d426ed1edb1f6744da1f0a627e7fb0cfc \ No newline at end of file
diff --git a/db/schema_migrations/20220708150315 b/db/schema_migrations/20220708150315
deleted file mode 100644
index 10b3f069ffa..00000000000
--- a/db/schema_migrations/20220708150315
+++ /dev/null
@@ -1 +0,0 @@
-925069c0dd5058e38da16496b140ea4139318a40c8207fcd7116d76562b0e959 \ No newline at end of file
diff --git a/db/schema_migrations/20220708150335 b/db/schema_migrations/20220708150335
deleted file mode 100644
index ee0bc1a666e..00000000000
--- a/db/schema_migrations/20220708150335
+++ /dev/null
@@ -1 +0,0 @@
-9a41920cb988c3c5459e33c143f4bb97d8d6cf4fc691aa87f3fd7ef9f2a726f8 \ No newline at end of file
diff --git a/db/schema_migrations/20220708184822 b/db/schema_migrations/20220708184822
deleted file mode 100644
index 095ed891609..00000000000
--- a/db/schema_migrations/20220708184822
+++ /dev/null
@@ -1 +0,0 @@
-80ac782e6e3ee1daec9e18f88a823d7cd43152a36f53c9d50758ba88a5711642 \ No newline at end of file
diff --git a/db/schema_migrations/20220712025712 b/db/schema_migrations/20220712025712
deleted file mode 100644
index 68e8a510feb..00000000000
--- a/db/schema_migrations/20220712025712
+++ /dev/null
@@ -1 +0,0 @@
-f0bba8e67c97d6dea461d8626a07820c52e20ab6578ad40e8873ad0031a2ce62 \ No newline at end of file
diff --git a/db/schema_migrations/20220712031923 b/db/schema_migrations/20220712031923
deleted file mode 100644
index 1cb2b63faa8..00000000000
--- a/db/schema_migrations/20220712031923
+++ /dev/null
@@ -1 +0,0 @@
-db2c19f15a03a6222627875d8bd27368de43fb6485961f866de61b3017796e28 \ No newline at end of file
diff --git a/db/schema_migrations/20220712094945 b/db/schema_migrations/20220712094945
deleted file mode 100644
index 1c03490d054..00000000000
--- a/db/schema_migrations/20220712094945
+++ /dev/null
@@ -1 +0,0 @@
-ef638a5168e2d98621e1c80216bc75500b4de39c40121a7044f039c28448fe82 \ No newline at end of file
diff --git a/db/schema_migrations/20220712131513 b/db/schema_migrations/20220712131513
deleted file mode 100644
index e16feb4d96c..00000000000
--- a/db/schema_migrations/20220712131513
+++ /dev/null
@@ -1 +0,0 @@
-4ee9f603c04284cbc0fcb6aa47ecc0f0fe238b4d68083a51f5f170edca19608b \ No newline at end of file
diff --git a/db/schema_migrations/20220712131533 b/db/schema_migrations/20220712131533
deleted file mode 100644
index 276b649097e..00000000000
--- a/db/schema_migrations/20220712131533
+++ /dev/null
@@ -1 +0,0 @@
-b4ff0087acba9b91182219ea49a5a7d1bfd5b55391f0174ea62a2bfa14af03ce \ No newline at end of file
diff --git a/db/schema_migrations/20220712144843 b/db/schema_migrations/20220712144843
deleted file mode 100644
index d1bd4fbecc8..00000000000
--- a/db/schema_migrations/20220712144843
+++ /dev/null
@@ -1 +0,0 @@
-2d225c96f4fbc08b2443a1e6c723d2a337ed1e10412323ba816858db03299738 \ No newline at end of file
diff --git a/db/schema_migrations/20220712144900 b/db/schema_migrations/20220712144900
deleted file mode 100644
index e84149e7b76..00000000000
--- a/db/schema_migrations/20220712144900
+++ /dev/null
@@ -1 +0,0 @@
-4e19d3306807b83e4dddd3c7212b662f39c0d852826df1d22fc29c251fa0d1da \ No newline at end of file
diff --git a/db/schema_migrations/20220712175029 b/db/schema_migrations/20220712175029
deleted file mode 100644
index bb7fdca340f..00000000000
--- a/db/schema_migrations/20220712175029
+++ /dev/null
@@ -1 +0,0 @@
-f6638435457f57f5c566e107de4f4557a1d87b5dd27acc9e5345999197d18e6e \ No newline at end of file
diff --git a/db/schema_migrations/20220712181304 b/db/schema_migrations/20220712181304
deleted file mode 100644
index ff111fe7c28..00000000000
--- a/db/schema_migrations/20220712181304
+++ /dev/null
@@ -1 +0,0 @@
-ff9ad44a43be82867da8e0f51e68a2284065cab6b2eb7cf6496108dce1cdd657 \ No newline at end of file
diff --git a/db/schema_migrations/20220713133515 b/db/schema_migrations/20220713133515
deleted file mode 100644
index 8c3b76a5d63..00000000000
--- a/db/schema_migrations/20220713133515
+++ /dev/null
@@ -1 +0,0 @@
-4c0f48149987c821c8666df7a1d9e9780146d356ffb9539572d5a3c77038e237 \ No newline at end of file
diff --git a/db/schema_migrations/20220713175658 b/db/schema_migrations/20220713175658
deleted file mode 100644
index 9b086972336..00000000000
--- a/db/schema_migrations/20220713175658
+++ /dev/null
@@ -1 +0,0 @@
-6bbaa8006a848a65e866c7836d0b0e28e3c303d28b329f5e12f978dd895e868f \ No newline at end of file
diff --git a/db/schema_migrations/20220713175737 b/db/schema_migrations/20220713175737
deleted file mode 100644
index 88f4550ced0..00000000000
--- a/db/schema_migrations/20220713175737
+++ /dev/null
@@ -1 +0,0 @@
-95a535d8f97ec96df918547aff7947acacbdf37fd0d3656878c9c60d80f3fd02 \ No newline at end of file
diff --git a/db/schema_migrations/20220713175812 b/db/schema_migrations/20220713175812
deleted file mode 100644
index 13e0279a11e..00000000000
--- a/db/schema_migrations/20220713175812
+++ /dev/null
@@ -1 +0,0 @@
-41e42a51a0c5b3af8d94edc25e9421a754d6fc517f343bd718b16fd6bfc383f3 \ No newline at end of file
diff --git a/db/schema_migrations/20220714105122 b/db/schema_migrations/20220714105122
deleted file mode 100644
index f3ec5c17af7..00000000000
--- a/db/schema_migrations/20220714105122
+++ /dev/null
@@ -1 +0,0 @@
-c452f7dc9a76b6daa7ced88f2ed93332a84bfcb94a7e94f31149e43b888e210f \ No newline at end of file
diff --git a/db/schema_migrations/20220714122311 b/db/schema_migrations/20220714122311
deleted file mode 100644
index bb7bb022791..00000000000
--- a/db/schema_migrations/20220714122311
+++ /dev/null
@@ -1 +0,0 @@
-6e59a39a5d843b5df3b33edb54c51f08062bff7ab1676b9326bb5aa8da159027 \ No newline at end of file
diff --git a/db/schema_migrations/20220714122418 b/db/schema_migrations/20220714122418
deleted file mode 100644
index a7eeeba0255..00000000000
--- a/db/schema_migrations/20220714122418
+++ /dev/null
@@ -1 +0,0 @@
-efdfa1c6ffb1b5e4de42bbfd87820eb5d1b87883c8b93cb4cb4101ba928f56dd \ No newline at end of file
diff --git a/db/schema_migrations/20220714142424 b/db/schema_migrations/20220714142424
deleted file mode 100644
index 1a7f5e7dcaf..00000000000
--- a/db/schema_migrations/20220714142424
+++ /dev/null
@@ -1 +0,0 @@
-42387b8524845aeb76d8b6584ffa480819f682538ca9578492eed53baa49bc09 \ No newline at end of file
diff --git a/db/schema_migrations/20220715054506 b/db/schema_migrations/20220715054506
deleted file mode 100644
index ad01657f92a..00000000000
--- a/db/schema_migrations/20220715054506
+++ /dev/null
@@ -1 +0,0 @@
-ecd71a6f9c90bd19a28edcd054ce2ef826859e051dd44c9fea875a5c32040a12 \ No newline at end of file
diff --git a/db/schema_migrations/20220715152108 b/db/schema_migrations/20220715152108
deleted file mode 100644
index 23d61b45334..00000000000
--- a/db/schema_migrations/20220715152108
+++ /dev/null
@@ -1 +0,0 @@
-76f4adebfb71dcd51f861097ba441ae5ee3f62eeb2060f147730d4e6c6006402 \ No newline at end of file
diff --git a/db/schema_migrations/20220715160023 b/db/schema_migrations/20220715160023
deleted file mode 100644
index 39a141fb743..00000000000
--- a/db/schema_migrations/20220715160023
+++ /dev/null
@@ -1 +0,0 @@
-3696ff7ea12600702911895c085a85b49e613bc133a580d895fc53cf1f6912a8 \ No newline at end of file
diff --git a/db/schema_migrations/20220715163254 b/db/schema_migrations/20220715163254
deleted file mode 100644
index 71461af7b68..00000000000
--- a/db/schema_migrations/20220715163254
+++ /dev/null
@@ -1 +0,0 @@
-ea8182741ce0b30f2de23041d1f6bafaf6e04a7a7d0f50abcd04462683637596 \ No newline at end of file
diff --git a/db/schema_migrations/20220715185348 b/db/schema_migrations/20220715185348
deleted file mode 100644
index 6df20d578f0..00000000000
--- a/db/schema_migrations/20220715185348
+++ /dev/null
@@ -1 +0,0 @@
-5a8e178601b1b88bef0186269bc62f8e3b10eacb0fe8a9a11e322c244883cfde \ No newline at end of file
diff --git a/db/schema_migrations/20220715185436 b/db/schema_migrations/20220715185436
deleted file mode 100644
index 31f9a069d31..00000000000
--- a/db/schema_migrations/20220715185436
+++ /dev/null
@@ -1 +0,0 @@
-673e77eb5ffa49ab70088a7a43119c5f388d199e69504994c8c0a2a867ee1da3 \ No newline at end of file
diff --git a/db/schema_migrations/20220715190612 b/db/schema_migrations/20220715190612
deleted file mode 100644
index ffafb037b43..00000000000
--- a/db/schema_migrations/20220715190612
+++ /dev/null
@@ -1 +0,0 @@
-bbb07db2554d2b1c7083341efcdc065a3a25ba4b042b0b3ea3cb26ec25e1e023 \ No newline at end of file
diff --git a/db/schema_migrations/20220715191629 b/db/schema_migrations/20220715191629
deleted file mode 100644
index 88874ec93d3..00000000000
--- a/db/schema_migrations/20220715191629
+++ /dev/null
@@ -1 +0,0 @@
-e300a6144e63f734e41b3a3ad40089dea5764ea2636ea11f5782fe86b6574229 \ No newline at end of file
diff --git a/db/schema_migrations/20220718083945 b/db/schema_migrations/20220718083945
deleted file mode 100644
index f1d247e5349..00000000000
--- a/db/schema_migrations/20220718083945
+++ /dev/null
@@ -1 +0,0 @@
-42b601de66244f527b8c40182b7c9c8ba3a6ea9863582be3c499ffe2491c8d4f \ No newline at end of file
diff --git a/db/schema_migrations/20220719081542 b/db/schema_migrations/20220719081542
deleted file mode 100644
index 4bd2a3008ca..00000000000
--- a/db/schema_migrations/20220719081542
+++ /dev/null
@@ -1 +0,0 @@
-2d5bf23684afbd4dbf3251c4886c22eaaa144332901c1183bc474772f065c54f \ No newline at end of file
diff --git a/db/schema_migrations/20220719165537 b/db/schema_migrations/20220719165537
deleted file mode 100644
index f60f26fb705..00000000000
--- a/db/schema_migrations/20220719165537
+++ /dev/null
@@ -1 +0,0 @@
-c9b214fd49c97d17f43faef4d86b811ea2ad5f573c3cb4a6725de8ee4c92262a \ No newline at end of file
diff --git a/db/schema_migrations/20220720090354 b/db/schema_migrations/20220720090354
deleted file mode 100644
index f6a34d452ec..00000000000
--- a/db/schema_migrations/20220720090354
+++ /dev/null
@@ -1 +0,0 @@
-caf9b383524401d5b552d5593aa8ae51d58138759af5aebdec0825818033100d \ No newline at end of file
diff --git a/db/schema_migrations/20220720121421 b/db/schema_migrations/20220720121421
deleted file mode 100644
index da6450068ee..00000000000
--- a/db/schema_migrations/20220720121421
+++ /dev/null
@@ -1 +0,0 @@
-3ccb1e6d2ab41d4d84e0582563c68b0518d57f518d1560b1bacd257a40e14034 \ No newline at end of file
diff --git a/db/schema_migrations/20220720123249 b/db/schema_migrations/20220720123249
deleted file mode 100644
index f29b38f7efe..00000000000
--- a/db/schema_migrations/20220720123249
+++ /dev/null
@@ -1 +0,0 @@
-d64ae3a91253fa497f897e7843c9b86f1dec3ccb6f997c4bbe50aec96699f1d2 \ No newline at end of file
diff --git a/db/schema_migrations/20220720161816 b/db/schema_migrations/20220720161816
deleted file mode 100644
index be1e2809a3f..00000000000
--- a/db/schema_migrations/20220720161816
+++ /dev/null
@@ -1 +0,0 @@
-8933e0dfff73ebef359de9512e8a89d43da37991b03500aac1d1a1ba78d6a4a9 \ No newline at end of file
diff --git a/db/schema_migrations/20220720162123 b/db/schema_migrations/20220720162123
deleted file mode 100644
index 8a4c17468c0..00000000000
--- a/db/schema_migrations/20220720162123
+++ /dev/null
@@ -1 +0,0 @@
-1b8fd9394fefd20a8a0ad281f10b4006063e436e3e41d5651e84b43dccd9c221 \ No newline at end of file
diff --git a/db/schema_migrations/20220720171102 b/db/schema_migrations/20220720171102
deleted file mode 100644
index f041d3d9db3..00000000000
--- a/db/schema_migrations/20220720171102
+++ /dev/null
@@ -1 +0,0 @@
-4daf9a0b571968640c4b6ddfa6dbc2d71ed1632b4dc4d350cd5cab4ae53c8178 \ No newline at end of file
diff --git a/db/schema_migrations/20220720171801 b/db/schema_migrations/20220720171801
deleted file mode 100644
index ada8897b868..00000000000
--- a/db/schema_migrations/20220720171801
+++ /dev/null
@@ -1 +0,0 @@
-161186e3bb37a3c03f7e6ec5f833e86bcc163af33847666006e9a0cf814eb876 \ No newline at end of file
diff --git a/db/schema_migrations/20220720210446 b/db/schema_migrations/20220720210446
deleted file mode 100644
index 143d05d70f3..00000000000
--- a/db/schema_migrations/20220720210446
+++ /dev/null
@@ -1 +0,0 @@
-d9ce6e056d66e6c1fb9dc6ac6340cc74cf2572edefce1a2a2cefe0556ee5db41 \ No newline at end of file
diff --git a/db/schema_migrations/20220721031446 b/db/schema_migrations/20220721031446
deleted file mode 100644
index cb58abdd70c..00000000000
--- a/db/schema_migrations/20220721031446
+++ /dev/null
@@ -1 +0,0 @@
-fb37a812240cd314227b112f1c5f379fece783fddcf922ceafbf2c968c72ab30 \ No newline at end of file
diff --git a/db/schema_migrations/20220721140252 b/db/schema_migrations/20220721140252
deleted file mode 100644
index 9bf2074ccc4..00000000000
--- a/db/schema_migrations/20220721140252
+++ /dev/null
@@ -1 +0,0 @@
-42de6dadaff1c9666f759992488eda01c5327e5c377088ffc703b60fa37b18da \ No newline at end of file
diff --git a/db/schema_migrations/20220722084543 b/db/schema_migrations/20220722084543
deleted file mode 100644
index 44d94a312b8..00000000000
--- a/db/schema_migrations/20220722084543
+++ /dev/null
@@ -1 +0,0 @@
-b189304b940d01a527bba4ad8b0865ae44de1e3af2ef1b711d95993821106b6b \ No newline at end of file
diff --git a/db/schema_migrations/20220722110026 b/db/schema_migrations/20220722110026
deleted file mode 100644
index 56f4699cace..00000000000
--- a/db/schema_migrations/20220722110026
+++ /dev/null
@@ -1 +0,0 @@
-79c7847740cb02fffeaeae55f869889f201b7a9431693bea7249ddff9d405fb4 \ No newline at end of file
diff --git a/db/schema_migrations/20220722123318 b/db/schema_migrations/20220722123318
deleted file mode 100644
index a9b01a68114..00000000000
--- a/db/schema_migrations/20220722123318
+++ /dev/null
@@ -1 +0,0 @@
-71ac60c42a546f65329eb2028d2de1252da01909b866fcc5151b928ee69f26d6 \ No newline at end of file
diff --git a/db/schema_migrations/20220722145845 b/db/schema_migrations/20220722145845
deleted file mode 100644
index 458facc060d..00000000000
--- a/db/schema_migrations/20220722145845
+++ /dev/null
@@ -1 +0,0 @@
-612a9cf3004e4d837749ef522ed72920275c9ddd8570b1a5a5e6ff51b49afd67 \ No newline at end of file
diff --git a/db/schema_migrations/20220722150231 b/db/schema_migrations/20220722150231
deleted file mode 100644
index fb36c04c168..00000000000
--- a/db/schema_migrations/20220722150231
+++ /dev/null
@@ -1 +0,0 @@
-d5fac73cd92e84f49b41aa38e560eed36906e29e7009ff03ef59ebcf9836ee1f \ No newline at end of file
diff --git a/db/schema_migrations/20220722203840 b/db/schema_migrations/20220722203840
deleted file mode 100644
index 0c719b0ce3d..00000000000
--- a/db/schema_migrations/20220722203840
+++ /dev/null
@@ -1 +0,0 @@
-6a3f6ca25cac7f846c2f52388a8898bd05095f0d612bc7d4950e899880e0c8b8 \ No newline at end of file
diff --git a/db/schema_migrations/20220723120039 b/db/schema_migrations/20220723120039
deleted file mode 100644
index 54be61091e3..00000000000
--- a/db/schema_migrations/20220723120039
+++ /dev/null
@@ -1 +0,0 @@
-1a6a488243a8fa564f07301028477d64ca290b4ec636cfaab4816dab8bf3dd3f \ No newline at end of file
diff --git a/db/schema_migrations/20220725150127 b/db/schema_migrations/20220725150127
deleted file mode 100644
index 3cbc80d8883..00000000000
--- a/db/schema_migrations/20220725150127
+++ /dev/null
@@ -1 +0,0 @@
-78563f41df5a49803c59b4e41845c985fd1e5f19b1050998fb78d53a9dfe7a28 \ No newline at end of file
diff --git a/db/schema_migrations/20220726025516 b/db/schema_migrations/20220726025516
deleted file mode 100644
index 58bab5467db..00000000000
--- a/db/schema_migrations/20220726025516
+++ /dev/null
@@ -1 +0,0 @@
-326acd1c7e562056d29d5727869a0d0e5a5e9c387b0f54238c79c89f3947808b \ No newline at end of file
diff --git a/db/schema_migrations/20220726154012 b/db/schema_migrations/20220726154012
deleted file mode 100644
index b3e54480054..00000000000
--- a/db/schema_migrations/20220726154012
+++ /dev/null
@@ -1 +0,0 @@
-6db09c05e52a9397eff77c56ab54886cd5b1ea5235425cbc83f865352dd75706 \ No newline at end of file
diff --git a/db/schema_migrations/20220726154013 b/db/schema_migrations/20220726154013
deleted file mode 100644
index 6ef0bc248bb..00000000000
--- a/db/schema_migrations/20220726154013
+++ /dev/null
@@ -1 +0,0 @@
-e079df21e69a855a3dc6c306e14796dacfabacc97632b859481009808a7ce133 \ No newline at end of file
diff --git a/db/schema_migrations/20220726154014 b/db/schema_migrations/20220726154014
deleted file mode 100644
index 1991af185e8..00000000000
--- a/db/schema_migrations/20220726154014
+++ /dev/null
@@ -1 +0,0 @@
-22c29639048e83f926b5ed2a44a14638fa70cba01f7f11a97f97ec321ae9173c \ No newline at end of file
diff --git a/db/schema_migrations/20220726154015 b/db/schema_migrations/20220726154015
deleted file mode 100644
index 1eb661be563..00000000000
--- a/db/schema_migrations/20220726154015
+++ /dev/null
@@ -1 +0,0 @@
-4c8d8356b977f875540bb931bfe03c811de17223bd76632ba65af53b7e227b08 \ No newline at end of file
diff --git a/db/schema_migrations/20220726154016 b/db/schema_migrations/20220726154016
deleted file mode 100644
index 1df82964d21..00000000000
--- a/db/schema_migrations/20220726154016
+++ /dev/null
@@ -1 +0,0 @@
-87bd0e2a2d0a9a8a45ce177ed847a15d2f015b155a1a47cd8fcf6ea00713b98c \ No newline at end of file
diff --git a/db/schema_migrations/20220726182310 b/db/schema_migrations/20220726182310
deleted file mode 100644
index fd5d282f525..00000000000
--- a/db/schema_migrations/20220726182310
+++ /dev/null
@@ -1 +0,0 @@
-318684106f2976e285b6aaa1a73363badeec083a180a68973ba9d51dd89886c0 \ No newline at end of file
diff --git a/db/schema_migrations/20220726230052 b/db/schema_migrations/20220726230052
deleted file mode 100644
index 985c5989f99..00000000000
--- a/db/schema_migrations/20220726230052
+++ /dev/null
@@ -1 +0,0 @@
-1ca4a1260dee3a034529eeeb8a340a84b9bbc3abf0f853d46f26b6853527bbf0 \ No newline at end of file
diff --git a/db/schema_migrations/20220728114136 b/db/schema_migrations/20220728114136
deleted file mode 100644
index f5bd9962aa3..00000000000
--- a/db/schema_migrations/20220728114136
+++ /dev/null
@@ -1 +0,0 @@
-eb0a6cff006f54f3b5fe12ab566dabfbefa1af46fafbfadde1b292b46e9d17c9 \ No newline at end of file
diff --git a/db/schema_migrations/20220728134255 b/db/schema_migrations/20220728134255
deleted file mode 100644
index f5ab53d70a0..00000000000
--- a/db/schema_migrations/20220728134255
+++ /dev/null
@@ -1 +0,0 @@
-c868a83176c8e0024ef16e0f95d8a16a0f1b7be0c1a5d58902397cc0462a7e34 \ No newline at end of file
diff --git a/db/schema_migrations/20220729033851 b/db/schema_migrations/20220729033851
deleted file mode 100644
index b24c964cdb2..00000000000
--- a/db/schema_migrations/20220729033851
+++ /dev/null
@@ -1 +0,0 @@
-0e8b193943aa02c8b700c06110725fd643378cf79715d1398238abc407639c67 \ No newline at end of file
diff --git a/db/schema_migrations/20220729052031 b/db/schema_migrations/20220729052031
deleted file mode 100644
index 9305fbfade6..00000000000
--- a/db/schema_migrations/20220729052031
+++ /dev/null
@@ -1 +0,0 @@
-504d33abb6bb9f8b53f33872715ce9839bd7264ef00618d033adf4d8899190b2 \ No newline at end of file
diff --git a/db/schema_migrations/20220729073603 b/db/schema_migrations/20220729073603
deleted file mode 100644
index eb69bd1ce51..00000000000
--- a/db/schema_migrations/20220729073603
+++ /dev/null
@@ -1 +0,0 @@
-b0499c9b4cf3f39eec49dc7def7eaf8f1bbd03f2a34ba9eefa8440a109672136 \ No newline at end of file
diff --git a/db/schema_migrations/20220801144713 b/db/schema_migrations/20220801144713
deleted file mode 100644
index 764c53e212a..00000000000
--- a/db/schema_migrations/20220801144713
+++ /dev/null
@@ -1 +0,0 @@
-a332483a18eb46c1c4ce0d93b4269d630978a8c93e307f22ec5b412f3fa8f355 \ No newline at end of file
diff --git a/db/schema_migrations/20220801150028 b/db/schema_migrations/20220801150028
deleted file mode 100644
index c6d12f6a70d..00000000000
--- a/db/schema_migrations/20220801150028
+++ /dev/null
@@ -1 +0,0 @@
-6515dbfcf8bc32c25e0547ea21af95c1dc2e89e3571abdef0e43e5289cd71c2c \ No newline at end of file
diff --git a/db/schema_migrations/20220802112102 b/db/schema_migrations/20220802112102
deleted file mode 100644
index b37b29b5800..00000000000
--- a/db/schema_migrations/20220802112102
+++ /dev/null
@@ -1 +0,0 @@
-e5728437ae659e14906f5c0c36eea80d66e1ca056b037934b24d5a3f5489d8b7 \ No newline at end of file
diff --git a/db/schema_migrations/20220802114351 b/db/schema_migrations/20220802114351
deleted file mode 100644
index e371419c392..00000000000
--- a/db/schema_migrations/20220802114351
+++ /dev/null
@@ -1 +0,0 @@
-c314412f0c5d4ad9447671a8e03e94af1a1b79718479769f763e20a689ce7d2f \ No newline at end of file
diff --git a/db/schema_migrations/20220802132158 b/db/schema_migrations/20220802132158
deleted file mode 100644
index 06d7e747f30..00000000000
--- a/db/schema_migrations/20220802132158
+++ /dev/null
@@ -1 +0,0 @@
-5aeb871227aa1a4c6c08c0e394d7b6324fe55ff6513e83668cf413c569b0b30f \ No newline at end of file
diff --git a/db/schema_migrations/20220802154757 b/db/schema_migrations/20220802154757
deleted file mode 100644
index a92f69e31da..00000000000
--- a/db/schema_migrations/20220802154757
+++ /dev/null
@@ -1 +0,0 @@
-17d0f47b4663fdbcba617a456f713ebfe3782318abc7e46dc4a8e69bc76cf16f \ No newline at end of file
diff --git a/db/schema_migrations/20220802204737 b/db/schema_migrations/20220802204737
deleted file mode 100644
index faf1e6b89ba..00000000000
--- a/db/schema_migrations/20220802204737
+++ /dev/null
@@ -1 +0,0 @@
-4de7fddbc2f44cf1450af25bd55a5f2586c3daf79b1443ec26ba9d47002707d7 \ No newline at end of file
diff --git a/db/schema_migrations/20220803042351 b/db/schema_migrations/20220803042351
deleted file mode 100644
index 1b35b709eaf..00000000000
--- a/db/schema_migrations/20220803042351
+++ /dev/null
@@ -1 +0,0 @@
-50c58b03d92451753cbdcb2e820e7d1ca9644f914027db46b57d2206e7832ec7 \ No newline at end of file
diff --git a/db/schema_migrations/20220803042352 b/db/schema_migrations/20220803042352
deleted file mode 100644
index 011051cd5e4..00000000000
--- a/db/schema_migrations/20220803042352
+++ /dev/null
@@ -1 +0,0 @@
-03d95257a9169a33a90baf28a6737f68fb999f920450a1cb90732820490be1c4 \ No newline at end of file
diff --git a/db/schema_migrations/20220803145637 b/db/schema_migrations/20220803145637
deleted file mode 100644
index 36688f97184..00000000000
--- a/db/schema_migrations/20220803145637
+++ /dev/null
@@ -1 +0,0 @@
-bf12037cb99a399302610f948dad48589eca4e631d82d9f26b04bae882b10020 \ No newline at end of file
diff --git a/db/schema_migrations/20220803154543 b/db/schema_migrations/20220803154543
deleted file mode 100644
index f5cfb3d91ba..00000000000
--- a/db/schema_migrations/20220803154543
+++ /dev/null
@@ -1 +0,0 @@
-047147acc972ab8681f097d5060998a47e44612fde7f2137714683bd61350c2d \ No newline at end of file
diff --git a/db/schema_migrations/20220803154758 b/db/schema_migrations/20220803154758
deleted file mode 100644
index 71ac8b4f301..00000000000
--- a/db/schema_migrations/20220803154758
+++ /dev/null
@@ -1 +0,0 @@
-2cdf4c4fe218a5fb7061bf65643868c7b592cd3ef0d7611949e8fd86bc635c24 \ No newline at end of file
diff --git a/db/schema_migrations/20220804235614 b/db/schema_migrations/20220804235614
deleted file mode 100644
index 29d78297b22..00000000000
--- a/db/schema_migrations/20220804235614
+++ /dev/null
@@ -1 +0,0 @@
-699f3b81d8694e30161ce3cc58c50f6e638e89c784df9e174ba87636d49a4fc9 \ No newline at end of file
diff --git a/db/schema_migrations/20220805001210 b/db/schema_migrations/20220805001210
deleted file mode 100644
index c13eddc30ea..00000000000
--- a/db/schema_migrations/20220805001210
+++ /dev/null
@@ -1 +0,0 @@
-8863596a3b18497d6f995291953afa5a0ec9c0f7d76a98758add72c8859078b5 \ No newline at end of file
diff --git a/db/schema_migrations/20220805154101 b/db/schema_migrations/20220805154101
deleted file mode 100644
index 2f443da6760..00000000000
--- a/db/schema_migrations/20220805154101
+++ /dev/null
@@ -1 +0,0 @@
-6b6cb1cd97434e8d172257f9ef404ed31d07fb2b9a5e27a5bc0a9cf9a175b066 \ No newline at end of file
diff --git a/db/schema_migrations/20220808072054 b/db/schema_migrations/20220808072054
deleted file mode 100644
index 93ef145ba92..00000000000
--- a/db/schema_migrations/20220808072054
+++ /dev/null
@@ -1 +0,0 @@
-5e489655875408b2879f44f006b420a62554e6523ca687cfa64485e0123fc25c \ No newline at end of file
diff --git a/db/schema_migrations/20220808131659 b/db/schema_migrations/20220808131659
deleted file mode 100644
index 65a08ad1b7a..00000000000
--- a/db/schema_migrations/20220808131659
+++ /dev/null
@@ -1 +0,0 @@
-07488e8c6ea0f3dc92e1370efb0190facf520b850e170fcd8f3ce0e2a15c096a \ No newline at end of file
diff --git a/db/schema_migrations/20220808133824 b/db/schema_migrations/20220808133824
deleted file mode 100644
index bf7755d3163..00000000000
--- a/db/schema_migrations/20220808133824
+++ /dev/null
@@ -1 +0,0 @@
-bab4f4d3aaedd698400fcbd5991797530450fe845a8034b03b1bf525a61e628a \ No newline at end of file
diff --git a/db/schema_migrations/20220808190124 b/db/schema_migrations/20220808190124
deleted file mode 100644
index 99b7173cbb6..00000000000
--- a/db/schema_migrations/20220808190124
+++ /dev/null
@@ -1 +0,0 @@
-ab8dfd7549b2b61a5cf9d5b46935ec534ea77ec2025fdb58d03f654d81c8f6ee \ No newline at end of file
diff --git a/db/schema_migrations/20220808194857 b/db/schema_migrations/20220808194857
deleted file mode 100644
index 10a35a98cb2..00000000000
--- a/db/schema_migrations/20220808194857
+++ /dev/null
@@ -1 +0,0 @@
-12e5d5c0cb73c8c2fdde4f640a57ab9c70d2e41382bd6eb2e2d36c1018f299ef \ No newline at end of file
diff --git a/db/schema_migrations/20220810093742 b/db/schema_migrations/20220810093742
deleted file mode 100644
index 27b700c9031..00000000000
--- a/db/schema_migrations/20220810093742
+++ /dev/null
@@ -1 +0,0 @@
-ebe256fcaccd70055b08e0f5cedfffc039bcacddbf5722135ee47cb02d3babb8 \ No newline at end of file
diff --git a/db/schema_migrations/20220811092243 b/db/schema_migrations/20220811092243
deleted file mode 100644
index 6640e5f1a65..00000000000
--- a/db/schema_migrations/20220811092243
+++ /dev/null
@@ -1 +0,0 @@
-211eda22a78d14aaaf86345d3e33b852ba22a7dc9e41d9d683d58f162a7bdcc7 \ No newline at end of file
diff --git a/db/schema_migrations/20220811092244 b/db/schema_migrations/20220811092244
deleted file mode 100644
index 824d936a09c..00000000000
--- a/db/schema_migrations/20220811092244
+++ /dev/null
@@ -1 +0,0 @@
-f871847fbd494e31f13cf2fb87a1b8e9fc47c44e7f0ec9cf37f2084d19b9bf5f \ No newline at end of file
diff --git a/db/schema_migrations/20220811092245 b/db/schema_migrations/20220811092245
deleted file mode 100644
index 09bd431d928..00000000000
--- a/db/schema_migrations/20220811092245
+++ /dev/null
@@ -1 +0,0 @@
-0c856ce8170e4b864578f1bcb89d8930d8c1952e92356965a98e057521456968 \ No newline at end of file
diff --git a/db/schema_migrations/20220811092246 b/db/schema_migrations/20220811092246
deleted file mode 100644
index 64d3153b833..00000000000
--- a/db/schema_migrations/20220811092246
+++ /dev/null
@@ -1 +0,0 @@
-17bcb2fddd6331cbcec505e8094d1a400b7c3fd8b18897697aa9868689147cd7 \ No newline at end of file
diff --git a/db/schema_migrations/20220811092251 b/db/schema_migrations/20220811092251
deleted file mode 100644
index 61e2afaa74a..00000000000
--- a/db/schema_migrations/20220811092251
+++ /dev/null
@@ -1 +0,0 @@
-4ea4bc7e6f88561553b19c7bf4992561772506cf532cf569241a536f69e19b7f \ No newline at end of file
diff --git a/db/schema_migrations/20220811092253 b/db/schema_migrations/20220811092253
deleted file mode 100644
index fc8ad6918e9..00000000000
--- a/db/schema_migrations/20220811092253
+++ /dev/null
@@ -1 +0,0 @@
-6a6eed069e051786a925b40469e7b53a563f99f0c6bfb810058511d3de8b0923 \ No newline at end of file
diff --git a/db/schema_migrations/20231031192803 b/db/schema_migrations/20231031192803
new file mode 100644
index 00000000000..75b993550e4
--- /dev/null
+++ b/db/schema_migrations/20231031192803
@@ -0,0 +1 @@
+7144726d7a3f633d5ab7bae68072b2085eb953a68de87f00b62df8a83e384a8d \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 01eeff3dfa6..efd6fbfae1c 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -18546,7 +18546,7 @@ ALTER SEQUENCE loose_foreign_keys_deleted_records_id_seq OWNED BY loose_foreign_
CREATE TABLE member_roles (
id bigint NOT NULL,
- namespace_id bigint NOT NULL,
+ namespace_id bigint,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
base_access_level integer NOT NULL,
diff --git a/doc/architecture/blueprints/secret_detection/decisions/001_use_ruby_push_check_approach_within_monolith.md b/doc/architecture/blueprints/secret_detection/decisions/001_use_ruby_push_check_approach_within_monolith.md
new file mode 100644
index 00000000000..c81e6748e70
--- /dev/null
+++ b/doc/architecture/blueprints/secret_detection/decisions/001_use_ruby_push_check_approach_within_monolith.md
@@ -0,0 +1,32 @@
+---
+owning-stage: "~devops::secure"
+description: "GitLab Secret Detection ADR 001: Use Ruby Push Check approach within monolith"
+---
+
+# GitLab Secret Detection ADR 001: Use Ruby Push Check approach within monolith
+
+## Context
+
+There are a number of concerns around the performance of secret detection using a regex-based approach at scale. The primary considerations include transfer latency between nodes and both CPU and memory bloat. These concerns manifested in two ways: the language to be used for performing regex matching and the deployment architecture.
+
+The original discussion in [the exploration issue](https://gitlab.com/gitlab-org/gitlab/-/issues/428499) covers many of these concerns and background.
+
+### Implementation language
+
+The two primary languages considered were Ruby and Go.
+
+The choice to use other languages (such as C++) for implementation was discarded in favour of Ruby and Go due to team familiarity, speed of deployment, and portability. See [this benchmarking issue](https://gitlab.com/gitlab-org/gitlab/-/issues/423832) for performance comparisons between the two.
+
+### Deployment architecture
+
+Several options were considered for deployments: directly embedding the logic within the Rails monolith's Push Check execution path, placement as a sidecar within a Rails node deployment, placement as a sidecar within a Gitaly node as a [server-side hook](../../../../administration/server_hooks.md), and deployment as a standalone service.
+
+## Decision
+
+For the initial iteration around blocking push events using a prereceive integration, the decision was made to proceed with Ruby-based approach, leveraging `re2` for performant regex processing. Additionally, the decision was made to integrate the logic directly into the monolith rather than as a discrete service or server-side hook within Gitaly.
+
+A Gitaly server-side hook would have performance benefits around minimal transfer latency for Git blobs between scanning service and Gitaly blob storage. However, an extra request would be needed between Gitaly and the Rails application to contextualize the scan. Additionally, the current hook architecture is [discouraged and work is planned to migrate towards a new plugin architecture in the near future](https://gitlab.com/gitlab-org/gitaly/-/issues/5642).
+
+The Ruby Push Check approach follows a clear execution plan to achieve delivery by anticipated timeline and is more closely aligned with the long-term direction of platform-wide scanning. For example, future scanning of issuables will require execution within the trust boundary of the Rails application rather than Gitaly context. This approach, however, has raised concerns around elevated memory usage within the Rails application leading to availability concerns. This direction may also require migrating towards Gitaly's new plugin architecture in the future once the timeline is known.
+
+A standalone service may be considered in the future but requires considerations of a technical approach that should be better informed by data gathered during [pre-production profiling](https://gitlab.com/gitlab-org/gitlab/-/issues/428499).
diff --git a/doc/architecture/blueprints/secret_detection/index.md b/doc/architecture/blueprints/secret_detection/index.md
index 76bf6dd4088..fb77fffee40 100644
--- a/doc/architecture/blueprints/secret_detection/index.md
+++ b/doc/architecture/blueprints/secret_detection/index.md
@@ -61,10 +61,47 @@ As a long-term priority we should consider unifying the management of the two
secret types however that work is out of scope for the current blueprints goals,
which remain focused on active detection.
+### Target types
+
+Target object types refer to the scanning targets prioritized for detection of leaked secrets.
+
+In order of priority this includes:
+
+1. non-binary Git blobs
+1. job logs
+1. issuable creation (issues, MRs, epics)
+1. issuable updates (issues, MRs, epics)
+1. issuable comments (issues, MRs, epics)
+
+Targets out of scope for the initial phases include:
+
+- Media types (JPEG, PDF, ...)
+- Snippets
+- Wikis
+- Container images
+
+### Token types
+
+The existing Secret Detection configuration covers ~100 rules across a variety
+of platforms. To reduce total cost of execution and likelihood of false positives
+the dedicated service targets only well-defined tokens. A well-defined token is
+defined as a token with a precise definition, most often a fixed substring prefix or
+suffix and fixed length.
+
+Token types to identify in order of importance:
+
+1. Well-defined GitLab tokens (including Personal Access Tokens and Pipeline Trigger Tokens)
+1. Verified Partner tokens (including AWS)
+1. Remainder tokens currently included in Secret Detection CI configuration
+
## Proposal
+### Decisions
+
+- [001: Use Ruby Push Check approach within monolith](decisions/001_use_ruby_push_check_approach_within_monolith.md)
+
The first iteration of the experimental capability will feature a blocking
-pre-receive hook implemented within the Rails application. This iteration
+pre-receive hook implemented in the Rails application. This iteration
will be released in an experimental state to select users and provide
opportunity for the team to profile the capability before considering extraction
into a dedicated service.
@@ -89,10 +126,41 @@ as self-managed instances.
- Performance of scanning against volume of domain objects (such as push frequency)
- Queueing of scan requests
+### Transfer optimizations for large Git data blobs
+
+As described in [Gitaly's upload-pack traffic blueprint](../gitaly_handle_upload_pack_in_http2_server/index.md#git-data-transfer-optimization-with-sidechannel), we have faced problems in the past handling large data transfers over gRPC. This could be a concern as we expand secret detection to large blob sizes to increase coverage over leaked secrets. We expect to rollout pre-receive scanning with a 1 megabyte blob size limit which should be well within boundaries. From [Protobuffers' documentation](https://protobuf.dev/programming-guides/techniques/#large-data):
+
+> As a general rule of thumb, if you are dealing in messages larger than a megabyte each, it may be time to consider an alternate strategy.
+
+In expansion phases we must explore chunking or alternative strategies like the optimized sidechannel approach used by Gitaly.
+
## Design and implementation details
+The implementation of the secret scanning service is highly dependent on the outcomes of our benchmarking
+and capacity planning against both GitLab.com and our
+[Reference Architectures](../../../administration/reference_architectures/index.md).
+As the scanning capability must be an on-by-default component of both our SaaS and self-managed
+instances [the PoC](#iterations), the deployment characteristics must be considered to determine whether
+this is a standalone component or executed as a subprocess of the existing Sidekiq worker fleet
+(similar to the implementation of our Elasticsearch indexing service).
+
+Similarly, the scan target volume will require a robust and scalable enqueueing system to limit resource consumption.
+
+The detection capability relies on a multiphase rollout, from an experimental component implemented directly in the monolith to a standalone service capable of scanning text blobs generically.
+
+See [technical discovery](https://gitlab.com/gitlab-org/gitlab/-/issues/376716)
+for further background exploration.
+
+See [this thread](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/105142#note_1194863310)
+for past discussion around scaling approaches.
+
+### Phase 1 - Ruby pushcheck pre-receive integration
+
The critical paths as outlined under [goals above](#goals) cover two major object
-types: Git blobs (corresponding to push events) and arbitrary text blobs.
+types: Git text blobs (corresponding to push events) and arbitrary text blobs. In Phase 1,
+we focus entirely on Git text blobs.
+
+This phase will be considered "Experimental" with limited availability for customer opt-in, through instance level application settings.
The detection flow for push events relies on subscribing to the PreReceive hook
to scan commit data using the [PushCheck interface](https://gitlab.com/gitlab-org/gitlab/blob/3f1653f5706cd0e7bbd60ed7155010c0a32c681d/lib/gitlab/checks/push_check.rb). This `SecretScanningService`
@@ -100,6 +168,185 @@ service fetches the specified blob contents from Gitaly, scans
the commit contents, and rejects the push when a secret is detected.
See [Push event detection flow](#push-event-detection-flow) for sequence.
+In the case of a push detection, the commit is rejected inline and error returned to the end user.
+
+#### High-Level Architecture
+
+The Phase 1 architecture involves no additional components and is entirely encapsulated in the Rails application server. This provides a rapid deployment with tight integration within auth boundaries and no distribution coordination.
+
+The primary drawback relies on resource utilization, adding additional CPU, memory, transfer volume, and request latency to existing application nodes.
+
+```plantuml
+@startuml Phase2
+skinparam linetype ortho
+
+card "**External Load Balancer**" as elb #6a9be7
+
+together {
+ card "**GitLab Rails**" as gitlab #32CD32
+ card "**Gitaly**" as gitaly #FF8C00
+ card "**PostgreSQL**" as postgres #4EA7FF
+ card "**Redis**" as redis #FF6347
+ card "**Sidekiq**" as sidekiq #ff8dd1
+}
+}
+
+gitlab -[#32CD32]--> gitaly
+gitlab -[#32CD32]--> postgres
+gitlab -[#32CD32]--> redis
+gitlab -[#32CD32]--> sidekiq
+
+elb -[#6a9be7]-> gitlab
+
+gitlab .[#32CD32]----> postgres
+sidekiq .[#ff8dd1]----> postgres
+
+@enduml
+```
+
+#### Push event detection flow
+
+```mermaid
+sequenceDiagram
+ autonumber
+ actor User
+ User->>+Workhorse: git push with-secret
+ Workhorse->>+Gitaly: tcp
+ Gitaly->>+Rails: PreReceive
+ Rails->>-Gitaly: ListAllBlobs
+ Gitaly->>-Rails: ListAllBlobsResponse
+
+ Rails->>+GitLabSecretDetection: Scan(blob)
+ GitLabSecretDetection->>-Rails: found
+
+ Rails->>User: rejected: secret found
+
+ User->>+Workhorse: git push without-secret
+ Workhorse->>+Gitaly: tcp
+ Gitaly->>+Rails: PreReceive
+ Rails->>-Gitaly: ListAllBlobs
+ Gitaly->>-Rails: ListAllBlobsResponse
+
+ Rails->>+GitLabSecretDetection: Scan(blob)
+ GitLabSecretDetection->>-Rails: not_found
+
+ Rails->>User: accepted
+```
+
+### Phase 2 - Standalone pre-receive service
+
+The critical paths as outlined under [goals above](#goals) cover two major object
+types: Git text blobs (corresponding to push events) and arbitrary text blobs. In Phase 2,
+we focus entirely on Git text blobs.
+
+This phase emphasizes scaling the service outside of the monolith for general availability and to allow
+an on-by-default behavior. The architecture is adapted to provide an isolated and independently
+scalable service outside of the Rails monolith.
+
+In the case of a push detection, the commit is rejected inline and error returned to the end user.
+
+#### High-Level Architecture
+
+The Phase 2 architecture involves extracting the secret detection logic into a standalone service
+which communicates directly with both the Rails application and Gitaly. This provides a means to scale
+the secret detection nodes independently, and reduce resource usage overhead on the rails application.
+
+Scans still runs synchronously as a (potentially) blocking pre-receive transaction.
+
+Note that the node count is purely illustrative, but serves to emphasize the independent scaling requirements for the scanning service.
+
+```plantuml
+
+@startuml Phase2
+skinparam linetype ortho
+
+card "**External Load Balancer**" as elb #6a9be7
+card "**Internal Load Balancer**" as ilb #9370DB
+
+together {
+ collections "**GitLab Rails** x3" as gitlab #32CD32
+ collections "**Sidekiq** x3" as sidekiq #ff8dd1
+}
+
+together {
+ collections "**Consul** x3" as consul #e76a9b
+}
+
+card "SecretScanningService Cluster" as prsd_cluster {
+ collections "**SecretScanningService** x5" as prsd #FF8C00
+}
+
+card "Gitaly Cluster" as gitaly_cluster {
+ collections "**Gitaly** x3" as gitaly #FF8C00
+}
+
+card "Database" as database {
+ collections "**PGBouncer** x3" as pgbouncer #4EA7FF
+}
+
+elb -[#6a9be7]-> gitlab
+
+gitlab -[#32CD32,norank]--> ilb
+gitlab .[#32CD32]----> database
+gitlab -[hidden]-> consul
+
+sidekiq -[#ff8dd1,norank]--> ilb
+sidekiq .[#ff8dd1]----> database
+sidekiq -[hidden]-> consul
+
+ilb -[#9370DB]--> prsd_cluster
+ilb -[#9370DB]--> gitaly_cluster
+ilb -[#9370DB]--> database
+ilb -[hidden]u-> consul
+
+consul .[#e76a9b]u-> gitlab
+consul .[#e76a9b]u-> sidekiq
+consul .[#e76a9b]-> database
+consul .[#e76a9b]-> gitaly_cluster
+consul .[#e76a9b]-> prsd_cluster
+
+@enduml
+```
+
+#### Push event detection flow
+
+```mermaid
+sequenceDiagram
+ autonumber
+ actor User
+ User->>+Workhorse: git push with-secret
+ Workhorse->>+Gitaly: tcp
+ Gitaly->>+GitLabSecretDetection: PreReceive
+ GitLabSecretDetection->>-Gitaly: ListAllBlobs
+ Gitaly->>-GitLabSecretDetection: ListAllBlobsResponse
+
+ Gitaly->>+GitLabSecretDetection: PreReceive
+
+ GitLabSecretDetection->>GitLabSecretDetection: Scan(blob)
+ GitLabSecretDetection->>-Gitaly: found
+
+ Gitaly->>+Rails: PreReceive
+
+ Rails->>User: rejected: secret found
+
+ User->>+Workhorse: git push without-secret
+ Workhorse->>+Gitaly: tcp
+ Gitaly->>+GitLabSecretDetection: PreReceive
+ GitLabSecretDetection->>-Gitaly: ListAllBlobs
+ Gitaly->>-GitLabSecretDetection: ListAllBlobsResponse
+
+ Gitaly->>+GitLabSecretDetection: PreReceive
+
+ GitLabSecretDetection->>GitLabSecretDetection: Scan(blob)
+ GitLabSecretDetection->>-Gitaly: not_found
+
+ Gitaly->>+Rails: PreReceive
+
+ Rails->>User: accepted
+```
+
+### Phase 3 - Expansion beyond pre-
+
The detection flow for arbitrary text blobs, such as issue comments, relies on
subscribing to `Notes::PostProcessService` (or equivalent service) to enqueue
Sidekiq requests to the `SecretScanningService` to process the text blob by object type
@@ -117,8 +364,44 @@ In any other case of detection, the Rails application manually creates a vulnera
using the `Vulnerabilities::ManuallyCreateService` to surface the finding in the
existing Vulnerability Management UI.
-See [technical discovery](https://gitlab.com/gitlab-org/gitlab/-/issues/376716)
-for further background exploration.
+#### Architecture
+
+There is no change to the architecture defined in Phase 2, however the individual load requirements may require scaling up the node counts for the detection service.
+
+#### Detection flow
+
+There is no change to the push event detection flow defined in Phase 2, however the added capability to scan
+arbitary text blobs directly from Rails allows us to emulate a pre-receive behavior for issuable creations,
+as well (see [target types](#target-types) for priority object types).
+
+```mermaid
+sequenceDiagram
+ autonumber
+ actor User
+ User->>+Workhorse: git push with-secret
+ Workhorse->>+Gitaly: tcp
+ Gitaly->>+GitLabSecretDetection: PreReceive
+ GitLabSecretDetection->>-Gitaly: ListAllBlobs
+ Gitaly->>-GitLabSecretDetection: ListAllBlobsResponse
+
+ Gitaly->>+GitLabSecretDetection: PreReceive
+
+ GitLabSecretDetection->>GitLabSecretDetection: Scan(blob)
+ GitLabSecretDetection->>-Gitaly: found
+
+ Gitaly->>+Rails: PreReceive
+
+ Rails->>User: rejected: secret found
+
+ User->>+Workhorse: POST issuable with-secret
+ Workhorse->>+Rails: tcp
+ Rails->>+GitLabSecretDetection: PreReceive
+
+ GitLabSecretDetection->>GitLabSecretDetection: Scan(blob)
+ GitLabSecretDetection->>-Rails: found
+
+ Rails->>User: rejected: secret found
+```
### Target types
@@ -151,7 +434,7 @@ Token types to identify in order of importance:
1. Well-defined GitLab tokens (including Personal Access Tokens and Pipeline Trigger Tokens)
1. Verified Partner tokens (including AWS)
-1. Remainder tokens currently included in Secret Detection CI configuration
+1. Remainder tokens included in Secret Detection CI configuration
### Detection engine
@@ -160,57 +443,13 @@ for all secret scanning in pipeline contexts. By using its `--no-git` configurat
we can scan arbitrary text blobs outside of a repository context and continue to
use it for non-pipeline scanning.
-In the case of PreReceive detection, we rely on a combination of keyword/substring matches
+In the case of pre-receive detection, we rely on a combination of keyword/substring matches
for pre-filtering and `re2` for regex detections. See [spike issue](https://gitlab.com/gitlab-org/gitlab/-/issues/423832) for initial benchmarks
Changes to the detection engine are out of scope until benchmarking unveils performance concerns.
Notable alternatives include high-performance regex engines such as [Hyperscan](https://github.com/intel/hyperscan) or it's portable fork [Vectorscan](https://github.com/VectorCamp/vectorscan).
-### High-level architecture
-
-The implementation of the secret scanning service is highly dependent on the outcomes of our benchmarking
-and capacity planning against both GitLab.com and our
-[Reference Architectures](../../../administration/reference_architectures/index.md).
-As the scanning capability must be an on-by-default component of both our SaaS and self-managed
-instances [the PoC](#iterations), the deployment characteristics must be considered to determine whether
-this is a standalone component or executed as a subprocess of the existing Sidekiq worker fleet
-(similar to the implementation of our Elasticsearch indexing service).
-
-Similarly, the scan target volume will require a robust and scalable enqueueing system to limit resource consumption.
-
-See [this thread](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/105142#note_1194863310)
-for past discussion around scaling approaches.
-
-### Push event detection flow
-
-```mermaid
-sequenceDiagram
- autonumber
- actor User
- User->>+Workhorse: git push with-secret
- Workhorse->>+Gitaly: tcp
- Gitaly->>+Rails: PreReceive
- Rails->>-Gitaly: ListAllBlobs
- Gitaly->>-Rails: ListAllBlobsResponse
-
- Rails->>+GitLabSecretDetection: Scan(blob)
- GitLabSecretDetection->>-Rails: found
-
- Rails->>User: rejected: secret found
-
- User->>+Workhorse: git push without-secret
- Workhorse->>+Gitaly: tcp
- Gitaly->>+Rails: PreReceive
- Rails->>-Gitaly: ListAllBlobs
- Gitaly->>-Rails: ListAllBlobsResponse
-
- Rails->>+GitLabSecretDetection: Scan(blob)
- GitLabSecretDetection->>-Rails: not_found
-
- Rails->>User: OK
-```
-
## Iterations
- ✓ Define [requirements for detection coverage and actions](https://gitlab.com/gitlab-org/gitlab/-/issues/376716)
diff --git a/doc/integration/oauth_provider.md b/doc/integration/oauth_provider.md
index c4792d1dc28..67a453f7109 100644
--- a/doc/integration/oauth_provider.md
+++ b/doc/integration/oauth_provider.md
@@ -99,7 +99,7 @@ different actions. See the following table for all available scopes.
| Scope | Description |
|--------------------| ----------- |
-| `api` | Grants complete read/write access to the API, including all groups and projects, the container registry, and the package registry. |
+| `api` | Grants complete read/write access to the API, including all groups and projects, the container registry, the dependency proxy, and the package registry. |
| `read_user` | Grants read-only access to the authenticated user's profile through the /user API endpoint, which includes username, public email, and full name. Also grants access to read-only API endpoints under /users. |
| `read_api` | Grants read access to the API, including all groups and projects, the container registry, and the package registry. |
| `read_repository` | Grants read-only access to repositories on private projects using Git-over-HTTP or the Repository Files API. |
diff --git a/doc/user/group/settings/group_access_tokens.md b/doc/user/group/settings/group_access_tokens.md
index 842b7bc4d17..880af5786bc 100644
--- a/doc/user/group/settings/group_access_tokens.md
+++ b/doc/user/group/settings/group_access_tokens.md
@@ -143,17 +143,17 @@ token.revoke!
The scope determines the actions you can perform when you authenticate with a group access token.
-| Scope | Description |
-|:-------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| `api` | Grants complete read and write access to the scoped group and related project API, including the [package registry](../../packages/package_registry/index.md). |
-| `read_api` | Grants read access to the scoped group and related project API, including the [package registry](../../packages/package_registry/index.md). |
-| `read_registry` | Grants read access (pull) to the [container registry](../../packages/container_registry/index.md) images if any project within a group is private and authorization is required. |
-| `write_registry` | Grants write access (push) to the [container registry](../../packages/container_registry/index.md). |
-| `read_repository` | Grants read access (pull) to all repositories within a group. |
-| `write_repository` | Grants read and write access (pull and push) to all repositories within a group. |
-| `create_runner` | Grants permission to create runners in a group. |
-| `ai_features` | Grants permission to perform API actions for GitLab Duo. |
-| `k8s_proxy` | Grants permission to perform Kubernetes API calls using the agent for Kubernetes in a group. |
+| Scope | Description |
+|:-------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `api` | Grants complete read and write access to the scoped group and related project API, including the [container registry](../../packages/container_registry/index.md), the [dependency proxy](../../packages/dependency_proxy/index.md), and the [package registry](../../packages/package_registry/index.md). |
+| `read_api` | Grants read access to the scoped group and related project API, including the [package registry](../../packages/package_registry/index.md). |
+| `read_registry` | Grants read access (pull) to the [container registry](../../packages/container_registry/index.md) images if any project within a group is private and authorization is required. |
+| `write_registry` | Grants write access (push) to the [container registry](../../packages/container_registry/index.md). |
+| `read_repository` | Grants read access (pull) to all repositories within a group. |
+| `write_repository` | Grants read and write access (pull and push) to all repositories within a group. |
+| `create_runner` | Grants permission to create runners in a group. |
+| `ai_features` | Grants permission to perform API actions for GitLab Duo. |
+| `k8s_proxy` | Grants permission to perform Kubernetes API calls using the agent for Kubernetes in a group. |
## Enable or disable group access token creation
diff --git a/doc/user/packages/dependency_proxy/index.md b/doc/user/packages/dependency_proxy/index.md
index 02810bcb922..df348b012fb 100644
--- a/doc/user/packages/dependency_proxy/index.md
+++ b/doc/user/packages/dependency_proxy/index.md
@@ -86,9 +86,9 @@ docker login gitlab.example.com --username my_username --password my_password
You can authenticate using:
- Your GitLab username and password.
-- A [personal access token](../../../user/profile/personal_access_tokens.md) with the scope set to `read_registry` and `write_registry`.
+- A [personal access token](../../../user/profile/personal_access_tokens.md) with the scope set to `read_registry` and `write_registry`, or to `api`.
- A [group deploy token](../../../user/project/deploy_tokens/index.md) with the scope set to `read_registry` and `write_registry`.
-- A [group access token](../../../user/group/settings/group_access_tokens.md) for the group, with the scope set to `read_registry` and `write_registry`.
+- A [group access token](../../../user/group/settings/group_access_tokens.md) for the group, with the scope set to `read_registry` and `write_registry`, or to `api`.
Users accessing the Dependency Proxy with a personal access token or username and password must
have at least the Guest role for the group they pull images from.
diff --git a/doc/user/profile/personal_access_tokens.md b/doc/user/profile/personal_access_tokens.md
index 1cadb284058..507d4e144a0 100644
--- a/doc/user/profile/personal_access_tokens.md
+++ b/doc/user/profile/personal_access_tokens.md
@@ -112,20 +112,20 @@ To view the last time a token was used:
A personal access token can perform actions based on the assigned scopes.
-| Scope | Access |
-|--------------------|--------|
-| `api` | Grants complete read/write access to the API, including all groups and projects, the container registry, and the package registry. |
-| `read_user` | Grants read-only access to the authenticated user's profile through the `/user` API endpoint, which includes username, public email, and full name. Also grants access to read-only API endpoints under [`/users`](../../api/users.md). |
-| `read_api` | Grants read access to the API, including all groups and projects, the container registry, and the package registry. ([Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/28944) in GitLab 12.10.) |
-| `read_repository` | Grants read-only access to repositories on private projects using Git-over-HTTP or the Repository Files API. |
-| `write_repository` | Grants read-write access to repositories on private projects using Git-over-HTTP (not using the API). |
-| `read_registry` | Grants read-only (pull) access to [container registry](../packages/container_registry/index.md) images if a project is private and authorization is required. Available only when the container registry is enabled. |
+| Scope | Access |
+|--------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `api` | Grants complete read/write access to the API, including all groups and projects, the container registry, the dependency proxy, and the package registry. |
+| `read_user` | Grants read-only access to the authenticated user's profile through the `/user` API endpoint, which includes username, public email, and full name. Also grants access to read-only API endpoints under [`/users`](../../api/users.md). |
+| `read_api` | Grants read access to the API, including all groups and projects, the container registry, and the package registry. ([Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/28944) in GitLab 12.10.) |
+| `read_repository` | Grants read-only access to repositories on private projects using Git-over-HTTP or the Repository Files API. |
+| `write_repository` | Grants read-write access to repositories on private projects using Git-over-HTTP (not using the API). |
+| `read_registry` | Grants read-only (pull) access to [container registry](../packages/container_registry/index.md) images if a project is private and authorization is required. Available only when the container registry is enabled. |
| `write_registry` | Grants read-write (push) access to [container registry](../packages/container_registry/index.md) images if a project is private and authorization is required. Available only when the container registry is enabled. ([Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/28958) in GitLab 12.10.) |
-| `sudo` | Grants permission to perform API actions as any user in the system, when authenticated as an administrator. |
-| `admin_mode` | Grants permission to perform API actions as an administrator, when Admin Mode is enabled. ([Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/107875) in GitLab 15.8.) |
-| `create_runner` | Grants permission to create runners. |
-| `ai_features` | Grants permission to perform API actions for GitLab Duo. |
-| `k8s_proxy` | Grants permission to perform Kubernetes API calls using the agent for Kubernetes. |
+| `sudo` | Grants permission to perform API actions as any user in the system, when authenticated as an administrator. |
+| `admin_mode` | Grants permission to perform API actions as an administrator, when Admin Mode is enabled. ([Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/107875) in GitLab 15.8.) |
+| `create_runner` | Grants permission to create runners. |
+| `ai_features` | Grants permission to perform API actions for GitLab Duo. |
+| `k8s_proxy` | Grants permission to perform Kubernetes API calls using the agent for Kubernetes. |
WARNING:
If you enabled [external authorization](../admin_area/settings/external_authorization.md), personal access tokens cannot access container or package registries. If you use personal access tokens to access these registries, this measure breaks this use of these tokens. Disable external authorization to use personal access tokens with container or package registries.
diff --git a/doc/user/project/settings/project_access_tokens.md b/doc/user/project/settings/project_access_tokens.md
index 708f6e82097..4cdb6dbdaac 100644
--- a/doc/user/project/settings/project_access_tokens.md
+++ b/doc/user/project/settings/project_access_tokens.md
@@ -88,17 +88,17 @@ The scope determines the actions you can perform when you authenticate with a pr
NOTE:
See the warning in [create a project access token](#create-a-project-access-token) regarding internal projects.
-| Scope | Description |
-|:-------------------|:---------------------------------------|
-| `api` | Grants complete read and write access to the scoped project API, including the [package registry](../../packages/package_registry/index.md). |
-| `read_api` | Grants read access to the scoped project API, including the [package registry](../../packages/package_registry/index.md). |
-| `read_registry` | Grants read access (pull) to the [container registry](../../packages/container_registry/index.md) images if a project is private and authorization is required. |
-| `write_registry` | Grants write access (push) to the [Container Registry](../../packages/container_registry/index.md). |
-| `read_repository` | Grants read access (pull) to the repository. |
-| `write_repository` | Grants read and write access (pull and push) to the repository. |
-| `create_runner` | Grants permission to create runners in the project. |
-| `ai_features` | Grants permission to perform API actions for GitLab Duo. |
-| `k8s_proxy` | Grants permission to perform Kubernetes API calls using the agent for Kubernetes in the project. |
+| Scope | Description |
+|:-------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `api` | Grants complete read and write access to the scoped project API, including the [container registry](../../packages/container_registry/index.md), the [dependency proxy](../../packages/dependency_proxy/index.md), and the [package registry](../../packages/package_registry/index.md). |
+| `read_api` | Grants read access to the scoped project API, including the [package registry](../../packages/package_registry/index.md). |
+| `read_registry` | Grants read access (pull) to the [container registry](../../packages/container_registry/index.md) images if a project is private and authorization is required. |
+| `write_registry` | Grants write access (push) to the [container registry](../../packages/container_registry/index.md). |
+| `read_repository` | Grants read access (pull) to the repository. |
+| `write_repository` | Grants read and write access (pull and push) to the repository. |
+| `create_runner` | Grants permission to create runners in the project. |
+| `ai_features` | Grants permission to perform API actions for GitLab Duo. |
+| `k8s_proxy` | Grants permission to perform Kubernetes API calls using the agent for Kubernetes in the project. |
## Enable or disable project access token creation
diff --git a/lib/gitlab/usage/metrics/instrumentations/omniauth_enabled_metric.rb b/lib/gitlab/usage/metrics/instrumentations/omniauth_enabled_metric.rb
new file mode 100644
index 00000000000..d6496da569a
--- /dev/null
+++ b/lib/gitlab/usage/metrics/instrumentations/omniauth_enabled_metric.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+module Gitlab
+ module Usage
+ module Metrics
+ module Instrumentations
+ class OmniauthEnabledMetric < GenericMetric
+ value do
+ Gitlab::Auth.omniauth_enabled?
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/lib/gitlab/usage/metrics/instrumentations/prometheus_enabled_metric.rb b/lib/gitlab/usage/metrics/instrumentations/prometheus_enabled_metric.rb
new file mode 100644
index 00000000000..d5d07637a9c
--- /dev/null
+++ b/lib/gitlab/usage/metrics/instrumentations/prometheus_enabled_metric.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+module Gitlab
+ module Usage
+ module Metrics
+ module Instrumentations
+ class PrometheusEnabledMetric < GenericMetric
+ value do
+ Gitlab::Prometheus::Internal.prometheus_enabled?
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/lib/gitlab/usage/metrics/instrumentations/prometheus_metrics_enabled_metric.rb b/lib/gitlab/usage/metrics/instrumentations/prometheus_metrics_enabled_metric.rb
new file mode 100644
index 00000000000..76f9c7d2588
--- /dev/null
+++ b/lib/gitlab/usage/metrics/instrumentations/prometheus_metrics_enabled_metric.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+module Gitlab
+ module Usage
+ module Metrics
+ module Instrumentations
+ class PrometheusMetricsEnabledMetric < GenericMetric
+ value do
+ Gitlab::Metrics.prometheus_metrics_enabled?
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/lib/gitlab/usage/metrics/instrumentations/reply_by_email_enabled_metric.rb b/lib/gitlab/usage/metrics/instrumentations/reply_by_email_enabled_metric.rb
new file mode 100644
index 00000000000..24502147352
--- /dev/null
+++ b/lib/gitlab/usage/metrics/instrumentations/reply_by_email_enabled_metric.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+module Gitlab
+ module Usage
+ module Metrics
+ module Instrumentations
+ class ReplyByEmailEnabledMetric < GenericMetric
+ value do
+ Gitlab::Email::IncomingEmail.enabled?
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/lib/gitlab/usage_data.rb b/lib/gitlab/usage_data.rb
index 41fb946c62d..e36bf9ff6ad 100644
--- a/lib/gitlab/usage_data.rb
+++ b/lib/gitlab/usage_data.rb
@@ -157,18 +157,7 @@ module Gitlab
end
# rubocop: enable CodeReuse/ActiveRecord
- def features_usage_data
- features_usage_data_ce
- end
-
- def features_usage_data_ce
- {
- omniauth_enabled: alt_usage_data(fallback: nil) { Gitlab::Auth.omniauth_enabled? },
- prometheus_enabled: alt_usage_data(fallback: nil) { Gitlab::Prometheus::Internal.prometheus_enabled? },
- prometheus_metrics_enabled: alt_usage_data(fallback: nil) { Gitlab::Metrics.prometheus_metrics_enabled? },
- reply_by_email_enabled: alt_usage_data(fallback: nil) { Gitlab::Email::IncomingEmail.enabled? }
- }
- end
+ def features_usage_data = {}
def components_usage_data
{
diff --git a/lib/vite_gdk.rb b/lib/vite_gdk.rb
index e4dd85c9c7f..650a111399a 100644
--- a/lib/vite_gdk.rb
+++ b/lib/vite_gdk.rb
@@ -9,7 +9,8 @@ module ViteGdk
config = YAML.safe_load_file(vite_gdk_config_path)
enabled = config.fetch('enabled', false)
- ViteRuby.env['VITE_ENABLED'] = enabled
+ # ViteRuby doesn't like if env vars aren't strings
+ ViteRuby.env['VITE_ENABLED'] = enabled.to_s
return unless enabled
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 8f8c640e232..3b8701619a7 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -237,11 +237,6 @@ msgid_plural "%d completed issues"
msgstr[0] ""
msgstr[1] ""
-msgid "%d compliance framework selected"
-msgid_plural "%d compliance frameworks selected"
-msgstr[0] ""
-msgstr[1] ""
-
msgid "%d contribution"
msgid_plural "%d contributions"
msgstr[0] ""
@@ -4799,9 +4794,6 @@ msgstr ""
msgid "All environments"
msgstr ""
-msgid "All frameworks selected"
-msgstr ""
-
msgid "All groups"
msgstr ""
@@ -9315,6 +9307,9 @@ msgstr ""
msgid "CICD|Deployment strategy"
msgstr ""
+msgid "CICD|Developer"
+msgstr ""
+
msgid "CICD|Disabling this feature is a permanent change."
msgstr ""
@@ -9336,6 +9331,12 @@ msgstr ""
msgid "CICD|Limit access %{italicStart}to%{italicEnd} this project"
msgstr ""
+msgid "CICD|Maintainer"
+msgstr ""
+
+msgid "CICD|Pipelines and jobs cannot be cancelled"
+msgstr ""
+
msgid "CICD|Prevent CI/CD job tokens from this project from being used to access other projects unless the other project is added to the allowlist. It is a security risk to disable this feature, because unauthorized projects might attempt to retrieve an active token and access the API. %{linkStart}Learn more%{linkEnd}."
msgstr ""
@@ -30569,6 +30570,9 @@ msgstr ""
msgid "Minimum capacity to be available before we schedule more mirrors preemptively."
msgstr ""
+msgid "Minimum role required to cancel a pipeline or job"
+msgstr ""
+
msgid "Minutes"
msgstr ""
@@ -43121,15 +43125,15 @@ msgstr ""
msgid "SecurityOrchestration|Choose approver type"
msgstr ""
-msgid "SecurityOrchestration|Choose framework labels"
-msgstr ""
-
msgid "SecurityOrchestration|Choose specific role"
msgstr ""
msgid "SecurityOrchestration|Clear all"
msgstr ""
+msgid "SecurityOrchestration|Compliance Framework ID(s) can only be set for group policies"
+msgstr ""
+
msgid "SecurityOrchestration|Create more robust vulnerability rules and apply them to all your projects."
msgstr ""
@@ -43229,6 +43233,9 @@ msgstr ""
msgid "SecurityOrchestration|Inherited from %{namespace}"
msgstr ""
+msgid "SecurityOrchestration|Invalid Compliance Framework ID(s)"
+msgstr ""
+
msgid "SecurityOrchestration|Invalid branch type detected - rule will not be applied."
msgstr ""
@@ -43588,6 +43595,9 @@ msgstr ""
msgid "SecurityOrchestration|by the agent named %{agents} %{cadence}%{branchExceptionsString}"
msgstr ""
+msgid "SecurityOrchestration|compliance frameworks"
+msgstr ""
+
msgid "SecurityOrchestration|except projects"
msgstr ""
diff --git a/spec/frontend/ci/jobs_page/components/job_cells/actions_cell_spec.js b/spec/frontend/ci/jobs_page/components/job_cells/actions_cell_spec.js
index 1ffd680118e..7af333543b8 100644
--- a/spec/frontend/ci/jobs_page/components/job_cells/actions_cell_spec.js
+++ b/spec/frontend/ci/jobs_page/components/job_cells/actions_cell_spec.js
@@ -43,6 +43,7 @@ describe('Job actions cell', () => {
const cannotPlayJob = findMockJob('playable', mockJobsNodesAsGuest);
const cannotRetryJob = findMockJob('retryable', mockJobsNodesAsGuest);
const cannotPlayScheduledJob = findMockJob('scheduled', mockJobsNodesAsGuest);
+ const cannotCancelJob = findMockJob('cancelable', mockJobsNodesAsGuest);
const findRetryButton = () => wrapper.findByTestId('retry');
const findPlayButton = () => wrapper.findByTestId('play');
@@ -99,6 +100,7 @@ describe('Job actions cell', () => {
${findPlayButton} | ${'play'} | ${cannotPlayJob}
${findRetryButton} | ${'retry'} | ${cannotRetryJob}
${findPlayScheduledJobButton} | ${'play scheduled'} | ${cannotPlayScheduledJob}
+ ${findCancelButton} | ${'cancel'} | ${cannotCancelJob}
`('does not display the $action button if user cannot update build', ({ button, jobType }) => {
createComponent(jobType);
diff --git a/spec/frontend/ci/pipeline_details/header/pipeline_details_header_spec.js b/spec/frontend/ci/pipeline_details/header/pipeline_details_header_spec.js
index 4a83ad4182b..e907bee030c 100644
--- a/spec/frontend/ci/pipeline_details/header/pipeline_details_header_spec.js
+++ b/spec/frontend/ci/pipeline_details/header/pipeline_details_header_spec.js
@@ -15,6 +15,7 @@ import getPipelineDetailsQuery from '~/ci/pipeline_details/header/graphql/querie
import {
pipelineHeaderSuccess,
pipelineHeaderRunning,
+ pipelineHeaderRunningNoPermissions,
pipelineHeaderRunningWithDuration,
pipelineHeaderFailed,
pipelineRetryMutationResponseSuccess,
@@ -33,6 +34,9 @@ describe('Pipeline details header', () => {
const successHandler = jest.fn().mockResolvedValue(pipelineHeaderSuccess);
const runningHandler = jest.fn().mockResolvedValue(pipelineHeaderRunning);
+ const runningHandlerNoPermissions = jest
+ .fn()
+ .mockResolvedValue(pipelineHeaderRunningNoPermissions);
const runningHandlerWithDuration = jest.fn().mockResolvedValue(pipelineHeaderRunningWithDuration);
const failedHandler = jest.fn().mockResolvedValue(pipelineHeaderFailed);
@@ -374,46 +378,58 @@ describe('Pipeline details header', () => {
});
describe('cancel action', () => {
- it('should call cancelPipeline Mutation with pipeline id', async () => {
- createComponent([
- [getPipelineDetailsQuery, runningHandler],
- [cancelPipelineMutation, cancelMutationHandlerSuccess],
- ]);
+ describe('with permissions', () => {
+ it('should call cancelPipeline Mutation with pipeline id', async () => {
+ createComponent([
+ [getPipelineDetailsQuery, runningHandler],
+ [cancelPipelineMutation, cancelMutationHandlerSuccess],
+ ]);
- await waitForPromises();
+ await waitForPromises();
- findCancelButton().vm.$emit('click');
+ findCancelButton().vm.$emit('click');
- expect(cancelMutationHandlerSuccess).toHaveBeenCalledWith({
- id: pipelineHeaderRunning.data.project.pipeline.id,
+ expect(cancelMutationHandlerSuccess).toHaveBeenCalledWith({
+ id: pipelineHeaderRunning.data.project.pipeline.id,
+ });
+ expect(findAlert().exists()).toBe(false);
});
- expect(findAlert().exists()).toBe(false);
- });
- it('should render cancel action tooltip', async () => {
- createComponent([
- [getPipelineDetailsQuery, runningHandler],
- [cancelPipelineMutation, cancelMutationHandlerSuccess],
- ]);
+ it('should render cancel action tooltip', async () => {
+ createComponent([
+ [getPipelineDetailsQuery, runningHandler],
+ [cancelPipelineMutation, cancelMutationHandlerSuccess],
+ ]);
- await waitForPromises();
+ await waitForPromises();
- expect(findCancelButton().attributes('title')).toBe(BUTTON_TOOLTIP_CANCEL);
- });
+ expect(findCancelButton().attributes('title')).toBe(BUTTON_TOOLTIP_CANCEL);
+ });
- it('should display error message on failure', async () => {
- createComponent([
- [getPipelineDetailsQuery, runningHandler],
- [cancelPipelineMutation, cancelMutationHandlerFailed],
- ]);
+ it('should display error message on failure', async () => {
+ createComponent([
+ [getPipelineDetailsQuery, runningHandler],
+ [cancelPipelineMutation, cancelMutationHandlerFailed],
+ ]);
- await waitForPromises();
+ await waitForPromises();
- findCancelButton().vm.$emit('click');
+ findCancelButton().vm.$emit('click');
- await waitForPromises();
+ await waitForPromises();
- expect(findAlert().exists()).toBe(true);
+ expect(findAlert().exists()).toBe(true);
+ });
+ });
+
+ describe('without permissions', () => {
+ it('should not display cancel pipeline button', async () => {
+ createComponent([[getPipelineDetailsQuery, runningHandlerNoPermissions]]);
+
+ await waitForPromises();
+
+ expect(findCancelButton().exists()).toBe(false);
+ });
});
});
diff --git a/spec/frontend/ci/pipeline_details/mock_data.js b/spec/frontend/ci/pipeline_details/mock_data.js
index 56365622544..48570b2515f 100644
--- a/spec/frontend/ci/pipeline_details/mock_data.js
+++ b/spec/frontend/ci/pipeline_details/mock_data.js
@@ -1,5 +1,7 @@
+// pipeline header fixtures located in spec/frontend/fixtures/pipeline_header.rb
import pipelineHeaderSuccess from 'test_fixtures/graphql/pipelines/pipeline_header_success.json';
import pipelineHeaderRunning from 'test_fixtures/graphql/pipelines/pipeline_header_running.json';
+import pipelineHeaderRunningNoPermissions from 'test_fixtures/graphql/pipelines/pipeline_header_running_no_permissions.json';
import pipelineHeaderRunningWithDuration from 'test_fixtures/graphql/pipelines/pipeline_header_running_with_duration.json';
import pipelineHeaderFailed from 'test_fixtures/graphql/pipelines/pipeline_header_failed.json';
@@ -13,6 +15,7 @@ threeWeeksAgo.setDate(threeWeeksAgo.getDate() - 21);
export {
pipelineHeaderSuccess,
pipelineHeaderRunning,
+ pipelineHeaderRunningNoPermissions,
pipelineHeaderRunningWithDuration,
pipelineHeaderFailed,
};
diff --git a/spec/frontend/fixtures/pipeline_header.rb b/spec/frontend/fixtures/pipeline_header.rb
index 744df18a403..8f5b5b67fae 100644
--- a/spec/frontend/fixtures/pipeline_header.rb
+++ b/spec/frontend/fixtures/pipeline_header.rb
@@ -64,6 +64,34 @@ RSpec.describe "GraphQL Pipeline Header", '(JavaScript fixtures)', type: :reques
end
end
+ context 'with running pipeline and no permissions' do
+ let_it_be(:pipeline) do
+ create(
+ :ci_pipeline,
+ project: project,
+ sha: commit.id,
+ ref: 'master',
+ user: user,
+ status: :running,
+ created_at: 2.hours.ago,
+ started_at: 1.hour.ago
+ )
+ end
+
+ let_it_be(:build) { create(:ci_build, :running, pipeline: pipeline, ref: 'master') }
+
+ it "graphql/pipelines/pipeline_header_running_no_permissions.json" do
+ guest = create(:user)
+ project.add_guest(guest)
+
+ query = get_graphql_query_as_string(query_path)
+
+ post_graphql(query, current_user: guest, variables: { fullPath: project.full_path, iid: pipeline.iid })
+
+ expect_graphql_errors_to_be_empty
+ end
+ end
+
context 'with running pipeline and duration' do
let_it_be(:pipeline) do
create(
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 b3f04055e0a..8ead1940f16 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
@@ -1,11 +1,10 @@
# frozen_string_literal: true
require 'spec_helper'
-require_migration!
RSpec.describe Gitlab::BackgroundMigration::BackfillImportedIssueSearchData,
:migration,
- schema: 20220707075300 do
+ schema: 20220126191624 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 3c0b7766871..74f9a26191a 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: 20220425121410 do
+RSpec.describe Gitlab::BackgroundMigration::BackfillIntegrationsEnableSslVerification, schema: 20220126191624 do
let(:migration) { described_class.new }
let(:integrations) { described_class::Integration }
diff --git a/spec/lib/gitlab/background_migration/backfill_namespace_id_for_project_route_spec.rb b/spec/lib/gitlab/background_migration/backfill_namespace_id_for_project_route_spec.rb
deleted file mode 100644
index 2949bc068c8..00000000000
--- a/spec/lib/gitlab/background_migration/backfill_namespace_id_for_project_route_spec.rb
+++ /dev/null
@@ -1,53 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-# this needs the schema to be before we introduce the not null constraint on routes#namespace_id
-RSpec.describe Gitlab::BackgroundMigration::BackfillNamespaceIdForProjectRoute, schema: 20220606060825 do
- let(:migration) { described_class.new }
- let(:namespaces) { table(:namespaces) }
- let(:projects) { table(:projects) }
- let(:routes) { table(:routes) }
-
- let(:namespace1) { namespaces.create!(name: 'batchtest1', type: 'Group', path: 'space1') }
- let(:namespace2) { namespaces.create!(name: 'batchtest2', type: 'Group', parent_id: namespace1.id, path: 'space2') }
- let(:namespace3) { namespaces.create!(name: 'batchtest3', type: 'Group', parent_id: namespace2.id, path: 'space3') }
-
- let(:proj_namespace1) { namespaces.create!(name: 'proj1', path: 'proj1', type: 'Project', parent_id: namespace1.id) }
- let(:proj_namespace2) { namespaces.create!(name: 'proj2', path: 'proj2', type: 'Project', parent_id: namespace2.id) }
- let(:proj_namespace3) { namespaces.create!(name: 'proj3', path: 'proj3', type: 'Project', parent_id: namespace3.id) }
- let(:proj_namespace4) { namespaces.create!(name: 'proj4', path: 'proj4', type: 'Project', parent_id: namespace3.id) }
-
- # rubocop:disable Layout/LineLength
- let(:proj1) { projects.create!(name: 'proj1', path: 'proj1', namespace_id: namespace1.id, project_namespace_id: proj_namespace1.id) }
- let(:proj2) { projects.create!(name: 'proj2', path: 'proj2', namespace_id: namespace2.id, project_namespace_id: proj_namespace2.id) }
- let(:proj3) { projects.create!(name: 'proj3', path: 'proj3', namespace_id: namespace3.id, project_namespace_id: proj_namespace3.id) }
- let(:proj4) { projects.create!(name: 'proj4', path: 'proj4', namespace_id: namespace3.id, project_namespace_id: proj_namespace4.id) }
- # rubocop:enable Layout/LineLength
-
- let!(:namespace_route1) { routes.create!(path: 'space1', source_id: namespace1.id, source_type: 'Namespace') }
- let!(:namespace_route2) { routes.create!(path: 'space1/space2', source_id: namespace2.id, source_type: 'Namespace') }
- let!(:namespace_route3) { routes.create!(path: 'space1/space3', source_id: namespace3.id, source_type: 'Namespace') }
-
- let!(:proj_route1) { routes.create!(path: 'space1/proj1', source_id: proj1.id, source_type: 'Project') }
- let!(:proj_route2) { routes.create!(path: 'space1/space2/proj2', source_id: proj2.id, source_type: 'Project') }
- let!(:proj_route3) { routes.create!(path: 'space1/space3/proj3', source_id: proj3.id, source_type: 'Project') }
- let!(:proj_route4) { routes.create!(path: 'space1/space3/proj4', source_id: proj4.id, source_type: 'Project') }
-
- subject(:perform_migration) { migration.perform(proj_route1.id, proj_route4.id, :routes, :id, 2, 0) }
-
- it 'backfills namespace_id for the selected records', :aggregate_failures do
- perform_migration
-
- expected_namespaces = [proj_namespace1.id, proj_namespace2.id, proj_namespace3.id, proj_namespace4.id]
-
- expected_projects = [proj_route1.id, proj_route2.id, proj_route3.id, proj_route4.id]
- expect(routes.where.not(namespace_id: nil).pluck(:id)).to match_array(expected_projects)
- expect(routes.where.not(namespace_id: nil).pluck(:namespace_id)).to match_array(expected_namespaces)
- end
-
- it 'tracks timings of queries' do
- expect(migration.batch_metrics.timings).to be_empty
-
- expect { perform_migration }.to change { migration.batch_metrics.timings }
- end
-end
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 6a55c6951d5..e574c999532 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: 20220722145845 do
+RSpec.describe Gitlab::BackgroundMigration::BackfillNamespaceIdOfVulnerabilityReads, schema: 20220126191624 do
let(:namespaces) { table(:namespaces) }
let(:projects) { table(:projects) }
let(:users) { table(:users) }
diff --git a/spec/lib/gitlab/background_migration/backfill_project_import_level_spec.rb b/spec/lib/gitlab/background_migration/backfill_project_import_level_spec.rb
index ae296483166..73661a3da1f 100644
--- a/spec/lib/gitlab/background_migration/backfill_project_import_level_spec.rb
+++ b/spec/lib/gitlab/background_migration/backfill_project_import_level_spec.rb
@@ -1,7 +1,6 @@
# frozen_string_literal: true
require 'spec_helper'
-require_migration!
# rubocop:disable Layout/HashAlignment
RSpec.describe Gitlab::BackgroundMigration::BackfillProjectImportLevel do
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
index 96f49624d22..d95927a3280 100644
--- 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
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Gitlab::BackgroundMigration::BackfillProjectMemberNamespaceId, :migration, schema: 20220516054011 do
+RSpec.describe Gitlab::BackgroundMigration::BackfillProjectMemberNamespaceId, :migration, schema: 20220126191624 do
let(:migration) do
described_class.new(
start_id: 1, end_id: 10,
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 3c46456eed0..4f32fc3bebe 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: 20220331133802 do
+RSpec.describe Gitlab::BackgroundMigration::BackfillTopicsTitle, schema: 20220126191624 do
it 'correctly backfills the title of the topics' do
topics = table(:topics)
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 3f1a57434a7..9b7c498cfdc 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: 20220525221133 do # rubocop:disable Layout/LineLength
+RSpec.describe Gitlab::BackgroundMigration::BackfillVulnerabilityReadsClusterAgent, :migration, schema: 20220126191624 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/cleanup_orphaned_routes_spec.rb b/spec/lib/gitlab/background_migration/cleanup_orphaned_routes_spec.rb
deleted file mode 100644
index a09d5559d33..00000000000
--- a/spec/lib/gitlab/background_migration/cleanup_orphaned_routes_spec.rb
+++ /dev/null
@@ -1,80 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-# this needs the schema to be before we introduce the not null constraint on routes#namespace_id
-RSpec.describe Gitlab::BackgroundMigration::CleanupOrphanedRoutes, schema: 20220606060825 do
- let(:namespaces) { table(:namespaces) }
- let(:projects) { table(:projects) }
- let(:routes) { table(:routes) }
-
- let!(:namespace1) { namespaces.create!(name: 'batchtest1', type: 'Group', path: 'space1') }
- let!(:namespace2) { namespaces.create!(name: 'batchtest2', type: 'Group', parent_id: namespace1.id, path: 'space2') }
- let!(:namespace3) { namespaces.create!(name: 'batchtest3', type: 'Group', parent_id: namespace2.id, path: 'space3') }
-
- let!(:proj_namespace1) { namespaces.create!(name: 'proj1', path: 'proj1', type: 'Project', parent_id: namespace1.id) }
- let!(:proj_namespace2) { namespaces.create!(name: 'proj2', path: 'proj2', type: 'Project', parent_id: namespace2.id) }
- let!(:proj_namespace3) { namespaces.create!(name: 'proj3', path: 'proj3', type: 'Project', parent_id: namespace3.id) }
-
- # rubocop:disable Layout/LineLength
- let!(:proj1) { projects.create!(name: 'proj1', path: 'proj1', namespace_id: namespace1.id, project_namespace_id: proj_namespace1.id) }
- let!(:proj2) { projects.create!(name: 'proj2', path: 'proj2', namespace_id: namespace2.id, project_namespace_id: proj_namespace2.id) }
- let!(:proj3) { projects.create!(name: 'proj3', path: 'proj3', namespace_id: namespace3.id, project_namespace_id: proj_namespace3.id) }
-
- # valid namespace routes with not null namespace_id
- let!(:namespace_route1) { routes.create!(path: 'space1', source_id: namespace1.id, source_type: 'Namespace', namespace_id: namespace1.id) }
- # valid namespace routes with null namespace_id
- let!(:namespace_route2) { routes.create!(path: 'space1/space2', source_id: namespace2.id, source_type: 'Namespace') }
- let!(:namespace_route3) { routes.create!(path: 'space1/space3', source_id: namespace3.id, source_type: 'Namespace') }
- # invalid/orphaned namespace route
- let!(:orphaned_namespace_route_a) { routes.create!(path: 'space1/space4', source_id: non_existing_record_id, source_type: 'Namespace') }
- let!(:orphaned_namespace_route_b) { routes.create!(path: 'space1/space5', source_id: non_existing_record_id - 1, source_type: 'Namespace') }
-
- # valid project routes with not null namespace_id
- let!(:proj_route1) { routes.create!(path: 'space1/proj1', source_id: proj1.id, source_type: 'Project', namespace_id: proj_namespace1.id) }
- # valid project routes with null namespace_id
- let!(:proj_route2) { routes.create!(path: 'space1/space2/proj2', source_id: proj2.id, source_type: 'Project') }
- let!(:proj_route3) { routes.create!(path: 'space1/space3/proj3', source_id: proj3.id, source_type: 'Project') }
- # invalid/orphaned namespace route
- let!(:orphaned_project_route_a) { routes.create!(path: 'space1/space3/proj5', source_id: non_existing_record_id, source_type: 'Project') }
- let!(:orphaned_project_route_b) { routes.create!(path: 'space1/space3/proj6', source_id: non_existing_record_id - 1, source_type: 'Project') }
- # rubocop:enable Layout/LineLength
-
- let!(:migration_attrs) do
- {
- start_id: Route.minimum(:id),
- end_id: Route.maximum(:id),
- batch_table: :routes,
- 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 }
-
- it 'cleans orphaned routes', :aggregate_failures do
- all_route_ids = Route.pluck(:id)
-
- orphaned_route_ids = [
- orphaned_namespace_route_a, orphaned_namespace_route_b, orphaned_project_route_a, orphaned_project_route_b
- ].pluck(:id)
- remaining_routes = (all_route_ids - orphaned_route_ids).sort
-
- expect { perform_migration }.to change { Route.pluck(:id) }.to contain_exactly(*remaining_routes)
- expect(Route.all).to all(have_attributes(namespace_id: be_present))
-
- # expect that routes that had namespace_id set did not change namespace_id
- expect(namespace_route1.reload.namespace_id).to eq(namespace1.id)
- expect(proj_route1.reload.namespace_id).to eq(proj_namespace1.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
-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 93913a2742b..33b09490a9a 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 @@ require 'spec_helper'
RSpec.describe Gitlab::BackgroundMigration::DisableLegacyOpenSourceLicenseForNoIssuesNoRepoProjects,
:migration,
- schema: 20220722084543 do
+ schema: 20220126191624 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 285e5ebbee2..ba8628c5103 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 @@ require 'spec_helper'
RSpec.describe Gitlab::BackgroundMigration::DisableLegacyOpenSourceLicenseForOneMemberNoRepoProjects,
:migration,
- schema: 20220721031446 do
+ schema: 20220126191624 do
let(:namespaces_table) { table(:namespaces) }
let(:projects_table) { table(:projects) }
let(:project_settings_table) { table(:project_settings) }
@@ -13,15 +13,14 @@ RSpec.describe Gitlab::BackgroundMigration::DisableLegacyOpenSourceLicenseForOne
let(:project_authorizations_table) { table(:project_authorizations) }
subject(:perform_migration) do
- described_class.new(
- start_id: projects_table.minimum(:id),
+ described_class.new(start_id: projects_table.minimum(:id),
end_id: projects_table.maximum(:id),
batch_table: :projects,
batch_column: :id,
sub_batch_size: 2,
pause_ms: 0,
- connection: ActiveRecord::Base.connection
- ).perform
+ connection: ActiveRecord::Base.connection)
+ .perform
end
it 'sets `legacy_open_source_license_available` to false only for public projects with 1 member and no repo',
@@ -43,13 +42,13 @@ RSpec.describe Gitlab::BackgroundMigration::DisableLegacyOpenSourceLicenseForOne
def create_legacy_license_public_project(path, repo_size: 0, members: 1)
namespace = namespaces_table.create!(name: "namespace-#{path}", path: "namespace-#{path}")
- project_namespace = namespaces_table.create!(
- name: "-project-namespace-#{path}", path: "project-namespace-#{path}", type: 'Project'
- )
- project = projects_table.create!(
- name: path, path: path, namespace_id: namespace.id,
- project_namespace_id: project_namespace.id, visibility_level: 20
- )
+ project_namespace =
+ namespaces_table.create!(name: "-project-namespace-#{path}", path: "project-namespace-#{path}", type: 'Project')
+ project = projects_table
+ .create!(
+ name: path, path: path, namespace_id: namespace.id,
+ project_namespace_id: project_namespace.id, visibility_level: 20
+ )
members.times do |member_id|
user = users_table.create!(email: "user#{member_id}-project-#{project.id}@gitlab.com", projects_limit: 100)
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 ba3aab03f2a..65d20a00d9f 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: 20220428133724 do
+RSpec.describe Gitlab::BackgroundMigration::ExpireOAuthTokens, :migration, schema: 20220126191624 do
let(:migration) { described_class.new }
let(:oauth_access_tokens_table) { table(:oauth_access_tokens) }
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 afdd855c5a8..61ca8eff63c 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 @@ require 'spec_helper'
RSpec.describe Gitlab::BackgroundMigration::ResetTooManyTagsSkippedRegistryImports, :migration,
:aggregate_failures,
- schema: 20220502173045 do
+ schema: 20220126191624 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 5109c3ec0c2..bea6705834e 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 @@ require 'spec_helper'
RSpec.describe Gitlab::BackgroundMigration::SetLegacyOpenSourceLicenseAvailableForNonPublicProjects,
:migration,
- schema: 20220722110026 do
+ schema: 20220126191624 do
let(:namespaces_table) { table(:namespaces) }
let(:projects_table) { table(:projects) }
let(:project_settings_table) { table(:project_settings) }
diff --git a/spec/lib/gitlab/usage/metrics/instrumentations/omniauth_enabled_metric_spec.rb b/spec/lib/gitlab/usage/metrics/instrumentations/omniauth_enabled_metric_spec.rb
new file mode 100644
index 00000000000..20390e6abd9
--- /dev/null
+++ b/spec/lib/gitlab/usage/metrics/instrumentations/omniauth_enabled_metric_spec.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe Gitlab::Usage::Metrics::Instrumentations::OmniauthEnabledMetric, feature_category: :service_ping do
+ before do
+ allow(Gitlab::Auth).to receive(:omniauth_enabled?).and_return(expected_value)
+ end
+
+ [true, false].each do |setting|
+ context "when the setting is #{setting}" do
+ let(:expected_value) { setting }
+
+ it_behaves_like 'a correct instrumented metric value', { time_frame: 'none' }
+ end
+ end
+end
diff --git a/spec/lib/gitlab/usage/metrics/instrumentations/prometheus_enabled_metric_spec.rb b/spec/lib/gitlab/usage/metrics/instrumentations/prometheus_enabled_metric_spec.rb
new file mode 100644
index 00000000000..dbd44cc3309
--- /dev/null
+++ b/spec/lib/gitlab/usage/metrics/instrumentations/prometheus_enabled_metric_spec.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe Gitlab::Usage::Metrics::Instrumentations::PrometheusEnabledMetric, feature_category: :service_ping do
+ before do
+ allow(Gitlab::Prometheus::Internal).to receive(:prometheus_enabled?).and_return(expected_value)
+ end
+
+ [true, false].each do |setting|
+ context "when the setting is #{setting}" do
+ let(:expected_value) { setting }
+
+ it_behaves_like 'a correct instrumented metric value', { time_frame: 'none' }
+ end
+ end
+end
diff --git a/spec/lib/gitlab/usage/metrics/instrumentations/prometheus_metrics_enabled_metric_spec.rb b/spec/lib/gitlab/usage/metrics/instrumentations/prometheus_metrics_enabled_metric_spec.rb
new file mode 100644
index 00000000000..3e6812f3b34
--- /dev/null
+++ b/spec/lib/gitlab/usage/metrics/instrumentations/prometheus_metrics_enabled_metric_spec.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe Gitlab::Usage::Metrics::Instrumentations::PrometheusMetricsEnabledMetric, feature_category: :service_ping do
+ before do
+ allow(Gitlab::Metrics).to receive(:prometheus_metrics_enabled?).and_return(expected_value)
+ end
+
+ [true, false].each do |setting|
+ context "when the setting is #{setting}" do
+ let(:expected_value) { setting }
+
+ it_behaves_like 'a correct instrumented metric value', { time_frame: 'none' }
+ end
+ end
+end
diff --git a/spec/lib/gitlab/usage/metrics/instrumentations/reply_by_email_enabled_metric_spec.rb b/spec/lib/gitlab/usage/metrics/instrumentations/reply_by_email_enabled_metric_spec.rb
new file mode 100644
index 00000000000..12eab4bb422
--- /dev/null
+++ b/spec/lib/gitlab/usage/metrics/instrumentations/reply_by_email_enabled_metric_spec.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe Gitlab::Usage::Metrics::Instrumentations::ReplyByEmailEnabledMetric, feature_category: :service_ping do
+ before do
+ allow(Gitlab::Email::IncomingEmail).to receive(:enabled?).and_return(expected_value)
+ end
+
+ [true, false].each do |setting|
+ context "when the setting is #{setting}" do
+ let(:expected_value) { setting }
+
+ it_behaves_like 'a correct instrumented metric value', { time_frame: 'none' }
+ end
+ end
+end
diff --git a/spec/lib/gitlab/usage_data_spec.rb b/spec/lib/gitlab/usage_data_spec.rb
index 72c68c83014..f43e49bd616 100644
--- a/spec/lib/gitlab/usage_data_spec.rb
+++ b/spec/lib/gitlab/usage_data_spec.rb
@@ -564,29 +564,6 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures, feature_category: :servic
end
context 'when not relying on database records' do
- describe '.features_usage_data_ce' do
- subject { described_class.features_usage_data_ce }
-
- it 'gathers feature usage data', :aggregate_failures do
- expect(subject[:omniauth_enabled]).to eq(Gitlab::Auth.omniauth_enabled?)
- expect(subject[:reply_by_email_enabled]).to eq(Gitlab::Email::IncomingEmail.enabled?)
- end
-
- context 'with embedded Prometheus' do
- it 'returns true when embedded Prometheus is enabled' do
- allow(Gitlab::Prometheus::Internal).to receive(:prometheus_enabled?).and_return(true)
-
- expect(subject[:prometheus_enabled]).to eq(true)
- end
-
- it 'returns false when embedded Prometheus is disabled' do
- allow(Gitlab::Prometheus::Internal).to receive(:prometheus_enabled?).and_return(false)
-
- expect(subject[:prometheus_enabled]).to eq(false)
- end
- end
- end
-
describe '.components_usage_data' do
subject { described_class.components_usage_data }
diff --git a/spec/lib/vite_gdk_spec.rb b/spec/lib/vite_gdk_spec.rb
index fed2ca6921f..2e21e77881d 100644
--- a/spec/lib/vite_gdk_spec.rb
+++ b/spec/lib/vite_gdk_spec.rb
@@ -26,7 +26,7 @@ RSpec.describe ViteGdk, feature_category: :tooling do
expect(file_path).to end_with(VITE_GDK_CONFIG_FILEPATH)
end.and_return('enabled' => true, 'port' => 3038)
expect(ViteRuby).to receive(:configure).with(port: 3038)
- expect(ViteRuby.env).to receive(:[]=).with('VITE_ENABLED', true)
+ expect(ViteRuby.env).to receive(:[]=).with('VITE_ENABLED', 'true')
described_class.load_gdk_vite_config
end
@@ -38,8 +38,8 @@ RSpec.describe ViteGdk, feature_category: :tooling do
expect(file_path).to end_with(VITE_GDK_CONFIG_FILEPATH)
end.and_return(false)
expect(ViteRuby).not_to receive(:configure)
- expect(ViteRuby.env).not_to receive(:[]=).with('VITE_ENABLED', false)
- expect(ViteRuby.env).not_to receive(:[]=).with('VITE_ENABLED', true)
+ expect(ViteRuby.env).not_to receive(:[]=).with('VITE_ENABLED', 'false')
+ expect(ViteRuby.env).not_to receive(:[]=).with('VITE_ENABLED', 'true')
described_class.load_gdk_vite_config
end
diff --git a/spec/models/ability_spec.rb b/spec/models/ability_spec.rb
index 35ce678e3a6..e62dddcc28b 100644
--- a/spec/models/ability_spec.rb
+++ b/spec/models/ability_spec.rb
@@ -498,8 +498,9 @@ RSpec.describe Ability do
expect(Gitlab::AppLogger).to have_received(:info) do |args|
expect(args[:message]).to eq('Ability is in use')
expect(args[:ability]).to eq(:read_namespace)
- expect(args[:caller_locations].first)
- .to include('/spec/models/ability_spec.rb:489:in `block (4 levels) in <top (required)>')
+ expect(args[:caller_locations].first).to(
+ match(%r{/spec/models/ability_spec.rb:\d+:in `block \(4 levels\) in <top \(required\)>})
+ )
expect(args[:caller_locations].length).to eq(5)
end
end
diff --git a/spec/models/concerns/pg_full_text_searchable_spec.rb b/spec/models/concerns/pg_full_text_searchable_spec.rb
index 18c5ad4284a..f3289408643 100644
--- a/spec/models/concerns/pg_full_text_searchable_spec.rb
+++ b/spec/models/concerns/pg_full_text_searchable_spec.rb
@@ -152,6 +152,16 @@ RSpec.describe PgFullTextSearchable, feature_category: :global_search do
expect(model_class.pg_full_text_search('123')).to contain_exactly(with_dash)
end
end
+
+ context 'when text has XML tags' do
+ let(:with_xml) { model_class.create!(project: project, namespace: project.project_namespace, title: '<rain>go away</rain>', description: 'description') }
+
+ it 'removes XML tag syntax' do
+ with_xml.update_search_data!
+
+ expect(model_class.pg_full_text_search('rain')).to contain_exactly(with_xml)
+ end
+ end
end
describe '.pg_full_text_search_in_model' do
diff --git a/spec/support/helpers/usage_data_helpers.rb b/spec/support/helpers/usage_data_helpers.rb
index d8c4c5107c7..111886c1586 100644
--- a/spec/support/helpers/usage_data_helpers.rb
+++ b/spec/support/helpers/usage_data_helpers.rb
@@ -77,13 +77,10 @@ module UsageDataHelpers
USAGE_DATA_KEYS = %i[
counts
recorded_at
- omniauth_enabled
- reply_by_email_enabled
gitlab_pages
git
gitaly
database
- prometheus_metrics_enabled
object_store
topology
].freeze
diff --git a/spec/support/rspec_order_todo.yml b/spec/support/rspec_order_todo.yml
index fc6823352cd..bd958bf3087 100644
--- a/spec/support/rspec_order_todo.yml
+++ b/spec/support/rspec_order_todo.yml
@@ -1068,13 +1068,11 @@
- './ee/spec/lib/ee/gitlab/auth/request_authenticator_spec.rb'
- './ee/spec/lib/ee/gitlab/auth/saml/identity_linker_spec.rb'
- './ee/spec/lib/ee/gitlab/background_migration/backfill_iteration_cadence_id_for_boards_spec.rb'
-- './ee/spec/lib/ee/gitlab/background_migration/backfill_project_statistics_container_repository_size_spec.rb'
- './ee/spec/lib/ee/gitlab/background_migration/delete_invalid_epic_issues_spec.rb'
- './ee/spec/lib/ee/gitlab/background_migration/migrate_approver_to_approval_rules_check_progress_spec.rb'
- './ee/spec/lib/ee/gitlab/background_migration/migrate_approver_to_approval_rules_in_batch_spec.rb'
- './ee/spec/lib/ee/gitlab/background_migration/migrate_approver_to_approval_rules_spec.rb'
- './ee/spec/lib/ee/gitlab/background_migration/migrate_shared_vulnerability_scanners_spec.rb'
-- './ee/spec/lib/ee/gitlab/background_migration/purge_stale_security_scans_spec.rb'
- './ee/spec/lib/ee/gitlab/checks/push_rule_check_spec.rb'
- './ee/spec/lib/ee/gitlab/checks/push_rules/branch_check_spec.rb'
- './ee/spec/lib/ee/gitlab/checks/push_rules/commit_check_spec.rb'
@@ -1239,7 +1237,6 @@
- './ee/spec/lib/gitlab/auth/smartcard/san_extension_spec.rb'
- './ee/spec/lib/gitlab/auth/smartcard/session_enforcer_spec.rb'
- './ee/spec/lib/gitlab/auth/smartcard/session_spec.rb'
-- './ee/spec/lib/gitlab/background_migration/migrate_requirements_to_work_items_spec.rb'
- './ee/spec/lib/gitlab/bullet/exclusions_spec.rb'
- './ee/spec/lib/gitlab/cache_spec.rb'
- './ee/spec/lib/gitlab/checks/changes_access_spec.rb'
@@ -1518,9 +1515,6 @@
- './ee/spec/mailers/emails/user_cap_spec.rb'
- './ee/spec/mailers/license_mailer_spec.rb'
- './ee/spec/mailers/notify_spec.rb'
-- './ee/spec/migrations/20220411173544_cleanup_orphans_approval_project_rules_spec.rb'
-- './ee/spec/migrations/20220517144749_remove_vulnerability_approval_rules_spec.rb'
-- './ee/spec/migrations/backfill_delayed_group_deletion_spec.rb'
- './ee/spec/migrations/geo/fix_state_column_in_file_registry_spec.rb'
- './ee/spec/migrations/geo/fix_state_column_in_lfs_object_registry_spec.rb'
- './ee/spec/migrations/geo/migrate_ci_job_artifacts_to_separate_registry_spec.rb'
@@ -5375,7 +5369,6 @@
- './spec/lib/gitlab/avatar_cache_spec.rb'
- './spec/lib/gitlab/background_migration/backfill_imported_issue_search_data_spec.rb'
- './spec/lib/gitlab/background_migration/backfill_integrations_enable_ssl_verification_spec.rb'
-- './spec/lib/gitlab/background_migration/backfill_namespace_id_for_project_route_spec.rb'
- './spec/lib/gitlab/background_migration/backfill_namespace_id_of_vulnerability_reads_spec.rb'
- './spec/lib/gitlab/background_migration/backfill_note_discussion_id_spec.rb'
- './spec/lib/gitlab/background_migration/backfill_project_feature_package_registry_access_level_spec.rb'
@@ -5393,7 +5386,6 @@
- './spec/lib/gitlab/background_migration/batching_strategies/dismissed_vulnerabilities_strategy_spec.rb'
- './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/cleanup_orphaned_routes_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'