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
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/click_house/migrate/20230705124511_create_events.rb30
-rw-r--r--db/click_house/migrate/20230724064832_create_contribution_analytics_events.rb27
-rw-r--r--db/click_house/migrate/main/20230705124511_create_events.rb30
-rw-r--r--db/click_house/migrate/main/20230707151359_create_ci_finished_builds.rb (renamed from db/click_house/migrate/20230707151359_create_ci_finished_builds.rb)0
-rw-r--r--db/click_house/migrate/main/20230719101806_create_ci_finished_builds_aggregated_queueing_delay_percentiles.rb (renamed from db/click_house/migrate/20230719101806_create_ci_finished_builds_aggregated_queueing_delay_percentiles.rb)0
-rw-r--r--db/click_house/migrate/main/20230724064832_create_contribution_analytics_events.rb27
-rw-r--r--db/click_house/migrate/main/20230724064918_create_contribution_analytics_events_materialized_view.rb (renamed from db/click_house/migrate/20230724064918_create_contribution_analytics_events_materialized_view.rb)0
-rw-r--r--db/click_house/migrate/main/20230808070520_create_sync_cursors.rb (renamed from db/click_house/migrate/20230808070520_create_sync_cursors.rb)0
-rw-r--r--db/click_house/migrate/main/20230808140217_create_ci_finished_builds_aggregated_queueing_delay_percentiles_mv.rb (renamed from db/click_house/migrate/20230808140217_create_ci_finished_builds_aggregated_queueing_delay_percentiles_mv.rb)0
-rw-r--r--db/click_house/migrate/main/20231106202300_modify_ci_finished_builds_settings.rb (renamed from db/click_house/migrate/20231106202300_modify_ci_finished_builds_settings.rb)0
-rw-r--r--db/click_house/migrate/main/20231114142100_create_audit_events.rb37
-rw-r--r--db/click_house/migrate/main/20231129062064_create_contributions_table.rb27
-rw-r--r--db/click_house/migrate/main/20231129062151_create_contributions_mv.rb30
-rw-r--r--db/click_house/migrate/main/20231205104100_modify_ci_finished_builds_started_at_default.rb15
-rw-r--r--db/click_house/migrate/main/20231205104101_modify_ci_finished_builds_finished_at_default.rb15
-rw-r--r--db/click_house/migrate/main/20231205112200_fix_invalid_ci_finished_builds_started_at_values.rb14
-rw-r--r--db/click_house/migrate/main/20231207173100_create_ci_used_minutes.rb26
-rw-r--r--db/click_house/migrate/main/20231207173101_create_ci_used_minutes_mv.rb27
-rw-r--r--db/click_house/migrate/main/20231211130023_drop_contribution_analytics_mv.rb30
-rw-r--r--db/click_house/migrate/main/20231211143660_drop_contribution_analytics_table.rb27
-rw-r--r--db/click_house/migrate/main/20231212085143_create_event_authors_table.rb23
-rw-r--r--db/click_house/migrate/main/20231212090756_create_event_namespace_paths_table.rb24
-rw-r--r--db/click_house/migrate/main/20231212090973_create_event_authors_materialized_view.rb23
-rw-r--r--db/click_house/migrate/main/20231212092970_create_event_namespace_paths_materialized_view.rb27
-rw-r--r--db/docs/abuse_report_assignees.yml10
-rw-r--r--db/docs/activity_pub_releases_subscriptions.yml4
-rw-r--r--db/docs/analytics_devops_adoption_snapshots.yml4
-rw-r--r--db/docs/approval_merge_request_rules_users.yml3
-rw-r--r--db/docs/audit_events_instance_amazon_s3_configurations.yml10
-rw-r--r--db/docs/audit_events_streaming_http_group_namespace_filters.yml4
-rw-r--r--db/docs/audit_events_streaming_http_instance_namespace_filters.yml12
-rw-r--r--db/docs/automation_rules.yml4
-rw-r--r--db/docs/batched_background_migrations.yml2
-rw-r--r--db/docs/batched_background_migrations/backfill_admin_mode_scope_for_personal_access_tokens.yml6
-rw-r--r--db/docs/batched_background_migrations/backfill_branch_protection_namespace_setting.yml9
-rw-r--r--db/docs/batched_background_migrations/backfill_code_suggestions_namespace_settings.yml3
-rw-r--r--db/docs/batched_background_migrations/backfill_default_branch_protection_namespace_setting.yml2
-rw-r--r--db/docs/batched_background_migrations/backfill_design_management_repositories.yml3
-rw-r--r--db/docs/batched_background_migrations/backfill_dismissal_reason_in_vulnerability_reads.yml9
-rw-r--r--db/docs/batched_background_migrations/backfill_finding_id_in_vulnerabilities.yml6
-rw-r--r--db/docs/batched_background_migrations/backfill_has_merge_request_of_vulnerability_reads.yml2
-rw-r--r--db/docs/batched_background_migrations/backfill_has_remediations_of_vulnerability_reads.yml8
-rw-r--r--db/docs/batched_background_migrations/backfill_merge_request_diffs_project_id.yml9
-rw-r--r--db/docs/batched_background_migrations/backfill_missing_ci_cd_settings.yml6
-rw-r--r--db/docs/batched_background_migrations/backfill_missing_vulnerability_dismissal_details.yml3
-rw-r--r--db/docs/batched_background_migrations/backfill_nuget_normalized_version.yml2
-rw-r--r--db/docs/batched_background_migrations/backfill_packages_tags_project_id.yml2
-rw-r--r--db/docs/batched_background_migrations/backfill_project_statistics_storage_size_with_recent_size.yml2
-rw-r--r--db/docs/batched_background_migrations/backfill_project_statistics_storage_size_without_pipeline_artifacts_size_job.yml6
-rw-r--r--db/docs/batched_background_migrations/backfill_project_wiki_repositories.yml6
-rw-r--r--db/docs/batched_background_migrations/backfill_resource_link_events.yml2
-rw-r--r--db/docs/batched_background_migrations/backfill_root_storage_statistics_fork_storage_sizes.yml7
-rw-r--r--db/docs/batched_background_migrations/backfill_user_preferences_with_defaults.yml2
-rw-r--r--db/docs/batched_background_migrations/backfill_users_with_defaults.yml2
-rw-r--r--db/docs/batched_background_migrations/backfill_uuid_conversion_column_in_vulnerability_occurrences.yml6
-rw-r--r--db/docs/batched_background_migrations/backfill_vs_code_settings_uuid.yml9
-rw-r--r--db/docs/batched_background_migrations/backfill_work_item_type_id_for_issues.yml2
-rw-r--r--db/docs/batched_background_migrations/backfill_workspace_personal_access_token.yml5
-rw-r--r--db/docs/batched_background_migrations/cleanup_personal_access_tokens_with_nil_expires_at.yml10
-rw-r--r--db/docs/batched_background_migrations/convert_credit_card_validation_data_to_hashes.yml2
-rw-r--r--db/docs/batched_background_migrations/create_compliance_standards_adherence.yml5
-rw-r--r--db/docs/batched_background_migrations/delete_invalid_protected_branch_merge_access_levels.yml4
-rw-r--r--db/docs/batched_background_migrations/delete_invalid_protected_branch_push_access_levels.yml4
-rw-r--r--db/docs/batched_background_migrations/delete_invalid_protected_tag_create_access_levels.yml4
-rw-r--r--db/docs/batched_background_migrations/delete_orphaned_transferred_project_approval_rules.yml3
-rw-r--r--db/docs/batched_background_migrations/delete_orphans_approval_merge_request_rules2.yml5
-rw-r--r--db/docs/batched_background_migrations/delete_orphans_approval_project_rules2.yml5
-rw-r--r--db/docs/batched_background_migrations/fix_allow_descendants_override_disabled_shared_runners.yml6
-rw-r--r--db/docs/batched_background_migrations/fix_namespace_ids_of_vulnerability_reads.yml2
-rw-r--r--db/docs/batched_background_migrations/mark_duplicate_npm_packages_for_destruction.yml3
-rw-r--r--db/docs/batched_background_migrations/migrate_human_user_type.yml3
-rw-r--r--db/docs/batched_background_migrations/populate_denormalized_columns_for_sbom_occurrences.yml2
-rw-r--r--db/docs/batched_background_migrations/populate_vulnerability_dismissal_fields.yml6
-rw-r--r--db/docs/batched_background_migrations/remove_invalid_deploy_access_level_groups.yml6
-rw-r--r--db/docs/batched_background_migrations/sync_scan_result_policies.yml2
-rw-r--r--db/docs/batched_background_migrations/update_code_suggestions_for_namespace_settings.yml2
-rw-r--r--db/docs/batched_background_migrations/update_users_set_external_if_service_account.yml2
-rw-r--r--db/docs/batched_background_migrations/update_workspaces_config_version.yml2
-rw-r--r--db/docs/ci_editor_ai_conversation_messages.yml3
-rw-r--r--db/docs/ci_runner_machines.yml2
-rw-r--r--db/docs/ci_runner_versions.yml2
-rw-r--r--db/docs/ci_runners.yml2
-rw-r--r--db/docs/feature_gates.yml1
-rw-r--r--db/docs/features.yml1
-rw-r--r--db/docs/integrations.yml1
-rw-r--r--db/docs/labels.yml3
-rw-r--r--db/docs/merge_requests.yml2
-rw-r--r--db/docs/namespace_ci_cd_settings.yml2
-rw-r--r--db/docs/organization_details.yml10
-rw-r--r--db/docs/p_catalog_resource_sync_events.yml13
-rw-r--r--db/docs/p_ci_finished_build_ch_sync_events.yml2
-rw-r--r--db/docs/p_ci_runner_machine_builds.yml2
-rw-r--r--db/docs/packages_tags.yml4
-rw-r--r--db/docs/project_ci_cd_settings.yml2
-rw-r--r--db/docs/projects.yml19
-rw-r--r--db/docs/sbom_occurrences_vulnerabilities.yml5
-rw-r--r--db/docs/security_findings.yml9
-rw-r--r--db/docs/users.yml7
-rw-r--r--db/docs/views/postgres_sequences.yml10
-rw-r--r--db/docs/work_item_dates_sources.yml12
-rw-r--r--db/docs/xray_reports.yml12
-rw-r--r--db/fixtures/development/01_admin.rb4
-rw-r--r--db/fixtures/development/02_users.rb4
-rw-r--r--db/fixtures/development/18_abuse_reports.rb4
-rw-r--r--db/fixtures/development/27_product_analytics_events.rb56
-rw-r--r--db/fixtures/development/33_triage_ops.rb21
-rw-r--r--db/fixtures/development/37_timelogs.rb6
-rw-r--r--db/gitlab_schemas/gitlab_ci.yaml1
-rw-r--r--db/gitlab_schemas/gitlab_internal.yaml1
-rw-r--r--db/gitlab_schemas/gitlab_main.yaml1
-rw-r--r--db/gitlab_schemas/gitlab_main_cell.yaml1
-rw-r--r--db/gitlab_schemas/gitlab_main_clusterwide.yaml1
-rw-r--r--db/gitlab_schemas/gitlab_pm.yaml1
-rw-r--r--db/gitlab_schemas/gitlab_shared.yaml1
-rw-r--r--db/init_structure.sql4980
-rw-r--r--db/migrate/20220126191624_add_scan_file_path_to_dast_site_profile.rb14
-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/20220406193806_add_maven_package_requests_forwarding_to_application_settings.rb13
-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/20220603125200_add_show_diff_preview_in_email_to_namespace_settings.rb9
-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/20220613112029_add_namespace_id_to_protected_branches.rb9
-rw-r--r--db/migrate/20220613112030_add_namespace_id_indexes_foreign_key_to_protected_branches.rb19
-rw-r--r--db/migrate/20220613112031_add_group_or_project_constraint_in_protected_branches.rb18
-rw-r--r--db/migrate/20220613112032_change_project_id_null_in_protected_branches.rb13
-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/20220615172230_add_user_preference_to_turn_off_automatic_lists.rb13
-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/20220711142148_add_invitation_flow_enforcement_to_application_settings.rb10
-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/20220721065723_add_issue_branch_template_to_project_settings.rb17
-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/20220726171440_create_ghost_user_migrations.rb12
-rw-r--r--db/migrate/20220726171450_add_user_fk_to_ghost_user_migrations.rb15
-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/20220802200719_add_user_details_profile_fields.rb17
-rw-r--r--db/migrate/20220802202505_add_user_details_field_limits.rb25
-rw-r--r--db/migrate/20220803004853_add_auto_ban_user_to_namespace_settings.rb10
-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/20220803235114_add_auto_ban_user_to_application_settings.rb8
-rw-r--r--db/migrate/20220805154101_add_allow_run_pipelines_in_the_parent_project_setting.rb8
-rw-r--r--db/migrate/20220805180311_add_unique_index_on_sbom_component_type_and_name.rb15
-rw-r--r--db/migrate/20220805183952_add_unique_index_to_sbom_component_versions_on_component_id_and_version.rb15
-rw-r--r--db/migrate/20220805193117_add_unique_index_to_sbom_sources_on_source_type_and_source.rb15
-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/20220815152905_create_vulnerability_advisories.rb25
-rw-r--r--db/migrate/20220816135816_create_sbom_vulnerable_component_versions.rb18
-rw-r--r--db/migrate/20220817122907_re_add_show_diff_preview_in_email_to_project_settings.rb9
-rw-r--r--db/migrate/20220818095225_add_max_pages_custom_domains_per_project.rb20
-rw-r--r--db/migrate/20220818125332_add_jitsu_tracking_columns_to_application_settings.rb15
-rw-r--r--db/migrate/20220818125703_add_jitsu_tracking_columns_to_application_settings_text_limits.rb19
-rw-r--r--db/migrate/20220818132108_add_deleted_on_to_ml_experiments.rb7
-rw-r--r--db/migrate/20220818140553_add_unique_index_to_sbom_occurrences_on_ingestion_attributes.rb22
-rw-r--r--db/migrate/20220819153725_add_vulnerability_advisory_foreign_key_to_sbom_vulnerable_component_versions.rb19
-rw-r--r--db/migrate/20220819162852_add_sbom_component_version_foreign_key_to_sbom_vulnerable_component_versions.rb19
-rw-r--r--db/migrate/20220819184945_add_dashboard_limit_to_application_settings.rb11
-rw-r--r--db/migrate/20220822102651_add_namespace_id_to_broadcast_message.rb9
-rw-r--r--db/migrate/20220822103638_add_index_and_foreign_key_to_broadcast_message.rb17
-rw-r--r--db/migrate/20220824175648_limit_namespaces_sync_triggers_to_traversal_ids_update.rb35
-rw-r--r--db/migrate/20220824194103_remove_existing_work_item_type_backfill_migrations.rb22
-rw-r--r--db/migrate/20220825105631_add_cube_api_key_to_application_settings.rb11
-rw-r--r--db/migrate/20220825134827_remove_not_null_constraint_for_confidence_columns.rb15
-rw-r--r--db/migrate/20220828094411_add_rpm_max_file_size_to_plan_limits.rb9
-rw-r--r--db/migrate/20220828131848_create_packages_rpm_metadata.rb30
-rw-r--r--db/migrate/20220829183356_replace_index_on_credit_card_validations.rb20
-rw-r--r--db/migrate/20220830082928_add_text_limit_to_cube_api_base_url.rb13
-rw-r--r--db/migrate/20220830114228_create_dora_configuration_table.rb16
-rw-r--r--db/migrate/20220831182105_add_constraints_view.rb32
-rw-r--r--db/migrate/20220901035722_add_temp_project_member_index.rb16
-rw-r--r--db/migrate/20220901090004_add_can_create_group_to_application_settings.rb7
-rw-r--r--db/migrate/20220901092853_update_can_create_group_application_setting.rb26
-rw-r--r--db/migrate/20220901114501_only_allow_merge_if_all_status_checks_passed.rb7
-rw-r--r--db/migrate/20220901124637_add_last_downloaded_at_to_packages.rb7
-rw-r--r--db/migrate/20220901131828_add_environments_project_name_lower_pattern_ops_index.rb15
-rw-r--r--db/migrate/20220901212027_add_merge_request_id_to_environments.rb7
-rw-r--r--db/migrate/20220902065314_create_ci_partitions.rb9
-rw-r--r--db/migrate/20220902065316_create_default_partition_record.rb21
-rw-r--r--db/migrate/20220902065317_add_partition_id_to_ci_builds.rb11
-rw-r--r--db/migrate/20220902065558_add_partition_id_to_ci_builds_metadata.rb9
-rw-r--r--db/migrate/20220902065611_add_partition_id_to_ci_job_artifacts.rb9
-rw-r--r--db/migrate/20220902065623_add_partition_id_to_ci_pipelines.rb9
-rw-r--r--db/migrate/20220902065635_add_partition_id_to_ci_stages.rb9
-rw-r--r--db/migrate/20220902065647_add_partition_id_to_ci_pipeline_variables.rb9
-rw-r--r--db/migrate/20220902165931_index_evironments_on_merge_request_id.rb15
-rw-r--r--db/migrate/20220902170131_add_fk_constraint_to_environments_merge_request_id.rb13
-rw-r--r--db/migrate/20220906093857_add_column_branch_filter_strategy_to_web_hooks.rb7
-rw-r--r--db/migrate/20220906155105_add_start_time_and_end_time_and_status_to_ml_candidates.rb9
-rw-r--r--db/migrate/20220906204832_add_locked_to_ci_pipeline_artifacts.rb20
-rw-r--r--db/migrate/20220907115806_add_security_orchestration_policy_configuration_id.rb58
-rw-r--r--db/migrate/20220907124320_add_internal_to_notes_renamed.rb11
-rw-r--r--db/migrate/20220909091410_add_dismissal_reason_to_vulnerability_state_transitions.rb7
-rw-r--r--db/migrate/20220909094752_add_free_user_cap_over_limt_notified_at_to_namespace_details.rb20
-rw-r--r--db/migrate/20220909113809_add_environments_project_name_lower_pattern_ops_state_index.rb15
-rw-r--r--db/migrate/20220912153839_create_packages_rpm_repository_file.rb25
-rw-r--r--db/migrate/20220912180807_add_epoch_column_to_rpm_metadata.rb7
-rw-r--r--db/migrate/20220913043728_create_user_phone_number_validations.rb29
-rw-r--r--db/migrate/20220913082728_drop_index_cadence_create_iterations_automation.rb21
-rw-r--r--db/migrate/20220913082824_finalize_invalid_group_member_cleanup.rb19
-rw-r--r--db/migrate/20220913082930_rename_iterations_cadences_last_run_date_to_next_run_date.rb13
-rw-r--r--db/migrate/20220913084123_add_timestamp_to_ml_candidate_metrics.rb7
-rw-r--r--db/migrate/20220914005141_change_namespace_id_not_null_in_members.rb13
-rw-r--r--db/migrate/20220914010233_change_members_namespace_foreign_key_on_delete_constraint.rb30
-rw-r--r--db/migrate/20220914070927_finalize_invalid_project_member_cleanup.rb19
-rw-r--r--db/migrate/20220914080716_add_index_to_candidate_id_and_name_on_ml_candidate_params.rb15
-rw-r--r--db/migrate/20220914112457_add_reject_non_dco_commits_to_push_rules.rb7
-rw-r--r--db/migrate/20220914130800_add_jitsu_key_to_projects.rb20
-rw-r--r--db/migrate/20220914131449_add_text_limit_to_projects_jitsu_key.rb13
-rw-r--r--db/migrate/20220914174705_remove_not_null_constraint_from_sbom_source_fingerprint.rb9
-rw-r--r--db/migrate/20220915140802_create_merge_request_predictions.rb20
-rw-r--r--db/migrate/20220916094641_add_source_id_to_bulk_import_entities.rb7
-rw-r--r--db/migrate/20220916103311_add_index_on_jira_connect_installations_instance_url.rb15
-rw-r--r--db/migrate/20220918124223_add_suggested_reviewers_enabled_to_project_settings.rb9
-rw-r--r--db/migrate/20220919062640_add_mirror_branch_regex_to_remote_mirrors.rb15
-rw-r--r--db/migrate/20220919225631_add_index_packages_packages_on_project_id_and_lower_version_to_packages.rb21
-rw-r--r--db/migrate/20220920022404_remove_temp_index_null_project_namespace_id.rb15
-rw-r--r--db/migrate/20220920135632_add_jira_connect_proxy_url_setting.rb10
-rw-r--r--db/migrate/20220920135717_add_textlimit_to_jira_connect_proxy_url_setting.rb13
-rw-r--r--db/migrate/20220921174815_add_secure_files_metadata.rb8
-rw-r--r--db/migrate/20220921201347_add_maven_package_requests_forwarding_to_namespace_package_settings.rb28
-rw-r--r--db/migrate/20220922143612_add_inbound_ci_job_token_project_scope_links.rb13
-rw-r--r--db/migrate/20220923103006_add_ci_pipeline_metadata_title.rb27
-rw-r--r--db/migrate/20220926023734_add_mirror_branch_regex_to_project_settings.rb12
-rw-r--r--db/migrate/20220927155407_add_column_inbound_job_token_scope_enabled_to_ci_cd_setting.rb13
-rw-r--r--db/migrate/20220928201920_create_project_wiki_repository_states.rb44
-rw-r--r--db/migrate/20220929171925_add_pypi_package_requests_forwarding_to_namespace_package_settings.rb28
-rw-r--r--db/migrate/20220929172356_add_npm_package_requests_forwarding_to_namespace_package_settings.rb28
-rw-r--r--db/migrate/20220930125609_add_migrated_to_state_transition_to_vulnerability_feedback.rb7
-rw-r--r--db/migrate/20221003151747_create_audit_events_streaming_event_type_filters.rb18
-rw-r--r--db/migrate/20221005072353_create_incident_management_timeline_event_tags.rb19
-rw-r--r--db/migrate/20221005094926_create_incident_management_timeline_event_tag_links.rb33
-rw-r--r--db/migrate/20221005103010_add_index_project_id_on_scan_finding_approval_project_rules.rb22
-rw-r--r--db/migrate/20221006131506_add_free_user_cap_over_limit_notified_at_to_namespace_details.rb20
-rw-r--r--db/migrate/20221006141145_add_targets_to_elastic_reindexing_tasks.rb7
-rw-r--r--db/migrate/20221008032350_add_password_expiration_migration.rb12
-rw-r--r--db/migrate/20221009085130_add_mr_checks_columns_to_namespace_settings.rb10
-rw-r--r--db/migrate/20221010103207_add_product_analytics_enabled_to_application_settings.rb7
-rw-r--r--db/migrate/20221010121807_add_compliance_framework_id_to_namespace_settings.rb7
-rw-r--r--db/migrate/20221010184839_add_new_amount_used_to_ci_project_monthly_usages.rb24
-rw-r--r--db/migrate/20221010201815_add_purl_type_to_sbom_components.rb7
-rw-r--r--db/migrate/20221010202339_remove_unique_index_on_sbom_components_type_and_name.rb15
-rw-r--r--db/migrate/20221010202408_add_unique_index_on_sbom_components_type_name_and_purl_type.rb15
-rw-r--r--db/migrate/20221011162637_add_partial_index_project_incident_management_settings_on_project_id_and_sla_timer.rb17
-rw-r--r--db/migrate/20221011210455_add_use_legacy_web_ide_to_user_preferences.rb9
-rw-r--r--db/migrate/20221012033107_add_password_last_changed_at_to_user_details.rb9
-rw-r--r--db/migrate/20221012135524_add_scan_file_path_limit_for_dast_site_profile.rb13
-rw-r--r--db/migrate/20221013103738_add_disable_admin_oauth_scopes.rb7
-rw-r--r--db/migrate/20221014031033_add_temp_index_to_project_features_where_releases_access_level_gt_repository.rb19
-rw-r--r--db/migrate/20221014034338_populate_releases_access_level_from_repository.rb21
-rw-r--r--db/migrate/20221014190040_drop_notes_note_trigram_index.rb17
-rw-r--r--db/migrate/20221015000511_add_email_confirmation_setting_to_application_settings.rb7
-rw-r--r--db/migrate/20221017084208_rename_ci_pipeline_metadata_title.rb13
-rw-r--r--db/migrate/20221018050323_add_objective_and_keyresult_to_work_item_types.rb56
-rw-r--r--db/migrate/20221018081416_members_remove_member_namespace_id_not_null_constraint.rb15
-rw-r--r--db/migrate/20221018092552_add_file_name_index_to_packages_rpm_repository_files.rb18
-rw-r--r--db/migrate/20221018124029_add_consume_after_to_ghost_user_migrations.rb7
-rw-r--r--db/migrate/20221018124035_add_consume_after_index_to_ghost_user_migrations.rb15
-rw-r--r--db/migrate/20221018202524_create_dependency_proxy_blob_states.rb49
-rw-r--r--db/migrate/20221020124018_add_delete_started_at_to_container_repositories.rb11
-rw-r--r--db/migrate/20221021213216_create_namespace_commit_emails.rb14
-rw-r--r--db/migrate/20221022213505_add_namespace_commit_emails_namespace_fk.rb15
-rw-r--r--db/migrate/20221022213521_add_namespace_commit_emails_email_fk.rb15
-rw-r--r--db/migrate/20221025043930_change_default_value_on_password_last_changed_at_to_user_details.rb13
-rw-r--r--db/migrate/20221025105205_add_status_and_id_index_to_container_repositories.rb15
-rw-r--r--db/migrate/20221025145452_change_vulnerability_feedback_unique_idx.rb25
-rw-r--r--db/migrate/20221025150202_add_index_for_finding_uuid_and_feedback_type_on_feedback.rb15
-rw-r--r--db/migrate/20221027124848_add_text_limit_to_project_settings_mirror_branch_regex.rb13
-rw-r--r--db/migrate/20221028015347_add_commit_committer_name_check_to_push_rules.rb7
-rw-r--r--db/migrate/20221028152422_add_finding_data_column_to_security_findings.rb13
-rw-r--r--db/migrate/20221031102916_add_users_foreign_key_to_projects.rb15
-rw-r--r--db/migrate/20221101032521_add_default_preferred_language_to_application_settings.rb10
-rw-r--r--db/migrate/20221101032600_add_text_limit_to_default_preferred_language_on_application_settings.rb15
-rw-r--r--db/migrate/20221101195903_change_email_confirmation_setting_default.rb7
-rw-r--r--db/migrate/20221101201031_set_email_confirmation_setting_from_send_user_confirmation_email_setting.rb22
-rw-r--r--db/migrate/20221102202130_extend_x509_subject_limit.rb11
-rw-r--r--db/migrate/20221102225800_add_max_seats_used_changed_at_index_to_gitlab_subscriptions.rb15
-rw-r--r--db/migrate/20221103131409_add_partial_index_on_primary_key_of_security_scans.rb15
-rw-r--r--db/migrate/20221104061320_add_disable_download_button_into_application_settings.rb8
-rw-r--r--db/migrate/20221104094042_remove_users_foreign_key_to_projects.rb15
-rw-r--r--db/migrate/20221107115247_change_scim_identity_group_id_remove_null.rb10
-rw-r--r--db/migrate/20221107115413_change_scim_oauth_access_token_group_id_remove_null.rb10
-rw-r--r--db/migrate/20221107183222_create_project_wiki_repositories.rb11
-rw-r--r--db/migrate/20221107184542_add_new_amount_used_to_ci_namespace_monthly_usages.rb24
-rw-r--r--db/migrate/20221108015813_add_telesign_to_application_settings.rb11
-rw-r--r--db/migrate/20221108185442_add_project_wiki_repository_id_to_project_wiki_repository_states.rb35
-rw-r--r--db/migrate/20221110105857_add_index_for_in_product_marketing_email_metrics.rb15
-rw-r--r--db/migrate/20221110150942_add_project_id_lower_name_index_remove_old_index.rb26
-rw-r--r--db/migrate/20230222161954_add_text_limit_to_custom_jira_regex_fields.rb2
-rw-r--r--db/migrate/20230426102200_fix_import_sources_on_application_settings_after_phabricator_removal.rb3
-rw-r--r--db/migrate/20230426161259_add_user_foreign_key_to_merge_request_diff_llm_summary.rb3
-rw-r--r--db/migrate/20230426161341_add_merge_request_diff_foreign_key_to_merge_request_diff_llm_summary.rb3
-rw-r--r--db/migrate/20230626065725_backfill_instance_audit_event_name.rb3
-rw-r--r--db/migrate/20231025191217_add_pre_receive_secret_detection_enabled_to_application_settings.rb9
-rw-r--r--db/migrate/20231026172345_add_allow_merge_without_pipeline_to_namespace_settings.rb10
-rw-r--r--db/migrate/20231026175042_add_allow_merge_without_pipeline_to_project_settings.rb10
-rw-r--r--db/migrate/20231029142649_add_make_profile_private_application_setting.rb9
-rw-r--r--db/migrate/20231031114050_add_highest_severity_and_vulnerability_count_into_sbom_occurrences.rb10
-rw-r--r--db/migrate/20231031164724_create_sbom_occurrences_vulnerabilities.rb16
-rw-r--r--db/migrate/20231031192803_remove_not_null_constraint_from_member_role.rb14
-rw-r--r--db/migrate/20231101171848_add_member_role_id_to_saml_providers.rb10
-rw-r--r--db/migrate/20231103160022_add_index_to_saml_providers_on_member_role_id.rb16
-rw-r--r--db/migrate/20231103160859_add_fk_to_member_role_on_saml_providers.rb16
-rw-r--r--db/migrate/20231103162825_add_wolfi_purl_type_to_package_metadata_purl_types.rb3
-rw-r--r--db/migrate/20231107140642_create_audit_events_instance_amazon_s3_configurations.rb24
-rw-r--r--db/migrate/20231107193342_add_search_vector_to_catalog_resources.rb22
-rw-r--r--db/migrate/20231108132916_index_batch_tracker_status.rb17
-rw-r--r--db/migrate/20231108143957_add_concurrent_direct_transfer_batch_limit_to_application_settings.rb9
-rw-r--r--db/migrate/20231109165512_add_enforce_ssh_certificates_to_namespace_settings.rb11
-rw-r--r--db/migrate/20231110044738_create_abuse_report_assignees_table.rb19
-rw-r--r--db/migrate/20231112213727_add_error_to_project_repository_storage_moves.rb20
-rw-r--r--db/migrate/20231112214803_add_error_to_group_repository_storage_moves.rb20
-rw-r--r--db/migrate/20231112223008_add_error_to_snippet_repository_storage_moves.rb20
-rw-r--r--db/migrate/20231113124342_add_status_to_packages_nuget_symbols.rb14
-rw-r--r--db/migrate/20231114034017_add_project_id_to_merge_request_diffs.rb10
-rw-r--r--db/migrate/20231114062200_add_max_workspaces_to_remote_development_agent_configs.rb10
-rw-r--r--db/migrate/20231114062215_add_max_workspaces_per_user_to_remote_development_agent_configs.rb10
-rw-r--r--db/migrate/20231114091124_add_object_format_to_project_repositories.rb11
-rw-r--r--db/migrate/20231114100444_add_can_create_organization_to_application_settings.rb9
-rw-r--r--db/migrate/20231114121812_drop_index_from_sbom_components.rb20
-rw-r--r--db/migrate/20231114131031_add_partition_id_to_ci_job_artifact_states.rb11
-rw-r--r--db/migrate/20231114133600_add_default_resources_per_workspace_container_to_remote_development_agent_configs.rb11
-rw-r--r--db/migrate/20231114133619_add_max_resources_per_workspace_to_remote_development_agent_configs.rb10
-rw-r--r--db/migrate/20231114152304_add_approver_to_notification_settings.rb10
-rw-r--r--db/migrate/20231114231330_add_released_at_to_catalog_resource_versions.rb25
-rw-r--r--db/migrate/20231115064007_create_audit_events_streaming_http_instance_namespace_filters.rb21
-rw-r--r--db/migrate/20231115081652_add_home_organization_id_to_user_preferences.rb10
-rw-r--r--db/migrate/20231115101002_add_promote_ultimate_features_at_to_onboarding_progresses.rb11
-rw-r--r--db/migrate/20231116062200_add_workspaces_quota_to_remote_development_agent_configs.rb10
-rw-r--r--db/migrate/20231116062215_add_workspaces_per_user_quota_to_remote_development_agent_configs.rb10
-rw-r--r--db/migrate/20231116065541_add_duration_to_issue_stage_events.rb9
-rw-r--r--db/migrate/20231116071027_add_duration_to_mr_stage_events.rb9
-rw-r--r--db/migrate/20231116115237_add_destination_fk_to_audit_events_http_instance_namespace_filters.rb21
-rw-r--r--db/migrate/20231116115303_add_namespace_fk_to_audit_events_http_instance_namespace_filters.rb21
-rw-r--r--db/migrate/20231117031416_add_web_ide_oauth_application_to_settings.rb9
-rw-r--r--db/migrate/20231117031559_add_fk_web_ide_oauth_application.rb22
-rw-r--r--db/migrate/20231117140201_add_applies_to_all_protected_branches_to_approval_group_rules.rb13
-rw-r--r--db/migrate/20231117211214_add_auto_cancel_on_job_failure_to_ci_pipeline_metadata.rb10
-rw-r--r--db/migrate/20231120071202_remove_not_null_constraint_from_member_role_column.rb14
-rw-r--r--db/migrate/20231120090305_create_organization_details.rb16
-rw-r--r--db/migrate/20231120105619_drop_idx_projects_on_mirror_last_successful_update_at.rb17
-rw-r--r--db/migrate/20231120142933_add_reopen_issue_on_external_participant_note_to_service_desk_settings.rb11
-rw-r--r--db/migrate/20231121092109_remove_ci_pipeline_metadata_name_not_null_constraint.rb17
-rw-r--r--db/migrate/20231121092128_add_auto_cancel_on_new_commit_to_ci_pipeline_metadata.rb10
-rw-r--r--db/migrate/20231121133727_change_marketing_emails_null_conditions.rb17
-rw-r--r--db/migrate/20231121152706_add_foreign_key_on_sbom_occurrences_vulnerabilities_vulnerability_id.rb20
-rw-r--r--db/migrate/20231122072428_add_home_organization_id_index_to_user_preferences.rb16
-rw-r--r--db/migrate/20231123035033_add_generated_to_merge_request_context_commit_diff_files.rb11
-rw-r--r--db/migrate/20231123125750_add_foreign_key_on_sbom_occurrences_vulnerabilities_occurrence_id.rb20
-rw-r--r--db/migrate/20231123141633_add_member_role_id_to_saml_group_links.rb10
-rw-r--r--db/migrate/20231123151831_add_index_to_saml_group_links_on_member_role_id.rb16
-rw-r--r--db/migrate/20231123151956_add_fk_to_member_role_on_saml_group_links.rb16
-rw-r--r--db/migrate/20231123165947_change_fk_to_member_role_on_members_from_cascade_to_nullify.rb24
-rw-r--r--db/migrate/20231124112409_add_instance_level_ai_beta_features_enabled_to_app_settings.rb9
-rw-r--r--db/migrate/20231124134838_add_index_dependency_proxy_package_settings_enabled_for_maven.rb22
-rw-r--r--db/migrate/20231124191759_add_catalog_resource_sync_events_table.rb39
-rw-r--r--db/migrate/20231124282441_add_catalog_resource_sync_event_triggers.rb44
-rw-r--r--db/migrate/20231126192652_remove_unique_url_indices_from_zoekt_nodes.rb19
-rw-r--r--db/migrate/20231126200903_rename_container_registry_protection_rules_container_path_pattern.rb16
-rw-r--r--db/migrate/20231126200904_rename_index_i_container_protection_unique_project_id_container_path_pattern.rb23
-rw-r--r--db/migrate/20231129124754_add_cascading_toggle_security_policy_custom_ci_setting.rb17
-rw-r--r--db/migrate/20231129211524_add_project_xray_report_model.rb19
-rw-r--r--db/migrate/20231129231159_add_security_txt_content_to_application_settings.rb20
-rw-r--r--db/migrate/20231130192752_add_options_to_elastic_reindexing_tasks.rb9
-rw-r--r--db/migrate/20231130195635_add_model_registry_access_level_to_project_feature.rb16
-rw-r--r--db/migrate/20231201095326_add_home_organization_id_fk_to_user_preferences.rb16
-rw-r--r--db/migrate/20231201113901_add_url_sub_fields_to_workspace.rb22
-rw-r--r--db/migrate/20231201114233_remove_not_null_constraint_from_url_column.rb14
-rw-r--r--db/migrate/20231201122830_add_owasp_top_10_to_vulnerability_reads.rb10
-rw-r--r--db/migrate/20231204144300_add_index_service_desk_settings_on_custom_email_enabled.rb17
-rw-r--r--db/migrate/20231204192313_add_avatar_to_organization_details.rb20
-rw-r--r--db/migrate/20231205141450_add_nuget_symbol_server_enabled_to_namespace_package_settings.rb19
-rw-r--r--db/migrate/20231205163658_add_code_suggestions_to_project_setting.rb10
-rw-r--r--db/migrate/20231205201701_remove_geo_primary_deprecated_workers_job_instances.rb24
-rw-r--r--db/migrate/20231206144919_add_repository_xray_plan_limit.rb10
-rw-r--r--db/migrate/20231206183312_add_use_web_ide_extension_marketplace_to_user_preferences.rb10
-rw-r--r--db/migrate/20231207144215_add_postgres_sequences_view.rb28
-rw-r--r--db/migrate/20231207150738_add_work_item_dates_sources.rb32
-rw-r--r--db/migrate/20231207150739_add_work_item_dates_sources_foreing_keys.rb28
-rw-r--r--db/migrate/20231211100717_add_source_package_name_to_sbom_component_versions.rb21
-rw-r--r--db/migrate/20231213112726_add_trigram_index_to_compliance_management_frameworks_on_name.rb19
-rw-r--r--db/migrate/20231214064934_add_arkose_labs_data_exchange_key_to_application_settings.rb10
-rw-r--r--db/migrate/20231214164411_add_code_added_at_to_onboarding_progresses.rb11
-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/20220601110011_schedule_remove_self_managed_wiki_notes.rb35
-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/20220606054503_add_tmp_index_job_artifacts_id_and_expire_at.rb29
-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/20220606080509_fix_incorrect_job_artifacts_expire_at.rb31
-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/20220615154500_schedule_backfill_cluster_agents_has_vulnerabilities.rb30
-rw-r--r--db/post_migrate/20220616092541_prepare_index_issues_on_project_id_and_closed_at.rb20
-rw-r--r--db/post_migrate/20220616171355_update_vulnerabilities_project_id_id_active_cis_index.rb24
-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/20220706145113_backfill_namespace_id_on_issues.rb28
-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/20220707192420_remove_tmp_idx_merge_requests_draft_and_status.rb18
-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/20220726225114_remove_tmp_index_group_membership_namespace_id_column.rb17
-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/20220801155858_schedule_disable_legacy_open_source_licence_for_recent_public_projects.rb33
-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/20220809002011_schedule_destroy_invalid_group_members.rb22
-rw-r--r--db/post_migrate/20220809214730_add_note_metadata_temp_index_on_id_where_task.rb15
-rw-r--r--db/post_migrate/20220809223215_change_task_system_note_wording_to_checklist_item.rb28
-rw-r--r--db/post_migrate/20220810093742_add_async_tmp_index_job_artifacts_id_and_expire_at.rb23
-rw-r--r--db/post_migrate/20220815061621_rename_web_hooks_service_id_to_integration_id.rb13
-rw-r--r--db/post_migrate/20220816075638_drop_uuid_and_id_index_from_security_findings.rb15
-rw-r--r--db/post_migrate/20220816163444_update_start_date_for_iterations_cadences.rb53
-rw-r--r--db/post_migrate/20220820221036_update_tmp_non_migrated_index_on_container_repositories.rb25
-rw-r--r--db/post_migrate/20220822071909_remove_other_role_from_user_details.rb9
-rw-r--r--db/post_migrate/20220822090656_drop_build_coverage_regex_from_project.rb13
-rw-r--r--db/post_migrate/20220822094804_add_issues_authorization_index.rb15
-rw-r--r--db/post_migrate/20220823084747_prepare_removal_partial_trigram_indexes_for_issues.rb16
-rw-r--r--db/post_migrate/20220824114218_add_tmp_index_approval_merge_request_rules.rb19
-rw-r--r--db/post_migrate/20220825061250_drop_tmp_index_todos_attention_request_action_idx.rb18
-rw-r--r--db/post_migrate/20220825142324_replace_issues_authorization_index.rb18
-rw-r--r--db/post_migrate/20220826165048_drop_temporary_job_trace_index.rb13
-rw-r--r--db/post_migrate/20220826175058_fully_remove_temporary_job_trace_index.rb15
-rw-r--r--db/post_migrate/20220830051704_add_temporary_index_for_orphaned_invited_members.rb21
-rw-r--r--db/post_migrate/20220830061704_orphaned_invited_members_cleanup.rb29
-rw-r--r--db/post_migrate/20220830071704_remove_temporary_index_for_orphaned_invited_members.rb21
-rw-r--r--db/post_migrate/20220830172142_reschedule_issue_work_item_type_id_backfill.rb40
-rw-r--r--db/post_migrate/20220831021358_add_index_on_issue_health_status.rb16
-rw-r--r--db/post_migrate/20220831090454_cleanup_web_hooks_service_id.rb13
-rw-r--r--db/post_migrate/20220831132802_delete_approval_rules_for_vulnerability.rb42
-rw-r--r--db/post_migrate/20220901035725_schedule_destroy_invalid_project_members.rb20
-rw-r--r--db/post_migrate/20220901071310_add_tmp_index_user_callouts_on_attention_request_feature_names.rb18
-rw-r--r--db/post_migrate/20220901071355_cleanup_attention_request_user_callouts.rb18
-rw-r--r--db/post_migrate/20220901073300_remove_partial_trigram_indexes_for_issues.rb25
-rw-r--r--db/post_migrate/20220901184106_add_not_null_to_board_group_recent_visits.rb17
-rw-r--r--db/post_migrate/20220901184246_add_not_null_to_board_project_recent_visits.rb17
-rw-r--r--db/post_migrate/20220902111016_delete_null_records_from_board_group_recent_visits.rb15
-rw-r--r--db/post_migrate/20220902111038_delete_null_records_from_board_project_recent_visits.rb15
-rw-r--r--db/post_migrate/20220902204048_move_security_findings_table_to_gitlab_partitions_dynamic_schema.rb230
-rw-r--r--db/post_migrate/20220904173342_validate_not_null_constraint_board_group_recent_visits.rb15
-rw-r--r--db/post_migrate/20220904173430_validate_not_null_constraint_board_project_recent_visits.rb15
-rw-r--r--db/post_migrate/20220905090300_add_tmp_index_merge_request_reviewers_attention_request_state.rb18
-rw-r--r--db/post_migrate/20220905090339_reset_attention_requested_merge_requests_reviewers_state_to_unreviewed.rb30
-rw-r--r--db/post_migrate/20220905112710_add_async_index_to_todos_to_cover_pending_query.rb16
-rw-r--r--db/post_migrate/20220905120848_backfill_epic_cache_counts.rb29
-rw-r--r--db/post_migrate/20220906074449_schedule_disable_legacy_open_source_license_for_projects_less_than_one_mb.rb33
-rw-r--r--db/post_migrate/20220906212931_add_partial_index_for_ci_pipeline_artifacts_unlocked_with_expire_at.rb17
-rw-r--r--db/post_migrate/20220907122648_populate_security_orchestration_policy_configuration_id.rb38
-rw-r--r--db/post_migrate/20220908125146_remove_free_user_cap_remediation_worker.rb11
-rw-r--r--db/post_migrate/20220909114220_drop_environments_project_name_lower_pattern_ops_index.rb16
-rw-r--r--db/post_migrate/20220912085047_add_index_to_todos_pending_query.rb16
-rw-r--r--db/post_migrate/20220912110433_prepare_create_internal_notes_index_on_id.rb13
-rw-r--r--db/post_migrate/20220913030552_add_tmp_index_system_note_metadata_on_attention_request_actions.rb17
-rw-r--r--db/post_migrate/20220913030624_cleanup_attention_request_related_system_notes.rb30
-rw-r--r--db/post_migrate/20220913083015_clean_up_rename_iterations_cadences_last_run_date_to_next_run_date.rb13
-rw-r--r--db/post_migrate/20220914093408_add_unique_id_partition_id_index_to_ci_build_metadata.rb14
-rw-r--r--db/post_migrate/20220915103831_add_unique_build_id_partition_id_index_to_ci_build_metadata.rb14
-rw-r--r--db/post_migrate/20220915192521_prepare_async_trigram_index_for_vulnerability_reads_container_images.rb19
-rw-r--r--db/post_migrate/20220916054103_remove_experience_level_column.rb13
-rw-r--r--db/post_migrate/20220916065418_add_index_id_partition_id_to_ci_builds_metadata.rb16
-rw-r--r--db/post_migrate/20220916070101_add_index_build_id_partition_id_to_ci_build_metadata.rb16
-rw-r--r--db/post_migrate/20220916112841_remove_unused_aggregation_columns.rb59
-rw-r--r--db/post_migrate/20220919023208_drop_unused_fields_from_merge_request_assignees.rb40
-rw-r--r--db/post_migrate/20220919041604_drop_unused_fields_from_merge_request_reviewers.rb26
-rw-r--r--db/post_migrate/20220919050555_drop_tmp_index_user_callouts_on_attention_request_feature_names.rb18
-rw-r--r--db/post_migrate/20220919080303_delete_migrate_shared_vulnerability_scanners.rb44
-rw-r--r--db/post_migrate/20220919080304_reschedule_migrate_shared_vulnerability_scanners.rb29
-rw-r--r--db/post_migrate/20220920081631_prepare_ci_builds_metadata_for_partitioning_primary_key.rb36
-rw-r--r--db/post_migrate/20220920122121_schedule_index_removal_for_ci_builds_metadata.rb16
-rw-r--r--db/post_migrate/20220920124709_backfill_internal_on_notes_renamed.rb28
-rw-r--r--db/post_migrate/20220920135356_tiebreak_user_type_index.rb20
-rw-r--r--db/post_migrate/20220920141001_add_index_on_internal_notes.rb15
-rw-r--r--db/post_migrate/20220920213504_finalize_task_system_note_renaming.rb11
-rw-r--r--db/post_migrate/20220920214524_remove_task_system_note_rename_temp_index.rb11
-rw-r--r--db/post_migrate/20220921093355_schedule_backfill_namespace_details.rb29
-rw-r--r--db/post_migrate/20220921111823_remove_and_add_ci_pipeline_variables_raw_with_new_default.rb10
-rw-r--r--db/post_migrate/20220921111831_remove_and_add_ci_group_variables_raw_with_new_default.rb10
-rw-r--r--db/post_migrate/20220921111840_remove_and_add_ci_instance_variables_raw_with_new_default.rb10
-rw-r--r--db/post_migrate/20220921111849_remove_and_add_ci_job_variables_raw_with_new_default.rb10
-rw-r--r--db/post_migrate/20220921111857_remove_and_add_ci_pipeline_schedule_variables_raw_with_new_default.rb10
-rw-r--r--db/post_migrate/20220921111907_remove_and_add_ci_variables_raw_with_new_default.rb10
-rw-r--r--db/post_migrate/20220921144258_remove_orphan_group_token_users.rb40
-rw-r--r--db/post_migrate/20220922090236_remove_trace_column_from_ci_builds.rb9
-rw-r--r--db/post_migrate/20220922143143_schedule_reset_duplicate_ci_runners_token_values.rb28
-rw-r--r--db/post_migrate/20220922143634_schedule_reset_duplicate_ci_runners_token_encrypted_values.rb28
-rw-r--r--db/post_migrate/20220922204106_remove_index_for_requested_non_invited_awaiting_members.rb17
-rw-r--r--db/post_migrate/20220923052531_remove_tmp_index_merge_request_reviewers_on_attention_requested_state.rb18
-rw-r--r--db/post_migrate/20220923060226_remove_tmp_index_system_note_metadata_on_attention_request_actions.rb17
-rw-r--r--db/post_migrate/20220927171740_prepare_for_vulnerability_occurrences_uuid_type_transition.rb26
-rw-r--r--db/post_migrate/20220928225711_schedule_update_ci_pipeline_artifacts_locked_status.rb27
-rw-r--r--db/post_migrate/20220929081645_tmp_idx_null_member_namespace_id.rb17
-rw-r--r--db/post_migrate/20220929091500_add_tmp_index_vulns_on_report_type.rb22
-rw-r--r--db/post_migrate/20220929101947_delete_remove_invalid_member_migration.rb19
-rw-r--r--db/post_migrate/20220929194453_add_index_releases_project_id_id.rb15
-rw-r--r--db/post_migrate/20220929213730_schedule_delete_orphaned_operational_vulnerabilities.rb25
-rw-r--r--db/post_migrate/20220930110127_remove_unique_index_build_id_to_ci_builds_metadata.rb16
-rw-r--r--db/post_migrate/20221002234454_finalize_group_member_namespace_id_migration.rb22
-rw-r--r--db/post_migrate/20221003192827_add_index_resolved_on_default_branch_to_vulnerabilities_read.rb18
-rw-r--r--db/post_migrate/20221004074910_routing_table_prepare_constraint_for_builds_metadata.rb30
-rw-r--r--db/post_migrate/20221004074914_create_routing_table_for_builds_metadata.rb7
-rw-r--r--db/post_migrate/20221004092038_tmp_index_members_on_id_where_namespace_id_null.rb17
-rw-r--r--db/post_migrate/20221004094814_schedule_destroy_invalid_members.rb27
-rw-r--r--db/post_migrate/20221005103000_add_index_merge_request_id_on_scan_finding_approval_merge_request_rules.rb17
-rw-r--r--db/post_migrate/20221006070927_finalize_invalid_member_cleanup.rb22
-rw-r--r--db/post_migrate/20221006083240_prepare_partial_trigram_indexes_for_issues_attempt_2.rb25
-rw-r--r--db/post_migrate/20221006172302_adjust_task_note_rename_background_migration_values.rb72
-rw-r--r--db/post_migrate/20221010074914_migrate_security_findings_delete_queues.rb16
-rw-r--r--db/post_migrate/20221010121510_prepare_async_index_author_id_target_project_id_on_merge_requests.rb15
-rw-r--r--db/post_migrate/20221010122138_add_async_index_author_id_target_project_id_on_merge_requests.rb15
-rw-r--r--db/post_migrate/20221010122352_add_index_to_namespace_settings_on_default_compliance_framework_id.rb15
-rw-r--r--db/post_migrate/20221010123040_add_compliance_framework_fk_to_namespace_settings.rb16
-rw-r--r--db/post_migrate/20221010141500_add_index_author_id_target_project_id_on_merge_requests.rb15
-rw-r--r--db/post_migrate/20221010162137_add_index_author_id_and_id_on_merge_requests.rb15
-rw-r--r--db/post_migrate/20221011062254_sync_new_amount_used_for_ci_project_monthly_usages.rb19
-rw-r--r--db/post_migrate/20221011113928_redo_remove_and_add_ci_job_variables_raw_with_new_default.rb12
-rw-r--r--db/post_migrate/20221012182701_remove_namespace_settings_cohort_free_user_cap_columns.rb15
-rw-r--r--db/post_migrate/20221013154159_update_invalid_dormant_user_setting.rb17
-rw-r--r--db/post_migrate/20221013215832_cleanup_vulnerability_state_transitions_with_same_from_state_to_state.rb19
-rw-r--r--db/post_migrate/20221017084227_cleanup_rename_ci_pipeline_metadata_title.rb13
-rw-r--r--db/post_migrate/20221018062308_schedule_backfill_project_namespace_details.rb29
-rw-r--r--db/post_migrate/20221018193635_ensure_task_note_renaming_background_migration_finished.rb22
-rw-r--r--db/post_migrate/20221018193827_drop_tmp_index_system_note_metadata_on_id_where_task.rb15
-rw-r--r--db/post_migrate/20221018232820_add_temp_index_for_user_details_fields.rb24
-rw-r--r--db/post_migrate/20221019002459_queue_backfill_user_details_fields.rb16
-rw-r--r--db/post_migrate/20221019102426_remove_tmp_index_approval_merge_request_rules_on_report_type.rb18
-rw-r--r--db/post_migrate/20221019105041_queue_populate_projects_star_count.rb22
-rw-r--r--db/post_migrate/20221019141508_add_index_to_test_reports_issue_id_created_at_and_id.rb16
-rw-r--r--db/post_migrate/20221019194751_disable_fastupdate_on_issues_title_gin_index.rb27
-rw-r--r--db/post_migrate/20221019195754_disable_fastupdate_on_issues_description_gin_index.rb27
-rw-r--r--db/post_migrate/20221019200033_disable_fastupdate_on_merge_requests_title_gin_index.rb27
-rw-r--r--db/post_migrate/20221019200206_disable_fastupdate_on_merge_requests_description_gin_index.rb27
-rw-r--r--db/post_migrate/20221021082720_drop_index_on_ci_runners_token.rb17
-rw-r--r--db/post_migrate/20221021082734_drop_index_on_ci_runners_token_encrypted.rb17
-rw-r--r--db/post_migrate/20221021145820_create_routing_table_for_builds_metadata_v2.rb41
-rw-r--r--db/post_migrate/20221021160735_add_index_for_common_finder_query_desc_with_namespace_id.rb18
-rw-r--r--db/post_migrate/20221024034228_remove_sprints_project_id_column.rb38
-rw-r--r--db/post_migrate/20221024121500_drop_fingerprint_from_sbom_sources.rb9
-rw-r--r--db/post_migrate/20221025115006_check_vulnerabilities_state_transition_from_state_not_equal_to_state.rb19
-rw-r--r--db/post_migrate/20221025220607_add_index_id_on_scan_finding_approval_merge_request_rules.rb17
-rw-r--r--db/post_migrate/20221027203556_delete_experiment_user_foreign_keys.rb20
-rw-r--r--db/post_migrate/20221027203951_drop_experiment_users_table.rb21
-rw-r--r--db/post_migrate/20221028000041_remove_invalid_partial_trigram_indexes_for_issues.rb15
-rw-r--r--db/post_migrate/20221028000603_prepare_partial_trigram_indexes_for_issues_attempt_3.rb25
-rw-r--r--db/post_migrate/20221028022627_add_index_on_password_last_changed_at_to_user_details.rb15
-rw-r--r--db/post_migrate/20221102090940_create_next_ci_partitions_record.rb29
-rw-r--r--db/post_migrate/20221102090943_create_second_partition_for_builds_metadata.rb62
-rw-r--r--db/post_migrate/20221103073328_change_member_namespace_id_not_null.rb16
-rw-r--r--db/post_migrate/20221103084213_remove_tmp_index_members_on_id_where_namespace_id_null.rb15
-rw-r--r--db/post_migrate/20221103150250_migrate_sidekiq_queued_jobs.rb11
-rw-r--r--db/post_migrate/20221104042137_add_partial_trigram_index_for_issue_title_attempt_2.rb19
-rw-r--r--db/post_migrate/20221104042159_add_partial_trigram_index_for_issue_description_attempt_2.rb19
-rw-r--r--db/post_migrate/20221104074652_add_temp_index_for_project_statistics_upload_size_migration.rb19
-rw-r--r--db/post_migrate/20221104100203_recreate_async_trigram_index_for_vulnerability_reads_container_images.rb21
-rw-r--r--db/post_migrate/20221104170500_add_vulnerability_reads_all_status_index.rb14
-rw-r--r--db/post_migrate/20221104190203_validate_environment_id_on_deployments.rb11
-rw-r--r--db/post_migrate/20221107094359_recount_epic_cache_counts.rb29
-rw-r--r--db/post_migrate/20221107184758_sync_new_amount_used_for_ci_namespace_monthly_usages.rb19
-rw-r--r--db/post_migrate/20221107220420_validate_not_null_constraint_on_member_namespace_id.rb15
-rw-r--r--db/post_migrate/20221107220526_validate_fk_member_namespace_id.rb13
-rw-r--r--db/post_migrate/20221107222213_remove_old_member_namespace_id_fk.rb28
-rw-r--r--db/post_migrate/20221108045019_truncate_timeline_event_tags_table.rb15
-rw-r--r--db/post_migrate/20221108121322_add_supporting_index_for_vulnerabilities_feedback_migration.rb24
-rw-r--r--db/post_migrate/20221108222015_remove_temp_index_on_project_features_where_releases_access_level_gt_repository.rb18
-rw-r--r--db/post_migrate/20221110045406_sanitize_confidential_note_todos.rb15
-rw-r--r--db/post_migrate/20221111070314_prepare_removal_of_issue_trigram_indexes.rb16
-rw-r--r--db/post_migrate/20230113003255_remove_atlassian_refresh_token_constraint.rb3
-rw-r--r--db/post_migrate/20230113201308_backfill_namespace_ldap_settings.rb3
-rw-r--r--db/post_migrate/20230124104310_prepare_web_hook_logs_id_created_at_async_index.rb3
-rw-r--r--db/post_migrate/20230313150531_reschedule_migration_for_remediation.rb4
-rw-r--r--db/post_migrate/20230315161408_finalize_set_notifications_bigint_conversion_backfill.rb3
-rw-r--r--db/post_migrate/20230328184031_swap_sent_notifications_id_columns.rb3
-rw-r--r--db/post_migrate/20230404061832_drop_sync_index_ci_job_artifacts_on_expire_at_for_removal.rb3
-rw-r--r--db/post_migrate/20230405200858_requeue_backfill_project_wiki_repositories.rb2
-rw-r--r--db/post_migrate/20230420065656_finalize_fix_incoherent_packages_size_on_project_statistics.rb3
-rw-r--r--db/post_migrate/20230427194552_drop_cycle_analytics_unused_tables.rb3
-rw-r--r--db/post_migrate/20230501094322_prepare_removal_partial_index_deployments_for_project_id_and_tag.rb3
-rw-r--r--db/post_migrate/20230501180958_drop_clusters_applications_cert_managers.rb3
-rw-r--r--db/post_migrate/20230502134532_drop_clusters_applications_cilium.rb3
-rw-r--r--db/post_migrate/20230502182754_drop_clusters_applications_crossplane.rb3
-rw-r--r--db/post_migrate/20230502193525_drop_clusters_applications_helm.rb3
-rw-r--r--db/post_migrate/20230502201251_drop_clusters_applications_ingress.rb3
-rw-r--r--db/post_migrate/20230503115918_drop_clusters_applications_jupyter.rb3
-rw-r--r--db/post_migrate/20230503152349_drop_clusters_applications_knative.rb3
-rw-r--r--db/post_migrate/20230503173101_drop_clusters_applications_prometheus.rb3
-rw-r--r--db/post_migrate/20230503175406_drop_clusters_applications_runners.rb3
-rw-r--r--db/post_migrate/20230503181808_drop_serverless_domain_cluster.rb3
-rw-r--r--db/post_migrate/20230508150219_reschedule_evidences_handling_unicode.rb2
-rw-r--r--db/post_migrate/20230515153600_finalize_back_fill_prepared_at_merge_requests.rb3
-rw-r--r--db/post_migrate/20230522111534_reschedule_migration_for_links_from_metadata.rb4
-rw-r--r--db/post_migrate/20230605192000_drop_tmp_index_oauth_access_tokens_on_id_where_expires_in_null.rb3
-rw-r--r--db/post_migrate/20230615030402_remove_audit_events_group_index.rb3
-rw-r--r--db/post_migrate/20230704042302_prepare_removal_index_deployments_on_project_id_sha.rb3
-rw-r--r--db/post_migrate/20230704044541_prepare_removal_index_deployments_on_project_id_and_status.rb3
-rw-r--r--db/post_migrate/20230704050739_prepare_removal_index_deployments_on_environment_id_and_iid_and_project_id.rb3
-rw-r--r--db/post_migrate/20230712052619_drop_index_deployments_on_project_id_and_status.rb3
-rw-r--r--db/post_migrate/20230712054057_drop_index_deployments_on_project_id_sha.rb3
-rw-r--r--db/post_migrate/20230712055956_drop_index_deployments_on_environment_id_and_iid_and_project_id.rb3
-rw-r--r--db/post_migrate/20230717062445_backfill_ci_stages_pipeline_id_conversion.rb3
-rw-r--r--db/post_migrate/20230724150939_index_projects_on_namespace_id_and_repository_size_limit.rb3
-rw-r--r--db/post_migrate/20230726080827_add_issue_search_data_namespace_id_foreign_key.rb3
-rw-r--r--db/post_migrate/20230818034041_prepare_removal_index_success_deployments_on_cluster_id_and_environment_id.rb3
-rw-r--r--db/post_migrate/20230906181457_add_index_to_violations_on_target_proj_id.rb2
-rw-r--r--db/post_migrate/20230912105945_queue_backfill_finding_id_in_vulnerabilities.rb17
-rw-r--r--db/post_migrate/20230929095008_drop_application_settings_product_analytics_cluster_settings.rb3
-rw-r--r--db/post_migrate/20230929095728_drop_project_settings_product_analytics_cluster_settings.rb3
-rw-r--r--db/post_migrate/20231001105945_requeue_backfill_finding_id_in_vulnerabilities.rb17
-rw-r--r--db/post_migrate/20231011142714_queue_backfill_has_remediations_of_vulnerability_reads.rb24
-rw-r--r--db/post_migrate/20231012180342_index_stopping_environments_on_updated_at.rb3
-rw-r--r--db/post_migrate/20231016173129_queue_delete_invalid_protected_branch_merge_access_levels.rb1
-rw-r--r--db/post_migrate/20231016194927_queue_delete_invalid_protected_branch_push_access_levels.rb1
-rw-r--r--db/post_migrate/20231016194943_queue_delete_invalid_protected_tag_create_access_levels.rb1
-rw-r--r--db/post_migrate/20231023113908_add_index_stopping_environments_on_updated_at.rb3
-rw-r--r--db/post_migrate/20231024073401_cleanup_ci_pipeline_variables_pipeline_id_bigint.rb32
-rw-r--r--db/post_migrate/20231027093009_drop_index_project_topics_on_project_id.rb18
-rw-r--r--db/post_migrate/20231029134824_remove_deployments_cluster_id.rb20
-rw-r--r--db/post_migrate/20231030071209_queue_backfill_packages_tags_project_id.rb1
-rw-r--r--db/post_migrate/20231031204841_requeue_backfill_has_remediations_of_vulnerability_reads.rb26
-rw-r--r--db/post_migrate/20231107092912_queue_backfill_branch_protection_namespace_setting.rb27
-rw-r--r--db/post_migrate/20231109120223_ensure_id_uniqueness_for_p_ci_builds_v4.rb42
-rw-r--r--db/post_migrate/20231109124031_ensure_id_uniqueness_for_p_ci_builds_v5.rb33
-rw-r--r--db/post_migrate/20231110173626_drop_merge_requests_on_author_id_index.rb19
-rw-r--r--db/post_migrate/20231113025718_drop_index_users_require_two_factor_authentication_from_group_false.rb20
-rw-r--r--db/post_migrate/20231113025733_drop_index_users_require_two_factor_authentication_from_group.rb20
-rw-r--r--db/post_migrate/20231113142618_remove_users_state_duplicated_index.rb18
-rw-r--r--db/post_migrate/20231113164909_drop_index_users_on_accepted_term_id.rb18
-rw-r--r--db/post_migrate/20231114000727_drop_index_namespaces_on_require_two_factor_authentication.rb19
-rw-r--r--db/post_migrate/20231114015857_finalize_packages_tags_project_id_backfill.rb23
-rw-r--r--db/post_migrate/20231114015923_validate_packages_tags_project_id_null_constraint.rb13
-rw-r--r--db/post_migrate/20231114034309_add_merge_request_diffs_project_id_not_null_constraint.rb14
-rw-r--r--db/post_migrate/20231114034507_add_merge_request_diffs_project_id_index_async.rb16
-rw-r--r--db/post_migrate/20231114043522_queue_backfill_merge_request_diffs_project_id.rb26
-rw-r--r--db/post_migrate/20231114053330_cleanup_ci_pipelines_auto_canceled_by_id_bigint.rb31
-rw-r--r--db/post_migrate/20231114091935_remove_member_namespace_id_index_from_members.rb17
-rw-r--r--db/post_migrate/20231115104943_remove_service_access_tokens_category_column.rb9
-rw-r--r--db/post_migrate/20231115172623_remove_name_description_trigram_indexes_from_catalog_resources.rb23
-rw-r--r--db/post_migrate/20231116105945_requeue_backfill_finding_id_in_vulnerabilities2.rb10
-rw-r--r--db/post_migrate/20231120070345_cleanup_ci_stages_pipeline_id_bigint.rb53
-rw-r--r--db/post_migrate/20231120161159_prepare_index_for_org_id_and_id_on_projects.rb15
-rw-r--r--db/post_migrate/20231121040153_add_merge_request_diffs_project_id_index.rb16
-rw-r--r--db/post_migrate/20231121040212_add_merge_request_diffs_project_id_foreign_key.rb17
-rw-r--r--db/post_migrate/20231122011731_drop_index_users_on_email_trigram.rb19
-rw-r--r--db/post_migrate/20231122084642_remove_partition_id_default_value_for_job_artifact_state.rb14
-rw-r--r--db/post_migrate/20231122100006_remove_custom_email_smtp_columns_from_service_desk_settings.rb32
-rw-r--r--db/post_migrate/20231122110442_drop_index_web_hooks_on_project_id.rb18
-rw-r--r--db/post_migrate/20231122111935_drop_index_web_hook_logs_part_on_web_hook_id.rb19
-rw-r--r--db/post_migrate/20231122114135_add_index_on_sbom_occurrences_highest_severity.rb23
-rw-r--r--db/post_migrate/20231122123408_drop_idx_jira_connect_subscriptions_on_installation_id.rb18
-rw-r--r--db/post_migrate/20231122124815_drop_index_bulk_import_batch_trackers_on_tracker_id.rb18
-rw-r--r--db/post_migrate/20231122125550_drop_index_bulk_import_export_batches_on_export_id.rb18
-rw-r--r--db/post_migrate/20231122130721_drop_index_project_relation_exports_on_project_export_job_id.rb18
-rw-r--r--db/post_migrate/20231124084532_remove_security_orchestration_policy_configurations_bot_user_id_column.rb25
-rw-r--r--db/post_migrate/20231124105726_drop_idx_service_desk_enabled_projects_on_id_creator_id_created_at_for_gitlab_com.rb33
-rw-r--r--db/post_migrate/20231124124600_drop_idx_projects_mirror_id_where_mirror_and_trigger_builds_for_gitlab_com.rb28
-rw-r--r--db/post_migrate/20231124124750_drop_idx_projects_on_mirror_creator_id_created_at_for_gitlab_com.rb33
-rw-r--r--db/post_migrate/20231124125007_drop_idx_projects_on_id_service_desk_enabled_for_gitlab_com.rb28
-rw-r--r--db/post_migrate/20231124132953_drop_idx_projects_id_created_at_disable_overriding_approvers_true_for_gitlab_com.rb33
-rw-r--r--db/post_migrate/20231124133015_drop_idx_projects_id_created_at_disable_overriding_approvers_false_for_gitlab_com.rb34
-rw-r--r--db/post_migrate/20231124180449_add_index_updated_at_to_bulk_import_batch_trackers.rb18
-rw-r--r--db/post_migrate/20231124213241_add_index_to_bulk_imports_on_updated_at_and_status.rb17
-rw-r--r--db/post_migrate/20231126220000_cleanup_container_registry_protection_rules_container_path_pattern_at_rename.rb27
-rw-r--r--db/post_migrate/20231127171903_remove_application_settings_columns.rb23
-rw-r--r--db/post_migrate/20231127174335_remove_ignored_application_settings_columns.rb28
-rw-r--r--db/post_migrate/20231127185327_fix_broken_user_achievements_awarded.rb28
-rw-r--r--db/post_migrate/20231127185328_fix_broken_user_achievements_revoked.rb28
-rw-r--r--db/post_migrate/20231128103624_add_unique_id_partition_id_index_to_ci_job_artifact.rb16
-rw-r--r--db/post_migrate/20231128104044_add_unique_job_id_filte_type_partition_id_index_to_ci_job_artifact.rb17
-rw-r--r--db/post_migrate/20231128111550_add_async_indexes_with_partition_id_for_ci_pipeline_variables.rb19
-rw-r--r--db/post_migrate/20231128155514_finalize_backfill_admin_mode_scope_for_personal_access_tokens.rb21
-rw-r--r--db/post_migrate/20231128174345_remove_users_project_authorizations_user_id_fk.rb21
-rw-r--r--db/post_migrate/20231128201403_drop_index_users_for_auditors_for_gitlab_com.rb26
-rw-r--r--db/post_migrate/20231129105945_requeue_backfill_finding_id_in_vulnerabilities3.rb34
-rw-r--r--db/post_migrate/20231129132636_prepare_indexes_for_partitioning_ci_pipeline_variables.rb20
-rw-r--r--db/post_migrate/20231129154701_remove_users_events_author_id_fk.rb21
-rw-r--r--db/post_migrate/20231129170203_remove_requirements_ignored_columns.rb15
-rw-r--r--db/post_migrate/20231129192345_drop_projects_on_path_and_id_index.rb18
-rw-r--r--db/post_migrate/20231130131808_remove_indexes_without_partition_id_from_ci_pipeline_variables.rb17
-rw-r--r--db/post_migrate/20231130140901_queue_backfill_vs_code_settings_uuid.rb27
-rw-r--r--db/post_migrate/20231130142218_async_create_supporting_index_for_finding_id_backfill.rb25
-rw-r--r--db/post_migrate/20231130193042_add_index_to_bulk_import_entities_on_updated_at_and_status.rb17
-rw-r--r--db/post_migrate/20231130200216_drop_projects_on_created_at_and_id_index.rb18
-rw-r--r--db/post_migrate/20231201144826_finalize_backfill_dismissal_reason_in_vulnerability_reads.rb15
-rw-r--r--db/post_migrate/20231201171229_detect_and_fix_duplicate_organizations_path.rb35
-rw-r--r--db/post_migrate/20231201172203_add_organizations_path_unique_with_case_sensitivity.rb16
-rw-r--r--db/post_migrate/20231201204712_requeue2_backfill_has_remediations_of_vulnerability_reads.rb34
-rw-r--r--db/post_migrate/20231202175941_index_projects_on_organization_id_and_id.rb19
-rw-r--r--db/post_migrate/20231202180101_remove_index_on_organization_id_projects_table.rb16
-rw-r--r--db/post_migrate/20231204090310_add_unique_index_id_partition_id_to_ci_job_artifact.rb16
-rw-r--r--db/post_migrate/20231204090413_add_unique_index_job_id_filte_type_partition_id_to_ci_job_artifact.rb16
-rw-r--r--db/post_migrate/20231204154826_remove_organizations_path_without_case_sensitivity.rb16
-rw-r--r--db/post_migrate/20231205092529_drop_unique_index_job_id_file_type_to_ci_job_artifact.rb16
-rw-r--r--db/post_migrate/20231205111453_prepare_indexes_for_partitioning_ci_stages.rb20
-rw-r--r--db/post_migrate/20231205144253_schedule_index_to_ci_build_trace_metadata.rb18
-rw-r--r--db/post_migrate/20231205144349_schedule_index_to_ci_job_artifact_states.rb18
-rw-r--r--db/post_migrate/20231206115306_remove_index_users_with_static_object_token.rb19
-rw-r--r--db/post_migrate/20231206142250_sync_create_supporting_index_for_finding_id_backfill.rb25
-rw-r--r--db/post_migrate/20231206145850_finalize_backfill_code_suggestions_namespace_settings.rb21
-rw-r--r--db/post_migrate/20231206145911_finalize_backfill_design_management_repositories.rb21
-rw-r--r--db/post_migrate/20231206200121_remove_use_legacy_web_ide_column.rb14
-rw-r--r--db/post_migrate/20231207054819_cleanup_ci_stages_pipeline_id_bigint_for_self_host.rb53
-rw-r--r--db/post_migrate/20231207112632_add_unique_index_id_partition_id_to_ci_stages.rb17
-rw-r--r--db/post_migrate/20231207112650_add_unique_index_pipeline_id_name_partition_id_to_ci_stages.rb18
-rw-r--r--db/post_migrate/20231207115601_remove_unique_index_without_partition_id_from_ci_stages.rb17
-rw-r--r--db/post_migrate/20231207163648_re_finalize_backfill_dismissal_reason_in_vulnerability_reads.rb21
-rw-r--r--db/post_migrate/20231207194620_backfill_catalog_resources_visibility_level.rb25
-rw-r--r--db/post_migrate/20231207220916_finalize_backfill_missing_ci_cd_settings.rb21
-rw-r--r--db/post_migrate/20231207220935_finalize_backfill_missing_vulnerability_dismissal_details.rb21
-rw-r--r--db/post_migrate/20231207220954_finalize_backfill_project_statistics_storage_size_without_pipeline_artifacts_si.rb21
-rw-r--r--db/post_migrate/20231207221013_finalize_backfill_project_wiki_repositories.rb21
-rw-r--r--db/post_migrate/20231207221036_finalize_backfill_root_storage_statistics_fork_storage_sizes.rb21
-rw-r--r--db/post_migrate/20231207221056_finalize_backfill_uuid_conversion_column_in_vulnerability_occurrences.rb21
-rw-r--r--db/post_migrate/20231207221119_finalize_cleanup_personal_access_tokens_with_nil_expires_at.rb21
-rw-r--r--db/post_migrate/20231207221140_finalize_delete_orphaned_transferred_project_approval_rules.rb21
-rw-r--r--db/post_migrate/20231207221159_finalize_fix_allow_descendants_override_disabled_shared_runners.rb21
-rw-r--r--db/post_migrate/20231207221219_finalize_mark_duplicate_npm_packages_for_destruction.rb21
-rw-r--r--db/post_migrate/20231207221241_finalize_populate_vulnerability_dismissal_fields.rb21
-rw-r--r--db/post_migrate/20231207221300_finalize_remove_invalid_deploy_access_level_groups.rb21
-rw-r--r--db/post_migrate/20231208103049_drop_index_users_on_id_and_last_activity.rb28
-rw-r--r--db/post_migrate/20231212132322_prepare_ci_pipeline_variables_primary_key_for_partitioning.rb22
-rw-r--r--db/post_migrate/20231218062442_remove_max_workspaces_from_remote_development_agent_configs.rb10
-rw-r--r--db/post_migrate/20231218062505_remove_max_workspaces_per_user_from_remote_development_agent_configs.rb10
-rw-r--r--db/schema_migrations/202201261916241
-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/202204061938061
-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/202206011100111
-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/202206031252001
-rw-r--r--db/schema_migrations/202206031731031
-rw-r--r--db/schema_migrations/202206051700091
-rw-r--r--db/schema_migrations/202206060545031
-rw-r--r--db/schema_migrations/202206060608251
-rw-r--r--db/schema_migrations/202206060608501
-rw-r--r--db/schema_migrations/202206060805091
-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/202206131120291
-rw-r--r--db/schema_migrations/202206131120301
-rw-r--r--db/schema_migrations/202206131120311
-rw-r--r--db/schema_migrations/202206131120321
-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/202206151545001
-rw-r--r--db/schema_migrations/202206151722301
-rw-r--r--db/schema_migrations/202206160925411
-rw-r--r--db/schema_migrations/202206161713551
-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/202207061451131
-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/202207071924201
-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/202207111421481
-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/202207210657231
-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/202207261714401
-rw-r--r--db/schema_migrations/202207261714501
-rw-r--r--db/schema_migrations/202207261823101
-rw-r--r--db/schema_migrations/202207262251141
-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/202208011558581
-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/202208022007191
-rw-r--r--db/schema_migrations/202208022025051
-rw-r--r--db/schema_migrations/202208022047371
-rw-r--r--db/schema_migrations/202208030048531
-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/202208032351141
-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/202208051803111
-rw-r--r--db/schema_migrations/202208051839521
-rw-r--r--db/schema_migrations/202208051931171
-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/202208090020111
-rw-r--r--db/schema_migrations/202208092147301
-rw-r--r--db/schema_migrations/202208092232151
-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/202208150616211
-rw-r--r--db/schema_migrations/202208151529051
-rw-r--r--db/schema_migrations/202208160756381
-rw-r--r--db/schema_migrations/202208161358161
-rw-r--r--db/schema_migrations/202208161634441
-rw-r--r--db/schema_migrations/202208171229071
-rw-r--r--db/schema_migrations/202208180952251
-rw-r--r--db/schema_migrations/202208181253321
-rw-r--r--db/schema_migrations/202208181257031
-rw-r--r--db/schema_migrations/202208181321081
-rw-r--r--db/schema_migrations/202208181405531
-rw-r--r--db/schema_migrations/202208191537251
-rw-r--r--db/schema_migrations/202208191628521
-rw-r--r--db/schema_migrations/202208191849451
-rw-r--r--db/schema_migrations/202208202210361
-rw-r--r--db/schema_migrations/202208220719091
-rw-r--r--db/schema_migrations/202208220906561
-rw-r--r--db/schema_migrations/202208220948041
-rw-r--r--db/schema_migrations/202208221026511
-rw-r--r--db/schema_migrations/202208221036381
-rw-r--r--db/schema_migrations/202208230847471
-rw-r--r--db/schema_migrations/202208241142181
-rw-r--r--db/schema_migrations/202208241756481
-rw-r--r--db/schema_migrations/202208241941031
-rw-r--r--db/schema_migrations/202208250612501
-rw-r--r--db/schema_migrations/202208251056311
-rw-r--r--db/schema_migrations/202208251348271
-rw-r--r--db/schema_migrations/202208251423241
-rw-r--r--db/schema_migrations/202208261650481
-rw-r--r--db/schema_migrations/202208261750581
-rw-r--r--db/schema_migrations/202208280944111
-rw-r--r--db/schema_migrations/202208281318481
-rw-r--r--db/schema_migrations/202208291833561
-rw-r--r--db/schema_migrations/202208300517041
-rw-r--r--db/schema_migrations/202208300617041
-rw-r--r--db/schema_migrations/202208300717041
-rw-r--r--db/schema_migrations/202208300829281
-rw-r--r--db/schema_migrations/202208301142281
-rw-r--r--db/schema_migrations/202208301721421
-rw-r--r--db/schema_migrations/202208310213581
-rw-r--r--db/schema_migrations/202208310904541
-rw-r--r--db/schema_migrations/202208311328021
-rw-r--r--db/schema_migrations/202208311821051
-rw-r--r--db/schema_migrations/202209010357221
-rw-r--r--db/schema_migrations/202209010357251
-rw-r--r--db/schema_migrations/202209010713101
-rw-r--r--db/schema_migrations/202209010713551
-rw-r--r--db/schema_migrations/202209010733001
-rw-r--r--db/schema_migrations/202209010900041
-rw-r--r--db/schema_migrations/202209010928531
-rw-r--r--db/schema_migrations/202209011145011
-rw-r--r--db/schema_migrations/202209011246371
-rw-r--r--db/schema_migrations/202209011318281
-rw-r--r--db/schema_migrations/202209011841061
-rw-r--r--db/schema_migrations/202209011842461
-rw-r--r--db/schema_migrations/202209012120271
-rw-r--r--db/schema_migrations/202209020653141
-rw-r--r--db/schema_migrations/202209020653161
-rw-r--r--db/schema_migrations/202209020653171
-rw-r--r--db/schema_migrations/202209020655581
-rw-r--r--db/schema_migrations/202209020656111
-rw-r--r--db/schema_migrations/202209020656231
-rw-r--r--db/schema_migrations/202209020656351
-rw-r--r--db/schema_migrations/202209020656471
-rw-r--r--db/schema_migrations/202209021110161
-rw-r--r--db/schema_migrations/202209021110381
-rw-r--r--db/schema_migrations/202209021659311
-rw-r--r--db/schema_migrations/202209021701311
-rw-r--r--db/schema_migrations/202209022040481
-rw-r--r--db/schema_migrations/202209041733421
-rw-r--r--db/schema_migrations/202209041734301
-rw-r--r--db/schema_migrations/202209050903001
-rw-r--r--db/schema_migrations/202209050903391
-rw-r--r--db/schema_migrations/202209051127101
-rw-r--r--db/schema_migrations/202209051208481
-rw-r--r--db/schema_migrations/202209060744491
-rw-r--r--db/schema_migrations/202209060938571
-rw-r--r--db/schema_migrations/202209061551051
-rw-r--r--db/schema_migrations/202209062048321
-rw-r--r--db/schema_migrations/202209062129311
-rw-r--r--db/schema_migrations/202209071158061
-rw-r--r--db/schema_migrations/202209071226481
-rw-r--r--db/schema_migrations/202209071243201
-rw-r--r--db/schema_migrations/202209081251461
-rw-r--r--db/schema_migrations/202209090914101
-rw-r--r--db/schema_migrations/202209090947521
-rw-r--r--db/schema_migrations/202209091138091
-rw-r--r--db/schema_migrations/202209091142201
-rw-r--r--db/schema_migrations/202209120850471
-rw-r--r--db/schema_migrations/202209121104331
-rw-r--r--db/schema_migrations/202209121538391
-rw-r--r--db/schema_migrations/202209121808071
-rw-r--r--db/schema_migrations/202209130305521
-rw-r--r--db/schema_migrations/202209130306241
-rw-r--r--db/schema_migrations/202209130437281
-rw-r--r--db/schema_migrations/202209130827281
-rw-r--r--db/schema_migrations/202209130828241
-rw-r--r--db/schema_migrations/202209130829301
-rw-r--r--db/schema_migrations/202209130830151
-rw-r--r--db/schema_migrations/202209130841231
-rw-r--r--db/schema_migrations/202209140051411
-rw-r--r--db/schema_migrations/202209140102331
-rw-r--r--db/schema_migrations/202209140709271
-rw-r--r--db/schema_migrations/202209140807161
-rw-r--r--db/schema_migrations/202209140934081
-rw-r--r--db/schema_migrations/202209141124571
-rw-r--r--db/schema_migrations/202209141308001
-rw-r--r--db/schema_migrations/202209141314491
-rw-r--r--db/schema_migrations/202209141747051
-rw-r--r--db/schema_migrations/202209151038311
-rw-r--r--db/schema_migrations/202209151408021
-rw-r--r--db/schema_migrations/202209151925211
-rw-r--r--db/schema_migrations/202209160541031
-rw-r--r--db/schema_migrations/202209160654181
-rw-r--r--db/schema_migrations/202209160701011
-rw-r--r--db/schema_migrations/202209160946411
-rw-r--r--db/schema_migrations/202209161033111
-rw-r--r--db/schema_migrations/202209161128411
-rw-r--r--db/schema_migrations/202209181242231
-rw-r--r--db/schema_migrations/202209190232081
-rw-r--r--db/schema_migrations/202209190416041
-rw-r--r--db/schema_migrations/202209190505551
-rw-r--r--db/schema_migrations/202209190626401
-rw-r--r--db/schema_migrations/202209190803031
-rw-r--r--db/schema_migrations/202209190803041
-rw-r--r--db/schema_migrations/202209192256311
-rw-r--r--db/schema_migrations/202209200224041
-rw-r--r--db/schema_migrations/202209200816311
-rw-r--r--db/schema_migrations/202209201221211
-rw-r--r--db/schema_migrations/202209201247091
-rw-r--r--db/schema_migrations/202209201353561
-rw-r--r--db/schema_migrations/202209201356321
-rw-r--r--db/schema_migrations/202209201357171
-rw-r--r--db/schema_migrations/202209201410011
-rw-r--r--db/schema_migrations/202209202135041
-rw-r--r--db/schema_migrations/202209202145241
-rw-r--r--db/schema_migrations/202209210933551
-rw-r--r--db/schema_migrations/202209211118231
-rw-r--r--db/schema_migrations/202209211118311
-rw-r--r--db/schema_migrations/202209211118401
-rw-r--r--db/schema_migrations/202209211118491
-rw-r--r--db/schema_migrations/202209211118571
-rw-r--r--db/schema_migrations/202209211119071
-rw-r--r--db/schema_migrations/202209211442581
-rw-r--r--db/schema_migrations/202209211748151
-rw-r--r--db/schema_migrations/202209212013471
-rw-r--r--db/schema_migrations/202209220902361
-rw-r--r--db/schema_migrations/202209221431431
-rw-r--r--db/schema_migrations/202209221436121
-rw-r--r--db/schema_migrations/202209221436341
-rw-r--r--db/schema_migrations/202209222041061
-rw-r--r--db/schema_migrations/202209230525311
-rw-r--r--db/schema_migrations/202209230602261
-rw-r--r--db/schema_migrations/202209231030061
-rw-r--r--db/schema_migrations/202209260237341
-rw-r--r--db/schema_migrations/202209271554071
-rw-r--r--db/schema_migrations/202209271717401
-rw-r--r--db/schema_migrations/202209282019201
-rw-r--r--db/schema_migrations/202209282257111
-rw-r--r--db/schema_migrations/202209290816451
-rw-r--r--db/schema_migrations/202209290915001
-rw-r--r--db/schema_migrations/202209291019471
-rw-r--r--db/schema_migrations/202209291719251
-rw-r--r--db/schema_migrations/202209291723561
-rw-r--r--db/schema_migrations/202209291944531
-rw-r--r--db/schema_migrations/202209292137301
-rw-r--r--db/schema_migrations/202209301101271
-rw-r--r--db/schema_migrations/202209301256091
-rw-r--r--db/schema_migrations/202210022344541
-rw-r--r--db/schema_migrations/202210031517471
-rw-r--r--db/schema_migrations/202210031928271
-rw-r--r--db/schema_migrations/202210040749101
-rw-r--r--db/schema_migrations/202210040749141
-rw-r--r--db/schema_migrations/202210040920381
-rw-r--r--db/schema_migrations/202210040948141
-rw-r--r--db/schema_migrations/202210050723531
-rw-r--r--db/schema_migrations/202210050949261
-rw-r--r--db/schema_migrations/202210051030001
-rw-r--r--db/schema_migrations/202210051030101
-rw-r--r--db/schema_migrations/202210060709271
-rw-r--r--db/schema_migrations/202210060832401
-rw-r--r--db/schema_migrations/202210061315061
-rw-r--r--db/schema_migrations/202210061411451
-rw-r--r--db/schema_migrations/202210061723021
-rw-r--r--db/schema_migrations/202210080323501
-rw-r--r--db/schema_migrations/202210090851301
-rw-r--r--db/schema_migrations/202210100749141
-rw-r--r--db/schema_migrations/202210101032071
-rw-r--r--db/schema_migrations/202210101215101
-rw-r--r--db/schema_migrations/202210101218071
-rw-r--r--db/schema_migrations/202210101221381
-rw-r--r--db/schema_migrations/202210101223521
-rw-r--r--db/schema_migrations/202210101230401
-rw-r--r--db/schema_migrations/202210101415001
-rw-r--r--db/schema_migrations/202210101621371
-rw-r--r--db/schema_migrations/202210101848391
-rw-r--r--db/schema_migrations/202210102018151
-rw-r--r--db/schema_migrations/202210102023391
-rw-r--r--db/schema_migrations/202210102024081
-rw-r--r--db/schema_migrations/202210110622541
-rw-r--r--db/schema_migrations/202210111139281
-rw-r--r--db/schema_migrations/202210111626371
-rw-r--r--db/schema_migrations/202210112104551
-rw-r--r--db/schema_migrations/202210120331071
-rw-r--r--db/schema_migrations/202210121355241
-rw-r--r--db/schema_migrations/202210121827011
-rw-r--r--db/schema_migrations/202210131037381
-rw-r--r--db/schema_migrations/202210131541591
-rw-r--r--db/schema_migrations/202210132158321
-rw-r--r--db/schema_migrations/202210140310331
-rw-r--r--db/schema_migrations/202210140343381
-rw-r--r--db/schema_migrations/202210141900401
-rw-r--r--db/schema_migrations/202210150005111
-rw-r--r--db/schema_migrations/202210170842081
-rw-r--r--db/schema_migrations/202210170842271
-rw-r--r--db/schema_migrations/202210180503231
-rw-r--r--db/schema_migrations/202210180623081
-rw-r--r--db/schema_migrations/202210180814161
-rw-r--r--db/schema_migrations/202210180925521
-rw-r--r--db/schema_migrations/202210181240291
-rw-r--r--db/schema_migrations/202210181240351
-rw-r--r--db/schema_migrations/202210181936351
-rw-r--r--db/schema_migrations/202210181938271
-rw-r--r--db/schema_migrations/202210182025241
-rw-r--r--db/schema_migrations/202210182328201
-rw-r--r--db/schema_migrations/202210190024591
-rw-r--r--db/schema_migrations/202210191024261
-rw-r--r--db/schema_migrations/202210191050411
-rw-r--r--db/schema_migrations/202210191415081
-rw-r--r--db/schema_migrations/202210191947511
-rw-r--r--db/schema_migrations/202210191957541
-rw-r--r--db/schema_migrations/202210192000331
-rw-r--r--db/schema_migrations/202210192002061
-rw-r--r--db/schema_migrations/202210201240181
-rw-r--r--db/schema_migrations/202210210827201
-rw-r--r--db/schema_migrations/202210210827341
-rw-r--r--db/schema_migrations/202210211458201
-rw-r--r--db/schema_migrations/202210211607351
-rw-r--r--db/schema_migrations/202210212132161
-rw-r--r--db/schema_migrations/202210222135051
-rw-r--r--db/schema_migrations/202210222135211
-rw-r--r--db/schema_migrations/202210240342281
-rw-r--r--db/schema_migrations/202210241215001
-rw-r--r--db/schema_migrations/202210250439301
-rw-r--r--db/schema_migrations/202210251052051
-rw-r--r--db/schema_migrations/202210251150061
-rw-r--r--db/schema_migrations/202210251454521
-rw-r--r--db/schema_migrations/202210251502021
-rw-r--r--db/schema_migrations/202210252206071
-rw-r--r--db/schema_migrations/202210271248481
-rw-r--r--db/schema_migrations/202210272035561
-rw-r--r--db/schema_migrations/202210272039511
-rw-r--r--db/schema_migrations/202210280000411
-rw-r--r--db/schema_migrations/202210280006031
-rw-r--r--db/schema_migrations/202210280153471
-rw-r--r--db/schema_migrations/202210280226271
-rw-r--r--db/schema_migrations/202210281524221
-rw-r--r--db/schema_migrations/202210311029161
-rw-r--r--db/schema_migrations/202211010325211
-rw-r--r--db/schema_migrations/202211010326001
-rw-r--r--db/schema_migrations/202211011959031
-rw-r--r--db/schema_migrations/202211012010311
-rw-r--r--db/schema_migrations/202211020909401
-rw-r--r--db/schema_migrations/202211020909431
-rw-r--r--db/schema_migrations/202211022021301
-rw-r--r--db/schema_migrations/202211022258001
-rw-r--r--db/schema_migrations/202211030733281
-rw-r--r--db/schema_migrations/202211030842131
-rw-r--r--db/schema_migrations/202211031314091
-rw-r--r--db/schema_migrations/202211031502501
-rw-r--r--db/schema_migrations/202211040421371
-rw-r--r--db/schema_migrations/202211040421591
-rw-r--r--db/schema_migrations/202211040613201
-rw-r--r--db/schema_migrations/202211040746521
-rw-r--r--db/schema_migrations/202211040940421
-rw-r--r--db/schema_migrations/202211041002031
-rw-r--r--db/schema_migrations/202211041705001
-rw-r--r--db/schema_migrations/202211041902031
-rw-r--r--db/schema_migrations/202211070943591
-rw-r--r--db/schema_migrations/202211071152471
-rw-r--r--db/schema_migrations/202211071154131
-rw-r--r--db/schema_migrations/202211071832221
-rw-r--r--db/schema_migrations/202211071845421
-rw-r--r--db/schema_migrations/202211071847581
-rw-r--r--db/schema_migrations/202211072204201
-rw-r--r--db/schema_migrations/202211072205261
-rw-r--r--db/schema_migrations/202211072222131
-rw-r--r--db/schema_migrations/202211080158131
-rw-r--r--db/schema_migrations/202211080450191
-rw-r--r--db/schema_migrations/202211081213221
-rw-r--r--db/schema_migrations/202211081854421
-rw-r--r--db/schema_migrations/202211082220151
-rw-r--r--db/schema_migrations/202211100454061
-rw-r--r--db/schema_migrations/202211101058571
-rw-r--r--db/schema_migrations/202211101509421
-rw-r--r--db/schema_migrations/202211110703141
-rw-r--r--db/schema_migrations/202310240734011
-rw-r--r--db/schema_migrations/202310251912171
-rw-r--r--db/schema_migrations/202310261723451
-rw-r--r--db/schema_migrations/202310261750421
-rw-r--r--db/schema_migrations/202310270930091
-rw-r--r--db/schema_migrations/202310291348241
-rw-r--r--db/schema_migrations/202310291426491
-rw-r--r--db/schema_migrations/202310311140501
-rw-r--r--db/schema_migrations/202310311647241
-rw-r--r--db/schema_migrations/202310311928031
-rw-r--r--db/schema_migrations/202310312048411
-rw-r--r--db/schema_migrations/202311011718481
-rw-r--r--db/schema_migrations/202311031600221
-rw-r--r--db/schema_migrations/202311031608591
-rw-r--r--db/schema_migrations/202311070929121
-rw-r--r--db/schema_migrations/202311071406421
-rw-r--r--db/schema_migrations/202311071933421
-rw-r--r--db/schema_migrations/202311081329161
-rw-r--r--db/schema_migrations/202311081439571
-rw-r--r--db/schema_migrations/202311091202231
-rw-r--r--db/schema_migrations/202311091240311
-rw-r--r--db/schema_migrations/202311091655121
-rw-r--r--db/schema_migrations/202311100447381
-rw-r--r--db/schema_migrations/202311101736261
-rw-r--r--db/schema_migrations/202311122137271
-rw-r--r--db/schema_migrations/202311122148031
-rw-r--r--db/schema_migrations/202311122230081
-rw-r--r--db/schema_migrations/202311130257181
-rw-r--r--db/schema_migrations/202311130257331
-rw-r--r--db/schema_migrations/202311131243421
-rw-r--r--db/schema_migrations/202311131426181
-rw-r--r--db/schema_migrations/202311131649091
-rw-r--r--db/schema_migrations/202311140007271
-rw-r--r--db/schema_migrations/202311140158571
-rw-r--r--db/schema_migrations/202311140159231
-rw-r--r--db/schema_migrations/202311140340171
-rw-r--r--db/schema_migrations/202311140343091
-rw-r--r--db/schema_migrations/202311140345071
-rw-r--r--db/schema_migrations/202311140435221
-rw-r--r--db/schema_migrations/202311140533301
-rw-r--r--db/schema_migrations/202311140622001
-rw-r--r--db/schema_migrations/202311140622151
-rw-r--r--db/schema_migrations/202311140911241
-rw-r--r--db/schema_migrations/202311140919351
-rw-r--r--db/schema_migrations/202311141004441
-rw-r--r--db/schema_migrations/202311141218121
-rw-r--r--db/schema_migrations/202311141310311
-rw-r--r--db/schema_migrations/202311141336001
-rw-r--r--db/schema_migrations/202311141336191
-rw-r--r--db/schema_migrations/202311141523041
-rw-r--r--db/schema_migrations/202311142313301
-rw-r--r--db/schema_migrations/202311150640071
-rw-r--r--db/schema_migrations/202311150816521
-rw-r--r--db/schema_migrations/202311151010021
-rw-r--r--db/schema_migrations/202311151049431
-rw-r--r--db/schema_migrations/202311151726231
-rw-r--r--db/schema_migrations/202311160622001
-rw-r--r--db/schema_migrations/202311160622151
-rw-r--r--db/schema_migrations/202311160655411
-rw-r--r--db/schema_migrations/202311160710271
-rw-r--r--db/schema_migrations/202311161059451
-rw-r--r--db/schema_migrations/202311161152371
-rw-r--r--db/schema_migrations/202311161153031
-rw-r--r--db/schema_migrations/202311170314161
-rw-r--r--db/schema_migrations/202311170315591
-rw-r--r--db/schema_migrations/202311171402011
-rw-r--r--db/schema_migrations/202311172112141
-rw-r--r--db/schema_migrations/202311200703451
-rw-r--r--db/schema_migrations/202311200712021
-rw-r--r--db/schema_migrations/202311200903051
-rw-r--r--db/schema_migrations/202311201056191
-rw-r--r--db/schema_migrations/202311201429331
-rw-r--r--db/schema_migrations/202311201611591
-rw-r--r--db/schema_migrations/202311210401531
-rw-r--r--db/schema_migrations/202311210402121
-rw-r--r--db/schema_migrations/202311210921091
-rw-r--r--db/schema_migrations/202311210921281
-rw-r--r--db/schema_migrations/202311211337271
-rw-r--r--db/schema_migrations/202311211527061
-rw-r--r--db/schema_migrations/202311220117311
-rw-r--r--db/schema_migrations/202311220724281
-rw-r--r--db/schema_migrations/202311220846421
-rw-r--r--db/schema_migrations/202311221000061
-rw-r--r--db/schema_migrations/202311221104421
-rw-r--r--db/schema_migrations/202311221119351
-rw-r--r--db/schema_migrations/202311221141351
-rw-r--r--db/schema_migrations/202311221234081
-rw-r--r--db/schema_migrations/202311221248151
-rw-r--r--db/schema_migrations/202311221255501
-rw-r--r--db/schema_migrations/202311221307211
-rw-r--r--db/schema_migrations/202311230350331
-rw-r--r--db/schema_migrations/202311231257501
-rw-r--r--db/schema_migrations/202311231416331
-rw-r--r--db/schema_migrations/202311231518311
-rw-r--r--db/schema_migrations/202311231519561
-rw-r--r--db/schema_migrations/202311231659471
-rw-r--r--db/schema_migrations/202311240845321
-rw-r--r--db/schema_migrations/202311241057261
-rw-r--r--db/schema_migrations/202311241124091
-rw-r--r--db/schema_migrations/202311241246001
-rw-r--r--db/schema_migrations/202311241247501
-rw-r--r--db/schema_migrations/202311241250071
-rw-r--r--db/schema_migrations/202311241329531
-rw-r--r--db/schema_migrations/202311241330151
-rw-r--r--db/schema_migrations/202311241348381
-rw-r--r--db/schema_migrations/202311241804491
-rw-r--r--db/schema_migrations/202311241917591
-rw-r--r--db/schema_migrations/202311242132411
-rw-r--r--db/schema_migrations/202311242824411
-rw-r--r--db/schema_migrations/202311261926521
-rw-r--r--db/schema_migrations/202311262009031
-rw-r--r--db/schema_migrations/202311262009041
-rw-r--r--db/schema_migrations/202311262200001
-rw-r--r--db/schema_migrations/202311271719031
-rw-r--r--db/schema_migrations/202311271743351
-rw-r--r--db/schema_migrations/202311271853271
-rw-r--r--db/schema_migrations/202311271853281
-rw-r--r--db/schema_migrations/202311281036241
-rw-r--r--db/schema_migrations/202311281040441
-rw-r--r--db/schema_migrations/202311281115501
-rw-r--r--db/schema_migrations/202311281555141
-rw-r--r--db/schema_migrations/202311281743451
-rw-r--r--db/schema_migrations/202311282014031
-rw-r--r--db/schema_migrations/202311291059451
-rw-r--r--db/schema_migrations/202311291247541
-rw-r--r--db/schema_migrations/202311291326361
-rw-r--r--db/schema_migrations/202311291547011
-rw-r--r--db/schema_migrations/202311291702031
-rw-r--r--db/schema_migrations/202311291923451
-rw-r--r--db/schema_migrations/202311292115241
-rw-r--r--db/schema_migrations/202311292311591
-rw-r--r--db/schema_migrations/202311301318081
-rw-r--r--db/schema_migrations/202311301409011
-rw-r--r--db/schema_migrations/202311301422181
-rw-r--r--db/schema_migrations/202311301927521
-rw-r--r--db/schema_migrations/202311301930421
-rw-r--r--db/schema_migrations/202311301956351
-rw-r--r--db/schema_migrations/202311302002161
-rw-r--r--db/schema_migrations/202312010953261
-rw-r--r--db/schema_migrations/202312011139011
-rw-r--r--db/schema_migrations/202312011142331
-rw-r--r--db/schema_migrations/202312011228301
-rw-r--r--db/schema_migrations/202312011448261
-rw-r--r--db/schema_migrations/202312011712291
-rw-r--r--db/schema_migrations/202312011722031
-rw-r--r--db/schema_migrations/202312012047121
-rw-r--r--db/schema_migrations/202312021759411
-rw-r--r--db/schema_migrations/202312021801011
-rw-r--r--db/schema_migrations/202312040903101
-rw-r--r--db/schema_migrations/202312040904131
-rw-r--r--db/schema_migrations/202312041443001
-rw-r--r--db/schema_migrations/202312041548261
-rw-r--r--db/schema_migrations/202312041923131
-rw-r--r--db/schema_migrations/202312050925291
-rw-r--r--db/schema_migrations/202312051114531
-rw-r--r--db/schema_migrations/202312051414501
-rw-r--r--db/schema_migrations/202312051442531
-rw-r--r--db/schema_migrations/202312051443491
-rw-r--r--db/schema_migrations/202312051636581
-rw-r--r--db/schema_migrations/202312052017011
-rw-r--r--db/schema_migrations/202312061153061
-rw-r--r--db/schema_migrations/202312061422501
-rw-r--r--db/schema_migrations/202312061449191
-rw-r--r--db/schema_migrations/202312061458501
-rw-r--r--db/schema_migrations/202312061459111
-rw-r--r--db/schema_migrations/202312061833121
-rw-r--r--db/schema_migrations/202312062001211
-rw-r--r--db/schema_migrations/202312070548191
-rw-r--r--db/schema_migrations/202312071126321
-rw-r--r--db/schema_migrations/202312071126501
-rw-r--r--db/schema_migrations/202312071156011
-rw-r--r--db/schema_migrations/202312071442151
-rw-r--r--db/schema_migrations/202312071507381
-rw-r--r--db/schema_migrations/202312071507391
-rw-r--r--db/schema_migrations/202312071636481
-rw-r--r--db/schema_migrations/202312071946201
-rw-r--r--db/schema_migrations/202312072209161
-rw-r--r--db/schema_migrations/202312072209351
-rw-r--r--db/schema_migrations/202312072209541
-rw-r--r--db/schema_migrations/202312072210131
-rw-r--r--db/schema_migrations/202312072210361
-rw-r--r--db/schema_migrations/202312072210561
-rw-r--r--db/schema_migrations/202312072211191
-rw-r--r--db/schema_migrations/202312072211401
-rw-r--r--db/schema_migrations/202312072211591
-rw-r--r--db/schema_migrations/202312072212191
-rw-r--r--db/schema_migrations/202312072212411
-rw-r--r--db/schema_migrations/202312072213001
-rw-r--r--db/schema_migrations/202312081030491
-rw-r--r--db/schema_migrations/202312111007171
-rw-r--r--db/schema_migrations/202312121323221
-rw-r--r--db/schema_migrations/202312131127261
-rw-r--r--db/schema_migrations/202312140649341
-rw-r--r--db/schema_migrations/202312141644111
-rw-r--r--db/schema_migrations/202312180624421
-rw-r--r--db/schema_migrations/202312180625051
-rw-r--r--db/structure.sql944
2004 files changed, 7996 insertions, 17822 deletions
diff --git a/db/click_house/migrate/20230705124511_create_events.rb b/db/click_house/migrate/20230705124511_create_events.rb
deleted file mode 100644
index cd60ade5d4d..00000000000
--- a/db/click_house/migrate/20230705124511_create_events.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-# frozen_string_literal: true
-
-class CreateEvents < ClickHouse::Migration
- def up
- execute <<~SQL
- CREATE TABLE IF NOT EXISTS events
- (
- id UInt64 DEFAULT 0,
- path String DEFAULT '',
- author_id UInt64 DEFAULT 0,
- target_id UInt64 DEFAULT 0,
- target_type LowCardinality(String) DEFAULT '',
- action UInt8 DEFAULT 0,
- deleted UInt8 DEFAULT 0,
- created_at DateTime64(6, 'UTC') DEFAULT now(),
- updated_at DateTime64(6, 'UTC') DEFAULT now()
- )
- ENGINE = ReplacingMergeTree(updated_at, deleted)
- PRIMARY KEY (id)
- ORDER BY (id)
- PARTITION BY toYear(created_at)
- SQL
- end
-
- def down
- execute <<~SQL
- DROP TABLE events
- SQL
- end
-end
diff --git a/db/click_house/migrate/20230724064832_create_contribution_analytics_events.rb b/db/click_house/migrate/20230724064832_create_contribution_analytics_events.rb
deleted file mode 100644
index 2606ae3adc9..00000000000
--- a/db/click_house/migrate/20230724064832_create_contribution_analytics_events.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-class CreateContributionAnalyticsEvents < ClickHouse::Migration
- def up
- execute <<~SQL
- CREATE TABLE IF NOT EXISTS contribution_analytics_events
- (
- id UInt64 DEFAULT 0,
- path String DEFAULT '',
- author_id UInt64 DEFAULT 0,
- target_type LowCardinality(String) DEFAULT '',
- action UInt8 DEFAULT 0,
- created_at Date DEFAULT toDate(now()),
- updated_at DateTime64(6, 'UTC') DEFAULT now()
- )
- ENGINE = MergeTree
- ORDER BY (path, created_at, author_id, id)
- PARTITION BY toYear(created_at);
- SQL
- end
-
- def down
- execute <<~SQL
- DROP TABLE contribution_analytics_events
- SQL
- end
-end
diff --git a/db/click_house/migrate/main/20230705124511_create_events.rb b/db/click_house/migrate/main/20230705124511_create_events.rb
new file mode 100644
index 00000000000..66df09bc97f
--- /dev/null
+++ b/db/click_house/migrate/main/20230705124511_create_events.rb
@@ -0,0 +1,30 @@
+# frozen_string_literal: true
+
+class CreateEvents < ClickHouse::Migration
+ def up
+ execute <<~SQL
+ CREATE TABLE IF NOT EXISTS events
+ (
+ id UInt64 DEFAULT 0,
+ path String DEFAULT '0/', -- the event_namespace_paths MV depends on this format
+ author_id UInt64 DEFAULT 0,
+ target_id UInt64 DEFAULT 0,
+ target_type LowCardinality(String) DEFAULT '',
+ action UInt8 DEFAULT 0,
+ deleted UInt8 DEFAULT 0,
+ created_at DateTime64(6, 'UTC') DEFAULT now(),
+ updated_at DateTime64(6, 'UTC') DEFAULT now()
+ )
+ ENGINE = ReplacingMergeTree(updated_at, deleted)
+ PRIMARY KEY (id)
+ ORDER BY (id)
+ PARTITION BY toYear(created_at)
+ SQL
+ end
+
+ def down
+ execute <<~SQL
+ DROP TABLE events
+ SQL
+ end
+end
diff --git a/db/click_house/migrate/20230707151359_create_ci_finished_builds.rb b/db/click_house/migrate/main/20230707151359_create_ci_finished_builds.rb
index 39521af8d99..39521af8d99 100644
--- a/db/click_house/migrate/20230707151359_create_ci_finished_builds.rb
+++ b/db/click_house/migrate/main/20230707151359_create_ci_finished_builds.rb
diff --git a/db/click_house/migrate/20230719101806_create_ci_finished_builds_aggregated_queueing_delay_percentiles.rb b/db/click_house/migrate/main/20230719101806_create_ci_finished_builds_aggregated_queueing_delay_percentiles.rb
index 47934d8fe02..47934d8fe02 100644
--- a/db/click_house/migrate/20230719101806_create_ci_finished_builds_aggregated_queueing_delay_percentiles.rb
+++ b/db/click_house/migrate/main/20230719101806_create_ci_finished_builds_aggregated_queueing_delay_percentiles.rb
diff --git a/db/click_house/migrate/main/20230724064832_create_contribution_analytics_events.rb b/db/click_house/migrate/main/20230724064832_create_contribution_analytics_events.rb
new file mode 100644
index 00000000000..992d266fda7
--- /dev/null
+++ b/db/click_house/migrate/main/20230724064832_create_contribution_analytics_events.rb
@@ -0,0 +1,27 @@
+# frozen_string_literal: true
+
+class CreateContributionAnalyticsEvents < ClickHouse::Migration
+ def up
+ execute <<~SQL
+ CREATE TABLE IF NOT EXISTS contribution_analytics_events
+ (
+ id UInt64 DEFAULT 0,
+ path String DEFAULT '',
+ author_id UInt64 DEFAULT 0,
+ target_type LowCardinality(String) DEFAULT '',
+ action UInt8 DEFAULT 0,
+ created_at Date DEFAULT toDate(now()),
+ updated_at DateTime64(6, 'UTC') DEFAULT now()
+ )
+ ENGINE = ReplacingMergeTree
+ ORDER BY (path, created_at, author_id, id)
+ PARTITION BY toYear(created_at);
+ SQL
+ end
+
+ def down
+ execute <<~SQL
+ DROP TABLE contribution_analytics_events
+ SQL
+ end
+end
diff --git a/db/click_house/migrate/20230724064918_create_contribution_analytics_events_materialized_view.rb b/db/click_house/migrate/main/20230724064918_create_contribution_analytics_events_materialized_view.rb
index 956a26d80f3..956a26d80f3 100644
--- a/db/click_house/migrate/20230724064918_create_contribution_analytics_events_materialized_view.rb
+++ b/db/click_house/migrate/main/20230724064918_create_contribution_analytics_events_materialized_view.rb
diff --git a/db/click_house/migrate/20230808070520_create_sync_cursors.rb b/db/click_house/migrate/main/20230808070520_create_sync_cursors.rb
index 7583f8ec0c5..7583f8ec0c5 100644
--- a/db/click_house/migrate/20230808070520_create_sync_cursors.rb
+++ b/db/click_house/migrate/main/20230808070520_create_sync_cursors.rb
diff --git a/db/click_house/migrate/20230808140217_create_ci_finished_builds_aggregated_queueing_delay_percentiles_mv.rb b/db/click_house/migrate/main/20230808140217_create_ci_finished_builds_aggregated_queueing_delay_percentiles_mv.rb
index cc029d48436..cc029d48436 100644
--- a/db/click_house/migrate/20230808140217_create_ci_finished_builds_aggregated_queueing_delay_percentiles_mv.rb
+++ b/db/click_house/migrate/main/20230808140217_create_ci_finished_builds_aggregated_queueing_delay_percentiles_mv.rb
diff --git a/db/click_house/migrate/20231106202300_modify_ci_finished_builds_settings.rb b/db/click_house/migrate/main/20231106202300_modify_ci_finished_builds_settings.rb
index d9951725c9b..d9951725c9b 100644
--- a/db/click_house/migrate/20231106202300_modify_ci_finished_builds_settings.rb
+++ b/db/click_house/migrate/main/20231106202300_modify_ci_finished_builds_settings.rb
diff --git a/db/click_house/migrate/main/20231114142100_create_audit_events.rb b/db/click_house/migrate/main/20231114142100_create_audit_events.rb
new file mode 100644
index 00000000000..218e0ed4841
--- /dev/null
+++ b/db/click_house/migrate/main/20231114142100_create_audit_events.rb
@@ -0,0 +1,37 @@
+# frozen_string_literal: true
+
+class CreateAuditEvents < ClickHouse::Migration
+ def up
+ execute <<~SQL
+ CREATE TABLE IF NOT EXISTS audit_events
+ (
+ id UInt64 DEFAULT 0,
+ author_id UInt64 DEFAULT 0,
+ author_name String DEFAULT '',
+ created_at DateTime64(6, 'UTC') DEFAULT now(),
+ details String DEFAULT '',
+ entity_id UInt64 DEFAULT 0,
+ entity_path String DEFAULT '',
+ entity_type LowCardinality(String) DEFAULT '',
+ ip_address String DEFAULT '',
+ target_details String DEFAULT '',
+ target_id UInt64 DEFAULT 0,
+ target_type LowCardinality(String) DEFAULT '',
+ is_deleted UInt8 DEFAULT 0,
+ ) ENGINE = ReplacingMergeTree(created_at, is_deleted)
+ PARTITION BY toYear(created_at)
+ ORDER BY (entity_type, entity_id, author_id, created_at, id);
+ SQL
+
+ execute <<~SQL
+ ALTER TABLE audit_events
+ ADD PROJECTION IF NOT EXISTS by_id (SELECT * ORDER BY id);
+ SQL
+ end
+
+ def down
+ execute <<~SQL
+ DROP TABLE audit_events
+ SQL
+ end
+end
diff --git a/db/click_house/migrate/main/20231129062064_create_contributions_table.rb b/db/click_house/migrate/main/20231129062064_create_contributions_table.rb
new file mode 100644
index 00000000000..2467da8bb91
--- /dev/null
+++ b/db/click_house/migrate/main/20231129062064_create_contributions_table.rb
@@ -0,0 +1,27 @@
+# frozen_string_literal: true
+
+class CreateContributionsTable < ClickHouse::Migration
+ def up
+ execute <<~SQL
+ CREATE TABLE IF NOT EXISTS contributions
+ (
+ id UInt64 DEFAULT 0,
+ path String DEFAULT '',
+ author_id UInt64 DEFAULT 0,
+ target_type LowCardinality(String) DEFAULT '',
+ action UInt8 DEFAULT 0,
+ created_at Date DEFAULT toDate(now64()),
+ updated_at DateTime64(6, 'UTC') DEFAULT now64()
+ )
+ ENGINE = ReplacingMergeTree
+ ORDER BY (path, created_at, author_id, id)
+ PARTITION BY toYear(created_at);
+ SQL
+ end
+
+ def down
+ execute <<~SQL
+ DROP TABLE IF EXISTS contributions
+ SQL
+ end
+end
diff --git a/db/click_house/migrate/main/20231129062151_create_contributions_mv.rb b/db/click_house/migrate/main/20231129062151_create_contributions_mv.rb
new file mode 100644
index 00000000000..f6f5054c55c
--- /dev/null
+++ b/db/click_house/migrate/main/20231129062151_create_contributions_mv.rb
@@ -0,0 +1,30 @@
+# frozen_string_literal: true
+
+class CreateContributionsMv < ClickHouse::Migration
+ def up
+ execute <<~SQL
+ CREATE MATERIALIZED VIEW IF NOT EXISTS contributions_mv
+ TO contributions
+ AS
+ SELECT
+ id,
+ argMax(path, events.updated_at) as path,
+ argMax(author_id, events.updated_at) as author_id,
+ argMax(target_type, events.updated_at) as target_type,
+ argMax(action, events.updated_at) as action,
+ argMax(date(created_at), events.updated_at) as created_at,
+ max(events.updated_at) as updated_at
+ FROM events
+ WHERE (("events"."action" IN (5, 6) AND "events"."target_type" = '')
+ OR ("events"."action" IN (1, 3, 7, 12)
+ AND "events"."target_type" IN ('MergeRequest', 'Issue', 'WorkItem')))
+ GROUP BY id
+ SQL
+ end
+
+ def down
+ execute <<~SQL
+ DROP VIEW IF EXISTS contributions_mv
+ SQL
+ end
+end
diff --git a/db/click_house/migrate/main/20231205104100_modify_ci_finished_builds_started_at_default.rb b/db/click_house/migrate/main/20231205104100_modify_ci_finished_builds_started_at_default.rb
new file mode 100644
index 00000000000..00c8c825015
--- /dev/null
+++ b/db/click_house/migrate/main/20231205104100_modify_ci_finished_builds_started_at_default.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class ModifyCiFinishedBuildsStartedAtDefault < ClickHouse::Migration
+ def up
+ execute <<~SQL
+ ALTER TABLE ci_finished_builds MODIFY COLUMN started_at DEFAULT COALESCE(finished_at, 0)
+ SQL
+ end
+
+ def down
+ execute <<~SQL
+ ALTER TABLE ci_finished_builds MODIFY COLUMN started_at DEFAULT now()
+ SQL
+ end
+end
diff --git a/db/click_house/migrate/main/20231205104101_modify_ci_finished_builds_finished_at_default.rb b/db/click_house/migrate/main/20231205104101_modify_ci_finished_builds_finished_at_default.rb
new file mode 100644
index 00000000000..6ea4b158536
--- /dev/null
+++ b/db/click_house/migrate/main/20231205104101_modify_ci_finished_builds_finished_at_default.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class ModifyCiFinishedBuildsFinishedAtDefault < ClickHouse::Migration
+ def up
+ execute <<~SQL
+ ALTER TABLE ci_finished_builds MODIFY COLUMN finished_at DEFAULT 0
+ SQL
+ end
+
+ def down
+ execute <<~SQL
+ ALTER TABLE ci_finished_builds MODIFY COLUMN finished_at DEFAULT now()
+ SQL
+ end
+end
diff --git a/db/click_house/migrate/main/20231205112200_fix_invalid_ci_finished_builds_started_at_values.rb b/db/click_house/migrate/main/20231205112200_fix_invalid_ci_finished_builds_started_at_values.rb
new file mode 100644
index 00000000000..28a63490793
--- /dev/null
+++ b/db/click_house/migrate/main/20231205112200_fix_invalid_ci_finished_builds_started_at_values.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+class FixInvalidCiFinishedBuildsStartedAtValues < ClickHouse::Migration
+ def up
+ # Fix existing records to have the new default
+ execute <<~SQL
+ ALTER TABLE ci_finished_builds UPDATE started_at = finished_at WHERE started_at > finished_at
+ SQL
+ end
+
+ def down
+ # no-op as there is no way to retrieve old data
+ end
+end
diff --git a/db/click_house/migrate/main/20231207173100_create_ci_used_minutes.rb b/db/click_house/migrate/main/20231207173100_create_ci_used_minutes.rb
new file mode 100644
index 00000000000..901b0eed756
--- /dev/null
+++ b/db/click_house/migrate/main/20231207173100_create_ci_used_minutes.rb
@@ -0,0 +1,26 @@
+# frozen_string_literal: true
+
+class CreateCiUsedMinutes < ClickHouse::Migration
+ def up
+ execute <<~SQL
+ CREATE TABLE IF NOT EXISTS ci_used_minutes
+ (
+ project_id UInt64 DEFAULT 0,
+ status LowCardinality(String) DEFAULT '',
+ runner_type UInt8 DEFAULT 0,
+ finished_at_bucket DateTime64(6, 'UTC') DEFAULT now64(),
+
+ count_builds AggregateFunction(count),
+ total_duration SimpleAggregateFunction(sum, Int64)
+ )
+ ENGINE = AggregatingMergeTree()
+ ORDER BY (finished_at_bucket, project_id, status, runner_type)
+ SQL
+ end
+
+ def down
+ execute <<~SQL
+ DROP TABLE ci_used_minutes
+ SQL
+ end
+end
diff --git a/db/click_house/migrate/main/20231207173101_create_ci_used_minutes_mv.rb b/db/click_house/migrate/main/20231207173101_create_ci_used_minutes_mv.rb
new file mode 100644
index 00000000000..856710b660e
--- /dev/null
+++ b/db/click_house/migrate/main/20231207173101_create_ci_used_minutes_mv.rb
@@ -0,0 +1,27 @@
+# frozen_string_literal: true
+
+class CreateCiUsedMinutesMv < ClickHouse::Migration
+ def up
+ execute <<~SQL
+ CREATE MATERIALIZED VIEW IF NOT EXISTS ci_used_minutes_mv
+ TO ci_used_minutes
+ AS
+ SELECT
+ project_id,
+ status,
+ runner_type,
+ toStartOfInterval(finished_at, INTERVAL 1 day) AS finished_at_bucket,
+
+ countState() AS count_builds,
+ sumSimpleState(duration) AS total_duration
+ FROM ci_finished_builds
+ GROUP BY project_id, status, runner_type, finished_at_bucket
+ SQL
+ end
+
+ def down
+ execute <<~SQL
+ DROP VIEW ci_used_minutes_mv
+ SQL
+ end
+end
diff --git a/db/click_house/migrate/main/20231211130023_drop_contribution_analytics_mv.rb b/db/click_house/migrate/main/20231211130023_drop_contribution_analytics_mv.rb
new file mode 100644
index 00000000000..b8b4f7fb5c0
--- /dev/null
+++ b/db/click_house/migrate/main/20231211130023_drop_contribution_analytics_mv.rb
@@ -0,0 +1,30 @@
+# frozen_string_literal: true
+
+class DropContributionAnalyticsMv < ClickHouse::Migration
+ def up
+ execute <<~SQL
+ DROP VIEW IF EXISTS contribution_analytics_events_mv
+ SQL
+ end
+
+ def down
+ execute <<~SQL
+ CREATE MATERIALIZED VIEW IF NOT EXISTS contribution_analytics_events_mv
+ TO contribution_analytics_events
+ AS
+ SELECT
+ id,
+ argMax(path, events.updated_at) as path,
+ argMax(author_id, events.updated_at) as author_id,
+ argMax(target_type, events.updated_at) as target_type,
+ argMax(action, events.updated_at) as action,
+ argMax(date(created_at), events.updated_at) as created_at,
+ max(events.updated_at) as updated_at
+ FROM events
+ WHERE (("events"."action" = 5 AND "events"."target_type" = '')
+ OR ("events"."action" IN (1, 3, 7, 12)
+ AND "events"."target_type" IN ('MergeRequest', 'Issue')))
+ GROUP BY id
+ SQL
+ end
+end
diff --git a/db/click_house/migrate/main/20231211143660_drop_contribution_analytics_table.rb b/db/click_house/migrate/main/20231211143660_drop_contribution_analytics_table.rb
new file mode 100644
index 00000000000..45d16ac50fe
--- /dev/null
+++ b/db/click_house/migrate/main/20231211143660_drop_contribution_analytics_table.rb
@@ -0,0 +1,27 @@
+# frozen_string_literal: true
+
+class DropContributionAnalyticsTable < ClickHouse::Migration
+ def up
+ execute <<~SQL
+ DROP TABLE IF EXISTS contribution_analytics_events
+ SQL
+ end
+
+ def down
+ execute <<~SQL
+ CREATE TABLE IF NOT EXISTS contribution_analytics_events
+ (
+ id UInt64 DEFAULT 0,
+ path String DEFAULT '',
+ author_id UInt64 DEFAULT 0,
+ target_type LowCardinality(String) DEFAULT '',
+ action UInt8 DEFAULT 0,
+ created_at Date DEFAULT toDate(now()),
+ updated_at DateTime64(6, 'UTC') DEFAULT now()
+ )
+ ENGINE = ReplacingMergeTree
+ ORDER BY (path, created_at, author_id, id)
+ PARTITION BY toYear(created_at);
+ SQL
+ end
+end
diff --git a/db/click_house/migrate/main/20231212085143_create_event_authors_table.rb b/db/click_house/migrate/main/20231212085143_create_event_authors_table.rb
new file mode 100644
index 00000000000..438539bc118
--- /dev/null
+++ b/db/click_house/migrate/main/20231212085143_create_event_authors_table.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+
+class CreateEventAuthorsTable < ClickHouse::Migration
+ def up
+ execute <<~SQL
+ CREATE TABLE IF NOT EXISTS event_authors
+ (
+ author_id UInt64 DEFAULT 0,
+ deleted UInt8 DEFAULT 0,
+ last_event_at DateTime64(6, 'UTC') DEFAULT now64()
+ )
+ ENGINE = ReplacingMergeTree(last_event_at, deleted)
+ PRIMARY KEY (author_id)
+ ORDER BY (author_id)
+ SQL
+ end
+
+ def down
+ execute <<~SQL
+ DROP TABLE IF EXISTS event_authors
+ SQL
+ end
+end
diff --git a/db/click_house/migrate/main/20231212090756_create_event_namespace_paths_table.rb b/db/click_house/migrate/main/20231212090756_create_event_namespace_paths_table.rb
new file mode 100644
index 00000000000..857ec41021b
--- /dev/null
+++ b/db/click_house/migrate/main/20231212090756_create_event_namespace_paths_table.rb
@@ -0,0 +1,24 @@
+# frozen_string_literal: true
+
+class CreateEventNamespacePathsTable < ClickHouse::Migration
+ def up
+ execute <<~SQL
+ CREATE TABLE IF NOT EXISTS event_namespace_paths
+ (
+ namespace_id UInt64 DEFAULT 0,
+ path String DEFAULT '',
+ deleted UInt8 DEFAULT 0,
+ last_event_at DateTime64(6, 'UTC') DEFAULT now64()
+ )
+ ENGINE = ReplacingMergeTree(last_event_at, deleted)
+ PRIMARY KEY (namespace_id)
+ ORDER BY (namespace_id)
+ SQL
+ end
+
+ def down
+ execute <<~SQL
+ DROP TABLE IF EXISTS event_namespace_paths
+ SQL
+ end
+end
diff --git a/db/click_house/migrate/main/20231212090973_create_event_authors_materialized_view.rb b/db/click_house/migrate/main/20231212090973_create_event_authors_materialized_view.rb
new file mode 100644
index 00000000000..d7ece25c2b1
--- /dev/null
+++ b/db/click_house/migrate/main/20231212090973_create_event_authors_materialized_view.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+
+class CreateEventAuthorsMaterializedView < ClickHouse::Migration
+ def up
+ execute <<~SQL
+ CREATE MATERIALIZED VIEW IF NOT EXISTS event_authors_mv
+ TO event_authors
+ AS
+ SELECT
+ author_id,
+ argMax(deleted, events.updated_at) as deleted,
+ max(events.updated_at) as last_event_at
+ FROM events
+ GROUP BY author_id
+ SQL
+ end
+
+ def down
+ execute <<~SQL
+ DROP VIEW IF EXISTS event_authors_mv
+ SQL
+ end
+end
diff --git a/db/click_house/migrate/main/20231212092970_create_event_namespace_paths_materialized_view.rb b/db/click_house/migrate/main/20231212092970_create_event_namespace_paths_materialized_view.rb
new file mode 100644
index 00000000000..11cdb73ed8a
--- /dev/null
+++ b/db/click_house/migrate/main/20231212092970_create_event_namespace_paths_materialized_view.rb
@@ -0,0 +1,27 @@
+# frozen_string_literal: true
+
+class CreateEventNamespacePathsMaterializedView < ClickHouse::Migration
+ def up
+ # The path contains the same data as traversal_ids, ancestor namespace ids separated by
+ # the / character. Here we extract the last id value from the path string and store it
+ # as namespace id. Reasoning: batching over the table requires an integer column.
+ execute <<~SQL
+ CREATE MATERIALIZED VIEW IF NOT EXISTS event_namespace_paths_mv
+ TO event_namespace_paths
+ AS
+ SELECT
+ splitByChar('/', path)[length(splitByChar('/', path)) - 1] AS namespace_id,
+ path,
+ argMax(deleted, events.updated_at) as deleted,
+ max(events.updated_at) as last_event_at
+ FROM events
+ GROUP BY namespace_id, path
+ SQL
+ end
+
+ def down
+ execute <<~SQL
+ DROP VIEW IF EXISTS event_namespace_paths_mv
+ SQL
+ end
+end
diff --git a/db/docs/abuse_report_assignees.yml b/db/docs/abuse_report_assignees.yml
new file mode 100644
index 00000000000..5b07dacc7bb
--- /dev/null
+++ b/db/docs/abuse_report_assignees.yml
@@ -0,0 +1,10 @@
+---
+table_name: abuse_report_assignees
+classes:
+ - Admin::AbuseReportAssignee
+feature_categories:
+ - insider_threat
+description: Stores information linking abuse reports and users (assignee)
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/134240
+milestone: '16.7'
+gitlab_schema: gitlab_main_cell
diff --git a/db/docs/activity_pub_releases_subscriptions.yml b/db/docs/activity_pub_releases_subscriptions.yml
index d759aada5a9..6075847c780 100644
--- a/db/docs/activity_pub_releases_subscriptions.yml
+++ b/db/docs/activity_pub_releases_subscriptions.yml
@@ -8,4 +8,6 @@ description: Stores subscriptions from external users through ActivityPub for pr
releases
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/132889
milestone: '16.6'
-gitlab_schema: gitlab_main
+gitlab_schema: gitlab_main_cell
+sharding_key:
+ project_id: projects
diff --git a/db/docs/analytics_devops_adoption_snapshots.yml b/db/docs/analytics_devops_adoption_snapshots.yml
index 378b83cc22f..e8bdb5f32c8 100644
--- a/db/docs/analytics_devops_adoption_snapshots.yml
+++ b/db/docs/analytics_devops_adoption_snapshots.yml
@@ -7,4 +7,6 @@ feature_categories:
description: Contains periodical DevOps Adoption data points.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/47388
milestone: '13.7'
-gitlab_schema: gitlab_main
+gitlab_schema: gitlab_main_cell
+sharding_key:
+ namespace_id: namespaces
diff --git a/db/docs/approval_merge_request_rules_users.yml b/db/docs/approval_merge_request_rules_users.yml
index 746aa70ebd2..d685eef8770 100644
--- a/db/docs/approval_merge_request_rules_users.yml
+++ b/db/docs/approval_merge_request_rules_users.yml
@@ -1,6 +1,7 @@
---
table_name: approval_merge_request_rules_users
-classes: []
+classes:
+- ApprovalMergeRequestRulesUser
feature_categories:
- source_code_management
description: Keeps connection between user and a merge request approval rule
diff --git a/db/docs/audit_events_instance_amazon_s3_configurations.yml b/db/docs/audit_events_instance_amazon_s3_configurations.yml
new file mode 100644
index 00000000000..5cb049342ee
--- /dev/null
+++ b/db/docs/audit_events_instance_amazon_s3_configurations.yml
@@ -0,0 +1,10 @@
+---
+table_name: audit_events_instance_amazon_s3_configurations
+classes:
+ - AuditEvents::Instance::AmazonS3Configuration
+feature_categories:
+ - audit_events
+description: Stores Amazon S3 configurations used for instance level audit event streaming.
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/136492
+milestone: '16.7'
+gitlab_schema: gitlab_main
diff --git a/db/docs/audit_events_streaming_http_group_namespace_filters.yml b/db/docs/audit_events_streaming_http_group_namespace_filters.yml
index df08e8b57d2..204ebcd3feb 100644
--- a/db/docs/audit_events_streaming_http_group_namespace_filters.yml
+++ b/db/docs/audit_events_streaming_http_group_namespace_filters.yml
@@ -7,4 +7,6 @@ feature_categories:
description: Represents a subgroup or project filter for audit event streaming on groups
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/135080
milestone: '16.6'
-gitlab_schema: gitlab_main
+gitlab_schema: gitlab_main_cell
+sharding_key:
+ namespace_id: namespaces
diff --git a/db/docs/audit_events_streaming_http_instance_namespace_filters.yml b/db/docs/audit_events_streaming_http_instance_namespace_filters.yml
new file mode 100644
index 00000000000..9dc7d05a315
--- /dev/null
+++ b/db/docs/audit_events_streaming_http_instance_namespace_filters.yml
@@ -0,0 +1,12 @@
+---
+table_name: audit_events_streaming_http_instance_namespace_filters
+classes:
+ - AuditEvents::Streaming::HTTP::Instance::NamespaceFilter
+feature_categories:
+ - audit_events
+description: Represents a group or project filter for instance-level custom http external audit event destinations.
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/136959
+milestone: '16.7'
+gitlab_schema: gitlab_main_cell
+sharding_key:
+ namespace_id: namespaces
diff --git a/db/docs/automation_rules.yml b/db/docs/automation_rules.yml
index fcbbf247f9d..2465bd3a059 100644
--- a/db/docs/automation_rules.yml
+++ b/db/docs/automation_rules.yml
@@ -1,10 +1,8 @@
---
table_name: automation_rules
description: Stores automation rules and their trigger events
-classes:
-- Automation::Rule
feature_categories:
-- no_code_automation
+-
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/111021
milestone: '15.9'
gitlab_schema: gitlab_main
diff --git a/db/docs/batched_background_migrations.yml b/db/docs/batched_background_migrations.yml
index d23f1b30b1d..96860405ddb 100644
--- a/db/docs/batched_background_migrations.yml
+++ b/db/docs/batched_background_migrations.yml
@@ -6,7 +6,7 @@ feature_categories:
- database
description: >-
The batched_background_migrations table stores information about the batched background migrations present in the system.
- See https://docs.gitlab.com/ee/development/batched_background_migrations.html for more details.
+ See https://docs.gitlab.com/ee/development/database/batched_background_migrations.html for more details.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/54628
milestone: '13.10'
gitlab_schema: gitlab_shared
diff --git a/db/docs/batched_background_migrations/backfill_admin_mode_scope_for_personal_access_tokens.yml b/db/docs/batched_background_migrations/backfill_admin_mode_scope_for_personal_access_tokens.yml
index 33f3371e294..6f4aa6005e3 100644
--- a/db/docs/batched_background_migrations/backfill_admin_mode_scope_for_personal_access_tokens.yml
+++ b/db/docs/batched_background_migrations/backfill_admin_mode_scope_for_personal_access_tokens.yml
@@ -1,6 +1,8 @@
---
migration_job_name: BackfillAdminModeScopeForPersonalAccessTokens
-description: backfills `admin_mode` scope to personal access tokens associated to administrators
+description: backfills `admin_mode` scope to personal access tokens associated to
+ administrators
feature_category: system_access
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/107875
-milestone: 15.8
+milestone: '15.8'
+finalized_by: '20231128155514'
diff --git a/db/docs/batched_background_migrations/backfill_branch_protection_namespace_setting.yml b/db/docs/batched_background_migrations/backfill_branch_protection_namespace_setting.yml
new file mode 100644
index 00000000000..9a596cb056e
--- /dev/null
+++ b/db/docs/batched_background_migrations/backfill_branch_protection_namespace_setting.yml
@@ -0,0 +1,9 @@
+---
+migration_job_name: BackfillBranchProtectionNamespaceSetting
+description: This migration back fills column default_branch_protection_defaults of namespace settings table
+feature_category: source_code_management
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/136181
+milestone: '16.7'
+queued_migration_version: 20231107092912
+finalize_after: '2024-01-23'
+finalized_by: # version of the migration that ensured this bbm
diff --git a/db/docs/batched_background_migrations/backfill_code_suggestions_namespace_settings.yml b/db/docs/batched_background_migrations/backfill_code_suggestions_namespace_settings.yml
index d0803735d0b..a6e04394d24 100644
--- a/db/docs/batched_background_migrations/backfill_code_suggestions_namespace_settings.yml
+++ b/db/docs/batched_background_migrations/backfill_code_suggestions_namespace_settings.yml
@@ -3,4 +3,5 @@ migration_job_name: BackfillCodeSuggestionsNamespaceSettings
description: Updates default value of code_suggestions on namespace_settings table
feature_category: code_suggestions
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/121126
-milestone: 16.1
+milestone: '16.1'
+finalized_by: '20231206145850'
diff --git a/db/docs/batched_background_migrations/backfill_default_branch_protection_namespace_setting.yml b/db/docs/batched_background_migrations/backfill_default_branch_protection_namespace_setting.yml
index 7a9e1cb8f5b..7beca6bde50 100644
--- a/db/docs/batched_background_migrations/backfill_default_branch_protection_namespace_setting.yml
+++ b/db/docs/batched_background_migrations/backfill_default_branch_protection_namespace_setting.yml
@@ -3,4 +3,4 @@ migration_job_name: BackfillDefaultBranchProtectionNamespaceSetting
description: This migration back fills column default_branch_protection_defaults of namespace settings table
feature_category: database
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/127335/
-milestone: 16.3
+milestone: '16.3'
diff --git a/db/docs/batched_background_migrations/backfill_design_management_repositories.yml b/db/docs/batched_background_migrations/backfill_design_management_repositories.yml
index 95ff87869c3..0bca97d9868 100644
--- a/db/docs/batched_background_migrations/backfill_design_management_repositories.yml
+++ b/db/docs/batched_background_migrations/backfill_design_management_repositories.yml
@@ -3,4 +3,5 @@ migration_job_name: BackfillDesignManagementRepositories
description: Backfills the new table with project ids
feature_category: geo_replication
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/116975
-milestone: 15.11
+milestone: '15.11'
+finalized_by: '20231206145911'
diff --git a/db/docs/batched_background_migrations/backfill_dismissal_reason_in_vulnerability_reads.yml b/db/docs/batched_background_migrations/backfill_dismissal_reason_in_vulnerability_reads.yml
index a446300af0a..4e845f41c32 100644
--- a/db/docs/batched_background_migrations/backfill_dismissal_reason_in_vulnerability_reads.yml
+++ b/db/docs/batched_background_migrations/backfill_dismissal_reason_in_vulnerability_reads.yml
@@ -1,6 +1,9 @@
---
migration_job_name: BackfillDismissalReasonInVulnerabilityReads
-description: Backfill `dismissal_reason` for rows with `state` of `dismissed` in `vulnerability_reads` table
+description: Backfill `dismissal_reason` for rows with `state` of `dismissed` in `vulnerability_reads`
+ table
feature_category: vulnerability_management
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/issues/412667
-milestone: 16.1
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/123518
+queued_migration_version: 20230612232000
+milestone: '16.1'
+finalized_by: '20231207163648'
diff --git a/db/docs/batched_background_migrations/backfill_finding_id_in_vulnerabilities.yml b/db/docs/batched_background_migrations/backfill_finding_id_in_vulnerabilities.yml
index 5d3f4e92355..aaa901d46ea 100644
--- a/db/docs/batched_background_migrations/backfill_finding_id_in_vulnerabilities.yml
+++ b/db/docs/batched_background_migrations/backfill_finding_id_in_vulnerabilities.yml
@@ -2,5 +2,7 @@
migration_job_name: BackfillFindingIdInVulnerabilities
description: Backfills finding_id column on vulnerabilities table for a proper 1:1 relation
feature_category: vulnerability_management
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/issues/418971
-milestone: 16.4
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/130058
+milestone: '16.7'
+queued_migration_version: 20231129105945
+finalize_after: '2024-01-15'
diff --git a/db/docs/batched_background_migrations/backfill_has_merge_request_of_vulnerability_reads.yml b/db/docs/batched_background_migrations/backfill_has_merge_request_of_vulnerability_reads.yml
index c6bf73622f6..d6cd709ca70 100644
--- a/db/docs/batched_background_migrations/backfill_has_merge_request_of_vulnerability_reads.yml
+++ b/db/docs/batched_background_migrations/backfill_has_merge_request_of_vulnerability_reads.yml
@@ -3,4 +3,4 @@ migration_job_name: BackfillHasMergeRequestOfVulnerabilityReads
description: Backfills has_merge_request column for vulnerability_reads table.
feature_category: database
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/130952
-milestone: 16.4
+milestone: '16.4'
diff --git a/db/docs/batched_background_migrations/backfill_has_remediations_of_vulnerability_reads.yml b/db/docs/batched_background_migrations/backfill_has_remediations_of_vulnerability_reads.yml
index 05a5f909270..18dd6137921 100644
--- a/db/docs/batched_background_migrations/backfill_has_remediations_of_vulnerability_reads.yml
+++ b/db/docs/batched_background_migrations/backfill_has_remediations_of_vulnerability_reads.yml
@@ -1,7 +1,9 @@
---
migration_job_name: BackfillHasRemediationsOfVulnerabilityReads
-description: Backfills has_remediations column for vulnerability_reads table.
+description: Backfills has_remediations column for vulnerability_reads table.
+ Originally introduced via https://gitlab.com/gitlab-org/gitlab/-/merge_requests/133714
+ RE-ran because there was a error in remediation ingestion logic.
feature_category: database
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/133714
-milestone: 16.5
-queued_migration_version: 20231011142714
+milestone: '16.7'
+queued_migration_version: 20231201204712
diff --git a/db/docs/batched_background_migrations/backfill_merge_request_diffs_project_id.yml b/db/docs/batched_background_migrations/backfill_merge_request_diffs_project_id.yml
new file mode 100644
index 00000000000..54d38942659
--- /dev/null
+++ b/db/docs/batched_background_migrations/backfill_merge_request_diffs_project_id.yml
@@ -0,0 +1,9 @@
+---
+migration_job_name: BackfillMergeRequestDiffsProjectId
+description: Populates the new `merge_request_diffs.project_id` column after joining with the `merge_requests` table
+feature_category: code_review_workflow
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/136800
+milestone: '16.7'
+queued_migration_version: 20231114043522
+finalize_after: '2024-04-01'
+finalized_by: # version of the migration that ensured this bbm
diff --git a/db/docs/batched_background_migrations/backfill_missing_ci_cd_settings.yml b/db/docs/batched_background_migrations/backfill_missing_ci_cd_settings.yml
index aa6ba2684af..5299b6dd414 100644
--- a/db/docs/batched_background_migrations/backfill_missing_ci_cd_settings.yml
+++ b/db/docs/batched_background_migrations/backfill_missing_ci_cd_settings.yml
@@ -2,5 +2,7 @@
migration_job_name: BackfillMissingCiCdSettings
description: Backfills ci_cd_settings for projects that do not have them
feature_category: source_code_management
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/issues/393502
-milestone: 16.2
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/124921
+queued_migration_version: 20230628023103
+milestone: '16.2'
+finalized_by: '20231207220916'
diff --git a/db/docs/batched_background_migrations/backfill_missing_vulnerability_dismissal_details.yml b/db/docs/batched_background_migrations/backfill_missing_vulnerability_dismissal_details.yml
index f84a6ad84ad..33a46c3f930 100644
--- a/db/docs/batched_background_migrations/backfill_missing_vulnerability_dismissal_details.yml
+++ b/db/docs/batched_background_migrations/backfill_missing_vulnerability_dismissal_details.yml
@@ -3,4 +3,5 @@ migration_job_name: BackfillMissingVulnerabilityDismissalDetails
description: Backfill missing vulnerability dimissal information as a result of https://gitlab.com/gitlab-org/gitlab/-/issues/412983
feature_category: vulnerability_management
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/126253
-milestone: 16.2
+milestone: '16.2'
+finalized_by: '20231207220935'
diff --git a/db/docs/batched_background_migrations/backfill_nuget_normalized_version.yml b/db/docs/batched_background_migrations/backfill_nuget_normalized_version.yml
index b0ea13472d4..cf80d03f20e 100644
--- a/db/docs/batched_background_migrations/backfill_nuget_normalized_version.yml
+++ b/db/docs/batched_background_migrations/backfill_nuget_normalized_version.yml
@@ -3,4 +3,4 @@ migration_job_name: BackfillNugetNormalizedVersion
description: Introduce a batched background migration to backfill the normalized_version column in packages_nuget_metadata table.
feature_category: package_registry
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/128675
-milestone: 16.4
+milestone: '16.4'
diff --git a/db/docs/batched_background_migrations/backfill_packages_tags_project_id.yml b/db/docs/batched_background_migrations/backfill_packages_tags_project_id.yml
index b8caef928bb..777ca064c0d 100644
--- a/db/docs/batched_background_migrations/backfill_packages_tags_project_id.yml
+++ b/db/docs/batched_background_migrations/backfill_packages_tags_project_id.yml
@@ -3,7 +3,7 @@ migration_job_name: BackfillPackagesTagsProjectId
description: Populates the new `packages_tags.project_id` column after joining with the `packages_packages` table
feature_category: package_registry
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/135451
-milestone: 16.6
+milestone: '16.6'
queued_migration_version: 20231030071209
finalize_after: '2023-12-23'
finalized_by: # version of the migration that ensured this bbm
diff --git a/db/docs/batched_background_migrations/backfill_project_statistics_storage_size_with_recent_size.yml b/db/docs/batched_background_migrations/backfill_project_statistics_storage_size_with_recent_size.yml
index 1ff17fd4099..b6175eb2b65 100644
--- a/db/docs/batched_background_migrations/backfill_project_statistics_storage_size_with_recent_size.yml
+++ b/db/docs/batched_background_migrations/backfill_project_statistics_storage_size_with_recent_size.yml
@@ -3,4 +3,4 @@ migration_job_name: BackfillProjectStatisticsStorageSizeWithRecentSize
description: Refreshes ProjectStatistics to use recent_objects_size for repository_size
feature_category: consumables_cost_management
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/128730
-milestone: 16.4
+milestone: '16.4'
diff --git a/db/docs/batched_background_migrations/backfill_project_statistics_storage_size_without_pipeline_artifacts_size_job.yml b/db/docs/batched_background_migrations/backfill_project_statistics_storage_size_without_pipeline_artifacts_size_job.yml
index c2dda4a2923..c8d61991345 100644
--- a/db/docs/batched_background_migrations/backfill_project_statistics_storage_size_without_pipeline_artifacts_size_job.yml
+++ b/db/docs/batched_background_migrations/backfill_project_statistics_storage_size_without_pipeline_artifacts_size_job.yml
@@ -1,6 +1,8 @@
---
migration_job_name: BackfillProjectStatisticsStorageSizeWithoutPipelineArtifactsSizeJob
-description: Refreshes ProjectStatistics to remove pipeline_artifacts_size from the total storage_size
+description: Refreshes ProjectStatistics to remove pipeline_artifacts_size from the
+ total storage_size
feature_category: consumables_cost_management
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/126053
-milestone: 16.3
+milestone: '16.3'
+finalized_by: '20231207220954'
diff --git a/db/docs/batched_background_migrations/backfill_project_wiki_repositories.yml b/db/docs/batched_background_migrations/backfill_project_wiki_repositories.yml
index 5adc58a73cd..4d55cad0f5a 100644
--- a/db/docs/batched_background_migrations/backfill_project_wiki_repositories.yml
+++ b/db/docs/batched_background_migrations/backfill_project_wiki_repositories.yml
@@ -1,8 +1,8 @@
---
migration_job_name: BackfillProjectWikiRepositories
-description: >-
- Backfills the project_wiki_repositories table for each project that still
+description: Backfills the project_wiki_repositories table for each project that still
does not have an entry in this table.
feature_category: geo
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/113783
-milestone: 15.10
+milestone: '15.10'
+finalized_by: '20231207221013'
diff --git a/db/docs/batched_background_migrations/backfill_resource_link_events.yml b/db/docs/batched_background_migrations/backfill_resource_link_events.yml
index 224cf5fe06b..39c59647795 100644
--- a/db/docs/batched_background_migrations/backfill_resource_link_events.yml
+++ b/db/docs/batched_background_migrations/backfill_resource_link_events.yml
@@ -3,4 +3,4 @@ migration_job_name: BackfillResourceLinkEvents
description: Backfills resource_link_events table based off system_note_metadata and notes
feature_category: team_planning
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/118605
-milestone: 16.1
+milestone: '16.1'
diff --git a/db/docs/batched_background_migrations/backfill_root_storage_statistics_fork_storage_sizes.yml b/db/docs/batched_background_migrations/backfill_root_storage_statistics_fork_storage_sizes.yml
index e029488f5c4..5120baf69db 100644
--- a/db/docs/batched_background_migrations/backfill_root_storage_statistics_fork_storage_sizes.yml
+++ b/db/docs/batched_background_migrations/backfill_root_storage_statistics_fork_storage_sizes.yml
@@ -1,6 +1,9 @@
---
migration_job_name: BackfillRootStorageStatisticsForkStorageSizes
-description: Backfill the public_forks_storage_size, internal_forks_storage_size, and private_forks_storage_size columns on the namespace_root_storage_statistics table
+description: Backfill the public_forks_storage_size, internal_forks_storage_size,
+ and private_forks_storage_size columns on the namespace_root_storage_statistics
+ table
feature_category: consumables_cost_management
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/120916
-milestone: 16.1
+milestone: '16.1'
+finalized_by: '20231207221036'
diff --git a/db/docs/batched_background_migrations/backfill_user_preferences_with_defaults.yml b/db/docs/batched_background_migrations/backfill_user_preferences_with_defaults.yml
index bee4b1f38a9..b95527cc32c 100644
--- a/db/docs/batched_background_migrations/backfill_user_preferences_with_defaults.yml
+++ b/db/docs/batched_background_migrations/backfill_user_preferences_with_defaults.yml
@@ -3,4 +3,4 @@ migration_job_name: BackfillUserPreferencesWithDefaults
description: Backfills the user_preferences table columns with their default values
feature_category: user_profile
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/125774
-milestone: 16.4
+milestone: '16.4'
diff --git a/db/docs/batched_background_migrations/backfill_users_with_defaults.yml b/db/docs/batched_background_migrations/backfill_users_with_defaults.yml
index ecc86fd665c..6faa1fbf655 100644
--- a/db/docs/batched_background_migrations/backfill_users_with_defaults.yml
+++ b/db/docs/batched_background_migrations/backfill_users_with_defaults.yml
@@ -3,4 +3,4 @@ migration_job_name: BackfillUsersWithDefaults
description: Backfills the users table columns with their default values
feature_category: user_profile
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/125881
-milestone: 16.4
+milestone: '16.4'
diff --git a/db/docs/batched_background_migrations/backfill_uuid_conversion_column_in_vulnerability_occurrences.yml b/db/docs/batched_background_migrations/backfill_uuid_conversion_column_in_vulnerability_occurrences.yml
index 43171193f28..3c4e56dc883 100644
--- a/db/docs/batched_background_migrations/backfill_uuid_conversion_column_in_vulnerability_occurrences.yml
+++ b/db/docs/batched_background_migrations/backfill_uuid_conversion_column_in_vulnerability_occurrences.yml
@@ -1,6 +1,8 @@
---
migration_job_name: BackfillUuidConversionColumnInVulnerabilityOccurrences
-description: backfill values for `uuid_convert_string_to_uuid` column in vulnerability_occurrences table
+description: backfill values for `uuid_convert_string_to_uuid` column in vulnerability_occurrences
+ table
feature_category: vulnerability_management
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/124986
-milestone: 16.2
+milestone: '16.2'
+finalized_by: '20231207221056'
diff --git a/db/docs/batched_background_migrations/backfill_vs_code_settings_uuid.yml b/db/docs/batched_background_migrations/backfill_vs_code_settings_uuid.yml
new file mode 100644
index 00000000000..022752a06a7
--- /dev/null
+++ b/db/docs/batched_background_migrations/backfill_vs_code_settings_uuid.yml
@@ -0,0 +1,9 @@
+---
+migration_job_name: BackfillVsCodeSettingsUuid
+description: Backfills the uuid column of existing vs_code_settings records
+feature_category: web_ide
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/138355
+milestone: '16.7'
+queued_migration_version: 20231130140901
+finalize_after: '2023-12-17'
+finalized_by: # version of the migration that finalized this BBM
diff --git a/db/docs/batched_background_migrations/backfill_work_item_type_id_for_issues.yml b/db/docs/batched_background_migrations/backfill_work_item_type_id_for_issues.yml
index 01e9fd7528e..0b00e04dc99 100644
--- a/db/docs/batched_background_migrations/backfill_work_item_type_id_for_issues.yml
+++ b/db/docs/batched_background_migrations/backfill_work_item_type_id_for_issues.yml
@@ -3,4 +3,4 @@ migration_job_name: BackfillWorkItemTypeIdForIssues
description: Backfills every record in the issues table with the appropriate work_item_type_id
feature_category: team_planning
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/96591
-milestone: 15.4
+milestone: '15.4'
diff --git a/db/docs/batched_background_migrations/backfill_workspace_personal_access_token.yml b/db/docs/batched_background_migrations/backfill_workspace_personal_access_token.yml
index 53433fbb1c7..c810a918139 100644
--- a/db/docs/batched_background_migrations/backfill_workspace_personal_access_token.yml
+++ b/db/docs/batched_background_migrations/backfill_workspace_personal_access_token.yml
@@ -2,4 +2,7 @@ migration_job_name: BackfillWorkspacePersonalAccessToken
description: Create personal access token for workspaces without one
feature_category: remote_development
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/131516
-milestone: 16.4
+milestone: '16.4'
+queued_migration_version: 20230909120000
+finalize_after: "2023-09-15"
+finalized_by: 20230918143333
diff --git a/db/docs/batched_background_migrations/cleanup_personal_access_tokens_with_nil_expires_at.yml b/db/docs/batched_background_migrations/cleanup_personal_access_tokens_with_nil_expires_at.yml
index f89d63ff79f..b549c1553d8 100644
--- a/db/docs/batched_background_migrations/cleanup_personal_access_tokens_with_nil_expires_at.yml
+++ b/db/docs/batched_background_migrations/cleanup_personal_access_tokens_with_nil_expires_at.yml
@@ -1,8 +1,10 @@
---
migration_job_name: CleanupPersonalAccessTokensWithNilExpiresAt
-description: Updates value of expires_at column to 365 days from now when it's nil for PersonalAccessTokens
- Originally introduced via https://gitlab.com/gitlab-org/gitlab/-/merge_requests/120239
- Re-ran because there was a bypass that enabled some new PATs to be created with nil expires_at. That bypass was patched via https://gitlab.com/gitlab-org/gitlab/-/merge_requests/121370.
+description: Updates value of expires_at column to 365 days from now when it's nil
+ for PersonalAccessTokens Originally introduced via https://gitlab.com/gitlab-org/gitlab/-/merge_requests/120239
+ Re-ran because there was a bypass that enabled some new PATs to be created with
+ nil expires_at. That bypass was patched via https://gitlab.com/gitlab-org/gitlab/-/merge_requests/121370.
feature_category: system_access
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/123002
-milestone: 16.1
+milestone: '16.1'
+finalized_by: '20231207221119'
diff --git a/db/docs/batched_background_migrations/convert_credit_card_validation_data_to_hashes.yml b/db/docs/batched_background_migrations/convert_credit_card_validation_data_to_hashes.yml
index 4835f0ac59f..80ecde0027b 100644
--- a/db/docs/batched_background_migrations/convert_credit_card_validation_data_to_hashes.yml
+++ b/db/docs/batched_background_migrations/convert_credit_card_validation_data_to_hashes.yml
@@ -5,4 +5,4 @@ description: |
to hash and store values in new columns.
feature_category: user_profile
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/129350
-milestone: 16.4
+milestone: '16.4'
diff --git a/db/docs/batched_background_migrations/create_compliance_standards_adherence.yml b/db/docs/batched_background_migrations/create_compliance_standards_adherence.yml
index 6ab1282358b..0f0d47b39bc 100644
--- a/db/docs/batched_background_migrations/create_compliance_standards_adherence.yml
+++ b/db/docs/batched_background_migrations/create_compliance_standards_adherence.yml
@@ -2,5 +2,6 @@
migration_job_name: CreateComplianceStandardsAdherence
description: This migration creates 'project_compliance_standards_adherence' table for existing projects
feature_category: compliance_management
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/issues/413235
-milestone: 16.4
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/129941
+queued_migration_version: 20230818142801
+milestone: '16.4'
diff --git a/db/docs/batched_background_migrations/delete_invalid_protected_branch_merge_access_levels.yml b/db/docs/batched_background_migrations/delete_invalid_protected_branch_merge_access_levels.yml
index cd85f7e4ab2..6dccaeeeb50 100644
--- a/db/docs/batched_background_migrations/delete_invalid_protected_branch_merge_access_levels.yml
+++ b/db/docs/batched_background_migrations/delete_invalid_protected_branch_merge_access_levels.yml
@@ -2,6 +2,6 @@
migration_job_name: DeleteInvalidProtectedBranchMergeAccessLevels
description: Remove rows from protected_branch_merge_access_levels for groups that do not have project_group_links to the project for the associated protected branch
feature_category: source_code_management
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/issues/427486
-milestone: 16.6
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/134337
+milestone: '16.6'
queued_migration_version: 20231016173129
diff --git a/db/docs/batched_background_migrations/delete_invalid_protected_branch_push_access_levels.yml b/db/docs/batched_background_migrations/delete_invalid_protected_branch_push_access_levels.yml
index dd92e35f26f..72e59e6e00f 100644
--- a/db/docs/batched_background_migrations/delete_invalid_protected_branch_push_access_levels.yml
+++ b/db/docs/batched_background_migrations/delete_invalid_protected_branch_push_access_levels.yml
@@ -2,6 +2,6 @@
migration_job_name: DeleteInvalidProtectedBranchPushAccessLevels
description: Remove rows from protected_branch_push_access_levels for groups that do not have project_group_links to the project for the associated protected branch
feature_category: source_code_management
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/issues/427486
-milestone: 16.6
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/134337
+milestone: '16.6'
queued_migration_version: 20231016194927
diff --git a/db/docs/batched_background_migrations/delete_invalid_protected_tag_create_access_levels.yml b/db/docs/batched_background_migrations/delete_invalid_protected_tag_create_access_levels.yml
index 0c406c7650b..35c76b78894 100644
--- a/db/docs/batched_background_migrations/delete_invalid_protected_tag_create_access_levels.yml
+++ b/db/docs/batched_background_migrations/delete_invalid_protected_tag_create_access_levels.yml
@@ -2,6 +2,6 @@
migration_job_name: DeleteInvalidProtectedTagCreateAccessLevels
description: Remove rows from protected_tag_create_access_levels for groups that do not have project_group_links to the project for the associated protected tag
feature_category: source_code_management
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/issues/427486
-milestone: 16.6
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/134337
+milestone: '16.6'
queued_migration_version: 20231016194943
diff --git a/db/docs/batched_background_migrations/delete_orphaned_transferred_project_approval_rules.yml b/db/docs/batched_background_migrations/delete_orphaned_transferred_project_approval_rules.yml
index 774c529116c..0dc99914451 100644
--- a/db/docs/batched_background_migrations/delete_orphaned_transferred_project_approval_rules.yml
+++ b/db/docs/batched_background_migrations/delete_orphaned_transferred_project_approval_rules.yml
@@ -5,4 +5,5 @@ description: |
that are defined for a group hierachy prior to transfer, so they cannot be applied, nor edited.
feature_category: security_policy_management
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/127767
-milestone: 16.3
+milestone: '16.3'
+finalized_by: '20231207221140'
diff --git a/db/docs/batched_background_migrations/delete_orphans_approval_merge_request_rules2.yml b/db/docs/batched_background_migrations/delete_orphans_approval_merge_request_rules2.yml
index 0c90fac771d..5503e958007 100644
--- a/db/docs/batched_background_migrations/delete_orphans_approval_merge_request_rules2.yml
+++ b/db/docs/batched_background_migrations/delete_orphans_approval_merge_request_rules2.yml
@@ -4,5 +4,6 @@ Odescription: |
Deletes orphaned scan finding and license scanning approval rules
that could have been created with project import.
feature_category: security_policy_management
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/issues/415925
-milestone: 16.5
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/127212
+queued_migration_version: 20230721095222
+milestone: '16.5'
diff --git a/db/docs/batched_background_migrations/delete_orphans_approval_project_rules2.yml b/db/docs/batched_background_migrations/delete_orphans_approval_project_rules2.yml
index 33abb158cf1..cfd19b93a3a 100644
--- a/db/docs/batched_background_migrations/delete_orphans_approval_project_rules2.yml
+++ b/db/docs/batched_background_migrations/delete_orphans_approval_project_rules2.yml
@@ -4,5 +4,6 @@ Odescription: |
Deletes orphaned scan finding and license scanning approval rules
that could have been created with project import.
feature_category: security_policy_management
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/issues/415925
-milestone: 16.5
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/127212
+queued_migration_version: 20230721095222
+milestone: '16.5'
diff --git a/db/docs/batched_background_migrations/fix_allow_descendants_override_disabled_shared_runners.yml b/db/docs/batched_background_migrations/fix_allow_descendants_override_disabled_shared_runners.yml
index dd35c69e744..1fec979899b 100644
--- a/db/docs/batched_background_migrations/fix_allow_descendants_override_disabled_shared_runners.yml
+++ b/db/docs/batched_background_migrations/fix_allow_descendants_override_disabled_shared_runners.yml
@@ -1,6 +1,8 @@
---
migration_job_name: FixAllowDescendantsOverrideDisabledSharedRunners
-description: Clears invalid combination of shared runners settings (fixes subgroup creation)
+description: Clears invalid combination of shared runners settings (fixes subgroup
+ creation)
feature_category: runner_fleet
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/128112
-milestone: 16.3
+milestone: '16.3'
+finalized_by: '20231207221159'
diff --git a/db/docs/batched_background_migrations/fix_namespace_ids_of_vulnerability_reads.yml b/db/docs/batched_background_migrations/fix_namespace_ids_of_vulnerability_reads.yml
index 1bee359aef5..1d486b94808 100644
--- a/db/docs/batched_background_migrations/fix_namespace_ids_of_vulnerability_reads.yml
+++ b/db/docs/batched_background_migrations/fix_namespace_ids_of_vulnerability_reads.yml
@@ -3,4 +3,4 @@ migration_job_name: FixNamespaceIdsOfVulnerabilityReads
description: Fixes the data integrity issues for `namespace_id` attribute of `vulnerability_reads` table
feature_category: vulnerability_management
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/129244
-milestone: 16.4
+milestone: '16.4'
diff --git a/db/docs/batched_background_migrations/mark_duplicate_npm_packages_for_destruction.yml b/db/docs/batched_background_migrations/mark_duplicate_npm_packages_for_destruction.yml
index bd059876a25..fcd1cecb741 100644
--- a/db/docs/batched_background_migrations/mark_duplicate_npm_packages_for_destruction.yml
+++ b/db/docs/batched_background_migrations/mark_duplicate_npm_packages_for_destruction.yml
@@ -3,4 +3,5 @@ migration_job_name: MarkDuplicateNpmPackagesForDestruction
description: It seeks duplicate npm packages and marks them for destruction.
feature_category: package_registry
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/114695
-milestone: 16.1
+milestone: '16.1'
+finalized_by: '20231207221219'
diff --git a/db/docs/batched_background_migrations/migrate_human_user_type.yml b/db/docs/batched_background_migrations/migrate_human_user_type.yml
index 869a4fe7351..16dd68a4a14 100644
--- a/db/docs/batched_background_migrations/migrate_human_user_type.yml
+++ b/db/docs/batched_background_migrations/migrate_human_user_type.yml
@@ -3,4 +3,5 @@ migration_job_name: MigrateHumanUserType
description: Migrates human user type from old value (nil) to new value (0) for better indexing
feature_category: user_management
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/115849
-milestone: 16.0
+milestone: '16.0'
+finalized_by: 20230523101514
diff --git a/db/docs/batched_background_migrations/populate_denormalized_columns_for_sbom_occurrences.yml b/db/docs/batched_background_migrations/populate_denormalized_columns_for_sbom_occurrences.yml
index b85ae1c22d6..0dddf7cc263 100644
--- a/db/docs/batched_background_migrations/populate_denormalized_columns_for_sbom_occurrences.yml
+++ b/db/docs/batched_background_migrations/populate_denormalized_columns_for_sbom_occurrences.yml
@@ -3,4 +3,4 @@ migration_job_name: PopulateDenormalizedColumnsForSbomOccurrences
description: Populates the denormalized columns for `sbom_occurrences` table.
feature_category: dependency_management
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/129486
-milestone: 16.4
+milestone: '16.4'
diff --git a/db/docs/batched_background_migrations/populate_vulnerability_dismissal_fields.yml b/db/docs/batched_background_migrations/populate_vulnerability_dismissal_fields.yml
index b51a6ab37d0..a59ecee3be7 100644
--- a/db/docs/batched_background_migrations/populate_vulnerability_dismissal_fields.yml
+++ b/db/docs/batched_background_migrations/populate_vulnerability_dismissal_fields.yml
@@ -2,5 +2,7 @@
migration_job_name: PopulateVulnerabilityDismissalFields
description: This populates missing dismissal info for vulnerabilities.
feature_category: vulnerability_management
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/issues/405032
-milestone: 15.11
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/117478
+queued_migration_version: 20230412185837
+milestone: '15.11'
+finalized_by: '20231207221241'
diff --git a/db/docs/batched_background_migrations/remove_invalid_deploy_access_level_groups.yml b/db/docs/batched_background_migrations/remove_invalid_deploy_access_level_groups.yml
index 39d13b58443..0556c8c2a32 100644
--- a/db/docs/batched_background_migrations/remove_invalid_deploy_access_level_groups.yml
+++ b/db/docs/batched_background_migrations/remove_invalid_deploy_access_level_groups.yml
@@ -1,6 +1,8 @@
---
migration_job_name: RemoveInvalidDeployAccessLevelGroups
-description: This deletes protected_environment_deploy_access_levels rows that have invalid group_id.
+description: This deletes protected_environment_deploy_access_levels rows that have
+ invalid group_id.
feature_category: continuous_delivery
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/121222
-milestone: 16.1
+milestone: '16.1'
+finalized_by: '20231207221300'
diff --git a/db/docs/batched_background_migrations/sync_scan_result_policies.yml b/db/docs/batched_background_migrations/sync_scan_result_policies.yml
index 16786572139..69e7a5bdc0c 100644
--- a/db/docs/batched_background_migrations/sync_scan_result_policies.yml
+++ b/db/docs/batched_background_migrations/sync_scan_result_policies.yml
@@ -5,4 +5,4 @@ description: Security policies are stored as YAML files in the security policy p
for all security policy configurations.
feature_category: security_policy_management
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/128378
-milestone: 16.4
+milestone: '16.4'
diff --git a/db/docs/batched_background_migrations/update_code_suggestions_for_namespace_settings.yml b/db/docs/batched_background_migrations/update_code_suggestions_for_namespace_settings.yml
index e0196878d61..db55e5e005c 100644
--- a/db/docs/batched_background_migrations/update_code_suggestions_for_namespace_settings.yml
+++ b/db/docs/batched_background_migrations/update_code_suggestions_for_namespace_settings.yml
@@ -3,4 +3,4 @@ migration_job_name: UpdateCodeSuggestionsForNamespaceSettings
description: Enables Code Suggestions for all namespaces by default
feature_category: code_suggestions
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/117899
-milestone: 16.0
+milestone: '16.0'
diff --git a/db/docs/batched_background_migrations/update_users_set_external_if_service_account.yml b/db/docs/batched_background_migrations/update_users_set_external_if_service_account.yml
index 1b89359b270..8c389bc82b0 100644
--- a/db/docs/batched_background_migrations/update_users_set_external_if_service_account.yml
+++ b/db/docs/batched_background_migrations/update_users_set_external_if_service_account.yml
@@ -3,4 +3,4 @@ migration_job_name: UpdateUsersSetExternalIfServiceAccount
description: Update external value for users of type Service Account
feature_category: system_access
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/130597
-milestone: 16.4
+milestone: '16.4'
diff --git a/db/docs/batched_background_migrations/update_workspaces_config_version.yml b/db/docs/batched_background_migrations/update_workspaces_config_version.yml
index 50cdfe1f2e9..ead063ebed6 100644
--- a/db/docs/batched_background_migrations/update_workspaces_config_version.yml
+++ b/db/docs/batched_background_migrations/update_workspaces_config_version.yml
@@ -2,4 +2,4 @@ migration_job_name: UpdateWorkspacesConfigVersion
description: Update config_version to 2 and force_include_all_resources to true for existing workspaces
feature_category: remote_development
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/131402
-milestone: 16.5
+milestone: '16.5'
diff --git a/db/docs/ci_editor_ai_conversation_messages.yml b/db/docs/ci_editor_ai_conversation_messages.yml
index fd7ab9bac61..de4ca6490a6 100644
--- a/db/docs/ci_editor_ai_conversation_messages.yml
+++ b/db/docs/ci_editor_ai_conversation_messages.yml
@@ -4,7 +4,8 @@ classes:
- Ci::Editor::AiConversation::Message
feature_categories:
- pipeline_composition
-description: "Represents an ai message for a user and project for the pipeline editor bot."
+description: Represents an ai message for a user and project for the pipeline editor
+ bot.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/119840
milestone: '16.0'
gitlab_schema: gitlab_ci
diff --git a/db/docs/ci_runner_machines.yml b/db/docs/ci_runner_machines.yml
index c7395907814..cf9e0480fe0 100644
--- a/db/docs/ci_runner_machines.yml
+++ b/db/docs/ci_runner_machines.yml
@@ -3,7 +3,7 @@ table_name: ci_runner_machines
classes:
- Ci::RunnerManager
feature_categories:
-- runner_fleet
+- fleet_visibility
description: Information about runner managers associated to Ci::Runner models
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/107801
milestone: '15.8'
diff --git a/db/docs/ci_runner_versions.yml b/db/docs/ci_runner_versions.yml
index cb983222a6e..aa8b5f24b46 100644
--- a/db/docs/ci_runner_versions.yml
+++ b/db/docs/ci_runner_versions.yml
@@ -3,7 +3,7 @@ table_name: ci_runner_versions
classes:
- Ci::RunnerVersion
feature_categories:
-- runner_fleet
+- fleet_visibility
description: Information about used Ci::Runner versions
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/90982
milestone: '15.2'
diff --git a/db/docs/ci_runners.yml b/db/docs/ci_runners.yml
index 5930adf7062..33bd6ae402f 100644
--- a/db/docs/ci_runners.yml
+++ b/db/docs/ci_runners.yml
@@ -4,7 +4,7 @@ classes:
- Ci::Runner
feature_categories:
- runner
-- runner_fleet
+- fleet_visibility
- runner_saas
description: Registered CI runners
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/046b28312704f3131e72dcd2dbdacc5264d4aa62
diff --git a/db/docs/feature_gates.yml b/db/docs/feature_gates.yml
index 10060ad38ba..701417e064b 100644
--- a/db/docs/feature_gates.yml
+++ b/db/docs/feature_gates.yml
@@ -1,6 +1,7 @@
---
table_name: feature_gates
classes:
+- Feature::BypassLoadBalancer::FlipperGate
- Feature::FlipperGate
- Flipper::Adapters::ActiveRecord::Gate
feature_categories:
diff --git a/db/docs/features.yml b/db/docs/features.yml
index 9866eff2a3f..b09b666b6d3 100644
--- a/db/docs/features.yml
+++ b/db/docs/features.yml
@@ -1,6 +1,7 @@
---
table_name: features
classes:
+- Feature::BypassLoadBalancer::FlipperFeature
- Feature::FlipperFeature
- Flipper::Adapters::ActiveRecord::Feature
feature_categories:
diff --git a/db/docs/integrations.yml b/db/docs/integrations.yml
index d0246caaf12..c087d49968a 100644
--- a/db/docs/integrations.yml
+++ b/db/docs/integrations.yml
@@ -45,7 +45,6 @@ classes:
- Integrations::Pumble
- Integrations::Pushover
- Integrations::Redmine
-- Integrations::Shimo
- Integrations::Slack
- Integrations::SlackSlashCommands
- Integrations::SquashTm
diff --git a/db/docs/labels.yml b/db/docs/labels.yml
index 83956783891..7cccf039993 100644
--- a/db/docs/labels.yml
+++ b/db/docs/labels.yml
@@ -12,3 +12,6 @@ description: Information related to labels, which can be associated with groups
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/03654a6abf47c88b8b980a6707874ff78080d2fe
milestone: '7.2'
gitlab_schema: gitlab_main_cell
+sharding_key:
+ project_id: projects
+ group_id: namespaces
diff --git a/db/docs/merge_requests.yml b/db/docs/merge_requests.yml
index 7e888184b6a..c24f6fd53b1 100644
--- a/db/docs/merge_requests.yml
+++ b/db/docs/merge_requests.yml
@@ -8,3 +8,5 @@ description: This is the main table that stores information about project merge
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/6d460aa2d6b3959593c168eed181516036525393
milestone: "<6.0"
gitlab_schema: gitlab_main_cell
+sharding_key:
+ target_project_id: projects
diff --git a/db/docs/namespace_ci_cd_settings.yml b/db/docs/namespace_ci_cd_settings.yml
index ddfa390694c..71668b132eb 100644
--- a/db/docs/namespace_ci_cd_settings.yml
+++ b/db/docs/namespace_ci_cd_settings.yml
@@ -4,7 +4,7 @@ classes:
- NamespaceCiCdSetting
feature_categories:
- continuous_integration
-- runner_fleet
+- fleet_visibility
description: Namespace-scoped settings related to the CI/CD domain
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/86477
milestone: '15.0'
diff --git a/db/docs/organization_details.yml b/db/docs/organization_details.yml
new file mode 100644
index 00000000000..75590ed21ed
--- /dev/null
+++ b/db/docs/organization_details.yml
@@ -0,0 +1,10 @@
+---
+table_name: organization_details
+classes:
+- Organizations::OrganizationDetail
+feature_categories:
+- cell
+description: Detail about an organization
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/137616
+milestone: '16.7'
+gitlab_schema: gitlab_main_clusterwide
diff --git a/db/docs/p_catalog_resource_sync_events.yml b/db/docs/p_catalog_resource_sync_events.yml
new file mode 100644
index 00000000000..b74a644fd74
--- /dev/null
+++ b/db/docs/p_catalog_resource_sync_events.yml
@@ -0,0 +1,13 @@
+---
+table_name: p_catalog_resource_sync_events
+classes:
+- Ci::Catalog::Resources::SyncEvent
+feature_categories:
+- pipeline_composition
+description: A queue of catalog resources that need to be synchronized with data from
+ their associated `projects` records.
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/137238
+milestone: '16.7'
+gitlab_schema: gitlab_main_cell
+sharding_key:
+ project_id: projects
diff --git a/db/docs/p_ci_finished_build_ch_sync_events.yml b/db/docs/p_ci_finished_build_ch_sync_events.yml
index 09938f99b16..c8875fd3e8b 100644
--- a/db/docs/p_ci_finished_build_ch_sync_events.yml
+++ b/db/docs/p_ci_finished_build_ch_sync_events.yml
@@ -3,7 +3,7 @@ table_name: p_ci_finished_build_ch_sync_events
classes:
- Ci::FinishedBuildChSyncEvent
feature_categories:
-- runner_fleet
+- fleet_visibility
description: Holds references to finished CI builds ready to be synced to ClickHouse
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/
milestone: '16.5'
diff --git a/db/docs/p_ci_runner_machine_builds.yml b/db/docs/p_ci_runner_machine_builds.yml
index 55d09963acc..3f3b8373ac5 100644
--- a/db/docs/p_ci_runner_machine_builds.yml
+++ b/db/docs/p_ci_runner_machine_builds.yml
@@ -2,7 +2,7 @@ table_name: p_ci_runner_machine_builds
classes:
- Ci::RunnerManagerBuild
feature_categories:
-- runner_fleet
+- fleet_visibility
description: Relationships between builds and runner managers
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/111476
milestone: '15.9'
diff --git a/db/docs/packages_tags.yml b/db/docs/packages_tags.yml
index dcd1eccd35c..11bc0d68662 100644
--- a/db/docs/packages_tags.yml
+++ b/db/docs/packages_tags.yml
@@ -7,4 +7,6 @@ feature_categories:
description: Package identifier tags for supported package types. See https://docs.gitlab.com/ee/user/packages/npm_registry/#add-npm-distribution-tags for an example.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/20636
milestone: '12.7'
-gitlab_schema: gitlab_main
+gitlab_schema: gitlab_main_cell
+sharding_key:
+ project_id: projects
diff --git a/db/docs/project_ci_cd_settings.yml b/db/docs/project_ci_cd_settings.yml
index 0f7f59dbb15..a0643aff4b9 100644
--- a/db/docs/project_ci_cd_settings.yml
+++ b/db/docs/project_ci_cd_settings.yml
@@ -5,7 +5,7 @@ classes:
feature_categories:
- continuous_integration
- continuous_delivery
-- runner_fleet
+- fleet_visibility
description: Project-scoped settings related to the CI/CD domain
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/392c411bdc16386ef42c86afaf8c4d8e4cddb955
milestone: '10.8'
diff --git a/db/docs/projects.yml b/db/docs/projects.yml
index 84c0aa3373f..36dc32be0ea 100644
--- a/db/docs/projects.yml
+++ b/db/docs/projects.yml
@@ -8,3 +8,22 @@ description: Stores project records
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/9ba1224867665844b117fa037e1465bb706b3685
milestone: "<6.0"
gitlab_schema: gitlab_main_cell
+schema_inconsistencies:
+- type: missing_indexes
+ object_name: index_service_desk_enabled_projects_on_id_creator_id_created_at
+ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/137884
+- type: missing_indexes
+ object_name: index_projects_on_mirror_id_where_mirror_and_trigger_builds
+ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/137884
+- type: missing_indexes
+ object_name: index_projects_on_mirror_creator_id_created_at
+ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/137884
+- type: missing_indexes
+ object_name: index_projects_on_id_service_desk_enabled
+ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/137884
+- type: missing_indexes
+ object_name: idx_projects_id_created_at_disable_overriding_approvers_true
+ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/137884
+- type: missing_indexes
+ object_name: idx_projects_id_created_at_disable_overriding_approvers_false
+ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/137884
diff --git a/db/docs/sbom_occurrences_vulnerabilities.yml b/db/docs/sbom_occurrences_vulnerabilities.yml
new file mode 100644
index 00000000000..aab36b34cfb
--- /dev/null
+++ b/db/docs/sbom_occurrences_vulnerabilities.yml
@@ -0,0 +1,5 @@
+table_name: sbom_occurrences_vulnerabilities
+feature_categories:
+ - dependency_management
+milestone: '16.7'
+gitlab_schema: gitlab_main_cell
diff --git a/db/docs/security_findings.yml b/db/docs/security_findings.yml
index 724881d4d17..02ca36d0af6 100644
--- a/db/docs/security_findings.yml
+++ b/db/docs/security_findings.yml
@@ -8,3 +8,12 @@ description: Stores a subset of the Finding data which is used to optimize the p
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/40368
milestone: '13.4'
gitlab_schema: gitlab_main
+desired_sharding_key:
+ project_id:
+ references: projects
+ backfill_via:
+ parent:
+ foreign_key: scanner_id
+ table: vulnerability_scanners
+ sharding_key: project_id
+ belongs_to: scanner
diff --git a/db/docs/users.yml b/db/docs/users.yml
index 119c89d48cc..f2c305ccc8d 100644
--- a/db/docs/users.yml
+++ b/db/docs/users.yml
@@ -9,3 +9,10 @@ description: TODO
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/9ba1224867665844b117fa037e1465bb706b3685
milestone: "<6.0"
gitlab_schema: gitlab_main_clusterwide
+schema_inconsistencies:
+- type: missing_indexes
+ object_name: index_users_for_auditors
+ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/138110
+- type: missing_indexes
+ object_name: index_users_on_id_and_last_activity_on_for_active_human_service
+ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/139230
diff --git a/db/docs/views/postgres_sequences.yml b/db/docs/views/postgres_sequences.yml
new file mode 100644
index 00000000000..7937a5511bf
--- /dev/null
+++ b/db/docs/views/postgres_sequences.yml
@@ -0,0 +1,10 @@
+---
+view_name: postgres_sequences
+classes:
+ - Gitlab::Database::PostgresSequence
+feature_categories:
+ - database
+description: SQL view to get information about postgres sequences
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/139117
+milestone: '16.7'
+gitlab_schema: gitlab_shared
diff --git a/db/docs/work_item_dates_sources.yml b/db/docs/work_item_dates_sources.yml
new file mode 100644
index 00000000000..f26dec2874c
--- /dev/null
+++ b/db/docs/work_item_dates_sources.yml
@@ -0,0 +1,12 @@
+---
+table_name: work_item_dates_sources
+classes:
+ - WorkItems::DatesSource
+feature_categories:
+ - team_planning
+description: The rolled up Start and Due dates for Work Items.
+introduced_by_url:
+milestone: '16.7'
+gitlab_schema: gitlab_main_cell
+sharding_key:
+ namespace_id: namespaces
diff --git a/db/docs/xray_reports.yml b/db/docs/xray_reports.yml
new file mode 100644
index 00000000000..5fa36d990f2
--- /dev/null
+++ b/db/docs/xray_reports.yml
@@ -0,0 +1,12 @@
+---
+table_name: xray_reports
+classes:
+- Projects::XrayReport
+feature_categories:
+- code_suggestions
+description: The stored JSON output of repository X-Ray for a project
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/138220
+milestone: '16.7'
+gitlab_schema: gitlab_main_cell
+sharding_key:
+ project_id: projects
diff --git a/db/fixtures/development/01_admin.rb b/db/fixtures/development/01_admin.rb
index b4778a6ecbd..99989da3ac6 100644
--- a/db/fixtures/development/01_admin.rb
+++ b/db/fixtures/development/01_admin.rb
@@ -9,7 +9,9 @@ Gitlab::Seeder.quiet do
admin: true,
confirmed_at: DateTime.now,
password_expires_at: DateTime.now
- )
+ ) do |user|
+ user.assign_personal_namespace
+ end
print '.'
end
diff --git a/db/fixtures/development/02_users.rb b/db/fixtures/development/02_users.rb
index ceed0d6d12a..cdb2fa062e4 100644
--- a/db/fixtures/development/02_users.rb
+++ b/db/fixtures/development/02_users.rb
@@ -78,7 +78,9 @@ class Gitlab::Seeder::Users
email: FFaker::Internet.email,
confirmed_at: DateTime.now,
password: random_password
- )
+ ) do |user|
+ user.assign_personal_namespace
+ end
print '.'
rescue ActiveRecord::RecordInvalid
diff --git a/db/fixtures/development/18_abuse_reports.rb b/db/fixtures/development/18_abuse_reports.rb
index 7dd93069122..773b0443985 100644
--- a/db/fixtures/development/18_abuse_reports.rb
+++ b/db/fixtures/development/18_abuse_reports.rb
@@ -12,7 +12,9 @@ module Db
email: FFaker::Internet.email,
confirmed_at: DateTime.now,
password: ::User.random_password
- )
+ ) do |user|
+ user.assign_personal_namespace
+ end
::AbuseReport.create(reporter: ::User.take, user: reported_user, message: 'User sends spam')
print '.'
diff --git a/db/fixtures/development/27_product_analytics_events.rb b/db/fixtures/development/27_product_analytics_events.rb
deleted file mode 100644
index 19237afd8ea..00000000000
--- a/db/fixtures/development/27_product_analytics_events.rb
+++ /dev/null
@@ -1,56 +0,0 @@
-# frozen_string_literal: true
-
-Gitlab::Seeder.quiet do
- # The data set takes approximately 2 minutes to load,
- # so its put behind the flag. To seed this data use the flag and the filter:
- # SEED_PRODUCT_ANALYTICS_EVENTS=1 FILTER=product_analytics_events rake db:seed_fu
- flag = 'SEED_PRODUCT_ANALYTICS_EVENTS'
-
- if ENV[flag]
- Project.all.sample(2).each do |project|
- # Let's generate approx a week of events from now into the past with 1 minute step.
- # To add some differentiation we add a random offset of up to 45 seconds.
- 10000.times do |i|
- dvce_created_tstamp = DateTime.now - i.minute - rand(45).seconds
-
- # Add a random delay to collector timestamp. Up to 2 seconds.
- collector_tstamp = dvce_created_tstamp + rand(3).second
-
- ProductAnalyticsEvent.create!(
- project_id: project.id,
- platform: ["web", "mob", "mob", "app"].sample,
- collector_tstamp: collector_tstamp,
- dvce_created_tstamp: dvce_created_tstamp,
- event: nil,
- event_id: SecureRandom.uuid,
- name_tracker: "sp",
- v_tracker: "js-2.14.0",
- v_collector: Gitlab::VERSION,
- v_etl: Gitlab::VERSION,
- domain_userid: SecureRandom.uuid,
- domain_sessionidx: 4,
- page_url: "#{project.web_url}/-/product_analytics/test",
- page_title: 'Test page',
- page_referrer: "#{project.web_url}/-/product_analytics/test",
- br_lang: ["en-US", "en-US", "en-GB", "nl", "fi"].sample, # https://www.andiamo.co.uk/resources/iso-language-codes/
- br_features_pdf: true,
- br_cookies: [true, true, true, false].sample,
- br_colordepth: ["24", "24", "16", "8"].sample,
- os_timezone: ["America/Los_Angeles", "America/Los_Angeles", "America/Lima", "Asia/Dubai", "Africa/Bangui"].sample, # https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
- doc_charset: ["UTF-8", "UTF-8", "UTF-8", "DOS", "EUC"].sample,
- domain_sessionid: SecureRandom.uuid
- )
- end
-
- unless Feature.enabled?(:product_analytics, project)
- if Feature.enable(:product_analytics, project)
- puts "Product analytics feature was enabled for #{project.full_path}"
- end
- end
-
- puts "10K events added to #{project.full_path}"
- end
- else
- puts "Skipped. Use the `#{flag}` environment variable to enable."
- end
-end
diff --git a/db/fixtures/development/33_triage_ops.rb b/db/fixtures/development/33_triage_ops.rb
index 5cdb1496c3d..ecec4c9ba93 100644
--- a/db/fixtures/development/33_triage_ops.rb
+++ b/db/fixtures/development/33_triage_ops.rb
@@ -121,14 +121,7 @@ class Gitlab::Seeder::TriageOps
private
def ensure_bot_user
- bot = User.find_by_username('triagebot')
- bot ||= User.create!(
- username: 'triagebot',
- name: 'Triage Bot',
- email: 'triagebot@example.com',
- confirmed_at: DateTime.now,
- password: SecureRandom.hex.slice(0, 16)
- )
+ bot = User.find_by_username('triagebot') || build_bot_user!
ensure_group('gitlab-org').add_maintainer(bot)
ensure_group('gitlab-com').add_maintainer(bot)
@@ -148,6 +141,18 @@ class Gitlab::Seeder::TriageOps
bot
end
+ def build_bot_user!
+ User.create!(
+ username: 'triagebot',
+ name: 'Triage Bot',
+ email: 'triagebot@example.com',
+ confirmed_at: DateTime.now,
+ password: SecureRandom.hex.slice(0, 16)
+ ) do |user|
+ user.assign_personal_namespace
+ end
+ end
+
def ensure_webhook_for(group_path)
group = Group.find_by_full_path(group_path)
diff --git a/db/fixtures/development/37_timelogs.rb b/db/fixtures/development/37_timelogs.rb
index b5be9d21cb3..9c4e980e890 100644
--- a/db/fixtures/development/37_timelogs.rb
+++ b/db/fixtures/development/37_timelogs.rb
@@ -63,13 +63,15 @@ class Gitlab::Seeder::Timelogs
if user.nil?
print "\nCreating user '#{username}' with password: '#{password}'"
- user = User.create!(
+ User.create!(
username: username,
name: FFaker::Name.name,
email: FFaker::Internet.email,
confirmed_at: DateTime.now,
password: password
- )
+ ) do |user|
+ user.assign_personal_namespace
+ end
end
user
diff --git a/db/gitlab_schemas/gitlab_ci.yaml b/db/gitlab_schemas/gitlab_ci.yaml
index a756fa2fdd3..14911929d87 100644
--- a/db/gitlab_schemas/gitlab_ci.yaml
+++ b/db/gitlab_schemas/gitlab_ci.yaml
@@ -5,3 +5,4 @@ allow_cross_joins:
allow_cross_transactions:
- gitlab_internal
- gitlab_shared
+cell_local: true
diff --git a/db/gitlab_schemas/gitlab_internal.yaml b/db/gitlab_schemas/gitlab_internal.yaml
index 7093c980daa..bdeeee333c2 100644
--- a/db/gitlab_schemas/gitlab_internal.yaml
+++ b/db/gitlab_schemas/gitlab_internal.yaml
@@ -1,2 +1,3 @@
name: gitlab_internal
description: Schema for all internal tables, like `pg_*`
+cell_local: false
diff --git a/db/gitlab_schemas/gitlab_main.yaml b/db/gitlab_schemas/gitlab_main.yaml
index ed918e7c57d..878811e77c0 100644
--- a/db/gitlab_schemas/gitlab_main.yaml
+++ b/db/gitlab_schemas/gitlab_main.yaml
@@ -5,3 +5,4 @@ allow_cross_joins:
allow_cross_transactions:
- gitlab_internal
- gitlab_shared
+cell_local: false
diff --git a/db/gitlab_schemas/gitlab_main_cell.yaml b/db/gitlab_schemas/gitlab_main_cell.yaml
index 53f6f30dfbd..ac09f091d88 100644
--- a/db/gitlab_schemas/gitlab_main_cell.yaml
+++ b/db/gitlab_schemas/gitlab_main_cell.yaml
@@ -9,3 +9,4 @@ allow_cross_transactions:
- gitlab_main
allow_cross_foreign_keys:
- gitlab_main
+cell_local: true
diff --git a/db/gitlab_schemas/gitlab_main_clusterwide.yaml b/db/gitlab_schemas/gitlab_main_clusterwide.yaml
index 8f07f0caf4f..c026e4dd20a 100644
--- a/db/gitlab_schemas/gitlab_main_clusterwide.yaml
+++ b/db/gitlab_schemas/gitlab_main_clusterwide.yaml
@@ -19,3 +19,4 @@ allow_cross_foreign_keys:
# temporarily allow FKs between clusterwide till all tables
# are moved to either _clusterwide or _cell
- gitlab_main
+cell_local: false
diff --git a/db/gitlab_schemas/gitlab_pm.yaml b/db/gitlab_schemas/gitlab_pm.yaml
index 8ea8e49376b..240e9816492 100644
--- a/db/gitlab_schemas/gitlab_pm.yaml
+++ b/db/gitlab_schemas/gitlab_pm.yaml
@@ -5,3 +5,4 @@ allow_cross_joins:
allow_cross_transactions:
- gitlab_internal
- gitlab_shared
+cell_local: true
diff --git a/db/gitlab_schemas/gitlab_shared.yaml b/db/gitlab_schemas/gitlab_shared.yaml
index 549797b606b..739fe052903 100644
--- a/db/gitlab_schemas/gitlab_shared.yaml
+++ b/db/gitlab_schemas/gitlab_shared.yaml
@@ -6,3 +6,4 @@ allow_cross_joins:
- gitlab_internal
allow_cross_transactions:
- gitlab_internal
+cell_local: false
diff --git a/db/init_structure.sql b/db/init_structure.sql
index bcdaa38c32f..491ceb59332 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 $$
@@ -152,6 +225,33 @@ RETURN NULL;
END
$$;
+CREATE FUNCTION sync_namespaces_amount_used_columns() RETURNS trigger
+ LANGUAGE plpgsql
+ AS $$
+BEGIN
+ NEW."new_amount_used" := NEW."amount_used";
+ RETURN NEW;
+END;
+$$;
+
+CREATE FUNCTION sync_projects_amount_used_columns() RETURNS trigger
+ LANGUAGE plpgsql
+ AS $$
+BEGIN
+ NEW."new_amount_used" := NEW."amount_used";
+ RETURN NEW;
+END;
+$$;
+
+CREATE FUNCTION trigger_1a857e8db6cd() RETURNS trigger
+ LANGUAGE plpgsql
+ AS $$
+BEGIN
+ NEW."uuid_convert_string_to_uuid" := NEW."uuid";
+ RETURN NEW;
+END;
+$$;
+
CREATE FUNCTION unset_has_issues_on_vulnerability_reads() RETURNS trigger
LANGUAGE plpgsql
AS $$
@@ -190,6 +290,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 +299,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 +391,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 +417,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 +427,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 +437,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,27 +450,22 @@ 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 security_findings (
+ id bigint NOT NULL,
+ scan_id bigint NOT NULL,
+ scanner_id bigint NOT NULL,
+ severity smallint NOT NULL,
+ confidence smallint,
+ project_fingerprint text,
+ deduplicated boolean DEFAULT false NOT NULL,
+ uuid uuid,
+ overridden_uuid uuid,
+ partition_number integer DEFAULT 1 NOT NULL,
+ finding_data jsonb DEFAULT '{}'::jsonb NOT NULL,
+ CONSTRAINT check_6c2851a8c9 CHECK ((uuid IS NOT NULL)),
+ CONSTRAINT check_b9508c6df8 CHECK ((char_length(project_fingerprint) <= 40))
+)
+PARTITION BY LIST (partition_number);
CREATE TABLE verification_codes (
created_at timestamp with time zone DEFAULT now() NOT NULL,
@@ -767,105 +480,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 +497,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 +10606,6 @@ CREATE TABLE abuse_reports (
);
CREATE SEQUENCE abuse_reports_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -11344,18 +10811,12 @@ CREATE TABLE analytics_cycle_analytics_aggregations (
group_id bigint NOT NULL,
incremental_runtimes_in_seconds integer[] DEFAULT '{}'::integer[] NOT NULL,
incremental_processed_records integer[] DEFAULT '{}'::integer[] NOT NULL,
- last_full_run_runtimes_in_seconds integer[] DEFAULT '{}'::integer[] NOT NULL,
- last_full_run_processed_records integer[] DEFAULT '{}'::integer[] NOT NULL,
last_incremental_issues_id integer,
last_incremental_merge_requests_id integer,
- last_full_run_issues_id integer,
- last_full_run_merge_requests_id integer,
last_incremental_run_at timestamp with time zone,
last_incremental_issues_updated_at timestamp with time zone,
last_incremental_merge_requests_updated_at timestamp with time zone,
last_full_run_at timestamp with time zone,
- last_full_run_issues_updated_at timestamp with time zone,
- last_full_run_mrs_updated_at timestamp with time zone,
last_consistency_check_updated_at timestamp with time zone,
enabled boolean DEFAULT true NOT NULL,
full_runtimes_in_seconds integer[] DEFAULT '{}'::integer[] NOT NULL,
@@ -11364,9 +10825,15 @@ 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)),
CONSTRAINT chk_rails_e16bf3913a CHECK ((cardinality(incremental_processed_records) <= 10)),
CONSTRAINT full_processed_records_size CHECK ((cardinality(full_processed_records) <= 10)),
CONSTRAINT full_runtimes_in_seconds_size CHECK ((cardinality(full_runtimes_in_seconds) <= 10))
@@ -11503,7 +10970,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 +11021,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 +11036,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 +11060,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 +11078,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 +11115,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 +11136,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 +11178,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 +11193,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 +11224,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 +11279,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 +11303,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 +11341,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 +11388,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 +11448,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,39 +11461,122 @@ 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,
+ maven_package_requests_forwarding boolean DEFAULT true NOT NULL,
+ arkose_labs_namespace text DEFAULT 'client'::text NOT NULL,
+ max_export_size integer DEFAULT 0,
+ encrypted_slack_app_signing_secret bytea,
+ 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,
+ invitation_flow_enforcement boolean DEFAULT false NOT NULL,
+ package_registry_cleanup_policies_worker_capacity integer DEFAULT 2 NOT NULL,
+ deactivate_dormant_users_period integer DEFAULT 90 NOT NULL,
+ auto_ban_user_on_excessive_projects_download boolean DEFAULT false NOT NULL,
+ max_pages_custom_domains_per_project integer DEFAULT 0 NOT NULL,
+ cube_api_base_url text,
+ encrypted_cube_api_key bytea,
+ encrypted_cube_api_key_iv bytea,
+ jitsu_host text,
+ jitsu_project_xid text,
+ clickhouse_connection_string text,
+ jitsu_administrator_email text,
+ encrypted_jitsu_administrator_password bytea,
+ encrypted_jitsu_administrator_password_iv bytea,
+ dashboard_limit_enabled boolean DEFAULT false NOT NULL,
+ dashboard_limit integer DEFAULT 0 NOT NULL,
+ dashboard_notification_limit integer DEFAULT 0 NOT NULL,
+ dashboard_enforcement_limit integer DEFAULT 0 NOT NULL,
+ dashboard_limit_new_namespace_creation_enforcement_date date,
+ can_create_group boolean DEFAULT true NOT NULL,
+ lock_maven_package_requests_forwarding boolean DEFAULT false NOT NULL,
+ lock_pypi_package_requests_forwarding boolean DEFAULT false NOT NULL,
+ lock_npm_package_requests_forwarding boolean DEFAULT false NOT NULL,
+ jira_connect_proxy_url text,
+ password_expiration_enabled boolean DEFAULT false NOT NULL,
+ password_expires_in_days integer DEFAULT 90 NOT NULL,
+ password_expires_notice_before_days integer DEFAULT 7 NOT NULL,
+ product_analytics_enabled boolean DEFAULT false NOT NULL,
+ email_confirmation_setting smallint DEFAULT 0,
+ disable_admin_oauth_scopes boolean DEFAULT false NOT NULL,
+ default_preferred_language text DEFAULT 'en'::text NOT NULL,
+ disable_download_button boolean DEFAULT false NOT NULL,
+ encrypted_telesign_customer_xid bytea,
+ encrypted_telesign_customer_xid_iv bytea,
+ encrypted_telesign_api_key bytea,
+ encrypted_telesign_api_key_iv bytea,
CONSTRAINT app_settings_container_reg_cleanup_tags_max_list_size_positive CHECK ((container_registry_cleanup_tags_service_max_list_size >= 0)),
+ CONSTRAINT app_settings_container_registry_pre_import_tags_rate_positive CHECK ((container_registry_pre_import_tags_rate >= (0)::numeric)),
CONSTRAINT app_settings_dep_proxy_ttl_policies_worker_capacity_positive CHECK ((dependency_proxy_ttl_group_policy_worker_capacity >= 0)),
CONSTRAINT app_settings_ext_pipeline_validation_service_url_text_limit CHECK ((char_length(external_pipeline_validation_service_url) <= 255)),
+ CONSTRAINT app_settings_git_rate_limit_users_allowlist_max_usernames CHECK ((cardinality(git_rate_limit_users_allowlist) <= 100)),
+ CONSTRAINT app_settings_max_pages_custom_domains_per_project_check CHECK ((max_pages_custom_domains_per_project >= 0)),
CONSTRAINT app_settings_p_cleanup_package_file_worker_capacity_positive CHECK ((packages_cleanup_package_file_worker_capacity >= 0)),
+ CONSTRAINT app_settings_pkg_registry_cleanup_pol_worker_capacity_gte_zero CHECK ((package_registry_cleanup_policies_worker_capacity >= 0)),
CONSTRAINT app_settings_registry_exp_policies_worker_capacity_positive CHECK ((container_registry_expiration_policies_worker_capacity >= 0)),
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_4847426287 CHECK ((char_length(jira_connect_proxy_url) <= 255)),
+ CONSTRAINT check_492cc1354d CHECK ((char_length(error_tracking_api_url) <= 255)),
CONSTRAINT check_4f8b811780 CHECK ((char_length(sentry_dsn) <= 255)),
CONSTRAINT check_51700b31b5 CHECK ((char_length(default_branch_name) <= 255)),
+ 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_8e7df605a1 CHECK ((char_length(cube_api_base_url) <= 512)),
CONSTRAINT check_9a719834eb CHECK ((char_length(secret_detection_token_revocation_url) <= 255)),
CONSTRAINT check_9c6c447a13 CHECK ((char_length(maintenance_mode_message) <= 255)),
CONSTRAINT check_a5704163cc CHECK ((char_length(secret_detection_revocation_token_types_url) <= 255)),
- CONSTRAINT check_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_d4865d70f3 CHECK ((char_length(clickhouse_connection_string) <= 1024)),
CONSTRAINT check_d820146492 CHECK ((char_length(spam_check_endpoint_url) <= 255)),
+ CONSTRAINT check_dea8792229 CHECK ((char_length(jitsu_host) <= 255)),
+ CONSTRAINT check_e2692d7523 CHECK ((char_length(default_preferred_language) <= 32)),
+ CONSTRAINT check_e2dd6e290a CHECK ((char_length(jira_connect_application_key) <= 255)),
CONSTRAINT check_e5024c8801 CHECK ((char_length(elasticsearch_username) <= 255)),
CONSTRAINT check_e5aba18f02 CHECK ((char_length(container_registry_version) <= 255)),
+ CONSTRAINT check_ec3ca9aa8d CHECK ((char_length(jitsu_administrator_email) <= 255)),
CONSTRAINT check_ef6176834f CHECK ((char_length(encrypted_cloud_license_auth_token_iv) <= 255)),
- CONSTRAINT check_f6563bc000 CHECK ((char_length(arkose_labs_verify_api_url) <= 255))
+ CONSTRAINT check_f6563bc000 CHECK ((char_length(arkose_labs_verify_api_url) <= 255)),
+ CONSTRAINT check_fc732c181e CHECK ((char_length(jitsu_project_xid) <= 255))
);
COMMENT ON COLUMN application_settings.content_validation_endpoint_url IS 'JiHu-specific column';
@@ -12038,8 +11587,41 @@ 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';
+
+COMMENT ON COLUMN application_settings.password_expiration_enabled IS 'JiHu-specific column';
+
+COMMENT ON COLUMN application_settings.password_expires_in_days IS 'JiHu-specific column';
+
+COMMENT ON COLUMN application_settings.password_expires_notice_before_days IS 'JiHu-specific column';
+
+COMMENT ON COLUMN application_settings.disable_download_button IS 'JiHu-specific column';
+
CREATE SEQUENCE application_settings_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -12075,6 +11657,11 @@ 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,
+ security_orchestration_policy_configuration_id bigint,
CONSTRAINT check_6fca5928b2 CHECK ((char_length(section) <= 255))
);
@@ -12145,7 +11732,9 @@ 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,
+ security_orchestration_policy_configuration_id bigint
);
CREATE TABLE approval_project_rules_groups (
@@ -12201,7 +11790,6 @@ CREATE TABLE approvals (
);
CREATE SEQUENCE approvals_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -12220,7 +11808,6 @@ CREATE TABLE approver_groups (
);
CREATE SEQUENCE approver_groups_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -12239,7 +11826,6 @@ CREATE TABLE approvers (
);
CREATE SEQUENCE approvers_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -12294,6 +11880,53 @@ 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_event_type_filters (
+ id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ external_audit_event_destination_id bigint NOT NULL,
+ audit_event_type text NOT NULL,
+ CONSTRAINT check_d20c8e5a51 CHECK ((char_length(audit_event_type) <= 255))
+);
+
+CREATE SEQUENCE audit_events_streaming_event_type_filters_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE audit_events_streaming_event_type_filters_id_seq OWNED BY audit_events_streaming_event_type_filters.id;
+
+CREATE TABLE audit_events_streaming_headers (
+ id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ 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 +11952,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 +12003,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 +12023,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 +12072,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 +12108,6 @@ CREATE TABLE board_assignees (
);
CREATE SEQUENCE board_assignees_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -12481,7 +12122,10 @@ CREATE TABLE board_group_recent_visits (
updated_at timestamp with time zone NOT NULL,
user_id integer,
board_id integer,
- group_id integer
+ group_id integer,
+ CONSTRAINT check_409f6caea4 CHECK ((user_id IS NOT NULL)),
+ CONSTRAINT check_ddc74243ef CHECK ((group_id IS NOT NULL)),
+ CONSTRAINT check_fa7711a898 CHECK ((board_id IS NOT NULL))
);
CREATE SEQUENCE board_group_recent_visits_id_seq
@@ -12500,7 +12144,6 @@ CREATE TABLE board_labels (
);
CREATE SEQUENCE board_labels_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -12515,7 +12158,10 @@ CREATE TABLE board_project_recent_visits (
updated_at timestamp with time zone NOT NULL,
user_id integer,
project_id integer,
- board_id integer
+ board_id integer,
+ CONSTRAINT check_0386e26981 CHECK ((board_id IS NOT NULL)),
+ CONSTRAINT check_d9cc9b79da CHECK ((project_id IS NOT NULL)),
+ CONSTRAINT check_df7762a99a CHECK ((user_id IS NOT NULL))
);
CREATE SEQUENCE board_project_recent_visits_id_seq
@@ -12550,10 +12196,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 +12333,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 +12352,15 @@ 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
+ theme smallint DEFAULT 0 NOT NULL,
+ namespace_id bigint
);
CREATE SEQUENCE broadcast_messages_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -12758,6 +12403,7 @@ CREATE TABLE bulk_import_entities (
jid text,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
+ source_xid integer,
CONSTRAINT check_13f279f7da CHECK ((char_length(source_full_path) <= 255)),
CONSTRAINT check_715d725ea2 CHECK ((char_length(destination_name) <= 255)),
CONSTRAINT check_796a4d9cc6 CHECK ((char_length(jid) <= 255)),
@@ -12886,18 +12532,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 +12562,6 @@ CREATE TABLE chat_teams (
);
CREATE SEQUENCE chat_teams_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -12934,7 +12579,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 +12613,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,
@@ -13010,7 +12645,6 @@ CREATE TABLE ci_build_trace_metadata (
CREATE TABLE ci_builds (
status character varying,
finished_at timestamp without time zone,
- trace text,
created_at timestamp without time zone,
updated_at timestamp without time zone,
started_at timestamp without time zone,
@@ -13037,7 +12671,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 +12680,17 @@ 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,
+ partition_id bigint DEFAULT 100 NOT NULL,
+ 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
@@ -13065,32 +12699,52 @@ CREATE SEQUENCE ci_builds_id_seq
ALTER SEQUENCE ci_builds_id_seq OWNED BY ci_builds.id;
-CREATE TABLE ci_builds_metadata (
+CREATE TABLE p_ci_builds_metadata (
project_id integer NOT NULL,
timeout integer,
timeout_source integer DEFAULT 1 NOT NULL,
+ 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,
+ partition_id bigint DEFAULT 100 NOT NULL
+)
+PARTITION BY LIST (partition_id);
CREATE SEQUENCE ci_builds_metadata_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE ci_builds_metadata_id_seq OWNED BY ci_builds_metadata.id;
+ALTER SEQUENCE ci_builds_metadata_id_seq OWNED BY p_ci_builds_metadata.id;
+
+CREATE TABLE ci_builds_metadata (
+ project_id integer NOT NULL,
+ timeout integer,
+ timeout_source integer DEFAULT 1 NOT NULL,
+ interruptible boolean,
+ config_options jsonb,
+ config_variables jsonb,
+ has_exposed_artifacts boolean,
+ environment_auto_stop_in character varying(255),
+ expanded_environment_name character varying(255),
+ secrets jsonb DEFAULT '{}'::jsonb NOT NULL,
+ build_id bigint NOT NULL,
+ id bigint DEFAULT nextval('ci_builds_metadata_id_seq'::regclass) NOT NULL,
+ runtime_runner_features jsonb DEFAULT '{}'::jsonb NOT NULL,
+ id_tokens jsonb DEFAULT '{}'::jsonb NOT NULL,
+ partition_id bigint DEFAULT 100 NOT NULL
+);
+ALTER TABLE ONLY p_ci_builds_metadata ATTACH PARTITION ci_builds_metadata FOR VALUES IN ('100');
CREATE TABLE ci_builds_runner_session (
id bigint NOT NULL,
@@ -13151,14 +12805,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 +12835,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 false 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 +12856,7 @@ CREATE TABLE ci_instance_variables (
key text NOT NULL,
encrypted_value text,
encrypted_value_iv text,
+ raw boolean DEFAULT false NOT NULL,
CONSTRAINT check_07a45a5bcb CHECK ((char_length(encrypted_value_iv) <= 255)),
CONSTRAINT check_5aede12208 CHECK ((char_length(key) <= 255)),
CONSTRAINT check_956afd70f1 CHECK ((char_length(encrypted_value) <= 13579))
@@ -13231,15 +12883,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,
@@ -13256,12 +12899,12 @@ CREATE TABLE ci_job_artifacts (
job_id bigint NOT NULL,
locked smallint DEFAULT 2,
original_filename text,
+ partition_id bigint DEFAULT 100 NOT NULL,
CONSTRAINT check_27f0f6dbab CHECK ((file_store IS NOT NULL)),
CONSTRAINT check_85573000db CHECK ((char_length(original_filename) <= 512))
);
CREATE SEQUENCE ci_job_artifacts_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -13275,7 +12918,8 @@ CREATE TABLE ci_job_token_project_scope_links (
source_project_id bigint NOT NULL,
target_project_id bigint NOT NULL,
added_by_id bigint,
- created_at timestamp with time zone NOT NULL
+ created_at timestamp with time zone NOT NULL,
+ direction smallint DEFAULT 0 NOT NULL
);
CREATE SEQUENCE ci_job_token_project_scope_links_id_seq
@@ -13294,7 +12938,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 false NOT NULL
);
CREATE SEQUENCE ci_job_variables_id_seq
@@ -13345,11 +12990,11 @@ 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,
created_at timestamp with time zone,
+ new_amount_used numeric(18,4) DEFAULT 0.0 NOT NULL,
CONSTRAINT ci_namespace_monthly_usages_year_month_constraint CHECK ((date = date_trunc('month'::text, (date)::timestamp with time zone)))
);
@@ -13362,6 +13007,21 @@ CREATE SEQUENCE ci_namespace_monthly_usages_id_seq
ALTER SEQUENCE ci_namespace_monthly_usages_id_seq OWNED BY ci_namespace_monthly_usages.id;
+CREATE TABLE ci_partitions (
+ id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL
+);
+
+CREATE SEQUENCE ci_partitions_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE ci_partitions_id_seq OWNED BY ci_partitions.id;
+
CREATE TABLE ci_pending_builds (
id bigint NOT NULL,
build_id bigint NOT NULL,
@@ -13403,6 +13063,7 @@ CREATE TABLE ci_pipeline_artifacts (
verification_retry_count smallint,
verification_checksum bytea,
verification_failure text,
+ locked smallint DEFAULT 2,
CONSTRAINT check_191b5850ec CHECK ((char_length(file) <= 255)),
CONSTRAINT check_abeeb71caf CHECK ((file IS NOT NULL)),
CONSTRAINT ci_pipeline_artifacts_verification_failure_text_limit CHECK ((char_length(verification_failure) <= 255))
@@ -13450,6 +13111,14 @@ CREATE SEQUENCE ci_pipeline_messages_id_seq
ALTER SEQUENCE ci_pipeline_messages_id_seq OWNED BY ci_pipeline_messages.id;
+CREATE TABLE ci_pipeline_metadata (
+ project_id bigint NOT NULL,
+ pipeline_id bigint NOT NULL,
+ name text,
+ CONSTRAINT check_25d23931f1 CHECK ((name IS NOT NULL)),
+ CONSTRAINT check_9d3665463c CHECK ((char_length(name) <= 255))
+);
+
CREATE TABLE ci_pipeline_schedule_variables (
id integer NOT NULL,
key character varying NOT NULL,
@@ -13460,11 +13129,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 false NOT NULL
);
CREATE SEQUENCE ci_pipeline_schedule_variables_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -13488,7 +13157,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 +13173,12 @@ 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,
+ partition_id bigint DEFAULT 100 NOT NULL,
+ raw boolean DEFAULT false NOT NULL
);
CREATE SEQUENCE ci_pipeline_variables_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -13538,8 +13207,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 +13216,9 @@ 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,
+ partition_id bigint DEFAULT 100 NOT NULL,
+ CONSTRAINT check_d7e99a025e CHECK ((lock_version IS NOT NULL))
);
CREATE TABLE ci_pipelines_config (
@@ -13555,17 +13226,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
@@ -13614,6 +13275,7 @@ CREATE TABLE ci_project_monthly_usages (
amount_used numeric(18,2) DEFAULT 0.0 NOT NULL,
shared_runners_duration integer DEFAULT 0 NOT NULL,
created_at timestamp with time zone,
+ new_amount_used numeric(18,4) DEFAULT 0.0 NOT NULL,
CONSTRAINT ci_project_monthly_usages_year_month_constraint CHECK ((date = date_trunc('month'::text, (date)::timestamp with time zone)))
);
@@ -13685,7 +13347,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 +13364,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 +13372,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 +13394,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 +13404,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,17 +13435,39 @@ 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,
key_data text,
+ metadata jsonb,
+ expires_at timestamp with time zone,
CONSTRAINT check_320790634d CHECK ((char_length(file) <= 255)),
CONSTRAINT check_402c7b4a56 CHECK ((char_length(name) <= 255)),
CONSTRAINT check_7279b4e293 CHECK ((char_length(key_data) <= 128))
@@ -13804,7 +13492,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 +13524,12 @@ CREATE TABLE ci_stages (
status integer,
lock_version integer DEFAULT 0,
"position" integer,
- id bigint NOT NULL
+ id bigint NOT NULL,
+ partition_id bigint DEFAULT 100 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 +13541,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 +13564,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 +13584,6 @@ CREATE TABLE ci_triggers (
);
CREATE SEQUENCE ci_triggers_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -13952,11 +13639,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 false NOT NULL
);
CREATE SEQUENCE ci_variables_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -13998,6 +13685,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 +13698,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 +13720,6 @@ CREATE TABLE cluster_groups (
);
CREATE SEQUENCE cluster_groups_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -14029,8 +13731,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 +13745,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 +13757,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 +13807,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 +13822,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 +13835,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 +13844,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 +13862,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 +13889,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 +13908,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 +13922,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 +13933,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 +13945,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 +13966,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 +13988,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 +14004,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 +14032,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 +14041,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 +14049,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 +14066,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 +14088,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 +14106,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 +14125,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 +14159,14 @@ 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,
+ delete_started_at timestamp with time zone,
CONSTRAINT check_05e9012f36 CHECK ((char_length(migration_plan) <= 255)),
CONSTRAINT check_13c58fe73a CHECK ((char_length(migration_state) <= 255)),
CONSTRAINT check_97f0249439 CHECK ((char_length(migration_aborted_in_state) <= 255))
);
CREATE SEQUENCE container_repositories_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -14571,7 +14235,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
@@ -14820,8 +14483,10 @@ CREATE TABLE dast_site_profiles (
target_type smallint DEFAULT 0 NOT NULL,
scan_method smallint DEFAULT 0 NOT NULL,
auth_submit_field text,
+ scan_file_path text,
CONSTRAINT check_5203110fee CHECK ((char_length(auth_username_field) <= 255)),
CONSTRAINT check_6cfab17b48 CHECK ((char_length(name) <= 255)),
+ CONSTRAINT check_8d2aa0f66d CHECK ((char_length(scan_file_path) <= 1024)),
CONSTRAINT check_af44f54c96 CHECK ((char_length(auth_submit_field) <= 255)),
CONSTRAINT check_c329dffdba CHECK ((char_length(auth_password_field) <= 255)),
CONSTRAINT check_d446f7047b CHECK ((char_length(auth_url) <= 1024)),
@@ -14918,21 +14583,34 @@ CREATE SEQUENCE dast_sites_id_seq
ALTER SEQUENCE dast_sites_id_seq OWNED BY dast_sites.id;
+CREATE TABLE dependency_proxy_blob_states (
+ verification_started_at timestamp with time zone,
+ verification_retry_at timestamp with time zone,
+ verified_at timestamp with time zone,
+ dependency_proxy_blob_id bigint NOT NULL,
+ verification_state smallint DEFAULT 0 NOT NULL,
+ verification_retry_count smallint DEFAULT 0 NOT NULL,
+ verification_checksum bytea,
+ verification_failure text,
+ CONSTRAINT check_8e4f76fffe CHECK ((char_length(verification_failure) <= 255))
+);
+
+COMMENT ON TABLE dependency_proxy_blob_states IS '{"owner":"group::geo","description":"Geo-specific table to store the verification state of DependencyProxy::Blob objects"}';
+
CREATE TABLE dependency_proxy_blobs (
id integer NOT NULL,
- 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 +14621,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 +14682,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 +14698,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 +14708,6 @@ CREATE TABLE deploy_tokens (
);
CREATE SEQUENCE deploy_tokens_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -15088,15 +14762,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 +14819,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 +14912,45 @@ 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_configurations (
+ id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ branches_for_lead_time_for_changes text[] DEFAULT '{}'::text[] NOT NULL
+);
+
+CREATE SEQUENCE dora_configurations_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE dora_configurations_id_seq OWNED BY dora_configurations.id;
+
CREATE TABLE dora_daily_metrics (
id bigint NOT NULL,
environment_id bigint NOT NULL,
@@ -15360,6 +15072,7 @@ CREATE TABLE elastic_reindexing_tasks (
delete_original_index_at timestamp with time zone,
max_slices_running smallint DEFAULT 60 NOT NULL,
slice_multiplier smallint DEFAULT 2 NOT NULL,
+ targets text[],
CONSTRAINT check_7f64acda8e CHECK ((char_length(error_message) <= 255))
);
@@ -15391,12 +15104,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
@@ -15417,11 +15129,11 @@ CREATE TABLE environments (
slug character varying NOT NULL,
auto_stop_at timestamp with time zone,
auto_delete_at timestamp with time zone,
- tier smallint
+ tier smallint,
+ merge_request_id bigint
);
CREATE SEQUENCE environments_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -15438,7 +15150,6 @@ CREATE TABLE epic_issues (
);
CREATE SEQUENCE epic_issues_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -15455,7 +15166,6 @@ CREATE TABLE epic_metrics (
);
CREATE SEQUENCE epic_metrics_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -15511,18 +15221,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 +15330,6 @@ CREATE TABLE events (
);
CREATE SEQUENCE events_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -15667,26 +15379,6 @@ CREATE SEQUENCE experiment_subjects_id_seq
ALTER SEQUENCE experiment_subjects_id_seq OWNED BY experiment_subjects.id;
-CREATE TABLE experiment_users (
- id bigint NOT NULL,
- experiment_id bigint NOT NULL,
- user_id bigint NOT NULL,
- group_type smallint DEFAULT 0 NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- converted_at timestamp with time zone,
- context jsonb DEFAULT '{}'::jsonb NOT NULL
-);
-
-CREATE SEQUENCE experiment_users_id_seq
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
-
-ALTER SEQUENCE experiment_users_id_seq OWNED BY experiment_users.id;
-
CREATE TABLE experiments (
id bigint NOT NULL,
name text NOT NULL,
@@ -15806,7 +15498,6 @@ CREATE TABLE feature_gates (
);
CREATE SEQUENCE feature_gates_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -15823,7 +15514,6 @@ CREATE TABLE features (
);
CREATE SEQUENCE features_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -15840,7 +15530,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 +15545,6 @@ CREATE TABLE fork_networks (
);
CREATE SEQUENCE fork_networks_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -15902,9 +15590,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 +15662,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 +15671,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 +15734,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 +15761,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
@@ -16228,6 +15880,25 @@ CREATE SEQUENCE geo_reset_checksum_events_id_seq
ALTER SEQUENCE geo_reset_checksum_events_id_seq OWNED BY geo_reset_checksum_events.id;
+CREATE TABLE ghost_user_migrations (
+ id bigint NOT NULL,
+ user_id bigint NOT NULL,
+ initiator_user_id bigint,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ hard_delete boolean DEFAULT false NOT NULL,
+ consume_after timestamp with time zone DEFAULT now() NOT NULL
+);
+
+CREATE SEQUENCE ghost_user_migrations_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE ghost_user_migrations_id_seq OWNED BY ghost_user_migrations.id;
+
CREATE TABLE gitlab_subscription_histories (
id bigint NOT NULL,
gitlab_subscription_created_at timestamp with time zone,
@@ -16274,6 +15945,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 +15966,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 +15985,6 @@ CREATE TABLE gpg_keys (
);
CREATE SEQUENCE gpg_keys_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -16338,7 +16008,6 @@ CREATE TABLE gpg_signatures (
);
CREATE SEQUENCE gpg_signatures_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -16393,7 +16062,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 +16085,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 +16233,6 @@ CREATE TABLE historical_data (
);
CREATE SEQUENCE historical_data_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -16581,12 +16248,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 +16273,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 +16308,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 +16411,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 +16466,58 @@ 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_event_tag_links (
+ id bigint NOT NULL,
+ timeline_event_id bigint NOT NULL,
+ timeline_event_tag_id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL
+);
+
+CREATE SEQUENCE incident_management_timeline_event_tag_links_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE incident_management_timeline_event_tag_links_id_seq OWNED BY incident_management_timeline_event_tag_links.id;
+
+CREATE TABLE incident_management_timeline_event_tags (
+ id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ project_id bigint NOT NULL,
+ name text NOT NULL,
+ CONSTRAINT check_8717184e2c CHECK ((char_length(name) <= 255))
+);
+
+CREATE SEQUENCE incident_management_timeline_event_tags_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE incident_management_timeline_event_tags_id_seq OWNED BY incident_management_timeline_event_tags.id;
+
CREATE TABLE incident_management_timeline_events (
id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
@@ -16840,7 +16560,6 @@ CREATE TABLE index_statuses (
);
CREATE SEQUENCE index_statuses_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -16856,7 +16575,6 @@ CREATE TABLE insights (
);
CREATE SEQUENCE insights_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -16867,12 +16585,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 +16608,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 +16617,6 @@ CREATE TABLE integrations (
);
CREATE SEQUENCE integrations_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -16965,6 +16680,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 +16799,6 @@ CREATE TABLE issue_links (
);
CREATE SEQUENCE issue_links_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -17083,7 +16818,6 @@ CREATE TABLE issue_metrics (
);
CREATE SEQUENCE issue_metrics_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -17094,7 +16828,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 +16835,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 +16878,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 +16887,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 +16895,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
@@ -17201,7 +16938,6 @@ CREATE TABLE iterations_cadences (
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
start_date date,
- last_run_date date,
duration_in_weeks integer,
iterations_in_advance integer,
active boolean DEFAULT true NOT NULL,
@@ -17209,6 +16945,7 @@ CREATE TABLE iterations_cadences (
title text NOT NULL,
roll_over boolean DEFAULT false NOT NULL,
description text,
+ next_run_date date,
CONSTRAINT check_5c5d2b44bd CHECK ((char_length(description) <= 5000)),
CONSTRAINT check_fedff82d3b CHECK ((char_length(title) <= 255))
);
@@ -17243,9 +16980,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 +17027,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 +17044,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 +17077,6 @@ CREATE TABLE keys (
);
CREATE SEQUENCE keys_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -17358,7 +17095,6 @@ CREATE TABLE label_links (
);
CREATE SEQUENCE label_links_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -17377,7 +17113,6 @@ CREATE TABLE label_priorities (
);
CREATE SEQUENCE label_priorities_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -17402,7 +17137,6 @@ CREATE TABLE labels (
);
CREATE SEQUENCE labels_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -17423,7 +17157,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 +17174,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 +17215,6 @@ CREATE TABLE lfs_objects (
);
CREATE SEQUENCE lfs_objects_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -17502,7 +17233,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 +17251,6 @@ CREATE TABLE licenses (
);
CREATE SEQUENCE licenses_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -17556,8 +17285,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 +17294,6 @@ CREATE TABLE lists (
);
CREATE SEQUENCE lists_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -17574,6 +17302,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 +17365,14 @@ 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,
+ CONSTRAINT check_508774aac0 CHECK ((member_namespace_id IS NOT NULL))
);
CREATE SEQUENCE members_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -17626,16 +17382,13 @@ 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,
- state smallint DEFAULT 0 NOT NULL,
- updated_state_by_user_id bigint
+ created_at timestamp with time zone
);
CREATE SEQUENCE merge_request_assignees_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -17681,33 +17434,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 +17492,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 +17562,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 +17598,6 @@ CREATE TABLE merge_request_metrics (
);
CREATE SEQUENCE merge_request_metrics_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -17855,13 +17606,28 @@ CREATE SEQUENCE merge_request_metrics_id_seq
ALTER SEQUENCE merge_request_metrics_id_seq OWNED BY merge_request_metrics.id;
+CREATE TABLE merge_request_predictions (
+ merge_request_id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ suggested_reviewers jsonb DEFAULT '{}'::jsonb NOT NULL
+);
+
+CREATE SEQUENCE merge_request_predictions_merge_request_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE merge_request_predictions_merge_request_id_seq OWNED BY merge_request_predictions.merge_request_id;
+
CREATE TABLE merge_request_reviewers (
id bigint NOT NULL,
user_id bigint NOT NULL,
merge_request_id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
- state smallint DEFAULT 0 NOT NULL,
- updated_state_by_user_id bigint
+ state smallint DEFAULT 0 NOT NULL
);
CREATE SEQUENCE merge_request_reviewers_id_seq
@@ -17912,12 +17678,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 +17694,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 +17712,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 +17738,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 +17831,6 @@ CREATE TABLE milestones (
);
CREATE SEQUENCE milestones_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -18075,6 +17839,90 @@ 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,
+ tracked_at bigint,
+ 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,
+ start_time bigint,
+ end_time bigint,
+ status smallint DEFAULT 0 NOT NULL
+);
+
+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,
+ deleted_on timestamp with time zone,
+ 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 +17945,56 @@ 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_commit_emails (
+ id bigint NOT NULL,
+ user_id bigint NOT NULL,
+ namespace_id bigint NOT NULL,
+ email_id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL
+);
+
+CREATE SEQUENCE namespace_commit_emails_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE namespace_commit_emails_id_seq OWNED BY namespace_commit_emails.id;
+
+CREATE TABLE namespace_details (
+ namespace_id bigint NOT NULL,
+ created_at timestamp with time zone,
+ updated_at timestamp with time zone,
+ cached_markdown_version integer,
+ description text,
+ description_html text,
+ free_user_cap_over_limt_notified_at timestamp with time zone,
+ free_user_cap_over_limit_notified_at timestamp with time zone
+);
CREATE TABLE namespace_limits (
additional_purchased_storage_size bigint DEFAULT 0 NOT NULL,
@@ -18120,6 +18009,12 @@ CREATE TABLE namespace_package_settings (
maven_duplicate_exception_regex text DEFAULT ''::text NOT NULL,
generic_duplicates_allowed boolean DEFAULT true NOT NULL,
generic_duplicate_exception_regex text DEFAULT ''::text NOT NULL,
+ maven_package_requests_forwarding boolean,
+ lock_maven_package_requests_forwarding boolean DEFAULT false NOT NULL,
+ pypi_package_requests_forwarding boolean,
+ lock_pypi_package_requests_forwarding boolean DEFAULT false NOT NULL,
+ npm_package_requests_forwarding boolean,
+ lock_npm_package_requests_forwarding boolean DEFAULT false NOT NULL,
CONSTRAINT check_31340211b1 CHECK ((char_length(generic_duplicate_exception_regex) <= 255)),
CONSTRAINT check_d63274b2b6 CHECK ((char_length(maven_duplicate_exception_regex) <= 255))
);
@@ -18137,19 +18032,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 +18045,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 +18054,19 @@ 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))
+ show_diff_preview_in_email boolean DEFAULT true NOT NULL,
+ enabled_git_access_protocol smallint DEFAULT 0 NOT NULL,
+ unique_project_download_limit smallint DEFAULT 0 NOT NULL,
+ unique_project_download_limit_interval_in_seconds integer DEFAULT 0 NOT NULL,
+ project_import_level smallint DEFAULT 50 NOT NULL,
+ unique_project_download_limit_allowlist text[] DEFAULT '{}'::text[] NOT NULL,
+ auto_ban_user_on_excessive_projects_download boolean DEFAULT false NOT NULL,
+ only_allow_merge_if_pipeline_succeeds boolean DEFAULT false NOT NULL,
+ allow_merge_on_skipped_pipeline boolean DEFAULT false NOT NULL,
+ only_allow_merge_if_all_discussions_are_resolved boolean DEFAULT false NOT NULL,
+ default_compliance_framework_id bigint,
+ CONSTRAINT check_0ba93c78c7 CHECK ((char_length(default_branch_name) <= 255)),
+ CONSTRAINT namespace_settings_unique_project_download_limit_allowlist_size CHECK ((cardinality(unique_project_download_limit_allowlist) <= 100))
);
CREATE TABLE namespace_statistics (
@@ -18182,7 +18080,6 @@ CREATE TABLE namespace_statistics (
);
CREATE SEQUENCE namespace_statistics_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -18201,31 +18098,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 +18141,6 @@ CREATE TABLE namespaces (
);
CREATE SEQUENCE namespaces_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -18281,7 +18177,6 @@ CREATE TABLE note_diff_files (
);
CREATE SEQUENCE note_diff_files_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -18317,11 +18212,11 @@ CREATE TABLE notes (
resolved_by_push boolean,
review_id bigint,
confidential boolean,
- last_edited_at timestamp with time zone
+ last_edited_at timestamp with time zone,
+ internal boolean DEFAULT false NOT NULL
);
CREATE SEQUENCE notes_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -18333,8 +18228,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 +18247,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 +18282,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 +18303,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 +18328,6 @@ CREATE TABLE oauth_applications (
);
CREATE SEQUENCE oauth_applications_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -18452,7 +18343,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 +18424,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 +18541,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 +19020,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,
@@ -19150,7 +19050,8 @@ CREATE TABLE packages_packages (
version character varying,
package_type smallint NOT NULL,
creator_id integer,
- status smallint DEFAULT 0 NOT NULL
+ status smallint DEFAULT 0 NOT NULL,
+ last_downloaded_at timestamp with time zone
);
CREATE SEQUENCE packages_packages_id_seq
@@ -19169,6 +19070,49 @@ CREATE TABLE packages_pypi_metadata (
CONSTRAINT check_379019d5da CHECK ((char_length(required_python) <= 255))
);
+CREATE TABLE packages_rpm_metadata (
+ package_id bigint NOT NULL,
+ release text DEFAULT '1'::text NOT NULL,
+ summary text DEFAULT ''::text NOT NULL,
+ description text DEFAULT ''::text NOT NULL,
+ arch text DEFAULT ''::text NOT NULL,
+ license text,
+ url text,
+ epoch integer DEFAULT 0 NOT NULL,
+ CONSTRAINT check_3798bae3d6 CHECK ((char_length(arch) <= 255)),
+ CONSTRAINT check_5d29ba59ac CHECK ((char_length(description) <= 5000)),
+ CONSTRAINT check_6e8cbd536d CHECK ((char_length(url) <= 1000)),
+ CONSTRAINT check_845ba4d7d0 CHECK ((char_length(license) <= 1000)),
+ CONSTRAINT check_b010bf4870 CHECK ((char_length(summary) <= 1000)),
+ CONSTRAINT check_c3e2fc2e89 CHECK ((char_length(release) <= 128))
+);
+
+CREATE TABLE packages_rpm_repository_files (
+ id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ project_id bigint NOT NULL,
+ file_store integer DEFAULT 1,
+ status smallint DEFAULT 0 NOT NULL,
+ size integer,
+ file_md5 bytea,
+ file_sha1 bytea,
+ file_sha256 bytea,
+ file text NOT NULL,
+ file_name text NOT NULL,
+ CONSTRAINT check_a9fef187f5 CHECK ((char_length(file) <= 255)),
+ CONSTRAINT check_b6b721b275 CHECK ((char_length(file_name) <= 255))
+);
+
+CREATE SEQUENCE packages_rpm_repository_files_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE packages_rpm_repository_files_id_seq OWNED BY packages_rpm_repository_files.id;
+
CREATE TABLE packages_rubygems_metadata (
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
@@ -19323,13 +19267,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 +19290,6 @@ CREATE TABLE path_locks (
);
CREATE SEQUENCE path_locks_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -19375,7 +19316,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 +19325,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 +19361,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 +19370,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 +19384,24 @@ 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,
+ rpm_max_file_size bigint DEFAULT '5368709120'::bigint NOT NULL
);
CREATE SEQUENCE plan_limits_id_seq
@@ -19475,7 +19422,6 @@ CREATE TABLE plans (
);
CREATE SEQUENCE plans_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -19522,6 +19468,37 @@ 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_constraints AS
+ SELECT pg_constraint.oid,
+ pg_constraint.conname AS name,
+ pg_constraint.contype AS constraint_type,
+ pg_constraint.convalidated AS constraint_valid,
+ ( SELECT array_agg(pg_attribute.attname ORDER BY attnums.ordering) AS array_agg
+ FROM (unnest(pg_constraint.conkey) WITH ORDINALITY attnums(attnum, ordering)
+ JOIN pg_attribute ON (((pg_attribute.attnum = attnums.attnum) AND (pg_attribute.attrelid = pg_class.oid))))) AS column_names,
+ (((pg_namespace.nspname)::text || '.'::text) || (pg_class.relname)::text) AS table_identifier,
+ NULLIF(pg_constraint.conparentid, (0)::oid) AS parent_constraint_oid,
+ pg_get_constraintdef(pg_constraint.oid) AS definition
+ FROM ((pg_constraint
+ JOIN pg_class ON ((pg_constraint.conrelid = pg_class.oid)))
+ JOIN pg_namespace ON ((pg_class.relnamespace = pg_namespace.oid)));
+
CREATE VIEW postgres_foreign_keys AS
SELECT pg_constraint.oid,
pg_constraint.conname AS name,
@@ -19757,7 +19734,6 @@ CREATE TABLE programming_languages (
);
CREATE SEQUENCE programming_languages_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -19810,7 +19786,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 +19801,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 +19827,13 @@ 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,
+ inbound_job_token_scope_enabled boolean DEFAULT false NOT NULL
);
CREATE SEQUENCE project_ci_cd_settings_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -19905,7 +19883,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 +19915,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 +19973,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 +20006,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 +20024,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 +20047,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 +20065,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 +20093,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 +20162,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 +20217,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 +20236,20 @@ 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,
+ issue_branch_template text,
+ show_diff_preview_in_email boolean DEFAULT true NOT NULL,
+ jitsu_key text,
+ suggested_reviewers_enabled boolean DEFAULT false NOT NULL,
+ only_allow_merge_if_all_status_checks_passed boolean DEFAULT false NOT NULL,
+ mirror_branch_regex text,
+ CONSTRAINT check_2981f15877 CHECK ((char_length(jitsu_key) <= 100)),
CONSTRAINT check_3a03e7557a CHECK ((char_length(previous_default_branch) <= 4096)),
+ CONSTRAINT check_3ca5cbffe6 CHECK ((char_length(issue_branch_template) <= 255)),
+ CONSTRAINT check_67292e4b99 CHECK ((char_length(mirror_branch_regex) <= 255)),
CONSTRAINT check_b09644994b CHECK ((char_length(squash_commit_template) <= 500)),
+ CONSTRAINT check_bde223416c CHECK ((show_default_award_emojis IS NOT NULL)),
CONSTRAINT check_eaf7cfb6a7 CHECK ((char_length(merge_commit_template) <= 500))
);
@@ -20228,11 +20269,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,22 +20300,34 @@ CREATE SEQUENCE project_topics_id_seq
ALTER SEQUENCE project_topics_id_seq OWNED BY project_topics.id;
-CREATE TABLE project_tracing_settings (
+CREATE TABLE project_wiki_repositories (
id bigint NOT NULL,
+ project_id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- project_id integer NOT NULL,
- external_url character varying NOT NULL
+ updated_at timestamp with time zone NOT NULL
);
-CREATE SEQUENCE project_tracing_settings_id_seq
+CREATE SEQUENCE project_wiki_repositories_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;
+ALTER SEQUENCE project_wiki_repositories_id_seq OWNED BY project_wiki_repositories.id;
+
+CREATE TABLE project_wiki_repository_states (
+ verification_started_at timestamp with time zone,
+ verification_retry_at timestamp with time zone,
+ verified_at timestamp with time zone,
+ project_id bigint NOT NULL,
+ verification_state smallint DEFAULT 0 NOT NULL,
+ verification_retry_count smallint,
+ verification_checksum bytea,
+ verification_failure text,
+ project_wiki_repository_id bigint,
+ CONSTRAINT check_119f134b68 CHECK ((char_length(verification_failure) <= 255))
+);
CREATE TABLE projects (
id integer NOT NULL,
@@ -20289,16 +20343,24 @@ 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 +20375,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 +20470,6 @@ CREATE TABLE prometheus_alerts (
);
CREATE SEQUENCE prometheus_alerts_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -20445,7 +20496,6 @@ CREATE TABLE prometheus_metrics (
);
CREATE SEQUENCE prometheus_metrics_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -20460,12 +20510,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 +20529,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 +20552,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
@@ -20515,16 +20562,17 @@ ALTER SEQUENCE protected_branch_unprotect_access_levels_id_seq OWNED BY protecte
CREATE TABLE protected_branches (
id integer NOT NULL,
- project_id integer NOT NULL,
+ project_id integer,
name character varying NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
code_owner_approval_required boolean DEFAULT false NOT NULL,
- allow_force_push boolean DEFAULT false NOT NULL
+ allow_force_push boolean DEFAULT false NOT NULL,
+ namespace_id bigint,
+ CONSTRAINT protected_branches_project_id_namespace_id_any_not_null CHECK (((project_id IS NULL) <> (namespace_id IS NULL)))
);
CREATE SEQUENCE protected_branches_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -20542,6 +20590,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 +20611,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 +20637,6 @@ CREATE TABLE protected_environments (
);
CREATE SEQUENCE protected_environments_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -20608,7 +20656,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 +20673,6 @@ CREATE TABLE protected_tags (
);
CREATE SEQUENCE protected_tags_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -20666,11 +20712,12 @@ CREATE TABLE push_rules (
reject_unsigned_commits boolean,
commit_committer_check boolean,
regexp_uses_re2 boolean DEFAULT true,
- commit_message_negative_regex character varying
+ commit_message_negative_regex character varying,
+ reject_non_dco_commits boolean,
+ commit_committer_name_check boolean DEFAULT false NOT NULL
);
CREATE SEQUENCE push_rules_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -20708,7 +20755,6 @@ CREATE TABLE redirect_routes (
);
CREATE SEQUENCE redirect_routes_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -20771,7 +20817,6 @@ CREATE TABLE releases (
);
CREATE SEQUENCE releases_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -20788,21 +20833,22 @@ 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
+ keep_divergent_refs boolean,
+ mirror_branch_regex text,
+ CONSTRAINT check_aa6b497785 CHECK ((char_length(mirror_branch_regex) <= 255))
);
CREATE SEQUENCE remote_mirrors_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -20835,19 +20881,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 +20909,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 +20948,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 +21053,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 +21099,6 @@ CREATE TABLE saml_providers (
);
CREATE SEQUENCE saml_providers_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21082,9 +21127,101 @@ 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,
+ purl_type smallint,
+ 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
+);
+
+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 sbom_vulnerable_component_versions (
+ id bigint NOT NULL,
+ vulnerability_advisory_id bigint,
+ sbom_component_version_id bigint,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL
+);
+
+CREATE SEQUENCE sbom_vulnerable_component_versions_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE sbom_vulnerable_component_versions_id_seq OWNED BY sbom_vulnerable_component_versions.id;
+
CREATE TABLE scim_identities (
id bigint NOT NULL,
- group_id bigint NOT NULL,
+ group_id bigint,
user_id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
@@ -21105,12 +21242,11 @@ CREATE TABLE scim_oauth_access_tokens (
id integer NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
- group_id integer NOT NULL,
+ group_id integer,
token_encrypted character varying NOT NULL
);
CREATE SEQUENCE scim_oauth_access_tokens_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21119,20 +21255,6 @@ CREATE SEQUENCE scim_oauth_access_tokens_id_seq
ALTER SEQUENCE scim_oauth_access_tokens_id_seq OWNED BY scim_oauth_access_tokens.id;
-CREATE TABLE security_findings (
- id bigint NOT NULL,
- scan_id bigint NOT NULL,
- scanner_id bigint NOT NULL,
- severity smallint NOT NULL,
- confidence smallint NOT NULL,
- project_fingerprint text,
- deduplicated boolean DEFAULT false NOT NULL,
- uuid uuid,
- overridden_uuid uuid,
- CONSTRAINT check_6c2851a8c9 CHECK ((uuid IS NOT NULL)),
- CONSTRAINT check_b9508c6df8 CHECK ((char_length(project_fingerprint) <= 40))
-);
-
CREATE SEQUENCE security_findings_id_seq
START WITH 1
INCREMENT BY 1
@@ -21198,7 +21320,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 +21398,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 +21410,6 @@ CREATE TABLE sent_notifications (
);
CREATE SEQUENCE sent_notifications_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21312,12 +21434,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 +21459,6 @@ CREATE TABLE shards (
);
CREATE SEQUENCE shards_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21348,17 +21469,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 +21509,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 +21591,6 @@ CREATE TABLE snippets (
);
CREATE SEQUENCE snippets_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21479,14 +21603,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 +21624,6 @@ CREATE TABLE software_licenses (
);
CREATE SEQUENCE software_licenses_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21527,7 +21648,6 @@ CREATE TABLE spam_logs (
);
CREATE SEQUENCE spam_logs_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21542,7 +21662,6 @@ CREATE TABLE sprints (
updated_at timestamp with time zone NOT NULL,
start_date date,
due_date date,
- project_id bigint,
group_id bigint,
iid integer NOT NULL,
cached_markdown_version integer,
@@ -21553,7 +21672,6 @@ CREATE TABLE sprints (
state_enum smallint DEFAULT 1 NOT NULL,
iterations_cadence_id integer,
sequence integer,
- CONSTRAINT sprints_must_belong_to_project_or_group CHECK ((((project_id <> NULL::bigint) AND (group_id IS NULL)) OR ((group_id <> NULL::bigint) AND (project_id IS NULL)))),
CONSTRAINT sprints_title CHECK ((char_length(title) <= 255))
);
@@ -21566,6 +21684,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 +21763,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 +21772,6 @@ CREATE TABLE subscriptions (
);
CREATE SEQUENCE subscriptions_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21677,7 +21813,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 +21833,6 @@ CREATE TABLE taggings (
);
CREATE SEQUENCE taggings_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21714,7 +21848,6 @@ CREATE TABLE tags (
);
CREATE SEQUENCE tags_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21733,7 +21866,6 @@ CREATE TABLE term_agreements (
);
CREATE SEQUENCE term_agreements_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21784,7 +21916,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 +21929,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 +21961,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 +21969,6 @@ CREATE TABLE timelogs (
);
CREATE SEQUENCE timelogs_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21825,8 +21981,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 +21995,6 @@ CREATE TABLE todos (
);
CREATE SEQUENCE todos_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21873,6 +22028,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 +22050,6 @@ CREATE TABLE trending_projects (
);
CREATE SEQUENCE trending_projects_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21915,7 +22071,6 @@ CREATE TABLE u2f_registrations (
);
CREATE SEQUENCE u2f_registrations_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -21968,8 +22123,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 +22134,6 @@ CREATE TABLE uploads (
);
CREATE SEQUENCE uploads_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -22000,7 +22154,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 +22170,6 @@ CREATE TABLE user_callouts (
);
CREATE SEQUENCE user_callouts_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -22057,15 +22209,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
@@ -22080,21 +22231,34 @@ CREATE TABLE user_details (
bio character varying(255) DEFAULT ''::character varying NOT NULL,
webauthn_xid text,
provisioned_by_group_id bigint,
- other_role text,
pronouns text,
pronunciation text,
registration_objective smallint,
phone text,
requires_credit_card_verification boolean DEFAULT false NOT NULL,
+ linkedin text DEFAULT ''::text NOT NULL,
+ twitter text DEFAULT ''::text NOT NULL,
+ skype text DEFAULT ''::text NOT NULL,
+ website_url text DEFAULT ''::text NOT NULL,
+ location text DEFAULT ''::text NOT NULL,
+ organization text DEFAULT ''::text NOT NULL,
+ password_last_changed_at timestamp with time zone DEFAULT now() NOT NULL,
CONSTRAINT check_245664af82 CHECK ((char_length(webauthn_xid) <= 100)),
+ CONSTRAINT check_444573ee52 CHECK ((char_length(skype) <= 500)),
+ CONSTRAINT check_466a25be35 CHECK ((char_length(twitter) <= 500)),
+ CONSTRAINT check_7b246dad73 CHECK ((char_length(organization) <= 500)),
+ CONSTRAINT check_7d6489f8f3 CHECK ((char_length(linkedin) <= 500)),
+ CONSTRAINT check_7fe2044093 CHECK ((char_length(website_url) <= 500)),
+ CONSTRAINT check_8a7fcf8a60 CHECK ((char_length(location) <= 500)),
CONSTRAINT check_a73b398c60 CHECK ((char_length(phone) <= 50)),
- CONSTRAINT check_b132136b01 CHECK ((char_length(other_role) <= 100)),
CONSTRAINT check_eeeaf8d4f0 CHECK ((char_length(pronouns) <= 50)),
CONSTRAINT check_f932ed37db CHECK ((char_length(pronunciation) <= 255))
);
COMMENT ON COLUMN user_details.phone IS 'JiHu-specific column';
+COMMENT ON COLUMN user_details.password_last_changed_at IS 'JiHu-specific column';
+
CREATE SEQUENCE user_details_user_id_seq
START WITH 1
INCREMENT BY 1
@@ -22127,8 +22291,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 +22301,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,
@@ -22157,6 +22338,22 @@ CREATE SEQUENCE user_permission_export_uploads_id_seq
ALTER SEQUENCE user_permission_export_uploads_id_seq OWNED BY user_permission_export_uploads.id;
+CREATE TABLE user_phone_number_validations (
+ user_id bigint NOT NULL,
+ validated_at timestamp with time zone,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ international_dial_code smallint NOT NULL,
+ verification_attempts smallint DEFAULT 0 NOT NULL,
+ risk_score smallint DEFAULT 0 NOT NULL,
+ country text NOT NULL,
+ phone_number text NOT NULL,
+ telesign_reference_xid text,
+ CONSTRAINT check_193736da9f CHECK ((char_length(country) <= 3)),
+ CONSTRAINT check_d2f31fc815 CHECK ((char_length(phone_number) <= 12)),
+ CONSTRAINT check_d7af4d3eb5 CHECK ((char_length(telesign_reference_xid) <= 255))
+);
+
CREATE TABLE user_preferences (
id integer NOT NULL,
user_id integer NOT NULL,
@@ -22164,34 +22361,34 @@ 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,
view_diffs_file_by_file boolean DEFAULT false NOT NULL,
gitpod_enabled boolean DEFAULT false NOT NULL,
markdown_surround_selection boolean DEFAULT true NOT NULL,
diffs_deletion_color text,
diffs_addition_color text,
+ markdown_automatic_lists boolean DEFAULT true NOT NULL,
+ use_legacy_web_ide boolean DEFAULT false NOT NULL,
CONSTRAINT check_89bf269f41 CHECK ((char_length(diffs_deletion_color) <= 7)),
CONSTRAINT check_d07ccd35f7 CHECK ((char_length(diffs_addition_color) <= 7))
);
CREATE SEQUENCE user_preferences_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -22200,6 +22397,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 +22425,6 @@ CREATE TABLE user_statuses (
);
CREATE SEQUENCE user_statuses_user_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -22230,7 +22443,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 +22488,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 +22504,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 +22540,6 @@ CREATE TABLE users (
);
CREATE SEQUENCE users_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -22368,7 +22579,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 +22619,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,
+ 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,
@@ -22447,6 +22657,44 @@ CREATE SEQUENCE vulnerabilities_id_seq
ALTER SEQUENCE vulnerabilities_id_seq OWNED BY vulnerabilities.id;
+CREATE TABLE vulnerability_advisories (
+ uuid uuid NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ id bigint NOT NULL,
+ created_date date NOT NULL,
+ published_date date NOT NULL,
+ description text,
+ title text,
+ component_name text,
+ solution text,
+ not_impacted text,
+ cvss_v2 text,
+ cvss_v3 text,
+ affected_range text,
+ identifiers text[] DEFAULT '{}'::text[],
+ fixed_versions text[] DEFAULT '{}'::text[],
+ urls text[] DEFAULT '{}'::text[],
+ links text[] DEFAULT '{}'::text[],
+ CONSTRAINT check_3ab0544d19 CHECK ((char_length(title) <= 2048)),
+ CONSTRAINT check_3b57023409 CHECK ((char_length(affected_range) <= 32)),
+ CONSTRAINT check_4d5cd7be9c CHECK ((char_length(component_name) <= 2048)),
+ CONSTRAINT check_962f256a51 CHECK ((char_length(solution) <= 2048)),
+ CONSTRAINT check_aae93955fb CHECK ((char_length(cvss_v3) <= 128)),
+ CONSTRAINT check_b8a17497f3 CHECK ((char_length(cvss_v2) <= 128)),
+ CONSTRAINT check_c05a35f418 CHECK ((char_length(not_impacted) <= 2048)),
+ CONSTRAINT check_ff9f6483b6 CHECK ((char_length(description) <= 2048))
+);
+
+CREATE SEQUENCE vulnerability_advisories_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE vulnerability_advisories_id_seq OWNED BY vulnerability_advisories.id;
+
CREATE TABLE vulnerability_exports (
id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
@@ -22510,11 +22758,11 @@ CREATE TABLE vulnerability_feedback (
comment text,
comment_timestamp timestamp with time zone,
finding_uuid uuid,
- dismissal_reason smallint
+ dismissal_reason smallint,
+ migrated_to_state_transition boolean DEFAULT false
);
CREATE SEQUENCE vulnerability_feedback_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -22680,6 +22928,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,
@@ -22719,7 +22984,7 @@ CREATE TABLE vulnerability_occurrences (
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
severity smallint NOT NULL,
- confidence smallint NOT NULL,
+ confidence smallint,
report_type smallint NOT NULL,
project_id integer NOT NULL,
scanner_id bigint NOT NULL,
@@ -22738,7 +23003,7 @@ CREATE TABLE vulnerability_occurrences (
cve text,
location jsonb,
detection_method smallint DEFAULT 0 NOT NULL,
- migrated_to_new_structure boolean DEFAULT false NOT NULL,
+ uuid_convert_string_to_uuid uuid DEFAULT '00000000-0000-0000-0000-000000000000'::uuid NOT NULL,
CONSTRAINT check_4a3a60f2ba CHECK ((char_length(solution) <= 7000)),
CONSTRAINT check_ade261da6b CHECK ((char_length(description) <= 15000)),
CONSTRAINT check_df6dd20219 CHECK ((char_length(message) <= 3000)),
@@ -22767,6 +23032,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 +23090,29 @@ 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,
+ dismissal_reason smallint,
+ CONSTRAINT check_d1ca8ec043 CHECK ((from_state <> to_state)),
+ 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,17 +23156,26 @@ 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,
created_at timestamp without time zone,
updated_at timestamp without time zone,
type character varying DEFAULT 'ProjectHook'::character varying,
- service_id integer,
push_events boolean DEFAULT true NOT NULL,
issues_events boolean DEFAULT false NOT NULL,
merge_requests_events boolean DEFAULT false NOT NULL,
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 +23189,21 @@ 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,
+ integration_id integer,
+ branch_filter_strategy smallint DEFAULT 0 NOT NULL
);
CREATE SEQUENCE web_hooks_id_seq
- AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -22922,7 +23223,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 +23244,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 +23262,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 +23270,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,
@@ -23000,7 +23317,7 @@ CREATE TABLE x509_certificates (
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
subject_key_identifier character varying(255) NOT NULL,
- subject character varying(255) NOT NULL,
+ subject character varying(512) NOT NULL,
email character varying(255) NOT NULL,
serial_number bytea NOT NULL,
certificate_status smallint DEFAULT 0 NOT NULL,
@@ -23166,6 +23483,10 @@ ALTER TABLE ONLY audit_events ALTER COLUMN id SET DEFAULT nextval('audit_events_
ALTER TABLE ONLY audit_events_external_audit_event_destinations ALTER COLUMN id SET DEFAULT nextval('audit_events_external_audit_event_destinations_id_seq'::regclass);
+ALTER TABLE ONLY audit_events_streaming_event_type_filters ALTER COLUMN id SET DEFAULT nextval('audit_events_streaming_event_type_filters_id_seq'::regclass);
+
+ALTER TABLE ONLY audit_events_streaming_headers ALTER COLUMN id SET DEFAULT nextval('audit_events_streaming_headers_id_seq'::regclass);
+
ALTER TABLE ONLY authentication_events ALTER COLUMN id SET DEFAULT nextval('authentication_events_id_seq'::regclass);
ALTER TABLE ONLY award_emoji ALTER COLUMN id SET DEFAULT nextval('award_emoji_id_seq'::regclass);
@@ -23230,14 +23551,10 @@ 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);
-ALTER TABLE ONLY ci_builds_metadata ALTER COLUMN id SET DEFAULT nextval('ci_builds_metadata_id_seq'::regclass);
-
ALTER TABLE ONLY ci_builds_runner_session ALTER COLUMN id SET DEFAULT nextval('ci_builds_runner_session_id_seq'::regclass);
ALTER TABLE ONLY ci_daily_build_group_report_results ALTER COLUMN id SET DEFAULT nextval('ci_daily_build_group_report_results_id_seq'::regclass);
@@ -23250,8 +23567,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);
@@ -23264,6 +23579,8 @@ ALTER TABLE ONLY ci_namespace_mirrors ALTER COLUMN id SET DEFAULT nextval('ci_na
ALTER TABLE ONLY ci_namespace_monthly_usages ALTER COLUMN id SET DEFAULT nextval('ci_namespace_monthly_usages_id_seq'::regclass);
+ALTER TABLE ONLY ci_partitions ALTER COLUMN id SET DEFAULT nextval('ci_partitions_id_seq'::regclass);
+
ALTER TABLE ONLY ci_pending_builds ALTER COLUMN id SET DEFAULT nextval('ci_pending_builds_id_seq'::regclass);
ALTER TABLE ONLY ci_pipeline_artifacts ALTER COLUMN id SET DEFAULT nextval('ci_pipeline_artifacts_id_seq'::regclass);
@@ -23280,8 +23597,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 +23617,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 +23643,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 +23663,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 +23741,10 @@ 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_configurations ALTER COLUMN id SET DEFAULT nextval('dora_configurations_id_seq'::regclass);
+
ALTER TABLE ONLY dora_daily_metrics ALTER COLUMN id SET DEFAULT nextval('dora_daily_metrics_id_seq'::regclass);
ALTER TABLE ONLY draft_notes ALTER COLUMN id SET DEFAULT nextval('draft_notes_id_seq'::regclass);
@@ -23460,8 +23781,6 @@ ALTER TABLE ONLY evidences ALTER COLUMN id SET DEFAULT nextval('evidences_id_seq
ALTER TABLE ONLY experiment_subjects ALTER COLUMN id SET DEFAULT nextval('experiment_subjects_id_seq'::regclass);
-ALTER TABLE ONLY experiment_users ALTER COLUMN id SET DEFAULT nextval('experiment_users_id_seq'::regclass);
-
ALTER TABLE ONLY experiments ALTER COLUMN id SET DEFAULT nextval('experiments_id_seq'::regclass);
ALTER TABLE ONLY external_approval_rules ALTER COLUMN id SET DEFAULT nextval('external_approval_rules_id_seq'::regclass);
@@ -23494,10 +23813,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);
@@ -23516,6 +23831,8 @@ ALTER TABLE ONLY geo_repository_updated_events ALTER COLUMN id SET DEFAULT nextv
ALTER TABLE ONLY geo_reset_checksum_events ALTER COLUMN id SET DEFAULT nextval('geo_reset_checksum_events_id_seq'::regclass);
+ALTER TABLE ONLY ghost_user_migrations ALTER COLUMN id SET DEFAULT nextval('ghost_user_migrations_id_seq'::regclass);
+
ALTER TABLE ONLY gitlab_subscription_histories ALTER COLUMN id SET DEFAULT nextval('gitlab_subscription_histories_id_seq'::regclass);
ALTER TABLE ONLY gitlab_subscriptions ALTER COLUMN id SET DEFAULT nextval('gitlab_subscriptions_id_seq'::regclass);
@@ -23572,6 +23889,10 @@ ALTER TABLE ONLY incident_management_pending_alert_escalations ALTER COLUMN id S
ALTER TABLE ONLY incident_management_pending_issue_escalations ALTER COLUMN id SET DEFAULT nextval('incident_management_pending_issue_escalations_id_seq'::regclass);
+ALTER TABLE ONLY incident_management_timeline_event_tag_links ALTER COLUMN id SET DEFAULT nextval('incident_management_timeline_event_tag_links_id_seq'::regclass);
+
+ALTER TABLE ONLY incident_management_timeline_event_tags ALTER COLUMN id SET DEFAULT nextval('incident_management_timeline_event_tags_id_seq'::regclass);
+
ALTER TABLE ONLY incident_management_timeline_events ALTER COLUMN id SET DEFAULT nextval('incident_management_timeline_events_id_seq'::regclass);
ALTER TABLE ONLY index_statuses ALTER COLUMN id SET DEFAULT nextval('index_statuses_id_seq'::regclass);
@@ -23586,6 +23907,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 +23965,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);
@@ -23662,6 +23987,8 @@ ALTER TABLE ONLY merge_request_diffs ALTER COLUMN id SET DEFAULT nextval('merge_
ALTER TABLE ONLY merge_request_metrics ALTER COLUMN id SET DEFAULT nextval('merge_request_metrics_id_seq'::regclass);
+ALTER TABLE ONLY merge_request_predictions ALTER COLUMN merge_request_id SET DEFAULT nextval('merge_request_predictions_merge_request_id_seq'::regclass);
+
ALTER TABLE ONLY merge_request_reviewers ALTER COLUMN id SET DEFAULT nextval('merge_request_reviewers_id_seq'::regclass);
ALTER TABLE ONLY merge_request_user_mentions ALTER COLUMN id SET DEFAULT nextval('merge_request_user_mentions_id_seq'::regclass);
@@ -23680,11 +24007,19 @@ ALTER TABLE ONLY metrics_users_starred_dashboards ALTER COLUMN id SET DEFAULT ne
ALTER TABLE ONLY milestones ALTER COLUMN id SET DEFAULT nextval('milestones_id_seq'::regclass);
+ALTER TABLE ONLY ml_candidate_metrics ALTER COLUMN id SET DEFAULT nextval('ml_candidate_metrics_id_seq'::regclass);
+
+ALTER TABLE ONLY ml_candidate_params ALTER COLUMN id SET DEFAULT nextval('ml_candidate_params_id_seq'::regclass);
+
+ALTER TABLE ONLY ml_candidates ALTER COLUMN id SET DEFAULT nextval('ml_candidates_id_seq'::regclass);
+
+ALTER TABLE ONLY ml_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_aggregation_schedules ALTER COLUMN namespace_id SET DEFAULT nextval('namespace_aggregation_schedules_namespace_id_seq'::regclass);
+ALTER TABLE ONLY namespace_bans ALTER COLUMN id SET DEFAULT nextval('namespace_bans_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 namespace_commit_emails ALTER COLUMN id SET DEFAULT nextval('namespace_commit_emails_id_seq'::regclass);
ALTER TABLE ONLY namespace_statistics ALTER COLUMN id SET DEFAULT nextval('namespace_statistics_id_seq'::regclass);
@@ -23724,6 +24059,8 @@ ALTER TABLE ONLY operations_strategies_user_lists ALTER COLUMN id SET DEFAULT ne
ALTER TABLE ONLY operations_user_lists ALTER COLUMN id SET DEFAULT nextval('operations_user_lists_id_seq'::regclass);
+ALTER TABLE ONLY p_ci_builds_metadata ALTER COLUMN id SET DEFAULT nextval('ci_builds_metadata_id_seq'::regclass);
+
ALTER TABLE ONLY packages_build_infos ALTER COLUMN id SET DEFAULT nextval('packages_build_infos_id_seq'::regclass);
ALTER TABLE ONLY packages_composer_cache_files ALTER COLUMN id SET DEFAULT nextval('packages_composer_cache_files_id_seq'::regclass);
@@ -23768,6 +24105,8 @@ ALTER TABLE ONLY packages_package_files ALTER COLUMN id SET DEFAULT nextval('pac
ALTER TABLE ONLY packages_packages ALTER COLUMN id SET DEFAULT nextval('packages_packages_id_seq'::regclass);
+ALTER TABLE ONLY packages_rpm_repository_files ALTER COLUMN id SET DEFAULT nextval('packages_rpm_repository_files_id_seq'::regclass);
+
ALTER TABLE ONLY packages_tags ALTER COLUMN id SET DEFAULT nextval('packages_tags_id_seq'::regclass);
ALTER TABLE ONLY pages_deployment_states ALTER COLUMN pages_deployment_id SET DEFAULT nextval('pages_deployment_states_pages_deployment_id_seq'::regclass);
@@ -23824,8 +24163,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,7 +24183,7 @@ 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 project_wiki_repositories ALTER COLUMN id SET DEFAULT nextval('project_wiki_repositories_id_seq'::regclass);
ALTER TABLE ONLY projects ALTER COLUMN id SET DEFAULT nextval('projects_id_seq'::regclass);
@@ -23908,6 +24253,16 @@ 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 sbom_vulnerable_component_versions ALTER COLUMN id SET DEFAULT nextval('sbom_vulnerable_component_versions_id_seq'::regclass);
+
ALTER TABLE ONLY scim_identities ALTER COLUMN id SET DEFAULT nextval('scim_identities_id_seq'::regclass);
ALTER TABLE ONLY scim_oauth_access_tokens ALTER COLUMN id SET DEFAULT nextval('scim_oauth_access_tokens_id_seq'::regclass);
@@ -23950,6 +24305,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 +24329,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 +24361,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);
@@ -24020,6 +24383,8 @@ ALTER TABLE ONLY users_statistics ALTER COLUMN id SET DEFAULT nextval('users_sta
ALTER TABLE ONLY vulnerabilities ALTER COLUMN id SET DEFAULT nextval('vulnerabilities_id_seq'::regclass);
+ALTER TABLE ONLY vulnerability_advisories ALTER COLUMN id SET DEFAULT nextval('vulnerability_advisories_id_seq'::regclass);
+
ALTER TABLE ONLY vulnerability_exports ALTER COLUMN id SET DEFAULT nextval('vulnerability_exports_id_seq'::regclass);
ALTER TABLE ONLY vulnerability_external_issue_links ALTER COLUMN id SET DEFAULT nextval('vulnerability_external_issue_links_id_seq'::regclass);
@@ -24042,6 +24407,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 +24421,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 +24437,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 +24451,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 +25150,15 @@ 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_event_type_filters
+ ADD CONSTRAINT audit_events_streaming_event_type_filters_pkey PRIMARY KEY (id);
+
+ALTER TABLE ONLY audit_events_streaming_headers
+ ADD CONSTRAINT audit_events_streaming_headers_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY authentication_events
ADD CONSTRAINT authentication_events_pkey PRIMARY KEY (id);
@@ -24968,6 +25177,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);
@@ -25073,8 +25285,11 @@ ALTER TABLE ONLY ci_build_trace_chunks
ALTER TABLE ONLY ci_build_trace_metadata
ADD CONSTRAINT ci_build_trace_metadata_pkey PRIMARY KEY (build_id);
+ALTER TABLE ONLY p_ci_builds_metadata
+ ADD CONSTRAINT p_ci_builds_metadata_pkey PRIMARY KEY (id, partition_id);
+
ALTER TABLE ONLY ci_builds_metadata
- ADD CONSTRAINT ci_builds_metadata_pkey PRIMARY KEY (id);
+ ADD CONSTRAINT ci_builds_metadata_pkey PRIMARY KEY (id, partition_id);
ALTER TABLE ONLY ci_builds
ADD CONSTRAINT ci_builds_pkey PRIMARY KEY (id);
@@ -25118,6 +25333,9 @@ ALTER TABLE ONLY ci_namespace_mirrors
ALTER TABLE ONLY ci_namespace_monthly_usages
ADD CONSTRAINT ci_namespace_monthly_usages_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY ci_partitions
+ ADD CONSTRAINT ci_partitions_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY ci_pending_builds
ADD CONSTRAINT ci_pending_builds_pkey PRIMARY KEY (id);
@@ -25130,6 +25348,9 @@ ALTER TABLE ONLY ci_pipeline_chat_data
ALTER TABLE ONLY ci_pipeline_messages
ADD CONSTRAINT ci_pipeline_messages_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY ci_pipeline_metadata
+ ADD CONSTRAINT ci_pipeline_metadata_pkey PRIMARY KEY (pipeline_id);
+
ALTER TABLE ONLY ci_pipeline_schedule_variables
ADD CONSTRAINT ci_pipeline_schedule_variables_pkey PRIMARY KEY (id);
@@ -25169,12 +25390,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 +25438,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 +25465,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 +25483,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);
@@ -25337,6 +25561,9 @@ ALTER TABLE ONLY dast_site_validations
ALTER TABLE ONLY dast_sites
ADD CONSTRAINT dast_sites_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY dependency_proxy_blob_states
+ ADD CONSTRAINT dependency_proxy_blob_states_pkey PRIMARY KEY (dependency_proxy_blob_id);
+
ALTER TABLE ONLY dependency_proxy_blobs
ADD CONSTRAINT dependency_proxy_blobs_pkey PRIMARY KEY (id);
@@ -25388,6 +25615,12 @@ 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_configurations
+ ADD CONSTRAINT dora_configurations_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY dora_daily_metrics
ADD CONSTRAINT dora_daily_metrics_pkey PRIMARY KEY (id);
@@ -25448,9 +25681,6 @@ ALTER TABLE ONLY evidences
ALTER TABLE ONLY experiment_subjects
ADD CONSTRAINT experiment_subjects_pkey PRIMARY KEY (id);
-ALTER TABLE ONLY experiment_users
- ADD CONSTRAINT experiment_users_pkey PRIMARY KEY (id);
-
ALTER TABLE ONLY experiments
ADD CONSTRAINT experiments_pkey PRIMARY KEY (id);
@@ -25499,12 +25729,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);
@@ -25532,6 +25756,9 @@ ALTER TABLE ONLY geo_repository_updated_events
ALTER TABLE ONLY geo_reset_checksum_events
ADD CONSTRAINT geo_reset_checksum_events_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY ghost_user_migrations
+ ADD CONSTRAINT ghost_user_migrations_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY gitlab_subscription_histories
ADD CONSTRAINT gitlab_subscription_histories_pkey PRIMARY KEY (id);
@@ -25625,6 +25852,18 @@ 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_event_tag_links
+ ADD CONSTRAINT incident_management_timeline_event_tag_links_pkey PRIMARY KEY (id);
+
+ALTER TABLE ONLY incident_management_timeline_event_tags
+ ADD CONSTRAINT incident_management_timeline_event_tags_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY incident_management_timeline_events
ADD CONSTRAINT incident_management_timeline_events_pkey PRIMARY KEY (id);
@@ -25646,6 +25885,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,10 +25928,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));
-
-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));
+ 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 iterations_cadences
ADD CONSTRAINT iterations_cadences_pkey PRIMARY KEY (id);
@@ -25742,6 +25981,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);
@@ -25781,6 +26026,9 @@ ALTER TABLE ONLY merge_request_diffs
ALTER TABLE ONLY merge_request_metrics
ADD CONSTRAINT merge_request_metrics_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY merge_request_predictions
+ ADD CONSTRAINT merge_request_predictions_pkey PRIMARY KEY (merge_request_id);
+
ALTER TABLE ONLY merge_request_reviewers
ADD CONSTRAINT merge_request_reviewers_pkey PRIMARY KEY (id);
@@ -25811,12 +26059,36 @@ 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_commit_emails
+ ADD CONSTRAINT namespace_commit_emails_pkey PRIMARY KEY (id);
+
+ALTER TABLE ONLY namespace_details
+ ADD CONSTRAINT namespace_details_pkey PRIMARY KEY (namespace_id);
+
ALTER TABLE ONLY namespace_limits
ADD CONSTRAINT namespace_limits_pkey PRIMARY KEY (namespace_id);
@@ -25889,6 +26161,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);
@@ -25973,6 +26248,12 @@ ALTER TABLE ONLY packages_packages
ALTER TABLE ONLY packages_pypi_metadata
ADD CONSTRAINT packages_pypi_metadata_pkey PRIMARY KEY (package_id);
+ALTER TABLE ONLY packages_rpm_metadata
+ ADD CONSTRAINT packages_rpm_metadata_pkey PRIMARY KEY (package_id);
+
+ALTER TABLE ONLY packages_rpm_repository_files
+ ADD CONSTRAINT packages_rpm_repository_files_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY packages_rubygems_metadata
ADD CONSTRAINT packages_rubygems_metadata_pkey PRIMARY KEY (package_id);
@@ -26084,6 +26365,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,8 +26392,11 @@ 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 project_wiki_repositories
+ ADD CONSTRAINT project_wiki_repositories_pkey PRIMARY KEY (id);
+
+ALTER TABLE ONLY project_wiki_repository_states
+ ADD CONSTRAINT project_wiki_repository_states_pkey PRIMARY KEY (project_id);
ALTER TABLE ONLY projects
ADD CONSTRAINT projects_pkey PRIMARY KEY (id);
@@ -26219,6 +26509,21 @@ 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 sbom_vulnerable_component_versions
+ ADD CONSTRAINT sbom_vulnerable_component_versions_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY scim_identities
ADD CONSTRAINT scim_identities_pkey PRIMARY KEY (id);
@@ -26226,7 +26531,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 +26602,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 +26638,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 +26698,21 @@ 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_phone_number_validations
+ ADD CONSTRAINT user_phone_number_validations_pkey PRIMARY KEY (user_id);
+
ALTER TABLE ONLY user_preferences
ADD CONSTRAINT user_preferences_pkey PRIMARY KEY (id);
+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,9 +26734,15 @@ 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);
+ALTER TABLE ONLY vulnerability_advisories
+ ADD CONSTRAINT vulnerability_advisories_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY vulnerability_exports
ADD CONSTRAINT vulnerability_exports_pkey PRIMARY KEY (id);
@@ -26450,6 +26776,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 +26797,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 +26821,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 +26842,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 +27762,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);
@@ -27630,10 +27782,10 @@ CREATE INDEX ca_aggregations_last_full_run_at ON analytics_cycle_analytics_aggre
CREATE INDEX ca_aggregations_last_incremental_run_at ON analytics_cycle_analytics_aggregations USING btree (last_incremental_run_at NULLS FIRST) WHERE (enabled IS TRUE);
-CREATE INDEX cadence_create_iterations_automation ON iterations_cadences USING btree (automatic, duration_in_weeks, date((COALESCE(last_run_date, '1970-01-01'::date) + ((duration_in_weeks)::double precision * '7 days'::interval)))) WHERE (duration_in_weeks IS NOT NULL);
-
CREATE INDEX ci_builds_gitlab_monitor_metrics ON ci_builds USING btree (status, created_at, project_id) WHERE ((type)::text = 'Ci::Build'::text);
+CREATE INDEX ci_pipeline_artifacts_on_expire_at_for_removal ON ci_pipeline_artifacts USING btree (expire_at) WHERE ((locked = 0) AND (expire_at IS NOT NULL));
+
CREATE INDEX code_owner_approval_required ON protected_branches USING btree (project_id, code_owner_approval_required) WHERE (code_owner_approval_required = true);
CREATE UNIQUE INDEX commit_user_mentions_on_commit_id_and_note_id_unique_index ON commit_user_mentions USING btree (commit_id, note_id);
@@ -27660,12 +27812,22 @@ 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_approval_merge_request_rules_on_sec_orchestration_config_id ON approval_merge_request_rules USING btree (security_orchestration_policy_configuration_id);
+
+CREATE INDEX idx_approval_project_rules_on_sec_orchestration_config_id ON approval_project_rules USING btree (security_orchestration_policy_configuration_id);
+
+CREATE INDEX idx_audit_events_part_on_entity_id_desc_author_id_created_at ON ONLY audit_events USING btree (entity_id, entity_type, id DESC, author_id, created_at);
+
CREATE INDEX idx_award_emoji_on_user_emoji_name_awardable_type_awardable_id ON award_emoji USING btree (user_id, name, awardable_type, awardable_id);
CREATE INDEX idx_build_artifacts_size_refreshes_state_updated_at ON project_build_artifacts_size_refreshes USING btree (state, updated_at);
@@ -27698,8 +27860,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])));
@@ -27746,6 +27912,8 @@ CREATE INDEX idx_mr_cc_diff_files_on_mr_cc_id_and_sha ON merge_request_context_c
CREATE INDEX idx_mrs_on_target_id_and_created_at_and_state_id ON merge_requests USING btree (target_project_id, state_id, created_at, id);
+CREATE UNIQUE INDEX idx_namespace_settings_on_default_compliance_framework_id ON namespace_settings USING btree (default_compliance_framework_id);
+
CREATE UNIQUE INDEX idx_on_compliance_management_frameworks_namespace_id_name ON compliance_management_frameworks USING btree (namespace_id, name);
CREATE UNIQUE INDEX idx_on_external_approval_rules_project_id_external_url ON external_approval_rules USING btree (project_id, external_url);
@@ -27756,6 +27924,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_and_confidential_and_author_and_id ON issues USING btree (project_id, confidential, author_id, id) WHERE (state_id = 1);
+
CREATE INDEX idx_packages_debian_group_component_files_on_architecture_id ON packages_debian_group_component_files USING btree (architecture_id);
CREATE INDEX idx_packages_debian_project_component_files_on_architecture_id ON packages_debian_project_component_files USING btree (architecture_id);
@@ -27774,6 +27944,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);
@@ -27782,6 +27954,8 @@ CREATE UNIQUE INDEX idx_project_id_payload_key_self_managed_prometheus_alert_eve
CREATE INDEX idx_project_repository_check_partial ON projects USING btree (repository_storage, created_at) WHERE (last_repository_check_at IS NULL);
+CREATE INDEX idx_project_wiki_repository_states_project_wiki_repository_id ON project_wiki_repository_states USING btree (project_wiki_repository_id);
+
CREATE INDEX idx_projects_api_created_at_id_for_archived ON projects USING btree (created_at, id) WHERE ((archived = true) AND (pending_delete = false) AND (hidden = false));
CREATE INDEX idx_projects_api_created_at_id_for_archived_vis20 ON projects USING btree (created_at, id) WHERE ((archived = true) AND (visibility_level = 20) AND (pending_delete = false) AND (hidden = false));
@@ -27812,13 +27986,19 @@ 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_test_reports_on_issue_id_created_at_and_id ON requirements_management_test_reports USING btree (issue_id, created_at, id);
+
CREATE INDEX idx_user_details_on_provisioned_by_group_id_user_id ON user_details USING btree (provisioned_by_group_id, user_id);
CREATE UNIQUE INDEX idx_vuln_signatures_on_occurrences_id_and_signature_sha ON vulnerability_finding_signatures USING btree (finding_id, signature_sha);
CREATE UNIQUE INDEX idx_vuln_signatures_uniqueness_signature_sha ON vulnerability_finding_signatures USING btree (finding_id, algorithm_type, signature_sha);
-CREATE INDEX idx_vulnerabilities_partial_devops_adoption ON vulnerabilities USING btree (project_id, created_at) WHERE (state <> 1);
+CREATE INDEX idx_vulnerabilities_on_project_id_and_id_active_cis_dft_branch ON vulnerabilities USING btree (project_id, id) WHERE ((report_type = 7) AND (state = ANY (ARRAY[1, 4])) AND (present_on_default_branch IS TRUE));
+
+CREATE INDEX idx_vulnerabilities_partial_devops_adoption_and_default_branch ON vulnerabilities USING btree (project_id, created_at, present_on_default_branch) WHERE (state <> 1);
CREATE UNIQUE INDEX idx_vulnerability_ext_issue_links_on_vulne_id_and_ext_issue ON vulnerability_external_issue_links USING btree (vulnerability_id, external_type, external_project_key, external_issue_key);
@@ -27982,7 +28162,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 +28188,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);
@@ -28084,6 +28266,8 @@ CREATE INDEX index_boards_on_project_id ON boards USING btree (project_id);
CREATE INDEX index_broadcast_message_on_ends_at_and_broadcast_type_and_id ON broadcast_messages USING btree (ends_at, broadcast_type, id);
+CREATE INDEX index_broadcast_messages_on_namespace_id ON broadcast_messages USING btree (namespace_id);
+
CREATE INDEX index_btree_namespaces_traversal_ids ON namespaces USING btree (traversal_ids);
CREATE INDEX index_bulk_import_configurations_on_bulk_import_id ON bulk_import_configurations USING btree (bulk_import_id);
@@ -28104,9 +28288,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);
@@ -28120,12 +28304,24 @@ CREATE UNIQUE INDEX index_ci_build_trace_chunks_on_build_id_and_chunk_index ON c
CREATE INDEX index_ci_build_trace_metadata_on_trace_artifact_id ON ci_build_trace_metadata USING btree (trace_artifact_id);
-CREATE UNIQUE INDEX index_ci_builds_metadata_on_build_id ON ci_builds_metadata USING btree (build_id);
+CREATE INDEX p_ci_builds_metadata_build_id_idx ON ONLY p_ci_builds_metadata USING btree (build_id) WHERE (has_exposed_artifacts IS TRUE);
CREATE INDEX index_ci_builds_metadata_on_build_id_and_has_exposed_artifacts ON ci_builds_metadata USING btree (build_id) WHERE (has_exposed_artifacts IS TRUE);
+CREATE INDEX p_ci_builds_metadata_build_id_id_idx ON ONLY p_ci_builds_metadata USING btree (build_id) INCLUDE (id) WHERE (interruptible = true);
+
CREATE INDEX index_ci_builds_metadata_on_build_id_and_id_and_interruptible ON ci_builds_metadata USING btree (build_id) INCLUDE (id) WHERE (interruptible = true);
+CREATE UNIQUE INDEX p_ci_builds_metadata_build_id_partition_id_idx ON ONLY p_ci_builds_metadata USING btree (build_id, partition_id);
+
+CREATE UNIQUE INDEX index_ci_builds_metadata_on_build_id_partition_id_unique ON ci_builds_metadata USING btree (build_id, partition_id);
+
+CREATE UNIQUE INDEX p_ci_builds_metadata_id_partition_id_idx ON ONLY p_ci_builds_metadata USING btree (id, partition_id);
+
+CREATE UNIQUE INDEX index_ci_builds_metadata_on_id_partition_id_unique ON ci_builds_metadata USING btree (id, partition_id);
+
+CREATE INDEX p_ci_builds_metadata_project_id_idx ON ONLY p_ci_builds_metadata USING btree (project_id);
+
CREATE INDEX index_ci_builds_metadata_on_project_id ON ci_builds_metadata USING btree (project_id);
CREATE INDEX index_ci_builds_on_auto_canceled_by_id ON ci_builds USING btree (auto_canceled_by_id);
@@ -28144,10 +28340,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 +28350,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 +28360,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 +28400,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);
@@ -28262,6 +28452,10 @@ CREATE UNIQUE INDEX index_ci_pipeline_chat_data_on_pipeline_id ON ci_pipeline_ch
CREATE INDEX index_ci_pipeline_messages_on_pipeline_id ON ci_pipeline_messages USING btree (pipeline_id);
+CREATE INDEX index_ci_pipeline_metadata_on_pipeline_id_name ON ci_pipeline_metadata USING btree (pipeline_id, name);
+
+CREATE INDEX index_ci_pipeline_metadata_on_project_id ON ci_pipeline_metadata USING btree (project_id);
+
CREATE UNIQUE INDEX index_ci_pipeline_schedule_variables_on_schedule_id_and_key ON ci_pipeline_schedule_variables USING btree (pipeline_schedule_id, key);
CREATE INDEX index_ci_pipeline_schedules_on_next_run_at_and_active ON ci_pipeline_schedules USING btree (next_run_at, active);
@@ -28338,6 +28532,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);
@@ -28358,20 +28554,28 @@ CREATE INDEX index_ci_runners_on_locked ON ci_runners USING btree (locked);
CREATE INDEX index_ci_runners_on_runner_type ON ci_runners USING btree (runner_type);
-CREATE INDEX index_ci_runners_on_token ON ci_runners USING btree (token);
-
-CREATE INDEX index_ci_runners_on_token_encrypted ON ci_runners USING btree (token_encrypted);
-
CREATE INDEX index_ci_runners_on_token_expires_at_and_id_desc ON ci_runners USING btree (token_expires_at, id DESC);
CREATE INDEX index_ci_runners_on_token_expires_at_desc_and_id_desc ON ci_runners USING btree (token_expires_at DESC, id DESC);
+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 +28602,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 +28624,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 +28636,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 +28666,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 +28682,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);
@@ -28506,6 +28716,8 @@ CREATE INDEX index_container_repositories_on_project_id_and_id ON container_repo
CREATE UNIQUE INDEX index_container_repositories_on_project_id_and_name ON container_repositories USING btree (project_id, name);
+CREATE INDEX index_container_repositories_on_status_and_id ON container_repositories USING btree (status, id) WHERE (status IS NOT NULL);
+
CREATE INDEX index_container_repository_on_name_trigram ON container_repositories USING gin (name gin_trgm_ops);
CREATE UNIQUE INDEX index_content_blocked_states_on_container_id_commit_sha_path ON content_blocked_states USING btree (container_identifier, commit_sha, path);
@@ -28576,6 +28788,16 @@ CREATE UNIQUE INDEX index_dast_sites_on_project_id_and_url ON dast_sites USING b
CREATE UNIQUE INDEX index_dep_prox_manifests_on_group_id_file_name_and_status ON dependency_proxy_manifests USING btree (group_id, file_name, status);
+CREATE INDEX index_dependency_proxy_blob_states_failed_verification ON dependency_proxy_blob_states USING btree (verification_retry_at NULLS FIRST) WHERE (verification_state = 3);
+
+CREATE INDEX index_dependency_proxy_blob_states_needs_verification ON dependency_proxy_blob_states USING btree (verification_state) WHERE ((verification_state = 0) OR (verification_state = 3));
+
+CREATE INDEX index_dependency_proxy_blob_states_on_dependency_proxy_blob_id ON dependency_proxy_blob_states USING btree (dependency_proxy_blob_id);
+
+CREATE INDEX index_dependency_proxy_blob_states_on_verification_state ON dependency_proxy_blob_states USING btree (verification_state);
+
+CREATE INDEX index_dependency_proxy_blob_states_pending_verification ON dependency_proxy_blob_states USING btree (verified_at NULLS FIRST) WHERE (verification_state = 0);
+
CREATE INDEX index_dependency_proxy_blobs_on_group_id_and_file_name ON dependency_proxy_blobs USING btree (group_id, file_name);
CREATE INDEX index_dependency_proxy_blobs_on_group_id_status_read_at_id ON dependency_proxy_blobs USING btree (group_id, status, read_at, id);
@@ -28596,14 +28818,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 +28908,10 @@ 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_configurations_on_project_id ON dora_configurations USING btree (project_id);
+
CREATE UNIQUE INDEX index_dora_daily_metrics_on_environment_id_and_date ON dora_daily_metrics USING btree (environment_id, date);
CREATE INDEX index_draft_notes_on_author_id ON draft_notes USING btree (author_id);
@@ -28714,6 +28938,8 @@ CREATE INDEX index_emails_on_user_id ON emails USING btree (user_id);
CREATE INDEX index_enabled_clusters_on_id ON clusters USING btree (id) WHERE (enabled = true);
+CREATE INDEX index_environments_on_merge_request_id ON environments USING btree (merge_request_id);
+
CREATE INDEX index_environments_on_name_varchar_pattern_ops ON environments USING btree (name varchar_pattern_ops);
CREATE UNIQUE INDEX index_environments_on_project_id_and_name ON environments USING btree (project_id, name);
@@ -28724,6 +28950,8 @@ CREATE INDEX index_environments_on_project_id_and_tier ON environments USING btr
CREATE INDEX index_environments_on_project_id_state_environment_type ON environments USING btree (project_id, state, environment_type);
+CREATE INDEX index_environments_on_project_name_varchar_pattern_ops_state ON environments USING btree (project_id, lower((name)::text) varchar_pattern_ops, state);
+
CREATE INDEX index_environments_on_state_and_auto_delete_at ON environments USING btree (auto_delete_at) WHERE ((auto_delete_at IS NOT NULL) AND ((state)::text = 'stopped'::text));
CREATE INDEX index_environments_on_state_and_auto_stop_at ON environments USING btree (state, auto_stop_at) WHERE ((auto_stop_at IS NOT NULL) AND ((state)::text = 'available'::text));
@@ -28772,6 +29000,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);
@@ -28826,10 +29056,6 @@ CREATE INDEX index_experiment_subjects_on_project_id ON experiment_subjects USIN
CREATE INDEX index_experiment_subjects_on_user_id ON experiment_subjects USING btree (user_id);
-CREATE INDEX index_experiment_users_on_experiment_id ON experiment_users USING btree (experiment_id);
-
-CREATE INDEX index_experiment_users_on_user_id ON experiment_users USING btree (user_id);
-
CREATE UNIQUE INDEX index_experiments_on_name ON experiments USING btree (name);
CREATE INDEX index_expired_and_not_notified_personal_access_tokens ON personal_access_tokens USING btree (id, expires_at) WHERE ((impersonation = false) AND (revoked = false) AND (expire_notification_delivered = false));
@@ -28866,10 +29092,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 +29108,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);
@@ -28918,6 +29136,10 @@ CREATE INDEX index_geo_repository_updated_events_on_source ON geo_repository_upd
CREATE INDEX index_geo_reset_checksum_events_on_project_id ON geo_reset_checksum_events USING btree (project_id);
+CREATE INDEX index_ghost_user_migrations_on_consume_after_id ON ghost_user_migrations USING btree (consume_after, id);
+
+CREATE UNIQUE INDEX index_ghost_user_migrations_on_user_id ON ghost_user_migrations USING btree (user_id);
+
CREATE INDEX index_gin_ci_namespace_mirrors_on_traversal_ids ON ci_namespace_mirrors USING gin (traversal_ids);
CREATE INDEX index_gin_ci_pending_builds_on_namespace_traversal_ids ON ci_pending_builds USING gin (namespace_traversal_ids);
@@ -28928,6 +29150,8 @@ CREATE INDEX index_gitlab_subscriptions_on_end_date_and_namespace_id ON gitlab_s
CREATE INDEX index_gitlab_subscriptions_on_hosted_plan_id ON gitlab_subscriptions USING btree (hosted_plan_id);
+CREATE INDEX index_gitlab_subscriptions_on_max_seats_used_changed_at ON gitlab_subscriptions USING btree (max_seats_used_changed_at, namespace_id);
+
CREATE UNIQUE INDEX index_gitlab_subscriptions_on_namespace_id ON gitlab_subscriptions USING btree (namespace_id);
CREATE UNIQUE INDEX index_gpg_key_subkeys_on_fingerprint ON gpg_key_subkeys USING btree (fingerprint);
@@ -28970,9 +29194,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 +29206,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);
@@ -28996,10 +29220,14 @@ CREATE INDEX index_group_stages_on_stage_event_hash_id ON analytics_cycle_analyt
CREATE UNIQUE INDEX index_group_user_callouts_feature ON user_group_callouts USING btree (user_id, feature_name, group_id);
+CREATE INDEX index_group_vulnerability_reads_common_finder_query_desc ON vulnerability_reads USING btree (namespace_id, state, report_type, severity DESC, vulnerability_id DESC);
+
CREATE UNIQUE INDEX index_group_wiki_repositories_on_disk_path ON group_wiki_repositories USING btree (disk_path);
CREATE INDEX index_group_wiki_repositories_on_shard_id ON group_wiki_repositories USING btree (shard_id);
+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;
@@ -29012,6 +29240,12 @@ CREATE INDEX index_im_issuable_escalation_statuses_on_policy_id ON incident_mana
CREATE UNIQUE INDEX index_im_oncall_schedules_on_project_id_and_iid ON incident_management_oncall_schedules USING btree (project_id, iid);
+CREATE INDEX index_im_timeline_event_id ON incident_management_timeline_event_tag_links USING btree (timeline_event_id);
+
+CREATE UNIQUE INDEX index_im_timeline_event_tags_on_lower_name_and_project_id ON incident_management_timeline_event_tags USING btree (project_id, lower(name));
+
+CREATE UNIQUE INDEX index_im_timeline_event_tags_on_tag_id_and_event_id ON incident_management_timeline_event_tag_links USING btree (timeline_event_tag_id, timeline_event_id);
+
CREATE INDEX index_im_timeline_events_author_id ON incident_management_timeline_events USING btree (author_id);
CREATE INDEX index_im_timeline_events_issue_id ON incident_management_timeline_events USING btree (issue_id);
@@ -29040,6 +29274,10 @@ CREATE INDEX index_imported_projects_on_import_type_creator_id_created_at ON pro
CREATE INDEX index_imported_projects_on_import_type_id ON projects USING btree (import_type, id) WHERE (import_type IS NOT NULL);
+CREATE INDEX index_in_product_marketing_emails_on_track_series_id_clicked ON in_product_marketing_emails USING btree (track, series, id, cta_clicked_at);
+
+CREATE UNIQUE INDEX index_in_product_marketing_emails_on_user_campaign ON in_product_marketing_emails USING btree (user_id, campaign);
+
CREATE INDEX index_in_product_marketing_emails_on_user_id ON in_product_marketing_emails USING btree (user_id);
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 +29296,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 +29314,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 +29338,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 +29368,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);
@@ -29142,7 +29380,9 @@ CREATE INDEX index_issues_on_closed_by_id ON issues USING btree (closed_by_id);
CREATE INDEX index_issues_on_confidential ON issues USING btree (confidential);
-CREATE INDEX index_issues_on_description_trigram ON issues USING gin (description gin_trgm_ops);
+CREATE INDEX index_issues_on_description_trigram ON issues USING gin (description gin_trgm_ops) WITH (fastupdate='false');
+
+CREATE INDEX index_issues_on_description_trigram_non_latin ON issues USING gin (description gin_trgm_ops) WHERE (((title)::text !~ similar_escape('[\u0000-\u02FF\u1E00-\u1EFF\u2070-\u218F]*'::text, NULL::text)) OR (description !~ similar_escape('[\u0000-\u02FF\u1E00-\u1EFF\u2070-\u218F]*'::text, NULL::text)));
CREATE INDEX index_issues_on_duplicated_to_id ON issues USING btree (duplicated_to_id) WHERE (duplicated_to_id IS NOT NULL);
@@ -29156,7 +29396,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,11 +29408,19 @@ 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_project_id_health_status_created_at_id ON issues USING btree (project_id, health_status, created_at, id);
+
CREATE INDEX index_issues_on_promoted_to_epic_id ON issues USING btree (promoted_to_epic_id) WHERE (promoted_to_epic_id IS NOT NULL);
CREATE INDEX index_issues_on_sprint_id ON issues USING btree (sprint_id);
-CREATE INDEX index_issues_on_title_trigram ON issues USING gin (title gin_trgm_ops);
+CREATE INDEX index_issues_on_title_trigram ON issues USING gin (title gin_trgm_ops) WITH (fastupdate='false');
+
+CREATE INDEX index_issues_on_title_trigram_non_latin ON issues USING gin (title gin_trgm_ops) WHERE (((title)::text !~ similar_escape('[\u0000-\u02FF\u1E00-\u1EFF\u2070-\u218F]*'::text, NULL::text)) OR (description !~ similar_escape('[\u0000-\u02FF\u1E00-\u1EFF\u2070-\u218F]*'::text, NULL::text)));
CREATE INDEX index_issues_on_updated_at ON issues USING btree (updated_at);
@@ -29182,6 +29430,8 @@ CREATE INDEX index_iterations_cadences_on_group_id ON iterations_cadences USING
CREATE UNIQUE INDEX index_jira_connect_installations_on_client_key ON jira_connect_installations USING btree (client_key);
+CREATE INDEX index_jira_connect_installations_on_instance_url ON jira_connect_installations USING btree (instance_url);
+
CREATE INDEX index_jira_connect_subscriptions_on_namespace_id ON jira_connect_subscriptions USING btree (namespace_id);
CREATE INDEX index_jira_imports_on_label_id ON jira_imports USING btree (label_id);
@@ -29190,7 +29440,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 +29450,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 +29530,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,7 +29550,7 @@ 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_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_member_role_id ON members USING btree (member_role_id);
CREATE INDEX index_members_on_requested_at ON members USING btree (requested_at);
@@ -29374,9 +29630,13 @@ CREATE INDEX index_merge_requests_on_assignee_id ON merge_requests USING btree (
CREATE INDEX index_merge_requests_on_author_id ON merge_requests USING btree (author_id);
+CREATE INDEX index_merge_requests_on_author_id_and_id ON merge_requests USING btree (author_id, id);
+
+CREATE INDEX index_merge_requests_on_author_id_and_target_project_id ON merge_requests USING btree (author_id, target_project_id);
+
CREATE INDEX index_merge_requests_on_created_at ON merge_requests USING btree (created_at);
-CREATE INDEX index_merge_requests_on_description_trigram ON merge_requests USING gin (description gin_trgm_ops);
+CREATE INDEX index_merge_requests_on_description_trigram ON merge_requests USING gin (description gin_trgm_ops) WITH (fastupdate='false');
CREATE INDEX index_merge_requests_on_head_pipeline_id ON merge_requests USING btree (head_pipeline_id);
@@ -29412,7 +29672,7 @@ CREATE INDEX index_merge_requests_on_target_project_id_and_updated_at_and_id ON
CREATE INDEX index_merge_requests_on_target_project_id_iid_jira_description ON merge_requests USING btree (target_project_id, iid) WHERE (description ~ '[A-Z][A-Z_0-9]+-\d+'::text);
-CREATE INDEX index_merge_requests_on_title_trigram ON merge_requests USING gin (title gin_trgm_ops);
+CREATE INDEX index_merge_requests_on_title_trigram ON merge_requests USING gin (title gin_trgm_ops) WITH (fastupdate='false');
CREATE INDEX index_merge_requests_on_tp_id_and_merge_commit_sha_and_id ON merge_requests USING btree (target_project_id, merge_commit_sha, id);
@@ -29452,6 +29712,22 @@ 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_candidate_params_on_candidate_id_on_name ON ml_candidate_params USING btree (candidate_id, name);
+
+CREATE UNIQUE INDEX index_ml_candidates_on_experiment_id_and_iid ON ml_candidates USING btree (experiment_id, iid);
+
+CREATE INDEX index_ml_candidates_on_user_id ON ml_candidates USING btree (user_id);
+
+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 +29742,19 @@ 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_namespace_commit_emails_on_email_id ON namespace_commit_emails USING btree (email_id);
-CREATE INDEX index_namespaces_id_parent_id_is_not_null ON namespaces USING btree (id) WHERE (parent_id IS NOT NULL);
+CREATE INDEX index_namespace_commit_emails_on_namespace_id ON namespace_commit_emails 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_commit_emails_on_user_id_and_namespace_id ON namespace_commit_emails USING btree (user_id, namespace_id);
+
+CREATE UNIQUE INDEX index_namespace_root_storage_statistics_on_namespace_id ON namespace_root_storage_statistics USING btree (namespace_id);
+
+CREATE UNIQUE INDEX index_namespace_statistics_on_namespace_id ON namespace_statistics USING btree (namespace_id);
CREATE UNIQUE INDEX index_namespaces_name_parent_id_type ON namespaces USING btree (name, parent_id, type);
@@ -29510,6 +29792,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 +29814,10 @@ 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_id_where_internal ON notes USING btree (id) WHERE (internal = true);
+
CREATE INDEX index_notes_on_line_code ON notes USING btree (line_code);
CREATE INDEX index_notes_on_noteable_id_and_noteable_type_and_system ON notes USING btree (noteable_id, noteable_type, system);
@@ -29544,6 +29832,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 +29842,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 +29852,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);
@@ -29574,12 +29868,6 @@ CREATE INDEX index_on_issues_closed_incidents_by_project_id_and_closed_at ON iss
CREATE INDEX index_on_label_links_all_columns ON label_links USING btree (target_id, label_id, target_type);
-CREATE INDEX index_on_merge_request_assignees_updated_state_by_user_id ON merge_request_assignees USING btree (updated_state_by_user_id);
-
-CREATE INDEX index_on_merge_request_assignees_user_id_and_state ON merge_request_assignees USING btree (user_id, state) WHERE (state = 2);
-
-CREATE INDEX index_on_merge_request_reviewers_updated_state_by_user_id ON merge_request_reviewers USING btree (updated_state_by_user_id);
-
CREATE INDEX index_on_merge_request_reviewers_user_id_and_state ON merge_request_reviewers USING btree (user_id, state) WHERE (state = 2);
CREATE INDEX index_on_merge_requests_for_latest_diffs ON merge_requests USING btree (target_project_id) INCLUDE (id, latest_merge_request_diff_id);
@@ -29602,6 +29890,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_todos_user_project_target_and_state ON todos USING btree (user_id, project_id, target_type, target_id, id) WHERE ((state)::text = 'pending'::text);
+
CREATE INDEX index_on_users_lower_email ON users USING btree (lower((email)::text));
CREATE INDEX index_on_users_lower_username ON users USING btree (lower((username)::text));
@@ -29686,12 +29976,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);
@@ -29710,14 +30004,20 @@ CREATE INDEX index_packages_packages_on_name_trigram ON packages_packages USING
CREATE INDEX index_packages_packages_on_project_id_and_created_at ON packages_packages USING btree (project_id, created_at);
+CREATE INDEX index_packages_packages_on_project_id_and_lower_version ON packages_packages USING btree (project_id, lower((version)::text)) WHERE (package_type = 4);
+
CREATE INDEX index_packages_packages_on_project_id_and_package_type ON packages_packages USING btree (project_id, package_type);
-CREATE INDEX index_packages_packages_on_project_id_and_status 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);
CREATE INDEX index_packages_project_id_name_partial_for_nuget ON packages_packages USING btree (project_id, name) WHERE (((name)::text <> 'NuGet.Temporary.Package'::text) AND (version IS NOT NULL) AND (package_type = 4));
+CREATE INDEX index_packages_rpm_metadata_on_package_id ON packages_rpm_metadata USING btree (package_id);
+
+CREATE INDEX index_packages_rpm_repository_files_on_project_id_and_file_name ON packages_rpm_repository_files USING btree (project_id, file_name);
+
CREATE INDEX index_packages_tags_on_package_id ON packages_tags USING btree (package_id);
CREATE INDEX index_packages_tags_on_package_id_and_updated_at ON packages_tags USING btree (package_id, updated_at DESC);
@@ -29766,8 +30066,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 +30076,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 +30130,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,12 +30152,16 @@ 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);
CREATE INDEX index_project_import_data_on_project_id ON project_import_data USING btree (project_id);
+CREATE INDEX index_project_incident_management_settings_on_p_id_sla_timer ON project_incident_management_settings USING btree (project_id) WHERE (sla_timer = true);
+
+CREATE INDEX index_project_members_on_id_temp ON members USING btree (id) WHERE ((source_type)::text = 'Project'::text);
+
CREATE INDEX index_project_mirror_data_on_last_successful_update_at ON project_mirror_data USING btree (last_successful_update_at);
CREATE INDEX index_project_mirror_data_on_last_update_at_and_retry_count ON project_mirror_data USING btree (last_update_at, retry_count);
@@ -29866,6 +30174,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 +30190,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 +30216,17 @@ 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 UNIQUE INDEX index_project_wiki_repositories_on_project_id ON project_wiki_repositories USING btree (project_id);
+
+CREATE INDEX index_project_wiki_repository_states_failed_verification ON project_wiki_repository_states USING btree (verification_retry_at NULLS FIRST) WHERE (verification_state = 3);
+
+CREATE INDEX index_project_wiki_repository_states_needs_verification ON project_wiki_repository_states USING btree (verification_state) WHERE ((verification_state = 0) OR (verification_state = 3));
+
+CREATE INDEX index_project_wiki_repository_states_on_verification_state ON project_wiki_repository_states USING btree (verification_state);
+
+CREATE INDEX index_project_wiki_repository_states_pending_verification ON project_wiki_repository_states USING btree (verified_at NULLS FIRST) WHERE (verification_state = 0);
CREATE INDEX index_projects_aimed_for_deletion ON projects USING btree (marked_for_deletion_at) WHERE ((marked_for_deletion_at IS NOT NULL) AND (pending_delete = false));
@@ -29982,10 +30306,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);
@@ -30030,6 +30350,8 @@ CREATE INDEX index_protected_branch_unprotect_access_levels_on_group_id ON prote
CREATE INDEX index_protected_branch_unprotect_access_levels_on_user_id ON protected_branch_unprotect_access_levels USING btree (user_id);
+CREATE INDEX index_protected_branches_namespace_id ON protected_branches USING btree (namespace_id) WHERE (namespace_id IS NOT NULL);
+
CREATE INDEX index_protected_branches_on_project_id ON protected_branches USING btree (project_id);
CREATE INDEX index_protected_environment_approval_rules_on_group_id ON protected_environment_approval_rules USING btree (group_id);
@@ -30042,6 +30364,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);
@@ -30084,6 +30408,8 @@ CREATE INDEX index_releases_on_author_id_id_created_at ON releases USING btree (
CREATE INDEX index_releases_on_project_id_and_released_at_and_id ON releases USING btree (project_id, released_at, id);
+CREATE INDEX index_releases_on_project_id_id ON releases USING btree (project_id, id);
+
CREATE UNIQUE INDEX index_releases_on_project_tag_unique ON releases USING btree (project_id, tag);
CREATE INDEX index_releases_on_released_at ON releases USING btree (released_at);
@@ -30100,8 +30426,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 +30442,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,36 +30518,48 @@ 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_scim_identities_on_group_id ON scim_identities USING btree (group_id);
+CREATE INDEX index_sbom_component_versions_on_component_id ON sbom_component_versions USING btree (component_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);
+CREATE UNIQUE INDEX index_sbom_component_versions_on_component_id_and_version ON sbom_component_versions USING btree (component_id, version);
-CREATE UNIQUE INDEX index_scim_identities_on_user_id_and_group_id ON scim_identities USING btree (user_id, group_id);
+CREATE UNIQUE INDEX index_sbom_components_on_component_type_name_and_purl_type ON sbom_components USING btree (name, purl_type, component_type);
-CREATE UNIQUE INDEX index_scim_oauth_access_tokens_on_group_id_and_token_encrypted ON scim_oauth_access_tokens USING btree (group_id, token_encrypted);
+CREATE INDEX index_sbom_occurrences_on_component_id ON sbom_occurrences USING btree (component_id);
-CREATE INDEX index_secure_ci_builds_on_user_id_name_created_at ON ci_builds USING btree (user_id, name, created_at) 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, ('apifuzzer_fuzz'::character varying)::text, ('apifuzzer_fuzz_dnd'::character varying)::text, ('secret_detection'::character varying)::text])));
+CREATE INDEX index_sbom_occurrences_on_component_version_id ON sbom_occurrences USING btree (component_version_id);
-CREATE INDEX index_security_ci_builds_on_name_and_id_parser_features ON ci_builds USING btree (name, id) WHERE (((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, ('dast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('license_management'::character varying)::text, ('sast'::character varying)::text, ('secret_detection'::character varying)::text, ('coverage_fuzzing'::character varying)::text, ('license_scanning'::character varying)::text, ('apifuzzer_fuzz'::character varying)::text, ('apifuzzer_fuzz_dnd'::character varying)::text])) AND ((type)::text = 'Ci::Build'::text));
+CREATE UNIQUE INDEX index_sbom_occurrences_on_ingestion_attributes ON sbom_occurrences USING btree (project_id, component_id, component_version_id, source_id, commit_sha);
-CREATE INDEX index_security_findings_on_confidence ON security_findings USING btree (confidence);
+CREATE INDEX index_sbom_occurrences_on_pipeline_id ON sbom_occurrences USING btree (pipeline_id);
-CREATE INDEX index_security_findings_on_project_fingerprint ON security_findings USING btree (project_fingerprint);
+CREATE INDEX index_sbom_occurrences_on_project_id ON sbom_occurrences USING btree (project_id);
-CREATE INDEX index_security_findings_on_scan_id_and_deduplicated ON security_findings USING btree (scan_id, deduplicated);
+CREATE INDEX index_sbom_occurrences_on_source_id ON sbom_occurrences USING btree (source_id);
-CREATE INDEX index_security_findings_on_scan_id_and_id ON security_findings USING btree (scan_id, id);
+CREATE UNIQUE INDEX index_sbom_sources_on_source_type_and_source ON sbom_sources USING btree (source_type, source);
-CREATE INDEX index_security_findings_on_scanner_id ON security_findings USING btree (scanner_id);
+CREATE INDEX index_scim_identities_on_group_id ON scim_identities USING btree (group_id);
-CREATE INDEX index_security_findings_on_severity ON security_findings USING btree (severity);
+CREATE UNIQUE INDEX index_scim_identities_on_lower_extern_uid_and_group_id ON scim_identities USING btree (lower((extern_uid)::text), group_id);
-CREATE UNIQUE INDEX index_security_findings_on_uuid_and_scan_id ON security_findings USING btree (uuid, scan_id);
+CREATE UNIQUE INDEX index_scim_identities_on_user_id_and_group_id ON scim_identities USING btree (user_id, group_id);
+
+CREATE UNIQUE INDEX index_scim_oauth_access_tokens_on_group_id_and_token_encrypted ON scim_oauth_access_tokens USING btree (group_id, token_encrypted);
+
+CREATE INDEX index_secure_ci_builds_on_user_id_name_created_at ON ci_builds USING btree (user_id, name, created_at) 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, ('apifuzzer_fuzz'::character varying)::text, ('apifuzzer_fuzz_dnd'::character varying)::text, ('secret_detection'::character varying)::text])));
+
+CREATE INDEX index_security_ci_builds_on_name_and_id_parser_features ON ci_builds USING btree (name, id) WHERE (((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, ('dast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('license_management'::character varying)::text, ('sast'::character varying)::text, ('secret_detection'::character varying)::text, ('coverage_fuzzing'::character varying)::text, ('license_scanning'::character varying)::text, ('apifuzzer_fuzz'::character varying)::text, ('apifuzzer_fuzz_dnd'::character varying)::text])) AND ((type)::text = 'Ci::Build'::text));
CREATE INDEX index_security_scans_on_created_at ON security_scans USING btree (created_at);
CREATE INDEX index_security_scans_on_date_created_at_and_id ON security_scans USING btree (date(timezone('UTC'::text, created_at)), id);
+CREATE INDEX index_security_scans_on_id_for_non_purged_records ON security_scans USING btree (id) WHERE (status <> 6);
+
+CREATE INDEX index_security_scans_on_length_of_errors ON security_scans USING btree (pipeline_id, jsonb_array_length(COALESCE((info -> 'errors'::text), '[]'::jsonb)));
+
+CREATE INDEX index_security_scans_on_length_of_warnings ON security_scans USING btree (pipeline_id, jsonb_array_length(COALESCE((info -> 'warnings'::text), '[]'::jsonb)));
+
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 +30594,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);
@@ -30328,12 +30668,16 @@ CREATE INDEX index_sprints_on_due_date ON sprints USING btree (due_date);
CREATE INDEX index_sprints_on_group_id ON sprints USING btree (group_id);
-CREATE UNIQUE INDEX index_sprints_on_project_id_and_iid ON sprints USING btree (project_id, iid);
-
CREATE INDEX index_sprints_on_title ON sprints USING btree (title);
CREATE INDEX index_sprints_on_title_trigram ON sprints USING gin (title gin_trgm_ops);
+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 +30734,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 +30760,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);
@@ -30444,8 +30786,16 @@ CREATE INDEX index_u2f_registrations_on_key_handle ON u2f_registrations USING bt
CREATE INDEX index_u2f_registrations_on_user_id ON u2f_registrations USING btree (user_id);
+CREATE UNIQUE INDEX index_uniq_ci_runners_on_token ON ci_runners USING btree (token);
+
+CREATE UNIQUE INDEX index_uniq_ci_runners_on_token_encrypted ON ci_runners USING btree (token_encrypted);
+
CREATE UNIQUE INDEX index_uniq_im_issuable_escalation_statuses_on_issue_id ON incident_management_issuable_escalation_statuses USING btree (issue_id);
+CREATE UNIQUE INDEX index_uniq_projects_on_runners_token ON projects USING btree (runners_token);
+
+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 +30806,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);
@@ -30488,7 +30840,7 @@ CREATE UNIQUE INDEX index_user_canonical_emails_on_user_id ON user_canonical_ema
CREATE UNIQUE INDEX index_user_canonical_emails_on_user_id_and_canonical_email ON user_canonical_emails USING btree (user_id, canonical_email);
-CREATE INDEX index_user_credit_card_validations_meta_data_full_match ON user_credit_card_validations USING btree (holder_name, expiration_date, last_digits, credit_card_validated_at);
+CREATE INDEX index_user_credit_card_validations_meta_data_full_match_lower ON user_credit_card_validations USING btree (lower(holder_name), expiration_date, last_digits, credit_card_validated_at);
CREATE INDEX index_user_credit_card_validations_meta_data_partial_match ON user_credit_card_validations USING btree (expiration_date, last_digits, network, credit_card_validated_at);
@@ -30496,6 +30848,10 @@ CREATE INDEX index_user_custom_attributes_on_key_and_value ON user_custom_attrib
CREATE UNIQUE INDEX index_user_custom_attributes_on_user_id_and_key ON user_custom_attributes USING btree (user_id, key);
+CREATE INDEX index_user_details_on_password_last_changed_at ON user_details USING btree (password_last_changed_at);
+
+COMMENT ON INDEX index_user_details_on_password_last_changed_at IS 'JiHu-specific index';
+
CREATE UNIQUE INDEX index_user_details_on_phone ON user_details USING btree (phone) WHERE (phone IS NOT NULL);
COMMENT ON INDEX index_user_details_on_phone IS 'JiHu-specific index';
@@ -30508,12 +30864,18 @@ 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_phone_validations_on_dial_code_phone_number ON user_phone_number_validations USING btree (international_dial_code, phone_number);
+
CREATE INDEX index_user_preferences_on_gitpod_enabled ON user_preferences USING btree (gitpod_enabled);
CREATE UNIQUE INDEX index_user_preferences_on_user_id ON user_preferences USING btree (user_id);
+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);
@@ -30562,7 +30924,7 @@ CREATE INDEX index_users_on_unconfirmed_email ON users USING btree (unconfirmed_
CREATE UNIQUE INDEX index_users_on_unlock_token ON users USING btree (unlock_token);
-CREATE INDEX index_users_on_user_type ON users USING btree (user_type);
+CREATE INDEX index_users_on_user_type_and_id ON users USING btree (user_type, id);
CREATE INDEX index_users_on_username ON users USING btree (username);
@@ -30582,11 +30944,21 @@ 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_vuln_reads_on_resolved_on_default_branch ON vulnerability_reads USING btree (project_id, state, id) WHERE (resolved_on_default_branch IS TRUE);
+
+CREATE INDEX index_vulnerabilities_common_finder_query_on_default_branch ON vulnerabilities USING btree (project_id, state, report_type, present_on_default_branch, severity, id);
CREATE INDEX index_vulnerabilities_on_author_id ON vulnerabilities USING btree (author_id);
@@ -30602,10 +30974,6 @@ CREATE INDEX index_vulnerabilities_on_last_edited_by_id ON vulnerabilities USING
CREATE INDEX index_vulnerabilities_on_milestone_id ON vulnerabilities USING btree (milestone_id);
-CREATE INDEX index_vulnerabilities_on_project_id_and_id 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);
CREATE INDEX index_vulnerabilities_on_resolved_by_id ON vulnerabilities USING btree (resolved_by_id);
@@ -30618,6 +30986,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,10 +31002,16 @@ 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);
+CREATE INDEX index_vulnerability_feedback_on_common_attributes ON vulnerability_feedback USING btree (project_id, category, feedback_type, project_fingerprint);
+
+CREATE INDEX index_vulnerability_feedback_on_feedback_type_and_finding_uuid ON vulnerability_feedback USING btree (feedback_type, finding_uuid);
+
CREATE INDEX index_vulnerability_feedback_on_issue_id ON vulnerability_feedback USING btree (issue_id);
CREATE INDEX index_vulnerability_feedback_on_issue_id_not_null ON vulnerability_feedback USING btree (id) WHERE (issue_id IS NOT NULL);
@@ -30658,6 +31036,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 +31056,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 +31068,16 @@ 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_namespace_type_severity_id ON vulnerability_reads USING btree (namespace_id, report_type, severity, vulnerability_id);
+
CREATE INDEX index_vulnerability_reads_on_scanner_id ON vulnerability_reads USING btree (scanner_id);
CREATE UNIQUE INDEX index_vulnerability_reads_on_uuid ON vulnerability_reads USING btree (uuid);
@@ -30704,6 +31088,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);
@@ -30712,18 +31100,26 @@ CREATE UNIQUE INDEX index_vulnerability_statistics_on_unique_project_id ON vulne
CREATE UNIQUE INDEX index_vulnerability_user_mentions_on_note_id ON vulnerability_user_mentions USING btree (note_id) WHERE (note_id IS NOT NULL);
+CREATE INDEX index_vulnerable_component_versions_on_sbom_component_version ON sbom_vulnerable_component_versions USING btree (sbom_component_version_id);
+
+CREATE INDEX index_vulnerable_component_versions_on_vulnerability_advisory ON sbom_vulnerable_component_versions USING btree (vulnerability_advisory_id);
+
CREATE UNIQUE INDEX index_vulns_user_mentions_on_vulnerability_id ON vulnerability_user_mentions USING btree (vulnerability_id) WHERE (note_id IS NULL);
CREATE UNIQUE INDEX index_vulns_user_mentions_on_vulnerability_id_and_note_id ON vulnerability_user_mentions USING btree (vulnerability_id, note_id);
+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_integration_id ON web_hooks USING btree (integration_id);
+
CREATE INDEX index_web_hooks_on_project_id ON web_hooks USING btree (project_id);
CREATE INDEX index_web_hooks_on_project_id_recent_failures ON web_hooks USING btree (project_id, recent_failures);
-CREATE INDEX index_web_hooks_on_service_id ON web_hooks USING btree (service_id);
-
CREATE INDEX index_web_hooks_on_type ON web_hooks USING btree (type);
CREATE UNIQUE INDEX index_webauthn_registrations_on_credential_xid ON webauthn_registrations USING btree (credential_xid);
@@ -30738,6 +31134,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 +31200,36 @@ 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 INDEX scan_finding_approval_mr_rule_index_id ON approval_merge_request_rules USING btree (id) WHERE (report_type = 4);
+
+CREATE INDEX scan_finding_approval_mr_rule_index_merge_request_id ON approval_merge_request_rules USING btree (merge_request_id) WHERE (report_type = 4);
+
+CREATE INDEX scan_finding_approval_project_rule_index_created_at_project_id ON approval_project_rules USING btree (created_at, project_id) WHERE (report_type = 4);
+
+CREATE INDEX scan_finding_approval_project_rule_index_project_id ON approval_project_rules USING btree (project_id) WHERE (report_type = 4);
+
+CREATE INDEX security_findings_confidence_idx ON ONLY security_findings USING btree (confidence);
+
+CREATE INDEX security_findings_project_fingerprint_idx ON ONLY security_findings USING btree (project_fingerprint);
+
+CREATE INDEX security_findings_scan_id_deduplicated_idx ON ONLY security_findings USING btree (scan_id, deduplicated);
+
+CREATE INDEX security_findings_scan_id_id_idx ON ONLY security_findings USING btree (scan_id, id);
+
+CREATE INDEX security_findings_scanner_id_idx ON ONLY security_findings USING btree (scanner_id);
+
+CREATE INDEX security_findings_severity_idx ON ONLY security_findings USING btree (severity);
+
+CREATE UNIQUE INDEX security_findings_uuid_scan_id_partition_number_idx ON ONLY security_findings USING btree (uuid, scan_id, partition_number);
+
CREATE UNIQUE INDEX snippet_user_mentions_on_snippet_id_and_note_id_index ON snippet_user_mentions USING btree (snippet_id, note_id);
CREATE UNIQUE INDEX snippet_user_mentions_on_snippet_id_index ON snippet_user_mentions USING btree (snippet_id) WHERE (note_id IS NULL);
@@ -30812,21 +31238,23 @@ CREATE UNIQUE INDEX taggings_idx ON taggings USING btree (tag_id, taggable_id, t
CREATE UNIQUE INDEX term_agreements_unique_index ON term_agreements USING btree (user_id, term_id);
-CREATE INDEX tmp_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_idx_for_vulnerability_feedback_migration ON vulnerability_feedback USING btree (migrated_to_state_transition, feedback_type) WHERE ((migrated_to_state_transition = false) AND (feedback_type = 0));
-CREATE INDEX tmp_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_vulnerabilities_on_id_where_report_type_7_99 ON vulnerabilities USING btree (id) WHERE (report_type = ANY (ARRAY[7, 99]));
-CREATE INDEX tmp_idx_container_repos_on_non_migrated ON container_repositories USING btree (project_id, id) WHERE ((migration_state <> 'import_done'::text) AND (created_at < '2022-01-23 00:00:00'::timestamp without time zone));
+CREATE INDEX tmp_idx_where_user_details_fields_filled ON users USING btree (id) WHERE (((COALESCE(linkedin, ''::character varying))::text IS DISTINCT FROM ''::text) OR ((COALESCE(twitter, ''::character varying))::text IS DISTINCT FROM ''::text) OR ((COALESCE(skype, ''::character varying))::text IS DISTINCT FROM ''::text) OR ((COALESCE(website_url, ''::character varying))::text IS DISTINCT FROM ''::text) OR ((COALESCE(location, ''::character varying))::text IS DISTINCT FROM ''::text) OR ((COALESCE(organization, ''::character varying))::text IS DISTINCT FROM ''::text));
-CREATE INDEX tmp_index_ci_job_artifacts_on_id_where_trace_and_expire_at ON ci_job_artifacts USING btree (id) WHERE ((file_type = 3) AND (expire_at = ANY (ARRAY['2021-04-22 00:00:00+00'::timestamp with time zone, '2021-05-22 00:00:00+00'::timestamp with time zone, '2021-06-22 00:00:00+00'::timestamp with time zone, '2022-01-22 00:00:00+00'::timestamp with time zone, '2022-02-22 00:00:00+00'::timestamp with time zone, '2022-03-22 00:00:00+00'::timestamp with time zone, '2022-04-22 00:00:00+00'::timestamp with time zone])));
+CREATE INDEX tmp_index_ci_job_artifacts_on_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_container_repositories_on_id_migration_state ON container_repositories USING btree (id, migration_state);
+CREATE INDEX tmp_index_ci_job_artifacts_on_id_expire_at_file_type_trace ON ci_job_artifacts USING btree (id) WHERE (((date_part('day'::text, timezone('UTC'::text, expire_at)) = ANY (ARRAY[(21)::double precision, (22)::double precision, (23)::double precision])) AND (date_part('minute'::text, timezone('UTC'::text, expire_at)) = ANY (ARRAY[(0)::double precision, (30)::double precision, (45)::double precision])) AND (date_part('second'::text, timezone('UTC'::text, expire_at)) = (0)::double precision)) OR (file_type = 3));
-CREATE INDEX tmp_index_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_cis_vulnerability_reads_on_id ON vulnerability_reads USING btree (id) WHERE (report_type = 7);
-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_container_repos_on_non_migrated ON container_repositories USING btree (project_id, id) WHERE (migration_state <> 'import_done'::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_container_repositories_on_id_migration_state ON container_repositories USING btree (id, migration_state);
+
+CREATE INDEX tmp_index_for_null_member_namespace_id ON members USING btree (member_namespace_id) WHERE (member_namespace_id IS NULL);
CREATE INDEX tmp_index_for_project_namespace_id_migration_on_routes ON routes USING btree (id) WHERE ((namespace_id IS NULL) AND ((source_type)::text = 'Project'::text));
@@ -30834,19 +31262,17 @@ 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_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_project_statistics_uploads_size ON project_statistics USING btree (project_id) WHERE (uploads_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_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,280 +31294,18 @@ CREATE UNIQUE INDEX unique_merge_request_metrics_by_merge_request_id ON merge_re
CREATE UNIQUE INDEX unique_projects_on_name_namespace_id ON projects USING btree (name, namespace_id);
+CREATE UNIQUE INDEX unique_streaming_event_type_filters_destination_id ON audit_events_streaming_event_type_filters USING btree (external_audit_event_destination_id, audit_event_type);
+
+CREATE UNIQUE INDEX unique_vuln_merge_request_link_vuln_id_and_mr_id ON vulnerability_merge_request_links USING btree (vulnerability_id, merge_request_id);
+
CREATE INDEX user_follow_users_followee_id_idx ON user_follow_users USING btree (followee_id);
CREATE INDEX users_forbidden_state_idx ON users USING btree (id) WHERE ((confirmed_at IS NOT NULL) AND ((state)::text <> ALL (ARRAY['blocked'::text, 'banned'::text, 'ldap_blocked'::text])));
-CREATE UNIQUE INDEX vulnerability_feedback_unique_idx ON vulnerability_feedback USING btree (project_id, category, feedback_type, project_fingerprint);
-
CREATE UNIQUE INDEX vulnerability_occurrence_pipelines_on_unique_keys ON vulnerability_occurrence_pipelines USING btree (occurrence_id, pipeline_id);
CREATE UNIQUE INDEX work_item_types_namespace_id_and_name_unique ON work_item_types USING btree (namespace_id, btrim(lower(name)));
-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;
@@ -32422,6 +32586,18 @@ ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_p
ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_63_pkey;
+ALTER INDEX p_ci_builds_metadata_pkey ATTACH PARTITION ci_builds_metadata_pkey;
+
+ALTER INDEX p_ci_builds_metadata_build_id_idx ATTACH PARTITION index_ci_builds_metadata_on_build_id_and_has_exposed_artifacts;
+
+ALTER INDEX p_ci_builds_metadata_build_id_id_idx ATTACH PARTITION index_ci_builds_metadata_on_build_id_and_id_and_interruptible;
+
+ALTER INDEX p_ci_builds_metadata_build_id_partition_id_idx ATTACH PARTITION index_ci_builds_metadata_on_build_id_partition_id_unique;
+
+ALTER INDEX p_ci_builds_metadata_id_partition_id_idx ATTACH PARTITION index_ci_builds_metadata_on_id_partition_id_unique;
+
+ALTER INDEX p_ci_builds_metadata_project_id_idx ATTACH PARTITION index_ci_builds_metadata_on_project_id;
+
CREATE TRIGGER chat_names_loose_fk_trigger AFTER DELETE ON chat_names REFERENCING OLD TABLE AS old_table FOR EACH STATEMENT EXECUTE FUNCTION insert_into_loose_foreign_keys_deleted_records();
CREATE TRIGGER ci_builds_loose_fk_trigger AFTER DELETE ON ci_builds REFERENCING OLD TABLE AS old_table FOR EACH STATEMENT EXECUTE FUNCTION insert_into_loose_foreign_keys_deleted_records();
@@ -32430,12 +32606,22 @@ 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 sync_namespaces_amount_used_columns BEFORE INSERT OR UPDATE ON ci_namespace_monthly_usages FOR EACH ROW EXECUTE FUNCTION sync_namespaces_amount_used_columns();
+
+CREATE TRIGGER sync_projects_amount_used_columns BEFORE INSERT OR UPDATE ON ci_project_monthly_usages FOR EACH ROW EXECUTE FUNCTION sync_projects_amount_used_columns();
+
+CREATE TRIGGER trigger_1a857e8db6cd BEFORE INSERT OR UPDATE ON vulnerability_occurrences FOR EACH ROW EXECUTE FUNCTION trigger_1a857e8db6cd();
+
CREATE TRIGGER trigger_delete_project_namespace_on_project_delete AFTER DELETE ON projects FOR EACH ROW WHEN ((old.project_namespace_id IS NOT NULL)) EXECUTE FUNCTION delete_associated_project_namespace();
CREATE TRIGGER trigger_has_external_issue_tracker_on_delete AFTER DELETE ON integrations FOR EACH ROW WHEN ((((old.category)::text = 'issue_tracker'::text) AND (old.active = true) AND (old.project_id IS NOT NULL))) EXECUTE FUNCTION set_has_external_issue_tracker();
@@ -32454,15 +32640,21 @@ 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_namespaces_parent_id_on_insert AFTER INSERT ON namespaces FOR EACH ROW EXECUTE FUNCTION insert_namespaces_sync_event();
+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_update AFTER UPDATE ON namespaces FOR EACH ROW WHEN ((old.parent_id IS DISTINCT FROM new.parent_id)) EXECUTE FUNCTION insert_namespaces_sync_event();
+CREATE TRIGGER trigger_namespaces_traversal_ids_on_update AFTER UPDATE ON namespaces FOR EACH ROW WHEN ((old.traversal_ids IS DISTINCT FROM new.traversal_ids)) EXECUTE FUNCTION insert_namespaces_sync_event();
CREATE TRIGGER trigger_projects_parent_id_on_insert AFTER INSERT ON projects FOR EACH ROW EXECUTE FUNCTION insert_projects_sync_event();
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,19 +32662,19 @@ 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;
+ ADD CONSTRAINT fk_009fd21147 FOREIGN KEY (environment_id) REFERENCES environments(id) ON DELETE CASCADE;
ALTER TABLE ONLY epics
ADD CONSTRAINT fk_013c9f36ca FOREIGN KEY (due_date_sourcing_epic_id) REFERENCES epics(id) ON DELETE SET NULL;
+ALTER TABLE ONLY environments
+ ADD CONSTRAINT fk_01a033a308 FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE SET NULL;
+
ALTER TABLE ONLY incident_management_escalation_rules
ADD CONSTRAINT fk_0314ee86eb FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
@@ -32498,8 +32690,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 +32732,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,12 +32765,21 @@ 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;
+ALTER TABLE ONLY ghost_user_migrations
+ ADD CONSTRAINT fk_202e642a2f FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY coverage_fuzzing_corpuses
ADD CONSTRAINT fk_204d40056a FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ALTER TABLE ONLY namespace_settings
+ ADD CONSTRAINT fk_20cf0eb2f9 FOREIGN KEY (default_compliance_framework_id) REFERENCES compliance_management_frameworks(id) ON DELETE SET NULL;
+
ALTER TABLE ONLY geo_container_repository_updated_events
ADD CONSTRAINT fk_212c89c706 FOREIGN KEY (container_repository_id) REFERENCES container_repositories(id) ON DELETE CASCADE;
@@ -32603,14 +32804,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 +32837,12 @@ 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 members
+ ADD CONSTRAINT fk_2f85abf8f1 FOREIGN KEY (member_namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY analytics_cycle_analytics_group_stages
ADD CONSTRAINT fk_3078345d6d FOREIGN KEY (stage_event_hash_id) REFERENCES analytics_cycle_analytics_stage_event_hashes(id) ON DELETE CASCADE;
@@ -32645,6 +32855,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;
@@ -32684,18 +32900,21 @@ ALTER TABLE ONLY epics
ALTER TABLE ONLY ci_pipelines
ADD CONSTRAINT fk_3d34ab2e06 FOREIGN KEY (pipeline_schedule_id) REFERENCES ci_pipeline_schedules(id) ON DELETE SET NULL;
-ALTER TABLE ONLY merge_request_reviewers
- ADD CONSTRAINT fk_3d674b9f23 FOREIGN KEY (updated_state_by_user_id) REFERENCES users(id) ON DELETE SET NULL;
-
ALTER TABLE ONLY protected_environment_approval_rules
ADD CONSTRAINT fk_405568b491 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
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 +32927,18 @@ 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 namespace_commit_emails
+ ADD CONSTRAINT fk_4d6ba63ba5 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+
+ALTER TABLE ONLY vulnerability_reads
+ ADD CONSTRAINT fk_4f593f6c62 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY vulnerability_reads
ADD CONSTRAINT fk_5001652292 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -32717,6 +32948,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 +32963,12 @@ 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 approval_merge_request_rules
+ ADD CONSTRAINT fk_5822f009ea FOREIGN KEY (security_orchestration_policy_configuration_id) REFERENCES security_orchestration_policy_configurations(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY deploy_keys_projects
ADD CONSTRAINT fk_58a901ca7e FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -32738,6 +32978,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 +32990,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,12 +33008,12 @@ ALTER TABLE ONLY merge_requests
ALTER TABLE ONLY ci_builds
ADD CONSTRAINT fk_6661f4f0e8 FOREIGN KEY (resource_group_id) REFERENCES ci_resource_groups(id) ON DELETE SET NULL;
-ALTER TABLE ONLY 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;
+ALTER TABLE ONLY project_wiki_repository_states
+ ADD CONSTRAINT fk_6951681c70 FOREIGN KEY (project_wiki_repository_id) REFERENCES project_wiki_repositories(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY merge_requests
ADD CONSTRAINT fk_6a5165a692 FOREIGN KEY (milestone_id) REFERENCES milestones(id) ON DELETE SET NULL;
@@ -32789,6 +33029,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 +33053,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;
@@ -32843,9 +33092,15 @@ ALTER TABLE ONLY vulnerabilities
ALTER TABLE ONLY issue_customer_relations_contacts
ADD CONSTRAINT fk_7b92f835bb FOREIGN KEY (contact_id) REFERENCES customer_relations_contacts(id) ON DELETE CASCADE;
+ALTER TABLE ONLY broadcast_messages
+ ADD CONSTRAINT fk_7bf2ec43da FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY vulnerabilities
ADD CONSTRAINT fk_7c5bb22a22 FOREIGN KEY (due_date_sourcing_milestone_id) REFERENCES milestones(id) ON DELETE SET NULL;
+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;
@@ -32897,6 +33152,9 @@ ALTER TABLE ONLY requirements_management_test_reports
ALTER TABLE ONLY issues
ADD CONSTRAINT fk_899c8f3231 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ALTER TABLE ONLY sbom_vulnerable_component_versions
+ ADD CONSTRAINT fk_8a2a1197f9 FOREIGN KEY (sbom_component_version_id) REFERENCES sbom_component_versions(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY protected_branch_merge_access_levels
ADD CONSTRAINT fk_8a3072ccb3 FOREIGN KEY (protected_branch_id) REFERENCES protected_branches(id) ON DELETE CASCADE;
@@ -32939,6 +33197,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 +33236,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;
@@ -33002,9 +33257,6 @@ ALTER TABLE ONLY epics
ALTER TABLE ONLY dast_profiles
ADD CONSTRAINT fk_aa76ef30e9 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-ALTER TABLE ONLY members
- ADD CONSTRAINT fk_aa82dcc1c6 FOREIGN KEY (member_namespace_id) REFERENCES namespaces(id) ON DELETE SET NULL;
-
ALTER TABLE ONLY alert_management_alerts
ADD CONSTRAINT fk_aad61aedca FOREIGN KEY (environment_id) REFERENCES environments(id) ON DELETE SET NULL;
@@ -33020,15 +33272,18 @@ 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;
-ALTER TABLE ONLY merge_request_assignees
- ADD CONSTRAINT fk_af036e3261 FOREIGN KEY (updated_state_by_user_id) REFERENCES users(id) ON DELETE SET NULL;
-
ALTER TABLE ONLY analytics_cycle_analytics_group_stages
ADD CONSTRAINT fk_analytics_cycle_analytics_group_stages_group_value_stream_id FOREIGN KEY (group_value_stream_id) REFERENCES analytics_cycle_analytics_group_value_streams(id) ON DELETE CASCADE;
@@ -33065,6 +33320,9 @@ ALTER TABLE ONLY issue_assignees
ALTER TABLE ONLY agent_project_authorizations
ADD CONSTRAINT fk_b7fe9b4777 FOREIGN KEY (agent_id) REFERENCES cluster_agents(id) ON DELETE CASCADE;
+ALTER TABLE ONLY namespace_commit_emails
+ ADD CONSTRAINT fk_b8d89d555e FOREIGN KEY (email_id) REFERENCES emails(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY ci_trigger_requests
ADD CONSTRAINT fk_b8ec8b7245 FOREIGN KEY (trigger_id) REFERENCES ci_triggers(id) ON DELETE CASCADE;
@@ -33074,6 +33332,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 +33362,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 +33392,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,21 +33428,18 @@ 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;
ALTER TABLE ONLY ci_builds
ADD CONSTRAINT fk_d3130c9a7f FOREIGN KEY (commit_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE;
-ALTER TABLE ONLY web_hooks
- ADD CONSTRAINT fk_d47999a98a FOREIGN KEY (service_id) REFERENCES integrations(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY ci_sources_pipelines
ADD CONSTRAINT fk_d4e29af7d7 FOREIGN KEY (source_pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE;
-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;
@@ -33179,6 +33449,9 @@ ALTER TABLE ONLY lists
ALTER TABLE ONLY agent_activity_events
ADD CONSTRAINT fk_d6f785c9fc FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE SET NULL;
+ALTER TABLE ONLY sbom_vulnerable_component_versions
+ ADD CONSTRAINT fk_d720a1959a FOREIGN KEY (vulnerability_advisory_id) REFERENCES vulnerability_advisories(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY metrics_users_starred_dashboards
ADD CONSTRAINT fk_d76a2b9a8c FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -33188,17 +33461,23 @@ 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 web_hooks
+ ADD CONSTRAINT fk_db1ea5699b FOREIGN KEY (integration_id) REFERENCES integrations(id) ON DELETE CASCADE;
ALTER TABLE ONLY security_scans
ADD CONSTRAINT fk_dbc89265b9 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -33206,6 +33485,9 @@ ALTER TABLE ONLY security_scans
ALTER TABLE ONLY epics
ADD CONSTRAINT fk_dccd3f98fc FOREIGN KEY (assignee_id) REFERENCES users(id) ON DELETE SET NULL;
+ALTER TABLE ONLY protected_branches
+ ADD CONSTRAINT fk_de9216e774 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY issues
ADD CONSTRAINT fk_df75a7c8b8 FOREIGN KEY (promoted_to_epic_id) REFERENCES epics(id) ON DELETE SET NULL;
@@ -33218,7 +33500,7 @@ ALTER TABLE ONLY ci_resources
ALTER TABLE ONLY ci_sources_pipelines
ADD CONSTRAINT fk_e1bad85861 FOREIGN KEY (pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE;
-ALTER TABLE ONLY ci_builds_metadata
+ALTER TABLE p_ci_builds_metadata
ADD CONSTRAINT fk_e20479742e FOREIGN KEY (build_id) REFERENCES ci_builds(id) ON DELETE CASCADE;
ALTER TABLE ONLY gitlab_subscriptions
@@ -33227,6 +33509,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;
@@ -33239,9 +33524,6 @@ ALTER TABLE ONLY namespaces
ALTER TABLE ONLY fork_networks
ADD CONSTRAINT fk_e7b436b2b5 FOREIGN KEY (root_project_id) REFERENCES projects(id) ON DELETE SET NULL;
-ALTER TABLE ONLY sprints
- ADD CONSTRAINT fk_e8206c9686 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY application_settings
ADD CONSTRAINT fk_e8a145f3a7 FOREIGN KEY (instance_administrators_group_id) REFERENCES namespaces(id) ON DELETE SET NULL;
@@ -33263,6 +33545,9 @@ ALTER TABLE ONLY events
ALTER TABLE ONLY coverage_fuzzing_corpuses
ADD CONSTRAINT fk_ef5ebf339f FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE CASCADE;
+ALTER TABLE ONLY approval_project_rules
+ ADD CONSTRAINT fk_efa5a1e3fb FOREIGN KEY (security_orchestration_policy_configuration_id) REFERENCES security_orchestration_policy_configurations(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY vulnerabilities
ADD CONSTRAINT fk_efb96ab1e2 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -33281,8 +33566,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 +33584,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 +33641,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 +33656,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 +33713,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 +33791,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 +33809,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 +33821,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 +33851,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 +33905,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 +33995,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 +34028,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 +34058,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;
@@ -33818,6 +34112,9 @@ ALTER TABLE ONLY project_metrics_settings
ALTER TABLE ONLY prometheus_metrics
ADD CONSTRAINT fk_rails_4c8957a707 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ALTER TABLE ONLY dependency_proxy_blob_states
+ ADD CONSTRAINT fk_rails_4cdbb92cbd FOREIGN KEY (dependency_proxy_blob_id) REFERENCES dependency_proxy_blobs(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY scim_identities
ADD CONSTRAINT fk_rails_4d2056ebd9 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
@@ -33827,9 +34124,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;
@@ -33848,6 +34142,9 @@ ALTER TABLE ONLY resource_iteration_events
ALTER TABLE ONLY status_page_settings
ADD CONSTRAINT fk_rails_506e5ba391 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ALTER TABLE ONLY ci_pipeline_metadata
+ ADD CONSTRAINT fk_rails_50c1e9ea10 FOREIGN KEY (pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY project_repository_storage_moves
ADD CONSTRAINT fk_rails_5106dbd44a FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -33866,24 +34163,21 @@ 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;
ALTER TABLE ONLY group_deploy_keys
ADD CONSTRAINT fk_rails_5682fc07f8 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE RESTRICT;
-ALTER TABLE ONLY experiment_users
- ADD CONSTRAINT fk_rails_56d4708b4a FOREIGN KEY (experiment_id) REFERENCES experiments(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY issue_user_mentions
ADD CONSTRAINT fk_rails_57581fda73 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE;
ALTER TABLE ONLY merge_request_assignees
ADD CONSTRAINT fk_rails_579d375628 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
+ALTER TABLE ONLY incident_management_timeline_event_tag_links
+ ADD CONSTRAINT fk_rails_57baccd7f9 FOREIGN KEY (timeline_event_id) REFERENCES incident_management_timeline_events(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY packages_debian_project_architectures
ADD CONSTRAINT fk_rails_5808663adf FOREIGN KEY (distribution_id) REFERENCES packages_debian_project_distributions(id) ON DELETE CASCADE;
@@ -33899,6 +34193,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 +34235,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 +34295,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,13 +34352,10 @@ 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;
-ALTER TABLE ONLY security_findings
+ALTER TABLE security_findings
ADD CONSTRAINT fk_rails_729b763a54 FOREIGN KEY (scanner_id) REFERENCES vulnerability_scanners(id) ON DELETE CASCADE;
ALTER TABLE ONLY dast_scanner_profiles
@@ -34055,9 +34364,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;
@@ -34076,6 +34382,9 @@ ALTER TABLE ONLY group_crm_settings
ALTER TABLE ONLY clusters_applications_ingress
ADD CONSTRAINT fk_rails_753a7b41c1 FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE;
+ALTER TABLE ONLY incident_management_timeline_event_tag_links
+ ADD CONSTRAINT fk_rails_753b8b6ee3 FOREIGN KEY (timeline_event_tag_id) REFERENCES incident_management_timeline_event_tags(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY release_links
ADD CONSTRAINT fk_rails_753be7ae29 FOREIGN KEY (release_id) REFERENCES releases(id) ON DELETE CASCADE;
@@ -34139,6 +34448,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;
@@ -34262,6 +34574,9 @@ ALTER TABLE ONLY packages_debian_project_distributions
ALTER TABLE ONLY packages_rubygems_metadata
ADD CONSTRAINT fk_rails_95a3f5ce78 FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE CASCADE;
+ALTER TABLE ONLY project_wiki_repository_states
+ ADD CONSTRAINT fk_rails_9647227ce1 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY packages_pypi_metadata
ADD CONSTRAINT fk_rails_9698717cdd FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE CASCADE;
@@ -34319,12 +34634,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 +34655,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;
@@ -34403,6 +34727,9 @@ ALTER TABLE ONLY clusters
ALTER TABLE ONLY packages_composer_metadata
ADD CONSTRAINT fk_rails_ad48c2e5bb FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE CASCADE;
+ALTER TABLE ONLY user_phone_number_validations
+ ADD CONSTRAINT fk_rails_ad6686f3d8 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY analytics_cycle_analytics_group_stages
ADD CONSTRAINT fk_rails_ae5da3409b FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
@@ -34445,6 +34772,9 @@ ALTER TABLE ONLY issues_prometheus_alert_events
ALTER TABLE ONLY merge_trains
ADD CONSTRAINT fk_rails_b374b5225d FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE;
+ALTER TABLE ONLY merge_request_predictions
+ ADD CONSTRAINT fk_rails_b3b78cbcd0 FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY incident_management_escalation_rules
ADD CONSTRAINT fk_rails_b3c9c17bd4 FOREIGN KEY (oncall_schedule_id) REFERENCES incident_management_oncall_schedules(id) ON DELETE CASCADE;
@@ -34466,6 +34796,9 @@ ALTER TABLE ONLY approval_project_rules_protected_branches
ALTER TABLE ONLY packages_composer_cache_files
ADD CONSTRAINT fk_rails_b82cea43a0 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE SET NULL;
+ALTER TABLE ONLY dora_configurations
+ ADD CONSTRAINT fk_rails_b9b8d90ddb FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY merge_trains
ADD CONSTRAINT fk_rails_b9d67af01d FOREIGN KEY (target_project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -34475,10 +34808,7 @@ ALTER TABLE ONLY approval_project_rules_users
ALTER TABLE ONLY lists
ADD CONSTRAINT fk_rails_baed5f39b7 FOREIGN KEY (milestone_id) REFERENCES milestones(id) ON DELETE CASCADE;
-ALTER TABLE 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
+ALTER TABLE security_findings
ADD CONSTRAINT fk_rails_bb63863cf1 FOREIGN KEY (scan_id) REFERENCES security_scans(id) ON DELETE CASCADE;
ALTER TABLE ONLY packages_debian_project_component_files
@@ -34502,6 +34832,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;
@@ -34538,6 +34871,9 @@ ALTER TABLE ONLY packages_nuget_dependency_link_metadata
ALTER TABLE ONLY group_deploy_keys_groups
ADD CONSTRAINT fk_rails_c3854f19f5 FOREIGN KEY (group_deploy_key_id) REFERENCES group_deploy_keys(id) ON DELETE CASCADE;
+ALTER TABLE ONLY project_wiki_repositories
+ ADD CONSTRAINT fk_rails_c3dd796199 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY merge_request_user_mentions
ADD CONSTRAINT fk_rails_c440b9ea31 FOREIGN KEY (note_id) REFERENCES notes(id) ON DELETE CASCADE;
@@ -34589,8 +34925,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 +34934,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 +34955,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 +34979,15 @@ 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 packages_rpm_repository_files
+ ADD CONSTRAINT fk_rails_d545cfaed2 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+
+ALTER TABLE ONLY packages_rpm_metadata
+ ADD CONSTRAINT fk_rails_d79f02264b FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY merge_request_reviewers
ADD CONSTRAINT fk_rails_d9fec24b9d FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE;
@@ -34655,6 +34997,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;
@@ -34670,6 +35015,9 @@ ALTER TABLE ONLY deployment_merge_requests
ALTER TABLE ONLY packages_debian_group_component_files
ADD CONSTRAINT fk_rails_dd262386e9 FOREIGN KEY (component_id) REFERENCES packages_debian_group_components(id) ON DELETE RESTRICT;
+ALTER TABLE ONLY incident_management_timeline_event_tags
+ ADD CONSTRAINT fk_rails_dd5c91484e FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY user_callouts
ADD CONSTRAINT fk_rails_ddfdd80f3d FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
@@ -34682,6 +35030,9 @@ ALTER TABLE ONLY packages_debian_project_distributions
ALTER TABLE ONLY incident_management_oncall_shifts
ADD CONSTRAINT fk_rails_df4feb286a FOREIGN KEY (rotation_id) REFERENCES incident_management_oncall_rotations(id) ON DELETE CASCADE;
+ALTER TABLE ONLY namespace_commit_emails
+ ADD CONSTRAINT fk_rails_dfa4c104f5 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY analytics_cycle_analytics_group_stages
ADD CONSTRAINT fk_rails_dfb37c880d FOREIGN KEY (end_event_label_id) REFERENCES labels(id) ON DELETE CASCADE;
@@ -34745,6 +35096,9 @@ ALTER TABLE ONLY dast_site_tokens
ALTER TABLE ONLY group_deploy_keys_groups
ADD CONSTRAINT fk_rails_e87145115d FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+ALTER TABLE ONLY audit_events_streaming_event_type_filters
+ ADD CONSTRAINT fk_rails_e8bd011129 FOREIGN KEY (external_audit_event_destination_id) REFERENCES audit_events_external_audit_event_destinations(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY description_versions
ADD CONSTRAINT fk_rails_e8f4caf9c7 FOREIGN KEY (epic_id) REFERENCES epics(id) ON DELETE CASCADE;
@@ -34784,9 +35138,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 +35159,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 +35213,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;
@@ -34874,15 +35234,9 @@ ALTER TABLE ONLY customer_relations_contacts
ALTER TABLE ONLY external_approval_rules
ADD CONSTRAINT fk_rails_fd4f9ac573 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-ALTER TABLE ONLY experiment_users
- ADD CONSTRAINT fk_rails_fd805f771a FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY cluster_groups
ADD CONSTRAINT fk_rails_fdb8648a96 FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE;
-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/20220126191624_add_scan_file_path_to_dast_site_profile.rb b/db/migrate/20220126191624_add_scan_file_path_to_dast_site_profile.rb
deleted file mode 100644
index eab02663e26..00000000000
--- a/db/migrate/20220126191624_add_scan_file_path_to_dast_site_profile.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: true
-
-class AddScanFilePathToDastSiteProfile < Gitlab::Database::Migration[2.0]
- # rubocop:disable Migration/AddLimitToTextColumns
- # limit is added in 20221012135524_add_scan_file_path_limit_for_dast_site_profile
- def up
- add_column :dast_site_profiles, :scan_file_path, :text
- end
- # rubocop:enable Migration/AddLimitToTextColumns
-
- def down
- remove_column :dast_site_profiles, :scan_file_path, :text
- end
-end
diff --git a/db/migrate/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/20220406193806_add_maven_package_requests_forwarding_to_application_settings.rb b/db/migrate/20220406193806_add_maven_package_requests_forwarding_to_application_settings.rb
deleted file mode 100644
index 60b2efd3e9c..00000000000
--- a/db/migrate/20220406193806_add_maven_package_requests_forwarding_to_application_settings.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddMavenPackageRequestsForwardingToApplicationSettings < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def up
- add_column(:application_settings, :maven_package_requests_forwarding, :boolean, default: true, null: false)
- end
-
- def down
- remove_column(:application_settings, :maven_package_requests_forwarding)
- end
-end
diff --git a/db/migrate/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/20220603125200_add_show_diff_preview_in_email_to_namespace_settings.rb b/db/migrate/20220603125200_add_show_diff_preview_in_email_to_namespace_settings.rb
deleted file mode 100644
index ad32d589840..00000000000
--- a/db/migrate/20220603125200_add_show_diff_preview_in_email_to_namespace_settings.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddShowDiffPreviewInEmailToNamespaceSettings < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- add_column :namespace_settings, :show_diff_preview_in_email, :boolean, default: true, null: false
- end
-end
diff --git a/db/migrate/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/20220613112029_add_namespace_id_to_protected_branches.rb b/db/migrate/20220613112029_add_namespace_id_to_protected_branches.rb
deleted file mode 100644
index 1620a23d564..00000000000
--- a/db/migrate/20220613112029_add_namespace_id_to_protected_branches.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddNamespaceIdToProtectedBranches < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- add_column :protected_branches, :namespace_id, :bigint
- end
-end
diff --git a/db/migrate/20220613112030_add_namespace_id_indexes_foreign_key_to_protected_branches.rb b/db/migrate/20220613112030_add_namespace_id_indexes_foreign_key_to_protected_branches.rb
deleted file mode 100644
index 18a91743746..00000000000
--- a/db/migrate/20220613112030_add_namespace_id_indexes_foreign_key_to_protected_branches.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class AddNamespaceIdIndexesForeignKeyToProtectedBranches < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_protected_branches_namespace_id'
-
- def up
- add_concurrent_index :protected_branches, :namespace_id, name: INDEX_NAME, where: 'namespace_id IS NOT NULL'
- add_concurrent_foreign_key :protected_branches, :namespaces, column: :namespace_id, on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :protected_branches, column: :namespace_id
- end
- remove_concurrent_index :protected_branches, :namespace_id, name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20220613112031_add_group_or_project_constraint_in_protected_branches.rb b/db/migrate/20220613112031_add_group_or_project_constraint_in_protected_branches.rb
deleted file mode 100644
index b7f20450480..00000000000
--- a/db/migrate/20220613112031_add_group_or_project_constraint_in_protected_branches.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddGroupOrProjectConstraintInProtectedBranches < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- CONSTRAINT_NAME = 'protected_branches_project_id_namespace_id_any_not_null'
-
- def up
- constraint = <<~CONSTRAINT
- (project_id IS NULL) <> (namespace_id IS NULL)
- CONSTRAINT
- add_check_constraint :protected_branches, constraint, CONSTRAINT_NAME
- end
-
- def down
- remove_check_constraint :protected_branches, CONSTRAINT_NAME
- end
-end
diff --git a/db/migrate/20220613112032_change_project_id_null_in_protected_branches.rb b/db/migrate/20220613112032_change_project_id_null_in_protected_branches.rb
deleted file mode 100644
index 4bf8437d4fb..00000000000
--- a/db/migrate/20220613112032_change_project_id_null_in_protected_branches.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class ChangeProjectIdNullInProtectedBranches < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def up
- change_column_null :protected_branches, :project_id, true
- end
-
- def down
- change_column_null :protected_branches, :project_id, false
- end
-end
diff --git a/db/migrate/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/20220615172230_add_user_preference_to_turn_off_automatic_lists.rb b/db/migrate/20220615172230_add_user_preference_to_turn_off_automatic_lists.rb
deleted file mode 100644
index 4a0255aad06..00000000000
--- a/db/migrate/20220615172230_add_user_preference_to_turn_off_automatic_lists.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddUserPreferenceToTurnOffAutomaticLists < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def up
- add_column :user_preferences, :markdown_automatic_lists, :boolean, default: true, null: false
- end
-
- def down
- remove_column :user_preferences, :markdown_automatic_lists, :boolean
- end
-end
diff --git a/db/migrate/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/20220711142148_add_invitation_flow_enforcement_to_application_settings.rb b/db/migrate/20220711142148_add_invitation_flow_enforcement_to_application_settings.rb
deleted file mode 100644
index f323faf9aa1..00000000000
--- a/db/migrate/20220711142148_add_invitation_flow_enforcement_to_application_settings.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# frozen_string_literal: true
-
-class AddInvitationFlowEnforcementToApplicationSettings < Gitlab::Database::Migration[2.0]
- def change
- add_column :application_settings, :invitation_flow_enforcement,
- :boolean,
- default: false,
- null: false
- end
-end
diff --git a/db/migrate/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/20220721065723_add_issue_branch_template_to_project_settings.rb b/db/migrate/20220721065723_add_issue_branch_template_to_project_settings.rb
deleted file mode 100644
index d65bd2c21e7..00000000000
--- a/db/migrate/20220721065723_add_issue_branch_template_to_project_settings.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddIssueBranchTemplateToProjectSettings < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- add_column :project_settings, :issue_branch_template, :text, if_not_exists: true
- end
-
- add_text_limit :project_settings, :issue_branch_template, 255
- end
-
- def down
- remove_column :project_settings, :issue_branch_template, if_exists: true
- end
-end
diff --git a/db/migrate/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/20220726171440_create_ghost_user_migrations.rb b/db/migrate/20220726171440_create_ghost_user_migrations.rb
deleted file mode 100644
index c64ca4f7765..00000000000
--- a/db/migrate/20220726171440_create_ghost_user_migrations.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-# frozen_string_literal: true
-
-class CreateGhostUserMigrations < Gitlab::Database::Migration[2.0]
- def change
- create_table :ghost_user_migrations do |t|
- t.bigint :user_id, index: { unique: true }, null: false
- t.bigint :initiator_user_id
- t.timestamps_with_timezone null: false
- t.boolean :hard_delete, default: false, null: false
- end
- end
-end
diff --git a/db/migrate/20220726171450_add_user_fk_to_ghost_user_migrations.rb b/db/migrate/20220726171450_add_user_fk_to_ghost_user_migrations.rb
deleted file mode 100644
index 5904d132d1b..00000000000
--- a/db/migrate/20220726171450_add_user_fk_to_ghost_user_migrations.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddUserFkToGhostUserMigrations < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :ghost_user_migrations, :users, column: :user_id, on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :ghost_user_migrations, column: :user_id
- end
- end
-end
diff --git a/db/migrate/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/20220802200719_add_user_details_profile_fields.rb b/db/migrate/20220802200719_add_user_details_profile_fields.rb
deleted file mode 100644
index 952b0bc1d9a..00000000000
--- a/db/migrate/20220802200719_add_user_details_profile_fields.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddUserDetailsProfileFields < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- # rubocop:disable Migration/AddLimitToTextColumns
- # limits are added in 20220802202505_add_user_details_field_limits
- def change
- add_column :user_details, :linkedin, :text, null: false, default: ''
- add_column :user_details, :twitter, :text, null: false, default: ''
- add_column :user_details, :skype, :text, null: false, default: ''
- add_column :user_details, :website_url, :text, null: false, default: ''
- add_column :user_details, :location, :text, null: false, default: ''
- add_column :user_details, :organization, :text, null: false, default: ''
- end
- # rubocop:enable Migration/AddLimitToTextColumns
-end
diff --git a/db/migrate/20220802202505_add_user_details_field_limits.rb b/db/migrate/20220802202505_add_user_details_field_limits.rb
deleted file mode 100644
index 83b6a4528d3..00000000000
--- a/db/migrate/20220802202505_add_user_details_field_limits.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# frozen_string_literal: true
-
-class AddUserDetailsFieldLimits < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- USER_DETAILS_FIELD_LIMIT = 500
-
- def up
- add_text_limit :user_details, :linkedin, USER_DETAILS_FIELD_LIMIT
- add_text_limit :user_details, :twitter, USER_DETAILS_FIELD_LIMIT
- add_text_limit :user_details, :skype, USER_DETAILS_FIELD_LIMIT
- add_text_limit :user_details, :website_url, USER_DETAILS_FIELD_LIMIT
- add_text_limit :user_details, :location, USER_DETAILS_FIELD_LIMIT
- add_text_limit :user_details, :organization, USER_DETAILS_FIELD_LIMIT
- end
-
- def down
- remove_text_limit :user_details, :linkedin
- remove_text_limit :user_details, :twitter
- remove_text_limit :user_details, :skype
- remove_text_limit :user_details, :website_url
- remove_text_limit :user_details, :location
- remove_text_limit :user_details, :organization
- end
-end
diff --git a/db/migrate/20220803004853_add_auto_ban_user_to_namespace_settings.rb b/db/migrate/20220803004853_add_auto_ban_user_to_namespace_settings.rb
deleted file mode 100644
index 6e03177ce7a..00000000000
--- a/db/migrate/20220803004853_add_auto_ban_user_to_namespace_settings.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# frozen_string_literal: true
-
-class AddAutoBanUserToNamespaceSettings < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- add_column :namespace_settings, :auto_ban_user_on_excessive_projects_download, :boolean,
- default: false, null: false
- end
-end
diff --git a/db/migrate/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/20220803235114_add_auto_ban_user_to_application_settings.rb b/db/migrate/20220803235114_add_auto_ban_user_to_application_settings.rb
deleted file mode 100644
index 3b57c340921..00000000000
--- a/db/migrate/20220803235114_add_auto_ban_user_to_application_settings.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-# frozen_string_literal: true
-
-class AddAutoBanUserToApplicationSettings < Gitlab::Database::Migration[2.0]
- def change
- add_column :application_settings, :auto_ban_user_on_excessive_projects_download, :boolean,
- default: false, null: false
- end
-end
diff --git a/db/migrate/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/20220805180311_add_unique_index_on_sbom_component_type_and_name.rb b/db/migrate/20220805180311_add_unique_index_on_sbom_component_type_and_name.rb
deleted file mode 100644
index 852b1283e92..00000000000
--- a/db/migrate/20220805180311_add_unique_index_on_sbom_component_type_and_name.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddUniqueIndexOnSbomComponentTypeAndName < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_sbom_components_on_component_type_and_name'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :sbom_components, [:component_type, :name], unique: true, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :sbom_components, name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20220805183952_add_unique_index_to_sbom_component_versions_on_component_id_and_version.rb b/db/migrate/20220805183952_add_unique_index_to_sbom_component_versions_on_component_id_and_version.rb
deleted file mode 100644
index 03023bc6f2c..00000000000
--- a/db/migrate/20220805183952_add_unique_index_to_sbom_component_versions_on_component_id_and_version.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddUniqueIndexToSbomComponentVersionsOnComponentIdAndVersion < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_sbom_component_versions_on_component_id_and_version'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :sbom_component_versions, [:component_id, :version], unique: true, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :sbom_component_versions, name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20220805193117_add_unique_index_to_sbom_sources_on_source_type_and_source.rb b/db/migrate/20220805193117_add_unique_index_to_sbom_sources_on_source_type_and_source.rb
deleted file mode 100644
index 973cacaec5b..00000000000
--- a/db/migrate/20220805193117_add_unique_index_to_sbom_sources_on_source_type_and_source.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddUniqueIndexToSbomSourcesOnSourceTypeAndSource < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_sbom_sources_on_source_type_and_source'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :sbom_sources, [:source_type, :source], unique: true, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :sbom_sources, name: INDEX_NAME
- end
-end
diff --git a/db/migrate/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/20220815152905_create_vulnerability_advisories.rb b/db/migrate/20220815152905_create_vulnerability_advisories.rb
deleted file mode 100644
index f01a17c6352..00000000000
--- a/db/migrate/20220815152905_create_vulnerability_advisories.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# frozen_string_literal: true
-
-class CreateVulnerabilityAdvisories < Gitlab::Database::Migration[2.0]
- def change
- create_table :vulnerability_advisories, id: false do |t|
- t.uuid :uuid, null: false
- t.timestamps_with_timezone null: false
- t.primary_key :id
- t.date :created_date, null: false
- t.date :published_date, null: false
- t.text :description, limit: 2048
- t.text :title, limit: 2048
- t.text :component_name, limit: 2048
- t.text :solution, limit: 2048
- t.text :not_impacted, limit: 2048
- t.text :cvss_v2, limit: 128
- t.text :cvss_v3, limit: 128
- t.text :affected_range, limit: 32
- t.text :identifiers, array: true, default: []
- t.text :fixed_versions, array: true, default: []
- t.text :urls, array: true, default: []
- t.text :links, array: true, default: []
- end
- end
-end
diff --git a/db/migrate/20220816135816_create_sbom_vulnerable_component_versions.rb b/db/migrate/20220816135816_create_sbom_vulnerable_component_versions.rb
deleted file mode 100644
index 6f50376f6fa..00000000000
--- a/db/migrate/20220816135816_create_sbom_vulnerable_component_versions.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class CreateSbomVulnerableComponentVersions < Gitlab::Database::Migration[2.0]
- ADVISORY_INDEX_NAME = "index_vulnerable_component_versions_on_vulnerability_advisory"
- SBOM_COMPONENT_INDEX_NAME = "index_vulnerable_component_versions_on_sbom_component_version"
-
- def change
- create_table :sbom_vulnerable_component_versions do |t|
- t.references :vulnerability_advisory,
- index: { name: ADVISORY_INDEX_NAME }
-
- t.references :sbom_component_version,
- index: { name: SBOM_COMPONENT_INDEX_NAME }
-
- t.timestamps_with_timezone null: false
- end
- end
-end
diff --git a/db/migrate/20220817122907_re_add_show_diff_preview_in_email_to_project_settings.rb b/db/migrate/20220817122907_re_add_show_diff_preview_in_email_to_project_settings.rb
deleted file mode 100644
index bb5649e3a99..00000000000
--- a/db/migrate/20220817122907_re_add_show_diff_preview_in_email_to_project_settings.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class ReAddShowDiffPreviewInEmailToProjectSettings < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- add_column :project_settings, :show_diff_preview_in_email, :boolean, default: true, null: false
- end
-end
diff --git a/db/migrate/20220818095225_add_max_pages_custom_domains_per_project.rb b/db/migrate/20220818095225_add_max_pages_custom_domains_per_project.rb
deleted file mode 100644
index c5e1f5aede6..00000000000
--- a/db/migrate/20220818095225_add_max_pages_custom_domains_per_project.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class AddMaxPagesCustomDomainsPerProject < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- CONSTRAINT_NAME = "app_settings_max_pages_custom_domains_per_project_check"
-
- def up
- return if column_exists?(:application_settings, :max_pages_custom_domains_per_project)
-
- add_column :application_settings, :max_pages_custom_domains_per_project, :integer, null: false, default: 0
- add_check_constraint :application_settings, "max_pages_custom_domains_per_project >= 0", CONSTRAINT_NAME
- end
-
- def down
- return unless column_exists?(:application_settings, :max_pages_custom_domains_per_project)
-
- remove_column :application_settings, :max_pages_custom_domains_per_project
- end
-end
diff --git a/db/migrate/20220818125332_add_jitsu_tracking_columns_to_application_settings.rb b/db/migrate/20220818125332_add_jitsu_tracking_columns_to_application_settings.rb
deleted file mode 100644
index 9013168c2c5..00000000000
--- a/db/migrate/20220818125332_add_jitsu_tracking_columns_to_application_settings.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddJitsuTrackingColumnsToApplicationSettings < Gitlab::Database::Migration[2.0]
- def change
- # rubocop:disable Migration/AddLimitToTextColumns
- # limit is added in 20220818125703_add_jitsu_tracking_columns_to_application_settings_text_limits.rb
- add_column :application_settings, :jitsu_host, :text
- add_column :application_settings, :jitsu_project_xid, :text
- add_column :application_settings, :clickhouse_connection_string, :text
- add_column :application_settings, :jitsu_administrator_email, :text
- add_column :application_settings, :encrypted_jitsu_administrator_password, :binary
- add_column :application_settings, :encrypted_jitsu_administrator_password_iv, :binary
- # rubocop:enable Migration/AddLimitToTextColumns
- end
-end
diff --git a/db/migrate/20220818125703_add_jitsu_tracking_columns_to_application_settings_text_limits.rb b/db/migrate/20220818125703_add_jitsu_tracking_columns_to_application_settings_text_limits.rb
deleted file mode 100644
index 41de6e34724..00000000000
--- a/db/migrate/20220818125703_add_jitsu_tracking_columns_to_application_settings_text_limits.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class AddJitsuTrackingColumnsToApplicationSettingsTextLimits < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :application_settings, :jitsu_host, 255
- add_text_limit :application_settings, :jitsu_project_xid, 255
- add_text_limit :application_settings, :clickhouse_connection_string, 1024
- add_text_limit :application_settings, :jitsu_administrator_email, 255
- end
-
- def down
- remove_text_limit :application_settings, :jitsu_host
- remove_text_limit :application_settings, :jitsu_project_xid
- remove_text_limit :application_settings, :clickhouse_connection_string
- remove_text_limit :application_settings, :jitsu_administrator_email
- end
-end
diff --git a/db/migrate/20220818132108_add_deleted_on_to_ml_experiments.rb b/db/migrate/20220818132108_add_deleted_on_to_ml_experiments.rb
deleted file mode 100644
index e6ba9f78553..00000000000
--- a/db/migrate/20220818132108_add_deleted_on_to_ml_experiments.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddDeletedOnToMlExperiments < Gitlab::Database::Migration[2.0]
- def change
- add_column :ml_experiments, :deleted_on, :datetime_with_timezone, index: true
- end
-end
diff --git a/db/migrate/20220818140553_add_unique_index_to_sbom_occurrences_on_ingestion_attributes.rb b/db/migrate/20220818140553_add_unique_index_to_sbom_occurrences_on_ingestion_attributes.rb
deleted file mode 100644
index 2538017e287..00000000000
--- a/db/migrate/20220818140553_add_unique_index_to_sbom_occurrences_on_ingestion_attributes.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class AddUniqueIndexToSbomOccurrencesOnIngestionAttributes < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_sbom_occurrences_on_ingestion_attributes'
- ATTRIBUTES = %i[
- project_id
- component_id
- component_version_id
- source_id
- commit_sha
- ].freeze
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :sbom_occurrences, ATTRIBUTES, unique: true, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :sbom_occurrences, name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20220819153725_add_vulnerability_advisory_foreign_key_to_sbom_vulnerable_component_versions.rb b/db/migrate/20220819153725_add_vulnerability_advisory_foreign_key_to_sbom_vulnerable_component_versions.rb
deleted file mode 100644
index 7f0c817875f..00000000000
--- a/db/migrate/20220819153725_add_vulnerability_advisory_foreign_key_to_sbom_vulnerable_component_versions.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class AddVulnerabilityAdvisoryForeignKeyToSbomVulnerableComponentVersions < Gitlab::Database::Migration[2.0]
- SOURCE_TABLE = :sbom_vulnerable_component_versions
- TARGET_TABLE = :vulnerability_advisories
- COLUMN = :vulnerability_advisory_id
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key SOURCE_TABLE, TARGET_TABLE, column: COLUMN, on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key SOURCE_TABLE, column: COLUMN
- end
- end
-end
diff --git a/db/migrate/20220819162852_add_sbom_component_version_foreign_key_to_sbom_vulnerable_component_versions.rb b/db/migrate/20220819162852_add_sbom_component_version_foreign_key_to_sbom_vulnerable_component_versions.rb
deleted file mode 100644
index a4f2005693c..00000000000
--- a/db/migrate/20220819162852_add_sbom_component_version_foreign_key_to_sbom_vulnerable_component_versions.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class AddSbomComponentVersionForeignKeyToSbomVulnerableComponentVersions < Gitlab::Database::Migration[2.0]
- SOURCE_TABLE = :sbom_vulnerable_component_versions
- TARGET_TABLE = :sbom_component_versions
- COLUMN = :sbom_component_version_id
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key SOURCE_TABLE, TARGET_TABLE, column: COLUMN, on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key SOURCE_TABLE, column: COLUMN
- end
- end
-end
diff --git a/db/migrate/20220819184945_add_dashboard_limit_to_application_settings.rb b/db/migrate/20220819184945_add_dashboard_limit_to_application_settings.rb
deleted file mode 100644
index f2ab4a043ea..00000000000
--- a/db/migrate/20220819184945_add_dashboard_limit_to_application_settings.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class AddDashboardLimitToApplicationSettings < Gitlab::Database::Migration[2.0]
- def change
- add_column :application_settings, :dashboard_limit_enabled, :boolean, default: false, null: false
- add_column :application_settings, :dashboard_limit, :integer, default: 0, null: false
- add_column :application_settings, :dashboard_notification_limit, :integer, default: 0, null: false
- add_column :application_settings, :dashboard_enforcement_limit, :integer, default: 0, null: false
- add_column :application_settings, :dashboard_limit_new_namespace_creation_enforcement_date, :date
- end
-end
diff --git a/db/migrate/20220822102651_add_namespace_id_to_broadcast_message.rb b/db/migrate/20220822102651_add_namespace_id_to_broadcast_message.rb
deleted file mode 100644
index 5413f447366..00000000000
--- a/db/migrate/20220822102651_add_namespace_id_to_broadcast_message.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddNamespaceIdToBroadcastMessage < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- add_column :broadcast_messages, :namespace_id, :bigint
- end
-end
diff --git a/db/migrate/20220822103638_add_index_and_foreign_key_to_broadcast_message.rb b/db/migrate/20220822103638_add_index_and_foreign_key_to_broadcast_message.rb
deleted file mode 100644
index a577e5ad157..00000000000
--- a/db/migrate/20220822103638_add_index_and_foreign_key_to_broadcast_message.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexAndForeignKeyToBroadcastMessage < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_broadcast_messages_on_namespace_id'
-
- def up
- add_concurrent_index :broadcast_messages, :namespace_id, name: INDEX_NAME
- add_concurrent_foreign_key :broadcast_messages, :namespaces, column: :namespace_id, on_delete: :cascade
- end
-
- def down
- remove_foreign_key_if_exists :broadcast_messages, column: :namespace_id
- remove_concurrent_index_by_name :broadcast_messages, name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20220824175648_limit_namespaces_sync_triggers_to_traversal_ids_update.rb b/db/migrate/20220824175648_limit_namespaces_sync_triggers_to_traversal_ids_update.rb
deleted file mode 100644
index 142744b5493..00000000000
--- a/db/migrate/20220824175648_limit_namespaces_sync_triggers_to_traversal_ids_update.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-# frozen_string_literal: true
-
-class LimitNamespacesSyncTriggersToTraversalIdsUpdate < Gitlab::Database::Migration[2.0]
- include Gitlab::Database::SchemaHelpers
-
- enable_lock_retries!
-
- TABLE_NAME = 'namespaces'
- EVENT_TABLE_NAME = 'namespaces_sync_events'
- FUNCTION_NAME = 'insert_namespaces_sync_event'
- OLD_TRIGGER_ON_INSERT = 'trigger_namespaces_parent_id_on_insert'
- OLD_TRIGGER_ON_UPDATE = 'trigger_namespaces_parent_id_on_update'
- NEW_TRIGGER_ON_UPDATE = 'trigger_namespaces_traversal_ids_on_update'
-
- def up
- create_trigger(TABLE_NAME, NEW_TRIGGER_ON_UPDATE, FUNCTION_NAME, fires: 'AFTER UPDATE') do
- <<~SQL
- WHEN (OLD.traversal_ids IS DISTINCT FROM NEW.traversal_ids)
- SQL
- end
- drop_trigger(TABLE_NAME, OLD_TRIGGER_ON_UPDATE)
- drop_trigger(TABLE_NAME, OLD_TRIGGER_ON_INSERT)
- end
-
- # Revert both triggers to the version defined in db/migrate/20211011141242_create_namespaces_sync_trigger.rb
- def down
- create_trigger(TABLE_NAME, OLD_TRIGGER_ON_INSERT, FUNCTION_NAME, fires: 'AFTER INSERT')
- create_trigger(TABLE_NAME, OLD_TRIGGER_ON_UPDATE, FUNCTION_NAME, fires: 'AFTER UPDATE') do
- <<~SQL
- WHEN (OLD.parent_id IS DISTINCT FROM NEW.parent_id)
- SQL
- end
- drop_trigger(TABLE_NAME, NEW_TRIGGER_ON_UPDATE)
- end
-end
diff --git a/db/migrate/20220824194103_remove_existing_work_item_type_backfill_migrations.rb b/db/migrate/20220824194103_remove_existing_work_item_type_backfill_migrations.rb
deleted file mode 100644
index ed970e30099..00000000000
--- a/db/migrate/20220824194103_remove_existing_work_item_type_backfill_migrations.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveExistingWorkItemTypeBackfillMigrations < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- JOB_CLASS_NAME = 'BackfillWorkItemTypeIdForIssues'
-
- class BatchedMigration < MigrationRecord
- self.table_name = 'batched_background_migrations'
- end
-
- def up
- # cleaning up so we can remove a custom batching strategy that is no longer necessary
- # some environments might already have this background migrations scheduled and probably completed
- BatchedMigration.where(job_class_name: JOB_CLASS_NAME).delete_all
- end
-
- def down
- # no-op
- # we will reschedule this migration in the future, no need to add back here
- end
-end
diff --git a/db/migrate/20220825105631_add_cube_api_key_to_application_settings.rb b/db/migrate/20220825105631_add_cube_api_key_to_application_settings.rb
deleted file mode 100644
index 6ee5ad52315..00000000000
--- a/db/migrate/20220825105631_add_cube_api_key_to_application_settings.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class AddCubeApiKeyToApplicationSettings < Gitlab::Database::Migration[2.0]
- def change
- # rubocop:disable Migration/AddLimitToTextColumns
- add_column :application_settings, :cube_api_base_url, :text
- add_column :application_settings, :encrypted_cube_api_key, :binary
- add_column :application_settings, :encrypted_cube_api_key_iv, :binary
- # rubocop:enable Migration/AddLimitToTextColumns
- end
-end
diff --git a/db/migrate/20220825134827_remove_not_null_constraint_for_confidence_columns.rb b/db/migrate/20220825134827_remove_not_null_constraint_for_confidence_columns.rb
deleted file mode 100644
index e41d93ebf8b..00000000000
--- a/db/migrate/20220825134827_remove_not_null_constraint_for_confidence_columns.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveNotNullConstraintForConfidenceColumns < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- change_column_null :vulnerabilities, :confidence, true
- change_column_null :vulnerability_occurrences, :confidence, true
- change_column_null :security_findings, :confidence, true
- end
-
- def down
- # no-op: We can not set `NOT NULL` constraint here as there can be NULL values already.
- end
-end
diff --git a/db/migrate/20220828094411_add_rpm_max_file_size_to_plan_limits.rb b/db/migrate/20220828094411_add_rpm_max_file_size_to_plan_limits.rb
deleted file mode 100644
index 32489fd5bce..00000000000
--- a/db/migrate/20220828094411_add_rpm_max_file_size_to_plan_limits.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddRpmMaxFileSizeToPlanLimits < Gitlab::Database::Migration[2.0]
- DOWNTIME = false
-
- def change
- add_column :plan_limits, :rpm_max_file_size, :bigint, default: 5.gigabytes, null: false
- end
-end
diff --git a/db/migrate/20220828131848_create_packages_rpm_metadata.rb b/db/migrate/20220828131848_create_packages_rpm_metadata.rb
deleted file mode 100644
index bfaa441fc78..00000000000
--- a/db/migrate/20220828131848_create_packages_rpm_metadata.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-# frozen_string_literal: true
-
-class CreatePackagesRpmMetadata < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- create_table :packages_rpm_metadata, id: false do |t|
- t.references :package,
- primary_key: true,
- default: nil,
- index: true,
- foreign_key: { to_table: :packages_packages, on_delete: :cascade },
- type: :bigint
- t.text :release, default: '1', null: false, limit: 128
- t.text :summary, default: '', null: false, limit: 1000
- t.text :description, default: '', null: false, limit: 5000
- t.text :arch, default: '', null: false, limit: 255
- t.text :license, null: true, limit: 1000
- t.text :url, null: true, limit: 1000
- end
- end
- end
-
- def down
- with_lock_retries do
- drop_table :packages_rpm_metadata
- end
- end
-end
diff --git a/db/migrate/20220829183356_replace_index_on_credit_card_validations.rb b/db/migrate/20220829183356_replace_index_on_credit_card_validations.rb
deleted file mode 100644
index 05fa7f75feb..00000000000
--- a/db/migrate/20220829183356_replace_index_on_credit_card_validations.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class ReplaceIndexOnCreditCardValidations < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- OLD_INDEX_NAME = 'index_user_credit_card_validations_meta_data_full_match'
- NEW_INDEX_NAME = 'index_user_credit_card_validations_meta_data_full_match_lower'
- OLD_FIELDS = [:holder_name, :expiration_date, :last_digits, :credit_card_validated_at]
- NEW_FIELDS = 'lower(holder_name), expiration_date, last_digits, credit_card_validated_at'
-
- def up
- add_concurrent_index :user_credit_card_validations, NEW_FIELDS, name: NEW_INDEX_NAME
- remove_concurrent_index :user_credit_card_validations, OLD_FIELDS, name: OLD_INDEX_NAME
- end
-
- def down
- add_concurrent_index :user_credit_card_validations, OLD_FIELDS, name: OLD_INDEX_NAME
- remove_concurrent_index :user_credit_card_validations, NEW_FIELDS, name: NEW_INDEX_NAME
- end
-end
diff --git a/db/migrate/20220830082928_add_text_limit_to_cube_api_base_url.rb b/db/migrate/20220830082928_add_text_limit_to_cube_api_base_url.rb
deleted file mode 100644
index 7bab796a47f..00000000000
--- a/db/migrate/20220830082928_add_text_limit_to_cube_api_base_url.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddTextLimitToCubeApiBaseUrl < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :application_settings, :cube_api_base_url, 512
- end
-
- def down
- remove_text_limit :application_settings, :cube_api_base_url
- end
-end
diff --git a/db/migrate/20220830114228_create_dora_configuration_table.rb b/db/migrate/20220830114228_create_dora_configuration_table.rb
deleted file mode 100644
index ee5960d14b6..00000000000
--- a/db/migrate/20220830114228_create_dora_configuration_table.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class CreateDoraConfigurationTable < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- create_table :dora_configurations do |t|
- t.references :project, null: false, index: { unique: true }, foreign_key: { on_delete: :cascade }
- t.text :branches_for_lead_time_for_changes, null: false, array: true, default: []
- end
- end
-
- def down
- drop_table :dora_configurations
- end
-end
diff --git a/db/migrate/20220831182105_add_constraints_view.rb b/db/migrate/20220831182105_add_constraints_view.rb
deleted file mode 100644
index 03c183b6e9f..00000000000
--- a/db/migrate/20220831182105_add_constraints_view.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-# frozen_string_literal: true
-
-class AddConstraintsView < Gitlab::Database::Migration[2.0]
- def up
- execute(<<~SQL)
- CREATE OR REPLACE VIEW postgres_constraints
- AS
- SELECT
- pg_constraint.oid AS oid,
- pg_constraint.conname AS name,
- pg_constraint.contype AS constraint_type,
- pg_constraint.convalidated AS constraint_valid,
- (SELECT array_agg(attname ORDER BY ordering)
- FROM unnest(pg_constraint.conkey) WITH ORDINALITY attnums(attnum, ordering)
- INNER JOIN pg_attribute ON pg_attribute.attnum = attnums.attnum AND pg_attribute.attrelid = pg_class.oid
- ) AS column_names,
- pg_namespace.nspname::text || '.'::text || pg_class.relname::text AS table_identifier,
- -- pg_constraint reports a 0 oid rather than null if the constraint is not a partition child constraint.
- nullif(pg_constraint.conparentid, 0) AS parent_constraint_oid,
- pg_get_constraintdef(pg_constraint.oid) AS definition
- FROM pg_constraint
- INNER JOIN pg_class ON pg_constraint.conrelid = pg_class.oid
- INNER JOIN pg_namespace ON pg_class.relnamespace = pg_namespace.oid;
- SQL
- end
-
- def down
- execute(<<~SQL)
- DROP VIEW postgres_constraints;
- SQL
- end
-end
diff --git a/db/migrate/20220901035722_add_temp_project_member_index.rb b/db/migrate/20220901035722_add_temp_project_member_index.rb
deleted file mode 100644
index 0765ef09b5c..00000000000
--- a/db/migrate/20220901035722_add_temp_project_member_index.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class AddTempProjectMemberIndex < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- TABLE_NAME = :members
- INDEX_NAME = 'index_project_members_on_id_temp'
-
- def up
- add_concurrent_index TABLE_NAME, :id, name: INDEX_NAME, where: "source_type = 'Project'"
- end
-
- def down
- remove_concurrent_index TABLE_NAME, :id, name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20220901090004_add_can_create_group_to_application_settings.rb b/db/migrate/20220901090004_add_can_create_group_to_application_settings.rb
deleted file mode 100644
index a61f7c9a080..00000000000
--- a/db/migrate/20220901090004_add_can_create_group_to_application_settings.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddCanCreateGroupToApplicationSettings < Gitlab::Database::Migration[2.0]
- def change
- add_column(:application_settings, :can_create_group, :boolean, default: true, null: false)
- end
-end
diff --git a/db/migrate/20220901092853_update_can_create_group_application_setting.rb b/db/migrate/20220901092853_update_can_create_group_application_setting.rb
deleted file mode 100644
index 42508184d62..00000000000
--- a/db/migrate/20220901092853_update_can_create_group_application_setting.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# frozen_string_literal: true
-
-class UpdateCanCreateGroupApplicationSetting < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- value = gitlab_config.respond_to?(:default_can_create_group) ? gitlab_config.default_can_create_group : true
- value = Gitlab::Utils.to_boolean(value, default: true)
-
- execute_update(value: value)
- end
-
- def down
- execute_update(value: true)
- end
-
- private
-
- def execute_update(value:)
- execute "UPDATE application_settings SET can_create_group = #{value}"
- end
-
- def gitlab_config
- Gitlab.config.gitlab
- end
-end
diff --git a/db/migrate/20220901114501_only_allow_merge_if_all_status_checks_passed.rb b/db/migrate/20220901114501_only_allow_merge_if_all_status_checks_passed.rb
deleted file mode 100644
index 059ed657264..00000000000
--- a/db/migrate/20220901114501_only_allow_merge_if_all_status_checks_passed.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class OnlyAllowMergeIfAllStatusChecksPassed < Gitlab::Database::Migration[2.0]
- def change
- add_column :project_settings, :only_allow_merge_if_all_status_checks_passed, :boolean, default: false, null: false
- end
-end
diff --git a/db/migrate/20220901124637_add_last_downloaded_at_to_packages.rb b/db/migrate/20220901124637_add_last_downloaded_at_to_packages.rb
deleted file mode 100644
index 0172ab573ea..00000000000
--- a/db/migrate/20220901124637_add_last_downloaded_at_to_packages.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddLastDownloadedAtToPackages < Gitlab::Database::Migration[2.0]
- def change
- add_column :packages_packages, :last_downloaded_at, :datetime_with_timezone
- end
-end
diff --git a/db/migrate/20220901131828_add_environments_project_name_lower_pattern_ops_index.rb b/db/migrate/20220901131828_add_environments_project_name_lower_pattern_ops_index.rb
deleted file mode 100644
index d8b7cd9be28..00000000000
--- a/db/migrate/20220901131828_add_environments_project_name_lower_pattern_ops_index.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddEnvironmentsProjectNameLowerPatternOpsIndex < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_environments_on_project_name_varchar_pattern_ops'
-
- def up
- add_concurrent_index :environments, 'project_id, lower(name) varchar_pattern_ops', name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :environments, INDEX_NAME
- end
-end
diff --git a/db/migrate/20220901212027_add_merge_request_id_to_environments.rb b/db/migrate/20220901212027_add_merge_request_id_to_environments.rb
deleted file mode 100644
index 4a230c737ae..00000000000
--- a/db/migrate/20220901212027_add_merge_request_id_to_environments.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddMergeRequestIdToEnvironments < Gitlab::Database::Migration[2.0]
- def change
- add_column :environments, :merge_request_id, :bigint
- end
-end
diff --git a/db/migrate/20220902065314_create_ci_partitions.rb b/db/migrate/20220902065314_create_ci_partitions.rb
deleted file mode 100644
index 1a8a4f172f8..00000000000
--- a/db/migrate/20220902065314_create_ci_partitions.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class CreateCiPartitions < Gitlab::Database::Migration[2.0]
- def change
- create_table :ci_partitions do |t|
- t.timestamps_with_timezone null: false
- end
- end
-end
diff --git a/db/migrate/20220902065316_create_default_partition_record.rb b/db/migrate/20220902065316_create_default_partition_record.rb
deleted file mode 100644
index 6493fb23d4c..00000000000
--- a/db/migrate/20220902065316_create_default_partition_record.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-class CreateDefaultPartitionRecord < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
- restrict_gitlab_migration gitlab_schema: :gitlab_ci
-
- def up
- execute(<<~SQL)
- INSERT INTO "ci_partitions" ("id", "created_at", "updated_at")
- VALUES (100, now(), now());
- SQL
-
- reset_pk_sequence!('ci_partitions')
- end
-
- def down
- execute(<<~SQL)
- DELETE FROM "ci_partitions" WHERE "ci_partitions"."id" = 100;
- SQL
- end
-end
diff --git a/db/migrate/20220902065317_add_partition_id_to_ci_builds.rb b/db/migrate/20220902065317_add_partition_id_to_ci_builds.rb
deleted file mode 100644
index 6257164b44e..00000000000
--- a/db/migrate/20220902065317_add_partition_id_to_ci_builds.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class AddPartitionIdToCiBuilds < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- # rubocop:disable Migration/AddColumnsToWideTables
- def change
- add_column :ci_builds, :partition_id, :bigint, default: 100, null: false
- end
- # rubocop:enable Migration/AddColumnsToWideTables
-end
diff --git a/db/migrate/20220902065558_add_partition_id_to_ci_builds_metadata.rb b/db/migrate/20220902065558_add_partition_id_to_ci_builds_metadata.rb
deleted file mode 100644
index e04ea99539f..00000000000
--- a/db/migrate/20220902065558_add_partition_id_to_ci_builds_metadata.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddPartitionIdToCiBuildsMetadata < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- add_column :ci_builds_metadata, :partition_id, :bigint, default: 100, null: false
- end
-end
diff --git a/db/migrate/20220902065611_add_partition_id_to_ci_job_artifacts.rb b/db/migrate/20220902065611_add_partition_id_to_ci_job_artifacts.rb
deleted file mode 100644
index 1d9eeb0330e..00000000000
--- a/db/migrate/20220902065611_add_partition_id_to_ci_job_artifacts.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddPartitionIdToCiJobArtifacts < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- add_column :ci_job_artifacts, :partition_id, :bigint, default: 100, null: false
- end
-end
diff --git a/db/migrate/20220902065623_add_partition_id_to_ci_pipelines.rb b/db/migrate/20220902065623_add_partition_id_to_ci_pipelines.rb
deleted file mode 100644
index bb3e7c27ee8..00000000000
--- a/db/migrate/20220902065623_add_partition_id_to_ci_pipelines.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddPartitionIdToCiPipelines < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- add_column :ci_pipelines, :partition_id, :bigint, default: 100, null: false
- end
-end
diff --git a/db/migrate/20220902065635_add_partition_id_to_ci_stages.rb b/db/migrate/20220902065635_add_partition_id_to_ci_stages.rb
deleted file mode 100644
index 0ddbf491ee9..00000000000
--- a/db/migrate/20220902065635_add_partition_id_to_ci_stages.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddPartitionIdToCiStages < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- add_column :ci_stages, :partition_id, :bigint, default: 100, null: false
- end
-end
diff --git a/db/migrate/20220902065647_add_partition_id_to_ci_pipeline_variables.rb b/db/migrate/20220902065647_add_partition_id_to_ci_pipeline_variables.rb
deleted file mode 100644
index 14f17b371b4..00000000000
--- a/db/migrate/20220902065647_add_partition_id_to_ci_pipeline_variables.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddPartitionIdToCiPipelineVariables < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- add_column :ci_pipeline_variables, :partition_id, :bigint, default: 100, null: false
- end
-end
diff --git a/db/migrate/20220902165931_index_evironments_on_merge_request_id.rb b/db/migrate/20220902165931_index_evironments_on_merge_request_id.rb
deleted file mode 100644
index 9d9f84e94ee..00000000000
--- a/db/migrate/20220902165931_index_evironments_on_merge_request_id.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class IndexEvironmentsOnMergeRequestId < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_environments_on_merge_request_id'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :environments, :merge_request_id, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :environments, INDEX_NAME
- end
-end
diff --git a/db/migrate/20220902170131_add_fk_constraint_to_environments_merge_request_id.rb b/db/migrate/20220902170131_add_fk_constraint_to_environments_merge_request_id.rb
deleted file mode 100644
index 863aefe56fb..00000000000
--- a/db/migrate/20220902170131_add_fk_constraint_to_environments_merge_request_id.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddFkConstraintToEnvironmentsMergeRequestId < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :environments, :merge_requests, column: :merge_request_id, on_delete: :nullify
- end
-
- def down
- remove_foreign_key_if_exists :environments, column: :merge_request_id
- end
-end
diff --git a/db/migrate/20220906093857_add_column_branch_filter_strategy_to_web_hooks.rb b/db/migrate/20220906093857_add_column_branch_filter_strategy_to_web_hooks.rb
deleted file mode 100644
index 739bedda9e0..00000000000
--- a/db/migrate/20220906093857_add_column_branch_filter_strategy_to_web_hooks.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddColumnBranchFilterStrategyToWebHooks < Gitlab::Database::Migration[2.0]
- def change
- add_column :web_hooks, :branch_filter_strategy, :integer, null: false, default: 0, limit: 2
- end
-end
diff --git a/db/migrate/20220906155105_add_start_time_and_end_time_and_status_to_ml_candidates.rb b/db/migrate/20220906155105_add_start_time_and_end_time_and_status_to_ml_candidates.rb
deleted file mode 100644
index 68138881139..00000000000
--- a/db/migrate/20220906155105_add_start_time_and_end_time_and_status_to_ml_candidates.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddStartTimeAndEndTimeAndStatusToMlCandidates < Gitlab::Database::Migration[2.0]
- def change
- add_column :ml_candidates, :start_time, :bigint
- add_column :ml_candidates, :end_time, :bigint
- add_column :ml_candidates, :status, :smallint, default: 0, null: false
- end
-end
diff --git a/db/migrate/20220906204832_add_locked_to_ci_pipeline_artifacts.rb b/db/migrate/20220906204832_add_locked_to_ci_pipeline_artifacts.rb
deleted file mode 100644
index dae4c560bb2..00000000000
--- a/db/migrate/20220906204832_add_locked_to_ci_pipeline_artifacts.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class AddLockedToCiPipelineArtifacts < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- TABLE_NAME = 'ci_pipeline_artifacts'
- COLUMN_NAME = 'locked'
-
- def up
- with_lock_retries do
- add_column TABLE_NAME, COLUMN_NAME, :smallint, default: 2
- end
- end
-
- def down
- with_lock_retries do
- remove_column TABLE_NAME, COLUMN_NAME
- end
- end
-end
diff --git a/db/migrate/20220907115806_add_security_orchestration_policy_configuration_id.rb b/db/migrate/20220907115806_add_security_orchestration_policy_configuration_id.rb
deleted file mode 100644
index de83288a0ca..00000000000
--- a/db/migrate/20220907115806_add_security_orchestration_policy_configuration_id.rb
+++ /dev/null
@@ -1,58 +0,0 @@
-# frozen_string_literal: true
-
-class AddSecurityOrchestrationPolicyConfigurationId < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- PROJECT_INDEX_NAME = 'idx_approval_project_rules_on_sec_orchestration_config_id'
- MERGE_REQUEST_INDEX_NAME = 'idx_approval_merge_request_rules_on_sec_orchestration_config_id'
-
- def up
- with_lock_retries do
- unless column_exists?(:approval_project_rules, :security_orchestration_policy_configuration_id)
- add_column :approval_project_rules, :security_orchestration_policy_configuration_id, :bigint
- end
- end
-
- with_lock_retries do
- unless column_exists?(:approval_merge_request_rules, :security_orchestration_policy_configuration_id)
- add_column :approval_merge_request_rules, :security_orchestration_policy_configuration_id, :bigint
- end
- end
-
- add_concurrent_index :approval_project_rules,
- :security_orchestration_policy_configuration_id,
- name: PROJECT_INDEX_NAME
- add_concurrent_index :approval_merge_request_rules,
- :security_orchestration_policy_configuration_id,
- name: MERGE_REQUEST_INDEX_NAME
-
- add_concurrent_foreign_key :approval_project_rules,
- :security_orchestration_policy_configurations,
- column: :security_orchestration_policy_configuration_id,
- on_delete: :cascade
- add_concurrent_foreign_key :approval_merge_request_rules,
- :security_orchestration_policy_configurations,
- column: :security_orchestration_policy_configuration_id,
- on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- if column_exists?(:approval_project_rules, :security_orchestration_policy_configuration_id)
- remove_column :approval_project_rules, :security_orchestration_policy_configuration_id
- end
- end
-
- with_lock_retries do
- if column_exists?(:approval_merge_request_rules, :security_orchestration_policy_configuration_id)
- remove_column :approval_merge_request_rules, :security_orchestration_policy_configuration_id
- end
- end
-
- remove_foreign_key_if_exists :approval_project_rules, column: :security_orchestration_policy_configuration_id
- remove_foreign_key_if_exists :approval_merge_request_rules, column: :security_orchestration_policy_configuration_id
-
- remove_concurrent_index_by_name :approval_project_rules, name: PROJECT_INDEX_NAME
- remove_concurrent_index_by_name :approval_merge_request_rules, name: MERGE_REQUEST_INDEX_NAME
- end
-end
diff --git a/db/migrate/20220907124320_add_internal_to_notes_renamed.rb b/db/migrate/20220907124320_add_internal_to_notes_renamed.rb
deleted file mode 100644
index e65bc503c04..00000000000
--- a/db/migrate/20220907124320_add_internal_to_notes_renamed.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-# Renamed from AddInternalToNotes to AddInternalToNotesRenamed to avoid collision with an Elasticsearch migration from
-# the same name. See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/129012
-class AddInternalToNotesRenamed < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- add_column(:notes, :internal, :boolean, default: false, null: false)
- end
-end
diff --git a/db/migrate/20220909091410_add_dismissal_reason_to_vulnerability_state_transitions.rb b/db/migrate/20220909091410_add_dismissal_reason_to_vulnerability_state_transitions.rb
deleted file mode 100644
index 01fcb3aa6e1..00000000000
--- a/db/migrate/20220909091410_add_dismissal_reason_to_vulnerability_state_transitions.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddDismissalReasonToVulnerabilityStateTransitions < Gitlab::Database::Migration[2.0]
- def change
- add_column :vulnerability_state_transitions, :dismissal_reason, :smallint
- end
-end
diff --git a/db/migrate/20220909094752_add_free_user_cap_over_limt_notified_at_to_namespace_details.rb b/db/migrate/20220909094752_add_free_user_cap_over_limt_notified_at_to_namespace_details.rb
deleted file mode 100644
index 775705eae73..00000000000
--- a/db/migrate/20220909094752_add_free_user_cap_over_limt_notified_at_to_namespace_details.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class AddFreeUserCapOverLimtNotifiedAtToNamespaceDetails < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- TABLE_NAME = 'namespace_details'
- COLUMN_NAME = 'free_user_cap_over_limt_notified_at'
-
- def up
- with_lock_retries do
- add_column(TABLE_NAME, COLUMN_NAME, :datetime_with_timezone)
- end
- end
-
- def down
- with_lock_retries do
- remove_column TABLE_NAME, COLUMN_NAME
- end
- end
-end
diff --git a/db/migrate/20220909113809_add_environments_project_name_lower_pattern_ops_state_index.rb b/db/migrate/20220909113809_add_environments_project_name_lower_pattern_ops_state_index.rb
deleted file mode 100644
index 870c809beb6..00000000000
--- a/db/migrate/20220909113809_add_environments_project_name_lower_pattern_ops_state_index.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddEnvironmentsProjectNameLowerPatternOpsStateIndex < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_environments_on_project_name_varchar_pattern_ops_state'
-
- def up
- add_concurrent_index :environments, 'project_id, lower(name) varchar_pattern_ops, state', name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :environments, INDEX_NAME
- end
-end
diff --git a/db/migrate/20220912153839_create_packages_rpm_repository_file.rb b/db/migrate/20220912153839_create_packages_rpm_repository_file.rb
deleted file mode 100644
index 889720df233..00000000000
--- a/db/migrate/20220912153839_create_packages_rpm_repository_file.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# frozen_string_literal: true
-
-class CreatePackagesRpmRepositoryFile < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def up
- create_table :packages_rpm_repository_files do |t|
- t.timestamps_with_timezone
-
- t.references :project, index: true, null: false, foreign_key: { on_delete: :cascade }, type: :bigint
- t.integer :file_store, default: 1
- t.integer :status, default: 0, null: false, limit: 2
- t.integer :size
- t.binary :file_md5
- t.binary :file_sha1
- t.binary :file_sha256
- t.text :file, null: false, limit: 255
- t.text :file_name, null: false, limit: 255
- end
- end
-
- def down
- drop_table :packages_rpm_repository_files
- end
-end
diff --git a/db/migrate/20220912180807_add_epoch_column_to_rpm_metadata.rb b/db/migrate/20220912180807_add_epoch_column_to_rpm_metadata.rb
deleted file mode 100644
index 842d917c8a3..00000000000
--- a/db/migrate/20220912180807_add_epoch_column_to_rpm_metadata.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddEpochColumnToRpmMetadata < Gitlab::Database::Migration[2.0]
- def change
- add_column :packages_rpm_metadata, :epoch, :integer, null: false, default: 0
- end
-end
diff --git a/db/migrate/20220913043728_create_user_phone_number_validations.rb b/db/migrate/20220913043728_create_user_phone_number_validations.rb
deleted file mode 100644
index 21a5b4d5519..00000000000
--- a/db/migrate/20220913043728_create_user_phone_number_validations.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-class CreateUserPhoneNumberValidations < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def up
- create_table :user_phone_number_validations, id: false do |t|
- t.references :user, primary_key: true, default: nil, type: :bigint, index: false,
- foreign_key: { on_delete: :cascade }
-
- t.datetime_with_timezone :validated_at
- t.timestamps_with_timezone null: false
-
- t.integer :international_dial_code, null: false, limit: 1
- t.integer :verification_attempts, null: false, default: 0, limit: 1
- t.integer :risk_score, null: false, default: 0, limit: 1
-
- t.text :country, null: false, limit: 3
- t.text :phone_number, null: false, limit: 12
- t.text :telesign_reference_xid, limit: 255
-
- t.index [:international_dial_code, :phone_number], name: :index_user_phone_validations_on_dial_code_phone_number
- end
- end
-
- def down
- drop_table :user_phone_number_validations
- end
-end
diff --git a/db/migrate/20220913082728_drop_index_cadence_create_iterations_automation.rb b/db/migrate/20220913082728_drop_index_cadence_create_iterations_automation.rb
deleted file mode 100644
index 8b961bc1c7e..00000000000
--- a/db/migrate/20220913082728_drop_index_cadence_create_iterations_automation.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-class DropIndexCadenceCreateIterationsAutomation < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'cadence_create_iterations_automation'
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :iterations_cadences, INDEX_NAME
- end
-
- def down
- execute(
- <<-SQL
- CREATE INDEX CONCURRENTLY #{INDEX_NAME} ON iterations_cadences
- USING BTREE(automatic, duration_in_weeks, (DATE ((COALESCE("iterations_cadences"."last_run_date", DATE('01-01-1970')) + "iterations_cadences"."duration_in_weeks" * INTERVAL '1 week'))))
- WHERE duration_in_weeks IS NOT NULL
- SQL
- )
- end
-end
diff --git a/db/migrate/20220913082824_finalize_invalid_group_member_cleanup.rb b/db/migrate/20220913082824_finalize_invalid_group_member_cleanup.rb
deleted file mode 100644
index d5fb04f3fa3..00000000000
--- a/db/migrate/20220913082824_finalize_invalid_group_member_cleanup.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class FinalizeInvalidGroupMemberCleanup < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- # noop: this fails because the cleanup invalid members migration(ScheduleDestroyInvalidGroupMembers)
- # cannot succeed, so we need to cleanup that first.
- #
- # issue with some details: https://gitlab.com/gitlab-org/gitlab/-/issues/365028#note_1107166816
- # # incident: https://gitlab.com/gitlab-com/gl-infra/production/-/issues/7779
- end
-
- def down
- # noop
- end
-end
diff --git a/db/migrate/20220913082930_rename_iterations_cadences_last_run_date_to_next_run_date.rb b/db/migrate/20220913082930_rename_iterations_cadences_last_run_date_to_next_run_date.rb
deleted file mode 100644
index 2adc4202b79..00000000000
--- a/db/migrate/20220913082930_rename_iterations_cadences_last_run_date_to_next_run_date.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class RenameIterationsCadencesLastRunDateToNextRunDate < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- rename_column_concurrently :iterations_cadences, :last_run_date, :next_run_date
- end
-
- def down
- undo_rename_column_concurrently :iterations_cadences, :last_run_date, :next_run_date
- end
-end
diff --git a/db/migrate/20220913084123_add_timestamp_to_ml_candidate_metrics.rb b/db/migrate/20220913084123_add_timestamp_to_ml_candidate_metrics.rb
deleted file mode 100644
index 293bca2d6d7..00000000000
--- a/db/migrate/20220913084123_add_timestamp_to_ml_candidate_metrics.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddTimestampToMlCandidateMetrics < Gitlab::Database::Migration[2.0]
- def change
- add_column :ml_candidate_metrics, :tracked_at, :bigint
- end
-end
diff --git a/db/migrate/20220914005141_change_namespace_id_not_null_in_members.rb b/db/migrate/20220914005141_change_namespace_id_not_null_in_members.rb
deleted file mode 100644
index 250746b95b8..00000000000
--- a/db/migrate/20220914005141_change_namespace_id_not_null_in_members.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class ChangeNamespaceIdNotNullInMembers < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_not_null_constraint :members, :member_namespace_id, validate: false
- end
-
- def down
- remove_not_null_constraint :members, :member_namespace_id
- end
-end
diff --git a/db/migrate/20220914010233_change_members_namespace_foreign_key_on_delete_constraint.rb b/db/migrate/20220914010233_change_members_namespace_foreign_key_on_delete_constraint.rb
deleted file mode 100644
index 2ee98d59c3e..00000000000
--- a/db/migrate/20220914010233_change_members_namespace_foreign_key_on_delete_constraint.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-# frozen_string_literal: true
-
-class ChangeMembersNamespaceForeignKeyOnDeleteConstraint < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- TARGET_COLUMN = :member_namespace_id
-
- def up
- # add the new FK before removing the old one
- add_concurrent_foreign_key(
- :members,
- :namespaces,
- column: TARGET_COLUMN,
- name: fk_name("#{TARGET_COLUMN}_new"),
- on_delete: :cascade,
- validate: false
- )
- end
-
- def down
- with_lock_retries do
- remove_foreign_key_if_exists(:members, column: TARGET_COLUMN, name: fk_name("#{TARGET_COLUMN}_new"))
- end
- end
-
- def fk_name(column_name)
- # generate a FK name
- concurrent_foreign_key_name(:members, column_name)
- end
-end
diff --git a/db/migrate/20220914070927_finalize_invalid_project_member_cleanup.rb b/db/migrate/20220914070927_finalize_invalid_project_member_cleanup.rb
deleted file mode 100644
index 30f6519ed0f..00000000000
--- a/db/migrate/20220914070927_finalize_invalid_project_member_cleanup.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class FinalizeInvalidProjectMemberCleanup < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- # noop: this fails because the cleanup invalid members migration(ScheduleDestroyInvalidProjectMembers)
- # cannot succeed, so we need to cleanup that first.
- #
- # issue with some details: https://gitlab.com/gitlab-org/gitlab/-/issues/365028#note_1107166816
- # # incident: https://gitlab.com/gitlab-com/gl-infra/production/-/issues/7779
- end
-
- def down
- # noop
- end
-end
diff --git a/db/migrate/20220914080716_add_index_to_candidate_id_and_name_on_ml_candidate_params.rb b/db/migrate/20220914080716_add_index_to_candidate_id_and_name_on_ml_candidate_params.rb
deleted file mode 100644
index caf30961ace..00000000000
--- a/db/migrate/20220914080716_add_index_to_candidate_id_and_name_on_ml_candidate_params.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexToCandidateIdAndNameOnMlCandidateParams < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_ml_candidate_params_on_candidate_id_on_name'
-
- def up
- add_concurrent_index :ml_candidate_params, [:candidate_id, :name], unique: true, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name(:ml_candidate_params, INDEX_NAME)
- end
-end
diff --git a/db/migrate/20220914112457_add_reject_non_dco_commits_to_push_rules.rb b/db/migrate/20220914112457_add_reject_non_dco_commits_to_push_rules.rb
deleted file mode 100644
index 57b3c209660..00000000000
--- a/db/migrate/20220914112457_add_reject_non_dco_commits_to_push_rules.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddRejectNonDcoCommitsToPushRules < Gitlab::Database::Migration[2.0]
- def change
- add_column :push_rules, :reject_non_dco_commits, :boolean
- end
-end
diff --git a/db/migrate/20220914130800_add_jitsu_key_to_projects.rb b/db/migrate/20220914130800_add_jitsu_key_to_projects.rb
deleted file mode 100644
index 91c0695c4a6..00000000000
--- a/db/migrate/20220914130800_add_jitsu_key_to_projects.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-# rubocop:disable Migration/AddLimitToTextColumns
-# limit is added in 20220914131449_add_text_limit_to_projects_jitsu_key.rb
-class AddJitsuKeyToProjects < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- add_column :project_settings, :jitsu_key, :text
- end
- end
-
- def down
- with_lock_retries do
- remove_column :project_settings, :jitsu_key
- end
- end
-end
-# rubocop:enable Migration/AddLimitToTextColumns
diff --git a/db/migrate/20220914131449_add_text_limit_to_projects_jitsu_key.rb b/db/migrate/20220914131449_add_text_limit_to_projects_jitsu_key.rb
deleted file mode 100644
index 93aa27ffaa2..00000000000
--- a/db/migrate/20220914131449_add_text_limit_to_projects_jitsu_key.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddTextLimitToProjectsJitsuKey < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :project_settings, :jitsu_key, 100
- end
-
- def down
- remove_text_limit :project_settings, :jitsu_key
- end
-end
diff --git a/db/migrate/20220914174705_remove_not_null_constraint_from_sbom_source_fingerprint.rb b/db/migrate/20220914174705_remove_not_null_constraint_from_sbom_source_fingerprint.rb
deleted file mode 100644
index 6e819b1cdef..00000000000
--- a/db/migrate/20220914174705_remove_not_null_constraint_from_sbom_source_fingerprint.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveNotNullConstraintFromSbomSourceFingerprint < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- change_column_null :sbom_sources, :fingerprint, true
- end
-end
diff --git a/db/migrate/20220915140802_create_merge_request_predictions.rb b/db/migrate/20220915140802_create_merge_request_predictions.rb
deleted file mode 100644
index 20cd7e58092..00000000000
--- a/db/migrate/20220915140802_create_merge_request_predictions.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class CreateMergeRequestPredictions < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def up
- create_table :merge_request_predictions, id: false do |t|
- t.references :merge_request,
- primary_key: true, null: false, type: :bigint,
- index: false, foreign_key: { on_delete: :cascade }
-
- t.timestamps_with_timezone null: false
- t.jsonb :suggested_reviewers, null: false, default: {}
- end
- end
-
- def down
- drop_table :merge_request_predictions
- end
-end
diff --git a/db/migrate/20220916094641_add_source_id_to_bulk_import_entities.rb b/db/migrate/20220916094641_add_source_id_to_bulk_import_entities.rb
deleted file mode 100644
index b077fee9045..00000000000
--- a/db/migrate/20220916094641_add_source_id_to_bulk_import_entities.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddSourceIdToBulkImportEntities < Gitlab::Database::Migration[2.0]
- def change
- add_column :bulk_import_entities, :source_xid, :integer
- end
-end
diff --git a/db/migrate/20220916103311_add_index_on_jira_connect_installations_instance_url.rb b/db/migrate/20220916103311_add_index_on_jira_connect_installations_instance_url.rb
deleted file mode 100644
index 806c7d65f16..00000000000
--- a/db/migrate/20220916103311_add_index_on_jira_connect_installations_instance_url.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexOnJiraConnectInstallationsInstanceUrl < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_jira_connect_installations_on_instance_url'
-
- def up
- add_concurrent_index :jira_connect_installations, :instance_url, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :jira_connect_installations, name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20220918124223_add_suggested_reviewers_enabled_to_project_settings.rb b/db/migrate/20220918124223_add_suggested_reviewers_enabled_to_project_settings.rb
deleted file mode 100644
index 1a762d68bdc..00000000000
--- a/db/migrate/20220918124223_add_suggested_reviewers_enabled_to_project_settings.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddSuggestedReviewersEnabledToProjectSettings < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- add_column :project_settings, :suggested_reviewers_enabled, :boolean, default: false, null: false
- end
-end
diff --git a/db/migrate/20220919062640_add_mirror_branch_regex_to_remote_mirrors.rb b/db/migrate/20220919062640_add_mirror_branch_regex_to_remote_mirrors.rb
deleted file mode 100644
index 0f27ba9488b..00000000000
--- a/db/migrate/20220919062640_add_mirror_branch_regex_to_remote_mirrors.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddMirrorBranchRegexToRemoteMirrors < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_column :remote_mirrors, :mirror_branch_regex, :text
- add_text_limit :remote_mirrors, :mirror_branch_regex, 255
- end
-
- def down
- remove_text_limit :remote_mirrors, :mirror_branch_regex
- remove_column :remote_mirrors, :mirror_branch_regex
- end
-end
diff --git a/db/migrate/20220919225631_add_index_packages_packages_on_project_id_and_lower_version_to_packages.rb b/db/migrate/20220919225631_add_index_packages_packages_on_project_id_and_lower_version_to_packages.rb
deleted file mode 100644
index 23b58522639..00000000000
--- a/db/migrate/20220919225631_add_index_packages_packages_on_project_id_and_lower_version_to_packages.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexPackagesPackagesOnProjectIdAndLowerVersionToPackages < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_packages_packages_on_project_id_and_lower_version'
- NUGET_PACKAGE_TYPE = 4
-
- def up
- add_concurrent_index(
- :packages_packages,
- 'project_id, LOWER(version)',
- name: INDEX_NAME,
- where: "package_type = #{NUGET_PACKAGE_TYPE}"
- )
- end
-
- def down
- remove_concurrent_index_by_name(:packages_packages, INDEX_NAME)
- end
-end
diff --git a/db/migrate/20220920022404_remove_temp_index_null_project_namespace_id.rb b/db/migrate/20220920022404_remove_temp_index_null_project_namespace_id.rb
deleted file mode 100644
index 5541afcee40..00000000000
--- a/db/migrate/20220920022404_remove_temp_index_null_project_namespace_id.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveTempIndexNullProjectNamespaceId < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'tmp_index_for_null_project_namespace_id'
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :projects, INDEX_NAME
- end
-
- def down
- add_concurrent_index :projects, :id, name: INDEX_NAME, where: 'project_namespace_id IS NULL'
- end
-end
diff --git a/db/migrate/20220920135632_add_jira_connect_proxy_url_setting.rb b/db/migrate/20220920135632_add_jira_connect_proxy_url_setting.rb
deleted file mode 100644
index c5842b6c787..00000000000
--- a/db/migrate/20220920135632_add_jira_connect_proxy_url_setting.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# frozen_string_literal: true
-
-class AddJiraConnectProxyUrlSetting < Gitlab::Database::Migration[2.0]
- # rubocop:disable Migration/AddLimitToTextColumns
- # limit is added in 20220920135717_add_textlimit_to_jira_connect_proxy_url_setting.rb
- def change
- add_column :application_settings, :jira_connect_proxy_url, :text
- end
- # rubocop:enable Migration/AddLimitToTextColumns
-end
diff --git a/db/migrate/20220920135717_add_textlimit_to_jira_connect_proxy_url_setting.rb b/db/migrate/20220920135717_add_textlimit_to_jira_connect_proxy_url_setting.rb
deleted file mode 100644
index 3a571580e79..00000000000
--- a/db/migrate/20220920135717_add_textlimit_to_jira_connect_proxy_url_setting.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddTextlimitToJiraConnectProxyUrlSetting < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :application_settings, :jira_connect_proxy_url, 255
- end
-
- def down
- remove_text_limit :application_settings, :jira_connect_proxy_url
- end
-end
diff --git a/db/migrate/20220921174815_add_secure_files_metadata.rb b/db/migrate/20220921174815_add_secure_files_metadata.rb
deleted file mode 100644
index 74cc1d95867..00000000000
--- a/db/migrate/20220921174815_add_secure_files_metadata.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-# frozen_string_literal: true
-
-class AddSecureFilesMetadata < Gitlab::Database::Migration[2.0]
- def change
- add_column :ci_secure_files, :metadata, :jsonb
- add_column :ci_secure_files, :expires_at, :datetime_with_timezone
- end
-end
diff --git a/db/migrate/20220921201347_add_maven_package_requests_forwarding_to_namespace_package_settings.rb b/db/migrate/20220921201347_add_maven_package_requests_forwarding_to_namespace_package_settings.rb
deleted file mode 100644
index 8f858eb7960..00000000000
--- a/db/migrate/20220921201347_add_maven_package_requests_forwarding_to_namespace_package_settings.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-class AddMavenPackageRequestsForwardingToNamespacePackageSettings < Gitlab::Database::Migration[2.0]
- def change
- # adds columns to match the format used in
- # Gitlab::Database::MigrationHelpers::CascadingNamespaceSettings#add_cascading_namespace_setting
- add_column(:namespace_package_settings,
- :maven_package_requests_forwarding,
- :boolean,
- null: true,
- default: nil
- )
-
- add_column(:namespace_package_settings,
- :lock_maven_package_requests_forwarding,
- :boolean,
- default: false,
- null: false
- )
-
- add_column(:application_settings,
- :lock_maven_package_requests_forwarding,
- :boolean,
- default: false,
- null: false
- )
- end
-end
diff --git a/db/migrate/20220922143612_add_inbound_ci_job_token_project_scope_links.rb b/db/migrate/20220922143612_add_inbound_ci_job_token_project_scope_links.rb
deleted file mode 100644
index 50b43ee4db8..00000000000
--- a/db/migrate/20220922143612_add_inbound_ci_job_token_project_scope_links.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddInboundCiJobTokenProjectScopeLinks < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def up
- add_column :ci_job_token_project_scope_links, :direction, :integer, limit: 2, default: 0, null: false
- end
-
- def down
- remove_column :ci_job_token_project_scope_links, :direction
- end
-end
diff --git a/db/migrate/20220923103006_add_ci_pipeline_metadata_title.rb b/db/migrate/20220923103006_add_ci_pipeline_metadata_title.rb
deleted file mode 100644
index 3b2f02924a1..00000000000
--- a/db/migrate/20220923103006_add_ci_pipeline_metadata_title.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-class AddCiPipelineMetadataTitle < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def up
- create_table :ci_pipeline_metadata, id: false do |t|
- t.bigint :project_id, null: false
-
- t.references :pipeline,
- null: false,
- primary_key: true,
- default: nil,
- index: false,
- foreign_key: { to_table: :ci_pipelines, on_delete: :cascade }
-
- t.text :title, null: false, limit: 255
-
- t.index [:pipeline_id, :title], name: 'index_ci_pipeline_metadata_on_pipeline_id_title'
- t.index [:project_id], name: 'index_ci_pipeline_metadata_on_project_id'
- end
- end
-
- def down
- drop_table :ci_pipeline_metadata
- end
-end
diff --git a/db/migrate/20220926023734_add_mirror_branch_regex_to_project_settings.rb b/db/migrate/20220926023734_add_mirror_branch_regex_to_project_settings.rb
deleted file mode 100644
index 5032a9ff964..00000000000
--- a/db/migrate/20220926023734_add_mirror_branch_regex_to_project_settings.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-# frozen_string_literal: true
-
-class AddMirrorBranchRegexToProjectSettings < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- # rubocop:disable Migration/AddLimitToTextColumns
- # limit is added in 20221027124848_add_text_limit_to_project_settings_mirror_branch_regex.rb
- def change
- add_column :project_settings, :mirror_branch_regex, :text
- end
- # rubocop:enable Migration/AddLimitToTextColumns
-end
diff --git a/db/migrate/20220927155407_add_column_inbound_job_token_scope_enabled_to_ci_cd_setting.rb b/db/migrate/20220927155407_add_column_inbound_job_token_scope_enabled_to_ci_cd_setting.rb
deleted file mode 100644
index 811138cd2f2..00000000000
--- a/db/migrate/20220927155407_add_column_inbound_job_token_scope_enabled_to_ci_cd_setting.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddColumnInboundJobTokenScopeEnabledToCiCdSetting < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def up
- add_column :project_ci_cd_settings, :inbound_job_token_scope_enabled, :boolean, default: false, null: false
- end
-
- def down
- remove_column :project_ci_cd_settings, :inbound_job_token_scope_enabled
- end
-end
diff --git a/db/migrate/20220928201920_create_project_wiki_repository_states.rb b/db/migrate/20220928201920_create_project_wiki_repository_states.rb
deleted file mode 100644
index 17ad5cf6b7a..00000000000
--- a/db/migrate/20220928201920_create_project_wiki_repository_states.rb
+++ /dev/null
@@ -1,44 +0,0 @@
-# frozen_string_literal: true
-
-class CreateProjectWikiRepositoryStates < Gitlab::Database::Migration[2.0]
- VERIFICATION_STATE_INDEX_NAME = "index_project_wiki_repository_states_on_verification_state"
- PENDING_VERIFICATION_INDEX_NAME = "index_project_wiki_repository_states_pending_verification"
- FAILED_VERIFICATION_INDEX_NAME = "index_project_wiki_repository_states_failed_verification"
- NEEDS_VERIFICATION_INDEX_NAME = "index_project_wiki_repository_states_needs_verification"
-
- enable_lock_retries!
-
- def up
- create_table :project_wiki_repository_states, id: false do |t|
- t.datetime_with_timezone :verification_started_at
- t.datetime_with_timezone :verification_retry_at
- t.datetime_with_timezone :verified_at
- t.references :project, primary_key: true, default: nil, index: false, foreign_key: { on_delete: :cascade }
- t.integer :verification_state, default: 0, limit: 2, null: false
- t.integer :verification_retry_count, limit: 2
- t.binary :verification_checksum, using: 'verification_checksum::bytea'
- t.text :verification_failure, limit: 255
-
- t.index :verification_state,
- name: VERIFICATION_STATE_INDEX_NAME
-
- t.index :verified_at,
- where: "(verification_state = 0)",
- order: { verified_at: 'ASC NULLS FIRST' },
- name: PENDING_VERIFICATION_INDEX_NAME
-
- t.index :verification_retry_at,
- where: "(verification_state = 3)",
- order: { verification_retry_at: 'ASC NULLS FIRST' },
- name: FAILED_VERIFICATION_INDEX_NAME
-
- t.index :verification_state,
- where: "(verification_state = 0 OR verification_state = 3)",
- name: NEEDS_VERIFICATION_INDEX_NAME
- end
- end
-
- def down
- drop_table :project_wiki_repository_states
- end
-end
diff --git a/db/migrate/20220929171925_add_pypi_package_requests_forwarding_to_namespace_package_settings.rb b/db/migrate/20220929171925_add_pypi_package_requests_forwarding_to_namespace_package_settings.rb
deleted file mode 100644
index e99640d471f..00000000000
--- a/db/migrate/20220929171925_add_pypi_package_requests_forwarding_to_namespace_package_settings.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-class AddPypiPackageRequestsForwardingToNamespacePackageSettings < Gitlab::Database::Migration[2.0]
- def change
- # adds columns to match the format used in
- # Gitlab::Database::MigrationHelpers::CascadingNamespaceSettings#add_cascading_namespace_setting
- add_column(:namespace_package_settings,
- :pypi_package_requests_forwarding,
- :boolean,
- null: true,
- default: nil
- )
-
- add_column(:namespace_package_settings,
- :lock_pypi_package_requests_forwarding,
- :boolean,
- default: false,
- null: false
- )
-
- add_column(:application_settings,
- :lock_pypi_package_requests_forwarding,
- :boolean,
- default: false,
- null: false
- )
- end
-end
diff --git a/db/migrate/20220929172356_add_npm_package_requests_forwarding_to_namespace_package_settings.rb b/db/migrate/20220929172356_add_npm_package_requests_forwarding_to_namespace_package_settings.rb
deleted file mode 100644
index 61cc2c26ec7..00000000000
--- a/db/migrate/20220929172356_add_npm_package_requests_forwarding_to_namespace_package_settings.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-class AddNpmPackageRequestsForwardingToNamespacePackageSettings < Gitlab::Database::Migration[2.0]
- def change
- # adds columns to match the format used in
- # Gitlab::Database::MigrationHelpers::CascadingNamespaceSettings#add_cascading_namespace_setting
- add_column(:namespace_package_settings,
- :npm_package_requests_forwarding,
- :boolean,
- null: true,
- default: nil
- )
-
- add_column(:namespace_package_settings,
- :lock_npm_package_requests_forwarding,
- :boolean,
- default: false,
- null: false
- )
-
- add_column(:application_settings,
- :lock_npm_package_requests_forwarding,
- :boolean,
- default: false,
- null: false
- )
- end
-end
diff --git a/db/migrate/20220930125609_add_migrated_to_state_transition_to_vulnerability_feedback.rb b/db/migrate/20220930125609_add_migrated_to_state_transition_to_vulnerability_feedback.rb
deleted file mode 100644
index b6736a71761..00000000000
--- a/db/migrate/20220930125609_add_migrated_to_state_transition_to_vulnerability_feedback.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddMigratedToStateTransitionToVulnerabilityFeedback < Gitlab::Database::Migration[2.0]
- def change
- add_column :vulnerability_feedback, :migrated_to_state_transition, :boolean, default: false
- end
-end
diff --git a/db/migrate/20221003151747_create_audit_events_streaming_event_type_filters.rb b/db/migrate/20221003151747_create_audit_events_streaming_event_type_filters.rb
deleted file mode 100644
index c0acbe75d78..00000000000
--- a/db/migrate/20221003151747_create_audit_events_streaming_event_type_filters.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class CreateAuditEventsStreamingEventTypeFilters < Gitlab::Database::Migration[2.0]
- UNIQ_INDEX_NAME = 'unique_streaming_event_type_filters_destination_id'
-
- def change
- create_table :audit_events_streaming_event_type_filters do |t|
- t.timestamps_with_timezone null: false
- t.references :external_audit_event_destination,
- null: false,
- index: false,
- foreign_key: { to_table: 'audit_events_external_audit_event_destinations', on_delete: :cascade }
- t.text :audit_event_type, null: false, limit: 255
-
- t.index [:external_audit_event_destination_id, :audit_event_type], unique: true, name: UNIQ_INDEX_NAME
- end
- end
-end
diff --git a/db/migrate/20221005072353_create_incident_management_timeline_event_tags.rb b/db/migrate/20221005072353_create_incident_management_timeline_event_tags.rb
deleted file mode 100644
index c046548af01..00000000000
--- a/db/migrate/20221005072353_create_incident_management_timeline_event_tags.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class CreateIncidentManagementTimelineEventTags < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def up
- create_table :incident_management_timeline_event_tags do |t|
- t.timestamps_with_timezone null: false
- t.references :project, null: false, index: false, foreign_key: { on_delete: :cascade }
- t.text :name, limit: 255, null: false
-
- t.index [:project_id, :name], unique: true, name: 'index_im_timeline_event_tags_name_project_id'
- end
- end
-
- def down
- drop_table :incident_management_timeline_event_tags
- end
-end
diff --git a/db/migrate/20221005094926_create_incident_management_timeline_event_tag_links.rb b/db/migrate/20221005094926_create_incident_management_timeline_event_tag_links.rb
deleted file mode 100644
index b3ec8f97738..00000000000
--- a/db/migrate/20221005094926_create_incident_management_timeline_event_tag_links.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-# frozen_string_literal: true
-
-class CreateIncidentManagementTimelineEventTagLinks < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def up
- create_table :incident_management_timeline_event_tag_links do |t|
- t.references :timeline_event,
- null: false,
- index: { name: 'index_im_timeline_event_id' },
- foreign_key: { to_table: :incident_management_timeline_events, column: :timeline_event_id, on_delete: :cascade }
-
- t.references :timeline_event_tag,
- null: false,
- index: false,
- foreign_key: {
- to_table: :incident_management_timeline_event_tags,
- column: :timeline_event_tag_id,
- on_delete: :cascade
- }
-
- t.index [:timeline_event_tag_id, :timeline_event_id],
- unique: true,
- name: 'index_im_timeline_event_tags_on_tag_id_and_event_id'
-
- t.datetime_with_timezone :created_at, null: false
- end
- end
-
- def down
- drop_table :incident_management_timeline_event_tag_links
- end
-end
diff --git a/db/migrate/20221005103010_add_index_project_id_on_scan_finding_approval_project_rules.rb b/db/migrate/20221005103010_add_index_project_id_on_scan_finding_approval_project_rules.rb
deleted file mode 100644
index 990188aa418..00000000000
--- a/db/migrate/20221005103010_add_index_project_id_on_scan_finding_approval_project_rules.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexProjectIdOnScanFindingApprovalProjectRules < Gitlab::Database::Migration[2.0]
- INDEX_NAME_ALL = 'scan_finding_approval_project_rule_index_project_id'
- INDEX_NAME_28D = 'scan_finding_approval_project_rule_index_created_at_project_id'
- SCAN_FINDING_REPORT_TYPE = 4
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :approval_project_rules, %i[created_at project_id],
- where: "report_type = #{SCAN_FINDING_REPORT_TYPE}", name: INDEX_NAME_28D
-
- add_concurrent_index :approval_project_rules, :project_id,
- where: "report_type = #{SCAN_FINDING_REPORT_TYPE}", name: INDEX_NAME_ALL
- end
-
- def down
- remove_concurrent_index_by_name :approval_project_rules, INDEX_NAME_ALL
- remove_concurrent_index_by_name :approval_project_rules, INDEX_NAME_28D
- end
-end
diff --git a/db/migrate/20221006131506_add_free_user_cap_over_limit_notified_at_to_namespace_details.rb b/db/migrate/20221006131506_add_free_user_cap_over_limit_notified_at_to_namespace_details.rb
deleted file mode 100644
index 7237eee18f0..00000000000
--- a/db/migrate/20221006131506_add_free_user_cap_over_limit_notified_at_to_namespace_details.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class AddFreeUserCapOverLimitNotifiedAtToNamespaceDetails < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- TABLE_NAME = 'namespace_details'
- COLUMN_NAME = 'free_user_cap_over_limit_notified_at'
-
- def up
- with_lock_retries do
- add_column(TABLE_NAME, COLUMN_NAME, :datetime_with_timezone)
- end
- end
-
- def down
- with_lock_retries do
- remove_column TABLE_NAME, COLUMN_NAME
- end
- end
-end
diff --git a/db/migrate/20221006141145_add_targets_to_elastic_reindexing_tasks.rb b/db/migrate/20221006141145_add_targets_to_elastic_reindexing_tasks.rb
deleted file mode 100644
index 1631f8ae57e..00000000000
--- a/db/migrate/20221006141145_add_targets_to_elastic_reindexing_tasks.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddTargetsToElasticReindexingTasks < Gitlab::Database::Migration[2.0]
- def change
- add_column :elastic_reindexing_tasks, :targets, :text, array: true
- end
-end
diff --git a/db/migrate/20221008032350_add_password_expiration_migration.rb b/db/migrate/20221008032350_add_password_expiration_migration.rb
deleted file mode 100644
index 7dbc73294bb..00000000000
--- a/db/migrate/20221008032350_add_password_expiration_migration.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-# frozen_string_literal: true
-
-class AddPasswordExpirationMigration < Gitlab::Database::Migration[2.0]
- def change
- add_column :application_settings, :password_expiration_enabled, :boolean, default: false, null: false,
- comment: 'JiHu-specific column'
- add_column :application_settings, :password_expires_in_days, :integer, default: 90, null: false,
- comment: 'JiHu-specific column'
- add_column :application_settings, :password_expires_notice_before_days, :integer, default: 7, null: false,
- comment: 'JiHu-specific column'
- end
-end
diff --git a/db/migrate/20221009085130_add_mr_checks_columns_to_namespace_settings.rb b/db/migrate/20221009085130_add_mr_checks_columns_to_namespace_settings.rb
deleted file mode 100644
index 947a662575a..00000000000
--- a/db/migrate/20221009085130_add_mr_checks_columns_to_namespace_settings.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# frozen_string_literal: true
-
-class AddMrChecksColumnsToNamespaceSettings < Gitlab::Database::Migration[2.0]
- def change
- add_column :namespace_settings, :only_allow_merge_if_pipeline_succeeds, :boolean, default: false, null: false
- add_column :namespace_settings, :allow_merge_on_skipped_pipeline, :boolean, default: false, null: false
- add_column :namespace_settings, :only_allow_merge_if_all_discussions_are_resolved, \
- :boolean, default: false, null: false
- end
-end
diff --git a/db/migrate/20221010103207_add_product_analytics_enabled_to_application_settings.rb b/db/migrate/20221010103207_add_product_analytics_enabled_to_application_settings.rb
deleted file mode 100644
index 24887e7b9fb..00000000000
--- a/db/migrate/20221010103207_add_product_analytics_enabled_to_application_settings.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddProductAnalyticsEnabledToApplicationSettings < Gitlab::Database::Migration[2.0]
- def change
- add_column :application_settings, :product_analytics_enabled, :boolean, default: false, null: false
- end
-end
diff --git a/db/migrate/20221010121807_add_compliance_framework_id_to_namespace_settings.rb b/db/migrate/20221010121807_add_compliance_framework_id_to_namespace_settings.rb
deleted file mode 100644
index e07f19242d5..00000000000
--- a/db/migrate/20221010121807_add_compliance_framework_id_to_namespace_settings.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddComplianceFrameworkIdToNamespaceSettings < Gitlab::Database::Migration[2.0]
- def change
- add_column :namespace_settings, :default_compliance_framework_id, :bigint
- end
-end
diff --git a/db/migrate/20221010184839_add_new_amount_used_to_ci_project_monthly_usages.rb b/db/migrate/20221010184839_add_new_amount_used_to_ci_project_monthly_usages.rb
deleted file mode 100644
index 5c77dfe9334..00000000000
--- a/db/migrate/20221010184839_add_new_amount_used_to_ci_project_monthly_usages.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# frozen_string_literal: true
-
-class AddNewAmountUsedToCiProjectMonthlyUsages < Gitlab::Database::Migration[2.0]
- TABLE = :ci_project_monthly_usages
- OLD_COLUMN = :amount_used
- NEW_COLUMN = :new_amount_used
- TRIGGER_NAME = 'sync_projects_amount_used_columns'
-
- disable_ddl_transaction!
-
- def up
- check_trigger_permissions!(TABLE)
-
- add_column(TABLE, NEW_COLUMN, :decimal, default: 0.0, precision: 18, scale: 4, null: false, if_not_exists: true)
-
- install_rename_triggers(TABLE, OLD_COLUMN, NEW_COLUMN, trigger_name: TRIGGER_NAME)
- end
-
- def down
- remove_rename_triggers(TABLE, TRIGGER_NAME)
-
- remove_column(TABLE, NEW_COLUMN)
- end
-end
diff --git a/db/migrate/20221010201815_add_purl_type_to_sbom_components.rb b/db/migrate/20221010201815_add_purl_type_to_sbom_components.rb
deleted file mode 100644
index 3ab2aa262b1..00000000000
--- a/db/migrate/20221010201815_add_purl_type_to_sbom_components.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddPurlTypeToSbomComponents < Gitlab::Database::Migration[2.0]
- def change
- add_column :sbom_components, :purl_type, :smallint
- end
-end
diff --git a/db/migrate/20221010202339_remove_unique_index_on_sbom_components_type_and_name.rb b/db/migrate/20221010202339_remove_unique_index_on_sbom_components_type_and_name.rb
deleted file mode 100644
index fe092232ca6..00000000000
--- a/db/migrate/20221010202339_remove_unique_index_on_sbom_components_type_and_name.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveUniqueIndexOnSbomComponentsTypeAndName < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_sbom_components_on_component_type_and_name'
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :sbom_components, name: INDEX_NAME
- end
-
- def down
- add_concurrent_index :sbom_components, [:component_type, :name], unique: true, name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20221010202408_add_unique_index_on_sbom_components_type_name_and_purl_type.rb b/db/migrate/20221010202408_add_unique_index_on_sbom_components_type_name_and_purl_type.rb
deleted file mode 100644
index 5935db7c2c1..00000000000
--- a/db/migrate/20221010202408_add_unique_index_on_sbom_components_type_name_and_purl_type.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddUniqueIndexOnSbomComponentsTypeNameAndPurlType < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_sbom_components_on_component_type_name_and_purl_type'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :sbom_components, [:name, :purl_type, :component_type], unique: true, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :sbom_components, name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20221011162637_add_partial_index_project_incident_management_settings_on_project_id_and_sla_timer.rb b/db/migrate/20221011162637_add_partial_index_project_incident_management_settings_on_project_id_and_sla_timer.rb
deleted file mode 100644
index 4238311005c..00000000000
--- a/db/migrate/20221011162637_add_partial_index_project_incident_management_settings_on_project_id_and_sla_timer.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddPartialIndexProjectIncidentManagementSettingsOnProjectIdAndSlaTimer < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_project_incident_management_settings_on_p_id_sla_timer'
-
- def up
- add_concurrent_index :project_incident_management_settings, :project_id,
- name: INDEX_NAME,
- where: 'sla_timer = TRUE'
- end
-
- def down
- remove_concurrent_index_by_name :project_incident_management_settings, name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20221011210455_add_use_legacy_web_ide_to_user_preferences.rb b/db/migrate/20221011210455_add_use_legacy_web_ide_to_user_preferences.rb
deleted file mode 100644
index 1b434e10ab0..00000000000
--- a/db/migrate/20221011210455_add_use_legacy_web_ide_to_user_preferences.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddUseLegacyWebIdeToUserPreferences < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- add_column :user_preferences, :use_legacy_web_ide, :boolean, default: false, null: false
- end
-end
diff --git a/db/migrate/20221012033107_add_password_last_changed_at_to_user_details.rb b/db/migrate/20221012033107_add_password_last_changed_at_to_user_details.rb
deleted file mode 100644
index db2f411ab92..00000000000
--- a/db/migrate/20221012033107_add_password_last_changed_at_to_user_details.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddPasswordLastChangedAtToUserDetails < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- add_column :user_details, :password_last_changed_at, :datetime_with_timezone, comment: 'JiHu-specific column'
- end
-end
diff --git a/db/migrate/20221012135524_add_scan_file_path_limit_for_dast_site_profile.rb b/db/migrate/20221012135524_add_scan_file_path_limit_for_dast_site_profile.rb
deleted file mode 100644
index ab8846c8043..00000000000
--- a/db/migrate/20221012135524_add_scan_file_path_limit_for_dast_site_profile.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddScanFilePathLimitForDastSiteProfile < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :dast_site_profiles, :scan_file_path, 1024
- end
-
- def down
- remove_text_limit :dast_site_profiles, :scan_file_path
- end
-end
diff --git a/db/migrate/20221013103738_add_disable_admin_oauth_scopes.rb b/db/migrate/20221013103738_add_disable_admin_oauth_scopes.rb
deleted file mode 100644
index 3406252790d..00000000000
--- a/db/migrate/20221013103738_add_disable_admin_oauth_scopes.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddDisableAdminOauthScopes < Gitlab::Database::Migration[2.0]
- def change
- add_column :application_settings, :disable_admin_oauth_scopes, :boolean, null: false, default: false
- end
-end
diff --git a/db/migrate/20221014031033_add_temp_index_to_project_features_where_releases_access_level_gt_repository.rb b/db/migrate/20221014031033_add_temp_index_to_project_features_where_releases_access_level_gt_repository.rb
deleted file mode 100644
index 14077e30780..00000000000
--- a/db/migrate/20221014031033_add_temp_index_to_project_features_where_releases_access_level_gt_repository.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class AddTempIndexToProjectFeaturesWhereReleasesAccessLevelGtRepository < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'tmp_idx_project_features_on_releases_al_and_repo_al_partial'
-
- # Temporary index to be removed in 15.6 https://gitlab.com/gitlab-org/gitlab/-/issues/377915
- def up
- add_concurrent_index :project_features,
- [:releases_access_level, :repository_access_level],
- name: INDEX_NAME,
- where: 'releases_access_level > repository_access_level'
- end
-
- def down
- remove_concurrent_index_by_name :project_features, INDEX_NAME
- end
-end
diff --git a/db/migrate/20221014034338_populate_releases_access_level_from_repository.rb b/db/migrate/20221014034338_populate_releases_access_level_from_repository.rb
deleted file mode 100644
index 37797aa65f3..00000000000
--- a/db/migrate/20221014034338_populate_releases_access_level_from_repository.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-class PopulateReleasesAccessLevelFromRepository < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- disable_ddl_transaction!
-
- def up
- update_column_in_batches( # rubocop: disable Migration/UpdateColumnInBatches
- :project_features,
- :releases_access_level,
- Arel.sql('repository_access_level')
- ) do |table, query|
- query.where(table[:releases_access_level].gt(table[:repository_access_level]))
- end
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/migrate/20221014190040_drop_notes_note_trigram_index.rb b/db/migrate/20221014190040_drop_notes_note_trigram_index.rb
deleted file mode 100644
index efa35b24d98..00000000000
--- a/db/migrate/20221014190040_drop_notes_note_trigram_index.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class DropNotesNoteTrigramIndex < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_notes_on_note_gin_trigram'
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :notes, INDEX_NAME
- end
-
- def down
- # no-op
- # we never want to add this index back since it doesn't exist in production
- # we are only using this migration to cleanup other environments where this index does exist
- end
-end
diff --git a/db/migrate/20221015000511_add_email_confirmation_setting_to_application_settings.rb b/db/migrate/20221015000511_add_email_confirmation_setting_to_application_settings.rb
deleted file mode 100644
index 42fa4c1baf5..00000000000
--- a/db/migrate/20221015000511_add_email_confirmation_setting_to_application_settings.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddEmailConfirmationSettingToApplicationSettings < Gitlab::Database::Migration[2.0]
- def change
- add_column :application_settings, :email_confirmation_setting, :integer, limit: 2, default: 2
- end
-end
diff --git a/db/migrate/20221017084208_rename_ci_pipeline_metadata_title.rb b/db/migrate/20221017084208_rename_ci_pipeline_metadata_title.rb
deleted file mode 100644
index 3c1a3bbd40a..00000000000
--- a/db/migrate/20221017084208_rename_ci_pipeline_metadata_title.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class RenameCiPipelineMetadataTitle < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- rename_column_concurrently :ci_pipeline_metadata, :title, :name, batch_column_name: :pipeline_id
- end
-
- def down
- undo_rename_column_concurrently :ci_pipeline_metadata, :title, :name
- end
-end
diff --git a/db/migrate/20221018050323_add_objective_and_keyresult_to_work_item_types.rb b/db/migrate/20221018050323_add_objective_and_keyresult_to_work_item_types.rb
deleted file mode 100644
index 51834a3b19b..00000000000
--- a/db/migrate/20221018050323_add_objective_and_keyresult_to_work_item_types.rb
+++ /dev/null
@@ -1,56 +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 AddObjectiveAndKeyresultToWorkItemTypes < Gitlab::Database::Migration[2.0]
- # Added the following statements as per https://docs.gitlab.com/ee/development/database/migrations_for_multiple_databases.html
- disable_ddl_transaction!
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- OBJECTIVE_ENUM_VALUE = 5
- KEY_RESULT_ENUM_VALUE = 6
-
- class WorkItemType < MigrationRecord
- self.inheritance_column = :_type_disabled
- self.table_name = 'work_item_types'
- end
-
- def up
- # New instances will not run this migration and add this type via fixtures
- # checking if record exists mostly because migration specs will run all migrations
- # and that will conflict with the preloaded base work item types
- objective_work_item = WorkItemType.find_by(base_type: OBJECTIVE_ENUM_VALUE, name: 'Objective', namespace_id: nil)
- key_result_work_item = WorkItemType.find_by(base_type: KEY_RESULT_ENUM_VALUE, name: 'Key Result', namespace_id: nil)
-
- if objective_work_item
- say('Objective item record exist, skipping creation')
- else
- execute(
- <<~SQL
- INSERT INTO work_item_types (base_type, icon_name, name, created_at, updated_at) VALUES(
- #{OBJECTIVE_ENUM_VALUE}, 'issue-type-objective', 'Objective', NOW(), NOW()
- ) ON CONFLICT DO NOTHING;
- SQL
- )
- end
-
- if key_result_work_item
- say('Keyresult item record exist, skipping creation')
- else
- execute(
- <<~SQL
- INSERT INTO work_item_types (base_type, icon_name, name, created_at, updated_at) VALUES(
- #{KEY_RESULT_ENUM_VALUE}, 'issue-type-keyresult', 'Key Result', NOW(), NOW()
- ) ON CONFLICT DO NOTHING;
- SQL
- )
- end
- end
-
- def down
- # There's the remote possibility that issues could already be
- # using this issue type, with a tight foreign constraint.
- # Therefore we will not attempt to remove any data.
- end
-end
diff --git a/db/migrate/20221018081416_members_remove_member_namespace_id_not_null_constraint.rb b/db/migrate/20221018081416_members_remove_member_namespace_id_not_null_constraint.rb
deleted file mode 100644
index e4cbcd24bc4..00000000000
--- a/db/migrate/20221018081416_members_remove_member_namespace_id_not_null_constraint.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class MembersRemoveMemberNamespaceIdNotNullConstraint < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- CONSTRAINT_NAME = 'check_508774aac0'
-
- def up
- remove_not_null_constraint :members, :member_namespace_id, constraint_name: CONSTRAINT_NAME
- end
-
- def down
- add_not_null_constraint :members, :member_namespace_id, validate: false, constraint_name: CONSTRAINT_NAME
- end
-end
diff --git a/db/migrate/20221018092552_add_file_name_index_to_packages_rpm_repository_files.rb b/db/migrate/20221018092552_add_file_name_index_to_packages_rpm_repository_files.rb
deleted file mode 100644
index fcec3a6800d..00000000000
--- a/db/migrate/20221018092552_add_file_name_index_to_packages_rpm_repository_files.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddFileNameIndexToPackagesRpmRepositoryFiles < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- NEW_INDEX_NAME = 'index_packages_rpm_repository_files_on_project_id_and_file_name'
- OLD_INDEX_NAME = 'index_packages_rpm_repository_files_on_project_id'
-
- def up
- add_concurrent_index :packages_rpm_repository_files, %i[project_id file_name], name: NEW_INDEX_NAME
- remove_concurrent_index :packages_rpm_repository_files, :project_id, name: OLD_INDEX_NAME
- end
-
- def down
- add_concurrent_index :packages_rpm_repository_files, :project_id, name: OLD_INDEX_NAME
- remove_concurrent_index :packages_rpm_repository_files, %i[project_id file_name], name: NEW_INDEX_NAME
- end
-end
diff --git a/db/migrate/20221018124029_add_consume_after_to_ghost_user_migrations.rb b/db/migrate/20221018124029_add_consume_after_to_ghost_user_migrations.rb
deleted file mode 100644
index 148c6516dc9..00000000000
--- a/db/migrate/20221018124029_add_consume_after_to_ghost_user_migrations.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddConsumeAfterToGhostUserMigrations < Gitlab::Database::Migration[2.0]
- def change
- add_column :ghost_user_migrations, :consume_after, :datetime_with_timezone, null: false, default: -> { 'NOW()' }
- end
-end
diff --git a/db/migrate/20221018124035_add_consume_after_index_to_ghost_user_migrations.rb b/db/migrate/20221018124035_add_consume_after_index_to_ghost_user_migrations.rb
deleted file mode 100644
index 543d91b3f33..00000000000
--- a/db/migrate/20221018124035_add_consume_after_index_to_ghost_user_migrations.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddConsumeAfterIndexToGhostUserMigrations < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_ghost_user_migrations_on_consume_after_id'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :ghost_user_migrations, [:consume_after, :id], name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :ghost_user_migrations, INDEX_NAME
- end
-end
diff --git a/db/migrate/20221018202524_create_dependency_proxy_blob_states.rb b/db/migrate/20221018202524_create_dependency_proxy_blob_states.rb
deleted file mode 100644
index b042df43f04..00000000000
--- a/db/migrate/20221018202524_create_dependency_proxy_blob_states.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-# frozen_string_literal: true
-
-class CreateDependencyProxyBlobStates < Gitlab::Database::Migration[2.0]
- VERIFICATION_STATE_INDEX_NAME = "index_dependency_proxy_blob_states_on_verification_state"
- PENDING_VERIFICATION_INDEX_NAME = "index_dependency_proxy_blob_states_pending_verification"
- FAILED_VERIFICATION_INDEX_NAME = "index_dependency_proxy_blob_states_failed_verification"
- NEEDS_VERIFICATION_INDEX_NAME = "index_dependency_proxy_blob_states_needs_verification"
-
- enable_lock_retries!
-
- def up
- table_comment = {
- owner: 'group::geo',
- description: 'Geo-specific table to store the verification state of DependencyProxy::Blob objects'
- }
-
- create_table :dependency_proxy_blob_states, id: false, comment: Gitlab::Json.dump(table_comment) do |t|
- t.datetime_with_timezone :verification_started_at
- t.datetime_with_timezone :verification_retry_at
- t.datetime_with_timezone :verified_at
- t.references :dependency_proxy_blob,
- primary_key: true,
- default: nil,
- index: true,
- foreign_key: { on_delete: :cascade }
- t.integer :verification_state, default: 0, limit: 2, null: false
- t.integer :verification_retry_count, default: 0, limit: 2, null: false
- t.binary :verification_checksum, using: 'verification_checksum::bytea'
- t.text :verification_failure, limit: 255
-
- t.index :verification_state, name: VERIFICATION_STATE_INDEX_NAME
- t.index :verified_at,
- where: "(verification_state = 0)",
- order: { verified_at: 'ASC NULLS FIRST' },
- name: PENDING_VERIFICATION_INDEX_NAME
- t.index :verification_retry_at,
- where: "(verification_state = 3)",
- order: { verification_retry_at: 'ASC NULLS FIRST' },
- name: FAILED_VERIFICATION_INDEX_NAME
- t.index :verification_state,
- where: "(verification_state = 0 OR verification_state = 3)",
- name: NEEDS_VERIFICATION_INDEX_NAME
- end
- end
-
- def down
- drop_table :dependency_proxy_blob_states
- end
-end
diff --git a/db/migrate/20221020124018_add_delete_started_at_to_container_repositories.rb b/db/migrate/20221020124018_add_delete_started_at_to_container_repositories.rb
deleted file mode 100644
index c225d9cc343..00000000000
--- a/db/migrate/20221020124018_add_delete_started_at_to_container_repositories.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class AddDeleteStartedAtToContainerRepositories < Gitlab::Database::Migration[2.0]
- def change
- add_column :container_repositories,
- :delete_started_at,
- :datetime_with_timezone,
- null: true,
- default: nil
- end
-end
diff --git a/db/migrate/20221021213216_create_namespace_commit_emails.rb b/db/migrate/20221021213216_create_namespace_commit_emails.rb
deleted file mode 100644
index 07811bf7b75..00000000000
--- a/db/migrate/20221021213216_create_namespace_commit_emails.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: true
-
-class CreateNamespaceCommitEmails < Gitlab::Database::Migration[2.0]
- def change
- create_table :namespace_commit_emails do |t|
- t.references :user, index: false, null: false, foreign_key: { on_delete: :cascade }
- t.references :namespace, null: false
- t.references :email, null: false
- t.timestamps_with_timezone null: false
-
- t.index [:user_id, :namespace_id], unique: true
- end
- end
-end
diff --git a/db/migrate/20221022213505_add_namespace_commit_emails_namespace_fk.rb b/db/migrate/20221022213505_add_namespace_commit_emails_namespace_fk.rb
deleted file mode 100644
index 0c543b03397..00000000000
--- a/db/migrate/20221022213505_add_namespace_commit_emails_namespace_fk.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddNamespaceCommitEmailsNamespaceFk < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :namespace_commit_emails, :namespaces, column: :namespace_id, on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :namespace_commit_emails, column: :namespace_id
- end
- end
-end
diff --git a/db/migrate/20221022213521_add_namespace_commit_emails_email_fk.rb b/db/migrate/20221022213521_add_namespace_commit_emails_email_fk.rb
deleted file mode 100644
index 9dbde26475c..00000000000
--- a/db/migrate/20221022213521_add_namespace_commit_emails_email_fk.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddNamespaceCommitEmailsEmailFk < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :namespace_commit_emails, :emails, column: :email_id, on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :namespace_commit_emails, column: :email_id
- end
- end
-end
diff --git a/db/migrate/20221025043930_change_default_value_on_password_last_changed_at_to_user_details.rb b/db/migrate/20221025043930_change_default_value_on_password_last_changed_at_to_user_details.rb
deleted file mode 100644
index 49436043a66..00000000000
--- a/db/migrate/20221025043930_change_default_value_on_password_last_changed_at_to_user_details.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class ChangeDefaultValueOnPasswordLastChangedAtToUserDetails < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- # rubocop:disable Migration/RemoveColumn
- def change
- remove_column :user_details, :password_last_changed_at, :datetime_with_timezone
- add_column :user_details, :password_last_changed_at, :datetime_with_timezone,
- null: false, default: -> { 'NOW()' }, comment: 'JiHu-specific column'
- end
- # rubocop:enable Migration/RemoveColumn
-end
diff --git a/db/migrate/20221025105205_add_status_and_id_index_to_container_repositories.rb b/db/migrate/20221025105205_add_status_and_id_index_to_container_repositories.rb
deleted file mode 100644
index 380ffd2e484..00000000000
--- a/db/migrate/20221025105205_add_status_and_id_index_to_container_repositories.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddStatusAndIdIndexToContainerRepositories < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_container_repositories_on_status_and_id'
-
- def up
- add_concurrent_index :container_repositories, [:status, :id], name: INDEX_NAME, where: 'status IS NOT NULL'
- end
-
- def down
- remove_concurrent_index :container_repositories, [:status, :id], name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20221025145452_change_vulnerability_feedback_unique_idx.rb b/db/migrate/20221025145452_change_vulnerability_feedback_unique_idx.rb
deleted file mode 100644
index 677245e1f50..00000000000
--- a/db/migrate/20221025145452_change_vulnerability_feedback_unique_idx.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# frozen_string_literal: true
-
-class ChangeVulnerabilityFeedbackUniqueIdx < Gitlab::Database::Migration[2.0]
- NEW_INDEX_NAME = :index_vulnerability_feedback_on_common_attributes
- OLD_INDEX_NAME = :vulnerability_feedback_unique_idx
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :vulnerability_feedback,
- %i[project_id category feedback_type project_fingerprint],
- name: NEW_INDEX_NAME
-
- remove_concurrent_index_by_name :vulnerability_feedback, OLD_INDEX_NAME
- end
-
- def down
- add_concurrent_index :vulnerability_feedback,
- %i[project_id category feedback_type project_fingerprint],
- name: OLD_INDEX_NAME,
- unique: true
-
- remove_concurrent_index_by_name :vulnerability_feedback, NEW_INDEX_NAME
- end
-end
diff --git a/db/migrate/20221025150202_add_index_for_finding_uuid_and_feedback_type_on_feedback.rb b/db/migrate/20221025150202_add_index_for_finding_uuid_and_feedback_type_on_feedback.rb
deleted file mode 100644
index f909573937b..00000000000
--- a/db/migrate/20221025150202_add_index_for_finding_uuid_and_feedback_type_on_feedback.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexForFindingUuidAndFeedbackTypeOnFeedback < Gitlab::Database::Migration[2.0]
- INDEX_NAME = :index_vulnerability_feedback_on_feedback_type_and_finding_uuid
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :vulnerability_feedback, %i[feedback_type finding_uuid], name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :vulnerability_feedback, INDEX_NAME
- end
-end
diff --git a/db/migrate/20221027124848_add_text_limit_to_project_settings_mirror_branch_regex.rb b/db/migrate/20221027124848_add_text_limit_to_project_settings_mirror_branch_regex.rb
deleted file mode 100644
index e87eb207204..00000000000
--- a/db/migrate/20221027124848_add_text_limit_to_project_settings_mirror_branch_regex.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddTextLimitToProjectSettingsMirrorBranchRegex < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :project_settings, :mirror_branch_regex, 255
- end
-
- def down
- remove_text_limit :project_settings, :mirror_branch_regex
- end
-end
diff --git a/db/migrate/20221028015347_add_commit_committer_name_check_to_push_rules.rb b/db/migrate/20221028015347_add_commit_committer_name_check_to_push_rules.rb
deleted file mode 100644
index e9a0887f353..00000000000
--- a/db/migrate/20221028015347_add_commit_committer_name_check_to_push_rules.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddCommitCommitterNameCheckToPushRules < Gitlab::Database::Migration[2.0]
- def change
- add_column :push_rules, :commit_committer_name_check, :boolean, default: false, null: false
- end
-end
diff --git a/db/migrate/20221028152422_add_finding_data_column_to_security_findings.rb b/db/migrate/20221028152422_add_finding_data_column_to_security_findings.rb
deleted file mode 100644
index a5d3929579b..00000000000
--- a/db/migrate/20221028152422_add_finding_data_column_to_security_findings.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddFindingDataColumnToSecurityFindings < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def up
- add_column :security_findings, :finding_data, :jsonb, default: {}, null: false
- end
-
- def down
- remove_column :security_findings, :finding_data
- end
-end
diff --git a/db/migrate/20221031102916_add_users_foreign_key_to_projects.rb b/db/migrate/20221031102916_add_users_foreign_key_to_projects.rb
deleted file mode 100644
index fb37b3b37c2..00000000000
--- a/db/migrate/20221031102916_add_users_foreign_key_to_projects.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddUsersForeignKeyToProjects < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :projects, :users, column: :creator_id, on_delete: :nullify, validate: false
- end
-
- def down
- with_lock_retries do
- remove_foreign_key_if_exists :projects, column: :creator_id
- end
- end
-end
diff --git a/db/migrate/20221101032521_add_default_preferred_language_to_application_settings.rb b/db/migrate/20221101032521_add_default_preferred_language_to_application_settings.rb
deleted file mode 100644
index d6941f95465..00000000000
--- a/db/migrate/20221101032521_add_default_preferred_language_to_application_settings.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# frozen_string_literal: true
-
-class AddDefaultPreferredLanguageToApplicationSettings < Gitlab::Database::Migration[2.0]
- def change
- # rubocop:disable Migration/AddLimitToTextColumns
- # limit is added in 20221101032600_add_text_limit_to_default_preferred_language_on_application_settings.rb
- add_column :application_settings, :default_preferred_language, :text, default: 'en', null: false
- # rubocop:enable Migration/AddLimitToTextColumns
- end
-end
diff --git a/db/migrate/20221101032600_add_text_limit_to_default_preferred_language_on_application_settings.rb b/db/migrate/20221101032600_add_text_limit_to_default_preferred_language_on_application_settings.rb
deleted file mode 100644
index 1f6b9815b93..00000000000
--- a/db/migrate/20221101032600_add_text_limit_to_default_preferred_language_on_application_settings.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddTextLimitToDefaultPreferredLanguageOnApplicationSettings < Gitlab::Database::Migration[2.0]
- MAXIMUM_LIMIT = 32
-
- disable_ddl_transaction!
-
- def up
- add_text_limit :application_settings, :default_preferred_language, MAXIMUM_LIMIT
- end
-
- def down
- remove_text_limit :application_settings, :default_preferred_language
- end
-end
diff --git a/db/migrate/20221101195903_change_email_confirmation_setting_default.rb b/db/migrate/20221101195903_change_email_confirmation_setting_default.rb
deleted file mode 100644
index 86c1896f184..00000000000
--- a/db/migrate/20221101195903_change_email_confirmation_setting_default.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class ChangeEmailConfirmationSettingDefault < Gitlab::Database::Migration[2.0]
- def change
- change_column_default(:application_settings, :email_confirmation_setting, from: 2, to: 0)
- end
-end
diff --git a/db/migrate/20221101201031_set_email_confirmation_setting_from_send_user_confirmation_email_setting.rb b/db/migrate/20221101201031_set_email_confirmation_setting_from_send_user_confirmation_email_setting.rb
deleted file mode 100644
index 0c0a0dc1a58..00000000000
--- a/db/migrate/20221101201031_set_email_confirmation_setting_from_send_user_confirmation_email_setting.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class SetEmailConfirmationSettingFromSendUserConfirmationEmailSetting < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- class ApplicationSetting < MigrationRecord
- self.table_name = 'application_settings'
- end
-
- def up
- return unless ApplicationSetting.exists?
- return unless ApplicationSetting.last.send_user_confirmation_email
-
- ApplicationSetting.last.update(email_confirmation_setting: 2)
- end
-
- def down
- return unless ApplicationSetting.exists?
-
- ApplicationSetting.last.update(email_confirmation_setting: 0)
- end
-end
diff --git a/db/migrate/20221102202130_extend_x509_subject_limit.rb b/db/migrate/20221102202130_extend_x509_subject_limit.rb
deleted file mode 100644
index 3e6bfc7691c..00000000000
--- a/db/migrate/20221102202130_extend_x509_subject_limit.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class ExtendX509SubjectLimit < Gitlab::Database::Migration[2.0]
- def up
- change_column :x509_certificates, :subject, :string, limit: 512
- end
-
- def down
- change_column :x509_certificates, :subject, :string, limit: 255
- end
-end
diff --git a/db/migrate/20221102225800_add_max_seats_used_changed_at_index_to_gitlab_subscriptions.rb b/db/migrate/20221102225800_add_max_seats_used_changed_at_index_to_gitlab_subscriptions.rb
deleted file mode 100644
index b5cf8289673..00000000000
--- a/db/migrate/20221102225800_add_max_seats_used_changed_at_index_to_gitlab_subscriptions.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddMaxSeatsUsedChangedAtIndexToGitlabSubscriptions < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_gitlab_subscriptions_on_max_seats_used_changed_at'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :gitlab_subscriptions, [:max_seats_used_changed_at, :namespace_id], name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :gitlab_subscriptions, INDEX_NAME
- end
-end
diff --git a/db/migrate/20221103131409_add_partial_index_on_primary_key_of_security_scans.rb b/db/migrate/20221103131409_add_partial_index_on_primary_key_of_security_scans.rb
deleted file mode 100644
index f3defcd38c6..00000000000
--- a/db/migrate/20221103131409_add_partial_index_on_primary_key_of_security_scans.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddPartialIndexOnPrimaryKeyOfSecurityScans < Gitlab::Database::Migration[2.0]
- INDEX_NAME = :index_security_scans_on_id_for_non_purged_records
- PURGED_STATE = 6
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :security_scans, :id, where: "status != #{PURGED_STATE}", name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :security_scans, INDEX_NAME
- end
-end
diff --git a/db/migrate/20221104061320_add_disable_download_button_into_application_settings.rb b/db/migrate/20221104061320_add_disable_download_button_into_application_settings.rb
deleted file mode 100644
index b93085b8617..00000000000
--- a/db/migrate/20221104061320_add_disable_download_button_into_application_settings.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-# frozen_string_literal: true
-
-class AddDisableDownloadButtonIntoApplicationSettings < Gitlab::Database::Migration[2.0]
- def change
- add_column :application_settings, :disable_download_button, :boolean,
- null: false, default: false, comment: 'JiHu-specific column'
- end
-end
diff --git a/db/migrate/20221104094042_remove_users_foreign_key_to_projects.rb b/db/migrate/20221104094042_remove_users_foreign_key_to_projects.rb
deleted file mode 100644
index 19497c80b8e..00000000000
--- a/db/migrate/20221104094042_remove_users_foreign_key_to_projects.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveUsersForeignKeyToProjects < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- remove_foreign_key_if_exists :projects, column: :creator_id
- end
- end
-
- def down
- add_concurrent_foreign_key :projects, :users, column: :creator_id, on_delete: :nullify, validate: false
- end
-end
diff --git a/db/migrate/20221107115247_change_scim_identity_group_id_remove_null.rb b/db/migrate/20221107115247_change_scim_identity_group_id_remove_null.rb
deleted file mode 100644
index f68cab68261..00000000000
--- a/db/migrate/20221107115247_change_scim_identity_group_id_remove_null.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# frozen_string_literal: true
-class ChangeScimIdentityGroupIdRemoveNull < Gitlab::Database::Migration[2.0]
- def up
- change_column_null :scim_identities, :group_id, true
- end
-
- def down
- # There may now be nulls in the table, so we cannot re-add the constraint here.
- end
-end
diff --git a/db/migrate/20221107115413_change_scim_oauth_access_token_group_id_remove_null.rb b/db/migrate/20221107115413_change_scim_oauth_access_token_group_id_remove_null.rb
deleted file mode 100644
index c33e67291a4..00000000000
--- a/db/migrate/20221107115413_change_scim_oauth_access_token_group_id_remove_null.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# frozen_string_literal: true
-class ChangeScimOauthAccessTokenGroupIdRemoveNull < Gitlab::Database::Migration[2.0]
- def up
- change_column_null :scim_oauth_access_tokens, :group_id, true
- end
-
- def down
- # There may now be nulls in the table, so we cannot re-add the constraint here.
- end
-end
diff --git a/db/migrate/20221107183222_create_project_wiki_repositories.rb b/db/migrate/20221107183222_create_project_wiki_repositories.rb
deleted file mode 100644
index 770c62604ff..00000000000
--- a/db/migrate/20221107183222_create_project_wiki_repositories.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class CreateProjectWikiRepositories < Gitlab::Database::Migration[2.0]
- def change
- create_table :project_wiki_repositories do |t|
- t.references :project, index: { unique: true }, foreign_key: { on_delete: :cascade }, null: false
-
- t.timestamps_with_timezone null: false
- end
- end
-end
diff --git a/db/migrate/20221107184542_add_new_amount_used_to_ci_namespace_monthly_usages.rb b/db/migrate/20221107184542_add_new_amount_used_to_ci_namespace_monthly_usages.rb
deleted file mode 100644
index 23a5a716164..00000000000
--- a/db/migrate/20221107184542_add_new_amount_used_to_ci_namespace_monthly_usages.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# frozen_string_literal: true
-
-class AddNewAmountUsedToCiNamespaceMonthlyUsages < Gitlab::Database::Migration[2.0]
- TABLE = :ci_namespace_monthly_usages
- OLD_COLUMN = :amount_used
- NEW_COLUMN = :new_amount_used
- TRIGGER_NAME = 'sync_namespaces_amount_used_columns'
-
- disable_ddl_transaction!
-
- def up
- check_trigger_permissions!(TABLE)
-
- add_column(TABLE, NEW_COLUMN, :decimal, default: 0.0, precision: 18, scale: 4, null: false, if_not_exists: true)
-
- install_rename_triggers(TABLE, OLD_COLUMN, NEW_COLUMN, trigger_name: TRIGGER_NAME)
- end
-
- def down
- remove_rename_triggers(TABLE, TRIGGER_NAME)
-
- remove_column(TABLE, NEW_COLUMN)
- end
-end
diff --git a/db/migrate/20221108015813_add_telesign_to_application_settings.rb b/db/migrate/20221108015813_add_telesign_to_application_settings.rb
deleted file mode 100644
index f8e4fb5340b..00000000000
--- a/db/migrate/20221108015813_add_telesign_to_application_settings.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class AddTelesignToApplicationSettings < Gitlab::Database::Migration[2.0]
- def change
- add_column :application_settings, :encrypted_telesign_customer_xid, :binary
- add_column :application_settings, :encrypted_telesign_customer_xid_iv, :binary
-
- add_column :application_settings, :encrypted_telesign_api_key, :binary
- add_column :application_settings, :encrypted_telesign_api_key_iv, :binary
- end
-end
diff --git a/db/migrate/20221108185442_add_project_wiki_repository_id_to_project_wiki_repository_states.rb b/db/migrate/20221108185442_add_project_wiki_repository_id_to_project_wiki_repository_states.rb
deleted file mode 100644
index 317f58dac27..00000000000
--- a/db/migrate/20221108185442_add_project_wiki_repository_id_to_project_wiki_repository_states.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-# frozen_string_literal: true
-
-class AddProjectWikiRepositoryIdToProjectWikiRepositoryStates < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'idx_project_wiki_repository_states_project_wiki_repository_id'
-
- def up
- with_lock_retries do
- unless column_exists?(:project_wiki_repository_states, :project_wiki_repository_id)
- add_column :project_wiki_repository_states, :project_wiki_repository_id, :bigint
- end
- end
-
- add_concurrent_index :project_wiki_repository_states,
- :project_wiki_repository_id,
- name: INDEX_NAME
-
- add_concurrent_foreign_key :project_wiki_repository_states,
- :project_wiki_repositories,
- column: :project_wiki_repository_id,
- on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- if column_exists?(:project_wiki_repository_states, :project_wiki_repository_id)
- remove_column :project_wiki_repository_states, :project_wiki_repository_id
- end
- end
-
- remove_foreign_key_if_exists :project_wiki_repository_states, column: :project_wiki_repository_id
- remove_concurrent_index_by_name :project_wiki_repository_states, name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20221110105857_add_index_for_in_product_marketing_email_metrics.rb b/db/migrate/20221110105857_add_index_for_in_product_marketing_email_metrics.rb
deleted file mode 100644
index f1bc07e4197..00000000000
--- a/db/migrate/20221110105857_add_index_for_in_product_marketing_email_metrics.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexForInProductMarketingEmailMetrics < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_in_product_marketing_emails_on_track_series_id_clicked'
-
- def up
- add_concurrent_index :in_product_marketing_emails, %i[track series id cta_clicked_at], name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :in_product_marketing_emails, INDEX_NAME
- end
-end
diff --git a/db/migrate/20221110150942_add_project_id_lower_name_index_remove_old_index.rb b/db/migrate/20221110150942_add_project_id_lower_name_index_remove_old_index.rb
deleted file mode 100644
index dfff2f89610..00000000000
--- a/db/migrate/20221110150942_add_project_id_lower_name_index_remove_old_index.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# frozen_string_literal: true
-
-class AddProjectIdLowerNameIndexRemoveOldIndex < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_im_timeline_event_tags_name_project_id'
- NEW_INDEX_NAME = 'index_im_timeline_event_tags_on_lower_name_and_project_id'
-
- disable_ddl_transaction!
-
- def up
- # Add new index
- add_concurrent_index :incident_management_timeline_event_tags, 'project_id, LOWER(name)',
- unique: true, name: NEW_INDEX_NAME
-
- # Remove old index
- remove_concurrent_index_by_name :incident_management_timeline_event_tags, INDEX_NAME
- end
-
- def down
- # Add old index
- add_concurrent_index :incident_management_timeline_event_tags, [:project_id, :name],
- unique: true, name: INDEX_NAME
-
- # Remove new index
- remove_concurrent_index_by_name :incident_management_timeline_event_tags, NEW_INDEX_NAME
- end
-end
diff --git a/db/migrate/20230222161954_add_text_limit_to_custom_jira_regex_fields.rb b/db/migrate/20230222161954_add_text_limit_to_custom_jira_regex_fields.rb
index 625655fda9d..20991e4dffd 100644
--- a/db/migrate/20230222161954_add_text_limit_to_custom_jira_regex_fields.rb
+++ b/db/migrate/20230222161954_add_text_limit_to_custom_jira_regex_fields.rb
@@ -10,6 +10,6 @@ class AddTextLimitToCustomJiraRegexFields < Gitlab::Database::Migration[2.1]
def down
remove_text_limit :jira_tracker_data, :jira_issue_regex
- remove_text_limit :jira_tracker_data, :jira_issue_regex
+ remove_text_limit :jira_tracker_data, :jira_issue_prefix
end
end
diff --git a/db/migrate/20230426102200_fix_import_sources_on_application_settings_after_phabricator_removal.rb b/db/migrate/20230426102200_fix_import_sources_on_application_settings_after_phabricator_removal.rb
index e2061138fc4..ca56d4ac264 100644
--- a/db/migrate/20230426102200_fix_import_sources_on_application_settings_after_phabricator_removal.rb
+++ b/db/migrate/20230426102200_fix_import_sources_on_application_settings_after_phabricator_removal.rb
@@ -1,8 +1,5 @@
# 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 FixImportSourcesOnApplicationSettingsAfterPhabricatorRemoval < Gitlab::Database::Migration[2.1]
disable_ddl_transaction!
diff --git a/db/migrate/20230426161259_add_user_foreign_key_to_merge_request_diff_llm_summary.rb b/db/migrate/20230426161259_add_user_foreign_key_to_merge_request_diff_llm_summary.rb
index d5692b4d956..64277833c76 100644
--- a/db/migrate/20230426161259_add_user_foreign_key_to_merge_request_diff_llm_summary.rb
+++ b/db/migrate/20230426161259_add_user_foreign_key_to_merge_request_diff_llm_summary.rb
@@ -1,8 +1,5 @@
# 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 AddUserForeignKeyToMergeRequestDiffLlmSummary < Gitlab::Database::Migration[2.1]
disable_ddl_transaction!
diff --git a/db/migrate/20230426161341_add_merge_request_diff_foreign_key_to_merge_request_diff_llm_summary.rb b/db/migrate/20230426161341_add_merge_request_diff_foreign_key_to_merge_request_diff_llm_summary.rb
index 4271bd3c07c..c589717f0a2 100644
--- a/db/migrate/20230426161341_add_merge_request_diff_foreign_key_to_merge_request_diff_llm_summary.rb
+++ b/db/migrate/20230426161341_add_merge_request_diff_foreign_key_to_merge_request_diff_llm_summary.rb
@@ -1,8 +1,5 @@
# 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 AddMergeRequestDiffForeignKeyToMergeRequestDiffLlmSummary < Gitlab::Database::Migration[2.1]
disable_ddl_transaction!
diff --git a/db/migrate/20230626065725_backfill_instance_audit_event_name.rb b/db/migrate/20230626065725_backfill_instance_audit_event_name.rb
index 082a57fcc99..ac3c617d261 100644
--- a/db/migrate/20230626065725_backfill_instance_audit_event_name.rb
+++ b/db/migrate/20230626065725_backfill_instance_audit_event_name.rb
@@ -1,8 +1,5 @@
# 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 BackfillInstanceAuditEventName < Gitlab::Database::Migration[2.1]
disable_ddl_transaction!
diff --git a/db/migrate/20231025191217_add_pre_receive_secret_detection_enabled_to_application_settings.rb b/db/migrate/20231025191217_add_pre_receive_secret_detection_enabled_to_application_settings.rb
new file mode 100644
index 00000000000..db37fc5e8f1
--- /dev/null
+++ b/db/migrate/20231025191217_add_pre_receive_secret_detection_enabled_to_application_settings.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class AddPreReceiveSecretDetectionEnabledToApplicationSettings < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ def change
+ add_column :application_settings, :pre_receive_secret_detection_enabled, :boolean, null: false, default: false
+ end
+end
diff --git a/db/migrate/20231026172345_add_allow_merge_without_pipeline_to_namespace_settings.rb b/db/migrate/20231026172345_add_allow_merge_without_pipeline_to_namespace_settings.rb
new file mode 100644
index 00000000000..e2f919acbc0
--- /dev/null
+++ b/db/migrate/20231026172345_add_allow_merge_without_pipeline_to_namespace_settings.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+class AddAllowMergeWithoutPipelineToNamespaceSettings < Gitlab::Database::Migration[2.2]
+ enable_lock_retries!
+ milestone '16.6'
+
+ def change
+ add_column :namespace_settings, :allow_merge_without_pipeline, :boolean, default: false, null: false
+ end
+end
diff --git a/db/migrate/20231026175042_add_allow_merge_without_pipeline_to_project_settings.rb b/db/migrate/20231026175042_add_allow_merge_without_pipeline_to_project_settings.rb
new file mode 100644
index 00000000000..c9d786bc801
--- /dev/null
+++ b/db/migrate/20231026175042_add_allow_merge_without_pipeline_to_project_settings.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+class AddAllowMergeWithoutPipelineToProjectSettings < Gitlab::Database::Migration[2.2]
+ enable_lock_retries!
+ milestone '16.6'
+
+ def change
+ add_column :project_settings, :allow_merge_without_pipeline, :boolean, default: false, null: false
+ end
+end
diff --git a/db/migrate/20231029142649_add_make_profile_private_application_setting.rb b/db/migrate/20231029142649_add_make_profile_private_application_setting.rb
new file mode 100644
index 00000000000..ff946d56e72
--- /dev/null
+++ b/db/migrate/20231029142649_add_make_profile_private_application_setting.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class AddMakeProfilePrivateApplicationSetting < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ def change
+ add_column(:application_settings, :make_profile_private, :boolean, default: true, null: false)
+ end
+end
diff --git a/db/migrate/20231031114050_add_highest_severity_and_vulnerability_count_into_sbom_occurrences.rb b/db/migrate/20231031114050_add_highest_severity_and_vulnerability_count_into_sbom_occurrences.rb
new file mode 100644
index 00000000000..7b33d31b642
--- /dev/null
+++ b/db/migrate/20231031114050_add_highest_severity_and_vulnerability_count_into_sbom_occurrences.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+class AddHighestSeverityAndVulnerabilityCountIntoSbomOccurrences < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ def change
+ add_column :sbom_occurrences, :highest_severity, :smallint, null: true
+ add_column :sbom_occurrences, :vulnerability_count, :integer, null: false, default: 0
+ end
+end
diff --git a/db/migrate/20231031164724_create_sbom_occurrences_vulnerabilities.rb b/db/migrate/20231031164724_create_sbom_occurrences_vulnerabilities.rb
new file mode 100644
index 00000000000..cdb72791835
--- /dev/null
+++ b/db/migrate/20231031164724_create_sbom_occurrences_vulnerabilities.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class CreateSbomOccurrencesVulnerabilities < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ INDEX_NAME = 'i_sbom_occurrences_vulnerabilities_on_occ_id_and_vuln_id'
+
+ def change
+ create_table :sbom_occurrences_vulnerabilities do |t|
+ t.references :sbom_occurrence, null: false, index: false
+ t.references :vulnerability, null: false, index: true
+ t.timestamps_with_timezone null: false
+ t.index [:sbom_occurrence_id, :vulnerability_id], unique: true, name: INDEX_NAME
+ 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/migrate/20231101171848_add_member_role_id_to_saml_providers.rb b/db/migrate/20231101171848_add_member_role_id_to_saml_providers.rb
new file mode 100644
index 00000000000..57354e99483
--- /dev/null
+++ b/db/migrate/20231101171848_add_member_role_id_to_saml_providers.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+class AddMemberRoleIdToSamlProviders < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ enable_lock_retries!
+
+ def change
+ add_column :saml_providers, :member_role_id, :bigint
+ end
+end
diff --git a/db/migrate/20231103160022_add_index_to_saml_providers_on_member_role_id.rb b/db/migrate/20231103160022_add_index_to_saml_providers_on_member_role_id.rb
new file mode 100644
index 00000000000..4c3ce75bf63
--- /dev/null
+++ b/db/migrate/20231103160022_add_index_to_saml_providers_on_member_role_id.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class AddIndexToSamlProvidersOnMemberRoleId < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ disable_ddl_transaction!
+
+ INDEX_NAME = 'index_saml_providers_on_member_role_id'
+
+ def up
+ add_concurrent_index :saml_providers, :member_role_id, name: INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_index_by_name :saml_providers, INDEX_NAME
+ end
+end
diff --git a/db/migrate/20231103160859_add_fk_to_member_role_on_saml_providers.rb b/db/migrate/20231103160859_add_fk_to_member_role_on_saml_providers.rb
new file mode 100644
index 00000000000..a456b0c9859
--- /dev/null
+++ b/db/migrate/20231103160859_add_fk_to_member_role_on_saml_providers.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class AddFkToMemberRoleOnSamlProviders < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_foreign_key :saml_providers, :member_roles, column: :member_role_id, on_delete: :nullify
+ end
+
+ def down
+ with_lock_retries do
+ remove_foreign_key :saml_providers, column: :member_role_id
+ end
+ end
+end
diff --git a/db/migrate/20231103162825_add_wolfi_purl_type_to_package_metadata_purl_types.rb b/db/migrate/20231103162825_add_wolfi_purl_type_to_package_metadata_purl_types.rb
index bdbe8aa3a63..f2298703d11 100644
--- a/db/migrate/20231103162825_add_wolfi_purl_type_to_package_metadata_purl_types.rb
+++ b/db/migrate/20231103162825_add_wolfi_purl_type_to_package_metadata_purl_types.rb
@@ -1,8 +1,5 @@
# 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 AddWolfiPurlTypeToPackageMetadataPurlTypes < Gitlab::Database::Migration[2.2]
milestone '16.6'
diff --git a/db/migrate/20231107140642_create_audit_events_instance_amazon_s3_configurations.rb b/db/migrate/20231107140642_create_audit_events_instance_amazon_s3_configurations.rb
new file mode 100644
index 00000000000..8051d23f6a1
--- /dev/null
+++ b/db/migrate/20231107140642_create_audit_events_instance_amazon_s3_configurations.rb
@@ -0,0 +1,24 @@
+# frozen_string_literal: true
+
+class CreateAuditEventsInstanceAmazonS3Configurations < Gitlab::Database::Migration[2.2]
+ enable_lock_retries!
+ milestone '16.7'
+
+ UNIQUE_NAME = "unique_instance_amazon_s3_configurations_name"
+ UNIQUE_BUCKET_NAME = "unique_instance_amazon_s3_configurations_bucket_name"
+
+ def change
+ create_table :audit_events_instance_amazon_s3_configurations do |t|
+ t.timestamps_with_timezone null: false
+ t.text :access_key_xid, null: false, limit: 128
+ t.text :name, null: false, limit: 72
+ t.text :bucket_name, null: false, limit: 63
+ t.text :aws_region, null: false, limit: 50
+ t.binary :encrypted_secret_access_key, null: false
+ t.binary :encrypted_secret_access_key_iv, null: false
+
+ t.index [:name], unique: true, name: UNIQUE_NAME
+ t.index [:bucket_name], unique: true, name: UNIQUE_BUCKET_NAME
+ end
+ end
+end
diff --git a/db/migrate/20231107193342_add_search_vector_to_catalog_resources.rb b/db/migrate/20231107193342_add_search_vector_to_catalog_resources.rb
new file mode 100644
index 00000000000..e414953a6bb
--- /dev/null
+++ b/db/migrate/20231107193342_add_search_vector_to_catalog_resources.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: true
+
+class AddSearchVectorToCatalogResources < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ def up
+ # This is required to implement PostgreSQL Full Text Search functionality in Ci::Catalog::Resource.
+ # Indices on `search_vector` will be added in a later step. COALESCE is used here to avoid NULL results.
+ # See https://gitlab.com/gitlab-org/gitlab/-/issues/430889 for details.
+ execute <<~SQL
+ ALTER TABLE catalog_resources
+ ADD COLUMN search_vector tsvector
+ GENERATED ALWAYS AS
+ (setweight(to_tsvector('english', COALESCE(name, '')), 'A') ||
+ setweight(to_tsvector('english', COALESCE(description, '')), 'B')) STORED;
+ SQL
+ end
+
+ def down
+ remove_column :catalog_resources, :search_vector
+ end
+end
diff --git a/db/migrate/20231108132916_index_batch_tracker_status.rb b/db/migrate/20231108132916_index_batch_tracker_status.rb
new file mode 100644
index 00000000000..099cbae6fc1
--- /dev/null
+++ b/db/migrate/20231108132916_index_batch_tracker_status.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class IndexBatchTrackerStatus < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+
+ milestone '16.7'
+
+ INDEX_NAME = 'index_batch_trackers_on_tracker_id_status'
+
+ def up
+ add_concurrent_index :bulk_import_batch_trackers, [:tracker_id, :status], name: INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_index_by_name :bulk_import_batch_trackers, INDEX_NAME
+ end
+end
diff --git a/db/migrate/20231108143957_add_concurrent_direct_transfer_batch_limit_to_application_settings.rb b/db/migrate/20231108143957_add_concurrent_direct_transfer_batch_limit_to_application_settings.rb
new file mode 100644
index 00000000000..064385e02fc
--- /dev/null
+++ b/db/migrate/20231108143957_add_concurrent_direct_transfer_batch_limit_to_application_settings.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class AddConcurrentDirectTransferBatchLimitToApplicationSettings < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ def change
+ add_column :application_settings, :bulk_import_concurrent_pipeline_batch_limit, :smallint, default: 25, null: false
+ end
+end
diff --git a/db/migrate/20231109165512_add_enforce_ssh_certificates_to_namespace_settings.rb b/db/migrate/20231109165512_add_enforce_ssh_certificates_to_namespace_settings.rb
new file mode 100644
index 00000000000..98c4de0cb6a
--- /dev/null
+++ b/db/migrate/20231109165512_add_enforce_ssh_certificates_to_namespace_settings.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+class AddEnforceSshCertificatesToNamespaceSettings < Gitlab::Database::Migration[2.2]
+ enable_lock_retries!
+
+ milestone '16.7'
+
+ def change
+ add_column :namespace_settings, :enforce_ssh_certificates, :boolean, default: false, null: false
+ end
+end
diff --git a/db/migrate/20231110044738_create_abuse_report_assignees_table.rb b/db/migrate/20231110044738_create_abuse_report_assignees_table.rb
new file mode 100644
index 00000000000..3162f7bb8e3
--- /dev/null
+++ b/db/migrate/20231110044738_create_abuse_report_assignees_table.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class CreateAbuseReportAssigneesTable < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ INDEX_NAME = 'index_abuse_report_assignees_on_user_id_and_abuse_report_id'
+
+ def change
+ create_table :abuse_report_assignees do |t|
+ t.bigint :user_id, null: false
+ t.belongs_to :abuse_report,
+ null: false,
+ foreign_key: { to_table: :abuse_reports, on_delete: :cascade },
+ index: true
+ t.timestamps_with_timezone null: false
+ t.index [:user_id, :abuse_report_id], unique: true, name: INDEX_NAME
+ end
+ end
+end
diff --git a/db/migrate/20231112213727_add_error_to_project_repository_storage_moves.rb b/db/migrate/20231112213727_add_error_to_project_repository_storage_moves.rb
new file mode 100644
index 00000000000..d1a9da567f2
--- /dev/null
+++ b/db/migrate/20231112213727_add_error_to_project_repository_storage_moves.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+class AddErrorToProjectRepositoryStorageMoves < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+ milestone '16.7'
+
+ def up
+ with_lock_retries do
+ add_column :project_repository_storage_moves, :error_message, :text, if_not_exists: true
+ end
+
+ add_text_limit :project_repository_storage_moves, :error_message, 256
+ end
+
+ def down
+ with_lock_retries do
+ remove_column :project_repository_storage_moves, :error_message, if_exists: true
+ end
+ end
+end
diff --git a/db/migrate/20231112214803_add_error_to_group_repository_storage_moves.rb b/db/migrate/20231112214803_add_error_to_group_repository_storage_moves.rb
new file mode 100644
index 00000000000..7ff1bf6e30c
--- /dev/null
+++ b/db/migrate/20231112214803_add_error_to_group_repository_storage_moves.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+class AddErrorToGroupRepositoryStorageMoves < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+ milestone '16.7'
+
+ def up
+ with_lock_retries do
+ add_column :group_repository_storage_moves, :error_message, :text, if_not_exists: true
+ end
+
+ add_text_limit :group_repository_storage_moves, :error_message, 256
+ end
+
+ def down
+ with_lock_retries do
+ remove_column :group_repository_storage_moves, :error_message, if_exists: true
+ end
+ end
+end
diff --git a/db/migrate/20231112223008_add_error_to_snippet_repository_storage_moves.rb b/db/migrate/20231112223008_add_error_to_snippet_repository_storage_moves.rb
new file mode 100644
index 00000000000..384b652ca56
--- /dev/null
+++ b/db/migrate/20231112223008_add_error_to_snippet_repository_storage_moves.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+class AddErrorToSnippetRepositoryStorageMoves < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+ milestone '16.7'
+
+ def up
+ with_lock_retries do
+ add_column :snippet_repository_storage_moves, :error_message, :text, if_not_exists: true
+ end
+
+ add_text_limit :snippet_repository_storage_moves, :error_message, 256
+ end
+
+ def down
+ with_lock_retries do
+ remove_column :snippet_repository_storage_moves, :error_message, if_exists: true
+ end
+ end
+end
diff --git a/db/migrate/20231113124342_add_status_to_packages_nuget_symbols.rb b/db/migrate/20231113124342_add_status_to_packages_nuget_symbols.rb
new file mode 100644
index 00000000000..9b759743029
--- /dev/null
+++ b/db/migrate/20231113124342_add_status_to_packages_nuget_symbols.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+class AddStatusToPackagesNugetSymbols < Gitlab::Database::Migration[2.2]
+ enable_lock_retries!
+ milestone '16.7'
+
+ def up
+ add_column :packages_nuget_symbols, :status, :smallint, null: false, default: 0
+ end
+
+ def down
+ remove_column :packages_nuget_symbols, :status
+ end
+end
diff --git a/db/migrate/20231114034017_add_project_id_to_merge_request_diffs.rb b/db/migrate/20231114034017_add_project_id_to_merge_request_diffs.rb
new file mode 100644
index 00000000000..0119386803a
--- /dev/null
+++ b/db/migrate/20231114034017_add_project_id_to_merge_request_diffs.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+class AddProjectIdToMergeRequestDiffs < Gitlab::Database::Migration[2.2]
+ enable_lock_retries!
+ milestone '16.7'
+
+ def change
+ add_column :merge_request_diffs, :project_id, :bigint
+ end
+end
diff --git a/db/migrate/20231114062200_add_max_workspaces_to_remote_development_agent_configs.rb b/db/migrate/20231114062200_add_max_workspaces_to_remote_development_agent_configs.rb
new file mode 100644
index 00000000000..e3776426ac7
--- /dev/null
+++ b/db/migrate/20231114062200_add_max_workspaces_to_remote_development_agent_configs.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+class AddMaxWorkspacesToRemoteDevelopmentAgentConfigs < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ enable_lock_retries!
+
+ def change
+ add_column :remote_development_agent_configs, :max_workspaces, :bigint, default: -1, null: false
+ end
+end
diff --git a/db/migrate/20231114062215_add_max_workspaces_per_user_to_remote_development_agent_configs.rb b/db/migrate/20231114062215_add_max_workspaces_per_user_to_remote_development_agent_configs.rb
new file mode 100644
index 00000000000..1aed7d3e8d0
--- /dev/null
+++ b/db/migrate/20231114062215_add_max_workspaces_per_user_to_remote_development_agent_configs.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+class AddMaxWorkspacesPerUserToRemoteDevelopmentAgentConfigs < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ enable_lock_retries!
+
+ def change
+ add_column :remote_development_agent_configs, :max_workspaces_per_user, :bigint, default: -1, null: false
+ end
+end
diff --git a/db/migrate/20231114091124_add_object_format_to_project_repositories.rb b/db/migrate/20231114091124_add_object_format_to_project_repositories.rb
new file mode 100644
index 00000000000..62a152b3381
--- /dev/null
+++ b/db/migrate/20231114091124_add_object_format_to_project_repositories.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+class AddObjectFormatToProjectRepositories < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ enable_lock_retries!
+
+ def change
+ add_column :project_repositories, :object_format, :smallint, null: false, default: 0
+ end
+end
diff --git a/db/migrate/20231114100444_add_can_create_organization_to_application_settings.rb b/db/migrate/20231114100444_add_can_create_organization_to_application_settings.rb
new file mode 100644
index 00000000000..c2fc4a56df2
--- /dev/null
+++ b/db/migrate/20231114100444_add_can_create_organization_to_application_settings.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class AddCanCreateOrganizationToApplicationSettings < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ def change
+ add_column(:application_settings, :can_create_organization, :boolean, default: true, null: false)
+ end
+end
diff --git a/db/migrate/20231114121812_drop_index_from_sbom_components.rb b/db/migrate/20231114121812_drop_index_from_sbom_components.rb
new file mode 100644
index 00000000000..b306dca46b4
--- /dev/null
+++ b/db/migrate/20231114121812_drop_index_from_sbom_components.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+class DropIndexFromSbomComponents < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+
+ milestone '16.7'
+
+ INDEX = 'index_source_package_names_on_component_and_purl'
+
+ def up
+ remove_concurrent_index_by_name :sbom_components, name: INDEX
+ add_concurrent_index :sbom_components,
+ [:component_type, :source_package_name, :purl_type],
+ name: INDEX
+ end
+
+ def down
+ # no-op
+ end
+end
diff --git a/db/migrate/20231114131031_add_partition_id_to_ci_job_artifact_states.rb b/db/migrate/20231114131031_add_partition_id_to_ci_job_artifact_states.rb
new file mode 100644
index 00000000000..843be378d74
--- /dev/null
+++ b/db/migrate/20231114131031_add_partition_id_to_ci_job_artifact_states.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+class AddPartitionIdToCiJobArtifactStates < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ enable_lock_retries!
+
+ def change
+ add_column :ci_job_artifact_states, :partition_id, :bigint, default: 100, null: false
+ end
+end
diff --git a/db/migrate/20231114133600_add_default_resources_per_workspace_container_to_remote_development_agent_configs.rb b/db/migrate/20231114133600_add_default_resources_per_workspace_container_to_remote_development_agent_configs.rb
new file mode 100644
index 00000000000..aa5702c42bb
--- /dev/null
+++ b/db/migrate/20231114133600_add_default_resources_per_workspace_container_to_remote_development_agent_configs.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+class AddDefaultResourcesPerWorkspaceContainerToRemoteDevelopmentAgentConfigs < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ enable_lock_retries!
+
+ def change
+ add_column :remote_development_agent_configs, :default_resources_per_workspace_container, :jsonb, default: {},
+ null: false
+ end
+end
diff --git a/db/migrate/20231114133619_add_max_resources_per_workspace_to_remote_development_agent_configs.rb b/db/migrate/20231114133619_add_max_resources_per_workspace_to_remote_development_agent_configs.rb
new file mode 100644
index 00000000000..a9284893550
--- /dev/null
+++ b/db/migrate/20231114133619_add_max_resources_per_workspace_to_remote_development_agent_configs.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+class AddMaxResourcesPerWorkspaceToRemoteDevelopmentAgentConfigs < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ enable_lock_retries!
+
+ def change
+ add_column :remote_development_agent_configs, :max_resources_per_workspace, :jsonb, default: {}, null: false
+ end
+end
diff --git a/db/migrate/20231114152304_add_approver_to_notification_settings.rb b/db/migrate/20231114152304_add_approver_to_notification_settings.rb
new file mode 100644
index 00000000000..aaa9405532d
--- /dev/null
+++ b/db/migrate/20231114152304_add_approver_to_notification_settings.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+class AddApproverToNotificationSettings < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ enable_lock_retries!
+
+ def change
+ add_column :notification_settings, :approver, :boolean, default: false, null: false
+ end
+end
diff --git a/db/migrate/20231114231330_add_released_at_to_catalog_resource_versions.rb b/db/migrate/20231114231330_add_released_at_to_catalog_resource_versions.rb
new file mode 100644
index 00000000000..8984eaef9ca
--- /dev/null
+++ b/db/migrate/20231114231330_add_released_at_to_catalog_resource_versions.rb
@@ -0,0 +1,25 @@
+# frozen_string_literal: true
+
+class AddReleasedAtToCatalogResourceVersions < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ OLD_INDEX = 'index_catalog_resource_versions_on_catalog_resource_id'
+ NEW_INDEX = 'index_catalog_resource_versions_on_resource_id_and_released_at'
+
+ def up
+ # This will be denormalized with data from the `releases` table
+ add_column :catalog_resource_versions, :released_at, :datetime_with_timezone, default: '1970-01-01', null: false
+
+ remove_concurrent_index_by_name :catalog_resource_versions, OLD_INDEX
+ add_concurrent_index :catalog_resource_versions, [:catalog_resource_id, :released_at], name: NEW_INDEX
+ end
+
+ def down
+ remove_concurrent_index_by_name :catalog_resource_versions, NEW_INDEX
+ add_concurrent_index :catalog_resource_versions, :catalog_resource_id, name: OLD_INDEX
+
+ remove_column :catalog_resource_versions, :released_at
+ end
+end
diff --git a/db/migrate/20231115064007_create_audit_events_streaming_http_instance_namespace_filters.rb b/db/migrate/20231115064007_create_audit_events_streaming_http_instance_namespace_filters.rb
new file mode 100644
index 00000000000..e5ca560635b
--- /dev/null
+++ b/db/migrate/20231115064007_create_audit_events_streaming_http_instance_namespace_filters.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class CreateAuditEventsStreamingHttpInstanceNamespaceFilters < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ enable_lock_retries!
+
+ UNIQ_DESTINATION_INDEX_NAME = 'unique_audit_events_instance_namespace_filters_destination_id'
+ NAMESPACE_INDEX_NAME = 'index_audit_events_instance_namespace_filters_on_namespace_id'
+
+ def change
+ create_table :audit_events_streaming_http_instance_namespace_filters do |t|
+ t.timestamps_with_timezone null: false
+ t.bigint :audit_events_instance_external_audit_event_destination_id,
+ null: false,
+ index: { unique: true, name: UNIQ_DESTINATION_INDEX_NAME }
+ t.bigint :namespace_id,
+ null: false,
+ index: { name: NAMESPACE_INDEX_NAME }
+ end
+ end
+end
diff --git a/db/migrate/20231115081652_add_home_organization_id_to_user_preferences.rb b/db/migrate/20231115081652_add_home_organization_id_to_user_preferences.rb
new file mode 100644
index 00000000000..1b137d56575
--- /dev/null
+++ b/db/migrate/20231115081652_add_home_organization_id_to_user_preferences.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+class AddHomeOrganizationIdToUserPreferences < Gitlab::Database::Migration[2.2]
+ enable_lock_retries!
+ milestone '16.7'
+
+ def change
+ add_column(:user_preferences, :home_organization_id, :bigint, null: true)
+ end
+end
diff --git a/db/migrate/20231115101002_add_promote_ultimate_features_at_to_onboarding_progresses.rb b/db/migrate/20231115101002_add_promote_ultimate_features_at_to_onboarding_progresses.rb
new file mode 100644
index 00000000000..8e60ccd9f86
--- /dev/null
+++ b/db/migrate/20231115101002_add_promote_ultimate_features_at_to_onboarding_progresses.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+class AddPromoteUltimateFeaturesAtToOnboardingProgresses < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ enable_lock_retries!
+
+ def change
+ add_column :onboarding_progresses, :promote_ultimate_features_at, :datetime_with_timezone
+ end
+end
diff --git a/db/migrate/20231116062200_add_workspaces_quota_to_remote_development_agent_configs.rb b/db/migrate/20231116062200_add_workspaces_quota_to_remote_development_agent_configs.rb
new file mode 100644
index 00000000000..1a8351356fe
--- /dev/null
+++ b/db/migrate/20231116062200_add_workspaces_quota_to_remote_development_agent_configs.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+class AddWorkspacesQuotaToRemoteDevelopmentAgentConfigs < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ enable_lock_retries!
+
+ def change
+ add_column :remote_development_agent_configs, :workspaces_quota, :bigint, default: -1, null: false
+ end
+end
diff --git a/db/migrate/20231116062215_add_workspaces_per_user_quota_to_remote_development_agent_configs.rb b/db/migrate/20231116062215_add_workspaces_per_user_quota_to_remote_development_agent_configs.rb
new file mode 100644
index 00000000000..3a2793d49b3
--- /dev/null
+++ b/db/migrate/20231116062215_add_workspaces_per_user_quota_to_remote_development_agent_configs.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+class AddWorkspacesPerUserQuotaToRemoteDevelopmentAgentConfigs < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ enable_lock_retries!
+
+ def change
+ add_column :remote_development_agent_configs, :workspaces_per_user_quota, :bigint, default: -1, null: false
+ end
+end
diff --git a/db/migrate/20231116065541_add_duration_to_issue_stage_events.rb b/db/migrate/20231116065541_add_duration_to_issue_stage_events.rb
new file mode 100644
index 00000000000..aeb779fa82b
--- /dev/null
+++ b/db/migrate/20231116065541_add_duration_to_issue_stage_events.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class AddDurationToIssueStageEvents < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ def change
+ add_column :analytics_cycle_analytics_issue_stage_events, :duration_in_milliseconds, :bigint
+ end
+end
diff --git a/db/migrate/20231116071027_add_duration_to_mr_stage_events.rb b/db/migrate/20231116071027_add_duration_to_mr_stage_events.rb
new file mode 100644
index 00000000000..3bf40ba9d56
--- /dev/null
+++ b/db/migrate/20231116071027_add_duration_to_mr_stage_events.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class AddDurationToMrStageEvents < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ def change
+ add_column :analytics_cycle_analytics_merge_request_stage_events, :duration_in_milliseconds, :bigint
+ end
+end
diff --git a/db/migrate/20231116115237_add_destination_fk_to_audit_events_http_instance_namespace_filters.rb b/db/migrate/20231116115237_add_destination_fk_to_audit_events_http_instance_namespace_filters.rb
new file mode 100644
index 00000000000..dab72766f0e
--- /dev/null
+++ b/db/migrate/20231116115237_add_destination_fk_to_audit_events_http_instance_namespace_filters.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class AddDestinationFkToAuditEventsHttpInstanceNamespaceFilters < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_foreign_key :audit_events_streaming_http_instance_namespace_filters,
+ :audit_events_instance_external_audit_event_destinations,
+ column: :audit_events_instance_external_audit_event_destination_id,
+ on_delete: :cascade
+ end
+
+ def down
+ with_lock_retries do
+ remove_foreign_key_if_exists :audit_events_streaming_http_instance_namespace_filters,
+ column: :audit_events_instance_external_audit_event_destination_id
+ end
+ end
+end
diff --git a/db/migrate/20231116115303_add_namespace_fk_to_audit_events_http_instance_namespace_filters.rb b/db/migrate/20231116115303_add_namespace_fk_to_audit_events_http_instance_namespace_filters.rb
new file mode 100644
index 00000000000..375a2a3aa05
--- /dev/null
+++ b/db/migrate/20231116115303_add_namespace_fk_to_audit_events_http_instance_namespace_filters.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class AddNamespaceFkToAuditEventsHttpInstanceNamespaceFilters < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_foreign_key :audit_events_streaming_http_instance_namespace_filters,
+ :namespaces,
+ column: :namespace_id,
+ on_delete: :cascade
+ end
+
+ def down
+ with_lock_retries do
+ remove_foreign_key_if_exists :audit_events_streaming_http_instance_namespace_filters,
+ column: :namespace_id
+ end
+ end
+end
diff --git a/db/migrate/20231117031416_add_web_ide_oauth_application_to_settings.rb b/db/migrate/20231117031416_add_web_ide_oauth_application_to_settings.rb
new file mode 100644
index 00000000000..6d368f19e92
--- /dev/null
+++ b/db/migrate/20231117031416_add_web_ide_oauth_application_to_settings.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class AddWebIdeOauthApplicationToSettings < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ def change
+ add_column :application_settings, :web_ide_oauth_application_id, :int, null: true
+ end
+end
diff --git a/db/migrate/20231117031559_add_fk_web_ide_oauth_application.rb b/db/migrate/20231117031559_add_fk_web_ide_oauth_application.rb
new file mode 100644
index 00000000000..61da3edbb30
--- /dev/null
+++ b/db/migrate/20231117031559_add_fk_web_ide_oauth_application.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: true
+
+class AddFkWebIdeOauthApplication < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ disable_ddl_transaction!
+
+ INDEX_NAME = 'index_application_settings_web_ide_oauth_application_id'
+
+ def up
+ add_concurrent_index :application_settings, :web_ide_oauth_application_id, name: INDEX_NAME
+ add_concurrent_foreign_key :application_settings, :oauth_applications,
+ column: :web_ide_oauth_application_id,
+ on_delete: :nullify
+ end
+
+ def down
+ with_lock_retries do
+ remove_foreign_key :application_settings, column: :web_ide_oauth_application_id
+ end
+ remove_concurrent_index_by_name :application_settings, INDEX_NAME
+ end
+end
diff --git a/db/migrate/20231117140201_add_applies_to_all_protected_branches_to_approval_group_rules.rb b/db/migrate/20231117140201_add_applies_to_all_protected_branches_to_approval_group_rules.rb
new file mode 100644
index 00000000000..9a3aa7742ad
--- /dev/null
+++ b/db/migrate/20231117140201_add_applies_to_all_protected_branches_to_approval_group_rules.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class AddAppliesToAllProtectedBranchesToApprovalGroupRules < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ def up
+ add_column :approval_group_rules, :applies_to_all_protected_branches, :boolean, default: false, null: false
+ end
+
+ def down
+ remove_column :approval_group_rules, :applies_to_all_protected_branches
+ end
+end
diff --git a/db/migrate/20231117211214_add_auto_cancel_on_job_failure_to_ci_pipeline_metadata.rb b/db/migrate/20231117211214_add_auto_cancel_on_job_failure_to_ci_pipeline_metadata.rb
new file mode 100644
index 00000000000..affa08ff0c3
--- /dev/null
+++ b/db/migrate/20231117211214_add_auto_cancel_on_job_failure_to_ci_pipeline_metadata.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+class AddAutoCancelOnJobFailureToCiPipelineMetadata < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ enable_lock_retries!
+
+ def change
+ add_column :ci_pipeline_metadata, :auto_cancel_on_job_failure, :smallint, default: 0, null: false
+ end
+end
diff --git a/db/migrate/20231120071202_remove_not_null_constraint_from_member_role_column.rb b/db/migrate/20231120071202_remove_not_null_constraint_from_member_role_column.rb
new file mode 100644
index 00000000000..7acf26d16f5
--- /dev/null
+++ b/db/migrate/20231120071202_remove_not_null_constraint_from_member_role_column.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+class RemoveNotNullConstraintFromMemberRoleColumn < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ disable_ddl_transaction!
+
+ def up
+ change_column_null :member_roles, :namespace_id, true
+ end
+
+ def down
+ change_column_null :member_roles, :namespace_id, false
+ end
+end
diff --git a/db/migrate/20231120090305_create_organization_details.rb b/db/migrate/20231120090305_create_organization_details.rb
new file mode 100644
index 00000000000..0aadcd68936
--- /dev/null
+++ b/db/migrate/20231120090305_create_organization_details.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class CreateOrganizationDetails < Gitlab::Database::Migration[2.2]
+ enable_lock_retries!
+ milestone '16.7'
+
+ def change
+ create_table :organization_details, id: false do |t|
+ t.references :organization, primary_key: true, default: nil, index: false, foreign_key: { on_delete: :cascade }
+ t.timestamps_with_timezone null: false
+ t.integer :cached_markdown_version
+ t.text :description, limit: 1024
+ t.text :description_html # rubocop:disable Migration/AddLimitToTextColumns -- It will be limited by description
+ end
+ end
+end
diff --git a/db/migrate/20231120105619_drop_idx_projects_on_mirror_last_successful_update_at.rb b/db/migrate/20231120105619_drop_idx_projects_on_mirror_last_successful_update_at.rb
new file mode 100644
index 00000000000..89f293cc543
--- /dev/null
+++ b/db/migrate/20231120105619_drop_idx_projects_on_mirror_last_successful_update_at.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class DropIdxProjectsOnMirrorLastSuccessfulUpdateAt < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+ milestone '16.7'
+
+ TABLE_NAME = 'projects'
+ INDEX_NAME = 'index_projects_on_mirror_last_successful_update_at'
+
+ def up
+ remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index TABLE_NAME, :mirror_last_successful_update_at, name: INDEX_NAME
+ end
+end
diff --git a/db/migrate/20231120142933_add_reopen_issue_on_external_participant_note_to_service_desk_settings.rb b/db/migrate/20231120142933_add_reopen_issue_on_external_participant_note_to_service_desk_settings.rb
new file mode 100644
index 00000000000..a8b89c4e665
--- /dev/null
+++ b/db/migrate/20231120142933_add_reopen_issue_on_external_participant_note_to_service_desk_settings.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+class AddReopenIssueOnExternalParticipantNoteToServiceDeskSettings < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ enable_lock_retries!
+
+ def change
+ add_column :service_desk_settings, :reopen_issue_on_external_participant_note, :boolean, null: false, default: false
+ end
+end
diff --git a/db/migrate/20231121092109_remove_ci_pipeline_metadata_name_not_null_constraint.rb b/db/migrate/20231121092109_remove_ci_pipeline_metadata_name_not_null_constraint.rb
new file mode 100644
index 00000000000..de1d4c1bcc9
--- /dev/null
+++ b/db/migrate/20231121092109_remove_ci_pipeline_metadata_name_not_null_constraint.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class RemoveCiPipelineMetadataNameNotNullConstraint < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ CONSTRAINT_NAME = 'check_25d23931f1'
+
+ def up
+ remove_not_null_constraint :ci_pipeline_metadata, :name, constraint_name: CONSTRAINT_NAME
+ end
+
+ def down
+ add_not_null_constraint :ci_pipeline_metadata, :name, constraint_name: CONSTRAINT_NAME
+ end
+end
diff --git a/db/migrate/20231121092128_add_auto_cancel_on_new_commit_to_ci_pipeline_metadata.rb b/db/migrate/20231121092128_add_auto_cancel_on_new_commit_to_ci_pipeline_metadata.rb
new file mode 100644
index 00000000000..9b698c83553
--- /dev/null
+++ b/db/migrate/20231121092128_add_auto_cancel_on_new_commit_to_ci_pipeline_metadata.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+class AddAutoCancelOnNewCommitToCiPipelineMetadata < Gitlab::Database::Migration[2.2]
+ enable_lock_retries!
+ milestone '16.7'
+
+ def change
+ add_column :ci_pipeline_metadata, :auto_cancel_on_new_commit, :smallint, default: 0, null: false
+ end
+end
diff --git a/db/migrate/20231121133727_change_marketing_emails_null_conditions.rb b/db/migrate/20231121133727_change_marketing_emails_null_conditions.rb
new file mode 100644
index 00000000000..b99db9cb7b8
--- /dev/null
+++ b/db/migrate/20231121133727_change_marketing_emails_null_conditions.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class ChangeMarketingEmailsNullConditions < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+
+ milestone '16.7'
+
+ def up
+ add_not_null_constraint :in_product_marketing_emails, :track
+ add_not_null_constraint :in_product_marketing_emails, :series
+ end
+
+ def down
+ remove_not_null_constraint :in_product_marketing_emails, :track
+ remove_not_null_constraint :in_product_marketing_emails, :series
+ end
+end
diff --git a/db/migrate/20231121152706_add_foreign_key_on_sbom_occurrences_vulnerabilities_vulnerability_id.rb b/db/migrate/20231121152706_add_foreign_key_on_sbom_occurrences_vulnerabilities_vulnerability_id.rb
new file mode 100644
index 00000000000..04bd515d95b
--- /dev/null
+++ b/db/migrate/20231121152706_add_foreign_key_on_sbom_occurrences_vulnerabilities_vulnerability_id.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+class AddForeignKeyOnSbomOccurrencesVulnerabilitiesVulnerabilityId < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_foreign_key :sbom_occurrences_vulnerabilities,
+ :vulnerabilities,
+ column: :vulnerability_id,
+ on_delete: :cascade
+ end
+
+ def down
+ remove_foreign_key :sbom_occurrences_vulnerabilities,
+ to_table: :vulnerabilities,
+ column: :vulnerability_id,
+ on_delete: :cascade
+ end
+end
diff --git a/db/migrate/20231122072428_add_home_organization_id_index_to_user_preferences.rb b/db/migrate/20231122072428_add_home_organization_id_index_to_user_preferences.rb
new file mode 100644
index 00000000000..41bad39ae73
--- /dev/null
+++ b/db/migrate/20231122072428_add_home_organization_id_index_to_user_preferences.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class AddHomeOrganizationIdIndexToUserPreferences < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+ milestone '16.7'
+
+ INDEX = 'index_user_preferences_on_home_organization_id'
+
+ def up
+ add_concurrent_index(:user_preferences, :home_organization_id, name: INDEX)
+ end
+
+ def down
+ remove_concurrent_index_by_name(:user_preferences, name: INDEX)
+ end
+end
diff --git a/db/migrate/20231123035033_add_generated_to_merge_request_context_commit_diff_files.rb b/db/migrate/20231123035033_add_generated_to_merge_request_context_commit_diff_files.rb
new file mode 100644
index 00000000000..7e97a582116
--- /dev/null
+++ b/db/migrate/20231123035033_add_generated_to_merge_request_context_commit_diff_files.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+class AddGeneratedToMergeRequestContextCommitDiffFiles < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ enable_lock_retries!
+
+ def change
+ add_column :merge_request_context_commit_diff_files, :generated, :boolean
+ end
+end
diff --git a/db/migrate/20231123125750_add_foreign_key_on_sbom_occurrences_vulnerabilities_occurrence_id.rb b/db/migrate/20231123125750_add_foreign_key_on_sbom_occurrences_vulnerabilities_occurrence_id.rb
new file mode 100644
index 00000000000..4abd4b21c10
--- /dev/null
+++ b/db/migrate/20231123125750_add_foreign_key_on_sbom_occurrences_vulnerabilities_occurrence_id.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+class AddForeignKeyOnSbomOccurrencesVulnerabilitiesOccurrenceId < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_foreign_key :sbom_occurrences_vulnerabilities,
+ :sbom_occurrences,
+ column: :sbom_occurrence_id,
+ on_delete: :cascade
+ end
+
+ def down
+ remove_foreign_key :sbom_occurrences_vulnerabilities,
+ to_table: :sbom_occurrences,
+ column: :sbom_occurrence_id,
+ on_delete: :cascade
+ end
+end
diff --git a/db/migrate/20231123141633_add_member_role_id_to_saml_group_links.rb b/db/migrate/20231123141633_add_member_role_id_to_saml_group_links.rb
new file mode 100644
index 00000000000..20a073fa9a1
--- /dev/null
+++ b/db/migrate/20231123141633_add_member_role_id_to_saml_group_links.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+class AddMemberRoleIdToSamlGroupLinks < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ enable_lock_retries!
+
+ def change
+ add_column :saml_group_links, :member_role_id, :bigint
+ end
+end
diff --git a/db/migrate/20231123151831_add_index_to_saml_group_links_on_member_role_id.rb b/db/migrate/20231123151831_add_index_to_saml_group_links_on_member_role_id.rb
new file mode 100644
index 00000000000..3fcbf5f9ab4
--- /dev/null
+++ b/db/migrate/20231123151831_add_index_to_saml_group_links_on_member_role_id.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class AddIndexToSamlGroupLinksOnMemberRoleId < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ disable_ddl_transaction!
+
+ INDEX_NAME = 'index_saml_group_links_on_member_role_id'
+
+ def up
+ add_concurrent_index :saml_group_links, :member_role_id, name: INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_index_by_name :saml_group_links, INDEX_NAME
+ end
+end
diff --git a/db/migrate/20231123151956_add_fk_to_member_role_on_saml_group_links.rb b/db/migrate/20231123151956_add_fk_to_member_role_on_saml_group_links.rb
new file mode 100644
index 00000000000..68bff64fbce
--- /dev/null
+++ b/db/migrate/20231123151956_add_fk_to_member_role_on_saml_group_links.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class AddFkToMemberRoleOnSamlGroupLinks < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_foreign_key :saml_group_links, :member_roles, column: :member_role_id, on_delete: :nullify
+ end
+
+ def down
+ with_lock_retries do
+ remove_foreign_key :saml_group_links, column: :member_role_id
+ end
+ end
+end
diff --git a/db/migrate/20231123165947_change_fk_to_member_role_on_members_from_cascade_to_nullify.rb b/db/migrate/20231123165947_change_fk_to_member_role_on_members_from_cascade_to_nullify.rb
new file mode 100644
index 00000000000..c0b4ada822d
--- /dev/null
+++ b/db/migrate/20231123165947_change_fk_to_member_role_on_members_from_cascade_to_nullify.rb
@@ -0,0 +1,24 @@
+# frozen_string_literal: true
+
+class ChangeFkToMemberRoleOnMembersFromCascadeToNullify < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ disable_ddl_transaction!
+
+ FK_NAME = 'fk_member_role_on_members'
+
+ def up
+ add_concurrent_foreign_key :members, :member_roles, column: :member_role_id, on_delete: :nullify, name: FK_NAME
+
+ with_lock_retries do
+ remove_foreign_key :members, column: :member_role_id
+ end
+ end
+
+ def down
+ add_concurrent_foreign_key :members, :member_roles, column: :member_role_id, on_delete: :cascade
+
+ with_lock_retries do
+ remove_foreign_key :members, column: :member_role_id, name: FK_NAME
+ end
+ end
+end
diff --git a/db/migrate/20231124112409_add_instance_level_ai_beta_features_enabled_to_app_settings.rb b/db/migrate/20231124112409_add_instance_level_ai_beta_features_enabled_to_app_settings.rb
new file mode 100644
index 00000000000..3ff4dd381e0
--- /dev/null
+++ b/db/migrate/20231124112409_add_instance_level_ai_beta_features_enabled_to_app_settings.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class AddInstanceLevelAiBetaFeaturesEnabledToAppSettings < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ def change
+ add_column :application_settings, :instance_level_ai_beta_features_enabled, :boolean, null: false, default: false
+ end
+end
diff --git a/db/migrate/20231124134838_add_index_dependency_proxy_package_settings_enabled_for_maven.rb b/db/migrate/20231124134838_add_index_dependency_proxy_package_settings_enabled_for_maven.rb
new file mode 100644
index 00000000000..d722a6c5c59
--- /dev/null
+++ b/db/migrate/20231124134838_add_index_dependency_proxy_package_settings_enabled_for_maven.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: true
+
+class AddIndexDependencyProxyPackageSettingsEnabledForMaven < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ INDEX_NAME = 'idx_dep_proxy_pkgs_settings_enabled_maven_on_project_id'
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index(
+ :dependency_proxy_packages_settings,
+ :project_id,
+ name: INDEX_NAME,
+ where: 'enabled = TRUE AND maven_external_registry_url IS NOT NULL'
+ )
+ end
+
+ def down
+ remove_concurrent_index_by_name(:dependency_proxy_packages_settings, name: INDEX_NAME)
+ end
+end
diff --git a/db/migrate/20231124191759_add_catalog_resource_sync_events_table.rb b/db/migrate/20231124191759_add_catalog_resource_sync_events_table.rb
new file mode 100644
index 00000000000..d4c628a1770
--- /dev/null
+++ b/db/migrate/20231124191759_add_catalog_resource_sync_events_table.rb
@@ -0,0 +1,39 @@
+# frozen_string_literal: true
+
+class AddCatalogResourceSyncEventsTable < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ enable_lock_retries!
+
+ def up
+ options = {
+ primary_key: [:id, :partition_id],
+ options: 'PARTITION BY LIST (partition_id)',
+ if_not_exists: true
+ }
+
+ create_table(:p_catalog_resource_sync_events, **options) do |t|
+ t.bigserial :id, null: false
+ # We will not bother with foreign keys as they come with a performance cost; they will get cleaned up over time.
+ t.bigint :catalog_resource_id, null: false
+ t.bigint :project_id, null: false
+ t.bigint :partition_id, null: false, default: 1
+ t.integer :status, null: false, default: 1, limit: 2
+ t.timestamps_with_timezone null: false, default: -> { 'NOW()' }
+
+ t.index :id,
+ where: 'status = 1',
+ name: :index_p_catalog_resource_sync_events_on_id_where_pending
+ end
+
+ connection.execute(<<~SQL)
+ CREATE TABLE IF NOT EXISTS gitlab_partitions_dynamic.p_catalog_resource_sync_events_1
+ PARTITION OF p_catalog_resource_sync_events
+ FOR VALUES IN (1);
+ SQL
+ end
+
+ def down
+ drop_table :p_catalog_resource_sync_events
+ end
+end
diff --git a/db/migrate/20231124282441_add_catalog_resource_sync_event_triggers.rb b/db/migrate/20231124282441_add_catalog_resource_sync_event_triggers.rb
new file mode 100644
index 00000000000..01f87d61e02
--- /dev/null
+++ b/db/migrate/20231124282441_add_catalog_resource_sync_event_triggers.rb
@@ -0,0 +1,44 @@
+# frozen_string_literal: true
+
+class AddCatalogResourceSyncEventTriggers < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ include Gitlab::Database::SchemaHelpers
+
+ enable_lock_retries!
+
+ EVENTS_TABLE_NAME = 'p_catalog_resource_sync_events'
+ RESOURCES_TABLE_NAME = 'catalog_resources'
+ PROJECTS_TABLE_NAME = 'projects'
+
+ TRIGGER_FUNCTION_NAME = 'insert_catalog_resource_sync_event'
+ TRIGGER_NAME = 'trigger_catalog_resource_sync_event_on_project_update'
+
+ def up
+ create_trigger_function(TRIGGER_FUNCTION_NAME, replace: true) do
+ <<~SQL
+ INSERT INTO #{EVENTS_TABLE_NAME} (catalog_resource_id, project_id)
+ SELECT id, OLD.id FROM #{RESOURCES_TABLE_NAME}
+ WHERE project_id = OLD.id;
+ RETURN NULL;
+ SQL
+ end
+
+ create_trigger(
+ PROJECTS_TABLE_NAME, TRIGGER_NAME, TRIGGER_FUNCTION_NAME, fires: 'AFTER UPDATE'
+ ) do
+ <<~SQL
+ WHEN (
+ OLD.name IS DISTINCT FROM NEW.name OR
+ OLD.description IS DISTINCT FROM NEW.description OR
+ OLD.visibility_level IS DISTINCT FROM NEW.visibility_level
+ )
+ SQL
+ end
+ end
+
+ def down
+ drop_trigger(PROJECTS_TABLE_NAME, TRIGGER_NAME)
+ drop_function(TRIGGER_FUNCTION_NAME)
+ end
+end
diff --git a/db/migrate/20231126192652_remove_unique_url_indices_from_zoekt_nodes.rb b/db/migrate/20231126192652_remove_unique_url_indices_from_zoekt_nodes.rb
new file mode 100644
index 00000000000..e193a83e24a
--- /dev/null
+++ b/db/migrate/20231126192652_remove_unique_url_indices_from_zoekt_nodes.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class RemoveUniqueUrlIndicesFromZoektNodes < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ disable_ddl_transaction!
+
+ INDEX_NAME_INDEX_URL = 'index_zoekt_nodes_on_index_base_url'
+ INDEX_NAME_SEARCH_URL = 'index_zoekt_nodes_on_search_base_url'
+
+ def up
+ remove_concurrent_index :zoekt_nodes, :index_base_url, name: INDEX_NAME_INDEX_URL
+ remove_concurrent_index :zoekt_nodes, :search_base_url, name: INDEX_NAME_SEARCH_URL
+ end
+
+ def down
+ add_concurrent_index :zoekt_nodes, :index_base_url, unique: true, name: INDEX_NAME_INDEX_URL
+ add_concurrent_index :zoekt_nodes, :search_base_url, unique: true, name: INDEX_NAME_SEARCH_URL
+ end
+end
diff --git a/db/migrate/20231126200903_rename_container_registry_protection_rules_container_path_pattern.rb b/db/migrate/20231126200903_rename_container_registry_protection_rules_container_path_pattern.rb
new file mode 100644
index 00000000000..65cf00c93e5
--- /dev/null
+++ b/db/migrate/20231126200903_rename_container_registry_protection_rules_container_path_pattern.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class RenameContainerRegistryProtectionRulesContainerPathPattern < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ def up
+ rename_column_concurrently :container_registry_protection_rules, :container_path_pattern, :repository_path_pattern
+ end
+
+ def down
+ undo_rename_column_concurrently :container_registry_protection_rules, :container_path_pattern,
+ :repository_path_pattern
+ end
+end
diff --git a/db/migrate/20231126200904_rename_index_i_container_protection_unique_project_id_container_path_pattern.rb b/db/migrate/20231126200904_rename_index_i_container_protection_unique_project_id_container_path_pattern.rb
new file mode 100644
index 00000000000..66e53a5da66
--- /dev/null
+++ b/db/migrate/20231126200904_rename_index_i_container_protection_unique_project_id_container_path_pattern.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+
+class RenameIndexIContainerProtectionUniqueProjectIdContainerPathPattern < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ def up
+ # Precaution in case the index is missing for some reason
+ return unless index_exists_by_name?(:container_registry_protection_rules, :idx_copy_d01a85dee8)
+
+ rename_index :container_registry_protection_rules, :idx_copy_d01a85dee8,
+ :i_container_protection_unique_project_repository_path_pattern
+ end
+
+ def down
+ return unless index_exists_by_name?(:container_registry_protection_rules,
+ :i_container_protection_unique_project_repository_path_pattern)
+
+ rename_index :container_registry_protection_rules, :i_container_protection_unique_project_repository_path_pattern,
+ :idx_copy_d01a85dee8
+ end
+end
diff --git a/db/migrate/20231129124754_add_cascading_toggle_security_policy_custom_ci_setting.rb b/db/migrate/20231129124754_add_cascading_toggle_security_policy_custom_ci_setting.rb
new file mode 100644
index 00000000000..0a97d500e3d
--- /dev/null
+++ b/db/migrate/20231129124754_add_cascading_toggle_security_policy_custom_ci_setting.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class AddCascadingToggleSecurityPolicyCustomCiSetting < Gitlab::Database::Migration[2.2]
+ milestone '16.8'
+
+ include Gitlab::Database::MigrationHelpers::CascadingNamespaceSettings
+
+ enable_lock_retries!
+
+ def up
+ add_cascading_namespace_setting :toggle_security_policy_custom_ci, :boolean, default: false, null: false
+ end
+
+ def down
+ remove_cascading_namespace_setting :toggle_security_policy_custom_ci
+ end
+end
diff --git a/db/migrate/20231129211524_add_project_xray_report_model.rb b/db/migrate/20231129211524_add_project_xray_report_model.rb
new file mode 100644
index 00000000000..eed1ed2c6eb
--- /dev/null
+++ b/db/migrate/20231129211524_add_project_xray_report_model.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class AddProjectXrayReportModel < Gitlab::Database::Migration[2.2]
+ enable_lock_retries!
+ milestone '16.7'
+
+ def change
+ create_table :xray_reports, if_not_exists: true do |t|
+ # we create an index manually below, don't create one here
+ t.references :project, null: false, index: false, foreign_key: { on_delete: :cascade }
+ t.timestamps_with_timezone null: false
+ t.text :lang, null: false, limit: 255
+ t.jsonb :payload, null: false
+ t.binary :file_checksum, null: false
+ end
+
+ add_index :xray_reports, [:project_id, :lang], unique: true, name: 'index_xray_reports_on_project_id_and_lang'
+ end
+end
diff --git a/db/migrate/20231129231159_add_security_txt_content_to_application_settings.rb b/db/migrate/20231129231159_add_security_txt_content_to_application_settings.rb
new file mode 100644
index 00000000000..1072e8034fb
--- /dev/null
+++ b/db/migrate/20231129231159_add_security_txt_content_to_application_settings.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+class AddSecurityTxtContentToApplicationSettings < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ disable_ddl_transaction!
+
+ def up
+ with_lock_retries do
+ add_column :application_settings, :security_txt_content, :text, if_not_exists: true
+ end
+
+ add_text_limit :application_settings, :security_txt_content, 2048
+ end
+
+ def down
+ with_lock_retries do
+ remove_column :application_settings, :security_txt_content, if_exists: true
+ end
+ end
+end
diff --git a/db/migrate/20231130192752_add_options_to_elastic_reindexing_tasks.rb b/db/migrate/20231130192752_add_options_to_elastic_reindexing_tasks.rb
new file mode 100644
index 00000000000..3a94e6d600b
--- /dev/null
+++ b/db/migrate/20231130192752_add_options_to_elastic_reindexing_tasks.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class AddOptionsToElasticReindexingTasks < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ def change
+ add_column :elastic_reindexing_tasks, :options, :jsonb, null: false, default: {}
+ end
+end
diff --git a/db/migrate/20231130195635_add_model_registry_access_level_to_project_feature.rb b/db/migrate/20231130195635_add_model_registry_access_level_to_project_feature.rb
new file mode 100644
index 00000000000..95675a1f82a
--- /dev/null
+++ b/db/migrate/20231130195635_add_model_registry_access_level_to_project_feature.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class AddModelRegistryAccessLevelToProjectFeature < Gitlab::Database::Migration[2.2]
+ OPERATIONS_DEFAULT_VALUE = 20
+
+ enable_lock_retries!
+ milestone '16.7'
+
+ def change
+ add_column :project_features,
+ :model_registry_access_level,
+ :integer,
+ null: false,
+ default: OPERATIONS_DEFAULT_VALUE
+ end
+end
diff --git a/db/migrate/20231201095326_add_home_organization_id_fk_to_user_preferences.rb b/db/migrate/20231201095326_add_home_organization_id_fk_to_user_preferences.rb
new file mode 100644
index 00000000000..7eb2c0116d1
--- /dev/null
+++ b/db/migrate/20231201095326_add_home_organization_id_fk_to_user_preferences.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class AddHomeOrganizationIdFkToUserPreferences < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+ milestone '16.7'
+
+ def up
+ add_concurrent_foreign_key(:user_preferences, :organizations, column: :home_organization_id, on_delete: :nullify)
+ end
+
+ def down
+ with_lock_retries do
+ remove_foreign_key_if_exists :user_preferences, column: :home_organization_id
+ end
+ end
+end
diff --git a/db/migrate/20231201113901_add_url_sub_fields_to_workspace.rb b/db/migrate/20231201113901_add_url_sub_fields_to_workspace.rb
new file mode 100644
index 00000000000..ac228b70665
--- /dev/null
+++ b/db/migrate/20231201113901_add_url_sub_fields_to_workspace.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: true
+
+class AddUrlSubFieldsToWorkspace < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ disable_ddl_transaction!
+
+ def up
+ add_column :workspaces, :url_prefix, :text, if_not_exists: true
+ add_column :workspaces, :url_domain, :text, if_not_exists: true
+ add_column :workspaces, :url_query_string, :text, if_not_exists: true
+
+ add_text_limit :workspaces, :url_prefix, 256
+ add_text_limit :workspaces, :url_domain, 256
+ add_text_limit :workspaces, :url_query_string, 256
+ end
+
+ def down
+ remove_column :workspaces, :url_prefix, if_exists: true
+ remove_column :workspaces, :url_domain, if_exists: true
+ remove_column :workspaces, :url_query_string, if_exists: true
+ end
+end
diff --git a/db/migrate/20231201114233_remove_not_null_constraint_from_url_column.rb b/db/migrate/20231201114233_remove_not_null_constraint_from_url_column.rb
new file mode 100644
index 00000000000..e11903b90b9
--- /dev/null
+++ b/db/migrate/20231201114233_remove_not_null_constraint_from_url_column.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+class RemoveNotNullConstraintFromUrlColumn < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ disable_ddl_transaction!
+
+ def up
+ change_column_null :workspaces, :url, true
+ end
+
+ def down
+ change_column_null :workspaces, :url, false
+ end
+end
diff --git a/db/migrate/20231201122830_add_owasp_top_10_to_vulnerability_reads.rb b/db/migrate/20231201122830_add_owasp_top_10_to_vulnerability_reads.rb
new file mode 100644
index 00000000000..2428857ca7f
--- /dev/null
+++ b/db/migrate/20231201122830_add_owasp_top_10_to_vulnerability_reads.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+class AddOwaspTop10ToVulnerabilityReads < Gitlab::Database::Migration[2.2]
+ enable_lock_retries!
+ milestone '16.7'
+
+ def change
+ add_column :vulnerability_reads, :owasp_top_10, :integer, limit: 2
+ end
+end
diff --git a/db/migrate/20231204144300_add_index_service_desk_settings_on_custom_email_enabled.rb b/db/migrate/20231204144300_add_index_service_desk_settings_on_custom_email_enabled.rb
new file mode 100644
index 00000000000..22c8c196234
--- /dev/null
+++ b/db/migrate/20231204144300_add_index_service_desk_settings_on_custom_email_enabled.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class AddIndexServiceDeskSettingsOnCustomEmailEnabled < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ INDEX_NAME = 'index_service_desk_settings_on_custom_email_enabled'
+
+ def up
+ add_concurrent_index :service_desk_settings, :custom_email_enabled, name: INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_index_by_name :service_desk_settings, INDEX_NAME
+ end
+end
diff --git a/db/migrate/20231204192313_add_avatar_to_organization_details.rb b/db/migrate/20231204192313_add_avatar_to_organization_details.rb
new file mode 100644
index 00000000000..78dbf53a4a9
--- /dev/null
+++ b/db/migrate/20231204192313_add_avatar_to_organization_details.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+class AddAvatarToOrganizationDetails < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+ milestone '16.7'
+
+ def up
+ with_lock_retries do
+ add_column :organization_details, :avatar, :text, if_not_exists: true
+ end
+
+ add_text_limit :organization_details, :avatar, 255
+ end
+
+ def down
+ with_lock_retries do
+ remove_column :organization_details, :avatar, if_exists: true
+ end
+ end
+end
diff --git a/db/migrate/20231205141450_add_nuget_symbol_server_enabled_to_namespace_package_settings.rb b/db/migrate/20231205141450_add_nuget_symbol_server_enabled_to_namespace_package_settings.rb
new file mode 100644
index 00000000000..9a800103366
--- /dev/null
+++ b/db/migrate/20231205141450_add_nuget_symbol_server_enabled_to_namespace_package_settings.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class AddNugetSymbolServerEnabledToNamespacePackageSettings < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+ milestone '16.7'
+
+ def up
+ with_lock_retries do
+ add_column :namespace_package_settings, :nuget_symbol_server_enabled, :boolean, default: false, null: false,
+ if_not_exists: true
+ end
+ end
+
+ def down
+ with_lock_retries do
+ remove_column :namespace_package_settings, :nuget_symbol_server_enabled, if_exists: true
+ end
+ end
+end
diff --git a/db/migrate/20231205163658_add_code_suggestions_to_project_setting.rb b/db/migrate/20231205163658_add_code_suggestions_to_project_setting.rb
new file mode 100644
index 00000000000..53c303963a5
--- /dev/null
+++ b/db/migrate/20231205163658_add_code_suggestions_to_project_setting.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+class AddCodeSuggestionsToProjectSetting < Gitlab::Database::Migration[2.2]
+ enable_lock_retries!
+ milestone '16.7'
+
+ def change
+ add_column :project_settings, :code_suggestions, :boolean, default: true, null: false
+ end
+end
diff --git a/db/migrate/20231205201701_remove_geo_primary_deprecated_workers_job_instances.rb b/db/migrate/20231205201701_remove_geo_primary_deprecated_workers_job_instances.rb
new file mode 100644
index 00000000000..a0eab0f9fcb
--- /dev/null
+++ b/db/migrate/20231205201701_remove_geo_primary_deprecated_workers_job_instances.rb
@@ -0,0 +1,24 @@
+# frozen_string_literal: true
+
+class RemoveGeoPrimaryDeprecatedWorkersJobInstances < Gitlab::Database::Migration[2.2]
+ DEPRECATED_JOB_CLASSES = %w[
+ Geo::RepositoryVerification::Primary::BatchWorker
+ Geo::RepositoryVerification::Primary::ShardWorker
+ Geo::RepositoryVerification::Primary::SingleWorker
+ Geo::RepositoryVerification::Secondary::SingleWorker
+ Geo::Scheduler::Primary::PerShardSchedulerWorker
+ Geo::Scheduler::Primary::SchedulerWorker
+ ]
+
+ disable_ddl_transaction!
+
+ milestone '16.7'
+
+ def up
+ sidekiq_remove_jobs(job_klasses: DEPRECATED_JOB_CLASSES)
+ end
+
+ def down
+ # This migration removes any instances of deprecated workers and cannot be undone.
+ end
+end
diff --git a/db/migrate/20231206144919_add_repository_xray_plan_limit.rb b/db/migrate/20231206144919_add_repository_xray_plan_limit.rb
new file mode 100644
index 00000000000..8d276aa9100
--- /dev/null
+++ b/db/migrate/20231206144919_add_repository_xray_plan_limit.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+class AddRepositoryXrayPlanLimit < Gitlab::Database::Migration[2.2]
+ enable_lock_retries!
+ milestone '16.7'
+
+ def change
+ add_column :plan_limits, :ci_max_artifact_size_repository_xray, :bigint, default: 1.gigabyte, null: false
+ end
+end
diff --git a/db/migrate/20231206183312_add_use_web_ide_extension_marketplace_to_user_preferences.rb b/db/migrate/20231206183312_add_use_web_ide_extension_marketplace_to_user_preferences.rb
new file mode 100644
index 00000000000..1ea85760dbc
--- /dev/null
+++ b/db/migrate/20231206183312_add_use_web_ide_extension_marketplace_to_user_preferences.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+class AddUseWebIdeExtensionMarketplaceToUserPreferences < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ enable_lock_retries!
+
+ def change
+ add_column :user_preferences, :use_web_ide_extension_marketplace, :boolean, default: false, null: false
+ end
+end
diff --git a/db/migrate/20231207144215_add_postgres_sequences_view.rb b/db/migrate/20231207144215_add_postgres_sequences_view.rb
new file mode 100644
index 00000000000..6187bb5f15e
--- /dev/null
+++ b/db/migrate/20231207144215_add_postgres_sequences_view.rb
@@ -0,0 +1,28 @@
+# frozen_string_literal: true
+
+class AddPostgresSequencesView < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ enable_lock_retries!
+
+ def up
+ execute(<<~SQL)
+ CREATE OR REPLACE VIEW postgres_sequences
+ AS
+ SELECT seq_pg_class.relname AS seq_name,
+ dep_pg_class.relname AS table_name,
+ pg_attribute.attname AS col_name
+ FROM pg_class seq_pg_class
+ INNER JOIN pg_depend ON seq_pg_class.oid = pg_depend.objid
+ INNER JOIN pg_class dep_pg_class ON pg_depend.refobjid = dep_pg_class.oid
+ INNER JOIN pg_attribute ON dep_pg_class.oid = pg_attribute.attrelid
+ AND pg_depend.refobjsubid = pg_attribute.attnum
+ WHERE seq_pg_class.relkind = 'S'
+ SQL
+ end
+
+ def down
+ execute(<<~SQL)
+ DROP VIEW postgres_sequences;
+ SQL
+ end
+end
diff --git a/db/migrate/20231207150738_add_work_item_dates_sources.rb b/db/migrate/20231207150738_add_work_item_dates_sources.rb
new file mode 100644
index 00000000000..a6cc06fcd88
--- /dev/null
+++ b/db/migrate/20231207150738_add_work_item_dates_sources.rb
@@ -0,0 +1,32 @@
+# frozen_string_literal: true
+
+class AddWorkItemDatesSources < Gitlab::Database::Migration[2.2]
+ enable_lock_retries!
+ milestone '16.7'
+
+ def up
+ create_table :work_item_dates_sources, id: false do |t|
+ t.timestamps_with_timezone null: false
+ t.references :issue,
+ primary_key: true,
+ index: false,
+ default: nil,
+ foreign_key: { on_delete: :cascade, to_table: :issues }
+
+ t.bigint :namespace_id, null: false
+
+ t.boolean :start_date_is_fixed, default: false, null: false
+ t.boolean :due_date_is_fixed, default: false, null: false
+ t.date :start_date, null: true
+ t.date :due_date, null: true
+ t.bigint :start_date_sourcing_work_item_id, null: true
+ t.bigint :start_date_sourcing_milestone_id, null: true
+ t.bigint :due_date_sourcing_work_item_id, null: true
+ t.bigint :due_date_sourcing_milestone_id, null: true
+ end
+ end
+
+ def down
+ drop_table :work_item_dates_sources
+ end
+end
diff --git a/db/migrate/20231207150739_add_work_item_dates_sources_foreing_keys.rb b/db/migrate/20231207150739_add_work_item_dates_sources_foreing_keys.rb
new file mode 100644
index 00000000000..89e592774d2
--- /dev/null
+++ b/db/migrate/20231207150739_add_work_item_dates_sources_foreing_keys.rb
@@ -0,0 +1,28 @@
+# frozen_string_literal: true
+
+class AddWorkItemDatesSourcesForeingKeys < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+ milestone '16.7'
+
+ TABLE = :work_item_dates_sources
+ COLUMNS = {
+ namespace_id: :namespaces,
+ start_date_sourcing_work_item_id: :issues,
+ start_date_sourcing_milestone_id: :milestones,
+ due_date_sourcing_work_item_id: :issues,
+ due_date_sourcing_milestone_id: :milestones
+ }.freeze
+
+ def up
+ COLUMNS.each do |column, target_table|
+ add_concurrent_foreign_key TABLE, target_table, column: column, on_delete: :nullify
+ add_concurrent_index TABLE, column, name: "wi_datessources_#{column}_index"
+ end
+ end
+
+ def down
+ COLUMNS.each_key do |column|
+ remove_foreign_key_if_exists TABLE, :issues, column: column
+ end
+ end
+end
diff --git a/db/migrate/20231211100717_add_source_package_name_to_sbom_component_versions.rb b/db/migrate/20231211100717_add_source_package_name_to_sbom_component_versions.rb
new file mode 100644
index 00000000000..9c8e4733ace
--- /dev/null
+++ b/db/migrate/20231211100717_add_source_package_name_to_sbom_component_versions.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class AddSourcePackageNameToSbomComponentVersions < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+
+ milestone '16.7'
+
+ def up
+ with_lock_retries do
+ add_column :sbom_component_versions, :source_package_name, :text, if_not_exists: true
+ end
+
+ add_text_limit :sbom_component_versions, :source_package_name, 255
+ end
+
+ def down
+ with_lock_retries do
+ remove_column :sbom_component_versions, :source_package_name, if_exists: true
+ end
+ end
+end
diff --git a/db/migrate/20231213112726_add_trigram_index_to_compliance_management_frameworks_on_name.rb b/db/migrate/20231213112726_add_trigram_index_to_compliance_management_frameworks_on_name.rb
new file mode 100644
index 00000000000..dfc19b3ee7c
--- /dev/null
+++ b/db/migrate/20231213112726_add_trigram_index_to_compliance_management_frameworks_on_name.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class AddTrigramIndexToComplianceManagementFrameworksOnName < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ INDEX_NAME = 'index_compliance_management_frameworks_on_name_trigram'
+
+ def up
+ add_concurrent_index :compliance_management_frameworks, :name,
+ name: INDEX_NAME,
+ using: :gin, opclass: { name: :gin_trgm_ops }
+ end
+
+ def down
+ remove_concurrent_index_by_name :compliance_management_frameworks, INDEX_NAME
+ end
+end
diff --git a/db/migrate/20231214064934_add_arkose_labs_data_exchange_key_to_application_settings.rb b/db/migrate/20231214064934_add_arkose_labs_data_exchange_key_to_application_settings.rb
new file mode 100644
index 00000000000..2a7650f1185
--- /dev/null
+++ b/db/migrate/20231214064934_add_arkose_labs_data_exchange_key_to_application_settings.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+class AddArkoseLabsDataExchangeKeyToApplicationSettings < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ def change
+ add_column :application_settings, :encrypted_arkose_labs_data_exchange_key, :binary
+ add_column :application_settings, :encrypted_arkose_labs_data_exchange_key_iv, :binary
+ end
+end
diff --git a/db/migrate/20231214164411_add_code_added_at_to_onboarding_progresses.rb b/db/migrate/20231214164411_add_code_added_at_to_onboarding_progresses.rb
new file mode 100644
index 00000000000..b8fa49e7a36
--- /dev/null
+++ b/db/migrate/20231214164411_add_code_added_at_to_onboarding_progresses.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+class AddCodeAddedAtToOnboardingProgresses < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ enable_lock_retries!
+
+ def change
+ add_column :onboarding_progresses, :code_added_at, :datetime_with_timezone
+ 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/20220601110011_schedule_remove_self_managed_wiki_notes.rb b/db/post_migrate/20220601110011_schedule_remove_self_managed_wiki_notes.rb
deleted file mode 100644
index 9e6594bb9b6..00000000000
--- a/db/post_migrate/20220601110011_schedule_remove_self_managed_wiki_notes.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleRemoveSelfManagedWikiNotes < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- MIGRATION = 'RemoveSelfManagedWikiNotes'
- INTERVAL = 2.minutes
-
- disable_ddl_transaction!
-
- def up
- return if skip_migration?
-
- queue_batched_background_migration(
- MIGRATION,
- :notes,
- :id,
- job_interval: INTERVAL,
- batch_size: 10_000,
- sub_batch_size: 1_000
- )
- end
-
- def down
- return if skip_migration?
-
- delete_batched_background_migration(MIGRATION, :notes, :id, [])
- end
-
- private
-
- def skip_migration?
- Gitlab.staging? || Gitlab.com?
- end
-end
diff --git a/db/post_migrate/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/20220606054503_add_tmp_index_job_artifacts_id_and_expire_at.rb b/db/post_migrate/20220606054503_add_tmp_index_job_artifacts_id_and_expire_at.rb
deleted file mode 100644
index 28346eb1a97..00000000000
--- a/db/post_migrate/20220606054503_add_tmp_index_job_artifacts_id_and_expire_at.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-class AddTmpIndexJobArtifactsIdAndExpireAt < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'tmp_index_ci_job_artifacts_on_id_expire_at_file_type_trace'
-
- EXPIRE_AT_ON_22_MIDNIGHT_IN_TIMEZONE_OR_TRACE = <<~SQL
- (EXTRACT(day FROM timezone('UTC', expire_at)) IN (21, 22, 23)
- AND EXTRACT(minute FROM timezone('UTC', expire_at)) IN (0, 30, 45)
- AND EXTRACT(second FROM timezone('UTC', expire_at)) = 0)
- OR file_type = 3
- SQL
-
- def up
- return if Gitlab.com?
- return if index_exists_by_name?(:ci_job_artifacts, INDEX_NAME)
-
- add_concurrent_index :ci_job_artifacts, :id,
- where: EXPIRE_AT_ON_22_MIDNIGHT_IN_TIMEZONE_OR_TRACE, name: INDEX_NAME
- end
-
- def down
- return if Gitlab.com?
- return unless index_exists_by_name?(:ci_job_artifacts, INDEX_NAME)
-
- remove_concurrent_index_by_name :ci_job_artifacts, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/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/20220606080509_fix_incorrect_job_artifacts_expire_at.rb b/db/post_migrate/20220606080509_fix_incorrect_job_artifacts_expire_at.rb
deleted file mode 100644
index 8fea22f5579..00000000000
--- a/db/post_migrate/20220606080509_fix_incorrect_job_artifacts_expire_at.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-# frozen_string_literal: true
-
-class FixIncorrectJobArtifactsExpireAt < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- restrict_gitlab_migration gitlab_schema: :gitlab_ci
-
- MIGRATION = 'RemoveBackfilledJobArtifactsExpireAt'
- BATCH_CLASS = 'RemoveBackfilledJobArtifactsExpireAtBatchingStrategy'
- BATCH_SIZE = 500
- INTERVAL = 2.minutes.freeze
-
- def up
- return if Gitlab.com?
-
- queue_batched_background_migration(
- MIGRATION,
- :ci_job_artifacts,
- :id,
- job_interval: INTERVAL,
- batch_class_name: BATCH_CLASS,
- batch_size: BATCH_SIZE
- )
- end
-
- def down
- return if Gitlab.com?
-
- delete_batched_background_migration(MIGRATION, :ci_job_artifacts, :id, [])
- end
-end
diff --git a/db/post_migrate/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/20220615154500_schedule_backfill_cluster_agents_has_vulnerabilities.rb b/db/post_migrate/20220615154500_schedule_backfill_cluster_agents_has_vulnerabilities.rb
deleted file mode 100644
index 74aeb2947a9..00000000000
--- a/db/post_migrate/20220615154500_schedule_backfill_cluster_agents_has_vulnerabilities.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleBackfillClusterAgentsHasVulnerabilities < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- MIGRATION = 'BackfillClusterAgentsHasVulnerabilities'
- DELAY_INTERVAL = 2.minutes
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- ensure_batched_background_migration_is_finished(
- job_class_name: 'BackfillVulnerabilityReadsClusterAgent',
- table_name: :vulnerability_reads,
- column_name: :id,
- job_arguments: []
- )
-
- queue_batched_background_migration(
- MIGRATION,
- :cluster_agents,
- :id,
- job_interval: DELAY_INTERVAL
- )
- end
-
- def down
- delete_batched_background_migration(MIGRATION, :cluster_agents, :id, [])
- end
-end
diff --git a/db/post_migrate/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/20220616171355_update_vulnerabilities_project_id_id_active_cis_index.rb b/db/post_migrate/20220616171355_update_vulnerabilities_project_id_id_active_cis_index.rb
deleted file mode 100644
index 047ae0d1132..00000000000
--- a/db/post_migrate/20220616171355_update_vulnerabilities_project_id_id_active_cis_index.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# frozen_string_literal: true
-
-class UpdateVulnerabilitiesProjectIdIdActiveCisIndex < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- NEW_INDEX_NAME = 'idx_vulnerabilities_on_project_id_and_id_active_cis_dft_branch'
- OLD_INDEX_NAME = 'index_vulnerabilities_on_project_id_and_id_active_cis'
- OLD_INDEX_FILTER_CONDITION = 'report_type = 7 AND state = ANY(ARRAY[1, 4])'
- NEW_INDEX_FILTER_CONDITION = 'report_type = 7 AND state = ANY(ARRAY[1, 4]) AND present_on_default_branch IS TRUE'
-
- def up
- add_concurrent_index :vulnerabilities, [:project_id, :id],
- where: NEW_INDEX_FILTER_CONDITION,
- name: NEW_INDEX_NAME
-
- remove_concurrent_index_by_name(:vulnerabilities, OLD_INDEX_NAME)
- end
-
- def down
- add_concurrent_index :vulnerabilities, [:project_id, :id], where: OLD_INDEX_FILTER_CONDITION, name: OLD_INDEX_NAME
-
- remove_concurrent_index_by_name(:vulnerabilities, NEW_INDEX_NAME)
- end
-end
diff --git a/db/post_migrate/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/20220706145113_backfill_namespace_id_on_issues.rb b/db/post_migrate/20220706145113_backfill_namespace_id_on_issues.rb
deleted file mode 100644
index 8114967ac8e..00000000000
--- a/db/post_migrate/20220706145113_backfill_namespace_id_on_issues.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-class BackfillNamespaceIdOnIssues < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_main
- disable_ddl_transaction!
-
- MIGRATION = 'BackfillProjectNamespaceOnIssues'
- DELAY_INTERVAL = 2.minutes
- BATCH_SIZE = 500
- MAX_BATCH_SIZE = 10_000
- SUB_BATCH_SIZE = 10
-
- def up
- queue_batched_background_migration(
- MIGRATION,
- :issues,
- :id,
- job_interval: DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- max_batch_size: MAX_BATCH_SIZE,
- sub_batch_size: SUB_BATCH_SIZE
- )
- end
-
- def down
- delete_batched_background_migration(MIGRATION, :issues, :id, [])
- end
-end
diff --git a/db/post_migrate/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/20220707192420_remove_tmp_idx_merge_requests_draft_and_status.rb b/db/post_migrate/20220707192420_remove_tmp_idx_merge_requests_draft_and_status.rb
deleted file mode 100644
index a8cfea02463..00000000000
--- a/db/post_migrate/20220707192420_remove_tmp_idx_merge_requests_draft_and_status.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveTmpIdxMergeRequestsDraftAndStatus < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = "tmp_index_merge_requests_draft_and_status"
- CORRECTED_REGEXP_STR = "^(\\[draft\\]|\\(draft\\)|draft:|draft|\\[WIP\\]|WIP:|WIP)"
-
- def up
- remove_concurrent_index_by_name :merge_requests, INDEX_NAME
- end
-
- def down
- add_concurrent_index :merge_requests, :id,
- where: "draft = false AND state_id = 1 AND ((title)::text ~* '#{CORRECTED_REGEXP_STR}'::text)",
- name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/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/20220726225114_remove_tmp_index_group_membership_namespace_id_column.rb b/db/post_migrate/20220726225114_remove_tmp_index_group_membership_namespace_id_column.rb
deleted file mode 100644
index db47be6a1e3..00000000000
--- a/db/post_migrate/20220726225114_remove_tmp_index_group_membership_namespace_id_column.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveTmpIndexGroupMembershipNamespaceIdColumn < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'tmp_index_for_namespace_id_migration_on_group_members'
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :members, INDEX_NAME
- end
-
- def down
- add_concurrent_index :members, :id,
- where: "members.member_namespace_id IS NULL and members.type = 'GroupMember'",
- name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/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/20220801155858_schedule_disable_legacy_open_source_licence_for_recent_public_projects.rb b/db/post_migrate/20220801155858_schedule_disable_legacy_open_source_licence_for_recent_public_projects.rb
deleted file mode 100644
index a662cfe4be3..00000000000
--- a/db/post_migrate/20220801155858_schedule_disable_legacy_open_source_licence_for_recent_public_projects.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleDisableLegacyOpenSourceLicenceForRecentPublicProjects < Gitlab::Database::Migration[2.0]
- MIGRATION = 'DisableLegacyOpenSourceLicenceForRecentPublicProjects'
- INTERVAL = 2.minutes
- BATCH_SIZE = 1_000
- MAX_BATCH_SIZE = 5_000
- SUB_BATCH_SIZE = 200
-
- disable_ddl_transaction!
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- return unless Gitlab.com?
-
- queue_batched_background_migration(
- MIGRATION,
- :projects,
- :id,
- job_interval: INTERVAL,
- batch_size: BATCH_SIZE,
- max_batch_size: MAX_BATCH_SIZE,
- sub_batch_size: SUB_BATCH_SIZE
- )
- end
-
- def down
- return unless Gitlab.com?
-
- delete_batched_background_migration(MIGRATION, :projects, :id, [])
- end
-end
diff --git a/db/post_migrate/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/20220809002011_schedule_destroy_invalid_group_members.rb b/db/post_migrate/20220809002011_schedule_destroy_invalid_group_members.rb
deleted file mode 100644
index e5d97d890ab..00000000000
--- a/db/post_migrate/20220809002011_schedule_destroy_invalid_group_members.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleDestroyInvalidGroupMembers < Gitlab::Database::Migration[2.0]
- MIGRATION = 'DestroyInvalidGroupMembers'
- DELAY_INTERVAL = 2.minutes
- BATCH_SIZE = 1_000
- MAX_BATCH_SIZE = 2_000
- SUB_BATCH_SIZE = 50
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- disable_ddl_transaction!
-
- def up
- # no-op
- # We want to no-op this due to potential inconsistencies in SM upgrade path
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220809214730_add_note_metadata_temp_index_on_id_where_task.rb b/db/post_migrate/20220809214730_add_note_metadata_temp_index_on_id_where_task.rb
deleted file mode 100644
index 1c5a1b68041..00000000000
--- a/db/post_migrate/20220809214730_add_note_metadata_temp_index_on_id_where_task.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddNoteMetadataTempIndexOnIdWhereTask < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'tmp_index_system_note_metadata_on_id_where_task'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :system_note_metadata, [:id, :action], where: "action = 'task'", name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :system_note_metadata, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220809223215_change_task_system_note_wording_to_checklist_item.rb b/db/post_migrate/20220809223215_change_task_system_note_wording_to_checklist_item.rb
deleted file mode 100644
index df7c2d325d2..00000000000
--- a/db/post_migrate/20220809223215_change_task_system_note_wording_to_checklist_item.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-class ChangeTaskSystemNoteWordingToChecklistItem < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_main
- disable_ddl_transaction!
-
- MIGRATION = 'RenameTaskSystemNoteToChecklistItem'
- DELAY_INTERVAL = 2.minutes
- BATCH_SIZE = 10_000
- MAX_BATCH_SIZE = 20_000
- SUB_BATCH_SIZE = 100
-
- def up
- queue_batched_background_migration(
- MIGRATION,
- :system_note_metadata,
- :id,
- job_interval: DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- max_batch_size: MAX_BATCH_SIZE,
- sub_batch_size: SUB_BATCH_SIZE
- )
- end
-
- def down
- delete_batched_background_migration(MIGRATION, :system_note_metadata, :id, [])
- end
-end
diff --git a/db/post_migrate/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/post_migrate/20220815061621_rename_web_hooks_service_id_to_integration_id.rb b/db/post_migrate/20220815061621_rename_web_hooks_service_id_to_integration_id.rb
deleted file mode 100644
index 6bcee7f51df..00000000000
--- a/db/post_migrate/20220815061621_rename_web_hooks_service_id_to_integration_id.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class RenameWebHooksServiceIdToIntegrationId < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- rename_column_concurrently :web_hooks, :service_id, :integration_id
- end
-
- def down
- undo_rename_column_concurrently :web_hooks, :service_id, :integration_id
- end
-end
diff --git a/db/post_migrate/20220816075638_drop_uuid_and_id_index_from_security_findings.rb b/db/post_migrate/20220816075638_drop_uuid_and_id_index_from_security_findings.rb
deleted file mode 100644
index 7a41e0b7835..00000000000
--- a/db/post_migrate/20220816075638_drop_uuid_and_id_index_from_security_findings.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class DropUuidAndIdIndexFromSecurityFindings < Gitlab::Database::Migration[2.0]
- INDEX_NAME = :index_on_security_findings_uuid_and_id_order_desc
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :security_findings, name: INDEX_NAME
- end
-
- def down
- add_concurrent_index :security_findings, [:uuid, :id], order: { id: :desc }, name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220816163444_update_start_date_for_iterations_cadences.rb b/db/post_migrate/20220816163444_update_start_date_for_iterations_cadences.rb
deleted file mode 100644
index 631e8941add..00000000000
--- a/db/post_migrate/20220816163444_update_start_date_for_iterations_cadences.rb
+++ /dev/null
@@ -1,53 +0,0 @@
-# frozen_string_literal: true
-
-class UpdateStartDateForIterationsCadences < Gitlab::Database::Migration[2.0]
- include ::Gitlab::Database::DynamicModelHelpers
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
- disable_ddl_transaction!
-
- def up
- each_batch_range('iterations_cadences', connection: connection) do |min, max|
- execute(<<~SQL)
- UPDATE iterations_cadences
- SET start_date=ic.first_upcoming_iteration_start_date
- FROM (
- SELECT ic.id, sprints2.first_upcoming_iteration_start_date
- FROM iterations_cadences as ic,
- LATERAL (
- -- For each cadence, query for the due date of its current iteration
- SELECT due_date as current_iteration_due_date FROM sprints
- WHERE iterations_cadence_id=ic.id AND start_date <= current_date AND due_date >= current_date
- LIMIT 1
- ) as sprints1,
- LATERAL (
- -- For each cadence, query for the start date of the first upcoming iteration (i.e, it starts after the current iteration)
- SELECT start_date as first_upcoming_iteration_start_date FROM sprints
- WHERE iterations_cadence_id=ic.id AND start_date > sprints1.current_iteration_due_date
- ORDER BY start_date ASC LIMIT 1
- ) as sprints2
- WHERE ic.automatic=true AND ic.id BETWEEN #{min} AND #{max}
- ) as ic
- WHERE iterations_cadences.id=ic.id;
- SQL
- end
- end
-
- def down
- each_batch_range('iterations_cadences', connection: connection) do |min, max|
- execute(<<~SQL)
- UPDATE iterations_cadences
- SET start_date=ic.first_iteration_start_date
- FROM (
- SELECT ic.id, sprints.start_date as first_iteration_start_date
- FROM iterations_cadences as ic,
- LATERAL (
- SELECT start_date FROM sprints WHERE iterations_cadence_id=ic.id ORDER BY start_date ASC LIMIT 1
- ) as sprints
- WHERE ic.automatic=true AND ic.id BETWEEN #{min} AND #{max}
- ) as ic
- WHERE iterations_cadences.id=ic.id;
- SQL
- end
- end
-end
diff --git a/db/post_migrate/20220820221036_update_tmp_non_migrated_index_on_container_repositories.rb b/db/post_migrate/20220820221036_update_tmp_non_migrated_index_on_container_repositories.rb
deleted file mode 100644
index eea58ad7951..00000000000
--- a/db/post_migrate/20220820221036_update_tmp_non_migrated_index_on_container_repositories.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# frozen_string_literal: true
-
-class UpdateTmpNonMigratedIndexOnContainerRepositories < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- NEW_INDEX_NAME = 'tmp_index_container_repos_on_non_migrated'
- OLD_INDEX_NAME = 'tmp_idx_container_repos_on_non_migrated'
- MIGRATION_PHASE_1_ENDED_AT = '2022-01-23'
-
- def up
- add_concurrent_index :container_repositories,
- [:project_id, :id],
- name: NEW_INDEX_NAME,
- where: "migration_state != 'import_done'"
- remove_concurrent_index_by_name :container_repositories, OLD_INDEX_NAME
- end
-
- def down
- add_concurrent_index :container_repositories,
- [:project_id, :id],
- name: OLD_INDEX_NAME,
- where: "migration_state != 'import_done' AND created_at < '#{MIGRATION_PHASE_1_ENDED_AT}'"
- remove_concurrent_index_by_name :container_repositories, NEW_INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220822071909_remove_other_role_from_user_details.rb b/db/post_migrate/20220822071909_remove_other_role_from_user_details.rb
deleted file mode 100644
index a0177bf2605..00000000000
--- a/db/post_migrate/20220822071909_remove_other_role_from_user_details.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveOtherRoleFromUserDetails < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- remove_column :user_details, :other_role, :text
- end
-end
diff --git a/db/post_migrate/20220822090656_drop_build_coverage_regex_from_project.rb b/db/post_migrate/20220822090656_drop_build_coverage_regex_from_project.rb
deleted file mode 100644
index 70c6b660318..00000000000
--- a/db/post_migrate/20220822090656_drop_build_coverage_regex_from_project.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class DropBuildCoverageRegexFromProject < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def up
- remove_column :projects, :build_coverage_regex
- end
-
- def down
- add_column :projects, :build_coverage_regex, :string # rubocop: disable Migration/AddColumnsToWideTables
- end
-end
diff --git a/db/post_migrate/20220822094804_add_issues_authorization_index.rb b/db/post_migrate/20220822094804_add_issues_authorization_index.rb
deleted file mode 100644
index e09b5f8d93b..00000000000
--- a/db/post_migrate/20220822094804_add_issues_authorization_index.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIssuesAuthorizationIndex < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'idx_open_issues_on_project_and_confidential_and_author_and_id'
-
- def up
- prepare_async_index :issues, [:project_id, :confidential, :author_id, :id], name: INDEX_NAME, where: 'state_id = 1'
- end
-
- def down
- unprepare_async_index :issues, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220823084747_prepare_removal_partial_trigram_indexes_for_issues.rb b/db/post_migrate/20220823084747_prepare_removal_partial_trigram_indexes_for_issues.rb
deleted file mode 100644
index a8ea6abdcba..00000000000
--- a/db/post_migrate/20220823084747_prepare_removal_partial_trigram_indexes_for_issues.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class PrepareRemovalPartialTrigramIndexesForIssues < Gitlab::Database::Migration[2.0]
- TITLE_INDEX_NAME = 'index_issues_on_title_trigram_non_latin'
- DESCRIPTION_INDEX_NAME = 'index_issues_on_description_trigram_non_latin'
-
- def up
- prepare_async_index_removal :issues, :title, name: TITLE_INDEX_NAME
- prepare_async_index_removal :issues, :description, name: DESCRIPTION_INDEX_NAME
- end
-
- def down
- unprepare_async_index_by_name :issues, DESCRIPTION_INDEX_NAME
- unprepare_async_index_by_name :issues, TITLE_INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220824114218_add_tmp_index_approval_merge_request_rules.rb b/db/post_migrate/20220824114218_add_tmp_index_approval_merge_request_rules.rb
deleted file mode 100644
index 64171b3053e..00000000000
--- a/db/post_migrate/20220824114218_add_tmp_index_approval_merge_request_rules.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class AddTmpIndexApprovalMergeRequestRules < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- TMP_INDEX_NAME = 'tmp_index_approval_merge_request_rules_on_report_type_equal_one'
-
- def up
- # to be removed as part of https://gitlab.com/gitlab-org/gitlab/-/issues/372224
- add_concurrent_index :approval_merge_request_rules,
- [:id, :report_type],
- name: TMP_INDEX_NAME,
- where: "report_type = 1"
- end
-
- def down
- remove_concurrent_index_by_name :approval_merge_request_rules, TMP_INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220825061250_drop_tmp_index_todos_attention_request_action_idx.rb b/db/post_migrate/20220825061250_drop_tmp_index_todos_attention_request_action_idx.rb
deleted file mode 100644
index 091de49e1c9..00000000000
--- a/db/post_migrate/20220825061250_drop_tmp_index_todos_attention_request_action_idx.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class DropTmpIndexTodosAttentionRequestActionIdx < Gitlab::Database::Migration[2.0]
- INDEX_NAME = "tmp_index_todos_attention_request_action"
- ATTENTION_REQUESTED = 10
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :todos, INDEX_NAME
- end
-
- def down
- add_concurrent_index :todos, [:id],
- where: "action = #{ATTENTION_REQUESTED}",
- name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220825142324_replace_issues_authorization_index.rb b/db/post_migrate/20220825142324_replace_issues_authorization_index.rb
deleted file mode 100644
index b033cb22490..00000000000
--- a/db/post_migrate/20220825142324_replace_issues_authorization_index.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class ReplaceIssuesAuthorizationIndex < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'idx_open_issues_on_project_and_confidential_and_author_and_id'
- OLD_INDEX_NAME = 'idx_open_issues_on_project_id_and_confidential'
-
- def up
- add_concurrent_index :issues, [:project_id, :confidential, :author_id, :id], name: INDEX_NAME, where: 'state_id = 1'
- remove_concurrent_index_by_name :issues, OLD_INDEX_NAME
- end
-
- def down
- add_concurrent_index :issues, [:project_id, :confidential], name: OLD_INDEX_NAME, where: 'state_id = 1'
- remove_concurrent_index_by_name :issues, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220826165048_drop_temporary_job_trace_index.rb b/db/post_migrate/20220826165048_drop_temporary_job_trace_index.rb
deleted file mode 100644
index 0cad7cd1968..00000000000
--- a/db/post_migrate/20220826165048_drop_temporary_job_trace_index.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class DropTemporaryJobTraceIndex < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'tmp_index_ci_job_artifacts_on_id_where_trace_and_expire_at'
-
- def up
- prepare_async_index_removal :ci_job_artifacts, :id, name: INDEX_NAME
- end
-
- def down
- unprepare_async_index_by_name :ci_job_artifacts, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220826175058_fully_remove_temporary_job_trace_index.rb b/db/post_migrate/20220826175058_fully_remove_temporary_job_trace_index.rb
deleted file mode 100644
index 2a18e63106a..00000000000
--- a/db/post_migrate/20220826175058_fully_remove_temporary_job_trace_index.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class FullyRemoveTemporaryJobTraceIndex < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'tmp_index_ci_job_artifacts_on_id_where_trace_and_expire_at'
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :ci_job_artifacts, name: INDEX_NAME
- end
-
- def down
- add_concurrent_index :ci_job_artifacts, :id, name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220830051704_add_temporary_index_for_orphaned_invited_members.rb b/db/post_migrate/20220830051704_add_temporary_index_for_orphaned_invited_members.rb
deleted file mode 100644
index 90254ac3d86..00000000000
--- a/db/post_migrate/20220830051704_add_temporary_index_for_orphaned_invited_members.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-class AddTemporaryIndexForOrphanedInvitedMembers < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- TMP_INDEX_NAME = 'tmp_idx_orphaned_invited_members'
-
- def up
- add_concurrent_index('members', :id, where: query_condition, name: TMP_INDEX_NAME)
- end
-
- def down
- remove_concurrent_index_by_name('members', TMP_INDEX_NAME) if index_exists_by_name?('members', TMP_INDEX_NAME)
- end
-
- private
-
- def query_condition
- 'invite_token IS NULL and invite_accepted_at IS NOT NULL AND user_id IS NULL'
- end
-end
diff --git a/db/post_migrate/20220830061704_orphaned_invited_members_cleanup.rb b/db/post_migrate/20220830061704_orphaned_invited_members_cleanup.rb
deleted file mode 100644
index c5249510164..00000000000
--- a/db/post_migrate/20220830061704_orphaned_invited_members_cleanup.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-class OrphanedInvitedMembersCleanup < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- # rubocop:disable Style/SymbolProc
- membership.where(query_condition).each_batch(of: 100) do |relation|
- relation.delete_all
- end
- # rubocop:enable Style/SymbolProc
- end
-
- def down
- # This migration is irreversible
- end
-
- private
-
- def membership
- @membership ||= define_batchable_model('members')
- end
-
- def query_condition
- 'invite_token IS NULL and invite_accepted_at IS NOT NULL AND user_id IS NULL'
- end
-end
diff --git a/db/post_migrate/20220830071704_remove_temporary_index_for_orphaned_invited_members.rb b/db/post_migrate/20220830071704_remove_temporary_index_for_orphaned_invited_members.rb
deleted file mode 100644
index c6b712da4c0..00000000000
--- a/db/post_migrate/20220830071704_remove_temporary_index_for_orphaned_invited_members.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveTemporaryIndexForOrphanedInvitedMembers < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- TMP_INDEX_NAME = 'tmp_idx_orphaned_invited_members'
-
- def up
- remove_concurrent_index_by_name('members', TMP_INDEX_NAME) if index_exists_by_name?('members', TMP_INDEX_NAME)
- end
-
- def down
- add_concurrent_index('members', :id, where: query_condition, name: TMP_INDEX_NAME)
- end
-
- private
-
- def query_condition
- 'invite_token IS NULL and invite_accepted_at IS NOT NULL AND user_id IS NULL'
- end
-end
diff --git a/db/post_migrate/20220830172142_reschedule_issue_work_item_type_id_backfill.rb b/db/post_migrate/20220830172142_reschedule_issue_work_item_type_id_backfill.rb
deleted file mode 100644
index 5495f0e53b4..00000000000
--- a/db/post_migrate/20220830172142_reschedule_issue_work_item_type_id_backfill.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-# frozen_string_literal: true
-
-class RescheduleIssueWorkItemTypeIdBackfill < Gitlab::Database::Migration[2.0]
- MIGRATION = 'BackfillWorkItemTypeIdForIssues'
- BATCH_SIZE = 10_000
- MAX_BATCH_SIZE = 30_000
- SUB_BATCH_SIZE = 100
- INTERVAL = 1.minute
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- class MigrationWorkItemType < MigrationRecord
- self.table_name = 'work_item_types'
-
- def self.id_by_type
- where(namespace_id: nil).order(:base_type).pluck(:base_type, :id).to_h
- end
- end
-
- def up
- # We expect no more than 5 types. Only 3 of them are expected to have associated issues at the moment
- MigrationWorkItemType.id_by_type.each do |base_type, type_id|
- queue_batched_background_migration(
- MIGRATION,
- :issues,
- :id,
- base_type,
- type_id,
- job_interval: INTERVAL,
- batch_size: BATCH_SIZE,
- max_batch_size: MAX_BATCH_SIZE,
- sub_batch_size: SUB_BATCH_SIZE
- )
- end
- end
-
- def down
- Gitlab::Database::BackgroundMigration::BatchedMigration.where(job_class_name: MIGRATION).delete_all
- end
-end
diff --git a/db/post_migrate/20220831021358_add_index_on_issue_health_status.rb b/db/post_migrate/20220831021358_add_index_on_issue_health_status.rb
deleted file mode 100644
index 940bf6b5c38..00000000000
--- a/db/post_migrate/20220831021358_add_index_on_issue_health_status.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexOnIssueHealthStatus < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- TABLE_NAME = :issues
- INDEX_NAME = 'index_issues_on_project_id_health_status_created_at_id'
-
- def up
- add_concurrent_index TABLE_NAME, [:project_id, :health_status, :created_at, :id], name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index TABLE_NAME, [:project_id, :health_status, :created_at, :id], name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220831090454_cleanup_web_hooks_service_id.rb b/db/post_migrate/20220831090454_cleanup_web_hooks_service_id.rb
deleted file mode 100644
index 7beb89038e5..00000000000
--- a/db/post_migrate/20220831090454_cleanup_web_hooks_service_id.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class CleanupWebHooksServiceId < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- cleanup_concurrent_column_rename :web_hooks, :service_id, :integration_id
- end
-
- def down
- undo_cleanup_concurrent_column_rename :web_hooks, :service_id, :integration_id
- end
-end
diff --git a/db/post_migrate/20220831132802_delete_approval_rules_for_vulnerability.rb b/db/post_migrate/20220831132802_delete_approval_rules_for_vulnerability.rb
deleted file mode 100644
index b29678f1826..00000000000
--- a/db/post_migrate/20220831132802_delete_approval_rules_for_vulnerability.rb
+++ /dev/null
@@ -1,42 +0,0 @@
-# frozen_string_literal: true
-
-class DeleteApprovalRulesForVulnerability < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_main
- disable_ddl_transaction!
-
- BATCH_SIZE = 500
- MAX_BATCH_SIZE = 1_000
- SUB_BATCH_SIZE = 10
- MIGRATION = 'DeleteApprovalRulesWithVulnerability'
- INTERVAL = 2.minutes
-
- def up
- return unless Gitlab.ee?
-
- queue_batched_background_migration(
- MIGRATION,
- :approval_project_rules,
- :id,
- job_interval: INTERVAL,
- batch_size: BATCH_SIZE,
- max_batch_size: MAX_BATCH_SIZE,
- sub_batch_size: SUB_BATCH_SIZE
- )
-
- queue_batched_background_migration(
- MIGRATION,
- :approval_merge_request_rules,
- :id,
- job_interval: INTERVAL,
- batch_size: BATCH_SIZE,
- max_batch_size: MAX_BATCH_SIZE,
- sub_batch_size: SUB_BATCH_SIZE
- )
- end
-
- def down
- # the data deleted is related to a feature removed in 15.0: https://gitlab.com/gitlab-org/gitlab/-/issues/357300
- delete_batched_background_migration(MIGRATION, :approval_project_rules, :id, [])
- delete_batched_background_migration(MIGRATION, :approval_merge_request_rules, :id, [])
- end
-end
diff --git a/db/post_migrate/20220901035725_schedule_destroy_invalid_project_members.rb b/db/post_migrate/20220901035725_schedule_destroy_invalid_project_members.rb
deleted file mode 100644
index 9de3ac34669..00000000000
--- a/db/post_migrate/20220901035725_schedule_destroy_invalid_project_members.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleDestroyInvalidProjectMembers < Gitlab::Database::Migration[2.0]
- MIGRATION = 'DestroyInvalidProjectMembers'
- DELAY_INTERVAL = 2.minutes
- BATCH_SIZE = 50_000
- MAX_BATCH_SIZE = 100_000
- SUB_BATCH_SIZE = 200
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- # no-op
- # We want to no-op this due to potential inconsistencies in SM upgrade path
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220901071310_add_tmp_index_user_callouts_on_attention_request_feature_names.rb b/db/post_migrate/20220901071310_add_tmp_index_user_callouts_on_attention_request_feature_names.rb
deleted file mode 100644
index 10b339b90c1..00000000000
--- a/db/post_migrate/20220901071310_add_tmp_index_user_callouts_on_attention_request_feature_names.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddTmpIndexUserCalloutsOnAttentionRequestFeatureNames < Gitlab::Database::Migration[2.0]
- INDEX_NAME = "tmp_index_user_callouts_on_attention_request_feature_names"
- ATTENTION_REQUEST_CALLOUTS = [47, 48]
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :user_callouts, [:id],
- where: "feature_name IN (#{ATTENTION_REQUEST_CALLOUTS.join(',')})",
- name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :user_callouts, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220901071355_cleanup_attention_request_user_callouts.rb b/db/post_migrate/20220901071355_cleanup_attention_request_user_callouts.rb
deleted file mode 100644
index cbd0d120bb8..00000000000
--- a/db/post_migrate/20220901071355_cleanup_attention_request_user_callouts.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-class CleanupAttentionRequestUserCallouts < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- ATTENTION_REQUEST_CALLOUTS = [47, 48]
- # 47 and 48 were removed with https://gitlab.com/gitlab-org/gitlab/-/merge_requests/95446
-
- def up
- define_batchable_model('user_callouts')
- .where(feature_name: ATTENTION_REQUEST_CALLOUTS)
- .each_batch { |batch| batch.delete_all } # rubocop:disable Style/SymbolProc
- end
-
- def down
- # Attention request feature has been reverted.
- end
-end
diff --git a/db/post_migrate/20220901073300_remove_partial_trigram_indexes_for_issues.rb b/db/post_migrate/20220901073300_remove_partial_trigram_indexes_for_issues.rb
deleted file mode 100644
index 096b74bc1c6..00000000000
--- a/db/post_migrate/20220901073300_remove_partial_trigram_indexes_for_issues.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# frozen_string_literal: true
-
-class RemovePartialTrigramIndexesForIssues < Gitlab::Database::Migration[2.0]
- TITLE_INDEX_NAME = 'index_issues_on_title_trigram_non_latin'
- DESCRIPTION_INDEX_NAME = 'index_issues_on_description_trigram_non_latin'
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :issues, TITLE_INDEX_NAME
- remove_concurrent_index_by_name :issues, DESCRIPTION_INDEX_NAME
- end
-
- def down
- add_concurrent_index :issues, :title,
- name: TITLE_INDEX_NAME,
- using: :gin, opclass: { description: :gin_trgm_ops },
- where: "title NOT SIMILAR TO '[\\u0000-\\u218F]*' OR description NOT SIMILAR TO '[\\u0000-\\u218F]*'"
-
- add_concurrent_index :issues, :description,
- name: DESCRIPTION_INDEX_NAME,
- using: :gin, opclass: { description: :gin_trgm_ops },
- where: "title NOT SIMILAR TO '[\\u0000-\\u218F]*' OR description NOT SIMILAR TO '[\\u0000-\\u218F]*'"
- end
-end
diff --git a/db/post_migrate/20220901184106_add_not_null_to_board_group_recent_visits.rb b/db/post_migrate/20220901184106_add_not_null_to_board_group_recent_visits.rb
deleted file mode 100644
index 1dead32efb6..00000000000
--- a/db/post_migrate/20220901184106_add_not_null_to_board_group_recent_visits.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddNotNullToBoardGroupRecentVisits < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_not_null_constraint :board_group_recent_visits, :user_id, validate: false
- add_not_null_constraint :board_group_recent_visits, :group_id, validate: false
- add_not_null_constraint :board_group_recent_visits, :board_id, validate: false
- end
-
- def down
- remove_not_null_constraint :board_group_recent_visits, :user_id
- remove_not_null_constraint :board_group_recent_visits, :board_id
- remove_not_null_constraint :board_group_recent_visits, :group_id
- end
-end
diff --git a/db/post_migrate/20220901184246_add_not_null_to_board_project_recent_visits.rb b/db/post_migrate/20220901184246_add_not_null_to_board_project_recent_visits.rb
deleted file mode 100644
index 4f0cb4d3d68..00000000000
--- a/db/post_migrate/20220901184246_add_not_null_to_board_project_recent_visits.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddNotNullToBoardProjectRecentVisits < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_not_null_constraint :board_project_recent_visits, :user_id, validate: false
- add_not_null_constraint :board_project_recent_visits, :project_id, validate: false
- add_not_null_constraint :board_project_recent_visits, :board_id, validate: false
- end
-
- def down
- remove_not_null_constraint :board_project_recent_visits, :user_id
- remove_not_null_constraint :board_project_recent_visits, :project_id
- remove_not_null_constraint :board_project_recent_visits, :board_id
- end
-end
diff --git a/db/post_migrate/20220902111016_delete_null_records_from_board_group_recent_visits.rb b/db/post_migrate/20220902111016_delete_null_records_from_board_group_recent_visits.rb
deleted file mode 100644
index 4b55ecc013d..00000000000
--- a/db/post_migrate/20220902111016_delete_null_records_from_board_group_recent_visits.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class DeleteNullRecordsFromBoardGroupRecentVisits < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- execute('DELETE FROM board_group_recent_visits WHERE user_id is null OR group_id is null OR board_id is null')
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220902111038_delete_null_records_from_board_project_recent_visits.rb b/db/post_migrate/20220902111038_delete_null_records_from_board_project_recent_visits.rb
deleted file mode 100644
index bb261f80f73..00000000000
--- a/db/post_migrate/20220902111038_delete_null_records_from_board_project_recent_visits.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class DeleteNullRecordsFromBoardProjectRecentVisits < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- execute('DELETE FROM board_project_recent_visits WHERE user_id is null OR project_id is null OR board_id is null')
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220902204048_move_security_findings_table_to_gitlab_partitions_dynamic_schema.rb b/db/post_migrate/20220902204048_move_security_findings_table_to_gitlab_partitions_dynamic_schema.rb
deleted file mode 100644
index 62511e0e616..00000000000
--- a/db/post_migrate/20220902204048_move_security_findings_table_to_gitlab_partitions_dynamic_schema.rb
+++ /dev/null
@@ -1,230 +0,0 @@
-# frozen_string_literal: true
-
-# rubocop:disable Migration/WithLockRetriesDisallowedMethod
-class MoveSecurityFindingsTableToGitlabPartitionsDynamicSchema < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_MAPPING_OF_PARTITION = {
- index_security_findings_on_unique_columns: :security_findings_1_uuid_scan_id_partition_number_idx,
- index_security_findings_on_confidence: :security_findings_1_confidence_idx,
- index_security_findings_on_project_fingerprint: :security_findings_1_project_fingerprint_idx,
- index_security_findings_on_scan_id_and_deduplicated: :security_findings_1_scan_id_deduplicated_idx,
- index_security_findings_on_scan_id_and_id: :security_findings_1_scan_id_id_idx,
- index_security_findings_on_scanner_id: :security_findings_1_scanner_id_idx,
- index_security_findings_on_severity: :security_findings_1_severity_idx
- }.freeze
-
- INDEX_MAPPING_AFTER_CREATING_FROM_PARTITION = {
- partition_name_placeholder_pkey: :security_findings_pkey,
- partition_name_placeholder_uuid_scan_id_partition_number_idx: :index_security_findings_on_unique_columns,
- partition_name_placeholder_confidence_idx: :index_security_findings_on_confidence,
- partition_name_placeholder_project_fingerprint_idx: :index_security_findings_on_project_fingerprint,
- partition_name_placeholder_scan_id_deduplicated_idx: :index_security_findings_on_scan_id_and_deduplicated,
- partition_name_placeholder_scan_id_id_idx: :index_security_findings_on_scan_id_and_id,
- partition_name_placeholder_scanner_id_idx: :index_security_findings_on_scanner_id,
- partition_name_placeholder_severity_idx: :index_security_findings_on_severity
- }.freeze
-
- INDEX_MAPPING_AFTER_CREATING_FROM_ITSELF = {
- security_findings_pkey1: :security_findings_pkey,
- security_findings_uuid_scan_id_partition_number_idx1: :index_security_findings_on_unique_columns,
- security_findings_confidence_idx1: :index_security_findings_on_confidence,
- security_findings_project_fingerprint_idx1: :index_security_findings_on_project_fingerprint,
- security_findings_scan_id_deduplicated_idx1: :index_security_findings_on_scan_id_and_deduplicated,
- security_findings_scan_id_id_idx1: :index_security_findings_on_scan_id_and_id,
- security_findings_scanner_id_idx1: :index_security_findings_on_scanner_id,
- security_findings_severity_idx1: :index_security_findings_on_severity
- }.freeze
-
- LATEST_PARTITION_SQL = <<~SQL
- SELECT
- partitions.relname AS partition_name
- FROM pg_inherits
- JOIN pg_class parent ON pg_inherits.inhparent = parent.oid
- JOIN pg_class partitions ON pg_inherits.inhrelid = partitions.oid
- WHERE
- parent.relname = 'security_findings'
- ORDER BY (regexp_matches(partitions.relname, 'security_findings_(\\d+)'))[1]::int DESC
- LIMIT 1
- SQL
-
- CURRENT_CHECK_CONSTRAINT_SQL = <<~SQL
- SELECT
- pg_get_constraintdef(pg_catalog.pg_constraint.oid)
- FROM
- pg_catalog.pg_constraint
- INNER JOIN pg_class ON pg_class.oid = pg_catalog.pg_constraint.conrelid
- WHERE
- conname = 'check_partition_number' AND
- pg_class.relname = 'security_findings'
- SQL
-
- def up
- with_lock_retries do
- lock_tables
-
- execute(<<~SQL)
- ALTER TABLE security_findings RENAME TO security_findings_#{candidate_partition_number};
- SQL
-
- execute(<<~SQL)
- ALTER INDEX security_findings_pkey RENAME TO security_findings_#{candidate_partition_number}_pkey;
- SQL
-
- execute(<<~SQL)
- CREATE TABLE security_findings (
- LIKE security_findings_#{candidate_partition_number} INCLUDING ALL
- ) PARTITION BY LIST (partition_number);
- SQL
-
- execute(<<~SQL)
- ALTER SEQUENCE security_findings_id_seq OWNED BY #{connection.current_schema}.security_findings.id;
- SQL
-
- execute(<<~SQL)
- ALTER TABLE security_findings
- ADD CONSTRAINT fk_rails_729b763a54 FOREIGN KEY (scanner_id) REFERENCES vulnerability_scanners(id) ON DELETE CASCADE;
- SQL
-
- execute(<<~SQL)
- ALTER TABLE security_findings
- ADD CONSTRAINT fk_rails_bb63863cf1 FOREIGN KEY (scan_id) REFERENCES security_scans(id) ON DELETE CASCADE;
- SQL
-
- execute(<<~SQL)
- ALTER TABLE security_findings_#{candidate_partition_number} SET SCHEMA gitlab_partitions_dynamic;
- SQL
-
- execute(<<~SQL)
- ALTER TABLE security_findings ATTACH PARTITION gitlab_partitions_dynamic.security_findings_#{candidate_partition_number} FOR VALUES IN (#{candidate_partition_number});
- SQL
-
- execute(<<~SQL)
- ALTER TABLE security_findings DROP CONSTRAINT check_partition_number;
- SQL
-
- index_mapping = INDEX_MAPPING_OF_PARTITION.transform_values do |value|
- value.to_s.sub('partition_name_placeholder', "security_findings_#{candidate_partition_number}")
- end
-
- rename_indices('gitlab_partitions_dynamic', index_mapping)
- end
- end
-
- def down
- # If there is already a partition for the `security_findings` table,
- # we can promote that table to be the original one to save the data.
- # Otherwise, we have to bring back the non-partitioned `security_findings`
- # table from the partitioned one.
- if latest_partition
- create_non_partitioned_security_findings_with_data
- else
- create_non_partitioned_security_findings_without_data
- end
- end
-
- private
-
- def lock_tables
- execute(<<~SQL)
- LOCK TABLE vulnerability_scanners, security_scans, security_findings IN ACCESS EXCLUSIVE MODE
- SQL
- end
-
- def current_check_constraint
- execute(CURRENT_CHECK_CONSTRAINT_SQL).first['pg_get_constraintdef']
- end
-
- def candidate_partition_number
- @candidate_partition_number ||= current_check_constraint.match(/partition_number\s?=\s?(\d+)/).captures.first
- end
-
- def latest_partition
- @latest_partition ||= execute(LATEST_PARTITION_SQL).first&.fetch('partition_name', nil)
- end
-
- def latest_partition_number
- latest_partition.match(/security_findings_(\d+)/).captures.first
- end
-
- def create_non_partitioned_security_findings_with_data
- with_lock_retries do
- lock_tables
-
- execute(<<~SQL)
- ALTER TABLE security_findings DETACH PARTITION gitlab_partitions_dynamic.#{latest_partition};
- SQL
-
- execute(<<~SQL)
- ALTER TABLE gitlab_partitions_dynamic.#{latest_partition} SET SCHEMA #{connection.current_schema};
- SQL
-
- execute(<<~SQL)
- ALTER SEQUENCE security_findings_id_seq OWNED BY #{latest_partition}.id;
- SQL
-
- execute(<<~SQL)
- DROP TABLE security_findings;
- SQL
-
- execute(<<~SQL)
- ALTER TABLE #{latest_partition} RENAME TO security_findings;
- SQL
-
- index_mapping = INDEX_MAPPING_AFTER_CREATING_FROM_PARTITION.transform_keys do |key|
- key.to_s.sub('partition_name_placeholder', latest_partition)
- end
-
- rename_indices(connection.current_schema, index_mapping)
- end
-
- add_check_constraint(:security_findings, "(partition_number = #{latest_partition_number})", :check_partition_number)
- end
-
- def create_non_partitioned_security_findings_without_data
- with_lock_retries do
- lock_tables
-
- execute(<<~SQL)
- ALTER TABLE security_findings RENAME TO security_findings_1;
- SQL
-
- execute(<<~SQL)
- CREATE TABLE security_findings (
- LIKE security_findings_1 INCLUDING ALL
- );
- SQL
-
- execute(<<~SQL)
- ALTER SEQUENCE security_findings_id_seq OWNED BY #{connection.current_schema}.security_findings.id;
- SQL
-
- execute(<<~SQL)
- DROP TABLE security_findings_1;
- SQL
-
- execute(<<~SQL)
- ALTER TABLE ONLY security_findings
- ADD CONSTRAINT fk_rails_729b763a54 FOREIGN KEY (scanner_id) REFERENCES vulnerability_scanners(id) ON DELETE CASCADE;
- SQL
-
- execute(<<~SQL)
- ALTER TABLE ONLY security_findings
- ADD CONSTRAINT fk_rails_bb63863cf1 FOREIGN KEY (scan_id) REFERENCES security_scans(id) ON DELETE CASCADE;
- SQL
-
- rename_indices(connection.current_schema, INDEX_MAPPING_AFTER_CREATING_FROM_ITSELF)
- end
-
- add_check_constraint(:security_findings, "(partition_number = 1)", :check_partition_number)
- end
-
- def rename_indices(schema, mapping)
- mapping.each do |index_name, new_index_name|
- execute(<<~SQL)
- ALTER INDEX #{schema}.#{index_name} RENAME TO #{new_index_name};
- SQL
- end
- end
-end
-# rubocop:enable Migration/WithLockRetriesDisallowedMethod
diff --git a/db/post_migrate/20220904173342_validate_not_null_constraint_board_group_recent_visits.rb b/db/post_migrate/20220904173342_validate_not_null_constraint_board_group_recent_visits.rb
deleted file mode 100644
index 0e5a504d0eb..00000000000
--- a/db/post_migrate/20220904173342_validate_not_null_constraint_board_group_recent_visits.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class ValidateNotNullConstraintBoardGroupRecentVisits < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- validate_not_null_constraint :board_group_recent_visits, :user_id
- validate_not_null_constraint :board_group_recent_visits, :group_id
- validate_not_null_constraint :board_group_recent_visits, :board_id
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220904173430_validate_not_null_constraint_board_project_recent_visits.rb b/db/post_migrate/20220904173430_validate_not_null_constraint_board_project_recent_visits.rb
deleted file mode 100644
index ff73a179f69..00000000000
--- a/db/post_migrate/20220904173430_validate_not_null_constraint_board_project_recent_visits.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class ValidateNotNullConstraintBoardProjectRecentVisits < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- validate_not_null_constraint :board_project_recent_visits, :user_id
- validate_not_null_constraint :board_project_recent_visits, :project_id
- validate_not_null_constraint :board_project_recent_visits, :board_id
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220905090300_add_tmp_index_merge_request_reviewers_attention_request_state.rb b/db/post_migrate/20220905090300_add_tmp_index_merge_request_reviewers_attention_request_state.rb
deleted file mode 100644
index e192f76484c..00000000000
--- a/db/post_migrate/20220905090300_add_tmp_index_merge_request_reviewers_attention_request_state.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddTmpIndexMergeRequestReviewersAttentionRequestState < Gitlab::Database::Migration[2.0]
- INDEX_NAME = "tmp_index_merge_request_reviewers_on_attention_requested_state"
- ATTENTION_REQUESTED_STATE = 2
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :merge_request_reviewers, [:id],
- where: "state = #{ATTENTION_REQUESTED_STATE}",
- name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :merge_request_reviewers, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220905090339_reset_attention_requested_merge_requests_reviewers_state_to_unreviewed.rb b/db/post_migrate/20220905090339_reset_attention_requested_merge_requests_reviewers_state_to_unreviewed.rb
deleted file mode 100644
index d335095e674..00000000000
--- a/db/post_migrate/20220905090339_reset_attention_requested_merge_requests_reviewers_state_to_unreviewed.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-# frozen_string_literal: true
-
-class ResetAttentionRequestedMergeRequestsReviewersStateToUnreviewed < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- BATCH_SIZE = 500
-
- class MergeRequestReviewer < MigrationRecord
- self.table_name = 'merge_request_reviewers'
-
- enum state: {
- unreviewed: 0,
- reviewed: 1,
- attention_requested: 2
- }
-
- include ::EachBatch
- end
-
- def up
- MergeRequestReviewer
- .where(state: MergeRequestReviewer.states['attention_requested'])
- .each_batch(of: BATCH_SIZE) { |batch| batch.update_all(state: MergeRequestReviewer.states['unreviewed']) }
- end
-
- def down
- # no op
- end
-end
diff --git a/db/post_migrate/20220905112710_add_async_index_to_todos_to_cover_pending_query.rb b/db/post_migrate/20220905112710_add_async_index_to_todos_to_cover_pending_query.rb
deleted file mode 100644
index e2bca2fae1a..00000000000
--- a/db/post_migrate/20220905112710_add_async_index_to_todos_to_cover_pending_query.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class AddAsyncIndexToTodosToCoverPendingQuery < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_on_todos_user_project_target_and_state'
- COLUMNS = %i[user_id project_id target_type target_id id].freeze
-
- def up
- prepare_async_index :todos, COLUMNS, name: INDEX_NAME, where: "state = 'pending'"
- end
-
- def down
- unprepare_async_index :todos, COLUMNS, name: INDEX_NAME, where: "state='pending'"
- end
-end
diff --git a/db/post_migrate/20220905120848_backfill_epic_cache_counts.rb b/db/post_migrate/20220905120848_backfill_epic_cache_counts.rb
deleted file mode 100644
index 32fe04eb99c..00000000000
--- a/db/post_migrate/20220905120848_backfill_epic_cache_counts.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-class BackfillEpicCacheCounts < Gitlab::Database::Migration[2.0]
- MIGRATION = 'BackfillEpicCacheCounts'
- DELAY_INTERVAL = 2.minutes.to_i
- BATCH_SIZE = 200
- MAX_BATCH_SIZE = 1000
- SUB_BATCH_SIZE = 20
-
- disable_ddl_transaction!
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- queue_batched_background_migration(
- MIGRATION,
- :epics,
- :id,
- job_interval: DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- max_batch_size: MAX_BATCH_SIZE,
- sub_batch_size: SUB_BATCH_SIZE,
- gitlab_schema: :gitlab_main
- )
- end
-
- def down
- delete_batched_background_migration(MIGRATION, :epics, :id, [])
- end
-end
diff --git a/db/post_migrate/20220906074449_schedule_disable_legacy_open_source_license_for_projects_less_than_one_mb.rb b/db/post_migrate/20220906074449_schedule_disable_legacy_open_source_license_for_projects_less_than_one_mb.rb
deleted file mode 100644
index ee48ace13e0..00000000000
--- a/db/post_migrate/20220906074449_schedule_disable_legacy_open_source_license_for_projects_less_than_one_mb.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleDisableLegacyOpenSourceLicenseForProjectsLessThanOneMb < Gitlab::Database::Migration[2.0]
- MIGRATION = 'DisableLegacyOpenSourceLicenseForProjectsLessThanOneMb'
- INTERVAL = 2.minutes
- BATCH_SIZE = 4_000
- MAX_BATCH_SIZE = 50_000
- SUB_BATCH_SIZE = 250
-
- disable_ddl_transaction!
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- return unless Gitlab.com?
-
- queue_batched_background_migration(
- MIGRATION,
- :project_settings,
- :project_id,
- job_interval: INTERVAL,
- batch_size: BATCH_SIZE,
- max_batch_size: MAX_BATCH_SIZE,
- sub_batch_size: SUB_BATCH_SIZE
- )
- end
-
- def down
- return unless Gitlab.com?
-
- delete_batched_background_migration(MIGRATION, :project_settings, :project_id, [])
- end
-end
diff --git a/db/post_migrate/20220906212931_add_partial_index_for_ci_pipeline_artifacts_unlocked_with_expire_at.rb b/db/post_migrate/20220906212931_add_partial_index_for_ci_pipeline_artifacts_unlocked_with_expire_at.rb
deleted file mode 100644
index a24187dd56b..00000000000
--- a/db/post_migrate/20220906212931_add_partial_index_for_ci_pipeline_artifacts_unlocked_with_expire_at.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddPartialIndexForCiPipelineArtifactsUnlockedWithExpireAt < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- TABLE_NAME = 'ci_pipeline_artifacts'
- INDEX_NAME = 'ci_pipeline_artifacts_on_expire_at_for_removal'
- CONDITIONS = 'locked = 0 AND expire_at IS NOT NULL'
-
- def up
- add_concurrent_index TABLE_NAME, [:expire_at], where: CONDITIONS, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220907122648_populate_security_orchestration_policy_configuration_id.rb b/db/post_migrate/20220907122648_populate_security_orchestration_policy_configuration_id.rb
deleted file mode 100644
index 441113c0ba3..00000000000
--- a/db/post_migrate/20220907122648_populate_security_orchestration_policy_configuration_id.rb
+++ /dev/null
@@ -1,38 +0,0 @@
-# frozen_string_literal: true
-
-class PopulateSecurityOrchestrationPolicyConfigurationId < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- BATCH_SIZE = 1000
- SUB_BATCH_SIZE = 500
- MERGE_REQUEST_MIGRATION = 'PopulateApprovalMergeRequestRulesWithSecurityOrchestration'
- PROJECT_MIGRATION = 'PopulateApprovalProjectRulesWithSecurityOrchestration'
- INTERVAL = 2.minutes
-
- def up
- return unless Gitlab.ee?
-
- queue_batched_background_migration(
- PROJECT_MIGRATION,
- :approval_project_rules,
- :id,
- job_interval: INTERVAL,
- batch_size: BATCH_SIZE,
- sub_batch_size: SUB_BATCH_SIZE
- )
-
- queue_batched_background_migration(
- MERGE_REQUEST_MIGRATION,
- :approval_merge_request_rules,
- :id,
- job_interval: INTERVAL,
- batch_size: BATCH_SIZE,
- sub_batch_size: SUB_BATCH_SIZE
- )
- end
-
- def down
- delete_batched_background_migration(PROJECT_MIGRATION, :approval_project_rules, :id, [])
- delete_batched_background_migration(MERGE_REQUEST_MIGRATION, :approval_merge_request_rules, :id, [])
- end
-end
diff --git a/db/post_migrate/20220908125146_remove_free_user_cap_remediation_worker.rb b/db/post_migrate/20220908125146_remove_free_user_cap_remediation_worker.rb
deleted file mode 100644
index e95ea9c58b4..00000000000
--- a/db/post_migrate/20220908125146_remove_free_user_cap_remediation_worker.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveFreeUserCapRemediationWorker < Gitlab::Database::Migration[2.0]
- def up
- Sidekiq::Cron::Job.find('free_user_cap_data_remediation')&.destroy
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220909114220_drop_environments_project_name_lower_pattern_ops_index.rb b/db/post_migrate/20220909114220_drop_environments_project_name_lower_pattern_ops_index.rb
deleted file mode 100644
index 3ab71809039..00000000000
--- a/db/post_migrate/20220909114220_drop_environments_project_name_lower_pattern_ops_index.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-# reverts db/migrate/20220901131828_add_environments_project_name_lower_pattern_ops_index.rb
-class DropEnvironmentsProjectNameLowerPatternOpsIndex < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_environments_on_project_name_varchar_pattern_ops'
-
- def up
- remove_concurrent_index_by_name :environments, INDEX_NAME
- end
-
- def down
- add_concurrent_index :environments, 'project_id, lower(name) varchar_pattern_ops', name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220912085047_add_index_to_todos_pending_query.rb b/db/post_migrate/20220912085047_add_index_to_todos_pending_query.rb
deleted file mode 100644
index 7d721421463..00000000000
--- a/db/post_migrate/20220912085047_add_index_to_todos_pending_query.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexToTodosPendingQuery < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_on_todos_user_project_target_and_state'
- COLUMNS = %i[user_id project_id target_type target_id id].freeze
-
- def up
- add_concurrent_index :todos, COLUMNS, name: INDEX_NAME, where: "state = 'pending'"
- end
-
- def down
- remove_concurrent_index_by_name :todos, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220912110433_prepare_create_internal_notes_index_on_id.rb b/db/post_migrate/20220912110433_prepare_create_internal_notes_index_on_id.rb
deleted file mode 100644
index 241bdfa4715..00000000000
--- a/db/post_migrate/20220912110433_prepare_create_internal_notes_index_on_id.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class PrepareCreateInternalNotesIndexOnId < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_notes_on_id_where_internal'
-
- def up
- prepare_async_index :notes, :id, where: 'internal = true', name: INDEX_NAME
- end
-
- def down
- unprepare_async_index_by_name :notes, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220913030552_add_tmp_index_system_note_metadata_on_attention_request_actions.rb b/db/post_migrate/20220913030552_add_tmp_index_system_note_metadata_on_attention_request_actions.rb
deleted file mode 100644
index 3418dabc0e9..00000000000
--- a/db/post_migrate/20220913030552_add_tmp_index_system_note_metadata_on_attention_request_actions.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddTmpIndexSystemNoteMetadataOnAttentionRequestActions < Gitlab::Database::Migration[2.0]
- INDEX_NAME = "tmp_index_system_note_metadata_on_attention_request_actions"
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :system_note_metadata, [:id],
- where: "action IN ('attention_requested', 'attention_request_removed')",
- name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :system_note_metadata, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220913030624_cleanup_attention_request_related_system_notes.rb b/db/post_migrate/20220913030624_cleanup_attention_request_related_system_notes.rb
deleted file mode 100644
index b7d6908696b..00000000000
--- a/db/post_migrate/20220913030624_cleanup_attention_request_related_system_notes.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-# frozen_string_literal: true
-
-class CleanupAttentionRequestRelatedSystemNotes < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- BATCH_SIZE = 100
-
- class SystemNoteMetadata < MigrationRecord
- include EachBatch
-
- self.table_name = 'system_note_metadata'
- end
-
- class Note < MigrationRecord
- self.table_name = 'notes'
- end
-
- def up
- SystemNoteMetadata
- .where(action: %w[attention_requested attention_request_removed])
- .each_batch(of: BATCH_SIZE) do |batch|
- Note.where(id: batch.pluck(:note_id)).delete_all
- end
- end
-
- def down
- # no op
- end
-end
diff --git a/db/post_migrate/20220913083015_clean_up_rename_iterations_cadences_last_run_date_to_next_run_date.rb b/db/post_migrate/20220913083015_clean_up_rename_iterations_cadences_last_run_date_to_next_run_date.rb
deleted file mode 100644
index 7618e1841bd..00000000000
--- a/db/post_migrate/20220913083015_clean_up_rename_iterations_cadences_last_run_date_to_next_run_date.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class CleanUpRenameIterationsCadencesLastRunDateToNextRunDate < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- cleanup_concurrent_column_rename :iterations_cadences, :last_run_date, :next_run_date
- end
-
- def down
- undo_cleanup_concurrent_column_rename :iterations_cadences, :last_run_date, :next_run_date
- end
-end
diff --git a/db/post_migrate/20220914093408_add_unique_id_partition_id_index_to_ci_build_metadata.rb b/db/post_migrate/20220914093408_add_unique_id_partition_id_index_to_ci_build_metadata.rb
deleted file mode 100644
index 1f40118c809..00000000000
--- a/db/post_migrate/20220914093408_add_unique_id_partition_id_index_to_ci_build_metadata.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: true
-
-class AddUniqueIdPartitionIdIndexToCiBuildMetadata < Gitlab::Database::Migration[2.0]
- TABLE_NAME = :ci_builds_metadata
- INDEX_NAME = :index_ci_builds_metadata_on_id_partition_id_unique
-
- def up
- prepare_async_index(TABLE_NAME, %i[id partition_id], unique: true, name: INDEX_NAME)
- end
-
- def down
- unprepare_async_index(:ci_builds_metadata, %i[id partition_id], name: INDEX_NAME)
- end
-end
diff --git a/db/post_migrate/20220915103831_add_unique_build_id_partition_id_index_to_ci_build_metadata.rb b/db/post_migrate/20220915103831_add_unique_build_id_partition_id_index_to_ci_build_metadata.rb
deleted file mode 100644
index 74b60390057..00000000000
--- a/db/post_migrate/20220915103831_add_unique_build_id_partition_id_index_to_ci_build_metadata.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: true
-
-class AddUniqueBuildIdPartitionIdIndexToCiBuildMetadata < Gitlab::Database::Migration[2.0]
- TABLE_NAME = :ci_builds_metadata
- INDEX_NAME = :index_ci_builds_metadata_on_build_id_partition_id_unique
-
- def up
- prepare_async_index(TABLE_NAME, %i[build_id partition_id], unique: true, name: INDEX_NAME)
- end
-
- def down
- unprepare_async_index(:ci_builds_metadata, %i[build_id partition_id], name: INDEX_NAME)
- end
-end
diff --git a/db/post_migrate/20220915192521_prepare_async_trigram_index_for_vulnerability_reads_container_images.rb b/db/post_migrate/20220915192521_prepare_async_trigram_index_for_vulnerability_reads_container_images.rb
deleted file mode 100644
index 18ed1b2cd2b..00000000000
--- a/db/post_migrate/20220915192521_prepare_async_trigram_index_for_vulnerability_reads_container_images.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class PrepareAsyncTrigramIndexForVulnerabilityReadsContainerImages < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_vulnerability_reads_on_location_image_trigram'
- REPORT_TYPES = { container_scanning: 2, cluster_image_scanning: 7 }.freeze
-
- def up
- prepare_async_index :vulnerability_reads, :location_image,
- name: INDEX_NAME,
- using: :gin, opclass: { location_image: :gin_trgm_ops },
- where: "report_type = ANY (ARRAY[#{REPORT_TYPES.values.join(', ')}]) AND location_image IS NOT NULL"
- end
-
- def down
- unprepare_async_index :vulnerability_reads, :location_image, name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220916054103_remove_experience_level_column.rb b/db/post_migrate/20220916054103_remove_experience_level_column.rb
deleted file mode 100644
index dff5a9a6580..00000000000
--- a/db/post_migrate/20220916054103_remove_experience_level_column.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveExperienceLevelColumn < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def up
- remove_column :user_preferences, :experience_level
- end
-
- def down
- add_column :user_preferences, :experience_level, :integer, limit: 2
- end
-end
diff --git a/db/post_migrate/20220916065418_add_index_id_partition_id_to_ci_builds_metadata.rb b/db/post_migrate/20220916065418_add_index_id_partition_id_to_ci_builds_metadata.rb
deleted file mode 100644
index c781f2a9ef9..00000000000
--- a/db/post_migrate/20220916065418_add_index_id_partition_id_to_ci_builds_metadata.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexIdPartitionIdToCiBuildsMetadata < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- TABLE_NAME = :ci_builds_metadata
- INDEX_NAME = :index_ci_builds_metadata_on_id_partition_id_unique
-
- def up
- add_concurrent_index(TABLE_NAME, %i[id partition_id], unique: true, name: INDEX_NAME)
- end
-
- def down
- remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME)
- end
-end
diff --git a/db/post_migrate/20220916070101_add_index_build_id_partition_id_to_ci_build_metadata.rb b/db/post_migrate/20220916070101_add_index_build_id_partition_id_to_ci_build_metadata.rb
deleted file mode 100644
index 18c24c47325..00000000000
--- a/db/post_migrate/20220916070101_add_index_build_id_partition_id_to_ci_build_metadata.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexBuildIdPartitionIdToCiBuildMetadata < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- TABLE_NAME = :ci_builds_metadata
- INDEX_NAME = :index_ci_builds_metadata_on_build_id_partition_id_unique
-
- def up
- add_concurrent_index(TABLE_NAME, %i[build_id partition_id], unique: true, name: INDEX_NAME)
- end
-
- def down
- remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME)
- end
-end
diff --git a/db/post_migrate/20220916112841_remove_unused_aggregation_columns.rb b/db/post_migrate/20220916112841_remove_unused_aggregation_columns.rb
deleted file mode 100644
index f5333c84042..00000000000
--- a/db/post_migrate/20220916112841_remove_unused_aggregation_columns.rb
+++ /dev/null
@@ -1,59 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveUnusedAggregationColumns < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- remove_column :analytics_cycle_analytics_aggregations, :last_full_run_processed_records
- remove_column :analytics_cycle_analytics_aggregations, :last_full_run_runtimes_in_seconds
- remove_column :analytics_cycle_analytics_aggregations, :last_full_run_issues_updated_at
- remove_column :analytics_cycle_analytics_aggregations, :last_full_run_mrs_updated_at
- remove_column :analytics_cycle_analytics_aggregations, :last_full_run_issues_id
- remove_column :analytics_cycle_analytics_aggregations, :last_full_run_merge_requests_id
- end
- end
-
- def down
- with_lock_retries do
- add_column(:analytics_cycle_analytics_aggregations,
- :last_full_run_processed_records,
- :integer,
- array: true,
- default: [],
- null: false,
- if_not_exists: true)
- add_column(:analytics_cycle_analytics_aggregations,
- :last_full_run_runtimes_in_seconds,
- :integer,
- array: true,
- default: [],
- null: false,
- if_not_exists: true)
- add_column(:analytics_cycle_analytics_aggregations,
- :last_full_run_issues_updated_at,
- :datetime_with_timezone,
- if_not_exists: true)
- add_column(:analytics_cycle_analytics_aggregations,
- :last_full_run_mrs_updated_at,
- :datetime_with_timezone,
- if_not_exists: true)
- add_column(:analytics_cycle_analytics_aggregations,
- :last_full_run_issues_id,
- :integer,
- if_not_exists: true)
- add_column(:analytics_cycle_analytics_aggregations,
- :last_full_run_merge_requests_id,
- :integer,
- if_not_exists: true)
- end
-
- add_check_constraint(:analytics_cycle_analytics_aggregations,
- 'CARDINALITY(last_full_run_runtimes_in_seconds) <= 10',
- 'chk_rails_7810292ec9')
-
- add_check_constraint(:analytics_cycle_analytics_aggregations,
- 'CARDINALITY(last_full_run_processed_records) <= 10',
- 'chk_rails_8b9e89687c')
- end
-end
diff --git a/db/post_migrate/20220919023208_drop_unused_fields_from_merge_request_assignees.rb b/db/post_migrate/20220919023208_drop_unused_fields_from_merge_request_assignees.rb
deleted file mode 100644
index f1afbb41893..00000000000
--- a/db/post_migrate/20220919023208_drop_unused_fields_from_merge_request_assignees.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-# frozen_string_literal: true
-
-class DropUnusedFieldsFromMergeRequestAssignees < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- if column_exists?(:merge_request_assignees, :state) # rubocop:disable Style/IfUnlessModifier
- remove_column :merge_request_assignees, :state
- end
-
- if column_exists?(:merge_request_assignees, :updated_state_by_user_id)
- remove_column :merge_request_assignees, :updated_state_by_user_id
- end
- end
- end
-
- def down
- with_lock_retries do
- unless column_exists?(:merge_request_assignees, :state)
- add_column :merge_request_assignees, :state, :smallint, default: 0, null: false
- end
-
- unless column_exists?(:merge_request_assignees, :updated_state_by_user_id)
- add_column :merge_request_assignees, :updated_state_by_user_id, :bigint
- end
- end
-
- add_concurrent_index :merge_request_assignees, [:user_id, :state],
- where: 'state = 2',
- name: 'index_on_merge_request_assignees_user_id_and_state'
-
- add_concurrent_index :merge_request_assignees, :updated_state_by_user_id,
- name: 'index_on_merge_request_assignees_updated_state_by_user_id'
-
- add_concurrent_foreign_key :merge_request_assignees, :users,
- column: :updated_state_by_user_id,
- on_delete: :nullify
- end
-end
diff --git a/db/post_migrate/20220919041604_drop_unused_fields_from_merge_request_reviewers.rb b/db/post_migrate/20220919041604_drop_unused_fields_from_merge_request_reviewers.rb
deleted file mode 100644
index d9f98557f75..00000000000
--- a/db/post_migrate/20220919041604_drop_unused_fields_from_merge_request_reviewers.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# frozen_string_literal: true
-
-class DropUnusedFieldsFromMergeRequestReviewers < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- if column_exists?(:merge_request_reviewers, :updated_state_by_user_id)
- remove_column :merge_request_reviewers, :updated_state_by_user_id
- end
- end
- end
-
- def down
- with_lock_retries do
- unless column_exists?(:merge_request_reviewers, :updated_state_by_user_id)
- add_column :merge_request_reviewers, :updated_state_by_user_id, :bigint
- end
- end
-
- add_concurrent_index :merge_request_reviewers, :updated_state_by_user_id,
- name: 'index_on_merge_request_reviewers_updated_state_by_user_id'
-
- add_concurrent_foreign_key :merge_request_reviewers, :users, column: :updated_state_by_user_id, on_delete: :nullify
- end
-end
diff --git a/db/post_migrate/20220919050555_drop_tmp_index_user_callouts_on_attention_request_feature_names.rb b/db/post_migrate/20220919050555_drop_tmp_index_user_callouts_on_attention_request_feature_names.rb
deleted file mode 100644
index e456a91fe3f..00000000000
--- a/db/post_migrate/20220919050555_drop_tmp_index_user_callouts_on_attention_request_feature_names.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class DropTmpIndexUserCalloutsOnAttentionRequestFeatureNames < Gitlab::Database::Migration[2.0]
- INDEX_NAME = "tmp_index_user_callouts_on_attention_request_feature_names"
- ATTENTION_REQUEST_CALLOUTS = [47, 48]
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :user_callouts, INDEX_NAME
- end
-
- def down
- add_concurrent_index :user_callouts, [:id],
- where: "feature_name IN (#{ATTENTION_REQUEST_CALLOUTS.join(',')})",
- name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220919080303_delete_migrate_shared_vulnerability_scanners.rb b/db/post_migrate/20220919080303_delete_migrate_shared_vulnerability_scanners.rb
deleted file mode 100644
index 4aedfcf1699..00000000000
--- a/db/post_migrate/20220919080303_delete_migrate_shared_vulnerability_scanners.rb
+++ /dev/null
@@ -1,44 +0,0 @@
-# frozen_string_literal: true
-
-class DeleteMigrateSharedVulnerabilityScanners < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- MIGRATION = "MigrateSharedVulnerabilityScanners"
- TABLE_NAME = :vulnerability_occurrences
- BATCH_COLUMN = :id
- BATCH_SIZE = 250
-
- class BatchedBackgroundMigration < MigrationRecord
- self.table_name = "batched_background_migrations"
- end
-
- class BatchedBackgroundMigrationJob < MigrationRecord
- include ::EachBatch
-
- self.table_name = "batched_background_migration_jobs"
-
- belongs_to :batched_background_migration
- end
-
- def up
- return unless migration_id = BatchedBackgroundMigration.find_by(job_class_name: MIGRATION)&.id
-
- # rubocop:disable Style/SymbolProc
- BatchedBackgroundMigrationJob
- .where(batched_background_migration_id: migration_id)
- .each_batch(of: BATCH_SIZE) do |relation|
- relation.delete_all
- end
- # rubocop:enable Style/SymbolProc
-
- delete_batched_background_migration(MIGRATION,
- TABLE_NAME,
- BATCH_COLUMN,
- [])
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220919080304_reschedule_migrate_shared_vulnerability_scanners.rb b/db/post_migrate/20220919080304_reschedule_migrate_shared_vulnerability_scanners.rb
deleted file mode 100644
index 69757085587..00000000000
--- a/db/post_migrate/20220919080304_reschedule_migrate_shared_vulnerability_scanners.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-class RescheduleMigrateSharedVulnerabilityScanners < Gitlab::Database::Migration[2.0]
- MIGRATION = "MigrateSharedVulnerabilityScanners"
- TABLE_NAME = :vulnerability_occurrences
- BATCH_COLUMN = :id
- DELAY_INTERVAL = 5.minutes
- BATCH_SIZE = 1000
- SUB_BATCH_SIZE = 100
-
- disable_ddl_transaction!
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- queue_batched_background_migration(
- MIGRATION,
- TABLE_NAME,
- BATCH_COLUMN,
- job_interval: DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- max_batch_size: BATCH_SIZE,
- sub_batch_size: SUB_BATCH_SIZE
- )
- end
-
- def down
- delete_batched_background_migration(MIGRATION, TABLE_NAME, BATCH_COLUMN, [])
- end
-end
diff --git a/db/post_migrate/20220920081631_prepare_ci_builds_metadata_for_partitioning_primary_key.rb b/db/post_migrate/20220920081631_prepare_ci_builds_metadata_for_partitioning_primary_key.rb
deleted file mode 100644
index 90727178624..00000000000
--- a/db/post_migrate/20220920081631_prepare_ci_builds_metadata_for_partitioning_primary_key.rb
+++ /dev/null
@@ -1,36 +0,0 @@
-# frozen_string_literal: true
-
-class PrepareCiBuildsMetadataForPartitioningPrimaryKey < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- TABLE_NAME = 'ci_builds_metadata'
- PRIMARY_KEY = 'ci_builds_metadata_pkey'
- NEW_INDEX_NAME = 'index_ci_builds_metadata_on_id_partition_id_unique'
- OLD_INDEX_NAME = 'index_ci_builds_metadata_on_id_unique'
-
- def up
- with_lock_retries(raise_on_exhaustion: true) do
- execute("ALTER TABLE #{TABLE_NAME} DROP CONSTRAINT #{PRIMARY_KEY} CASCADE")
-
- rename_index(TABLE_NAME, NEW_INDEX_NAME, PRIMARY_KEY)
-
- execute("ALTER TABLE #{TABLE_NAME} ADD CONSTRAINT #{PRIMARY_KEY} " \
- "PRIMARY KEY USING INDEX #{PRIMARY_KEY}")
- end
- end
-
- # rolling back this migration is time consuming with the creation of these two indexes
- def down
- add_concurrent_index(TABLE_NAME, :id, unique: true, name: OLD_INDEX_NAME)
- add_concurrent_index(TABLE_NAME, [:id, :partition_id], unique: true, name: NEW_INDEX_NAME)
-
- with_lock_retries(raise_on_exhaustion: true) do
- execute("ALTER TABLE #{TABLE_NAME} DROP CONSTRAINT #{PRIMARY_KEY} CASCADE")
-
- rename_index(TABLE_NAME, OLD_INDEX_NAME, PRIMARY_KEY)
-
- execute("ALTER TABLE #{TABLE_NAME} ADD CONSTRAINT #{PRIMARY_KEY} " \
- "PRIMARY KEY USING INDEX #{PRIMARY_KEY}")
- end
- end
-end
diff --git a/db/post_migrate/20220920122121_schedule_index_removal_for_ci_builds_metadata.rb b/db/post_migrate/20220920122121_schedule_index_removal_for_ci_builds_metadata.rb
deleted file mode 100644
index 57475a08c93..00000000000
--- a/db/post_migrate/20220920122121_schedule_index_removal_for_ci_builds_metadata.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleIndexRemovalForCiBuildsMetadata < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- TABLE_NAME = :ci_builds_metadata
- INDEX_NAME = :index_ci_builds_metadata_on_build_id
-
- def up
- prepare_async_index_removal(TABLE_NAME, :build_id, name: INDEX_NAME)
- end
-
- def down
- unprepare_async_index(TABLE_NAME, :build_id, name: INDEX_NAME)
- end
-end
diff --git a/db/post_migrate/20220920124709_backfill_internal_on_notes_renamed.rb b/db/post_migrate/20220920124709_backfill_internal_on_notes_renamed.rb
deleted file mode 100644
index a9de69243f6..00000000000
--- a/db/post_migrate/20220920124709_backfill_internal_on_notes_renamed.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-# Renamed from BackfillInternalOnNotes to BackfillInternalOnNotesRenamed to avoid collision with an Elasticsearch
-# migration from the same name. See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/129012
-class BackfillInternalOnNotesRenamed < Gitlab::Database::Migration[2.0]
- MIGRATION = 'BackfillInternalOnNotes'
- DELAY_INTERVAL = 2.minutes
- TABLE = :notes
- BATCH_SIZE = 2000
- SUB_BATCH_SIZE = 10
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- queue_batched_background_migration(
- MIGRATION,
- TABLE,
- :id,
- job_interval: DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- sub_batch_size: SUB_BATCH_SIZE
- )
- end
-
- def down
- delete_batched_background_migration(MIGRATION, TABLE, :id, [])
- end
-end
diff --git a/db/post_migrate/20220920135356_tiebreak_user_type_index.rb b/db/post_migrate/20220920135356_tiebreak_user_type_index.rb
deleted file mode 100644
index 489196c8eab..00000000000
--- a/db/post_migrate/20220920135356_tiebreak_user_type_index.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class TiebreakUserTypeIndex < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- NEW_INDEX_NAME = 'index_users_on_user_type_and_id'
- OLD_INDEX_NAME = 'index_users_on_user_type'
-
- def up
- # rubocop:disable Migration/PreventIndexCreation
- add_concurrent_index :users, [:user_type, :id], name: NEW_INDEX_NAME
- # rubocop:enable Migration/PreventIndexCreation
- remove_concurrent_index_by_name :users, OLD_INDEX_NAME
- end
-
- def down
- add_concurrent_index :users, :user_type, name: OLD_INDEX_NAME
- remove_concurrent_index_by_name :users, NEW_INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220920141001_add_index_on_internal_notes.rb b/db/post_migrate/20220920141001_add_index_on_internal_notes.rb
deleted file mode 100644
index 466ad7b5a8d..00000000000
--- a/db/post_migrate/20220920141001_add_index_on_internal_notes.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexOnInternalNotes < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_notes_on_id_where_internal'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :notes, :id, where: 'internal = true', name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :notes, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220920213504_finalize_task_system_note_renaming.rb b/db/post_migrate/20220920213504_finalize_task_system_note_renaming.rb
deleted file mode 100644
index d9307c14ccb..00000000000
--- a/db/post_migrate/20220920213504_finalize_task_system_note_renaming.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class FinalizeTaskSystemNoteRenaming < Gitlab::Database::Migration[2.0]
- def up
- # no-op
- end
-
- def down
- # noop
- end
-end
diff --git a/db/post_migrate/20220920214524_remove_task_system_note_rename_temp_index.rb b/db/post_migrate/20220920214524_remove_task_system_note_rename_temp_index.rb
deleted file mode 100644
index d3671d24578..00000000000
--- a/db/post_migrate/20220920214524_remove_task_system_note_rename_temp_index.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveTaskSystemNoteRenameTempIndex < Gitlab::Database::Migration[2.0]
- def up
- # no-op
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220921093355_schedule_backfill_namespace_details.rb b/db/post_migrate/20220921093355_schedule_backfill_namespace_details.rb
deleted file mode 100644
index 16ce9bd5c85..00000000000
--- a/db/post_migrate/20220921093355_schedule_backfill_namespace_details.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleBackfillNamespaceDetails < Gitlab::Database::Migration[2.0]
- MIGRATION = 'BackfillNamespaceDetails'
- INTERVAL = 2.minutes
- BATCH_SIZE = 1_000
- MAX_BATCH_SIZE = 10_000
- SUB_BATCH_SIZE = 200
-
- disable_ddl_transaction!
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- queue_batched_background_migration(
- MIGRATION,
- :namespaces,
- :id,
- job_interval: INTERVAL,
- batch_size: BATCH_SIZE,
- max_batch_size: MAX_BATCH_SIZE,
- sub_batch_size: SUB_BATCH_SIZE
- )
- end
-
- def down
- delete_batched_background_migration(MIGRATION, :namespaces, :id, [])
- end
-end
diff --git a/db/post_migrate/20220921111823_remove_and_add_ci_pipeline_variables_raw_with_new_default.rb b/db/post_migrate/20220921111823_remove_and_add_ci_pipeline_variables_raw_with_new_default.rb
deleted file mode 100644
index fd56a8f320a..00000000000
--- a/db/post_migrate/20220921111823_remove_and_add_ci_pipeline_variables_raw_with_new_default.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveAndAddCiPipelineVariablesRawWithNewDefault < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- remove_column :ci_pipeline_variables, :raw, :boolean, null: false, default: true
- add_column :ci_pipeline_variables, :raw, :boolean, null: false, default: false
- end
-end
diff --git a/db/post_migrate/20220921111831_remove_and_add_ci_group_variables_raw_with_new_default.rb b/db/post_migrate/20220921111831_remove_and_add_ci_group_variables_raw_with_new_default.rb
deleted file mode 100644
index f4b7de3faf4..00000000000
--- a/db/post_migrate/20220921111831_remove_and_add_ci_group_variables_raw_with_new_default.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveAndAddCiGroupVariablesRawWithNewDefault < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- remove_column :ci_group_variables, :raw, :boolean, null: false, default: true
- add_column :ci_group_variables, :raw, :boolean, null: false, default: false
- end
-end
diff --git a/db/post_migrate/20220921111840_remove_and_add_ci_instance_variables_raw_with_new_default.rb b/db/post_migrate/20220921111840_remove_and_add_ci_instance_variables_raw_with_new_default.rb
deleted file mode 100644
index 019db1bbaa3..00000000000
--- a/db/post_migrate/20220921111840_remove_and_add_ci_instance_variables_raw_with_new_default.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveAndAddCiInstanceVariablesRawWithNewDefault < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- remove_column :ci_instance_variables, :raw, :boolean, null: false, default: true
- add_column :ci_instance_variables, :raw, :boolean, null: false, default: false
- end
-end
diff --git a/db/post_migrate/20220921111849_remove_and_add_ci_job_variables_raw_with_new_default.rb b/db/post_migrate/20220921111849_remove_and_add_ci_job_variables_raw_with_new_default.rb
deleted file mode 100644
index 736cd46382d..00000000000
--- a/db/post_migrate/20220921111849_remove_and_add_ci_job_variables_raw_with_new_default.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveAndAddCiJobVariablesRawWithNewDefault < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- remove_column :ci_job_variables, :raw, :boolean, null: false, default: true
- add_column :ci_job_variables, :raw, :boolean, null: false, default: false
- end
-end
diff --git a/db/post_migrate/20220921111857_remove_and_add_ci_pipeline_schedule_variables_raw_with_new_default.rb b/db/post_migrate/20220921111857_remove_and_add_ci_pipeline_schedule_variables_raw_with_new_default.rb
deleted file mode 100644
index 159b0303d71..00000000000
--- a/db/post_migrate/20220921111857_remove_and_add_ci_pipeline_schedule_variables_raw_with_new_default.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveAndAddCiPipelineScheduleVariablesRawWithNewDefault < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- remove_column :ci_pipeline_schedule_variables, :raw, :boolean, null: false, default: true
- add_column :ci_pipeline_schedule_variables, :raw, :boolean, null: false, default: false
- end
-end
diff --git a/db/post_migrate/20220921111907_remove_and_add_ci_variables_raw_with_new_default.rb b/db/post_migrate/20220921111907_remove_and_add_ci_variables_raw_with_new_default.rb
deleted file mode 100644
index 129e5b1f020..00000000000
--- a/db/post_migrate/20220921111907_remove_and_add_ci_variables_raw_with_new_default.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveAndAddCiVariablesRawWithNewDefault < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- remove_column :ci_variables, :raw, :boolean, null: false, default: true
- add_column :ci_variables, :raw, :boolean, null: false, default: false
- end
-end
diff --git a/db/post_migrate/20220921144258_remove_orphan_group_token_users.rb b/db/post_migrate/20220921144258_remove_orphan_group_token_users.rb
deleted file mode 100644
index a2483f611a3..00000000000
--- a/db/post_migrate/20220921144258_remove_orphan_group_token_users.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveOrphanGroupTokenUsers < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- disable_ddl_transaction!
-
- class MigrationUser < MigrationRecord
- include EachBatch
-
- self.table_name = 'users'
-
- scope :project_bots, -> { where(user_type: 6) }
- scope :without_memberships, -> { where("NOT EXISTS (SELECT 1 FROM members where members.user_id = users.id)") }
- end
-
- class MigrationPersonalAccessToken < MigrationRecord
- self.table_name = 'personal_access_tokens'
- end
-
- def up
- delete_worker = 'DeleteUserWorker'.safe_constantize
-
- MigrationUser.project_bots.each_batch(of: 1000) do |batch|
- bot_ids = batch.without_memberships.pluck(:id)
-
- MigrationPersonalAccessToken.where(user_id: bot_ids).delete_all
-
- next unless delete_worker && delete_worker.respond_to?(:perform_async)
-
- bot_ids.each do |bot_id|
- delete_worker.perform_async(bot_id, bot_id, skip_authorization: true)
- end
- end
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220922090236_remove_trace_column_from_ci_builds.rb b/db/post_migrate/20220922090236_remove_trace_column_from_ci_builds.rb
deleted file mode 100644
index e1871a9799f..00000000000
--- a/db/post_migrate/20220922090236_remove_trace_column_from_ci_builds.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveTraceColumnFromCiBuilds < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- remove_column :ci_builds, :trace, :text
- end
-end
diff --git a/db/post_migrate/20220922143143_schedule_reset_duplicate_ci_runners_token_values.rb b/db/post_migrate/20220922143143_schedule_reset_duplicate_ci_runners_token_values.rb
deleted file mode 100644
index fd02bda8004..00000000000
--- a/db/post_migrate/20220922143143_schedule_reset_duplicate_ci_runners_token_values.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleResetDuplicateCiRunnersTokenValues < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_ci
- disable_ddl_transaction!
-
- MIGRATION = 'ResetDuplicateCiRunnersTokenValues'
- DELAY_INTERVAL = 2.minutes
- BATCH_SIZE = 2_000
- MAX_BATCH_SIZE = 100_000
- SUB_BATCH_SIZE = 500
-
- def up
- queue_batched_background_migration(
- MIGRATION,
- :ci_runners,
- :id,
- job_interval: DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- max_batch_size: MAX_BATCH_SIZE,
- sub_batch_size: SUB_BATCH_SIZE
- )
- end
-
- def down
- delete_batched_background_migration(MIGRATION, :ci_runners, :id, [])
- end
-end
diff --git a/db/post_migrate/20220922143634_schedule_reset_duplicate_ci_runners_token_encrypted_values.rb b/db/post_migrate/20220922143634_schedule_reset_duplicate_ci_runners_token_encrypted_values.rb
deleted file mode 100644
index bbbf9a1db44..00000000000
--- a/db/post_migrate/20220922143634_schedule_reset_duplicate_ci_runners_token_encrypted_values.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleResetDuplicateCiRunnersTokenEncryptedValues < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_ci
- disable_ddl_transaction!
-
- MIGRATION = 'ResetDuplicateCiRunnersTokenEncryptedValues'
- DELAY_INTERVAL = 2.minutes
- BATCH_SIZE = 2_000
- MAX_BATCH_SIZE = 100_000
- SUB_BATCH_SIZE = 500
-
- def up
- queue_batched_background_migration(
- MIGRATION,
- :ci_runners,
- :id,
- job_interval: DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- max_batch_size: MAX_BATCH_SIZE,
- sub_batch_size: SUB_BATCH_SIZE
- )
- end
-
- def down
- delete_batched_background_migration(MIGRATION, :ci_runners, :id, [])
- end
-end
diff --git a/db/post_migrate/20220922204106_remove_index_for_requested_non_invited_awaiting_members.rb b/db/post_migrate/20220922204106_remove_index_for_requested_non_invited_awaiting_members.rb
deleted file mode 100644
index 033b04a75f8..00000000000
--- a/db/post_migrate/20220922204106_remove_index_for_requested_non_invited_awaiting_members.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveIndexForRequestedNonInvitedAwaitingMembers < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_members_on_non_requested_non_invited_and_state_awaiting'
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :members, INDEX_NAME
- end
-
- def down
- clause = '((requested_at IS NULL) AND (invite_token IS NULL) AND (access_level > 5) AND (state = 1))'
-
- add_concurrent_index :members, :source_id, where: clause, name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220923052531_remove_tmp_index_merge_request_reviewers_on_attention_requested_state.rb b/db/post_migrate/20220923052531_remove_tmp_index_merge_request_reviewers_on_attention_requested_state.rb
deleted file mode 100644
index 27d9c1641bc..00000000000
--- a/db/post_migrate/20220923052531_remove_tmp_index_merge_request_reviewers_on_attention_requested_state.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveTmpIndexMergeRequestReviewersOnAttentionRequestedState < Gitlab::Database::Migration[2.0]
- INDEX_NAME = "tmp_index_merge_request_reviewers_on_attention_requested_state"
- ATTENTION_REQUESTED_STATE = 2
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :merge_request_reviewers, INDEX_NAME
- end
-
- def down
- add_concurrent_index :merge_request_reviewers, [:id],
- where: "state = #{ATTENTION_REQUESTED_STATE}",
- name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220923060226_remove_tmp_index_system_note_metadata_on_attention_request_actions.rb b/db/post_migrate/20220923060226_remove_tmp_index_system_note_metadata_on_attention_request_actions.rb
deleted file mode 100644
index 40e8c1cfdb5..00000000000
--- a/db/post_migrate/20220923060226_remove_tmp_index_system_note_metadata_on_attention_request_actions.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveTmpIndexSystemNoteMetadataOnAttentionRequestActions < Gitlab::Database::Migration[2.0]
- INDEX_NAME = "tmp_index_system_note_metadata_on_attention_request_actions"
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :system_note_metadata, INDEX_NAME
- end
-
- def down
- add_concurrent_index :system_note_metadata, [:id],
- where: "action IN ('attention_requested', 'attention_request_removed')",
- name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220927171740_prepare_for_vulnerability_occurrences_uuid_type_transition.rb b/db/post_migrate/20220927171740_prepare_for_vulnerability_occurrences_uuid_type_transition.rb
deleted file mode 100644
index e6f3384514d..00000000000
--- a/db/post_migrate/20220927171740_prepare_for_vulnerability_occurrences_uuid_type_transition.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# frozen_string_literal: true
-
-class PrepareForVulnerabilityOccurrencesUuidTypeTransition < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- TABLE = :vulnerability_occurrences
- MAPPINGS = {
- uuid: {
- from_type: :string,
- to_type: :uuid,
- default_value: '00000000-0000-0000-0000-000000000000'
- }
- }
-
- def up
- create_temporary_columns_and_triggers(TABLE, MAPPINGS)
- end
-
- def down
- columns = MAPPINGS.keys
- temporary_columns = columns.map { |column| convert_to_type_column(column, :string, :uuid) }
- trigger_name = rename_trigger_name(TABLE, columns, temporary_columns)
- remove_rename_triggers(TABLE, trigger_name)
- temporary_columns.each { |column| remove_column(TABLE, column) }
- end
-end
diff --git a/db/post_migrate/20220928225711_schedule_update_ci_pipeline_artifacts_locked_status.rb b/db/post_migrate/20220928225711_schedule_update_ci_pipeline_artifacts_locked_status.rb
deleted file mode 100644
index 0d7a5dc4bec..00000000000
--- a/db/post_migrate/20220928225711_schedule_update_ci_pipeline_artifacts_locked_status.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleUpdateCiPipelineArtifactsLockedStatus < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- MIGRATION = 'UpdateCiPipelineArtifactsUnknownLockedStatus'
- DELAY_INTERVAL = 2.minutes
- BATCH_SIZE = 1_000
- SUB_BATCH_SIZE = 500
-
- restrict_gitlab_migration gitlab_schema: :gitlab_ci
-
- def up
- queue_batched_background_migration(
- MIGRATION,
- :ci_pipeline_artifacts,
- :id,
- job_interval: DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- sub_batch_size: SUB_BATCH_SIZE
- )
- end
-
- def down
- delete_batched_background_migration(MIGRATION, :ci_pipeline_artifacts, :id, [])
- end
-end
diff --git a/db/post_migrate/20220929081645_tmp_idx_null_member_namespace_id.rb b/db/post_migrate/20220929081645_tmp_idx_null_member_namespace_id.rb
deleted file mode 100644
index 58d6c653e6f..00000000000
--- a/db/post_migrate/20220929081645_tmp_idx_null_member_namespace_id.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class TmpIdxNullMemberNamespaceId < Gitlab::Database::Migration[2.0]
- TMP_INDEX_FOR_NULL_MEMBER_NAMESPACE_ID = 'tmp_index_for_null_member_namespace_id'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :members, :member_namespace_id,
- name: TMP_INDEX_FOR_NULL_MEMBER_NAMESPACE_ID,
- where: 'member_namespace_id IS NULL'
- end
-
- def down
- remove_concurrent_index_by_name :members, name: TMP_INDEX_FOR_NULL_MEMBER_NAMESPACE_ID
- end
-end
diff --git a/db/post_migrate/20220929091500_add_tmp_index_vulns_on_report_type.rb b/db/post_migrate/20220929091500_add_tmp_index_vulns_on_report_type.rb
deleted file mode 100644
index 19100e1d0cc..00000000000
--- a/db/post_migrate/20220929091500_add_tmp_index_vulns_on_report_type.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-class AddTmpIndexVulnsOnReportType < Gitlab::Database::Migration[2.0]
- # Temporary index to perform migration removing invalid vulnerabilities
- INDEX_NAME = 'tmp_idx_vulnerabilities_on_id_where_report_type_7_99'
-
- REPORT_TYPES = {
- cluster_image_scanning: 7,
- custom: 99
- }
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :vulnerabilities, :id,
- where: "report_type IN (#{REPORT_TYPES.values.join(', ')})",
- name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :vulnerabilities, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220929101947_delete_remove_invalid_member_migration.rb b/db/post_migrate/20220929101947_delete_remove_invalid_member_migration.rb
deleted file mode 100644
index 6fb358e57ab..00000000000
--- a/db/post_migrate/20220929101947_delete_remove_invalid_member_migration.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class DeleteRemoveInvalidMemberMigration < Gitlab::Database::Migration[2.0]
- PROJECT_MEMBER_MIGRATION = 'ScheduleDestroyInvalidProjectMembers'
- GROUP_MEMBER_MIGRATION = 'ScheduleDestroyInvalidGroupMembers'
-
- disable_ddl_transaction!
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- delete_batched_background_migration(PROJECT_MEMBER_MIGRATION, :members, :id, [])
- delete_batched_background_migration(GROUP_MEMBER_MIGRATION, :members, :id, [])
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220929194453_add_index_releases_project_id_id.rb b/db/post_migrate/20220929194453_add_index_releases_project_id_id.rb
deleted file mode 100644
index 179b5a636f0..00000000000
--- a/db/post_migrate/20220929194453_add_index_releases_project_id_id.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexReleasesProjectIdId < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_releases_on_project_id_id'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :releases, %i[project_id id], name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :releases, name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220929213730_schedule_delete_orphaned_operational_vulnerabilities.rb b/db/post_migrate/20220929213730_schedule_delete_orphaned_operational_vulnerabilities.rb
deleted file mode 100644
index c03358b1fda..00000000000
--- a/db/post_migrate/20220929213730_schedule_delete_orphaned_operational_vulnerabilities.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleDeleteOrphanedOperationalVulnerabilities < Gitlab::Database::Migration[2.0]
- MIGRATION = 'DeleteOrphanedOperationalVulnerabilities'
- INTERVAL = 2.minutes
- BATCH_SIZE = 10_000
-
- disable_ddl_transaction!
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- queue_batched_background_migration(
- MIGRATION,
- :vulnerabilities,
- :id,
- job_interval: INTERVAL,
- batch_size: BATCH_SIZE
- )
- end
-
- def down
- delete_batched_background_migration(MIGRATION, :vulnerabilities, :id, [])
- end
-end
diff --git a/db/post_migrate/20220930110127_remove_unique_index_build_id_to_ci_builds_metadata.rb b/db/post_migrate/20220930110127_remove_unique_index_build_id_to_ci_builds_metadata.rb
deleted file mode 100644
index 4c23cdc5284..00000000000
--- a/db/post_migrate/20220930110127_remove_unique_index_build_id_to_ci_builds_metadata.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveUniqueIndexBuildIdToCiBuildsMetadata < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- TABLE_NAME = :ci_builds_metadata
- INDEX_NAME = :index_ci_builds_metadata_on_build_id
-
- def up
- remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME)
- end
-
- def down
- add_concurrent_index(TABLE_NAME, :build_id, unique: true, name: INDEX_NAME)
- end
-end
diff --git a/db/post_migrate/20221002234454_finalize_group_member_namespace_id_migration.rb b/db/post_migrate/20221002234454_finalize_group_member_namespace_id_migration.rb
deleted file mode 100644
index 9c5ca6cbb42..00000000000
--- a/db/post_migrate/20221002234454_finalize_group_member_namespace_id_migration.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class FinalizeGroupMemberNamespaceIdMigration < Gitlab::Database::Migration[2.0]
- MIGRATION = 'BackfillMemberNamespaceForGroupMembers'
- disable_ddl_transaction!
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- ensure_batched_background_migration_is_finished(
- job_class_name: MIGRATION,
- table_name: :members,
- column_name: :id,
- job_arguments: [],
- finalize: true
- )
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20221003192827_add_index_resolved_on_default_branch_to_vulnerabilities_read.rb b/db/post_migrate/20221003192827_add_index_resolved_on_default_branch_to_vulnerabilities_read.rb
deleted file mode 100644
index e352e324187..00000000000
--- a/db/post_migrate/20221003192827_add_index_resolved_on_default_branch_to_vulnerabilities_read.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexResolvedOnDefaultBranchToVulnerabilitiesRead < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_vuln_reads_on_resolved_on_default_branch'
- COLUMNS = %i[project_id state id]
-
- def up
- add_concurrent_index :vulnerability_reads, COLUMNS,
- where: 'resolved_on_default_branch IS TRUE',
- name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :vulnerability_reads, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20221004074910_routing_table_prepare_constraint_for_builds_metadata.rb b/db/post_migrate/20221004074910_routing_table_prepare_constraint_for_builds_metadata.rb
deleted file mode 100644
index 013984154ae..00000000000
--- a/db/post_migrate/20221004074910_routing_table_prepare_constraint_for_builds_metadata.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-# frozen_string_literal: true
-
-class RoutingTablePrepareConstraintForBuildsMetadata < Gitlab::Database::Migration[2.0]
- include Gitlab::Database::PartitioningMigrationHelpers::TableManagementHelpers
-
- disable_ddl_transaction!
-
- TABLE_NAME = :ci_builds_metadata
- PARENT_TABLE_NAME = :p_ci_builds_metadata
- FIRST_PARTITION = 100
- PARTITION_COLUMN = :partition_id
-
- def up
- prepare_constraint_for_list_partitioning(
- table_name: TABLE_NAME,
- partitioning_column: PARTITION_COLUMN,
- parent_table_name: PARENT_TABLE_NAME,
- initial_partitioning_value: FIRST_PARTITION
- )
- end
-
- def down
- revert_preparing_constraint_for_list_partitioning(
- table_name: TABLE_NAME,
- partitioning_column: PARTITION_COLUMN,
- parent_table_name: PARENT_TABLE_NAME,
- initial_partitioning_value: FIRST_PARTITION
- )
- end
-end
diff --git a/db/post_migrate/20221004074914_create_routing_table_for_builds_metadata.rb b/db/post_migrate/20221004074914_create_routing_table_for_builds_metadata.rb
deleted file mode 100644
index a792fc91d3d..00000000000
--- a/db/post_migrate/20221004074914_create_routing_table_for_builds_metadata.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class CreateRoutingTableForBuildsMetadata < Gitlab::Database::Migration[2.0]
- def up; end
-
- def down; end
-end
diff --git a/db/post_migrate/20221004092038_tmp_index_members_on_id_where_namespace_id_null.rb b/db/post_migrate/20221004092038_tmp_index_members_on_id_where_namespace_id_null.rb
deleted file mode 100644
index 68a707e99c2..00000000000
--- a/db/post_migrate/20221004092038_tmp_index_members_on_id_where_namespace_id_null.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class TmpIndexMembersOnIdWhereNamespaceIdNull < Gitlab::Database::Migration[2.0]
- TMP_INDEX = 'tmp_index_members_on_id_where_namespace_id_null'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :members, :id,
- name: TMP_INDEX,
- where: 'member_namespace_id IS NULL'
- end
-
- def down
- remove_concurrent_index_by_name :members, name: TMP_INDEX
- end
-end
diff --git a/db/post_migrate/20221004094814_schedule_destroy_invalid_members.rb b/db/post_migrate/20221004094814_schedule_destroy_invalid_members.rb
deleted file mode 100644
index fa6a1fd5f72..00000000000
--- a/db/post_migrate/20221004094814_schedule_destroy_invalid_members.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-class ScheduleDestroyInvalidMembers < Gitlab::Database::Migration[2.0]
- MIGRATION = 'DestroyInvalidMembers'
- DELAY_INTERVAL = 2.minutes
- BATCH_SIZE = 1_000
- MAX_BATCH_SIZE = 10_000
- SUB_BATCH_SIZE = 200
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- queue_batched_background_migration(
- MIGRATION,
- :members,
- :id,
- job_interval: DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- max_batch_size: MAX_BATCH_SIZE,
- sub_batch_size: SUB_BATCH_SIZE,
- gitlab_schema: :gitlab_main
- )
- end
-
- def down
- delete_batched_background_migration(MIGRATION, :members, :id, [])
- end
-end
diff --git a/db/post_migrate/20221005103000_add_index_merge_request_id_on_scan_finding_approval_merge_request_rules.rb b/db/post_migrate/20221005103000_add_index_merge_request_id_on_scan_finding_approval_merge_request_rules.rb
deleted file mode 100644
index 06bf21b894a..00000000000
--- a/db/post_migrate/20221005103000_add_index_merge_request_id_on_scan_finding_approval_merge_request_rules.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexMergeRequestIdOnScanFindingApprovalMergeRequestRules < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'scan_finding_approval_mr_rule_index_merge_request_id'
- SCAN_FINDING_REPORT_TYPE = 4
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :approval_merge_request_rules, :merge_request_id,
- where: "report_type = #{SCAN_FINDING_REPORT_TYPE}", name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :approval_merge_request_rules, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20221006070927_finalize_invalid_member_cleanup.rb b/db/post_migrate/20221006070927_finalize_invalid_member_cleanup.rb
deleted file mode 100644
index 78786e46f5c..00000000000
--- a/db/post_migrate/20221006070927_finalize_invalid_member_cleanup.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class FinalizeInvalidMemberCleanup < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- MIGRATION = 'DestroyInvalidMembers'
-
- def up
- ensure_batched_background_migration_is_finished(
- job_class_name: MIGRATION,
- table_name: :members,
- column_name: :id,
- job_arguments: []
- )
- end
-
- def down
- # noop
- end
-end
diff --git a/db/post_migrate/20221006083240_prepare_partial_trigram_indexes_for_issues_attempt_2.rb b/db/post_migrate/20221006083240_prepare_partial_trigram_indexes_for_issues_attempt_2.rb
deleted file mode 100644
index 6ca2ba222ae..00000000000
--- a/db/post_migrate/20221006083240_prepare_partial_trigram_indexes_for_issues_attempt_2.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# frozen_string_literal: true
-
-class PreparePartialTrigramIndexesForIssuesAttempt2 < Gitlab::Database::Migration[2.0]
- TITLE_INDEX_NAME = 'index_issues_on_title_trigram_non_latin'
- DESCRIPTION_INDEX_NAME = 'index_issues_on_description_trigram_non_latin'
-
- def up
- prepare_async_index :issues, :title,
- name: TITLE_INDEX_NAME,
- using: :gin, opclass: { description: :gin_trgm_ops },
- where: "title NOT SIMILAR TO '[\\u0000-\\u02FF\\u1E00-\\u1EFF\\u2070-\\u218F]*' " \
- "OR description NOT SIMILAR TO '[\\u0000-\\u02FF\\u1E00-\\u1EFF\\u2070-\\u218F]*'"
-
- prepare_async_index :issues, :description,
- name: DESCRIPTION_INDEX_NAME,
- using: :gin, opclass: { description: :gin_trgm_ops },
- where: "title NOT SIMILAR TO '[\\u0000-\\u02FF\\u1E00-\\u1EFF\\u2070-\\u218F]*' " \
- "OR description NOT SIMILAR TO '[\\u0000-\\u02FF\\u1E00-\\u1EFF\\u2070-\\u218F]*'"
- end
-
- def down
- unprepare_async_index_by_name :issues, DESCRIPTION_INDEX_NAME
- unprepare_async_index_by_name :issues, TITLE_INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20221006172302_adjust_task_note_rename_background_migration_values.rb b/db/post_migrate/20221006172302_adjust_task_note_rename_background_migration_values.rb
deleted file mode 100644
index b582b163e2d..00000000000
--- a/db/post_migrate/20221006172302_adjust_task_note_rename_background_migration_values.rb
+++ /dev/null
@@ -1,72 +0,0 @@
-# frozen_string_literal: true
-
-class AdjustTaskNoteRenameBackgroundMigrationValues < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- JOB_CLASS_NAME = 'RenameTaskSystemNoteToChecklistItem'
- MIGRATION_FAILED_STATUS = 4
- MIGRATION_FINISHED_STATUS = 3
- MIGRATION_ACTIVE_STATUS = 1
- JOB_FAILED_STATUS = 2
-
- OLD_BATCH_SIZE = 10_000
- NEW_BATCH_SIZE = 5_000
-
- OLD_SUB_BATCH_SIZE = 100
- NEW_SUB_BATCH_SIZE = 10
-
- class InlineBatchedMigration < MigrationRecord
- self.table_name = :batched_background_migrations
-
- scope :for_configuration, ->(job_class_name, table_name, column_name, job_arguments) do
- where(job_class_name: job_class_name, table_name: table_name, column_name: column_name)
- .where("job_arguments = ?", Gitlab::Json.dump(job_arguments)) # rubocop:disable Rails/WhereEquals
- end
- end
-
- class InlineBatchedJob < MigrationRecord
- include EachBatch
- self.table_name = :batched_background_migration_jobs
- end
-
- def up
- migration = InlineBatchedMigration.for_configuration(
- JOB_CLASS_NAME,
- :system_note_metadata,
- :id,
- []
- ).first
- return if migration.blank? || migration.status == MIGRATION_FINISHED_STATUS
-
- InlineBatchedJob.where(
- batched_background_migration_id: migration.id,
- status: JOB_FAILED_STATUS
- ).each_batch(of: 100) do |batch|
- batch.update_all(attempts: 0, sub_batch_size: NEW_SUB_BATCH_SIZE)
- end
-
- update_params = { batch_size: NEW_BATCH_SIZE, sub_batch_size: NEW_SUB_BATCH_SIZE }
-
- if migration.status == MIGRATION_FAILED_STATUS
- update_params[:status] = MIGRATION_ACTIVE_STATUS
- update_params[:started_at] = Time.zone.now if migration.respond_to?(:started_at)
- end
-
- migration.update!(**update_params)
- end
-
- def down
- migration = InlineBatchedMigration.for_configuration(
- JOB_CLASS_NAME,
- :system_note_metadata,
- :id,
- []
- ).first
- return if migration.blank?
-
- migration.update!(
- batch_size: OLD_BATCH_SIZE,
- sub_batch_size: OLD_SUB_BATCH_SIZE
- )
- end
-end
diff --git a/db/post_migrate/20221010074914_migrate_security_findings_delete_queues.rb b/db/post_migrate/20221010074914_migrate_security_findings_delete_queues.rb
deleted file mode 100644
index ce593e19859..00000000000
--- a/db/post_migrate/20221010074914_migrate_security_findings_delete_queues.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class MigrateSecurityFindingsDeleteQueues < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_main
- disable_ddl_transaction!
-
- def up
- sidekiq_queue_migrate 'security_findings_delete_by_job_id', to: 'security_scans_purge_by_job_id'
- sidekiq_queue_migrate 'cronjob:security_findings_cleanup', to: 'cronjob:security_scans_purge'
- end
-
- def down
- sidekiq_queue_migrate 'security_scans_purge_by_job_id', to: 'security_findings_delete_by_job_id'
- sidekiq_queue_migrate 'cronjob:security_scans_purge', to: 'cronjob:security_findings_cleanup'
- end
-end
diff --git a/db/post_migrate/20221010121510_prepare_async_index_author_id_target_project_id_on_merge_requests.rb b/db/post_migrate/20221010121510_prepare_async_index_author_id_target_project_id_on_merge_requests.rb
deleted file mode 100644
index cd9035dd9f9..00000000000
--- a/db/post_migrate/20221010121510_prepare_async_index_author_id_target_project_id_on_merge_requests.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class PrepareAsyncIndexAuthorIdTargetProjectIdOnMergeRequests < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_merge_requests_on_author_id_and_target_project_id'
-
- disable_ddl_transaction!
-
- def up
- prepare_async_index :merge_requests, %i[author_id target_project_id], name: INDEX_NAME
- end
-
- def down
- unprepare_async_index :merge_requests, %i[author_id target_project_id], name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20221010122138_add_async_index_author_id_target_project_id_on_merge_requests.rb b/db/post_migrate/20221010122138_add_async_index_author_id_target_project_id_on_merge_requests.rb
deleted file mode 100644
index 0689c090d09..00000000000
--- a/db/post_migrate/20221010122138_add_async_index_author_id_target_project_id_on_merge_requests.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddAsyncIndexAuthorIdTargetProjectIdOnMergeRequests < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_merge_requests_on_author_id_and_id'
-
- disable_ddl_transaction!
-
- def up
- prepare_async_index :merge_requests, %i[author_id id], name: INDEX_NAME
- end
-
- def down
- unprepare_async_index :merge_requests, %i[author_id id], name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20221010122352_add_index_to_namespace_settings_on_default_compliance_framework_id.rb b/db/post_migrate/20221010122352_add_index_to_namespace_settings_on_default_compliance_framework_id.rb
deleted file mode 100644
index 63de7942208..00000000000
--- a/db/post_migrate/20221010122352_add_index_to_namespace_settings_on_default_compliance_framework_id.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexToNamespaceSettingsOnDefaultComplianceFrameworkId < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'idx_namespace_settings_on_default_compliance_framework_id'
-
- def up
- add_concurrent_index :namespace_settings, :default_compliance_framework_id, unique: true, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index :namespace_settings, :default_compliance_framework_id, name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20221010123040_add_compliance_framework_fk_to_namespace_settings.rb b/db/post_migrate/20221010123040_add_compliance_framework_fk_to_namespace_settings.rb
deleted file mode 100644
index 5d4966fd580..00000000000
--- a/db/post_migrate/20221010123040_add_compliance_framework_fk_to_namespace_settings.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class AddComplianceFrameworkFkToNamespaceSettings < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :namespace_settings, :compliance_management_frameworks,
- column: :default_compliance_framework_id, on_delete: :nullify, reverse_lock_order: true
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :namespace_settings, column: :default_compliance_framework_id
- end
- end
-end
diff --git a/db/post_migrate/20221010141500_add_index_author_id_target_project_id_on_merge_requests.rb b/db/post_migrate/20221010141500_add_index_author_id_target_project_id_on_merge_requests.rb
deleted file mode 100644
index 5b9d5be2b3f..00000000000
--- a/db/post_migrate/20221010141500_add_index_author_id_target_project_id_on_merge_requests.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexAuthorIdTargetProjectIdOnMergeRequests < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_merge_requests_on_author_id_and_target_project_id'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :merge_requests, %i[author_id target_project_id], name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :merge_requests, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20221010162137_add_index_author_id_and_id_on_merge_requests.rb b/db/post_migrate/20221010162137_add_index_author_id_and_id_on_merge_requests.rb
deleted file mode 100644
index 36184b5f573..00000000000
--- a/db/post_migrate/20221010162137_add_index_author_id_and_id_on_merge_requests.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexAuthorIdAndIdOnMergeRequests < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_merge_requests_on_author_id_and_id'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :merge_requests, %i[author_id id], name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :merge_requests, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20221011062254_sync_new_amount_used_for_ci_project_monthly_usages.rb b/db/post_migrate/20221011062254_sync_new_amount_used_for_ci_project_monthly_usages.rb
deleted file mode 100644
index 32943f10fcf..00000000000
--- a/db/post_migrate/20221011062254_sync_new_amount_used_for_ci_project_monthly_usages.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class SyncNewAmountUsedForCiProjectMonthlyUsages < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_ci
-
- def up
- project_usages = define_batchable_model('ci_project_monthly_usages')
-
- project_usages.each_batch(of: 500) do |batch|
- batch.where('amount_used > 0').update_all('new_amount_used = amount_used')
- end
- end
-
- def down
- # Non reversible migration.
- # This data migration keeps `new_amount_used` in sync with the old `amount_used`.
- # In case of failure or interruption the migration can be retried.
- end
-end
diff --git a/db/post_migrate/20221011113928_redo_remove_and_add_ci_job_variables_raw_with_new_default.rb b/db/post_migrate/20221011113928_redo_remove_and_add_ci_job_variables_raw_with_new_default.rb
deleted file mode 100644
index a377b78803e..00000000000
--- a/db/post_migrate/20221011113928_redo_remove_and_add_ci_job_variables_raw_with_new_default.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-# frozen_string_literal: true
-
-class RedoRemoveAndAddCiJobVariablesRawWithNewDefault < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- # We are removing and adding the same column with the same parameters to refresh the table
- # because we have some wrong `ci_job_variables.raw` data (`TRUE`) in the database.
- def change
- remove_column :ci_job_variables, :raw, :boolean, null: false, default: false
- add_column :ci_job_variables, :raw, :boolean, null: false, default: false
- end
-end
diff --git a/db/post_migrate/20221012182701_remove_namespace_settings_cohort_free_user_cap_columns.rb b/db/post_migrate/20221012182701_remove_namespace_settings_cohort_free_user_cap_columns.rb
deleted file mode 100644
index 36408ad19ed..00000000000
--- a/db/post_migrate/20221012182701_remove_namespace_settings_cohort_free_user_cap_columns.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveNamespaceSettingsCohortFreeUserCapColumns < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def up
- remove_column :namespace_settings, :exclude_from_free_user_cap
- remove_column :namespace_settings, :include_for_free_user_cap_preview
- end
-
- def down
- add_column :namespace_settings, :exclude_from_free_user_cap, :boolean, null: false, default: false
- add_column :namespace_settings, :include_for_free_user_cap_preview, :boolean, null: false, default: false
- end
-end
diff --git a/db/post_migrate/20221013154159_update_invalid_dormant_user_setting.rb b/db/post_migrate/20221013154159_update_invalid_dormant_user_setting.rb
deleted file mode 100644
index 1f1e47fdac1..00000000000
--- a/db/post_migrate/20221013154159_update_invalid_dormant_user_setting.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class UpdateInvalidDormantUserSetting < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- # rubocop:disable Layout/LineLength
- def up
- execute("update application_settings set deactivate_dormant_users_period=90 where deactivate_dormant_users_period < 90")
- end
- # rubocop:enable Layout/LineLength
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20221013215832_cleanup_vulnerability_state_transitions_with_same_from_state_to_state.rb b/db/post_migrate/20221013215832_cleanup_vulnerability_state_transitions_with_same_from_state_to_state.rb
deleted file mode 100644
index a81a80deb25..00000000000
--- a/db/post_migrate/20221013215832_cleanup_vulnerability_state_transitions_with_same_from_state_to_state.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class CleanupVulnerabilityStateTransitionsWithSameFromStateToState < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- class VulnerabilityStateTransition < MigrationRecord
- self.table_name = 'vulnerability_state_transitions'
- end
-
- def up
- VulnerabilityStateTransition.where('from_state = to_state').delete_all
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20221017084227_cleanup_rename_ci_pipeline_metadata_title.rb b/db/post_migrate/20221017084227_cleanup_rename_ci_pipeline_metadata_title.rb
deleted file mode 100644
index 0829f3d8734..00000000000
--- a/db/post_migrate/20221017084227_cleanup_rename_ci_pipeline_metadata_title.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class CleanupRenameCiPipelineMetadataTitle < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- cleanup_concurrent_column_rename :ci_pipeline_metadata, :title, :name
- end
-
- def down
- undo_cleanup_concurrent_column_rename :ci_pipeline_metadata, :title, :name, batch_column_name: :pipeline_id
- end
-end
diff --git a/db/post_migrate/20221018062308_schedule_backfill_project_namespace_details.rb b/db/post_migrate/20221018062308_schedule_backfill_project_namespace_details.rb
deleted file mode 100644
index 74c8ef37ac2..00000000000
--- a/db/post_migrate/20221018062308_schedule_backfill_project_namespace_details.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleBackfillProjectNamespaceDetails < Gitlab::Database::Migration[2.0]
- MIGRATION = 'BackfillProjectNamespaceDetails'
- INTERVAL = 2.minutes
- BATCH_SIZE = 1_000
- MAX_BATCH_SIZE = 10_000
- SUB_BATCH_SIZE = 200
-
- disable_ddl_transaction!
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- queue_batched_background_migration(
- MIGRATION,
- :projects,
- :id,
- job_interval: INTERVAL,
- batch_size: BATCH_SIZE,
- max_batch_size: MAX_BATCH_SIZE,
- sub_batch_size: SUB_BATCH_SIZE
- )
- end
-
- def down
- delete_batched_background_migration(MIGRATION, :projects, :id, [])
- end
-end
diff --git a/db/post_migrate/20221018193635_ensure_task_note_renaming_background_migration_finished.rb b/db/post_migrate/20221018193635_ensure_task_note_renaming_background_migration_finished.rb
deleted file mode 100644
index c6ae0f185d8..00000000000
--- a/db/post_migrate/20221018193635_ensure_task_note_renaming_background_migration_finished.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class EnsureTaskNoteRenamingBackgroundMigrationFinished < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- MIGRATION = 'RenameTaskSystemNoteToChecklistItem'
-
- def up
- ensure_batched_background_migration_is_finished(
- job_class_name: MIGRATION,
- table_name: :system_note_metadata,
- column_name: :id,
- job_arguments: []
- )
- end
-
- def down
- # noop
- end
-end
diff --git a/db/post_migrate/20221018193827_drop_tmp_index_system_note_metadata_on_id_where_task.rb b/db/post_migrate/20221018193827_drop_tmp_index_system_note_metadata_on_id_where_task.rb
deleted file mode 100644
index 5cc70c530c6..00000000000
--- a/db/post_migrate/20221018193827_drop_tmp_index_system_note_metadata_on_id_where_task.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class DropTmpIndexSystemNoteMetadataOnIdWhereTask < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'tmp_index_system_note_metadata_on_id_where_task'
-
- def up
- remove_concurrent_index_by_name :system_note_metadata, INDEX_NAME
- end
-
- def down
- add_concurrent_index :system_note_metadata, [:id, :action], where: "action = 'task'", name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20221018232820_add_temp_index_for_user_details_fields.rb b/db/post_migrate/20221018232820_add_temp_index_for_user_details_fields.rb
deleted file mode 100644
index 1cb93886ca3..00000000000
--- a/db/post_migrate/20221018232820_add_temp_index_for_user_details_fields.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# frozen_string_literal: true
-
-class AddTempIndexForUserDetailsFields < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'tmp_idx_where_user_details_fields_filled'
-
- disable_ddl_transaction!
-
- def up
- # rubocop:disable Migration/PreventIndexCreation
- add_concurrent_index :users, :id, name: INDEX_NAME, where: <<~QUERY
- (COALESCE(linkedin, '') IS DISTINCT FROM '')
- OR (COALESCE(twitter, '') IS DISTINCT FROM '')
- OR (COALESCE(skype, '') IS DISTINCT FROM '')
- OR (COALESCE(website_url, '') IS DISTINCT FROM '')
- OR (COALESCE(location, '') IS DISTINCT FROM '')
- OR (COALESCE(organization, '') IS DISTINCT FROM '')
- QUERY
- # rubocop:enable Migration/PreventIndexCreation
- end
-
- def down
- remove_concurrent_index_by_name :users, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20221019002459_queue_backfill_user_details_fields.rb b/db/post_migrate/20221019002459_queue_backfill_user_details_fields.rb
deleted file mode 100644
index 8ed4416a98d..00000000000
--- a/db/post_migrate/20221019002459_queue_backfill_user_details_fields.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class QueueBackfillUserDetailsFields < Gitlab::Database::Migration[2.0]
- MIGRATION = 'BackfillUserDetailsFields'
- INTERVAL = 2.minutes
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- queue_batched_background_migration(MIGRATION, :users, :id, job_interval: INTERVAL)
- end
-
- def down
- delete_batched_background_migration(MIGRATION, :users, :id, [])
- end
-end
diff --git a/db/post_migrate/20221019102426_remove_tmp_index_approval_merge_request_rules_on_report_type.rb b/db/post_migrate/20221019102426_remove_tmp_index_approval_merge_request_rules_on_report_type.rb
deleted file mode 100644
index 7203d35de92..00000000000
--- a/db/post_migrate/20221019102426_remove_tmp_index_approval_merge_request_rules_on_report_type.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveTmpIndexApprovalMergeRequestRulesOnReportType < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'tmp_index_approval_merge_request_rules_on_report_type_equal_one'
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :approval_merge_request_rules, INDEX_NAME
- end
-
- def down
- add_concurrent_index :approval_merge_request_rules,
- [:id, :report_type],
- name: INDEX_NAME,
- where: "report_type = 1"
- end
-end
diff --git a/db/post_migrate/20221019105041_queue_populate_projects_star_count.rb b/db/post_migrate/20221019105041_queue_populate_projects_star_count.rb
deleted file mode 100644
index 768e0c7826f..00000000000
--- a/db/post_migrate/20221019105041_queue_populate_projects_star_count.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class QueuePopulateProjectsStarCount < Gitlab::Database::Migration[2.0]
- MIGRATION = 'PopulateProjectsStarCount'
- DELAY_INTERVAL = 2.minutes
-
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- queue_batched_background_migration(
- MIGRATION,
- :projects,
- :id,
- job_interval: DELAY_INTERVAL,
- sub_batch_size: 50
- )
- end
-
- def down
- delete_batched_background_migration(MIGRATION, :projects, :id, [])
- end
-end
diff --git a/db/post_migrate/20221019141508_add_index_to_test_reports_issue_id_created_at_and_id.rb b/db/post_migrate/20221019141508_add_index_to_test_reports_issue_id_created_at_and_id.rb
deleted file mode 100644
index 054512adf2e..00000000000
--- a/db/post_migrate/20221019141508_add_index_to_test_reports_issue_id_created_at_and_id.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexToTestReportsIssueIdCreatedAtAndId < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- TABLE_NAME = 'requirements_management_test_reports'
- INDEX_NAME = 'idx_test_reports_on_issue_id_created_at_and_id'
-
- def up
- add_concurrent_index TABLE_NAME, [:issue_id, :created_at, :id], name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20221019194751_disable_fastupdate_on_issues_title_gin_index.rb b/db/post_migrate/20221019194751_disable_fastupdate_on_issues_title_gin_index.rb
deleted file mode 100644
index 64d935489c2..00000000000
--- a/db/post_migrate/20221019194751_disable_fastupdate_on_issues_title_gin_index.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-class DisableFastupdateOnIssuesTitleGinIndex < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_issues_on_title_trigram'
-
- def up
- return unless index_exists_by_name?(:issues, INDEX_NAME)
-
- with_lock_retries do
- execute <<~SQL
- ALTER INDEX #{INDEX_NAME} SET ( fastupdate = false ) ;
- SQL
- end
- end
-
- def down
- return unless index_exists_by_name?(:issues, INDEX_NAME)
-
- with_lock_retries do
- execute <<~SQL
- ALTER INDEX #{INDEX_NAME} RESET ( fastupdate ) ;
- SQL
- end
- end
-end
diff --git a/db/post_migrate/20221019195754_disable_fastupdate_on_issues_description_gin_index.rb b/db/post_migrate/20221019195754_disable_fastupdate_on_issues_description_gin_index.rb
deleted file mode 100644
index 8822cb3b414..00000000000
--- a/db/post_migrate/20221019195754_disable_fastupdate_on_issues_description_gin_index.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-class DisableFastupdateOnIssuesDescriptionGinIndex < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_issues_on_description_trigram'
-
- def up
- return unless index_exists_by_name?(:issues, INDEX_NAME)
-
- with_lock_retries do
- execute <<~SQL
- ALTER INDEX #{INDEX_NAME} SET ( fastupdate = false ) ;
- SQL
- end
- end
-
- def down
- return unless index_exists_by_name?(:issues, INDEX_NAME)
-
- with_lock_retries do
- execute <<~SQL
- ALTER INDEX #{INDEX_NAME} RESET ( fastupdate ) ;
- SQL
- end
- end
-end
diff --git a/db/post_migrate/20221019200033_disable_fastupdate_on_merge_requests_title_gin_index.rb b/db/post_migrate/20221019200033_disable_fastupdate_on_merge_requests_title_gin_index.rb
deleted file mode 100644
index 3e1124dc2bb..00000000000
--- a/db/post_migrate/20221019200033_disable_fastupdate_on_merge_requests_title_gin_index.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-class DisableFastupdateOnMergeRequestsTitleGinIndex < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_merge_requests_on_title_trigram'
-
- def up
- return unless index_exists_by_name?(:merge_requests, INDEX_NAME)
-
- with_lock_retries do
- execute <<~SQL
- ALTER INDEX #{INDEX_NAME} SET ( fastupdate = false ) ;
- SQL
- end
- end
-
- def down
- return unless index_exists_by_name?(:merge_requests, INDEX_NAME)
-
- with_lock_retries do
- execute <<~SQL
- ALTER INDEX #{INDEX_NAME} RESET ( fastupdate ) ;
- SQL
- end
- end
-end
diff --git a/db/post_migrate/20221019200206_disable_fastupdate_on_merge_requests_description_gin_index.rb b/db/post_migrate/20221019200206_disable_fastupdate_on_merge_requests_description_gin_index.rb
deleted file mode 100644
index 7ab6f40e206..00000000000
--- a/db/post_migrate/20221019200206_disable_fastupdate_on_merge_requests_description_gin_index.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-class DisableFastupdateOnMergeRequestsDescriptionGinIndex < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_merge_requests_on_description_trigram'
-
- def up
- return unless index_exists_by_name?(:merge_requests, INDEX_NAME)
-
- with_lock_retries do
- execute <<~SQL
- ALTER INDEX #{INDEX_NAME} SET ( fastupdate = false ) ;
- SQL
- end
- end
-
- def down
- return unless index_exists_by_name?(:merge_requests, INDEX_NAME)
-
- with_lock_retries do
- execute <<~SQL
- ALTER INDEX #{INDEX_NAME} RESET ( fastupdate ) ;
- SQL
- end
- end
-end
diff --git a/db/post_migrate/20221021082720_drop_index_on_ci_runners_token.rb b/db/post_migrate/20221021082720_drop_index_on_ci_runners_token.rb
deleted file mode 100644
index 9125831fbf3..00000000000
--- a/db/post_migrate/20221021082720_drop_index_on_ci_runners_token.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class DropIndexOnCiRunnersToken < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_ci_runners_on_token'
-
- def up
- remove_concurrent_index_by_name :ci_runners, INDEX_NAME
- end
-
- def down
- add_concurrent_index :ci_runners,
- :token,
- name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20221021082734_drop_index_on_ci_runners_token_encrypted.rb b/db/post_migrate/20221021082734_drop_index_on_ci_runners_token_encrypted.rb
deleted file mode 100644
index 39771fb5f85..00000000000
--- a/db/post_migrate/20221021082734_drop_index_on_ci_runners_token_encrypted.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class DropIndexOnCiRunnersTokenEncrypted < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_ci_runners_on_token_encrypted'
-
- def up
- remove_concurrent_index_by_name :ci_runners, INDEX_NAME
- end
-
- def down
- add_concurrent_index :ci_runners,
- :token_encrypted,
- name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20221021145820_create_routing_table_for_builds_metadata_v2.rb b/db/post_migrate/20221021145820_create_routing_table_for_builds_metadata_v2.rb
deleted file mode 100644
index e5f1ba5cb87..00000000000
--- a/db/post_migrate/20221021145820_create_routing_table_for_builds_metadata_v2.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-# frozen_string_literal: true
-
-class CreateRoutingTableForBuildsMetadataV2 < Gitlab::Database::Migration[2.0]
- include Gitlab::Database::PartitioningMigrationHelpers::TableManagementHelpers
-
- disable_ddl_transaction!
-
- TABLE_NAME = :ci_builds_metadata
- PARENT_TABLE_NAME = :p_ci_builds_metadata
- FIRST_PARTITION = 100
- PARTITION_COLUMN = :partition_id
-
- def up
- return if connection.table_exists?(PARENT_TABLE_NAME) && partition_attached?
-
- convert_table_to_first_list_partition(
- table_name: TABLE_NAME,
- partitioning_column: PARTITION_COLUMN,
- parent_table_name: PARENT_TABLE_NAME,
- initial_partitioning_value: FIRST_PARTITION,
- lock_tables: [:ci_builds, :ci_builds_metadata]
- )
- end
-
- def down
- revert_converting_table_to_first_list_partition(
- table_name: TABLE_NAME,
- partitioning_column: PARTITION_COLUMN,
- parent_table_name: PARENT_TABLE_NAME,
- initial_partitioning_value: FIRST_PARTITION
- )
- end
-
- private
-
- def partition_attached?
- connection.select_value(<<~SQL)
- SELECT true FROM postgres_partitions WHERE name = '#{TABLE_NAME}';
- SQL
- end
-end
diff --git a/db/post_migrate/20221021160735_add_index_for_common_finder_query_desc_with_namespace_id.rb b/db/post_migrate/20221021160735_add_index_for_common_finder_query_desc_with_namespace_id.rb
deleted file mode 100644
index d7c50010b72..00000000000
--- a/db/post_migrate/20221021160735_add_index_for_common_finder_query_desc_with_namespace_id.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexForCommonFinderQueryDescWithNamespaceId < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_group_vulnerability_reads_common_finder_query_desc'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :vulnerability_reads,
- [:namespace_id, :state, :report_type, :severity, :vulnerability_id],
- name: INDEX_NAME,
- order: { severity: :desc, vulnerability_id: :desc }
- end
-
- def down
- remove_concurrent_index_by_name :vulnerability_reads, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20221024034228_remove_sprints_project_id_column.rb b/db/post_migrate/20221024034228_remove_sprints_project_id_column.rb
deleted file mode 100644
index e30d6dce497..00000000000
--- a/db/post_migrate/20221024034228_remove_sprints_project_id_column.rb
+++ /dev/null
@@ -1,38 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveSprintsProjectIdColumn < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- DATERANGE_CONSTRAINT_NAME = 'iteration_start_and_due_daterange_project_id_constraint'
-
- def up
- with_lock_retries do
- remove_column :sprints, :project_id, :bigint if column_exists?(:sprints, :project_id)
- end
- end
-
- def down
- with_lock_retries do
- add_column :sprints, :project_id, :bigint unless column_exists?(:sprints, :project_id)
- end
-
- with_lock_retries do
- next if check_constraint_exists?(:sprints, DATERANGE_CONSTRAINT_NAME)
-
- execute(<<~SQL)
- ALTER TABLE sprints
- ADD CONSTRAINT #{DATERANGE_CONSTRAINT_NAME}
- EXCLUDE USING gist (project_id WITH =, daterange(start_date, due_date, '[]'::text) WITH &&)
- WHERE (project_id IS NOT NULL)
- SQL
- end
-
- add_check_constraint(:sprints,
- 'project_id <> NULL::bigint AND group_id IS NULL OR group_id <> NULL::bigint AND project_id IS NULL',
- 'sprints_must_belong_to_project_or_group')
-
- add_concurrent_index :sprints, [:project_id, :iid], unique: true, name: 'index_sprints_on_project_id_and_iid'
-
- add_concurrent_foreign_key :sprints, :projects, column: :project_id, on_delete: :cascade
- end
-end
diff --git a/db/post_migrate/20221024121500_drop_fingerprint_from_sbom_sources.rb b/db/post_migrate/20221024121500_drop_fingerprint_from_sbom_sources.rb
deleted file mode 100644
index 83856cbe5dd..00000000000
--- a/db/post_migrate/20221024121500_drop_fingerprint_from_sbom_sources.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class DropFingerprintFromSbomSources < Gitlab::Database::Migration[2.0]
- enable_lock_retries!
-
- def change
- remove_column :sbom_sources, :fingerprint, :bytea
- end
-end
diff --git a/db/post_migrate/20221025115006_check_vulnerabilities_state_transition_from_state_not_equal_to_state.rb b/db/post_migrate/20221025115006_check_vulnerabilities_state_transition_from_state_not_equal_to_state.rb
deleted file mode 100644
index 2ab7f8a9c04..00000000000
--- a/db/post_migrate/20221025115006_check_vulnerabilities_state_transition_from_state_not_equal_to_state.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class CheckVulnerabilitiesStateTransitionFromStateNotEqualToState < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_check_constraint(:vulnerability_state_transitions, '(from_state != to_state)', constraint_name)
- end
-
- def down
- remove_check_constraint(:vulnerability_state_transitions, constraint_name)
- end
-
- private
-
- def constraint_name
- check_constraint_name('vulnerability_state_transitions', 'fully_qualified_table_name', 'state_not_equal')
- end
-end
diff --git a/db/post_migrate/20221025220607_add_index_id_on_scan_finding_approval_merge_request_rules.rb b/db/post_migrate/20221025220607_add_index_id_on_scan_finding_approval_merge_request_rules.rb
deleted file mode 100644
index 4e72e7f95ec..00000000000
--- a/db/post_migrate/20221025220607_add_index_id_on_scan_finding_approval_merge_request_rules.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexIdOnScanFindingApprovalMergeRequestRules < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'scan_finding_approval_mr_rule_index_id'
- SCAN_FINDING_REPORT_TYPE = 4
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :approval_merge_request_rules, :id,
- where: "report_type = #{SCAN_FINDING_REPORT_TYPE}", name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :approval_merge_request_rules, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20221027203556_delete_experiment_user_foreign_keys.rb b/db/post_migrate/20221027203556_delete_experiment_user_foreign_keys.rb
deleted file mode 100644
index 564dc3d4899..00000000000
--- a/db/post_migrate/20221027203556_delete_experiment_user_foreign_keys.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class DeleteExperimentUserForeignKeys < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- remove_foreign_key_if_exists :experiment_users, :experiments, name: 'fk_rails_56d4708b4a'
- end
-
- with_lock_retries do
- remove_foreign_key_if_exists :experiment_users, :users, name: 'fk_rails_fd805f771a'
- end
- end
-
- def down
- add_concurrent_foreign_key :experiment_users, :experiments, column: :experiment_id, name: 'fk_rails_56d4708b4a'
- add_concurrent_foreign_key :experiment_users, :users, column: :user_id, name: 'fk_rails_fd805f771a'
- end
-end
diff --git a/db/post_migrate/20221027203951_drop_experiment_users_table.rb b/db/post_migrate/20221027203951_drop_experiment_users_table.rb
deleted file mode 100644
index 838a9605740..00000000000
--- a/db/post_migrate/20221027203951_drop_experiment_users_table.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-class DropExperimentUsersTable < Gitlab::Database::Migration[2.0]
- def up
- drop_table :experiment_users
- end
-
- def down
- create_table :experiment_users do |t|
- t.bigint :experiment_id, null: false
- t.bigint :user_id, null: false
- t.integer :group_type, limit: 2, null: false, default: 0
- t.timestamps_with_timezone null: false
- t.datetime_with_timezone :converted_at
- t.jsonb :context, null: false, default: {}
- end
-
- add_index :experiment_users, :experiment_id
- add_index :experiment_users, :user_id
- end
-end
diff --git a/db/post_migrate/20221028000041_remove_invalid_partial_trigram_indexes_for_issues.rb b/db/post_migrate/20221028000041_remove_invalid_partial_trigram_indexes_for_issues.rb
deleted file mode 100644
index 9b46647047a..00000000000
--- a/db/post_migrate/20221028000041_remove_invalid_partial_trigram_indexes_for_issues.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveInvalidPartialTrigramIndexesForIssues < Gitlab::Database::Migration[2.0]
- TITLE_INDEX_NAME = 'index_issues_on_title_trigram_non_latin'
- DESCRIPTION_INDEX_NAME = 'index_issues_on_description_trigram_non_latin'
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :issues, TITLE_INDEX_NAME
- remove_concurrent_index_by_name :issues, DESCRIPTION_INDEX_NAME
- end
-
- def down; end
-end
diff --git a/db/post_migrate/20221028000603_prepare_partial_trigram_indexes_for_issues_attempt_3.rb b/db/post_migrate/20221028000603_prepare_partial_trigram_indexes_for_issues_attempt_3.rb
deleted file mode 100644
index 199a7a22d5b..00000000000
--- a/db/post_migrate/20221028000603_prepare_partial_trigram_indexes_for_issues_attempt_3.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# frozen_string_literal: true
-
-class PreparePartialTrigramIndexesForIssuesAttempt3 < Gitlab::Database::Migration[2.0]
- TITLE_INDEX_NAME = 'index_issues_on_title_trigram_non_latin'
- DESCRIPTION_INDEX_NAME = 'index_issues_on_description_trigram_non_latin'
-
- def up
- prepare_async_index :issues, :title,
- name: TITLE_INDEX_NAME,
- using: :gin, opclass: { description: :gin_trgm_ops },
- where: "title NOT SIMILAR TO '[\\u0000-\\u02FF\\u1E00-\\u1EFF\\u2070-\\u218F]*' " \
- "OR description NOT SIMILAR TO '[\\u0000-\\u02FF\\u1E00-\\u1EFF\\u2070-\\u218F]*'"
-
- prepare_async_index :issues, :description,
- name: DESCRIPTION_INDEX_NAME,
- using: :gin, opclass: { description: :gin_trgm_ops },
- where: "title NOT SIMILAR TO '[\\u0000-\\u02FF\\u1E00-\\u1EFF\\u2070-\\u218F]*' " \
- "OR description NOT SIMILAR TO '[\\u0000-\\u02FF\\u1E00-\\u1EFF\\u2070-\\u218F]*'"
- end
-
- def down
- unprepare_async_index_by_name :issues, DESCRIPTION_INDEX_NAME
- unprepare_async_index_by_name :issues, TITLE_INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20221028022627_add_index_on_password_last_changed_at_to_user_details.rb b/db/post_migrate/20221028022627_add_index_on_password_last_changed_at_to_user_details.rb
deleted file mode 100644
index 8314767ade1..00000000000
--- a/db/post_migrate/20221028022627_add_index_on_password_last_changed_at_to_user_details.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexOnPasswordLastChangedAtToUserDetails < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_user_details_on_password_last_changed_at'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :user_details, :password_last_changed_at, name: INDEX_NAME, comment: 'JiHu-specific index'
- end
-
- def down
- remove_concurrent_index_by_name :user_details, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20221102090940_create_next_ci_partitions_record.rb b/db/post_migrate/20221102090940_create_next_ci_partitions_record.rb
deleted file mode 100644
index 4bd89a70daa..00000000000
--- a/db/post_migrate/20221102090940_create_next_ci_partitions_record.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-class CreateNextCiPartitionsRecord < Gitlab::Database::Migration[2.0]
- NEXT_PARTITION_ID = 101
-
- disable_ddl_transaction!
- restrict_gitlab_migration gitlab_schema: :gitlab_ci
-
- def up
- return unless Gitlab.com?
-
- execute(<<~SQL)
- INSERT INTO "ci_partitions" ("id", "created_at", "updated_at")
- VALUES (#{NEXT_PARTITION_ID}, now(), now())
- ON CONFLICT DO NOTHING;
- SQL
-
- reset_pk_sequence!('ci_partitions')
- end
-
- def down
- return unless Gitlab.com?
-
- execute(<<~SQL)
- DELETE FROM "ci_partitions"
- WHERE "ci_partitions"."id" = #{NEXT_PARTITION_ID};
- SQL
- end
-end
diff --git a/db/post_migrate/20221102090943_create_second_partition_for_builds_metadata.rb b/db/post_migrate/20221102090943_create_second_partition_for_builds_metadata.rb
deleted file mode 100644
index 6923e6f6cba..00000000000
--- a/db/post_migrate/20221102090943_create_second_partition_for_builds_metadata.rb
+++ /dev/null
@@ -1,62 +0,0 @@
-# frozen_string_literal: true
-
-class CreateSecondPartitionForBuildsMetadata < Gitlab::Database::Migration[2.0]
- TABLE_NAME = 'p_ci_builds_metadata'
- BUILDS_TABLE = 'ci_builds'
- NEXT_PARTITION_ID = 101
- PARTITION_NAME = 'gitlab_partitions_dynamic.ci_builds_metadata_101'
-
- disable_ddl_transaction!
-
- def up
- return unless Gitlab.com?
-
- with_lock_retries(**lock_args) do
- connection.execute(<<~SQL)
- LOCK TABLE #{BUILDS_TABLE} IN SHARE UPDATE EXCLUSIVE MODE;
- LOCK TABLE ONLY #{TABLE_NAME} IN ACCESS EXCLUSIVE MODE;
- SQL
-
- connection.execute(<<~SQL)
- CREATE TABLE IF NOT EXISTS #{PARTITION_NAME}
- PARTITION OF #{TABLE_NAME}
- FOR VALUES IN (#{NEXT_PARTITION_ID});
- SQL
- end
- end
-
- def down
- return unless Gitlab.com?
- return unless table_exists?(PARTITION_NAME)
-
- with_lock_retries(**lock_args) do
- connection.execute(<<~SQL)
- LOCK TABLE #{BUILDS_TABLE}, #{TABLE_NAME}, #{PARTITION_NAME} IN ACCESS EXCLUSIVE MODE;
- SQL
-
- connection.execute(<<~SQL)
- ALTER TABLE #{TABLE_NAME} DETACH PARTITION #{PARTITION_NAME};
- SQL
-
- connection.execute(<<~SQL)
- DROP TABLE IF EXISTS #{PARTITION_NAME} CASCADE;
- SQL
- end
- end
-
- private
-
- def lock_args
- {
- raise_on_exhaustion: true,
- timing_configuration: lock_timing_configuration
- }
- end
-
- def lock_timing_configuration
- iterations = Gitlab::Database::WithLockRetries::DEFAULT_TIMING_CONFIGURATION
- aggressive_iterations = Array.new(5) { [10.seconds, 1.minute] }
-
- iterations + aggressive_iterations
- end
-end
diff --git a/db/post_migrate/20221103073328_change_member_namespace_id_not_null.rb b/db/post_migrate/20221103073328_change_member_namespace_id_not_null.rb
deleted file mode 100644
index 19f6732d297..00000000000
--- a/db/post_migrate/20221103073328_change_member_namespace_id_not_null.rb
+++ /dev/null
@@ -1,16 +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 ChangeMemberNamespaceIdNotNull < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- add_not_null_constraint :members, :member_namespace_id, validate: false
- end
-
- def down
- remove_not_null_constraint :members, :member_namespace_id
- end
-end
diff --git a/db/post_migrate/20221103084213_remove_tmp_index_members_on_id_where_namespace_id_null.rb b/db/post_migrate/20221103084213_remove_tmp_index_members_on_id_where_namespace_id_null.rb
deleted file mode 100644
index 07908e697f5..00000000000
--- a/db/post_migrate/20221103084213_remove_tmp_index_members_on_id_where_namespace_id_null.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveTmpIndexMembersOnIdWhereNamespaceIdNull < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'tmp_index_members_on_id_where_namespace_id_null'
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :members, INDEX_NAME
- end
-
- def down
- add_concurrent_index :members, :id, name: INDEX_NAME, where: 'member_namespace_id IS NULL'
- end
-end
diff --git a/db/post_migrate/20221103150250_migrate_sidekiq_queued_jobs.rb b/db/post_migrate/20221103150250_migrate_sidekiq_queued_jobs.rb
deleted file mode 100644
index 1934711f9ef..00000000000
--- a/db/post_migrate/20221103150250_migrate_sidekiq_queued_jobs.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class MigrateSidekiqQueuedJobs < Gitlab::Database::Migration[2.0]
- def up
- # no-op because of https://gitlab.com/gitlab-com/gl-infra/scalability/-/issues/1991
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20221104042137_add_partial_trigram_index_for_issue_title_attempt_2.rb b/db/post_migrate/20221104042137_add_partial_trigram_index_for_issue_title_attempt_2.rb
deleted file mode 100644
index 24204577959..00000000000
--- a/db/post_migrate/20221104042137_add_partial_trigram_index_for_issue_title_attempt_2.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class AddPartialTrigramIndexForIssueTitleAttempt2 < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_issues_on_title_trigram_non_latin'
-
- def up
- add_concurrent_index :issues, :title,
- name: INDEX_NAME,
- using: :gin, opclass: { description: :gin_trgm_ops },
- where: "title NOT SIMILAR TO '[\\u0000-\\u02FF\\u1E00-\\u1EFF\\u2070-\\u218F]*' " \
- "OR description NOT SIMILAR TO '[\\u0000-\\u02FF\\u1E00-\\u1EFF\\u2070-\\u218F]*'"
- end
-
- def down
- remove_concurrent_index_by_name :issues, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20221104042159_add_partial_trigram_index_for_issue_description_attempt_2.rb b/db/post_migrate/20221104042159_add_partial_trigram_index_for_issue_description_attempt_2.rb
deleted file mode 100644
index 36b595d1067..00000000000
--- a/db/post_migrate/20221104042159_add_partial_trigram_index_for_issue_description_attempt_2.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class AddPartialTrigramIndexForIssueDescriptionAttempt2 < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_issues_on_description_trigram_non_latin'
-
- def up
- add_concurrent_index :issues, :description,
- name: INDEX_NAME,
- using: :gin, opclass: { description: :gin_trgm_ops },
- where: "title NOT SIMILAR TO '[\\u0000-\\u02FF\\u1E00-\\u1EFF\\u2070-\\u218F]*' " \
- "OR description NOT SIMILAR TO '[\\u0000-\\u02FF\\u1E00-\\u1EFF\\u2070-\\u218F]*'"
- end
-
- def down
- remove_concurrent_index_by_name :issues, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20221104074652_add_temp_index_for_project_statistics_upload_size_migration.rb b/db/post_migrate/20221104074652_add_temp_index_for_project_statistics_upload_size_migration.rb
deleted file mode 100644
index b6ee636fa9b..00000000000
--- a/db/post_migrate/20221104074652_add_temp_index_for_project_statistics_upload_size_migration.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class AddTempIndexForProjectStatisticsUploadSizeMigration < Gitlab::Database::Migration[2.0]
- INDEX_PROJECT_STATSISTICS_UPLOADS_SIZE = 'tmp_index_project_statistics_uploads_size'
-
- disable_ddl_transaction!
-
- def up
- # Temporary index is to be used to trigger refresh for all project_statistics with
- # upload_size <> 0
- add_concurrent_index :project_statistics, [:project_id],
- name: INDEX_PROJECT_STATSISTICS_UPLOADS_SIZE,
- where: "uploads_size <> 0"
- end
-
- def down
- remove_concurrent_index_by_name :project_statistics, INDEX_PROJECT_STATSISTICS_UPLOADS_SIZE
- end
-end
diff --git a/db/post_migrate/20221104100203_recreate_async_trigram_index_for_vulnerability_reads_container_images.rb b/db/post_migrate/20221104100203_recreate_async_trigram_index_for_vulnerability_reads_container_images.rb
deleted file mode 100644
index ea2914f4dc4..00000000000
--- a/db/post_migrate/20221104100203_recreate_async_trigram_index_for_vulnerability_reads_container_images.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-class RecreateAsyncTrigramIndexForVulnerabilityReadsContainerImages < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_vulnerability_reads_on_location_image_trigram'
- REPORT_TYPES = { container_scanning: 2, cluster_image_scanning: 7 }.freeze
-
- def up
- remove_concurrent_index_by_name :vulnerability_reads, INDEX_NAME
-
- prepare_async_index :vulnerability_reads, :location_image,
- name: INDEX_NAME,
- using: :gin, opclass: { location_image: :gin_trgm_ops },
- where: "report_type = ANY (ARRAY[#{REPORT_TYPES.values.join(', ')}]) AND location_image IS NOT NULL"
- end
-
- def down
- unprepare_async_index :vulnerability_reads, :location_image, name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20221104170500_add_vulnerability_reads_all_status_index.rb b/db/post_migrate/20221104170500_add_vulnerability_reads_all_status_index.rb
deleted file mode 100644
index 1dc1921ebaa..00000000000
--- a/db/post_migrate/20221104170500_add_vulnerability_reads_all_status_index.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: true
-class AddVulnerabilityReadsAllStatusIndex < Gitlab::Database::Migration[2.0]
- INDEX_NAME = 'index_vulnerability_reads_on_namespace_type_severity_id'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :vulnerability_reads, %i[namespace_id report_type severity vulnerability_id], name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :vulnerability_reads, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20221104190203_validate_environment_id_on_deployments.rb b/db/post_migrate/20221104190203_validate_environment_id_on_deployments.rb
deleted file mode 100644
index 9546daa3975..00000000000
--- a/db/post_migrate/20221104190203_validate_environment_id_on_deployments.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class ValidateEnvironmentIdOnDeployments < Gitlab::Database::Migration[2.0]
- def up
- validate_foreign_key :deployments, :environment_id
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20221107094359_recount_epic_cache_counts.rb b/db/post_migrate/20221107094359_recount_epic_cache_counts.rb
deleted file mode 100644
index 37ab952edba..00000000000
--- a/db/post_migrate/20221107094359_recount_epic_cache_counts.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-class RecountEpicCacheCounts < Gitlab::Database::Migration[2.0]
- MIGRATION = 'RecountEpicCacheCounts'
- DELAY_INTERVAL = 2.minutes.to_i
- BATCH_SIZE = 200
- MAX_BATCH_SIZE = 1000
- SUB_BATCH_SIZE = 20
-
- disable_ddl_transaction!
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- queue_batched_background_migration(
- MIGRATION,
- :epics,
- :id,
- job_interval: DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- max_batch_size: MAX_BATCH_SIZE,
- sub_batch_size: SUB_BATCH_SIZE,
- gitlab_schema: :gitlab_main
- )
- end
-
- def down
- delete_batched_background_migration(MIGRATION, :epics, :id, [])
- end
-end
diff --git a/db/post_migrate/20221107184758_sync_new_amount_used_for_ci_namespace_monthly_usages.rb b/db/post_migrate/20221107184758_sync_new_amount_used_for_ci_namespace_monthly_usages.rb
deleted file mode 100644
index 9a6014b5c94..00000000000
--- a/db/post_migrate/20221107184758_sync_new_amount_used_for_ci_namespace_monthly_usages.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class SyncNewAmountUsedForCiNamespaceMonthlyUsages < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_ci
-
- def up
- namespace_usages = define_batchable_model('ci_namespace_monthly_usages')
-
- namespace_usages.each_batch(of: 500) do |batch|
- batch.where('amount_used > 0').update_all('new_amount_used = amount_used')
- end
- end
-
- def down
- # Non reversible migration.
- # This data migration keeps `new_amount_used` in sync with the old `amount_used`.
- # In case of failure or interruption the migration can be retried.
- end
-end
diff --git a/db/post_migrate/20221107220420_validate_not_null_constraint_on_member_namespace_id.rb b/db/post_migrate/20221107220420_validate_not_null_constraint_on_member_namespace_id.rb
deleted file mode 100644
index 48da0c1fd09..00000000000
--- a/db/post_migrate/20221107220420_validate_not_null_constraint_on_member_namespace_id.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class ValidateNotNullConstraintOnMemberNamespaceId < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- CONSTRAINT_NAME = 'check_508774aac0'
-
- def up
- validate_not_null_constraint :members, :member_namespace_id, constraint_name: CONSTRAINT_NAME
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20221107220526_validate_fk_member_namespace_id.rb b/db/post_migrate/20221107220526_validate_fk_member_namespace_id.rb
deleted file mode 100644
index f78dc5a36fd..00000000000
--- a/db/post_migrate/20221107220526_validate_fk_member_namespace_id.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class ValidateFkMemberNamespaceId < Gitlab::Database::Migration[2.0]
- CONSTRAINT_NAME = 'fk_2f85abf8f1'
-
- def up
- validate_foreign_key :members, :member_namespace_id, name: CONSTRAINT_NAME
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20221107222213_remove_old_member_namespace_id_fk.rb b/db/post_migrate/20221107222213_remove_old_member_namespace_id_fk.rb
deleted file mode 100644
index d46fa80336e..00000000000
--- a/db/post_migrate/20221107222213_remove_old_member_namespace_id_fk.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveOldMemberNamespaceIdFk < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- TARGET_COLUMN = :member_namespace_id
-
- def up
- with_lock_retries do
- remove_foreign_key_if_exists(:members, column: TARGET_COLUMN, name: fk_name(TARGET_COLUMN))
- end
- end
-
- def down
- add_concurrent_foreign_key(
- :members,
- :namespaces,
- column: TARGET_COLUMN,
- name: fk_name(TARGET_COLUMN),
- on_delete: :nullify
- )
- end
-
- def fk_name(column_name)
- # generate a FK name
- concurrent_foreign_key_name(:members, column_name)
- end
-end
diff --git a/db/post_migrate/20221108045019_truncate_timeline_event_tags_table.rb b/db/post_migrate/20221108045019_truncate_timeline_event_tags_table.rb
deleted file mode 100644
index a576f9e860f..00000000000
--- a/db/post_migrate/20221108045019_truncate_timeline_event_tags_table.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class TruncateTimelineEventTagsTable < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- def up
- return unless Gitlab::Database.gitlab_schemas_for_connection(connection).include?(:gitlab_main)
-
- execute('TRUNCATE TABLE incident_management_timeline_event_tags, incident_management_timeline_event_tag_links')
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20221108121322_add_supporting_index_for_vulnerabilities_feedback_migration.rb b/db/post_migrate/20221108121322_add_supporting_index_for_vulnerabilities_feedback_migration.rb
deleted file mode 100644
index c77930512d2..00000000000
--- a/db/post_migrate/20221108121322_add_supporting_index_for_vulnerabilities_feedback_migration.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# frozen_string_literal: true
-
-class AddSupportingIndexForVulnerabilitiesFeedbackMigration < Gitlab::Database::Migration[2.0]
- INDEX_NAME = "tmp_idx_for_vulnerability_feedback_migration"
- WHERE_CLAUSE = "migrated_to_state_transition = false AND feedback_type = 0"
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index(
- :vulnerability_feedback,
- %i[migrated_to_state_transition feedback_type],
- where: WHERE_CLAUSE,
- name: INDEX_NAME
- )
- end
-
- def down
- remove_concurrent_index_by_name(
- :vulnerability_feedback,
- INDEX_NAME
- )
- end
-end
diff --git a/db/post_migrate/20221108222015_remove_temp_index_on_project_features_where_releases_access_level_gt_repository.rb b/db/post_migrate/20221108222015_remove_temp_index_on_project_features_where_releases_access_level_gt_repository.rb
deleted file mode 100644
index e7cc6786b4b..00000000000
--- a/db/post_migrate/20221108222015_remove_temp_index_on_project_features_where_releases_access_level_gt_repository.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveTempIndexOnProjectFeaturesWhereReleasesAccessLevelGtRepository < Gitlab::Database::Migration[2.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'tmp_idx_project_features_on_releases_al_and_repo_al_partial'
-
- def up
- remove_concurrent_index_by_name :project_features, INDEX_NAME
- end
-
- def down
- add_concurrent_index :project_features,
- [:releases_access_level, :repository_access_level],
- name: INDEX_NAME,
- where: 'releases_access_level > repository_access_level'
- end
-end
diff --git a/db/post_migrate/20221110045406_sanitize_confidential_note_todos.rb b/db/post_migrate/20221110045406_sanitize_confidential_note_todos.rb
deleted file mode 100644
index d409a4dfdd1..00000000000
--- a/db/post_migrate/20221110045406_sanitize_confidential_note_todos.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class SanitizeConfidentialNoteTodos < Gitlab::Database::Migration[2.0]
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- def up
- # no-op: this empty migration is left here only for compatibility reasons.
- # It was a temporary migration which used not-isolated code.
- # https://gitlab.com/gitlab-org/gitlab/-/issues/382557
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20221111070314_prepare_removal_of_issue_trigram_indexes.rb b/db/post_migrate/20221111070314_prepare_removal_of_issue_trigram_indexes.rb
deleted file mode 100644
index c4cae19497e..00000000000
--- a/db/post_migrate/20221111070314_prepare_removal_of_issue_trigram_indexes.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class PrepareRemovalOfIssueTrigramIndexes < Gitlab::Database::Migration[2.0]
- TITLE_INDEX_NAME = 'index_issues_on_title_trigram'
- DESCRIPTION_INDEX_NAME = 'index_issues_on_description_trigram'
-
- def up
- prepare_async_index_removal :issues, :title, name: TITLE_INDEX_NAME
- prepare_async_index_removal :issues, :description, name: DESCRIPTION_INDEX_NAME
- end
-
- def down
- unprepare_async_index_by_name :issues, DESCRIPTION_INDEX_NAME
- unprepare_async_index_by_name :issues, TITLE_INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20230113003255_remove_atlassian_refresh_token_constraint.rb b/db/post_migrate/20230113003255_remove_atlassian_refresh_token_constraint.rb
index 81c3f10c0f6..7929d4495c0 100644
--- a/db/post_migrate/20230113003255_remove_atlassian_refresh_token_constraint.rb
+++ b/db/post_migrate/20230113003255_remove_atlassian_refresh_token_constraint.rb
@@ -1,8 +1,5 @@
# 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 RemoveAtlassianRefreshTokenConstraint < Gitlab::Database::Migration[2.1]
CONSTRAINT_NAME = 'atlassian_identities_refresh_token_length_constraint'
diff --git a/db/post_migrate/20230113201308_backfill_namespace_ldap_settings.rb b/db/post_migrate/20230113201308_backfill_namespace_ldap_settings.rb
index 19020fecad5..28a600c459f 100644
--- a/db/post_migrate/20230113201308_backfill_namespace_ldap_settings.rb
+++ b/db/post_migrate/20230113201308_backfill_namespace_ldap_settings.rb
@@ -1,8 +1,5 @@
# 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 BackfillNamespaceLdapSettings < Gitlab::Database::Migration[2.1]
restrict_gitlab_migration gitlab_schema: :gitlab_main
disable_ddl_transaction!
diff --git a/db/post_migrate/20230124104310_prepare_web_hook_logs_id_created_at_async_index.rb b/db/post_migrate/20230124104310_prepare_web_hook_logs_id_created_at_async_index.rb
index ea087265c90..d22fda092d3 100644
--- a/db/post_migrate/20230124104310_prepare_web_hook_logs_id_created_at_async_index.rb
+++ b/db/post_migrate/20230124104310_prepare_web_hook_logs_id_created_at_async_index.rb
@@ -1,8 +1,5 @@
# 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 PrepareWebHookLogsIdCreatedAtAsyncIndex < Gitlab::Database::Migration[2.1]
include Gitlab::Database::PartitioningMigrationHelpers
diff --git a/db/post_migrate/20230313150531_reschedule_migration_for_remediation.rb b/db/post_migrate/20230313150531_reschedule_migration_for_remediation.rb
index 01d5c3a79b0..cef9c2338e9 100644
--- a/db/post_migrate/20230313150531_reschedule_migration_for_remediation.rb
+++ b/db/post_migrate/20230313150531_reschedule_migration_for_remediation.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-# rubocop: disable BackgroundMigration/DictionaryFile
+# rubocop:disable BackgroundMigration/DictionaryFile -- MigrateRemediationsForVulnerabilityFindings is rescheduled
class RescheduleMigrationForRemediation < Gitlab::Database::Migration[2.1]
MIGRATION = 'MigrateRemediationsForVulnerabilityFindings'
@@ -29,4 +29,4 @@ class RescheduleMigrationForRemediation < Gitlab::Database::Migration[2.1]
delete_batched_background_migration(MIGRATION, :vulnerability_occurrences, :id, [])
end
end
-# rubocop: enable BackgroundMigration/DictionaryFile
+# rubocop:enable BackgroundMigration/DictionaryFile
diff --git a/db/post_migrate/20230315161408_finalize_set_notifications_bigint_conversion_backfill.rb b/db/post_migrate/20230315161408_finalize_set_notifications_bigint_conversion_backfill.rb
index d4a6d86d9cb..2f83fc15672 100644
--- a/db/post_migrate/20230315161408_finalize_set_notifications_bigint_conversion_backfill.rb
+++ b/db/post_migrate/20230315161408_finalize_set_notifications_bigint_conversion_backfill.rb
@@ -1,8 +1,5 @@
# 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 FinalizeSetNotificationsBigintConversionBackfill < Gitlab::Database::Migration[2.1]
include Gitlab::Database::MigrationHelpers::ConvertToBigint
restrict_gitlab_migration gitlab_schema: :gitlab_main
diff --git a/db/post_migrate/20230328184031_swap_sent_notifications_id_columns.rb b/db/post_migrate/20230328184031_swap_sent_notifications_id_columns.rb
index a2a0751c38a..b6215565b50 100644
--- a/db/post_migrate/20230328184031_swap_sent_notifications_id_columns.rb
+++ b/db/post_migrate/20230328184031_swap_sent_notifications_id_columns.rb
@@ -1,8 +1,5 @@
# 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 SwapSentNotificationsIdColumns < Gitlab::Database::Migration[2.1]
include Gitlab::Database::MigrationHelpers::ConvertToBigint
diff --git a/db/post_migrate/20230404061832_drop_sync_index_ci_job_artifacts_on_expire_at_for_removal.rb b/db/post_migrate/20230404061832_drop_sync_index_ci_job_artifacts_on_expire_at_for_removal.rb
index efa0792c457..491ec0c02d5 100644
--- a/db/post_migrate/20230404061832_drop_sync_index_ci_job_artifacts_on_expire_at_for_removal.rb
+++ b/db/post_migrate/20230404061832_drop_sync_index_ci_job_artifacts_on_expire_at_for_removal.rb
@@ -1,8 +1,5 @@
# 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 DropSyncIndexCiJobArtifactsOnExpireAtForRemoval < Gitlab::Database::Migration[2.1]
INDEX_NAME = 'index_ci_job_artifacts_on_expire_at_for_removal'
CONDITIONS = 'locked = 0 AND expire_at IS NOT NULL'
diff --git a/db/post_migrate/20230405200858_requeue_backfill_project_wiki_repositories.rb b/db/post_migrate/20230405200858_requeue_backfill_project_wiki_repositories.rb
index 6c4792d0d6c..6a67110ce68 100644
--- a/db/post_migrate/20230405200858_requeue_backfill_project_wiki_repositories.rb
+++ b/db/post_migrate/20230405200858_requeue_backfill_project_wiki_repositories.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-# rubocop:disable BackgroundMigration/DictionaryFile
+# rubocop:disable BackgroundMigration/DictionaryFile -- BackfillProjectWikiRepositories is rescheduled
class RequeueBackfillProjectWikiRepositories < Gitlab::Database::Migration[2.1]
MIGRATION = "BackfillProjectWikiRepositories"
DELAY_INTERVAL = 2.minutes
diff --git a/db/post_migrate/20230420065656_finalize_fix_incoherent_packages_size_on_project_statistics.rb b/db/post_migrate/20230420065656_finalize_fix_incoherent_packages_size_on_project_statistics.rb
index aa03310eb0a..8932c52d445 100644
--- a/db/post_migrate/20230420065656_finalize_fix_incoherent_packages_size_on_project_statistics.rb
+++ b/db/post_migrate/20230420065656_finalize_fix_incoherent_packages_size_on_project_statistics.rb
@@ -1,8 +1,5 @@
# 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 FinalizeFixIncoherentPackagesSizeOnProjectStatistics < Gitlab::Database::Migration[2.1]
MIGRATION = 'FixIncoherentPackagesSizeOnProjectStatistics'
disable_ddl_transaction!
diff --git a/db/post_migrate/20230427194552_drop_cycle_analytics_unused_tables.rb b/db/post_migrate/20230427194552_drop_cycle_analytics_unused_tables.rb
index 7c10238a1bc..be3f80389b0 100644
--- a/db/post_migrate/20230427194552_drop_cycle_analytics_unused_tables.rb
+++ b/db/post_migrate/20230427194552_drop_cycle_analytics_unused_tables.rb
@@ -1,8 +1,5 @@
# 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 DropCycleAnalyticsUnusedTables < Gitlab::Database::Migration[2.1]
disable_ddl_transaction!
diff --git a/db/post_migrate/20230501094322_prepare_removal_partial_index_deployments_for_project_id_and_tag.rb b/db/post_migrate/20230501094322_prepare_removal_partial_index_deployments_for_project_id_and_tag.rb
index bbdfb89bb80..1c0edcd5c44 100644
--- a/db/post_migrate/20230501094322_prepare_removal_partial_index_deployments_for_project_id_and_tag.rb
+++ b/db/post_migrate/20230501094322_prepare_removal_partial_index_deployments_for_project_id_and_tag.rb
@@ -1,8 +1,5 @@
# 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 PrepareRemovalPartialIndexDeploymentsForProjectIdAndTag < Gitlab::Database::Migration[2.1]
INDEX_NAME = 'partial_index_deployments_for_project_id_and_tag'
diff --git a/db/post_migrate/20230501180958_drop_clusters_applications_cert_managers.rb b/db/post_migrate/20230501180958_drop_clusters_applications_cert_managers.rb
index 3eb5fc13a2a..0d60a816c02 100644
--- a/db/post_migrate/20230501180958_drop_clusters_applications_cert_managers.rb
+++ b/db/post_migrate/20230501180958_drop_clusters_applications_cert_managers.rb
@@ -1,8 +1,5 @@
# 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 DropClustersApplicationsCertManagers < Gitlab::Database::Migration[2.1]
def up
drop_table :clusters_applications_cert_managers
diff --git a/db/post_migrate/20230502134532_drop_clusters_applications_cilium.rb b/db/post_migrate/20230502134532_drop_clusters_applications_cilium.rb
index 2c7b7d89bf5..e7755c940a5 100644
--- a/db/post_migrate/20230502134532_drop_clusters_applications_cilium.rb
+++ b/db/post_migrate/20230502134532_drop_clusters_applications_cilium.rb
@@ -1,8 +1,5 @@
# 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 DropClustersApplicationsCilium < Gitlab::Database::Migration[2.1]
def up
drop_table :clusters_applications_cilium
diff --git a/db/post_migrate/20230502182754_drop_clusters_applications_crossplane.rb b/db/post_migrate/20230502182754_drop_clusters_applications_crossplane.rb
index 1eeb7770c82..9262f7d9955 100644
--- a/db/post_migrate/20230502182754_drop_clusters_applications_crossplane.rb
+++ b/db/post_migrate/20230502182754_drop_clusters_applications_crossplane.rb
@@ -1,8 +1,5 @@
# 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 DropClustersApplicationsCrossplane < Gitlab::Database::Migration[2.1]
def up
drop_table :clusters_applications_crossplane
diff --git a/db/post_migrate/20230502193525_drop_clusters_applications_helm.rb b/db/post_migrate/20230502193525_drop_clusters_applications_helm.rb
index c435b356e01..2efa53e5b31 100644
--- a/db/post_migrate/20230502193525_drop_clusters_applications_helm.rb
+++ b/db/post_migrate/20230502193525_drop_clusters_applications_helm.rb
@@ -1,8 +1,5 @@
# 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 DropClustersApplicationsHelm < Gitlab::Database::Migration[2.1]
def up
drop_table :clusters_applications_helm
diff --git a/db/post_migrate/20230502201251_drop_clusters_applications_ingress.rb b/db/post_migrate/20230502201251_drop_clusters_applications_ingress.rb
index 3ccc536cb7e..409c9c49b1c 100644
--- a/db/post_migrate/20230502201251_drop_clusters_applications_ingress.rb
+++ b/db/post_migrate/20230502201251_drop_clusters_applications_ingress.rb
@@ -1,8 +1,5 @@
# 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 DropClustersApplicationsIngress < Gitlab::Database::Migration[2.1]
def up
drop_table :clusters_applications_ingress
diff --git a/db/post_migrate/20230503115918_drop_clusters_applications_jupyter.rb b/db/post_migrate/20230503115918_drop_clusters_applications_jupyter.rb
index bd98aa6d19c..35bddba301a 100644
--- a/db/post_migrate/20230503115918_drop_clusters_applications_jupyter.rb
+++ b/db/post_migrate/20230503115918_drop_clusters_applications_jupyter.rb
@@ -1,8 +1,5 @@
# 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 DropClustersApplicationsJupyter < Gitlab::Database::Migration[2.1]
def up
drop_table :clusters_applications_jupyter
diff --git a/db/post_migrate/20230503152349_drop_clusters_applications_knative.rb b/db/post_migrate/20230503152349_drop_clusters_applications_knative.rb
index e8473b74408..38f28eca109 100644
--- a/db/post_migrate/20230503152349_drop_clusters_applications_knative.rb
+++ b/db/post_migrate/20230503152349_drop_clusters_applications_knative.rb
@@ -1,8 +1,5 @@
# 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 DropClustersApplicationsKnative < Gitlab::Database::Migration[2.1]
def up
drop_table :clusters_applications_knative
diff --git a/db/post_migrate/20230503173101_drop_clusters_applications_prometheus.rb b/db/post_migrate/20230503173101_drop_clusters_applications_prometheus.rb
index b62452f2052..35db7cbed47 100644
--- a/db/post_migrate/20230503173101_drop_clusters_applications_prometheus.rb
+++ b/db/post_migrate/20230503173101_drop_clusters_applications_prometheus.rb
@@ -1,8 +1,5 @@
# 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 DropClustersApplicationsPrometheus < Gitlab::Database::Migration[2.1]
def up
drop_table :clusters_applications_prometheus
diff --git a/db/post_migrate/20230503175406_drop_clusters_applications_runners.rb b/db/post_migrate/20230503175406_drop_clusters_applications_runners.rb
index a4ab75dbce5..fb177b5a1de 100644
--- a/db/post_migrate/20230503175406_drop_clusters_applications_runners.rb
+++ b/db/post_migrate/20230503175406_drop_clusters_applications_runners.rb
@@ -1,8 +1,5 @@
# 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 DropClustersApplicationsRunners < Gitlab::Database::Migration[2.1]
def up
drop_table :clusters_applications_runners
diff --git a/db/post_migrate/20230503181808_drop_serverless_domain_cluster.rb b/db/post_migrate/20230503181808_drop_serverless_domain_cluster.rb
index 003f2d91b54..b68b7e85285 100644
--- a/db/post_migrate/20230503181808_drop_serverless_domain_cluster.rb
+++ b/db/post_migrate/20230503181808_drop_serverless_domain_cluster.rb
@@ -1,8 +1,5 @@
# 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 DropServerlessDomainCluster < Gitlab::Database::Migration[2.1]
def up
drop_table :serverless_domain_cluster
diff --git a/db/post_migrate/20230508150219_reschedule_evidences_handling_unicode.rb b/db/post_migrate/20230508150219_reschedule_evidences_handling_unicode.rb
index ed23df4405e..3ea17f81bee 100644
--- a/db/post_migrate/20230508150219_reschedule_evidences_handling_unicode.rb
+++ b/db/post_migrate/20230508150219_reschedule_evidences_handling_unicode.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-# rubocop:disable BackgroundMigration/DictionaryFile
+# rubocop:disable BackgroundMigration/DictionaryFile -- MigrateEvidencesForVulnerabilityFindings is rescheduled
class RescheduleEvidencesHandlingUnicode < Gitlab::Database::Migration[2.1]
restrict_gitlab_migration gitlab_schema: :gitlab_main
diff --git a/db/post_migrate/20230515153600_finalize_back_fill_prepared_at_merge_requests.rb b/db/post_migrate/20230515153600_finalize_back_fill_prepared_at_merge_requests.rb
index 6c0e4e722d2..2b5d7424450 100644
--- a/db/post_migrate/20230515153600_finalize_back_fill_prepared_at_merge_requests.rb
+++ b/db/post_migrate/20230515153600_finalize_back_fill_prepared_at_merge_requests.rb
@@ -1,8 +1,5 @@
# 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 FinalizeBackFillPreparedAtMergeRequests < Gitlab::Database::Migration[2.1]
disable_ddl_transaction!
diff --git a/db/post_migrate/20230522111534_reschedule_migration_for_links_from_metadata.rb b/db/post_migrate/20230522111534_reschedule_migration_for_links_from_metadata.rb
index f49b158593f..5178a2c574c 100644
--- a/db/post_migrate/20230522111534_reschedule_migration_for_links_from_metadata.rb
+++ b/db/post_migrate/20230522111534_reschedule_migration_for_links_from_metadata.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-# rubocop: disable BackgroundMigration/DictionaryFile
+# rubocop:disable BackgroundMigration/DictionaryFile -- MigrateLinksForVulnerabilityFindings is rescheduled
class RescheduleMigrationForLinksFromMetadata < Gitlab::Database::Migration[2.1]
MIGRATION = 'MigrateLinksForVulnerabilityFindings'
@@ -29,4 +29,4 @@ class RescheduleMigrationForLinksFromMetadata < Gitlab::Database::Migration[2.1]
delete_batched_background_migration(MIGRATION, :vulnerability_occurrences, :id, [])
end
end
-# rubocop: enable BackgroundMigration/DictionaryFile
+# rubocop:enable BackgroundMigration/DictionaryFile
diff --git a/db/post_migrate/20230605192000_drop_tmp_index_oauth_access_tokens_on_id_where_expires_in_null.rb b/db/post_migrate/20230605192000_drop_tmp_index_oauth_access_tokens_on_id_where_expires_in_null.rb
index c74df0a5cdd..b82c2dfb8ed 100644
--- a/db/post_migrate/20230605192000_drop_tmp_index_oauth_access_tokens_on_id_where_expires_in_null.rb
+++ b/db/post_migrate/20230605192000_drop_tmp_index_oauth_access_tokens_on_id_where_expires_in_null.rb
@@ -1,8 +1,5 @@
# 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 DropTmpIndexOauthAccessTokensOnIdWhereExpiresInNull < Gitlab::Database::Migration[2.1]
TMP_INDEX = 'tmp_index_oauth_access_tokens_on_id_where_expires_in_null'
diff --git a/db/post_migrate/20230615030402_remove_audit_events_group_index.rb b/db/post_migrate/20230615030402_remove_audit_events_group_index.rb
index 9a77d7a4d0d..ff75a04b0f4 100644
--- a/db/post_migrate/20230615030402_remove_audit_events_group_index.rb
+++ b/db/post_migrate/20230615030402_remove_audit_events_group_index.rb
@@ -1,8 +1,5 @@
# 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 RemoveAuditEventsGroupIndex < Gitlab::Database::Migration[2.1]
include Gitlab::Database::PartitioningMigrationHelpers
diff --git a/db/post_migrate/20230704042302_prepare_removal_index_deployments_on_project_id_sha.rb b/db/post_migrate/20230704042302_prepare_removal_index_deployments_on_project_id_sha.rb
index 77ddd909215..3ab42c70d8a 100644
--- a/db/post_migrate/20230704042302_prepare_removal_index_deployments_on_project_id_sha.rb
+++ b/db/post_migrate/20230704042302_prepare_removal_index_deployments_on_project_id_sha.rb
@@ -1,8 +1,5 @@
# 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 PrepareRemovalIndexDeploymentsOnProjectIdSha < Gitlab::Database::Migration[2.1]
INDEX_NAME = 'index_deployments_on_project_id_sha'
diff --git a/db/post_migrate/20230704044541_prepare_removal_index_deployments_on_project_id_and_status.rb b/db/post_migrate/20230704044541_prepare_removal_index_deployments_on_project_id_and_status.rb
index 0c9a292eb8c..0098eaabf76 100644
--- a/db/post_migrate/20230704044541_prepare_removal_index_deployments_on_project_id_and_status.rb
+++ b/db/post_migrate/20230704044541_prepare_removal_index_deployments_on_project_id_and_status.rb
@@ -1,8 +1,5 @@
# 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 PrepareRemovalIndexDeploymentsOnProjectIdAndStatus < Gitlab::Database::Migration[2.1]
INDEX_NAME = 'index_deployments_on_project_id_and_status'
diff --git a/db/post_migrate/20230704050739_prepare_removal_index_deployments_on_environment_id_and_iid_and_project_id.rb b/db/post_migrate/20230704050739_prepare_removal_index_deployments_on_environment_id_and_iid_and_project_id.rb
index 6171b58ac53..204579d6e18 100644
--- a/db/post_migrate/20230704050739_prepare_removal_index_deployments_on_environment_id_and_iid_and_project_id.rb
+++ b/db/post_migrate/20230704050739_prepare_removal_index_deployments_on_environment_id_and_iid_and_project_id.rb
@@ -1,8 +1,5 @@
# 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 PrepareRemovalIndexDeploymentsOnEnvironmentIdAndIidAndProjectId < Gitlab::Database::Migration[2.1]
INDEX_NAME = 'index_deployments_on_environment_id_and_iid_and_project_id'
diff --git a/db/post_migrate/20230712052619_drop_index_deployments_on_project_id_and_status.rb b/db/post_migrate/20230712052619_drop_index_deployments_on_project_id_and_status.rb
index 0c76b73dcdc..5dea67a5d16 100644
--- a/db/post_migrate/20230712052619_drop_index_deployments_on_project_id_and_status.rb
+++ b/db/post_migrate/20230712052619_drop_index_deployments_on_project_id_and_status.rb
@@ -1,8 +1,5 @@
# 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 DropIndexDeploymentsOnProjectIdAndStatus < Gitlab::Database::Migration[2.1]
INDEX_NAME = 'index_deployments_on_project_id_and_status'
diff --git a/db/post_migrate/20230712054057_drop_index_deployments_on_project_id_sha.rb b/db/post_migrate/20230712054057_drop_index_deployments_on_project_id_sha.rb
index 9916ee7f9ba..edb0ee98d43 100644
--- a/db/post_migrate/20230712054057_drop_index_deployments_on_project_id_sha.rb
+++ b/db/post_migrate/20230712054057_drop_index_deployments_on_project_id_sha.rb
@@ -1,8 +1,5 @@
# 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 DropIndexDeploymentsOnProjectIdSha < Gitlab::Database::Migration[2.1]
INDEX_NAME = 'index_deployments_on_project_id_sha'
diff --git a/db/post_migrate/20230712055956_drop_index_deployments_on_environment_id_and_iid_and_project_id.rb b/db/post_migrate/20230712055956_drop_index_deployments_on_environment_id_and_iid_and_project_id.rb
index 52a02e68d14..4791baf9d9e 100644
--- a/db/post_migrate/20230712055956_drop_index_deployments_on_environment_id_and_iid_and_project_id.rb
+++ b/db/post_migrate/20230712055956_drop_index_deployments_on_environment_id_and_iid_and_project_id.rb
@@ -1,8 +1,5 @@
# 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 DropIndexDeploymentsOnEnvironmentIdAndIidAndProjectId < Gitlab::Database::Migration[2.1]
INDEX_NAME = 'index_deployments_on_environment_id_and_iid_and_project_id'
diff --git a/db/post_migrate/20230717062445_backfill_ci_stages_pipeline_id_conversion.rb b/db/post_migrate/20230717062445_backfill_ci_stages_pipeline_id_conversion.rb
index d93517fb49b..c0a5c577403 100644
--- a/db/post_migrate/20230717062445_backfill_ci_stages_pipeline_id_conversion.rb
+++ b/db/post_migrate/20230717062445_backfill_ci_stages_pipeline_id_conversion.rb
@@ -1,8 +1,5 @@
# 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 BackfillCiStagesPipelineIdConversion < Gitlab::Database::Migration[2.1]
restrict_gitlab_migration gitlab_schema: :gitlab_ci
diff --git a/db/post_migrate/20230724150939_index_projects_on_namespace_id_and_repository_size_limit.rb b/db/post_migrate/20230724150939_index_projects_on_namespace_id_and_repository_size_limit.rb
index fd2387e2bc4..2a60e948007 100644
--- a/db/post_migrate/20230724150939_index_projects_on_namespace_id_and_repository_size_limit.rb
+++ b/db/post_migrate/20230724150939_index_projects_on_namespace_id_and_repository_size_limit.rb
@@ -1,8 +1,5 @@
# 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 IndexProjectsOnNamespaceIdAndRepositorySizeLimit < Gitlab::Database::Migration[2.1]
INDEX_NAME = "index_projects_on_namespace_id_and_repository_size_limit"
diff --git a/db/post_migrate/20230726080827_add_issue_search_data_namespace_id_foreign_key.rb b/db/post_migrate/20230726080827_add_issue_search_data_namespace_id_foreign_key.rb
index 43b4db7d9b5..b5986967214 100644
--- a/db/post_migrate/20230726080827_add_issue_search_data_namespace_id_foreign_key.rb
+++ b/db/post_migrate/20230726080827_add_issue_search_data_namespace_id_foreign_key.rb
@@ -1,8 +1,5 @@
# 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 AddIssueSearchDataNamespaceIdForeignKey < Gitlab::Database::Migration[2.1]
include Gitlab::Database::PartitioningMigrationHelpers
diff --git a/db/post_migrate/20230818034041_prepare_removal_index_success_deployments_on_cluster_id_and_environment_id.rb b/db/post_migrate/20230818034041_prepare_removal_index_success_deployments_on_cluster_id_and_environment_id.rb
index 39a45774676..db40584bb3a 100644
--- a/db/post_migrate/20230818034041_prepare_removal_index_success_deployments_on_cluster_id_and_environment_id.rb
+++ b/db/post_migrate/20230818034041_prepare_removal_index_success_deployments_on_cluster_id_and_environment_id.rb
@@ -1,8 +1,5 @@
# 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 PrepareRemovalIndexSuccessDeploymentsOnClusterIdAndEnvironmentId < Gitlab::Database::Migration[2.1]
INDEX_NAME = 'index_successful_deployments_on_cluster_id_and_environment_id'
diff --git a/db/post_migrate/20230906181457_add_index_to_violations_on_target_proj_id.rb b/db/post_migrate/20230906181457_add_index_to_violations_on_target_proj_id.rb
index 13c76a3c2de..a51fbd0a00a 100644
--- a/db/post_migrate/20230906181457_add_index_to_violations_on_target_proj_id.rb
+++ b/db/post_migrate/20230906181457_add_index_to_violations_on_target_proj_id.rb
@@ -2,7 +2,7 @@
class AddIndexToViolationsOnTargetProjId < Gitlab::Database::Migration[2.1]
TABLE_NAME = 'merge_requests_compliance_violations'
- # Use funciton based naming as suggested in docs:
+ # Use function based naming as suggested in docs:
# https://docs.gitlab.com/ee/development/migration_style_guide.html#truncate-long-index-names
INDEX_NAME = 'i_compliance_violations_for_export'
diff --git a/db/post_migrate/20230912105945_queue_backfill_finding_id_in_vulnerabilities.rb b/db/post_migrate/20230912105945_queue_backfill_finding_id_in_vulnerabilities.rb
index 3275f6e729d..5b51c8c3d67 100644
--- a/db/post_migrate/20230912105945_queue_backfill_finding_id_in_vulnerabilities.rb
+++ b/db/post_migrate/20230912105945_queue_backfill_finding_id_in_vulnerabilities.rb
@@ -8,18 +8,9 @@ class QueueBackfillFindingIdInVulnerabilities < Gitlab::Database::Migration[2.1]
restrict_gitlab_migration gitlab_schema: :gitlab_main
- def up
- queue_batched_background_migration(
- MIGRATION,
- :vulnerabilities,
- :id,
- job_interval: DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- sub_batch_size: SUB_BATCH_SIZE
- )
- end
+ # marking no-op
+ # per https://docs.gitlab.com/ee/development/database/batched_background_migrations.html#requeuing-batched-background-migrations
+ def up; end
- def down
- delete_batched_background_migration(MIGRATION, :vulnerabilities, :id, [])
- end
+ def down; end
end
diff --git a/db/post_migrate/20230929095008_drop_application_settings_product_analytics_cluster_settings.rb b/db/post_migrate/20230929095008_drop_application_settings_product_analytics_cluster_settings.rb
index b759ee21912..d8a7f0017fa 100644
--- a/db/post_migrate/20230929095008_drop_application_settings_product_analytics_cluster_settings.rb
+++ b/db/post_migrate/20230929095008_drop_application_settings_product_analytics_cluster_settings.rb
@@ -1,8 +1,5 @@
# 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 DropApplicationSettingsProductAnalyticsClusterSettings < Gitlab::Database::Migration[2.1]
disable_ddl_transaction!
diff --git a/db/post_migrate/20230929095728_drop_project_settings_product_analytics_cluster_settings.rb b/db/post_migrate/20230929095728_drop_project_settings_product_analytics_cluster_settings.rb
index e6f0c29fb7a..d8054a34a4b 100644
--- a/db/post_migrate/20230929095728_drop_project_settings_product_analytics_cluster_settings.rb
+++ b/db/post_migrate/20230929095728_drop_project_settings_product_analytics_cluster_settings.rb
@@ -1,8 +1,5 @@
# 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 DropProjectSettingsProductAnalyticsClusterSettings < Gitlab::Database::Migration[2.1]
disable_ddl_transaction!
diff --git a/db/post_migrate/20231001105945_requeue_backfill_finding_id_in_vulnerabilities.rb b/db/post_migrate/20231001105945_requeue_backfill_finding_id_in_vulnerabilities.rb
index 8115ad199ce..9004176595e 100644
--- a/db/post_migrate/20231001105945_requeue_backfill_finding_id_in_vulnerabilities.rb
+++ b/db/post_migrate/20231001105945_requeue_backfill_finding_id_in_vulnerabilities.rb
@@ -8,18 +8,9 @@ class RequeueBackfillFindingIdInVulnerabilities < Gitlab::Database::Migration[2.
restrict_gitlab_migration gitlab_schema: :gitlab_main
- def up
- queue_batched_background_migration(
- MIGRATION,
- :vulnerabilities,
- :id,
- job_interval: DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- sub_batch_size: SUB_BATCH_SIZE
- )
- end
+ # marking no-op
+ # per https://docs.gitlab.com/ee/development/database/batched_background_migrations.html#requeuing-batched-background-migrations
+ def up; end
- def down
- delete_batched_background_migration(MIGRATION, :vulnerabilities, :id, [])
- end
+ def down; end
end
diff --git a/db/post_migrate/20231011142714_queue_backfill_has_remediations_of_vulnerability_reads.rb b/db/post_migrate/20231011142714_queue_backfill_has_remediations_of_vulnerability_reads.rb
index 2c1eebbfaa5..12de83a384e 100644
--- a/db/post_migrate/20231011142714_queue_backfill_has_remediations_of_vulnerability_reads.rb
+++ b/db/post_migrate/20231011142714_queue_backfill_has_remediations_of_vulnerability_reads.rb
@@ -9,19 +9,15 @@ class QueueBackfillHasRemediationsOfVulnerabilityReads < Gitlab::Database::Migra
restrict_gitlab_migration gitlab_schema: :gitlab_main
disable_ddl_transaction!
- def up
- queue_batched_background_migration(
- MIGRATION,
- :vulnerability_reads,
- :vulnerability_id,
- job_interval: DELAY_INTERVAL,
- queued_migration_version: '20231011142714',
- batch_size: BATCH_SIZE,
- sub_batch_size: SUB_BATCH_SIZE
- )
- end
+ # per: https://docs.gitlab.com/ee/development/database/batched_background_migrations.html#requeuing-batched-background-migrations
+ # > When you requeue the batched background migration, turn the original queuing
+ # > into a no-op by clearing up the #up and #down methods of the migration
+ # > performing the requeuing. Otherwise, the batched background migration is
+ # > queued multiple times on systems that are upgrading multiple patch releases
+ # > at once.
+ #
+ # being re-run via https://gitlab.com/gitlab-org/gitlab/-/merge_requests/135747
+ def up; end
- def down
- delete_batched_background_migration(MIGRATION, :vulnerability_reads, :vulnerability_id, [])
- end
+ def down; end
end
diff --git a/db/post_migrate/20231012180342_index_stopping_environments_on_updated_at.rb b/db/post_migrate/20231012180342_index_stopping_environments_on_updated_at.rb
index 3b9332ab0f8..cca6ed23fef 100644
--- a/db/post_migrate/20231012180342_index_stopping_environments_on_updated_at.rb
+++ b/db/post_migrate/20231012180342_index_stopping_environments_on_updated_at.rb
@@ -1,8 +1,5 @@
# 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 IndexStoppingEnvironmentsOnUpdatedAt < Gitlab::Database::Migration[2.1]
INDEX_NAME = 'index_environments_on_updated_at_for_stopping_state'
diff --git a/db/post_migrate/20231016173129_queue_delete_invalid_protected_branch_merge_access_levels.rb b/db/post_migrate/20231016173129_queue_delete_invalid_protected_branch_merge_access_levels.rb
index 3f4009d783c..8d6173fc7ca 100644
--- a/db/post_migrate/20231016173129_queue_delete_invalid_protected_branch_merge_access_levels.rb
+++ b/db/post_migrate/20231016173129_queue_delete_invalid_protected_branch_merge_access_levels.rb
@@ -16,7 +16,6 @@ class QueueDeleteInvalidProtectedBranchMergeAccessLevels < Gitlab::Database::Mig
:protected_branch_merge_access_levels,
:id,
job_interval: DELAY_INTERVAL,
- queued_migration_version: '20231016173129',
batch_size: BATCH_SIZE,
sub_batch_size: SUB_BATCH_SIZE
)
diff --git a/db/post_migrate/20231016194927_queue_delete_invalid_protected_branch_push_access_levels.rb b/db/post_migrate/20231016194927_queue_delete_invalid_protected_branch_push_access_levels.rb
index 6accaa3296b..32022ff8be0 100644
--- a/db/post_migrate/20231016194927_queue_delete_invalid_protected_branch_push_access_levels.rb
+++ b/db/post_migrate/20231016194927_queue_delete_invalid_protected_branch_push_access_levels.rb
@@ -16,7 +16,6 @@ class QueueDeleteInvalidProtectedBranchPushAccessLevels < Gitlab::Database::Migr
:protected_branch_push_access_levels,
:id,
job_interval: DELAY_INTERVAL,
- queued_migration_version: '20231016194927',
batch_size: BATCH_SIZE,
sub_batch_size: SUB_BATCH_SIZE
)
diff --git a/db/post_migrate/20231016194943_queue_delete_invalid_protected_tag_create_access_levels.rb b/db/post_migrate/20231016194943_queue_delete_invalid_protected_tag_create_access_levels.rb
index 5880124d0a6..f96f1c3b380 100644
--- a/db/post_migrate/20231016194943_queue_delete_invalid_protected_tag_create_access_levels.rb
+++ b/db/post_migrate/20231016194943_queue_delete_invalid_protected_tag_create_access_levels.rb
@@ -15,7 +15,6 @@ class QueueDeleteInvalidProtectedTagCreateAccessLevels < Gitlab::Database::Migra
:protected_tag_create_access_levels,
:id,
job_interval: DELAY_INTERVAL,
- queued_migration_version: '20231016194943',
batch_size: BATCH_SIZE,
sub_batch_size: SUB_BATCH_SIZE
)
diff --git a/db/post_migrate/20231023113908_add_index_stopping_environments_on_updated_at.rb b/db/post_migrate/20231023113908_add_index_stopping_environments_on_updated_at.rb
index 01fe32d6bd7..5df8625c24c 100644
--- a/db/post_migrate/20231023113908_add_index_stopping_environments_on_updated_at.rb
+++ b/db/post_migrate/20231023113908_add_index_stopping_environments_on_updated_at.rb
@@ -1,8 +1,5 @@
# 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 AddIndexStoppingEnvironmentsOnUpdatedAt < Gitlab::Database::Migration[2.1]
INDEX_NAME = 'index_environments_on_updated_at_for_stopping_state'
diff --git a/db/post_migrate/20231024073401_cleanup_ci_pipeline_variables_pipeline_id_bigint.rb b/db/post_migrate/20231024073401_cleanup_ci_pipeline_variables_pipeline_id_bigint.rb
new file mode 100644
index 00000000000..bbc2abadcec
--- /dev/null
+++ b/db/post_migrate/20231024073401_cleanup_ci_pipeline_variables_pipeline_id_bigint.rb
@@ -0,0 +1,32 @@
+# frozen_string_literal: true
+
+class CleanupCiPipelineVariablesPipelineIdBigint < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ TABLE = :ci_pipeline_variables
+ REFERENCING_TABLE = :ci_pipelines
+ COLUMNS = [:pipeline_id]
+ INDEX_NAME = :index_ci_pipeline_variables_on_pipeline_id_bigint_and_key
+ FK_NAME = :temp_fk_rails_8d3b04e3e1
+
+ def up
+ with_lock_retries(raise_on_exhaustion: true) do
+ lock_tables(:ci_pipelines, TABLE)
+ cleanup_conversion_of_integer_to_bigint(TABLE, COLUMNS)
+ end
+ end
+
+ def down
+ restore_conversion_of_integer_to_bigint(TABLE, COLUMNS)
+
+ add_concurrent_index(
+ TABLE, [:pipeline_id_convert_to_bigint, :key],
+ name: INDEX_NAME, unique: true
+ )
+ add_concurrent_foreign_key(
+ TABLE, REFERENCING_TABLE,
+ column: :pipeline_id_convert_to_bigint, name: FK_NAME,
+ on_delete: :cascade, validate: true, reverse_lock_order: true
+ )
+ end
+end
diff --git a/db/post_migrate/20231027093009_drop_index_project_topics_on_project_id.rb b/db/post_migrate/20231027093009_drop_index_project_topics_on_project_id.rb
new file mode 100644
index 00000000000..87d0e923565
--- /dev/null
+++ b/db/post_migrate/20231027093009_drop_index_project_topics_on_project_id.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class DropIndexProjectTopicsOnProjectId < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+
+ milestone '16.7'
+
+ INDEX_NAME = :index_project_topics_on_project_id
+ TABLE_NAME = :project_topics
+
+ def up
+ remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index TABLE_NAME, :project_id, name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20231029134824_remove_deployments_cluster_id.rb b/db/post_migrate/20231029134824_remove_deployments_cluster_id.rb
new file mode 100644
index 00000000000..11ab9370ad2
--- /dev/null
+++ b/db/post_migrate/20231029134824_remove_deployments_cluster_id.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+class RemoveDeploymentsClusterId < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+ milestone '16.7'
+
+ def up
+ with_lock_retries do
+ remove_column :deployments, :cluster_id, if_exists: true
+ end
+ end
+
+ def down
+ with_lock_retries do
+ add_column :deployments, :cluster_id, :integer, if_not_exists: true
+ end
+
+ add_concurrent_index(:deployments, [:cluster_id, :status])
+ end
+end
diff --git a/db/post_migrate/20231030071209_queue_backfill_packages_tags_project_id.rb b/db/post_migrate/20231030071209_queue_backfill_packages_tags_project_id.rb
index 4984eb83263..1197e31dea8 100644
--- a/db/post_migrate/20231030071209_queue_backfill_packages_tags_project_id.rb
+++ b/db/post_migrate/20231030071209_queue_backfill_packages_tags_project_id.rb
@@ -16,7 +16,6 @@ class QueueBackfillPackagesTagsProjectId < Gitlab::Database::Migration[2.2]
:packages_tags,
:id,
job_interval: DELAY_INTERVAL,
- queued_migration_version: '20231030071209',
batch_size: BATCH_SIZE,
sub_batch_size: SUB_BATCH_SIZE
)
diff --git a/db/post_migrate/20231031204841_requeue_backfill_has_remediations_of_vulnerability_reads.rb b/db/post_migrate/20231031204841_requeue_backfill_has_remediations_of_vulnerability_reads.rb
new file mode 100644
index 00000000000..0cff65db72f
--- /dev/null
+++ b/db/post_migrate/20231031204841_requeue_backfill_has_remediations_of_vulnerability_reads.rb
@@ -0,0 +1,26 @@
+# frozen_string_literal: true
+
+# rubocop: disable BackgroundMigration/DictionaryFile -- queued/introduced before the rule is introduced
+
+class RequeueBackfillHasRemediationsOfVulnerabilityReads < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ MIGRATION = "BackfillHasRemediationsOfVulnerabilityReads"
+ DELAY_INTERVAL = 2.minutes
+ BATCH_SIZE = 10_000
+ SUB_BATCH_SIZE = 50
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+ disable_ddl_transaction!
+
+ # per: https://docs.gitlab.com/ee/development/database/batched_background_migrations.html#requeuing-batched-background-migrations
+ # > When you requeue the batched background migration, turn the original queuing
+ # > into a no-op by clearing up the #up and #down methods of the migration
+ # > performing the requeuing. Otherwise, the batched background migration is
+ # > queued multiple times on systems that are upgrading multiple patch releases
+ # > at once.
+ def up; end
+
+ def down; end
+end
+# rubocop: enable BackgroundMigration/DictionaryFile
diff --git a/db/post_migrate/20231107092912_queue_backfill_branch_protection_namespace_setting.rb b/db/post_migrate/20231107092912_queue_backfill_branch_protection_namespace_setting.rb
new file mode 100644
index 00000000000..28af287c75b
--- /dev/null
+++ b/db/post_migrate/20231107092912_queue_backfill_branch_protection_namespace_setting.rb
@@ -0,0 +1,27 @@
+# frozen_string_literal: true
+
+class QueueBackfillBranchProtectionNamespaceSetting < Gitlab::Database::Migration[2.2]
+ milestone "16.7"
+ MIGRATION = "BackfillBranchProtectionNamespaceSetting"
+ DELAY_INTERVAL = 2.minutes
+ BATCH_SIZE = 10_000
+ SUB_BATCH_SIZE = 100
+
+ disable_ddl_transaction!
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ queue_batched_background_migration(
+ MIGRATION,
+ :namespace_settings,
+ :namespace_id,
+ job_interval: DELAY_INTERVAL,
+ batch_size: BATCH_SIZE,
+ sub_batch_size: SUB_BATCH_SIZE
+ )
+ end
+
+ def down
+ delete_batched_background_migration(MIGRATION, :namespace_settings, :namespace_id, [])
+ end
+end
diff --git a/db/post_migrate/20231109120223_ensure_id_uniqueness_for_p_ci_builds_v4.rb b/db/post_migrate/20231109120223_ensure_id_uniqueness_for_p_ci_builds_v4.rb
new file mode 100644
index 00000000000..994755dbd28
--- /dev/null
+++ b/db/post_migrate/20231109120223_ensure_id_uniqueness_for_p_ci_builds_v4.rb
@@ -0,0 +1,42 @@
+# frozen_string_literal: true
+
+class EnsureIdUniquenessForPCiBuildsV4 < Gitlab::Database::Migration[2.2]
+ include Gitlab::Database::SchemaHelpers
+ include Gitlab::Database::MigrationHelpers::WraparoundAutovacuum
+
+ enable_lock_retries!
+ milestone '16.7'
+
+ TABLE_NAME = :p_ci_builds
+ FUNCTION_NAME = :assign_p_ci_builds_id_value
+ TRIGGER_NAME = :assign_p_ci_builds_id_trigger
+
+ def up
+ return unless should_run?
+
+ lock_tables(TABLE_NAME, :ci_builds)
+
+ Gitlab::Database::PostgresPartitionedTable.each_partition(TABLE_NAME) do |partition|
+ drop_trigger(partition.identifier, TRIGGER_NAME, if_exists: true)
+ end
+
+ create_trigger(TABLE_NAME, TRIGGER_NAME, FUNCTION_NAME, fires: 'BEFORE INSERT')
+ end
+
+ def down
+ return unless should_run?
+
+ drop_trigger(TABLE_NAME, TRIGGER_NAME, if_exists: true)
+ return if trigger_exists?(:ci_builds, TRIGGER_NAME)
+
+ Gitlab::Database::PostgresPartitionedTable.each_partition(TABLE_NAME) do |partition|
+ create_trigger(partition.identifier, TRIGGER_NAME, FUNCTION_NAME, fires: 'BEFORE INSERT')
+ end
+ end
+
+ private
+
+ def should_run?
+ can_execute_on?(:ci_builds)
+ end
+end
diff --git a/db/post_migrate/20231109124031_ensure_id_uniqueness_for_p_ci_builds_v5.rb b/db/post_migrate/20231109124031_ensure_id_uniqueness_for_p_ci_builds_v5.rb
new file mode 100644
index 00000000000..e3b082b41ad
--- /dev/null
+++ b/db/post_migrate/20231109124031_ensure_id_uniqueness_for_p_ci_builds_v5.rb
@@ -0,0 +1,33 @@
+# frozen_string_literal: true
+
+class EnsureIdUniquenessForPCiBuildsV5 < Gitlab::Database::Migration[2.2]
+ include Gitlab::Database::SchemaHelpers
+
+ enable_lock_retries!
+ milestone '16.7'
+
+ TABLE_NAME = :p_ci_builds
+ FUNCTION_NAME = :assign_p_ci_builds_id_value
+ TRIGGER_NAME = :assign_p_ci_builds_id_trigger
+
+ def up
+ return if trigger_exists?(TABLE_NAME, TRIGGER_NAME)
+
+ lock_tables(TABLE_NAME, :ci_builds)
+
+ Gitlab::Database::PostgresPartitionedTable.each_partition(TABLE_NAME) do |partition|
+ drop_trigger(partition.identifier, TRIGGER_NAME, if_exists: true)
+ end
+
+ create_trigger(TABLE_NAME, TRIGGER_NAME, FUNCTION_NAME, fires: 'BEFORE INSERT')
+ end
+
+ def down
+ drop_trigger(TABLE_NAME, TRIGGER_NAME, if_exists: true)
+ return if trigger_exists?(:ci_builds, TRIGGER_NAME)
+
+ Gitlab::Database::PostgresPartitionedTable.each_partition(TABLE_NAME) do |partition|
+ create_trigger(partition.identifier, TRIGGER_NAME, FUNCTION_NAME, fires: 'BEFORE INSERT')
+ end
+ end
+end
diff --git a/db/post_migrate/20231110173626_drop_merge_requests_on_author_id_index.rb b/db/post_migrate/20231110173626_drop_merge_requests_on_author_id_index.rb
new file mode 100644
index 00000000000..fac5f0ad679
--- /dev/null
+++ b/db/post_migrate/20231110173626_drop_merge_requests_on_author_id_index.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class DropMergeRequestsOnAuthorIdIndex < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+
+ milestone '16.7'
+
+ INDEX_NAME = 'index_merge_requests_on_author_id'
+ TABLE_NAME = :merge_requests
+
+ def up
+ # Duplicated index. This index is covered by +index_merge_requests_on_author_id_and_created_at+
+ remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index TABLE_NAME, :author_id, name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20231113025718_drop_index_users_require_two_factor_authentication_from_group_false.rb b/db/post_migrate/20231113025718_drop_index_users_require_two_factor_authentication_from_group_false.rb
new file mode 100644
index 00000000000..28fc0bab5a0
--- /dev/null
+++ b/db/post_migrate/20231113025718_drop_index_users_require_two_factor_authentication_from_group_false.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+class DropIndexUsersRequireTwoFactorAuthenticationFromGroupFalse < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ TABLE_NAME = :users
+ INDEX_NAME = :index_users_require_two_factor_authentication_from_group_false
+
+ def up
+ remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index TABLE_NAME, :require_two_factor_authentication_from_group,
+ where: 'require_two_factor_authentication_from_group = FALSE',
+ name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20231113025733_drop_index_users_require_two_factor_authentication_from_group.rb b/db/post_migrate/20231113025733_drop_index_users_require_two_factor_authentication_from_group.rb
new file mode 100644
index 00000000000..769f4c38179
--- /dev/null
+++ b/db/post_migrate/20231113025733_drop_index_users_require_two_factor_authentication_from_group.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+class DropIndexUsersRequireTwoFactorAuthenticationFromGroup < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ TABLE_NAME = :users
+ INDEX_NAME = :index_users_on_require_two_factor_authentication_from_group
+
+ def up
+ remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index TABLE_NAME, :require_two_factor_authentication_from_group,
+ where: 'require_two_factor_authentication_from_group = TRUE',
+ name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20231113142618_remove_users_state_duplicated_index.rb b/db/post_migrate/20231113142618_remove_users_state_duplicated_index.rb
new file mode 100644
index 00000000000..dbc018dc027
--- /dev/null
+++ b/db/post_migrate/20231113142618_remove_users_state_duplicated_index.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class RemoveUsersStateDuplicatedIndex < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+
+ milestone '16.7'
+
+ INDEX_NAME = :index_users_on_state
+ TABLE_NAME = :users
+
+ def up
+ remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index TABLE_NAME, :state, name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20231113164909_drop_index_users_on_accepted_term_id.rb b/db/post_migrate/20231113164909_drop_index_users_on_accepted_term_id.rb
new file mode 100644
index 00000000000..2cbf68efd25
--- /dev/null
+++ b/db/post_migrate/20231113164909_drop_index_users_on_accepted_term_id.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class DropIndexUsersOnAcceptedTermId < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ disable_ddl_transaction!
+
+ TABLE_NAME = 'users'
+ INDEX_NAME = 'index_users_on_accepted_term_id'
+ COLUMN = 'accepted_term_id'
+
+ def up
+ remove_concurrent_index_by_name TABLE_NAME, name: INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index TABLE_NAME, COLUMN, name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20231114000727_drop_index_namespaces_on_require_two_factor_authentication.rb b/db/post_migrate/20231114000727_drop_index_namespaces_on_require_two_factor_authentication.rb
new file mode 100644
index 00000000000..fa61cdead56
--- /dev/null
+++ b/db/post_migrate/20231114000727_drop_index_namespaces_on_require_two_factor_authentication.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class DropIndexNamespacesOnRequireTwoFactorAuthentication < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ TABLE_NAME = :namespaces
+ INDEX_NAME = :index_namespaces_on_require_two_factor_authentication
+
+ def up
+ remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index TABLE_NAME, :require_two_factor_authentication,
+ name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20231114015857_finalize_packages_tags_project_id_backfill.rb b/db/post_migrate/20231114015857_finalize_packages_tags_project_id_backfill.rb
new file mode 100644
index 00000000000..3f98aff31ad
--- /dev/null
+++ b/db/post_migrate/20231114015857_finalize_packages_tags_project_id_backfill.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+
+class FinalizePackagesTagsProjectIdBackfill < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+ milestone '16.7'
+
+ MIGRATION = 'BackfillPackagesTagsProjectId'
+
+ def up
+ ensure_batched_background_migration_is_finished(
+ job_class_name: MIGRATION,
+ table_name: :packages_tags,
+ column_name: :id,
+ job_arguments: [],
+ finalize: true
+ )
+ end
+
+ def down
+ # no-op
+ end
+end
diff --git a/db/post_migrate/20231114015923_validate_packages_tags_project_id_null_constraint.rb b/db/post_migrate/20231114015923_validate_packages_tags_project_id_null_constraint.rb
new file mode 100644
index 00000000000..36a37f8ce4e
--- /dev/null
+++ b/db/post_migrate/20231114015923_validate_packages_tags_project_id_null_constraint.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class ValidatePackagesTagsProjectIdNullConstraint < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ def up
+ validate_not_null_constraint :packages_tags, :project_id
+ end
+
+ def down
+ # no-op
+ end
+end
diff --git a/db/post_migrate/20231114034309_add_merge_request_diffs_project_id_not_null_constraint.rb b/db/post_migrate/20231114034309_add_merge_request_diffs_project_id_not_null_constraint.rb
new file mode 100644
index 00000000000..7f947001d39
--- /dev/null
+++ b/db/post_migrate/20231114034309_add_merge_request_diffs_project_id_not_null_constraint.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+class AddMergeRequestDiffsProjectIdNotNullConstraint < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+ milestone '16.7'
+
+ def up
+ add_not_null_constraint :merge_request_diffs, :project_id, validate: false
+ end
+
+ def down
+ remove_not_null_constraint :merge_request_diffs, :project_id
+ end
+end
diff --git a/db/post_migrate/20231114034507_add_merge_request_diffs_project_id_index_async.rb b/db/post_migrate/20231114034507_add_merge_request_diffs_project_id_index_async.rb
new file mode 100644
index 00000000000..1c783b922ae
--- /dev/null
+++ b/db/post_migrate/20231114034507_add_merge_request_diffs_project_id_index_async.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class AddMergeRequestDiffsProjectIdIndexAsync < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+ milestone '16.7'
+
+ INDEX_NAME = 'index_merge_request_diffs_on_project_id'
+
+ def up
+ prepare_async_index :merge_request_diffs, :project_id, name: INDEX_NAME
+ end
+
+ def down
+ unprepare_async_index :merge_request_diffs, :project_id, name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20231114043522_queue_backfill_merge_request_diffs_project_id.rb b/db/post_migrate/20231114043522_queue_backfill_merge_request_diffs_project_id.rb
new file mode 100644
index 00000000000..19448243fdc
--- /dev/null
+++ b/db/post_migrate/20231114043522_queue_backfill_merge_request_diffs_project_id.rb
@@ -0,0 +1,26 @@
+# frozen_string_literal: true
+
+class QueueBackfillMergeRequestDiffsProjectId < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ MIGRATION = "BackfillMergeRequestDiffsProjectId"
+ DELAY_INTERVAL = 2.minutes
+ BATCH_SIZE = 10000
+ SUB_BATCH_SIZE = 100
+
+ def up
+ queue_batched_background_migration(
+ MIGRATION,
+ :merge_request_diffs,
+ :id,
+ job_interval: DELAY_INTERVAL,
+ batch_size: BATCH_SIZE,
+ sub_batch_size: SUB_BATCH_SIZE
+ )
+ end
+
+ def down
+ delete_batched_background_migration(MIGRATION, :merge_request_diffs, :id, [])
+ end
+end
diff --git a/db/post_migrate/20231114053330_cleanup_ci_pipelines_auto_canceled_by_id_bigint.rb b/db/post_migrate/20231114053330_cleanup_ci_pipelines_auto_canceled_by_id_bigint.rb
new file mode 100644
index 00000000000..489403f42bf
--- /dev/null
+++ b/db/post_migrate/20231114053330_cleanup_ci_pipelines_auto_canceled_by_id_bigint.rb
@@ -0,0 +1,31 @@
+# frozen_string_literal: true
+
+class CleanupCiPipelinesAutoCanceledByIdBigint < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+ milestone "16.7"
+
+ TABLE = :ci_pipelines
+ REFERENCING_TABLE = :ci_pipelines
+ COLUMN = :auto_canceled_by_id
+ OLD_COLUMN = :auto_canceled_by_id_convert_to_bigint
+ INDEX_NAME = :index_ci_pipelines_on_auto_canceled_by_id_bigint
+ OLD_FK_NAME = :fk_67e4288f3a
+
+ def up
+ with_lock_retries(raise_on_exhaustion: true) do
+ cleanup_conversion_of_integer_to_bigint(TABLE, [COLUMN])
+ end
+ end
+
+ def down
+ restore_conversion_of_integer_to_bigint(TABLE, [COLUMN])
+
+ add_concurrent_index(TABLE, OLD_COLUMN, name: INDEX_NAME)
+
+ add_concurrent_foreign_key(
+ TABLE, TABLE,
+ column: OLD_COLUMN, name: OLD_FK_NAME,
+ on_delete: :nullify, validate: true, reverse_lock_order: true
+ )
+ end
+end
diff --git a/db/post_migrate/20231114091935_remove_member_namespace_id_index_from_members.rb b/db/post_migrate/20231114091935_remove_member_namespace_id_index_from_members.rb
new file mode 100644
index 00000000000..26379f47778
--- /dev/null
+++ b/db/post_migrate/20231114091935_remove_member_namespace_id_index_from_members.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class RemoveMemberNamespaceIdIndexFromMembers < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+
+ milestone '16.7'
+
+ INDEX_NAME = 'index_members_on_member_namespace_id'
+
+ def up
+ remove_concurrent_index_by_name :members, INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index :members, :member_namespace_id, name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20231115104943_remove_service_access_tokens_category_column.rb b/db/post_migrate/20231115104943_remove_service_access_tokens_category_column.rb
new file mode 100644
index 00000000000..42879d1e70d
--- /dev/null
+++ b/db/post_migrate/20231115104943_remove_service_access_tokens_category_column.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class RemoveServiceAccessTokensCategoryColumn < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ def change
+ remove_column :service_access_tokens, :category, :integer, limit: 2, default: 0, null: false
+ end
+end
diff --git a/db/post_migrate/20231115172623_remove_name_description_trigram_indexes_from_catalog_resources.rb b/db/post_migrate/20231115172623_remove_name_description_trigram_indexes_from_catalog_resources.rb
new file mode 100644
index 00000000000..4dc02efa0be
--- /dev/null
+++ b/db/post_migrate/20231115172623_remove_name_description_trigram_indexes_from_catalog_resources.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+
+class RemoveNameDescriptionTrigramIndexesFromCatalogResources < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ NAME_TRIGRAM_INDEX = 'index_catalog_resources_on_name_trigram'
+ DESCRIPTION_TRIGRAM_INDEX = 'index_catalog_resources_on_description_trigram'
+
+ def up
+ remove_concurrent_index_by_name :catalog_resources, NAME_TRIGRAM_INDEX
+ remove_concurrent_index_by_name :catalog_resources, DESCRIPTION_TRIGRAM_INDEX
+ end
+
+ def down
+ add_concurrent_index :catalog_resources, :name, name: NAME_TRIGRAM_INDEX,
+ using: :gin, opclass: { name: :gin_trgm_ops }
+
+ add_concurrent_index :catalog_resources, :description, name: DESCRIPTION_TRIGRAM_INDEX,
+ using: :gin, opclass: { description: :gin_trgm_ops }
+ end
+end
diff --git a/db/post_migrate/20231116105945_requeue_backfill_finding_id_in_vulnerabilities2.rb b/db/post_migrate/20231116105945_requeue_backfill_finding_id_in_vulnerabilities2.rb
new file mode 100644
index 00000000000..5713df95be3
--- /dev/null
+++ b/db/post_migrate/20231116105945_requeue_backfill_finding_id_in_vulnerabilities2.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+class RequeueBackfillFindingIdInVulnerabilities2 < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ # marking as no-op as per our database guidelines
+ def up; end
+
+ def down; end
+end
diff --git a/db/post_migrate/20231120070345_cleanup_ci_stages_pipeline_id_bigint.rb b/db/post_migrate/20231120070345_cleanup_ci_stages_pipeline_id_bigint.rb
new file mode 100644
index 00000000000..c9238eb7272
--- /dev/null
+++ b/db/post_migrate/20231120070345_cleanup_ci_stages_pipeline_id_bigint.rb
@@ -0,0 +1,53 @@
+# frozen_string_literal: true
+
+class CleanupCiStagesPipelineIdBigint < Gitlab::Database::Migration[2.2]
+ include Gitlab::Database::MigrationHelpers::WraparoundAutovacuum
+
+ disable_ddl_transaction!
+ milestone "16.7"
+
+ TABLE = :ci_stages
+ REFERENCING_TABLE = :ci_pipelines
+ COLUMN = :pipeline_id
+ OLD_COLUMN = :pipeline_id_convert_to_bigint
+ INDEXES = {
+ 'index_ci_stages_on_pipeline_id_convert_to_bigint_and_name' => [
+ [:pipeline_id_convert_to_bigint, :name], { unique: true }
+ ],
+ 'index_ci_stages_on_pipeline_id_convert_to_bigint' => [
+ [:pipeline_id_convert_to_bigint], {}
+ ],
+ 'index_ci_stages_on_pipeline_id_convert_to_bigint_and_id' => [
+ [:pipeline_id_convert_to_bigint, :id], { where: 'status = ANY (ARRAY[0, 1, 2, 8, 9, 10])' }
+ ],
+ 'index_ci_stages_on_pipeline_id_convert_to_bigint_and_position' => [
+ [:pipeline_id_convert_to_bigint, :position], {}
+ ]
+ }
+ OLD_FK_NAME = :fk_c5ddde695f
+
+ def up
+ return unless can_execute_on?(:ci_pipelines, :ci_stages)
+
+ with_lock_retries(raise_on_exhaustion: true) do
+ lock_tables(REFERENCING_TABLE, TABLE)
+ cleanup_conversion_of_integer_to_bigint(TABLE, [COLUMN])
+ end
+ end
+
+ def down
+ return unless can_execute_on?(:ci_pipelines, :ci_stages)
+
+ restore_conversion_of_integer_to_bigint(TABLE, [COLUMN])
+
+ INDEXES.each do |index_name, (columns, options)|
+ add_concurrent_index(TABLE, columns, name: index_name, **options)
+ end
+
+ add_concurrent_foreign_key(
+ TABLE, REFERENCING_TABLE,
+ column: OLD_COLUMN, name: OLD_FK_NAME,
+ on_delete: :cascade, validate: true, reverse_lock_order: true
+ )
+ end
+end
diff --git a/db/post_migrate/20231120161159_prepare_index_for_org_id_and_id_on_projects.rb b/db/post_migrate/20231120161159_prepare_index_for_org_id_and_id_on_projects.rb
new file mode 100644
index 00000000000..1a49f8ee43f
--- /dev/null
+++ b/db/post_migrate/20231120161159_prepare_index_for_org_id_and_id_on_projects.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class PrepareIndexForOrgIdAndIdOnProjects < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ INDEX_NAME = 'index_projects_on_organization_id_and_id'
+
+ def up
+ prepare_async_index :projects, [:organization_id, :id], name: INDEX_NAME
+ end
+
+ def down
+ unprepare_async_index :projects, [:organization_id, :id], name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20231121040153_add_merge_request_diffs_project_id_index.rb b/db/post_migrate/20231121040153_add_merge_request_diffs_project_id_index.rb
new file mode 100644
index 00000000000..5576e9d534e
--- /dev/null
+++ b/db/post_migrate/20231121040153_add_merge_request_diffs_project_id_index.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class AddMergeRequestDiffsProjectIdIndex < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+ milestone '16.7'
+
+ INDEX_NAME = 'index_merge_request_diffs_on_project_id'
+
+ def up
+ add_concurrent_index :merge_request_diffs, :project_id, name: INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_index_by_name :merge_request_diffs, name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20231121040212_add_merge_request_diffs_project_id_foreign_key.rb b/db/post_migrate/20231121040212_add_merge_request_diffs_project_id_foreign_key.rb
new file mode 100644
index 00000000000..91d4c532629
--- /dev/null
+++ b/db/post_migrate/20231121040212_add_merge_request_diffs_project_id_foreign_key.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class AddMergeRequestDiffsProjectIdForeignKey < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+ milestone '16.7'
+
+ def up
+ add_concurrent_foreign_key :merge_request_diffs, :projects,
+ column: :project_id, on_delete: :cascade, validate: false
+ end
+
+ def down
+ with_lock_retries do
+ remove_foreign_key :merge_request_diffs, column: :project_id
+ end
+ end
+end
diff --git a/db/post_migrate/20231122011731_drop_index_users_on_email_trigram.rb b/db/post_migrate/20231122011731_drop_index_users_on_email_trigram.rb
new file mode 100644
index 00000000000..79e30651237
--- /dev/null
+++ b/db/post_migrate/20231122011731_drop_index_users_on_email_trigram.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class DropIndexUsersOnEmailTrigram < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ TABLE_NAME = :users
+ INDEX_NAME = :index_users_on_email_trigram
+
+ def up
+ remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index TABLE_NAME, :email, name: INDEX_NAME,
+ using: :gin, opclass: { email: :gin_trgm_ops }
+ end
+end
diff --git a/db/post_migrate/20231122084642_remove_partition_id_default_value_for_job_artifact_state.rb b/db/post_migrate/20231122084642_remove_partition_id_default_value_for_job_artifact_state.rb
new file mode 100644
index 00000000000..3a1e9c2e6a9
--- /dev/null
+++ b/db/post_migrate/20231122084642_remove_partition_id_default_value_for_job_artifact_state.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+class RemovePartitionIdDefaultValueForJobArtifactState < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ enable_lock_retries!
+
+ def up
+ change_column_default :ci_job_artifact_states, :partition_id, from: 100, to: nil
+ end
+
+ def down
+ change_column_default :ci_job_artifact_states, :partition_id, from: nil, to: 100
+ end
+end
diff --git a/db/post_migrate/20231122100006_remove_custom_email_smtp_columns_from_service_desk_settings.rb b/db/post_migrate/20231122100006_remove_custom_email_smtp_columns_from_service_desk_settings.rb
new file mode 100644
index 00000000000..98bb15dd76e
--- /dev/null
+++ b/db/post_migrate/20231122100006_remove_custom_email_smtp_columns_from_service_desk_settings.rb
@@ -0,0 +1,32 @@
+# frozen_string_literal: true
+
+class RemoveCustomEmailSmtpColumnsFromServiceDeskSettings < Gitlab::Database::Migration[2.2]
+ MAXIMUM_LIMIT = 255
+
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ def up
+ with_lock_retries do
+ remove_column :service_desk_settings, :custom_email_smtp_address
+ remove_column :service_desk_settings, :custom_email_smtp_port
+ remove_column :service_desk_settings, :custom_email_smtp_username
+ remove_column :service_desk_settings, :encrypted_custom_email_smtp_password
+ remove_column :service_desk_settings, :encrypted_custom_email_smtp_password_iv
+ end
+ end
+
+ def down
+ with_lock_retries do
+ add_column :service_desk_settings, :custom_email_smtp_address, :text
+ add_column :service_desk_settings, :custom_email_smtp_port, :integer
+ add_column :service_desk_settings, :custom_email_smtp_username, :text
+ add_column :service_desk_settings, :encrypted_custom_email_smtp_password, :binary
+ add_column :service_desk_settings, :encrypted_custom_email_smtp_password_iv, :binary
+ end
+
+ add_text_limit :service_desk_settings, :custom_email_smtp_address, MAXIMUM_LIMIT
+ add_text_limit :service_desk_settings, :custom_email_smtp_username, MAXIMUM_LIMIT
+ end
+end
diff --git a/db/post_migrate/20231122110442_drop_index_web_hooks_on_project_id.rb b/db/post_migrate/20231122110442_drop_index_web_hooks_on_project_id.rb
new file mode 100644
index 00000000000..f3b2e59f189
--- /dev/null
+++ b/db/post_migrate/20231122110442_drop_index_web_hooks_on_project_id.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class DropIndexWebHooksOnProjectId < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+
+ milestone '16.7'
+
+ INDEX_NAME = :index_web_hooks_on_project_id
+ TABLE_NAME = :web_hooks
+
+ def up
+ remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index TABLE_NAME, :project_id, name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20231122111935_drop_index_web_hook_logs_part_on_web_hook_id.rb b/db/post_migrate/20231122111935_drop_index_web_hook_logs_part_on_web_hook_id.rb
new file mode 100644
index 00000000000..70f3cfee78d
--- /dev/null
+++ b/db/post_migrate/20231122111935_drop_index_web_hook_logs_part_on_web_hook_id.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class DropIndexWebHookLogsPartOnWebHookId < Gitlab::Database::Migration[2.2]
+ include Gitlab::Database::PartitioningMigrationHelpers
+ disable_ddl_transaction!
+
+ milestone '16.7'
+
+ INDEX_NAME = :index_web_hook_logs_part_on_web_hook_id
+ TABLE_NAME = :web_hook_logs
+
+ def up
+ remove_concurrent_partitioned_index_by_name(TABLE_NAME, INDEX_NAME)
+ end
+
+ def down
+ add_concurrent_partitioned_index(TABLE_NAME, :web_hook_id, name: INDEX_NAME)
+ end
+end
diff --git a/db/post_migrate/20231122114135_add_index_on_sbom_occurrences_highest_severity.rb b/db/post_migrate/20231122114135_add_index_on_sbom_occurrences_highest_severity.rb
new file mode 100644
index 00000000000..c7c5aef7160
--- /dev/null
+++ b/db/post_migrate/20231122114135_add_index_on_sbom_occurrences_highest_severity.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+
+class AddIndexOnSbomOccurrencesHighestSeverity < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+ milestone '16.7'
+
+ INDEX_NAME = 'index_sbom_occurrences_on_highest_severity'
+ INDEX_TO_BE_REMOVED = 'index_sbom_occurrences_on_project_id'
+
+ def up
+ add_concurrent_index :sbom_occurrences,
+ [:project_id, :highest_severity],
+ order: { highest_severity: 'DESC NULLS LAST' },
+ name: INDEX_NAME
+
+ remove_concurrent_index_by_name :sbom_occurrences, INDEX_TO_BE_REMOVED
+ end
+
+ def down
+ add_concurrent_index :sbom_occurrences, :project_id, name: INDEX_TO_BE_REMOVED
+ remove_concurrent_index_by_name :sbom_occurrences, INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20231122123408_drop_idx_jira_connect_subscriptions_on_installation_id.rb b/db/post_migrate/20231122123408_drop_idx_jira_connect_subscriptions_on_installation_id.rb
new file mode 100644
index 00000000000..301fbe97bdf
--- /dev/null
+++ b/db/post_migrate/20231122123408_drop_idx_jira_connect_subscriptions_on_installation_id.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class DropIdxJiraConnectSubscriptionsOnInstallationId < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+
+ milestone '16.7'
+
+ INDEX_NAME = :idx_jira_connect_subscriptions_on_installation_id
+ TABLE_NAME = :jira_connect_subscriptions
+
+ def up
+ remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index TABLE_NAME, :jira_connect_installation_id, name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20231122124815_drop_index_bulk_import_batch_trackers_on_tracker_id.rb b/db/post_migrate/20231122124815_drop_index_bulk_import_batch_trackers_on_tracker_id.rb
new file mode 100644
index 00000000000..46e0df5cde9
--- /dev/null
+++ b/db/post_migrate/20231122124815_drop_index_bulk_import_batch_trackers_on_tracker_id.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class DropIndexBulkImportBatchTrackersOnTrackerId < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+
+ milestone '16.7'
+
+ INDEX_NAME = :index_bulk_import_batch_trackers_on_tracker_id
+ TABLE_NAME = :bulk_import_batch_trackers
+
+ def up
+ remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index TABLE_NAME, :tracker_id, name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20231122125550_drop_index_bulk_import_export_batches_on_export_id.rb b/db/post_migrate/20231122125550_drop_index_bulk_import_export_batches_on_export_id.rb
new file mode 100644
index 00000000000..295eae13c06
--- /dev/null
+++ b/db/post_migrate/20231122125550_drop_index_bulk_import_export_batches_on_export_id.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class DropIndexBulkImportExportBatchesOnExportId < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+
+ milestone '16.7'
+
+ INDEX_NAME = :index_bulk_import_export_batches_on_export_id
+ TABLE_NAME = :bulk_import_export_batches
+
+ def up
+ remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index TABLE_NAME, :export_id, name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20231122130721_drop_index_project_relation_exports_on_project_export_job_id.rb b/db/post_migrate/20231122130721_drop_index_project_relation_exports_on_project_export_job_id.rb
new file mode 100644
index 00000000000..b84852ba596
--- /dev/null
+++ b/db/post_migrate/20231122130721_drop_index_project_relation_exports_on_project_export_job_id.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class DropIndexProjectRelationExportsOnProjectExportJobId < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+
+ milestone '16.7'
+
+ INDEX_NAME = :index_project_relation_exports_on_project_export_job_id
+ TABLE_NAME = :project_relation_exports
+
+ def up
+ remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index TABLE_NAME, :project_export_job_id, name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20231124084532_remove_security_orchestration_policy_configurations_bot_user_id_column.rb b/db/post_migrate/20231124084532_remove_security_orchestration_policy_configurations_bot_user_id_column.rb
new file mode 100644
index 00000000000..0437864c7d9
--- /dev/null
+++ b/db/post_migrate/20231124084532_remove_security_orchestration_policy_configurations_bot_user_id_column.rb
@@ -0,0 +1,25 @@
+# frozen_string_literal: true
+
+class RemoveSecurityOrchestrationPolicyConfigurationsBotUserIdColumn < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+
+ milestone '16.7'
+
+ TABLE = :security_orchestration_policy_configurations
+ COLUMN = :bot_user_id
+ INDEX = "index_security_policy_configurations_on_bot_user_id"
+
+ def up
+ remove_column(TABLE, COLUMN)
+ end
+
+ def down
+ add_column(TABLE, COLUMN, :integer) unless column_exists?(TABLE, COLUMN)
+
+ add_concurrent_foreign_key(TABLE, :users, column: COLUMN, on_delete: :nullify)
+
+ add_concurrent_index(TABLE, COLUMN,
+ where: "security_orchestration_policy_configurations.bot_user_id IS NOT NULL",
+ name: INDEX)
+ end
+end
diff --git a/db/post_migrate/20231124105726_drop_idx_service_desk_enabled_projects_on_id_creator_id_created_at_for_gitlab_com.rb b/db/post_migrate/20231124105726_drop_idx_service_desk_enabled_projects_on_id_creator_id_created_at_for_gitlab_com.rb
new file mode 100644
index 00000000000..96adba81123
--- /dev/null
+++ b/db/post_migrate/20231124105726_drop_idx_service_desk_enabled_projects_on_id_creator_id_created_at_for_gitlab_com.rb
@@ -0,0 +1,33 @@
+# frozen_string_literal: true
+
+class DropIdxServiceDeskEnabledProjectsOnIdCreatorIdCreatedAtForGitlabCom < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ TABLE_NAME = :projects
+ INDEX_NAME = :index_service_desk_enabled_projects_on_id_creator_id_created_at
+
+ def up
+ return unless should_run?
+
+ remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
+ end
+
+ def down
+ return unless should_run?
+
+ add_concurrent_index(
+ TABLE_NAME,
+ [:id, :creator_id, :created_at],
+ where: 'service_desk_enabled = TRUE',
+ name: INDEX_NAME
+ )
+ end
+
+ private
+
+ def should_run?
+ Gitlab.com_except_jh?
+ end
+end
diff --git a/db/post_migrate/20231124124600_drop_idx_projects_mirror_id_where_mirror_and_trigger_builds_for_gitlab_com.rb b/db/post_migrate/20231124124600_drop_idx_projects_mirror_id_where_mirror_and_trigger_builds_for_gitlab_com.rb
new file mode 100644
index 00000000000..8e35a610361
--- /dev/null
+++ b/db/post_migrate/20231124124600_drop_idx_projects_mirror_id_where_mirror_and_trigger_builds_for_gitlab_com.rb
@@ -0,0 +1,28 @@
+# frozen_string_literal: true
+
+class DropIdxProjectsMirrorIdWhereMirrorAndTriggerBuildsForGitlabCom < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ TABLE_NAME = :projects
+ INDEX_NAME = :index_projects_on_mirror_id_where_mirror_and_trigger_builds
+
+ def up
+ return unless should_run?
+
+ remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
+ end
+
+ def down
+ return unless should_run?
+
+ add_concurrent_index TABLE_NAME, :id, where: 'mirror = TRUE AND mirror_trigger_builds = TRUE', name: INDEX_NAME
+ end
+
+ private
+
+ def should_run?
+ Gitlab.com_except_jh?
+ end
+end
diff --git a/db/post_migrate/20231124124750_drop_idx_projects_on_mirror_creator_id_created_at_for_gitlab_com.rb b/db/post_migrate/20231124124750_drop_idx_projects_on_mirror_creator_id_created_at_for_gitlab_com.rb
new file mode 100644
index 00000000000..2ea4967a154
--- /dev/null
+++ b/db/post_migrate/20231124124750_drop_idx_projects_on_mirror_creator_id_created_at_for_gitlab_com.rb
@@ -0,0 +1,33 @@
+# frozen_string_literal: true
+
+class DropIdxProjectsOnMirrorCreatorIdCreatedAtForGitlabCom < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ TABLE_NAME = :projects
+ INDEX_NAME = :index_projects_on_mirror_creator_id_created_at
+
+ def up
+ return unless should_run?
+
+ remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
+ end
+
+ def down
+ return unless should_run?
+
+ add_concurrent_index(
+ TABLE_NAME,
+ [:creator_id, :created_at],
+ where: 'mirror = true and mirror_trigger_builds = true',
+ name: INDEX_NAME
+ )
+ end
+
+ private
+
+ def should_run?
+ Gitlab.com_except_jh?
+ end
+end
diff --git a/db/post_migrate/20231124125007_drop_idx_projects_on_id_service_desk_enabled_for_gitlab_com.rb b/db/post_migrate/20231124125007_drop_idx_projects_on_id_service_desk_enabled_for_gitlab_com.rb
new file mode 100644
index 00000000000..1bcdf18ae78
--- /dev/null
+++ b/db/post_migrate/20231124125007_drop_idx_projects_on_id_service_desk_enabled_for_gitlab_com.rb
@@ -0,0 +1,28 @@
+# frozen_string_literal: true
+
+class DropIdxProjectsOnIdServiceDeskEnabledForGitlabCom < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ TABLE_NAME = :projects
+ INDEX_NAME = :index_projects_on_id_service_desk_enabled
+
+ def up
+ return unless should_run?
+
+ remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
+ end
+
+ def down
+ return unless should_run?
+
+ add_concurrent_index TABLE_NAME, :id, where: 'service_desk_enabled = true', name: INDEX_NAME
+ end
+
+ private
+
+ def should_run?
+ Gitlab.com_except_jh?
+ end
+end
diff --git a/db/post_migrate/20231124132953_drop_idx_projects_id_created_at_disable_overriding_approvers_true_for_gitlab_com.rb b/db/post_migrate/20231124132953_drop_idx_projects_id_created_at_disable_overriding_approvers_true_for_gitlab_com.rb
new file mode 100644
index 00000000000..1d63c3ddb64
--- /dev/null
+++ b/db/post_migrate/20231124132953_drop_idx_projects_id_created_at_disable_overriding_approvers_true_for_gitlab_com.rb
@@ -0,0 +1,33 @@
+# frozen_string_literal: true
+
+class DropIdxProjectsIdCreatedAtDisableOverridingApproversTrueForGitlabCom < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ TABLE_NAME = :projects
+ INDEX_NAME = :idx_projects_id_created_at_disable_overriding_approvers_true
+
+ def up
+ return unless should_run?
+
+ remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
+ end
+
+ def down
+ return unless should_run?
+
+ add_concurrent_index(
+ TABLE_NAME,
+ [:id, :created_at],
+ where: "disable_overriding_approvers_per_merge_request = TRUE",
+ name: INDEX_NAME
+ )
+ end
+
+ private
+
+ def should_run?
+ Gitlab.com_except_jh?
+ end
+end
diff --git a/db/post_migrate/20231124133015_drop_idx_projects_id_created_at_disable_overriding_approvers_false_for_gitlab_com.rb b/db/post_migrate/20231124133015_drop_idx_projects_id_created_at_disable_overriding_approvers_false_for_gitlab_com.rb
new file mode 100644
index 00000000000..8da8d726ab8
--- /dev/null
+++ b/db/post_migrate/20231124133015_drop_idx_projects_id_created_at_disable_overriding_approvers_false_for_gitlab_com.rb
@@ -0,0 +1,34 @@
+# frozen_string_literal: true
+
+class DropIdxProjectsIdCreatedAtDisableOverridingApproversFalseForGitlabCom < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ TABLE_NAME = :projects
+ INDEX_NAME = :idx_projects_id_created_at_disable_overriding_approvers_false
+
+ def up
+ return unless should_run?
+
+ remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
+ end
+
+ def down
+ return unless should_run?
+
+ add_concurrent_index(
+ TABLE_NAME,
+ [:id, :created_at],
+ where: "(disable_overriding_approvers_per_merge_request = FALSE) OR " \
+ "(disable_overriding_approvers_per_merge_request IS NULL)",
+ name: INDEX_NAME
+ )
+ end
+
+ private
+
+ def should_run?
+ Gitlab.com_except_jh?
+ end
+end
diff --git a/db/post_migrate/20231124180449_add_index_updated_at_to_bulk_import_batch_trackers.rb b/db/post_migrate/20231124180449_add_index_updated_at_to_bulk_import_batch_trackers.rb
new file mode 100644
index 00000000000..1503a4e9ea7
--- /dev/null
+++ b/db/post_migrate/20231124180449_add_index_updated_at_to_bulk_import_batch_trackers.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexUpdatedAtToBulkImportBatchTrackers < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+ milestone '16.7'
+
+ INDEX = 'index_bulk_import_batch_trackers_on_tracker_id_and_updated_at'
+
+ def up
+ add_concurrent_index :bulk_import_batch_trackers,
+ [:tracker_id, :updated_at],
+ name: INDEX
+ end
+
+ def down
+ remove_concurrent_index_by_name :bulk_import_batch_trackers, name: INDEX
+ end
+end
diff --git a/db/post_migrate/20231124213241_add_index_to_bulk_imports_on_updated_at_and_status.rb b/db/post_migrate/20231124213241_add_index_to_bulk_imports_on_updated_at_and_status.rb
new file mode 100644
index 00000000000..c3e657a4873
--- /dev/null
+++ b/db/post_migrate/20231124213241_add_index_to_bulk_imports_on_updated_at_and_status.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class AddIndexToBulkImportsOnUpdatedAtAndStatus < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ disable_ddl_transaction!
+
+ INDEX_NAME = 'index_bulk_imports_on_updated_at_and_id_for_stale_status'
+
+ def up
+ add_concurrent_index :bulk_imports, [:updated_at, :id],
+ where: 'STATUS in (0, 1)', name: INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_index_by_name :bulk_imports, name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20231126220000_cleanup_container_registry_protection_rules_container_path_pattern_at_rename.rb b/db/post_migrate/20231126220000_cleanup_container_registry_protection_rules_container_path_pattern_at_rename.rb
new file mode 100644
index 00000000000..e3f8c53199a
--- /dev/null
+++ b/db/post_migrate/20231126220000_cleanup_container_registry_protection_rules_container_path_pattern_at_rename.rb
@@ -0,0 +1,27 @@
+# frozen_string_literal: true
+
+class CleanupContainerRegistryProtectionRulesContainerPathPatternAtRename < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ def up
+ cleanup_concurrent_column_rename :container_registry_protection_rules, :container_path_pattern,
+ :repository_path_pattern
+ end
+
+ def down
+ undo_cleanup_concurrent_column_rename :container_registry_protection_rules, :container_path_pattern,
+ :repository_path_pattern
+
+ # Restoring the old index name `:i_container_protection_unique_project_id_container_path_pattern`
+ # that was changed in the following migrations:
+ # - `db/migrate/20231126200903_rename_container_registry_protection_rules_container_path_pattern.rb`
+ # - `db/migrate/20231126200904_rename_index_i_container_protection_unique_project_id_container_path_pattern.rb`
+ if index_exists?(:container_registry_protection_rules, [:project_id, :container_path_pattern],
+ name: :i_container_protection_unique_project_container_path_pattern)
+ rename_index :container_registry_protection_rules, :i_container_protection_unique_project_container_path_pattern,
+ :i_container_protection_unique_project_id_container_path_pattern
+ end
+ end
+end
diff --git a/db/post_migrate/20231127171903_remove_application_settings_columns.rb b/db/post_migrate/20231127171903_remove_application_settings_columns.rb
new file mode 100644
index 00000000000..9400c036678
--- /dev/null
+++ b/db/post_migrate/20231127171903_remove_application_settings_columns.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+
+class RemoveApplicationSettingsColumns < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ def up
+ remove_column :application_settings, :elasticsearch_shards, if_exists: true
+ remove_column :application_settings, :elasticsearch_replicas, if_exists: true
+ remove_column :application_settings, :static_objects_external_storage_auth_token, if_exists: true
+ remove_column :application_settings, :web_ide_clientside_preview_enabled, if_exists: true
+ end
+
+ def down
+ add_column :application_settings, :elasticsearch_shards, :integer, default: 5, null: false, if_not_exists: true
+ add_column :application_settings, :elasticsearch_replicas, :integer, default: 1, null: false, if_not_exists: true
+ add_column :application_settings, :static_objects_external_storage_auth_token, :string, limit: 255,
+ if_not_exists: true
+ add_column :application_settings, :web_ide_clientside_preview_enabled, :boolean, default: false, null: false,
+ if_not_exists: true
+ end
+end
diff --git a/db/post_migrate/20231127174335_remove_ignored_application_settings_columns.rb b/db/post_migrate/20231127174335_remove_ignored_application_settings_columns.rb
new file mode 100644
index 00000000000..07cabb93d96
--- /dev/null
+++ b/db/post_migrate/20231127174335_remove_ignored_application_settings_columns.rb
@@ -0,0 +1,28 @@
+# frozen_string_literal: true
+
+class RemoveIgnoredApplicationSettingsColumns < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ PROJECT_INDEX_NAME = 'index_applicationsettings_on_instance_administration_project_id'
+ GROUP_INDEX_NAME = 'index_application_settings_on_instance_administrators_group_id'
+
+ def up
+ remove_column(:application_settings, :instance_administration_project_id)
+ remove_column(:application_settings, :instance_administrators_group_id)
+ end
+
+ def down
+ unless column_exists?(:users, :instance_administration_project_id)
+ add_column(:application_settings, :instance_administration_project_id, :bigint)
+ end
+
+ unless column_exists?(:users, :instance_administrators_group_id)
+ add_column(:application_settings, :instance_administrators_group_id, :integer)
+ end
+
+ add_concurrent_index(:application_settings, :instance_administration_project_id, name: PROJECT_INDEX_NAME)
+ add_concurrent_index(:application_settings, :instance_administrators_group_id, name: GROUP_INDEX_NAME)
+ end
+end
diff --git a/db/post_migrate/20231127185327_fix_broken_user_achievements_awarded.rb b/db/post_migrate/20231127185327_fix_broken_user_achievements_awarded.rb
new file mode 100644
index 00000000000..f23cace49a7
--- /dev/null
+++ b/db/post_migrate/20231127185327_fix_broken_user_achievements_awarded.rb
@@ -0,0 +1,28 @@
+# frozen_string_literal: true
+
+class FixBrokenUserAchievementsAwarded < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ milestone '16.7'
+
+ class User < MigrationRecord
+ self.table_name = 'users'
+ end
+
+ def up
+ User.reset_column_information
+
+ ghost_id = User.where(user_type: 5).first&.id
+
+ return unless ghost_id
+
+ update_column_in_batches(:user_achievements, :awarded_by_user_id, ghost_id) do |table, query|
+ query.where(table[:awarded_by_user_id].eq(nil))
+ end
+ end
+
+ def down
+ # noop -- this is a data migration and can't be reversed
+ end
+end
diff --git a/db/post_migrate/20231127185328_fix_broken_user_achievements_revoked.rb b/db/post_migrate/20231127185328_fix_broken_user_achievements_revoked.rb
new file mode 100644
index 00000000000..548a85b8814
--- /dev/null
+++ b/db/post_migrate/20231127185328_fix_broken_user_achievements_revoked.rb
@@ -0,0 +1,28 @@
+# frozen_string_literal: true
+
+class FixBrokenUserAchievementsRevoked < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ milestone '16.7'
+
+ class User < MigrationRecord
+ self.table_name = 'users'
+ end
+
+ def up
+ User.reset_column_information
+
+ ghost_id = User.where(user_type: 5).first&.id
+
+ return unless ghost_id
+
+ update_column_in_batches(:user_achievements, :revoked_by_user_id, ghost_id) do |table, query|
+ query.where(table[:revoked_at].not_eq(nil)).where(table[:revoked_by_user_id].eq(nil))
+ end
+ end
+
+ def down
+ # noop -- this is a data migration and can't be reversed
+ end
+end
diff --git a/db/post_migrate/20231128103624_add_unique_id_partition_id_index_to_ci_job_artifact.rb b/db/post_migrate/20231128103624_add_unique_id_partition_id_index_to_ci_job_artifact.rb
new file mode 100644
index 00000000000..504864f75c9
--- /dev/null
+++ b/db/post_migrate/20231128103624_add_unique_id_partition_id_index_to_ci_job_artifact.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class AddUniqueIdPartitionIdIndexToCiJobArtifact < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ TABLE_NAME = :ci_job_artifacts
+ INDEX_NAME = :index_ci_job_artifacts_on_id_partition_id_unique
+ COLUMNS = %i[id partition_id]
+
+ def up
+ prepare_async_index(TABLE_NAME, COLUMNS, unique: true, name: INDEX_NAME)
+ end
+
+ def down
+ unprepare_async_index(TABLE_NAME, COLUMNS, name: INDEX_NAME)
+ end
+end
diff --git a/db/post_migrate/20231128104044_add_unique_job_id_filte_type_partition_id_index_to_ci_job_artifact.rb b/db/post_migrate/20231128104044_add_unique_job_id_filte_type_partition_id_index_to_ci_job_artifact.rb
new file mode 100644
index 00000000000..c667dce511f
--- /dev/null
+++ b/db/post_migrate/20231128104044_add_unique_job_id_filte_type_partition_id_index_to_ci_job_artifact.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class AddUniqueJobIdFilteTypePartitionIdIndexToCiJobArtifact < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ TABLE_NAME = :ci_job_artifacts
+ INDEX_NAME = :idx_ci_job_artifacts_on_job_id_file_type_and_partition_id_uniq
+ COLUMNS = %i[job_id file_type partition_id]
+
+ def up
+ prepare_async_index(TABLE_NAME, COLUMNS, unique: true, name: INDEX_NAME)
+ end
+
+ def down
+ unprepare_async_index(TABLE_NAME, COLUMNS, name: INDEX_NAME)
+ end
+end
diff --git a/db/post_migrate/20231128111550_add_async_indexes_with_partition_id_for_ci_pipeline_variables.rb b/db/post_migrate/20231128111550_add_async_indexes_with_partition_id_for_ci_pipeline_variables.rb
new file mode 100644
index 00000000000..9539bbcca31
--- /dev/null
+++ b/db/post_migrate/20231128111550_add_async_indexes_with_partition_id_for_ci_pipeline_variables.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class AddAsyncIndexesWithPartitionIdForCiPipelineVariables < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ TABLE_NAME = :ci_pipeline_variables
+ PK_INDEX_NAME = :index_ci_pipeline_variables_on_id_partition_id_unique
+ UNIQUE_INDEX_NAME = :index_pipeline_variables_on_pipeline_id_key_partition_id_unique
+
+ def up
+ prepare_async_index TABLE_NAME, %i[id partition_id], name: PK_INDEX_NAME, unique: true
+ prepare_async_index TABLE_NAME, %i[pipeline_id key partition_id], name: UNIQUE_INDEX_NAME, unique: true
+ end
+
+ def down
+ unprepare_async_index TABLE_NAME, %i[id partition_id], name: PK_INDEX_NAME, unique: true
+ unprepare_async_index TABLE_NAME, %i[pipeline_id key partition_id], name: UNIQUE_INDEX_NAME, unique: true
+ end
+end
diff --git a/db/post_migrate/20231128155514_finalize_backfill_admin_mode_scope_for_personal_access_tokens.rb b/db/post_migrate/20231128155514_finalize_backfill_admin_mode_scope_for_personal_access_tokens.rb
new file mode 100644
index 00000000000..ccdd9454081
--- /dev/null
+++ b/db/post_migrate/20231128155514_finalize_backfill_admin_mode_scope_for_personal_access_tokens.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class FinalizeBackfillAdminModeScopeForPersonalAccessTokens < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ ensure_batched_background_migration_is_finished(
+ job_class_name: 'BackfillAdminModeScopeForPersonalAccessTokens',
+ table_name: :personal_access_tokens,
+ column_name: :id,
+ job_arguments: [],
+ finalize: true
+ )
+ end
+
+ def down; end
+end
diff --git a/db/post_migrate/20231128174345_remove_users_project_authorizations_user_id_fk.rb b/db/post_migrate/20231128174345_remove_users_project_authorizations_user_id_fk.rb
new file mode 100644
index 00000000000..faffce473a7
--- /dev/null
+++ b/db/post_migrate/20231128174345_remove_users_project_authorizations_user_id_fk.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class RemoveUsersProjectAuthorizationsUserIdFk < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ disable_ddl_transaction!
+
+ FOREIGN_KEY_NAME = "fk_rails_11e7aa3ed9"
+
+ def up
+ with_lock_retries do
+ remove_foreign_key_if_exists(:project_authorizations, :users,
+ name: FOREIGN_KEY_NAME, reverse_lock_order: true)
+ end
+ end
+
+ def down
+ add_concurrent_foreign_key(:project_authorizations, :users,
+ name: FOREIGN_KEY_NAME, column: :user_id,
+ target_column: :id, on_delete: :cascade)
+ end
+end
diff --git a/db/post_migrate/20231128201403_drop_index_users_for_auditors_for_gitlab_com.rb b/db/post_migrate/20231128201403_drop_index_users_for_auditors_for_gitlab_com.rb
new file mode 100644
index 00000000000..fc452f7bfc0
--- /dev/null
+++ b/db/post_migrate/20231128201403_drop_index_users_for_auditors_for_gitlab_com.rb
@@ -0,0 +1,26 @@
+# frozen_string_literal: true
+
+class DropIndexUsersForAuditorsForGitlabCom < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ TABLE_NAME = :users
+ INDEX_NAME = :index_users_for_auditors
+
+ def up
+ return unless should_run?
+
+ remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
+ end
+
+ def down
+ return unless should_run?
+
+ add_concurrent_index TABLE_NAME, :created_at, name: INDEX_NAME
+ end
+
+ def should_run?
+ Gitlab.com_except_jh?
+ end
+end
diff --git a/db/post_migrate/20231129105945_requeue_backfill_finding_id_in_vulnerabilities3.rb b/db/post_migrate/20231129105945_requeue_backfill_finding_id_in_vulnerabilities3.rb
new file mode 100644
index 00000000000..8dd42dc4000
--- /dev/null
+++ b/db/post_migrate/20231129105945_requeue_backfill_finding_id_in_vulnerabilities3.rb
@@ -0,0 +1,34 @@
+# frozen_string_literal: true
+
+class RequeueBackfillFindingIdInVulnerabilities3 < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ MIGRATION = "BackfillFindingIdInVulnerabilities"
+ DELAY_INTERVAL = 2.minutes
+ BATCH_SIZE = 1000
+ SUB_BATCH_SIZE = 100
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ delete_batched_background_migration(
+ MIGRATION,
+ :vulnerabilities,
+ :id,
+ []
+ )
+
+ queue_batched_background_migration(
+ MIGRATION,
+ :vulnerabilities,
+ :id,
+ job_interval: DELAY_INTERVAL,
+ batch_size: BATCH_SIZE,
+ sub_batch_size: SUB_BATCH_SIZE
+ )
+ end
+
+ def down
+ delete_batched_background_migration(MIGRATION, :vulnerabilities, :id, [])
+ end
+end
diff --git a/db/post_migrate/20231129132636_prepare_indexes_for_partitioning_ci_pipeline_variables.rb b/db/post_migrate/20231129132636_prepare_indexes_for_partitioning_ci_pipeline_variables.rb
new file mode 100644
index 00000000000..efa0f6597e3
--- /dev/null
+++ b/db/post_migrate/20231129132636_prepare_indexes_for_partitioning_ci_pipeline_variables.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+class PrepareIndexesForPartitioningCiPipelineVariables < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ disable_ddl_transaction!
+
+ TABLE_NAME = :ci_pipeline_variables
+ PK_INDEX_NAME = :index_ci_pipeline_variables_on_id_partition_id_unique
+ UNIQUE_INDEX_NAME = :index_pipeline_variables_on_pipeline_id_key_partition_id_unique
+
+ def up
+ add_concurrent_index(TABLE_NAME, %i[id partition_id], unique: true, name: PK_INDEX_NAME)
+ add_concurrent_index(TABLE_NAME, %i[pipeline_id key partition_id], unique: true, name: UNIQUE_INDEX_NAME)
+ end
+
+ def down
+ remove_concurrent_index_by_name(TABLE_NAME, PK_INDEX_NAME)
+ remove_concurrent_index_by_name(TABLE_NAME, UNIQUE_INDEX_NAME)
+ end
+end
diff --git a/db/post_migrate/20231129154701_remove_users_events_author_id_fk.rb b/db/post_migrate/20231129154701_remove_users_events_author_id_fk.rb
new file mode 100644
index 00000000000..615715227ef
--- /dev/null
+++ b/db/post_migrate/20231129154701_remove_users_events_author_id_fk.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class RemoveUsersEventsAuthorIdFk < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+ milestone '16.7'
+
+ FOREIGN_KEY_NAME = "fk_edfd187b6f"
+
+ def up
+ with_lock_retries do
+ remove_foreign_key_if_exists(:events, :users,
+ name: FOREIGN_KEY_NAME, reverse_lock_order: true)
+ end
+ end
+
+ def down
+ add_concurrent_foreign_key(:events, :users,
+ name: FOREIGN_KEY_NAME, column: :author_id,
+ target_column: :id, on_delete: :cascade)
+ end
+end
diff --git a/db/post_migrate/20231129170203_remove_requirements_ignored_columns.rb b/db/post_migrate/20231129170203_remove_requirements_ignored_columns.rb
new file mode 100644
index 00000000000..d85f07e5d05
--- /dev/null
+++ b/db/post_migrate/20231129170203_remove_requirements_ignored_columns.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class RemoveRequirementsIgnoredColumns < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ def up
+ # no-op to mitigate https://gitlab.com/gitlab-com/gl-infra/production/-/issues/17224
+ end
+
+ def down
+ # no-op to mitigate https://gitlab.com/gitlab-com/gl-infra/production/-/issues/17224
+ end
+end
diff --git a/db/post_migrate/20231129192345_drop_projects_on_path_and_id_index.rb b/db/post_migrate/20231129192345_drop_projects_on_path_and_id_index.rb
new file mode 100644
index 00000000000..825cb8bb8d2
--- /dev/null
+++ b/db/post_migrate/20231129192345_drop_projects_on_path_and_id_index.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class DropProjectsOnPathAndIdIndex < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ TABLE_NAME = :projects
+ INDEX_NAME = :index_projects_on_path_and_id
+
+ def up
+ remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index TABLE_NAME, [:path, :id], name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20231130131808_remove_indexes_without_partition_id_from_ci_pipeline_variables.rb b/db/post_migrate/20231130131808_remove_indexes_without_partition_id_from_ci_pipeline_variables.rb
new file mode 100644
index 00000000000..39ba44dc0fd
--- /dev/null
+++ b/db/post_migrate/20231130131808_remove_indexes_without_partition_id_from_ci_pipeline_variables.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class RemoveIndexesWithoutPartitionIdFromCiPipelineVariables < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ disable_ddl_transaction!
+
+ TABLE_NAME = :ci_pipeline_variables
+ OLD_UNIQUE_INDEX_NAME = :index_ci_pipeline_variables_on_pipeline_id_and_key
+
+ def up
+ remove_concurrent_index_by_name(TABLE_NAME, OLD_UNIQUE_INDEX_NAME)
+ end
+
+ def down
+ add_concurrent_index(TABLE_NAME, %i[pipeline_id key], unique: true, name: OLD_UNIQUE_INDEX_NAME)
+ end
+end
diff --git a/db/post_migrate/20231130140901_queue_backfill_vs_code_settings_uuid.rb b/db/post_migrate/20231130140901_queue_backfill_vs_code_settings_uuid.rb
new file mode 100644
index 00000000000..7acfed7d154
--- /dev/null
+++ b/db/post_migrate/20231130140901_queue_backfill_vs_code_settings_uuid.rb
@@ -0,0 +1,27 @@
+# frozen_string_literal: true
+
+class QueueBackfillVsCodeSettingsUuid < Gitlab::Database::Migration[2.2]
+ milestone "16.7"
+
+ MIGRATION = "BackfillVsCodeSettingsUuid"
+ DELAY_INTERVAL = 2.minutes
+ BATCH_SIZE = 1000
+ SUB_BATCH_SIZE = 100
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ queue_batched_background_migration(
+ MIGRATION,
+ :vs_code_settings,
+ :id,
+ job_interval: DELAY_INTERVAL,
+ batch_size: BATCH_SIZE,
+ sub_batch_size: SUB_BATCH_SIZE
+ )
+ end
+
+ def down
+ delete_batched_background_migration(MIGRATION, :vs_code_settings, :id, [])
+ end
+end
diff --git a/db/post_migrate/20231130142218_async_create_supporting_index_for_finding_id_backfill.rb b/db/post_migrate/20231130142218_async_create_supporting_index_for_finding_id_backfill.rb
new file mode 100644
index 00000000000..95cad1d4e94
--- /dev/null
+++ b/db/post_migrate/20231130142218_async_create_supporting_index_for_finding_id_backfill.rb
@@ -0,0 +1,25 @@
+# frozen_string_literal: true
+
+class AsyncCreateSupportingIndexForFindingIdBackfill < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ INDEX_NAME = "tmp_index_vulnerabilities_on_id_finding_id_empty"
+
+ # TODO: Index to be created synchronously in https://gitlab.com/gitlab-org/gitlab/-/issues/433253
+ def up
+ prepare_async_index(
+ :vulnerabilities,
+ :id,
+ where: "finding_id IS NULL",
+ name: INDEX_NAME
+ )
+ end
+
+ def down
+ unprepare_async_index(
+ :vulnerabilities,
+ :id,
+ name: INDEX_NAME
+ )
+ end
+end
diff --git a/db/post_migrate/20231130193042_add_index_to_bulk_import_entities_on_updated_at_and_status.rb b/db/post_migrate/20231130193042_add_index_to_bulk_import_entities_on_updated_at_and_status.rb
new file mode 100644
index 00000000000..318dea4ef79
--- /dev/null
+++ b/db/post_migrate/20231130193042_add_index_to_bulk_import_entities_on_updated_at_and_status.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class AddIndexToBulkImportEntitiesOnUpdatedAtAndStatus < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ disable_ddl_transaction!
+
+ INDEX_NAME = 'index_bulk_import_entities_for_stale_status'
+
+ def up
+ add_concurrent_index :bulk_import_entities, [:updated_at, :id],
+ where: 'status in (0, 1)', name: INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_index_by_name :bulk_import_entities, name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20231130200216_drop_projects_on_created_at_and_id_index.rb b/db/post_migrate/20231130200216_drop_projects_on_created_at_and_id_index.rb
new file mode 100644
index 00000000000..ed033fa0f66
--- /dev/null
+++ b/db/post_migrate/20231130200216_drop_projects_on_created_at_and_id_index.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class DropProjectsOnCreatedAtAndIdIndex < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ TABLE_NAME = :projects
+ INDEX_NAME = :index_projects_on_created_at_and_id
+
+ def up
+ remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index TABLE_NAME, [:created_at, :id], name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20231201144826_finalize_backfill_dismissal_reason_in_vulnerability_reads.rb b/db/post_migrate/20231201144826_finalize_backfill_dismissal_reason_in_vulnerability_reads.rb
new file mode 100644
index 00000000000..bb85fff2ebd
--- /dev/null
+++ b/db/post_migrate/20231201144826_finalize_backfill_dismissal_reason_in_vulnerability_reads.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class FinalizeBackfillDismissalReasonInVulnerabilityReads < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ # no-op to fix to mitigate https://gitlab.com/gitlab-com/gl-infra/production/-/issues/17224
+ end
+
+ def down; end
+end
diff --git a/db/post_migrate/20231201171229_detect_and_fix_duplicate_organizations_path.rb b/db/post_migrate/20231201171229_detect_and_fix_duplicate_organizations_path.rb
new file mode 100644
index 00000000000..3b63cfef5ea
--- /dev/null
+++ b/db/post_migrate/20231201171229_detect_and_fix_duplicate_organizations_path.rb
@@ -0,0 +1,35 @@
+# frozen_string_literal: true
+
+class DetectAndFixDuplicateOrganizationsPath < Gitlab::Database::Migration[2.2]
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+ milestone '16.7'
+
+ module Organizations
+ class Organization < Gitlab::Database::Migration[2.2]::MigrationRecord
+ end
+ end
+
+ def up
+ duplicate_paths = Organizations::Organization.group("lower(path)").having("count(path) > 1").count.keys
+ duplicate_paths.each do |dup_path|
+ # the first one found is the 'winner' here and so we'll drop it an only focus on others
+ Organizations::Organization.where('lower(path) = ?', dup_path).order(id: :asc).drop(1).each do |dup_path_record|
+ dup_path_record.update!(path: clean_path(dup_path_record.path))
+ end
+ end
+ end
+
+ def down
+ # no-op no reversal required here.
+ end
+
+ private
+
+ def clean_path(path)
+ slug = Gitlab::Slug::Path.new(path).generate
+ path = Namespaces::RandomizedSuffixPath.new(slug)
+ Gitlab::Utils::Uniquify.new.string(path) do |s|
+ Organizations::Organization.find_by('lower(path) = :value', value: s.downcase)
+ end
+ end
+end
diff --git a/db/post_migrate/20231201172203_add_organizations_path_unique_with_case_sensitivity.rb b/db/post_migrate/20231201172203_add_organizations_path_unique_with_case_sensitivity.rb
new file mode 100644
index 00000000000..60ef6d8a2cb
--- /dev/null
+++ b/db/post_migrate/20231201172203_add_organizations_path_unique_with_case_sensitivity.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class AddOrganizationsPathUniqueWithCaseSensitivity < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+ milestone '16.7'
+
+ INDEX_NAME = 'unique_organizations_on_path_case_insensitive'
+
+ def up
+ add_concurrent_index :organizations, '(lower(path))', unique: true, name: INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_index_by_name :organizations, INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20231201204712_requeue2_backfill_has_remediations_of_vulnerability_reads.rb b/db/post_migrate/20231201204712_requeue2_backfill_has_remediations_of_vulnerability_reads.rb
new file mode 100644
index 00000000000..35b6de08f10
--- /dev/null
+++ b/db/post_migrate/20231201204712_requeue2_backfill_has_remediations_of_vulnerability_reads.rb
@@ -0,0 +1,34 @@
+# frozen_string_literal: true
+
+# rubocop: disable BackgroundMigration/DictionaryFile -- queued/introduced before the rule is introduced
+
+class Requeue2BackfillHasRemediationsOfVulnerabilityReads < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ MIGRATION = "BackfillHasRemediationsOfVulnerabilityReads"
+ DELAY_INTERVAL = 2.minutes
+ BATCH_SIZE = 10_000
+ SUB_BATCH_SIZE = 50
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+ disable_ddl_transaction!
+
+ def up
+ # remove the original migration
+ delete_batched_background_migration(MIGRATION, :vulnerability_reads, :vulnerability_id, [])
+
+ queue_batched_background_migration(
+ MIGRATION,
+ :vulnerability_reads,
+ :vulnerability_id,
+ job_interval: DELAY_INTERVAL,
+ batch_size: BATCH_SIZE,
+ sub_batch_size: SUB_BATCH_SIZE
+ )
+ end
+
+ def down
+ delete_batched_background_migration(MIGRATION, :vulnerability_reads, :vulnerability_id, [])
+ end
+end
+# rubocop: enable BackgroundMigration/DictionaryFile
diff --git a/db/post_migrate/20231202175941_index_projects_on_organization_id_and_id.rb b/db/post_migrate/20231202175941_index_projects_on_organization_id_and_id.rb
new file mode 100644
index 00000000000..a536def7ff3
--- /dev/null
+++ b/db/post_migrate/20231202175941_index_projects_on_organization_id_and_id.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class IndexProjectsOnOrganizationIdAndId < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ disable_ddl_transaction!
+
+ INDEX_NAME = "index_projects_on_organization_id_and_id"
+
+ def up
+ # rubocop:disable Migration/PreventIndexCreation -- Replacing existing index
+ # on organization_id with an index on (organization_id, id)
+ add_concurrent_index :projects, [:organization_id, :id], name: INDEX_NAME
+ # rubocop:enable Migration/PreventIndexCreation
+ end
+
+ def down
+ remove_concurrent_index :projects, [:organization_id, :id], name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20231202180101_remove_index_on_organization_id_projects_table.rb b/db/post_migrate/20231202180101_remove_index_on_organization_id_projects_table.rb
new file mode 100644
index 00000000000..ec5a6d33ca3
--- /dev/null
+++ b/db/post_migrate/20231202180101_remove_index_on_organization_id_projects_table.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class RemoveIndexOnOrganizationIdProjectsTable < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ disable_ddl_transaction!
+
+ INDEX_NAME = 'index_projects_on_organization_id'
+
+ def up
+ remove_concurrent_index_by_name :projects, INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index :projects, :organization_id, name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20231204090310_add_unique_index_id_partition_id_to_ci_job_artifact.rb b/db/post_migrate/20231204090310_add_unique_index_id_partition_id_to_ci_job_artifact.rb
new file mode 100644
index 00000000000..9d6aef69877
--- /dev/null
+++ b/db/post_migrate/20231204090310_add_unique_index_id_partition_id_to_ci_job_artifact.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class AddUniqueIndexIdPartitionIdToCiJobArtifact < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ disable_ddl_transaction!
+ TABLE_NAME = :ci_job_artifacts
+ INDEX_NAME = :index_ci_job_artifacts_on_id_partition_id_unique
+
+ def up
+ add_concurrent_index(TABLE_NAME, %i[id partition_id], unique: true, name: INDEX_NAME)
+ end
+
+ def down
+ remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME)
+ end
+end
diff --git a/db/post_migrate/20231204090413_add_unique_index_job_id_filte_type_partition_id_to_ci_job_artifact.rb b/db/post_migrate/20231204090413_add_unique_index_job_id_filte_type_partition_id_to_ci_job_artifact.rb
new file mode 100644
index 00000000000..ad02456b1b9
--- /dev/null
+++ b/db/post_migrate/20231204090413_add_unique_index_job_id_filte_type_partition_id_to_ci_job_artifact.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class AddUniqueIndexJobIdFilteTypePartitionIdToCiJobArtifact < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ disable_ddl_transaction!
+ TABLE_NAME = :ci_job_artifacts
+ INDEX_NAME = :idx_ci_job_artifacts_on_job_id_file_type_and_partition_id_uniq
+
+ def up
+ add_concurrent_index(TABLE_NAME, %i[job_id file_type partition_id], unique: true, name: INDEX_NAME)
+ end
+
+ def down
+ remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME)
+ end
+end
diff --git a/db/post_migrate/20231204154826_remove_organizations_path_without_case_sensitivity.rb b/db/post_migrate/20231204154826_remove_organizations_path_without_case_sensitivity.rb
new file mode 100644
index 00000000000..08affaeb792
--- /dev/null
+++ b/db/post_migrate/20231204154826_remove_organizations_path_without_case_sensitivity.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class RemoveOrganizationsPathWithoutCaseSensitivity < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+ milestone '16.7'
+
+ INDEX_NAME = 'unique_organizations_on_path'
+
+ def up
+ remove_concurrent_index_by_name :organizations, INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index :organizations, :path, unique: true, name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20231205092529_drop_unique_index_job_id_file_type_to_ci_job_artifact.rb b/db/post_migrate/20231205092529_drop_unique_index_job_id_file_type_to_ci_job_artifact.rb
new file mode 100644
index 00000000000..df52f76e1c4
--- /dev/null
+++ b/db/post_migrate/20231205092529_drop_unique_index_job_id_file_type_to_ci_job_artifact.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class DropUniqueIndexJobIdFileTypeToCiJobArtifact < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ disable_ddl_transaction!
+ TABLE_NAME = :ci_job_artifacts
+ INDEX_NAME = :index_ci_job_artifacts_on_job_id_and_file_type
+
+ def up
+ remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME)
+ end
+
+ def down
+ add_concurrent_index(TABLE_NAME, %i[job_id file_type], unique: true, name: INDEX_NAME)
+ end
+end
diff --git a/db/post_migrate/20231205111453_prepare_indexes_for_partitioning_ci_stages.rb b/db/post_migrate/20231205111453_prepare_indexes_for_partitioning_ci_stages.rb
new file mode 100644
index 00000000000..81f132db0ff
--- /dev/null
+++ b/db/post_migrate/20231205111453_prepare_indexes_for_partitioning_ci_stages.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+class PrepareIndexesForPartitioningCiStages < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ TABLE_NAME = :ci_stages
+ PK_INDEX_NAME = :index_ci_stages_on_id_partition_id_unique
+ UNIQUE_INDEX_PIPELINE_ID_AND_NAME = :index_ci_stages_on_pipeline_id_name_partition_id_unique
+
+ def up
+ prepare_async_index TABLE_NAME, %i[id partition_id], name: PK_INDEX_NAME, unique: true
+ prepare_async_index TABLE_NAME, %i[pipeline_id name partition_id], name: UNIQUE_INDEX_PIPELINE_ID_AND_NAME,
+ unique: true
+ end
+
+ def down
+ unprepare_async_index_by_name(TABLE_NAME, PK_INDEX_NAME)
+ unprepare_async_index_by_name(TABLE_NAME, UNIQUE_INDEX_PIPELINE_ID_AND_NAME)
+ end
+end
diff --git a/db/post_migrate/20231205144253_schedule_index_to_ci_build_trace_metadata.rb b/db/post_migrate/20231205144253_schedule_index_to_ci_build_trace_metadata.rb
new file mode 100644
index 00000000000..279c5256188
--- /dev/null
+++ b/db/post_migrate/20231205144253_schedule_index_to_ci_build_trace_metadata.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class ScheduleIndexToCiBuildTraceMetadata < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ disable_ddl_transaction!
+
+ INDEX_NAME = :index_ci_build_trace_metadata_on_trace_artifact_id_partition_id
+ TABLE_NAME = :ci_build_trace_metadata
+ COLUMNS = [:trace_artifact_id, :partition_id]
+
+ def up
+ prepare_async_index(TABLE_NAME, COLUMNS, name: INDEX_NAME)
+ end
+
+ def down
+ unprepare_async_index_by_name(TABLE_NAME, INDEX_NAME)
+ end
+end
diff --git a/db/post_migrate/20231205144349_schedule_index_to_ci_job_artifact_states.rb b/db/post_migrate/20231205144349_schedule_index_to_ci_job_artifact_states.rb
new file mode 100644
index 00000000000..db62ba7bdf4
--- /dev/null
+++ b/db/post_migrate/20231205144349_schedule_index_to_ci_job_artifact_states.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class ScheduleIndexToCiJobArtifactStates < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ disable_ddl_transaction!
+
+ INDEX_NAME = :index_ci_job_artifact_states_on_job_artifact_id_partition_id
+ TABLE_NAME = :ci_job_artifact_states
+ COLUMNS = [:job_artifact_id, :partition_id]
+
+ def up
+ prepare_async_index(TABLE_NAME, COLUMNS, name: INDEX_NAME)
+ end
+
+ def down
+ unprepare_async_index_by_name(TABLE_NAME, INDEX_NAME)
+ end
+end
diff --git a/db/post_migrate/20231206115306_remove_index_users_with_static_object_token.rb b/db/post_migrate/20231206115306_remove_index_users_with_static_object_token.rb
new file mode 100644
index 00000000000..cac8f84f5d4
--- /dev/null
+++ b/db/post_migrate/20231206115306_remove_index_users_with_static_object_token.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class RemoveIndexUsersWithStaticObjectToken < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+
+ milestone '16.7'
+
+ INDEX_NAME = :index_users_with_static_object_token
+ TABLE_NAME = :users
+ WHERE_STATEMENT = 'static_object_token IS NOT NULL AND static_object_token_encrypted IS NULL'
+
+ def up
+ remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index TABLE_NAME, :id, where: WHERE_STATEMENT, name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20231206142250_sync_create_supporting_index_for_finding_id_backfill.rb b/db/post_migrate/20231206142250_sync_create_supporting_index_for_finding_id_backfill.rb
new file mode 100644
index 00000000000..1371674a8d9
--- /dev/null
+++ b/db/post_migrate/20231206142250_sync_create_supporting_index_for_finding_id_backfill.rb
@@ -0,0 +1,25 @@
+# frozen_string_literal: true
+
+class SyncCreateSupportingIndexForFindingIdBackfill < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ INDEX_NAME = "tmp_index_vulnerabilities_on_id_finding_id_empty"
+
+ def up
+ add_concurrent_index(
+ :vulnerabilities,
+ :id,
+ where: "finding_id IS NULL",
+ name: INDEX_NAME
+ )
+ end
+
+ def down
+ remove_concurrent_index_by_name(
+ :vulnerabilities,
+ INDEX_NAME
+ )
+ end
+end
diff --git a/db/post_migrate/20231206145850_finalize_backfill_code_suggestions_namespace_settings.rb b/db/post_migrate/20231206145850_finalize_backfill_code_suggestions_namespace_settings.rb
new file mode 100644
index 00000000000..c5b098e9da2
--- /dev/null
+++ b/db/post_migrate/20231206145850_finalize_backfill_code_suggestions_namespace_settings.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class FinalizeBackfillCodeSuggestionsNamespaceSettings < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ ensure_batched_background_migration_is_finished(
+ job_class_name: 'BackfillCodeSuggestionsNamespaceSettings',
+ table_name: :namespace_settings,
+ column_name: :namespace_id,
+ job_arguments: [],
+ finalize: true
+ )
+ end
+
+ def down; end
+end
diff --git a/db/post_migrate/20231206145911_finalize_backfill_design_management_repositories.rb b/db/post_migrate/20231206145911_finalize_backfill_design_management_repositories.rb
new file mode 100644
index 00000000000..0f8fcd91846
--- /dev/null
+++ b/db/post_migrate/20231206145911_finalize_backfill_design_management_repositories.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class FinalizeBackfillDesignManagementRepositories < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ ensure_batched_background_migration_is_finished(
+ job_class_name: 'BackfillDesignManagementRepositories',
+ table_name: :projects,
+ column_name: :id,
+ job_arguments: [],
+ finalize: true
+ )
+ end
+
+ def down; end
+end
diff --git a/db/post_migrate/20231206200121_remove_use_legacy_web_ide_column.rb b/db/post_migrate/20231206200121_remove_use_legacy_web_ide_column.rb
new file mode 100644
index 00000000000..ca8d196a1a0
--- /dev/null
+++ b/db/post_migrate/20231206200121_remove_use_legacy_web_ide_column.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+class RemoveUseLegacyWebIdeColumn < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ enable_lock_retries!
+
+ def up
+ remove_column :user_preferences, :use_legacy_web_ide
+ end
+
+ def down
+ add_column :user_preferences, :use_legacy_web_ide, :boolean, default: false, null: false
+ end
+end
diff --git a/db/post_migrate/20231207054819_cleanup_ci_stages_pipeline_id_bigint_for_self_host.rb b/db/post_migrate/20231207054819_cleanup_ci_stages_pipeline_id_bigint_for_self_host.rb
new file mode 100644
index 00000000000..5d10e655cbf
--- /dev/null
+++ b/db/post_migrate/20231207054819_cleanup_ci_stages_pipeline_id_bigint_for_self_host.rb
@@ -0,0 +1,53 @@
+# frozen_string_literal: true
+
+class CleanupCiStagesPipelineIdBigintForSelfHost < Gitlab::Database::Migration[2.2]
+ disable_ddl_transaction!
+ milestone "16.7"
+
+ TABLE = :ci_stages
+ REFERENCING_TABLE = :ci_pipelines
+ COLUMN = :pipeline_id
+ OLD_COLUMN = :pipeline_id_convert_to_bigint
+ INDEXES = {
+ 'index_ci_stages_on_pipeline_id_convert_to_bigint_and_name' => [
+ [:pipeline_id_convert_to_bigint, :name], { unique: true }
+ ],
+ 'index_ci_stages_on_pipeline_id_convert_to_bigint' => [
+ [:pipeline_id_convert_to_bigint], {}
+ ],
+ 'index_ci_stages_on_pipeline_id_convert_to_bigint_and_id' => [
+ [:pipeline_id_convert_to_bigint, :id], { where: 'status = ANY (ARRAY[0, 1, 2, 8, 9, 10])' }
+ ],
+ 'index_ci_stages_on_pipeline_id_convert_to_bigint_and_position' => [
+ [:pipeline_id_convert_to_bigint, :position], {}
+ ]
+ }
+
+ def up
+ return unless column_exists?(TABLE, OLD_COLUMN)
+
+ with_lock_retries(raise_on_exhaustion: true) do
+ lock_tables(REFERENCING_TABLE, TABLE)
+ cleanup_conversion_of_integer_to_bigint(TABLE, [COLUMN])
+ end
+ end
+
+ def down
+ return if column_exists?(TABLE, OLD_COLUMN)
+ # See db/post_migrate/20231120070345_cleanup_ci_stages_pipeline_id_bigint.rb
+ # Both Gitlab.com and dev/test envinronments will be handled in that migration.
+ return if Gitlab.com_except_jh? || Gitlab.dev_or_test_env?
+
+ restore_conversion_of_integer_to_bigint(TABLE, [COLUMN])
+
+ INDEXES.each do |index_name, (columns, options)|
+ add_concurrent_index(TABLE, columns, name: index_name, **options)
+ end
+
+ add_concurrent_foreign_key(
+ TABLE, REFERENCING_TABLE,
+ column: OLD_COLUMN,
+ on_delete: :cascade, validate: true, reverse_lock_order: true
+ )
+ end
+end
diff --git a/db/post_migrate/20231207112632_add_unique_index_id_partition_id_to_ci_stages.rb b/db/post_migrate/20231207112632_add_unique_index_id_partition_id_to_ci_stages.rb
new file mode 100644
index 00000000000..1edb4595f89
--- /dev/null
+++ b/db/post_migrate/20231207112632_add_unique_index_id_partition_id_to_ci_stages.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class AddUniqueIndexIdPartitionIdToCiStages < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ disable_ddl_transaction!
+
+ TABLE_NAME = :ci_stages
+ PK_INDEX_NAME = :index_ci_stages_on_id_partition_id_unique
+
+ def up
+ add_concurrent_index(TABLE_NAME, %i[id partition_id], unique: true, name: PK_INDEX_NAME)
+ end
+
+ def down
+ remove_concurrent_index_by_name(TABLE_NAME, PK_INDEX_NAME)
+ end
+end
diff --git a/db/post_migrate/20231207112650_add_unique_index_pipeline_id_name_partition_id_to_ci_stages.rb b/db/post_migrate/20231207112650_add_unique_index_pipeline_id_name_partition_id_to_ci_stages.rb
new file mode 100644
index 00000000000..5d9a24261ea
--- /dev/null
+++ b/db/post_migrate/20231207112650_add_unique_index_pipeline_id_name_partition_id_to_ci_stages.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddUniqueIndexPipelineIdNamePartitionIdToCiStages < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ disable_ddl_transaction!
+
+ TABLE_NAME = :ci_stages
+ UNIQUE_INDEX_PIPELINE_ID_AND_NAME = :index_ci_stages_on_pipeline_id_name_partition_id_unique
+
+ def up
+ add_concurrent_index(TABLE_NAME, %i[pipeline_id name partition_id], unique: true,
+ name: UNIQUE_INDEX_PIPELINE_ID_AND_NAME)
+ end
+
+ def down
+ remove_concurrent_index_by_name(TABLE_NAME, UNIQUE_INDEX_PIPELINE_ID_AND_NAME)
+ end
+end
diff --git a/db/post_migrate/20231207115601_remove_unique_index_without_partition_id_from_ci_stages.rb b/db/post_migrate/20231207115601_remove_unique_index_without_partition_id_from_ci_stages.rb
new file mode 100644
index 00000000000..6b4de15d21e
--- /dev/null
+++ b/db/post_migrate/20231207115601_remove_unique_index_without_partition_id_from_ci_stages.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class RemoveUniqueIndexWithoutPartitionIdFromCiStages < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ disable_ddl_transaction!
+
+ TABLE_NAME = :ci_stages
+ OLD_UNIQUE_INDEX_PIPELINE_ID_AND_NAME = :index_ci_stages_on_pipeline_id_and_name
+
+ def up
+ remove_concurrent_index_by_name(TABLE_NAME, OLD_UNIQUE_INDEX_PIPELINE_ID_AND_NAME)
+ end
+
+ def down
+ add_concurrent_index(TABLE_NAME, %i[pipeline_id name], unique: true, name: OLD_UNIQUE_INDEX_PIPELINE_ID_AND_NAME)
+ end
+end
diff --git a/db/post_migrate/20231207163648_re_finalize_backfill_dismissal_reason_in_vulnerability_reads.rb b/db/post_migrate/20231207163648_re_finalize_backfill_dismissal_reason_in_vulnerability_reads.rb
new file mode 100644
index 00000000000..fcfa50c8f32
--- /dev/null
+++ b/db/post_migrate/20231207163648_re_finalize_backfill_dismissal_reason_in_vulnerability_reads.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class ReFinalizeBackfillDismissalReasonInVulnerabilityReads < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ ensure_batched_background_migration_is_finished(
+ job_class_name: 'BackfillDismissalReasonInVulnerabilityReads',
+ table_name: :vulnerability_reads,
+ column_name: :id,
+ job_arguments: [],
+ finalize: true
+ )
+ end
+
+ def down; end
+end
diff --git a/db/post_migrate/20231207194620_backfill_catalog_resources_visibility_level.rb b/db/post_migrate/20231207194620_backfill_catalog_resources_visibility_level.rb
new file mode 100644
index 00000000000..808b0d983a8
--- /dev/null
+++ b/db/post_migrate/20231207194620_backfill_catalog_resources_visibility_level.rb
@@ -0,0 +1,25 @@
+# frozen_string_literal: true
+
+class BackfillCatalogResourcesVisibilityLevel < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ sql = <<-SQL
+ UPDATE catalog_resources
+ SET visibility_level = projects.visibility_level
+ FROM projects
+ WHERE catalog_resources.project_id = projects.id
+ SQL
+
+ execute(sql)
+ end
+
+ def down
+ # no-op
+
+ # The `visibility_level` column in `catalog_resources` is denormalized;
+ # it should always stay in sync with the corresponding data in `projects`.
+ end
+end
diff --git a/db/post_migrate/20231207220916_finalize_backfill_missing_ci_cd_settings.rb b/db/post_migrate/20231207220916_finalize_backfill_missing_ci_cd_settings.rb
new file mode 100644
index 00000000000..486df165883
--- /dev/null
+++ b/db/post_migrate/20231207220916_finalize_backfill_missing_ci_cd_settings.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class FinalizeBackfillMissingCiCdSettings < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ ensure_batched_background_migration_is_finished(
+ job_class_name: 'BackfillMissingCiCdSettings',
+ table_name: :projects,
+ column_name: :id,
+ job_arguments: [],
+ finalize: true
+ )
+ end
+
+ def down; end
+end
diff --git a/db/post_migrate/20231207220935_finalize_backfill_missing_vulnerability_dismissal_details.rb b/db/post_migrate/20231207220935_finalize_backfill_missing_vulnerability_dismissal_details.rb
new file mode 100644
index 00000000000..9fa1b2e597f
--- /dev/null
+++ b/db/post_migrate/20231207220935_finalize_backfill_missing_vulnerability_dismissal_details.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class FinalizeBackfillMissingVulnerabilityDismissalDetails < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ ensure_batched_background_migration_is_finished(
+ job_class_name: 'BackfillMissingVulnerabilityDismissalDetails',
+ table_name: :vulnerabilities,
+ column_name: :id,
+ job_arguments: [],
+ finalize: true
+ )
+ end
+
+ def down; end
+end
diff --git a/db/post_migrate/20231207220954_finalize_backfill_project_statistics_storage_size_without_pipeline_artifacts_si.rb b/db/post_migrate/20231207220954_finalize_backfill_project_statistics_storage_size_without_pipeline_artifacts_si.rb
new file mode 100644
index 00000000000..ab89def9065
--- /dev/null
+++ b/db/post_migrate/20231207220954_finalize_backfill_project_statistics_storage_size_without_pipeline_artifacts_si.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class FinalizeBackfillProjectStatisticsStorageSizeWithoutPipelineArtifactsSi < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ ensure_batched_background_migration_is_finished(
+ job_class_name: 'BackfillProjectStatisticsStorageSizeWithoutPipelineArtifactsSizeJob',
+ table_name: :project_statistics,
+ column_name: :project_id,
+ job_arguments: [],
+ finalize: true
+ )
+ end
+
+ def down; end
+end
diff --git a/db/post_migrate/20231207221013_finalize_backfill_project_wiki_repositories.rb b/db/post_migrate/20231207221013_finalize_backfill_project_wiki_repositories.rb
new file mode 100644
index 00000000000..b26ff3645e3
--- /dev/null
+++ b/db/post_migrate/20231207221013_finalize_backfill_project_wiki_repositories.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class FinalizeBackfillProjectWikiRepositories < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ ensure_batched_background_migration_is_finished(
+ job_class_name: 'BackfillProjectWikiRepositories',
+ table_name: :projects,
+ column_name: :id,
+ job_arguments: [],
+ finalize: true
+ )
+ end
+
+ def down; end
+end
diff --git a/db/post_migrate/20231207221036_finalize_backfill_root_storage_statistics_fork_storage_sizes.rb b/db/post_migrate/20231207221036_finalize_backfill_root_storage_statistics_fork_storage_sizes.rb
new file mode 100644
index 00000000000..0284e4bd8b9
--- /dev/null
+++ b/db/post_migrate/20231207221036_finalize_backfill_root_storage_statistics_fork_storage_sizes.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class FinalizeBackfillRootStorageStatisticsForkStorageSizes < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ ensure_batched_background_migration_is_finished(
+ job_class_name: 'BackfillRootStorageStatisticsForkStorageSizes',
+ table_name: :namespace_root_storage_statistics,
+ column_name: :namespace_id,
+ job_arguments: [],
+ finalize: true
+ )
+ end
+
+ def down; end
+end
diff --git a/db/post_migrate/20231207221056_finalize_backfill_uuid_conversion_column_in_vulnerability_occurrences.rb b/db/post_migrate/20231207221056_finalize_backfill_uuid_conversion_column_in_vulnerability_occurrences.rb
new file mode 100644
index 00000000000..4426a915526
--- /dev/null
+++ b/db/post_migrate/20231207221056_finalize_backfill_uuid_conversion_column_in_vulnerability_occurrences.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class FinalizeBackfillUuidConversionColumnInVulnerabilityOccurrences < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ ensure_batched_background_migration_is_finished(
+ job_class_name: 'BackfillUuidConversionColumnInVulnerabilityOccurrences',
+ table_name: :vulnerability_occurrences,
+ column_name: :id,
+ job_arguments: [],
+ finalize: true
+ )
+ end
+
+ def down; end
+end
diff --git a/db/post_migrate/20231207221119_finalize_cleanup_personal_access_tokens_with_nil_expires_at.rb b/db/post_migrate/20231207221119_finalize_cleanup_personal_access_tokens_with_nil_expires_at.rb
new file mode 100644
index 00000000000..75d9b6ed80e
--- /dev/null
+++ b/db/post_migrate/20231207221119_finalize_cleanup_personal_access_tokens_with_nil_expires_at.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class FinalizeCleanupPersonalAccessTokensWithNilExpiresAt < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ ensure_batched_background_migration_is_finished(
+ job_class_name: 'CleanupPersonalAccessTokensWithNilExpiresAt',
+ table_name: :personal_access_tokens,
+ column_name: :id,
+ job_arguments: [],
+ finalize: true
+ )
+ end
+
+ def down; end
+end
diff --git a/db/post_migrate/20231207221140_finalize_delete_orphaned_transferred_project_approval_rules.rb b/db/post_migrate/20231207221140_finalize_delete_orphaned_transferred_project_approval_rules.rb
new file mode 100644
index 00000000000..790e35ebfd2
--- /dev/null
+++ b/db/post_migrate/20231207221140_finalize_delete_orphaned_transferred_project_approval_rules.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class FinalizeDeleteOrphanedTransferredProjectApprovalRules < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ ensure_batched_background_migration_is_finished(
+ job_class_name: 'DeleteOrphanedTransferredProjectApprovalRules',
+ table_name: :approval_project_rules,
+ column_name: :id,
+ job_arguments: [],
+ finalize: true
+ )
+ end
+
+ def down; end
+end
diff --git a/db/post_migrate/20231207221159_finalize_fix_allow_descendants_override_disabled_shared_runners.rb b/db/post_migrate/20231207221159_finalize_fix_allow_descendants_override_disabled_shared_runners.rb
new file mode 100644
index 00000000000..86dead2c54e
--- /dev/null
+++ b/db/post_migrate/20231207221159_finalize_fix_allow_descendants_override_disabled_shared_runners.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class FinalizeFixAllowDescendantsOverrideDisabledSharedRunners < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ ensure_batched_background_migration_is_finished(
+ job_class_name: 'FixAllowDescendantsOverrideDisabledSharedRunners',
+ table_name: :namespaces,
+ column_name: :id,
+ job_arguments: [],
+ finalize: true
+ )
+ end
+
+ def down; end
+end
diff --git a/db/post_migrate/20231207221219_finalize_mark_duplicate_npm_packages_for_destruction.rb b/db/post_migrate/20231207221219_finalize_mark_duplicate_npm_packages_for_destruction.rb
new file mode 100644
index 00000000000..a9340cbebb8
--- /dev/null
+++ b/db/post_migrate/20231207221219_finalize_mark_duplicate_npm_packages_for_destruction.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class FinalizeMarkDuplicateNpmPackagesForDestruction < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ ensure_batched_background_migration_is_finished(
+ job_class_name: 'MarkDuplicateNpmPackagesForDestruction',
+ table_name: :packages_packages,
+ column_name: :project_id,
+ job_arguments: [],
+ finalize: true
+ )
+ end
+
+ def down; end
+end
diff --git a/db/post_migrate/20231207221241_finalize_populate_vulnerability_dismissal_fields.rb b/db/post_migrate/20231207221241_finalize_populate_vulnerability_dismissal_fields.rb
new file mode 100644
index 00000000000..51c3dd5966f
--- /dev/null
+++ b/db/post_migrate/20231207221241_finalize_populate_vulnerability_dismissal_fields.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class FinalizePopulateVulnerabilityDismissalFields < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ ensure_batched_background_migration_is_finished(
+ job_class_name: 'PopulateVulnerabilityDismissalFields',
+ table_name: :vulnerabilities,
+ column_name: :id,
+ job_arguments: [],
+ finalize: true
+ )
+ end
+
+ def down; end
+end
diff --git a/db/post_migrate/20231207221300_finalize_remove_invalid_deploy_access_level_groups.rb b/db/post_migrate/20231207221300_finalize_remove_invalid_deploy_access_level_groups.rb
new file mode 100644
index 00000000000..c20ff6673fe
--- /dev/null
+++ b/db/post_migrate/20231207221300_finalize_remove_invalid_deploy_access_level_groups.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class FinalizeRemoveInvalidDeployAccessLevelGroups < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ ensure_batched_background_migration_is_finished(
+ job_class_name: 'RemoveInvalidDeployAccessLevelGroups',
+ table_name: :protected_environment_deploy_access_levels,
+ column_name: :id,
+ job_arguments: [],
+ finalize: true
+ )
+ end
+
+ def down; end
+end
diff --git a/db/post_migrate/20231208103049_drop_index_users_on_id_and_last_activity.rb b/db/post_migrate/20231208103049_drop_index_users_on_id_and_last_activity.rb
new file mode 100644
index 00000000000..bf9b1800c68
--- /dev/null
+++ b/db/post_migrate/20231208103049_drop_index_users_on_id_and_last_activity.rb
@@ -0,0 +1,28 @@
+# frozen_string_literal: true
+
+class DropIndexUsersOnIdAndLastActivity < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ disable_ddl_transaction!
+
+ TABLE_NAME = :users
+ INDEX_NAME = :index_users_on_id_and_last_activity_on_for_active_human_service
+
+ def up
+ return unless should_run?
+
+ remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
+ end
+
+ def down
+ return unless should_run?
+
+ add_concurrent_index :users, [:id, :last_activity_on],
+ name: INDEX_NAME,
+ where: "state = 'active' AND user_type IN (0, 4)"
+ end
+
+ def should_run?
+ Gitlab.com_except_jh?
+ end
+end
diff --git a/db/post_migrate/20231212132322_prepare_ci_pipeline_variables_primary_key_for_partitioning.rb b/db/post_migrate/20231212132322_prepare_ci_pipeline_variables_primary_key_for_partitioning.rb
new file mode 100644
index 00000000000..4c1adadb06e
--- /dev/null
+++ b/db/post_migrate/20231212132322_prepare_ci_pipeline_variables_primary_key_for_partitioning.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: true
+
+class PrepareCiPipelineVariablesPrimaryKeyForPartitioning < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+ disable_ddl_transaction!
+
+ TABLE_NAME = :ci_pipeline_variables
+ PRIMARY_KEY = :ci_pipeline_variables_pkey
+ NEW_INDEX = :index_ci_pipeline_variables_on_id_partition_id_unique
+ OLD_INDEX = :index_ci_pipeline_variables_on_id_unique
+
+ def up
+ swap_primary_key(TABLE_NAME, PRIMARY_KEY, NEW_INDEX)
+ end
+
+ def down
+ add_concurrent_index(TABLE_NAME, :id, unique: true, name: OLD_INDEX)
+ add_concurrent_index(TABLE_NAME, [:id, :partition_id], unique: true, name: NEW_INDEX)
+
+ unswap_primary_key(TABLE_NAME, PRIMARY_KEY, OLD_INDEX)
+ end
+end
diff --git a/db/post_migrate/20231218062442_remove_max_workspaces_from_remote_development_agent_configs.rb b/db/post_migrate/20231218062442_remove_max_workspaces_from_remote_development_agent_configs.rb
new file mode 100644
index 00000000000..523aae9f214
--- /dev/null
+++ b/db/post_migrate/20231218062442_remove_max_workspaces_from_remote_development_agent_configs.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+class RemoveMaxWorkspacesFromRemoteDevelopmentAgentConfigs < Gitlab::Database::Migration[2.2]
+ milestone '16.8'
+ enable_lock_retries!
+
+ def change
+ remove_column :remote_development_agent_configs, :max_workspaces, :bigint, default: -1, null: false
+ end
+end
diff --git a/db/post_migrate/20231218062505_remove_max_workspaces_per_user_from_remote_development_agent_configs.rb b/db/post_migrate/20231218062505_remove_max_workspaces_per_user_from_remote_development_agent_configs.rb
new file mode 100644
index 00000000000..10a5e314ef9
--- /dev/null
+++ b/db/post_migrate/20231218062505_remove_max_workspaces_per_user_from_remote_development_agent_configs.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+class RemoveMaxWorkspacesPerUserFromRemoteDevelopmentAgentConfigs < Gitlab::Database::Migration[2.2]
+ milestone '16.8'
+ enable_lock_retries!
+
+ def change
+ remove_column :remote_development_agent_configs, :max_workspaces_per_user, :bigint, default: -1, null: false
+ end
+end
diff --git a/db/schema_migrations/20220126191624 b/db/schema_migrations/20220126191624
deleted file mode 100644
index f8cbab24379..00000000000
--- a/db/schema_migrations/20220126191624
+++ /dev/null
@@ -1 +0,0 @@
-33170856a78b469c63d4821692929a1df0c41e4b9d98093e771b122b462c9c03 \ No newline at end of file
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/20220406193806 b/db/schema_migrations/20220406193806
deleted file mode 100644
index a5dfed18303..00000000000
--- a/db/schema_migrations/20220406193806
+++ /dev/null
@@ -1 +0,0 @@
-f2ed979f3af7aec03defc737add2e5d5bf4aad080d501003744ee42f902074d5 \ 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/20220601110011 b/db/schema_migrations/20220601110011
deleted file mode 100644
index 64c76649095..00000000000
--- a/db/schema_migrations/20220601110011
+++ /dev/null
@@ -1 +0,0 @@
-9dc41d0d5f1c87f27327b254c955eada4fcc5c6158c513128e6fbdadd6c34932 \ 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/20220603125200 b/db/schema_migrations/20220603125200
deleted file mode 100644
index 5da1d1992ab..00000000000
--- a/db/schema_migrations/20220603125200
+++ /dev/null
@@ -1 +0,0 @@
-7631f2c1f9b2647ae6de47675305a2d5c1b213229c85b6f161412f83884bad87 \ 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/20220606054503 b/db/schema_migrations/20220606054503
deleted file mode 100644
index 1ec25932ece..00000000000
--- a/db/schema_migrations/20220606054503
+++ /dev/null
@@ -1 +0,0 @@
-ed815f5e2766913ded3479c2cdc8a885ab7164ae280e309cba34394668392a2b \ 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/20220606080509 b/db/schema_migrations/20220606080509
deleted file mode 100644
index 7403068a8da..00000000000
--- a/db/schema_migrations/20220606080509
+++ /dev/null
@@ -1 +0,0 @@
-3afc50d92878da71453cfb23ad29d16123e4986e3304aff62013f4655b065d38 \ 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/20220613112029 b/db/schema_migrations/20220613112029
deleted file mode 100644
index d0bb2de83b5..00000000000
--- a/db/schema_migrations/20220613112029
+++ /dev/null
@@ -1 +0,0 @@
-04a04a34de63b17f02a6b1333854638ae3b44d284e5ce2fcbee6fb3ec06b7757 \ No newline at end of file
diff --git a/db/schema_migrations/20220613112030 b/db/schema_migrations/20220613112030
deleted file mode 100644
index 3dda586034d..00000000000
--- a/db/schema_migrations/20220613112030
+++ /dev/null
@@ -1 +0,0 @@
-3d1b1394aa1b5db83867b284f119ec711255d2a01b78720d42c0a1acfe93c94f \ No newline at end of file
diff --git a/db/schema_migrations/20220613112031 b/db/schema_migrations/20220613112031
deleted file mode 100644
index dc0d913e1eb..00000000000
--- a/db/schema_migrations/20220613112031
+++ /dev/null
@@ -1 +0,0 @@
-30d48cf8219cb4bcfeac454d7baf70d05f0285bdac519e4a1fb9f1c412267a9d \ No newline at end of file
diff --git a/db/schema_migrations/20220613112032 b/db/schema_migrations/20220613112032
deleted file mode 100644
index f1c0d9c80e6..00000000000
--- a/db/schema_migrations/20220613112032
+++ /dev/null
@@ -1 +0,0 @@
-c8c26dad8d11b3715fce07ee9bedc9c4f66d2454646d58994e1568758f240299 \ 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/20220615154500 b/db/schema_migrations/20220615154500
deleted file mode 100644
index 36e35ec7d3a..00000000000
--- a/db/schema_migrations/20220615154500
+++ /dev/null
@@ -1 +0,0 @@
-fd138239f6970b892fdb8190fb65b3364bb9ba5396100ba3d5d695eef6436dcf \ No newline at end of file
diff --git a/db/schema_migrations/20220615172230 b/db/schema_migrations/20220615172230
deleted file mode 100644
index 43057debe67..00000000000
--- a/db/schema_migrations/20220615172230
+++ /dev/null
@@ -1 +0,0 @@
-364a2f729196e4bd4bde635f7550df3cf0c005fa002840fa12745d8919a99147 \ 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/20220616171355 b/db/schema_migrations/20220616171355
deleted file mode 100644
index cd212025f70..00000000000
--- a/db/schema_migrations/20220616171355
+++ /dev/null
@@ -1 +0,0 @@
-63ec85b4f8b7eb15c232c4a25c1e63027c38c23caf81a89c4d05227a6be00e4b \ 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/20220706145113 b/db/schema_migrations/20220706145113
deleted file mode 100644
index 8ed19a92025..00000000000
--- a/db/schema_migrations/20220706145113
+++ /dev/null
@@ -1 +0,0 @@
-e37da383a2e69e5e3157180b33017fc64af6ee009fc3dd317ae69931d37c6350 \ 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/20220707192420 b/db/schema_migrations/20220707192420
deleted file mode 100644
index 2122f9ed954..00000000000
--- a/db/schema_migrations/20220707192420
+++ /dev/null
@@ -1 +0,0 @@
-b3d06405e0e0398579077d255901bed4b6f86f89a93dae8e97ddec9c2c496837 \ 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/20220711142148 b/db/schema_migrations/20220711142148
deleted file mode 100644
index 709ce89616a..00000000000
--- a/db/schema_migrations/20220711142148
+++ /dev/null
@@ -1 +0,0 @@
-d7062e116066ac922d42f43ef8ee6783d6bc3a30d6c36b4d70788ce47bba076f \ 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/20220721065723 b/db/schema_migrations/20220721065723
deleted file mode 100644
index 78b1fedaff1..00000000000
--- a/db/schema_migrations/20220721065723
+++ /dev/null
@@ -1 +0,0 @@
-5e3fbb2c033f8512e5fd14b8ce8c6088866c596a2b769e115dcc1feb9ce9d041 \ 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/20220726171440 b/db/schema_migrations/20220726171440
deleted file mode 100644
index 3bd56cb8346..00000000000
--- a/db/schema_migrations/20220726171440
+++ /dev/null
@@ -1 +0,0 @@
-5fce175152ab9c954b35d612800b381634248fe0c02b5dfc06c4650b8df9e787 \ No newline at end of file
diff --git a/db/schema_migrations/20220726171450 b/db/schema_migrations/20220726171450
deleted file mode 100644
index 76a5597f9fe..00000000000
--- a/db/schema_migrations/20220726171450
+++ /dev/null
@@ -1 +0,0 @@
-86d469a9dc2d22451728d310bd2b830c5cdb69033bdf6b5fe30d45c6c6b8ae4b \ 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/20220726225114 b/db/schema_migrations/20220726225114
deleted file mode 100644
index 32f1eb44d17..00000000000
--- a/db/schema_migrations/20220726225114
+++ /dev/null
@@ -1 +0,0 @@
-24e39665566d86ddca2bfc134fd37e11840edc9bc34add077e39fa7e5b8272d5 \ 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/20220801155858 b/db/schema_migrations/20220801155858
deleted file mode 100644
index 16e0ee3a0a4..00000000000
--- a/db/schema_migrations/20220801155858
+++ /dev/null
@@ -1 +0,0 @@
-aa09e7e3cdc7c7ee011b92a1ccbebdddefd9dfc2717af03a40073c6bc5be4001 \ 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/20220802200719 b/db/schema_migrations/20220802200719
deleted file mode 100644
index a4798a7e79e..00000000000
--- a/db/schema_migrations/20220802200719
+++ /dev/null
@@ -1 +0,0 @@
-e27e9430a06f0586dd4ed9419c8f5747d64509e89f4f3481d8341261cfec82c5 \ No newline at end of file
diff --git a/db/schema_migrations/20220802202505 b/db/schema_migrations/20220802202505
deleted file mode 100644
index f6a72f8c3c5..00000000000
--- a/db/schema_migrations/20220802202505
+++ /dev/null
@@ -1 +0,0 @@
-aacf5e416de30f594ea012c3dd3cb1a3bd10d2edd2d312aedf7147a8cde32928 \ 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/20220803004853 b/db/schema_migrations/20220803004853
deleted file mode 100644
index 59f9dcd0d50..00000000000
--- a/db/schema_migrations/20220803004853
+++ /dev/null
@@ -1 +0,0 @@
-39f8ae1258fa9cab98e5231d5adfe7fdf648b50fba29790aaa46786f2b2f6f04 \ 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/20220803235114 b/db/schema_migrations/20220803235114
deleted file mode 100644
index 469005b8bef..00000000000
--- a/db/schema_migrations/20220803235114
+++ /dev/null
@@ -1 +0,0 @@
-a669aca9370ecd086b582164e68366ca459754b26e096301c2dc7121a7e9ab58 \ 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/20220805180311 b/db/schema_migrations/20220805180311
deleted file mode 100644
index dff18ebd3fc..00000000000
--- a/db/schema_migrations/20220805180311
+++ /dev/null
@@ -1 +0,0 @@
-35335f40a192889c45f71a8a3b25dd0e7024919ff823b01c2086c0e6959869e0 \ No newline at end of file
diff --git a/db/schema_migrations/20220805183952 b/db/schema_migrations/20220805183952
deleted file mode 100644
index c1a1c03dcef..00000000000
--- a/db/schema_migrations/20220805183952
+++ /dev/null
@@ -1 +0,0 @@
-a90c4b56f6cf16ec62d4a37e03add702ce8d64640b1c61f6f0b18b2d9720f24e \ No newline at end of file
diff --git a/db/schema_migrations/20220805193117 b/db/schema_migrations/20220805193117
deleted file mode 100644
index 36523ba0866..00000000000
--- a/db/schema_migrations/20220805193117
+++ /dev/null
@@ -1 +0,0 @@
-f64b85003dde31c4f0ba37cb0b550fb50b8d7753bbae3043f28ed51858349572 \ 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/20220809002011 b/db/schema_migrations/20220809002011
deleted file mode 100644
index 952c468b1cb..00000000000
--- a/db/schema_migrations/20220809002011
+++ /dev/null
@@ -1 +0,0 @@
-12bc6c4a89c4362024d66a21690412f8946b8f6eaf9dc09cccaf8d54b7f45b17 \ No newline at end of file
diff --git a/db/schema_migrations/20220809214730 b/db/schema_migrations/20220809214730
deleted file mode 100644
index 0358f9b1798..00000000000
--- a/db/schema_migrations/20220809214730
+++ /dev/null
@@ -1 +0,0 @@
-ac9e478c7aaa351059d38dddf9a94eda7481a2bbcd4e9e5361fffb0c999be945 \ No newline at end of file
diff --git a/db/schema_migrations/20220809223215 b/db/schema_migrations/20220809223215
deleted file mode 100644
index 84f5e9314a5..00000000000
--- a/db/schema_migrations/20220809223215
+++ /dev/null
@@ -1 +0,0 @@
-1f383c2db106880e8a909b9292023ae099e224d733c87e356c61038bc84cf702 \ 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/20220815061621 b/db/schema_migrations/20220815061621
deleted file mode 100644
index 66fc6a68014..00000000000
--- a/db/schema_migrations/20220815061621
+++ /dev/null
@@ -1 +0,0 @@
-60a7782e9eaed833362e314fe3ae35f881ee051d9b529c59638833ce92d2db2d \ No newline at end of file
diff --git a/db/schema_migrations/20220815152905 b/db/schema_migrations/20220815152905
deleted file mode 100644
index 9e71fe96edc..00000000000
--- a/db/schema_migrations/20220815152905
+++ /dev/null
@@ -1 +0,0 @@
-8494a4a9c708ddfc63d86891b83f01c0883d8b88ebea2177980780a381d74704 \ No newline at end of file
diff --git a/db/schema_migrations/20220816075638 b/db/schema_migrations/20220816075638
deleted file mode 100644
index 9f4e1fbc3ee..00000000000
--- a/db/schema_migrations/20220816075638
+++ /dev/null
@@ -1 +0,0 @@
-78e03575edb66cfaeea75f2ff653efc77156ca9e0b1ea0fa989172c3caa0b195 \ No newline at end of file
diff --git a/db/schema_migrations/20220816135816 b/db/schema_migrations/20220816135816
deleted file mode 100644
index ff2b64004dd..00000000000
--- a/db/schema_migrations/20220816135816
+++ /dev/null
@@ -1 +0,0 @@
-47dcd45d2b9c35c4e3ca707d54a983e8321dd86b2b66d4bccca9001884bc6d13 \ No newline at end of file
diff --git a/db/schema_migrations/20220816163444 b/db/schema_migrations/20220816163444
deleted file mode 100644
index 83429df6a43..00000000000
--- a/db/schema_migrations/20220816163444
+++ /dev/null
@@ -1 +0,0 @@
-acb8985c03358890280d3a0bbd52215896461cfdd7b4379b488a0aa87ed8182f \ No newline at end of file
diff --git a/db/schema_migrations/20220817122907 b/db/schema_migrations/20220817122907
deleted file mode 100644
index fb6951e19d5..00000000000
--- a/db/schema_migrations/20220817122907
+++ /dev/null
@@ -1 +0,0 @@
-4db4f50d2e23527516eccdeae60059803df7add21ca7a2c40f1670dba9744496 \ No newline at end of file
diff --git a/db/schema_migrations/20220818095225 b/db/schema_migrations/20220818095225
deleted file mode 100644
index 9f420931b9d..00000000000
--- a/db/schema_migrations/20220818095225
+++ /dev/null
@@ -1 +0,0 @@
-ec31d14ce1a9f7b08985c2d304ab768a41139e81b694dcb1ec920623201504e6 \ No newline at end of file
diff --git a/db/schema_migrations/20220818125332 b/db/schema_migrations/20220818125332
deleted file mode 100644
index 35c76c4318f..00000000000
--- a/db/schema_migrations/20220818125332
+++ /dev/null
@@ -1 +0,0 @@
-ebcf446aa6579d93c57c2e96e8b670a43bcb6e20216f33a7f535e1bed50ace62 \ No newline at end of file
diff --git a/db/schema_migrations/20220818125703 b/db/schema_migrations/20220818125703
deleted file mode 100644
index 1bfebfc50ad..00000000000
--- a/db/schema_migrations/20220818125703
+++ /dev/null
@@ -1 +0,0 @@
-b60f36cd83174ce257baba4a74f0fcba6cd462fa2af6530ff5a3341536058e12 \ No newline at end of file
diff --git a/db/schema_migrations/20220818132108 b/db/schema_migrations/20220818132108
deleted file mode 100644
index 77683e61f2e..00000000000
--- a/db/schema_migrations/20220818132108
+++ /dev/null
@@ -1 +0,0 @@
-7abea29f31054d1e0337d3fa434f55cc1c354701da89e257c764b85cd2cc2768 \ No newline at end of file
diff --git a/db/schema_migrations/20220818140553 b/db/schema_migrations/20220818140553
deleted file mode 100644
index deedcc9d4b8..00000000000
--- a/db/schema_migrations/20220818140553
+++ /dev/null
@@ -1 +0,0 @@
-f46a411a6519723cd2ee0a5b287f26f987195ba76e5753febe47502b1152a543 \ No newline at end of file
diff --git a/db/schema_migrations/20220819153725 b/db/schema_migrations/20220819153725
deleted file mode 100644
index 617303214e4..00000000000
--- a/db/schema_migrations/20220819153725
+++ /dev/null
@@ -1 +0,0 @@
-5819791e71e9118680e24eceef92364c78ed51dda375db9902f693147ddd9765 \ No newline at end of file
diff --git a/db/schema_migrations/20220819162852 b/db/schema_migrations/20220819162852
deleted file mode 100644
index b1d1fcb4c70..00000000000
--- a/db/schema_migrations/20220819162852
+++ /dev/null
@@ -1 +0,0 @@
-1e0109c4e1a0512864f3ed16d0a9bc82b40b5c6fb1586acaffe18191821df18f \ No newline at end of file
diff --git a/db/schema_migrations/20220819184945 b/db/schema_migrations/20220819184945
deleted file mode 100644
index 511b13fc6cd..00000000000
--- a/db/schema_migrations/20220819184945
+++ /dev/null
@@ -1 +0,0 @@
-3655ee5c3c963d0e413bce86eb9c74cc7bc71c3ab5acb54c76daacff8ff07354 \ No newline at end of file
diff --git a/db/schema_migrations/20220820221036 b/db/schema_migrations/20220820221036
deleted file mode 100644
index 6f7c4059487..00000000000
--- a/db/schema_migrations/20220820221036
+++ /dev/null
@@ -1 +0,0 @@
-16825936e8e6a4f0a1f001a83ecf81f180ee2eb15589eebe821fee2706456cef \ No newline at end of file
diff --git a/db/schema_migrations/20220822071909 b/db/schema_migrations/20220822071909
deleted file mode 100644
index fd8af68d1ee..00000000000
--- a/db/schema_migrations/20220822071909
+++ /dev/null
@@ -1 +0,0 @@
-60a72830780190214d6c86fc2d07dc0fc138f6cc258689c1d106bb456b130047 \ No newline at end of file
diff --git a/db/schema_migrations/20220822090656 b/db/schema_migrations/20220822090656
deleted file mode 100644
index bc1ec6d44b9..00000000000
--- a/db/schema_migrations/20220822090656
+++ /dev/null
@@ -1 +0,0 @@
-696550615046e26d4012d8b5a5fb741d85c23d4d0d08a4a781da0123c0543de1 \ No newline at end of file
diff --git a/db/schema_migrations/20220822094804 b/db/schema_migrations/20220822094804
deleted file mode 100644
index 6e4e3b0d5e1..00000000000
--- a/db/schema_migrations/20220822094804
+++ /dev/null
@@ -1 +0,0 @@
-035e918bcb674fdf1300a5bccbad87806311e6de8589f2db57d7af9cd0108ee9 \ No newline at end of file
diff --git a/db/schema_migrations/20220822102651 b/db/schema_migrations/20220822102651
deleted file mode 100644
index 851535d2924..00000000000
--- a/db/schema_migrations/20220822102651
+++ /dev/null
@@ -1 +0,0 @@
-2bf5f851ee8919f2306a36ae299cd3c30943d5cc3356981bab2091ff104ef127 \ No newline at end of file
diff --git a/db/schema_migrations/20220822103638 b/db/schema_migrations/20220822103638
deleted file mode 100644
index 5633f697b1b..00000000000
--- a/db/schema_migrations/20220822103638
+++ /dev/null
@@ -1 +0,0 @@
-9aee5b0e3475736170d7169fd3c8ac9933d976ee69a2769dea29ee4bc553af27 \ No newline at end of file
diff --git a/db/schema_migrations/20220823084747 b/db/schema_migrations/20220823084747
deleted file mode 100644
index d748dee5916..00000000000
--- a/db/schema_migrations/20220823084747
+++ /dev/null
@@ -1 +0,0 @@
-f192ab50bed6dd03ae9c9c51c89d870ad6d2d1cbae129ed2da31fc061b9901d4 \ No newline at end of file
diff --git a/db/schema_migrations/20220824114218 b/db/schema_migrations/20220824114218
deleted file mode 100644
index bddb1a00d0b..00000000000
--- a/db/schema_migrations/20220824114218
+++ /dev/null
@@ -1 +0,0 @@
-7674883ca0ee06d9e70841ca8e01a8e4e74eb5958797032a134afa6790699c86 \ No newline at end of file
diff --git a/db/schema_migrations/20220824175648 b/db/schema_migrations/20220824175648
deleted file mode 100644
index 7a54d9c2a41..00000000000
--- a/db/schema_migrations/20220824175648
+++ /dev/null
@@ -1 +0,0 @@
-5f2c56f9dd6f7ddbf34718f37fc9c37dfd9afeeae9cd2efb9fd465874b6ea8c0 \ No newline at end of file
diff --git a/db/schema_migrations/20220824194103 b/db/schema_migrations/20220824194103
deleted file mode 100644
index 388bc5dfe66..00000000000
--- a/db/schema_migrations/20220824194103
+++ /dev/null
@@ -1 +0,0 @@
-5bc756cf41923c2287c73e298d21ba49bae2ff6edad1629d078d192cb85dc5b8 \ No newline at end of file
diff --git a/db/schema_migrations/20220825061250 b/db/schema_migrations/20220825061250
deleted file mode 100644
index 62ce31a672a..00000000000
--- a/db/schema_migrations/20220825061250
+++ /dev/null
@@ -1 +0,0 @@
-0338843ad56b423559e613f00df205122b4f6db194cf49712b2ff46b2ad030e0 \ No newline at end of file
diff --git a/db/schema_migrations/20220825105631 b/db/schema_migrations/20220825105631
deleted file mode 100644
index 6d6691cc6a4..00000000000
--- a/db/schema_migrations/20220825105631
+++ /dev/null
@@ -1 +0,0 @@
-2e5f7b79076a35fdb61aec46dea27d45f81e47c20f962f12b494fc7a8c714813 \ No newline at end of file
diff --git a/db/schema_migrations/20220825134827 b/db/schema_migrations/20220825134827
deleted file mode 100644
index 256a203e005..00000000000
--- a/db/schema_migrations/20220825134827
+++ /dev/null
@@ -1 +0,0 @@
-f70447919b6346e3bcdc029e1493166efd28ae562b94013d80ac280e19787e2a \ No newline at end of file
diff --git a/db/schema_migrations/20220825142324 b/db/schema_migrations/20220825142324
deleted file mode 100644
index 98f8863d3d7..00000000000
--- a/db/schema_migrations/20220825142324
+++ /dev/null
@@ -1 +0,0 @@
-9df1108b41fdb4546d4c62edffba2a386bcdf486749096b3fb49d289e5c9698d \ No newline at end of file
diff --git a/db/schema_migrations/20220826165048 b/db/schema_migrations/20220826165048
deleted file mode 100644
index 0539118356d..00000000000
--- a/db/schema_migrations/20220826165048
+++ /dev/null
@@ -1 +0,0 @@
-75cb9d7b4a0bc8ad26b3bf6bf41a4414bcc4307607de058fc35fe4ece7009423 \ No newline at end of file
diff --git a/db/schema_migrations/20220826175058 b/db/schema_migrations/20220826175058
deleted file mode 100644
index 55449ae1047..00000000000
--- a/db/schema_migrations/20220826175058
+++ /dev/null
@@ -1 +0,0 @@
-2553878c425173fc41e64723814d4bca8f3f59f98479080e74a85f327412f3d4 \ No newline at end of file
diff --git a/db/schema_migrations/20220828094411 b/db/schema_migrations/20220828094411
deleted file mode 100644
index 50acfab59b9..00000000000
--- a/db/schema_migrations/20220828094411
+++ /dev/null
@@ -1 +0,0 @@
-7373697e5064a5ecca5881e7b98a30deba033bf8d79d2121cd17200f72815252 \ No newline at end of file
diff --git a/db/schema_migrations/20220828131848 b/db/schema_migrations/20220828131848
deleted file mode 100644
index 0cd8dbbebaa..00000000000
--- a/db/schema_migrations/20220828131848
+++ /dev/null
@@ -1 +0,0 @@
-d38668a9110a69f12c4d60886ace04da4f6dd7f250763a888d3c428a74032b7d \ No newline at end of file
diff --git a/db/schema_migrations/20220829183356 b/db/schema_migrations/20220829183356
deleted file mode 100644
index 087a8a8ab6b..00000000000
--- a/db/schema_migrations/20220829183356
+++ /dev/null
@@ -1 +0,0 @@
-4d8be5080046eff9c3736cd2494c02b2d2cb1eeea2753479617cb344bc5b1cbb \ No newline at end of file
diff --git a/db/schema_migrations/20220830051704 b/db/schema_migrations/20220830051704
deleted file mode 100644
index 5785862da4f..00000000000
--- a/db/schema_migrations/20220830051704
+++ /dev/null
@@ -1 +0,0 @@
-aa0b767ad0e38500e0eef83d5c8306054952363166f8cc2076ce48feeac1b0e1 \ No newline at end of file
diff --git a/db/schema_migrations/20220830061704 b/db/schema_migrations/20220830061704
deleted file mode 100644
index 7a0db1acc65..00000000000
--- a/db/schema_migrations/20220830061704
+++ /dev/null
@@ -1 +0,0 @@
-badc3556e1dea545bbf8b55fb33065f45598df9b3fda74bffd28e89d7485e0b4 \ No newline at end of file
diff --git a/db/schema_migrations/20220830071704 b/db/schema_migrations/20220830071704
deleted file mode 100644
index bc9d7fd0f8b..00000000000
--- a/db/schema_migrations/20220830071704
+++ /dev/null
@@ -1 +0,0 @@
-85e401f0920c6eb13b6756f191ccdf70494ca40f8133f05bbd5f23ba295b115d \ No newline at end of file
diff --git a/db/schema_migrations/20220830082928 b/db/schema_migrations/20220830082928
deleted file mode 100644
index 9c7cf011ab7..00000000000
--- a/db/schema_migrations/20220830082928
+++ /dev/null
@@ -1 +0,0 @@
-4d7bde950a405f424c0bf3828d21e6bfd16746e091e177abfb397114c5b5b53c \ No newline at end of file
diff --git a/db/schema_migrations/20220830114228 b/db/schema_migrations/20220830114228
deleted file mode 100644
index 44b26221fd5..00000000000
--- a/db/schema_migrations/20220830114228
+++ /dev/null
@@ -1 +0,0 @@
-fad5bab727bdaed1d17950d320baecd995dcc8a91816e2cfcdff6d1b393c637d \ No newline at end of file
diff --git a/db/schema_migrations/20220830172142 b/db/schema_migrations/20220830172142
deleted file mode 100644
index 3db3c5f4948..00000000000
--- a/db/schema_migrations/20220830172142
+++ /dev/null
@@ -1 +0,0 @@
-77d17e190cc1b879960763ef32458480897e3da9483503d99c18b5aacd080ce3 \ No newline at end of file
diff --git a/db/schema_migrations/20220831021358 b/db/schema_migrations/20220831021358
deleted file mode 100644
index 186bfbdb4c3..00000000000
--- a/db/schema_migrations/20220831021358
+++ /dev/null
@@ -1 +0,0 @@
-a1bca159b3ea6abbe3f3178bb1106b3b1886de74dfcdf0a41ec8a48ac6bd421a \ No newline at end of file
diff --git a/db/schema_migrations/20220831090454 b/db/schema_migrations/20220831090454
deleted file mode 100644
index 70f41257873..00000000000
--- a/db/schema_migrations/20220831090454
+++ /dev/null
@@ -1 +0,0 @@
-681514d675382385f77cbcb5ec22038555670f95a35f1ced42554452718bd193 \ No newline at end of file
diff --git a/db/schema_migrations/20220831132802 b/db/schema_migrations/20220831132802
deleted file mode 100644
index 542bf0c240b..00000000000
--- a/db/schema_migrations/20220831132802
+++ /dev/null
@@ -1 +0,0 @@
-ce0fdbed5966929816028cdd27f597ebb722ff0058d4e78b700a96952dd1274f \ No newline at end of file
diff --git a/db/schema_migrations/20220831182105 b/db/schema_migrations/20220831182105
deleted file mode 100644
index 6f4b0f46ff1..00000000000
--- a/db/schema_migrations/20220831182105
+++ /dev/null
@@ -1 +0,0 @@
-80828666cac381dde65dc208764b6e1c7fe703b63c708410f72afdd33886fc60 \ No newline at end of file
diff --git a/db/schema_migrations/20220901035722 b/db/schema_migrations/20220901035722
deleted file mode 100644
index aa9ea1cdf21..00000000000
--- a/db/schema_migrations/20220901035722
+++ /dev/null
@@ -1 +0,0 @@
-afcbf032220e9e40ab6ae25d6ac8ea9df7f46649bf70219be9b206af6d9d0c7c \ No newline at end of file
diff --git a/db/schema_migrations/20220901035725 b/db/schema_migrations/20220901035725
deleted file mode 100644
index 3c60c0188a2..00000000000
--- a/db/schema_migrations/20220901035725
+++ /dev/null
@@ -1 +0,0 @@
-877ff6aab260278dfa3e886f093f34ee8004bbdaec2aabc12cebee37a879fd8d \ No newline at end of file
diff --git a/db/schema_migrations/20220901071310 b/db/schema_migrations/20220901071310
deleted file mode 100644
index 9134d6669a0..00000000000
--- a/db/schema_migrations/20220901071310
+++ /dev/null
@@ -1 +0,0 @@
-dee16fbf6edef6da0c9c55b0dca290bc1a1939b8d747ace6594a4d73a70adc7d \ No newline at end of file
diff --git a/db/schema_migrations/20220901071355 b/db/schema_migrations/20220901071355
deleted file mode 100644
index 5e8681b9ff0..00000000000
--- a/db/schema_migrations/20220901071355
+++ /dev/null
@@ -1 +0,0 @@
-3fe94b8d0102c5b5ed7824477cf4a535e42da9a232a320f770442530c77eb960 \ No newline at end of file
diff --git a/db/schema_migrations/20220901073300 b/db/schema_migrations/20220901073300
deleted file mode 100644
index 47cba2c6c05..00000000000
--- a/db/schema_migrations/20220901073300
+++ /dev/null
@@ -1 +0,0 @@
-92ca7bd3f150c9d447e6ab2152b7039379fece41bdef85addcf59b464dc95eb8 \ No newline at end of file
diff --git a/db/schema_migrations/20220901090004 b/db/schema_migrations/20220901090004
deleted file mode 100644
index a0302cfe1ed..00000000000
--- a/db/schema_migrations/20220901090004
+++ /dev/null
@@ -1 +0,0 @@
-eab8630158a70df1246bf5c12c2d93d9fa855140c65bde4665d1d13f371b561c \ No newline at end of file
diff --git a/db/schema_migrations/20220901092853 b/db/schema_migrations/20220901092853
deleted file mode 100644
index 2ebe0b9ffee..00000000000
--- a/db/schema_migrations/20220901092853
+++ /dev/null
@@ -1 +0,0 @@
-0d134b0f3ba5adcc515072a2c1f995f3f3a89f298ee84f1f58c2f7afb0b85a0f \ No newline at end of file
diff --git a/db/schema_migrations/20220901114501 b/db/schema_migrations/20220901114501
deleted file mode 100644
index e3367fb7612..00000000000
--- a/db/schema_migrations/20220901114501
+++ /dev/null
@@ -1 +0,0 @@
-2c18be04f3b5800c84a50763e7650229a6ae02619a2913966af2c936d3d9aec1 \ No newline at end of file
diff --git a/db/schema_migrations/20220901124637 b/db/schema_migrations/20220901124637
deleted file mode 100644
index b5a08a248e0..00000000000
--- a/db/schema_migrations/20220901124637
+++ /dev/null
@@ -1 +0,0 @@
-59ea43b60e0fb009823d82e99494a7fcb31eeaddc0a6ccbf43009977cdd32526 \ No newline at end of file
diff --git a/db/schema_migrations/20220901131828 b/db/schema_migrations/20220901131828
deleted file mode 100644
index b41fef9415b..00000000000
--- a/db/schema_migrations/20220901131828
+++ /dev/null
@@ -1 +0,0 @@
-c32756c482bdda948f911d0405d2373673041c57ebc514cfc5f172ba6fda9185 \ No newline at end of file
diff --git a/db/schema_migrations/20220901184106 b/db/schema_migrations/20220901184106
deleted file mode 100644
index d529617762a..00000000000
--- a/db/schema_migrations/20220901184106
+++ /dev/null
@@ -1 +0,0 @@
-3934393670a67a38e0e558f7be2cb2b2a51d268c49f5992624dedfb2bc826ee4 \ No newline at end of file
diff --git a/db/schema_migrations/20220901184246 b/db/schema_migrations/20220901184246
deleted file mode 100644
index 556f3ff1b3e..00000000000
--- a/db/schema_migrations/20220901184246
+++ /dev/null
@@ -1 +0,0 @@
-fe06d38ab5a86850e5b915243dd70d0fe7fef9a61d9bd54c71651aa8eb1eb0e3 \ No newline at end of file
diff --git a/db/schema_migrations/20220901212027 b/db/schema_migrations/20220901212027
deleted file mode 100644
index 8112c3492eb..00000000000
--- a/db/schema_migrations/20220901212027
+++ /dev/null
@@ -1 +0,0 @@
-3e29afa3670370b8f5801523711d0689f1228a880b1941c44798f4bc76bedbb0 \ No newline at end of file
diff --git a/db/schema_migrations/20220902065314 b/db/schema_migrations/20220902065314
deleted file mode 100644
index 8197a41403d..00000000000
--- a/db/schema_migrations/20220902065314
+++ /dev/null
@@ -1 +0,0 @@
-d1ca445a17c742d435cba3d898e61242a3df9c92caeadecba147fce858d8cb80 \ No newline at end of file
diff --git a/db/schema_migrations/20220902065316 b/db/schema_migrations/20220902065316
deleted file mode 100644
index e9c3598206e..00000000000
--- a/db/schema_migrations/20220902065316
+++ /dev/null
@@ -1 +0,0 @@
-910d87fbab226671b8e12b236be43970f6b2a3083f30df9586b3f8edf779f4af \ No newline at end of file
diff --git a/db/schema_migrations/20220902065317 b/db/schema_migrations/20220902065317
deleted file mode 100644
index fa60ee97fef..00000000000
--- a/db/schema_migrations/20220902065317
+++ /dev/null
@@ -1 +0,0 @@
-11c65391a6744d7d7c303c6593dafa8e6dca392675974a2a1df2c164afbd4fe1 \ No newline at end of file
diff --git a/db/schema_migrations/20220902065558 b/db/schema_migrations/20220902065558
deleted file mode 100644
index 2886e656d41..00000000000
--- a/db/schema_migrations/20220902065558
+++ /dev/null
@@ -1 +0,0 @@
-cce779cc52b2bb175ccd3d07ac6a7df3711ae362fa0a5004bfc58fa1eb440e1f \ No newline at end of file
diff --git a/db/schema_migrations/20220902065611 b/db/schema_migrations/20220902065611
deleted file mode 100644
index 365cb0f6194..00000000000
--- a/db/schema_migrations/20220902065611
+++ /dev/null
@@ -1 +0,0 @@
-8ec0cc23559ba1b83042bed4abf8c47487ecb999fa66e602fbf4a9edac0569ec \ No newline at end of file
diff --git a/db/schema_migrations/20220902065623 b/db/schema_migrations/20220902065623
deleted file mode 100644
index cf75e086f31..00000000000
--- a/db/schema_migrations/20220902065623
+++ /dev/null
@@ -1 +0,0 @@
-4f2076138e65849d60cf093f140afa1abaa7beea4d6c95048e6743168a7f17a9 \ No newline at end of file
diff --git a/db/schema_migrations/20220902065635 b/db/schema_migrations/20220902065635
deleted file mode 100644
index bd131598d78..00000000000
--- a/db/schema_migrations/20220902065635
+++ /dev/null
@@ -1 +0,0 @@
-49a86fa87974f2c0cdc5a38726ab792f70c43e7f215495323d0999fd9f6e45f6 \ No newline at end of file
diff --git a/db/schema_migrations/20220902065647 b/db/schema_migrations/20220902065647
deleted file mode 100644
index 31ee9352fe6..00000000000
--- a/db/schema_migrations/20220902065647
+++ /dev/null
@@ -1 +0,0 @@
-812f25371d731d03bd4727328ad0daaf954595e24a314dd5f1adccdc3a4532c4 \ No newline at end of file
diff --git a/db/schema_migrations/20220902111016 b/db/schema_migrations/20220902111016
deleted file mode 100644
index 33ea3c75bba..00000000000
--- a/db/schema_migrations/20220902111016
+++ /dev/null
@@ -1 +0,0 @@
-13a36d34ff1c812a8993be87721b9d9472c26cfb6fcd8f56e9aa3c59d97183a9 \ No newline at end of file
diff --git a/db/schema_migrations/20220902111038 b/db/schema_migrations/20220902111038
deleted file mode 100644
index ecfad43fff1..00000000000
--- a/db/schema_migrations/20220902111038
+++ /dev/null
@@ -1 +0,0 @@
-65c55f8fe4037d0e492f1c2a4ff83481a0da3ab17f6c63a56c181fba5d5822ba \ No newline at end of file
diff --git a/db/schema_migrations/20220902165931 b/db/schema_migrations/20220902165931
deleted file mode 100644
index 3933f0d87fb..00000000000
--- a/db/schema_migrations/20220902165931
+++ /dev/null
@@ -1 +0,0 @@
-b29e850775a327dcf6e37e25a43066a0638a55a4e0bd6b818cf496f0b97c6f82 \ No newline at end of file
diff --git a/db/schema_migrations/20220902170131 b/db/schema_migrations/20220902170131
deleted file mode 100644
index e598289a154..00000000000
--- a/db/schema_migrations/20220902170131
+++ /dev/null
@@ -1 +0,0 @@
-5b1c25848e3e890fe27c3a43effce093af5f0fe42118c7976919acef84387a0a \ No newline at end of file
diff --git a/db/schema_migrations/20220902204048 b/db/schema_migrations/20220902204048
deleted file mode 100644
index c5fc6ee1448..00000000000
--- a/db/schema_migrations/20220902204048
+++ /dev/null
@@ -1 +0,0 @@
-577a3808889d0e53af3c45ee38e852b8e653f7292c0144769811e4662e9c8c7b \ No newline at end of file
diff --git a/db/schema_migrations/20220904173342 b/db/schema_migrations/20220904173342
deleted file mode 100644
index 951b667372c..00000000000
--- a/db/schema_migrations/20220904173342
+++ /dev/null
@@ -1 +0,0 @@
-407fd539c6ff5cb8e71a2da80fe9dfb0002a45d5fce84a391b2332a653d6e09e \ No newline at end of file
diff --git a/db/schema_migrations/20220904173430 b/db/schema_migrations/20220904173430
deleted file mode 100644
index 6c1750b8784..00000000000
--- a/db/schema_migrations/20220904173430
+++ /dev/null
@@ -1 +0,0 @@
-28b91d351f3d23377d79116bdd268871f755675efb3df647e2bea51482e1aff8 \ No newline at end of file
diff --git a/db/schema_migrations/20220905090300 b/db/schema_migrations/20220905090300
deleted file mode 100644
index 32d1ab47c9e..00000000000
--- a/db/schema_migrations/20220905090300
+++ /dev/null
@@ -1 +0,0 @@
-e15a37d20202e204fcf02ab68d3b616eec0501c2c323db69ed2fb39df0d017f6 \ No newline at end of file
diff --git a/db/schema_migrations/20220905090339 b/db/schema_migrations/20220905090339
deleted file mode 100644
index 52c2e038c93..00000000000
--- a/db/schema_migrations/20220905090339
+++ /dev/null
@@ -1 +0,0 @@
-f3a7e9c501498b22786960694a8c1f35d2db69c8c48319f99dfb81c41aa5c6ca \ No newline at end of file
diff --git a/db/schema_migrations/20220905112710 b/db/schema_migrations/20220905112710
deleted file mode 100644
index 9f20a8cc9b6..00000000000
--- a/db/schema_migrations/20220905112710
+++ /dev/null
@@ -1 +0,0 @@
-85db0670a8557421a59678f19324411d61220eae12ea68f565d458a7393f6b2e \ No newline at end of file
diff --git a/db/schema_migrations/20220905120848 b/db/schema_migrations/20220905120848
deleted file mode 100644
index ebfd3a0b59c..00000000000
--- a/db/schema_migrations/20220905120848
+++ /dev/null
@@ -1 +0,0 @@
-f8196de8a4c8f6e8c6790c0d741b0deb455c533a35f665fffeb70c833d0ecd29 \ No newline at end of file
diff --git a/db/schema_migrations/20220906074449 b/db/schema_migrations/20220906074449
deleted file mode 100644
index df657642eb3..00000000000
--- a/db/schema_migrations/20220906074449
+++ /dev/null
@@ -1 +0,0 @@
-fc34cdbddc61ee9c23b790101f911d21892cf2ace34e3615b920817374c803f9 \ No newline at end of file
diff --git a/db/schema_migrations/20220906093857 b/db/schema_migrations/20220906093857
deleted file mode 100644
index a5bc36ab6ef..00000000000
--- a/db/schema_migrations/20220906093857
+++ /dev/null
@@ -1 +0,0 @@
-394f346e3a93f8a6b74fd0461eb59f569c6a18f90ae653c330a38e3a3706b5f6 \ No newline at end of file
diff --git a/db/schema_migrations/20220906155105 b/db/schema_migrations/20220906155105
deleted file mode 100644
index b5aec9a8279..00000000000
--- a/db/schema_migrations/20220906155105
+++ /dev/null
@@ -1 +0,0 @@
-a3eb4d190652c43f95f8823f11957064fcf097a1fd6641562a09de5ae02ceb6e \ No newline at end of file
diff --git a/db/schema_migrations/20220906204832 b/db/schema_migrations/20220906204832
deleted file mode 100644
index a63248d6221..00000000000
--- a/db/schema_migrations/20220906204832
+++ /dev/null
@@ -1 +0,0 @@
-bda120b4684900c0763af116557930a77b2dfa3c3884ae7f8d4183db546fa019 \ No newline at end of file
diff --git a/db/schema_migrations/20220906212931 b/db/schema_migrations/20220906212931
deleted file mode 100644
index 38f14a166e7..00000000000
--- a/db/schema_migrations/20220906212931
+++ /dev/null
@@ -1 +0,0 @@
-0a6bd5578f5180fac269ffd8a78fc87b7bd95be4b0246890d5c57d79f2a856f8 \ No newline at end of file
diff --git a/db/schema_migrations/20220907115806 b/db/schema_migrations/20220907115806
deleted file mode 100644
index 878ac923880..00000000000
--- a/db/schema_migrations/20220907115806
+++ /dev/null
@@ -1 +0,0 @@
-bfc9595c9e33afecd07721ab03548bdc5d9dda5be8fff180d84fc644f6c8c977 \ No newline at end of file
diff --git a/db/schema_migrations/20220907122648 b/db/schema_migrations/20220907122648
deleted file mode 100644
index 1f743d593c2..00000000000
--- a/db/schema_migrations/20220907122648
+++ /dev/null
@@ -1 +0,0 @@
-b576db8eb36b1d214788d301fd756d247c3fa33e13b7083e27c42735b48483e0 \ No newline at end of file
diff --git a/db/schema_migrations/20220907124320 b/db/schema_migrations/20220907124320
deleted file mode 100644
index 59077465bf9..00000000000
--- a/db/schema_migrations/20220907124320
+++ /dev/null
@@ -1 +0,0 @@
-5b645f66351e9515826be882767ad07671b7b5fad7b942bc74325b05c84130ac \ No newline at end of file
diff --git a/db/schema_migrations/20220908125146 b/db/schema_migrations/20220908125146
deleted file mode 100644
index 2b8475f0d70..00000000000
--- a/db/schema_migrations/20220908125146
+++ /dev/null
@@ -1 +0,0 @@
-d5d264f90203ba371edcf0688d1227aa69cbf0018033d141257e4c88072ee7d7 \ No newline at end of file
diff --git a/db/schema_migrations/20220909091410 b/db/schema_migrations/20220909091410
deleted file mode 100644
index 49738ad23af..00000000000
--- a/db/schema_migrations/20220909091410
+++ /dev/null
@@ -1 +0,0 @@
-34e485c0c94960fc07a3f529aed749c2bbc1a72bb49d064225a37b85134f70f2 \ No newline at end of file
diff --git a/db/schema_migrations/20220909094752 b/db/schema_migrations/20220909094752
deleted file mode 100644
index 4660f31f8d0..00000000000
--- a/db/schema_migrations/20220909094752
+++ /dev/null
@@ -1 +0,0 @@
-2a0fb7dc05ed2949745cb85df20ad0f46f38f9efc6e7d84e559cff3f647fed9e \ No newline at end of file
diff --git a/db/schema_migrations/20220909113809 b/db/schema_migrations/20220909113809
deleted file mode 100644
index 9bf2a6b0e03..00000000000
--- a/db/schema_migrations/20220909113809
+++ /dev/null
@@ -1 +0,0 @@
-ec9f278411b727587be787eabfa356f3c497b1927283a85063d7067495097fe0 \ No newline at end of file
diff --git a/db/schema_migrations/20220909114220 b/db/schema_migrations/20220909114220
deleted file mode 100644
index 7100121ace6..00000000000
--- a/db/schema_migrations/20220909114220
+++ /dev/null
@@ -1 +0,0 @@
-2a5833aca02f3d42f0bd0c6861fb244166b9f8bd2a5b29a1d97df9b8cdea5c11 \ No newline at end of file
diff --git a/db/schema_migrations/20220912085047 b/db/schema_migrations/20220912085047
deleted file mode 100644
index 7279f94eb21..00000000000
--- a/db/schema_migrations/20220912085047
+++ /dev/null
@@ -1 +0,0 @@
-30d9f3352daa48f529486030e30667a1339b04e96b207be815505477ab498adb \ No newline at end of file
diff --git a/db/schema_migrations/20220912110433 b/db/schema_migrations/20220912110433
deleted file mode 100644
index 0e31168be7d..00000000000
--- a/db/schema_migrations/20220912110433
+++ /dev/null
@@ -1 +0,0 @@
-3bf30b096f71664f5bfae88cc21b1d7992ebcbbb6eb9eb15348bc689291bffd2 \ No newline at end of file
diff --git a/db/schema_migrations/20220912153839 b/db/schema_migrations/20220912153839
deleted file mode 100644
index 26666148feb..00000000000
--- a/db/schema_migrations/20220912153839
+++ /dev/null
@@ -1 +0,0 @@
-9cb59a045dd09fc956683e976d127f8f2346b2b26c25eeeadc4b0ef838fa1d02 \ No newline at end of file
diff --git a/db/schema_migrations/20220912180807 b/db/schema_migrations/20220912180807
deleted file mode 100644
index 77fb556b1fd..00000000000
--- a/db/schema_migrations/20220912180807
+++ /dev/null
@@ -1 +0,0 @@
-6959c82221a22ac1a2aba39a1a023f227989ac26b08fc0aa5a0596f597e0098c \ No newline at end of file
diff --git a/db/schema_migrations/20220913030552 b/db/schema_migrations/20220913030552
deleted file mode 100644
index 6d6a68788dc..00000000000
--- a/db/schema_migrations/20220913030552
+++ /dev/null
@@ -1 +0,0 @@
-39538feebc6f7f4e1822148567ed369eee1a7ed7ee718f7e913e2b585cc0e808 \ No newline at end of file
diff --git a/db/schema_migrations/20220913030624 b/db/schema_migrations/20220913030624
deleted file mode 100644
index 8a0641b4f8c..00000000000
--- a/db/schema_migrations/20220913030624
+++ /dev/null
@@ -1 +0,0 @@
-baac0b236b7e91f9aacd03f3cf1ce84974f6c389529143e9b2813d9b70224e53 \ No newline at end of file
diff --git a/db/schema_migrations/20220913043728 b/db/schema_migrations/20220913043728
deleted file mode 100644
index 80dd2b0c9a4..00000000000
--- a/db/schema_migrations/20220913043728
+++ /dev/null
@@ -1 +0,0 @@
-ae25d97cf0f867578fd0308ac4b2dea82710973bb2b6d9df58531b1586462838 \ No newline at end of file
diff --git a/db/schema_migrations/20220913082728 b/db/schema_migrations/20220913082728
deleted file mode 100644
index 18b538fada9..00000000000
--- a/db/schema_migrations/20220913082728
+++ /dev/null
@@ -1 +0,0 @@
-0143a083e7083e9324a0e27a3a42083b56939cf841eb3d9c26d26b4b774d55d0 \ No newline at end of file
diff --git a/db/schema_migrations/20220913082824 b/db/schema_migrations/20220913082824
deleted file mode 100644
index 550ef78804b..00000000000
--- a/db/schema_migrations/20220913082824
+++ /dev/null
@@ -1 +0,0 @@
-8776d132d5f95969003edf7f56213206f2321bc1963b80a50006d07f0c9f3bf4 \ No newline at end of file
diff --git a/db/schema_migrations/20220913082930 b/db/schema_migrations/20220913082930
deleted file mode 100644
index 8afd779b269..00000000000
--- a/db/schema_migrations/20220913082930
+++ /dev/null
@@ -1 +0,0 @@
-3ae91ffae238c36a8e5ea021acfca8faa1c817d87078a5df9cf8213f259548a7 \ No newline at end of file
diff --git a/db/schema_migrations/20220913083015 b/db/schema_migrations/20220913083015
deleted file mode 100644
index 4f6b2a9459a..00000000000
--- a/db/schema_migrations/20220913083015
+++ /dev/null
@@ -1 +0,0 @@
-19012eef52669209fa487d8a72d3e4363a6588250d9cb068ce7ffed72f95ac11 \ No newline at end of file
diff --git a/db/schema_migrations/20220913084123 b/db/schema_migrations/20220913084123
deleted file mode 100644
index 1791350c1fc..00000000000
--- a/db/schema_migrations/20220913084123
+++ /dev/null
@@ -1 +0,0 @@
-e43e754e52339fe333bb91c0b098a394cb211c1dcec36fad023cfa954ecfe5c0 \ No newline at end of file
diff --git a/db/schema_migrations/20220914005141 b/db/schema_migrations/20220914005141
deleted file mode 100644
index 88859155884..00000000000
--- a/db/schema_migrations/20220914005141
+++ /dev/null
@@ -1 +0,0 @@
-df7862d3bab250feb867ecf60134bbfdffdfd6ea4f3a5a9b2c7e546e0aa89e3f \ No newline at end of file
diff --git a/db/schema_migrations/20220914010233 b/db/schema_migrations/20220914010233
deleted file mode 100644
index 777c73c0be6..00000000000
--- a/db/schema_migrations/20220914010233
+++ /dev/null
@@ -1 +0,0 @@
-be86548616ce5b4e6f0caf6db79c49ac523766257d20c6f5465d21a0e53f46d0 \ No newline at end of file
diff --git a/db/schema_migrations/20220914070927 b/db/schema_migrations/20220914070927
deleted file mode 100644
index 7ff18f80def..00000000000
--- a/db/schema_migrations/20220914070927
+++ /dev/null
@@ -1 +0,0 @@
-d8a610c72f2009f3beb89ef2da4d703d3d79e4abfc9c18579eecb03bde4e0683 \ No newline at end of file
diff --git a/db/schema_migrations/20220914080716 b/db/schema_migrations/20220914080716
deleted file mode 100644
index 7c807e61c26..00000000000
--- a/db/schema_migrations/20220914080716
+++ /dev/null
@@ -1 +0,0 @@
-ffa421a7ffc279cb2751ed9e74c212ab60a3b6f7722d15023d39f7ad97ff1e6c \ No newline at end of file
diff --git a/db/schema_migrations/20220914093408 b/db/schema_migrations/20220914093408
deleted file mode 100644
index d18e80f8bfc..00000000000
--- a/db/schema_migrations/20220914093408
+++ /dev/null
@@ -1 +0,0 @@
-3dfa9c266943018e06463b1eaf80fed67df602a9f3ee22c2054c6a05040a7382 \ No newline at end of file
diff --git a/db/schema_migrations/20220914112457 b/db/schema_migrations/20220914112457
deleted file mode 100644
index ab67d0abb99..00000000000
--- a/db/schema_migrations/20220914112457
+++ /dev/null
@@ -1 +0,0 @@
-766866e84cdafce6506f18e574e1cfb760a581fa7464ce7e29c31d9778c687c0 \ No newline at end of file
diff --git a/db/schema_migrations/20220914130800 b/db/schema_migrations/20220914130800
deleted file mode 100644
index 2fab1dfd4b9..00000000000
--- a/db/schema_migrations/20220914130800
+++ /dev/null
@@ -1 +0,0 @@
-c0a3269fbd44428439932f3b12b154425eafaab0b0638f7f27a03e784d0f0e32 \ No newline at end of file
diff --git a/db/schema_migrations/20220914131449 b/db/schema_migrations/20220914131449
deleted file mode 100644
index f735b7867d1..00000000000
--- a/db/schema_migrations/20220914131449
+++ /dev/null
@@ -1 +0,0 @@
-205f1fee1ed33a2b069e51a76b94c72702300c72c4705569be2368f8804f3bce \ No newline at end of file
diff --git a/db/schema_migrations/20220914174705 b/db/schema_migrations/20220914174705
deleted file mode 100644
index 2ef8c90a31f..00000000000
--- a/db/schema_migrations/20220914174705
+++ /dev/null
@@ -1 +0,0 @@
-f481a617b3fc4fa95daec75619029dc8ef3a02d55e86b940eda78d6a93e6e78b \ No newline at end of file
diff --git a/db/schema_migrations/20220915103831 b/db/schema_migrations/20220915103831
deleted file mode 100644
index 29a516c0e60..00000000000
--- a/db/schema_migrations/20220915103831
+++ /dev/null
@@ -1 +0,0 @@
-86eeefedacc05cd6d4da63fd24b55af8e32f00d1c4e21b3f507d08310504adee \ No newline at end of file
diff --git a/db/schema_migrations/20220915140802 b/db/schema_migrations/20220915140802
deleted file mode 100644
index 676e295aa14..00000000000
--- a/db/schema_migrations/20220915140802
+++ /dev/null
@@ -1 +0,0 @@
-9b0f19a59e104f0df6abac7d58012701dcf9a031116f5cc643e407506e186cc2 \ No newline at end of file
diff --git a/db/schema_migrations/20220915192521 b/db/schema_migrations/20220915192521
deleted file mode 100644
index ce848d0f186..00000000000
--- a/db/schema_migrations/20220915192521
+++ /dev/null
@@ -1 +0,0 @@
-9686a948e67f25d64f66187db27699b838b2caef11f27884dd6e868e4bcf7d47 \ No newline at end of file
diff --git a/db/schema_migrations/20220916054103 b/db/schema_migrations/20220916054103
deleted file mode 100644
index ab7f027f7ce..00000000000
--- a/db/schema_migrations/20220916054103
+++ /dev/null
@@ -1 +0,0 @@
-d410d105f8af6948dba3efc37469048435237c1e21faa10e66836c85acf33728 \ No newline at end of file
diff --git a/db/schema_migrations/20220916065418 b/db/schema_migrations/20220916065418
deleted file mode 100644
index f78f7149e66..00000000000
--- a/db/schema_migrations/20220916065418
+++ /dev/null
@@ -1 +0,0 @@
-2950f1826c77539072f66fcc46fefb77dcbcafe4cc8e5d0bdc090b19fc1600c7 \ No newline at end of file
diff --git a/db/schema_migrations/20220916070101 b/db/schema_migrations/20220916070101
deleted file mode 100644
index 90afdffcddb..00000000000
--- a/db/schema_migrations/20220916070101
+++ /dev/null
@@ -1 +0,0 @@
-e63bd78b80b7a5a475f0246fb8d2dcb1164f410705dfae44579dce5579655841 \ No newline at end of file
diff --git a/db/schema_migrations/20220916094641 b/db/schema_migrations/20220916094641
deleted file mode 100644
index d3ab02d6c59..00000000000
--- a/db/schema_migrations/20220916094641
+++ /dev/null
@@ -1 +0,0 @@
-a5fc50591f5070766ae1d8b4dee195ec91df5fb1aa635c0d39d3d897e54393a5 \ No newline at end of file
diff --git a/db/schema_migrations/20220916103311 b/db/schema_migrations/20220916103311
deleted file mode 100644
index cc265c0800e..00000000000
--- a/db/schema_migrations/20220916103311
+++ /dev/null
@@ -1 +0,0 @@
-dbaeae67bb734a491dd40860159285b41d25a3336198f55a52f28190a8f6aeac \ No newline at end of file
diff --git a/db/schema_migrations/20220916112841 b/db/schema_migrations/20220916112841
deleted file mode 100644
index 23013f9fdb3..00000000000
--- a/db/schema_migrations/20220916112841
+++ /dev/null
@@ -1 +0,0 @@
-0bc8cd07786c950037731a0443e0d7da9c9692da39f13787b24769dbd122ba88 \ No newline at end of file
diff --git a/db/schema_migrations/20220918124223 b/db/schema_migrations/20220918124223
deleted file mode 100644
index 227bca2ab75..00000000000
--- a/db/schema_migrations/20220918124223
+++ /dev/null
@@ -1 +0,0 @@
-ff995d7a3c23959c4d4e6c6d0adfd338be36f6c07c98bacd26f282d84b2fa33d \ No newline at end of file
diff --git a/db/schema_migrations/20220919023208 b/db/schema_migrations/20220919023208
deleted file mode 100644
index 30c305baaeb..00000000000
--- a/db/schema_migrations/20220919023208
+++ /dev/null
@@ -1 +0,0 @@
-e4e86511961bf3618bd3683e1bc97a8382bfa1369bd76186f01cfac9e80e0593 \ No newline at end of file
diff --git a/db/schema_migrations/20220919041604 b/db/schema_migrations/20220919041604
deleted file mode 100644
index e6943902bf3..00000000000
--- a/db/schema_migrations/20220919041604
+++ /dev/null
@@ -1 +0,0 @@
-a4115d5542d236a030db180363cf2c816ff68cd2c2a54e74a6b3ba916a40816e \ No newline at end of file
diff --git a/db/schema_migrations/20220919050555 b/db/schema_migrations/20220919050555
deleted file mode 100644
index 29d8d150809..00000000000
--- a/db/schema_migrations/20220919050555
+++ /dev/null
@@ -1 +0,0 @@
-ac61a72c2c197735404e6bccf3f2ceb9c3f5ff79c7df58f83b6ab1b55b81e532 \ No newline at end of file
diff --git a/db/schema_migrations/20220919062640 b/db/schema_migrations/20220919062640
deleted file mode 100644
index 0284cadd6d6..00000000000
--- a/db/schema_migrations/20220919062640
+++ /dev/null
@@ -1 +0,0 @@
-6b4e0ed9d29ace12f6ae1d4b8177ef998f9a5a3915cca80fa546a9f90ccde887 \ No newline at end of file
diff --git a/db/schema_migrations/20220919080303 b/db/schema_migrations/20220919080303
deleted file mode 100644
index 081e25c4ed5..00000000000
--- a/db/schema_migrations/20220919080303
+++ /dev/null
@@ -1 +0,0 @@
-9a5ba202075e0022defd834184aa59c60980cdccf7f4111834af6a119713b4c2 \ No newline at end of file
diff --git a/db/schema_migrations/20220919080304 b/db/schema_migrations/20220919080304
deleted file mode 100644
index 263128018ca..00000000000
--- a/db/schema_migrations/20220919080304
+++ /dev/null
@@ -1 +0,0 @@
-d5883d3edad5d8cc130f26feb4cc6fdb63e3b46c513ce463bdf7e45a8d7ffcdf \ No newline at end of file
diff --git a/db/schema_migrations/20220919225631 b/db/schema_migrations/20220919225631
deleted file mode 100644
index e30af0fd9f7..00000000000
--- a/db/schema_migrations/20220919225631
+++ /dev/null
@@ -1 +0,0 @@
-03accc241b8955f0ccfa3b40168e9f194360704d8937cd531683191b8fe4f8c8 \ No newline at end of file
diff --git a/db/schema_migrations/20220920022404 b/db/schema_migrations/20220920022404
deleted file mode 100644
index cbf8fedc39d..00000000000
--- a/db/schema_migrations/20220920022404
+++ /dev/null
@@ -1 +0,0 @@
-eec898c4b2ab4d0585d8259b9d0c1e644720c0ba665429434abea9a1062be367 \ No newline at end of file
diff --git a/db/schema_migrations/20220920081631 b/db/schema_migrations/20220920081631
deleted file mode 100644
index 071ef93fc7a..00000000000
--- a/db/schema_migrations/20220920081631
+++ /dev/null
@@ -1 +0,0 @@
-081480492cbe6e631f0357b181a883a2bc7f34566f23f119c0ba4df59ee363d6 \ No newline at end of file
diff --git a/db/schema_migrations/20220920122121 b/db/schema_migrations/20220920122121
deleted file mode 100644
index 7da41e83a11..00000000000
--- a/db/schema_migrations/20220920122121
+++ /dev/null
@@ -1 +0,0 @@
-fb6b88494168ef86863f41570a2bad1141d6c6e2305522bf622413702e3b3493 \ No newline at end of file
diff --git a/db/schema_migrations/20220920124709 b/db/schema_migrations/20220920124709
deleted file mode 100644
index e3b015d44a7..00000000000
--- a/db/schema_migrations/20220920124709
+++ /dev/null
@@ -1 +0,0 @@
-4a975867dc0539049902229521b4d94f940817ffd9196810856c8eb962c57e62 \ No newline at end of file
diff --git a/db/schema_migrations/20220920135356 b/db/schema_migrations/20220920135356
deleted file mode 100644
index 714228b2518..00000000000
--- a/db/schema_migrations/20220920135356
+++ /dev/null
@@ -1 +0,0 @@
-477f7b75c7d9b162add500924e5bbd9240ef76f3c56851748af8c6a59d912b7e \ No newline at end of file
diff --git a/db/schema_migrations/20220920135632 b/db/schema_migrations/20220920135632
deleted file mode 100644
index b20c7886bf9..00000000000
--- a/db/schema_migrations/20220920135632
+++ /dev/null
@@ -1 +0,0 @@
-ec4d492f229e78a8f0efd8691a0a3f04d5f8125d8e1c7d0f93b45faa034108f7 \ No newline at end of file
diff --git a/db/schema_migrations/20220920135717 b/db/schema_migrations/20220920135717
deleted file mode 100644
index 7e64f02956c..00000000000
--- a/db/schema_migrations/20220920135717
+++ /dev/null
@@ -1 +0,0 @@
-06c73930dcc4ce0edfe5fa57ff721b6799f6458ff68f3c37c0eaf1745c8db1f1 \ No newline at end of file
diff --git a/db/schema_migrations/20220920141001 b/db/schema_migrations/20220920141001
deleted file mode 100644
index 2e221e49afc..00000000000
--- a/db/schema_migrations/20220920141001
+++ /dev/null
@@ -1 +0,0 @@
-368d6e417d6ac9c4ed3815b67f3247d55a6e4ec8a6e7ac255c7f9f24d3721f59 \ No newline at end of file
diff --git a/db/schema_migrations/20220920213504 b/db/schema_migrations/20220920213504
deleted file mode 100644
index 53d31de208d..00000000000
--- a/db/schema_migrations/20220920213504
+++ /dev/null
@@ -1 +0,0 @@
-e683bd10619f9ceee2a5d330ca4d6b9d396ad8934095b707a0eec5d49cdaf2be \ No newline at end of file
diff --git a/db/schema_migrations/20220920214524 b/db/schema_migrations/20220920214524
deleted file mode 100644
index fc708e05214..00000000000
--- a/db/schema_migrations/20220920214524
+++ /dev/null
@@ -1 +0,0 @@
-6a4677165bca249c369214aee9fae331fde4dc716544bac93c06f0ee33222455 \ No newline at end of file
diff --git a/db/schema_migrations/20220921093355 b/db/schema_migrations/20220921093355
deleted file mode 100644
index 6083a370279..00000000000
--- a/db/schema_migrations/20220921093355
+++ /dev/null
@@ -1 +0,0 @@
-d7640b3756cf8cddf9f798362d6d8445a1d37092e4dff9ae263fe39a661b1e55 \ No newline at end of file
diff --git a/db/schema_migrations/20220921111823 b/db/schema_migrations/20220921111823
deleted file mode 100644
index eeca2c10dad..00000000000
--- a/db/schema_migrations/20220921111823
+++ /dev/null
@@ -1 +0,0 @@
-f06d7555d3541abbb9fd671df3718645203aef111674b91ad386dac434c4ede2 \ No newline at end of file
diff --git a/db/schema_migrations/20220921111831 b/db/schema_migrations/20220921111831
deleted file mode 100644
index a03ad3f67dd..00000000000
--- a/db/schema_migrations/20220921111831
+++ /dev/null
@@ -1 +0,0 @@
-a515d3e34f4b467c5e6fbd9b55135a676277ff6388eb1e3fc14df4b11d8eb3c0 \ No newline at end of file
diff --git a/db/schema_migrations/20220921111840 b/db/schema_migrations/20220921111840
deleted file mode 100644
index 7e84d96f124..00000000000
--- a/db/schema_migrations/20220921111840
+++ /dev/null
@@ -1 +0,0 @@
-0fdbb888bdbd4f68619466a8f4384e44062b0cf854790c648a6a060ab1e71806 \ No newline at end of file
diff --git a/db/schema_migrations/20220921111849 b/db/schema_migrations/20220921111849
deleted file mode 100644
index 3989dd78aeb..00000000000
--- a/db/schema_migrations/20220921111849
+++ /dev/null
@@ -1 +0,0 @@
-2041cb81c534be0cc45b1cc77fa7fd2e31615129e1ba60a146cca88d58b77605 \ No newline at end of file
diff --git a/db/schema_migrations/20220921111857 b/db/schema_migrations/20220921111857
deleted file mode 100644
index 578b2c853f4..00000000000
--- a/db/schema_migrations/20220921111857
+++ /dev/null
@@ -1 +0,0 @@
-cbef1d036abb0035d710cf912e554e32fa88df3abaed17cb938e0b18032c7448 \ No newline at end of file
diff --git a/db/schema_migrations/20220921111907 b/db/schema_migrations/20220921111907
deleted file mode 100644
index 013f79024c9..00000000000
--- a/db/schema_migrations/20220921111907
+++ /dev/null
@@ -1 +0,0 @@
-fbc4c12aedd9d0f183e9444f2cb42c11a2b894c11684e80a5dbe847c7bccb21f \ No newline at end of file
diff --git a/db/schema_migrations/20220921144258 b/db/schema_migrations/20220921144258
deleted file mode 100644
index e3d9ad6a4de..00000000000
--- a/db/schema_migrations/20220921144258
+++ /dev/null
@@ -1 +0,0 @@
-531758adf94d39b646e47601989f5f969eda8e9cbc2b2d6285826f9704575d3d \ No newline at end of file
diff --git a/db/schema_migrations/20220921174815 b/db/schema_migrations/20220921174815
deleted file mode 100644
index d67929e2029..00000000000
--- a/db/schema_migrations/20220921174815
+++ /dev/null
@@ -1 +0,0 @@
-2e20cfa3c1ebe77968ba923b381e0c95cb427613f2bfbed212ced4023bd4334e \ No newline at end of file
diff --git a/db/schema_migrations/20220921201347 b/db/schema_migrations/20220921201347
deleted file mode 100644
index d58f316fd02..00000000000
--- a/db/schema_migrations/20220921201347
+++ /dev/null
@@ -1 +0,0 @@
-f7c4b6a31434a0f6487fef89ba0c60fd38169e901437667bb6ccf60ba1a3bd4d \ No newline at end of file
diff --git a/db/schema_migrations/20220922090236 b/db/schema_migrations/20220922090236
deleted file mode 100644
index 9f873bd86c2..00000000000
--- a/db/schema_migrations/20220922090236
+++ /dev/null
@@ -1 +0,0 @@
-6ce159118651ec93989e8f111528ad2134e46f359c483b60239290d677f9f4f4 \ No newline at end of file
diff --git a/db/schema_migrations/20220922143143 b/db/schema_migrations/20220922143143
deleted file mode 100644
index 72074c1efb3..00000000000
--- a/db/schema_migrations/20220922143143
+++ /dev/null
@@ -1 +0,0 @@
-79aa2360fdf84d7bee402cf51e29813b9c25acfe809123ac5a3218644a63c71f \ No newline at end of file
diff --git a/db/schema_migrations/20220922143612 b/db/schema_migrations/20220922143612
deleted file mode 100644
index 4f93a218c74..00000000000
--- a/db/schema_migrations/20220922143612
+++ /dev/null
@@ -1 +0,0 @@
-4685b471f00f8ef5e8d8e521c50dc276c757c9f9caa50b1aa20c1f98b8b008c5 \ No newline at end of file
diff --git a/db/schema_migrations/20220922143634 b/db/schema_migrations/20220922143634
deleted file mode 100644
index 50d07dcf9de..00000000000
--- a/db/schema_migrations/20220922143634
+++ /dev/null
@@ -1 +0,0 @@
-f48217567db22e6a4d3a32c607911da9f9a39a37d75be158a893ce840f718f02 \ No newline at end of file
diff --git a/db/schema_migrations/20220922204106 b/db/schema_migrations/20220922204106
deleted file mode 100644
index 0eabc077b58..00000000000
--- a/db/schema_migrations/20220922204106
+++ /dev/null
@@ -1 +0,0 @@
-e1106d4b77704a1ac4c185e0a6b500966dc61f46569de55650875aa6a89b7f9d \ No newline at end of file
diff --git a/db/schema_migrations/20220923052531 b/db/schema_migrations/20220923052531
deleted file mode 100644
index db7d24075f1..00000000000
--- a/db/schema_migrations/20220923052531
+++ /dev/null
@@ -1 +0,0 @@
-198d1447a8a857ea18409fe99e5a5a616d966b480bb6fc8f05613a651fdcd8a9 \ No newline at end of file
diff --git a/db/schema_migrations/20220923060226 b/db/schema_migrations/20220923060226
deleted file mode 100644
index daaf2407607..00000000000
--- a/db/schema_migrations/20220923060226
+++ /dev/null
@@ -1 +0,0 @@
-19799d51a2b9acc7b1642edebea85ca8a19d2dd8368c4f0814c6c7a4c529ef98 \ No newline at end of file
diff --git a/db/schema_migrations/20220923103006 b/db/schema_migrations/20220923103006
deleted file mode 100644
index 8a11ebc8f8f..00000000000
--- a/db/schema_migrations/20220923103006
+++ /dev/null
@@ -1 +0,0 @@
-184e634f62549f3fa2f183003957a2f5a5c53b34394ec3430eb0293076ae177a \ No newline at end of file
diff --git a/db/schema_migrations/20220926023734 b/db/schema_migrations/20220926023734
deleted file mode 100644
index 2fd1175b02d..00000000000
--- a/db/schema_migrations/20220926023734
+++ /dev/null
@@ -1 +0,0 @@
-efa3d1c94b5de9c68ae3d007e95bbbae9582f4354e922b00a02ff5753dbe4d05 \ No newline at end of file
diff --git a/db/schema_migrations/20220927155407 b/db/schema_migrations/20220927155407
deleted file mode 100644
index a704ba7cb41..00000000000
--- a/db/schema_migrations/20220927155407
+++ /dev/null
@@ -1 +0,0 @@
-97bdc9d31ed93897f3133459779207b3b750530b615e243a625681d433090e94 \ No newline at end of file
diff --git a/db/schema_migrations/20220927171740 b/db/schema_migrations/20220927171740
deleted file mode 100644
index e775b211200..00000000000
--- a/db/schema_migrations/20220927171740
+++ /dev/null
@@ -1 +0,0 @@
-5ba49d525d6238975f990c94972ee4f3587a2446a4873e6e8a7f4791cf015b7e \ No newline at end of file
diff --git a/db/schema_migrations/20220928201920 b/db/schema_migrations/20220928201920
deleted file mode 100644
index e77f9abf6a0..00000000000
--- a/db/schema_migrations/20220928201920
+++ /dev/null
@@ -1 +0,0 @@
-b2492ebefc3738dfe706379ef664d3f28315102acc1c0681ba67e6aae62861d7 \ No newline at end of file
diff --git a/db/schema_migrations/20220928225711 b/db/schema_migrations/20220928225711
deleted file mode 100644
index fd7a8b303d1..00000000000
--- a/db/schema_migrations/20220928225711
+++ /dev/null
@@ -1 +0,0 @@
-5ec9b3f36a986cbb86c8005a4425307f0f4399a4a4030460e715370630cb9490 \ No newline at end of file
diff --git a/db/schema_migrations/20220929081645 b/db/schema_migrations/20220929081645
deleted file mode 100644
index a6fb1a6a74d..00000000000
--- a/db/schema_migrations/20220929081645
+++ /dev/null
@@ -1 +0,0 @@
-ac34f2215272e69efc486affa8ad06347221d63ddadafe995f6e98f355a49936 \ No newline at end of file
diff --git a/db/schema_migrations/20220929091500 b/db/schema_migrations/20220929091500
deleted file mode 100644
index 66997dd37d9..00000000000
--- a/db/schema_migrations/20220929091500
+++ /dev/null
@@ -1 +0,0 @@
-c636f10079d7b718b777b78c22b66ca8828518d9dc8a3f6abe47e25af14ae20b \ No newline at end of file
diff --git a/db/schema_migrations/20220929101947 b/db/schema_migrations/20220929101947
deleted file mode 100644
index 4969db4f283..00000000000
--- a/db/schema_migrations/20220929101947
+++ /dev/null
@@ -1 +0,0 @@
-946e773d09863fe029507ac44b41a61ed0b6b766f7296759743cf09addfacfcd \ No newline at end of file
diff --git a/db/schema_migrations/20220929171925 b/db/schema_migrations/20220929171925
deleted file mode 100644
index b2e471bb32c..00000000000
--- a/db/schema_migrations/20220929171925
+++ /dev/null
@@ -1 +0,0 @@
-352e1b200a7e5074c58fdcfd0c9ae9b3535054a0b3d9852caabde635d9a1ad94 \ No newline at end of file
diff --git a/db/schema_migrations/20220929172356 b/db/schema_migrations/20220929172356
deleted file mode 100644
index 3200898ddb5..00000000000
--- a/db/schema_migrations/20220929172356
+++ /dev/null
@@ -1 +0,0 @@
-9cdc6169dc4925f43aabb2f4bcf597333a4112135001a5d1a6961853a78c90da \ No newline at end of file
diff --git a/db/schema_migrations/20220929194453 b/db/schema_migrations/20220929194453
deleted file mode 100644
index 25d512b792b..00000000000
--- a/db/schema_migrations/20220929194453
+++ /dev/null
@@ -1 +0,0 @@
-0f625bd9df16d035dd8cd73d5097e5b5f4d1b900183bd6ccf4b1489319535df6 \ No newline at end of file
diff --git a/db/schema_migrations/20220929213730 b/db/schema_migrations/20220929213730
deleted file mode 100644
index 469e84f8217..00000000000
--- a/db/schema_migrations/20220929213730
+++ /dev/null
@@ -1 +0,0 @@
-f74b8524fcdabd1646bbb47a32f8e3a29a848eb457f465d33a9e81bf4462e2ea \ No newline at end of file
diff --git a/db/schema_migrations/20220930110127 b/db/schema_migrations/20220930110127
deleted file mode 100644
index b88603e17d9..00000000000
--- a/db/schema_migrations/20220930110127
+++ /dev/null
@@ -1 +0,0 @@
-6a37ea8ea1ae2b90d12db67b2fa6adac2ed5b936f6c45d2142dc8390883f764a \ No newline at end of file
diff --git a/db/schema_migrations/20220930125609 b/db/schema_migrations/20220930125609
deleted file mode 100644
index 65e00dbd945..00000000000
--- a/db/schema_migrations/20220930125609
+++ /dev/null
@@ -1 +0,0 @@
-cba5fad6379efe681dfc19a02522de7c904705790de588d07ed12f032fab760e \ No newline at end of file
diff --git a/db/schema_migrations/20221002234454 b/db/schema_migrations/20221002234454
deleted file mode 100644
index d01230136be..00000000000
--- a/db/schema_migrations/20221002234454
+++ /dev/null
@@ -1 +0,0 @@
-781ed5eaf05091e5d01ec23a9f66f3722c41b4a87ecdabe48158ce82c5cbb325 \ No newline at end of file
diff --git a/db/schema_migrations/20221003151747 b/db/schema_migrations/20221003151747
deleted file mode 100644
index 70a8babf308..00000000000
--- a/db/schema_migrations/20221003151747
+++ /dev/null
@@ -1 +0,0 @@
-84b89419404d26f7d2783a3adf1fa7b7d89417d6533b393ae6e0de40a31e299a \ No newline at end of file
diff --git a/db/schema_migrations/20221003192827 b/db/schema_migrations/20221003192827
deleted file mode 100644
index 803c269b6e0..00000000000
--- a/db/schema_migrations/20221003192827
+++ /dev/null
@@ -1 +0,0 @@
-7fe33b22601469d1f15ee67241775e7a14d96841a49129fe98bfd2f44cf6666f \ No newline at end of file
diff --git a/db/schema_migrations/20221004074910 b/db/schema_migrations/20221004074910
deleted file mode 100644
index e316408ef0f..00000000000
--- a/db/schema_migrations/20221004074910
+++ /dev/null
@@ -1 +0,0 @@
-df8b2f83f93fecd3450cb7fc2619e7ddbfde014a885d0a414076908bbcbbdf9f \ No newline at end of file
diff --git a/db/schema_migrations/20221004074914 b/db/schema_migrations/20221004074914
deleted file mode 100644
index a197fe1b9ea..00000000000
--- a/db/schema_migrations/20221004074914
+++ /dev/null
@@ -1 +0,0 @@
-d6459263b828e6807f473adb7ba534d78055ab1b5137478a8e96cd500297ff54 \ No newline at end of file
diff --git a/db/schema_migrations/20221004092038 b/db/schema_migrations/20221004092038
deleted file mode 100644
index c7305a46cfd..00000000000
--- a/db/schema_migrations/20221004092038
+++ /dev/null
@@ -1 +0,0 @@
-584d43304f92cc638783ffc5c8ab2dc8e511169c76da7661cb4c5ddded6c02d1 \ No newline at end of file
diff --git a/db/schema_migrations/20221004094814 b/db/schema_migrations/20221004094814
deleted file mode 100644
index f3ac2ccb0d3..00000000000
--- a/db/schema_migrations/20221004094814
+++ /dev/null
@@ -1 +0,0 @@
-b274eaa3ef886e5de6fe5dacb11ab72a724a07a5022da6c01b94309fdaebfd0b \ No newline at end of file
diff --git a/db/schema_migrations/20221005072353 b/db/schema_migrations/20221005072353
deleted file mode 100644
index 3249a062aa7..00000000000
--- a/db/schema_migrations/20221005072353
+++ /dev/null
@@ -1 +0,0 @@
-6b90dfb738c597a45ecaae792e97e1ae0decb93779ecc35fbc2fbaedafb5b9d1 \ No newline at end of file
diff --git a/db/schema_migrations/20221005094926 b/db/schema_migrations/20221005094926
deleted file mode 100644
index 7606c06170f..00000000000
--- a/db/schema_migrations/20221005094926
+++ /dev/null
@@ -1 +0,0 @@
-ab93968543b6aec0bc304a2c0dc051f63a29b4765df11432fba45325e5e75e55 \ No newline at end of file
diff --git a/db/schema_migrations/20221005103000 b/db/schema_migrations/20221005103000
deleted file mode 100644
index 6403e3106a2..00000000000
--- a/db/schema_migrations/20221005103000
+++ /dev/null
@@ -1 +0,0 @@
-ac1aa3697f6e4230bfdc41f34e2e87ef49f697cfa46139fe3ac91a42b7bf4b91 \ No newline at end of file
diff --git a/db/schema_migrations/20221005103010 b/db/schema_migrations/20221005103010
deleted file mode 100644
index 9bf2bba87ca..00000000000
--- a/db/schema_migrations/20221005103010
+++ /dev/null
@@ -1 +0,0 @@
-85deb0dcce9b1d43b3c978f2615afabe1f29304f65cf01a82d9b116d3276337f \ No newline at end of file
diff --git a/db/schema_migrations/20221006070927 b/db/schema_migrations/20221006070927
deleted file mode 100644
index 804f77384e0..00000000000
--- a/db/schema_migrations/20221006070927
+++ /dev/null
@@ -1 +0,0 @@
-933cb5a869696f2343b0b8dfc32f94a64ed7a5119c3f6b2b64ce30e3ae4e555c \ No newline at end of file
diff --git a/db/schema_migrations/20221006083240 b/db/schema_migrations/20221006083240
deleted file mode 100644
index 51c509f471c..00000000000
--- a/db/schema_migrations/20221006083240
+++ /dev/null
@@ -1 +0,0 @@
-0ad92f76e14b2e9286b2f77f32c00dba8ae29b64035f79641451edfdc725c92a \ No newline at end of file
diff --git a/db/schema_migrations/20221006131506 b/db/schema_migrations/20221006131506
deleted file mode 100644
index cafb6518fdd..00000000000
--- a/db/schema_migrations/20221006131506
+++ /dev/null
@@ -1 +0,0 @@
-2652f733d5998b4dacc89a7c43af45e6d411235efcdc120be02bbf04eb1c55d6 \ No newline at end of file
diff --git a/db/schema_migrations/20221006141145 b/db/schema_migrations/20221006141145
deleted file mode 100644
index 269913ca389..00000000000
--- a/db/schema_migrations/20221006141145
+++ /dev/null
@@ -1 +0,0 @@
-ae45bc7d67354b64e359ac7fadefec6a0d81cd529f5ae2517a6a6a5d250f9024 \ No newline at end of file
diff --git a/db/schema_migrations/20221006172302 b/db/schema_migrations/20221006172302
deleted file mode 100644
index 361fdd78086..00000000000
--- a/db/schema_migrations/20221006172302
+++ /dev/null
@@ -1 +0,0 @@
-19e5ca6f9716fd41bfe8a103dab8a1dc37107f99503abedbdcb8175b699283f2 \ No newline at end of file
diff --git a/db/schema_migrations/20221008032350 b/db/schema_migrations/20221008032350
deleted file mode 100644
index 8b76b056a77..00000000000
--- a/db/schema_migrations/20221008032350
+++ /dev/null
@@ -1 +0,0 @@
-c5e373b1b416455b67b7bc0affe244295e1f1a2f105fe8ef6efddf8b07da2a86 \ No newline at end of file
diff --git a/db/schema_migrations/20221009085130 b/db/schema_migrations/20221009085130
deleted file mode 100644
index cbdfb3014cd..00000000000
--- a/db/schema_migrations/20221009085130
+++ /dev/null
@@ -1 +0,0 @@
-125ce9bf81966840774eb69be7995c1a8e2abd901fe5f19b73df43a577a9dc44 \ No newline at end of file
diff --git a/db/schema_migrations/20221010074914 b/db/schema_migrations/20221010074914
deleted file mode 100644
index 272a8d038cc..00000000000
--- a/db/schema_migrations/20221010074914
+++ /dev/null
@@ -1 +0,0 @@
-c5ef65edf6e87495bc4dc16c636b2f2d8cbd63f3903cf5ed1364206b83411ba9 \ No newline at end of file
diff --git a/db/schema_migrations/20221010103207 b/db/schema_migrations/20221010103207
deleted file mode 100644
index 24fcfc34c41..00000000000
--- a/db/schema_migrations/20221010103207
+++ /dev/null
@@ -1 +0,0 @@
-04997da3ff51b8be05fd765c6534f92a15eea0a4ee4a535f1cb84c6da4e1bdd5 \ No newline at end of file
diff --git a/db/schema_migrations/20221010121510 b/db/schema_migrations/20221010121510
deleted file mode 100644
index 4c73958df10..00000000000
--- a/db/schema_migrations/20221010121510
+++ /dev/null
@@ -1 +0,0 @@
-ab9ab20d1a220e715a758f6175fcaf5c62cb240f49a2ad4227f7cd11f030fa1d \ No newline at end of file
diff --git a/db/schema_migrations/20221010121807 b/db/schema_migrations/20221010121807
deleted file mode 100644
index e5ca8007519..00000000000
--- a/db/schema_migrations/20221010121807
+++ /dev/null
@@ -1 +0,0 @@
-44e6b2519ef285366d1a2b4ea6efe18a9c22bfdb545c11502eae9383123b6001 \ No newline at end of file
diff --git a/db/schema_migrations/20221010122138 b/db/schema_migrations/20221010122138
deleted file mode 100644
index 9a9898a37b0..00000000000
--- a/db/schema_migrations/20221010122138
+++ /dev/null
@@ -1 +0,0 @@
-1275aff394d75cc254e664a81f52880bc248343dad7a07162973cafe268d40e6 \ No newline at end of file
diff --git a/db/schema_migrations/20221010122352 b/db/schema_migrations/20221010122352
deleted file mode 100644
index a785dc22539..00000000000
--- a/db/schema_migrations/20221010122352
+++ /dev/null
@@ -1 +0,0 @@
-a982eed3131805db693882a8da7c5c5d1572f7825eb51a45c468bd5dfbded58b \ No newline at end of file
diff --git a/db/schema_migrations/20221010123040 b/db/schema_migrations/20221010123040
deleted file mode 100644
index 85ad72c702b..00000000000
--- a/db/schema_migrations/20221010123040
+++ /dev/null
@@ -1 +0,0 @@
-a3c66e57959f3e183a5b933138c9deedb5575e0b90b3a862b7b8e20331ffa31e \ No newline at end of file
diff --git a/db/schema_migrations/20221010141500 b/db/schema_migrations/20221010141500
deleted file mode 100644
index 8479fb0519c..00000000000
--- a/db/schema_migrations/20221010141500
+++ /dev/null
@@ -1 +0,0 @@
-250ec3ff701dacd333d669f128762e9f035a626f2f7720c6e7e1dc61499d431d \ No newline at end of file
diff --git a/db/schema_migrations/20221010162137 b/db/schema_migrations/20221010162137
deleted file mode 100644
index 567b788a5c6..00000000000
--- a/db/schema_migrations/20221010162137
+++ /dev/null
@@ -1 +0,0 @@
-c9f5827072920fdc52efeaf1ab39c67c48896a6288c5720e4be96070340ce6d8 \ No newline at end of file
diff --git a/db/schema_migrations/20221010184839 b/db/schema_migrations/20221010184839
deleted file mode 100644
index de24fc0a4f0..00000000000
--- a/db/schema_migrations/20221010184839
+++ /dev/null
@@ -1 +0,0 @@
-062f807c0bf823b00e19cc55323faedd506b19d6492d1f23f09aaa662eaddcfb \ No newline at end of file
diff --git a/db/schema_migrations/20221010201815 b/db/schema_migrations/20221010201815
deleted file mode 100644
index 8c4c06ba4f6..00000000000
--- a/db/schema_migrations/20221010201815
+++ /dev/null
@@ -1 +0,0 @@
-f1f30c3581e35a92f3ede694e1eb70c6fc4dccfdb9e377b5f9046e18eaca2c54 \ No newline at end of file
diff --git a/db/schema_migrations/20221010202339 b/db/schema_migrations/20221010202339
deleted file mode 100644
index c536fc8a3dc..00000000000
--- a/db/schema_migrations/20221010202339
+++ /dev/null
@@ -1 +0,0 @@
-33bbeaa1d94cfa936de422fcc2f0456d235dde13072f6907cd514a12956ef9aa \ No newline at end of file
diff --git a/db/schema_migrations/20221010202408 b/db/schema_migrations/20221010202408
deleted file mode 100644
index 2007c27f7fd..00000000000
--- a/db/schema_migrations/20221010202408
+++ /dev/null
@@ -1 +0,0 @@
-0e985bac7558768e0b97316c1362cb411fed5605c0a313c3872e86f7242f8d36 \ No newline at end of file
diff --git a/db/schema_migrations/20221011062254 b/db/schema_migrations/20221011062254
deleted file mode 100644
index a64a2dd4bfe..00000000000
--- a/db/schema_migrations/20221011062254
+++ /dev/null
@@ -1 +0,0 @@
-ae4f3c26acd69aa0c701651a246a1359c91a0daad0daad64ba8dc186268880a4 \ No newline at end of file
diff --git a/db/schema_migrations/20221011113928 b/db/schema_migrations/20221011113928
deleted file mode 100644
index 1552b7193f3..00000000000
--- a/db/schema_migrations/20221011113928
+++ /dev/null
@@ -1 +0,0 @@
-70f78c3af8d43ea71a795d0cd28bf74aa8a5232ea5e5b9dcb59699b5f8cccfaa \ No newline at end of file
diff --git a/db/schema_migrations/20221011162637 b/db/schema_migrations/20221011162637
deleted file mode 100644
index c16e511e516..00000000000
--- a/db/schema_migrations/20221011162637
+++ /dev/null
@@ -1 +0,0 @@
-b39261356f0ca89d543f680e1b28f3e3bdf468b02d6f8ea21c6ea1a1af91420c \ No newline at end of file
diff --git a/db/schema_migrations/20221011210455 b/db/schema_migrations/20221011210455
deleted file mode 100644
index 2a6a7349f5d..00000000000
--- a/db/schema_migrations/20221011210455
+++ /dev/null
@@ -1 +0,0 @@
-3c2445871613743560b2dd0a111fafab30f503b1c462e7ba7aee03f85e25f775 \ No newline at end of file
diff --git a/db/schema_migrations/20221012033107 b/db/schema_migrations/20221012033107
deleted file mode 100644
index ba1df6370d3..00000000000
--- a/db/schema_migrations/20221012033107
+++ /dev/null
@@ -1 +0,0 @@
-23252a63b8aab6a062cf22db563f8518213d40110449732866e6d8d5092d369e \ No newline at end of file
diff --git a/db/schema_migrations/20221012135524 b/db/schema_migrations/20221012135524
deleted file mode 100644
index 7a4503dde08..00000000000
--- a/db/schema_migrations/20221012135524
+++ /dev/null
@@ -1 +0,0 @@
-e5fc4ce0fdba01b55de0a1d5a968ab9b1ad3bc930ab61c6187a223e62252c8bc \ No newline at end of file
diff --git a/db/schema_migrations/20221012182701 b/db/schema_migrations/20221012182701
deleted file mode 100644
index 5a6b47c4026..00000000000
--- a/db/schema_migrations/20221012182701
+++ /dev/null
@@ -1 +0,0 @@
-82f67746e79bcc63e5674f2e009eb9a827e019409c9277f6cd1ce2e41c50c296 \ No newline at end of file
diff --git a/db/schema_migrations/20221013103738 b/db/schema_migrations/20221013103738
deleted file mode 100644
index 8643304c5b1..00000000000
--- a/db/schema_migrations/20221013103738
+++ /dev/null
@@ -1 +0,0 @@
-704d0973ce5fec01228a28d5551ecc88ccf057e246ee75f8f5b0cc0a08815095 \ No newline at end of file
diff --git a/db/schema_migrations/20221013154159 b/db/schema_migrations/20221013154159
deleted file mode 100644
index 2e147bb199d..00000000000
--- a/db/schema_migrations/20221013154159
+++ /dev/null
@@ -1 +0,0 @@
-dbf241baf6d3deb1ef29a7cdca012050cab51c5f86762a0363d9dc4dc14fd804 \ No newline at end of file
diff --git a/db/schema_migrations/20221013215832 b/db/schema_migrations/20221013215832
deleted file mode 100644
index 106cb540d6e..00000000000
--- a/db/schema_migrations/20221013215832
+++ /dev/null
@@ -1 +0,0 @@
-2ab913b0b479fc29d939d03b5df95dc2a8c5a155f1b35a606e300802cb3aa9d3 \ No newline at end of file
diff --git a/db/schema_migrations/20221014031033 b/db/schema_migrations/20221014031033
deleted file mode 100644
index 6a24a2027c7..00000000000
--- a/db/schema_migrations/20221014031033
+++ /dev/null
@@ -1 +0,0 @@
-bc05939dc672c078161cd9b7dbd7f92601edb6888a77c62adb014964e30c6ae8 \ No newline at end of file
diff --git a/db/schema_migrations/20221014034338 b/db/schema_migrations/20221014034338
deleted file mode 100644
index c90dfebb72b..00000000000
--- a/db/schema_migrations/20221014034338
+++ /dev/null
@@ -1 +0,0 @@
-58ee7f51a0da4ee4ec471d4492106d1fc3124419ba83591913967d6bd38105e5 \ No newline at end of file
diff --git a/db/schema_migrations/20221014190040 b/db/schema_migrations/20221014190040
deleted file mode 100644
index ce6387c3e43..00000000000
--- a/db/schema_migrations/20221014190040
+++ /dev/null
@@ -1 +0,0 @@
-2ac315a49a5026938abc21a98974fd42b39b7535d86530085a01fc7f5687bb0e \ No newline at end of file
diff --git a/db/schema_migrations/20221015000511 b/db/schema_migrations/20221015000511
deleted file mode 100644
index 16845f8859c..00000000000
--- a/db/schema_migrations/20221015000511
+++ /dev/null
@@ -1 +0,0 @@
-001b43cc0006b8f936310171ff2d12993eece1378f64945e6835728f540815ba \ No newline at end of file
diff --git a/db/schema_migrations/20221017084208 b/db/schema_migrations/20221017084208
deleted file mode 100644
index 3fb09558549..00000000000
--- a/db/schema_migrations/20221017084208
+++ /dev/null
@@ -1 +0,0 @@
-d28932a3d52279446e3ef84806a6bb6b53dc10c5b9ae81e2c626203da4238a9a \ No newline at end of file
diff --git a/db/schema_migrations/20221017084227 b/db/schema_migrations/20221017084227
deleted file mode 100644
index 9f57ca08267..00000000000
--- a/db/schema_migrations/20221017084227
+++ /dev/null
@@ -1 +0,0 @@
-dc03ff5c63ada744d41e5e37e276306b1fe3bb2d8f925ebb0087be3a4b51791e \ No newline at end of file
diff --git a/db/schema_migrations/20221018050323 b/db/schema_migrations/20221018050323
deleted file mode 100644
index 3e1d102da64..00000000000
--- a/db/schema_migrations/20221018050323
+++ /dev/null
@@ -1 +0,0 @@
-05754025966b87f6998a0801e76c811b0cd42b2a77f35e8129a0c47f935e9bc4 \ No newline at end of file
diff --git a/db/schema_migrations/20221018062308 b/db/schema_migrations/20221018062308
deleted file mode 100644
index 1b408ed101a..00000000000
--- a/db/schema_migrations/20221018062308
+++ /dev/null
@@ -1 +0,0 @@
-58aec3260f2b26d5a49159b95de7c6486b16c8af354f716190d4c48f83324910 \ No newline at end of file
diff --git a/db/schema_migrations/20221018081416 b/db/schema_migrations/20221018081416
deleted file mode 100644
index 4b92b46709a..00000000000
--- a/db/schema_migrations/20221018081416
+++ /dev/null
@@ -1 +0,0 @@
-25030e3ba7c6632fa86100c2db320d1e0c431f992e2b3e333a98e7e03bd31a49 \ No newline at end of file
diff --git a/db/schema_migrations/20221018092552 b/db/schema_migrations/20221018092552
deleted file mode 100644
index 8416f7d72a3..00000000000
--- a/db/schema_migrations/20221018092552
+++ /dev/null
@@ -1 +0,0 @@
-d7ec9ab32c5f58805bec64bea9bd32aedbd80f678d6b8e8c6914aa26523dcc95 \ No newline at end of file
diff --git a/db/schema_migrations/20221018124029 b/db/schema_migrations/20221018124029
deleted file mode 100644
index 6c050ebf248..00000000000
--- a/db/schema_migrations/20221018124029
+++ /dev/null
@@ -1 +0,0 @@
-c3a38f280c8835e77953b69ba41ef5d58b76fd5f2f39e758a523c493306b0ab2 \ No newline at end of file
diff --git a/db/schema_migrations/20221018124035 b/db/schema_migrations/20221018124035
deleted file mode 100644
index 1d0721c4bfb..00000000000
--- a/db/schema_migrations/20221018124035
+++ /dev/null
@@ -1 +0,0 @@
-77aca033a7c58af4e981136b96629acf5b82a42701072928532681dd91b05280 \ No newline at end of file
diff --git a/db/schema_migrations/20221018193635 b/db/schema_migrations/20221018193635
deleted file mode 100644
index e29e4605d5b..00000000000
--- a/db/schema_migrations/20221018193635
+++ /dev/null
@@ -1 +0,0 @@
-de28d291a4a49dcb1743466ce61d95e47c28bdf293731e446b7b43d370d76e36 \ No newline at end of file
diff --git a/db/schema_migrations/20221018193827 b/db/schema_migrations/20221018193827
deleted file mode 100644
index 26753827185..00000000000
--- a/db/schema_migrations/20221018193827
+++ /dev/null
@@ -1 +0,0 @@
-fb64884e988fb0f3589fd189780f3ac5358d06b7599243935f1d4c3dd7e794fc \ No newline at end of file
diff --git a/db/schema_migrations/20221018202524 b/db/schema_migrations/20221018202524
deleted file mode 100644
index ee738f3608c..00000000000
--- a/db/schema_migrations/20221018202524
+++ /dev/null
@@ -1 +0,0 @@
-a3266078f4760f0f5a4c7a43669cea1170924f29d6867e712620c2234dbf13c6 \ No newline at end of file
diff --git a/db/schema_migrations/20221018232820 b/db/schema_migrations/20221018232820
deleted file mode 100644
index 870de8adb4a..00000000000
--- a/db/schema_migrations/20221018232820
+++ /dev/null
@@ -1 +0,0 @@
-cdf3e65f07f700617f47435b79743b4b35307f47cf46a9696350e55af1774d42 \ No newline at end of file
diff --git a/db/schema_migrations/20221019002459 b/db/schema_migrations/20221019002459
deleted file mode 100644
index cab21003736..00000000000
--- a/db/schema_migrations/20221019002459
+++ /dev/null
@@ -1 +0,0 @@
-6c3fe5bf01ac9e74f142ddb3e093867b62cf430f24ba885f8475ccf7f73899cb \ No newline at end of file
diff --git a/db/schema_migrations/20221019102426 b/db/schema_migrations/20221019102426
deleted file mode 100644
index 482f7ab0980..00000000000
--- a/db/schema_migrations/20221019102426
+++ /dev/null
@@ -1 +0,0 @@
-6990eb33313f6c0a82409fde69c74a88d0a9db2cd144322bcff4428261bbf1e4 \ No newline at end of file
diff --git a/db/schema_migrations/20221019105041 b/db/schema_migrations/20221019105041
deleted file mode 100644
index 0dff355b300..00000000000
--- a/db/schema_migrations/20221019105041
+++ /dev/null
@@ -1 +0,0 @@
-186e7df4e7e81913981595a069c5c8b5fbb600ee5dcebf333bfff728c5019ab2 \ No newline at end of file
diff --git a/db/schema_migrations/20221019141508 b/db/schema_migrations/20221019141508
deleted file mode 100644
index 2b4ecc805e4..00000000000
--- a/db/schema_migrations/20221019141508
+++ /dev/null
@@ -1 +0,0 @@
-527b18e3bd89316c33b099d4e3cd622617b6e8dbb482a0f0ce983386b0210f7e \ No newline at end of file
diff --git a/db/schema_migrations/20221019194751 b/db/schema_migrations/20221019194751
deleted file mode 100644
index e917d4ac1f6..00000000000
--- a/db/schema_migrations/20221019194751
+++ /dev/null
@@ -1 +0,0 @@
-785ed2a3c711edf54f1b23bdbd4b333b7a4ee02b86f8581c1f4cc20003e5f832 \ No newline at end of file
diff --git a/db/schema_migrations/20221019195754 b/db/schema_migrations/20221019195754
deleted file mode 100644
index 2be5ca3ce1a..00000000000
--- a/db/schema_migrations/20221019195754
+++ /dev/null
@@ -1 +0,0 @@
-b09530d7b72d70774624ef44683be6665bd1141be49db551a0dfe303ce67eefa \ No newline at end of file
diff --git a/db/schema_migrations/20221019200033 b/db/schema_migrations/20221019200033
deleted file mode 100644
index 2826a18d7df..00000000000
--- a/db/schema_migrations/20221019200033
+++ /dev/null
@@ -1 +0,0 @@
-a72855a95f243d2a404d840fde900a99b9f568144dfde47e813c4e9bc81ef8cf \ No newline at end of file
diff --git a/db/schema_migrations/20221019200206 b/db/schema_migrations/20221019200206
deleted file mode 100644
index 73eb8571a5a..00000000000
--- a/db/schema_migrations/20221019200206
+++ /dev/null
@@ -1 +0,0 @@
-1bd5d356d0a15737178eee70bce65c9883bd5daa2a672a9049ccecb4e73f431b \ No newline at end of file
diff --git a/db/schema_migrations/20221020124018 b/db/schema_migrations/20221020124018
deleted file mode 100644
index 6f6c76eb531..00000000000
--- a/db/schema_migrations/20221020124018
+++ /dev/null
@@ -1 +0,0 @@
-c4b296345f45b6184e04181708eb2f55a1b3a621f331b75173b33b0036c3176f \ No newline at end of file
diff --git a/db/schema_migrations/20221021082720 b/db/schema_migrations/20221021082720
deleted file mode 100644
index b3591da1021..00000000000
--- a/db/schema_migrations/20221021082720
+++ /dev/null
@@ -1 +0,0 @@
-a9122e3772587b85a889740ccc54d48b6ead91a3b472d712e1e8bf5946655cf4 \ No newline at end of file
diff --git a/db/schema_migrations/20221021082734 b/db/schema_migrations/20221021082734
deleted file mode 100644
index 6fc0aaa3fca..00000000000
--- a/db/schema_migrations/20221021082734
+++ /dev/null
@@ -1 +0,0 @@
-d7c109cba935e1f355789dffa1d64b29b787f44ced7b0d3090e19a2dd0b8e266 \ No newline at end of file
diff --git a/db/schema_migrations/20221021145820 b/db/schema_migrations/20221021145820
deleted file mode 100644
index e3d50c654ba..00000000000
--- a/db/schema_migrations/20221021145820
+++ /dev/null
@@ -1 +0,0 @@
-e9fd4d60833624e20fcf9b01b883dca15e6c135aa99f1afd1c7a365eebac17fb \ No newline at end of file
diff --git a/db/schema_migrations/20221021160735 b/db/schema_migrations/20221021160735
deleted file mode 100644
index 73c10f7e23d..00000000000
--- a/db/schema_migrations/20221021160735
+++ /dev/null
@@ -1 +0,0 @@
-0b7727e942f6e3fa2e1b0ed9e22c504a64aceac19adf25f126baba587db4b764 \ No newline at end of file
diff --git a/db/schema_migrations/20221021213216 b/db/schema_migrations/20221021213216
deleted file mode 100644
index 900a4f6701e..00000000000
--- a/db/schema_migrations/20221021213216
+++ /dev/null
@@ -1 +0,0 @@
-defe6e66c98648ea7fb77d8001392bc707ec022f639d346c42d23fad10958856 \ No newline at end of file
diff --git a/db/schema_migrations/20221022213505 b/db/schema_migrations/20221022213505
deleted file mode 100644
index 4cf0b87eedf..00000000000
--- a/db/schema_migrations/20221022213505
+++ /dev/null
@@ -1 +0,0 @@
-c48015b2ff6ad4b58bffaf5342247d890f6bd2388c467751654bc705f5eb53ed \ No newline at end of file
diff --git a/db/schema_migrations/20221022213521 b/db/schema_migrations/20221022213521
deleted file mode 100644
index c3bb483debf..00000000000
--- a/db/schema_migrations/20221022213521
+++ /dev/null
@@ -1 +0,0 @@
-739952c72f82b804b84d73107264804202ad102b425008d4dcb029c1f02e2118 \ No newline at end of file
diff --git a/db/schema_migrations/20221024034228 b/db/schema_migrations/20221024034228
deleted file mode 100644
index 3df637a8198..00000000000
--- a/db/schema_migrations/20221024034228
+++ /dev/null
@@ -1 +0,0 @@
-7f83a1d04357f4f2e1e4ed92e0d9b0041f79d1850b28f41cee45d243e25741f0 \ No newline at end of file
diff --git a/db/schema_migrations/20221024121500 b/db/schema_migrations/20221024121500
deleted file mode 100644
index 6db609001ad..00000000000
--- a/db/schema_migrations/20221024121500
+++ /dev/null
@@ -1 +0,0 @@
-8449de1e73e2fb46698e0e160641c4132b99918792b0b3379d6009bab9eab0b7 \ No newline at end of file
diff --git a/db/schema_migrations/20221025043930 b/db/schema_migrations/20221025043930
deleted file mode 100644
index 37365baea27..00000000000
--- a/db/schema_migrations/20221025043930
+++ /dev/null
@@ -1 +0,0 @@
-6762034e2dff9d6e6d146f1ce3b281f8886895b056c5ed54767ceb0d6c18bd59 \ No newline at end of file
diff --git a/db/schema_migrations/20221025105205 b/db/schema_migrations/20221025105205
deleted file mode 100644
index 4003f74aa11..00000000000
--- a/db/schema_migrations/20221025105205
+++ /dev/null
@@ -1 +0,0 @@
-80daa2f50ae9f8c0dee206ed9d45eb04884e14a0331475cb8c9a2d57f4c86ef5 \ No newline at end of file
diff --git a/db/schema_migrations/20221025115006 b/db/schema_migrations/20221025115006
deleted file mode 100644
index d831d6aeec9..00000000000
--- a/db/schema_migrations/20221025115006
+++ /dev/null
@@ -1 +0,0 @@
-1529e1b436b65ff7b787f43fc5b8de7515aebe427719d2e4e62e9a7f923e877b \ No newline at end of file
diff --git a/db/schema_migrations/20221025145452 b/db/schema_migrations/20221025145452
deleted file mode 100644
index df551b8bae6..00000000000
--- a/db/schema_migrations/20221025145452
+++ /dev/null
@@ -1 +0,0 @@
-951ad9faf483d58778cd831a0ac949473d6eeb753322754eff3f02756d757583 \ No newline at end of file
diff --git a/db/schema_migrations/20221025150202 b/db/schema_migrations/20221025150202
deleted file mode 100644
index aa6db23de6c..00000000000
--- a/db/schema_migrations/20221025150202
+++ /dev/null
@@ -1 +0,0 @@
-2185444f733eec25a2741764619516eecb1d2c6e3e4ec3b3ed5b72bfd9c4db46 \ No newline at end of file
diff --git a/db/schema_migrations/20221025220607 b/db/schema_migrations/20221025220607
deleted file mode 100644
index 30322b1ab3f..00000000000
--- a/db/schema_migrations/20221025220607
+++ /dev/null
@@ -1 +0,0 @@
-d6eb5bb918f12c08f23c228916b7e21432e1e2958832c10be4e46dfa2079103d \ No newline at end of file
diff --git a/db/schema_migrations/20221027124848 b/db/schema_migrations/20221027124848
deleted file mode 100644
index 249e4e4b83f..00000000000
--- a/db/schema_migrations/20221027124848
+++ /dev/null
@@ -1 +0,0 @@
-108dec45cbed3651aec46636a3009cb18296d0fa0ca720774dc2105123955dfd \ No newline at end of file
diff --git a/db/schema_migrations/20221027203556 b/db/schema_migrations/20221027203556
deleted file mode 100644
index e386f0e6bbb..00000000000
--- a/db/schema_migrations/20221027203556
+++ /dev/null
@@ -1 +0,0 @@
-9ea13068b90797013677ec390de4222e00e80076080cf4e5335e9f90e2e59f2d \ No newline at end of file
diff --git a/db/schema_migrations/20221027203951 b/db/schema_migrations/20221027203951
deleted file mode 100644
index 866ccf8c208..00000000000
--- a/db/schema_migrations/20221027203951
+++ /dev/null
@@ -1 +0,0 @@
-5f4fd4e64d398208e2d32573273a70106c9a4fd5ab350d75fcf7a6f4c824e00a \ No newline at end of file
diff --git a/db/schema_migrations/20221028000041 b/db/schema_migrations/20221028000041
deleted file mode 100644
index 4160c4d26ed..00000000000
--- a/db/schema_migrations/20221028000041
+++ /dev/null
@@ -1 +0,0 @@
-b2e38680afc264fadd5fbaa7d07c95c7ba6e1fb7a32bdff267e35a7d9bde72c8 \ No newline at end of file
diff --git a/db/schema_migrations/20221028000603 b/db/schema_migrations/20221028000603
deleted file mode 100644
index 0dc60ae68eb..00000000000
--- a/db/schema_migrations/20221028000603
+++ /dev/null
@@ -1 +0,0 @@
-aee0c708436ae365e2469b2bb5b508dcbf6975326faa90bd1571dd400312eded \ No newline at end of file
diff --git a/db/schema_migrations/20221028015347 b/db/schema_migrations/20221028015347
deleted file mode 100644
index ab633b763df..00000000000
--- a/db/schema_migrations/20221028015347
+++ /dev/null
@@ -1 +0,0 @@
-7b86ae0739c4c381b050539261c67dbf3d4716edf0f0bde9b281cbdc5143a4d2 \ No newline at end of file
diff --git a/db/schema_migrations/20221028022627 b/db/schema_migrations/20221028022627
deleted file mode 100644
index 34c365800a6..00000000000
--- a/db/schema_migrations/20221028022627
+++ /dev/null
@@ -1 +0,0 @@
-0305d0fa4d95b0a1553c9ba7984af2cb74099988dbc9983e1048b54ead39a76e \ No newline at end of file
diff --git a/db/schema_migrations/20221028152422 b/db/schema_migrations/20221028152422
deleted file mode 100644
index bfe9807b1c6..00000000000
--- a/db/schema_migrations/20221028152422
+++ /dev/null
@@ -1 +0,0 @@
-c9322bdc7e862bd20ec548fbcd3ec6a9ef4da6abc0a688d503e1792acc262472 \ No newline at end of file
diff --git a/db/schema_migrations/20221031102916 b/db/schema_migrations/20221031102916
deleted file mode 100644
index 53f927cfc32..00000000000
--- a/db/schema_migrations/20221031102916
+++ /dev/null
@@ -1 +0,0 @@
-e0065beaf2e1dc5e5850353244ba2c76477e855733f3683a1901a340a5826ae1 \ No newline at end of file
diff --git a/db/schema_migrations/20221101032521 b/db/schema_migrations/20221101032521
deleted file mode 100644
index 995b034fa89..00000000000
--- a/db/schema_migrations/20221101032521
+++ /dev/null
@@ -1 +0,0 @@
-db7e477626aa34154db2d6ff30bcafc7c70a2a9c3a719bfb7e7ac0a8e0d7e579 \ No newline at end of file
diff --git a/db/schema_migrations/20221101032600 b/db/schema_migrations/20221101032600
deleted file mode 100644
index 2b060661657..00000000000
--- a/db/schema_migrations/20221101032600
+++ /dev/null
@@ -1 +0,0 @@
-49449f2bb02e8dbe0cff73b6ac8dc291c00c7ce9c0d54bf7bb2b5cd9c599d713 \ No newline at end of file
diff --git a/db/schema_migrations/20221101195903 b/db/schema_migrations/20221101195903
deleted file mode 100644
index 9b19cb05b66..00000000000
--- a/db/schema_migrations/20221101195903
+++ /dev/null
@@ -1 +0,0 @@
-984a2bcc65364293cd110d3a917aecd37253f621150220000f99e8ea215e30ab \ No newline at end of file
diff --git a/db/schema_migrations/20221101201031 b/db/schema_migrations/20221101201031
deleted file mode 100644
index 82544cf461d..00000000000
--- a/db/schema_migrations/20221101201031
+++ /dev/null
@@ -1 +0,0 @@
-6ed6a3fdd144b118c7f85960d08500f21a7f666abfdaafc9d681e03723ed22e8 \ No newline at end of file
diff --git a/db/schema_migrations/20221102090940 b/db/schema_migrations/20221102090940
deleted file mode 100644
index c0ef7881688..00000000000
--- a/db/schema_migrations/20221102090940
+++ /dev/null
@@ -1 +0,0 @@
-3be66e9f4239eb75f14118d1fd795f1a1bcd2d6bc4e34fe58a0c8422e33c893a \ No newline at end of file
diff --git a/db/schema_migrations/20221102090943 b/db/schema_migrations/20221102090943
deleted file mode 100644
index bc7ff679c6e..00000000000
--- a/db/schema_migrations/20221102090943
+++ /dev/null
@@ -1 +0,0 @@
-8e907e086c4b23dd08163c4d946ec4a0202288f7da08eff565a159bccdd445f2 \ No newline at end of file
diff --git a/db/schema_migrations/20221102202130 b/db/schema_migrations/20221102202130
deleted file mode 100644
index 82ee1088544..00000000000
--- a/db/schema_migrations/20221102202130
+++ /dev/null
@@ -1 +0,0 @@
-76c2fe9422491d0bd457584580b383924b895574cec7e90cdfa5de9ed56a3639 \ No newline at end of file
diff --git a/db/schema_migrations/20221102225800 b/db/schema_migrations/20221102225800
deleted file mode 100644
index fca933ed91b..00000000000
--- a/db/schema_migrations/20221102225800
+++ /dev/null
@@ -1 +0,0 @@
-2e7e55a23574d45e877712fb67b2c2b50d85905c95fe4ec3990cfd8fe5160122 \ No newline at end of file
diff --git a/db/schema_migrations/20221103073328 b/db/schema_migrations/20221103073328
deleted file mode 100644
index 8a90e224a2f..00000000000
--- a/db/schema_migrations/20221103073328
+++ /dev/null
@@ -1 +0,0 @@
-6f0ce1b68310b3194aa7b6219d79570e8179d449f49d828800f90f70d9242f38 \ No newline at end of file
diff --git a/db/schema_migrations/20221103084213 b/db/schema_migrations/20221103084213
deleted file mode 100644
index f9790952cf0..00000000000
--- a/db/schema_migrations/20221103084213
+++ /dev/null
@@ -1 +0,0 @@
-90794c6a9b8b9e08e8b0898e55bc581b8411fd0e85a17fefa916213d82e98099 \ No newline at end of file
diff --git a/db/schema_migrations/20221103131409 b/db/schema_migrations/20221103131409
deleted file mode 100644
index 88be59197a3..00000000000
--- a/db/schema_migrations/20221103131409
+++ /dev/null
@@ -1 +0,0 @@
-cb301b88dc9b0f5bffd9d1a4419c5923e8145cb8770e576d88dc7881c1c9e39c \ No newline at end of file
diff --git a/db/schema_migrations/20221103150250 b/db/schema_migrations/20221103150250
deleted file mode 100644
index cc6b55ba5ea..00000000000
--- a/db/schema_migrations/20221103150250
+++ /dev/null
@@ -1 +0,0 @@
-662c4df2d65a9259e2eafc11e828ffc15765b92fe3a5291ff869129aaf7bb1c0 \ No newline at end of file
diff --git a/db/schema_migrations/20221104042137 b/db/schema_migrations/20221104042137
deleted file mode 100644
index 4e3a1d27d53..00000000000
--- a/db/schema_migrations/20221104042137
+++ /dev/null
@@ -1 +0,0 @@
-3192407f3034683ba226d651e247385de200a06e26142e87978fa080eecda110 \ No newline at end of file
diff --git a/db/schema_migrations/20221104042159 b/db/schema_migrations/20221104042159
deleted file mode 100644
index 3454e08597d..00000000000
--- a/db/schema_migrations/20221104042159
+++ /dev/null
@@ -1 +0,0 @@
-462fd09ac4c59b9fc3f865e984da4c83c4a75d60e557d634631d5eafd67741cc \ No newline at end of file
diff --git a/db/schema_migrations/20221104061320 b/db/schema_migrations/20221104061320
deleted file mode 100644
index f1cc9a7e277..00000000000
--- a/db/schema_migrations/20221104061320
+++ /dev/null
@@ -1 +0,0 @@
-c181db849e3542570b4cc55337be8fbda87556773c989ce4e8259cefa1c74922 \ No newline at end of file
diff --git a/db/schema_migrations/20221104074652 b/db/schema_migrations/20221104074652
deleted file mode 100644
index 460f21a3f6e..00000000000
--- a/db/schema_migrations/20221104074652
+++ /dev/null
@@ -1 +0,0 @@
-167032d562467c3d6be9e6c6c8c072f117e23798db35301f95386130ae115a00 \ No newline at end of file
diff --git a/db/schema_migrations/20221104094042 b/db/schema_migrations/20221104094042
deleted file mode 100644
index 08694063f07..00000000000
--- a/db/schema_migrations/20221104094042
+++ /dev/null
@@ -1 +0,0 @@
-7ddb85c1acfd3fbeddbe96857d329ad09cd21210e6765ff36d4b9f516a7c10be \ No newline at end of file
diff --git a/db/schema_migrations/20221104100203 b/db/schema_migrations/20221104100203
deleted file mode 100644
index df7b06eef5d..00000000000
--- a/db/schema_migrations/20221104100203
+++ /dev/null
@@ -1 +0,0 @@
-1d7912409bb5afc7de82b7507fb2aeb164253c70a58eaf88d502513577bad979 \ No newline at end of file
diff --git a/db/schema_migrations/20221104170500 b/db/schema_migrations/20221104170500
deleted file mode 100644
index 58fd45b5223..00000000000
--- a/db/schema_migrations/20221104170500
+++ /dev/null
@@ -1 +0,0 @@
-1826209494234355dd2014b3ae7f8ef5c2138a3d22ce143f744ab911e3ebb985 \ No newline at end of file
diff --git a/db/schema_migrations/20221104190203 b/db/schema_migrations/20221104190203
deleted file mode 100644
index cf604255bc1..00000000000
--- a/db/schema_migrations/20221104190203
+++ /dev/null
@@ -1 +0,0 @@
-248aecf9fa53146f2c1f7771fd60adf720fa8c0d2bd33d71c6177b185e4248d1 \ No newline at end of file
diff --git a/db/schema_migrations/20221107094359 b/db/schema_migrations/20221107094359
deleted file mode 100644
index f5cb6814e61..00000000000
--- a/db/schema_migrations/20221107094359
+++ /dev/null
@@ -1 +0,0 @@
-47d2ac5130583e1a5d0b89d73f32d4af208f8800fc62726bce8ca86e3ce0ed40 \ No newline at end of file
diff --git a/db/schema_migrations/20221107115247 b/db/schema_migrations/20221107115247
deleted file mode 100644
index e5426ef7be1..00000000000
--- a/db/schema_migrations/20221107115247
+++ /dev/null
@@ -1 +0,0 @@
-c3616b3184b29fb2dbe83ec18391b8c52a2ab23591803bb949226a7202e49c2b \ No newline at end of file
diff --git a/db/schema_migrations/20221107115413 b/db/schema_migrations/20221107115413
deleted file mode 100644
index f8889bebe98..00000000000
--- a/db/schema_migrations/20221107115413
+++ /dev/null
@@ -1 +0,0 @@
-71bacdb2d4c1c3c21fe39d4092cad803a4ebf44b6d621b8425baaa77b15b3891 \ No newline at end of file
diff --git a/db/schema_migrations/20221107183222 b/db/schema_migrations/20221107183222
deleted file mode 100644
index e7049b0d3a1..00000000000
--- a/db/schema_migrations/20221107183222
+++ /dev/null
@@ -1 +0,0 @@
-593bf8c98becf8300ccdd38403d805c9f185827a9a131b83d3b0aa571aa6f172 \ No newline at end of file
diff --git a/db/schema_migrations/20221107184542 b/db/schema_migrations/20221107184542
deleted file mode 100644
index ac7a4c78f66..00000000000
--- a/db/schema_migrations/20221107184542
+++ /dev/null
@@ -1 +0,0 @@
-876dce84bbc5ee00cd7ee837be6c549c677ec7eb7ec8db39d7711877d57dd7be \ No newline at end of file
diff --git a/db/schema_migrations/20221107184758 b/db/schema_migrations/20221107184758
deleted file mode 100644
index f327e45183b..00000000000
--- a/db/schema_migrations/20221107184758
+++ /dev/null
@@ -1 +0,0 @@
-1aa75f334b1b56e46e8e0985febba567b0eb55af0f1ced0e198bfc979e5e262c \ No newline at end of file
diff --git a/db/schema_migrations/20221107220420 b/db/schema_migrations/20221107220420
deleted file mode 100644
index f56ca1204b1..00000000000
--- a/db/schema_migrations/20221107220420
+++ /dev/null
@@ -1 +0,0 @@
-499f7b3951c9792d2a8f204b72c474a42e8301b487fa9f68080dd5bb5db0c64c \ No newline at end of file
diff --git a/db/schema_migrations/20221107220526 b/db/schema_migrations/20221107220526
deleted file mode 100644
index 93be68808d7..00000000000
--- a/db/schema_migrations/20221107220526
+++ /dev/null
@@ -1 +0,0 @@
-b633df04851493d7d4b5d7da79ba3057f6f2c302e507b4f963596edf9cbfcb88 \ No newline at end of file
diff --git a/db/schema_migrations/20221107222213 b/db/schema_migrations/20221107222213
deleted file mode 100644
index 5950f0d5c5a..00000000000
--- a/db/schema_migrations/20221107222213
+++ /dev/null
@@ -1 +0,0 @@
-f5295b135cd395a59c7afc6a9d999201f9ea1174aab893d31ead398aa8c0f8bb \ No newline at end of file
diff --git a/db/schema_migrations/20221108015813 b/db/schema_migrations/20221108015813
deleted file mode 100644
index 39263419da6..00000000000
--- a/db/schema_migrations/20221108015813
+++ /dev/null
@@ -1 +0,0 @@
-d6b24d6346bd9b32dd726d61048e7eea791d02016b9b4c3a8cb561b2430e1fdb \ No newline at end of file
diff --git a/db/schema_migrations/20221108045019 b/db/schema_migrations/20221108045019
deleted file mode 100644
index 518b5118173..00000000000
--- a/db/schema_migrations/20221108045019
+++ /dev/null
@@ -1 +0,0 @@
-b8438bebe77ae835b754431d8d67c306714205bef11826a15d4c84d7b67a3581 \ No newline at end of file
diff --git a/db/schema_migrations/20221108121322 b/db/schema_migrations/20221108121322
deleted file mode 100644
index d1880c9319a..00000000000
--- a/db/schema_migrations/20221108121322
+++ /dev/null
@@ -1 +0,0 @@
-4e5deb2f5be081eef7b3dab726b2877bc21a7afad1b6a12aca240f510cada0b3 \ No newline at end of file
diff --git a/db/schema_migrations/20221108185442 b/db/schema_migrations/20221108185442
deleted file mode 100644
index ec32f966df9..00000000000
--- a/db/schema_migrations/20221108185442
+++ /dev/null
@@ -1 +0,0 @@
-fc1f31a717e8c5e8539138e612dcba4acafb5b7324534b6ca23220142c43de80 \ No newline at end of file
diff --git a/db/schema_migrations/20221108222015 b/db/schema_migrations/20221108222015
deleted file mode 100644
index 2b9ce458ce9..00000000000
--- a/db/schema_migrations/20221108222015
+++ /dev/null
@@ -1 +0,0 @@
-555c69896e457b0b41c00926007b422ef34869e45fc0bde89b87ecc2df51de00 \ No newline at end of file
diff --git a/db/schema_migrations/20221110045406 b/db/schema_migrations/20221110045406
deleted file mode 100644
index 264e4f5003b..00000000000
--- a/db/schema_migrations/20221110045406
+++ /dev/null
@@ -1 +0,0 @@
-d0a14750dfcf3bd7641c9f37fbf5f992d4d7be7be33565ed9dd14eb12a983005 \ No newline at end of file
diff --git a/db/schema_migrations/20221110105857 b/db/schema_migrations/20221110105857
deleted file mode 100644
index f515180dcdf..00000000000
--- a/db/schema_migrations/20221110105857
+++ /dev/null
@@ -1 +0,0 @@
-5ef00449d9c5b4a44b99410839d3ba4c4d6d8cb152460822b882c6ac60f771e3 \ No newline at end of file
diff --git a/db/schema_migrations/20221110150942 b/db/schema_migrations/20221110150942
deleted file mode 100644
index 1c627232e78..00000000000
--- a/db/schema_migrations/20221110150942
+++ /dev/null
@@ -1 +0,0 @@
-fa663262d6d73637e7ffefecd0f06705456bc226024d5023377a527cf3498ac7 \ No newline at end of file
diff --git a/db/schema_migrations/20221111070314 b/db/schema_migrations/20221111070314
deleted file mode 100644
index 754d584f0f2..00000000000
--- a/db/schema_migrations/20221111070314
+++ /dev/null
@@ -1 +0,0 @@
-4a85ceb76874c618fa21030838900ed1a7219e4ee40b2d88645f4025743034f9 \ No newline at end of file
diff --git a/db/schema_migrations/20231024073401 b/db/schema_migrations/20231024073401
new file mode 100644
index 00000000000..c4879144126
--- /dev/null
+++ b/db/schema_migrations/20231024073401
@@ -0,0 +1 @@
+842fcd7c485ec4757810444172f2a0b7ec69ea0eda14662e0418ee3befdcaadc \ No newline at end of file
diff --git a/db/schema_migrations/20231025191217 b/db/schema_migrations/20231025191217
new file mode 100644
index 00000000000..c0458feed62
--- /dev/null
+++ b/db/schema_migrations/20231025191217
@@ -0,0 +1 @@
+057503cc1306afe9dea3a3d01a2fd8eeb240c33d292a6e3f2bd8ba52b38cfa62 \ No newline at end of file
diff --git a/db/schema_migrations/20231026172345 b/db/schema_migrations/20231026172345
new file mode 100644
index 00000000000..805a3790beb
--- /dev/null
+++ b/db/schema_migrations/20231026172345
@@ -0,0 +1 @@
+45048beec6a1167b9a3925c99dcc97067d3bbeb3716276c3afd180b2806018a4 \ No newline at end of file
diff --git a/db/schema_migrations/20231026175042 b/db/schema_migrations/20231026175042
new file mode 100644
index 00000000000..fd4bf10c3be
--- /dev/null
+++ b/db/schema_migrations/20231026175042
@@ -0,0 +1 @@
+34f2680296663a5a929da3e43b45d320a8c811d5191e1901f52dbacf2a097e59 \ No newline at end of file
diff --git a/db/schema_migrations/20231027093009 b/db/schema_migrations/20231027093009
new file mode 100644
index 00000000000..5a702631a0c
--- /dev/null
+++ b/db/schema_migrations/20231027093009
@@ -0,0 +1 @@
+b34d536dadff793f35eb1d7321fd07639c89bff40a2edf5dd51bb5db627b912c \ No newline at end of file
diff --git a/db/schema_migrations/20231029134824 b/db/schema_migrations/20231029134824
new file mode 100644
index 00000000000..628afeba60f
--- /dev/null
+++ b/db/schema_migrations/20231029134824
@@ -0,0 +1 @@
+6a6904e4d238188de896f31d18ed970c1784cbd831506f48ad186d3ca0f1a2af \ No newline at end of file
diff --git a/db/schema_migrations/20231029142649 b/db/schema_migrations/20231029142649
new file mode 100644
index 00000000000..8e9924fb32e
--- /dev/null
+++ b/db/schema_migrations/20231029142649
@@ -0,0 +1 @@
+6b8021c293e630af13479afe8f49ef3d28861d963942b481a3113266ff59fccf \ No newline at end of file
diff --git a/db/schema_migrations/20231031114050 b/db/schema_migrations/20231031114050
new file mode 100644
index 00000000000..19cb44a7547
--- /dev/null
+++ b/db/schema_migrations/20231031114050
@@ -0,0 +1 @@
+bed0dfe4d96d4c9b9cbaa0b05331b73fe80d5669ee219a7f05aeef0065918b26 \ No newline at end of file
diff --git a/db/schema_migrations/20231031164724 b/db/schema_migrations/20231031164724
new file mode 100644
index 00000000000..2fd9dffc05e
--- /dev/null
+++ b/db/schema_migrations/20231031164724
@@ -0,0 +1 @@
+bf01581f80ea83ed560166273b3fa79fd475d14fab180ec0569aa2065d974733 \ 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/schema_migrations/20231031204841 b/db/schema_migrations/20231031204841
new file mode 100644
index 00000000000..e6ab24c922b
--- /dev/null
+++ b/db/schema_migrations/20231031204841
@@ -0,0 +1 @@
+a1bbcd9430acc48bc271dd041c2999932d24d15bfa2ef8766d7bf9920d2d3539 \ No newline at end of file
diff --git a/db/schema_migrations/20231101171848 b/db/schema_migrations/20231101171848
new file mode 100644
index 00000000000..e422613ea78
--- /dev/null
+++ b/db/schema_migrations/20231101171848
@@ -0,0 +1 @@
+6d1e481211af71c48c6a0b0f70117b202a5f4e93df19cdc380ead3a5f55a17ff \ No newline at end of file
diff --git a/db/schema_migrations/20231103160022 b/db/schema_migrations/20231103160022
new file mode 100644
index 00000000000..793a96188fe
--- /dev/null
+++ b/db/schema_migrations/20231103160022
@@ -0,0 +1 @@
+87e93fa0d1c2b8b9bdfc252caa114e3e1216689b3e8aeb1117cef49200ac81fa \ No newline at end of file
diff --git a/db/schema_migrations/20231103160859 b/db/schema_migrations/20231103160859
new file mode 100644
index 00000000000..e3dacd9b721
--- /dev/null
+++ b/db/schema_migrations/20231103160859
@@ -0,0 +1 @@
+df5b53b47bcbc89ca0385753609d1eab95f5f7133ed0269cb80099ff5a36723a \ No newline at end of file
diff --git a/db/schema_migrations/20231107092912 b/db/schema_migrations/20231107092912
new file mode 100644
index 00000000000..baef0aa2147
--- /dev/null
+++ b/db/schema_migrations/20231107092912
@@ -0,0 +1 @@
+f5bd273a05caa2cc662dc430cb2661321602e608054d6ef3f45dfc8cfacec152 \ No newline at end of file
diff --git a/db/schema_migrations/20231107140642 b/db/schema_migrations/20231107140642
new file mode 100644
index 00000000000..e77a46970b3
--- /dev/null
+++ b/db/schema_migrations/20231107140642
@@ -0,0 +1 @@
+7a2cd6460af9afcf6bcbb933854872d2be2b6d098f48383331c83d10c8f9ee73 \ No newline at end of file
diff --git a/db/schema_migrations/20231107193342 b/db/schema_migrations/20231107193342
new file mode 100644
index 00000000000..278d4b27063
--- /dev/null
+++ b/db/schema_migrations/20231107193342
@@ -0,0 +1 @@
+226d69a2d83bff6b26e9a7262877cbb1ee3f54189beff3929dabbf15e5574b84 \ No newline at end of file
diff --git a/db/schema_migrations/20231108132916 b/db/schema_migrations/20231108132916
new file mode 100644
index 00000000000..a7c7d98f18c
--- /dev/null
+++ b/db/schema_migrations/20231108132916
@@ -0,0 +1 @@
+4f67f8ebf48cb7ea22e5451c3b548a5f7dc59b0e2b29d51ac73a04860214a25f \ No newline at end of file
diff --git a/db/schema_migrations/20231108143957 b/db/schema_migrations/20231108143957
new file mode 100644
index 00000000000..ec3f916ea2e
--- /dev/null
+++ b/db/schema_migrations/20231108143957
@@ -0,0 +1 @@
+fc18cfa407a2270af8be9de77b5078544e27afb38e4ad87f3b2c06e24f58add0 \ No newline at end of file
diff --git a/db/schema_migrations/20231109120223 b/db/schema_migrations/20231109120223
new file mode 100644
index 00000000000..2618beb4715
--- /dev/null
+++ b/db/schema_migrations/20231109120223
@@ -0,0 +1 @@
+5ee1339e939d6fe7012d292758c6081b86682adde3a9f2d852e6fc4aa9a8db8c \ No newline at end of file
diff --git a/db/schema_migrations/20231109124031 b/db/schema_migrations/20231109124031
new file mode 100644
index 00000000000..f93cdf43461
--- /dev/null
+++ b/db/schema_migrations/20231109124031
@@ -0,0 +1 @@
+35bd9f55894a2d4788cee19983d44bba45878df35d96e4ba7aa2e3bea7bebee7 \ No newline at end of file
diff --git a/db/schema_migrations/20231109165512 b/db/schema_migrations/20231109165512
new file mode 100644
index 00000000000..1e3a229c9d1
--- /dev/null
+++ b/db/schema_migrations/20231109165512
@@ -0,0 +1 @@
+2d3abd070d856db04eea298bbbe82681ca01912e19f978de876fce68ed2ada26 \ No newline at end of file
diff --git a/db/schema_migrations/20231110044738 b/db/schema_migrations/20231110044738
new file mode 100644
index 00000000000..59cc6ba535d
--- /dev/null
+++ b/db/schema_migrations/20231110044738
@@ -0,0 +1 @@
+47bce515d0f9891997ee2adc12e83fd416e49eba9d862fc5c387875fe3f3c557 \ No newline at end of file
diff --git a/db/schema_migrations/20231110173626 b/db/schema_migrations/20231110173626
new file mode 100644
index 00000000000..a8c8e082ad2
--- /dev/null
+++ b/db/schema_migrations/20231110173626
@@ -0,0 +1 @@
+a26ca208d67553ecd81aa11be3f4b99dcb604dfb9d4d86932af3866e863add01 \ No newline at end of file
diff --git a/db/schema_migrations/20231112213727 b/db/schema_migrations/20231112213727
new file mode 100644
index 00000000000..a92c4c1416d
--- /dev/null
+++ b/db/schema_migrations/20231112213727
@@ -0,0 +1 @@
+9e9b1aa72cdee936d054dfd657636d54c505fa9355ebf41c8dcdfd695dc2530b \ No newline at end of file
diff --git a/db/schema_migrations/20231112214803 b/db/schema_migrations/20231112214803
new file mode 100644
index 00000000000..9876f17af07
--- /dev/null
+++ b/db/schema_migrations/20231112214803
@@ -0,0 +1 @@
+2a7d37a61d4fc2a0b4a96acbf58508b5d38119540005f546e7d9f247eac3829f \ No newline at end of file
diff --git a/db/schema_migrations/20231112223008 b/db/schema_migrations/20231112223008
new file mode 100644
index 00000000000..d0fd803aebe
--- /dev/null
+++ b/db/schema_migrations/20231112223008
@@ -0,0 +1 @@
+fdd72dc39f9815db8a9c23a6fe5329f8708da91607709a2d822771c7ced8eba5 \ No newline at end of file
diff --git a/db/schema_migrations/20231113025718 b/db/schema_migrations/20231113025718
new file mode 100644
index 00000000000..34206198e18
--- /dev/null
+++ b/db/schema_migrations/20231113025718
@@ -0,0 +1 @@
+9043a1a0202742ba8c35b33fb483b6bb3c47a1df22da2d4a285a326bf09fa409 \ No newline at end of file
diff --git a/db/schema_migrations/20231113025733 b/db/schema_migrations/20231113025733
new file mode 100644
index 00000000000..4a82d86eb55
--- /dev/null
+++ b/db/schema_migrations/20231113025733
@@ -0,0 +1 @@
+0c3790315f5d765c4cd13b5c7029886cf91edf1cce6e401c6c511dd9063a90c0 \ No newline at end of file
diff --git a/db/schema_migrations/20231113124342 b/db/schema_migrations/20231113124342
new file mode 100644
index 00000000000..2960c86f6b6
--- /dev/null
+++ b/db/schema_migrations/20231113124342
@@ -0,0 +1 @@
+2d87a6e54aa2a5f80f2d36b2718aab081223b25b0d199a843558668e98b3a319 \ No newline at end of file
diff --git a/db/schema_migrations/20231113142618 b/db/schema_migrations/20231113142618
new file mode 100644
index 00000000000..97c100cfe9d
--- /dev/null
+++ b/db/schema_migrations/20231113142618
@@ -0,0 +1 @@
+0d9960793ccff476b47508bb9664603573d9bdf09d6ed4c1f341de44855ca4c9 \ No newline at end of file
diff --git a/db/schema_migrations/20231113164909 b/db/schema_migrations/20231113164909
new file mode 100644
index 00000000000..344fd046b14
--- /dev/null
+++ b/db/schema_migrations/20231113164909
@@ -0,0 +1 @@
+5d4421756749b4ef2cc74213e5e73d6ecec8f47d7db3645941f5d66d162100ac \ No newline at end of file
diff --git a/db/schema_migrations/20231114000727 b/db/schema_migrations/20231114000727
new file mode 100644
index 00000000000..4f96f5ef40c
--- /dev/null
+++ b/db/schema_migrations/20231114000727
@@ -0,0 +1 @@
+ade28e4300509e182d6ab751b4412382c8e00803b102fc4f25bb0a0d049bcc30 \ No newline at end of file
diff --git a/db/schema_migrations/20231114015857 b/db/schema_migrations/20231114015857
new file mode 100644
index 00000000000..5e668997331
--- /dev/null
+++ b/db/schema_migrations/20231114015857
@@ -0,0 +1 @@
+0d3770a395237dbf229f31a6a5bf7b74f4e7d28b9edc024d8d6fad9e8db196a0 \ No newline at end of file
diff --git a/db/schema_migrations/20231114015923 b/db/schema_migrations/20231114015923
new file mode 100644
index 00000000000..68d9a642648
--- /dev/null
+++ b/db/schema_migrations/20231114015923
@@ -0,0 +1 @@
+af0a9a23ed7d757ff9a8e10d6b598a6cfc52b80576736bb568ef4543629e276f \ No newline at end of file
diff --git a/db/schema_migrations/20231114034017 b/db/schema_migrations/20231114034017
new file mode 100644
index 00000000000..c6ad204038b
--- /dev/null
+++ b/db/schema_migrations/20231114034017
@@ -0,0 +1 @@
+9fb5182183745b3144082449e609d80526aa4853b242cd16ef1f007bb9cbcd63 \ No newline at end of file
diff --git a/db/schema_migrations/20231114034309 b/db/schema_migrations/20231114034309
new file mode 100644
index 00000000000..f0b187fd574
--- /dev/null
+++ b/db/schema_migrations/20231114034309
@@ -0,0 +1 @@
+c981047acebc8b0c10a395a73146bf5dc9194563bf3572b3889581026b72f311 \ No newline at end of file
diff --git a/db/schema_migrations/20231114034507 b/db/schema_migrations/20231114034507
new file mode 100644
index 00000000000..2401e6076b5
--- /dev/null
+++ b/db/schema_migrations/20231114034507
@@ -0,0 +1 @@
+a49ebc11ac3725042ded063dd8f058aacf52b6ecc312aaa7cd3010243cf7a372 \ No newline at end of file
diff --git a/db/schema_migrations/20231114043522 b/db/schema_migrations/20231114043522
new file mode 100644
index 00000000000..8167956e273
--- /dev/null
+++ b/db/schema_migrations/20231114043522
@@ -0,0 +1 @@
+5246b2de3ac40dc6ded8d9c785792abcb3c77f80cd0ab356bcb75d716dd0a7ec \ No newline at end of file
diff --git a/db/schema_migrations/20231114053330 b/db/schema_migrations/20231114053330
new file mode 100644
index 00000000000..4cb547558ed
--- /dev/null
+++ b/db/schema_migrations/20231114053330
@@ -0,0 +1 @@
+b3891f104dd731fad72c344550a6f58479c41117bedac31796b56880d8740875 \ No newline at end of file
diff --git a/db/schema_migrations/20231114062200 b/db/schema_migrations/20231114062200
new file mode 100644
index 00000000000..345b2cdcb8b
--- /dev/null
+++ b/db/schema_migrations/20231114062200
@@ -0,0 +1 @@
+e95eb36797f002f77df630fb500d234049e21c0eb80f348ae37ce54498ac7a1f \ No newline at end of file
diff --git a/db/schema_migrations/20231114062215 b/db/schema_migrations/20231114062215
new file mode 100644
index 00000000000..92685101676
--- /dev/null
+++ b/db/schema_migrations/20231114062215
@@ -0,0 +1 @@
+67c2be8f235e41d1a871a79247832affb34570ec21db63f7c34e8b26432f066e \ No newline at end of file
diff --git a/db/schema_migrations/20231114091124 b/db/schema_migrations/20231114091124
new file mode 100644
index 00000000000..cf32ed90b03
--- /dev/null
+++ b/db/schema_migrations/20231114091124
@@ -0,0 +1 @@
+db370c884442e7d24d04721f7987f03d14a7d7fbd5372d8f226dae853713d80c \ No newline at end of file
diff --git a/db/schema_migrations/20231114091935 b/db/schema_migrations/20231114091935
new file mode 100644
index 00000000000..cc061428243
--- /dev/null
+++ b/db/schema_migrations/20231114091935
@@ -0,0 +1 @@
+7b850a89a80da671a2a46ce291591b1dcad5a4f30892ac00c4346a586cf3a8e9 \ No newline at end of file
diff --git a/db/schema_migrations/20231114100444 b/db/schema_migrations/20231114100444
new file mode 100644
index 00000000000..72099c8f50e
--- /dev/null
+++ b/db/schema_migrations/20231114100444
@@ -0,0 +1 @@
+37b3fa70babc9524396c2b9a53f6d6c3a5964d7a9b3e5bc6c15357b991bd1a02 \ No newline at end of file
diff --git a/db/schema_migrations/20231114121812 b/db/schema_migrations/20231114121812
new file mode 100644
index 00000000000..de0c2730c84
--- /dev/null
+++ b/db/schema_migrations/20231114121812
@@ -0,0 +1 @@
+0d675f9ac9c721e025e958ab792b454d78382ea8babf7f7eea6e7621d38ec5e9 \ No newline at end of file
diff --git a/db/schema_migrations/20231114131031 b/db/schema_migrations/20231114131031
new file mode 100644
index 00000000000..26363711a91
--- /dev/null
+++ b/db/schema_migrations/20231114131031
@@ -0,0 +1 @@
+d9a518f44671a226e1d7213ac1b7822077faa96f6a1ffc8df6b272c6a3655a4b \ No newline at end of file
diff --git a/db/schema_migrations/20231114133600 b/db/schema_migrations/20231114133600
new file mode 100644
index 00000000000..4c371fb5bbb
--- /dev/null
+++ b/db/schema_migrations/20231114133600
@@ -0,0 +1 @@
+3fa5fc44d3c9d7cea50b8fe9e17fcf0fc213cfdffcb95ded819d833fe62f83ab \ No newline at end of file
diff --git a/db/schema_migrations/20231114133619 b/db/schema_migrations/20231114133619
new file mode 100644
index 00000000000..44842d4341b
--- /dev/null
+++ b/db/schema_migrations/20231114133619
@@ -0,0 +1 @@
+5aac8311e6e73f98ab6f809006e037a8e2f9963e480f935753e5e954cc0b33ca \ No newline at end of file
diff --git a/db/schema_migrations/20231114152304 b/db/schema_migrations/20231114152304
new file mode 100644
index 00000000000..61092255023
--- /dev/null
+++ b/db/schema_migrations/20231114152304
@@ -0,0 +1 @@
+1d95078648a6fde73287b5a90c66143669cbde10836e3a1457ded5d3decb0266 \ No newline at end of file
diff --git a/db/schema_migrations/20231114231330 b/db/schema_migrations/20231114231330
new file mode 100644
index 00000000000..6debfc70f4f
--- /dev/null
+++ b/db/schema_migrations/20231114231330
@@ -0,0 +1 @@
+0bff5e9182931ab42dd71c0b130172cde5acc7ee37c50e77b3f160507d556ce1 \ No newline at end of file
diff --git a/db/schema_migrations/20231115064007 b/db/schema_migrations/20231115064007
new file mode 100644
index 00000000000..4a4cf7356cf
--- /dev/null
+++ b/db/schema_migrations/20231115064007
@@ -0,0 +1 @@
+3f8ea307440353cc193662c9c552609d09f7a58dd1d6acccb7208803f394329c \ No newline at end of file
diff --git a/db/schema_migrations/20231115081652 b/db/schema_migrations/20231115081652
new file mode 100644
index 00000000000..7674d897a70
--- /dev/null
+++ b/db/schema_migrations/20231115081652
@@ -0,0 +1 @@
+624bef2f1f8ebd81bdc49c0007a72d77bad34db215dfee01101d976000964e28 \ No newline at end of file
diff --git a/db/schema_migrations/20231115101002 b/db/schema_migrations/20231115101002
new file mode 100644
index 00000000000..6f5874c8fa7
--- /dev/null
+++ b/db/schema_migrations/20231115101002
@@ -0,0 +1 @@
+99edc169a5459569b5c42dcb6fade9d590ae579e4ebc652498fcf5ace7219a3b \ No newline at end of file
diff --git a/db/schema_migrations/20231115104943 b/db/schema_migrations/20231115104943
new file mode 100644
index 00000000000..d9023806426
--- /dev/null
+++ b/db/schema_migrations/20231115104943
@@ -0,0 +1 @@
+dc8c51691062b08e02ef0c48a835a7b65a699012ef19c5635da700b0c550a375 \ No newline at end of file
diff --git a/db/schema_migrations/20231115172623 b/db/schema_migrations/20231115172623
new file mode 100644
index 00000000000..f942f6e4d7a
--- /dev/null
+++ b/db/schema_migrations/20231115172623
@@ -0,0 +1 @@
+c73543be16d10357a095f5214dc9a9499b1b82e81741c3131b0822de4c6d67fe \ No newline at end of file
diff --git a/db/schema_migrations/20231116062200 b/db/schema_migrations/20231116062200
new file mode 100644
index 00000000000..2bc4317abc4
--- /dev/null
+++ b/db/schema_migrations/20231116062200
@@ -0,0 +1 @@
+9acade4bdc946d1adc9f68b39ae17a4ca08fbadb48eb59fed414c0ad0bc288fc \ No newline at end of file
diff --git a/db/schema_migrations/20231116062215 b/db/schema_migrations/20231116062215
new file mode 100644
index 00000000000..625d543fefd
--- /dev/null
+++ b/db/schema_migrations/20231116062215
@@ -0,0 +1 @@
+9d2a33c235b81e7e3e552f26c71307a4ef2f42f9698c1e4f7a2f5d3c0377fec0 \ No newline at end of file
diff --git a/db/schema_migrations/20231116065541 b/db/schema_migrations/20231116065541
new file mode 100644
index 00000000000..ef0f8471137
--- /dev/null
+++ b/db/schema_migrations/20231116065541
@@ -0,0 +1 @@
+6d5b44a7961e78b76c10453005e4fab6de12a106d5437a8ccc52312cf02d3d3d \ No newline at end of file
diff --git a/db/schema_migrations/20231116071027 b/db/schema_migrations/20231116071027
new file mode 100644
index 00000000000..8a34c21549a
--- /dev/null
+++ b/db/schema_migrations/20231116071027
@@ -0,0 +1 @@
+7a7b73d20d7048dae1b63651b5874702b474820325ecbcd22dd0af1c8529ba59 \ No newline at end of file
diff --git a/db/schema_migrations/20231116105945 b/db/schema_migrations/20231116105945
new file mode 100644
index 00000000000..cc9e6b5c0c5
--- /dev/null
+++ b/db/schema_migrations/20231116105945
@@ -0,0 +1 @@
+2f8a5cf6bc53a197742f48af01abac08a2d15b3e617df2b9c95a16d31398f63b \ No newline at end of file
diff --git a/db/schema_migrations/20231116115237 b/db/schema_migrations/20231116115237
new file mode 100644
index 00000000000..cfad779dc60
--- /dev/null
+++ b/db/schema_migrations/20231116115237
@@ -0,0 +1 @@
+fce9aa43da310dbbcd7d0175f531ab069548d5cc782104ab8c83f20874cc3644 \ No newline at end of file
diff --git a/db/schema_migrations/20231116115303 b/db/schema_migrations/20231116115303
new file mode 100644
index 00000000000..72afbdebbf8
--- /dev/null
+++ b/db/schema_migrations/20231116115303
@@ -0,0 +1 @@
+d5d599b967346e13f0cbdd909c33669d8a3268efc7744ca5749fab69e60ff606 \ No newline at end of file
diff --git a/db/schema_migrations/20231117031416 b/db/schema_migrations/20231117031416
new file mode 100644
index 00000000000..b466bfad8f9
--- /dev/null
+++ b/db/schema_migrations/20231117031416
@@ -0,0 +1 @@
+f9d770cc47aa6a7ec1ff0e2f70ee7fbc6f1071e159fd8f722959730222dbf6eb \ No newline at end of file
diff --git a/db/schema_migrations/20231117031559 b/db/schema_migrations/20231117031559
new file mode 100644
index 00000000000..e2ccf7144d4
--- /dev/null
+++ b/db/schema_migrations/20231117031559
@@ -0,0 +1 @@
+57c6bd774242b5fd6383bd393dfc90007f5f7fef21f2c83d3252f19cd1518e78 \ No newline at end of file
diff --git a/db/schema_migrations/20231117140201 b/db/schema_migrations/20231117140201
new file mode 100644
index 00000000000..bee5786cbbd
--- /dev/null
+++ b/db/schema_migrations/20231117140201
@@ -0,0 +1 @@
+6f18a91bbcd175e0ff4cdf6768fd2381b126ad91efc9137831979fff33188e06 \ No newline at end of file
diff --git a/db/schema_migrations/20231117211214 b/db/schema_migrations/20231117211214
new file mode 100644
index 00000000000..4a7cea0d621
--- /dev/null
+++ b/db/schema_migrations/20231117211214
@@ -0,0 +1 @@
+97e91312cdf33db897b64f45ec14dc748be91fa6741a05bd119357a3c4d17017 \ No newline at end of file
diff --git a/db/schema_migrations/20231120070345 b/db/schema_migrations/20231120070345
new file mode 100644
index 00000000000..70ba566885a
--- /dev/null
+++ b/db/schema_migrations/20231120070345
@@ -0,0 +1 @@
+7f3abae7002d20e30f9e4a30d580e49c5d72a7728d13ee45a5392fb4396da13b \ No newline at end of file
diff --git a/db/schema_migrations/20231120071202 b/db/schema_migrations/20231120071202
new file mode 100644
index 00000000000..0e665d356c8
--- /dev/null
+++ b/db/schema_migrations/20231120071202
@@ -0,0 +1 @@
+0f5d6648e45d82c4db18a8886ec04f5af73b8d3d7cc92b90119027d5a6fc8f80 \ No newline at end of file
diff --git a/db/schema_migrations/20231120090305 b/db/schema_migrations/20231120090305
new file mode 100644
index 00000000000..aa6c5c13acb
--- /dev/null
+++ b/db/schema_migrations/20231120090305
@@ -0,0 +1 @@
+4e1cbdfdfd8aef13db978cb98ce925c7832567fdef1ca8ceb17038ca2a9c921c \ No newline at end of file
diff --git a/db/schema_migrations/20231120105619 b/db/schema_migrations/20231120105619
new file mode 100644
index 00000000000..c3a61feaad0
--- /dev/null
+++ b/db/schema_migrations/20231120105619
@@ -0,0 +1 @@
+d87d3e52135317dd7d8361060fb440497af4e095d8060180471835c2363461de \ No newline at end of file
diff --git a/db/schema_migrations/20231120142933 b/db/schema_migrations/20231120142933
new file mode 100644
index 00000000000..51275e9298c
--- /dev/null
+++ b/db/schema_migrations/20231120142933
@@ -0,0 +1 @@
+b05062e183719785e3d1313c4f1f59fce8b19c8f86ddb0ba53abcde96cb4ca03 \ No newline at end of file
diff --git a/db/schema_migrations/20231120161159 b/db/schema_migrations/20231120161159
new file mode 100644
index 00000000000..96a59184bde
--- /dev/null
+++ b/db/schema_migrations/20231120161159
@@ -0,0 +1 @@
+c2ac99a5b648b8f369ca84f4270b393d650de1e42834545e736faaf7fc2029b2 \ No newline at end of file
diff --git a/db/schema_migrations/20231121040153 b/db/schema_migrations/20231121040153
new file mode 100644
index 00000000000..f9d6c75513a
--- /dev/null
+++ b/db/schema_migrations/20231121040153
@@ -0,0 +1 @@
+238450b86c566290848e013117b7b41c7691cb35743ccc3d83fbe5e044e6bb58 \ No newline at end of file
diff --git a/db/schema_migrations/20231121040212 b/db/schema_migrations/20231121040212
new file mode 100644
index 00000000000..bb460a80082
--- /dev/null
+++ b/db/schema_migrations/20231121040212
@@ -0,0 +1 @@
+a8c66b26ed962b81903f8a684bfd8f12062fe2d3231cc2199c14ae9c3ace73e6 \ No newline at end of file
diff --git a/db/schema_migrations/20231121092109 b/db/schema_migrations/20231121092109
new file mode 100644
index 00000000000..94d937167f7
--- /dev/null
+++ b/db/schema_migrations/20231121092109
@@ -0,0 +1 @@
+22f8ce9668370446060d834b4a1fc8fe45fb5497a8bd9fc0fa7a0dc674416d2d \ No newline at end of file
diff --git a/db/schema_migrations/20231121092128 b/db/schema_migrations/20231121092128
new file mode 100644
index 00000000000..aabcab23245
--- /dev/null
+++ b/db/schema_migrations/20231121092128
@@ -0,0 +1 @@
+cb2ecf9b5e917a422f2372edf088ee0568cd1ecfd5d39288b5c641cf1594ad11 \ No newline at end of file
diff --git a/db/schema_migrations/20231121133727 b/db/schema_migrations/20231121133727
new file mode 100644
index 00000000000..6ed4bb61818
--- /dev/null
+++ b/db/schema_migrations/20231121133727
@@ -0,0 +1 @@
+5d1cbd8202cea6c7e7db798034efac1ab561fbaa178ed1175b6b453a33792e4b \ No newline at end of file
diff --git a/db/schema_migrations/20231121152706 b/db/schema_migrations/20231121152706
new file mode 100644
index 00000000000..3220737f92f
--- /dev/null
+++ b/db/schema_migrations/20231121152706
@@ -0,0 +1 @@
+1d43403324bf42452371583bfeb5fe9e834cc434653cbddd24f21dca207e9f25 \ No newline at end of file
diff --git a/db/schema_migrations/20231122011731 b/db/schema_migrations/20231122011731
new file mode 100644
index 00000000000..eb76518216d
--- /dev/null
+++ b/db/schema_migrations/20231122011731
@@ -0,0 +1 @@
+48f5f5cbb96891364b5bb7b3349f020fb29c8f3610f93e92a8a8d377ebd78ad5 \ No newline at end of file
diff --git a/db/schema_migrations/20231122072428 b/db/schema_migrations/20231122072428
new file mode 100644
index 00000000000..507842fd15c
--- /dev/null
+++ b/db/schema_migrations/20231122072428
@@ -0,0 +1 @@
+4d4539b21d0f9ea2ade7a1223953f2aea36c4432e5f3b042266e98d71f6a9a48 \ No newline at end of file
diff --git a/db/schema_migrations/20231122084642 b/db/schema_migrations/20231122084642
new file mode 100644
index 00000000000..ac0abb62234
--- /dev/null
+++ b/db/schema_migrations/20231122084642
@@ -0,0 +1 @@
+36492b8e28dea9d2d650981b492a9956e95100edd5db1b3fb25c70f2f974e8c2 \ No newline at end of file
diff --git a/db/schema_migrations/20231122100006 b/db/schema_migrations/20231122100006
new file mode 100644
index 00000000000..5cec39e6f60
--- /dev/null
+++ b/db/schema_migrations/20231122100006
@@ -0,0 +1 @@
+cf9a4cbefa65c11d5066134ff82615453aaf63af3f6f871d532038439ada6d22 \ No newline at end of file
diff --git a/db/schema_migrations/20231122110442 b/db/schema_migrations/20231122110442
new file mode 100644
index 00000000000..8911c52aaf6
--- /dev/null
+++ b/db/schema_migrations/20231122110442
@@ -0,0 +1 @@
+38c31ff7a834397af3e30fc57482502f593818b1df86c11ac65784b20557fbb6 \ No newline at end of file
diff --git a/db/schema_migrations/20231122111935 b/db/schema_migrations/20231122111935
new file mode 100644
index 00000000000..c7032def15b
--- /dev/null
+++ b/db/schema_migrations/20231122111935
@@ -0,0 +1 @@
+e054bf0a60fa2dae5353a4f5efec786f76e457f6d1dc0f38483170a41c45456b \ No newline at end of file
diff --git a/db/schema_migrations/20231122114135 b/db/schema_migrations/20231122114135
new file mode 100644
index 00000000000..d2acff5726e
--- /dev/null
+++ b/db/schema_migrations/20231122114135
@@ -0,0 +1 @@
+ba955cf574974a0f1a5824159e8f00e7a8e85ed89f814fbc8c6e84009204d632 \ No newline at end of file
diff --git a/db/schema_migrations/20231122123408 b/db/schema_migrations/20231122123408
new file mode 100644
index 00000000000..ee7dad25459
--- /dev/null
+++ b/db/schema_migrations/20231122123408
@@ -0,0 +1 @@
+75d01df223e1fa0b20cf2dac10a473e2d5dd96e6f77682adef5ed586b9c98fb0 \ No newline at end of file
diff --git a/db/schema_migrations/20231122124815 b/db/schema_migrations/20231122124815
new file mode 100644
index 00000000000..9e80aa2067b
--- /dev/null
+++ b/db/schema_migrations/20231122124815
@@ -0,0 +1 @@
+ee23092caa9be8dc1f4931f0157897c1219bc4326d7de090026439996ea0cdaf \ No newline at end of file
diff --git a/db/schema_migrations/20231122125550 b/db/schema_migrations/20231122125550
new file mode 100644
index 00000000000..8f8364313f8
--- /dev/null
+++ b/db/schema_migrations/20231122125550
@@ -0,0 +1 @@
+50b84382c713219deda4f271ebffcfb786aa89d137d5693597d98183478da687 \ No newline at end of file
diff --git a/db/schema_migrations/20231122130721 b/db/schema_migrations/20231122130721
new file mode 100644
index 00000000000..6f282dcceea
--- /dev/null
+++ b/db/schema_migrations/20231122130721
@@ -0,0 +1 @@
+7aac0b2b22e877663ed260084891b64eda07ca4c73b23760474c1e5520f54292 \ No newline at end of file
diff --git a/db/schema_migrations/20231123035033 b/db/schema_migrations/20231123035033
new file mode 100644
index 00000000000..e38c7d8d2c3
--- /dev/null
+++ b/db/schema_migrations/20231123035033
@@ -0,0 +1 @@
+a12e860dae13871a03c348f9acd2c653e91e2da454d40a4ae0b98167065be696 \ No newline at end of file
diff --git a/db/schema_migrations/20231123125750 b/db/schema_migrations/20231123125750
new file mode 100644
index 00000000000..9bf2b9a31b2
--- /dev/null
+++ b/db/schema_migrations/20231123125750
@@ -0,0 +1 @@
+94c061ce7da1968cbbbc70677f586b56de5b33825c6a6613a0c54f7bd9ed519e \ No newline at end of file
diff --git a/db/schema_migrations/20231123141633 b/db/schema_migrations/20231123141633
new file mode 100644
index 00000000000..8dac933ab73
--- /dev/null
+++ b/db/schema_migrations/20231123141633
@@ -0,0 +1 @@
+3ac63b35be7a9373f42bf88262d364fd82d00f9ee6f2e1f05ea1aa8e4290e24a \ No newline at end of file
diff --git a/db/schema_migrations/20231123151831 b/db/schema_migrations/20231123151831
new file mode 100644
index 00000000000..09796318982
--- /dev/null
+++ b/db/schema_migrations/20231123151831
@@ -0,0 +1 @@
+a23e42e5539bb7c7a0a1db23fc681b98858e5768ac525ac665bcc5ac7168e7a3 \ No newline at end of file
diff --git a/db/schema_migrations/20231123151956 b/db/schema_migrations/20231123151956
new file mode 100644
index 00000000000..1c2376e1169
--- /dev/null
+++ b/db/schema_migrations/20231123151956
@@ -0,0 +1 @@
+f00f1d60127c2402cf83269ad39c0bea3fcb6974892b79b4c2b1801f12002fb2 \ No newline at end of file
diff --git a/db/schema_migrations/20231123165947 b/db/schema_migrations/20231123165947
new file mode 100644
index 00000000000..d31c7a016cd
--- /dev/null
+++ b/db/schema_migrations/20231123165947
@@ -0,0 +1 @@
+f4482264a2b44574972bf63781b73ec9e2bfc602ef681bfca443927b4b6a6eb1 \ No newline at end of file
diff --git a/db/schema_migrations/20231124084532 b/db/schema_migrations/20231124084532
new file mode 100644
index 00000000000..50674976033
--- /dev/null
+++ b/db/schema_migrations/20231124084532
@@ -0,0 +1 @@
+f1bfb4647b4333c429ae388312a7fdd7f487e238ab6497b005911f7c00620d18 \ No newline at end of file
diff --git a/db/schema_migrations/20231124105726 b/db/schema_migrations/20231124105726
new file mode 100644
index 00000000000..850db11da5a
--- /dev/null
+++ b/db/schema_migrations/20231124105726
@@ -0,0 +1 @@
+3ff6a61da6b815fd593a8ca64e3a1b5855d22e8e42c559f0a12d7240217e5ee2 \ No newline at end of file
diff --git a/db/schema_migrations/20231124112409 b/db/schema_migrations/20231124112409
new file mode 100644
index 00000000000..c0b7e53e062
--- /dev/null
+++ b/db/schema_migrations/20231124112409
@@ -0,0 +1 @@
+a567da73e9ecdf930ad89c68fba02e8b30aba9e8e460a00e0bf272067ca21409 \ No newline at end of file
diff --git a/db/schema_migrations/20231124124600 b/db/schema_migrations/20231124124600
new file mode 100644
index 00000000000..8c4643a600a
--- /dev/null
+++ b/db/schema_migrations/20231124124600
@@ -0,0 +1 @@
+2883bd987e5a4b648adb5b65fd03fd98f96abaeaa5b0917a6e64cc8567e02a5e \ No newline at end of file
diff --git a/db/schema_migrations/20231124124750 b/db/schema_migrations/20231124124750
new file mode 100644
index 00000000000..62403ccd209
--- /dev/null
+++ b/db/schema_migrations/20231124124750
@@ -0,0 +1 @@
+d6c1ea9699f1487d464d51db6ee8949d97eb203b4086338043e02c5934268907 \ No newline at end of file
diff --git a/db/schema_migrations/20231124125007 b/db/schema_migrations/20231124125007
new file mode 100644
index 00000000000..7c79f441f5d
--- /dev/null
+++ b/db/schema_migrations/20231124125007
@@ -0,0 +1 @@
+c800617b375789020ae585b159391a8ce82c151c81b66a6b0944cebff872298d \ No newline at end of file
diff --git a/db/schema_migrations/20231124132953 b/db/schema_migrations/20231124132953
new file mode 100644
index 00000000000..04ef524c81a
--- /dev/null
+++ b/db/schema_migrations/20231124132953
@@ -0,0 +1 @@
+040a3ce9544fb221964fabcb7095ed22763939329547c0bb4d06efb2b6287a46 \ No newline at end of file
diff --git a/db/schema_migrations/20231124133015 b/db/schema_migrations/20231124133015
new file mode 100644
index 00000000000..adea8a37ffc
--- /dev/null
+++ b/db/schema_migrations/20231124133015
@@ -0,0 +1 @@
+452224fbe86d7b5e81431f203121006d275d2a81089f6de9f453cefe099ef506 \ No newline at end of file
diff --git a/db/schema_migrations/20231124134838 b/db/schema_migrations/20231124134838
new file mode 100644
index 00000000000..4830c84df51
--- /dev/null
+++ b/db/schema_migrations/20231124134838
@@ -0,0 +1 @@
+f4fece6815c26da5d6f4254639c1e6b409eb3fae367e34a400650d71df0458e9 \ No newline at end of file
diff --git a/db/schema_migrations/20231124180449 b/db/schema_migrations/20231124180449
new file mode 100644
index 00000000000..db924184fcc
--- /dev/null
+++ b/db/schema_migrations/20231124180449
@@ -0,0 +1 @@
+a5f11669d0bf6938e6fe433ac351622dbaa73045092bbdfaf27a9231dfc850a0 \ No newline at end of file
diff --git a/db/schema_migrations/20231124191759 b/db/schema_migrations/20231124191759
new file mode 100644
index 00000000000..adbafd9b2bd
--- /dev/null
+++ b/db/schema_migrations/20231124191759
@@ -0,0 +1 @@
+32a80f29a5a3511a8dfdea203874aecde5a58eab6665ba127379c9c2e01d254f \ No newline at end of file
diff --git a/db/schema_migrations/20231124213241 b/db/schema_migrations/20231124213241
new file mode 100644
index 00000000000..d2dab8b5c41
--- /dev/null
+++ b/db/schema_migrations/20231124213241
@@ -0,0 +1 @@
+15853bc68a9e5bbf2e45ed646f3630fcfbeed9a8a21b1edbd02f92946b410b88 \ No newline at end of file
diff --git a/db/schema_migrations/20231124282441 b/db/schema_migrations/20231124282441
new file mode 100644
index 00000000000..78c0636635f
--- /dev/null
+++ b/db/schema_migrations/20231124282441
@@ -0,0 +1 @@
+2bdaabfe2fa23ce334af1878b1234618b4717f05a9b68f7f9839f48c7f38f410 \ No newline at end of file
diff --git a/db/schema_migrations/20231126192652 b/db/schema_migrations/20231126192652
new file mode 100644
index 00000000000..f7f3fc5f39e
--- /dev/null
+++ b/db/schema_migrations/20231126192652
@@ -0,0 +1 @@
+ba178548623ac51a403771d95b892506bd3c01337a5650a50df3060afa0c5f93 \ No newline at end of file
diff --git a/db/schema_migrations/20231126200903 b/db/schema_migrations/20231126200903
new file mode 100644
index 00000000000..f268b7ab056
--- /dev/null
+++ b/db/schema_migrations/20231126200903
@@ -0,0 +1 @@
+89c33f31982aa26a63cdbd1fd35d51c984006d6ae66dc3cac8e88f3a8fadf461 \ No newline at end of file
diff --git a/db/schema_migrations/20231126200904 b/db/schema_migrations/20231126200904
new file mode 100644
index 00000000000..d04a675b69f
--- /dev/null
+++ b/db/schema_migrations/20231126200904
@@ -0,0 +1 @@
+9b1a9d983f5feebe9a7a64a653ff300dbb7b5d12520d751d875527755ca15c61 \ No newline at end of file
diff --git a/db/schema_migrations/20231126220000 b/db/schema_migrations/20231126220000
new file mode 100644
index 00000000000..1200f9bddf9
--- /dev/null
+++ b/db/schema_migrations/20231126220000
@@ -0,0 +1 @@
+f841d351a89d3ed9b2fea8d386b528aff5f1a267c214f6f0a150281377522d44 \ No newline at end of file
diff --git a/db/schema_migrations/20231127171903 b/db/schema_migrations/20231127171903
new file mode 100644
index 00000000000..6053f0eee23
--- /dev/null
+++ b/db/schema_migrations/20231127171903
@@ -0,0 +1 @@
+af73341ffb326a6e9d4f6b6aa836f5888182278626f51cc193f5ca906c4ccf4e \ No newline at end of file
diff --git a/db/schema_migrations/20231127174335 b/db/schema_migrations/20231127174335
new file mode 100644
index 00000000000..5a47c758a30
--- /dev/null
+++ b/db/schema_migrations/20231127174335
@@ -0,0 +1 @@
+a12b08baa00906fad3acd0f3c0490d1fc6880eb627f7c2cc025edf481c8f9e0b \ No newline at end of file
diff --git a/db/schema_migrations/20231127185327 b/db/schema_migrations/20231127185327
new file mode 100644
index 00000000000..81464fe8ff7
--- /dev/null
+++ b/db/schema_migrations/20231127185327
@@ -0,0 +1 @@
+2fd167741f25de79d9aa561e0b48f3b1c3c40bce45df762d82841ac0e52109aa \ No newline at end of file
diff --git a/db/schema_migrations/20231127185328 b/db/schema_migrations/20231127185328
new file mode 100644
index 00000000000..fd04b990796
--- /dev/null
+++ b/db/schema_migrations/20231127185328
@@ -0,0 +1 @@
+8bea5995e63f29947b408a871615b3838d586af4baac3eca79aaa39c8334a379 \ No newline at end of file
diff --git a/db/schema_migrations/20231128103624 b/db/schema_migrations/20231128103624
new file mode 100644
index 00000000000..1502eda2f77
--- /dev/null
+++ b/db/schema_migrations/20231128103624
@@ -0,0 +1 @@
+9cfcd48c86956f9f1a0429ab4a2b9f772b7cd6f2e7ac325bb8b1acbbe6ba4ed6 \ No newline at end of file
diff --git a/db/schema_migrations/20231128104044 b/db/schema_migrations/20231128104044
new file mode 100644
index 00000000000..8af740468a6
--- /dev/null
+++ b/db/schema_migrations/20231128104044
@@ -0,0 +1 @@
+856be6ee89a0e0c4042539ffff10aa410dbfb59bff43527482af5817a20e20cc \ No newline at end of file
diff --git a/db/schema_migrations/20231128111550 b/db/schema_migrations/20231128111550
new file mode 100644
index 00000000000..e906f189a3a
--- /dev/null
+++ b/db/schema_migrations/20231128111550
@@ -0,0 +1 @@
+a076623d4d7c2f475f1c712802288ef8bdd0c830798dd27d7397da63065b6639 \ No newline at end of file
diff --git a/db/schema_migrations/20231128155514 b/db/schema_migrations/20231128155514
new file mode 100644
index 00000000000..d60a1bda7d3
--- /dev/null
+++ b/db/schema_migrations/20231128155514
@@ -0,0 +1 @@
+bc075abab9ecb439ef71031a9ec5f38e5aa3c97310b1b221575bb64f042f81c7 \ No newline at end of file
diff --git a/db/schema_migrations/20231128174345 b/db/schema_migrations/20231128174345
new file mode 100644
index 00000000000..5b2f77bf013
--- /dev/null
+++ b/db/schema_migrations/20231128174345
@@ -0,0 +1 @@
+187bf045979bb377e9999a260791075cab983eeda34db7ca3851720d6c5f79f9 \ No newline at end of file
diff --git a/db/schema_migrations/20231128201403 b/db/schema_migrations/20231128201403
new file mode 100644
index 00000000000..c69eee93101
--- /dev/null
+++ b/db/schema_migrations/20231128201403
@@ -0,0 +1 @@
+cfb411996e7ae1fbdb47886ac5c1fd1c264d324ffa54da5edd4d73ff53cd2d28 \ No newline at end of file
diff --git a/db/schema_migrations/20231129105945 b/db/schema_migrations/20231129105945
new file mode 100644
index 00000000000..4b3b0d220bf
--- /dev/null
+++ b/db/schema_migrations/20231129105945
@@ -0,0 +1 @@
+31cf08d6a1cb511a5d36ffa8633e1f2c7d5262fc5743d34f2dd5edcbedff19fa \ No newline at end of file
diff --git a/db/schema_migrations/20231129124754 b/db/schema_migrations/20231129124754
new file mode 100644
index 00000000000..7a95a77c47b
--- /dev/null
+++ b/db/schema_migrations/20231129124754
@@ -0,0 +1 @@
+29c39f7290a075ead472b5b5d41e60160073d5d49f05ae2b281e48a123990dfc \ No newline at end of file
diff --git a/db/schema_migrations/20231129132636 b/db/schema_migrations/20231129132636
new file mode 100644
index 00000000000..91703ace16b
--- /dev/null
+++ b/db/schema_migrations/20231129132636
@@ -0,0 +1 @@
+1bdc6128604324a7bebec587ed935dfd2e91838f36e3ca68fadf695a48b32d24 \ No newline at end of file
diff --git a/db/schema_migrations/20231129154701 b/db/schema_migrations/20231129154701
new file mode 100644
index 00000000000..bd061fe3ec3
--- /dev/null
+++ b/db/schema_migrations/20231129154701
@@ -0,0 +1 @@
+c6f925431403ca302529581263208ac10949ac8cabc05cdc4ec257614f5b5349 \ No newline at end of file
diff --git a/db/schema_migrations/20231129170203 b/db/schema_migrations/20231129170203
new file mode 100644
index 00000000000..fd5388d763d
--- /dev/null
+++ b/db/schema_migrations/20231129170203
@@ -0,0 +1 @@
+b0159c5ee766dff5d814311ec671909bbf14583f34d5a276b3e704940c7e2223 \ No newline at end of file
diff --git a/db/schema_migrations/20231129192345 b/db/schema_migrations/20231129192345
new file mode 100644
index 00000000000..611ad223f05
--- /dev/null
+++ b/db/schema_migrations/20231129192345
@@ -0,0 +1 @@
+4a5bf054f8bea3ec51060cc4cd3a18f12fb40e13edb8a5a8d99f9d25e631dd30 \ No newline at end of file
diff --git a/db/schema_migrations/20231129211524 b/db/schema_migrations/20231129211524
new file mode 100644
index 00000000000..cbc92b47f14
--- /dev/null
+++ b/db/schema_migrations/20231129211524
@@ -0,0 +1 @@
+0ee8b127bcdf66b2fe4639e8397d39052f61c16186b491039ce478f5b477a6a3 \ No newline at end of file
diff --git a/db/schema_migrations/20231129231159 b/db/schema_migrations/20231129231159
new file mode 100644
index 00000000000..a18a725f9f3
--- /dev/null
+++ b/db/schema_migrations/20231129231159
@@ -0,0 +1 @@
+d19b3f17d84675abc76d291814a6cb220d936e56838e71fd01ee01ec218be9ed \ No newline at end of file
diff --git a/db/schema_migrations/20231130131808 b/db/schema_migrations/20231130131808
new file mode 100644
index 00000000000..630f450ce71
--- /dev/null
+++ b/db/schema_migrations/20231130131808
@@ -0,0 +1 @@
+20c7fd677cfa00821b67761f9d406d1bf4cfdf65831c3c96910ccb43986b9926 \ No newline at end of file
diff --git a/db/schema_migrations/20231130140901 b/db/schema_migrations/20231130140901
new file mode 100644
index 00000000000..405d66191a9
--- /dev/null
+++ b/db/schema_migrations/20231130140901
@@ -0,0 +1 @@
+4e9b26432f7c6cfbcd2486a3867665ba50d66ca9bd49f7d70a349f222a136277 \ No newline at end of file
diff --git a/db/schema_migrations/20231130142218 b/db/schema_migrations/20231130142218
new file mode 100644
index 00000000000..589bbbc0130
--- /dev/null
+++ b/db/schema_migrations/20231130142218
@@ -0,0 +1 @@
+2269867e97f1194f376979f964912f386aa5248966601a46e27ebb1b72d9e96a \ No newline at end of file
diff --git a/db/schema_migrations/20231130192752 b/db/schema_migrations/20231130192752
new file mode 100644
index 00000000000..f5bbda5c8a1
--- /dev/null
+++ b/db/schema_migrations/20231130192752
@@ -0,0 +1 @@
+4777e51867476bd6c7b2a259866cf3453ef784f409ace94efd799de959288748 \ No newline at end of file
diff --git a/db/schema_migrations/20231130193042 b/db/schema_migrations/20231130193042
new file mode 100644
index 00000000000..859a457a9af
--- /dev/null
+++ b/db/schema_migrations/20231130193042
@@ -0,0 +1 @@
+618848ebd8a7b2c13ed77da45077e92d2f392d4cafb0a7711494e98dc2a20574 \ No newline at end of file
diff --git a/db/schema_migrations/20231130195635 b/db/schema_migrations/20231130195635
new file mode 100644
index 00000000000..5e8d8232feb
--- /dev/null
+++ b/db/schema_migrations/20231130195635
@@ -0,0 +1 @@
+5c9d89f5d5401d6a7082d5790cb12ee610a0a06138cf3608534a09685c812ea8 \ No newline at end of file
diff --git a/db/schema_migrations/20231130200216 b/db/schema_migrations/20231130200216
new file mode 100644
index 00000000000..cb7d0740994
--- /dev/null
+++ b/db/schema_migrations/20231130200216
@@ -0,0 +1 @@
+4267ce10078606ae7829e5b1afd27e64c7e15603d87dd0c1a52a683ae8fb9e28 \ No newline at end of file
diff --git a/db/schema_migrations/20231201095326 b/db/schema_migrations/20231201095326
new file mode 100644
index 00000000000..dd826218b84
--- /dev/null
+++ b/db/schema_migrations/20231201095326
@@ -0,0 +1 @@
+7078ee3b40cd12e32c0d8f2cc1e55e19b4352dac8d2c708b617a2ff03e979c3a \ No newline at end of file
diff --git a/db/schema_migrations/20231201113901 b/db/schema_migrations/20231201113901
new file mode 100644
index 00000000000..d61de59e27a
--- /dev/null
+++ b/db/schema_migrations/20231201113901
@@ -0,0 +1 @@
+983d22809998f8bd9b6b3f10a6256e48412f4c576374d0cebf71d01ac3f603c8 \ No newline at end of file
diff --git a/db/schema_migrations/20231201114233 b/db/schema_migrations/20231201114233
new file mode 100644
index 00000000000..e36b7e34b27
--- /dev/null
+++ b/db/schema_migrations/20231201114233
@@ -0,0 +1 @@
+dcb5244a9dad862502025f22d05c0bf4ee9d0981de07f8d5242577f9155c5cdf \ No newline at end of file
diff --git a/db/schema_migrations/20231201122830 b/db/schema_migrations/20231201122830
new file mode 100644
index 00000000000..fe135e01cf5
--- /dev/null
+++ b/db/schema_migrations/20231201122830
@@ -0,0 +1 @@
+9505020f8d79fa09c6ec95c94e4296aac359258c787b1c74af6331ea79b68d4c \ No newline at end of file
diff --git a/db/schema_migrations/20231201144826 b/db/schema_migrations/20231201144826
new file mode 100644
index 00000000000..06013f3d159
--- /dev/null
+++ b/db/schema_migrations/20231201144826
@@ -0,0 +1 @@
+0dc3f8d436c42a12d34a20811934fac5184229027ec88ef18ab817bea30d468b \ No newline at end of file
diff --git a/db/schema_migrations/20231201171229 b/db/schema_migrations/20231201171229
new file mode 100644
index 00000000000..b24c5b58517
--- /dev/null
+++ b/db/schema_migrations/20231201171229
@@ -0,0 +1 @@
+32c7ed1c0646d8f993bc2961cafa32dd4ac93bc29b3ee07679dc100f800bda06 \ No newline at end of file
diff --git a/db/schema_migrations/20231201172203 b/db/schema_migrations/20231201172203
new file mode 100644
index 00000000000..dd68a38a1f5
--- /dev/null
+++ b/db/schema_migrations/20231201172203
@@ -0,0 +1 @@
+3c47df5cf99c357193fba19300ff936dc8d2da8b747142b07d25826ee351a5ef \ No newline at end of file
diff --git a/db/schema_migrations/20231201204712 b/db/schema_migrations/20231201204712
new file mode 100644
index 00000000000..c3f29b7eb63
--- /dev/null
+++ b/db/schema_migrations/20231201204712
@@ -0,0 +1 @@
+703de1141226932feebeb5c8a0cd908165a4c89fe56e1889dddd2e7c6c72ef7c \ No newline at end of file
diff --git a/db/schema_migrations/20231202175941 b/db/schema_migrations/20231202175941
new file mode 100644
index 00000000000..2474832a918
--- /dev/null
+++ b/db/schema_migrations/20231202175941
@@ -0,0 +1 @@
+8d752179a1544a0dad7c1df99ed332002b8ebd0191d3ae7434366267e227987f \ No newline at end of file
diff --git a/db/schema_migrations/20231202180101 b/db/schema_migrations/20231202180101
new file mode 100644
index 00000000000..66c6cb84ffd
--- /dev/null
+++ b/db/schema_migrations/20231202180101
@@ -0,0 +1 @@
+432843177f4e67613b94bd24de3ab6903d4295a591545247ca7c264c18720ad6 \ No newline at end of file
diff --git a/db/schema_migrations/20231204090310 b/db/schema_migrations/20231204090310
new file mode 100644
index 00000000000..665a35d90e1
--- /dev/null
+++ b/db/schema_migrations/20231204090310
@@ -0,0 +1 @@
+eae9f28293f6d4de373d6f78c8c1995369ceb91cc922aa63b590c37a289523a1 \ No newline at end of file
diff --git a/db/schema_migrations/20231204090413 b/db/schema_migrations/20231204090413
new file mode 100644
index 00000000000..6f9dd659329
--- /dev/null
+++ b/db/schema_migrations/20231204090413
@@ -0,0 +1 @@
+97d2e9828fd963ca329ba63970ee3c52e733555aa2a42bf444a0bc9243b1b7a1 \ No newline at end of file
diff --git a/db/schema_migrations/20231204144300 b/db/schema_migrations/20231204144300
new file mode 100644
index 00000000000..a69b0278d5a
--- /dev/null
+++ b/db/schema_migrations/20231204144300
@@ -0,0 +1 @@
+385471e69c2099130d0758d2fe6ac27b9211204759de04f3fc0a79b84b5a1633 \ No newline at end of file
diff --git a/db/schema_migrations/20231204154826 b/db/schema_migrations/20231204154826
new file mode 100644
index 00000000000..3324bd3c2ac
--- /dev/null
+++ b/db/schema_migrations/20231204154826
@@ -0,0 +1 @@
+e63949d3e309606d6bfd6c78f33c5c823cb854a4c5af150826879a1749f09d87 \ No newline at end of file
diff --git a/db/schema_migrations/20231204192313 b/db/schema_migrations/20231204192313
new file mode 100644
index 00000000000..9270cef60cc
--- /dev/null
+++ b/db/schema_migrations/20231204192313
@@ -0,0 +1 @@
+4f0b63cc2a5fa133e997d9a04f674f30cf0ce2b12bbcd0ddc0a70ce54b59dd3b \ No newline at end of file
diff --git a/db/schema_migrations/20231205092529 b/db/schema_migrations/20231205092529
new file mode 100644
index 00000000000..adc729e9f7a
--- /dev/null
+++ b/db/schema_migrations/20231205092529
@@ -0,0 +1 @@
+5ca9bd14a7c69b4b77745303c47c7d11890f3ced97c8a1a68b5b713b29a2dab7 \ No newline at end of file
diff --git a/db/schema_migrations/20231205111453 b/db/schema_migrations/20231205111453
new file mode 100644
index 00000000000..af662100d37
--- /dev/null
+++ b/db/schema_migrations/20231205111453
@@ -0,0 +1 @@
+b2ddeca2009bfa06b7672e816f018047b5191492c612713cec8a12c17c6c20b5 \ No newline at end of file
diff --git a/db/schema_migrations/20231205141450 b/db/schema_migrations/20231205141450
new file mode 100644
index 00000000000..fd656fcbef4
--- /dev/null
+++ b/db/schema_migrations/20231205141450
@@ -0,0 +1 @@
+1733dcd68a9470acf30a5724086aab4b957178bdbfc7d83102aeec24ca5daaad \ No newline at end of file
diff --git a/db/schema_migrations/20231205144253 b/db/schema_migrations/20231205144253
new file mode 100644
index 00000000000..76fb5f3dd85
--- /dev/null
+++ b/db/schema_migrations/20231205144253
@@ -0,0 +1 @@
+d447c737dad0b4fc6f2b537e301983397f195a58bf56fd7002cdcb7bec86e589 \ No newline at end of file
diff --git a/db/schema_migrations/20231205144349 b/db/schema_migrations/20231205144349
new file mode 100644
index 00000000000..0f80469504c
--- /dev/null
+++ b/db/schema_migrations/20231205144349
@@ -0,0 +1 @@
+13d80798b47df6524f7e5a7580215bf44d3654edb20b1c78c6acdb7e24e0ccd5 \ No newline at end of file
diff --git a/db/schema_migrations/20231205163658 b/db/schema_migrations/20231205163658
new file mode 100644
index 00000000000..c2ecfa8486b
--- /dev/null
+++ b/db/schema_migrations/20231205163658
@@ -0,0 +1 @@
+94118057fe8e0d4ed9ac6590e3aa48088f26524f02dead72f338ff58c078ef33 \ No newline at end of file
diff --git a/db/schema_migrations/20231205201701 b/db/schema_migrations/20231205201701
new file mode 100644
index 00000000000..5288dfd03f3
--- /dev/null
+++ b/db/schema_migrations/20231205201701
@@ -0,0 +1 @@
+f0f89526db19621991482cc7fce3d95d8762d020d06ecd3bf96c587cca71d015 \ No newline at end of file
diff --git a/db/schema_migrations/20231206115306 b/db/schema_migrations/20231206115306
new file mode 100644
index 00000000000..0681ae30d91
--- /dev/null
+++ b/db/schema_migrations/20231206115306
@@ -0,0 +1 @@
+b3129b32e869fd6420421a13a8ae0cae873dd89cef90bfbced738884069a7445 \ No newline at end of file
diff --git a/db/schema_migrations/20231206142250 b/db/schema_migrations/20231206142250
new file mode 100644
index 00000000000..547e11e29fd
--- /dev/null
+++ b/db/schema_migrations/20231206142250
@@ -0,0 +1 @@
+4d8f16d926fc141a72a9d25f200dfe345f3bb4cff3cd8c71f4b4792df445119c \ No newline at end of file
diff --git a/db/schema_migrations/20231206144919 b/db/schema_migrations/20231206144919
new file mode 100644
index 00000000000..b99c72d6ad1
--- /dev/null
+++ b/db/schema_migrations/20231206144919
@@ -0,0 +1 @@
+c5ccd76e1245234f4e78413d3afde72eb4c0c84ab723dffc6ac83abb619f43a9 \ No newline at end of file
diff --git a/db/schema_migrations/20231206145850 b/db/schema_migrations/20231206145850
new file mode 100644
index 00000000000..6d291813c04
--- /dev/null
+++ b/db/schema_migrations/20231206145850
@@ -0,0 +1 @@
+53442f9c3ef0e0f3f31b4be177faf3d073ee8b74d20ede7a1673bedfa097f0b9 \ No newline at end of file
diff --git a/db/schema_migrations/20231206145911 b/db/schema_migrations/20231206145911
new file mode 100644
index 00000000000..52eccecb3b0
--- /dev/null
+++ b/db/schema_migrations/20231206145911
@@ -0,0 +1 @@
+85f2275f2b6d0dedfdd0b53b1a6e757f059db73ffe07ae7e5a35c70f9a6194f5 \ No newline at end of file
diff --git a/db/schema_migrations/20231206183312 b/db/schema_migrations/20231206183312
new file mode 100644
index 00000000000..639acbcf395
--- /dev/null
+++ b/db/schema_migrations/20231206183312
@@ -0,0 +1 @@
+6b1b75bc747a32ef9b360c4077579e8979eda1f81783c58b213a23803799ae31 \ No newline at end of file
diff --git a/db/schema_migrations/20231206200121 b/db/schema_migrations/20231206200121
new file mode 100644
index 00000000000..4e36923ba99
--- /dev/null
+++ b/db/schema_migrations/20231206200121
@@ -0,0 +1 @@
+f425d63a9d6a474162cb59cf0aea0d0d56cd38e30cb32fde8387ca9e247187c9 \ No newline at end of file
diff --git a/db/schema_migrations/20231207054819 b/db/schema_migrations/20231207054819
new file mode 100644
index 00000000000..976bfb75c8c
--- /dev/null
+++ b/db/schema_migrations/20231207054819
@@ -0,0 +1 @@
+b59e995833c187b21e561f3be24d53e1e6e56cee1f7a5933546b55f8a3a731c8 \ No newline at end of file
diff --git a/db/schema_migrations/20231207112632 b/db/schema_migrations/20231207112632
new file mode 100644
index 00000000000..45768b14d16
--- /dev/null
+++ b/db/schema_migrations/20231207112632
@@ -0,0 +1 @@
+18dbef2587a44467ff58576bb33e816c6749aa939b37af1304c107db08f7a791 \ No newline at end of file
diff --git a/db/schema_migrations/20231207112650 b/db/schema_migrations/20231207112650
new file mode 100644
index 00000000000..82304873f5f
--- /dev/null
+++ b/db/schema_migrations/20231207112650
@@ -0,0 +1 @@
+db725c4effaf75c9775f7399f2436dce2a5b94dda91126ef5dc452433783a234 \ No newline at end of file
diff --git a/db/schema_migrations/20231207115601 b/db/schema_migrations/20231207115601
new file mode 100644
index 00000000000..adb2d13db10
--- /dev/null
+++ b/db/schema_migrations/20231207115601
@@ -0,0 +1 @@
+e2580dcd6d71a1a95410f5722127643cee0b69fbfbaad7c850ad4eb5973f73ba \ No newline at end of file
diff --git a/db/schema_migrations/20231207144215 b/db/schema_migrations/20231207144215
new file mode 100644
index 00000000000..971d4918577
--- /dev/null
+++ b/db/schema_migrations/20231207144215
@@ -0,0 +1 @@
+871cc15f04f235ff2719eb334c28041a0f1093653e5ca2fad5e92b911622d221 \ No newline at end of file
diff --git a/db/schema_migrations/20231207150738 b/db/schema_migrations/20231207150738
new file mode 100644
index 00000000000..500322aa2b9
--- /dev/null
+++ b/db/schema_migrations/20231207150738
@@ -0,0 +1 @@
+7a8759a7a0d49f6d9fb5f455f99bcf3579ab1c9e7695d34828b86ea51255b126 \ No newline at end of file
diff --git a/db/schema_migrations/20231207150739 b/db/schema_migrations/20231207150739
new file mode 100644
index 00000000000..6554b107d29
--- /dev/null
+++ b/db/schema_migrations/20231207150739
@@ -0,0 +1 @@
+fd09d8c41086694dcf6279b259e54c5ee73d4f4ee0b01cc1a03ba1e10c228b80 \ No newline at end of file
diff --git a/db/schema_migrations/20231207163648 b/db/schema_migrations/20231207163648
new file mode 100644
index 00000000000..24a47db3349
--- /dev/null
+++ b/db/schema_migrations/20231207163648
@@ -0,0 +1 @@
+1d8d015245c8e8951f53b5e925cd1f47aa85aec001f738d7456aff4225ead951 \ No newline at end of file
diff --git a/db/schema_migrations/20231207194620 b/db/schema_migrations/20231207194620
new file mode 100644
index 00000000000..48bdcfd9069
--- /dev/null
+++ b/db/schema_migrations/20231207194620
@@ -0,0 +1 @@
+fe43053b1d4a2bdebb2dc6bf3acbf7471feaa33b60f718f980b4ea8810dcca28 \ No newline at end of file
diff --git a/db/schema_migrations/20231207220916 b/db/schema_migrations/20231207220916
new file mode 100644
index 00000000000..4cdc27dd6cf
--- /dev/null
+++ b/db/schema_migrations/20231207220916
@@ -0,0 +1 @@
+0e9fb2131d80df2705c182b218d117880ceab95b428ba1afac8f4bb8ba73859f \ No newline at end of file
diff --git a/db/schema_migrations/20231207220935 b/db/schema_migrations/20231207220935
new file mode 100644
index 00000000000..16e78f79f43
--- /dev/null
+++ b/db/schema_migrations/20231207220935
@@ -0,0 +1 @@
+644dfd3c7371feff5431900510e25fc2dc0c661c7ee9142bd26431c10d929416 \ No newline at end of file
diff --git a/db/schema_migrations/20231207220954 b/db/schema_migrations/20231207220954
new file mode 100644
index 00000000000..fd7052dfc57
--- /dev/null
+++ b/db/schema_migrations/20231207220954
@@ -0,0 +1 @@
+874f2ca39becd976d06259918ad4898a9db95645615e348c315643e35aee2f72 \ No newline at end of file
diff --git a/db/schema_migrations/20231207221013 b/db/schema_migrations/20231207221013
new file mode 100644
index 00000000000..fad9a767d63
--- /dev/null
+++ b/db/schema_migrations/20231207221013
@@ -0,0 +1 @@
+a070e5c7b51853b44fc3402de428cff14c0ad2728dd2f24fef542e86a51da2d3 \ No newline at end of file
diff --git a/db/schema_migrations/20231207221036 b/db/schema_migrations/20231207221036
new file mode 100644
index 00000000000..210bc7a0e93
--- /dev/null
+++ b/db/schema_migrations/20231207221036
@@ -0,0 +1 @@
+5afbc4c287ce349c58ab70e2c8b44c833f075fe114cf2af2a29aaf4247053d82 \ No newline at end of file
diff --git a/db/schema_migrations/20231207221056 b/db/schema_migrations/20231207221056
new file mode 100644
index 00000000000..369ccababfd
--- /dev/null
+++ b/db/schema_migrations/20231207221056
@@ -0,0 +1 @@
+3bdc91047eca270076e85f80b215b7944b29e00ba4a859e73ef03dab15234370 \ No newline at end of file
diff --git a/db/schema_migrations/20231207221119 b/db/schema_migrations/20231207221119
new file mode 100644
index 00000000000..63427e916fe
--- /dev/null
+++ b/db/schema_migrations/20231207221119
@@ -0,0 +1 @@
+0200a967508b4e8c6056f969e24e26bc85f6762b29e9b56a9611e50a151749ca \ No newline at end of file
diff --git a/db/schema_migrations/20231207221140 b/db/schema_migrations/20231207221140
new file mode 100644
index 00000000000..2048d3ef135
--- /dev/null
+++ b/db/schema_migrations/20231207221140
@@ -0,0 +1 @@
+4337e77f6342e8305f1e05d41aec0c0e1b65d9a420c2a16ad3f675715d700f4e \ No newline at end of file
diff --git a/db/schema_migrations/20231207221159 b/db/schema_migrations/20231207221159
new file mode 100644
index 00000000000..a0b072bdd4d
--- /dev/null
+++ b/db/schema_migrations/20231207221159
@@ -0,0 +1 @@
+2a81b952d0db20a477204dbecfeff94af3df0c1b1373eef4b5276f215f6257e9 \ No newline at end of file
diff --git a/db/schema_migrations/20231207221219 b/db/schema_migrations/20231207221219
new file mode 100644
index 00000000000..67c81deb2be
--- /dev/null
+++ b/db/schema_migrations/20231207221219
@@ -0,0 +1 @@
+638b573c9ab658ddae603facd35a0861ac7a1257fcd7b6bf3b24a12fbd10bcaa \ No newline at end of file
diff --git a/db/schema_migrations/20231207221241 b/db/schema_migrations/20231207221241
new file mode 100644
index 00000000000..4f79abaaf73
--- /dev/null
+++ b/db/schema_migrations/20231207221241
@@ -0,0 +1 @@
+821dbe95017a3ed54c3d0b994279587c85560869362da0ad41af130381fac73a \ No newline at end of file
diff --git a/db/schema_migrations/20231207221300 b/db/schema_migrations/20231207221300
new file mode 100644
index 00000000000..32c160c1129
--- /dev/null
+++ b/db/schema_migrations/20231207221300
@@ -0,0 +1 @@
+a84c595c135dfccb69fff6c3c7c6e9b78ef080b9bed05479d8fb4f316171bde3 \ No newline at end of file
diff --git a/db/schema_migrations/20231208103049 b/db/schema_migrations/20231208103049
new file mode 100644
index 00000000000..f478c39466a
--- /dev/null
+++ b/db/schema_migrations/20231208103049
@@ -0,0 +1 @@
+a4c1bb4cdab6a0e9723849ec7dadf9fc8286cbd05c0b160c513fdbf727f6e0b6 \ No newline at end of file
diff --git a/db/schema_migrations/20231211100717 b/db/schema_migrations/20231211100717
new file mode 100644
index 00000000000..876770c9da4
--- /dev/null
+++ b/db/schema_migrations/20231211100717
@@ -0,0 +1 @@
+557e640d30119599a2ca50cbe2b4e36f01b888df5a4679de362ae000ee23072b \ No newline at end of file
diff --git a/db/schema_migrations/20231212132322 b/db/schema_migrations/20231212132322
new file mode 100644
index 00000000000..57e247fd82e
--- /dev/null
+++ b/db/schema_migrations/20231212132322
@@ -0,0 +1 @@
+1b9ba1b05c72cc64e7682a4706e831122e210d5dcbc53b3c48cacc6bbfba813f \ No newline at end of file
diff --git a/db/schema_migrations/20231213112726 b/db/schema_migrations/20231213112726
new file mode 100644
index 00000000000..50da175466e
--- /dev/null
+++ b/db/schema_migrations/20231213112726
@@ -0,0 +1 @@
+4788c59395a1aaa8c9808b67d8acc281bf15ed4785d2da53bd698a6f3ac2a9bc \ No newline at end of file
diff --git a/db/schema_migrations/20231214064934 b/db/schema_migrations/20231214064934
new file mode 100644
index 00000000000..d46a6751bbe
--- /dev/null
+++ b/db/schema_migrations/20231214064934
@@ -0,0 +1 @@
+9118a88e12e9dfbf82175841acb52d09b8a705363b69683f665f771ea747e26f \ No newline at end of file
diff --git a/db/schema_migrations/20231214164411 b/db/schema_migrations/20231214164411
new file mode 100644
index 00000000000..911377591dc
--- /dev/null
+++ b/db/schema_migrations/20231214164411
@@ -0,0 +1 @@
+20234872132f836074dc4dee14cdbcba08fd3a53fff1924feac22c74f81590c1 \ No newline at end of file
diff --git a/db/schema_migrations/20231218062442 b/db/schema_migrations/20231218062442
new file mode 100644
index 00000000000..0db2337f7b2
--- /dev/null
+++ b/db/schema_migrations/20231218062442
@@ -0,0 +1 @@
+90b8a5342c57f8383b20684774ee5f7a551be4e93dcdf6d17bb2c2490fcd5214 \ No newline at end of file
diff --git a/db/schema_migrations/20231218062505 b/db/schema_migrations/20231218062505
new file mode 100644
index 00000000000..c047198bcb3
--- /dev/null
+++ b/db/schema_migrations/20231218062505
@@ -0,0 +1 @@
+814dc93e655e9f4abb2af348b67069f2b747300614e8251346bf252477cf3dbe \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index dd784030356..b429b3ab4f1 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -290,6 +290,18 @@ BEGIN
END
$$;
+CREATE FUNCTION insert_catalog_resource_sync_event() RETURNS trigger
+ LANGUAGE plpgsql
+ AS $$
+BEGIN
+INSERT INTO p_catalog_resource_sync_events (catalog_resource_id, project_id)
+SELECT id, OLD.id FROM catalog_resources
+WHERE project_id = OLD.id;
+RETURN NULL;
+
+END
+$$;
+
CREATE FUNCTION insert_into_loose_foreign_keys_deleted_records() RETURNS trigger
LANGUAGE plpgsql
AS $$
@@ -531,15 +543,6 @@ RETURN NULL;
END
$$;
-CREATE FUNCTION trigger_07bc3c48f407() RETURNS trigger
- LANGUAGE plpgsql
- AS $$
-BEGIN
- NEW."pipeline_id_convert_to_bigint" := NEW."pipeline_id";
- RETURN NEW;
-END;
-$$;
-
CREATE FUNCTION trigger_10ee1357e825() RETURNS trigger
LANGUAGE plpgsql
AS $$
@@ -556,24 +559,6 @@ BEGIN
END;
$$;
-CREATE FUNCTION trigger_1bd97da9c1a4() RETURNS trigger
- LANGUAGE plpgsql
- AS $$
-BEGIN
- NEW."auto_canceled_by_id_convert_to_bigint" := NEW."auto_canceled_by_id";
- RETURN NEW;
-END;
-$$;
-
-CREATE FUNCTION trigger_7f3d66a7d7f5() RETURNS trigger
- LANGUAGE plpgsql
- AS $$
-BEGIN
- NEW."pipeline_id_convert_to_bigint" := NEW."pipeline_id";
- RETURN NEW;
-END;
-$$;
-
CREATE FUNCTION trigger_b2d852e1e2cb() RETURNS trigger
LANGUAGE plpgsql
AS $$
@@ -787,6 +772,84 @@ CREATE TABLE batched_background_migration_job_transition_logs (
)
PARTITION BY RANGE (created_at);
+CREATE TABLE p_ci_builds (
+ status character varying,
+ finished_at timestamp without time zone,
+ created_at timestamp without time zone,
+ updated_at timestamp without time zone,
+ started_at timestamp without time zone,
+ runner_id integer,
+ coverage double precision,
+ commit_id integer,
+ name character varying,
+ options text,
+ allow_failure boolean DEFAULT false NOT NULL,
+ stage character varying,
+ trigger_request_id integer,
+ stage_idx integer,
+ tag boolean,
+ ref character varying,
+ user_id integer,
+ type character varying,
+ target_url character varying,
+ description character varying,
+ project_id integer,
+ erased_by_id integer,
+ erased_at timestamp without time zone,
+ artifacts_expire_at timestamp without time zone,
+ environment character varying,
+ "when" character varying,
+ yaml_variables text,
+ queued_at timestamp without time zone,
+ lock_version integer DEFAULT 0,
+ coverage_regex character varying,
+ auto_canceled_by_id integer,
+ retried boolean,
+ protected boolean,
+ failure_reason integer,
+ scheduled_at timestamp with time zone,
+ token_encrypted character varying,
+ upstream_pipeline_id integer,
+ resource_group_id bigint,
+ waiting_for_resource_at timestamp with time zone,
+ processed boolean,
+ scheduling_type smallint,
+ id bigint NOT NULL,
+ stage_id bigint,
+ partition_id bigint NOT NULL,
+ auto_canceled_by_partition_id bigint DEFAULT 100 NOT NULL,
+ auto_canceled_by_id_convert_to_bigint bigint,
+ commit_id_convert_to_bigint bigint,
+ erased_by_id_convert_to_bigint bigint,
+ project_id_convert_to_bigint bigint,
+ runner_id_convert_to_bigint bigint,
+ trigger_request_id_convert_to_bigint bigint,
+ upstream_pipeline_id_convert_to_bigint bigint,
+ user_id_convert_to_bigint bigint,
+ CONSTRAINT check_1e2fbd1b39 CHECK ((lock_version IS NOT NULL))
+)
+PARTITION BY LIST (partition_id);
+
+CREATE TABLE p_ci_builds_metadata (
+ project_id integer NOT NULL,
+ timeout integer,
+ timeout_source integer DEFAULT 1 NOT NULL,
+ interruptible boolean,
+ config_options jsonb,
+ config_variables jsonb,
+ has_exposed_artifacts boolean,
+ environment_auto_stop_in character varying(255),
+ expanded_environment_name character varying(255),
+ secrets jsonb DEFAULT '{}'::jsonb NOT NULL,
+ build_id bigint NOT NULL,
+ id bigint NOT NULL,
+ runtime_runner_features jsonb DEFAULT '{}'::jsonb NOT NULL,
+ id_tokens jsonb DEFAULT '{}'::jsonb NOT NULL,
+ partition_id bigint NOT NULL,
+ debug_trace_enabled boolean DEFAULT false NOT NULL
+)
+PARTITION BY LIST (partition_id);
+
CREATE TABLE p_ci_job_annotations (
id bigint NOT NULL,
partition_id bigint NOT NULL,
@@ -858,6 +921,17 @@ CREATE TABLE p_batched_git_ref_updates_deletions (
)
PARTITION BY LIST (partition_id);
+CREATE TABLE p_catalog_resource_sync_events (
+ id bigint NOT NULL,
+ catalog_resource_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ partition_id bigint DEFAULT 1 NOT NULL,
+ status smallint DEFAULT 1 NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL
+)
+PARTITION BY LIST (partition_id);
+
CREATE TABLE p_ci_finished_build_ch_sync_events (
build_id bigint NOT NULL,
partition bigint DEFAULT 1 NOT NULL,
@@ -942,7 +1016,8 @@ CREATE TABLE analytics_cycle_analytics_issue_stage_events (
end_event_timestamp timestamp with time zone,
state_id smallint DEFAULT 1 NOT NULL,
weight integer,
- sprint_id bigint
+ sprint_id bigint,
+ duration_in_milliseconds bigint
)
PARTITION BY HASH (stage_event_hash_id);
@@ -957,7 +1032,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even
end_event_timestamp timestamp with time zone,
state_id smallint DEFAULT 1 NOT NULL,
weight integer,
- sprint_id bigint
+ sprint_id bigint,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_01 (
@@ -971,7 +1047,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even
end_event_timestamp timestamp with time zone,
state_id smallint DEFAULT 1 NOT NULL,
weight integer,
- sprint_id bigint
+ sprint_id bigint,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_02 (
@@ -985,7 +1062,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even
end_event_timestamp timestamp with time zone,
state_id smallint DEFAULT 1 NOT NULL,
weight integer,
- sprint_id bigint
+ sprint_id bigint,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_03 (
@@ -999,7 +1077,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even
end_event_timestamp timestamp with time zone,
state_id smallint DEFAULT 1 NOT NULL,
weight integer,
- sprint_id bigint
+ sprint_id bigint,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_04 (
@@ -1013,7 +1092,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even
end_event_timestamp timestamp with time zone,
state_id smallint DEFAULT 1 NOT NULL,
weight integer,
- sprint_id bigint
+ sprint_id bigint,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_05 (
@@ -1027,7 +1107,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even
end_event_timestamp timestamp with time zone,
state_id smallint DEFAULT 1 NOT NULL,
weight integer,
- sprint_id bigint
+ sprint_id bigint,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_06 (
@@ -1041,7 +1122,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even
end_event_timestamp timestamp with time zone,
state_id smallint DEFAULT 1 NOT NULL,
weight integer,
- sprint_id bigint
+ sprint_id bigint,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_07 (
@@ -1055,7 +1137,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even
end_event_timestamp timestamp with time zone,
state_id smallint DEFAULT 1 NOT NULL,
weight integer,
- sprint_id bigint
+ sprint_id bigint,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_08 (
@@ -1069,7 +1152,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even
end_event_timestamp timestamp with time zone,
state_id smallint DEFAULT 1 NOT NULL,
weight integer,
- sprint_id bigint
+ sprint_id bigint,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_09 (
@@ -1083,7 +1167,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even
end_event_timestamp timestamp with time zone,
state_id smallint DEFAULT 1 NOT NULL,
weight integer,
- sprint_id bigint
+ sprint_id bigint,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_10 (
@@ -1097,7 +1182,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even
end_event_timestamp timestamp with time zone,
state_id smallint DEFAULT 1 NOT NULL,
weight integer,
- sprint_id bigint
+ sprint_id bigint,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_11 (
@@ -1111,7 +1197,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even
end_event_timestamp timestamp with time zone,
state_id smallint DEFAULT 1 NOT NULL,
weight integer,
- sprint_id bigint
+ sprint_id bigint,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_12 (
@@ -1125,7 +1212,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even
end_event_timestamp timestamp with time zone,
state_id smallint DEFAULT 1 NOT NULL,
weight integer,
- sprint_id bigint
+ sprint_id bigint,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_13 (
@@ -1139,7 +1227,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even
end_event_timestamp timestamp with time zone,
state_id smallint DEFAULT 1 NOT NULL,
weight integer,
- sprint_id bigint
+ sprint_id bigint,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_14 (
@@ -1153,7 +1242,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even
end_event_timestamp timestamp with time zone,
state_id smallint DEFAULT 1 NOT NULL,
weight integer,
- sprint_id bigint
+ sprint_id bigint,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_15 (
@@ -1167,7 +1257,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even
end_event_timestamp timestamp with time zone,
state_id smallint DEFAULT 1 NOT NULL,
weight integer,
- sprint_id bigint
+ sprint_id bigint,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_16 (
@@ -1181,7 +1272,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even
end_event_timestamp timestamp with time zone,
state_id smallint DEFAULT 1 NOT NULL,
weight integer,
- sprint_id bigint
+ sprint_id bigint,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_17 (
@@ -1195,7 +1287,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even
end_event_timestamp timestamp with time zone,
state_id smallint DEFAULT 1 NOT NULL,
weight integer,
- sprint_id bigint
+ sprint_id bigint,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_18 (
@@ -1209,7 +1302,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even
end_event_timestamp timestamp with time zone,
state_id smallint DEFAULT 1 NOT NULL,
weight integer,
- sprint_id bigint
+ sprint_id bigint,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_19 (
@@ -1223,7 +1317,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even
end_event_timestamp timestamp with time zone,
state_id smallint DEFAULT 1 NOT NULL,
weight integer,
- sprint_id bigint
+ sprint_id bigint,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_20 (
@@ -1237,7 +1332,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even
end_event_timestamp timestamp with time zone,
state_id smallint DEFAULT 1 NOT NULL,
weight integer,
- sprint_id bigint
+ sprint_id bigint,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_21 (
@@ -1251,7 +1347,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even
end_event_timestamp timestamp with time zone,
state_id smallint DEFAULT 1 NOT NULL,
weight integer,
- sprint_id bigint
+ sprint_id bigint,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_22 (
@@ -1265,7 +1362,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even
end_event_timestamp timestamp with time zone,
state_id smallint DEFAULT 1 NOT NULL,
weight integer,
- sprint_id bigint
+ sprint_id bigint,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_23 (
@@ -1279,7 +1377,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even
end_event_timestamp timestamp with time zone,
state_id smallint DEFAULT 1 NOT NULL,
weight integer,
- sprint_id bigint
+ sprint_id bigint,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_24 (
@@ -1293,7 +1392,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even
end_event_timestamp timestamp with time zone,
state_id smallint DEFAULT 1 NOT NULL,
weight integer,
- sprint_id bigint
+ sprint_id bigint,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_25 (
@@ -1307,7 +1407,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even
end_event_timestamp timestamp with time zone,
state_id smallint DEFAULT 1 NOT NULL,
weight integer,
- sprint_id bigint
+ sprint_id bigint,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_26 (
@@ -1321,7 +1422,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even
end_event_timestamp timestamp with time zone,
state_id smallint DEFAULT 1 NOT NULL,
weight integer,
- sprint_id bigint
+ sprint_id bigint,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_27 (
@@ -1335,7 +1437,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even
end_event_timestamp timestamp with time zone,
state_id smallint DEFAULT 1 NOT NULL,
weight integer,
- sprint_id bigint
+ sprint_id bigint,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_28 (
@@ -1349,7 +1452,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even
end_event_timestamp timestamp with time zone,
state_id smallint DEFAULT 1 NOT NULL,
weight integer,
- sprint_id bigint
+ sprint_id bigint,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_29 (
@@ -1363,7 +1467,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even
end_event_timestamp timestamp with time zone,
state_id smallint DEFAULT 1 NOT NULL,
weight integer,
- sprint_id bigint
+ sprint_id bigint,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_30 (
@@ -1377,7 +1482,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even
end_event_timestamp timestamp with time zone,
state_id smallint DEFAULT 1 NOT NULL,
weight integer,
- sprint_id bigint
+ sprint_id bigint,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_31 (
@@ -1391,7 +1497,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even
end_event_timestamp timestamp with time zone,
state_id smallint DEFAULT 1 NOT NULL,
weight integer,
- sprint_id bigint
+ sprint_id bigint,
+ duration_in_milliseconds bigint
);
CREATE TABLE analytics_cycle_analytics_merge_request_stage_events (
@@ -1403,7 +1510,8 @@ CREATE TABLE analytics_cycle_analytics_merge_request_stage_events (
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
end_event_timestamp timestamp with time zone,
- state_id smallint DEFAULT 1 NOT NULL
+ state_id smallint DEFAULT 1 NOT NULL,
+ duration_in_milliseconds bigint
)
PARTITION BY HASH (stage_event_hash_id);
@@ -1416,7 +1524,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
end_event_timestamp timestamp with time zone,
- state_id smallint DEFAULT 1 NOT NULL
+ state_id smallint DEFAULT 1 NOT NULL,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_01 (
@@ -1428,7 +1537,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
end_event_timestamp timestamp with time zone,
- state_id smallint DEFAULT 1 NOT NULL
+ state_id smallint DEFAULT 1 NOT NULL,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_02 (
@@ -1440,7 +1550,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
end_event_timestamp timestamp with time zone,
- state_id smallint DEFAULT 1 NOT NULL
+ state_id smallint DEFAULT 1 NOT NULL,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_03 (
@@ -1452,7 +1563,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
end_event_timestamp timestamp with time zone,
- state_id smallint DEFAULT 1 NOT NULL
+ state_id smallint DEFAULT 1 NOT NULL,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_04 (
@@ -1464,7 +1576,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
end_event_timestamp timestamp with time zone,
- state_id smallint DEFAULT 1 NOT NULL
+ state_id smallint DEFAULT 1 NOT NULL,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_05 (
@@ -1476,7 +1589,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
end_event_timestamp timestamp with time zone,
- state_id smallint DEFAULT 1 NOT NULL
+ state_id smallint DEFAULT 1 NOT NULL,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_06 (
@@ -1488,7 +1602,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
end_event_timestamp timestamp with time zone,
- state_id smallint DEFAULT 1 NOT NULL
+ state_id smallint DEFAULT 1 NOT NULL,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_07 (
@@ -1500,7 +1615,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
end_event_timestamp timestamp with time zone,
- state_id smallint DEFAULT 1 NOT NULL
+ state_id smallint DEFAULT 1 NOT NULL,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_08 (
@@ -1512,7 +1628,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
end_event_timestamp timestamp with time zone,
- state_id smallint DEFAULT 1 NOT NULL
+ state_id smallint DEFAULT 1 NOT NULL,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_09 (
@@ -1524,7 +1641,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
end_event_timestamp timestamp with time zone,
- state_id smallint DEFAULT 1 NOT NULL
+ state_id smallint DEFAULT 1 NOT NULL,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_10 (
@@ -1536,7 +1654,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
end_event_timestamp timestamp with time zone,
- state_id smallint DEFAULT 1 NOT NULL
+ state_id smallint DEFAULT 1 NOT NULL,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_11 (
@@ -1548,7 +1667,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
end_event_timestamp timestamp with time zone,
- state_id smallint DEFAULT 1 NOT NULL
+ state_id smallint DEFAULT 1 NOT NULL,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_12 (
@@ -1560,7 +1680,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
end_event_timestamp timestamp with time zone,
- state_id smallint DEFAULT 1 NOT NULL
+ state_id smallint DEFAULT 1 NOT NULL,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_13 (
@@ -1572,7 +1693,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
end_event_timestamp timestamp with time zone,
- state_id smallint DEFAULT 1 NOT NULL
+ state_id smallint DEFAULT 1 NOT NULL,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_14 (
@@ -1584,7 +1706,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
end_event_timestamp timestamp with time zone,
- state_id smallint DEFAULT 1 NOT NULL
+ state_id smallint DEFAULT 1 NOT NULL,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_15 (
@@ -1596,7 +1719,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
end_event_timestamp timestamp with time zone,
- state_id smallint DEFAULT 1 NOT NULL
+ state_id smallint DEFAULT 1 NOT NULL,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_16 (
@@ -1608,7 +1732,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
end_event_timestamp timestamp with time zone,
- state_id smallint DEFAULT 1 NOT NULL
+ state_id smallint DEFAULT 1 NOT NULL,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_17 (
@@ -1620,7 +1745,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
end_event_timestamp timestamp with time zone,
- state_id smallint DEFAULT 1 NOT NULL
+ state_id smallint DEFAULT 1 NOT NULL,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_18 (
@@ -1632,7 +1758,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
end_event_timestamp timestamp with time zone,
- state_id smallint DEFAULT 1 NOT NULL
+ state_id smallint DEFAULT 1 NOT NULL,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_19 (
@@ -1644,7 +1771,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
end_event_timestamp timestamp with time zone,
- state_id smallint DEFAULT 1 NOT NULL
+ state_id smallint DEFAULT 1 NOT NULL,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_20 (
@@ -1656,7 +1784,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
end_event_timestamp timestamp with time zone,
- state_id smallint DEFAULT 1 NOT NULL
+ state_id smallint DEFAULT 1 NOT NULL,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_21 (
@@ -1668,7 +1797,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
end_event_timestamp timestamp with time zone,
- state_id smallint DEFAULT 1 NOT NULL
+ state_id smallint DEFAULT 1 NOT NULL,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_22 (
@@ -1680,7 +1810,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
end_event_timestamp timestamp with time zone,
- state_id smallint DEFAULT 1 NOT NULL
+ state_id smallint DEFAULT 1 NOT NULL,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_23 (
@@ -1692,7 +1823,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
end_event_timestamp timestamp with time zone,
- state_id smallint DEFAULT 1 NOT NULL
+ state_id smallint DEFAULT 1 NOT NULL,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_24 (
@@ -1704,7 +1836,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
end_event_timestamp timestamp with time zone,
- state_id smallint DEFAULT 1 NOT NULL
+ state_id smallint DEFAULT 1 NOT NULL,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_25 (
@@ -1716,7 +1849,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
end_event_timestamp timestamp with time zone,
- state_id smallint DEFAULT 1 NOT NULL
+ state_id smallint DEFAULT 1 NOT NULL,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_26 (
@@ -1728,7 +1862,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
end_event_timestamp timestamp with time zone,
- state_id smallint DEFAULT 1 NOT NULL
+ state_id smallint DEFAULT 1 NOT NULL,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_27 (
@@ -1740,7 +1875,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
end_event_timestamp timestamp with time zone,
- state_id smallint DEFAULT 1 NOT NULL
+ state_id smallint DEFAULT 1 NOT NULL,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_28 (
@@ -1752,7 +1888,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
end_event_timestamp timestamp with time zone,
- state_id smallint DEFAULT 1 NOT NULL
+ state_id smallint DEFAULT 1 NOT NULL,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_29 (
@@ -1764,7 +1901,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
end_event_timestamp timestamp with time zone,
- state_id smallint DEFAULT 1 NOT NULL
+ state_id smallint DEFAULT 1 NOT NULL,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_30 (
@@ -1776,7 +1914,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
end_event_timestamp timestamp with time zone,
- state_id smallint DEFAULT 1 NOT NULL
+ state_id smallint DEFAULT 1 NOT NULL,
+ duration_in_milliseconds bigint
);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_31 (
@@ -1788,7 +1927,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
end_event_timestamp timestamp with time zone,
- state_id smallint DEFAULT 1 NOT NULL
+ state_id smallint DEFAULT 1 NOT NULL,
+ duration_in_milliseconds bigint
);
CREATE TABLE issue_search_data (
@@ -10987,6 +11127,23 @@ CREATE SEQUENCE abuse_events_id_seq
ALTER SEQUENCE abuse_events_id_seq OWNED BY abuse_events.id;
+CREATE TABLE abuse_report_assignees (
+ id bigint NOT NULL,
+ user_id bigint NOT NULL,
+ abuse_report_id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL
+);
+
+CREATE SEQUENCE abuse_report_assignees_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE abuse_report_assignees_id_seq OWNED BY abuse_report_assignees.id;
+
CREATE TABLE abuse_report_events (
id bigint NOT NULL,
abuse_report_id bigint NOT NULL,
@@ -11730,7 +11887,6 @@ CREATE TABLE application_settings (
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,
custom_project_templates_group_id integer,
usage_stats_set_by_user_id integer,
@@ -11747,8 +11903,6 @@ CREATE TABLE application_settings (
lets_encrypt_notification_email character varying,
lets_encrypt_terms_of_service_accepted 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,
encrypted_lets_encrypt_private_key text,
encrypted_lets_encrypt_private_key_iv text,
required_instance_ci_template character varying,
@@ -11763,13 +11917,11 @@ CREATE TABLE application_settings (
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),
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,
@@ -11810,7 +11962,6 @@ CREATE TABLE application_settings (
encrypted_slack_app_verification_token_iv character varying(255),
force_pages_access_control boolean DEFAULT false NOT NULL,
updating_name_disabled_for_users boolean DEFAULT false NOT NULL,
- instance_administrators_group_id integer,
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,
@@ -12119,9 +12270,20 @@ CREATE TABLE application_settings (
project_jobs_api_rate_limit integer DEFAULT 600 NOT NULL,
math_rendering_limits_enabled boolean DEFAULT true NOT NULL,
service_access_tokens_expiration_enforced boolean DEFAULT true NOT NULL,
+ make_profile_private boolean DEFAULT true NOT NULL,
enable_artifact_external_redirect_warning_page boolean DEFAULT true NOT NULL,
allow_project_creation_for_guest_and_below boolean DEFAULT true NOT NULL,
update_namespace_name_rate_limit smallint DEFAULT 120 NOT NULL,
+ pre_receive_secret_detection_enabled boolean DEFAULT false NOT NULL,
+ can_create_organization boolean DEFAULT true NOT NULL,
+ bulk_import_concurrent_pipeline_batch_limit smallint DEFAULT 25 NOT NULL,
+ web_ide_oauth_application_id integer,
+ instance_level_ai_beta_features_enabled boolean DEFAULT false NOT NULL,
+ security_txt_content text,
+ encrypted_arkose_labs_data_exchange_key bytea,
+ encrypted_arkose_labs_data_exchange_key_iv bytea,
+ toggle_security_policy_custom_ci boolean DEFAULT false NOT NULL,
+ lock_toggle_security_policy_custom_ci boolean DEFAULT false 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)),
@@ -12173,6 +12335,7 @@ CREATE TABLE application_settings (
CONSTRAINT check_app_settings_namespace_storage_forks_cost_factor_range CHECK (((namespace_storage_forks_cost_factor >= (0)::double precision) AND (namespace_storage_forks_cost_factor <= (1)::double precision))),
CONSTRAINT check_app_settings_sentry_clientside_traces_sample_rate_range CHECK (((sentry_clientside_traces_sample_rate >= (0)::double precision) AND (sentry_clientside_traces_sample_rate <= (1)::double precision))),
CONSTRAINT check_b8c74ea5b3 CHECK ((char_length(deactivation_email_additional_text) <= 1000)),
+ CONSTRAINT check_cdfbd99405 CHECK ((char_length(security_txt_content) <= 2048)),
CONSTRAINT check_d03919528d CHECK ((char_length(container_registry_vendor) <= 255)),
CONSTRAINT check_d820146492 CHECK ((char_length(spam_check_endpoint_url) <= 255)),
CONSTRAINT check_e2692d7523 CHECK ((char_length(default_preferred_language) <= 32)),
@@ -12245,6 +12408,7 @@ CREATE TABLE approval_group_rules (
security_orchestration_policy_configuration_id bigint,
scan_result_policy_id bigint,
name text NOT NULL,
+ applies_to_all_protected_branches boolean DEFAULT false NOT NULL,
CONSTRAINT check_25d42add43 CHECK ((char_length(name) <= 255))
);
@@ -12626,6 +12790,31 @@ CREATE SEQUENCE audit_events_id_seq
ALTER SEQUENCE audit_events_id_seq OWNED BY audit_events.id;
+CREATE TABLE audit_events_instance_amazon_s3_configurations (
+ id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ access_key_xid text NOT NULL,
+ name text NOT NULL,
+ bucket_name text NOT NULL,
+ aws_region text NOT NULL,
+ encrypted_secret_access_key bytea NOT NULL,
+ encrypted_secret_access_key_iv bytea NOT NULL,
+ CONSTRAINT check_1a908bd36f CHECK ((char_length(name) <= 72)),
+ CONSTRAINT check_8083750c42 CHECK ((char_length(bucket_name) <= 63)),
+ CONSTRAINT check_d2ca3eb90e CHECK ((char_length(aws_region) <= 50)),
+ CONSTRAINT check_d6d6bd8e8b CHECK ((char_length(access_key_xid) <= 128))
+);
+
+CREATE SEQUENCE audit_events_instance_amazon_s3_configurations_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE audit_events_instance_amazon_s3_configurations_id_seq OWNED BY audit_events_instance_amazon_s3_configurations.id;
+
CREATE TABLE audit_events_instance_external_audit_event_destinations (
id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
@@ -12728,6 +12917,23 @@ CREATE SEQUENCE audit_events_streaming_http_group_namespace_filters_id_seq
ALTER SEQUENCE audit_events_streaming_http_group_namespace_filters_id_seq OWNED BY audit_events_streaming_http_group_namespace_filters.id;
+CREATE TABLE audit_events_streaming_http_instance_namespace_filters (
+ id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ audit_events_instance_external_audit_event_destination_id bigint NOT NULL,
+ namespace_id bigint NOT NULL
+);
+
+CREATE SEQUENCE audit_events_streaming_http_instance_namespace_filters_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE audit_events_streaming_http_instance_namespace_filters_id_seq OWNED BY audit_events_streaming_http_instance_namespace_filters.id;
+
CREATE TABLE audit_events_streaming_instance_event_type_filters (
id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
@@ -13461,7 +13667,8 @@ CREATE TABLE catalog_resource_versions (
release_id bigint NOT NULL,
catalog_resource_id bigint NOT NULL,
project_id bigint NOT NULL,
- created_at timestamp with time zone NOT NULL
+ created_at timestamp with time zone NOT NULL,
+ released_at timestamp with time zone DEFAULT '1970-01-01 00:00:00+00'::timestamp with time zone NOT NULL
);
CREATE SEQUENCE catalog_resource_versions_id_seq
@@ -13481,7 +13688,8 @@ CREATE TABLE catalog_resources (
latest_released_at timestamp with time zone,
name character varying,
description text,
- visibility_level integer DEFAULT 0 NOT NULL
+ visibility_level integer DEFAULT 0 NOT NULL,
+ search_vector tsvector GENERATED ALWAYS AS ((setweight(to_tsvector('english'::regconfig, (COALESCE(name, ''::character varying))::text), 'A'::"char") || setweight(to_tsvector('english'::regconfig, COALESCE(description, ''::text)), 'B'::"char"))) STORED
);
CREATE SEQUENCE catalog_resources_id_seq
@@ -13609,64 +13817,6 @@ CREATE TABLE ci_build_trace_metadata (
partition_id bigint NOT NULL
);
-CREATE TABLE p_ci_builds (
- status character varying,
- finished_at timestamp without time zone,
- created_at timestamp without time zone,
- updated_at timestamp without time zone,
- started_at timestamp without time zone,
- runner_id integer,
- coverage double precision,
- commit_id integer,
- name character varying,
- options text,
- allow_failure boolean DEFAULT false NOT NULL,
- stage character varying,
- trigger_request_id integer,
- stage_idx integer,
- tag boolean,
- ref character varying,
- user_id integer,
- type character varying,
- target_url character varying,
- description character varying,
- project_id integer,
- erased_by_id integer,
- erased_at timestamp without time zone,
- artifacts_expire_at timestamp without time zone,
- environment character varying,
- "when" character varying,
- yaml_variables text,
- queued_at timestamp without time zone,
- lock_version integer DEFAULT 0,
- coverage_regex character varying,
- auto_canceled_by_id integer,
- retried boolean,
- protected boolean,
- failure_reason integer,
- scheduled_at timestamp with time zone,
- token_encrypted character varying,
- upstream_pipeline_id integer,
- resource_group_id bigint,
- waiting_for_resource_at timestamp with time zone,
- processed boolean,
- scheduling_type smallint,
- id bigint NOT NULL,
- stage_id bigint,
- partition_id bigint NOT NULL,
- auto_canceled_by_partition_id bigint DEFAULT 100 NOT NULL,
- auto_canceled_by_id_convert_to_bigint bigint,
- commit_id_convert_to_bigint bigint,
- erased_by_id_convert_to_bigint bigint,
- project_id_convert_to_bigint bigint,
- runner_id_convert_to_bigint bigint,
- trigger_request_id_convert_to_bigint bigint,
- upstream_pipeline_id_convert_to_bigint bigint,
- user_id_convert_to_bigint bigint,
- CONSTRAINT check_1e2fbd1b39 CHECK ((lock_version IS NOT NULL))
-)
-PARTITION BY LIST (partition_id);
-
CREATE TABLE ci_builds (
status character varying,
finished_at timestamp without time zone,
@@ -13733,26 +13883,6 @@ CREATE SEQUENCE ci_builds_id_seq
ALTER SEQUENCE ci_builds_id_seq OWNED BY p_ci_builds.id;
-CREATE TABLE p_ci_builds_metadata (
- project_id integer NOT NULL,
- timeout integer,
- timeout_source integer DEFAULT 1 NOT NULL,
- interruptible boolean,
- config_options jsonb,
- config_variables jsonb,
- has_exposed_artifacts boolean,
- environment_auto_stop_in character varying(255),
- expanded_environment_name character varying(255),
- secrets jsonb DEFAULT '{}'::jsonb NOT NULL,
- build_id bigint NOT NULL,
- id bigint NOT NULL,
- runtime_runner_features jsonb DEFAULT '{}'::jsonb NOT NULL,
- id_tokens jsonb DEFAULT '{}'::jsonb NOT NULL,
- partition_id bigint NOT NULL,
- debug_trace_enabled boolean DEFAULT false NOT NULL
-)
-PARTITION BY LIST (partition_id);
-
CREATE SEQUENCE ci_builds_metadata_id_seq
START WITH 1
INCREMENT BY 1
@@ -13949,6 +14079,7 @@ CREATE TABLE ci_job_artifact_states (
verification_retry_count smallint,
verification_checksum bytea,
verification_failure text,
+ partition_id bigint NOT NULL,
CONSTRAINT check_df832b66ea CHECK ((char_length(verification_failure) <= 255))
);
@@ -14186,7 +14317,8 @@ CREATE TABLE ci_pipeline_metadata (
project_id bigint NOT NULL,
pipeline_id bigint NOT NULL,
name text,
- CONSTRAINT check_25d23931f1 CHECK ((name IS NOT NULL)),
+ auto_cancel_on_new_commit smallint DEFAULT 0 NOT NULL,
+ auto_cancel_on_job_failure smallint DEFAULT 0 NOT NULL,
CONSTRAINT check_9d3665463c CHECK ((char_length(name) <= 255))
);
@@ -14242,7 +14374,6 @@ CREATE TABLE ci_pipeline_variables (
encrypted_value text,
encrypted_value_salt character varying,
encrypted_value_iv character varying,
- pipeline_id_convert_to_bigint integer DEFAULT 0 NOT NULL,
variable_type smallint DEFAULT 1 NOT NULL,
partition_id bigint NOT NULL,
raw boolean DEFAULT false NOT NULL,
@@ -14276,7 +14407,6 @@ CREATE TABLE ci_pipelines (
duration integer,
user_id integer,
lock_version integer DEFAULT 0,
- auto_canceled_by_id_convert_to_bigint integer,
pipeline_schedule_id integer,
source integer,
config_source integer,
@@ -14628,7 +14758,6 @@ ALTER SEQUENCE ci_sources_projects_id_seq OWNED BY ci_sources_projects.id;
CREATE TABLE ci_stages (
project_id integer,
- pipeline_id_convert_to_bigint integer,
created_at timestamp without time zone,
updated_at timestamp without time zone,
name character varying,
@@ -15097,8 +15226,9 @@ CREATE TABLE container_registry_protection_rules (
updated_at timestamp with time zone NOT NULL,
delete_protected_up_to_access_level smallint NOT NULL,
push_protected_up_to_access_level smallint NOT NULL,
- container_path_pattern text NOT NULL,
- CONSTRAINT check_96811ef9dc CHECK ((char_length(container_path_pattern) <= 255))
+ repository_path_pattern text,
+ CONSTRAINT check_3658b31291 CHECK ((repository_path_pattern IS NOT NULL)),
+ CONSTRAINT check_d53a270af5 CHECK ((char_length(repository_path_pattern) <= 255))
);
CREATE SEQUENCE container_registry_protection_rules_id_seq
@@ -15871,7 +16001,6 @@ CREATE TABLE deployments (
on_stop character varying,
status smallint NOT NULL,
finished_at timestamp with time zone,
- cluster_id integer,
deployable_id bigint,
archived boolean DEFAULT false NOT NULL
);
@@ -16239,6 +16368,7 @@ CREATE TABLE elastic_reindexing_tasks (
max_slices_running smallint DEFAULT 60 NOT NULL,
slice_multiplier smallint DEFAULT 2 NOT NULL,
targets text[],
+ options jsonb DEFAULT '{}'::jsonb NOT NULL,
CONSTRAINT check_7f64acda8e CHECK ((char_length(error_message) <= 255))
);
@@ -17302,6 +17432,8 @@ CREATE TABLE group_repository_storage_moves (
state smallint DEFAULT 1 NOT NULL,
source_storage_name text NOT NULL,
destination_storage_name text NOT NULL,
+ error_message text,
+ CONSTRAINT check_266d0cf596 CHECK ((char_length(error_message) <= 256)),
CONSTRAINT group_repository_storage_moves_destination_storage_name CHECK ((char_length(destination_storage_name) <= 255)),
CONSTRAINT group_repository_storage_moves_source_storage_name CHECK ((char_length(source_storage_name) <= 255))
);
@@ -17464,7 +17596,9 @@ CREATE TABLE in_product_marketing_emails (
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,
+ CONSTRAINT check_c9bb978e4b CHECK ((track IS NOT NULL)),
+ CONSTRAINT check_ee6c42a107 CHECK ((series IS NOT NULL))
);
CREATE SEQUENCE in_product_marketing_emails_id_seq
@@ -18512,7 +18646,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,
@@ -18656,7 +18790,8 @@ CREATE TABLE merge_request_context_commit_diff_files (
old_path text NOT NULL,
diff text,
"binary" boolean,
- merge_request_context_commit_id bigint NOT NULL
+ merge_request_context_commit_id bigint NOT NULL,
+ generated boolean
);
CREATE TABLE merge_request_context_commits (
@@ -18790,6 +18925,7 @@ CREATE TABLE merge_request_diffs (
sorted boolean DEFAULT false NOT NULL,
diff_type smallint DEFAULT 1 NOT NULL,
patch_id_sha bytea,
+ project_id bigint,
CONSTRAINT check_93ee616ac9 CHECK ((external_diff_store IS NOT NULL))
);
@@ -19406,6 +19542,7 @@ CREATE TABLE namespace_package_settings (
lock_npm_package_requests_forwarding boolean DEFAULT false NOT NULL,
nuget_duplicates_allowed boolean DEFAULT true NOT NULL,
nuget_duplicate_exception_regex text DEFAULT ''::text NOT NULL,
+ nuget_symbol_server_enabled boolean DEFAULT false NOT NULL,
CONSTRAINT check_31340211b1 CHECK ((char_length(generic_duplicate_exception_regex) <= 255)),
CONSTRAINT check_d63274b2b6 CHECK ((char_length(maven_duplicate_exception_regex) <= 255)),
CONSTRAINT check_eedcf85c48 CHECK ((char_length(nuget_duplicate_exception_regex) <= 255))
@@ -19471,6 +19608,10 @@ CREATE TABLE namespace_settings (
default_branch_protection_defaults jsonb DEFAULT '{}'::jsonb NOT NULL,
service_access_tokens_expiration_enforced boolean DEFAULT true NOT NULL,
product_analytics_enabled boolean DEFAULT false NOT NULL,
+ allow_merge_without_pipeline boolean DEFAULT false NOT NULL,
+ enforce_ssh_certificates boolean DEFAULT false NOT NULL,
+ toggle_security_policy_custom_ci boolean,
+ lock_toggle_security_policy_custom_ci boolean DEFAULT false NOT NULL,
CONSTRAINT check_0ba93c78c7 CHECK ((char_length(default_branch_name) <= 255)),
CONSTRAINT namespace_settings_unique_project_download_limit_alertlist_size CHECK ((cardinality(unique_project_download_limit_alertlist) <= 100)),
CONSTRAINT namespace_settings_unique_project_download_limit_allowlist_size CHECK ((cardinality(unique_project_download_limit_allowlist) <= 100))
@@ -19644,7 +19785,8 @@ CREATE TABLE notification_settings (
new_release boolean,
moved_project boolean DEFAULT true NOT NULL,
change_reviewer_merge_request boolean,
- merge_when_pipeline_succeeds boolean DEFAULT false NOT NULL
+ merge_when_pipeline_succeeds boolean DEFAULT false NOT NULL,
+ approver boolean DEFAULT false NOT NULL
);
CREATE SEQUENCE notification_settings_id_seq
@@ -19770,7 +19912,9 @@ CREATE TABLE onboarding_progresses (
secure_coverage_fuzzing_run_at timestamp with time zone,
secure_cluster_image_scanning_run_at timestamp with time zone,
secure_api_fuzzing_run_at timestamp with time zone,
- license_scanning_run_at timestamp with time zone
+ license_scanning_run_at timestamp with time zone,
+ promote_ultimate_features_at timestamp with time zone,
+ code_added_at timestamp with time zone
);
CREATE SEQUENCE onboarding_progresses_id_seq
@@ -19918,6 +20062,18 @@ CREATE SEQUENCE operations_user_lists_id_seq
ALTER SEQUENCE operations_user_lists_id_seq OWNED BY operations_user_lists.id;
+CREATE TABLE organization_details (
+ organization_id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ cached_markdown_version integer,
+ description text,
+ description_html text,
+ avatar text,
+ CONSTRAINT check_71dfb7807f CHECK ((char_length(description) <= 1024)),
+ CONSTRAINT check_9fbd483b51 CHECK ((char_length(avatar) <= 255))
+);
+
CREATE TABLE organization_settings (
organization_id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
@@ -19970,6 +20126,15 @@ CREATE SEQUENCE p_batched_git_ref_updates_deletions_id_seq
ALTER SEQUENCE p_batched_git_ref_updates_deletions_id_seq OWNED BY p_batched_git_ref_updates_deletions.id;
+CREATE SEQUENCE p_catalog_resource_sync_events_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE p_catalog_resource_sync_events_id_seq OWNED BY p_catalog_resource_sync_events.id;
+
CREATE SEQUENCE p_ci_job_annotations_id_seq
START WITH 1
INCREMENT BY 1
@@ -20469,6 +20634,7 @@ CREATE TABLE packages_nuget_symbols (
signature text NOT NULL,
object_storage_key text NOT NULL,
file_sha256 bytea,
+ status smallint DEFAULT 0 NOT NULL,
CONSTRAINT check_0e93ca58b7 CHECK ((char_length(file) <= 255)),
CONSTRAINT check_28b82b08fa CHECK ((char_length(object_storage_key) <= 255)),
CONSTRAINT check_30b0ef2ca2 CHECK ((char_length(file_path) <= 255)),
@@ -20696,7 +20862,8 @@ CREATE TABLE packages_tags (
name character varying(255) NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
- project_id bigint
+ project_id bigint,
+ CONSTRAINT check_91b8472153 CHECK ((project_id IS NOT NULL))
);
CREATE SEQUENCE packages_tags_id_seq
@@ -20950,7 +21117,8 @@ CREATE TABLE plan_limits (
ci_job_annotations_size integer DEFAULT 81920 NOT NULL,
ci_job_annotations_num integer DEFAULT 20 NOT NULL,
file_size_limit_mb double precision DEFAULT 100.0 NOT NULL,
- audit_events_amazon_s3_configurations integer DEFAULT 5 NOT NULL
+ audit_events_amazon_s3_configurations integer DEFAULT 5 NOT NULL,
+ ci_max_artifact_size_repository_xray bigint DEFAULT 1073741824 NOT NULL
);
CREATE SEQUENCE plan_limits_id_seq
@@ -21477,6 +21645,16 @@ CREATE SEQUENCE postgres_reindex_queued_actions_id_seq
ALTER SEQUENCE postgres_reindex_queued_actions_id_seq OWNED BY postgres_reindex_queued_actions.id;
+CREATE VIEW postgres_sequences AS
+ SELECT seq_pg_class.relname AS seq_name,
+ dep_pg_class.relname AS table_name,
+ pg_attribute.attname AS col_name
+ FROM (((pg_class seq_pg_class
+ JOIN pg_depend ON ((seq_pg_class.oid = pg_depend.objid)))
+ JOIN pg_class dep_pg_class ON ((pg_depend.refobjid = dep_pg_class.oid)))
+ JOIN pg_attribute ON (((dep_pg_class.oid = pg_attribute.attrelid) AND (pg_depend.refobjsubid = pg_attribute.attnum))))
+ WHERE (seq_pg_class.relkind = 'S'::"char");
+
CREATE TABLE programming_languages (
id integer NOT NULL,
name character varying NOT NULL,
@@ -21780,7 +21958,8 @@ CREATE TABLE project_features (
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,
- model_experiments_access_level integer DEFAULT 20 NOT NULL
+ model_experiments_access_level integer DEFAULT 20 NOT NULL,
+ model_registry_access_level integer DEFAULT 20 NOT NULL
);
CREATE SEQUENCE project_features_id_seq
@@ -21936,7 +22115,8 @@ CREATE TABLE project_repositories (
id bigint NOT NULL,
shard_id integer NOT NULL,
disk_path character varying NOT NULL,
- project_id integer NOT NULL
+ project_id integer NOT NULL,
+ object_format smallint DEFAULT 0 NOT NULL
);
CREATE SEQUENCE project_repositories_id_seq
@@ -21982,6 +22162,8 @@ CREATE TABLE project_repository_storage_moves (
state smallint DEFAULT 1 NOT NULL,
source_storage_name text NOT NULL,
destination_storage_name text NOT NULL,
+ error_message text,
+ CONSTRAINT check_85854380db CHECK ((char_length(error_message) <= 256)),
CONSTRAINT project_repository_storage_moves_destination_storage_name CHECK ((char_length(destination_storage_name) <= 255)),
CONSTRAINT project_repository_storage_moves_source_storage_name CHECK ((char_length(source_storage_name) <= 255))
);
@@ -22055,6 +22237,8 @@ CREATE TABLE project_settings (
encrypted_product_analytics_configurator_connection_string bytea,
encrypted_product_analytics_configurator_connection_string_iv bytea,
pages_multiple_versions_enabled boolean DEFAULT false NOT NULL,
+ allow_merge_without_pipeline boolean DEFAULT false NOT NULL,
+ code_suggestions boolean DEFAULT true NOT NULL,
CONSTRAINT check_1a30456322 CHECK ((char_length(pages_unique_domain) <= 63)),
CONSTRAINT check_3a03e7557a CHECK ((char_length(previous_default_branch) <= 4096)),
CONSTRAINT check_3ca5cbffe6 CHECK ((char_length(issue_branch_template) <= 255)),
@@ -22592,6 +22776,10 @@ CREATE TABLE remote_development_agent_configs (
network_policy_enabled boolean DEFAULT true NOT NULL,
gitlab_workspaces_proxy_namespace text DEFAULT 'gitlab-workspaces'::text NOT NULL,
network_policy_egress jsonb DEFAULT '[{"allow": "0.0.0.0/0", "except": ["10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"]}]'::jsonb NOT NULL,
+ default_resources_per_workspace_container jsonb DEFAULT '{}'::jsonb NOT NULL,
+ max_resources_per_workspace jsonb DEFAULT '{}'::jsonb NOT NULL,
+ workspaces_quota bigint DEFAULT '-1'::integer NOT NULL,
+ workspaces_per_user_quota bigint DEFAULT '-1'::integer NOT NULL,
CONSTRAINT check_72947a4495 CHECK ((char_length(gitlab_workspaces_proxy_namespace) <= 63)),
CONSTRAINT check_9f5cd54d1c CHECK ((char_length(dns_zone) <= 256))
);
@@ -22873,6 +23061,7 @@ CREATE TABLE saml_group_links (
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
saml_group_name text NOT NULL,
+ member_role_id bigint,
CONSTRAINT check_1b3fc49d1e CHECK ((char_length(saml_group_name) <= 255))
);
@@ -22895,7 +23084,8 @@ CREATE TABLE saml_providers (
enforced_group_managed_accounts boolean DEFAULT false NOT NULL,
prohibited_outer_forks boolean DEFAULT true NOT NULL,
default_membership_role smallint DEFAULT 10 NOT NULL,
- git_check_enforced boolean DEFAULT false NOT NULL
+ git_check_enforced boolean DEFAULT false NOT NULL,
+ member_role_id bigint
);
CREATE SEQUENCE saml_providers_id_seq
@@ -22933,6 +23123,8 @@ CREATE TABLE sbom_component_versions (
updated_at timestamp with time zone NOT NULL,
component_id bigint NOT NULL,
version text NOT NULL,
+ source_package_name text,
+ CONSTRAINT check_39636b9a8a CHECK ((char_length(source_package_name) <= 255)),
CONSTRAINT check_e71cad08d3 CHECK ((char_length(version) <= 255))
);
@@ -22982,6 +23174,8 @@ CREATE TABLE sbom_occurrences (
input_file_path text,
licenses jsonb DEFAULT '[]'::jsonb,
vulnerabilities jsonb DEFAULT '[]'::jsonb,
+ highest_severity smallint,
+ vulnerability_count integer DEFAULT 0 NOT NULL,
CONSTRAINT check_3f2d2c7ffc CHECK ((char_length(package_manager) <= 255)),
CONSTRAINT check_9b29021fa8 CHECK ((char_length(component_name) <= 255)),
CONSTRAINT check_bd1367d4c1 CHECK ((char_length(input_file_path) <= 255))
@@ -22996,6 +23190,23 @@ CREATE SEQUENCE sbom_occurrences_id_seq
ALTER SEQUENCE sbom_occurrences_id_seq OWNED BY sbom_occurrences.id;
+CREATE TABLE sbom_occurrences_vulnerabilities (
+ id bigint NOT NULL,
+ sbom_occurrence_id bigint NOT NULL,
+ vulnerability_id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL
+);
+
+CREATE SEQUENCE sbom_occurrences_vulnerabilities_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE sbom_occurrences_vulnerabilities_id_seq OWNED BY sbom_occurrences_vulnerabilities.id;
+
CREATE TABLE sbom_sources (
id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
@@ -23162,7 +23373,6 @@ CREATE TABLE security_orchestration_policy_configurations (
updated_at timestamp with time zone NOT NULL,
configured_at timestamp with time zone,
namespace_id bigint,
- bot_user_id integer,
CONSTRAINT cop_configs_project_or_namespace_existence CHECK (((project_id IS NULL) <> (namespace_id IS NULL)))
);
@@ -23325,7 +23535,6 @@ CREATE TABLE service_access_tokens (
id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
- category smallint DEFAULT 0 NOT NULL,
encrypted_token bytea NOT NULL,
encrypted_token_iv bytea NOT NULL,
expires_at timestamp with time zone NOT NULL
@@ -23374,16 +23583,10 @@ CREATE TABLE service_desk_settings (
file_template_project_id bigint,
custom_email_enabled boolean DEFAULT false NOT NULL,
custom_email text,
- custom_email_smtp_address text,
- custom_email_smtp_port integer,
- custom_email_smtp_username text,
- encrypted_custom_email_smtp_password bytea,
- encrypted_custom_email_smtp_password_iv bytea,
service_desk_enabled boolean DEFAULT true NOT NULL,
add_external_participants_from_cc boolean DEFAULT false NOT NULL,
- CONSTRAINT check_57a79552e1 CHECK ((char_length(custom_email) <= 255)),
- CONSTRAINT check_b283637a9e CHECK ((char_length(custom_email_smtp_address) <= 255)),
- CONSTRAINT check_e3535d46ee CHECK ((char_length(custom_email_smtp_username) <= 255))
+ reopen_issue_on_external_participant_note boolean DEFAULT false NOT NULL,
+ CONSTRAINT check_57a79552e1 CHECK ((char_length(custom_email) <= 255))
);
CREATE TABLE shards (
@@ -23493,6 +23696,8 @@ CREATE TABLE snippet_repository_storage_moves (
state smallint DEFAULT 1 NOT NULL,
source_storage_name text NOT NULL,
destination_storage_name text NOT NULL,
+ error_message text,
+ CONSTRAINT check_a42ab83060 CHECK ((char_length(error_message) <= 256)),
CONSTRAINT snippet_repository_storage_moves_destination_storage_name CHECK ((char_length(destination_storage_name) <= 255)),
CONSTRAINT snippet_repository_storage_moves_source_storage_name CHECK ((char_length(source_storage_name) <= 255))
);
@@ -24492,7 +24697,6 @@ CREATE TABLE user_preferences (
diffs_deletion_color text,
diffs_addition_color text,
markdown_automatic_lists boolean DEFAULT true NOT NULL,
- use_legacy_web_ide boolean DEFAULT false NOT NULL,
use_new_navigation boolean,
achievements_enabled boolean DEFAULT true NOT NULL,
pinned_nav_items jsonb DEFAULT '{}'::jsonb NOT NULL,
@@ -24503,6 +24707,8 @@ CREATE TABLE user_preferences (
enabled_zoekt boolean DEFAULT true NOT NULL,
keyboard_shortcuts_enabled boolean DEFAULT true NOT NULL,
time_display_format smallint DEFAULT 0 NOT NULL,
+ home_organization_id bigint,
+ use_web_ide_extension_marketplace boolean DEFAULT false NOT NULL,
CONSTRAINT check_89bf269f41 CHECK ((char_length(diffs_deletion_color) <= 7)),
CONSTRAINT check_d07ccd35f7 CHECK ((char_length(diffs_addition_color) <= 7))
);
@@ -25067,6 +25273,7 @@ CREATE TABLE vulnerability_reads (
dismissal_reason smallint,
has_merge_request boolean DEFAULT false,
has_remediations boolean DEFAULT false NOT NULL,
+ owasp_top_10 smallint,
CONSTRAINT check_380451bdbe CHECK ((char_length(location_image) <= 2048)),
CONSTRAINT check_a105eb825a CHECK ((char_length(cluster_agent_id) <= 10))
);
@@ -25325,6 +25532,21 @@ CREATE SEQUENCE wiki_repository_states_id_seq
ALTER SEQUENCE wiki_repository_states_id_seq OWNED BY wiki_repository_states.id;
+CREATE TABLE work_item_dates_sources (
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ issue_id bigint NOT NULL,
+ namespace_id bigint NOT NULL,
+ start_date_is_fixed boolean DEFAULT false NOT NULL,
+ due_date_is_fixed boolean DEFAULT false NOT NULL,
+ start_date date,
+ due_date date,
+ start_date_sourcing_work_item_id bigint,
+ start_date_sourcing_milestone_id bigint,
+ due_date_sourcing_work_item_id bigint,
+ due_date_sourcing_milestone_id bigint
+);
+
CREATE TABLE work_item_hierarchy_restrictions (
id bigint NOT NULL,
parent_type_id bigint NOT NULL,
@@ -25472,22 +25694,28 @@ CREATE TABLE workspaces (
devfile_path text NOT NULL,
devfile text,
processed_devfile text,
- url text NOT NULL,
+ url text,
deployment_resource_version text,
personal_access_token_id bigint,
config_version integer DEFAULT 1 NOT NULL,
force_include_all_resources boolean DEFAULT true NOT NULL,
+ url_prefix text,
+ url_domain text,
+ url_query_string text,
+ CONSTRAINT check_03c5d442fd CHECK ((char_length(url_domain) <= 256)),
CONSTRAINT check_15543fb0fa CHECK ((char_length(name) <= 64)),
CONSTRAINT check_157d5f955c CHECK ((char_length(namespace) <= 64)),
CONSTRAINT check_2b401b0034 CHECK ((char_length(deployment_resource_version) <= 64)),
CONSTRAINT check_77d1a2ff50 CHECK ((char_length(processed_devfile) <= 65535)),
+ CONSTRAINT check_8a0ab61b6b CHECK ((char_length(url_query_string) <= 256)),
CONSTRAINT check_8e363ee3ad CHECK ((char_length(devfile_ref) <= 256)),
CONSTRAINT check_8e4db5ffc2 CHECK ((char_length(actual_state) <= 32)),
CONSTRAINT check_9e42558c35 CHECK ((char_length(url) <= 1024)),
CONSTRAINT check_b70eddcbc1 CHECK ((char_length(desired_state) <= 32)),
CONSTRAINT check_d7ed376e49 CHECK ((char_length(editor) <= 256)),
CONSTRAINT check_dc58d56169 CHECK ((char_length(devfile_path) <= 2048)),
- CONSTRAINT check_eb32879a3d CHECK ((char_length(devfile) <= 65535))
+ CONSTRAINT check_eb32879a3d CHECK ((char_length(devfile) <= 65535)),
+ CONSTRAINT check_ffa8cad434 CHECK ((char_length(url_prefix) <= 256))
);
CREATE SEQUENCE workspaces_id_seq
@@ -25558,6 +25786,26 @@ CREATE SEQUENCE x509_issuers_id_seq
ALTER SEQUENCE x509_issuers_id_seq OWNED BY x509_issuers.id;
+CREATE TABLE xray_reports (
+ 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,
+ lang text NOT NULL,
+ payload jsonb NOT NULL,
+ file_checksum bytea NOT NULL,
+ CONSTRAINT check_6da5a3b473 CHECK ((char_length(lang) <= 255))
+);
+
+CREATE SEQUENCE xray_reports_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE xray_reports_id_seq OWNED BY xray_reports.id;
+
CREATE TABLE zentao_tracker_data (
id bigint NOT NULL,
integration_id bigint NOT NULL,
@@ -26058,6 +26306,8 @@ ALTER TABLE ONLY p_ci_builds_metadata ATTACH PARTITION ci_builds_metadata FOR VA
ALTER TABLE ONLY abuse_events ALTER COLUMN id SET DEFAULT nextval('abuse_events_id_seq'::regclass);
+ALTER TABLE ONLY abuse_report_assignees ALTER COLUMN id SET DEFAULT nextval('abuse_report_assignees_id_seq'::regclass);
+
ALTER TABLE ONLY abuse_report_events ALTER COLUMN id SET DEFAULT nextval('abuse_report_events_id_seq'::regclass);
ALTER TABLE ONLY abuse_report_user_mentions ALTER COLUMN id SET DEFAULT nextval('abuse_report_user_mentions_id_seq'::regclass);
@@ -26152,6 +26402,8 @@ ALTER TABLE ONLY audit_events_external_audit_event_destinations ALTER COLUMN id
ALTER TABLE ONLY audit_events_google_cloud_logging_configurations ALTER COLUMN id SET DEFAULT nextval('audit_events_google_cloud_logging_configurations_id_seq'::regclass);
+ALTER TABLE ONLY audit_events_instance_amazon_s3_configurations ALTER COLUMN id SET DEFAULT nextval('audit_events_instance_amazon_s3_configurations_id_seq'::regclass);
+
ALTER TABLE ONLY audit_events_instance_external_audit_event_destinations ALTER COLUMN id SET DEFAULT nextval('audit_events_instance_external_audit_event_destinations_id_seq'::regclass);
ALTER TABLE ONLY audit_events_instance_google_cloud_logging_configurations ALTER COLUMN id SET DEFAULT nextval('audit_events_instance_google_cloud_logging_configuration_id_seq'::regclass);
@@ -26162,6 +26414,8 @@ ALTER TABLE ONLY audit_events_streaming_headers ALTER COLUMN id SET DEFAULT next
ALTER TABLE ONLY audit_events_streaming_http_group_namespace_filters ALTER COLUMN id SET DEFAULT nextval('audit_events_streaming_http_group_namespace_filters_id_seq'::regclass);
+ALTER TABLE ONLY audit_events_streaming_http_instance_namespace_filters ALTER COLUMN id SET DEFAULT nextval('audit_events_streaming_http_instance_namespace_filters_id_seq'::regclass);
+
ALTER TABLE ONLY audit_events_streaming_instance_event_type_filters ALTER COLUMN id SET DEFAULT nextval('audit_events_streaming_instance_event_type_filters_id_seq'::regclass);
ALTER TABLE ONLY authentication_events ALTER COLUMN id SET DEFAULT nextval('authentication_events_id_seq'::regclass);
@@ -26778,6 +27032,8 @@ ALTER TABLE ONLY organizations ALTER COLUMN id SET DEFAULT nextval('organization
ALTER TABLE ONLY p_batched_git_ref_updates_deletions ALTER COLUMN id SET DEFAULT nextval('p_batched_git_ref_updates_deletions_id_seq'::regclass);
+ALTER TABLE ONLY p_catalog_resource_sync_events ALTER COLUMN id SET DEFAULT nextval('p_catalog_resource_sync_events_id_seq'::regclass);
+
ALTER TABLE ONLY p_ci_builds_metadata ALTER COLUMN id SET DEFAULT nextval('ci_builds_metadata_id_seq'::regclass);
ALTER TABLE ONLY p_ci_job_annotations ALTER COLUMN id SET DEFAULT nextval('p_ci_job_annotations_id_seq'::regclass);
@@ -27012,6 +27268,8 @@ ALTER TABLE ONLY sbom_components ALTER COLUMN id SET DEFAULT nextval('sbom_compo
ALTER TABLE ONLY sbom_occurrences ALTER COLUMN id SET DEFAULT nextval('sbom_occurrences_id_seq'::regclass);
+ALTER TABLE ONLY sbom_occurrences_vulnerabilities ALTER COLUMN id SET DEFAULT nextval('sbom_occurrences_vulnerabilities_id_seq'::regclass);
+
ALTER TABLE ONLY sbom_sources ALTER COLUMN id SET DEFAULT nextval('sbom_sources_id_seq'::regclass);
ALTER TABLE ONLY scan_result_policies ALTER COLUMN id SET DEFAULT nextval('scan_result_policies_id_seq'::regclass);
@@ -27238,6 +27496,8 @@ ALTER TABLE ONLY x509_commit_signatures ALTER COLUMN id SET DEFAULT nextval('x50
ALTER TABLE ONLY x509_issuers ALTER COLUMN id SET DEFAULT nextval('x509_issuers_id_seq'::regclass);
+ALTER TABLE ONLY xray_reports ALTER COLUMN id SET DEFAULT nextval('xray_reports_id_seq'::regclass);
+
ALTER TABLE ONLY zentao_tracker_data ALTER COLUMN id SET DEFAULT nextval('zentao_tracker_data_id_seq'::regclass);
ALTER TABLE ONLY zoekt_indexed_namespaces ALTER COLUMN id SET DEFAULT nextval('zoekt_indexed_namespaces_id_seq'::regclass);
@@ -27839,6 +28099,9 @@ ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_
ALTER TABLE ONLY abuse_events
ADD CONSTRAINT abuse_events_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY abuse_report_assignees
+ ADD CONSTRAINT abuse_report_assignees_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY abuse_report_events
ADD CONSTRAINT abuse_report_events_pkey PRIMARY KEY (id);
@@ -27992,6 +28255,9 @@ ALTER TABLE ONLY audit_events_external_audit_event_destinations
ALTER TABLE ONLY audit_events_google_cloud_logging_configurations
ADD CONSTRAINT audit_events_google_cloud_logging_configurations_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY audit_events_instance_amazon_s3_configurations
+ ADD CONSTRAINT audit_events_instance_amazon_s3_configurations_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY audit_events_instance_external_audit_event_destinations
ADD CONSTRAINT audit_events_instance_external_audit_event_destinations_pkey PRIMARY KEY (id);
@@ -28010,6 +28276,9 @@ ALTER TABLE ONLY audit_events_streaming_headers
ALTER TABLE ONLY audit_events_streaming_http_group_namespace_filters
ADD CONSTRAINT audit_events_streaming_http_group_namespace_filters_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY audit_events_streaming_http_instance_namespace_filters
+ ADD CONSTRAINT audit_events_streaming_http_instance_namespace_filters_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY audit_events_streaming_instance_event_type_filters
ADD CONSTRAINT audit_events_streaming_instance_event_type_filters_pkey PRIMARY KEY (id);
@@ -28127,15 +28396,15 @@ ALTER TABLE ONLY chat_names
ALTER TABLE ONLY chat_teams
ADD CONSTRAINT chat_teams_pkey PRIMARY KEY (id);
+ALTER TABLE merge_request_diffs
+ ADD CONSTRAINT check_11c5f029ad CHECK ((project_id IS NOT NULL)) NOT VALID;
+
ALTER TABLE workspaces
ADD CONSTRAINT check_2a89035b04 CHECK ((personal_access_token_id IS NOT NULL)) NOT VALID;
ALTER TABLE vulnerability_scanners
ADD CONSTRAINT check_37608c9db5 CHECK ((char_length(vendor) <= 255)) NOT VALID;
-ALTER TABLE packages_tags
- ADD CONSTRAINT check_91b8472153 CHECK ((project_id IS NOT NULL)) NOT VALID;
-
ALTER TABLE sprints
ADD CONSTRAINT check_ccd8a1eae0 CHECK ((start_date IS NOT NULL)) NOT VALID;
@@ -28251,7 +28520,7 @@ ALTER TABLE ONLY ci_pipeline_schedules
ADD CONSTRAINT ci_pipeline_schedules_pkey PRIMARY KEY (id);
ALTER TABLE ONLY ci_pipeline_variables
- ADD CONSTRAINT ci_pipeline_variables_pkey PRIMARY KEY (id);
+ ADD CONSTRAINT ci_pipeline_variables_pkey PRIMARY KEY (id, partition_id);
ALTER TABLE ONLY ci_pipelines_config
ADD CONSTRAINT ci_pipelines_config_pkey PRIMARY KEY (pipeline_id);
@@ -29114,6 +29383,9 @@ ALTER TABLE ONLY operations_strategies_user_lists
ALTER TABLE ONLY operations_user_lists
ADD CONSTRAINT operations_user_lists_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY organization_details
+ ADD CONSTRAINT organization_details_pkey PRIMARY KEY (organization_id);
+
ALTER TABLE ONLY organization_settings
ADD CONSTRAINT organization_settings_pkey PRIMARY KEY (organization_id);
@@ -29126,6 +29398,9 @@ ALTER TABLE ONLY organizations
ALTER TABLE ONLY p_batched_git_ref_updates_deletions
ADD CONSTRAINT p_batched_git_ref_updates_deletions_pkey PRIMARY KEY (id, partition_id);
+ALTER TABLE ONLY p_catalog_resource_sync_events
+ ADD CONSTRAINT p_catalog_resource_sync_events_pkey PRIMARY KEY (id, partition_id);
+
ALTER TABLE ONLY p_ci_finished_build_ch_sync_events
ADD CONSTRAINT p_ci_finished_build_ch_sync_events_pkey PRIMARY KEY (build_id, partition);
@@ -29540,6 +29815,9 @@ ALTER TABLE ONLY sbom_components
ALTER TABLE ONLY sbom_occurrences
ADD CONSTRAINT sbom_occurrences_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY sbom_occurrences_vulnerabilities
+ ADD CONSTRAINT sbom_occurrences_vulnerabilities_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY sbom_sources
ADD CONSTRAINT sbom_sources_pkey PRIMARY KEY (id);
@@ -29894,6 +30172,9 @@ ALTER TABLE ONLY wiki_page_slugs
ALTER TABLE ONLY wiki_repository_states
ADD CONSTRAINT wiki_repository_states_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY work_item_dates_sources
+ ADD CONSTRAINT work_item_dates_sources_pkey PRIMARY KEY (issue_id);
+
ALTER TABLE ONLY work_item_hierarchy_restrictions
ADD CONSTRAINT work_item_hierarchy_restrictions_pkey PRIMARY KEY (id);
@@ -29927,6 +30208,9 @@ ALTER TABLE ONLY x509_commit_signatures
ALTER TABLE ONLY x509_issuers
ADD CONSTRAINT x509_issuers_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY xray_reports
+ ADD CONSTRAINT xray_reports_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY zentao_tracker_data
ADD CONSTRAINT zentao_tracker_data_pkey PRIMARY KEY (id);
@@ -31200,7 +31484,7 @@ CREATE INDEX i_compliance_violations_on_project_id_severity_and_id ON merge_requ
CREATE INDEX i_compliance_violations_on_project_id_title_and_id ON merge_requests_compliance_violations USING btree (target_project_id, title, id);
-CREATE UNIQUE INDEX i_container_protection_unique_project_id_container_path_pattern ON container_registry_protection_rules USING btree (project_id, container_path_pattern);
+CREATE UNIQUE INDEX i_container_protection_unique_project_repository_path_pattern ON container_registry_protection_rules USING btree (project_id, repository_path_pattern);
CREATE INDEX i_custom_email_verifications_on_triggered_at_and_state_started ON service_desk_custom_email_verifications USING btree (triggered_at) WHERE (state = 0);
@@ -31222,6 +31506,8 @@ CREATE UNIQUE INDEX i_pm_package_versions_on_package_id_and_version ON pm_packag
CREATE UNIQUE INDEX i_pm_packages_purl_type_and_name ON pm_packages USING btree (purl_type, name);
+CREATE UNIQUE INDEX i_sbom_occurrences_vulnerabilities_on_occ_id_and_vuln_id ON sbom_occurrences_vulnerabilities USING btree (sbom_occurrence_id, vulnerability_id);
+
CREATE INDEX idx_abuse_reports_user_id_status_and_category ON abuse_reports USING btree (user_id, status, category);
CREATE INDEX idx_addon_purchases_on_last_refreshed_at_desc_nulls_last ON subscription_add_on_purchases USING btree (last_assigned_users_refreshed_at DESC NULLS LAST);
@@ -31246,6 +31532,8 @@ CREATE INDEX idx_award_emoji_on_user_emoji_name_awardable_type_awardable_id ON a
CREATE INDEX idx_build_artifacts_size_refreshes_state_updated_at ON project_build_artifacts_size_refreshes USING btree (state, updated_at);
+CREATE UNIQUE INDEX idx_ci_job_artifacts_on_job_id_file_type_and_partition_id_uniq ON ci_job_artifacts USING btree (job_id, file_type, partition_id);
+
CREATE INDEX idx_ci_pipelines_artifacts_locked ON ci_pipelines USING btree (ci_ref_id, id) WHERE (locked = 1);
CREATE INDEX idx_compliance_security_policies_on_policy_configuration_id ON compliance_framework_security_policies USING btree (policy_configuration_id);
@@ -31258,6 +31546,8 @@ CREATE INDEX idx_container_repos_on_exp_cleanup_status_project_id_start_date ON
CREATE INDEX idx_deletions_on_project_id_and_id_where_pending ON ONLY p_batched_git_ref_updates_deletions USING btree (project_id, id) WHERE (status = 1);
+CREATE INDEX idx_dep_proxy_pkgs_settings_enabled_maven_on_project_id ON dependency_proxy_packages_settings USING btree (project_id) WHERE ((enabled = true) AND (maven_external_registry_url IS NOT NULL));
+
CREATE INDEX idx_deployment_clusters_on_cluster_id_and_kubernetes_namespace ON deployment_clusters USING btree (cluster_id, kubernetes_namespace);
CREATE INDEX idx_devops_adoption_segments_namespace_end_time ON analytics_devops_adoption_snapshots USING btree (namespace_id, end_time);
@@ -31302,8 +31592,6 @@ CREATE INDEX idx_issues_on_project_work_item_type_closed_at_where_closed ON issu
CREATE INDEX idx_issues_on_state_id ON issues USING btree (state_id);
-CREATE INDEX idx_jira_connect_subscriptions_on_installation_id ON jira_connect_subscriptions USING btree (jira_connect_installation_id);
-
CREATE UNIQUE INDEX idx_jira_connect_subscriptions_on_installation_id_namespace_id ON jira_connect_subscriptions USING btree (jira_connect_installation_id, namespace_id);
CREATE INDEX idx_keys_expires_at_and_before_expiry_notification_undelivered ON keys USING btree (date(timezone('UTC'::text, expires_at)), before_expiry_notification_delivered_at) WHERE (before_expiry_notification_delivered_at IS NULL);
@@ -31470,6 +31758,10 @@ CREATE INDEX index_abuse_events_on_category_and_source ON abuse_events USING btr
CREATE INDEX index_abuse_events_on_user_id ON abuse_events USING btree (user_id);
+CREATE INDEX index_abuse_report_assignees_on_abuse_report_id ON abuse_report_assignees USING btree (abuse_report_id);
+
+CREATE UNIQUE INDEX index_abuse_report_assignees_on_user_id_and_abuse_report_id ON abuse_report_assignees USING btree (user_id, abuse_report_id);
+
CREATE INDEX index_abuse_report_events_on_abuse_report_id ON abuse_report_events USING btree (abuse_report_id);
CREATE INDEX index_abuse_report_events_on_user_id ON abuse_report_events USING btree (user_id);
@@ -31574,13 +31866,11 @@ CREATE INDEX index_application_settings_on_custom_project_templates_group_id ON
CREATE INDEX index_application_settings_on_file_template_project_id ON application_settings USING btree (file_template_project_id);
-CREATE INDEX index_application_settings_on_instance_administrators_group_id ON application_settings USING btree (instance_administrators_group_id);
-
CREATE UNIQUE INDEX index_application_settings_on_push_rule_id ON application_settings USING btree (push_rule_id);
CREATE INDEX index_application_settings_on_usage_stats_set_by_user_id ON application_settings USING btree (usage_stats_set_by_user_id);
-CREATE INDEX index_applicationsettings_on_instance_administration_project_id ON application_settings USING btree (instance_administration_project_id);
+CREATE INDEX index_application_settings_web_ide_oauth_application_id ON application_settings USING btree (web_ide_oauth_application_id);
CREATE INDEX index_approval_group_rules_groups_on_group_id ON approval_group_rules_groups USING btree (group_id);
@@ -31650,6 +31940,8 @@ CREATE UNIQUE INDEX index_atlassian_identities_on_extern_uid ON atlassian_identi
CREATE UNIQUE INDEX index_audit_events_external_audit_on_verification_token ON audit_events_external_audit_event_destinations USING btree (verification_token);
+CREATE INDEX index_audit_events_instance_namespace_filters_on_namespace_id ON audit_events_streaming_http_instance_namespace_filters USING btree (namespace_id);
+
CREATE INDEX index_audit_events_on_entity_id_and_entity_type_and_created_at ON ONLY audit_events USING btree (entity_id, entity_type, created_at, id);
CREATE INDEX index_authentication_events_on_provider ON authentication_events USING btree (provider);
@@ -31676,6 +31968,8 @@ CREATE INDEX index_badges_on_group_id ON badges USING btree (group_id);
CREATE INDEX index_badges_on_project_id ON badges USING btree (project_id);
+CREATE INDEX index_batch_trackers_on_tracker_id_status ON bulk_import_batch_trackers USING btree (tracker_id, status);
+
CREATE INDEX index_batched_background_migrations_on_status ON batched_background_migrations USING btree (status);
CREATE UNIQUE INDEX index_batched_background_migrations_on_unique_configuration ON batched_background_migrations USING btree (job_class_name, table_name, column_name, job_arguments);
@@ -31762,10 +32056,12 @@ CREATE INDEX index_boards_on_project_id ON boards USING btree (project_id);
CREATE INDEX index_broadcast_message_on_ends_at_and_broadcast_type_and_id ON broadcast_messages USING btree (ends_at, broadcast_type, id);
-CREATE INDEX index_bulk_import_batch_trackers_on_tracker_id ON bulk_import_batch_trackers USING btree (tracker_id);
+CREATE INDEX index_bulk_import_batch_trackers_on_tracker_id_and_updated_at ON bulk_import_batch_trackers USING btree (tracker_id, updated_at);
CREATE INDEX index_bulk_import_configurations_on_bulk_import_id ON bulk_import_configurations USING btree (bulk_import_id);
+CREATE INDEX index_bulk_import_entities_for_stale_status ON bulk_import_entities USING btree (updated_at, id) WHERE (status = ANY (ARRAY[0, 1]));
+
CREATE INDEX index_bulk_import_entities_on_bulk_import_id_and_status ON bulk_import_entities USING btree (bulk_import_id, status);
CREATE INDEX index_bulk_import_entities_on_namespace_id ON bulk_import_entities USING btree (namespace_id);
@@ -31774,14 +32070,14 @@ CREATE INDEX index_bulk_import_entities_on_parent_id ON bulk_import_entities USI
CREATE INDEX index_bulk_import_entities_on_project_id ON bulk_import_entities USING btree (project_id);
-CREATE INDEX index_bulk_import_export_batches_on_export_id ON bulk_import_export_batches USING btree (export_id);
-
CREATE INDEX index_bulk_import_export_uploads_on_export_id ON bulk_import_export_uploads USING btree (export_id);
CREATE INDEX index_bulk_import_failures_on_bulk_import_entity_id ON bulk_import_failures USING btree (bulk_import_entity_id);
CREATE INDEX index_bulk_import_failures_on_correlation_id_value ON bulk_import_failures USING btree (correlation_id_value);
+CREATE INDEX index_bulk_imports_on_updated_at_and_id_for_stale_status ON bulk_imports USING btree (updated_at, id) WHERE (status = ANY (ARRAY[0, 1]));
+
CREATE INDEX index_bulk_imports_on_user_id ON bulk_imports USING btree (user_id);
CREATE INDEX index_catalog_resource_components_on_catalog_resource_id ON catalog_resource_components USING btree (catalog_resource_id);
@@ -31790,15 +32086,11 @@ CREATE INDEX index_catalog_resource_components_on_project_id ON catalog_resource
CREATE INDEX index_catalog_resource_components_on_version_id ON catalog_resource_components USING btree (version_id);
-CREATE INDEX index_catalog_resource_versions_on_catalog_resource_id ON catalog_resource_versions USING btree (catalog_resource_id);
-
CREATE INDEX index_catalog_resource_versions_on_project_id ON catalog_resource_versions USING btree (project_id);
CREATE UNIQUE INDEX index_catalog_resource_versions_on_release_id ON catalog_resource_versions USING btree (release_id);
-CREATE INDEX index_catalog_resources_on_description_trigram ON catalog_resources USING gin (description gin_trgm_ops);
-
-CREATE INDEX index_catalog_resources_on_name_trigram ON catalog_resources USING gin (name gin_trgm_ops);
+CREATE INDEX index_catalog_resource_versions_on_resource_id_and_released_at ON catalog_resource_versions USING btree (catalog_resource_id, released_at);
CREATE UNIQUE INDEX index_catalog_resources_on_project_id ON catalog_resources USING btree (project_id);
@@ -31958,12 +32250,12 @@ CREATE INDEX index_ci_job_artifacts_on_file_store ON ci_job_artifacts USING btre
CREATE INDEX index_ci_job_artifacts_on_file_type_for_devops_adoption ON ci_job_artifacts USING btree (file_type, project_id, created_at) WHERE (file_type = ANY (ARRAY[5, 6, 8, 23]));
+CREATE UNIQUE INDEX index_ci_job_artifacts_on_id_partition_id_unique ON ci_job_artifacts USING btree (id, partition_id);
+
CREATE INDEX index_ci_job_artifacts_on_id_project_id_and_created_at ON ci_job_artifacts USING btree (project_id, created_at, id);
CREATE INDEX index_ci_job_artifacts_on_id_project_id_and_file_type ON ci_job_artifacts USING btree (project_id, file_type, id);
-CREATE UNIQUE INDEX index_ci_job_artifacts_on_job_id_and_file_type ON ci_job_artifacts USING btree (job_id, file_type);
-
CREATE INDEX index_ci_job_artifacts_on_partition_id_job_id ON ci_job_artifacts USING btree (partition_id, job_id);
CREATE INDEX index_ci_job_artifacts_on_project_id ON ci_job_artifacts USING btree (project_id);
@@ -32038,18 +32330,12 @@ CREATE INDEX index_ci_pipeline_schedules_on_owner_id_and_id_and_active ON ci_pip
CREATE INDEX index_ci_pipeline_schedules_on_project_id ON ci_pipeline_schedules USING btree (project_id);
-CREATE UNIQUE INDEX index_ci_pipeline_variables_on_pipeline_id_and_key ON ci_pipeline_variables USING btree (pipeline_id, key);
-
-CREATE UNIQUE INDEX index_ci_pipeline_variables_on_pipeline_id_bigint_and_key ON ci_pipeline_variables USING btree (pipeline_id_convert_to_bigint, key);
-
CREATE INDEX index_ci_pipelines_config_on_pipeline_id ON ci_pipelines_config USING btree (pipeline_id);
CREATE INDEX index_ci_pipelines_for_ondemand_dast_scans ON ci_pipelines USING btree (id) WHERE (source = 13);
CREATE INDEX index_ci_pipelines_on_auto_canceled_by_id ON ci_pipelines USING btree (auto_canceled_by_id);
-CREATE INDEX index_ci_pipelines_on_auto_canceled_by_id_bigint ON ci_pipelines USING btree (auto_canceled_by_id_convert_to_bigint);
-
CREATE INDEX index_ci_pipelines_on_ci_ref_id_and_more ON ci_pipelines USING btree (ci_ref_id, id DESC, source, status) WHERE (ci_ref_id IS NOT NULL);
CREATE INDEX index_ci_pipelines_on_external_pull_request_id ON ci_pipelines USING btree (external_pull_request_id) WHERE (external_pull_request_id IS NOT NULL);
@@ -32192,21 +32478,15 @@ CREATE INDEX index_ci_sources_projects_on_pipeline_id ON ci_sources_projects USI
CREATE UNIQUE INDEX index_ci_sources_projects_on_source_project_id_and_pipeline_id ON ci_sources_projects USING btree (source_project_id, pipeline_id);
+CREATE UNIQUE INDEX index_ci_stages_on_id_partition_id_unique ON ci_stages USING btree (id, partition_id);
+
CREATE INDEX index_ci_stages_on_pipeline_id ON ci_stages USING btree (pipeline_id);
CREATE INDEX index_ci_stages_on_pipeline_id_and_id ON ci_stages USING btree (pipeline_id, id) WHERE (status = ANY (ARRAY[0, 1, 2, 8, 9, 10]));
-CREATE UNIQUE INDEX index_ci_stages_on_pipeline_id_and_name ON ci_stages USING btree (pipeline_id, name);
-
CREATE INDEX index_ci_stages_on_pipeline_id_and_position ON ci_stages USING btree (pipeline_id, "position");
-CREATE INDEX index_ci_stages_on_pipeline_id_convert_to_bigint ON ci_stages USING btree (pipeline_id_convert_to_bigint);
-
-CREATE INDEX index_ci_stages_on_pipeline_id_convert_to_bigint_and_id ON ci_stages USING btree (pipeline_id_convert_to_bigint, id) WHERE (status = ANY (ARRAY[0, 1, 2, 8, 9, 10]));
-
-CREATE UNIQUE INDEX index_ci_stages_on_pipeline_id_convert_to_bigint_and_name ON ci_stages USING btree (pipeline_id_convert_to_bigint, name);
-
-CREATE INDEX index_ci_stages_on_pipeline_id_convert_to_bigint_and_position ON ci_stages USING btree (pipeline_id_convert_to_bigint, "position");
+CREATE UNIQUE INDEX index_ci_stages_on_pipeline_id_name_partition_id_unique ON ci_stages USING btree (pipeline_id, name, partition_id);
CREATE INDEX index_ci_stages_on_project_id ON ci_stages USING btree (project_id);
@@ -32292,6 +32572,8 @@ CREATE UNIQUE INDEX index_commit_user_mentions_on_note_id ON commit_user_mention
CREATE INDEX index_compliance_frameworks_id_where_frameworks_not_null ON compliance_management_frameworks USING btree (id) WHERE (pipeline_configuration_full_path IS NOT NULL);
+CREATE INDEX index_compliance_management_frameworks_on_name_trigram ON compliance_management_frameworks USING gin (name gin_trgm_ops);
+
CREATE INDEX index_composer_cache_files_where_namespace_id_is_null ON packages_composer_cache_files USING btree (id) WHERE (namespace_id IS NULL);
CREATE INDEX index_container_expiration_policies_on_next_run_at_and_enabled ON container_expiration_policies USING btree (next_run_at, enabled);
@@ -32446,8 +32728,6 @@ CREATE INDEX index_deployments_for_visible_scope ON deployments USING btree (env
CREATE INDEX index_deployments_on_archived_project_id_iid ON deployments USING btree (archived, project_id, iid);
-CREATE INDEX index_deployments_on_cluster_id_and_status ON deployments USING btree (cluster_id, status);
-
CREATE INDEX index_deployments_on_created_at ON deployments USING btree (created_at);
CREATE INDEX index_deployments_on_deployable_type_and_deployable_id ON deployments USING btree (deployable_type, deployable_id);
@@ -33194,8 +33474,6 @@ CREATE INDEX index_members_on_invite_email ON members USING btree (invite_email)
CREATE UNIQUE INDEX index_members_on_invite_token ON members USING btree (invite_token);
-CREATE INDEX index_members_on_member_namespace_id ON members USING btree (member_namespace_id);
-
CREATE INDEX index_members_on_member_namespace_id_compound ON members USING btree (member_namespace_id, type, requested_at, id);
CREATE INDEX index_members_on_member_role_id ON members USING btree (member_role_id);
@@ -33246,6 +33524,8 @@ CREATE INDEX index_merge_request_diffs_on_external_diff_store ON merge_request_d
CREATE INDEX index_merge_request_diffs_on_merge_request_id_and_id ON merge_request_diffs USING btree (merge_request_id, id);
+CREATE INDEX index_merge_request_diffs_on_project_id ON merge_request_diffs USING btree (project_id);
+
CREATE UNIQUE INDEX index_merge_request_diffs_on_unique_merge_request_id ON merge_request_diffs USING btree (merge_request_id) WHERE (diff_type = 2);
CREATE INDEX index_merge_request_metrics_on_first_deployed_to_production_at ON merge_request_metrics USING btree (first_deployed_to_production_at);
@@ -33286,8 +33566,6 @@ CREATE INDEX index_merge_requests_id_created_at_prepared_at ON merge_requests US
CREATE INDEX index_merge_requests_on_assignee_id ON merge_requests USING btree (assignee_id);
-CREATE INDEX index_merge_requests_on_author_id ON merge_requests USING btree (author_id);
-
CREATE INDEX index_merge_requests_on_author_id_and_created_at ON merge_requests USING btree (author_id, created_at);
CREATE INDEX index_merge_requests_on_author_id_and_id ON merge_requests USING btree (author_id, id);
@@ -33470,8 +33748,6 @@ CREATE INDEX index_namespaces_on_path_trigram ON namespaces USING gin (path gin_
CREATE UNIQUE INDEX index_namespaces_on_push_rule_id ON namespaces USING btree (push_rule_id);
-CREATE INDEX index_namespaces_on_require_two_factor_authentication ON namespaces USING btree (require_two_factor_authentication);
-
CREATE UNIQUE INDEX index_namespaces_on_runners_token_encrypted ON namespaces USING btree (runners_token_encrypted);
CREATE INDEX index_namespaces_on_traversal_ids ON namespaces USING gin (traversal_ids);
@@ -33640,6 +33916,8 @@ CREATE INDEX index_organization_users_on_user_id ON organization_users USING btr
CREATE UNIQUE INDEX index_organizations_on_unique_name_per_group ON customer_relations_organizations USING btree (group_id, lower(name), id);
+CREATE INDEX index_p_catalog_resource_sync_events_on_id_where_pending ON ONLY p_catalog_resource_sync_events USING btree (id) WHERE (status = 1);
+
CREATE UNIQUE INDEX index_p_ci_job_annotations_on_partition_id_job_id_name ON ONLY p_ci_job_annotations USING btree (partition_id, job_id, name);
CREATE INDEX index_p_ci_runner_machine_builds_on_runner_machine_id ON ONLY p_ci_runner_machine_builds USING btree (runner_machine_id);
@@ -33820,6 +34098,8 @@ CREATE INDEX index_personal_access_tokens_on_user_id ON personal_access_tokens U
CREATE INDEX index_pipeline_metadata_on_pipeline_id_name_text_pattern ON ci_pipeline_metadata USING btree (pipeline_id, name text_pattern_ops);
+CREATE UNIQUE INDEX index_pipeline_variables_on_pipeline_id_key_partition_id_unique ON ci_pipeline_variables USING btree (pipeline_id, key, partition_id);
+
CREATE UNIQUE INDEX index_plan_limits_on_plan_id ON plan_limits USING btree (plan_id);
CREATE UNIQUE INDEX index_plans_on_name ON plans USING btree (name);
@@ -33928,8 +34208,6 @@ CREATE INDEX index_project_pages_metadata_on_project_id_and_deployed_is_true ON
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);
@@ -33972,8 +34250,6 @@ CREATE INDEX index_project_statistics_on_storage_size_and_project_id ON project_
CREATE INDEX index_project_statistics_on_wiki_size_and_project_id ON project_statistics USING btree (wiki_size, project_id);
-CREATE INDEX index_project_topics_on_project_id ON project_topics USING btree (project_id);
-
CREATE UNIQUE INDEX index_project_topics_on_project_id_and_topic_id ON project_topics USING btree (project_id, topic_id);
CREATE INDEX index_project_topics_on_topic_id ON project_topics USING btree (topic_id);
@@ -34010,8 +34286,6 @@ CREATE INDEX index_projects_id_for_aimed_for_deletion ON projects USING btree (i
CREATE INDEX index_projects_not_aimed_for_deletion ON projects USING btree (id) WHERE (marked_for_deletion_at IS NULL);
-CREATE INDEX index_projects_on_created_at_and_id ON projects USING btree (created_at, id);
-
CREATE INDEX index_projects_on_creator_id_and_created_at_and_id ON projects USING btree (creator_id, created_at, id);
CREATE INDEX index_projects_on_creator_id_and_id ON projects USING btree (creator_id, id);
@@ -34042,8 +34316,6 @@ CREATE INDEX index_projects_on_mirror_creator_id_created_at ON projects USING bt
CREATE INDEX index_projects_on_mirror_id_where_mirror_and_trigger_builds ON projects USING btree (id) WHERE ((mirror = true) AND (mirror_trigger_builds = true));
-CREATE INDEX index_projects_on_mirror_last_successful_update_at ON projects USING btree (mirror_last_successful_update_at);
-
CREATE INDEX index_projects_on_mirror_user_id ON projects USING btree (mirror_user_id);
CREATE INDEX index_projects_on_name_and_id ON projects USING btree (name, id);
@@ -34054,9 +34326,7 @@ CREATE INDEX index_projects_on_namespace_id_and_id ON projects USING btree (name
CREATE INDEX index_projects_on_namespace_id_and_repository_size_limit ON projects USING btree (namespace_id, repository_size_limit);
-CREATE INDEX index_projects_on_organization_id ON projects USING btree (organization_id);
-
-CREATE INDEX index_projects_on_path_and_id ON projects USING btree (path, id);
+CREATE INDEX index_projects_on_organization_id_and_id ON projects USING btree (organization_id, id);
CREATE INDEX index_projects_on_path_trigram ON projects USING gin (path gin_trgm_ops);
@@ -34290,8 +34560,12 @@ CREATE UNIQUE INDEX index_routes_on_source_type_and_source_id ON routes USING bt
CREATE UNIQUE INDEX index_saml_group_links_on_group_id_and_saml_group_name ON saml_group_links USING btree (group_id, saml_group_name);
+CREATE INDEX index_saml_group_links_on_member_role_id ON saml_group_links USING btree (member_role_id);
+
CREATE INDEX index_saml_providers_on_group_id ON saml_providers USING btree (group_id);
+CREATE INDEX index_saml_providers_on_member_role_id ON saml_providers USING btree (member_role_id);
+
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);
@@ -34306,12 +34580,12 @@ CREATE INDEX index_sbom_occurrences_on_component_id_and_id ON sbom_occurrences U
CREATE INDEX index_sbom_occurrences_on_component_version_id ON sbom_occurrences USING btree (component_version_id);
+CREATE INDEX index_sbom_occurrences_on_highest_severity ON sbom_occurrences USING btree (project_id, highest_severity DESC NULLS LAST);
+
CREATE INDEX index_sbom_occurrences_on_licenses_spdx_identifier ON sbom_occurrences USING btree (project_id, ((licenses #> '{0,spdx_identifier}'::text[])), ((licenses #> '{1,spdx_identifier}'::text[])));
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_project_id_and_component_id_and_id ON sbom_occurrences USING btree (project_id, component_id, id);
CREATE INDEX index_sbom_occurrences_on_project_id_and_id ON sbom_occurrences USING btree (project_id, id);
@@ -34324,6 +34598,8 @@ CREATE INDEX index_sbom_occurrences_on_source_id ON sbom_occurrences USING btree
CREATE UNIQUE INDEX index_sbom_occurrences_on_uuid ON sbom_occurrences USING btree (uuid);
+CREATE INDEX index_sbom_occurrences_vulnerabilities_on_vulnerability_id ON sbom_occurrences_vulnerabilities USING btree (vulnerability_id);
+
CREATE UNIQUE INDEX index_sbom_sources_on_source_type_and_source ON sbom_sources USING btree (source_type, source);
CREATE UNIQUE INDEX index_scan_result_policies_on_position_in_configuration ON scan_result_policies USING btree (security_orchestration_policy_configuration_id, project_id, orchestration_policy_idx, rule_idx);
@@ -34366,8 +34642,6 @@ CREATE INDEX p_ci_builds_name_id_idx ON ONLY p_ci_builds USING btree (name, id)
CREATE INDEX index_security_ci_builds_on_name_and_id_parser_features ON ci_builds USING btree (name, id) WHERE (((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, ('dast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('license_management'::character varying)::text, ('sast'::character varying)::text, ('secret_detection'::character varying)::text, ('coverage_fuzzing'::character varying)::text, ('license_scanning'::character varying)::text, ('apifuzzer_fuzz'::character varying)::text, ('apifuzzer_fuzz_dnd'::character varying)::text])) AND ((type)::text = 'Ci::Build'::text));
-CREATE INDEX index_security_policy_configurations_on_bot_user_id ON security_orchestration_policy_configurations USING btree (bot_user_id) WHERE (bot_user_id IS NOT NULL);
-
CREATE INDEX index_security_scans_for_non_purged_records ON security_scans USING btree (created_at, id) WHERE (status <> 6);
CREATE INDEX index_security_scans_on_created_at ON security_scans USING btree (created_at);
@@ -34404,6 +34678,8 @@ CREATE INDEX index_service_desk_custom_email_verifications_on_triggerer_id ON se
CREATE INDEX index_service_desk_enabled_projects_on_id_creator_id_created_at ON projects USING btree (id, creator_id, created_at) WHERE (service_desk_enabled = true);
+CREATE INDEX index_service_desk_settings_on_custom_email_enabled ON service_desk_settings USING btree (custom_email_enabled);
+
CREATE INDEX index_service_desk_settings_on_file_template_project_id ON service_desk_settings USING btree (file_template_project_id);
CREATE UNIQUE INDEX index_shards_on_name ON shards USING btree (name);
@@ -34480,7 +34756,7 @@ CREATE INDEX index_sop_schedules_on_sop_configuration_id ON security_orchestrati
CREATE INDEX index_sop_schedules_on_user_id ON security_orchestration_policy_rule_schedules USING btree (user_id);
-CREATE UNIQUE INDEX index_source_package_names_on_component_and_purl ON sbom_components USING btree (component_type, source_package_name, purl_type);
+CREATE INDEX index_source_package_names_on_component_and_purl ON sbom_components USING btree (component_type, source_package_name, purl_type);
CREATE INDEX index_spam_logs_on_user_id ON spam_logs USING btree (user_id);
@@ -34718,6 +34994,8 @@ CREATE INDEX index_user_phone_validations_on_dial_code_phone_number ON user_phon
CREATE INDEX index_user_preferences_on_gitpod_enabled ON user_preferences USING btree (gitpod_enabled);
+CREATE INDEX index_user_preferences_on_home_organization_id ON user_preferences USING btree (home_organization_id);
+
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);
@@ -34732,8 +35010,6 @@ CREATE INDEX index_users_for_active_billable_users ON users USING btree (id) WHE
CREATE INDEX index_users_for_auditors ON users USING btree (id) WHERE (auditor IS TRUE);
-CREATE INDEX index_users_on_accepted_term_id ON users USING btree (accepted_term_id);
-
CREATE INDEX index_users_on_admin ON users USING btree (admin);
CREATE UNIQUE INDEX index_users_on_confirmation_token ON users USING btree (confirmation_token);
@@ -34744,8 +35020,6 @@ CREATE UNIQUE INDEX index_users_on_email ON users USING btree (email);
CREATE INDEX index_users_on_email_domain_and_id ON users USING btree (lower(split_part((email)::text, '@'::text, 2)), id);
-CREATE INDEX index_users_on_email_trigram ON users USING gin (email gin_trgm_ops);
-
CREATE INDEX index_users_on_feed_token ON users USING btree (feed_token);
CREATE INDEX index_users_on_group_view ON users USING btree (group_view);
@@ -34762,12 +35036,8 @@ CREATE INDEX index_users_on_name_trigram ON users USING gin (name gin_trgm_ops);
CREATE INDEX index_users_on_public_email_excluding_null_and_empty ON users USING btree (public_email) WHERE (((public_email)::text <> ''::text) AND (public_email IS NOT NULL));
-CREATE INDEX index_users_on_require_two_factor_authentication_from_group ON users USING btree (require_two_factor_authentication_from_group) WHERE (require_two_factor_authentication_from_group = true);
-
CREATE UNIQUE INDEX index_users_on_reset_password_token ON users USING btree (reset_password_token);
-CREATE INDEX index_users_on_state ON users USING btree (state);
-
CREATE INDEX index_users_on_state_and_user_type ON users USING btree (state, user_type);
CREATE UNIQUE INDEX index_users_on_static_object_token ON users USING btree (static_object_token);
@@ -34790,16 +35060,12 @@ CREATE INDEX index_users_ops_dashboard_projects_on_project_id ON users_ops_dashb
CREATE UNIQUE INDEX index_users_ops_dashboard_projects_on_user_id_and_project_id ON users_ops_dashboard_projects USING btree (user_id, project_id);
-CREATE INDEX index_users_require_two_factor_authentication_from_group_false ON users USING btree (require_two_factor_authentication_from_group) WHERE (require_two_factor_authentication_from_group = false);
-
CREATE INDEX index_users_security_dashboard_projects_on_user_id ON users_security_dashboard_projects USING btree (user_id);
CREATE INDEX index_users_star_projects_on_project_id ON users_star_projects USING btree (project_id);
CREATE UNIQUE INDEX index_users_star_projects_on_user_id_and_project_id ON users_star_projects USING btree (user_id, project_id);
-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';
@@ -34980,14 +35246,10 @@ CREATE INDEX index_web_hook_logs_on_web_hook_id_and_created_at ON ONLY web_hook_
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_integration_id ON web_hooks USING btree (integration_id);
-CREATE INDEX index_web_hooks_on_project_id ON web_hooks USING btree (project_id);
-
CREATE INDEX index_web_hooks_on_project_id_recent_failures ON web_hooks USING btree (project_id, recent_failures);
CREATE INDEX index_web_hooks_on_type ON web_hooks USING btree (type);
@@ -35058,18 +35320,16 @@ CREATE INDEX index_x509_commit_signatures_on_x509_certificate_id ON x509_commit_
CREATE INDEX index_x509_issuers_on_subject_key_identifier ON x509_issuers USING btree (subject_key_identifier);
+CREATE UNIQUE INDEX index_xray_reports_on_project_id_and_lang ON xray_reports USING btree (project_id, lang);
+
CREATE INDEX index_zentao_tracker_data_on_integration_id ON zentao_tracker_data USING btree (integration_id);
CREATE INDEX index_zoekt_indexed_namespaces_on_namespace_id ON zoekt_indexed_namespaces USING btree (namespace_id);
CREATE UNIQUE INDEX index_zoekt_node_and_namespace ON zoekt_indexed_namespaces USING btree (zoekt_node_id, namespace_id);
-CREATE UNIQUE INDEX index_zoekt_nodes_on_index_base_url ON zoekt_nodes USING btree (index_base_url);
-
CREATE INDEX index_zoekt_nodes_on_last_seen_at ON zoekt_nodes USING btree (last_seen_at);
-CREATE UNIQUE INDEX index_zoekt_nodes_on_search_base_url ON zoekt_nodes USING btree (search_base_url);
-
CREATE UNIQUE INDEX index_zoekt_nodes_on_uuid ON zoekt_nodes USING btree (uuid);
CREATE UNIQUE INDEX index_zoekt_shard_and_namespace ON zoekt_indexed_namespaces USING btree (zoekt_shard_id, namespace_id);
@@ -35198,6 +35458,8 @@ CREATE INDEX tmp_index_project_statistics_cont_registry_size ON project_statisti
CREATE INDEX tmp_index_project_statistics_updated_at ON project_statistics USING btree (project_id, updated_at) WHERE (repository_size > 0);
+CREATE INDEX tmp_index_vulnerabilities_on_id_finding_id_empty ON vulnerabilities USING btree (id) WHERE (finding_id IS NULL);
+
CREATE INDEX tmp_index_vulnerability_dismissal_info ON vulnerabilities USING btree (id) WHERE ((state = 2) AND ((dismissed_at IS NULL) OR (dismissed_by_id IS NULL)));
CREATE INDEX tmp_index_vulnerability_overlong_title_html ON vulnerabilities USING btree (id) WHERE (length(title_html) > 800);
@@ -35236,6 +35498,8 @@ CREATE UNIQUE INDEX unique_audit_events_group_namespace_filters_destination_id O
CREATE UNIQUE INDEX unique_audit_events_group_namespace_filters_namespace_id ON audit_events_streaming_http_group_namespace_filters USING btree (namespace_id);
+CREATE UNIQUE INDEX unique_audit_events_instance_namespace_filters_destination_id ON audit_events_streaming_http_instance_namespace_filters USING btree (audit_events_instance_external_audit_event_destination_id);
+
CREATE UNIQUE INDEX unique_batched_background_migrations_queued_migration_version ON batched_background_migrations USING btree (queued_migration_version);
CREATE UNIQUE INDEX unique_ci_builds_token_encrypted_and_partition_id ON ci_builds USING btree (token_encrypted, partition_id) WHERE (token_encrypted IS NOT NULL);
@@ -35258,6 +35522,10 @@ CREATE UNIQUE INDEX unique_index_on_system_note_metadata_id ON resource_link_eve
CREATE UNIQUE INDEX unique_index_sysaccess_ms_access_tokens_on_sysaccess_ms_app_id ON system_access_microsoft_graph_access_tokens USING btree (system_access_microsoft_application_id);
+CREATE UNIQUE INDEX unique_instance_amazon_s3_configurations_bucket_name ON audit_events_instance_amazon_s3_configurations USING btree (bucket_name);
+
+CREATE UNIQUE INDEX unique_instance_amazon_s3_configurations_name ON audit_events_instance_amazon_s3_configurations USING btree (name);
+
CREATE UNIQUE INDEX unique_instance_audit_event_destination_name ON audit_events_instance_external_audit_event_destinations USING btree (name);
CREATE UNIQUE INDEX unique_instance_google_cloud_logging_configurations ON audit_events_instance_google_cloud_logging_configurations USING btree (google_project_id_name, log_id_name);
@@ -35270,7 +35538,7 @@ CREATE UNIQUE INDEX unique_merge_request_metrics_by_merge_request_id ON merge_re
CREATE INDEX unique_ml_model_versions_on_model_id_and_id ON ml_model_versions USING btree (model_id, id DESC);
-CREATE UNIQUE INDEX unique_organizations_on_path ON organizations USING btree (path);
+CREATE UNIQUE INDEX unique_organizations_on_path_case_insensitive ON organizations USING btree (lower(path));
CREATE UNIQUE INDEX unique_packages_project_id_and_name_and_version_when_debian ON packages_packages USING btree (project_id, name, version) WHERE ((package_type = 9) AND (status <> 4));
@@ -35296,6 +35564,16 @@ CREATE INDEX users_forbidden_state_idx ON users USING btree (id) WHERE ((confirm
CREATE UNIQUE INDEX vulnerability_occurrence_pipelines_on_unique_keys ON vulnerability_occurrence_pipelines USING btree (occurrence_id, pipeline_id);
+CREATE INDEX wi_datessources_due_date_sourcing_milestone_id_index ON work_item_dates_sources USING btree (due_date_sourcing_milestone_id);
+
+CREATE INDEX wi_datessources_due_date_sourcing_work_item_id_index ON work_item_dates_sources USING btree (due_date_sourcing_work_item_id);
+
+CREATE INDEX wi_datessources_namespace_id_index ON work_item_dates_sources USING btree (namespace_id);
+
+CREATE INDEX wi_datessources_start_date_sourcing_milestone_id_index ON work_item_dates_sources USING btree (start_date_sourcing_milestone_id);
+
+CREATE INDEX wi_datessources_start_date_sourcing_work_item_id_index ON work_item_dates_sources USING btree (start_date_sourcing_work_item_id);
+
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_cycle_analytics_issue_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_00_pkey;
@@ -36894,7 +37172,7 @@ ALTER INDEX p_ci_builds_scheduled_at_idx ATTACH PARTITION partial_index_ci_build
ALTER INDEX p_ci_builds_token_encrypted_partition_id_idx ATTACH PARTITION unique_ci_builds_token_encrypted_and_partition_id;
-CREATE TRIGGER assign_p_ci_builds_id_trigger BEFORE INSERT ON ci_builds FOR EACH ROW EXECUTE FUNCTION assign_p_ci_builds_id_value();
+CREATE TRIGGER assign_p_ci_builds_id_trigger BEFORE INSERT ON p_ci_builds FOR EACH ROW EXECUTE FUNCTION assign_p_ci_builds_id_value();
CREATE TRIGGER chat_names_loose_fk_trigger AFTER DELETE ON chat_names REFERENCING OLD TABLE AS old_table FOR EACH STATEMENT EXECUTE FUNCTION insert_into_loose_foreign_keys_deleted_records();
@@ -36926,16 +37204,12 @@ CREATE TRIGGER push_rules_loose_fk_trigger AFTER DELETE ON push_rules REFERENCIN
CREATE TRIGGER tags_loose_fk_trigger AFTER DELETE ON tags REFERENCING OLD TABLE AS old_table FOR EACH STATEMENT EXECUTE FUNCTION insert_into_loose_foreign_keys_deleted_records();
-CREATE TRIGGER trigger_07bc3c48f407 BEFORE INSERT OR UPDATE ON ci_stages FOR EACH ROW EXECUTE FUNCTION trigger_07bc3c48f407();
-
CREATE TRIGGER trigger_10ee1357e825 BEFORE INSERT OR UPDATE ON p_ci_builds FOR EACH ROW EXECUTE FUNCTION trigger_10ee1357e825();
-CREATE TRIGGER trigger_1bd97da9c1a4 BEFORE INSERT OR UPDATE ON ci_pipelines FOR EACH ROW EXECUTE FUNCTION trigger_1bd97da9c1a4();
-
-CREATE TRIGGER trigger_7f3d66a7d7f5 BEFORE INSERT OR UPDATE ON ci_pipeline_variables FOR EACH ROW EXECUTE FUNCTION trigger_7f3d66a7d7f5();
-
CREATE TRIGGER trigger_b2d852e1e2cb BEFORE INSERT OR UPDATE ON ci_pipelines FOR EACH ROW EXECUTE FUNCTION trigger_b2d852e1e2cb();
+CREATE TRIGGER trigger_catalog_resource_sync_event_on_project_update AFTER UPDATE ON projects FOR EACH ROW WHEN ((((old.name)::text IS DISTINCT FROM (new.name)::text) OR (old.description IS DISTINCT FROM new.description) OR (old.visibility_level IS DISTINCT FROM new.visibility_level))) EXECUTE FUNCTION insert_catalog_resource_sync_event();
+
CREATE TRIGGER trigger_delete_project_namespace_on_project_delete AFTER DELETE ON projects FOR EACH ROW WHEN ((old.project_namespace_id IS NOT NULL)) EXECUTE FUNCTION delete_associated_project_namespace();
CREATE TRIGGER trigger_eaec934fe6b2 BEFORE INSERT OR UPDATE ON system_note_metadata FOR EACH ROW EXECUTE FUNCTION trigger_eaec934fe6b2();
@@ -36995,9 +37269,6 @@ ALTER TABLE ONLY epics
ALTER TABLE ONLY environments
ADD CONSTRAINT fk_01a033a308 FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE SET NULL;
-ALTER TABLE ONLY security_orchestration_policy_configurations
- ADD CONSTRAINT fk_0247484b90 FOREIGN KEY (bot_user_id) REFERENCES users(id) ON DELETE SET NULL;
-
ALTER TABLE ONLY agent_user_access_project_authorizations
ADD CONSTRAINT fk_0250c0ad51 FOREIGN KEY (agent_id) REFERENCES cluster_agents(id) ON DELETE CASCADE;
@@ -37019,6 +37290,9 @@ 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 sbom_occurrences_vulnerabilities
+ ADD CONSTRAINT fk_07b81e3a81 FOREIGN KEY (vulnerability_id) REFERENCES vulnerabilities(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY abuse_report_user_mentions
ADD CONSTRAINT fk_088018ecd8 FOREIGN KEY (abuse_report_id) REFERENCES abuse_reports(id) ON DELETE CASCADE;
@@ -37136,6 +37410,9 @@ ALTER TABLE ONLY users_star_projects
ALTER TABLE ONLY alert_management_alerts
ADD CONSTRAINT fk_2358b75436 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE SET NULL;
+ALTER TABLE ONLY audit_events_streaming_http_instance_namespace_filters
+ ADD CONSTRAINT fk_23f3ab7df0 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY import_failures
ADD CONSTRAINT fk_24b824da43 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
@@ -37157,6 +37434,9 @@ ALTER TABLE ONLY geo_event_log
ALTER TABLE ONLY user_namespace_callouts
ADD CONSTRAINT fk_27a69fd1bd FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+ALTER TABLE ONLY work_item_dates_sources
+ ADD CONSTRAINT fk_283fb4ad36 FOREIGN KEY (start_date_sourcing_milestone_id) REFERENCES milestones(id) ON DELETE SET NULL;
+
ALTER TABLE ONLY project_group_links
ADD CONSTRAINT fk_28a1244b01 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE NOT VALID;
@@ -37214,6 +37494,9 @@ ALTER TABLE ONLY namespaces
ALTER TABLE ONLY project_topics
ADD CONSTRAINT fk_34af9ab07a FOREIGN KEY (topic_id) REFERENCES topics(id) ON DELETE CASCADE;
+ALTER TABLE ONLY saml_providers
+ ADD CONSTRAINT fk_351dde3a84 FOREIGN KEY (member_role_id) REFERENCES member_roles(id) ON DELETE SET NULL;
+
ALTER TABLE ONLY in_product_marketing_emails
ADD CONSTRAINT fk_35c9101b63 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
@@ -37349,6 +37632,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 merge_request_diffs
+ ADD CONSTRAINT fk_56ac6fc9c0 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE NOT VALID;
+
ALTER TABLE ONLY ml_candidates
ADD CONSTRAINT fk_56d6ed4d3d FOREIGN KEY (experiment_id) REFERENCES ml_experiments(id) ON DELETE CASCADE;
@@ -37370,9 +37656,6 @@ 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;
@@ -37403,6 +37686,9 @@ ALTER TABLE ONLY events
ALTER TABLE ONLY vulnerability_reads
ADD CONSTRAINT fk_62736f638f FOREIGN KEY (vulnerability_id) REFERENCES vulnerabilities(id) ON DELETE CASCADE;
+ALTER TABLE ONLY saml_group_links
+ ADD CONSTRAINT fk_6336b1d1d0 FOREIGN KEY (member_role_id) REFERENCES member_roles(id) ON DELETE SET NULL;
+
ALTER TABLE ONLY merge_requests
ADD CONSTRAINT fk_641731faff FOREIGN KEY (updated_by_id) REFERENCES users(id) ON DELETE SET NULL;
@@ -37415,9 +37701,6 @@ ALTER TABLE ONLY ci_pipeline_chat_data
ALTER TABLE p_ci_builds
ADD CONSTRAINT fk_6661f4f0e8 FOREIGN KEY (resource_group_id) REFERENCES ci_resource_groups(id) ON DELETE SET NULL;
-ALTER TABLE ONLY ci_pipelines
- ADD CONSTRAINT fk_67e4288f3a FOREIGN KEY (auto_canceled_by_id_convert_to_bigint) REFERENCES ci_pipelines(id) ON DELETE SET NULL;
-
ALTER TABLE ONLY merge_requests
ADD CONSTRAINT fk_6a5165a692 FOREIGN KEY (milestone_id) REFERENCES milestones(id) ON DELETE SET NULL;
@@ -37586,6 +37869,9 @@ ALTER TABLE ONLY catalog_resource_components
ALTER TABLE ONLY protected_branch_merge_access_levels
ADD CONSTRAINT fk_8a3072ccb3 FOREIGN KEY (protected_branch_id) REFERENCES protected_branches(id) ON DELETE CASCADE;
+ALTER TABLE ONLY work_item_dates_sources
+ ADD CONSTRAINT fk_8a4948b668 FOREIGN KEY (start_date_sourcing_work_item_id) REFERENCES issues(id) ON DELETE SET NULL;
+
ALTER TABLE ONLY bulk_import_exports
ADD CONSTRAINT fk_8c6f33cebe FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
@@ -37718,6 +38004,9 @@ ALTER TABLE ONLY identities
ALTER TABLE ONLY boards
ADD CONSTRAINT fk_ab0a250ff6 FOREIGN KEY (iteration_cadence_id) REFERENCES iterations_cadences(id) ON DELETE CASCADE;
+ALTER TABLE ONLY audit_events_streaming_http_instance_namespace_filters
+ ADD CONSTRAINT fk_abe44125bc FOREIGN KEY (audit_events_instance_external_audit_event_destination_id) REFERENCES audit_events_instance_external_audit_event_destinations(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY merge_requests
ADD CONSTRAINT fk_ad525e1f87 FOREIGN KEY (merge_user_id) REFERENCES users(id) ON DELETE SET NULL;
@@ -37844,12 +38133,12 @@ ALTER TABLE ONLY timelogs
ALTER TABLE ONLY geo_event_log
ADD CONSTRAINT fk_c4b1c1f66e FOREIGN KEY (repository_deleted_event_id) REFERENCES geo_repository_deleted_events(id) ON DELETE CASCADE;
-ALTER TABLE ONLY ci_stages
- ADD CONSTRAINT fk_c5ddde695f FOREIGN KEY (pipeline_id_convert_to_bigint) REFERENCES ci_pipelines(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY issues
ADD CONSTRAINT fk_c63cbf6c25 FOREIGN KEY (closed_by_id) REFERENCES users(id) ON DELETE SET NULL;
+ALTER TABLE ONLY sbom_occurrences_vulnerabilities
+ ADD CONSTRAINT fk_c677cb859e FOREIGN KEY (sbom_occurrence_id) REFERENCES sbom_occurrences(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY issues
ADD CONSTRAINT fk_c78fbacd64 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
@@ -37919,6 +38208,9 @@ ALTER TABLE p_ci_builds
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 work_item_dates_sources
+ ADD CONSTRAINT fk_d602f0955d FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE SET NULL;
+
ALTER TABLE ONLY incident_management_timeline_events
ADD CONSTRAINT fk_d606a2a890 FOREIGN KEY (promoted_from_note_id) REFERENCES notes(id) ON DELETE SET NULL;
@@ -37961,6 +38253,9 @@ ALTER TABLE ONLY project_topics
ALTER TABLE ONLY web_hooks
ADD CONSTRAINT fk_db1ea5699b FOREIGN KEY (integration_id) REFERENCES integrations(id) ON DELETE CASCADE;
+ALTER TABLE ONLY work_item_dates_sources
+ ADD CONSTRAINT fk_dbbe8917ee FOREIGN KEY (due_date_sourcing_work_item_id) REFERENCES issues(id) ON DELETE SET NULL;
+
ALTER TABLE ONLY security_scans
ADD CONSTRAINT fk_dbc89265b9 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -37997,6 +38292,9 @@ ALTER TABLE ONLY gitlab_subscriptions
ALTER TABLE ONLY abuse_events
ADD CONSTRAINT fk_e5ce49c215 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE SET NULL;
+ALTER TABLE ONLY user_preferences
+ ADD CONSTRAINT fk_e5e029c10b FOREIGN KEY (home_organization_id) REFERENCES organizations(id) ON DELETE SET NULL;
+
ALTER TABLE ONLY merge_requests
ADD CONSTRAINT fk_e719a85f8a FOREIGN KEY (author_id) REFERENCES users(id) ON DELETE SET NULL;
@@ -38039,9 +38337,6 @@ ALTER TABLE ONLY merge_requests_compliance_violations
ALTER TABLE ONLY work_item_widget_definitions
ADD CONSTRAINT fk_ecf57512f7 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
-ALTER TABLE ONLY events
- ADD CONSTRAINT fk_edfd187b6f FOREIGN KEY (author_id) REFERENCES users(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY coverage_fuzzing_corpuses
ADD CONSTRAINT fk_ef5ebf339f FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE CASCADE;
@@ -38105,6 +38400,9 @@ ALTER TABLE ONLY cluster_agents
ALTER TABLE ONLY protected_tag_create_access_levels
ADD CONSTRAINT fk_f7dfda8c51 FOREIGN KEY (protected_tag_id) REFERENCES protected_tags(id) ON DELETE CASCADE;
+ALTER TABLE ONLY application_settings
+ ADD CONSTRAINT fk_f9867b3540 FOREIGN KEY (web_ide_oauth_application_id) REFERENCES oauth_applications(id) ON DELETE SET NULL;
+
ALTER TABLE ONLY ci_stages
ADD CONSTRAINT fk_fb57e6cc56 FOREIGN KEY (pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE;
@@ -38117,6 +38415,9 @@ ALTER TABLE ONLY system_note_metadata
ALTER TABLE ONLY vulnerability_remediations
ADD CONSTRAINT fk_fc61a535a0 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ALTER TABLE ONLY work_item_dates_sources
+ ADD CONSTRAINT fk_fc7bc5e687 FOREIGN KEY (due_date_sourcing_milestone_id) REFERENCES milestones(id) ON DELETE SET NULL;
+
ALTER TABLE ONLY abuse_report_events
ADD CONSTRAINT fk_fdd4d610e0 FOREIGN KEY (abuse_report_id) REFERENCES abuse_reports(id) ON DELETE CASCADE;
@@ -38129,6 +38430,9 @@ ALTER TABLE ONLY issues
ALTER TABLE ONLY geo_event_log
ADD CONSTRAINT fk_geo_event_log_on_geo_event_id FOREIGN KEY (geo_event_id) REFERENCES geo_events(id) ON DELETE CASCADE;
+ALTER TABLE ONLY members
+ ADD CONSTRAINT fk_member_role_on_members FOREIGN KEY (member_role_id) REFERENCES member_roles(id) ON DELETE SET NULL;
+
ALTER TABLE ONLY ml_candidate_metrics
ADD CONSTRAINT fk_ml_candidate_metrics_on_candidate_id FOREIGN KEY (candidate_id) REFERENCES ml_candidates(id) ON DELETE CASCADE;
@@ -38264,9 +38568,6 @@ ALTER TABLE ONLY zoom_meetings
ALTER TABLE ONLY gpg_signatures
ADD CONSTRAINT fk_rails_11ae8cb9a7 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-ALTER TABLE ONLY project_authorizations
- ADD CONSTRAINT fk_rails_11e7aa3ed9 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY pm_affected_packages
ADD CONSTRAINT fk_rails_1279c1b9a1 FOREIGN KEY (pm_advisory_id) REFERENCES pm_advisories(id) ON DELETE CASCADE;
@@ -38447,6 +38748,9 @@ ALTER TABLE ONLY reviews
ALTER TABLE ONLY draft_notes
ADD CONSTRAINT fk_rails_2a8dac9901 FOREIGN KEY (author_id) REFERENCES users(id) ON DELETE CASCADE;
+ALTER TABLE ONLY xray_reports
+ ADD CONSTRAINT fk_rails_2b13fbecf9 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY dependency_proxy_image_ttl_group_policies
ADD CONSTRAINT fk_rails_2b1896d021 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
@@ -39134,6 +39438,9 @@ ALTER TABLE incident_management_pending_alert_escalations
ALTER TABLE ONLY approval_merge_request_rules_approved_approvers
ADD CONSTRAINT fk_rails_8dc94cff4d FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
+ALTER TABLE ONLY work_item_dates_sources
+ ADD CONSTRAINT fk_rails_8dcefa21a5 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY design_user_mentions
ADD CONSTRAINT fk_rails_8de8c6d632 FOREIGN KEY (note_id) REFERENCES notes(id) ON DELETE CASCADE;
@@ -39146,6 +39453,9 @@ ALTER TABLE ONLY alert_management_alert_user_mentions
ALTER TABLE ONLY project_daily_statistics
ADD CONSTRAINT fk_rails_8e549b272d FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ALTER TABLE ONLY organization_details
+ ADD CONSTRAINT fk_rails_8facb04bef FOREIGN KEY (organization_id) REFERENCES organizations(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY ci_pipelines_config
ADD CONSTRAINT fk_rails_906c9a2533 FOREIGN KEY (pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE;
@@ -39914,6 +40224,9 @@ ALTER TABLE ONLY customer_relations_contacts
ALTER TABLE ONLY external_approval_rules
ADD CONSTRAINT fk_rails_fd4f9ac573 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ALTER TABLE ONLY abuse_report_assignees
+ ADD CONSTRAINT fk_rails_fd5f22166b FOREIGN KEY (abuse_report_id) REFERENCES abuse_reports(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY cluster_groups
ADD CONSTRAINT fk_rails_fdb8648a96 FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE;
@@ -39953,9 +40266,6 @@ ALTER TABLE issue_search_data
ALTER TABLE product_analytics_events_experimental
ADD CONSTRAINT product_analytics_events_experimental_project_id_fkey FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-ALTER TABLE ONLY ci_pipeline_variables
- ADD CONSTRAINT temp_fk_rails_8d3b04e3e1 FOREIGN KEY (pipeline_id_convert_to_bigint) REFERENCES ci_pipelines(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY user_follow_users
ADD CONSTRAINT user_follow_users_followee_id_fkey FOREIGN KEY (followee_id) REFERENCES users(id) ON DELETE CASCADE;