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/docs/abuse_trust_scores.yml10
-rw-r--r--db/docs/agent_activity_events.yml2
-rw-r--r--db/docs/agent_group_authorizations.yml4
-rw-r--r--db/docs/agent_project_authorizations.yml4
-rw-r--r--db/docs/agent_user_access_group_authorizations.yml10
-rw-r--r--db/docs/agent_user_access_project_authorizations.yml10
-rw-r--r--db/docs/appearances.yml2
-rw-r--r--db/docs/approval_project_rules_users.yml3
-rw-r--r--db/docs/audit_events_instance_external_audit_event_destinations.yml10
-rw-r--r--db/docs/aws_roles.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_project_wiki_repositories.yml8
-rw-r--r--db/docs/batched_background_migrations/update_code_suggestions_for_namespace_settings.yml6
-rw-r--r--db/docs/broadcast_messages.yml2
-rw-r--r--db/docs/ci_group_variables.yml2
-rw-r--r--db/docs/ci_instance_variables.yml2
-rw-r--r--db/docs/ci_job_variables.yml2
-rw-r--r--db/docs/ci_namespace_mirrors.yml2
-rw-r--r--db/docs/ci_pipeline_variables.yml2
-rw-r--r--db/docs/ci_project_mirrors.yml2
-rw-r--r--db/docs/ci_runner_machines.yml4
-rw-r--r--db/docs/ci_secure_file_states.yml2
-rw-r--r--db/docs/ci_secure_files.yml2
-rw-r--r--db/docs/ci_variables.yml2
-rw-r--r--db/docs/cluster_agent_tokens.yml2
-rw-r--r--db/docs/cluster_agents.yml2
-rw-r--r--db/docs/cluster_enabled_grants.yml2
-rw-r--r--db/docs/cluster_groups.yml2
-rw-r--r--db/docs/cluster_platforms_kubernetes.yml2
-rw-r--r--db/docs/cluster_projects.yml2
-rw-r--r--db/docs/cluster_providers_aws.yml2
-rw-r--r--db/docs/cluster_providers_gcp.yml2
-rw-r--r--db/docs/clusters.yml2
-rw-r--r--db/docs/clusters_applications_cert_managers.yml2
-rw-r--r--db/docs/clusters_applications_crossplane.yml2
-rw-r--r--db/docs/clusters_applications_helm.yml4
-rw-r--r--db/docs/clusters_applications_ingress.yml4
-rw-r--r--db/docs/clusters_applications_jupyter.yml4
-rw-r--r--db/docs/clusters_applications_knative.yml4
-rw-r--r--db/docs/clusters_applications_prometheus.yml2
-rw-r--r--db/docs/clusters_applications_runners.yml4
-rw-r--r--db/docs/clusters_kubernetes_namespaces.yml2
-rw-r--r--db/docs/deleted_tables/packages_events.yml12
-rw-r--r--db/docs/deployment_clusters.yml2
-rw-r--r--db/docs/design_management_repositories.yml10
-rw-r--r--db/docs/dora_daily_metrics.yml1
-rw-r--r--db/docs/dora_performance_scores.yml10
-rw-r--r--db/docs/issue_assignment_events.yml10
-rw-r--r--db/docs/loose_foreign_keys_deleted_records.yml2
-rw-r--r--db/docs/merge_request_assignment_events.yml10
-rw-r--r--db/docs/merge_trains.yml4
-rw-r--r--db/docs/namespace_aggregation_schedules.yml2
-rw-r--r--db/docs/namespace_limits.yml2
-rw-r--r--db/docs/namespaces_storage_limit_exclusions.yml2
-rw-r--r--db/docs/namespaces_sync_events.yml2
-rw-r--r--db/docs/p_ci_runner_machine_builds.yml4
-rw-r--r--db/docs/packages_events.yml10
-rw-r--r--db/docs/packages_npm_metadata_caches.yml10
-rw-r--r--db/docs/pm_checkpoints.yml2
-rw-r--r--db/docs/pm_licenses.yml2
-rw-r--r--db/docs/pm_package_version_licenses.yml2
-rw-r--r--db/docs/pm_package_versions.yml2
-rw-r--r--db/docs/pm_packages.yml2
-rw-r--r--db/docs/project_security_settings.yml2
-rw-r--r--db/docs/projects_sync_events.yml2
-rw-r--r--db/docs/resource_link_events.yml10
-rw-r--r--db/docs/schema_inconsistencies.yml10
-rw-r--r--db/docs/search_indices.yml11
-rw-r--r--db/docs/search_namespace_index_assignments.yml10
-rw-r--r--db/docs/serverless_domain_cluster.yml2
-rw-r--r--db/docs/service_desk_custom_email_credentials.yml11
-rw-r--r--db/docs/vulnerability_advisories.yml3
-rw-r--r--db/fixtures/development/28_integrations.rb2
-rw-r--r--db/fixtures/development/33_triage_ops.rb3
-rw-r--r--db/fixtures/development/36_achievements.rb2
-rw-r--r--db/fixtures/development/37_timelogs.rb99
-rw-r--r--db/init_structure.sql6417
-rw-r--r--db/migrate/20210826171758_init_schema.rb13
-rw-r--r--db/migrate/20210830085837_add_throttle_authenticated_git_lfs_columns.rb23
-rw-r--r--db/migrate/20210830140524_add_state_to_member.rb21
-rw-r--r--db/migrate/20210830154358_add_yaml_limit_constraints.rb25
-rw-r--r--db/migrate/20210831134840_add_package_file_id_channel_idx_to_packages_helm_file_metadata.rb17
-rw-r--r--db/migrate/20210831135249_add_installable_helm_pkgs_idx_to_packages.rb17
-rw-r--r--db/migrate/20210831203408_upsert_base_work_item_types.rb31
-rw-r--r--db/migrate/20210901065504_add_index_on_name_and_id_to_public_groups.rb18
-rw-r--r--db/migrate/20210902171406_add_latest_column_into_the_security_scans_table.rb13
-rw-r--r--db/migrate/20210902171808_set_default_job_token_scope_false.rb17
-rw-r--r--db/migrate/20210902184334_add_expire_access_tokens_to_doorkeeper_application.rb7
-rw-r--r--db/migrate/20210903054158_recreate_stage_issue_events_table_with_bigints.rb45
-rw-r--r--db/migrate/20210906100021_delete_project_namespace_trigger.rb31
-rw-r--r--db/migrate/20210907182337_add_group_id_fkey_for_user_group_callout.rb15
-rw-r--r--db/migrate/20210907182359_add_user_id_fkey_for_user_group_callout.rb15
-rw-r--r--db/migrate/20210908060951_add_dast_schedules_to_plan_limits.rb7
-rw-r--r--db/migrate/20210908061132_insert_dast_profile_schedules_plan_limits.rb27
-rw-r--r--db/migrate/20210908100810_add_jobs_per_stage_page_size_to_application_settings.rb7
-rw-r--r--db/migrate/20210908140437_add_sidekiq_limits_to_application_settings.rb21
-rw-r--r--db/migrate/20210908185736_add_status_to_dependency_proxy_manifests.rb7
-rw-r--r--db/migrate/20210908185754_add_status_to_dependency_proxy_blobs.rb7
-rw-r--r--db/migrate/20210908195506_add_data_to_vulnerability_finding_evidence.rb7
-rw-r--r--db/migrate/20210909184349_add_index_package_id_id_on_package_files.rb17
-rw-r--r--db/migrate/20210910014741_add_dependency_proxy_ttl_group_policy_worker_capacity_to_application_settings.rb11
-rw-r--r--db/migrate/20210910015047_add_app_settings_dep_proxy_ttl_worker_capacity_check_constraint.rb15
-rw-r--r--db/migrate/20210910141043_change_ci_minutes_additional_pack_text_limit.rb15
-rw-r--r--db/migrate/20210910192921_add_report_type_into_approval_project_rules.rb11
-rw-r--r--db/migrate/20210912034903_add_runner_features_to_ci_builds_metadata.rb9
-rw-r--r--db/migrate/20210913010411_create_agent_project_authorizations.rb14
-rw-r--r--db/migrate/20210913010432_add_agent_project_authorizations_foreign_keys.rb20
-rw-r--r--db/migrate/20210913122457_add_namespace_traversal_ids_to_ci_pending_builds.rb9
-rw-r--r--db/migrate/20210913224558_update_dependency_proxy_manifests_uniqueness_constraint.rb18
-rw-r--r--db/migrate/20210914145810_add_throttle_deprecated_api_columns.rb13
-rw-r--r--db/migrate/20210914172202_add_status_index_to_dependency_proxy_tables.rb18
-rw-r--r--db/migrate/20210915000453_add_index_on_clusters_integration_prometheus_enabled.rb15
-rw-r--r--db/migrate/20210915001242_add_index_on_clusters_integration_elastic_stack_enabled.rb15
-rw-r--r--db/migrate/20210915070423_add_avatar_and_description_to_topic.rb15
-rw-r--r--db/migrate/20210916132547_add_process_mode_to_resource_groups.rb15
-rw-r--r--db/migrate/20210917134321_remove_temporary_index_for_project_topics_on_taggings.rb20
-rw-r--r--db/migrate/20210917153645_remove_pipeline_fk_from_packages_build_infos.rb15
-rw-r--r--db/migrate/20210917153905_remove_pipeline_fk_from_packages_package_file_build_infos.rb15
-rw-r--r--db/migrate/20210917224419_add_registration_objective_to_user_detail.rb7
-rw-r--r--db/migrate/20210920104446_add_text_limit_to_topics_description_and_avatar.rb15
-rw-r--r--db/migrate/20210921032008_add_suggest_pipeline_enabled_to_application_settings.rb7
-rw-r--r--db/migrate/20210921063924_index_labels_using_varchar_pattern_ops.rb39
-rw-r--r--db/migrate/20210921191010_add_report_type_index_into_approval_project_rules.rb15
-rw-r--r--db/migrate/20210922172056_add_unique_namespaces_index_on_name_parent_id_and_type.rb15
-rw-r--r--db/migrate/20210922172156_drop_unique_namespaces_index_on_name_and_parent_id.rb15
-rw-r--r--db/migrate/20210922215740_create_issue_customer_relations_contacts.rb14
-rw-r--r--db/migrate/20210922220104_add_issue_customer_relations_contacts_foreign_keys.rb20
-rw-r--r--db/migrate/20210923042323_add_meta_data_to_user_credit_card_validations.rb13
-rw-r--r--db/migrate/20210923042324_limit_holder_name_on_user_credit_card_validations.rb23
-rw-r--r--db/migrate/20210923042325_index_meta_data_on_user_credit_card_validations.rb19
-rw-r--r--db/migrate/20210923151641_change_default_for_integrated_error_tracking.rb11
-rw-r--r--db/migrate/20210928155022_improve_index_for_error_tracking.rb33
-rw-r--r--db/migrate/20210928171122_add_group_id_status_id_index_to_dependency_proxy_tables.rb18
-rw-r--r--db/migrate/20210929025600_add_phone_to_user_details.rb15
-rw-r--r--db/migrate/20210929030834_add_text_limit_to_user_details_phone.rb13
-rw-r--r--db/migrate/20210929031049_add_unique_index_phone_on_user_details.rb15
-rw-r--r--db/migrate/20210929032555_create_verification_codes.rb36
-rw-r--r--db/migrate/20210929115340_add_security_policy_configurations_management_project_id_foreign_key.rb18
-rw-r--r--db/migrate/20210929121516_add_releases_author_id_id_created_at_index.rb14
-rw-r--r--db/migrate/20210929144453_add_warn_about_potentially_unwanted_characters_to_project_settings.rb16
-rw-r--r--db/migrate/20210930081208_fix_deprecated_api_throttle_defaults.rb8
-rw-r--r--db/migrate/20211001001222_add_source_version_to_bulk_imports.rb7
-rw-r--r--db/migrate/20211004062942_create_coverage_fuzzing_corpuses.rb18
-rw-r--r--db/migrate/20211004075629_add_topics_name_gin_index.rb15
-rw-r--r--db/migrate/20211004081911_add_external_event_destination_limit_to_plan_limits.rb7
-rw-r--r--db/migrate/20211004122540_create_member_tasks.rb13
-rw-r--r--db/migrate/20211005063519_add_foreign_key_to_corpuses_on_project.rb15
-rw-r--r--db/migrate/20211005063616_add_foreign_key_to_corpuses_on_user.rb15
-rw-r--r--db/migrate/20211005063723_add_foreign_key_to_corpuses_on_package.rb15
-rw-r--r--db/migrate/20211005092428_drop_time_range_partitioned_loose_fk.rb27
-rw-r--r--db/migrate/20211005093558_add_range_partitioned_loose_fk_table.rb29
-rw-r--r--db/migrate/20211005100112_recreate_loose_fk_insert_function.rb40
-rw-r--r--db/migrate/20211005112404_add_member_id_foreign_key_to_member_tasks.rb15
-rw-r--r--db/migrate/20211005112645_add_project_id_foreign_key_to_member_tasks.rb15
-rw-r--r--db/migrate/20211006060254_add_topics_total_projects_count_cache.rb11
-rw-r--r--db/migrate/20211006103122_change_helm_channel_length.rb14
-rw-r--r--db/migrate/20211006122010_add_topics_total_projects_count_index.rb15
-rw-r--r--db/migrate/20211007090229_create_issue_search_table.rb29
-rw-r--r--db/migrate/20211007113136_add_status_column_to_security_scans_table.rb7
-rw-r--r--db/migrate/20211008043855_remove_notes_trigram_index.rb15
-rw-r--r--db/migrate/20211008181451_add_shared_runners_duration_to_ci_namespace_monthly_usages.rb9
-rw-r--r--db/migrate/20211008182954_add_shared_runners_duration_to_ci_project_monthly_usages.rb9
-rw-r--r--db/migrate/20211008193137_add_health_status_column_on_clusters_integration_prometheus.rb8
-rw-r--r--db/migrate/20211011004242_create_content_blocked_states.rb15
-rw-r--r--db/migrate/20211011140930_create_ci_namespace_mirrors.rb15
-rw-r--r--db/migrate/20211011140931_create_ci_project_mirrors.rb12
-rw-r--r--db/migrate/20211011140932_create_namespaces_sync_events.rb9
-rw-r--r--db/migrate/20211011141239_create_projects_sync_events.rb9
-rw-r--r--db/migrate/20211011141242_create_namespaces_sync_trigger.rb37
-rw-r--r--db/migrate/20211011141243_create_projects_sync_trigger.rb37
-rw-r--r--db/migrate/20211012015903_next_traversal_ids_sibling_function.rb30
-rw-r--r--db/migrate/20211012091822_add_text_limit_to_bulk_imports_source_version.rb13
-rw-r--r--db/migrate/20211012134316_clean_up_migrate_merge_request_diff_commit_users.rb35
-rw-r--r--db/migrate/20211013014228_add_content_validation_endpoint_to_application_settings.rb20
-rw-r--r--db/migrate/20211013080714_add_network_to_user_credit_card_validations.rb9
-rw-r--r--db/migrate/20211013080715_limit_network_on_user_credit_card_validations.rb13
-rw-r--r--db/migrate/20211013080716_index_include_network_on_user_credit_card_validations.rb17
-rw-r--r--db/migrate/20211013192749_add_states_into_approval_project_rules.rb11
-rw-r--r--db/migrate/20211015021114_add_merge_commit_template_to_project_settings.rb9
-rw-r--r--db/migrate/20211015024135_add_merge_commit_template_limit_to_project_settings.rb13
-rw-r--r--db/migrate/20211018101034_add_tmp_project_id_column_to_namespaces.rb11
-rw-r--r--db/migrate/20211018161447_fix_double_entries_in_postgres_index_view.rb59
-rw-r--r--db/migrate/20211019153615_add_state_to_merge_request_assignees.rb8
-rw-r--r--db/migrate/20211020030948_add_runtime_runner_features_to_ci_builds_metadata.rb9
-rw-r--r--db/migrate/20211020095357_add_group_traversal_id_index.rb15
-rw-r--r--db/migrate/20211021115409_add_color_to_epics.rb10
-rw-r--r--db/migrate/20211021124715_add_text_limit_to_epics_color.rb13
-rw-r--r--db/migrate/20211021125908_add_sentry_settings_to_application_settings.rb12
-rw-r--r--db/migrate/20211021134458_add_limits_to_sentry_settings_on_application_settings.rb17
-rw-r--r--db/migrate/20211025103744_add_state_id_to_vsa_issue_stage_events.rb7
-rw-r--r--db/migrate/20211025103758_add_state_id_to_vsa_merge_request_stage_events.rb7
-rw-r--r--db/migrate/20211026124336_add_archive_trace_events_to_integrations.rb7
-rw-r--r--db/migrate/20211026143238_remove_index_releases_on_author_id.rb15
-rw-r--r--db/migrate/20211027203950_add_updated_index_for_dormant_users.rb17
-rw-r--r--db/migrate/20211028132247_create_packages_npm_metadata.rb22
-rw-r--r--db/migrate/20211028212259_add_default_to_personal_access_tokens_prefix.rb7
-rw-r--r--db/migrate/20211101132310_add_reindexing_queue.rb16
-rw-r--r--db/migrate/20211101165656_create_upload_states.rb32
-rw-r--r--db/migrate/20211103062728_add_with_highest_role_minimal_access_to_users_statistics.rb7
-rw-r--r--db/migrate/20211104012209_add_text_limit_to_application_settings_content_validation_endpoint_url.rb13
-rw-r--r--db/migrate/20211105010101_add_archived_column_to_deployments.rb9
-rw-r--r--db/migrate/20211105125756_add_read_at_to_dependency_proxy_manifests.rb7
-rw-r--r--db/migrate/20211105125813_add_read_at_to_dependency_proxy_blobs.rb7
-rw-r--r--db/migrate/20211105160316_create_dotenv_application_limits.rb8
-rw-r--r--db/migrate/20211105161404_insert_dotenv_application_limits.rb27
-rw-r--r--db/migrate/20211108154510_create_pipeline_triggers_application_limits.rb7
-rw-r--r--db/migrate/20211108154841_insert_pipeline_triggers_application_limits.rb23
-rw-r--r--db/migrate/20211108203248_update_dependency_proxy_indexes_with_read_at.rb27
-rw-r--r--db/migrate/20211108204736_add_policy_idx_to_approval_project_rule.rb9
-rw-r--r--db/migrate/20211108211434_remove_index_for_resource_group.rb17
-rw-r--r--db/migrate/20211109100050_add_consume_after_to_loose_fk_deleted_records.rb13
-rw-r--r--db/migrate/20211109101010_support_partition_query_in_loose_fk_table.rb20
-rw-r--r--db/migrate/20211110010101_add_index_on_unarchived_deployments.rb15
-rw-r--r--db/migrate/20211110014701_create_agent_activity_events.rb22
-rw-r--r--db/migrate/20211110015252_add_agent_activity_events_foreign_keys.rb35
-rw-r--r--db/migrate/20211110092710_create_issue_emails.rb21
-rw-r--r--db/migrate/20211110100050_add_has_shimo_to_project_settings.rb9
-rw-r--r--db/migrate/20211111112425_create_merge_requests_compliance_violations.rb13
-rw-r--r--db/migrate/20211111112639_add_fk_compliance_violations_merge_request.rb18
-rw-r--r--db/migrate/20211111112713_add_fk_compliance_violations_violating_user.rb18
-rw-r--r--db/migrate/20211111164025_add_squash_commit_template_to_project_settings.rb9
-rw-r--r--db/migrate/20211111164047_add_squash_commit_template_limit_to_project_settings.rb13
-rw-r--r--db/migrate/20211112073413_change_package_index_on_corpus.rb19
-rw-r--r--db/migrate/20211112155416_populate_default_value_for_personal_access_tokens_prefix.rb20
-rw-r--r--db/migrate/20211115132613_create_incident_management_timeline_events.rb30
-rw-r--r--db/migrate/20211115142803_add_foreign_key_to_incident_management_timeline_events_on_project.rb15
-rw-r--r--db/migrate/20211115142847_add_foreign_key_to_incident_management_timeline_events_on_user.rb15
-rw-r--r--db/migrate/20211115142911_add_foreign_key_to_incident_management_timeline_events_on_issue.rb15
-rw-r--r--db/migrate/20211115145107_add_created_at_to_namespace_monthly_usages.rb17
-rw-r--r--db/migrate/20211115154103_add_created_at_to_project_monthly_usage.rb17
-rw-r--r--db/migrate/20211116093739_add_foreign_key_to_incident_management_timeline_events_on_updated_by_user.rb15
-rw-r--r--db/migrate/20211117174209_create_vulnerability_reads.rb24
-rw-r--r--db/migrate/20211118100959_change_default_value_of_loose_fk_deleted_records_partition.rb9
-rw-r--r--db/migrate/20211118103439_remove_hardcoded_partition_from_loose_fk_trigger_function.rb40
-rw-r--r--db/migrate/20211118114228_add_max_ssh_key_lifetime_to_application_settings.rb7
-rw-r--r--db/migrate/20211118124537_add_foreign_key_to_vulnerability_reads_on_vulnerability.rb15
-rw-r--r--db/migrate/20211118124628_add_foreign_key_to_vulnerability_reads_on_project.rb15
-rw-r--r--db/migrate/20211118124650_add_foreign_key_to_vulnerability_reads_on_scanner.rb15
-rw-r--r--db/migrate/20211119085015_add_orignal_filename_to_ci_job_artifact.rb16
-rw-r--r--db/migrate/20211119111006_create_job_artifact_states.rb32
-rw-r--r--db/migrate/20211119154221_create_pages_deployment_states.rb38
-rw-r--r--db/migrate/20211119170805_remove_test_report_requirement_issue_constraint.rb16
-rw-r--r--db/migrate/20211119194024_add_required_approval_count_to_protected_environments.rb7
-rw-r--r--db/migrate/20211119195201_create_deployment_approvals.rb13
-rw-r--r--db/migrate/20211122103051_add_line_code_to_draft_notes.rb10
-rw-r--r--db/migrate/20211122215001_add_policy_idx_to_approval_merge_request_rule.rb9
-rw-r--r--db/migrate/20211123135255_create_batched_background_migration_job_transition_logs.rb38
-rw-r--r--db/migrate/20211123181236_add_user_foreign_key_to_deployment_approvals.rb15
-rw-r--r--db/migrate/20211123182614_make_iteration_cadences_start_date_nullable.rb7
-rw-r--r--db/migrate/20211124095704_add_draft_notes_line_code_text_limit.rb13
-rw-r--r--db/migrate/20211124132319_add_encrypted_static_objects_external_storage_auth_token.rb14
-rw-r--r--db/migrate/20211126042235_add_sequence_column_to_sprints_table.rb14
-rw-r--r--db/migrate/20211126113029_add_text_limit_for_static_objects_external_storage_auth_token.rb12
-rw-r--r--db/migrate/20211126115449_encrypt_static_objects_external_storage_auth_token.rb31
-rw-r--r--db/migrate/20211126142200_add_encrypted_static_object_token.rb16
-rw-r--r--db/migrate/20211126142354_add_text_limit_to_encrypted_static_object_token.rb13
-rw-r--r--db/migrate/20211126204445_add_task_to_work_item_types.rb31
-rw-r--r--db/migrate/20211129151155_add_migrated_to_new_structure_column_to_vulnerability_occurrences.rb7
-rw-r--r--db/migrate/20211129151832_add_index_on_vulnerability_occurrences_migrated_to_new_structure_column.rb15
-rw-r--r--db/migrate/20211130151724_add_foreign_key_to_incident_management_timeline_events_on_note.rb15
-rw-r--r--db/migrate/20211130205719_add_uniqueness_for_evidence_occurrence_id.rb18
-rw-r--r--db/migrate/20211201061733_add_future_subscriptions_to_application_settings.rb7
-rw-r--r--db/migrate/20211201143042_create_lfs_object_states.rb32
-rw-r--r--db/migrate/20211202041233_add_deployment_foreign_key_to_deployment_approvals.rb15
-rw-r--r--db/migrate/20211202094944_move_loose_fk_deleted_records_to_dynamic_schema.rb17
-rw-r--r--db/migrate/20211202135508_add_index_on_packages_build_infos_package_id_pipeline_id.rb18
-rw-r--r--db/migrate/20211203160952_add_updated_state_by_user_id_to_merge_request_reviewers.rb12
-rw-r--r--db/migrate/20211203161149_add_index_to_merge_request_reviewers_updated_state_by_user_id.rb15
-rw-r--r--db/migrate/20211203161840_add_updated_state_by_user_id_to_merge_request_assignees.rb9
-rw-r--r--db/migrate/20211203161942_add_index_to_merge_request_assignees_updated_state_by_user_id.rb15
-rw-r--r--db/migrate/20211204010826_add_index_snippets_on_project_id_and_title.rb15
-rw-r--r--db/migrate/20211207154413_add_ci_runners_index_on_created_at_where_active_is_false.rb15
-rw-r--r--db/migrate/20211207154414_add_ci_runners_index_on_contacted_at_where_active_is_false.rb15
-rw-r--r--db/migrate/20211207165508_add_protected_environments_required_approval_count_check_constraint.rb15
-rw-r--r--db/migrate/20211208111425_add_executor_type_column_to_ci_runners.rb7
-rw-r--r--db/migrate/20211209230042_add_status_to_cluster_agent_tokens.rb7
-rw-r--r--db/migrate/20211210025754_alter_constraint_of_phone.rb17
-rw-r--r--db/migrate/20211210031721_change_user_details_phone_text_limit.rb15
-rw-r--r--db/migrate/20211213130324_update_timelogs_spent_at_default.rb7
-rw-r--r--db/migrate/20211213142344_add_settings_user_email_lookup_limit.rb13
-rw-r--r--db/migrate/20211213154259_add_status_to_packages_package_files.rb7
-rw-r--r--db/migrate/20211213154704_add_status_index_to_packages_package_files.rb15
-rw-r--r--db/migrate/20211214110307_remove_temp_index_from_vulnerability_occurrences.rb15
-rw-r--r--db/migrate/20211215182006_update_application_settings_protected_paths.rb58
-rw-r--r--db/migrate/20211216133107_add_cluster_agent_id_to_vulnerability_reads.rb10
-rw-r--r--db/migrate/20211216134134_add_text_limit_to_vulnerability_reads_cluster_agent_id.rb13
-rw-r--r--db/migrate/20211216135651_add_index_to_cluster_agent_id.rb16
-rw-r--r--db/migrate/20211216220939_add_group_crm_settings.rb13
-rw-r--r--db/migrate/20211217050753_remove_artifacts_archive_id_foreign_key_from_project_pages_metadata.rb19
-rw-r--r--db/migrate/20211220174504_add_secure_scanning_actions_to_onboarding_progresses.rb15
-rw-r--r--db/migrate/20211223125921_add_temp_index_to_members_state.rb16
-rw-r--r--db/migrate/20211224112937_add_packages_cleanup_package_file_worker_capacity_to_application_settings.rb13
-rw-r--r--db/migrate/20211224114539_add_packages_cleanup_package_file_worker_capacity_check_constraint_to_app_settings.rb15
-rw-r--r--db/migrate/20220104174445_add_ci_runners_index_on_active_state.rb15
-rw-r--r--db/migrate/20220105082217_add_verification_token_to_external_ae_destinations.rb13
-rw-r--r--db/migrate/20220105121325_add_route_namespace_reference.rb13
-rw-r--r--db/migrate/20220105152547_add_foreign_key_to_updated_state_by_user_id_to_merge_request_assignees.rb15
-rw-r--r--db/migrate/20220105153149_add_foreign_key_to_updated_state_by_user_id_to_merge_request_reviewers.rb15
-rw-r--r--db/migrate/20220106111958_add_insert_or_update_vulnerability_reads_trigger.rb58
-rw-r--r--db/migrate/20220106112043_add_update_vulnerability_reads_trigger.rb40
-rw-r--r--db/migrate/20220106112085_add_update_vulnerability_reads_location_trigger.rb41
-rw-r--r--db/migrate/20220106141756_remove_lock_version_indexes.rb23
-rw-r--r--db/migrate/20220106163326_add_has_issues_on_vulnerability_reads_trigger.rb79
-rw-r--r--db/migrate/20220106230629_add_registry_migration_application_settings.rb15
-rw-r--r--db/migrate/20220106230712_add_migration_columns_to_container_repositories.rb19
-rw-r--r--db/migrate/20220107091629_add_route_namespace_index.rb19
-rw-r--r--db/migrate/20220107165036_remove_note_id_index.rb16
-rw-r--r--db/migrate/20220109133006_remove_ci_pipelines_lock_version_index.rb17
-rw-r--r--db/migrate/20220110170953_create_ci_secure_files.rb19
-rw-r--r--db/migrate/20220111095006_add_maintainer_note_to_ci_runners.rb12
-rw-r--r--db/migrate/20220111095007_add_text_limit_to_ci_runners_maintainer_note.rb13
-rw-r--r--db/migrate/20220111154950_add_token_expires_at_to_ci_runners.rb7
-rw-r--r--db/migrate/20220111154951_add_index_to_ci_runners_token_expires_at.rb15
-rw-r--r--db/migrate/20220111200254_remove_index_from_merge_requests.rb15
-rw-r--r--db/migrate/20220112115413_add_requires_verification_to_user_details.rb9
-rw-r--r--db/migrate/20220112205111_create_security_training_providers.rb14
-rw-r--r--db/migrate/20220112232037_add_member_namespace_reference.rb13
-rw-r--r--db/migrate/20220112232605_add_member_namespace_index.rb19
-rw-r--r--db/migrate/20220113125401_create_security_trainings.rb18
-rw-r--r--db/migrate/20220113135449_add_package_files_limit_to_application_settings.rb7
-rw-r--r--db/migrate/20220113135924_add_application_settings_package_files_limit_constraints.rb15
-rw-r--r--db/migrate/20220113164801_add_diffs_colors_to_user_preferences.rb13
-rw-r--r--db/migrate/20220113164901_add_text_limit_to_user_preferences_diffs_colors.rb15
-rw-r--r--db/migrate/20220114131950_add_status_only_index_to_packages_package_files.rb15
-rw-r--r--db/migrate/20220117082611_add_text_limit_to_exad_verification_tokens.rb13
-rw-r--r--db/migrate/20220117225936_add_text_limits_to_container_repositories_migration_columns.rb15
-rw-r--r--db/migrate/20220118015633_add_url_text_to_issuable_metric_images.rb10
-rw-r--r--db/migrate/20220118020026_add_url_text_limit_to_issuable_metric_images.rb13
-rw-r--r--db/migrate/20220118141950_add_text_limit_to_container_registry_import_target_plan.rb13
-rw-r--r--db/migrate/20220118155846_add_runner_token_expiration_interval_settings_to_application_settings.rb9
-rw-r--r--db/migrate/20220118155847_add_runner_token_expiration_interval_settings_to_namespace_settings.rb11
-rw-r--r--db/migrate/20220118155848_add_runner_token_expiration_interval_settings_to_project_settings.rb9
-rw-r--r--db/migrate/20220119094023_add_unique_index_to_aed_verification_token.rb15
-rw-r--r--db/migrate/20220119141407_add_dependency_proxy_size_to_namespace_statistics.rb7
-rw-r--r--db/migrate/20220119144253_add_dependency_proxy_size_to_namespace_root_storage_statistics.rb7
-rw-r--r--db/migrate/20220119170426_remove_temporary_vulnerability_occurrences_deduplication_index.rb20
-rw-r--r--db/migrate/20220119220620_add_scan_method_to_dast_site_profile.rb11
-rw-r--r--db/migrate/20220120033115_create_alert_management_alert_metric_images.rb18
-rw-r--r--db/migrate/20220120085655_add_ci_runner_project_index_to_runner_id_and_project_id.rb19
-rw-r--r--db/migrate/20220120160625_remove_temp_index_on_id_from_vulnerability_occurrences.rb15
-rw-r--r--db/migrate/20220120211831_temp_index_for_group_namespace_member_backfill.rb17
-rw-r--r--db/migrate/20220124200927_add_index_to_issues.rb17
-rw-r--r--db/migrate/20220125084127_add_cleanup_attempts_to_loose_foreign_keys_deleted_records.rb13
-rw-r--r--db/migrate/20220125122228_add_topics_non_private_projects_count.rb11
-rw-r--r--db/migrate/20220125122725_add_topics_non_private_projects_count_index.rb15
-rw-r--r--db/migrate/20220125230538_add_compound_index_on_project_id_and_id_for_vulnerabilities.rb15
-rw-r--r--db/migrate/20220126191624_add_scan_file_path_to_dast_site_profile.rb14
-rw-r--r--db/migrate/20220128093756_add_ecdsa_sk_and_ed25519_sk_key_restrictions_to_application_settings.rb10
-rw-r--r--db/migrate/20220128194722_add_index_on_migration_state_and_import_done_at_to_container_repositories.rb14
-rw-r--r--db/migrate/20220131135725_add_severity_level_to_merge_requests_compliance_violations.rb7
-rw-r--r--db/migrate/20220131192643_add_show_diff_preview_in_email_to_project_settings.rb9
-rw-r--r--db/migrate/20220201205300_remove_index_for_vulnerability_occurrences.rb17
-rw-r--r--db/migrate/20220202034409_add_tmp_index_on_id_and_migration_state_to_container_repositories.rb16
-rw-r--r--db/migrate/20220202115350_add_migration_indexes_to_container_repositories.rb21
-rw-r--r--db/migrate/20220203074916_add_topics_lower_name_index.rb15
-rw-r--r--db/migrate/20220203091304_fix_unique_packages_index_excluding_pending_destruction_status.rb28
-rw-r--r--db/migrate/20220203123333_add_batched_migration_max_batch.rb7
-rw-r--r--db/migrate/20220203133652_add_legacy_open_source_license_available_to_project_settings.rb9
-rw-r--r--db/migrate/20220203134942_add_hidden_to_projects.rb11
-rw-r--r--db/migrate/20220204093120_create_analytics_cycle_analytics_aggregations.rb43
-rw-r--r--db/migrate/20220204154220_add_index_on_greatest_done_at_to_container_repositories.rb17
-rw-r--r--db/migrate/20220204193000_add_integrations_encrypted_properties.rb8
-rw-r--r--db/migrate/20220207083129_add_users_get_by_id_limit_to_application_setting.rb15
-rw-r--r--db/migrate/20220208170445_add_not_valid_foreign_key_to_ci_builds_runner_id.rb15
-rw-r--r--db/migrate/20220208171826_update_default_scan_method_of_dast_site_profile.rb24
-rw-r--r--db/migrate/20220211090920_cleanup_populate_topics_non_private_projects_count.rb15
-rw-r--r--db/migrate/20220211125954_create_related_epic_links.rb18
-rw-r--r--db/migrate/20220211214605_update_integrations_trigger_type_new_on_insert_null_safe.rb36
-rw-r--r--db/migrate/20220213100000_remove_integration_type_triggers.rb32
-rw-r--r--db/migrate/20220215164709_update_application_settings_container_registry_exp_pol_worker_capacity_default.rb20
-rw-r--r--db/migrate/20220216110023_create_saved_replies.rb20
-rw-r--r--db/migrate/20220217100008_add_container_registry_expiration_policies_caching_to_application_settings.rb13
-rw-r--r--db/migrate/20220217113058_add_status_to_status_check_responses.rb7
-rw-r--r--db/migrate/20220221102333_change_maintainer_note_limit_in_ci_runner.rb24
-rw-r--r--db/migrate/20220222072536_add_target_access_levels_to_broadcast_messages.rb11
-rw-r--r--db/migrate/20220301002101_add_security_orchestration_policy_configuration_namespace_reference.rb11
-rw-r--r--db/migrate/20220301003502_add_security_orchestration_policy_configuration_namespace_index.rb27
-rw-r--r--db/migrate/20220301091503_add_not_null_constraint_to_security_policy_configurations.rb14
-rw-r--r--db/migrate/20220301175104_change_security_orchestration_policy_configuration_project_index.rb17
-rw-r--r--db/migrate/20220301175426_create_project_build_artifacts_size_refresh.rb24
-rw-r--r--db/migrate/20220302110724_add_group_features_table.rb19
-rw-r--r--db/migrate/20220303190555_add_comment_to_deployment_approvals.rb10
-rw-r--r--db/migrate/20220303191047_add_text_limit_to_deployment_approvals_comment.rb13
-rw-r--r--db/migrate/20220304052335_remove_not_null_contraint_on_title_from_sprints.rb17
-rw-r--r--db/migrate/20220304061631_remove_unique_index_for_sprints_on_iterations_cadence_id_and_title.rb15
-rw-r--r--db/migrate/20220304062107_remove_unique_index_for_sprints_on_project_id_and_title.rb15
-rw-r--r--db/migrate/20220304152729_add_default_to_required_python_on_packages_pypi_metadata.rb11
-rw-r--r--db/migrate/20220307203458_rename_user_email_lookup_limit_setting_to_search_settings.rb13
-rw-r--r--db/migrate/20220309100648_add_time_to_restore_service_dora_metric.rb7
-rw-r--r--db/migrate/20220310011530_add_database_grafana_config_to_application_settings.rb13
-rw-r--r--db/migrate/20220310011613_add_text_limit_to_database_grafana_application_settings.rb15
-rw-r--r--db/migrate/20220310101118_update_holder_name_limit.rb28
-rw-r--r--db/migrate/20220314094841_add_package_registry_access_level_into_project_features.rb13
-rw-r--r--db/migrate/20220314184009_create_protected_environment_approval_rules.rb30
-rw-r--r--db/migrate/20220314184009_init_schema.rb13
-rw-r--r--db/migrate/20221229172604_add_runner_registration_enabled_to_project_settings.rb9
-rw-r--r--db/migrate/20230127024835_add_database_apdex_settings_to_application_settings.rb7
-rw-r--r--db/migrate/20230207002330_add_project_group_link_on_delete_cascade_fk.rb21
-rw-r--r--db/migrate/20230222161226_add_custom_jira_regex_to_jira_tracker_data.rb12
-rw-r--r--db/migrate/20230222161954_add_text_limit_to_custom_jira_regex_fields.rb15
-rw-r--r--db/migrate/20230228183644_add_partitioning_info_to_postgres_foreign_keys.rb90
-rw-r--r--db/migrate/20230303232426_add_role_approvers_to_scan_result_policies.rb9
-rw-r--r--db/migrate/20230307000000_create_design_management_repository.rb11
-rw-r--r--db/migrate/20230307132729_create_schema_inconsistencies.rb15
-rw-r--r--db/migrate/20230307212637_remove_create_learn_gitlab_worker_job_instances.rb11
-rw-r--r--db/migrate/20230308154243_add_package_id_to_ml_candidates.rb7
-rw-r--r--db/migrate/20230308154244_add_package_id_foreign_key_to_ml_candidates.rb15
-rw-r--r--db/migrate/20230308154245_add_index_on_package_id_for_ml_candidates.rb15
-rw-r--r--db/migrate/20230313012226_create_search_indices.rb18
-rw-r--r--db/migrate/20230313012609_create_search_namespace_index_assignments.rb26
-rw-r--r--db/migrate/20230313014038_add_search_index_foreign_key_to_search_namespace_index_assignments.rb18
-rw-r--r--db/migrate/20230313031351_create_resource_link_events.rb15
-rw-r--r--db/migrate/20230313181536_create_packages_npm_metadata_caches.rb26
-rw-r--r--db/migrate/20230315053635_add_screenshot_to_abuse_reports.rb10
-rw-r--r--db/migrate/20230316093433_insert_daily_invites_trial_plan_limits.rb19
-rw-r--r--db/migrate/20230316095948_create_service_desk_custom_email_credentials.rb22
-rw-r--r--db/migrate/20230317162059_add_current_user_todos_work_item_widget.rb57
-rw-r--r--db/migrate/20230321085011_add_column_to_users_statistisc.rb7
-rw-r--r--db/migrate/20230321113956_add_indexes_to_merge_request_compliance_violations.rb29
-rw-r--r--db/migrate/20230321153304_rename_ml_candidates_iid_to_eid.rb13
-rw-r--r--db/migrate/20230321161218_add_project_access_token_limit_to_plan_limits.rb7
-rw-r--r--db/migrate/20230321161441_insert_project_access_token_limit.rb15
-rw-r--r--db/migrate/20230321162810_add_project_id_to_ml_candidates.rb9
-rw-r--r--db/migrate/20230321162902_add_index_on_project_id_on_ml_candidates.rb15
-rw-r--r--db/migrate/20230321163051_add_project_id_foreign_key_to_ml_candidates.rb15
-rw-r--r--db/migrate/20230321170734_add_internal_id_to_ml_candidates.rb7
-rw-r--r--db/migrate/20230321170803_add_index_on_project_id_on_internal_id_to_ml_candidates.rb15
-rw-r--r--db/migrate/20230322145403_add_project_id_foreign_key_to_packages_npm_metadata_caches.rb19
-rw-r--r--db/migrate/20230322151605_rerun_remove_invalid_deploy_access_level.rb26
-rw-r--r--db/migrate/20230322162512_add_valid_deploy_access_level_constraint.rb16
-rw-r--r--db/migrate/20230323021618_add_silent_mode_enabled_to_application_settings.rb7
-rw-r--r--db/migrate/20230323101138_add_award_emoji_work_item_widget.rb57
-rw-r--r--db/migrate/20230323120601_create_dora_performance_scores.rb16
-rw-r--r--db/migrate/20230323140745_add_root_directory_to_pages_deployment.rb10
-rw-r--r--db/migrate/20230323140746_add_text_limit_to_pages_deployment_root_directory.rb13
-rw-r--r--db/migrate/20230323153042_track_push_rules_deletions.rb15
-rw-r--r--db/migrate/20230323153328_track_tags_deletions.rb15
-rw-r--r--db/migrate/20230323191750_add_shard_settings_to_search_indices.rb8
-rw-r--r--db/migrate/20230327074932_add_text_limit_to_abuse_reports_screenshot.rb13
-rw-r--r--db/migrate/20230327123333_backfill_product_analytics_data_collector_host.rb20
-rw-r--r--db/migrate/20230328020316_delete_unused_index_on_merge_requests_on_state_id_and_merge_status.rb17
-rw-r--r--db/migrate/20230328023535_initialize_conversion_of_award_emoji_awardable_id_to_bigint.rb16
-rw-r--r--db/migrate/20230328031720_initialize_conversion_of_events_target_id_to_bigint.rb16
-rw-r--r--db/migrate/20230329032129_add_lock_version_to_terraform_state.rb9
-rw-r--r--db/migrate/20230329085754_add_foreign_key_to_resource_link_events_on_user.rb15
-rw-r--r--db/migrate/20230329152410_add_achievements_enabled_to_user_preferences.rb9
-rw-r--r--db/migrate/20230329194244_add_index_packages_debian_file_metadata_when_unknown.rb17
-rw-r--r--db/migrate/20230330101438_create_fk_ml_candidate_params_on_candidate_id.rb29
-rw-r--r--db/migrate/20230330101439_validate_fk_ml_candidate_params_on_candidate_id.rb13
-rw-r--r--db/migrate/20230330101440_remove_old_fk_ml_candidate_params_on_candidate_id.rb21
-rw-r--r--db/migrate/20230330101441_create_fk_ml_candidate_metrics_on_candidate_id.rb29
-rw-r--r--db/migrate/20230330101442_validate_fk_ml_candidate_metrics_on_candidate_id.rb13
-rw-r--r--db/migrate/20230330101443_remove_old_fk_ml_candidate_metrics_on_candidate_id.rb21
-rw-r--r--db/migrate/20230330215636_remove_unused_project_jira_indexes.rb34
-rw-r--r--db/migrate/20230331142006_add_open_ai_api_key_application_setting.rb8
-rw-r--r--db/migrate/20230403023440_add_database_max_running_batched_background_migrations_to_application_settings.rb8
-rw-r--r--db/migrate/20230403023441_set_max_running_batched_background_migrations_for_gitlab_com.rb17
-rw-r--r--db/migrate/20230403113620_add_pinned_nav_items_to_user_preference.rb9
-rw-r--r--db/migrate/20230403145705_add_purl_sync_to_settings.rb7
-rw-r--r--db/migrate/20230403164454_add_fork_storage_size_columns_to_root_storage_statistics.rb11
-rw-r--r--db/migrate/20230405102815_add_unique_namespace_index_to_storage_limit_exclusions.rb25
-rw-r--r--db/migrate/20230406040908_add_system_note_metadata_id__to_resource_link_events.rb7
-rw-r--r--db/migrate/20230406042906_add_unique_index_to_resource_link_events_on_system_note_metadata_id.rb15
-rw-r--r--db/migrate/20230406043900_add_system_note_metadata_foreign_key_to_resource_link_events.rb16
-rw-r--r--db/migrate/20230406060452_create_instance_external_audit_event_destinations.rb14
-rw-r--r--db/migrate/20230406073847_validate_foreign_key_for_resource_link_events_on_system_note_metadata_id.rb11
-rw-r--r--db/migrate/20230406095544_add_pa_configurator_base_to_app_settings.rb13
-rw-r--r--db/migrate/20230406134436_add_identity_toggle_to_user_preferences.rb9
-rw-r--r--db/migrate/20230406150254_create_agent_user_access_project_authorizations_table.rb17
-rw-r--r--db/migrate/20230406150354_create_agent_user_access_group_authorizations_table.rb17
-rw-r--r--db/migrate/20230406150454_add_fks_to_agent_user_access_authorizations.rb34
-rw-r--r--db/migrate/20230407164616_add_code_suggestions_to_namespace_settings.rb9
-rw-r--r--db/migrate/20230410092450_add_product_analytics_instrumentation_key_to_project_settings.rb21
-rw-r--r--db/migrate/20230411171001_create_abuse_trust_scores.rb16
-rw-r--r--db/migrate/20230412073614_create_issue_assignment_events.rb14
-rw-r--r--db/migrate/20230412080242_add_concurrent_fk_to_issue_assignment_events.rb16
-rw-r--r--db/migrate/20230412151659_add_ci_job_artifacts_file_final_path.rb12
-rw-r--r--db/migrate/20230413080906_create_merge_request_assignment_events.rb15
-rw-r--r--db/migrate/20230413080918_add_concurrent_fk_to_merge_request_assignment_events.rb16
-rw-r--r--db/migrate/20230413153140_add_text_limit_to_project_settings_instrumentation_key.rb13
-rw-r--r--db/post_migrate/20210826193907_add_unique_index_dast_site_token_project_id_and_url.rb19
-rw-r--r--db/post_migrate/20210830104800_reschedule_extract_project_topics_into_separate_table.rb18
-rw-r--r--db/post_migrate/20210831123008_drop_temporary_trigger_for_ci_sources_pipelines.rb28
-rw-r--r--db/post_migrate/20210901044202_push_event_payloads_bigint_conversion_remove_triggers.rb28
-rw-r--r--db/post_migrate/20210901044237_events_bigint_conversion_remove_triggers.rb26
-rw-r--r--db/post_migrate/20210901153324_slice_merge_request_diff_commit_migrations.rb59
-rw-r--r--db/post_migrate/20210901184511_prepare_async_indexes_for_ci_builds.rb80
-rw-r--r--db/post_migrate/20210902144144_drop_temporary_columns_and_triggers_for_ci_build_needs.rb26
-rw-r--r--db/post_migrate/20210906100316_drop_temporary_columns_and_triggers_for_ci_build_trace_chunks.rb20
-rw-r--r--db/post_migrate/20210906130643_drop_temporary_columns_and_triggers_for_taggings.rb18
-rw-r--r--db/post_migrate/20210907013944_cleanup_bigint_conversion_for_ci_builds_metadata.rb17
-rw-r--r--db/post_migrate/20210907021940_cleanup_bigint_conversion_for_ci_stages.rb19
-rw-r--r--db/post_migrate/20210907033745_cleanup_bigint_conversion_for_deployments.rb19
-rw-r--r--db/post_migrate/20210907041000_cleanup_bigint_conversion_for_geo_job_artifact_deleted_events.rb19
-rw-r--r--db/post_migrate/20210907211557_finalize_ci_builds_bigint_conversion.rb223
-rw-r--r--db/post_migrate/20210908132335_disable_job_token_scope_when_unused.rb11
-rw-r--r--db/post_migrate/20210909104800_reschedule_extract_project_topics_into_separate_table_2.rb16
-rw-r--r--db/post_migrate/20210909152027_remove_container_registry_enabled.rb17
-rw-r--r--db/post_migrate/20210910194952_update_report_type_for_existing_approval_project_rules.rb39
-rw-r--r--db/post_migrate/20210914094840_add_gin_index_on_pending_builds_namespace_traversal_ids.rb15
-rw-r--r--db/post_migrate/20210914095310_cleanup_orphan_project_access_tokens.rb54
-rw-r--r--db/post_migrate/20210915022415_cleanup_bigint_conversion_for_ci_builds.rb16
-rw-r--r--db/post_migrate/20210915202900_prepare_index_resource_group_status_commit_id_for_ci_builds.rb15
-rw-r--r--db/post_migrate/20210918201050_remove_old_pending_jobs_for_recalculate_vulnerabilities_occurrences_uuid.rb18
-rw-r--r--db/post_migrate/20210918202855_reschedule_pending_jobs_for_recalculate_vulnerabilities_occurrences_uuid.rb12
-rw-r--r--db/post_migrate/20210920232025_remove_ci_builds_foreign_key_from_terraform_state_versions.rb15
-rw-r--r--db/post_migrate/20210921062820_add_image_location_index_to_vulnerability_occurrences.rb18
-rw-r--r--db/post_migrate/20210922021816_drop_int4_columns_for_ci_job_artifacts.rb10
-rw-r--r--db/post_migrate/20210922025631_drop_int4_column_for_ci_sources_pipelines.rb9
-rw-r--r--db/post_migrate/20210922082019_drop_int4_column_for_events.rb9
-rw-r--r--db/post_migrate/20210922084115_concurrent_index_resource_group_status_commit_id_for_ci_builds.rb22
-rw-r--r--db/post_migrate/20210922091402_drop_int4_column_for_push_event_payloads.rb9
-rw-r--r--db/post_migrate/20210923133143_remove_redundant_taggings_index.rb15
-rw-r--r--db/post_migrate/20210923135909_remove_delayed_project_removal_from_namespaces.rb19
-rw-r--r--db/post_migrate/20210923192648_remove_foreign_keys_from_open_project_data_table.rb17
-rw-r--r--db/post_migrate/20210923192649_remove_open_project_data_table.rb22
-rw-r--r--db/post_migrate/20210927153807_update_issues_relative_position_indexes.rb24
-rw-r--r--db/post_migrate/20210930211936_backfill_user_namespace.rb26
-rw-r--r--db/post_migrate/20211004110500_add_temporary_index_to_issue_metrics.rb17
-rw-r--r--db/post_migrate/20211004110927_schedule_fix_first_mentioned_in_commit_at_job.rb27
-rw-r--r--db/post_migrate/20211004151202_remove_bio_html_from_user_details.rb10
-rw-r--r--db/post_migrate/20211005010101_rereschedule_delete_orphaned_deployments.rb23
-rw-r--r--db/post_migrate/20211005083015_recreate_index_security_ci_builds_on_name_and_id_parser_features.rb29
-rw-r--r--db/post_migrate/20211005194425_schedule_requirements_migration.rb35
-rw-r--r--db/post_migrate/20211006060436_schedule_populate_topics_total_projects_count_cache.rb23
-rw-r--r--db/post_migrate/20211006145004_finalize_indexes_for_ci_job_artifacts_expire_at_unlocked.rb16
-rw-r--r--db/post_migrate/20211006174114_add_namespace_index_on_type_sync.rb20
-rw-r--r--db/post_migrate/20211007093340_remove_analytics_snapshots_segment_id_column.rb17
-rw-r--r--db/post_migrate/20211007155221_schedule_populate_status_column_of_security_scans.rb11
-rw-r--r--db/post_migrate/20211011104843_add_new_loose_fk_index.rb20
-rw-r--r--db/post_migrate/20211011152701_cleanup_delete_orphaned_deployments_background_migration.rb15
-rw-r--r--db/post_migrate/20211012051221_add_index_btree_namespaces_traversal_ids.rb15
-rw-r--r--db/post_migrate/20211012143815_remove_merge_request_diff_commit_columns.rb13
-rw-r--r--db/post_migrate/20211012155931_remove_schedule_and_status_from_pending_alert_escalations.rb29
-rw-r--r--db/post_migrate/20211013125341_create_index_security_ci_builds_on_name_and_id_parser_features.rb26
-rw-r--r--db/post_migrate/20211018101552_add_index_to_tmp_project_id_column_on_namespaces_table.rb15
-rw-r--r--db/post_migrate/20211018101852_add_fk_to_tmp_project_id_column_on_namespaces_table.rb13
-rw-r--r--db/post_migrate/20211018102252_add_index_to_group_id_column_on_webhooks_table.rb15
-rw-r--r--db/post_migrate/20211018123316_remove_not_null_constraint_and_default_for_public_email.rb15
-rw-r--r--db/post_migrate/20211018152654_schedule_remove_duplicate_vulnerabilities_findings3.rb22
-rw-r--r--db/post_migrate/20211021131217_add_deployments_environment_id_and_ref_index.rb15
-rw-r--r--db/post_migrate/20211021140426_remove_geo_upload_deprecated_fields.rb27
-rw-r--r--db/post_migrate/20211021141930_drop_geo_upload_deleted_events_table.rb17
-rw-r--r--db/post_migrate/20211022112202_add_cluster_id_location_index_to_vulnerability_occurrences.rb18
-rw-r--r--db/post_migrate/20211022113000_drop_index_security_ci_builds_on_name_and_id_parser_features_broken.rb26
-rw-r--r--db/post_migrate/20211022160154_remove_outdated_fields_from_geo_node_status.rb12
-rw-r--r--db/post_migrate/20211022214523_schedule_recalculate_vulnerability_finding_signatures_for_findings.rb17
-rw-r--r--db/post_migrate/20211023102243_schedule_delete_invalid_epic_issues.rb14
-rw-r--r--db/post_migrate/20211026070408_backfill_issue_search_data.rb22
-rw-r--r--db/post_migrate/20211027043206_track_ci_pipeline_deletions.rb15
-rw-r--r--db/post_migrate/20211027043229_track_ci_build_deletions.rb15
-rw-r--r--db/post_migrate/20211027064021_track_deletions_in_ci_runners.rb15
-rw-r--r--db/post_migrate/20211027064156_track_deletions_in_chat_names.rb15
-rw-r--r--db/post_migrate/20211027112901_drop_index_keys_on_expires_at_and_before_expiry_notification_undelivered.rb17
-rw-r--r--db/post_migrate/20211027204011_remove_index_for_dormant_users.rb17
-rw-r--r--db/post_migrate/20211028085926_add_occurrence_id_id_desc_index_to_vulnerability_occurrence_pipelines.rb23
-rw-r--r--db/post_migrate/20211028100303_tmp_index_for_delete_issue_merge_request_taggings_records.rb16
-rw-r--r--db/post_migrate/20211028100843_delete_issue_merge_request_taggings_records.rb23
-rw-r--r--db/post_migrate/20211028123412_add_async_index_on_events_using_btree_created_at_id.rb16
-rw-r--r--db/post_migrate/20211028155449_schedule_fix_merge_request_diff_commit_users_migration.rb55
-rw-r--r--db/post_migrate/20211029102822_add_open_source_plan.rb39
-rw-r--r--db/post_migrate/20211031152417_add_indexes_to_issue_stage_events.rb41
-rw-r--r--db/post_migrate/20211031154919_add_indexes_to_merge_request_stage_events.rb41
-rw-r--r--db/post_migrate/20211101222614_consume_remaining_user_namespace_jobs.rb26
-rw-r--r--db/post_migrate/20211102103127_add_temp_index_to_vulnerability_occurrences.rb15
-rw-r--r--db/post_migrate/20211102114802_update_vulnerability_occurrences_location.rb24
-rw-r--r--db/post_migrate/20211103141403_remove_propagate_service_template_worker.rb11
-rw-r--r--db/post_migrate/20211103162025_add_index_on_events_using_btree_created_at_id.rb17
-rw-r--r--db/post_migrate/20211103184303_drop_runner_features_from_ci_builds_metadata.rb13
-rw-r--r--db/post_migrate/20211104044453_remove_redundant_events_index.rb13
-rw-r--r--db/post_migrate/20211104165220_remove_vulnerability_finding_links.rb14
-rw-r--r--db/post_migrate/20211105135157_drop_ci_build_trace_sections.rb99
-rw-r--r--db/post_migrate/20211109112454_drop_old_loose_fk_deleted_records_index.rb20
-rw-r--r--db/post_migrate/20211110143306_add_not_null_constraint_to_security_findings_uuid.rb20
-rw-r--r--db/post_migrate/20211110151320_add_temporary_index_on_security_findings_uuid.rb23
-rw-r--r--db/post_migrate/20211110151350_schedule_drop_invalid_security_findings.rb25
-rw-r--r--db/post_migrate/20211112113300_remove_ci_pipeline_chat_data_fk_on_chat_names.rb22
-rw-r--r--db/post_migrate/20211115151704_add_index_on_projects_import_type_id.rb15
-rw-r--r--db/post_migrate/20211116091751_change_namespace_type_default_to_user.rb17
-rw-r--r--db/post_migrate/20211116111644_schedule_remove_occurrence_pipelines_and_duplicate_vulnerabilities_findings.rb23
-rw-r--r--db/post_migrate/20211117084814_migrate_remaining_u2f_registrations.rb26
-rw-r--r--db/post_migrate/20211118130836_drop_pages_deployments_builds_fk.rb22
-rw-r--r--db/post_migrate/20211118194239_drop_invalid_remediations.rb25
-rw-r--r--db/post_migrate/20211119085036_add_text_limit_to_job_artifact_original_filename.rb13
-rw-r--r--db/post_migrate/20211122033501_improve_index_on_events_for_calendar.rb13
-rw-r--r--db/post_migrate/20211122193948_cleanup_background_migration_of_requirements_to_work_items.rb17
-rw-r--r--db/post_migrate/20211123161906_cleanup_after_drop_invalid_security_findings.rb26
-rw-r--r--db/post_migrate/20211124132705_change_index_users_on_public_email.rb22
-rw-r--r--db/post_migrate/20211125120444_add_index_todos_project_id_user_id.rb15
-rw-r--r--db/post_migrate/20211130165043_backfill_sequence_column_for_sprints_table.rb24
-rw-r--r--db/post_migrate/20211130201100_track_deletions_in_namespaces.rb15
-rw-r--r--db/post_migrate/20211130201101_track_deletions_in_projects.rb15
-rw-r--r--db/post_migrate/20211201101541_drop_clusters_applications_runners_ci_runners_fk.rb15
-rw-r--r--db/post_migrate/20211202145237_add_todos_project_and_id_index.rb32
-rw-r--r--db/post_migrate/20211203091642_add_index_to_projects_on_marked_for_deletion_at.rb15
-rw-r--r--db/post_migrate/20211206073851_create_calendar_events_index_synchronously.rb15
-rw-r--r--db/post_migrate/20211206074547_remove_old_calendar_events_index.rb18
-rw-r--r--db/post_migrate/20211206161271_add_indexes_for_primary_email_cleanup_migration.rb28
-rw-r--r--db/post_migrate/20211207081708_add_index_ci_job_artifacts_project_id_file_type.rb15
-rw-r--r--db/post_migrate/20211207090503_cleanup_first_mentioned_in_commit_jobs.rb22
-rw-r--r--db/post_migrate/20211207125331_remove_jobs_for_recalculate_vulnerabilities_occurrences_uuid.rb16
-rw-r--r--db/post_migrate/20211207135331_schedule_recalculate_uuid_on_vulnerabilities_occurrences4.rb28
-rw-r--r--db/post_migrate/20211207173510_remove_extra_finding_evidence_tables_foreign_keys.rb57
-rw-r--r--db/post_migrate/20211207173511_remove_extra_finding_evidence_tables.rb71
-rw-r--r--db/post_migrate/20211208122200_schedule_backfill_ci_namespace_mirrors.rb11
-rw-r--r--db/post_migrate/20211208122201_schedule_backfill_ci_project_mirrors.rb11
-rw-r--r--db/post_migrate/20211208171402_reschedule_recalculate_vulnerability_finding_signatures_for_findings.rb27
-rw-r--r--db/post_migrate/20211209093636_track_ci_job_artifacts_deletes.rb15
-rw-r--r--db/post_migrate/20211209093828_track_users_deletes.rb15
-rw-r--r--db/post_migrate/20211209093923_track_external_pull_requests_deletes.rb15
-rw-r--r--db/post_migrate/20211209094222_track_merge_requests_deletes.rb15
-rw-r--r--db/post_migrate/20211209103048_backfill_project_namespaces_for_group.rb41
-rw-r--r--db/post_migrate/20211209203820_add_tmp_index_on_report_type.rb16
-rw-r--r--db/post_migrate/20211209203821_convert_stringified_raw_metadata_hash_to_json.rb25
-rw-r--r--db/post_migrate/20211210140000_add_temporary_static_object_token_index.rb15
-rw-r--r--db/post_migrate/20211210140629_encrypt_static_object_token.rb22
-rw-r--r--db/post_migrate/20211210173137_remove_vulnerability_finding_links_again.rb14
-rw-r--r--db/post_migrate/20211213064821_add_agent_id_location_index_to_vulnerability_occurrences.rb18
-rw-r--r--db/post_migrate/20211213102111_drop_ci_pipelines_mr_metrics_fk.rb15
-rw-r--r--db/post_migrate/20211214012507_backfill_incident_issue_escalation_statuses.rb9
-rw-r--r--db/post_migrate/20211215090620_schedule_update_timelogs_null_spent_at.rb23
-rw-r--r--db/post_migrate/20211217120000_modify_kubernetes_resource_location_index_to_vulnerability_occurrences.rb41
-rw-r--r--db/post_migrate/20211217145923_add_index_to_events_on_author_id_and_action_and_id.rb14
-rw-r--r--db/post_migrate/20211217174331_mark_recalculate_finding_signatures_as_completed.rb20
-rw-r--r--db/post_migrate/20211220064757_drop_temporary_indexes_for_primary_email_migration.rb28
-rw-r--r--db/post_migrate/20211220120402_add_index_on_ci_pipelines_user_id_id_failure_reason.rb15
-rw-r--r--db/post_migrate/20211220123956_update_invalid_member_states.rb21
-rw-r--r--db/post_migrate/20211229023654_add_async_index_ci_job_artifacts_project_id_file_type.rb15
-rw-r--r--db/post_migrate/20211230112517_remove_index_events_on_author_id_and_action_and_id.rb17
-rw-r--r--db/post_migrate/20211230113031_add_index_to_events_on_author_id_and_id.rb15
-rw-r--r--db/post_migrate/20220104060049_remove_foreign_key_ci_group_variables_group_id.rb17
-rw-r--r--db/post_migrate/20220105020514_remove_ci_minutes_additional_packs_namespace_id_foreign_key_constraint.rb17
-rw-r--r--db/post_migrate/20220106185033_remove_finding_evidence_summary.rb15
-rw-r--r--db/post_migrate/20220106231518_remove_foreign_key_ci_daily_build_group_report_results_group_id.rb17
-rw-r--r--db/post_migrate/20220106233459_remove_foreign_key_ci_pending_builds_namespace_id.rb17
-rw-r--r--db/post_migrate/20220106235626_remove_foreign_key_ci_runner_namespaces_namespace_id.rb17
-rw-r--r--db/post_migrate/20220107064845_populate_vulnerability_reads.rb25
-rw-r--r--db/post_migrate/20220109134455_add_idx_vulnerability_occurrences_dedup_again.rb17
-rw-r--r--db/post_migrate/20220110171049_schedule_populate_test_reports_issue_id.rb23
-rw-r--r--db/post_migrate/20220110224913_remove_dast_scanner_profiles_builds_ci_build_id_fk.rb18
-rw-r--r--db/post_migrate/20220110231420_remove_requirements_management_test_reports_build_id_fk.rb18
-rw-r--r--db/post_migrate/20220110233155_remove_dast_site_profiles_builds_ci_build_id_fk.rb18
-rw-r--r--db/post_migrate/20220111002756_remove_security_scans_build_id_fk.rb18
-rw-r--r--db/post_migrate/20220111023852_index_cluster_agent_tokens_on_status.rb15
-rw-r--r--db/post_migrate/20220111093534_remove_index_on_auto_stop_in.rb17
-rw-r--r--db/post_migrate/20220111101421_remove_index_on_merge_request_id.rb17
-rw-r--r--db/post_migrate/20220111102314_truncate_ci_mirror_tables.rb14
-rw-r--r--db/post_migrate/20220111221516_remove_projects_ci_pending_builds_fk.rb15
-rw-r--r--db/post_migrate/20220112015940_remove_projects_ci_running_builds_fk.rb17
-rw-r--r--db/post_migrate/20220112090556_remove_cascade_delete_from_project_namespace_foreign_key.rb23
-rw-r--r--db/post_migrate/20220112230642_remove_projects_ci_unit_tests_project_id_fk.rb15
-rw-r--r--db/post_migrate/20220112232723_remove_projects_ci_daily_build_group_report_results_project_id_fk.rb16
-rw-r--r--db/post_migrate/20220113013319_remove_projects_ci_freeze_periods_project_id_fk.rb15
-rw-r--r--db/post_migrate/20220113014438_remove_projects_ci_resource_groups_project_id_fk.rb15
-rw-r--r--db/post_migrate/20220113015830_remove_projects_ci_build_report_results_project_id_fk.rb15
-rw-r--r--db/post_migrate/20220113035519_remove_users_ci_job_token_project_scope_links_added_by_id_fk.rb15
-rw-r--r--db/post_migrate/20220113040447_remove_users_ci_pipeline_schedules_owner_id_fk.rb15
-rw-r--r--db/post_migrate/20220113111440_schedule_fix_incorrect_max_seats_used.rb20
-rw-r--r--db/post_migrate/20220114105525_add_index_on_projects_path.rb17
-rw-r--r--db/post_migrate/20220116175851_add_author_index_to_design_management_versions.rb16
-rw-r--r--db/post_migrate/20220117034056_remove_index_cluster_agent_tokens_on_agent_id_and_last_used_at.rb15
-rw-r--r--db/post_migrate/20220118204039_self_managed_reschedule_recalculate_vulnerability_finding_signatures_for_findings.rb29
-rw-r--r--db/post_migrate/20220119094503_populate_audit_event_streaming_verification_token.rb19
-rw-r--r--db/post_migrate/20220119141736_remove_projects_ci_pipeline_artifacts_project_id_fk.rb17
-rw-r--r--db/post_migrate/20220119143130_remove_projects_ci_sources_pipelines_source_project_id_fk.rb17
-rw-r--r--db/post_migrate/20220119144458_remove_users_ci_triggers_owner_id_fk.rb17
-rw-r--r--db/post_migrate/20220119151221_remove_merge_requests_ci_pipelines_merge_request_id_fk.rb19
-rw-r--r--db/post_migrate/20220119153706_remove_ci_pipelines_merge_trains_pipeline_id_fk.rb17
-rw-r--r--db/post_migrate/20220119154442_remove_ci_pipelines_merge_requests_head_pipeline_id_fk.rb17
-rw-r--r--db/post_migrate/20220119193130_remove_ci_pipelines_dast_profiles_pipelines_ci_pipeline_id_fk.rb17
-rw-r--r--db/post_migrate/20220119201340_remove_ci_pipelines_vulnerability_statistics_latest_pipeline_id_fk.rb17
-rw-r--r--db/post_migrate/20220119203119_remove_ci_pipelines_vulnerability_occurrence_pipelines_pipeline_id_fk.rb17
-rw-r--r--db/post_migrate/20220120094340_drop_position_from_security_findings.rb9
-rw-r--r--db/post_migrate/20220120123700_add_tmp_index_routes_id_for_namespaces.rb17
-rw-r--r--db/post_migrate/20220120123800_backfill_namespace_id_for_namespace_routes.rb27
-rw-r--r--db/post_migrate/20220120211832_backfill_member_namespace_id_for_group_members.rb27
-rw-r--r--db/post_migrate/20220121214752_remove_projects_ci_stages_project_id_fk.rb20
-rw-r--r--db/post_migrate/20220121214753_re_remove_projects_ci_stages_project_id_fk.rb19
-rw-r--r--db/post_migrate/20220121221651_remove_projects_ci_variables_project_id_fk.rb19
-rw-r--r--db/post_migrate/20220124130028_dedup_runner_projects.rb71
-rw-r--r--db/post_migrate/20220124145019_remove_projects_external_pull_requests_project_id_fk.rb19
-rw-r--r--db/post_migrate/20220124151456_remove_projects_ci_triggers_project_id_fk.rb19
-rw-r--r--db/post_migrate/20220124151949_remove_projects_ci_runner_projects_project_id_fk.rb19
-rw-r--r--db/post_migrate/20220124152824_remove_projects_ci_subscriptions_projects_downstream_project_id_fk.rb19
-rw-r--r--db/post_migrate/20220124153233_remove_projects_ci_job_artifacts_project_id_fk.rb20
-rw-r--r--db/post_migrate/20220124153234_re_remove_projects_ci_job_artifacts_project_id_fk.rb19
-rw-r--r--db/post_migrate/20220124180704_remove_projects_ci_builds_metadata_project_id_fk.rb20
-rw-r--r--db/post_migrate/20220124180705_re_remove_projects_ci_builds_metadata_project_id_fk.rb19
-rw-r--r--db/post_migrate/20220124184338_remove_projects_ci_subscriptions_projects_upstream_project_id_fk.rb19
-rw-r--r--db/post_migrate/20220124204046_remove_projects_ci_sources_pipelines_project_id_fk.rb19
-rw-r--r--db/post_migrate/20220124214131_remove_projects_ci_refs_project_id_fk.rb19
-rw-r--r--db/post_migrate/20220124215857_remove_projects_ci_job_token_project_scope_links_source_project_id_fk.rb19
-rw-r--r--db/post_migrate/20220124221521_remove_projects_ci_project_monthly_usages_project_id_fk.rb19
-rw-r--r--db/post_migrate/20220125083520_remove_ci_pipelines_dast_site_profiles_pipelines_ci_pipeline_id_fk.rb19
-rw-r--r--db/post_migrate/20220125084348_remove_ci_pipelines_vulnerability_feedback_pipeline_id_fk.rb19
-rw-r--r--db/post_migrate/20220125122640_schedule_populate_topics_non_private_projects_count.rb23
-rw-r--r--db/post_migrate/20220126201752_remove_projects_ci_job_token_project_scope_links_target_project_id_fk.rb19
-rw-r--r--db/post_migrate/20220126202654_remove_projects_ci_sources_projects_source_project_id_fk.rb19
-rw-r--r--db/post_migrate/20220126203421_remove_projects_ci_pipeline_schedules_project_id_fk.rb19
-rw-r--r--db/post_migrate/20220126210021_remove_projects_ci_builds_project_id_fk.rb20
-rw-r--r--db/post_migrate/20220126210022_re_remove_projects_ci_builds_project_id_fk.rb19
-rw-r--r--db/post_migrate/20220126210657_remove_projects_ci_pipelines_project_id_fk.rb19
-rw-r--r--db/post_migrate/20220127112243_add_index_to_merge_request_assignees_state.rb15
-rw-r--r--db/post_migrate/20220127112412_add_index_to_merge_request_reviewers_state.rb15
-rw-r--r--db/post_migrate/20220127132200_cleanup_backfill_ci_namespace_mirrors.rb11
-rw-r--r--db/post_migrate/20220127132201_cleanup_backfill_ci_project_mirrors.rb11
-rw-r--r--db/post_migrate/20220128103042_schedule_delete_invalid_epic_issues_revised.rb27
-rw-r--r--db/post_migrate/20220128155251_remove_dangling_running_builds.rb25
-rw-r--r--db/post_migrate/20220128155814_fix_approval_rules_code_owners_rule_type_index.rb23
-rw-r--r--db/post_migrate/20220131000000_index_job_artifacts_on_trace_type_and_expire_at.rb16
-rw-r--r--db/post_migrate/20220131000001_schedule_trace_expiry_removal.rb55
-rw-r--r--db/post_migrate/20220201034731_remove_index_clusters_kubernetes_namespaces_on_cluster_id.rb15
-rw-r--r--db/post_migrate/20220201141705_cleanup_background_migration_populate_test_reports_issue_id.rb15
-rw-r--r--db/post_migrate/20220201173212_add_user_details_provisioning_index.rb18
-rw-r--r--db/post_migrate/20220201193033_add_unique_index_to_vulnerability_finding_links_with_truncate.rb20
-rw-r--r--db/post_migrate/20220202105733_delete_service_template_records.rb16
-rw-r--r--db/post_migrate/20220204053655_remove_index_epic_issues_on_epic_id.rb15
-rw-r--r--db/post_migrate/20220204095121_backfill_namespace_statistics_with_dependency_proxy_size.rb25
-rw-r--r--db/post_migrate/20220204110725_backfill_cycle_analytics_aggregations.rb33
-rw-r--r--db/post_migrate/20220204194347_encrypt_integration_properties.rb22
-rw-r--r--db/post_migrate/20220207080758_update_api_indexes_for_projects.rb48
-rw-r--r--db/post_migrate/20220208080921_schedule_migrate_personal_namespace_project_maintainer_to_owner.rb25
-rw-r--r--db/post_migrate/20220208115439_start_backfill_ci_queuing_tables.rb24
-rw-r--r--db/post_migrate/20220209111007_add_partial_index_for_batching_active_cluster_image_scanning_vulnerabilities.rb16
-rw-r--r--db/post_migrate/20220212120735_schedule_fix_incorrect_max_seats_used2.rb20
-rw-r--r--db/post_migrate/20220213103859_remove_integrations_type.rb132
-rw-r--r--db/post_migrate/20220213104531_create_indexes_on_integration_type_new.rb60
-rw-r--r--db/post_migrate/20220215190020_rerun_convert_stringified_raw_metadata_hash_to_json.rb27
-rw-r--r--db/post_migrate/20220216201949_remove_package_files_limit_from_application_settings.rb18
-rw-r--r--db/post_migrate/20220217135229_validate_not_null_constraint_on_security_findings_uuid.rb13
-rw-r--r--db/post_migrate/20220221214928_remove_show_diff_preview_in_email_column.rb13
-rw-r--r--db/post_migrate/20220222191845_remove_not_null_constraint_for_security_scan_succeeded.rb11
-rw-r--r--db/post_migrate/20220222192524_create_not_null_constraint_releases_tag.rb13
-rw-r--r--db/post_migrate/20220222192525_remove_null_releases.rb24
-rw-r--r--db/post_migrate/20220223112304_schedule_nullify_orphan_runner_id_on_ci_builds.rb27
-rw-r--r--db/post_migrate/20220223124428_schedule_merge_topics_with_same_name.rb23
-rw-r--r--db/post_migrate/20220224000000_async_build_trace_expire_at_index.rb14
-rw-r--r--db/post_migrate/20220224204415_recreate_index_security_ci_builds_on_name_and_id_parser_with_new_features.rb31
-rw-r--r--db/post_migrate/20220225133705_cleanup_backfill_ci_queuing_tables.rb15
-rw-r--r--db/post_migrate/20220301093434_backfill_all_project_namespaces.rb29
-rw-r--r--db/post_migrate/20220302114046_backfill_group_features.rb27
-rw-r--r--db/post_migrate/20220302203410_create_index_security_ci_builds_on_name_and_id_parser_with_new_features.rb28
-rw-r--r--db/post_migrate/20220304165107_drop_partitioned_foreign_keys.rb19
-rw-r--r--db/post_migrate/20220304201847_add_unique_index_on_security_training_providers.rb15
-rw-r--r--db/post_migrate/20220305223212_add_security_training_providers.rb40
-rw-r--r--db/post_migrate/20220307192534_create_index_for_remove_duplicate_project_tag_releases.rb17
-rw-r--r--db/post_migrate/20220307192610_remove_duplicate_project_tag_releases.rb26
-rw-r--r--db/post_migrate/20220307192645_remove_index_for_remove_duplicate_project_tag_releases.rb17
-rw-r--r--db/post_migrate/20220307192725_create_unique_index_release_tag_project.rb23
-rw-r--r--db/post_migrate/20220307203459_rename_user_email_lookup_limit_setting_to_search_settings_cleanup.rb15
-rw-r--r--db/post_migrate/20220308000205_drop_old_index_security_ci_builds_on_name_and_id_parser_features.rb26
-rw-r--r--db/post_migrate/20220308115219_schedule_reset_duplicate_ci_runners_token_encrypted_values_on_projects.rb27
-rw-r--r--db/post_migrate/20220308115502_schedule_reset_duplicate_ci_runners_token_values_on_projects.rb27
-rw-r--r--db/post_migrate/20220309084838_remove_external_pull_request_tracking.rb15
-rw-r--r--db/post_migrate/20220309084954_remove_leftover_external_pull_request_deletions.rb30
-rw-r--r--db/post_migrate/20220309154855_add_index_on_issues_closed_incidents.rb15
-rw-r--r--db/post_migrate/20220310095341_add_async_index_ci_job_artifacts_project_id_created_at.rb16
-rw-r--r--db/post_migrate/20220310134207_add_index_project_id_and_released_at_and_id_on_releases.rb16
-rw-r--r--db/post_migrate/20220310141349_remove_dependency_list_usage_data_from_redis.rb13
-rw-r--r--db/post_migrate/20220311010352_create_scan_id_and_id_index_on_security_findings.rb15
-rw-r--r--db/post_migrate/20220314154235_migrate_vulnerability_approval_rules.rb17
-rw-r--r--db/post_migrate/20220314162342_add_index_ci_job_artifacts_project_id_created_at.rb15
-rw-r--r--db/post_migrate/20221228103133_queue_backfill_admin_mode_scope_for_personal_access_tokens.rb18
-rw-r--r--db/post_migrate/20230131194959_remove_invalid_deploy_access_level.rb11
-rw-r--r--db/post_migrate/20230208125736_schedule_migration_for_links.rb11
-rw-r--r--db/post_migrate/20230209222452_schedule_remove_project_group_link_with_missing_groups.rb27
-rw-r--r--db/post_migrate/20230221093535_add_sync_tmp_partial_index_on_vulnerability_report_types.rb16
-rw-r--r--db/post_migrate/20230221093536_schedule_migrate_shared_vulnerability_identifiers.rb26
-rw-r--r--db/post_migrate/20230224144233_migrate_evidences_from_raw_metadata.rb11
-rw-r--r--db/post_migrate/20230301020246_ensure_mr_user_mentions_note_id_bigint_backfill_is_finished_for_gitlab_dot_com.rb29
-rw-r--r--db/post_migrate/20230301020356_swap_merge_request_user_mentions_note_id_to_bigint.rb83
-rw-r--r--db/post_migrate/20230306195007_queue_backfill_project_wiki_repositories.rb16
-rw-r--r--db/post_migrate/20230309085547_prepare_ci_builds_constraints_for_list_partitioning.rb15
-rw-r--r--db/post_migrate/20230313031629_ensure_commit_user_mentions_note_id_bigint_backfill_is_finished_for_gitlab_dot_com.rb29
-rw-r--r--db/post_migrate/20230313142631_backfill_ml_candidates_package_id.rb23
-rw-r--r--db/post_migrate/20230314144640_reschedule_migration_for_links.rb32
-rw-r--r--db/post_migrate/20230314210657_set_email_confirmation_setting_from_soft_email_confirmation_ff.rb23
-rw-r--r--db/post_migrate/20230315084704_finalize_issues_iid_scoping_to_namespace.rb20
-rw-r--r--db/post_migrate/20230315161408_finalize_set_notifications_bigint_conversion_backfill.rb34
-rw-r--r--db/post_migrate/20230316014651_remove_index_on_events_action.rb13
-rw-r--r--db/post_migrate/20230316114426_swap_ci_runner_machine_builds_primary_key.rb11
-rw-r--r--db/post_migrate/20230316164917_remove_packages_events_package_id_fk.rb31
-rw-r--r--db/post_migrate/20230316185746_drop_packages_events_table.rb23
-rw-r--r--db/post_migrate/20230317075852_add_tmp_unique_packages_index_when_debian.rb23
-rw-r--r--db/post_migrate/20230317080000_ensure_unique_debian_packages.rb48
-rw-r--r--db/post_migrate/20230317080137_add_unique_packages_index_when_debian.rb29
-rw-r--r--db/post_migrate/20230317151841_remove_from_to_state_constraint.rb21
-rw-r--r--db/post_migrate/20230317195228_prepare_async_sent_notifications_index.rb27
-rw-r--r--db/post_migrate/20230319105436_remove_member_role_download_code.rb7
-rw-r--r--db/post_migrate/20230320110802_add_index_to_vulnerability_findings_on_uuid.rb19
-rw-r--r--db/post_migrate/20230320155635_add_index_to_namespace_details.rb17
-rw-r--r--db/post_migrate/20230321003252_swap_commit_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb68
-rw-r--r--db/post_migrate/20230321011529_ensure_vum_bigint_backfill_is_finished_for_gl_dot_com.rb29
-rw-r--r--db/post_migrate/20230321011903_swap_vulnerability_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb74
-rw-r--r--db/post_migrate/20230321024333_ensure_design_user_mentions_note_id_bigint_backfill_is_finished_for_gitlab_dot_com.rb29
-rw-r--r--db/post_migrate/20230321024903_swap_design_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb68
-rw-r--r--db/post_migrate/20230321095759_remove_namespaces_broadcast_messages_namespace_id_fk.rb20
-rw-r--r--db/post_migrate/20230321124837_remove_ci_builds_partition_id_default.rb13
-rw-r--r--db/post_migrate/20230321153035_add_package_id_created_at_desc_index_to_package_files.rb15
-rw-r--r--db/post_migrate/20230321153337_cleanup_ml_candidates_iid_rename.rb13
-rw-r--r--db/post_migrate/20230321163547_cleanup_conversion_big_int_ci_build_needs.rb15
-rw-r--r--db/post_migrate/20230321163947_backfill_ml_candidates_project_id.rb23
-rw-r--r--db/post_migrate/20230321170823_backfill_ml_candidates_internal_id.rb21
-rw-r--r--db/post_migrate/20230322011220_ensure_snippet_user_mentions_bigint_backfill_is_finished_for_gitlab_dot_com.rb29
-rw-r--r--db/post_migrate/20230322012209_swap_snippet_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb74
-rw-r--r--db/post_migrate/20230322023442_ensure_note_diff_files_bigint_backfill_is_finished_for_gitlab_dot_com.rb29
-rw-r--r--db/post_migrate/20230322085041_remove_user_namespace_records_from_vsa_aggregation.rb26
-rw-r--r--db/post_migrate/20230322085852_validate_partitioning_constraint_on_ci_builds.rb12
-rw-r--r--db/post_migrate/20230322151635_cleanup_bigint_conversion_for_merge_request_metrics.rb29
-rw-r--r--db/post_migrate/20230322203927_change_user_type_default.rb13
-rw-r--r--db/post_migrate/20230323005730_add_unique_index_diff_note_id_convert_to_bigint_for_gitlab_com.rb30
-rw-r--r--db/post_migrate/20230323010111_add_fk_on_diff_note_id_convert_to_bigint_for_gitlab_com.rb43
-rw-r--r--db/post_migrate/20230323013251_async_validate_fk_note_diff_files_diff_note_id_convert_to_bigint_for_gitlab_com.rb27
-rw-r--r--db/post_migrate/20230323131521_remove_machine_id_from_builds_metadata.rb22
-rw-r--r--db/post_migrate/20230323153433_fix_application_setting_push_rule_id_fk.rb20
-rw-r--r--db/post_migrate/20230327125705_add_index_to_vulnerability_finding_signatures_on_signature_sha.rb15
-rw-r--r--db/post_migrate/20230327144152_remove_ci_builds_partition_id_default_v2.rb13
-rw-r--r--db/post_migrate/20230328023554_backfill_award_emoji_awardable_id_for_bigint_conversion.rb16
-rw-r--r--db/post_migrate/20230328031838_backfill_events_target_id_for_bigint_conversion.rb16
-rw-r--r--db/post_migrate/20230328100534_truncate_error_tracking_tables.rb20
-rw-r--r--db/post_migrate/20230328151756_prepare_async_index_for_security_scans_on_pipeline_id_and_scan_type.rb16
-rw-r--r--db/post_migrate/20230328184031_swap_sent_notifications_id_columns.rb59
-rw-r--r--db/post_migrate/20230329091107_truncate_p_ci_runner_machine_builds.rb14
-rw-r--r--db/post_migrate/20230329091300_swap_ci_runner_machine_builds_primary_key_v2.rb46
-rw-r--r--db/post_migrate/20230329100222_drop_software_licenses_temp_index.rb16
-rw-r--r--db/post_migrate/20230330080731_remove_tmp_index_vuln_occurrences_on_report_type.rb13
-rw-r--r--db/post_migrate/20230330103104_reschedule_migrate_evidences.rb30
-rw-r--r--db/post_migrate/20230403023828_swap_note_diff_files_note_id_to_bigint_for_gitlab_dot_com.rb68
-rw-r--r--db/post_migrate/20230403041642_ensure_issue_user_mentions_bigint_backfill_is_finished_for_gitlab_dot_com.rb29
-rw-r--r--db/post_migrate/20230403041917_swap_issue_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb8
-rw-r--r--db/post_migrate/20230403085957_add_tmp_partial_index_on_vulnerability_report_types2.rb17
-rw-r--r--db/post_migrate/20230403085958_add_sync_tmp_partial_index_on_vulnerability_report_types2.rb16
-rw-r--r--db/post_migrate/20230403190527_add_index_to_security_scans_on_scan_type.rb18
-rw-r--r--db/post_migrate/20230403221928_resync_scan_result_policies_for_namespaces.rb77
-rw-r--r--db/post_migrate/20230403231455_add_unique_index_issue_user_mentions_note_id_convert_to_bigint_for_gitlab_com.rb31
-rw-r--r--db/post_migrate/20230403231841_add_fk_on_issue_user_mentions_note_id_convert_to_bigint_for_gitlab_com.rb43
-rw-r--r--db/post_migrate/20230403232121_async_validate_fk_issue_user_mentions_note_id_convert_to_bigint_for_gitlab_com.rb27
-rw-r--r--db/post_migrate/20230404023648_ensure_suggestions_note_id_bigint_backfill_is_finished_for_gitlab_dot_com.rb29
-rw-r--r--db/post_migrate/20230404023915_swap_suggestions_note_id_to_bigint_for_gitlab_dot_com.rb60
-rw-r--r--db/post_migrate/20230404030757_ensure_epic_user_mentions_bigint_backfill_is_finished_for_gitlab_dot_com.rb29
-rw-r--r--db/post_migrate/20230404031041_swap_epic_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb74
-rw-r--r--db/post_migrate/20230404044338_drop_async_index_ci_job_artifacts_on_expire_at_for_removal.rb14
-rw-r--r--db/post_migrate/20230404050414_remove_unused_merge_request_jira_indexes.rb29
-rw-r--r--db/post_migrate/20230404061832_drop_sync_index_ci_job_artifacts_on_expire_at_for_removal.rb19
-rw-r--r--db/post_migrate/20230404132544_prepare_async_index_for_override_uuids_logic.rb15
-rw-r--r--db/post_migrate/20230404194907_remove_mr_mentions_temp_index.rb14
-rw-r--r--db/post_migrate/20230404194908_remove_mr_state_id_temp_index.rb14
-rw-r--r--db/post_migrate/20230405072302_remove_p_ci_builds_metadata_partition_id_default.rb13
-rw-r--r--db/post_migrate/20230405094230_create_index_for_override_uuids_logic_on_vulnerability_occurrences.rb17
-rw-r--r--db/post_migrate/20230405132104_remove_saml_provider_and_identities_non_root_group.rb34
-rw-r--r--db/post_migrate/20230405132855_remove_scim_token_and_scim_identity_non_root_group.rb34
-rw-r--r--db/post_migrate/20230405200858_requeue_backfill_project_wiki_repositories.rb29
-rw-r--r--db/post_migrate/20230406041555_allow_null_file_md5_to_debian_project_component_files.rb11
-rw-r--r--db/post_migrate/20230406041629_allow_null_file_md5_to_debian_group_component_files.rb11
-rw-r--r--db/post_migrate/20230406093640_requeue_backfill_admin_mode_scope_for_personal_access_tokens.rb23
-rw-r--r--db/post_migrate/20230410111251_async_validate_fk_projects_creator_id.rb15
-rw-r--r--db/post_migrate/20230411153310_cleanup_bigint_conversion_for_sent_notifications.rb16
-rw-r--r--db/post_migrate/20230412013251_ensure_system_note_metadata_bigint_backfill_is_finished_for_gitlab_dot_com.rb29
-rw-r--r--db/post_migrate/20230412152538_add_text_limit_to_ci_job_artifacts_file_final_path.rb21
-rw-r--r--db/post_migrate/20230412201517_remove_clusters_applications_cert_managers_fk.rb16
-rw-r--r--db/post_migrate/20230412201528_remove_clusters_applications_cilium_fk.rb16
-rw-r--r--db/post_migrate/20230412201539_remove_clusters_applications_crossplane_fk.rb16
-rw-r--r--db/post_migrate/20230412201549_remove_clusters_applications_helm_fk.rb16
-rw-r--r--db/post_migrate/20230412201600_remove_clusters_applications_ingress_fk.rb16
-rw-r--r--db/post_migrate/20230412201611_remove_clusters_applications_jupyter_fk.rb16
-rw-r--r--db/post_migrate/20230412201621_remove_clusters_applications_knative_fk.rb16
-rw-r--r--db/post_migrate/20230412201632_remove_clusters_applications_prometheus_fk.rb16
-rw-r--r--db/post_migrate/20230412201642_remove_clusters_applications_runners_fk.rb16
-rw-r--r--db/post_migrate/20230412203234_remove_clusters_applications_jupyter_oauth_fk.rb16
-rw-r--r--db/post_migrate/20230412204143_remove_serverless_domain_cluster_pages_fk.rb16
-rw-r--r--db/post_migrate/20230412204201_remove_serverless_domain_cluster_knative_fk.rb16
-rw-r--r--db/post_migrate/20230412204224_remove_serverless_domain_cluster_creator_fk.rb16
-rw-r--r--db/post_migrate/20230412214119_finalize_encrypt_ci_trigger_token.rb23
-rw-r--r--db/post_migrate/20230413012807_remove_index_sync_index_on_merge_requests_on_state_id_and_merge_status.rb15
-rw-r--r--db/post_migrate/20230413041917_swap_issue_user_mentions_note_id_to_bigint_for_gitlab_dot_com_2.rb93
-rw-r--r--db/post_migrate/20230413041918_add_unique_index_system_note_metadata_note_id_convert_to_bigint_for_gitlab_com.rb30
-rw-r--r--db/post_migrate/20230413041919_add_fk_on_system_note_metadata_note_id_convert_to_bigint_for_gitlab_com.rb43
-rw-r--r--db/post_migrate/20230413041920_async_validate_fk_system_note_metadata_note_id_convert_to_bigint_for_gitlab_com.rb27
-rw-r--r--db/post_migrate/20230414075119_add_namespaces_by_top_level_namespace_index.rb15
-rw-r--r--db/post_migrate/20230418154454_change_code_suggestions_default_in_namespace_settings.rb7
-rw-r--r--db/post_migrate/20230418164957_queue_update_code_suggestions_for_namespace_settings.rb12
-rw-r--r--db/post_migrate/20230419164438_change_code_suggestions_default_false_in_namespace_settings.rb7
-rw-r--r--db/schema_migrations/202108261717581
-rw-r--r--db/schema_migrations/202108261939071
-rw-r--r--db/schema_migrations/202108300858371
-rw-r--r--db/schema_migrations/202108301048001
-rw-r--r--db/schema_migrations/202108301405241
-rw-r--r--db/schema_migrations/202108301543581
-rw-r--r--db/schema_migrations/202108311230081
-rw-r--r--db/schema_migrations/202108311348401
-rw-r--r--db/schema_migrations/202108311352491
-rw-r--r--db/schema_migrations/202108312034081
-rw-r--r--db/schema_migrations/202109010442021
-rw-r--r--db/schema_migrations/202109010442371
-rw-r--r--db/schema_migrations/202109010655041
-rw-r--r--db/schema_migrations/202109011533241
-rw-r--r--db/schema_migrations/202109011845111
-rw-r--r--db/schema_migrations/202109021441441
-rw-r--r--db/schema_migrations/202109021714061
-rw-r--r--db/schema_migrations/202109021718081
-rw-r--r--db/schema_migrations/202109021843341
-rw-r--r--db/schema_migrations/202109030541581
-rw-r--r--db/schema_migrations/202109061000211
-rw-r--r--db/schema_migrations/202109061003161
-rw-r--r--db/schema_migrations/202109061306431
-rw-r--r--db/schema_migrations/202109070139441
-rw-r--r--db/schema_migrations/202109070219401
-rw-r--r--db/schema_migrations/202109070337451
-rw-r--r--db/schema_migrations/202109070410001
-rw-r--r--db/schema_migrations/202109071823371
-rw-r--r--db/schema_migrations/202109071823591
-rw-r--r--db/schema_migrations/202109072115571
-rw-r--r--db/schema_migrations/202109080609511
-rw-r--r--db/schema_migrations/202109080611321
-rw-r--r--db/schema_migrations/202109081008101
-rw-r--r--db/schema_migrations/202109081323351
-rw-r--r--db/schema_migrations/202109081404371
-rw-r--r--db/schema_migrations/202109081857361
-rw-r--r--db/schema_migrations/202109081857541
-rw-r--r--db/schema_migrations/202109081955061
-rw-r--r--db/schema_migrations/202109091048001
-rw-r--r--db/schema_migrations/202109091520271
-rw-r--r--db/schema_migrations/202109091843491
-rw-r--r--db/schema_migrations/202109100147411
-rw-r--r--db/schema_migrations/202109100150471
-rw-r--r--db/schema_migrations/202109101410431
-rw-r--r--db/schema_migrations/202109101929211
-rw-r--r--db/schema_migrations/202109101949521
-rw-r--r--db/schema_migrations/202109120349031
-rw-r--r--db/schema_migrations/202109130104111
-rw-r--r--db/schema_migrations/202109130104321
-rw-r--r--db/schema_migrations/202109131224571
-rw-r--r--db/schema_migrations/202109132245581
-rw-r--r--db/schema_migrations/202109140948401
-rw-r--r--db/schema_migrations/202109140953101
-rw-r--r--db/schema_migrations/202109141458101
-rw-r--r--db/schema_migrations/202109141722021
-rw-r--r--db/schema_migrations/202109150004531
-rw-r--r--db/schema_migrations/202109150012421
-rw-r--r--db/schema_migrations/202109150224151
-rw-r--r--db/schema_migrations/202109150704231
-rw-r--r--db/schema_migrations/202109152029001
-rw-r--r--db/schema_migrations/202109161325471
-rw-r--r--db/schema_migrations/202109171343211
-rw-r--r--db/schema_migrations/202109171536451
-rw-r--r--db/schema_migrations/202109171539051
-rw-r--r--db/schema_migrations/202109172244191
-rw-r--r--db/schema_migrations/202109182010501
-rw-r--r--db/schema_migrations/202109182028551
-rw-r--r--db/schema_migrations/202109201044461
-rw-r--r--db/schema_migrations/202109202320251
-rw-r--r--db/schema_migrations/202109210320081
-rw-r--r--db/schema_migrations/202109210628201
-rw-r--r--db/schema_migrations/202109210639241
-rw-r--r--db/schema_migrations/202109211910101
-rw-r--r--db/schema_migrations/202109220218161
-rw-r--r--db/schema_migrations/202109220256311
-rw-r--r--db/schema_migrations/202109220820191
-rw-r--r--db/schema_migrations/202109220841151
-rw-r--r--db/schema_migrations/202109220914021
-rw-r--r--db/schema_migrations/202109221720561
-rw-r--r--db/schema_migrations/202109221721561
-rw-r--r--db/schema_migrations/202109222157401
-rw-r--r--db/schema_migrations/202109222201041
-rw-r--r--db/schema_migrations/202109230423231
-rw-r--r--db/schema_migrations/202109230423241
-rw-r--r--db/schema_migrations/202109230423251
-rw-r--r--db/schema_migrations/202109231331431
-rw-r--r--db/schema_migrations/202109231359091
-rw-r--r--db/schema_migrations/202109231516411
-rw-r--r--db/schema_migrations/202109231926481
-rw-r--r--db/schema_migrations/202109231926491
-rw-r--r--db/schema_migrations/202109271538071
-rw-r--r--db/schema_migrations/202109281550221
-rw-r--r--db/schema_migrations/202109281711221
-rw-r--r--db/schema_migrations/202109290256001
-rw-r--r--db/schema_migrations/202109290308341
-rw-r--r--db/schema_migrations/202109290310491
-rw-r--r--db/schema_migrations/202109290325551
-rw-r--r--db/schema_migrations/202109291153401
-rw-r--r--db/schema_migrations/202109291215161
-rw-r--r--db/schema_migrations/202109291444531
-rw-r--r--db/schema_migrations/202109300812081
-rw-r--r--db/schema_migrations/202109302119361
-rw-r--r--db/schema_migrations/202110010012221
-rw-r--r--db/schema_migrations/202110040629421
-rw-r--r--db/schema_migrations/202110040756291
-rw-r--r--db/schema_migrations/202110040819111
-rw-r--r--db/schema_migrations/202110041105001
-rw-r--r--db/schema_migrations/202110041109271
-rw-r--r--db/schema_migrations/202110041225401
-rw-r--r--db/schema_migrations/202110041512021
-rw-r--r--db/schema_migrations/202110050101011
-rw-r--r--db/schema_migrations/202110050635191
-rw-r--r--db/schema_migrations/202110050636161
-rw-r--r--db/schema_migrations/202110050637231
-rw-r--r--db/schema_migrations/202110050830151
-rw-r--r--db/schema_migrations/202110050924281
-rw-r--r--db/schema_migrations/202110050935581
-rw-r--r--db/schema_migrations/202110051001121
-rw-r--r--db/schema_migrations/202110051124041
-rw-r--r--db/schema_migrations/202110051126451
-rw-r--r--db/schema_migrations/202110051944251
-rw-r--r--db/schema_migrations/202110060602541
-rw-r--r--db/schema_migrations/202110060604361
-rw-r--r--db/schema_migrations/202110061031221
-rw-r--r--db/schema_migrations/202110061220101
-rw-r--r--db/schema_migrations/202110061450041
-rw-r--r--db/schema_migrations/202110061741141
-rw-r--r--db/schema_migrations/202110070902291
-rw-r--r--db/schema_migrations/202110070933401
-rw-r--r--db/schema_migrations/202110071131361
-rw-r--r--db/schema_migrations/202110071552211
-rw-r--r--db/schema_migrations/202110080438551
-rw-r--r--db/schema_migrations/202110081814511
-rw-r--r--db/schema_migrations/202110081829541
-rw-r--r--db/schema_migrations/202110081931371
-rw-r--r--db/schema_migrations/202110110042421
-rw-r--r--db/schema_migrations/202110111048431
-rw-r--r--db/schema_migrations/202110111409301
-rw-r--r--db/schema_migrations/202110111409311
-rw-r--r--db/schema_migrations/202110111409321
-rw-r--r--db/schema_migrations/202110111412391
-rw-r--r--db/schema_migrations/202110111412421
-rw-r--r--db/schema_migrations/202110111412431
-rw-r--r--db/schema_migrations/202110111527011
-rw-r--r--db/schema_migrations/202110120159031
-rw-r--r--db/schema_migrations/202110120512211
-rw-r--r--db/schema_migrations/202110120918221
-rw-r--r--db/schema_migrations/202110121343161
-rw-r--r--db/schema_migrations/202110121438151
-rw-r--r--db/schema_migrations/202110121559311
-rw-r--r--db/schema_migrations/202110130142281
-rw-r--r--db/schema_migrations/202110130807141
-rw-r--r--db/schema_migrations/202110130807151
-rw-r--r--db/schema_migrations/202110130807161
-rw-r--r--db/schema_migrations/202110131253411
-rw-r--r--db/schema_migrations/202110131927491
-rw-r--r--db/schema_migrations/202110150211141
-rw-r--r--db/schema_migrations/202110150241351
-rw-r--r--db/schema_migrations/202110181010341
-rw-r--r--db/schema_migrations/202110181015521
-rw-r--r--db/schema_migrations/202110181018521
-rw-r--r--db/schema_migrations/202110181022521
-rw-r--r--db/schema_migrations/202110181233161
-rw-r--r--db/schema_migrations/202110181526541
-rw-r--r--db/schema_migrations/202110181614471
-rw-r--r--db/schema_migrations/202110191536151
-rw-r--r--db/schema_migrations/202110200309481
-rw-r--r--db/schema_migrations/202110200953571
-rw-r--r--db/schema_migrations/202110211154091
-rw-r--r--db/schema_migrations/202110211247151
-rw-r--r--db/schema_migrations/202110211259081
-rw-r--r--db/schema_migrations/202110211312171
-rw-r--r--db/schema_migrations/202110211344581
-rw-r--r--db/schema_migrations/202110211404261
-rw-r--r--db/schema_migrations/202110211419301
-rw-r--r--db/schema_migrations/202110221122021
-rw-r--r--db/schema_migrations/202110221130001
-rw-r--r--db/schema_migrations/202110221601541
-rw-r--r--db/schema_migrations/202110222145231
-rw-r--r--db/schema_migrations/202110231022431
-rw-r--r--db/schema_migrations/202110251037441
-rw-r--r--db/schema_migrations/202110251037581
-rw-r--r--db/schema_migrations/202110260704081
-rw-r--r--db/schema_migrations/202110261243361
-rw-r--r--db/schema_migrations/202110261432381
-rw-r--r--db/schema_migrations/202110270432061
-rw-r--r--db/schema_migrations/202110270432291
-rw-r--r--db/schema_migrations/202110270640211
-rw-r--r--db/schema_migrations/202110270641561
-rw-r--r--db/schema_migrations/202110271129011
-rw-r--r--db/schema_migrations/202110272039501
-rw-r--r--db/schema_migrations/202110272040111
-rw-r--r--db/schema_migrations/202110280859261
-rw-r--r--db/schema_migrations/202110281003031
-rw-r--r--db/schema_migrations/202110281008431
-rw-r--r--db/schema_migrations/202110281234121
-rw-r--r--db/schema_migrations/202110281322471
-rw-r--r--db/schema_migrations/202110281554491
-rw-r--r--db/schema_migrations/202110282122591
-rw-r--r--db/schema_migrations/202110291028221
-rw-r--r--db/schema_migrations/202110311524171
-rw-r--r--db/schema_migrations/202110311549191
-rw-r--r--db/schema_migrations/202111011323101
-rw-r--r--db/schema_migrations/202111011656561
-rw-r--r--db/schema_migrations/202111012226141
-rw-r--r--db/schema_migrations/202111021031271
-rw-r--r--db/schema_migrations/202111021148021
-rw-r--r--db/schema_migrations/202111030627281
-rw-r--r--db/schema_migrations/202111031414031
-rw-r--r--db/schema_migrations/202111031620251
-rw-r--r--db/schema_migrations/202111031843031
-rw-r--r--db/schema_migrations/202111040122091
-rw-r--r--db/schema_migrations/202111040444531
-rw-r--r--db/schema_migrations/202111041652201
-rw-r--r--db/schema_migrations/202111050101011
-rw-r--r--db/schema_migrations/202111051257561
-rw-r--r--db/schema_migrations/202111051258131
-rw-r--r--db/schema_migrations/202111051351571
-rw-r--r--db/schema_migrations/202111051603161
-rw-r--r--db/schema_migrations/202111051614041
-rw-r--r--db/schema_migrations/202111081545101
-rw-r--r--db/schema_migrations/202111081548411
-rw-r--r--db/schema_migrations/202111082032481
-rw-r--r--db/schema_migrations/202111082047361
-rw-r--r--db/schema_migrations/202111082114341
-rw-r--r--db/schema_migrations/202111091000501
-rw-r--r--db/schema_migrations/202111091010101
-rw-r--r--db/schema_migrations/202111091124541
-rw-r--r--db/schema_migrations/202111100101011
-rw-r--r--db/schema_migrations/202111100147011
-rw-r--r--db/schema_migrations/202111100152521
-rw-r--r--db/schema_migrations/202111100927101
-rw-r--r--db/schema_migrations/202111101000501
-rw-r--r--db/schema_migrations/202111101433061
-rw-r--r--db/schema_migrations/202111101513201
-rw-r--r--db/schema_migrations/202111101513501
-rw-r--r--db/schema_migrations/202111111124251
-rw-r--r--db/schema_migrations/202111111126391
-rw-r--r--db/schema_migrations/202111111127131
-rw-r--r--db/schema_migrations/202111111640251
-rw-r--r--db/schema_migrations/202111111640471
-rw-r--r--db/schema_migrations/202111120734131
-rw-r--r--db/schema_migrations/202111121133001
-rw-r--r--db/schema_migrations/202111121554161
-rw-r--r--db/schema_migrations/202111151326131
-rw-r--r--db/schema_migrations/202111151428031
-rw-r--r--db/schema_migrations/202111151428471
-rw-r--r--db/schema_migrations/202111151429111
-rw-r--r--db/schema_migrations/202111151451071
-rw-r--r--db/schema_migrations/202111151517041
-rw-r--r--db/schema_migrations/202111151541031
-rw-r--r--db/schema_migrations/202111160917511
-rw-r--r--db/schema_migrations/202111160937391
-rw-r--r--db/schema_migrations/202111161116441
-rw-r--r--db/schema_migrations/202111170848141
-rw-r--r--db/schema_migrations/202111171742091
-rw-r--r--db/schema_migrations/202111181009591
-rw-r--r--db/schema_migrations/202111181034391
-rw-r--r--db/schema_migrations/202111181142281
-rw-r--r--db/schema_migrations/202111181245371
-rw-r--r--db/schema_migrations/202111181246281
-rw-r--r--db/schema_migrations/202111181246501
-rw-r--r--db/schema_migrations/202111181308361
-rw-r--r--db/schema_migrations/202111181942391
-rw-r--r--db/schema_migrations/202111190850151
-rw-r--r--db/schema_migrations/202111190850361
-rw-r--r--db/schema_migrations/202111191110061
-rw-r--r--db/schema_migrations/202111191542211
-rw-r--r--db/schema_migrations/202111191708051
-rw-r--r--db/schema_migrations/202111191940241
-rw-r--r--db/schema_migrations/202111191952011
-rw-r--r--db/schema_migrations/202111220335011
-rw-r--r--db/schema_migrations/202111221030511
-rw-r--r--db/schema_migrations/202111221939481
-rw-r--r--db/schema_migrations/202111222150011
-rw-r--r--db/schema_migrations/202111231352551
-rw-r--r--db/schema_migrations/202111231619061
-rw-r--r--db/schema_migrations/202111231812361
-rw-r--r--db/schema_migrations/202111231826141
-rw-r--r--db/schema_migrations/202111240957041
-rw-r--r--db/schema_migrations/202111241323191
-rw-r--r--db/schema_migrations/202111241327051
-rw-r--r--db/schema_migrations/202111251204441
-rw-r--r--db/schema_migrations/202111260422351
-rw-r--r--db/schema_migrations/202111261130291
-rw-r--r--db/schema_migrations/202111261154491
-rw-r--r--db/schema_migrations/202111261422001
-rw-r--r--db/schema_migrations/202111261423541
-rw-r--r--db/schema_migrations/202111262044451
-rw-r--r--db/schema_migrations/202111291511551
-rw-r--r--db/schema_migrations/202111291518321
-rw-r--r--db/schema_migrations/202111301517241
-rw-r--r--db/schema_migrations/202111301650431
-rw-r--r--db/schema_migrations/202111302011001
-rw-r--r--db/schema_migrations/202111302011011
-rw-r--r--db/schema_migrations/202111302057191
-rw-r--r--db/schema_migrations/202112010617331
-rw-r--r--db/schema_migrations/202112011015411
-rw-r--r--db/schema_migrations/202112011430421
-rw-r--r--db/schema_migrations/202112020412331
-rw-r--r--db/schema_migrations/202112020949441
-rw-r--r--db/schema_migrations/202112021355081
-rw-r--r--db/schema_migrations/202112021452371
-rw-r--r--db/schema_migrations/202112030916421
-rw-r--r--db/schema_migrations/202112031609521
-rw-r--r--db/schema_migrations/202112031611491
-rw-r--r--db/schema_migrations/202112031618401
-rw-r--r--db/schema_migrations/202112031619421
-rw-r--r--db/schema_migrations/202112040108261
-rw-r--r--db/schema_migrations/202112060738511
-rw-r--r--db/schema_migrations/202112060745471
-rw-r--r--db/schema_migrations/202112061612711
-rw-r--r--db/schema_migrations/202112070817081
-rw-r--r--db/schema_migrations/202112070905031
-rw-r--r--db/schema_migrations/202112071253311
-rw-r--r--db/schema_migrations/202112071353311
-rw-r--r--db/schema_migrations/202112071544131
-rw-r--r--db/schema_migrations/202112071544141
-rw-r--r--db/schema_migrations/202112071655081
-rw-r--r--db/schema_migrations/202112071735101
-rw-r--r--db/schema_migrations/202112071735111
-rw-r--r--db/schema_migrations/202112081114251
-rw-r--r--db/schema_migrations/202112081222001
-rw-r--r--db/schema_migrations/202112081222011
-rw-r--r--db/schema_migrations/202112081714021
-rw-r--r--db/schema_migrations/202112090936361
-rw-r--r--db/schema_migrations/202112090938281
-rw-r--r--db/schema_migrations/202112090939231
-rw-r--r--db/schema_migrations/202112090942221
-rw-r--r--db/schema_migrations/202112091030481
-rw-r--r--db/schema_migrations/202112092038201
-rw-r--r--db/schema_migrations/202112092038211
-rw-r--r--db/schema_migrations/202112092300421
-rw-r--r--db/schema_migrations/202112100257541
-rw-r--r--db/schema_migrations/202112100317211
-rw-r--r--db/schema_migrations/202112101400001
-rw-r--r--db/schema_migrations/202112101406291
-rw-r--r--db/schema_migrations/202112101731371
-rw-r--r--db/schema_migrations/202112130648211
-rw-r--r--db/schema_migrations/202112131021111
-rw-r--r--db/schema_migrations/202112131303241
-rw-r--r--db/schema_migrations/202112131423441
-rw-r--r--db/schema_migrations/202112131542591
-rw-r--r--db/schema_migrations/202112131547041
-rw-r--r--db/schema_migrations/202112140125071
-rw-r--r--db/schema_migrations/202112141103071
-rw-r--r--db/schema_migrations/202112150906201
-rw-r--r--db/schema_migrations/202112151820061
-rw-r--r--db/schema_migrations/202112161331071
-rw-r--r--db/schema_migrations/202112161341341
-rw-r--r--db/schema_migrations/202112161356511
-rw-r--r--db/schema_migrations/202112162209391
-rw-r--r--db/schema_migrations/202112170507531
-rw-r--r--db/schema_migrations/202112171200001
-rw-r--r--db/schema_migrations/202112171459231
-rw-r--r--db/schema_migrations/202112171743311
-rw-r--r--db/schema_migrations/202112200647571
-rw-r--r--db/schema_migrations/202112201204021
-rw-r--r--db/schema_migrations/202112201239561
-rw-r--r--db/schema_migrations/202112201745041
-rw-r--r--db/schema_migrations/202112231259211
-rw-r--r--db/schema_migrations/202112241129371
-rw-r--r--db/schema_migrations/202112241145391
-rw-r--r--db/schema_migrations/202112290236541
-rw-r--r--db/schema_migrations/202112301125171
-rw-r--r--db/schema_migrations/202112301130311
-rw-r--r--db/schema_migrations/202201040600491
-rw-r--r--db/schema_migrations/202201041744451
-rw-r--r--db/schema_migrations/202201050205141
-rw-r--r--db/schema_migrations/202201050822171
-rw-r--r--db/schema_migrations/202201051213251
-rw-r--r--db/schema_migrations/202201051525471
-rw-r--r--db/schema_migrations/202201051531491
-rw-r--r--db/schema_migrations/202201061119581
-rw-r--r--db/schema_migrations/202201061120431
-rw-r--r--db/schema_migrations/202201061120851
-rw-r--r--db/schema_migrations/202201061417561
-rw-r--r--db/schema_migrations/202201061633261
-rw-r--r--db/schema_migrations/202201061850331
-rw-r--r--db/schema_migrations/202201062306291
-rw-r--r--db/schema_migrations/202201062307121
-rw-r--r--db/schema_migrations/202201062315181
-rw-r--r--db/schema_migrations/202201062334591
-rw-r--r--db/schema_migrations/202201062356261
-rw-r--r--db/schema_migrations/202201070648451
-rw-r--r--db/schema_migrations/202201070916291
-rw-r--r--db/schema_migrations/202201071650361
-rw-r--r--db/schema_migrations/202201091330061
-rw-r--r--db/schema_migrations/202201091344551
-rw-r--r--db/schema_migrations/202201101709531
-rw-r--r--db/schema_migrations/202201101710491
-rw-r--r--db/schema_migrations/202201102249131
-rw-r--r--db/schema_migrations/202201102314201
-rw-r--r--db/schema_migrations/202201102331551
-rw-r--r--db/schema_migrations/202201110027561
-rw-r--r--db/schema_migrations/202201110238521
-rw-r--r--db/schema_migrations/202201110935341
-rw-r--r--db/schema_migrations/202201110950061
-rw-r--r--db/schema_migrations/202201110950071
-rw-r--r--db/schema_migrations/202201111014211
-rw-r--r--db/schema_migrations/202201111023141
-rw-r--r--db/schema_migrations/202201111549501
-rw-r--r--db/schema_migrations/202201111549511
-rw-r--r--db/schema_migrations/202201112002541
-rw-r--r--db/schema_migrations/202201112215161
-rw-r--r--db/schema_migrations/202201120159401
-rw-r--r--db/schema_migrations/202201120905561
-rw-r--r--db/schema_migrations/202201121154131
-rw-r--r--db/schema_migrations/202201122051111
-rw-r--r--db/schema_migrations/202201122306421
-rw-r--r--db/schema_migrations/202201122320371
-rw-r--r--db/schema_migrations/202201122326051
-rw-r--r--db/schema_migrations/202201122327231
-rw-r--r--db/schema_migrations/202201130133191
-rw-r--r--db/schema_migrations/202201130144381
-rw-r--r--db/schema_migrations/202201130158301
-rw-r--r--db/schema_migrations/202201130355191
-rw-r--r--db/schema_migrations/202201130404471
-rw-r--r--db/schema_migrations/202201131114401
-rw-r--r--db/schema_migrations/202201131254011
-rw-r--r--db/schema_migrations/202201131354491
-rw-r--r--db/schema_migrations/202201131359241
-rw-r--r--db/schema_migrations/202201131648011
-rw-r--r--db/schema_migrations/202201131649011
-rw-r--r--db/schema_migrations/202201141055251
-rw-r--r--db/schema_migrations/202201141319501
-rw-r--r--db/schema_migrations/202201161758511
-rw-r--r--db/schema_migrations/202201170340561
-rw-r--r--db/schema_migrations/202201170826111
-rw-r--r--db/schema_migrations/202201172259361
-rw-r--r--db/schema_migrations/202201180156331
-rw-r--r--db/schema_migrations/202201180200261
-rw-r--r--db/schema_migrations/202201181419501
-rw-r--r--db/schema_migrations/202201181558461
-rw-r--r--db/schema_migrations/202201181558471
-rw-r--r--db/schema_migrations/202201181558481
-rw-r--r--db/schema_migrations/202201182040391
-rw-r--r--db/schema_migrations/202201190940231
-rw-r--r--db/schema_migrations/202201190945031
-rw-r--r--db/schema_migrations/202201191414071
-rw-r--r--db/schema_migrations/202201191417361
-rw-r--r--db/schema_migrations/202201191431301
-rw-r--r--db/schema_migrations/202201191442531
-rw-r--r--db/schema_migrations/202201191444581
-rw-r--r--db/schema_migrations/202201191512211
-rw-r--r--db/schema_migrations/202201191537061
-rw-r--r--db/schema_migrations/202201191544421
-rw-r--r--db/schema_migrations/202201191704261
-rw-r--r--db/schema_migrations/202201191931301
-rw-r--r--db/schema_migrations/202201192013401
-rw-r--r--db/schema_migrations/202201192031191
-rw-r--r--db/schema_migrations/202201192206201
-rw-r--r--db/schema_migrations/202201200331151
-rw-r--r--db/schema_migrations/202201200856551
-rw-r--r--db/schema_migrations/202201200943401
-rw-r--r--db/schema_migrations/202201201237001
-rw-r--r--db/schema_migrations/202201201238001
-rw-r--r--db/schema_migrations/202201201606251
-rw-r--r--db/schema_migrations/202201202118311
-rw-r--r--db/schema_migrations/202201202118321
-rw-r--r--db/schema_migrations/202201212147521
-rw-r--r--db/schema_migrations/202201212147531
-rw-r--r--db/schema_migrations/202201212216511
-rw-r--r--db/schema_migrations/202201241300281
-rw-r--r--db/schema_migrations/202201241450191
-rw-r--r--db/schema_migrations/202201241514561
-rw-r--r--db/schema_migrations/202201241519491
-rw-r--r--db/schema_migrations/202201241528241
-rw-r--r--db/schema_migrations/202201241532331
-rw-r--r--db/schema_migrations/202201241532341
-rw-r--r--db/schema_migrations/202201241807041
-rw-r--r--db/schema_migrations/202201241807051
-rw-r--r--db/schema_migrations/202201241843381
-rw-r--r--db/schema_migrations/202201242009271
-rw-r--r--db/schema_migrations/202201242040461
-rw-r--r--db/schema_migrations/202201242141311
-rw-r--r--db/schema_migrations/202201242158571
-rw-r--r--db/schema_migrations/202201242215211
-rw-r--r--db/schema_migrations/202201250835201
-rw-r--r--db/schema_migrations/202201250841271
-rw-r--r--db/schema_migrations/202201250843481
-rw-r--r--db/schema_migrations/202201251222281
-rw-r--r--db/schema_migrations/202201251226401
-rw-r--r--db/schema_migrations/202201251227251
-rw-r--r--db/schema_migrations/202201252305381
-rw-r--r--db/schema_migrations/202201261916241
-rw-r--r--db/schema_migrations/202201262017521
-rw-r--r--db/schema_migrations/202201262026541
-rw-r--r--db/schema_migrations/202201262034211
-rw-r--r--db/schema_migrations/202201262100211
-rw-r--r--db/schema_migrations/202201262100221
-rw-r--r--db/schema_migrations/202201262106571
-rw-r--r--db/schema_migrations/202201271122431
-rw-r--r--db/schema_migrations/202201271124121
-rw-r--r--db/schema_migrations/202201271322001
-rw-r--r--db/schema_migrations/202201271322011
-rw-r--r--db/schema_migrations/202201280937561
-rw-r--r--db/schema_migrations/202201281030421
-rw-r--r--db/schema_migrations/202201281552511
-rw-r--r--db/schema_migrations/202201281558141
-rw-r--r--db/schema_migrations/202201281947221
-rw-r--r--db/schema_migrations/202201310000001
-rw-r--r--db/schema_migrations/202201310000011
-rw-r--r--db/schema_migrations/202201311357251
-rw-r--r--db/schema_migrations/202201311926431
-rw-r--r--db/schema_migrations/202202010347311
-rw-r--r--db/schema_migrations/202202011417051
-rw-r--r--db/schema_migrations/202202011732121
-rw-r--r--db/schema_migrations/202202011930331
-rw-r--r--db/schema_migrations/202202012053001
-rw-r--r--db/schema_migrations/202202020344091
-rw-r--r--db/schema_migrations/202202021057331
-rw-r--r--db/schema_migrations/202202021153501
-rw-r--r--db/schema_migrations/202202030749161
-rw-r--r--db/schema_migrations/202202030913041
-rw-r--r--db/schema_migrations/202202031233331
-rw-r--r--db/schema_migrations/202202031336521
-rw-r--r--db/schema_migrations/202202031349421
-rw-r--r--db/schema_migrations/202202040536551
-rw-r--r--db/schema_migrations/202202040931201
-rw-r--r--db/schema_migrations/202202040951211
-rw-r--r--db/schema_migrations/202202041107251
-rw-r--r--db/schema_migrations/202202041542201
-rw-r--r--db/schema_migrations/202202041930001
-rw-r--r--db/schema_migrations/202202041943471
-rw-r--r--db/schema_migrations/202202070807581
-rw-r--r--db/schema_migrations/202202070831291
-rw-r--r--db/schema_migrations/202202080809211
-rw-r--r--db/schema_migrations/202202081154391
-rw-r--r--db/schema_migrations/202202081704451
-rw-r--r--db/schema_migrations/202202081718261
-rw-r--r--db/schema_migrations/202202091110071
-rw-r--r--db/schema_migrations/202202110909201
-rw-r--r--db/schema_migrations/202202111259541
-rw-r--r--db/schema_migrations/202202112146051
-rw-r--r--db/schema_migrations/202202121207351
-rw-r--r--db/schema_migrations/202202131000001
-rw-r--r--db/schema_migrations/202202131038591
-rw-r--r--db/schema_migrations/202202131045311
-rw-r--r--db/schema_migrations/202202151647091
-rw-r--r--db/schema_migrations/202202151900201
-rw-r--r--db/schema_migrations/202202161100231
-rw-r--r--db/schema_migrations/202202162019491
-rw-r--r--db/schema_migrations/202202171000081
-rw-r--r--db/schema_migrations/202202171130581
-rw-r--r--db/schema_migrations/202202171352291
-rw-r--r--db/schema_migrations/202202211023331
-rw-r--r--db/schema_migrations/202202212149281
-rw-r--r--db/schema_migrations/202202220725361
-rw-r--r--db/schema_migrations/202202221918451
-rw-r--r--db/schema_migrations/202202221925241
-rw-r--r--db/schema_migrations/202202221925251
-rw-r--r--db/schema_migrations/202202231123041
-rw-r--r--db/schema_migrations/202202231244281
-rw-r--r--db/schema_migrations/202202240000001
-rw-r--r--db/schema_migrations/202202242044151
-rw-r--r--db/schema_migrations/202202251337051
-rw-r--r--db/schema_migrations/202203010021011
-rw-r--r--db/schema_migrations/202203010035021
-rw-r--r--db/schema_migrations/202203010915031
-rw-r--r--db/schema_migrations/202203010934341
-rw-r--r--db/schema_migrations/202203011751041
-rw-r--r--db/schema_migrations/202203011754261
-rw-r--r--db/schema_migrations/202203021107241
-rw-r--r--db/schema_migrations/202203021140461
-rw-r--r--db/schema_migrations/202203022034101
-rw-r--r--db/schema_migrations/202203031905551
-rw-r--r--db/schema_migrations/202203031910471
-rw-r--r--db/schema_migrations/202203040523351
-rw-r--r--db/schema_migrations/202203040616311
-rw-r--r--db/schema_migrations/202203040621071
-rw-r--r--db/schema_migrations/202203041527291
-rw-r--r--db/schema_migrations/202203041651071
-rw-r--r--db/schema_migrations/202203042018471
-rw-r--r--db/schema_migrations/202203052232121
-rw-r--r--db/schema_migrations/202203071925341
-rw-r--r--db/schema_migrations/202203071926101
-rw-r--r--db/schema_migrations/202203071926451
-rw-r--r--db/schema_migrations/202203071927251
-rw-r--r--db/schema_migrations/202203072034581
-rw-r--r--db/schema_migrations/202203072034591
-rw-r--r--db/schema_migrations/202203080002051
-rw-r--r--db/schema_migrations/202203081152191
-rw-r--r--db/schema_migrations/202203081155021
-rw-r--r--db/schema_migrations/202203090848381
-rw-r--r--db/schema_migrations/202203090849541
-rw-r--r--db/schema_migrations/202203091006481
-rw-r--r--db/schema_migrations/202203091548551
-rw-r--r--db/schema_migrations/202203100115301
-rw-r--r--db/schema_migrations/202203100116131
-rw-r--r--db/schema_migrations/202203100953411
-rw-r--r--db/schema_migrations/202203101011181
-rw-r--r--db/schema_migrations/202203101342071
-rw-r--r--db/schema_migrations/202203101413491
-rw-r--r--db/schema_migrations/202203110103521
-rw-r--r--db/schema_migrations/202203140948411
-rw-r--r--db/schema_migrations/202203141542351
-rw-r--r--db/schema_migrations/202203141623421
-rw-r--r--db/schema_migrations/202212291726041
-rw-r--r--db/schema_migrations/202301270248351
-rw-r--r--db/schema_migrations/202302070023301
-rw-r--r--db/schema_migrations/202302092224521
-rw-r--r--db/schema_migrations/202302210935351
-rw-r--r--db/schema_migrations/202302210935361
-rw-r--r--db/schema_migrations/202302221612261
-rw-r--r--db/schema_migrations/202302221619541
-rw-r--r--db/schema_migrations/202302281836441
-rw-r--r--db/schema_migrations/202303010202461
-rw-r--r--db/schema_migrations/202303010203561
-rw-r--r--db/schema_migrations/202303032324261
-rw-r--r--db/schema_migrations/202303070000001
-rw-r--r--db/schema_migrations/202303071327291
-rw-r--r--db/schema_migrations/202303072126371
-rw-r--r--db/schema_migrations/202303081542431
-rw-r--r--db/schema_migrations/202303081542441
-rw-r--r--db/schema_migrations/202303081542451
-rw-r--r--db/schema_migrations/202303090855471
-rw-r--r--db/schema_migrations/202303130122261
-rw-r--r--db/schema_migrations/202303130126091
-rw-r--r--db/schema_migrations/202303130140381
-rw-r--r--db/schema_migrations/202303130313511
-rw-r--r--db/schema_migrations/202303130316291
-rw-r--r--db/schema_migrations/202303131426311
-rw-r--r--db/schema_migrations/202303131815361
-rw-r--r--db/schema_migrations/202303141446401
-rw-r--r--db/schema_migrations/202303142106571
-rw-r--r--db/schema_migrations/202303150536351
-rw-r--r--db/schema_migrations/202303150847041
-rw-r--r--db/schema_migrations/202303151614081
-rw-r--r--db/schema_migrations/202303160146511
-rw-r--r--db/schema_migrations/202303160934331
-rw-r--r--db/schema_migrations/202303160959481
-rw-r--r--db/schema_migrations/202303161144261
-rw-r--r--db/schema_migrations/202303161649171
-rw-r--r--db/schema_migrations/202303161857461
-rw-r--r--db/schema_migrations/202303170758521
-rw-r--r--db/schema_migrations/202303170800001
-rw-r--r--db/schema_migrations/202303170801371
-rw-r--r--db/schema_migrations/202303171518411
-rw-r--r--db/schema_migrations/202303171620591
-rw-r--r--db/schema_migrations/202303171952281
-rw-r--r--db/schema_migrations/202303191054361
-rw-r--r--db/schema_migrations/202303201108021
-rw-r--r--db/schema_migrations/202303201556351
-rw-r--r--db/schema_migrations/202303210032521
-rw-r--r--db/schema_migrations/202303210115291
-rw-r--r--db/schema_migrations/202303210119031
-rw-r--r--db/schema_migrations/202303210243331
-rw-r--r--db/schema_migrations/202303210249031
-rw-r--r--db/schema_migrations/202303210850111
-rw-r--r--db/schema_migrations/202303210957591
-rw-r--r--db/schema_migrations/202303211139561
-rw-r--r--db/schema_migrations/202303211248371
-rw-r--r--db/schema_migrations/202303211530351
-rw-r--r--db/schema_migrations/202303211533041
-rw-r--r--db/schema_migrations/202303211533371
-rw-r--r--db/schema_migrations/202303211612181
-rw-r--r--db/schema_migrations/202303211614411
-rw-r--r--db/schema_migrations/202303211628101
-rw-r--r--db/schema_migrations/202303211629021
-rw-r--r--db/schema_migrations/202303211630511
-rw-r--r--db/schema_migrations/202303211635471
-rw-r--r--db/schema_migrations/202303211639471
-rw-r--r--db/schema_migrations/202303211707341
-rw-r--r--db/schema_migrations/202303211708031
-rw-r--r--db/schema_migrations/202303211708231
-rw-r--r--db/schema_migrations/202303220112201
-rw-r--r--db/schema_migrations/202303220122091
-rw-r--r--db/schema_migrations/202303220234421
-rw-r--r--db/schema_migrations/202303220850411
-rw-r--r--db/schema_migrations/202303220858521
-rw-r--r--db/schema_migrations/202303221454031
-rw-r--r--db/schema_migrations/202303221516051
-rw-r--r--db/schema_migrations/202303221516351
-rw-r--r--db/schema_migrations/202303221625121
-rw-r--r--db/schema_migrations/202303222039271
-rw-r--r--db/schema_migrations/202303230057301
-rw-r--r--db/schema_migrations/202303230101111
-rw-r--r--db/schema_migrations/202303230132511
-rw-r--r--db/schema_migrations/202303230216181
-rw-r--r--db/schema_migrations/202303231011381
-rw-r--r--db/schema_migrations/202303231206011
-rw-r--r--db/schema_migrations/202303231315211
-rw-r--r--db/schema_migrations/202303231407451
-rw-r--r--db/schema_migrations/202303231407461
-rw-r--r--db/schema_migrations/202303231530421
-rw-r--r--db/schema_migrations/202303231533281
-rw-r--r--db/schema_migrations/202303231534331
-rw-r--r--db/schema_migrations/202303231917501
-rw-r--r--db/schema_migrations/202303270749321
-rw-r--r--db/schema_migrations/202303271233331
-rw-r--r--db/schema_migrations/202303271257051
-rw-r--r--db/schema_migrations/202303271441521
-rw-r--r--db/schema_migrations/202303280203161
-rw-r--r--db/schema_migrations/202303280235351
-rw-r--r--db/schema_migrations/202303280235541
-rw-r--r--db/schema_migrations/202303280317201
-rw-r--r--db/schema_migrations/202303280318381
-rw-r--r--db/schema_migrations/202303281005341
-rw-r--r--db/schema_migrations/202303281517561
-rw-r--r--db/schema_migrations/202303281840311
-rw-r--r--db/schema_migrations/202303290321291
-rw-r--r--db/schema_migrations/202303290857541
-rw-r--r--db/schema_migrations/202303290911071
-rw-r--r--db/schema_migrations/202303290913001
-rw-r--r--db/schema_migrations/202303291002221
-rw-r--r--db/schema_migrations/202303291524101
-rw-r--r--db/schema_migrations/202303291942441
-rw-r--r--db/schema_migrations/202303300807311
-rw-r--r--db/schema_migrations/202303301014381
-rw-r--r--db/schema_migrations/202303301014391
-rw-r--r--db/schema_migrations/202303301014401
-rw-r--r--db/schema_migrations/202303301014411
-rw-r--r--db/schema_migrations/202303301014421
-rw-r--r--db/schema_migrations/202303301014431
-rw-r--r--db/schema_migrations/202303301031041
-rw-r--r--db/schema_migrations/202303302156361
-rw-r--r--db/schema_migrations/202303311420061
-rw-r--r--db/schema_migrations/202304030234401
-rw-r--r--db/schema_migrations/202304030234411
-rw-r--r--db/schema_migrations/202304030238281
-rw-r--r--db/schema_migrations/202304030416421
-rw-r--r--db/schema_migrations/202304030419171
-rw-r--r--db/schema_migrations/202304030859571
-rw-r--r--db/schema_migrations/202304030859581
-rw-r--r--db/schema_migrations/202304031136201
-rw-r--r--db/schema_migrations/202304031457051
-rw-r--r--db/schema_migrations/202304031644541
-rw-r--r--db/schema_migrations/202304031905271
-rw-r--r--db/schema_migrations/202304032219281
-rw-r--r--db/schema_migrations/202304032314551
-rw-r--r--db/schema_migrations/202304032318411
-rw-r--r--db/schema_migrations/202304032321211
-rw-r--r--db/schema_migrations/202304040236481
-rw-r--r--db/schema_migrations/202304040239151
-rw-r--r--db/schema_migrations/202304040307571
-rw-r--r--db/schema_migrations/202304040310411
-rw-r--r--db/schema_migrations/202304040443381
-rw-r--r--db/schema_migrations/202304040504141
-rw-r--r--db/schema_migrations/202304040618321
-rw-r--r--db/schema_migrations/202304041325441
-rw-r--r--db/schema_migrations/202304041949071
-rw-r--r--db/schema_migrations/202304041949081
-rw-r--r--db/schema_migrations/202304050723021
-rw-r--r--db/schema_migrations/202304050942301
-rw-r--r--db/schema_migrations/202304051028151
-rw-r--r--db/schema_migrations/202304051321041
-rw-r--r--db/schema_migrations/202304051328551
-rw-r--r--db/schema_migrations/202304052008581
-rw-r--r--db/schema_migrations/202304060409081
-rw-r--r--db/schema_migrations/202304060415551
-rw-r--r--db/schema_migrations/202304060416291
-rw-r--r--db/schema_migrations/202304060429061
-rw-r--r--db/schema_migrations/202304060439001
-rw-r--r--db/schema_migrations/202304060604521
-rw-r--r--db/schema_migrations/202304060738471
-rw-r--r--db/schema_migrations/202304060936401
-rw-r--r--db/schema_migrations/202304060955441
-rw-r--r--db/schema_migrations/202304061344361
-rw-r--r--db/schema_migrations/202304061502541
-rw-r--r--db/schema_migrations/202304061503541
-rw-r--r--db/schema_migrations/202304061504541
-rw-r--r--db/schema_migrations/202304071646161
-rw-r--r--db/schema_migrations/202304100924501
-rw-r--r--db/schema_migrations/202304101112511
-rw-r--r--db/schema_migrations/202304111533101
-rw-r--r--db/schema_migrations/202304111710011
-rw-r--r--db/schema_migrations/202304120132511
-rw-r--r--db/schema_migrations/202304120736141
-rw-r--r--db/schema_migrations/202304120802421
-rw-r--r--db/schema_migrations/202304121516591
-rw-r--r--db/schema_migrations/202304121525381
-rw-r--r--db/schema_migrations/202304122015171
-rw-r--r--db/schema_migrations/202304122015281
-rw-r--r--db/schema_migrations/202304122015391
-rw-r--r--db/schema_migrations/202304122015491
-rw-r--r--db/schema_migrations/202304122016001
-rw-r--r--db/schema_migrations/202304122016111
-rw-r--r--db/schema_migrations/202304122016211
-rw-r--r--db/schema_migrations/202304122016321
-rw-r--r--db/schema_migrations/202304122016421
-rw-r--r--db/schema_migrations/202304122032341
-rw-r--r--db/schema_migrations/202304122041431
-rw-r--r--db/schema_migrations/202304122042011
-rw-r--r--db/schema_migrations/202304122042241
-rw-r--r--db/schema_migrations/202304122141191
-rw-r--r--db/schema_migrations/202304130128071
-rw-r--r--db/schema_migrations/202304130419171
-rw-r--r--db/schema_migrations/202304130419181
-rw-r--r--db/schema_migrations/202304130419191
-rw-r--r--db/schema_migrations/202304130419201
-rw-r--r--db/schema_migrations/202304130809061
-rw-r--r--db/schema_migrations/202304130809181
-rw-r--r--db/schema_migrations/202304131531401
-rw-r--r--db/schema_migrations/202304140751191
-rw-r--r--db/schema_migrations/202304181544541
-rw-r--r--db/schema_migrations/202304181649571
-rw-r--r--db/schema_migrations/202304191644381
-rw-r--r--db/structure.sql755
1681 files changed, 10776 insertions, 13640 deletions
diff --git a/db/docs/abuse_trust_scores.yml b/db/docs/abuse_trust_scores.yml
new file mode 100644
index 00000000000..75a8888e069
--- /dev/null
+++ b/db/docs/abuse_trust_scores.yml
@@ -0,0 +1,10 @@
+---
+table_name: abuse_trust_scores
+classes:
+- Abuse::TrustScore
+feature_categories:
+- instance_resiliency
+description: Aggregates per-user scores related to potential product abuse.
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/117301
+milestone: '15.11'
+gitlab_schema: gitlab_main
diff --git a/db/docs/agent_activity_events.yml b/db/docs/agent_activity_events.yml
index 9fd906d5352..d014ef1f114 100644
--- a/db/docs/agent_activity_events.yml
+++ b/db/docs/agent_activity_events.yml
@@ -3,7 +3,7 @@ table_name: agent_activity_events
classes:
- Clusters::Agents::ActivityEvent
feature_categories:
-- kubernetes_management
+- deployment_management
description: Historical timeline events belonging to a cluster agent
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/74577
milestone: '14.6'
diff --git a/db/docs/agent_group_authorizations.yml b/db/docs/agent_group_authorizations.yml
index 61c8733383a..f0d45dbdc3d 100644
--- a/db/docs/agent_group_authorizations.yml
+++ b/db/docs/agent_group_authorizations.yml
@@ -1,9 +1,9 @@
---
table_name: agent_group_authorizations
classes:
-- Clusters::Agents::GroupAuthorization
+- Clusters::Agents::Authorizations::CiAccess::GroupAuthorization
feature_categories:
-- kubernetes_management
+- deployment_management
description: Configuration for a group that is authorized to use a particular cluster agent
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/68023
milestone: '14.3'
diff --git a/db/docs/agent_project_authorizations.yml b/db/docs/agent_project_authorizations.yml
index e595c84b5d5..77c26571c28 100644
--- a/db/docs/agent_project_authorizations.yml
+++ b/db/docs/agent_project_authorizations.yml
@@ -1,9 +1,9 @@
---
table_name: agent_project_authorizations
classes:
-- Clusters::Agents::ProjectAuthorization
+- Clusters::Agents::Authorizations::CiAccess::ProjectAuthorization
feature_categories:
-- kubernetes_management
+- deployment_management
description: Configuration for a project that is authorized to use a particular cluster agent
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/67295
milestone: '14.3'
diff --git a/db/docs/agent_user_access_group_authorizations.yml b/db/docs/agent_user_access_group_authorizations.yml
new file mode 100644
index 00000000000..cd4df56d5a0
--- /dev/null
+++ b/db/docs/agent_user_access_group_authorizations.yml
@@ -0,0 +1,10 @@
+---
+table_name: agent_user_access_group_authorizations
+classes:
+- Clusters::Agents::Authorizations::UserAccess::GroupAuthorization
+feature_categories:
+- deployment_management
+description: Configuration for a group that is authorized to use a particular cluster agent through user_access keyword
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/116901
+milestone: '15.11'
+gitlab_schema: gitlab_main
diff --git a/db/docs/agent_user_access_project_authorizations.yml b/db/docs/agent_user_access_project_authorizations.yml
new file mode 100644
index 00000000000..f0629af6ec2
--- /dev/null
+++ b/db/docs/agent_user_access_project_authorizations.yml
@@ -0,0 +1,10 @@
+---
+table_name: agent_user_access_project_authorizations
+classes:
+- Clusters::Agents::Authorizations::UserAccess::ProjectAuthorization
+feature_categories:
+- deployment_management
+description: Configuration for a project that is authorized to use a particular cluster agent through user_access keyword
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/116901
+milestone: '15.11'
+gitlab_schema: gitlab_main
diff --git a/db/docs/appearances.yml b/db/docs/appearances.yml
index 104a72263f0..e2777d02e1c 100644
--- a/db/docs/appearances.yml
+++ b/db/docs/appearances.yml
@@ -7,4 +7,4 @@ feature_categories:
description: TODO
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/40104eead753e7e8ea77951a74a3941546c35aab
milestone: '6.8'
-gitlab_schema: gitlab_main
+gitlab_schema: gitlab_main_clusterwide
diff --git a/db/docs/approval_project_rules_users.yml b/db/docs/approval_project_rules_users.yml
index ce35033356a..1066f31a396 100644
--- a/db/docs/approval_project_rules_users.yml
+++ b/db/docs/approval_project_rules_users.yml
@@ -1,6 +1,7 @@
---
table_name: approval_project_rules_users
-classes: []
+classes:
+- ApprovalProjectRulesUser
feature_categories:
- source_code_management
description: Keeps connection between user and a project approval rule
diff --git a/db/docs/audit_events_instance_external_audit_event_destinations.yml b/db/docs/audit_events_instance_external_audit_event_destinations.yml
new file mode 100644
index 00000000000..fe57989cec2
--- /dev/null
+++ b/db/docs/audit_events_instance_external_audit_event_destinations.yml
@@ -0,0 +1,10 @@
+---
+table_name: audit_events_instance_external_audit_event_destinations
+classes:
+ - AuditEvents::InstanceExternalAuditEventDestination
+feature_categories:
+ - audit_events
+description: Stores external destination urls for instance level audit events.
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/116909
+milestone: '15.11'
+gitlab_schema: gitlab_main
diff --git a/db/docs/aws_roles.yml b/db/docs/aws_roles.yml
index 902d6a97b62..0d5c9a6acb2 100644
--- a/db/docs/aws_roles.yml
+++ b/db/docs/aws_roles.yml
@@ -3,7 +3,7 @@ table_name: aws_roles
classes:
- Aws::Role
feature_categories:
-- kubernetes_management
+- deployment_management
description: (Deprecated) AWS IAM role for creating EKS clusters via GitLab
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/17057
milestone: '12.4'
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
new file mode 100644
index 00000000000..33f3371e294
--- /dev/null
+++ b/db/docs/batched_background_migrations/backfill_admin_mode_scope_for_personal_access_tokens.yml
@@ -0,0 +1,6 @@
+---
+migration_job_name: BackfillAdminModeScopeForPersonalAccessTokens
+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
diff --git a/db/docs/batched_background_migrations/backfill_project_wiki_repositories.yml b/db/docs/batched_background_migrations/backfill_project_wiki_repositories.yml
new file mode 100644
index 00000000000..5adc58a73cd
--- /dev/null
+++ b/db/docs/batched_background_migrations/backfill_project_wiki_repositories.yml
@@ -0,0 +1,8 @@
+---
+migration_job_name: BackfillProjectWikiRepositories
+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
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
new file mode 100644
index 00000000000..e0196878d61
--- /dev/null
+++ b/db/docs/batched_background_migrations/update_code_suggestions_for_namespace_settings.yml
@@ -0,0 +1,6 @@
+---
+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
diff --git a/db/docs/broadcast_messages.yml b/db/docs/broadcast_messages.yml
index d6d6a93ad2e..bceb79b7f9c 100644
--- a/db/docs/broadcast_messages.yml
+++ b/db/docs/broadcast_messages.yml
@@ -7,4 +7,4 @@ feature_categories:
description: GitLab can display broadcast messages to users of a GitLab instance
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/f1ecf53c1e55fbbc66cb2d7d12fb411cbfc2ace8
milestone: '6.3'
-gitlab_schema: gitlab_main
+gitlab_schema: gitlab_main_clusterwide
diff --git a/db/docs/ci_group_variables.yml b/db/docs/ci_group_variables.yml
index b98cbe92c83..6cea3df07d4 100644
--- a/db/docs/ci_group_variables.yml
+++ b/db/docs/ci_group_variables.yml
@@ -3,7 +3,7 @@ table_name: ci_group_variables
classes:
- Ci::GroupVariable
feature_categories:
-- pipeline_composition
+- secrets_management
description: TODO
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/5b0954759cc24bdba97be89bb117c5440174f859
milestone: '9.4'
diff --git a/db/docs/ci_instance_variables.yml b/db/docs/ci_instance_variables.yml
index 297477de562..cb7aced8461 100644
--- a/db/docs/ci_instance_variables.yml
+++ b/db/docs/ci_instance_variables.yml
@@ -3,7 +3,7 @@ table_name: ci_instance_variables
classes:
- Ci::InstanceVariable
feature_categories:
-- pipeline_composition
+- secrets_management
description: CI/CD variables available to all projects and groups in an instance.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/30156
milestone: '13.0'
diff --git a/db/docs/ci_job_variables.yml b/db/docs/ci_job_variables.yml
index 4a933f65479..306aabb225d 100644
--- a/db/docs/ci_job_variables.yml
+++ b/db/docs/ci_job_variables.yml
@@ -3,7 +3,7 @@ table_name: ci_job_variables
classes:
- Ci::JobVariable
feature_categories:
-- pipeline_composition
+- secrets_management
description: CI/CD variables set to a job when running it manually.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/14784
milestone: '12.2'
diff --git a/db/docs/ci_namespace_mirrors.yml b/db/docs/ci_namespace_mirrors.yml
index 1566f043a0e..29e79c065c6 100644
--- a/db/docs/ci_namespace_mirrors.yml
+++ b/db/docs/ci_namespace_mirrors.yml
@@ -3,7 +3,7 @@ table_name: ci_namespace_mirrors
classes:
- Ci::NamespaceMirror
feature_categories:
-- pods
+- cell
description: Mirrors some data from the `main` database into the `ci` database so that we can join directly in a single query
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75621
milestone: '14.6'
diff --git a/db/docs/ci_pipeline_variables.yml b/db/docs/ci_pipeline_variables.yml
index 7e83009b3d8..4b1e4dc39c3 100644
--- a/db/docs/ci_pipeline_variables.yml
+++ b/db/docs/ci_pipeline_variables.yml
@@ -3,7 +3,7 @@ table_name: ci_pipeline_variables
classes:
- Ci::PipelineVariable
feature_categories:
-- pipeline_composition
+- secrets_management
description: TODO
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/56418e85ac6b667d19495665860092ce4d74f55d
milestone: '9.5'
diff --git a/db/docs/ci_project_mirrors.yml b/db/docs/ci_project_mirrors.yml
index 8e332a10194..af7ce4f3017 100644
--- a/db/docs/ci_project_mirrors.yml
+++ b/db/docs/ci_project_mirrors.yml
@@ -3,7 +3,7 @@ table_name: ci_project_mirrors
classes:
- Ci::ProjectMirror
feature_categories:
-- pods
+- cell
description: Mirrors some data from the `main` database into the `ci` database so that we can join directly in a single query
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75621
milestone: '14.6'
diff --git a/db/docs/ci_runner_machines.yml b/db/docs/ci_runner_machines.yml
index 17cb700d96b..c7395907814 100644
--- a/db/docs/ci_runner_machines.yml
+++ b/db/docs/ci_runner_machines.yml
@@ -1,10 +1,10 @@
---
table_name: ci_runner_machines
classes:
-- Ci::RunnerMachine
+- Ci::RunnerManager
feature_categories:
- runner_fleet
-description: Information about host machines associated to Ci::Runner models
+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'
gitlab_schema: gitlab_ci
diff --git a/db/docs/ci_secure_file_states.yml b/db/docs/ci_secure_file_states.yml
index eacbea878e0..2f193e63e16 100644
--- a/db/docs/ci_secure_file_states.yml
+++ b/db/docs/ci_secure_file_states.yml
@@ -3,7 +3,7 @@ table_name: ci_secure_file_states
classes:
- Geo::CiSecureFileState
feature_categories:
-- pipeline_composition
+- secrets_management
description: Stores verification state for Geo replicated Project-level Secure Files.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/90510
milestone: '15.2'
diff --git a/db/docs/ci_secure_files.yml b/db/docs/ci_secure_files.yml
index 198326a0e25..c88b500b62d 100644
--- a/db/docs/ci_secure_files.yml
+++ b/db/docs/ci_secure_files.yml
@@ -3,7 +3,7 @@ table_name: ci_secure_files
classes:
- Ci::SecureFile
feature_categories:
-- pipeline_composition
+- secrets_management
description: TODO
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/77886
milestone: '14.7'
diff --git a/db/docs/ci_variables.yml b/db/docs/ci_variables.yml
index e083217db13..7440b886ab8 100644
--- a/db/docs/ci_variables.yml
+++ b/db/docs/ci_variables.yml
@@ -3,7 +3,7 @@ table_name: ci_variables
classes:
- Ci::Variable
feature_categories:
-- pipeline_composition
+- secrets_management
description: TODO
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/046b28312704f3131e72dcd2dbdacc5264d4aa62
milestone: '8.0'
diff --git a/db/docs/cluster_agent_tokens.yml b/db/docs/cluster_agent_tokens.yml
index 24b093c948c..36e843406b0 100644
--- a/db/docs/cluster_agent_tokens.yml
+++ b/db/docs/cluster_agent_tokens.yml
@@ -3,7 +3,7 @@ table_name: cluster_agent_tokens
classes:
- Clusters::AgentToken
feature_categories:
-- kubernetes_management
+- deployment_management
description: Tokens used by cluster agents to connect to GitLab
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/33228
milestone: '13.3'
diff --git a/db/docs/cluster_agents.yml b/db/docs/cluster_agents.yml
index 14574fb82f4..237d8d23bfd 100644
--- a/db/docs/cluster_agents.yml
+++ b/db/docs/cluster_agents.yml
@@ -3,7 +3,7 @@ table_name: cluster_agents
classes:
- Clusters::Agent
feature_categories:
-- kubernetes_management
+- deployment_management
description: Represents a GitLab Agent for Kubernetes installed in a Kubernetes cluster
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/33228
milestone: '13.3'
diff --git a/db/docs/cluster_enabled_grants.yml b/db/docs/cluster_enabled_grants.yml
index 873bbb4b7b5..4c6bef3db0e 100644
--- a/db/docs/cluster_enabled_grants.yml
+++ b/db/docs/cluster_enabled_grants.yml
@@ -3,7 +3,7 @@ table_name: cluster_enabled_grants
classes:
- Clusters::ClusterEnabledGrant
feature_categories:
-- kubernetes_management
+- deployment_management
description: Persists information about namespaces which got an extended life for certificate based clusters
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/87149
milestone: '15.1'
diff --git a/db/docs/cluster_groups.yml b/db/docs/cluster_groups.yml
index ff5c3d890fd..70c11431acf 100644
--- a/db/docs/cluster_groups.yml
+++ b/db/docs/cluster_groups.yml
@@ -3,7 +3,7 @@ table_name: cluster_groups
classes:
- Clusters::Group
feature_categories:
-- kubernetes_management
+- deployment_management
description: "(Deprecated) Join table between 'clusters' and 'namespaces'"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/0e15eec86d83cbdfefe17966bf5c02e4d419a34d
milestone: '11.5'
diff --git a/db/docs/cluster_platforms_kubernetes.yml b/db/docs/cluster_platforms_kubernetes.yml
index c92705b7c46..961eb37e366 100644
--- a/db/docs/cluster_platforms_kubernetes.yml
+++ b/db/docs/cluster_platforms_kubernetes.yml
@@ -3,7 +3,7 @@ table_name: cluster_platforms_kubernetes
classes:
- Clusters::Platforms::Kubernetes
feature_categories:
-- kubernetes_management
+- deployment_management
description: "(Deprecated) Kubernetes specific details for a cluster integration"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/d0cff7f5855f91b5479f9fdaa39d8d95ec691a9e
milestone: '10.2'
diff --git a/db/docs/cluster_projects.yml b/db/docs/cluster_projects.yml
index 89bcd726e1f..152b60ea87b 100644
--- a/db/docs/cluster_projects.yml
+++ b/db/docs/cluster_projects.yml
@@ -3,7 +3,7 @@ table_name: cluster_projects
classes:
- Clusters::Project
feature_categories:
-- kubernetes_management
+- deployment_management
description: "(Deprecated) Join table between 'clusters' and 'projects'"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/d0cff7f5855f91b5479f9fdaa39d8d95ec691a9e
milestone: '10.2'
diff --git a/db/docs/cluster_providers_aws.yml b/db/docs/cluster_providers_aws.yml
index 7c32b9291d1..ed9937b9a66 100644
--- a/db/docs/cluster_providers_aws.yml
+++ b/db/docs/cluster_providers_aws.yml
@@ -3,7 +3,7 @@ table_name: cluster_providers_aws
classes:
- Clusters::Providers::Aws
feature_categories:
-- kubernetes_management
+- deployment_management
description: "(Deprecated) AWS specific details for an EKS cluster integration"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/17057
milestone: '12.4'
diff --git a/db/docs/cluster_providers_gcp.yml b/db/docs/cluster_providers_gcp.yml
index cc89320d346..a16e07d9fd3 100644
--- a/db/docs/cluster_providers_gcp.yml
+++ b/db/docs/cluster_providers_gcp.yml
@@ -3,7 +3,7 @@ table_name: cluster_providers_gcp
classes:
- Clusters::Providers::Gcp
feature_categories:
-- kubernetes_management
+- deployment_management
description: "(Deprecated) GCP specific details for a GKE cluster integration"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/d0cff7f5855f91b5479f9fdaa39d8d95ec691a9e
milestone: '10.2'
diff --git a/db/docs/clusters.yml b/db/docs/clusters.yml
index f791c84bfa2..309bdd426b6 100644
--- a/db/docs/clusters.yml
+++ b/db/docs/clusters.yml
@@ -3,7 +3,7 @@ table_name: clusters
classes:
- Clusters::Cluster
feature_categories:
-- kubernetes_management
+- deployment_management
description: Persists information about GitLab managed clusters
introduced_by_url: https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/14879
milestone: '10.1'
diff --git a/db/docs/clusters_applications_cert_managers.yml b/db/docs/clusters_applications_cert_managers.yml
index 78ef851a2c0..0285b786f9f 100644
--- a/db/docs/clusters_applications_cert_managers.yml
+++ b/db/docs/clusters_applications_cert_managers.yml
@@ -1,7 +1,7 @@
---
table_name: clusters_applications_cert_managers
feature_categories:
-- kubernetes_management
+- deployment_management
description: "(Deprecated) A GitLab managed cert-manager installation in a Kubernetes cluster"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/8837519445c319a699e0f3ced1c6912c839f3389
milestone: '11.6'
diff --git a/db/docs/clusters_applications_crossplane.yml b/db/docs/clusters_applications_crossplane.yml
index c440eb2487b..a993468d7b8 100644
--- a/db/docs/clusters_applications_crossplane.yml
+++ b/db/docs/clusters_applications_crossplane.yml
@@ -1,7 +1,7 @@
---
table_name: clusters_applications_crossplane
feature_categories:
-- kubernetes_management
+- deployment_management
description: "(Deprecated) A GitLab managed Crossplane installation in a Kubernetes cluster"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/18797
milestone: '12.5'
diff --git a/db/docs/clusters_applications_helm.yml b/db/docs/clusters_applications_helm.yml
index bb849a21cae..58dbe04b1d5 100644
--- a/db/docs/clusters_applications_helm.yml
+++ b/db/docs/clusters_applications_helm.yml
@@ -1,9 +1,7 @@
---
table_name: clusters_applications_helm
-classes:
-- Clusters::Applications::Helm
feature_categories:
-- kubernetes_management
+- deployment_management
description: "(Deprecated) A GitLab managed Helm installation in a Kubernetes cluster"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/64be8d70ae20928df351e495a3442bb6036bc3e7
milestone: '10.2'
diff --git a/db/docs/clusters_applications_ingress.yml b/db/docs/clusters_applications_ingress.yml
index 02dda5a4498..b03d63f1cc6 100644
--- a/db/docs/clusters_applications_ingress.yml
+++ b/db/docs/clusters_applications_ingress.yml
@@ -1,9 +1,7 @@
---
table_name: clusters_applications_ingress
-classes:
-- Clusters::Applications::Ingress
feature_categories:
-- kubernetes_management
+- deployment_management
description: "(Deprecated) A GitLab managed Ingress installation in a Kubernetes cluster"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/d8223468ae2ae061020cc26336c51dc93cc75571
milestone: '10.2'
diff --git a/db/docs/clusters_applications_jupyter.yml b/db/docs/clusters_applications_jupyter.yml
index b15b889779b..4955e8fe217 100644
--- a/db/docs/clusters_applications_jupyter.yml
+++ b/db/docs/clusters_applications_jupyter.yml
@@ -1,9 +1,7 @@
---
table_name: clusters_applications_jupyter
-classes:
-- Clusters::Applications::Jupyter
feature_categories:
-- kubernetes_management
+- deployment_management
description: "(Deprecated) A GitLab managed Jupyter installation in a Kubernetes cluster"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/db9f765852d9fef464e69c0bf47a382f2ab7219d
milestone: '11.0'
diff --git a/db/docs/clusters_applications_knative.yml b/db/docs/clusters_applications_knative.yml
index e17a0284a1f..5cad3c342b0 100644
--- a/db/docs/clusters_applications_knative.yml
+++ b/db/docs/clusters_applications_knative.yml
@@ -1,9 +1,7 @@
---
table_name: clusters_applications_knative
-classes:
-- Clusters::Applications::Knative
feature_categories:
-- kubernetes_management
+- deployment_management
description: "(Deprecated) A GitLab managed Knative installation in a Kubernetes cluster"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/b5155b90ee233e2824c168fbb06b3ce5d3aeb194
milestone: '11.5'
diff --git a/db/docs/clusters_applications_prometheus.yml b/db/docs/clusters_applications_prometheus.yml
index 3c36d953726..f80b676ae4a 100644
--- a/db/docs/clusters_applications_prometheus.yml
+++ b/db/docs/clusters_applications_prometheus.yml
@@ -1,7 +1,7 @@
---
table_name: clusters_applications_prometheus
feature_categories:
-- kubernetes_management
+- deployment_management
description: Information about installed instance of Prometheus in the cluster
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/0d4548026f3060ca0a8f7aa8d8fc89838bc66130
milestone: '10.4'
diff --git a/db/docs/clusters_applications_runners.yml b/db/docs/clusters_applications_runners.yml
index c2fd4799cf9..8844c6647cd 100644
--- a/db/docs/clusters_applications_runners.yml
+++ b/db/docs/clusters_applications_runners.yml
@@ -1,9 +1,7 @@
---
table_name: clusters_applications_runners
-classes:
-- Clusters::Applications::Runner
feature_categories:
-- kubernetes_management
+- deployment_management
description: "(Deprecated) A GitLab managed Runner installation in a Kubernetes cluster"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/c607008ee55e35465e04a938a341f2f24cb6761f
milestone: '10.6'
diff --git a/db/docs/clusters_kubernetes_namespaces.yml b/db/docs/clusters_kubernetes_namespaces.yml
index 3572cfa4f2c..1c272eea497 100644
--- a/db/docs/clusters_kubernetes_namespaces.yml
+++ b/db/docs/clusters_kubernetes_namespaces.yml
@@ -3,7 +3,7 @@ table_name: clusters_kubernetes_namespaces
classes:
- Clusters::KubernetesNamespace
feature_categories:
-- kubernetes_management
+- deployment_management
description: "(Deprecated) A Kubernetes namespace in a GitLab managed Kubernetes cluster"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/e3ca493876ab71ed29817a0af436fc563f564bbe
milestone: '11.5'
diff --git a/db/docs/deleted_tables/packages_events.yml b/db/docs/deleted_tables/packages_events.yml
new file mode 100644
index 00000000000..0758ea58e04
--- /dev/null
+++ b/db/docs/deleted_tables/packages_events.yml
@@ -0,0 +1,12 @@
+---
+table_name: packages_events
+classes:
+- Packages::Event
+feature_categories:
+- package_registry
+description: Package tracking events (deprecated)
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41846
+milestone: '13.5'
+gitlab_schema: gitlab_main
+removed_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/114947
+removed_in_milestone: '15.11'
diff --git a/db/docs/deployment_clusters.yml b/db/docs/deployment_clusters.yml
index eea538a83d2..011c5252593 100644
--- a/db/docs/deployment_clusters.yml
+++ b/db/docs/deployment_clusters.yml
@@ -3,7 +3,7 @@ table_name: deployment_clusters
classes:
- DeploymentCluster
feature_categories:
-- kubernetes_management
+- deployment_management
description: "(Deprecated) Join table between `deployments` and `clusters`"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/24235
milestone: '12.8'
diff --git a/db/docs/design_management_repositories.yml b/db/docs/design_management_repositories.yml
new file mode 100644
index 00000000000..61d905c2703
--- /dev/null
+++ b/db/docs/design_management_repositories.yml
@@ -0,0 +1,10 @@
+---
+table_name: design_management_repositories
+classes:
+- DesignManagement::Repository
+feature_categories:
+- design_management
+description: Holds information about Design Management Repositories
+introduced_by_url: 'https://gitlab.com/gitlab-org/gitlab/-/merge_requests/111555'
+milestone: '15.11'
+gitlab_schema: gitlab_main \ No newline at end of file
diff --git a/db/docs/dora_daily_metrics.yml b/db/docs/dora_daily_metrics.yml
index 52ffdfc7f1b..abd5e256686 100644
--- a/db/docs/dora_daily_metrics.yml
+++ b/db/docs/dora_daily_metrics.yml
@@ -4,6 +4,7 @@ classes:
- Dora::DailyMetrics
feature_categories:
- continuous_delivery
+- value_stream_management
description: Stores daily snapshots of DORA4 metrics per environment.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/55473
milestone: '13.10'
diff --git a/db/docs/dora_performance_scores.yml b/db/docs/dora_performance_scores.yml
new file mode 100644
index 00000000000..2a02adf5e1d
--- /dev/null
+++ b/db/docs/dora_performance_scores.yml
@@ -0,0 +1,10 @@
+---
+table_name: dora_performance_scores
+classes:
+- Dora::PerformanceScore
+feature_categories:
+- value_stream_management
+description: Stores monthly snapshots of DORA4 performance scores per project.
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/115689
+milestone: '15.11'
+gitlab_schema: gitlab_main
diff --git a/db/docs/issue_assignment_events.yml b/db/docs/issue_assignment_events.yml
new file mode 100644
index 00000000000..0ba9f9ca21f
--- /dev/null
+++ b/db/docs/issue_assignment_events.yml
@@ -0,0 +1,10 @@
+---
+table_name: issue_assignment_events
+classes:
+- ResourceEvents::IssueAssignmentEvent
+feature_categories:
+- value_stream_management
+description: Tracks the assignment and unassignment events for issues
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/117379
+milestone: '15.11'
+gitlab_schema: gitlab_main
diff --git a/db/docs/loose_foreign_keys_deleted_records.yml b/db/docs/loose_foreign_keys_deleted_records.yml
index 8ce8d4e52b3..24de9b85e4c 100644
--- a/db/docs/loose_foreign_keys_deleted_records.yml
+++ b/db/docs/loose_foreign_keys_deleted_records.yml
@@ -3,7 +3,7 @@ table_name: loose_foreign_keys_deleted_records
classes:
- LooseForeignKeys::DeletedRecord
feature_categories:
-- pods
+- cell
description: Used by the loose foreign keys feature as a queue of parent records whose child records (via foreign keys) need to be deleted/nullified
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/70152
milestone: '14.3'
diff --git a/db/docs/merge_request_assignment_events.yml b/db/docs/merge_request_assignment_events.yml
new file mode 100644
index 00000000000..49eeefcbcf0
--- /dev/null
+++ b/db/docs/merge_request_assignment_events.yml
@@ -0,0 +1,10 @@
+---
+table_name: merge_request_assignment_events
+classes:
+- ResourceEvents::MergeRequestAssignmentEvent
+feature_categories:
+- value_stream_management
+description: Tracks the assignment and unassignment events for merge requests
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/117379
+milestone: '15.11'
+gitlab_schema: gitlab_main
diff --git a/db/docs/merge_trains.yml b/db/docs/merge_trains.yml
index 3b666322d3b..7d0310236e9 100644
--- a/db/docs/merge_trains.yml
+++ b/db/docs/merge_trains.yml
@@ -1,10 +1,10 @@
---
table_name: merge_trains
classes:
-- MergeTrain
+- MergeTrains::Car
feature_categories:
- continuous_integration
-description: TODO
+description: Each record represents a single merge request which is or was part of a merge train.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/827fc3ccb9335aa29fba0fc532b70015ec4c5186
milestone: '11.11'
gitlab_schema: gitlab_main
diff --git a/db/docs/namespace_aggregation_schedules.yml b/db/docs/namespace_aggregation_schedules.yml
index 56ac5ee3ed6..d57311fff8f 100644
--- a/db/docs/namespace_aggregation_schedules.yml
+++ b/db/docs/namespace_aggregation_schedules.yml
@@ -3,7 +3,7 @@ table_name: namespace_aggregation_schedules
classes:
- Namespace::AggregationSchedule
feature_categories:
-- subscription_cost_management
+- consumables_cost_management
description: Keeps update schedules for namespace_root_storage_statistics
introduced_by_url: https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/29570
milestone: '12.1'
diff --git a/db/docs/namespace_limits.yml b/db/docs/namespace_limits.yml
index bcc687de858..5bb06b53cb2 100644
--- a/db/docs/namespace_limits.yml
+++ b/db/docs/namespace_limits.yml
@@ -3,7 +3,7 @@ table_name: namespace_limits
classes:
- NamespaceLimit
feature_categories:
-- subscription_cost_management
+- consumables_cost_management
description: Contains limits for namespace features like storage and ci
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/34746
milestone: '13.2'
diff --git a/db/docs/namespaces_storage_limit_exclusions.yml b/db/docs/namespaces_storage_limit_exclusions.yml
index d66da2797dd..b96c15112ec 100644
--- a/db/docs/namespaces_storage_limit_exclusions.yml
+++ b/db/docs/namespaces_storage_limit_exclusions.yml
@@ -3,7 +3,7 @@ table_name: namespaces_storage_limit_exclusions
classes:
- Namespaces::Storage::LimitExclusion
feature_categories:
- - subscription_cost_management
+ - consumables_cost_management
description: |
Stores namespaces that are excluded from the storage limit.
Any namespaces that are included in this table will not have storage limitations applied.
diff --git a/db/docs/namespaces_sync_events.yml b/db/docs/namespaces_sync_events.yml
index f089ca85789..fdac8accd7f 100644
--- a/db/docs/namespaces_sync_events.yml
+++ b/db/docs/namespaces_sync_events.yml
@@ -3,7 +3,7 @@ table_name: namespaces_sync_events
classes:
- Namespaces::SyncEvent
feature_categories:
-- pods
+- cell
description: Used as a queue of data that needs to be synchronized between the `ci` and `main` database
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75517
milestone: '14.6'
diff --git a/db/docs/p_ci_runner_machine_builds.yml b/db/docs/p_ci_runner_machine_builds.yml
index 8ffac67fb94..55d09963acc 100644
--- a/db/docs/p_ci_runner_machine_builds.yml
+++ b/db/docs/p_ci_runner_machine_builds.yml
@@ -1,9 +1,9 @@
table_name: p_ci_runner_machine_builds
classes:
-- Ci::RunnerMachineBuild
+- Ci::RunnerManagerBuild
feature_categories:
- runner_fleet
-description: Relationships between builds and runner machines
+description: Relationships between builds and runner managers
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/111476
milestone: '15.9'
gitlab_schema: gitlab_ci
diff --git a/db/docs/packages_events.yml b/db/docs/packages_events.yml
deleted file mode 100644
index 38c47c53721..00000000000
--- a/db/docs/packages_events.yml
+++ /dev/null
@@ -1,10 +0,0 @@
----
-table_name: packages_events
-classes:
-- Packages::Event
-feature_categories:
-- package_registry
-description: Package tracking events (deprecated)
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41846
-milestone: '13.5'
-gitlab_schema: gitlab_main
diff --git a/db/docs/packages_npm_metadata_caches.yml b/db/docs/packages_npm_metadata_caches.yml
new file mode 100644
index 00000000000..3329c75b7ee
--- /dev/null
+++ b/db/docs/packages_npm_metadata_caches.yml
@@ -0,0 +1,10 @@
+---
+table_name: packages_npm_metadata_caches
+classes:
+- Packages::Npm::MetadataCache
+feature_categories:
+- package_registry
+description: Store the metadata of npm packages to use later as a cache
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/114312
+milestone: '15.11'
+gitlab_schema: gitlab_main
diff --git a/db/docs/pm_checkpoints.yml b/db/docs/pm_checkpoints.yml
index e360e8ad356..2e42077943d 100644
--- a/db/docs/pm_checkpoints.yml
+++ b/db/docs/pm_checkpoints.yml
@@ -3,7 +3,7 @@ table_name: pm_checkpoints
classes:
- PackageMetadata::Checkpoint
feature_categories:
-- license_compliance
+- software_composition_analysis
description: Tracks position of last synced file.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/109713
milestone: '15.9'
diff --git a/db/docs/pm_licenses.yml b/db/docs/pm_licenses.yml
index 55ef2719cbc..31d9ae7a179 100644
--- a/db/docs/pm_licenses.yml
+++ b/db/docs/pm_licenses.yml
@@ -3,7 +3,7 @@ table_name: pm_licenses
classes:
- PackageMetadata::License
feature_categories:
- - license_compliance
+ - software_composition_analysis
description: Tracks licenses referenced by public package registries.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/102794
milestone: '15.6'
diff --git a/db/docs/pm_package_version_licenses.yml b/db/docs/pm_package_version_licenses.yml
index 439162ecf9d..1e3f21c4383 100644
--- a/db/docs/pm_package_version_licenses.yml
+++ b/db/docs/pm_package_version_licenses.yml
@@ -3,7 +3,7 @@ table_name: pm_package_version_licenses
classes:
- PackageMetadata::PackageVersionLicense
feature_categories:
- - license_compliance
+ - software_composition_analysis
description: Tracks licenses under which a given package version has been published.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/102794
milestone: '15.6'
diff --git a/db/docs/pm_package_versions.yml b/db/docs/pm_package_versions.yml
index 7b015ddc174..b216d58ce99 100644
--- a/db/docs/pm_package_versions.yml
+++ b/db/docs/pm_package_versions.yml
@@ -3,7 +3,7 @@ table_name: pm_package_versions
classes:
- PackageMetadata::PackageVersion
feature_categories:
-- license_compliance
+- software_composition_analysis
description: Tracks package versions served by public package registries.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/102794
milestone: '15.6'
diff --git a/db/docs/pm_packages.yml b/db/docs/pm_packages.yml
index 35932b37990..b114e75791f 100644
--- a/db/docs/pm_packages.yml
+++ b/db/docs/pm_packages.yml
@@ -3,7 +3,7 @@ table_name: pm_packages
classes:
- PackageMetadata::Package
feature_categories:
-- license_compliance
+- software_composition_analysis
description: Tracks packages served by public package registries.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/102794
milestone: '15.6'
diff --git a/db/docs/project_security_settings.yml b/db/docs/project_security_settings.yml
index 99a767978fb..af559d11164 100644
--- a/db/docs/project_security_settings.yml
+++ b/db/docs/project_security_settings.yml
@@ -3,7 +3,7 @@ table_name: project_security_settings
classes:
- ProjectSecuritySetting
feature_categories:
-- dependency_scanning
+- software_composition_analysis
- container_scanning
description: Project settings related to security features.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/32577
diff --git a/db/docs/projects_sync_events.yml b/db/docs/projects_sync_events.yml
index 70e325d1c0a..84b99fe6080 100644
--- a/db/docs/projects_sync_events.yml
+++ b/db/docs/projects_sync_events.yml
@@ -3,7 +3,7 @@ table_name: projects_sync_events
classes:
- Projects::SyncEvent
feature_categories:
-- pods
+- cell
description: Used as a queue of data that needs to be synchronized between the `ci` and `main` database
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75517
milestone: '14.6'
diff --git a/db/docs/resource_link_events.yml b/db/docs/resource_link_events.yml
new file mode 100644
index 00000000000..cfa04aa522c
--- /dev/null
+++ b/db/docs/resource_link_events.yml
@@ -0,0 +1,10 @@
+---
+table_name: resource_link_events
+classes:
+- WorkItems::ResourceLinkEvent
+feature_categories:
+- planning_analytics
+description: Records the change of parent link on work items along with timestamps
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/114394
+milestone: '15.11'
+gitlab_schema: gitlab_main
diff --git a/db/docs/schema_inconsistencies.yml b/db/docs/schema_inconsistencies.yml
new file mode 100644
index 00000000000..af95f26accb
--- /dev/null
+++ b/db/docs/schema_inconsistencies.yml
@@ -0,0 +1,10 @@
+---
+table_name: schema_inconsistencies
+feature_categories:
+- database
+description: The schema_inconsistencies table contains a list of database schema inconsistencies.
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/114876
+milestone: '15.11'
+classes:
+- Gitlab::Database::SchemaValidation::SchemaInconsistency
+gitlab_schema: gitlab_main
diff --git a/db/docs/search_indices.yml b/db/docs/search_indices.yml
new file mode 100644
index 00000000000..7b9789686a7
--- /dev/null
+++ b/db/docs/search_indices.yml
@@ -0,0 +1,11 @@
+---
+table_name: search_indices
+classes:
+- Search::Index
+- Search::NoteIndex
+feature_categories:
+- global_search
+description: Represents an Advanced Search index
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/113612/
+milestone: '15.11'
+gitlab_schema: gitlab_main
diff --git a/db/docs/search_namespace_index_assignments.yml b/db/docs/search_namespace_index_assignments.yml
new file mode 100644
index 00000000000..5ddaa628dc9
--- /dev/null
+++ b/db/docs/search_namespace_index_assignments.yml
@@ -0,0 +1,10 @@
+---
+table_name: search_namespace_index_assignments
+classes:
+- Search::NamespaceIndexAssignment
+feature_categories:
+- global_search
+description: Joins a Namespace to a Search::Index
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/113612
+milestone: '15.11'
+gitlab_schema: gitlab_main
diff --git a/db/docs/serverless_domain_cluster.yml b/db/docs/serverless_domain_cluster.yml
index 72b231171ba..f035c992d37 100644
--- a/db/docs/serverless_domain_cluster.yml
+++ b/db/docs/serverless_domain_cluster.yml
@@ -1,7 +1,7 @@
---
table_name: serverless_domain_cluster
feature_categories:
-- kubernetes_management
+- deployment_management
description: "(Deprecated) A custom domain for a GitLab managed Knative installation"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/19835
milestone: '12.6'
diff --git a/db/docs/service_desk_custom_email_credentials.yml b/db/docs/service_desk_custom_email_credentials.yml
new file mode 100644
index 00000000000..fdfdce8fc21
--- /dev/null
+++ b/db/docs/service_desk_custom_email_credentials.yml
@@ -0,0 +1,11 @@
+---
+table_name: service_desk_custom_email_credentials
+classes:
+- ServiceDesk::CustomEmailCredential
+feature_categories:
+- service_desk
+description: Holds all the credentials for custom email
+ addresses for Service Desk
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/114917
+milestone: '15.11'
+gitlab_schema: gitlab_main
diff --git a/db/docs/vulnerability_advisories.yml b/db/docs/vulnerability_advisories.yml
index 18029e784b5..6ce7f30aa7c 100644
--- a/db/docs/vulnerability_advisories.yml
+++ b/db/docs/vulnerability_advisories.yml
@@ -4,8 +4,7 @@ classes:
- Vulnerabilities::Advisory
feature_categories:
- container_scanning
-- dependency_scanning
-- license_compliance
+- software_composition_analysis
description: Stores vulnerability advisories
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/95622
milestone: '15.4'
diff --git a/db/fixtures/development/28_integrations.rb b/db/fixtures/development/28_integrations.rb
index db54593ae27..76f3f646271 100644
--- a/db/fixtures/development/28_integrations.rb
+++ b/db/fixtures/development/28_integrations.rb
@@ -3,7 +3,7 @@
Gitlab::Seeder.quiet do
# This is only enabled if you're going to be using the customer portal in
# development.
- # CUSTOMER_PORTAL_URL=https://your.ngrok.io FILTER=integrations rake db:seed_fu
+ # CUSTOMER_PORTAL_URL=http://localhost:5000 FILTER=integrations rake db:seed_fu
flag = 'CUSTOMER_PORTAL_URL'
if ENV[flag]
diff --git a/db/fixtures/development/33_triage_ops.rb b/db/fixtures/development/33_triage_ops.rb
index 080e985fc5f..5cdb1496c3d 100644
--- a/db/fixtures/development/33_triage_ops.rb
+++ b/db/fixtures/development/33_triage_ops.rb
@@ -85,6 +85,7 @@ class Gitlab::Seeder::TriageOps
Sidekiq::Testing.inline! do
puts "Ensuring required groups"
ensure_group('gitlab-com')
+ ensure_group('gitlab-com/support')
ensure_group('gitlab-com/gl-security/appsec')
ensure_group('gitlab-jh/jh-team')
ensure_group('gitlab-org')
@@ -192,7 +193,7 @@ class Gitlab::Seeder::TriageOps
group = Group.new(
name: group_path.titleize,
path: group_path,
- parent_id: parent&.id
+ parent: parent
)
group.description = FFaker::Lorem.sentence
group.save!
diff --git a/db/fixtures/development/36_achievements.rb b/db/fixtures/development/36_achievements.rb
index 9bb485afe38..5798fd2d6c7 100644
--- a/db/fixtures/development/36_achievements.rb
+++ b/db/fixtures/development/36_achievements.rb
@@ -5,7 +5,7 @@ class Gitlab::Seeder::Achievements
def initialize(group, user_ids)
@group = group
- @maintainer_ids = group.members.maintainers.pluck(:user_id)
+ @maintainer_ids = group.members.maintainers.pluck_user_ids
@maintainer_ids << User.admins.first.id
@user_ids = user_ids
end
diff --git a/db/fixtures/development/37_timelogs.rb b/db/fixtures/development/37_timelogs.rb
new file mode 100644
index 00000000000..b5be9d21cb3
--- /dev/null
+++ b/db/fixtures/development/37_timelogs.rb
@@ -0,0 +1,99 @@
+# frozen_string_literal: true
+
+class Gitlab::Seeder::Timelogs
+ attr_reader :project, :issues, :merge_requests, :users
+
+ def initialize(project, users)
+ @project = project
+ @issues = project.issues
+ @merge_requests = project.merge_requests
+ @users = users
+ end
+
+ def seed!
+ ensure_users_are_reporters
+
+ print "\nGenerating time entries for issues and merge requests in '#{project.full_path}'\n"
+ seed_on_issuables(issues)
+ seed_on_issuables(merge_requests)
+ end
+
+ def self.find_or_create_reporters
+ password = SecureRandom.hex.slice(0, 16)
+
+ [
+ User.find_by_username("root"),
+ find_or_create_reporter_user("timelogs_reporter_user_1", password),
+ find_or_create_reporter_user("timelogs_reporter_user_2", password)
+ ].compact
+ end
+
+ private
+
+ def ensure_users_are_reporters
+ team = ProjectTeam.new(project)
+
+ users.each do |user|
+ unless team.member?(user, Gitlab::Access::REPORTER)
+ print "\nAdding #{user.username} to #{project.full_path} reporters"
+ team.add_reporter(user)
+ end
+ end
+ end
+
+ def seed_on_issuables(issuables)
+ min_date = Time.now - 2.months
+ max_date = Time.now
+
+ issuables.each do |issuable|
+ rand(2..5).times do
+ timelog_author = users.sample
+
+ ::Timelogs::CreateService.new(
+ issuable, rand(10..120) * 60, rand(min_date..max_date), FFaker::Lorem.sentence, timelog_author
+ ).execute
+
+ print '.'
+ end
+ end
+ end
+
+ def self.find_or_create_reporter_user(username, password)
+ user = User.find_by_username(username)
+ if user.nil?
+ print "\nCreating user '#{username}' with password: '#{password}'"
+
+ user = User.create!(
+ username: username,
+ name: FFaker::Name.name,
+ email: FFaker::Internet.email,
+ confirmed_at: DateTime.now,
+ password: password
+ )
+ end
+
+ user
+ end
+end
+
+if ENV['SEED_TIMELOGS']
+ Gitlab::Seeder.quiet do
+ users = Gitlab::Seeder::Timelogs.find_or_create_reporters
+
+ # Seed timelogs for the first 5 projects
+ projects = Project.first(5)
+
+ # Always seed timelogs to the Flight project
+ flight_project = Project.find_by_full_path("flightjs/Flight")
+ projects |= [flight_project] unless flight_project.nil?
+
+ projects.each do |project|
+ Gitlab::Seeder::Timelogs.new(project, users).seed! unless project.nil?
+ end
+
+ rescue => e
+ warn "\nError seeding timelogs: #{e}"
+ end
+else
+ puts "Skipped. Use the `SEED_TIMELOGS` environment variable to enable seeding timelogs data."
+end
diff --git a/db/init_structure.sql b/db/init_structure.sql
index 2b952381952..63961f05c6b 100644
--- a/db/init_structure.sql
+++ b/db/init_structure.sql
@@ -10,178 +10,200 @@ CREATE EXTENSION IF NOT EXISTS btree_gist;
CREATE EXTENSION IF NOT EXISTS pg_trgm;
-CREATE FUNCTION insert_into_loose_foreign_keys_deleted_records() RETURNS trigger
+CREATE FUNCTION delete_associated_project_namespace() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
- INSERT INTO loose_foreign_keys_deleted_records
- (deleted_table_name, deleted_table_primary_key_value)
- SELECT TG_TABLE_NAME, old_table.id FROM old_table
- ON CONFLICT DO NOTHING;
+DELETE FROM namespaces
+WHERE namespaces.id = OLD.project_namespace_id AND
+namespaces.type = 'Project';
+RETURN NULL;
- RETURN NULL;
END
$$;
-CREATE FUNCTION integrations_set_type_new() RETURNS trigger
+CREATE FUNCTION insert_into_loose_foreign_keys_deleted_records() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
-UPDATE integrations SET type_new = regexp_replace(NEW.type, '\A(.+)Service\Z', 'Integrations::\1')
-WHERE integrations.id = NEW.id;
-RETURN NULL;
+ INSERT INTO loose_foreign_keys_deleted_records
+ (fully_qualified_table_name, primary_key_value)
+ SELECT TG_TABLE_SCHEMA || '.' || TG_TABLE_NAME, old_table.id FROM old_table;
+ RETURN NULL;
END
$$;
-CREATE FUNCTION set_has_external_issue_tracker() RETURNS trigger
+CREATE FUNCTION insert_namespaces_sync_event() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
-UPDATE projects SET has_external_issue_tracker = (
- EXISTS
- (
- SELECT 1
- FROM integrations
- WHERE project_id = COALESCE(NEW.project_id, OLD.project_id)
- AND active = TRUE
- AND category = 'issue_tracker'
- )
-)
-WHERE projects.id = COALESCE(NEW.project_id, OLD.project_id);
+INSERT INTO namespaces_sync_events (namespace_id)
+VALUES(COALESCE(NEW.id, OLD.id));
RETURN NULL;
END
$$;
-CREATE FUNCTION set_has_external_wiki() RETURNS trigger
+CREATE 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
-UPDATE projects SET has_external_wiki = COALESCE(NEW.active, FALSE)
-WHERE projects.id = COALESCE(NEW.project_id, OLD.project_id);
-RETURN NULL;
-
+ 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)
+ 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')
+ ON CONFLICT(vulnerability_id) DO NOTHING;
+ RETURN NULL;
END
$$;
-CREATE FUNCTION trigger_07c94931164e() RETURNS trigger
+CREATE FUNCTION insert_projects_sync_event() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
- NEW."event_id_convert_to_bigint" := NEW."event_id";
- RETURN NEW;
-END;
-$$;
+INSERT INTO projects_sync_events (project_id)
+VALUES(COALESCE(NEW.id, OLD.id));
+RETURN NULL;
-CREATE FUNCTION trigger_21e7a2602957() RETURNS trigger
- LANGUAGE plpgsql
- AS $$
-BEGIN
- NEW."build_id_convert_to_bigint" := NEW."build_id";
- RETURN NEW;
-END;
+END
$$;
-CREATE FUNCTION trigger_3f6129be01d2() RETURNS trigger
- LANGUAGE plpgsql
+CREATE FUNCTION next_traversal_ids_sibling(traversal_ids integer[]) RETURNS integer[]
+ LANGUAGE plpgsql IMMUTABLE STRICT
AS $$
BEGIN
- NEW."id_convert_to_bigint" := NEW."id";
- NEW."stage_id_convert_to_bigint" := NEW."stage_id";
- RETURN NEW;
+ return traversal_ids[1:array_length(traversal_ids, 1)-1] ||
+ ARRAY[traversal_ids[array_length(traversal_ids, 1)]+1];
END;
$$;
-CREATE FUNCTION trigger_490d204c00b3() RETURNS trigger
+CREATE FUNCTION set_has_external_issue_tracker() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
- NEW."id_convert_to_bigint" := NEW."id";
- RETURN NEW;
-END;
-$$;
+UPDATE projects SET has_external_issue_tracker = (
+ EXISTS
+ (
+ SELECT 1
+ FROM integrations
+ WHERE project_id = COALESCE(NEW.project_id, OLD.project_id)
+ AND active = TRUE
+ AND category = 'issue_tracker'
+ )
+)
+WHERE projects.id = COALESCE(NEW.project_id, OLD.project_id);
+RETURN NULL;
-CREATE FUNCTION trigger_542d6c2ad72e() RETURNS trigger
- LANGUAGE plpgsql
- AS $$
-BEGIN
- NEW."id_convert_to_bigint" := NEW."id";
- RETURN NEW;
-END;
+END
$$;
-CREATE FUNCTION trigger_69523443cc10() RETURNS trigger
+CREATE FUNCTION set_has_external_wiki() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
- NEW."id_convert_to_bigint" := NEW."id";
- RETURN NEW;
-END;
-$$;
+UPDATE projects SET has_external_wiki = COALESCE(NEW.active, FALSE)
+WHERE projects.id = COALESCE(NEW.project_id, OLD.project_id);
+RETURN NULL;
-CREATE FUNCTION trigger_77f5e1d20482() RETURNS trigger
- LANGUAGE plpgsql
- AS $$
-BEGIN
- NEW."deployable_id_convert_to_bigint" := NEW."deployable_id";
- RETURN NEW;
-END;
+END
$$;
-CREATE FUNCTION trigger_8485e97c00e3() RETURNS trigger
+CREATE FUNCTION set_has_issues_on_vulnerability_reads() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
- NEW."source_job_id_convert_to_bigint" := NEW."source_job_id";
- RETURN NEW;
-END;
-$$;
+UPDATE
+ vulnerability_reads
+SET
+ has_issues = true
+WHERE
+ vulnerability_id = NEW.vulnerability_id AND has_issues IS FALSE;
+RETURN NULL;
-CREATE FUNCTION trigger_8487d4de3e7b() RETURNS trigger
- LANGUAGE plpgsql
- AS $$
-BEGIN
- NEW."build_id_convert_to_bigint" := NEW."build_id";
- RETURN NEW;
-END;
+END
$$;
-CREATE FUNCTION trigger_91dc388a5fe6() RETURNS trigger
+CREATE FUNCTION unset_has_issues_on_vulnerability_reads() RETURNS trigger
LANGUAGE plpgsql
AS $$
+DECLARE
+ has_issue_links integer;
BEGIN
- NEW."build_id_convert_to_bigint" := NEW."build_id";
- RETURN NEW;
-END;
-$$;
+ PERFORM 1
+ FROM
+ vulnerability_reads
+ WHERE
+ vulnerability_id = OLD.vulnerability_id
+ FOR UPDATE;
+
+ SELECT 1 INTO has_issue_links FROM vulnerability_issue_links WHERE vulnerability_id = OLD.vulnerability_id LIMIT 1;
+
+ IF (has_issue_links = 1) THEN
+ RETURN NULL;
+ END IF;
+
+ UPDATE
+ vulnerability_reads
+ SET
+ has_issues = false
+ WHERE
+ vulnerability_id = OLD.vulnerability_id;
-CREATE FUNCTION trigger_aebe8b822ad3() RETURNS trigger
- LANGUAGE plpgsql
- AS $$
-BEGIN
- NEW."id_convert_to_bigint" := NEW."id";
- NEW."taggable_id_convert_to_bigint" := NEW."taggable_id";
- RETURN NEW;
-END;
+ RETURN NULL;
+END
$$;
-CREATE FUNCTION trigger_cf2f9e35f002() RETURNS trigger
+CREATE FUNCTION update_location_from_vulnerability_occurrences() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
- NEW."build_id_convert_to_bigint" := NEW."build_id";
- RETURN NEW;
-END;
+UPDATE
+ vulnerability_reads
+SET
+ location_image = NEW.location->>'image',
+ cluster_agent_id = NEW.location->'kubernetes_resource'->>'agent_id'
+WHERE
+ vulnerability_id = NEW.vulnerability_id;
+RETURN NULL;
+
+END
$$;
-CREATE FUNCTION trigger_f1ca8ec18d78() RETURNS trigger
+CREATE FUNCTION update_vulnerability_reads_from_vulnerability() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
- NEW."job_artifact_id_convert_to_bigint" := NEW."job_artifact_id";
- RETURN NEW;
-END;
+UPDATE
+ vulnerability_reads
+SET
+ severity = NEW.severity,
+ state = NEW.state,
+ resolved_on_default_branch = NEW.resolved_on_default_branch
+WHERE vulnerability_id = NEW.id;
+RETURN NULL;
+
+END
$$;
CREATE TABLE audit_events (
@@ -394,15 +416,188 @@ CREATE TABLE gitlab_partitions_dynamic.audit_events_202307 (
);
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_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_d493ec90b5 CHECK ((char_length(target_details) <= 5500))
+);
+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_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_d493ec90b5 CHECK ((char_length(target_details) <= 5500))
+);
+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 batched_background_migration_job_transition_logs (
+ id bigint 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))
+)
+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-03-01 00:00:00+00');
+
+CREATE TABLE gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202303 (
+ 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_202303 FOR VALUES FROM ('2023-03-01 00:00:00+00') TO ('2023-04-01 00:00:00+00');
+
+CREATE TABLE gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202304 (
+ 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_202304 FOR VALUES FROM ('2023-04-01 00:00:00+00') 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 incident_management_pending_alert_escalations (
id bigint NOT NULL,
rule_id bigint NOT NULL,
alert_id bigint NOT NULL,
- schedule_id bigint,
process_at timestamp with time zone NOT NULL,
created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- status smallint
+ updated_at timestamp with time zone NOT NULL
)
PARTITION BY RANGE (process_at);
@@ -419,109 +614,109 @@ CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_alert_escalat
id bigint DEFAULT nextval('incident_management_pending_alert_escalations_id_seq'::regclass) NOT NULL,
rule_id bigint NOT NULL,
alert_id bigint NOT NULL,
- schedule_id bigint,
process_at timestamp with time zone NOT NULL,
created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- status smallint
+ 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_202211 FOR VALUES FROM ('2022-10-31 19:00:00-05') TO ('2022-11-30 18:00:00-06');
CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202212 (
id bigint DEFAULT nextval('incident_management_pending_alert_escalations_id_seq'::regclass) NOT NULL,
rule_id bigint NOT NULL,
alert_id bigint NOT NULL,
- schedule_id bigint,
process_at timestamp with time zone NOT NULL,
created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- status smallint
+ 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_202212 FOR VALUES FROM ('2022-11-30 18:00:00-06') TO ('2022-12-31 18:00:00-06');
CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202301 (
id bigint DEFAULT nextval('incident_management_pending_alert_escalations_id_seq'::regclass) NOT NULL,
rule_id bigint NOT NULL,
alert_id bigint NOT NULL,
- schedule_id bigint,
process_at timestamp with time zone NOT NULL,
created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- status smallint
+ 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_202301 FOR VALUES FROM ('2022-12-31 18:00:00-06') TO ('2023-01-31 18:00:00-06');
+ALTER TABLE ONLY incident_management_pending_alert_escalations ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202301 FOR VALUES FROM ('2023-01-01 00:00:00+00') TO ('2023-02-01 00:00:00+00');
CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202302 (
id bigint DEFAULT nextval('incident_management_pending_alert_escalations_id_seq'::regclass) NOT NULL,
rule_id bigint NOT NULL,
alert_id bigint NOT NULL,
- schedule_id bigint,
process_at timestamp with time zone NOT NULL,
created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- status smallint
+ 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_202302 FOR VALUES FROM ('2023-01-31 18:00:00-06') TO ('2023-02-28 18:00:00-06');
+ALTER TABLE ONLY incident_management_pending_alert_escalations ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202302 FOR VALUES FROM ('2023-02-01 00:00:00+00') TO ('2023-03-01 00:00:00+00');
CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202303 (
id bigint DEFAULT nextval('incident_management_pending_alert_escalations_id_seq'::regclass) NOT NULL,
rule_id bigint NOT NULL,
alert_id bigint NOT NULL,
- schedule_id bigint,
process_at timestamp with time zone NOT NULL,
created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- status smallint
+ 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_202303 FOR VALUES FROM ('2023-02-28 18:00:00-06') TO ('2023-03-31 19:00:00-05');
+ALTER TABLE ONLY incident_management_pending_alert_escalations ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202303 FOR VALUES FROM ('2023-03-01 00:00:00+00') TO ('2023-04-01 00:00:00+00');
CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202304 (
id bigint DEFAULT nextval('incident_management_pending_alert_escalations_id_seq'::regclass) NOT NULL,
rule_id bigint NOT NULL,
alert_id bigint NOT NULL,
- schedule_id bigint,
process_at timestamp with time zone NOT NULL,
created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- status smallint
+ 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_202304 FOR VALUES FROM ('2023-03-31 19:00:00-05') TO ('2023-04-30 19:00:00-05');
+ALTER TABLE ONLY incident_management_pending_alert_escalations ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202304 FOR VALUES FROM ('2023-04-01 00:00:00+00') 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,
- schedule_id bigint,
process_at timestamp with time zone NOT NULL,
created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- status smallint
+ 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-04-30 19:00:00-05') TO ('2023-05-31 19:00:00-05');
+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,
- schedule_id bigint,
process_at timestamp with time zone NOT NULL,
created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- status smallint
+ 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-05-31 19:00:00-05') TO ('2023-06-30 19:00:00-05');
+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,
- schedule_id bigint,
process_at timestamp with time zone NOT NULL,
created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- status smallint
+ 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-06-30 19:00:00-05') TO ('2023-07-31 19:00:00-05');
+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 incident_management_pending_issue_escalations (
id bigint NOT NULL,
@@ -550,7 +745,6 @@ CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_issue_escalat
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_202211 FOR VALUES FROM ('2022-10-31 19:00:00-05') TO ('2022-11-30 18:00:00-06');
CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202212 (
id bigint DEFAULT nextval('incident_management_pending_issue_escalations_id_seq'::regclass) NOT NULL,
@@ -560,7 +754,6 @@ CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_issue_escalat
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_202212 FOR VALUES FROM ('2022-11-30 18:00:00-06') TO ('2022-12-31 18:00:00-06');
CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202301 (
id bigint DEFAULT nextval('incident_management_pending_issue_escalations_id_seq'::regclass) NOT NULL,
@@ -570,7 +763,7 @@ CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_issue_escalat
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_202301 FOR VALUES FROM ('2022-12-31 18:00:00-06') TO ('2023-01-31 18:00:00-06');
+ALTER TABLE ONLY incident_management_pending_issue_escalations ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202301 FOR VALUES FROM ('2023-01-01 00:00:00+00') TO ('2023-02-01 00:00:00+00');
CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202302 (
id bigint DEFAULT nextval('incident_management_pending_issue_escalations_id_seq'::regclass) NOT NULL,
@@ -580,7 +773,7 @@ CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_issue_escalat
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_202302 FOR VALUES FROM ('2023-01-31 18:00:00-06') TO ('2023-02-28 18:00:00-06');
+ALTER TABLE ONLY incident_management_pending_issue_escalations ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202302 FOR VALUES FROM ('2023-02-01 00:00:00+00') TO ('2023-03-01 00:00:00+00');
CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202303 (
id bigint DEFAULT nextval('incident_management_pending_issue_escalations_id_seq'::regclass) NOT NULL,
@@ -590,7 +783,7 @@ CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_issue_escalat
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_202303 FOR VALUES FROM ('2023-02-28 18:00:00-06') TO ('2023-03-31 19:00:00-05');
+ALTER TABLE ONLY incident_management_pending_issue_escalations ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202303 FOR VALUES FROM ('2023-03-01 00:00:00+00') TO ('2023-04-01 00:00:00+00');
CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202304 (
id bigint DEFAULT nextval('incident_management_pending_issue_escalations_id_seq'::regclass) NOT NULL,
@@ -600,7 +793,7 @@ CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_issue_escalat
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_202304 FOR VALUES FROM ('2023-03-31 19:00:00-05') TO ('2023-04-30 19:00:00-05');
+ALTER TABLE ONLY incident_management_pending_issue_escalations ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202304 FOR VALUES FROM ('2023-04-01 00:00:00+00') 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,
@@ -610,7 +803,7 @@ CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_issue_escalat
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-04-30 19:00:00-05') TO ('2023-05-31 19:00:00-05');
+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,
@@ -620,7 +813,7 @@ CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_issue_escalat
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-05-31 19:00:00-05') TO ('2023-06-30 19:00:00-05');
+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,
@@ -630,63 +823,174 @@ CREATE TABLE gitlab_partitions_dynamic.incident_management_pending_issue_escalat
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-06-30 19:00:00-05') TO ('2023-07-31 19:00:00-05');
+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 loose_foreign_keys_deleted_records (
+ id bigint 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))
+)
+PARTITION BY LIST (partition);
+
+CREATE SEQUENCE loose_foreign_keys_deleted_records_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE loose_foreign_keys_deleted_records_id_seq OWNED BY loose_foreign_keys_deleted_records.id;
+
+CREATE TABLE gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_1 (
+ id bigint DEFAULT nextval('loose_foreign_keys_deleted_records_id_seq'::regclass) NOT NULL,
+ partition bigint DEFAULT 1 NOT NULL,
+ primary_key_value bigint NOT NULL,
+ status smallint DEFAULT 1 NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ fully_qualified_table_name text NOT NULL,
+ consume_after timestamp with time zone DEFAULT now(),
+ cleanup_attempts smallint DEFAULT 0,
+ CONSTRAINT check_1a541f3235 CHECK ((char_length(fully_qualified_table_name) <= 150))
+);
+ALTER TABLE ONLY loose_foreign_keys_deleted_records ATTACH PARTITION gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_1 FOR VALUES IN ('1');
+
+CREATE TABLE verification_codes (
created_at timestamp with time zone DEFAULT now() NOT NULL,
- deleted_table_name text NOT NULL,
- deleted_table_primary_key_value bigint NOT NULL,
- CONSTRAINT check_7229f9527e CHECK ((char_length(deleted_table_name) <= 63))
+ 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))
)
PARTITION BY RANGE (created_at);
-CREATE TABLE gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_000000 (
+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-02-01 00:00:00+00');
+
+CREATE TABLE gitlab_partitions_dynamic.verification_codes_202302 (
+ 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_202302 FOR VALUES FROM ('2023-02-01 00:00:00+00') TO ('2023-03-01 00:00:00+00');
+
+CREATE TABLE gitlab_partitions_dynamic.verification_codes_202303 (
+ 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_202303 FOR VALUES FROM ('2023-03-01 00:00:00+00') 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,
- deleted_table_name text NOT NULL,
- deleted_table_primary_key_value bigint NOT NULL,
- CONSTRAINT check_7229f9527e CHECK ((char_length(deleted_table_name) <= 63))
+ 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 loose_foreign_keys_deleted_records ATTACH PARTITION gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_000000 FOR VALUES FROM (MINVALUE) TO ('2022-11-30 18:00:00-06');
+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.loose_foreign_keys_deleted_records_202212 (
+CREATE TABLE gitlab_partitions_dynamic.verification_codes_202305 (
created_at timestamp with time zone DEFAULT now() NOT NULL,
- deleted_table_name text NOT NULL,
- deleted_table_primary_key_value bigint NOT NULL,
- CONSTRAINT check_7229f9527e CHECK ((char_length(deleted_table_name) <= 63))
+ 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 loose_foreign_keys_deleted_records ATTACH PARTITION gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_202212 FOR VALUES FROM ('2022-11-30 18:00:00-06') TO ('2022-12-31 18:00:00-06');
+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.loose_foreign_keys_deleted_records_202301 (
+CREATE TABLE gitlab_partitions_dynamic.verification_codes_202306 (
created_at timestamp with time zone DEFAULT now() NOT NULL,
- deleted_table_name text NOT NULL,
- deleted_table_primary_key_value bigint NOT NULL,
- CONSTRAINT check_7229f9527e CHECK ((char_length(deleted_table_name) <= 63))
+ 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 loose_foreign_keys_deleted_records ATTACH PARTITION gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_202301 FOR VALUES FROM ('2022-12-31 18:00:00-06') TO ('2023-01-31 18:00:00-06');
+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.loose_foreign_keys_deleted_records_202302 (
+CREATE TABLE gitlab_partitions_dynamic.verification_codes_202307 (
created_at timestamp with time zone DEFAULT now() NOT NULL,
- deleted_table_name text NOT NULL,
- deleted_table_primary_key_value bigint NOT NULL,
- CONSTRAINT check_7229f9527e CHECK ((char_length(deleted_table_name) <= 63))
+ 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 loose_foreign_keys_deleted_records ATTACH PARTITION gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_202302 FOR VALUES FROM ('2023-01-31 18:00:00-06') TO ('2023-02-28 18:00:00-06');
+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.loose_foreign_keys_deleted_records_202303 (
+CREATE TABLE gitlab_partitions_dynamic.verification_codes_202308 (
created_at timestamp with time zone DEFAULT now() NOT NULL,
- deleted_table_name text NOT NULL,
- deleted_table_primary_key_value bigint NOT NULL,
- CONSTRAINT check_7229f9527e CHECK ((char_length(deleted_table_name) <= 63))
+ 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 loose_foreign_keys_deleted_records ATTACH PARTITION gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_202303 FOR VALUES FROM ('2023-02-28 18:00:00-06') TO ('2023-03-31 19:00:00-05');
+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.loose_foreign_keys_deleted_records_202304 (
+CREATE TABLE gitlab_partitions_dynamic.verification_codes_202309 (
created_at timestamp with time zone DEFAULT now() NOT NULL,
- deleted_table_name text NOT NULL,
- deleted_table_primary_key_value bigint NOT NULL,
- CONSTRAINT check_7229f9527e CHECK ((char_length(deleted_table_name) <= 63))
+ 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 loose_foreign_keys_deleted_records ATTACH PARTITION gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_202304 FOR VALUES FROM ('2023-03-31 19:00:00-05') TO ('2023-04-30 19:00:00-05');
+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 web_hook_logs (
id bigint NOT NULL,
@@ -730,7 +1034,6 @@ CREATE TABLE gitlab_partitions_dynamic.web_hook_logs_000000 (
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 ('2022-12-01 00:00:00');
CREATE TABLE gitlab_partitions_dynamic.web_hook_logs_202212 (
id bigint DEFAULT nextval('web_hook_logs_id_seq'::regclass) NOT NULL,
@@ -868,399 +1171,466 @@ CREATE TABLE gitlab_partitions_dynamic.web_hook_logs_202307 (
);
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 analytics_cycle_analytics_issue_stage_events (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
+ stage_event_hash_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ milestone_id bigint,
+ author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
)
PARTITION BY HASH (stage_event_hash_id);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_00 (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
+ stage_event_hash_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ milestone_id bigint,
+ author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_00 FOR VALUES WITH (modulus 32, remainder 0);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_01 (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
+ stage_event_hash_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ milestone_id bigint,
+ author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_01 FOR VALUES WITH (modulus 32, remainder 1);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_02 (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
+ stage_event_hash_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ milestone_id bigint,
+ author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_02 FOR VALUES WITH (modulus 32, remainder 2);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_03 (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
+ stage_event_hash_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ milestone_id bigint,
+ author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_03 FOR VALUES WITH (modulus 32, remainder 3);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_04 (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
+ stage_event_hash_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ milestone_id bigint,
+ author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_04 FOR VALUES WITH (modulus 32, remainder 4);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_05 (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
+ stage_event_hash_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ milestone_id bigint,
+ author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_05 FOR VALUES WITH (modulus 32, remainder 5);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_06 (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
+ stage_event_hash_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ milestone_id bigint,
+ author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_06 FOR VALUES WITH (modulus 32, remainder 6);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_07 (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
+ stage_event_hash_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ milestone_id bigint,
+ author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_07 FOR VALUES WITH (modulus 32, remainder 7);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_08 (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
+ stage_event_hash_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ milestone_id bigint,
+ author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_08 FOR VALUES WITH (modulus 32, remainder 8);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_09 (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
+ stage_event_hash_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ milestone_id bigint,
+ author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_09 FOR VALUES WITH (modulus 32, remainder 9);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_10 (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
+ stage_event_hash_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ milestone_id bigint,
+ author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_10 FOR VALUES WITH (modulus 32, remainder 10);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_11 (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
+ stage_event_hash_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ milestone_id bigint,
+ author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_11 FOR VALUES WITH (modulus 32, remainder 11);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_12 (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
+ stage_event_hash_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ milestone_id bigint,
+ author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_12 FOR VALUES WITH (modulus 32, remainder 12);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_13 (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
+ stage_event_hash_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ milestone_id bigint,
+ author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_13 FOR VALUES WITH (modulus 32, remainder 13);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_14 (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
+ stage_event_hash_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ milestone_id bigint,
+ author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_14 FOR VALUES WITH (modulus 32, remainder 14);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_15 (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
+ stage_event_hash_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ milestone_id bigint,
+ author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_15 FOR VALUES WITH (modulus 32, remainder 15);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_16 (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
+ stage_event_hash_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ milestone_id bigint,
+ author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_16 FOR VALUES WITH (modulus 32, remainder 16);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_17 (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
+ stage_event_hash_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ milestone_id bigint,
+ author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_17 FOR VALUES WITH (modulus 32, remainder 17);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_18 (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
+ stage_event_hash_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ milestone_id bigint,
+ author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_18 FOR VALUES WITH (modulus 32, remainder 18);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_19 (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
+ stage_event_hash_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ milestone_id bigint,
+ author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_19 FOR VALUES WITH (modulus 32, remainder 19);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_20 (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
+ stage_event_hash_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ milestone_id bigint,
+ author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_20 FOR VALUES WITH (modulus 32, remainder 20);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_21 (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
+ stage_event_hash_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ milestone_id bigint,
+ author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_21 FOR VALUES WITH (modulus 32, remainder 21);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_22 (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
+ stage_event_hash_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ milestone_id bigint,
+ author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_22 FOR VALUES WITH (modulus 32, remainder 22);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_23 (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
+ stage_event_hash_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ milestone_id bigint,
+ author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_23 FOR VALUES WITH (modulus 32, remainder 23);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_24 (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
+ stage_event_hash_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ milestone_id bigint,
+ author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_24 FOR VALUES WITH (modulus 32, remainder 24);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_25 (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
+ stage_event_hash_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ milestone_id bigint,
+ author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_25 FOR VALUES WITH (modulus 32, remainder 25);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_26 (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
+ stage_event_hash_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ milestone_id bigint,
+ author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_26 FOR VALUES WITH (modulus 32, remainder 26);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_27 (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
+ stage_event_hash_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ milestone_id bigint,
+ author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_27 FOR VALUES WITH (modulus 32, remainder 27);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_28 (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
+ stage_event_hash_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ milestone_id bigint,
+ author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_28 FOR VALUES WITH (modulus 32, remainder 28);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_29 (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
+ stage_event_hash_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ milestone_id bigint,
+ author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_29 FOR VALUES WITH (modulus 32, remainder 29);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_30 (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
+ stage_event_hash_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ milestone_id bigint,
+ author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_30 FOR VALUES WITH (modulus 32, remainder 30);
CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_31 (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
+ stage_event_hash_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ milestone_id bigint,
+ author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_31 FOR VALUES WITH (modulus 32, remainder 31);
@@ -1272,7 +1642,8 @@ CREATE TABLE analytics_cycle_analytics_merge_request_stage_events (
milestone_id bigint,
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
)
PARTITION BY HASH (stage_event_hash_id);
@@ -1284,7 +1655,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
milestone_id bigint,
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_00 FOR VALUES WITH (modulus 32, remainder 0);
@@ -1296,7 +1668,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
milestone_id bigint,
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_01 FOR VALUES WITH (modulus 32, remainder 1);
@@ -1308,7 +1681,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
milestone_id bigint,
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_02 FOR VALUES WITH (modulus 32, remainder 2);
@@ -1320,7 +1694,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
milestone_id bigint,
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_03 FOR VALUES WITH (modulus 32, remainder 3);
@@ -1332,7 +1707,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
milestone_id bigint,
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_04 FOR VALUES WITH (modulus 32, remainder 4);
@@ -1344,7 +1720,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
milestone_id bigint,
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_05 FOR VALUES WITH (modulus 32, remainder 5);
@@ -1356,7 +1733,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
milestone_id bigint,
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_06 FOR VALUES WITH (modulus 32, remainder 6);
@@ -1368,7 +1746,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
milestone_id bigint,
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_07 FOR VALUES WITH (modulus 32, remainder 7);
@@ -1380,7 +1759,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
milestone_id bigint,
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_08 FOR VALUES WITH (modulus 32, remainder 8);
@@ -1392,7 +1772,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
milestone_id bigint,
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_09 FOR VALUES WITH (modulus 32, remainder 9);
@@ -1404,7 +1785,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
milestone_id bigint,
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_10 FOR VALUES WITH (modulus 32, remainder 10);
@@ -1416,7 +1798,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
milestone_id bigint,
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_11 FOR VALUES WITH (modulus 32, remainder 11);
@@ -1428,7 +1811,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
milestone_id bigint,
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_12 FOR VALUES WITH (modulus 32, remainder 12);
@@ -1440,7 +1824,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
milestone_id bigint,
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_13 FOR VALUES WITH (modulus 32, remainder 13);
@@ -1452,7 +1837,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
milestone_id bigint,
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_14 FOR VALUES WITH (modulus 32, remainder 14);
@@ -1464,7 +1850,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
milestone_id bigint,
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_15 FOR VALUES WITH (modulus 32, remainder 15);
@@ -1476,7 +1863,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
milestone_id bigint,
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_16 FOR VALUES WITH (modulus 32, remainder 16);
@@ -1488,7 +1876,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
milestone_id bigint,
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_17 FOR VALUES WITH (modulus 32, remainder 17);
@@ -1500,7 +1889,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
milestone_id bigint,
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_18 FOR VALUES WITH (modulus 32, remainder 18);
@@ -1512,7 +1902,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
milestone_id bigint,
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_19 FOR VALUES WITH (modulus 32, remainder 19);
@@ -1524,7 +1915,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
milestone_id bigint,
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_20 FOR VALUES WITH (modulus 32, remainder 20);
@@ -1536,7 +1928,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
milestone_id bigint,
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_21 FOR VALUES WITH (modulus 32, remainder 21);
@@ -1548,7 +1941,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
milestone_id bigint,
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_22 FOR VALUES WITH (modulus 32, remainder 22);
@@ -1560,7 +1954,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
milestone_id bigint,
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_23 FOR VALUES WITH (modulus 32, remainder 23);
@@ -1572,7 +1967,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
milestone_id bigint,
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_24 FOR VALUES WITH (modulus 32, remainder 24);
@@ -1584,7 +1980,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
milestone_id bigint,
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_25 FOR VALUES WITH (modulus 32, remainder 25);
@@ -1596,7 +1993,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
milestone_id bigint,
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_26 FOR VALUES WITH (modulus 32, remainder 26);
@@ -1608,7 +2006,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
milestone_id bigint,
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_27 FOR VALUES WITH (modulus 32, remainder 27);
@@ -1620,7 +2019,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
milestone_id bigint,
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_28 FOR VALUES WITH (modulus 32, remainder 28);
@@ -1632,7 +2032,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
milestone_id bigint,
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_29 FOR VALUES WITH (modulus 32, remainder 29);
@@ -1644,7 +2045,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
milestone_id bigint,
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_30 FOR VALUES WITH (modulus 32, remainder 30);
@@ -1656,10 +2058,596 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st
milestone_id bigint,
author_id bigint,
start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone
+ end_event_timestamp timestamp with time zone,
+ state_id smallint DEFAULT 1 NOT NULL
);
ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_31 FOR VALUES WITH (modulus 32, remainder 31);
+CREATE TABLE issue_search_data (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+)
+PARTITION BY HASH (project_id);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_00 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_00 FOR VALUES WITH (modulus 64, remainder 0);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_01 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_01 FOR VALUES WITH (modulus 64, remainder 1);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_02 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_02 FOR VALUES WITH (modulus 64, remainder 2);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_03 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_03 FOR VALUES WITH (modulus 64, remainder 3);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_04 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_04 FOR VALUES WITH (modulus 64, remainder 4);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_05 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_05 FOR VALUES WITH (modulus 64, remainder 5);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_06 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_06 FOR VALUES WITH (modulus 64, remainder 6);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_07 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_07 FOR VALUES WITH (modulus 64, remainder 7);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_08 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_08 FOR VALUES WITH (modulus 64, remainder 8);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_09 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_09 FOR VALUES WITH (modulus 64, remainder 9);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_10 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_10 FOR VALUES WITH (modulus 64, remainder 10);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_11 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_11 FOR VALUES WITH (modulus 64, remainder 11);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_12 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_12 FOR VALUES WITH (modulus 64, remainder 12);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_13 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_13 FOR VALUES WITH (modulus 64, remainder 13);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_14 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_14 FOR VALUES WITH (modulus 64, remainder 14);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_15 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_15 FOR VALUES WITH (modulus 64, remainder 15);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_16 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_16 FOR VALUES WITH (modulus 64, remainder 16);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_17 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_17 FOR VALUES WITH (modulus 64, remainder 17);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_18 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_18 FOR VALUES WITH (modulus 64, remainder 18);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_19 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_19 FOR VALUES WITH (modulus 64, remainder 19);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_20 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_20 FOR VALUES WITH (modulus 64, remainder 20);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_21 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_21 FOR VALUES WITH (modulus 64, remainder 21);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_22 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_22 FOR VALUES WITH (modulus 64, remainder 22);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_23 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_23 FOR VALUES WITH (modulus 64, remainder 23);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_24 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_24 FOR VALUES WITH (modulus 64, remainder 24);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_25 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_25 FOR VALUES WITH (modulus 64, remainder 25);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_26 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_26 FOR VALUES WITH (modulus 64, remainder 26);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_27 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_27 FOR VALUES WITH (modulus 64, remainder 27);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_28 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_28 FOR VALUES WITH (modulus 64, remainder 28);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_29 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_29 FOR VALUES WITH (modulus 64, remainder 29);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_30 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_30 FOR VALUES WITH (modulus 64, remainder 30);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_31 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_31 FOR VALUES WITH (modulus 64, remainder 31);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_32 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_32 FOR VALUES WITH (modulus 64, remainder 32);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_33 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_33 FOR VALUES WITH (modulus 64, remainder 33);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_34 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_34 FOR VALUES WITH (modulus 64, remainder 34);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_35 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_35 FOR VALUES WITH (modulus 64, remainder 35);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_36 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_36 FOR VALUES WITH (modulus 64, remainder 36);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_37 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_37 FOR VALUES WITH (modulus 64, remainder 37);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_38 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_38 FOR VALUES WITH (modulus 64, remainder 38);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_39 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_39 FOR VALUES WITH (modulus 64, remainder 39);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_40 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_40 FOR VALUES WITH (modulus 64, remainder 40);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_41 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_41 FOR VALUES WITH (modulus 64, remainder 41);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_42 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_42 FOR VALUES WITH (modulus 64, remainder 42);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_43 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_43 FOR VALUES WITH (modulus 64, remainder 43);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_44 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_44 FOR VALUES WITH (modulus 64, remainder 44);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_45 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_45 FOR VALUES WITH (modulus 64, remainder 45);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_46 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_46 FOR VALUES WITH (modulus 64, remainder 46);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_47 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_47 FOR VALUES WITH (modulus 64, remainder 47);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_48 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_48 FOR VALUES WITH (modulus 64, remainder 48);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_49 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_49 FOR VALUES WITH (modulus 64, remainder 49);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_50 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_50 FOR VALUES WITH (modulus 64, remainder 50);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_51 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_51 FOR VALUES WITH (modulus 64, remainder 51);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_52 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_52 FOR VALUES WITH (modulus 64, remainder 52);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_53 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_53 FOR VALUES WITH (modulus 64, remainder 53);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_54 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_54 FOR VALUES WITH (modulus 64, remainder 54);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_55 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_55 FOR VALUES WITH (modulus 64, remainder 55);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_56 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_56 FOR VALUES WITH (modulus 64, remainder 56);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_57 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_57 FOR VALUES WITH (modulus 64, remainder 57);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_58 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_58 FOR VALUES WITH (modulus 64, remainder 58);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_59 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_59 FOR VALUES WITH (modulus 64, remainder 59);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_60 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_60 FOR VALUES WITH (modulus 64, remainder 60);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_61 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_61 FOR VALUES WITH (modulus 64, remainder 61);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_62 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_62 FOR VALUES WITH (modulus 64, remainder 62);
+
+CREATE TABLE gitlab_partitions_static.issue_search_data_63 (
+ project_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ search_vector tsvector
+);
+ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_63 FOR VALUES WITH (modulus 64, remainder 63);
+
CREATE TABLE product_analytics_events_experimental (
id bigint NOT NULL,
project_id integer NOT NULL,
@@ -10335,6 +11323,30 @@ CREATE SEQUENCE abuse_reports_id_seq
ALTER SEQUENCE abuse_reports_id_seq OWNED BY abuse_reports.id;
+CREATE TABLE agent_activity_events (
+ id bigint NOT NULL,
+ agent_id bigint NOT NULL,
+ user_id bigint,
+ project_id bigint,
+ merge_request_id bigint,
+ agent_token_id bigint,
+ recorded_at timestamp with time zone NOT NULL,
+ kind smallint NOT NULL,
+ level smallint NOT NULL,
+ sha bytea,
+ detail text,
+ CONSTRAINT check_068205e735 CHECK ((char_length(detail) <= 255))
+);
+
+CREATE SEQUENCE agent_activity_events_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE agent_activity_events_id_seq OWNED BY agent_activity_events.id;
+
CREATE TABLE agent_group_authorizations (
id bigint NOT NULL,
group_id bigint NOT NULL,
@@ -10351,6 +11363,22 @@ CREATE SEQUENCE agent_group_authorizations_id_seq
ALTER SEQUENCE agent_group_authorizations_id_seq OWNED BY agent_group_authorizations.id;
+CREATE TABLE agent_project_authorizations (
+ id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ agent_id bigint NOT NULL,
+ config jsonb NOT NULL
+);
+
+CREATE SEQUENCE agent_project_authorizations_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE agent_project_authorizations_id_seq OWNED BY agent_project_authorizations.id;
+
CREATE TABLE alert_management_alert_assignees (
id bigint NOT NULL,
user_id bigint NOT NULL,
@@ -10366,6 +11394,29 @@ CREATE SEQUENCE alert_management_alert_assignees_id_seq
ALTER SEQUENCE alert_management_alert_assignees_id_seq OWNED BY alert_management_alert_assignees.id;
+CREATE TABLE alert_management_alert_metric_images (
+ id bigint NOT NULL,
+ alert_id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ file_store smallint,
+ file text NOT NULL,
+ url text,
+ url_text text,
+ CONSTRAINT check_2587666252 CHECK ((char_length(url_text) <= 128)),
+ CONSTRAINT check_4d811d9007 CHECK ((char_length(url) <= 255)),
+ CONSTRAINT check_70fafae519 CHECK ((char_length(file) <= 255))
+);
+
+CREATE SEQUENCE alert_management_alert_metric_images_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE alert_management_alert_metric_images_id_seq OWNED BY alert_management_alert_metric_images.id;
+
CREATE TABLE alert_management_alert_user_mentions (
id bigint NOT NULL,
alert_management_alert_id bigint NOT NULL,
@@ -10465,6 +11516,30 @@ CREATE SEQUENCE allowed_email_domains_id_seq
ALTER SEQUENCE allowed_email_domains_id_seq OWNED BY allowed_email_domains.id;
+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,
+ 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))
+);
+
CREATE TABLE analytics_cycle_analytics_group_stages (
id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
@@ -10589,7 +11664,6 @@ ALTER SEQUENCE analytics_devops_adoption_segments_id_seq OWNED BY analytics_devo
CREATE TABLE analytics_devops_adoption_snapshots (
id bigint NOT NULL,
- segment_id bigint,
recorded_at timestamp with time zone NOT NULL,
issue_opened boolean NOT NULL,
merge_request_opened boolean NOT NULL,
@@ -10597,7 +11671,7 @@ 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 NOT NULL,
+ security_scan_succeeded boolean,
end_time timestamp with time zone NOT NULL,
total_projects_count integer,
code_owners_used_count integer,
@@ -10873,7 +11947,7 @@ CREATE TABLE application_settings (
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,/oauth/authorize,/oauth/token}'::character varying[],
+ 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),
@@ -10956,7 +12030,7 @@ CREATE TABLE application_settings (
kroki_url text,
kroki_enabled boolean DEFAULT false NOT NULL,
help_page_documentation_base_url text,
- container_registry_expiration_policies_worker_capacity integer DEFAULT 0 NOT NULL,
+ container_registry_expiration_policies_worker_capacity integer DEFAULT 4 NOT NULL,
require_admin_approval_after_user_signup boolean DEFAULT true NOT NULL,
automatic_purchased_storage_allocation boolean DEFAULT false NOT NULL,
encrypted_ci_jwt_signing_key text,
@@ -10976,7 +12050,7 @@ CREATE TABLE application_settings (
secret_detection_revocation_token_types_url text,
encrypted_cloud_license_auth_token text,
encrypted_cloud_license_auth_token_iv text,
- personal_access_token_prefix text,
+ personal_access_token_prefix text DEFAULT 'glpat-'::text,
kroki_formats jsonb DEFAULT '{}'::jsonb NOT NULL,
disable_feed_token boolean DEFAULT false NOT NULL,
container_registry_cleanup_tags_service_max_list_size integer DEFAULT 200 NOT NULL,
@@ -11032,13 +12106,73 @@ CREATE TABLE application_settings (
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,
+ 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,
+ content_validation_endpoint_url text,
+ encrypted_content_validation_api_key bytea,
+ encrypted_content_validation_api_key_iv bytea,
+ content_validation_endpoint_enabled boolean DEFAULT false NOT NULL,
+ sentry_enabled boolean DEFAULT false NOT NULL,
+ sentry_dsn text,
+ sentry_clientside_dsn text,
+ sentry_environment text,
+ max_ssh_key_lifetime integer,
+ static_objects_external_storage_auth_token_encrypted text,
+ future_subscriptions jsonb DEFAULT '[]'::jsonb NOT NULL,
+ user_email_lookup_limit integer DEFAULT 60 NOT NULL,
+ packages_cleanup_package_file_worker_capacity smallint DEFAULT 2 NOT NULL,
+ container_registry_import_max_tags_count integer DEFAULT 100 NOT NULL,
+ container_registry_import_max_retries integer DEFAULT 3 NOT NULL,
+ container_registry_import_start_max_retries integer DEFAULT 50 NOT NULL,
+ container_registry_import_max_step_duration integer DEFAULT 300 NOT NULL,
+ container_registry_import_target_plan text DEFAULT 'free'::text NOT NULL,
+ container_registry_import_created_before timestamp with time zone DEFAULT '2022-01-23 00:00:00+00'::timestamp with time zone NOT NULL,
+ runner_token_expiration_interval integer,
+ group_runner_token_expiration_interval integer,
+ project_runner_token_expiration_interval integer,
+ ecdsa_sk_key_restriction integer DEFAULT 0 NOT NULL,
+ ed25519_sk_key_restriction integer DEFAULT 0 NOT NULL,
+ users_get_by_id_limit integer DEFAULT 300 NOT NULL,
+ users_get_by_id_limit_allowlist text[] DEFAULT '{}'::text[] NOT NULL,
+ container_registry_expiration_policies_caching boolean DEFAULT true NOT NULL,
+ search_rate_limit integer DEFAULT 30 NOT NULL,
+ search_rate_limit_unauthenticated integer DEFAULT 10 NOT NULL,
+ encrypted_database_grafana_api_key bytea,
+ encrypted_database_grafana_api_key_iv bytea,
+ database_grafana_api_url text,
+ database_grafana_tag text,
CONSTRAINT app_settings_container_reg_cleanup_tags_max_list_size_positive CHECK ((container_registry_cleanup_tags_service_max_list_size >= 0)),
+ 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_p_cleanup_package_file_worker_capacity_positive CHECK ((packages_cleanup_package_file_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_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_4f8b811780 CHECK ((char_length(sentry_dsn) <= 255)),
CONSTRAINT check_51700b31b5 CHECK ((char_length(default_branch_name) <= 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_85a39b68ff CHECK ((char_length(encrypted_ci_jwt_signing_key_iv) <= 255)),
@@ -11053,6 +12187,14 @@ CREATE TABLE application_settings (
CONSTRAINT check_ef6176834f CHECK ((char_length(encrypted_cloud_license_auth_token_iv) <= 255))
);
+COMMENT ON COLUMN application_settings.content_validation_endpoint_url IS 'JiHu-specific column';
+
+COMMENT ON COLUMN application_settings.encrypted_content_validation_api_key IS 'JiHu-specific column';
+
+COMMENT ON COLUMN application_settings.encrypted_content_validation_api_key_iv IS 'JiHu-specific column';
+
+COMMENT ON COLUMN application_settings.content_validation_endpoint_enabled IS 'JiHu-specific column';
+
CREATE SEQUENCE application_settings_id_seq
AS integer
START WITH 1
@@ -11089,6 +12231,7 @@ CREATE TABLE approval_merge_request_rules (
report_type smallint,
section text,
modified_from_project_rule boolean DEFAULT false NOT NULL,
+ orchestration_policy_idx smallint,
CONSTRAINT check_6fca5928b2 CHECK ((char_length(section) <= 255))
);
@@ -11156,7 +12299,10 @@ CREATE TABLE approval_project_rules (
rule_type smallint DEFAULT 0 NOT NULL,
scanners text[],
vulnerabilities_allowed smallint DEFAULT 0 NOT NULL,
- severity_levels text[] DEFAULT '{}'::text[] NOT NULL
+ severity_levels text[] DEFAULT '{}'::text[] NOT NULL,
+ report_type smallint,
+ vulnerability_states text[] DEFAULT '{newly_detected}'::text[] NOT NULL,
+ orchestration_policy_idx smallint
);
CREATE TABLE approval_project_rules_groups (
@@ -11291,7 +12437,9 @@ CREATE TABLE audit_events_external_audit_event_destinations (
destination_url text NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
- CONSTRAINT check_2feafb9daf CHECK ((char_length(destination_url) <= 255))
+ verification_token text,
+ CONSTRAINT check_2feafb9daf CHECK ((char_length(destination_url) <= 255)),
+ CONSTRAINT check_8ec80a7d06 CHECK ((char_length(verification_token) <= 24))
);
CREATE SEQUENCE audit_events_external_audit_event_destinations_id_seq
@@ -11444,6 +12592,7 @@ CREATE TABLE batched_background_migrations (
job_arguments jsonb DEFAULT '"[]"'::jsonb NOT NULL,
total_tuple_count bigint,
pause_ms integer DEFAULT 100 NOT NULL,
+ max_batch_size integer,
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)),
@@ -11713,7 +12862,8 @@ CREATE TABLE broadcast_messages (
cached_markdown_version integer,
dismissable boolean,
target_path character varying(255),
- broadcast_type smallint DEFAULT 1 NOT NULL
+ broadcast_type smallint DEFAULT 1 NOT NULL,
+ target_access_levels integer[] DEFAULT '{}'::integer[] NOT NULL
);
CREATE SEQUENCE broadcast_messages_id_seq
@@ -11871,7 +13021,9 @@ CREATE TABLE bulk_imports (
source_type smallint NOT NULL,
status smallint NOT NULL,
created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL
+ updated_at timestamp with time zone NOT NULL,
+ source_version text,
+ CONSTRAINT check_ea4e58775a CHECK ((char_length(source_version) <= 63))
);
CREATE SEQUENCE bulk_imports_id_seq
@@ -11927,7 +13079,6 @@ ALTER SEQUENCE chat_teams_id_seq OWNED BY chat_teams.id;
CREATE TABLE ci_build_needs (
id integer NOT NULL,
- build_id_convert_to_bigint integer DEFAULT 0 NOT NULL,
name text NOT NULL,
artifacts boolean DEFAULT true NOT NULL,
optional boolean DEFAULT false NOT NULL,
@@ -11981,7 +13132,6 @@ ALTER SEQUENCE ci_build_report_results_build_id_seq OWNED BY ci_build_report_res
CREATE TABLE ci_build_trace_chunks (
id bigint NOT NULL,
- build_id_convert_to_bigint integer DEFAULT 0 NOT NULL,
chunk_index integer NOT NULL,
data_store integer NOT NULL,
raw_data bytea,
@@ -12010,7 +13160,6 @@ CREATE TABLE ci_build_trace_metadata (
);
CREATE TABLE ci_builds (
- id integer NOT NULL,
status character varying,
finished_at timestamp without time zone,
trace text,
@@ -12045,7 +13194,6 @@ CREATE TABLE ci_builds (
coverage_regex character varying,
auto_canceled_by_id integer,
retried boolean,
- stage_id_convert_to_bigint integer,
protected boolean,
failure_reason integer,
scheduled_at timestamp with time zone,
@@ -12055,7 +13203,7 @@ CREATE TABLE ci_builds (
resource_group_id bigint,
waiting_for_resource_at timestamp with time zone,
scheduling_type smallint,
- id_convert_to_bigint bigint DEFAULT 0 NOT NULL,
+ id bigint NOT NULL,
stage_id bigint
);
@@ -12070,8 +13218,6 @@ CREATE SEQUENCE ci_builds_id_seq
ALTER SEQUENCE ci_builds_id_seq OWNED BY ci_builds.id;
CREATE TABLE ci_builds_metadata (
- id_convert_to_bigint integer DEFAULT 0 NOT NULL,
- build_id_convert_to_bigint integer DEFAULT 0 NOT NULL,
project_id integer NOT NULL,
timeout integer,
timeout_source integer DEFAULT 1 NOT NULL,
@@ -12083,7 +13229,8 @@ CREATE TABLE ci_builds_metadata (
expanded_environment_name character varying(255),
secrets jsonb DEFAULT '{}'::jsonb NOT NULL,
build_id bigint NOT NULL,
- id bigint NOT NULL
+ id bigint NOT NULL,
+ runtime_runner_features jsonb DEFAULT '{}'::jsonb NOT NULL
);
CREATE SEQUENCE ci_builds_metadata_id_seq
@@ -12223,10 +13370,29 @@ CREATE SEQUENCE ci_instance_variables_id_seq
ALTER SEQUENCE ci_instance_variables_id_seq OWNED BY ci_instance_variables.id;
+CREATE TABLE ci_job_artifact_states (
+ verification_started_at timestamp with time zone,
+ verification_retry_at timestamp with time zone,
+ verified_at timestamp with time zone,
+ job_artifact_id bigint NOT NULL,
+ verification_state smallint DEFAULT 0 NOT NULL,
+ verification_retry_count smallint,
+ verification_checksum bytea,
+ verification_failure text,
+ 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 (
- id_convert_to_bigint integer DEFAULT 0 NOT NULL,
project_id integer NOT NULL,
- job_id_convert_to_bigint integer DEFAULT 0 NOT NULL,
file_type integer NOT NULL,
size bigint,
created_at timestamp with time zone NOT NULL,
@@ -12240,7 +13406,9 @@ CREATE TABLE ci_job_artifacts (
id bigint NOT NULL,
job_id bigint NOT NULL,
locked smallint DEFAULT 2,
- CONSTRAINT check_27f0f6dbab CHECK ((file_store IS NOT NULL))
+ original_filename text,
+ 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
@@ -12297,7 +13465,7 @@ CREATE TABLE ci_minutes_additional_packs (
expires_at date,
number_of_minutes integer NOT NULL,
purchase_xid text,
- CONSTRAINT check_d7ef254af0 CHECK ((char_length(purchase_xid) <= 32))
+ CONSTRAINT check_d7ef254af0 CHECK ((char_length(purchase_xid) <= 50))
);
CREATE SEQUENCE ci_minutes_additional_packs_id_seq
@@ -12309,6 +13477,21 @@ CREATE SEQUENCE ci_minutes_additional_packs_id_seq
ALTER SEQUENCE ci_minutes_additional_packs_id_seq OWNED BY ci_minutes_additional_packs.id;
+CREATE TABLE ci_namespace_mirrors (
+ id bigint NOT NULL,
+ namespace_id integer NOT NULL,
+ traversal_ids integer[] DEFAULT '{}'::integer[] NOT NULL
+);
+
+CREATE SEQUENCE ci_namespace_mirrors_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE ci_namespace_mirrors_id_seq OWNED BY ci_namespace_mirrors.id;
+
CREATE TABLE ci_namespace_monthly_usages (
id bigint NOT NULL,
namespace_id bigint NOT NULL,
@@ -12316,6 +13499,8 @@ CREATE TABLE ci_namespace_monthly_usages (
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,
CONSTRAINT ci_namespace_monthly_usages_year_month_constraint CHECK ((date = date_trunc('month'::text, (date)::timestamp with time zone)))
);
@@ -12337,7 +13522,8 @@ CREATE TABLE ci_pending_builds (
instance_runners_enabled boolean DEFAULT false NOT NULL,
namespace_id bigint,
minutes_exceeded boolean DEFAULT false NOT NULL,
- tag_ids integer[] DEFAULT '{}'::integer[]
+ tag_ids integer[] DEFAULT '{}'::integer[],
+ namespace_traversal_ids integer[] DEFAULT '{}'::integer[]
);
CREATE SEQUENCE ci_pending_builds_id_seq
@@ -12557,11 +13743,28 @@ CREATE SEQUENCE ci_platform_metrics_id_seq
ALTER SEQUENCE ci_platform_metrics_id_seq OWNED BY ci_platform_metrics.id;
+CREATE TABLE ci_project_mirrors (
+ id bigint NOT NULL,
+ project_id integer NOT NULL,
+ namespace_id integer NOT NULL
+);
+
+CREATE SEQUENCE ci_project_mirrors_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE ci_project_mirrors_id_seq OWNED BY ci_project_mirrors.id;
+
CREATE TABLE ci_project_monthly_usages (
id bigint NOT NULL,
project_id bigint NOT NULL,
date date NOT NULL,
amount_used numeric(18,2) DEFAULT 0.0 NOT NULL,
+ shared_runners_duration integer DEFAULT 0 NOT NULL,
+ created_at timestamp with time zone,
CONSTRAINT ci_project_monthly_usages_year_month_constraint CHECK ((date = date_trunc('month'::text, (date)::timestamp with time zone)))
);
@@ -12596,7 +13799,8 @@ CREATE TABLE ci_resource_groups (
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
project_id bigint NOT NULL,
- key character varying(255) NOT NULL
+ key character varying(255) NOT NULL,
+ process_mode smallint DEFAULT 0 NOT NULL
);
CREATE SEQUENCE ci_resource_groups_id_seq
@@ -12681,7 +13885,11 @@ CREATE TABLE ci_runners (
token_encrypted character varying,
public_projects_minutes_cost_factor double precision DEFAULT 0.0 NOT NULL,
private_projects_minutes_cost_factor double precision DEFAULT 1.0 NOT NULL,
- config jsonb DEFAULT '{}'::jsonb NOT NULL
+ config jsonb DEFAULT '{}'::jsonb NOT NULL,
+ executor_type smallint,
+ maintainer_note text,
+ token_expires_at timestamp with time zone,
+ CONSTRAINT check_ce275cee06 CHECK ((char_length(maintainer_note) <= 1024))
);
CREATE SEQUENCE ci_runners_id_seq
@@ -12712,12 +13920,34 @@ CREATE SEQUENCE ci_running_builds_id_seq
ALTER SEQUENCE ci_running_builds_id_seq OWNED BY ci_running_builds.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,
+ CONSTRAINT check_320790634d CHECK ((char_length(file) <= 255)),
+ CONSTRAINT check_402c7b4a56 CHECK ((char_length(name) <= 255))
+);
+
+CREATE SEQUENCE ci_secure_files_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE ci_secure_files_id_seq OWNED BY ci_secure_files.id;
+
CREATE TABLE ci_sources_pipelines (
id integer NOT NULL,
project_id integer,
pipeline_id integer,
source_project_id integer,
- source_job_id_convert_to_bigint integer,
source_pipeline_id integer,
source_job_id bigint
);
@@ -12748,7 +13978,6 @@ CREATE SEQUENCE ci_sources_projects_id_seq
ALTER SEQUENCE ci_sources_projects_id_seq OWNED BY ci_sources_projects.id;
CREATE TABLE ci_stages (
- id_convert_to_bigint integer DEFAULT 0 NOT NULL,
project_id integer,
pipeline_id integer,
created_at timestamp without time zone,
@@ -12895,6 +14124,7 @@ CREATE TABLE cluster_agent_tokens (
description text,
name text,
last_used_at timestamp with time zone,
+ status smallint DEFAULT 0 NOT NULL,
CONSTRAINT check_0fb634d04d CHECK ((name IS NOT NULL)),
CONSTRAINT check_2b79dbb315 CHECK ((char_length(name) <= 255)),
CONSTRAINT check_4e4ec5070a CHECK ((char_length(description) <= 1024)),
@@ -13311,7 +14541,8 @@ CREATE TABLE clusters_integration_prometheus (
cluster_id bigint NOT NULL,
enabled boolean DEFAULT false NOT NULL,
encrypted_alert_manager_token text,
- encrypted_alert_manager_token_iv text
+ encrypted_alert_manager_token_iv text,
+ health_status smallint DEFAULT 0 NOT NULL
);
CREATE TABLE clusters_kubernetes_namespaces (
@@ -13402,7 +14633,19 @@ CREATE TABLE container_repositories (
status smallint,
expiration_policy_started_at timestamp with time zone,
expiration_policy_cleanup_status smallint DEFAULT 0 NOT NULL,
- expiration_policy_completed_at timestamp with time zone
+ expiration_policy_completed_at timestamp with time zone,
+ migration_pre_import_started_at timestamp with time zone,
+ migration_pre_import_done_at timestamp with time zone,
+ migration_import_started_at timestamp with time zone,
+ migration_import_done_at timestamp with time zone,
+ migration_aborted_at timestamp with time zone,
+ migration_skipped_at timestamp with time zone,
+ migration_retries_count integer DEFAULT 0 NOT NULL,
+ migration_skipped_reason smallint,
+ migration_state text DEFAULT 'default'::text NOT NULL,
+ migration_aborted_in_state text,
+ 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
@@ -13415,6 +14658,29 @@ CREATE SEQUENCE container_repositories_id_seq
ALTER SEQUENCE container_repositories_id_seq OWNED BY container_repositories.id;
+CREATE TABLE content_blocked_states (
+ id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ commit_sha bytea NOT NULL,
+ blob_sha bytea NOT NULL,
+ path text NOT NULL,
+ container_identifier text NOT NULL,
+ CONSTRAINT check_023093d38f CHECK ((char_length(container_identifier) <= 255)),
+ CONSTRAINT check_1870100678 CHECK ((char_length(path) <= 2048))
+);
+
+COMMENT ON TABLE content_blocked_states IS 'JiHu-specific table';
+
+CREATE SEQUENCE content_blocked_states_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE content_blocked_states_id_seq OWNED BY content_blocked_states.id;
+
CREATE TABLE conversational_development_index_metrics (
id integer NOT NULL,
leader_issues double precision NOT NULL,
@@ -13461,6 +14727,25 @@ CREATE SEQUENCE conversational_development_index_metrics_id_seq
ALTER SEQUENCE conversational_development_index_metrics_id_seq OWNED BY conversational_development_index_metrics.id;
+CREATE TABLE coverage_fuzzing_corpuses (
+ id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ user_id bigint,
+ package_id bigint NOT NULL,
+ file_updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL
+);
+
+CREATE SEQUENCE coverage_fuzzing_corpuses_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE coverage_fuzzing_corpuses_id_seq OWNED BY coverage_fuzzing_corpuses.id;
+
CREATE TABLE csv_issue_imports (
id bigint NOT NULL,
project_id bigint NOT NULL,
@@ -13680,6 +14965,8 @@ CREATE TABLE dast_site_profiles (
auth_password_field text,
auth_username text,
target_type smallint DEFAULT 0 NOT NULL,
+ scan_method smallint DEFAULT 0 NOT NULL,
+ scan_file_path text,
CONSTRAINT check_5203110fee CHECK ((char_length(auth_username_field) <= 255)),
CONSTRAINT check_6cfab17b48 CHECK ((char_length(name) <= 255)),
CONSTRAINT check_c329dffdba CHECK ((char_length(auth_password_field) <= 255)),
@@ -13777,33 +15064,6 @@ CREATE SEQUENCE dast_sites_id_seq
ALTER SEQUENCE dast_sites_id_seq OWNED BY dast_sites.id;
-CREATE TABLE dep_ci_build_trace_section_names (
- id integer NOT NULL,
- project_id integer NOT NULL,
- name character varying NOT NULL
-);
-
-CREATE SEQUENCE dep_ci_build_trace_section_names_id_seq
- AS integer
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
-
-ALTER SEQUENCE dep_ci_build_trace_section_names_id_seq OWNED BY dep_ci_build_trace_section_names.id;
-
-CREATE TABLE dep_ci_build_trace_sections (
- project_id integer NOT NULL,
- date_start timestamp with time zone NOT NULL,
- date_end timestamp with time zone NOT NULL,
- byte_start bigint NOT NULL,
- byte_end bigint NOT NULL,
- build_id integer NOT NULL,
- section_name_id integer NOT NULL,
- build_id_convert_to_bigint bigint DEFAULT 0 NOT NULL
-);
-
CREATE TABLE dependency_proxy_blobs (
id integer NOT NULL,
created_at timestamp with time zone NOT NULL,
@@ -13812,7 +15072,9 @@ CREATE TABLE dependency_proxy_blobs (
file_store integer,
group_id integer NOT NULL,
size bigint,
- updated_at timestamp with time zone NOT NULL
+ updated_at timestamp with time zone 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
@@ -13862,6 +15124,8 @@ CREATE TABLE dependency_proxy_manifests (
file text NOT NULL,
digest text NOT NULL,
content_type text,
+ status smallint DEFAULT 0 NOT NULL,
+ read_at timestamp with time zone DEFAULT now() NOT NULL,
CONSTRAINT check_079b293a7b CHECK ((char_length(file) <= 255)),
CONSTRAINT check_167a9a8a91 CHECK ((char_length(content_type) <= 255)),
CONSTRAINT check_c579e3f586 CHECK ((char_length(file_name) <= 255)),
@@ -13923,6 +15187,26 @@ CREATE SEQUENCE deploy_tokens_id_seq
ALTER SEQUENCE deploy_tokens_id_seq OWNED BY deploy_tokens.id;
+CREATE TABLE deployment_approvals (
+ id bigint NOT NULL,
+ deployment_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,
+ status smallint NOT NULL,
+ comment text,
+ CONSTRAINT check_e2eb6a17d8 CHECK ((char_length(comment) <= 255))
+);
+
+CREATE SEQUENCE deployment_approvals_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE deployment_approvals_id_seq OWNED BY deployment_approvals.id;
+
CREATE TABLE deployment_clusters (
deployment_id integer NOT NULL,
cluster_id integer NOT NULL,
@@ -13944,7 +15228,6 @@ CREATE TABLE deployments (
tag boolean NOT NULL,
sha character varying NOT NULL,
user_id integer,
- deployable_id_convert_to_bigint integer,
deployable_type character varying,
created_at timestamp without time zone,
updated_at timestamp without time zone,
@@ -13952,7 +15235,8 @@ CREATE TABLE deployments (
finished_at timestamp with time zone,
status smallint NOT NULL,
cluster_id integer,
- deployable_id bigint
+ deployable_id bigint,
+ archived boolean DEFAULT false NOT NULL
);
CREATE SEQUENCE deployments_id_seq
@@ -14105,6 +15389,7 @@ CREATE TABLE dora_daily_metrics (
date date NOT NULL,
deployment_frequency integer,
lead_time_for_changes_in_seconds integer,
+ time_to_restore_service_in_seconds integer,
CONSTRAINT dora_daily_metrics_deployment_frequency_positive CHECK ((deployment_frequency >= 0)),
CONSTRAINT dora_daily_metrics_lead_time_for_changes_in_seconds_positive CHECK ((lead_time_for_changes_in_seconds >= 0))
);
@@ -14128,7 +15413,9 @@ CREATE TABLE draft_notes (
"position" text,
original_position text,
change_position text,
- commit_id bytea
+ commit_id bytea,
+ line_code text,
+ CONSTRAINT check_c497a94a0e CHECK ((char_length(line_code) <= 255))
);
CREATE SEQUENCE draft_notes_id_seq
@@ -14372,7 +15659,9 @@ CREATE TABLE epics (
state_id smallint DEFAULT 1,
external_key character varying(255),
confidential boolean DEFAULT false NOT NULL,
- CONSTRAINT check_57ee003890 CHECK ((state_id IS NOT NULL))
+ color text DEFAULT '#1068bf'::text,
+ CONSTRAINT check_57ee003890 CHECK ((state_id IS NOT NULL)),
+ CONSTRAINT check_ca608c40b3 CHECK ((char_length(color) <= 7))
);
CREATE SEQUENCE epics_id_seq
@@ -14457,7 +15746,6 @@ CREATE SEQUENCE error_tracking_errors_id_seq
ALTER SEQUENCE error_tracking_errors_id_seq OWNED BY error_tracking_errors.id;
CREATE TABLE events (
- id_convert_to_bigint integer DEFAULT 0 NOT NULL,
project_id integer,
author_id integer NOT NULL,
target_id integer,
@@ -14759,7 +16047,6 @@ CREATE TABLE geo_event_log (
hashed_storage_migrated_event_id bigint,
lfs_object_deleted_event_id bigint,
hashed_storage_attachments_event_id bigint,
- upload_deleted_event_id bigint,
job_artifact_deleted_event_id bigint,
reset_checksum_event_id bigint,
cache_invalidation_event_id bigint,
@@ -14834,7 +16121,6 @@ ALTER SEQUENCE geo_hashed_storage_migrated_events_id_seq OWNED BY geo_hashed_sto
CREATE TABLE geo_job_artifact_deleted_events (
id bigint NOT NULL,
- job_artifact_id_convert_to_bigint integer DEFAULT 0 NOT NULL,
file_path character varying NOT NULL,
job_artifact_id bigint NOT NULL
);
@@ -14891,9 +16177,6 @@ CREATE TABLE geo_node_statuses (
lfs_objects_count integer,
lfs_objects_synced_count integer,
lfs_objects_failed_count integer,
- attachments_count integer,
- attachments_synced_count integer,
- attachments_failed_count integer,
last_event_id integer,
last_event_date timestamp without time zone,
cursor_last_event_id integer,
@@ -14918,7 +16201,6 @@ CREATE TABLE geo_node_statuses (
wikis_verification_failed_count integer,
lfs_objects_synced_missing_on_primary_count integer,
job_artifacts_synced_missing_on_primary_count integer,
- attachments_synced_missing_on_primary_count integer,
repositories_checksummed_count integer,
repositories_checksum_failed_count integer,
repositories_checksum_mismatch_count integer,
@@ -15089,24 +16371,6 @@ 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 geo_upload_deleted_events (
- id bigint NOT NULL,
- upload_id integer NOT NULL,
- file_path character varying NOT NULL,
- model_id integer NOT NULL,
- model_type character varying NOT NULL,
- uploader character varying NOT NULL
-);
-
-CREATE SEQUENCE geo_upload_deleted_events_id_seq
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
-
-ALTER SEQUENCE geo_upload_deleted_events_id_seq OWNED BY geo_upload_deleted_events.id;
-
CREATE TABLE gitlab_subscription_histories (
id bigint NOT NULL,
gitlab_subscription_created_at timestamp with time zone,
@@ -15246,6 +16510,22 @@ CREATE SEQUENCE grafana_integrations_id_seq
ALTER SEQUENCE grafana_integrations_id_seq OWNED BY grafana_integrations.id;
+CREATE TABLE group_crm_settings (
+ group_id bigint 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 group_crm_settings_group_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE group_crm_settings_group_id_seq OWNED BY group_crm_settings.group_id;
+
CREATE TABLE group_custom_attributes (
id integer NOT NULL,
created_at timestamp with time zone NOT NULL,
@@ -15331,6 +16611,13 @@ CREATE SEQUENCE group_deploy_tokens_id_seq
ALTER SEQUENCE group_deploy_tokens_id_seq OWNED BY group_deploy_tokens.id;
+CREATE TABLE group_features (
+ group_id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ wiki_access_level smallint DEFAULT 20 NOT NULL
+);
+
CREATE TABLE group_group_links (
id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
@@ -15654,6 +16941,35 @@ CREATE SEQUENCE incident_management_oncall_shifts_id_seq
ALTER SEQUENCE incident_management_oncall_shifts_id_seq OWNED BY incident_management_oncall_shifts.id;
+CREATE TABLE incident_management_timeline_events (
+ id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ occurred_at timestamp with time zone NOT NULL,
+ project_id bigint NOT NULL,
+ author_id bigint,
+ issue_id bigint NOT NULL,
+ updated_by_user_id bigint,
+ promoted_from_note_id bigint,
+ cached_markdown_version integer,
+ editable boolean DEFAULT false NOT NULL,
+ note text NOT NULL,
+ note_html text NOT NULL,
+ action text NOT NULL,
+ CONSTRAINT check_18fd072206 CHECK ((char_length(action) <= 128)),
+ CONSTRAINT check_3875ed0aac CHECK ((char_length(note) <= 10000)),
+ CONSTRAINT check_94a235d6a4 CHECK ((char_length(note_html) <= 10000))
+);
+
+CREATE SEQUENCE incident_management_timeline_events_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE incident_management_timeline_events_id_seq OWNED BY incident_management_timeline_events.id;
+
CREATE TABLE index_statuses (
id integer NOT NULL,
project_id integer NOT NULL,
@@ -15694,7 +17010,6 @@ 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,
@@ -15722,6 +17037,9 @@ CREATE TABLE integrations (
group_id bigint,
vulnerability_events boolean DEFAULT false NOT NULL,
type_new text,
+ archive_trace_events boolean DEFAULT false NOT NULL,
+ encrypted_properties bytea,
+ encrypted_properties_iv bytea,
CONSTRAINT check_a948a0aa7e CHECK ((char_length(type_new) <= 255))
);
@@ -15775,6 +17093,8 @@ CREATE TABLE issuable_metric_images (
file_store smallint,
file text NOT NULL,
url text,
+ url_text text,
+ CONSTRAINT check_3bc6d47661 CHECK ((char_length(url_text) <= 128)),
CONSTRAINT check_5b3011e234 CHECK ((char_length(url) <= 255)),
CONSTRAINT check_7ed527062f CHECK ((char_length(file) <= 255))
);
@@ -15825,6 +17145,23 @@ CREATE TABLE issue_assignees (
issue_id integer NOT NULL
);
+CREATE TABLE issue_customer_relations_contacts (
+ id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ contact_id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL
+);
+
+CREATE SEQUENCE issue_customer_relations_contacts_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE issue_customer_relations_contacts_id_seq OWNED BY issue_customer_relations_contacts.id;
+
CREATE TABLE issue_email_participants (
id bigint NOT NULL,
issue_id bigint NOT NULL,
@@ -15843,6 +17180,22 @@ CREATE SEQUENCE issue_email_participants_id_seq
ALTER SEQUENCE issue_email_participants_id_seq OWNED BY issue_email_participants.id;
+CREATE TABLE issue_emails (
+ id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ email_message_id text NOT NULL,
+ CONSTRAINT check_5abf3e6aea CHECK ((char_length(email_message_id) <= 1000))
+);
+
+CREATE SEQUENCE issue_emails_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE issue_emails_id_seq OWNED BY issue_emails.id;
+
CREATE TABLE issue_links (
id integer NOT NULL,
source_id integer NOT NULL,
@@ -15990,7 +17343,7 @@ CREATE TABLE iterations_cadences (
group_id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
- start_date date NOT NULL,
+ start_date date,
last_run_date date,
duration_in_weeks integer,
iterations_in_advance integer,
@@ -16240,6 +17593,27 @@ CREATE SEQUENCE lfs_file_locks_id_seq
ALTER SEQUENCE lfs_file_locks_id_seq OWNED BY lfs_file_locks.id;
+CREATE TABLE lfs_object_states (
+ verification_started_at timestamp with time zone,
+ verification_retry_at timestamp with time zone,
+ verified_at timestamp with time zone,
+ lfs_object_id bigint NOT NULL,
+ verification_state smallint DEFAULT 0 NOT NULL,
+ verification_retry_count smallint,
+ verification_checksum bytea,
+ verification_failure text,
+ CONSTRAINT check_efe45a8ab3 CHECK ((char_length(verification_failure) <= 255))
+);
+
+CREATE SEQUENCE lfs_object_states_lfs_object_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE lfs_object_states_lfs_object_id_seq OWNED BY lfs_object_states.lfs_object_id;
+
CREATE TABLE lfs_objects (
id integer NOT NULL,
oid character varying NOT NULL,
@@ -16343,6 +17717,24 @@ CREATE SEQUENCE lists_id_seq
ALTER SEQUENCE lists_id_seq OWNED BY lists.id;
+CREATE TABLE member_tasks (
+ id bigint NOT NULL,
+ member_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,
+ tasks smallint[] DEFAULT '{}'::smallint[] NOT NULL
+);
+
+CREATE SEQUENCE member_tasks_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE member_tasks_id_seq OWNED BY member_tasks.id;
+
CREATE TABLE members (
id integer NOT NULL,
access_level integer NOT NULL,
@@ -16361,7 +17753,9 @@ 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
+ invite_email_success boolean DEFAULT true NOT NULL,
+ state smallint DEFAULT 0,
+ member_namespace_id bigint
);
CREATE SEQUENCE members_id_seq
@@ -16378,7 +17772,9 @@ CREATE TABLE merge_request_assignees (
id integer NOT NULL,
user_id integer NOT NULL,
merge_request_id integer NOT NULL,
- created_at timestamp with time zone
+ created_at timestamp with time zone,
+ state smallint DEFAULT 0 NOT NULL,
+ updated_state_by_user_id bigint
);
CREATE SEQUENCE merge_request_assignees_id_seq
@@ -16491,10 +17887,6 @@ CREATE TABLE merge_request_diff_commits (
merge_request_diff_id integer 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,
trailers jsonb DEFAULT '{}'::jsonb NOT NULL,
commit_author_id bigint,
@@ -16611,7 +18003,8 @@ CREATE TABLE merge_request_reviewers (
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
+ state smallint DEFAULT 0 NOT NULL,
+ updated_state_by_user_id bigint
);
CREATE SEQUENCE merge_request_reviewers_id_seq
@@ -16704,6 +18097,23 @@ CREATE SEQUENCE merge_requests_closing_issues_id_seq
ALTER SEQUENCE merge_requests_closing_issues_id_seq OWNED BY merge_requests_closing_issues.id;
+CREATE TABLE merge_requests_compliance_violations (
+ id bigint NOT NULL,
+ violating_user_id bigint NOT NULL,
+ merge_request_id bigint NOT NULL,
+ reason smallint NOT NULL,
+ severity_level smallint DEFAULT 0 NOT NULL
+);
+
+CREATE SEQUENCE merge_requests_compliance_violations_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+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
@@ -16868,7 +18278,8 @@ CREATE TABLE namespace_root_storage_statistics (
packages_size bigint DEFAULT 0 NOT NULL,
snippets_size bigint DEFAULT 0 NOT NULL,
pipeline_artifacts_size bigint DEFAULT 0 NOT NULL,
- uploads_size bigint DEFAULT 0 NOT NULL
+ uploads_size bigint DEFAULT 0 NOT NULL,
+ dependency_proxy_size bigint DEFAULT 0 NOT NULL
);
CREATE SEQUENCE namespace_root_storage_statistics_namespace_id_seq
@@ -16896,6 +18307,9 @@ CREATE TABLE namespace_settings (
new_user_signups_cap integer,
setup_for_company boolean,
jobs_to_be_done smallint,
+ 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))
);
@@ -16905,7 +18319,8 @@ CREATE TABLE namespace_statistics (
shared_runners_seconds integer DEFAULT 0 NOT NULL,
shared_runners_seconds_last_reset timestamp without time zone,
storage_size bigint DEFAULT 0 NOT NULL,
- wiki_size bigint DEFAULT 0 NOT NULL
+ wiki_size bigint DEFAULT 0 NOT NULL,
+ dependency_proxy_size bigint DEFAULT 0 NOT NULL
);
CREATE SEQUENCE namespace_statistics_id_seq
@@ -16925,7 +18340,7 @@ CREATE TABLE namespaces (
owner_id integer,
created_at timestamp without time zone,
updated_at timestamp without time zone,
- type character varying,
+ type character varying DEFAULT 'User'::character varying NOT NULL,
description character varying DEFAULT ''::character varying NOT NULL,
avatar character varying,
share_with_group_lock boolean DEFAULT false,
@@ -16967,7 +18382,7 @@ CREATE TABLE namespaces (
shared_runners_enabled boolean DEFAULT true NOT NULL,
allow_descendants_override_disabled_shared_runners boolean DEFAULT false NOT NULL,
traversal_ids integer[] DEFAULT '{}'::integer[] NOT NULL,
- delayed_project_removal boolean DEFAULT false NOT NULL
+ tmp_project_id integer
);
CREATE SEQUENCE namespaces_id_seq
@@ -16980,6 +18395,20 @@ CREATE SEQUENCE namespaces_id_seq
ALTER SEQUENCE namespaces_id_seq OWNED BY namespaces.id;
+CREATE TABLE namespaces_sync_events (
+ id bigint NOT NULL,
+ namespace_id bigint NOT NULL
+);
+
+CREATE SEQUENCE namespaces_sync_events_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE namespaces_sync_events_id_seq OWNED BY namespaces_sync_events.id;
+
CREATE TABLE note_diff_files (
id integer NOT NULL,
diff_note_id integer NOT NULL,
@@ -17144,7 +18573,8 @@ CREATE TABLE oauth_applications (
owner_id integer,
owner_type character varying,
trusted boolean DEFAULT false NOT NULL,
- confidential boolean DEFAULT true NOT NULL
+ confidential boolean DEFAULT true NOT NULL,
+ expire_access_tokens boolean DEFAULT false NOT NULL
);
CREATE SEQUENCE oauth_applications_id_seq
@@ -17192,7 +18622,14 @@ CREATE TABLE onboarding_progresses (
issue_auto_closed_at timestamp with time zone,
repository_imported_at timestamp with time zone,
repository_mirrored_at timestamp with time zone,
- issue_created_at timestamp with time zone
+ issue_created_at timestamp with time zone,
+ secure_dependency_scanning_run_at timestamp with time zone,
+ secure_container_scanning_run_at timestamp with time zone,
+ secure_dast_run_at timestamp with time zone,
+ secure_secret_detection_run_at timestamp with time zone,
+ 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
);
CREATE SEQUENCE onboarding_progresses_id_seq
@@ -17204,30 +18641,6 @@ CREATE SEQUENCE onboarding_progresses_id_seq
ALTER SEQUENCE onboarding_progresses_id_seq OWNED BY onboarding_progresses.id;
-CREATE TABLE open_project_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(255),
- encrypted_url_iv character varying(255),
- encrypted_api_url character varying(255),
- encrypted_api_url_iv character varying(255),
- encrypted_token character varying(255),
- encrypted_token_iv character varying(255),
- closed_status_id character varying(5),
- project_identifier_code character varying(100)
-);
-
-CREATE SEQUENCE open_project_tracker_data_id_seq
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
-
-ALTER SEQUENCE open_project_tracker_data_id_seq OWNED BY open_project_tracker_data.id;
-
CREATE TABLE operations_feature_flag_scopes (
id bigint NOT NULL,
feature_flag_id bigint NOT NULL,
@@ -17777,7 +19190,7 @@ CREATE TABLE packages_helm_file_metadata (
package_file_id bigint NOT NULL,
channel text NOT NULL,
metadata jsonb,
- CONSTRAINT check_c34067922d CHECK ((char_length(channel) <= 63))
+ CONSTRAINT check_06e8d100af CHECK ((char_length(channel) <= 255))
);
CREATE TABLE packages_maven_metadata (
@@ -17800,6 +19213,12 @@ CREATE SEQUENCE packages_maven_metadata_id_seq
ALTER SEQUENCE packages_maven_metadata_id_seq OWNED BY packages_maven_metadata.id;
+CREATE TABLE packages_npm_metadata (
+ package_id bigint NOT NULL,
+ package_json jsonb DEFAULT '{}'::jsonb NOT NULL,
+ CONSTRAINT chk_rails_e5cbc301ae CHECK ((char_length((package_json)::text) < 20000))
+);
+
CREATE TABLE packages_nuget_dependency_link_metadata (
dependency_link_id bigint NOT NULL,
target_framework text NOT NULL,
@@ -17850,6 +19269,7 @@ CREATE TABLE packages_package_files (
verification_checksum bytea,
verification_state smallint DEFAULT 0 NOT NULL,
verification_started_at timestamp with time zone,
+ status smallint DEFAULT 0 NOT NULL,
CONSTRAINT check_4c5e6bb0b3 CHECK ((file_store IS NOT NULL))
);
@@ -17885,7 +19305,7 @@ ALTER SEQUENCE packages_packages_id_seq OWNED BY packages_packages.id;
CREATE TABLE packages_pypi_metadata (
package_id bigint NOT NULL,
- required_python text,
+ required_python text DEFAULT ''::text,
CONSTRAINT check_0d9aed55b2 CHECK ((required_python IS NOT NULL)),
CONSTRAINT check_379019d5da CHECK ((char_length(required_python) <= 255))
);
@@ -17959,6 +19379,27 @@ CREATE SEQUENCE packages_tags_id_seq
ALTER SEQUENCE packages_tags_id_seq OWNED BY packages_tags.id;
+CREATE TABLE pages_deployment_states (
+ pages_deployment_id bigint NOT NULL,
+ verification_state smallint DEFAULT 0 NOT NULL,
+ verification_started_at timestamp with time zone,
+ verification_retry_at timestamp with time zone,
+ verified_at timestamp with time zone,
+ verification_retry_count smallint,
+ verification_checksum bytea,
+ verification_failure text,
+ CONSTRAINT check_15217e8c3a CHECK ((char_length(verification_failure) <= 255))
+);
+
+CREATE SEQUENCE pages_deployment_states_pages_deployment_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE pages_deployment_states_pages_deployment_id_seq OWNED BY pages_deployment_states.pages_deployment_id;
+
CREATE TABLE pages_deployments (
id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
@@ -18038,28 +19479,6 @@ CREATE SEQUENCE pages_domains_id_seq
ALTER SEQUENCE pages_domains_id_seq OWNED BY pages_domains.id;
-CREATE TABLE partitioned_foreign_keys (
- id bigint NOT NULL,
- cascade_delete boolean DEFAULT true NOT NULL,
- from_table text NOT NULL,
- from_column text NOT NULL,
- to_table text NOT NULL,
- to_column text NOT NULL,
- CONSTRAINT check_2c2e02a62b CHECK ((char_length(from_column) <= 63)),
- CONSTRAINT check_40738efb57 CHECK ((char_length(to_table) <= 63)),
- CONSTRAINT check_741676d405 CHECK ((char_length(from_table) <= 63)),
- CONSTRAINT check_7e98be694f CHECK ((char_length(to_column) <= 63))
-);
-
-CREATE SEQUENCE partitioned_foreign_keys_id_seq
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
-
-ALTER SEQUENCE partitioned_foreign_keys_id_seq OWNED BY partitioned_foreign_keys.id;
-
CREATE TABLE path_locks (
id integer NOT NULL,
path character varying NOT NULL,
@@ -18169,7 +19588,12 @@ CREATE TABLE plan_limits (
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
+ ci_jobs_trace_size_limit integer DEFAULT 100 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
);
CREATE SEQUENCE plan_limits_id_seq
@@ -18379,7 +19803,7 @@ CREATE VIEW postgres_indexes AS
FROM ((((pg_index
JOIN pg_class i ON ((i.oid = pg_index.indexrelid)))
JOIN pg_namespace ON ((i.relnamespace = pg_namespace.oid)))
- JOIN pg_indexes ON ((i.relname = pg_indexes.indexname)))
+ JOIN pg_indexes ON (((i.relname = pg_indexes.indexname) AND (pg_namespace.nspname = pg_indexes.schemaname))))
JOIN pg_am a ON ((i.relam = a.oid)))
WHERE ((pg_namespace.nspname <> 'pg_catalog'::name) AND (pg_namespace.nspname = ANY (ARRAY["current_schema"(), 'gitlab_partitions_dynamic'::name, 'gitlab_partitions_static'::name])));
@@ -18446,6 +19870,24 @@ CREATE SEQUENCE postgres_reindex_actions_id_seq
ALTER SEQUENCE postgres_reindex_actions_id_seq OWNED BY postgres_reindex_actions.id;
+CREATE TABLE postgres_reindex_queued_actions (
+ id bigint NOT NULL,
+ index_identifier text NOT NULL,
+ state smallint DEFAULT 0 NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ updated_at timestamp with time zone DEFAULT now() NOT NULL,
+ CONSTRAINT check_e4b01395c0 CHECK ((char_length(index_identifier) <= 255))
+);
+
+CREATE SEQUENCE postgres_reindex_queued_actions_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE postgres_reindex_queued_actions_id_seq OWNED BY postgres_reindex_queued_actions.id;
+
CREATE TABLE programming_languages (
id integer NOT NULL,
name character varying NOT NULL,
@@ -18516,6 +19958,25 @@ CREATE SEQUENCE project_auto_devops_id_seq
ALTER SEQUENCE project_auto_devops_id_seq OWNED BY project_auto_devops.id;
+CREATE TABLE project_build_artifacts_size_refreshes (
+ id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ last_job_artifact_id bigint,
+ 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
+);
+
+CREATE SEQUENCE project_build_artifacts_size_refreshes_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE project_build_artifacts_size_refreshes_id_seq OWNED BY project_build_artifacts_size_refreshes.id;
+
CREATE TABLE project_ci_cd_settings (
id integer NOT NULL,
project_id integer NOT NULL,
@@ -18527,7 +19988,8 @@ CREATE TABLE project_ci_cd_settings (
auto_rollback_enabled boolean DEFAULT false NOT NULL,
keep_latest_artifact boolean DEFAULT true NOT NULL,
restrict_user_defined_variables boolean DEFAULT false NOT NULL,
- job_token_scope_enabled boolean DEFAULT true NOT NULL
+ job_token_scope_enabled boolean DEFAULT false NOT NULL,
+ runner_token_expiration_interval integer
);
CREATE SEQUENCE project_ci_cd_settings_id_seq
@@ -18631,7 +20093,7 @@ CREATE TABLE project_error_tracking_settings (
encrypted_token_iv character varying,
project_name character varying,
organization_name character varying,
- integrated boolean DEFAULT false NOT NULL
+ integrated boolean DEFAULT true NOT NULL
);
CREATE TABLE project_export_jobs (
@@ -18676,7 +20138,8 @@ CREATE TABLE project_features (
requirements_access_level integer DEFAULT 20 NOT NULL,
operations_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
);
CREATE SEQUENCE project_features_id_seq
@@ -18876,7 +20339,14 @@ CREATE TABLE project_settings (
prevent_merge_without_jira_issue boolean DEFAULT false NOT NULL,
mr_default_target_self boolean DEFAULT false NOT NULL,
previous_default_branch text,
- CONSTRAINT check_3a03e7557a CHECK ((char_length(previous_default_branch) <= 4096))
+ warn_about_potentially_unwanted_characters boolean DEFAULT true NOT NULL,
+ merge_commit_template text,
+ has_shimo boolean DEFAULT false NOT NULL,
+ squash_commit_template text,
+ legacy_open_source_license_available boolean DEFAULT true NOT NULL,
+ CONSTRAINT check_3a03e7557a CHECK ((char_length(previous_default_branch) <= 4096)),
+ CONSTRAINT check_b09644994b CHECK ((char_length(squash_commit_template) <= 500)),
+ CONSTRAINT check_eaf7cfb6a7 CHECK ((char_length(merge_commit_template) <= 500))
);
CREATE TABLE project_statistics (
@@ -18969,7 +20439,6 @@ CREATE TABLE projects (
public_builds boolean DEFAULT true NOT NULL,
last_repository_check_failed boolean,
last_repository_check_at timestamp without time zone,
- container_registry_enabled boolean,
only_allow_merge_if_pipeline_succeeds boolean DEFAULT false NOT NULL,
has_external_issue_tracker boolean,
repository_storage character varying DEFAULT 'default'::character varying NOT NULL,
@@ -19024,7 +20493,8 @@ CREATE TABLE projects (
remove_source_branch_after_merge boolean,
suggestion_commit_message character varying(255),
autoclose_referenced_issues boolean,
- project_namespace_id bigint
+ project_namespace_id bigint,
+ hidden boolean DEFAULT false NOT NULL
);
CREATE SEQUENCE projects_id_seq
@@ -19037,6 +20507,20 @@ CREATE SEQUENCE projects_id_seq
ALTER SEQUENCE projects_id_seq OWNED BY projects.id;
+CREATE TABLE projects_sync_events (
+ id bigint NOT NULL,
+ project_id bigint NOT NULL
+);
+
+CREATE SEQUENCE projects_sync_events_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE projects_sync_events_id_seq OWNED BY projects_sync_events.id;
+
CREATE TABLE prometheus_alert_events (
id bigint NOT NULL,
project_id integer NOT NULL,
@@ -19185,6 +20669,28 @@ CREATE SEQUENCE protected_branches_id_seq
ALTER SEQUENCE protected_branches_id_seq OWNED BY protected_branches.id;
+CREATE TABLE protected_environment_approval_rules (
+ id bigint NOT NULL,
+ protected_environment_id bigint NOT NULL,
+ user_id bigint,
+ group_id bigint,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ access_level smallint,
+ required_approvals smallint 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))
+);
+
+CREATE SEQUENCE protected_environment_approval_rules_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE protected_environment_approval_rules_id_seq OWNED BY protected_environment_approval_rules.id;
+
CREATE TABLE protected_environment_deploy_access_levels (
id integer NOT NULL,
created_at timestamp with time zone NOT NULL,
@@ -19212,7 +20718,9 @@ CREATE TABLE protected_environments (
updated_at timestamp with time zone NOT NULL,
name character varying NOT NULL,
group_id bigint,
- CONSTRAINT protected_environments_project_or_group_existence CHECK (((project_id IS NULL) <> (group_id IS NULL)))
+ required_approval_count integer DEFAULT 0 NOT NULL,
+ CONSTRAINT protected_environments_project_or_group_existence CHECK (((project_id IS NULL) <> (group_id IS NULL))),
+ CONSTRAINT protected_environments_required_approval_count_positive CHECK ((required_approval_count >= 0))
);
CREATE SEQUENCE protected_environments_id_seq
@@ -19265,7 +20773,6 @@ ALTER SEQUENCE protected_tags_id_seq OWNED BY protected_tags.id;
CREATE TABLE push_event_payloads (
commit_count bigint NOT NULL,
- event_id_convert_to_bigint integer DEFAULT 0 NOT NULL,
action smallint NOT NULL,
ref_type smallint NOT NULL,
commit_from bytea,
@@ -19346,6 +20853,24 @@ CREATE SEQUENCE redirect_routes_id_seq
ALTER SEQUENCE redirect_routes_id_seq OWNED BY redirect_routes.id;
+CREATE TABLE related_epic_links (
+ id bigint NOT NULL,
+ source_id bigint NOT NULL,
+ target_id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ link_type smallint DEFAULT 0 NOT NULL
+);
+
+CREATE SEQUENCE related_epic_links_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE related_epic_links_id_seq OWNED BY related_epic_links.id;
+
CREATE TABLE release_links (
id bigint NOT NULL,
release_id integer NOT NULL,
@@ -19477,8 +21002,7 @@ CREATE TABLE requirements_management_test_reports (
author_id bigint,
state smallint NOT NULL,
build_id bigint,
- issue_id bigint,
- CONSTRAINT requirements_test_reports_requirement_id_xor_issue_id CHECK ((num_nonnulls(requirement_id, issue_id) = 1))
+ issue_id bigint
);
CREATE SEQUENCE requirements_management_test_reports_id_seq
@@ -19618,7 +21142,8 @@ CREATE TABLE routes (
path character varying NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
- name character varying
+ name character varying,
+ namespace_id bigint
);
CREATE SEQUENCE routes_id_seq
@@ -19673,6 +21198,26 @@ CREATE SEQUENCE saml_providers_id_seq
ALTER SEQUENCE saml_providers_id_seq OWNED BY saml_providers.id;
+CREATE TABLE saved_replies (
+ 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,
+ name text NOT NULL,
+ content text NOT NULL,
+ CONSTRAINT check_0cb57dc22a CHECK ((char_length(content) <= 10000)),
+ CONSTRAINT check_2eb3366d7f CHECK ((char_length(name) <= 255))
+);
+
+CREATE SEQUENCE saved_replies_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE saved_replies_id_seq OWNED BY saved_replies.id;
+
CREATE TABLE scim_identities (
id bigint NOT NULL,
group_id bigint NOT NULL,
@@ -19718,9 +21263,9 @@ CREATE TABLE security_findings (
confidence smallint NOT NULL,
project_fingerprint text,
deduplicated boolean DEFAULT false NOT NULL,
- "position" integer,
uuid uuid,
overridden_uuid uuid,
+ CONSTRAINT check_6c2851a8c9 CHECK ((uuid IS NOT NULL)),
CONSTRAINT check_b9508c6df8 CHECK ((char_length(project_fingerprint) <= 40))
);
@@ -19735,11 +21280,13 @@ ALTER SEQUENCE security_findings_id_seq OWNED BY security_findings.id;
CREATE TABLE security_orchestration_policy_configurations (
id bigint NOT NULL,
- project_id bigint NOT NULL,
+ project_id bigint,
security_policy_management_project_id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
- configured_at timestamp with time zone
+ configured_at timestamp with time zone,
+ namespace_id bigint,
+ CONSTRAINT cop_configs_project_or_namespace_existence CHECK (((project_id IS NULL) <> (namespace_id IS NULL)))
);
COMMENT ON TABLE security_orchestration_policy_configurations IS '{"owner":"group::container security","description":"Configuration used to store relationship between project and security policy repository"}';
@@ -19785,7 +21332,9 @@ CREATE TABLE security_scans (
scan_type smallint NOT NULL,
info jsonb DEFAULT '{}'::jsonb NOT NULL,
project_id bigint,
- pipeline_id bigint
+ pipeline_id bigint,
+ latest boolean DEFAULT true NOT NULL,
+ status smallint DEFAULT 0 NOT NULL
);
CREATE SEQUENCE security_scans_id_seq
@@ -19797,6 +21346,47 @@ CREATE SEQUENCE security_scans_id_seq
ALTER SEQUENCE security_scans_id_seq OWNED BY security_scans.id;
+CREATE TABLE security_training_providers (
+ id bigint NOT NULL,
+ name text NOT NULL,
+ description text,
+ url text NOT NULL,
+ logo_url text,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ CONSTRAINT check_544b3dc935 CHECK ((char_length(url) <= 512)),
+ CONSTRAINT check_6fe222f071 CHECK ((char_length(logo_url) <= 512)),
+ CONSTRAINT check_a8ff21ced5 CHECK ((char_length(description) <= 512)),
+ CONSTRAINT check_dae433eed6 CHECK ((char_length(name) <= 256))
+);
+
+CREATE SEQUENCE security_training_providers_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE security_training_providers_id_seq OWNED BY security_training_providers.id;
+
+CREATE TABLE security_trainings (
+ id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ provider_id bigint NOT NULL,
+ is_primary boolean DEFAULT false NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL
+);
+
+CREATE SEQUENCE security_trainings_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE security_trainings_id_seq OWNED BY security_trainings.id;
+
CREATE TABLE self_managed_prometheus_alert_events (
id bigint NOT NULL,
project_id bigint NOT NULL,
@@ -20092,12 +21682,13 @@ CREATE TABLE sprints (
group_id bigint,
iid integer NOT NULL,
cached_markdown_version integer,
- title text NOT NULL,
+ title text,
title_html text,
description text,
description_html text,
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))
);
@@ -20116,7 +21707,8 @@ CREATE TABLE status_check_responses (
merge_request_id bigint NOT NULL,
external_approval_rule_id bigint,
sha bytea NOT NULL,
- external_status_check_id bigint NOT NULL
+ external_status_check_id bigint NOT NULL,
+ status smallint DEFAULT 0 NOT NULL
);
CREATE SEQUENCE status_check_responses_id_seq
@@ -20231,9 +21823,7 @@ CREATE SEQUENCE system_note_metadata_id_seq
ALTER SEQUENCE system_note_metadata_id_seq OWNED BY system_note_metadata.id;
CREATE TABLE taggings (
- id_convert_to_bigint integer DEFAULT 0 NOT NULL,
tag_id integer,
- taggable_id_convert_to_bigint integer,
taggable_type character varying,
tagger_id integer,
tagger_type character varying,
@@ -20350,7 +21940,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,
+ spent_at timestamp with time zone DEFAULT now(),
note_id integer,
project_id integer,
summary text,
@@ -20415,6 +22005,12 @@ CREATE TABLE topics (
name text NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
+ avatar text,
+ description text,
+ total_projects_count bigint DEFAULT 0 NOT NULL,
+ non_private_projects_count bigint DEFAULT 0 NOT NULL,
+ CONSTRAINT check_26753fb43a CHECK ((char_length(avatar) <= 255)),
+ CONSTRAINT check_5d1a07c8c8 CHECK ((char_length(description) <= 1024)),
CONSTRAINT check_7a90d4c757 CHECK ((char_length(name) <= 255))
);
@@ -20482,6 +22078,27 @@ CREATE SEQUENCE upcoming_reconciliations_id_seq
ALTER SEQUENCE upcoming_reconciliations_id_seq OWNED BY upcoming_reconciliations.id;
+CREATE TABLE upload_states (
+ verification_started_at timestamp with time zone,
+ verification_retry_at timestamp with time zone,
+ verified_at timestamp with time zone,
+ upload_id bigint NOT NULL,
+ verification_state smallint DEFAULT 0 NOT NULL,
+ verification_retry_count smallint,
+ verification_checksum bytea,
+ verification_failure text,
+ CONSTRAINT check_7396dc8591 CHECK ((char_length(verification_failure) <= 255))
+);
+
+CREATE SEQUENCE upload_states_upload_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE upload_states_upload_id_seq OWNED BY upload_states.upload_id;
+
CREATE TABLE uploads (
id integer NOT NULL,
size bigint NOT NULL,
@@ -20564,7 +22181,14 @@ ALTER SEQUENCE user_canonical_emails_id_seq OWNED BY user_canonical_emails.id;
CREATE TABLE user_credit_card_validations (
user_id bigint NOT NULL,
- credit_card_validated_at timestamp with time zone NOT NULL
+ credit_card_validated_at timestamp with time zone NOT NULL,
+ expiration_date date,
+ last_digits smallint,
+ holder_name text,
+ network text,
+ CONSTRAINT check_1765e2b30f CHECK ((char_length(network) <= 32)),
+ CONSTRAINT check_3eea080c91 CHECK (((last_digits >= 0) AND (last_digits <= 9999))),
+ CONSTRAINT check_cc0c8dc0fe CHECK ((char_length(holder_name) <= 50))
);
CREATE TABLE user_custom_attributes (
@@ -20591,18 +22215,22 @@ CREATE TABLE user_details (
job_title character varying(200) DEFAULT ''::character varying NOT NULL,
bio character varying(255) DEFAULT ''::character varying NOT NULL,
webauthn_xid text,
- bio_html text,
- cached_markdown_version integer,
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,
CONSTRAINT check_245664af82 CHECK ((char_length(webauthn_xid) <= 100)),
+ 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';
+
CREATE SEQUENCE user_details_user_id_seq
START WITH 1
INCREMENT BY 1
@@ -20691,7 +22319,11 @@ CREATE TABLE user_preferences (
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
+ markdown_surround_selection boolean DEFAULT true NOT NULL,
+ diffs_deletion_color text,
+ diffs_addition_color text,
+ 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
@@ -20789,7 +22421,7 @@ CREATE TABLE users (
encrypted_otp_secret_salt character varying,
otp_required_for_login boolean DEFAULT false NOT NULL,
otp_backup_codes text,
- public_email character varying DEFAULT ''::character varying NOT NULL,
+ public_email character varying,
dashboard integer DEFAULT 0,
project_view integer DEFAULT 0,
consumed_timestep integer,
@@ -20825,7 +22457,9 @@ CREATE TABLE users (
first_name character varying(255),
last_name character varying(255),
role smallint,
- user_type smallint
+ user_type smallint,
+ static_object_token_encrypted text,
+ CONSTRAINT check_7bde697e8e CHECK ((char_length(static_object_token_encrypted) <= 255))
);
CREATE SEQUENCE users_id_seq
@@ -20889,7 +22523,8 @@ CREATE TABLE users_statistics (
with_highest_role_maintainer integer DEFAULT 0 NOT NULL,
with_highest_role_owner integer DEFAULT 0 NOT NULL,
bots integer DEFAULT 0 NOT NULL,
- blocked integer DEFAULT 0 NOT NULL
+ blocked integer DEFAULT 0 NOT NULL,
+ with_highest_role_minimal_access integer DEFAULT 0 NOT NULL
);
CREATE SEQUENCE users_statistics_id_seq
@@ -21023,139 +22658,12 @@ CREATE SEQUENCE vulnerability_feedback_id_seq
ALTER SEQUENCE vulnerability_feedback_id_seq OWNED BY vulnerability_feedback.id;
-CREATE TABLE vulnerability_finding_evidence_assets (
- id bigint NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- vulnerability_finding_evidence_id bigint NOT NULL,
- type text,
- name text,
- url text,
- CONSTRAINT check_5adf5d69de CHECK ((char_length(type) <= 2048)),
- CONSTRAINT check_839f29d7ca CHECK ((char_length(name) <= 2048)),
- CONSTRAINT check_9272d912c0 CHECK ((char_length(url) <= 2048))
-);
-
-CREATE SEQUENCE vulnerability_finding_evidence_assets_id_seq
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
-
-ALTER SEQUENCE vulnerability_finding_evidence_assets_id_seq OWNED BY vulnerability_finding_evidence_assets.id;
-
-CREATE TABLE vulnerability_finding_evidence_headers (
- id bigint NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- vulnerability_finding_evidence_request_id bigint,
- vulnerability_finding_evidence_response_id bigint,
- name text NOT NULL,
- value text NOT NULL,
- CONSTRAINT check_01d21e8d92 CHECK ((char_length(name) <= 255)),
- CONSTRAINT check_3f9011f903 CHECK ((char_length(value) <= 8192))
-);
-
-CREATE SEQUENCE vulnerability_finding_evidence_headers_id_seq
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
-
-ALTER SEQUENCE vulnerability_finding_evidence_headers_id_seq OWNED BY vulnerability_finding_evidence_headers.id;
-
-CREATE TABLE vulnerability_finding_evidence_requests (
- id bigint NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- vulnerability_finding_evidence_id bigint,
- method text,
- url text,
- body text,
- vulnerability_finding_evidence_supporting_message_id bigint,
- CONSTRAINT check_7e37f2d01a CHECK ((char_length(body) <= 2048)),
- CONSTRAINT check_8152fbb236 CHECK ((char_length(url) <= 2048)),
- CONSTRAINT check_d9d11300f4 CHECK ((char_length(method) <= 32))
-);
-
-CREATE SEQUENCE vulnerability_finding_evidence_requests_id_seq
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
-
-ALTER SEQUENCE vulnerability_finding_evidence_requests_id_seq OWNED BY vulnerability_finding_evidence_requests.id;
-
-CREATE TABLE vulnerability_finding_evidence_responses (
- id bigint NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- vulnerability_finding_evidence_id bigint,
- status_code integer,
- reason_phrase text,
- body text,
- vulnerability_finding_evidence_supporting_message_id bigint,
- CONSTRAINT check_58b124ab48 CHECK ((char_length(reason_phrase) <= 2048)),
- CONSTRAINT check_76bac0c32b CHECK ((char_length(body) <= 2048))
-);
-
-CREATE SEQUENCE vulnerability_finding_evidence_responses_id_seq
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
-
-ALTER SEQUENCE vulnerability_finding_evidence_responses_id_seq OWNED BY vulnerability_finding_evidence_responses.id;
-
-CREATE TABLE vulnerability_finding_evidence_sources (
- id bigint NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- vulnerability_finding_evidence_id bigint NOT NULL,
- name text,
- url text,
- CONSTRAINT check_0fe01298d6 CHECK ((char_length(url) <= 2048)),
- CONSTRAINT check_86b537ba1a CHECK ((char_length(name) <= 2048))
-);
-
-CREATE SEQUENCE vulnerability_finding_evidence_sources_id_seq
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
-
-ALTER SEQUENCE vulnerability_finding_evidence_sources_id_seq OWNED BY vulnerability_finding_evidence_sources.id;
-
-CREATE TABLE vulnerability_finding_evidence_supporting_messages (
- id bigint NOT NULL,
- created_at timestamp with time zone NOT NULL,
- updated_at timestamp with time zone NOT NULL,
- vulnerability_finding_evidence_id bigint NOT NULL,
- name text,
- CONSTRAINT check_fa33b9ae85 CHECK ((char_length(name) <= 2048))
-);
-
-CREATE SEQUENCE vulnerability_finding_evidence_supporting_messages_id_seq
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
-
-ALTER SEQUENCE vulnerability_finding_evidence_supporting_messages_id_seq OWNED BY vulnerability_finding_evidence_supporting_messages.id;
-
CREATE TABLE vulnerability_finding_evidences (
id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
vulnerability_occurrence_id bigint NOT NULL,
- summary text,
- CONSTRAINT check_5773b236fb CHECK ((char_length(summary) <= 8000000))
+ data jsonb DEFAULT '{}'::jsonb NOT NULL
);
CREATE SEQUENCE vulnerability_finding_evidences_id_seq
@@ -21365,6 +22873,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,
CONSTRAINT check_4a3a60f2ba CHECK ((char_length(solution) <= 7000)),
CONSTRAINT check_ade261da6b CHECK ((char_length(description) <= 15000)),
CONSTRAINT check_df6dd20219 CHECK ((char_length(message) <= 3000)),
@@ -21380,6 +22889,32 @@ CREATE SEQUENCE vulnerability_occurrences_id_seq
ALTER SEQUENCE vulnerability_occurrences_id_seq OWNED BY vulnerability_occurrences.id;
+CREATE TABLE vulnerability_reads (
+ id bigint NOT NULL,
+ vulnerability_id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ scanner_id bigint NOT NULL,
+ report_type smallint NOT NULL,
+ severity smallint NOT NULL,
+ state smallint NOT NULL,
+ has_issues boolean DEFAULT false NOT NULL,
+ resolved_on_default_branch boolean DEFAULT false NOT NULL,
+ uuid uuid NOT NULL,
+ location_image text,
+ cluster_agent_id text,
+ CONSTRAINT check_380451bdbe CHECK ((char_length(location_image) <= 2048)),
+ CONSTRAINT check_a105eb825a CHECK ((char_length(cluster_agent_id) <= 10))
+);
+
+CREATE SEQUENCE vulnerability_reads_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE vulnerability_reads_id_seq OWNED BY vulnerability_reads.id;
+
CREATE TABLE vulnerability_remediations (
id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
@@ -21698,10 +23233,16 @@ ALTER SEQUENCE zoom_meetings_id_seq OWNED BY zoom_meetings.id;
ALTER TABLE ONLY abuse_reports ALTER COLUMN id SET DEFAULT nextval('abuse_reports_id_seq'::regclass);
+ALTER TABLE ONLY agent_activity_events ALTER COLUMN id SET DEFAULT nextval('agent_activity_events_id_seq'::regclass);
+
ALTER TABLE ONLY agent_group_authorizations ALTER COLUMN id SET DEFAULT nextval('agent_group_authorizations_id_seq'::regclass);
+ALTER TABLE ONLY agent_project_authorizations ALTER COLUMN id SET DEFAULT nextval('agent_project_authorizations_id_seq'::regclass);
+
ALTER TABLE ONLY alert_management_alert_assignees ALTER COLUMN id SET DEFAULT nextval('alert_management_alert_assignees_id_seq'::regclass);
+ALTER TABLE ONLY alert_management_alert_metric_images ALTER COLUMN id SET DEFAULT nextval('alert_management_alert_metric_images_id_seq'::regclass);
+
ALTER TABLE ONLY alert_management_alert_user_mentions ALTER COLUMN id SET DEFAULT nextval('alert_management_alert_user_mentions_id_seq'::regclass);
ALTER TABLE ONLY alert_management_alerts ALTER COLUMN id SET DEFAULT nextval('alert_management_alerts_id_seq'::regclass);
@@ -21768,6 +23309,8 @@ ALTER TABLE ONLY background_migration_jobs ALTER COLUMN id SET DEFAULT nextval('
ALTER TABLE ONLY badges ALTER COLUMN id SET DEFAULT nextval('badges_id_seq'::regclass);
+ALTER TABLE ONLY batched_background_migration_job_transition_logs ALTER COLUMN id SET DEFAULT nextval('batched_background_migration_job_transition_logs_id_seq'::regclass);
+
ALTER TABLE ONLY batched_background_migration_jobs ALTER COLUMN id SET DEFAULT nextval('batched_background_migration_jobs_id_seq'::regclass);
ALTER TABLE ONLY batched_background_migrations ALTER COLUMN id SET DEFAULT nextval('batched_background_migrations_id_seq'::regclass);
@@ -21842,6 +23385,8 @@ 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);
@@ -21850,6 +23395,8 @@ ALTER TABLE ONLY ci_job_variables ALTER COLUMN id SET DEFAULT nextval('ci_job_va
ALTER TABLE ONLY ci_minutes_additional_packs ALTER COLUMN id SET DEFAULT nextval('ci_minutes_additional_packs_id_seq'::regclass);
+ALTER TABLE ONLY ci_namespace_mirrors ALTER COLUMN id SET DEFAULT nextval('ci_namespace_mirrors_id_seq'::regclass);
+
ALTER TABLE ONLY ci_namespace_monthly_usages ALTER COLUMN id SET DEFAULT nextval('ci_namespace_monthly_usages_id_seq'::regclass);
ALTER TABLE ONLY ci_pending_builds ALTER COLUMN id SET DEFAULT nextval('ci_pending_builds_id_seq'::regclass);
@@ -21872,6 +23419,8 @@ ALTER TABLE ONLY ci_pipelines_config ALTER COLUMN pipeline_id SET DEFAULT nextva
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);
+
ALTER TABLE ONLY ci_project_monthly_usages ALTER COLUMN id SET DEFAULT nextval('ci_project_monthly_usages_id_seq'::regclass);
ALTER TABLE ONLY ci_refs ALTER COLUMN id SET DEFAULT nextval('ci_refs_id_seq'::regclass);
@@ -21888,6 +23437,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_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);
ALTER TABLE ONLY ci_sources_projects ALTER COLUMN id SET DEFAULT nextval('ci_sources_projects_id_seq'::regclass);
@@ -21950,8 +23501,12 @@ ALTER TABLE ONLY compliance_management_frameworks ALTER COLUMN id SET DEFAULT ne
ALTER TABLE ONLY container_repositories ALTER COLUMN id SET DEFAULT nextval('container_repositories_id_seq'::regclass);
+ALTER TABLE ONLY content_blocked_states ALTER COLUMN id SET DEFAULT nextval('content_blocked_states_id_seq'::regclass);
+
ALTER TABLE ONLY conversational_development_index_metrics ALTER COLUMN id SET DEFAULT nextval('conversational_development_index_metrics_id_seq'::regclass);
+ALTER TABLE ONLY coverage_fuzzing_corpuses ALTER COLUMN id SET DEFAULT nextval('coverage_fuzzing_corpuses_id_seq'::regclass);
+
ALTER TABLE ONLY csv_issue_imports ALTER COLUMN id SET DEFAULT nextval('csv_issue_imports_id_seq'::regclass);
ALTER TABLE ONLY custom_emoji ALTER COLUMN id SET DEFAULT nextval('custom_emoji_id_seq'::regclass);
@@ -21976,8 +23531,6 @@ ALTER TABLE ONLY dast_site_validations ALTER COLUMN id SET DEFAULT nextval('dast
ALTER TABLE ONLY dast_sites ALTER COLUMN id SET DEFAULT nextval('dast_sites_id_seq'::regclass);
-ALTER TABLE ONLY dep_ci_build_trace_section_names ALTER COLUMN id SET DEFAULT nextval('dep_ci_build_trace_section_names_id_seq'::regclass);
-
ALTER TABLE ONLY dependency_proxy_blobs ALTER COLUMN id SET DEFAULT nextval('dependency_proxy_blobs_id_seq'::regclass);
ALTER TABLE ONLY dependency_proxy_group_settings ALTER COLUMN id SET DEFAULT nextval('dependency_proxy_group_settings_id_seq'::regclass);
@@ -21988,6 +23541,8 @@ ALTER TABLE ONLY deploy_keys_projects ALTER COLUMN id SET DEFAULT nextval('deplo
ALTER TABLE ONLY deploy_tokens ALTER COLUMN id SET DEFAULT nextval('deploy_tokens_id_seq'::regclass);
+ALTER TABLE ONLY deployment_approvals ALTER COLUMN id SET DEFAULT nextval('deployment_approvals_id_seq'::regclass);
+
ALTER TABLE ONLY deployments ALTER COLUMN id SET DEFAULT nextval('deployments_id_seq'::regclass);
ALTER TABLE ONLY description_versions ALTER COLUMN id SET DEFAULT nextval('description_versions_id_seq'::regclass);
@@ -22096,8 +23651,6 @@ 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 geo_upload_deleted_events ALTER COLUMN id SET DEFAULT nextval('geo_upload_deleted_events_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);
@@ -22110,6 +23663,8 @@ ALTER TABLE ONLY gpg_signatures ALTER COLUMN id SET DEFAULT nextval('gpg_signatu
ALTER TABLE ONLY grafana_integrations ALTER COLUMN id SET DEFAULT nextval('grafana_integrations_id_seq'::regclass);
+ALTER TABLE ONLY group_crm_settings ALTER COLUMN group_id SET DEFAULT nextval('group_crm_settings_group_id_seq'::regclass);
+
ALTER TABLE ONLY group_custom_attributes ALTER COLUMN id SET DEFAULT nextval('group_custom_attributes_id_seq'::regclass);
ALTER TABLE ONLY group_deploy_keys ALTER COLUMN id SET DEFAULT nextval('group_deploy_keys_id_seq'::regclass);
@@ -22152,6 +23707,8 @@ 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_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);
ALTER TABLE ONLY insights ALTER COLUMN id SET DEFAULT nextval('insights_id_seq'::regclass);
@@ -22168,8 +23725,12 @@ ALTER TABLE ONLY issuable_severities ALTER COLUMN id SET DEFAULT nextval('issuab
ALTER TABLE ONLY issuable_slas ALTER COLUMN id SET DEFAULT nextval('issuable_slas_id_seq'::regclass);
+ALTER TABLE ONLY issue_customer_relations_contacts ALTER COLUMN id SET DEFAULT nextval('issue_customer_relations_contacts_id_seq'::regclass);
+
ALTER TABLE ONLY issue_email_participants ALTER COLUMN id SET DEFAULT nextval('issue_email_participants_id_seq'::regclass);
+ALTER TABLE ONLY issue_emails ALTER COLUMN id SET DEFAULT nextval('issue_emails_id_seq'::regclass);
+
ALTER TABLE ONLY issue_links ALTER COLUMN id SET DEFAULT nextval('issue_links_id_seq'::regclass);
ALTER TABLE ONLY issue_metrics ALTER COLUMN id SET DEFAULT nextval('issue_metrics_id_seq'::regclass);
@@ -22202,6 +23763,8 @@ ALTER TABLE ONLY ldap_group_links ALTER COLUMN id SET DEFAULT nextval('ldap_grou
ALTER TABLE ONLY lfs_file_locks ALTER COLUMN id SET DEFAULT nextval('lfs_file_locks_id_seq'::regclass);
+ALTER TABLE ONLY lfs_object_states ALTER COLUMN lfs_object_id SET DEFAULT nextval('lfs_object_states_lfs_object_id_seq'::regclass);
+
ALTER TABLE ONLY lfs_objects ALTER COLUMN id SET DEFAULT nextval('lfs_objects_id_seq'::regclass);
ALTER TABLE ONLY lfs_objects_projects ALTER COLUMN id SET DEFAULT nextval('lfs_objects_projects_id_seq'::regclass);
@@ -22212,6 +23775,10 @@ ALTER TABLE ONLY list_user_preferences ALTER COLUMN id SET DEFAULT nextval('list
ALTER TABLE ONLY lists ALTER COLUMN id SET DEFAULT nextval('lists_id_seq'::regclass);
+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_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);
ALTER TABLE ONLY merge_request_assignees ALTER COLUMN id SET DEFAULT nextval('merge_request_assignees_id_seq'::regclass);
@@ -22238,6 +23805,8 @@ ALTER TABLE ONLY merge_requests ALTER COLUMN id SET DEFAULT nextval('merge_reque
ALTER TABLE ONLY merge_requests_closing_issues ALTER COLUMN id SET DEFAULT nextval('merge_requests_closing_issues_id_seq'::regclass);
+ALTER TABLE ONLY merge_requests_compliance_violations ALTER COLUMN id SET DEFAULT nextval('merge_requests_compliance_violations_id_seq'::regclass);
+
ALTER TABLE ONLY merge_trains ALTER COLUMN id SET DEFAULT nextval('merge_trains_id_seq'::regclass);
ALTER TABLE ONLY metrics_dashboard_annotations ALTER COLUMN id SET DEFAULT nextval('metrics_dashboard_annotations_id_seq'::regclass);
@@ -22256,6 +23825,8 @@ ALTER TABLE ONLY namespace_statistics ALTER COLUMN id SET DEFAULT nextval('names
ALTER TABLE ONLY namespaces ALTER COLUMN id SET DEFAULT nextval('namespaces_id_seq'::regclass);
+ALTER TABLE ONLY namespaces_sync_events ALTER COLUMN id SET DEFAULT nextval('namespaces_sync_events_id_seq'::regclass);
+
ALTER TABLE ONLY note_diff_files ALTER COLUMN id SET DEFAULT nextval('note_diff_files_id_seq'::regclass);
ALTER TABLE ONLY notes ALTER COLUMN id SET DEFAULT nextval('notes_id_seq'::regclass);
@@ -22272,8 +23843,6 @@ ALTER TABLE ONLY oauth_openid_requests ALTER COLUMN id SET DEFAULT nextval('oaut
ALTER TABLE ONLY onboarding_progresses ALTER COLUMN id SET DEFAULT nextval('onboarding_progresses_id_seq'::regclass);
-ALTER TABLE ONLY open_project_tracker_data ALTER COLUMN id SET DEFAULT nextval('open_project_tracker_data_id_seq'::regclass);
-
ALTER TABLE ONLY operations_feature_flag_scopes ALTER COLUMN id SET DEFAULT nextval('operations_feature_flag_scopes_id_seq'::regclass);
ALTER TABLE ONLY operations_feature_flags ALTER COLUMN id SET DEFAULT nextval('operations_feature_flags_id_seq'::regclass);
@@ -22336,14 +23905,14 @@ ALTER TABLE ONLY packages_packages ALTER COLUMN id SET DEFAULT nextval('packages
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);
+
ALTER TABLE ONLY pages_deployments ALTER COLUMN id SET DEFAULT nextval('pages_deployments_id_seq'::regclass);
ALTER TABLE ONLY pages_domain_acme_orders ALTER COLUMN id SET DEFAULT nextval('pages_domain_acme_orders_id_seq'::regclass);
ALTER TABLE ONLY pages_domains ALTER COLUMN id SET DEFAULT nextval('pages_domains_id_seq'::regclass);
-ALTER TABLE ONLY partitioned_foreign_keys ALTER COLUMN id SET DEFAULT nextval('partitioned_foreign_keys_id_seq'::regclass);
-
ALTER TABLE ONLY path_locks ALTER COLUMN id SET DEFAULT nextval('path_locks_id_seq'::regclass);
ALTER TABLE ONLY personal_access_tokens ALTER COLUMN id SET DEFAULT nextval('personal_access_tokens_id_seq'::regclass);
@@ -22358,6 +23927,8 @@ ALTER TABLE ONLY postgres_async_indexes ALTER COLUMN id SET DEFAULT nextval('pos
ALTER TABLE ONLY postgres_reindex_actions ALTER COLUMN id SET DEFAULT nextval('postgres_reindex_actions_id_seq'::regclass);
+ALTER TABLE ONLY postgres_reindex_queued_actions ALTER COLUMN id SET DEFAULT nextval('postgres_reindex_queued_actions_id_seq'::regclass);
+
ALTER TABLE ONLY product_analytics_events_experimental ALTER COLUMN id SET DEFAULT nextval('product_analytics_events_experimental_id_seq'::regclass);
ALTER TABLE ONLY programming_languages ALTER COLUMN id SET DEFAULT nextval('programming_languages_id_seq'::regclass);
@@ -22366,6 +23937,8 @@ ALTER TABLE ONLY project_aliases ALTER COLUMN id SET DEFAULT nextval('project_al
ALTER TABLE ONLY project_auto_devops ALTER COLUMN id SET DEFAULT nextval('project_auto_devops_id_seq'::regclass);
+ALTER TABLE ONLY project_build_artifacts_size_refreshes ALTER COLUMN id SET DEFAULT nextval('project_build_artifacts_size_refreshes_id_seq'::regclass);
+
ALTER TABLE ONLY project_ci_cd_settings ALTER COLUMN id SET DEFAULT nextval('project_ci_cd_settings_id_seq'::regclass);
ALTER TABLE ONLY project_ci_feature_usages ALTER COLUMN id SET DEFAULT nextval('project_ci_feature_usages_id_seq'::regclass);
@@ -22404,6 +23977,8 @@ ALTER TABLE ONLY project_tracing_settings ALTER COLUMN id SET DEFAULT nextval('p
ALTER TABLE ONLY projects ALTER COLUMN id SET DEFAULT nextval('projects_id_seq'::regclass);
+ALTER TABLE ONLY projects_sync_events ALTER COLUMN id SET DEFAULT nextval('projects_sync_events_id_seq'::regclass);
+
ALTER TABLE ONLY prometheus_alert_events ALTER COLUMN id SET DEFAULT nextval('prometheus_alert_events_id_seq'::regclass);
ALTER TABLE ONLY prometheus_alerts ALTER COLUMN id SET DEFAULT nextval('prometheus_alerts_id_seq'::regclass);
@@ -22418,6 +23993,8 @@ ALTER TABLE ONLY protected_branch_unprotect_access_levels ALTER COLUMN id SET DE
ALTER TABLE ONLY protected_branches ALTER COLUMN id SET DEFAULT nextval('protected_branches_id_seq'::regclass);
+ALTER TABLE ONLY protected_environment_approval_rules ALTER COLUMN id SET DEFAULT nextval('protected_environment_approval_rules_id_seq'::regclass);
+
ALTER TABLE ONLY protected_environment_deploy_access_levels ALTER COLUMN id SET DEFAULT nextval('protected_environment_deploy_access_levels_id_seq'::regclass);
ALTER TABLE ONLY protected_environments ALTER COLUMN id SET DEFAULT nextval('protected_environments_id_seq'::regclass);
@@ -22432,6 +24009,8 @@ ALTER TABLE ONLY raw_usage_data ALTER COLUMN id SET DEFAULT nextval('raw_usage_d
ALTER TABLE ONLY redirect_routes ALTER COLUMN id SET DEFAULT nextval('redirect_routes_id_seq'::regclass);
+ALTER TABLE ONLY related_epic_links ALTER COLUMN id SET DEFAULT nextval('related_epic_links_id_seq'::regclass);
+
ALTER TABLE ONLY release_links ALTER COLUMN id SET DEFAULT nextval('release_links_id_seq'::regclass);
ALTER TABLE ONLY releases ALTER COLUMN id SET DEFAULT nextval('releases_id_seq'::regclass);
@@ -22462,6 +24041,8 @@ ALTER TABLE ONLY saml_group_links ALTER COLUMN id SET DEFAULT nextval('saml_grou
ALTER TABLE ONLY saml_providers ALTER COLUMN id SET DEFAULT nextval('saml_providers_id_seq'::regclass);
+ALTER TABLE ONLY saved_replies ALTER COLUMN id SET DEFAULT nextval('saved_replies_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);
@@ -22474,6 +24055,10 @@ ALTER TABLE ONLY security_orchestration_policy_rule_schedules ALTER COLUMN id SE
ALTER TABLE ONLY security_scans ALTER COLUMN id SET DEFAULT nextval('security_scans_id_seq'::regclass);
+ALTER TABLE ONLY security_training_providers ALTER COLUMN id SET DEFAULT nextval('security_training_providers_id_seq'::regclass);
+
+ALTER TABLE ONLY security_trainings ALTER COLUMN id SET DEFAULT nextval('security_trainings_id_seq'::regclass);
+
ALTER TABLE ONLY self_managed_prometheus_alert_events ALTER COLUMN id SET DEFAULT nextval('self_managed_prometheus_alert_events_id_seq'::regclass);
ALTER TABLE ONLY sent_notifications ALTER COLUMN id SET DEFAULT nextval('sent_notifications_id_seq'::regclass);
@@ -22536,6 +24121,8 @@ ALTER TABLE ONLY u2f_registrations ALTER COLUMN id SET DEFAULT nextval('u2f_regi
ALTER TABLE ONLY upcoming_reconciliations ALTER COLUMN id SET DEFAULT nextval('upcoming_reconciliations_id_seq'::regclass);
+ALTER TABLE ONLY upload_states ALTER COLUMN upload_id SET DEFAULT nextval('upload_states_upload_id_seq'::regclass);
+
ALTER TABLE ONLY uploads ALTER COLUMN id SET DEFAULT nextval('uploads_id_seq'::regclass);
ALTER TABLE ONLY user_agent_details ALTER COLUMN id SET DEFAULT nextval('user_agent_details_id_seq'::regclass);
@@ -22574,18 +24161,6 @@ ALTER TABLE ONLY vulnerability_external_issue_links ALTER COLUMN id SET DEFAULT
ALTER TABLE ONLY vulnerability_feedback ALTER COLUMN id SET DEFAULT nextval('vulnerability_feedback_id_seq'::regclass);
-ALTER TABLE ONLY vulnerability_finding_evidence_assets ALTER COLUMN id SET DEFAULT nextval('vulnerability_finding_evidence_assets_id_seq'::regclass);
-
-ALTER TABLE ONLY vulnerability_finding_evidence_headers ALTER COLUMN id SET DEFAULT nextval('vulnerability_finding_evidence_headers_id_seq'::regclass);
-
-ALTER TABLE ONLY vulnerability_finding_evidence_requests ALTER COLUMN id SET DEFAULT nextval('vulnerability_finding_evidence_requests_id_seq'::regclass);
-
-ALTER TABLE ONLY vulnerability_finding_evidence_responses ALTER COLUMN id SET DEFAULT nextval('vulnerability_finding_evidence_responses_id_seq'::regclass);
-
-ALTER TABLE ONLY vulnerability_finding_evidence_sources ALTER COLUMN id SET DEFAULT nextval('vulnerability_finding_evidence_sources_id_seq'::regclass);
-
-ALTER TABLE ONLY vulnerability_finding_evidence_supporting_messages ALTER COLUMN id SET DEFAULT nextval('vulnerability_finding_evidence_supporting_messages_id_seq'::regclass);
-
ALTER TABLE ONLY vulnerability_finding_evidences ALTER COLUMN id SET DEFAULT nextval('vulnerability_finding_evidences_id_seq'::regclass);
ALTER TABLE ONLY vulnerability_finding_links ALTER COLUMN id SET DEFAULT nextval('vulnerability_finding_links_id_seq'::regclass);
@@ -22608,6 +24183,8 @@ ALTER TABLE ONLY vulnerability_occurrence_pipelines ALTER COLUMN id SET DEFAULT
ALTER TABLE ONLY vulnerability_occurrences ALTER COLUMN id SET DEFAULT nextval('vulnerability_occurrences_id_seq'::regclass);
+ALTER TABLE ONLY vulnerability_reads ALTER COLUMN id SET DEFAULT nextval('vulnerability_reads_id_seq'::regclass);
+
ALTER TABLE ONLY vulnerability_remediations ALTER COLUMN id SET DEFAULT nextval('vulnerability_remediations_id_seq'::regclass);
ALTER TABLE ONLY vulnerability_scanners ALTER COLUMN id SET DEFAULT nextval('vulnerability_scanners_id_seq'::regclass);
@@ -22668,8 +24245,38 @@ ALTER TABLE ONLY gitlab_partitions_dynamic.audit_events_202306
ALTER TABLE ONLY gitlab_partitions_dynamic.audit_events_202307
ADD CONSTRAINT audit_events_202307_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.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 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_202303
+ ADD CONSTRAINT batched_background_migration_job_transition_logs_202303_pkey PRIMARY KEY (id, created_at);
+
+ALTER TABLE ONLY gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202304
+ ADD CONSTRAINT batched_background_migration_job_transition_logs_202304_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.incident_management_pending_alert_escalations_202211
ADD CONSTRAINT incident_management_pending_alert_escalations_202211_pkey PRIMARY KEY (id, process_at);
@@ -22677,6 +24284,9 @@ ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_alert_esc
ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202212
ADD CONSTRAINT incident_management_pending_alert_escalations_202212_pkey PRIMARY KEY (id, process_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_202301
ADD CONSTRAINT incident_management_pending_alert_escalations_202301_pkey PRIMARY KEY (id, process_at);
@@ -22698,8 +24308,11 @@ ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_alert_esc
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 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_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_issue_escalations_202211
ADD CONSTRAINT incident_management_pending_issue_escalations_202211_pkey PRIMARY KEY (id, process_at);
@@ -22707,6 +24320,9 @@ ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_issue_esc
ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202212
ADD CONSTRAINT incident_management_pending_issue_escalations_202212_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_202301
ADD CONSTRAINT incident_management_pending_issue_escalations_202301_pkey PRIMARY KEY (id, process_at);
@@ -22728,33 +24344,54 @@ ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_issue_esc
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 loose_foreign_keys_deleted_records
- ADD CONSTRAINT loose_foreign_keys_deleted_records_pkey PRIMARY KEY (created_at, deleted_table_name, deleted_table_primary_key_value);
+ ADD CONSTRAINT loose_foreign_keys_deleted_records_pkey PRIMARY KEY (partition, id);
-ALTER TABLE ONLY gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_000000
- ADD CONSTRAINT loose_foreign_keys_deleted_records_000000_pkey PRIMARY KEY (created_at, deleted_table_name, deleted_table_primary_key_value);
+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 gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_202212
- ADD CONSTRAINT loose_foreign_keys_deleted_records_202212_pkey PRIMARY KEY (created_at, deleted_table_name, deleted_table_primary_key_value);
+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.loose_foreign_keys_deleted_records_202301
- ADD CONSTRAINT loose_foreign_keys_deleted_records_202301_pkey PRIMARY KEY (created_at, deleted_table_name, deleted_table_primary_key_value);
+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.loose_foreign_keys_deleted_records_202302
- ADD CONSTRAINT loose_foreign_keys_deleted_records_202302_pkey PRIMARY KEY (created_at, deleted_table_name, deleted_table_primary_key_value);
+ALTER TABLE ONLY gitlab_partitions_dynamic.verification_codes_202302
+ ADD CONSTRAINT verification_codes_202302_pkey PRIMARY KEY (created_at, visitor_id_code, code, phone);
-ALTER TABLE ONLY gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_202303
- ADD CONSTRAINT loose_foreign_keys_deleted_records_202303_pkey PRIMARY KEY (created_at, deleted_table_name, deleted_table_primary_key_value);
+ALTER TABLE ONLY gitlab_partitions_dynamic.verification_codes_202303
+ ADD CONSTRAINT verification_codes_202303_pkey PRIMARY KEY (created_at, visitor_id_code, code, phone);
-ALTER TABLE ONLY gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_202304
- ADD CONSTRAINT loose_foreign_keys_deleted_records_202304_pkey PRIMARY KEY (created_at, deleted_table_name, deleted_table_primary_key_value);
+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 web_hook_logs
- ADD CONSTRAINT web_hook_logs_pkey PRIMARY KEY (id, created_at);
+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.web_hook_logs_000000
ADD CONSTRAINT web_hook_logs_000000_pkey PRIMARY KEY (id, created_at);
+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_202212
ADD CONSTRAINT web_hook_logs_202212_pkey PRIMARY KEY (id, created_at);
@@ -22779,6 +24416,12 @@ ALTER TABLE ONLY gitlab_partitions_dynamic.web_hook_logs_202306
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 analytics_cycle_analytics_issue_stage_events
ADD CONSTRAINT analytics_cycle_analytics_issue_stage_events_pkey PRIMARY KEY (stage_event_hash_id, issue_id);
@@ -22977,6 +24620,201 @@ ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_reques
ALTER TABLE ONLY gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_31
ADD CONSTRAINT analytics_cycle_analytics_merge_request_stage_events_31_pkey PRIMARY KEY (stage_event_hash_id, merge_request_id);
+ALTER TABLE ONLY issue_search_data
+ ADD CONSTRAINT issue_search_data_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_00
+ ADD CONSTRAINT issue_search_data_00_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_01
+ ADD CONSTRAINT issue_search_data_01_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_02
+ ADD CONSTRAINT issue_search_data_02_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_03
+ ADD CONSTRAINT issue_search_data_03_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_04
+ ADD CONSTRAINT issue_search_data_04_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_05
+ ADD CONSTRAINT issue_search_data_05_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_06
+ ADD CONSTRAINT issue_search_data_06_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_07
+ ADD CONSTRAINT issue_search_data_07_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_08
+ ADD CONSTRAINT issue_search_data_08_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_09
+ ADD CONSTRAINT issue_search_data_09_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_10
+ ADD CONSTRAINT issue_search_data_10_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_11
+ ADD CONSTRAINT issue_search_data_11_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_12
+ ADD CONSTRAINT issue_search_data_12_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_13
+ ADD CONSTRAINT issue_search_data_13_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_14
+ ADD CONSTRAINT issue_search_data_14_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_15
+ ADD CONSTRAINT issue_search_data_15_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_16
+ ADD CONSTRAINT issue_search_data_16_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_17
+ ADD CONSTRAINT issue_search_data_17_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_18
+ ADD CONSTRAINT issue_search_data_18_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_19
+ ADD CONSTRAINT issue_search_data_19_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_20
+ ADD CONSTRAINT issue_search_data_20_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_21
+ ADD CONSTRAINT issue_search_data_21_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_22
+ ADD CONSTRAINT issue_search_data_22_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_23
+ ADD CONSTRAINT issue_search_data_23_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_24
+ ADD CONSTRAINT issue_search_data_24_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_25
+ ADD CONSTRAINT issue_search_data_25_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_26
+ ADD CONSTRAINT issue_search_data_26_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_27
+ ADD CONSTRAINT issue_search_data_27_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_28
+ ADD CONSTRAINT issue_search_data_28_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_29
+ ADD CONSTRAINT issue_search_data_29_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_30
+ ADD CONSTRAINT issue_search_data_30_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_31
+ ADD CONSTRAINT issue_search_data_31_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_32
+ ADD CONSTRAINT issue_search_data_32_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_33
+ ADD CONSTRAINT issue_search_data_33_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_34
+ ADD CONSTRAINT issue_search_data_34_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_35
+ ADD CONSTRAINT issue_search_data_35_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_36
+ ADD CONSTRAINT issue_search_data_36_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_37
+ ADD CONSTRAINT issue_search_data_37_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_38
+ ADD CONSTRAINT issue_search_data_38_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_39
+ ADD CONSTRAINT issue_search_data_39_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_40
+ ADD CONSTRAINT issue_search_data_40_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_41
+ ADD CONSTRAINT issue_search_data_41_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_42
+ ADD CONSTRAINT issue_search_data_42_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_43
+ ADD CONSTRAINT issue_search_data_43_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_44
+ ADD CONSTRAINT issue_search_data_44_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_45
+ ADD CONSTRAINT issue_search_data_45_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_46
+ ADD CONSTRAINT issue_search_data_46_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_47
+ ADD CONSTRAINT issue_search_data_47_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_48
+ ADD CONSTRAINT issue_search_data_48_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_49
+ ADD CONSTRAINT issue_search_data_49_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_50
+ ADD CONSTRAINT issue_search_data_50_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_51
+ ADD CONSTRAINT issue_search_data_51_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_52
+ ADD CONSTRAINT issue_search_data_52_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_53
+ ADD CONSTRAINT issue_search_data_53_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_54
+ ADD CONSTRAINT issue_search_data_54_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_55
+ ADD CONSTRAINT issue_search_data_55_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_56
+ ADD CONSTRAINT issue_search_data_56_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_57
+ ADD CONSTRAINT issue_search_data_57_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_58
+ ADD CONSTRAINT issue_search_data_58_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_59
+ ADD CONSTRAINT issue_search_data_59_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_60
+ ADD CONSTRAINT issue_search_data_60_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_61
+ ADD CONSTRAINT issue_search_data_61_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_62
+ ADD CONSTRAINT issue_search_data_62_pkey PRIMARY KEY (project_id, issue_id);
+
+ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_63
+ ADD CONSTRAINT issue_search_data_63_pkey PRIMARY KEY (project_id, issue_id);
+
ALTER TABLE ONLY product_analytics_events_experimental
ADD CONSTRAINT product_analytics_events_experimental_pkey PRIMARY KEY (id, project_id);
@@ -23175,12 +25013,21 @@ ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_
ALTER TABLE ONLY abuse_reports
ADD CONSTRAINT abuse_reports_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY agent_activity_events
+ ADD CONSTRAINT agent_activity_events_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY agent_group_authorizations
ADD CONSTRAINT agent_group_authorizations_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY agent_project_authorizations
+ ADD CONSTRAINT agent_project_authorizations_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY alert_management_alert_assignees
ADD CONSTRAINT alert_management_alert_assignees_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY alert_management_alert_metric_images
+ ADD CONSTRAINT alert_management_alert_metric_images_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY alert_management_alert_user_mentions
ADD CONSTRAINT alert_management_alert_user_mentions_pkey PRIMARY KEY (id);
@@ -23193,6 +25040,9 @@ ALTER TABLE ONLY alert_management_http_integrations
ALTER TABLE ONLY allowed_email_domains
ADD CONSTRAINT allowed_email_domains_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY analytics_cycle_analytics_aggregations
+ ADD CONSTRAINT analytics_cycle_analytics_aggregations_pkey PRIMARY KEY (group_id);
+
ALTER TABLE ONLY analytics_cycle_analytics_group_stages
ADD CONSTRAINT analytics_cycle_analytics_group_stages_pkey PRIMARY KEY (id);
@@ -23391,9 +25241,6 @@ 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 dep_ci_build_trace_sections
- ADD CONSTRAINT ci_build_trace_sections_pkey PRIMARY KEY (build_id, section_name_id);
-
ALTER TABLE ONLY ci_builds_metadata
ADD CONSTRAINT ci_builds_metadata_pkey PRIMARY KEY (id);
@@ -23418,6 +25265,9 @@ ALTER TABLE ONLY ci_group_variables
ALTER TABLE ONLY ci_instance_variables
ADD CONSTRAINT ci_instance_variables_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY ci_job_artifact_states
+ ADD CONSTRAINT ci_job_artifact_states_pkey PRIMARY KEY (job_artifact_id);
+
ALTER TABLE ONLY ci_job_artifacts
ADD CONSTRAINT ci_job_artifacts_pkey PRIMARY KEY (id);
@@ -23430,6 +25280,9 @@ ALTER TABLE ONLY ci_job_variables
ALTER TABLE ONLY ci_minutes_additional_packs
ADD CONSTRAINT ci_minutes_additional_packs_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY ci_namespace_mirrors
+ ADD CONSTRAINT ci_namespace_mirrors_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY ci_namespace_monthly_usages
ADD CONSTRAINT ci_namespace_monthly_usages_pkey PRIMARY KEY (id);
@@ -23463,6 +25316,9 @@ ALTER TABLE ONLY ci_pipelines
ALTER TABLE ONLY ci_platform_metrics
ADD CONSTRAINT ci_platform_metrics_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY ci_project_mirrors
+ ADD CONSTRAINT ci_project_mirrors_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY ci_project_monthly_usages
ADD CONSTRAINT ci_project_monthly_usages_pkey PRIMARY KEY (id);
@@ -23487,6 +25343,9 @@ ALTER TABLE ONLY ci_runners
ALTER TABLE ONLY ci_running_builds
ADD CONSTRAINT ci_running_builds_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY ci_secure_files
+ ADD CONSTRAINT ci_secure_files_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY ci_sources_pipelines
ADD CONSTRAINT ci_sources_pipelines_pkey PRIMARY KEY (id);
@@ -23589,9 +25448,15 @@ ALTER TABLE ONLY container_expiration_policies
ALTER TABLE ONLY container_repositories
ADD CONSTRAINT container_repositories_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY content_blocked_states
+ ADD CONSTRAINT content_blocked_states_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY conversational_development_index_metrics
ADD CONSTRAINT conversational_development_index_metrics_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY coverage_fuzzing_corpuses
+ ADD CONSTRAINT coverage_fuzzing_corpuses_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY csv_issue_imports
ADD CONSTRAINT csv_issue_imports_pkey PRIMARY KEY (id);
@@ -23640,9 +25505,6 @@ ALTER TABLE ONLY dast_site_validations
ALTER TABLE ONLY dast_sites
ADD CONSTRAINT dast_sites_pkey PRIMARY KEY (id);
-ALTER TABLE ONLY dep_ci_build_trace_section_names
- ADD CONSTRAINT dep_ci_build_trace_section_names_pkey PRIMARY KEY (id);
-
ALTER TABLE ONLY dependency_proxy_blobs
ADD CONSTRAINT dependency_proxy_blobs_pkey PRIMARY KEY (id);
@@ -23661,6 +25523,9 @@ ALTER TABLE ONLY deploy_keys_projects
ALTER TABLE ONLY deploy_tokens
ADD CONSTRAINT deploy_tokens_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY deployment_approvals
+ ADD CONSTRAINT deployment_approvals_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY deployment_clusters
ADD CONSTRAINT deployment_clusters_pkey PRIMARY KEY (deployment_id);
@@ -23835,9 +25700,6 @@ 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 geo_upload_deleted_events
- ADD CONSTRAINT geo_upload_deleted_events_pkey PRIMARY KEY (id);
-
ALTER TABLE ONLY gitlab_subscription_histories
ADD CONSTRAINT gitlab_subscription_histories_pkey PRIMARY KEY (id);
@@ -23856,6 +25718,9 @@ ALTER TABLE ONLY gpg_signatures
ALTER TABLE ONLY grafana_integrations
ADD CONSTRAINT grafana_integrations_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY group_crm_settings
+ ADD CONSTRAINT group_crm_settings_pkey PRIMARY KEY (group_id);
+
ALTER TABLE ONLY group_custom_attributes
ADD CONSTRAINT group_custom_attributes_pkey PRIMARY KEY (id);
@@ -23871,6 +25736,9 @@ ALTER TABLE ONLY group_deploy_keys
ALTER TABLE ONLY group_deploy_tokens
ADD CONSTRAINT group_deploy_tokens_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY group_features
+ ADD CONSTRAINT group_features_pkey PRIMARY KEY (group_id);
+
ALTER TABLE ONLY group_group_links
ADD CONSTRAINT group_group_links_pkey PRIMARY KEY (id);
@@ -23925,6 +25793,9 @@ 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_timeline_events
+ ADD CONSTRAINT incident_management_timeline_events_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY index_statuses
ADD CONSTRAINT index_statuses_pkey PRIMARY KEY (id);
@@ -23952,9 +25823,15 @@ ALTER TABLE ONLY issuable_slas
ALTER TABLE ONLY issue_assignees
ADD CONSTRAINT issue_assignees_pkey PRIMARY KEY (issue_id, user_id);
+ALTER TABLE ONLY issue_customer_relations_contacts
+ ADD CONSTRAINT issue_customer_relations_contacts_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY issue_email_participants
ADD CONSTRAINT issue_email_participants_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY issue_emails
+ ADD CONSTRAINT issue_emails_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY issue_links
ADD CONSTRAINT issue_links_pkey PRIMARY KEY (id);
@@ -24015,6 +25892,9 @@ ALTER TABLE ONLY ldap_group_links
ALTER TABLE ONLY lfs_file_locks
ADD CONSTRAINT lfs_file_locks_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY lfs_object_states
+ ADD CONSTRAINT lfs_object_states_pkey PRIMARY KEY (lfs_object_id);
+
ALTER TABLE ONLY lfs_objects
ADD CONSTRAINT lfs_objects_pkey PRIMARY KEY (id);
@@ -24030,6 +25910,9 @@ ALTER TABLE ONLY list_user_preferences
ALTER TABLE ONLY lists
ADD CONSTRAINT lists_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY member_tasks
+ ADD CONSTRAINT member_tasks_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY members
ADD CONSTRAINT members_pkey PRIMARY KEY (id);
@@ -24075,6 +25958,9 @@ ALTER TABLE ONLY merge_request_user_mentions
ALTER TABLE ONLY merge_requests_closing_issues
ADD CONSTRAINT merge_requests_closing_issues_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY merge_requests_compliance_violations
+ ADD CONSTRAINT merge_requests_compliance_violations_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY merge_requests
ADD CONSTRAINT merge_requests_pkey PRIMARY KEY (id);
@@ -24117,6 +26003,9 @@ ALTER TABLE ONLY namespace_statistics
ALTER TABLE ONLY namespaces
ADD CONSTRAINT namespaces_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY namespaces_sync_events
+ ADD CONSTRAINT namespaces_sync_events_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY note_diff_files
ADD CONSTRAINT note_diff_files_pkey PRIMARY KEY (id);
@@ -24141,9 +26030,6 @@ ALTER TABLE ONLY oauth_openid_requests
ALTER TABLE ONLY onboarding_progresses
ADD CONSTRAINT onboarding_progresses_pkey PRIMARY KEY (id);
-ALTER TABLE ONLY open_project_tracker_data
- ADD CONSTRAINT open_project_tracker_data_pkey PRIMARY KEY (id);
-
ALTER TABLE ONLY operations_feature_flag_scopes
ADD CONSTRAINT operations_feature_flag_scopes_pkey PRIMARY KEY (id);
@@ -24234,6 +26120,9 @@ ALTER TABLE ONLY packages_helm_file_metadata
ALTER TABLE ONLY packages_maven_metadata
ADD CONSTRAINT packages_maven_metadata_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY packages_npm_metadata
+ ADD CONSTRAINT packages_npm_metadata_pkey PRIMARY KEY (package_id);
+
ALTER TABLE ONLY packages_nuget_dependency_link_metadata
ADD CONSTRAINT packages_nuget_dependency_link_metadata_pkey PRIMARY KEY (dependency_link_id);
@@ -24258,6 +26147,9 @@ ALTER TABLE ONLY packages_rubygems_metadata
ALTER TABLE ONLY packages_tags
ADD CONSTRAINT packages_tags_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY pages_deployment_states
+ ADD CONSTRAINT pages_deployment_states_pkey PRIMARY KEY (pages_deployment_id);
+
ALTER TABLE ONLY pages_deployments
ADD CONSTRAINT pages_deployments_pkey PRIMARY KEY (id);
@@ -24267,9 +26159,6 @@ ALTER TABLE ONLY pages_domain_acme_orders
ALTER TABLE ONLY pages_domains
ADD CONSTRAINT pages_domains_pkey PRIMARY KEY (id);
-ALTER TABLE ONLY partitioned_foreign_keys
- ADD CONSTRAINT partitioned_foreign_keys_pkey PRIMARY KEY (id);
-
ALTER TABLE ONLY path_locks
ADD CONSTRAINT path_locks_pkey PRIMARY KEY (id);
@@ -24291,6 +26180,9 @@ ALTER TABLE ONLY postgres_async_indexes
ALTER TABLE ONLY postgres_reindex_actions
ADD CONSTRAINT postgres_reindex_actions_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY postgres_reindex_queued_actions
+ ADD CONSTRAINT postgres_reindex_queued_actions_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY programming_languages
ADD CONSTRAINT programming_languages_pkey PRIMARY KEY (id);
@@ -24309,6 +26201,9 @@ ALTER TABLE ONLY project_authorizations
ALTER TABLE ONLY project_auto_devops
ADD CONSTRAINT project_auto_devops_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY project_build_artifacts_size_refreshes
+ ADD CONSTRAINT project_build_artifacts_size_refreshes_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY project_ci_cd_settings
ADD CONSTRAINT project_ci_cd_settings_pkey PRIMARY KEY (id);
@@ -24384,6 +26279,9 @@ ALTER TABLE ONLY project_tracing_settings
ALTER TABLE ONLY projects
ADD CONSTRAINT projects_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY projects_sync_events
+ ADD CONSTRAINT projects_sync_events_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY prometheus_alert_events
ADD CONSTRAINT prometheus_alert_events_pkey PRIMARY KEY (id);
@@ -24405,6 +26303,9 @@ ALTER TABLE ONLY protected_branch_unprotect_access_levels
ALTER TABLE ONLY protected_branches
ADD CONSTRAINT protected_branches_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY protected_environment_approval_rules
+ ADD CONSTRAINT protected_environment_approval_rules_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY protected_environment_deploy_access_levels
ADD CONSTRAINT protected_environment_deploy_access_levels_pkey PRIMARY KEY (id);
@@ -24429,9 +26330,15 @@ ALTER TABLE ONLY raw_usage_data
ALTER TABLE ONLY redirect_routes
ADD CONSTRAINT redirect_routes_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY related_epic_links
+ ADD CONSTRAINT related_epic_links_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY release_links
ADD CONSTRAINT release_links_pkey PRIMARY KEY (id);
+ALTER TABLE releases
+ ADD CONSTRAINT releases_not_null_tag CHECK ((tag IS NOT NULL)) NOT VALID;
+
ALTER TABLE ONLY releases
ADD CONSTRAINT releases_pkey PRIMARY KEY (id);
@@ -24477,6 +26384,9 @@ ALTER TABLE ONLY saml_group_links
ALTER TABLE ONLY saml_providers
ADD CONSTRAINT saml_providers_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY saved_replies
+ ADD CONSTRAINT saved_replies_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY scim_identities
ADD CONSTRAINT scim_identities_pkey PRIMARY KEY (id);
@@ -24495,6 +26405,12 @@ ALTER TABLE ONLY security_orchestration_policy_rule_schedules
ALTER TABLE ONLY security_scans
ADD CONSTRAINT security_scans_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY security_training_providers
+ ADD CONSTRAINT security_training_providers_pkey PRIMARY KEY (id);
+
+ALTER TABLE ONLY security_trainings
+ ADD CONSTRAINT security_trainings_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY self_managed_prometheus_alert_events
ADD CONSTRAINT self_managed_prometheus_alert_events_pkey PRIMARY KEY (id);
@@ -24504,6 +26420,9 @@ ALTER TABLE ONLY sent_notifications
ALTER TABLE ONLY sentry_issues
ADD CONSTRAINT sentry_issues_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY sprints
+ ADD CONSTRAINT sequence_is_unique_per_iterations_cadence_id UNIQUE (iterations_cadence_id, sequence) DEFERRABLE INITIALLY DEFERRED;
+
ALTER TABLE ONLY serverless_domain_cluster
ADD CONSTRAINT serverless_domain_cluster_pkey PRIMARY KEY (uuid);
@@ -24600,6 +26519,9 @@ ALTER TABLE ONLY u2f_registrations
ALTER TABLE ONLY upcoming_reconciliations
ADD CONSTRAINT upcoming_reconciliations_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY upload_states
+ ADD CONSTRAINT upload_states_pkey PRIMARY KEY (upload_id);
+
ALTER TABLE ONLY uploads
ADD CONSTRAINT uploads_pkey PRIMARY KEY (id);
@@ -24672,24 +26594,6 @@ ALTER TABLE ONLY vulnerability_external_issue_links
ALTER TABLE ONLY vulnerability_feedback
ADD CONSTRAINT vulnerability_feedback_pkey PRIMARY KEY (id);
-ALTER TABLE ONLY vulnerability_finding_evidence_assets
- ADD CONSTRAINT vulnerability_finding_evidence_assets_pkey PRIMARY KEY (id);
-
-ALTER TABLE ONLY vulnerability_finding_evidence_headers
- ADD CONSTRAINT vulnerability_finding_evidence_headers_pkey PRIMARY KEY (id);
-
-ALTER TABLE ONLY vulnerability_finding_evidence_requests
- ADD CONSTRAINT vulnerability_finding_evidence_requests_pkey PRIMARY KEY (id);
-
-ALTER TABLE ONLY vulnerability_finding_evidence_responses
- ADD CONSTRAINT vulnerability_finding_evidence_responses_pkey PRIMARY KEY (id);
-
-ALTER TABLE ONLY vulnerability_finding_evidence_sources
- ADD CONSTRAINT vulnerability_finding_evidence_sources_pkey PRIMARY KEY (id);
-
-ALTER TABLE ONLY vulnerability_finding_evidence_supporting_messages
- ADD CONSTRAINT vulnerability_finding_evidence_supporting_messages_pkey PRIMARY KEY (id);
-
ALTER TABLE ONLY vulnerability_finding_evidences
ADD CONSTRAINT vulnerability_finding_evidences_pkey PRIMARY KEY (id);
@@ -24723,6 +26627,9 @@ ALTER TABLE ONLY vulnerability_occurrence_pipelines
ALTER TABLE ONLY vulnerability_occurrences
ADD CONSTRAINT vulnerability_occurrences_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY vulnerability_reads
+ ADD CONSTRAINT vulnerability_reads_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY vulnerability_remediations
ADD CONSTRAINT vulnerability_remediations_pkey PRIMARY KEY (id);
@@ -24805,18 +26712,44 @@ CREATE INDEX audit_events_202307_created_at_author_id_idx ON gitlab_partitions_d
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 index_incident_management_pending_alert_escalations_on_rule_id ON ONLY incident_management_pending_alert_escalations USING btree (rule_id);
+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 incident_management_pending_alert_escalations_20221_rule_id_idx ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202211 USING btree (rule_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 index_incident_management_pending_alert_escalations_on_alert_id ON ONLY incident_management_pending_alert_escalations USING btree (alert_id);
+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 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_202303 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_202304 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_202305 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_202306 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_202307 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_202308 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_202309 USING btree (batched_background_migration_job_id);
+
+CREATE INDEX incident_management_pending_alert_escalations_20221_rule_id_idx ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202211 USING btree (rule_id);
CREATE INDEX incident_management_pending_alert_escalations_2022_alert_id_idx ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202211 USING btree (alert_id);
CREATE INDEX incident_management_pending_alert_escalations_2022_rule_id_idx1 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202212 USING btree (rule_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_20230_rule_id_idx ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202301 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_2023_alert_id_idx ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202301 USING btree (alert_id);
CREATE INDEX incident_management_pending_alert_escalations_2023_rule_id_idx1 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202302 USING btree (rule_id);
@@ -24831,6 +26764,10 @@ CREATE INDEX incident_management_pending_alert_escalations_2023_rule_id_idx5 ON
CREATE INDEX incident_management_pending_alert_escalations_2023_rule_id_idx6 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202307 USING btree (rule_id);
+CREATE INDEX incident_management_pending_alert_escalations_2023_rule_id_idx7 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202308 USING btree (rule_id);
+
+CREATE INDEX incident_management_pending_alert_escalations_2023_rule_id_idx8 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202309 USING btree (rule_id);
+
CREATE INDEX incident_management_pending_alert_escalations_202_alert_id_idx1 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202212 USING btree (alert_id);
CREATE INDEX incident_management_pending_alert_escalations_202_alert_id_idx2 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202302 USING btree (alert_id);
@@ -24845,38 +26782,22 @@ CREATE INDEX incident_management_pending_alert_escalations_202_alert_id_idx6 ON
CREATE INDEX incident_management_pending_alert_escalations_202_alert_id_idx7 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202307 USING btree (alert_id);
-CREATE INDEX index_incident_management_pending_alert_escalations_on_schedule ON ONLY incident_management_pending_alert_escalations USING btree (schedule_id);
-
-CREATE INDEX incident_management_pending_alert_escalations_2_schedule_id_idx ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202211 USING btree (schedule_id);
+CREATE INDEX incident_management_pending_alert_escalations_202_alert_id_idx8 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202308 USING btree (alert_id);
-CREATE INDEX incident_management_pending_alert_escalations__schedule_id_idx1 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202212 USING btree (schedule_id);
-
-CREATE INDEX incident_management_pending_alert_escalations__schedule_id_idx2 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202301 USING btree (schedule_id);
-
-CREATE INDEX incident_management_pending_alert_escalations__schedule_id_idx3 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202302 USING btree (schedule_id);
-
-CREATE INDEX incident_management_pending_alert_escalations__schedule_id_idx4 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202303 USING btree (schedule_id);
-
-CREATE INDEX incident_management_pending_alert_escalations__schedule_id_idx5 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202304 USING btree (schedule_id);
-
-CREATE INDEX incident_management_pending_alert_escalations__schedule_id_idx6 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202305 USING btree (schedule_id);
-
-CREATE INDEX incident_management_pending_alert_escalations__schedule_id_idx7 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202306 USING btree (schedule_id);
-
-CREATE INDEX incident_management_pending_alert_escalations__schedule_id_idx8 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202307 USING btree (schedule_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_alert_escalations_202_alert_id_idx9 ON gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202309 USING btree (alert_id);
CREATE INDEX incident_management_pending_issue_escalations_20221_rule_id_idx ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202211 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_2022_issue_id_idx ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202211 USING btree (issue_id);
CREATE INDEX incident_management_pending_issue_escalations_2022_rule_id_idx1 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202212 USING btree (rule_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_20230_rule_id_idx ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202301 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_2023_issue_id_idx ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202301 USING btree (issue_id);
CREATE INDEX incident_management_pending_issue_escalations_2023_rule_id_idx1 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202302 USING btree (rule_id);
@@ -24891,6 +26812,10 @@ CREATE INDEX incident_management_pending_issue_escalations_2023_rule_id_idx5 ON
CREATE INDEX incident_management_pending_issue_escalations_2023_rule_id_idx6 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202307 USING btree (rule_id);
+CREATE INDEX incident_management_pending_issue_escalations_2023_rule_id_idx7 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202308 USING btree (rule_id);
+
+CREATE INDEX incident_management_pending_issue_escalations_2023_rule_id_idx8 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202309 USING btree (rule_id);
+
CREATE INDEX incident_management_pending_issue_escalations_202_issue_id_idx1 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202212 USING btree (issue_id);
CREATE INDEX incident_management_pending_issue_escalations_202_issue_id_idx2 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202302 USING btree (issue_id);
@@ -24905,6 +26830,14 @@ CREATE INDEX incident_management_pending_issue_escalations_202_issue_id_idx6 ON
CREATE INDEX incident_management_pending_issue_escalations_202_issue_id_idx7 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202307 USING btree (issue_id);
+CREATE INDEX incident_management_pending_issue_escalations_202_issue_id_idx8 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202308 USING btree (issue_id);
+
+CREATE INDEX incident_management_pending_issue_escalations_202_issue_id_idx9 ON gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202309 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_web_hook_id ON ONLY web_hook_logs USING btree (web_hook_id);
CREATE INDEX index_1554dc6f11 ON gitlab_partitions_dynamic.web_hook_logs_202301 USING btree (web_hook_id);
@@ -24921,6 +26854,28 @@ CREATE INDEX index_eecfac613f ON gitlab_partitions_dynamic.web_hook_logs_000000
CREATE INDEX index_fdb8d5eeea ON gitlab_partitions_dynamic.web_hook_logs_202301 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_202302_visitor_id_code_phone_created_at_idx ON gitlab_partitions_dynamic.verification_codes_202302 USING btree (visitor_id_code, phone, created_at);
+
+CREATE UNIQUE INDEX verification_codes_202303_visitor_id_code_phone_created_at_idx ON gitlab_partitions_dynamic.verification_codes_202303 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 INDEX web_hook_logs_202302_created_at_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202302 USING btree (created_at, web_hook_id);
CREATE INDEX web_hook_logs_202302_web_hook_id_idx ON gitlab_partitions_dynamic.web_hook_logs_202302 USING btree (web_hook_id);
@@ -24945,6 +26900,802 @@ CREATE INDEX web_hook_logs_202307_created_at_web_hook_id_idx ON gitlab_partition
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 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);
+
+CREATE INDEX index_merge_request_stage_events_project_duration ON ONLY analytics_cycle_analytics_merge_request_stage_events USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_006f943df6 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_16 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_02749b504c ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_11 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_merge_request_stage_events_group_duration ON ONLY analytics_cycle_analytics_merge_request_stage_events USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_0287f5ba09 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_29 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_03aa30a758 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_23 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_issue_stage_events_group_duration ON ONLY analytics_cycle_analytics_issue_stage_events USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_055179c3ea ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_10 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_061fe00461 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_19 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_070cef72c3 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_02 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_08e3cfc564 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_30 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_merge_request_stage_events_group_in_progress_duration ON ONLY analytics_cycle_analytics_merge_request_stage_events USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_09af45dd6f ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_13 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_0c153e2eae ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_13 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_issue_stage_events_group_in_progress_duration ON ONLY analytics_cycle_analytics_issue_stage_events USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_0ca85f3d71 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_30 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_issue_stage_events_project_in_progress_duration ON ONLY analytics_cycle_analytics_issue_stage_events USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_0d837a5dda ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_03 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_0f28a65451 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_09 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_10588dbff0 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_13 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_107e123e17 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_25 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_1230a7a402 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_25 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_142c4e7ea4 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_08 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_merge_request_stage_events_project_in_progress_duration ON ONLY analytics_cycle_analytics_merge_request_stage_events USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_14e4fa1d7d ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_28 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_14f3645821 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_28 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_16627b455e ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_27 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_1a0388713a ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_22 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_1a349ed064 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_24 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_1af932a3c7 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_27 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_1b0ea30bdb ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_21 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_1f6c3faabe ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_00 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_1f8af04ed1 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_19 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_201c5ddbe9 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_00 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_20353089e0 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_20 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_206349925b ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_01 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_21db459e34 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_19 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_21e262390a ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_16 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_2208bd7d7f ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_28 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_223592b4a1 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_07 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_22acc9ab11 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_27 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_22ed8f01dd ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_10 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_234d38a657 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_02 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_23783dc748 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_01 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_241e9a574c ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_08 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_24ac321751 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_02 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_25e2aaee9b ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_12 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_2653e7eeb8 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_06 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_2745f5a388 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_31 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_27759556bc ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_01 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_27d7ad78d8 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_31 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_281840d2d1 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_06 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_296f64df5c ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_01 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_2ad4b4fdbc ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_05 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_2b7c0a294e ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_05 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_2c6422f668 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_30 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_2dfcdbe81e ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_14 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_2e1054b181 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_24 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_2e6991d05b ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_28 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_2f80c360c3 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_10 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_2fc271c673 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_12 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_2fcfd0dc70 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_16 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_3005c75335 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_23 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_3206c1e6af ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_29 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_3249505125 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_18 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_331eb67441 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_30 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_3640194b77 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_29 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_372160a706 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_28 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_38a538234e ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_09 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_39625b8a41 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_05 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_399dc06649 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_30 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_3a10b315c0 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_28 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_3c2a3a6ac9 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_06 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_3e6be332b7 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_27 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_41a1c3a4c6 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_29 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_435802dd01 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_01 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_436fa9ad5f ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_13 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_453a659cb6 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_16 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_46b989b294 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_02 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_47638677a3 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_04 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_4810ac88f5 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_24 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_491b4b749e ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_20 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_4a243772d7 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_15 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_4b1793a4c4 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_07 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_4b22560035 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_22 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_4c2645eef2 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_21 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_4c9d14f978 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_12 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_4d04210a95 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_21 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_4d4f2f7de6 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_31 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_4db5aa5872 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_10 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_4dead6f314 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_17 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_4e6ce1c371 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_30 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_4f2eb7a06b ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_08 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_4f6fc34e57 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_31 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_50c09f6e04 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_06 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_5111e3e7e7 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_18 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_52ea79bf8e ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_14 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_541cc045fc ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_26 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_551676e972 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_01 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_56281bfb73 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_21 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_5660b1b38e ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_24 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_59a8209ab6 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_07 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_59ce40fcc4 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_24 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_5a5f39d824 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_19 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_5b613b5fcf ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_25 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_5b944f308d ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_11 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_5bc2f32084 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_13 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_5c4053b63d ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_19 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_5db09170d4 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_16 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_5ee060202f ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_20 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_5f24f6ead2 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_05 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_5f96b344e2 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_14 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_5fb1867c41 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_17 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_5fe1d00845 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_05 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_60e3480f23 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_22 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_6137e27484 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_10 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_620fe77c99 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_22 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_625ed9e965 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_27 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_64e3a1dfa1 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_04 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_64eb4cf8bd ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_12 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_6580ecb2db ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_18 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_682eba05f6 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_04 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_69bdcf213e ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_09 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_6a39f6d5ac ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_24 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_6add8e74cf ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_11 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_6b1ce61c8f ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_02 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_6cfb391b86 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_21 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_6e6c2e6a1d ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_04 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_6ea423bbd1 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_30 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_6ec4c4afd4 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_04 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_6f4e0abe54 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_26 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_6fa47e1334 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_23 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_70c657954b ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_18 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_71c2b26944 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_08 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_72027c157f ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_27 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_739845f617 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_31 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_74addd1240 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_12 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_75dc81d1d7 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_14 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_765b0cd8db ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_16 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_77096a1dc6 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_07 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_77c6293242 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_10 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_7b7c85eceb ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_05 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_7da2307d2e ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_07 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_7ead2300ca ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_15 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_7ecb5b68b4 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_07 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_807671c4be ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_13 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_807fa83fc0 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_31 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_80c65daf20 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_10 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_81b9cf594f ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_15 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_82c675952c ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_14 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_83c5049b3e ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_31 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_83edf231b8 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_21 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_844abd2888 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_24 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_8464227c80 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_26 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_8685d7c69c ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_25 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_8688b40056 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_29 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_87d40fb9f9 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_03 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_88b40d6740 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_23 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_89c79afe5c ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_28 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_8a0fc3de4f ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_29 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_8b9f9a19a4 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_18 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_8fb48e72ce ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_26 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_9201b952a0 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_13 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_92c09e352b ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_02 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_9490e0e0b7 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_12 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_95a353f50b ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_27 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_971af9481e ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_10 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_9955b1dc59 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_03 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_9b8e89ae41 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_08 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_9ee83b068b ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_25 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_a1a9dc36c1 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_11 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_a2d9f185a5 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_19 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_a3feed3097 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_21 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_a6999c65c9 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_09 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_a6c68d16b2 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_14 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_a8276a450f ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_05 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_a88f20fc98 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_11 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_a9424aa392 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_01 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_a99cee1904 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_23 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_a9deff2159 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_26 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_aabc184267 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_25 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_ab22231a16 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_09 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_abbdf80ab1 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_26 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_adc159c3fe ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_17 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_aed7f7b10c ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_02 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_aee84adb5b ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_15 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_b1dda405af ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_29 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_b607012614 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_17 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_b7f21460bb ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_23 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_b83fe1306b ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_03 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_bc189e47ab ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_11 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_bca83177ef ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_20 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_bedd7e160b ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_17 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_bee2b94a80 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_17 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_c08e669dfa ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_11 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_c09bb66559 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_09 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_c119f5b92e ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_19 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_c17dae3605 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_00 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_c1cdd90d0d ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_15 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_c2b951bf20 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_20 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_c42b2e7eae ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_05 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_c435d904ce ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_08 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_c473921734 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_30 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_c546bb0736 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_00 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_c59cde6209 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_14 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_c66758baa7 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_00 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_c6ea8a0e26 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_04 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_c8c4219c0a ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_26 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_c971e6c5ce ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_19 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_c9b14a3d9f ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_08 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_cbb61ea269 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_12 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_cc0ba6343b ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_09 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_cd2b2939a4 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_03 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_cda41e106e ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_22 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_cfa4237c83 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_24 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_d01ea0126a ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_25 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_d0d285c264 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_22 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_d27b4c84e7 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_18 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_d2fe918e83 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_08 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_d35c969634 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_09 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_d6047ee813 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_06 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_d69c2485f4 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_29 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_d8fa9793ad ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_00 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_d9384b768d ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_15 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_dc571ba649 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_01 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_df62a8c50e ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_07 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_e1a4f994d8 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_06 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_e3d1fd5b19 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_04 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_e3d6234929 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_03 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_e54adf9acb ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_06 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_e6405afea0 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_12 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_e64588e276 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_00 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_e716b8ac3f ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_22 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_e73bc5ba6a ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_20 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_e8f3a327b2 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_18 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_ea0c2d3361 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_17 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_eb558957f0 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_31 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_ec25d494e6 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_25 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_ed094a4f13 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_20 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_ee4c549a2d ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_20 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_ef6a48bd29 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_06 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_ef7be2ae94 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_22 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_f0cdd09a5e ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_13 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_f112fae8ac ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_23 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_f1c3d14cdc ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_18 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_f256d3f6a1 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_16 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_f2848acfc7 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_02 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_f3d7d86e09 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_17 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_f47327ec1f ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_27 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_f6b0d458a3 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_15 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_f705dc8541 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_21 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_f76e8a5304 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_14 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_f86acdc2ff ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_23 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_f878aab8e3 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_15 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_f902c261ce ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_16 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_fbccc855cf ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_26 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_fbf2d3310b ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_00 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_fccbe45c32 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_03 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_fee429223e ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_07 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+
+CREATE INDEX index_ff00c038cc ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_03 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_ff39be5400 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_04 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_ff8741d8d7 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_28 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+
+CREATE INDEX index_issue_search_data_on_issue_id ON ONLY issue_search_data USING btree (issue_id);
+
+CREATE INDEX issue_search_data_00_issue_id_idx ON gitlab_partitions_static.issue_search_data_00 USING btree (issue_id);
+
+CREATE INDEX index_issue_search_data_on_search_vector ON ONLY issue_search_data USING gin (search_vector);
+
+CREATE INDEX issue_search_data_00_search_vector_idx ON gitlab_partitions_static.issue_search_data_00 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_01_issue_id_idx ON gitlab_partitions_static.issue_search_data_01 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_01_search_vector_idx ON gitlab_partitions_static.issue_search_data_01 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_02_issue_id_idx ON gitlab_partitions_static.issue_search_data_02 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_02_search_vector_idx ON gitlab_partitions_static.issue_search_data_02 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_03_issue_id_idx ON gitlab_partitions_static.issue_search_data_03 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_03_search_vector_idx ON gitlab_partitions_static.issue_search_data_03 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_04_issue_id_idx ON gitlab_partitions_static.issue_search_data_04 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_04_search_vector_idx ON gitlab_partitions_static.issue_search_data_04 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_05_issue_id_idx ON gitlab_partitions_static.issue_search_data_05 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_05_search_vector_idx ON gitlab_partitions_static.issue_search_data_05 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_06_issue_id_idx ON gitlab_partitions_static.issue_search_data_06 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_06_search_vector_idx ON gitlab_partitions_static.issue_search_data_06 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_07_issue_id_idx ON gitlab_partitions_static.issue_search_data_07 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_07_search_vector_idx ON gitlab_partitions_static.issue_search_data_07 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_08_issue_id_idx ON gitlab_partitions_static.issue_search_data_08 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_08_search_vector_idx ON gitlab_partitions_static.issue_search_data_08 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_09_issue_id_idx ON gitlab_partitions_static.issue_search_data_09 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_09_search_vector_idx ON gitlab_partitions_static.issue_search_data_09 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_10_issue_id_idx ON gitlab_partitions_static.issue_search_data_10 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_10_search_vector_idx ON gitlab_partitions_static.issue_search_data_10 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_11_issue_id_idx ON gitlab_partitions_static.issue_search_data_11 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_11_search_vector_idx ON gitlab_partitions_static.issue_search_data_11 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_12_issue_id_idx ON gitlab_partitions_static.issue_search_data_12 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_12_search_vector_idx ON gitlab_partitions_static.issue_search_data_12 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_13_issue_id_idx ON gitlab_partitions_static.issue_search_data_13 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_13_search_vector_idx ON gitlab_partitions_static.issue_search_data_13 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_14_issue_id_idx ON gitlab_partitions_static.issue_search_data_14 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_14_search_vector_idx ON gitlab_partitions_static.issue_search_data_14 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_15_issue_id_idx ON gitlab_partitions_static.issue_search_data_15 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_15_search_vector_idx ON gitlab_partitions_static.issue_search_data_15 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_16_issue_id_idx ON gitlab_partitions_static.issue_search_data_16 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_16_search_vector_idx ON gitlab_partitions_static.issue_search_data_16 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_17_issue_id_idx ON gitlab_partitions_static.issue_search_data_17 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_17_search_vector_idx ON gitlab_partitions_static.issue_search_data_17 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_18_issue_id_idx ON gitlab_partitions_static.issue_search_data_18 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_18_search_vector_idx ON gitlab_partitions_static.issue_search_data_18 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_19_issue_id_idx ON gitlab_partitions_static.issue_search_data_19 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_19_search_vector_idx ON gitlab_partitions_static.issue_search_data_19 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_20_issue_id_idx ON gitlab_partitions_static.issue_search_data_20 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_20_search_vector_idx ON gitlab_partitions_static.issue_search_data_20 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_21_issue_id_idx ON gitlab_partitions_static.issue_search_data_21 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_21_search_vector_idx ON gitlab_partitions_static.issue_search_data_21 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_22_issue_id_idx ON gitlab_partitions_static.issue_search_data_22 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_22_search_vector_idx ON gitlab_partitions_static.issue_search_data_22 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_23_issue_id_idx ON gitlab_partitions_static.issue_search_data_23 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_23_search_vector_idx ON gitlab_partitions_static.issue_search_data_23 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_24_issue_id_idx ON gitlab_partitions_static.issue_search_data_24 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_24_search_vector_idx ON gitlab_partitions_static.issue_search_data_24 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_25_issue_id_idx ON gitlab_partitions_static.issue_search_data_25 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_25_search_vector_idx ON gitlab_partitions_static.issue_search_data_25 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_26_issue_id_idx ON gitlab_partitions_static.issue_search_data_26 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_26_search_vector_idx ON gitlab_partitions_static.issue_search_data_26 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_27_issue_id_idx ON gitlab_partitions_static.issue_search_data_27 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_27_search_vector_idx ON gitlab_partitions_static.issue_search_data_27 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_28_issue_id_idx ON gitlab_partitions_static.issue_search_data_28 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_28_search_vector_idx ON gitlab_partitions_static.issue_search_data_28 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_29_issue_id_idx ON gitlab_partitions_static.issue_search_data_29 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_29_search_vector_idx ON gitlab_partitions_static.issue_search_data_29 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_30_issue_id_idx ON gitlab_partitions_static.issue_search_data_30 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_30_search_vector_idx ON gitlab_partitions_static.issue_search_data_30 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_31_issue_id_idx ON gitlab_partitions_static.issue_search_data_31 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_31_search_vector_idx ON gitlab_partitions_static.issue_search_data_31 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_32_issue_id_idx ON gitlab_partitions_static.issue_search_data_32 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_32_search_vector_idx ON gitlab_partitions_static.issue_search_data_32 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_33_issue_id_idx ON gitlab_partitions_static.issue_search_data_33 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_33_search_vector_idx ON gitlab_partitions_static.issue_search_data_33 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_34_issue_id_idx ON gitlab_partitions_static.issue_search_data_34 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_34_search_vector_idx ON gitlab_partitions_static.issue_search_data_34 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_35_issue_id_idx ON gitlab_partitions_static.issue_search_data_35 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_35_search_vector_idx ON gitlab_partitions_static.issue_search_data_35 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_36_issue_id_idx ON gitlab_partitions_static.issue_search_data_36 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_36_search_vector_idx ON gitlab_partitions_static.issue_search_data_36 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_37_issue_id_idx ON gitlab_partitions_static.issue_search_data_37 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_37_search_vector_idx ON gitlab_partitions_static.issue_search_data_37 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_38_issue_id_idx ON gitlab_partitions_static.issue_search_data_38 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_38_search_vector_idx ON gitlab_partitions_static.issue_search_data_38 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_39_issue_id_idx ON gitlab_partitions_static.issue_search_data_39 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_39_search_vector_idx ON gitlab_partitions_static.issue_search_data_39 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_40_issue_id_idx ON gitlab_partitions_static.issue_search_data_40 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_40_search_vector_idx ON gitlab_partitions_static.issue_search_data_40 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_41_issue_id_idx ON gitlab_partitions_static.issue_search_data_41 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_41_search_vector_idx ON gitlab_partitions_static.issue_search_data_41 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_42_issue_id_idx ON gitlab_partitions_static.issue_search_data_42 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_42_search_vector_idx ON gitlab_partitions_static.issue_search_data_42 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_43_issue_id_idx ON gitlab_partitions_static.issue_search_data_43 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_43_search_vector_idx ON gitlab_partitions_static.issue_search_data_43 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_44_issue_id_idx ON gitlab_partitions_static.issue_search_data_44 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_44_search_vector_idx ON gitlab_partitions_static.issue_search_data_44 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_45_issue_id_idx ON gitlab_partitions_static.issue_search_data_45 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_45_search_vector_idx ON gitlab_partitions_static.issue_search_data_45 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_46_issue_id_idx ON gitlab_partitions_static.issue_search_data_46 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_46_search_vector_idx ON gitlab_partitions_static.issue_search_data_46 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_47_issue_id_idx ON gitlab_partitions_static.issue_search_data_47 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_47_search_vector_idx ON gitlab_partitions_static.issue_search_data_47 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_48_issue_id_idx ON gitlab_partitions_static.issue_search_data_48 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_48_search_vector_idx ON gitlab_partitions_static.issue_search_data_48 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_49_issue_id_idx ON gitlab_partitions_static.issue_search_data_49 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_49_search_vector_idx ON gitlab_partitions_static.issue_search_data_49 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_50_issue_id_idx ON gitlab_partitions_static.issue_search_data_50 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_50_search_vector_idx ON gitlab_partitions_static.issue_search_data_50 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_51_issue_id_idx ON gitlab_partitions_static.issue_search_data_51 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_51_search_vector_idx ON gitlab_partitions_static.issue_search_data_51 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_52_issue_id_idx ON gitlab_partitions_static.issue_search_data_52 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_52_search_vector_idx ON gitlab_partitions_static.issue_search_data_52 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_53_issue_id_idx ON gitlab_partitions_static.issue_search_data_53 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_53_search_vector_idx ON gitlab_partitions_static.issue_search_data_53 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_54_issue_id_idx ON gitlab_partitions_static.issue_search_data_54 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_54_search_vector_idx ON gitlab_partitions_static.issue_search_data_54 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_55_issue_id_idx ON gitlab_partitions_static.issue_search_data_55 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_55_search_vector_idx ON gitlab_partitions_static.issue_search_data_55 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_56_issue_id_idx ON gitlab_partitions_static.issue_search_data_56 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_56_search_vector_idx ON gitlab_partitions_static.issue_search_data_56 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_57_issue_id_idx ON gitlab_partitions_static.issue_search_data_57 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_57_search_vector_idx ON gitlab_partitions_static.issue_search_data_57 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_58_issue_id_idx ON gitlab_partitions_static.issue_search_data_58 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_58_search_vector_idx ON gitlab_partitions_static.issue_search_data_58 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_59_issue_id_idx ON gitlab_partitions_static.issue_search_data_59 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_59_search_vector_idx ON gitlab_partitions_static.issue_search_data_59 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_60_issue_id_idx ON gitlab_partitions_static.issue_search_data_60 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_60_search_vector_idx ON gitlab_partitions_static.issue_search_data_60 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_61_issue_id_idx ON gitlab_partitions_static.issue_search_data_61 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_61_search_vector_idx ON gitlab_partitions_static.issue_search_data_61 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_62_issue_id_idx ON gitlab_partitions_static.issue_search_data_62 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_62_search_vector_idx ON gitlab_partitions_static.issue_search_data_62 USING gin (search_vector);
+
+CREATE INDEX issue_search_data_63_issue_id_idx ON gitlab_partitions_static.issue_search_data_63 USING btree (issue_id);
+
+CREATE INDEX issue_search_data_63_search_vector_idx ON gitlab_partitions_static.issue_search_data_63 USING gin (search_vector);
+
CREATE INDEX index_product_analytics_events_experimental_project_and_time ON ONLY product_analytics_events_experimental USING btree (project_id, collector_tstamp);
CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx10 ON gitlab_partitions_static.product_analytics_events_experimental_10 USING btree (project_id, collector_tstamp);
@@ -25089,10 +27840,18 @@ CREATE INDEX approval_mr_rule_index_merge_request_id ON approval_merge_request_r
CREATE UNIQUE INDEX bulk_import_trackers_uniq_relation_by_entity ON bulk_import_trackers USING btree (bulk_import_entity_id, relation);
+CREATE INDEX ca_aggregations_last_consistency_check_updated_at ON analytics_cycle_analytics_aggregations USING btree (last_consistency_check_updated_at NULLS FIRST) WHERE (enabled IS TRUE);
+
+CREATE INDEX ca_aggregations_last_full_run_at ON analytics_cycle_analytics_aggregations USING btree (last_full_run_at NULLS FIRST) WHERE (enabled IS TRUE);
+
+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_job_artifacts_expire_at_unlocked_idx ON ci_job_artifacts USING btree (expire_at) WHERE (locked = 0);
+
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);
@@ -25111,25 +27870,11 @@ CREATE UNIQUE INDEX epic_user_mentions_on_epic_id_and_note_id_index ON epic_user
CREATE UNIQUE INDEX epic_user_mentions_on_epic_id_index ON epic_user_mentions USING btree (epic_id) WHERE (note_id IS NULL);
-CREATE INDEX finding_evidence_assets_on_finding_evidence_id ON vulnerability_finding_evidence_assets USING btree (vulnerability_finding_evidence_id);
-
-CREATE INDEX finding_evidence_header_on_finding_evidence_request_id ON vulnerability_finding_evidence_headers USING btree (vulnerability_finding_evidence_request_id);
-
-CREATE INDEX finding_evidence_header_on_finding_evidence_response_id ON vulnerability_finding_evidence_headers USING btree (vulnerability_finding_evidence_response_id);
-
-CREATE INDEX finding_evidence_requests_on_finding_evidence_id ON vulnerability_finding_evidence_requests USING btree (vulnerability_finding_evidence_id);
-
-CREATE INDEX finding_evidence_requests_on_supporting_evidence_id ON vulnerability_finding_evidence_requests USING btree (vulnerability_finding_evidence_supporting_message_id);
-
-CREATE INDEX finding_evidence_responses_on_finding_evidences_id ON vulnerability_finding_evidence_responses USING btree (vulnerability_finding_evidence_id);
+CREATE UNIQUE INDEX finding_evidences_on_unique_vulnerability_occurrence_id ON vulnerability_finding_evidences USING btree (vulnerability_occurrence_id);
-CREATE INDEX finding_evidence_responses_on_supporting_evidence_id ON vulnerability_finding_evidence_responses USING btree (vulnerability_finding_evidence_supporting_message_id);
+CREATE UNIQUE INDEX finding_link_name_url_idx ON vulnerability_finding_links USING btree (vulnerability_occurrence_id, name, url);
-CREATE INDEX finding_evidence_sources_on_finding_evidence_id ON vulnerability_finding_evidence_sources USING btree (vulnerability_finding_evidence_id);
-
-CREATE INDEX finding_evidence_supporting_messages_on_finding_evidence_id ON vulnerability_finding_evidence_supporting_messages USING btree (vulnerability_finding_evidence_id);
-
-CREATE INDEX finding_evidences_on_vulnerability_occurrence_id ON vulnerability_finding_evidences USING btree (vulnerability_occurrence_id);
+CREATE UNIQUE INDEX finding_link_url_idx ON vulnerability_finding_links USING btree (vulnerability_occurrence_id, url) WHERE (name IS NULL);
CREATE INDEX finding_links_on_vulnerability_occurrence_id ON vulnerability_finding_links USING btree (vulnerability_occurrence_id);
@@ -25141,6 +27886,8 @@ CREATE INDEX idx_analytics_devops_adoption_snapshots_finalized ON analytics_devo
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);
+
CREATE INDEX idx_ci_pipelines_artifacts_locked ON ci_pipelines USING btree (ci_ref_id, id) WHERE (locked = 1);
CREATE INDEX idx_container_exp_policies_on_project_id_next_run_at ON container_expiration_policies USING btree (project_id, next_run_at) WHERE (enabled = true);
@@ -25149,6 +27896,12 @@ CREATE INDEX idx_container_exp_policies_on_project_id_next_run_at_enabled ON con
CREATE INDEX idx_container_repos_on_exp_cleanup_status_project_id_start_date ON container_repositories USING btree (expiration_policy_cleanup_status, project_id, expiration_policy_started_at);
+CREATE INDEX idx_container_repos_on_import_started_at_when_importing ON container_repositories USING btree (migration_import_started_at) WHERE (migration_state = 'importing'::text);
+
+CREATE INDEX idx_container_repos_on_pre_import_done_at_when_pre_import_done ON container_repositories USING btree (migration_pre_import_done_at) WHERE (migration_state = 'pre_import_done'::text);
+
+CREATE INDEX idx_container_repos_on_pre_import_started_at_when_pre_importing ON container_repositories USING btree (migration_pre_import_started_at) WHERE (migration_state = 'pre_importing'::text);
+
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);
@@ -25165,6 +27918,8 @@ CREATE UNIQUE INDEX idx_environment_merge_requests_unique_index ON deployment_me
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_helm_pkgs_on_project_id_id ON packages_packages USING btree (project_id, id);
+
CREATE INDEX idx_installable_npm_pkgs_on_project_id_name_version_id ON packages_packages USING btree (project_id, name, version, id) WHERE ((package_type = 2) AND (status = 0));
CREATE INDEX idx_issues_on_health_status_not_null ON issues USING btree (health_status) WHERE (health_status IS NOT NULL);
@@ -25173,9 +27928,7 @@ CREATE INDEX idx_issues_on_project_id_and_created_at_and_id_and_state_id ON issu
CREATE INDEX idx_issues_on_project_id_and_due_date_and_id_and_state_id ON issues USING btree (project_id, due_date, id, state_id) WHERE (due_date IS NOT NULL);
-CREATE INDEX idx_issues_on_project_id_and_rel_asc_and_id ON issues USING btree (project_id, relative_position, id);
-
-CREATE INDEX idx_issues_on_project_id_and_rel_position_and_state_id_and_id ON issues USING btree (project_id, relative_position, state_id, id DESC);
+CREATE INDEX idx_issues_on_project_id_and_rel_position_and_id_and_state_id ON issues USING btree (project_id, relative_position, id, state_id);
CREATE INDEX idx_issues_on_project_id_and_updated_at_and_id_and_state_id ON issues USING btree (project_id, updated_at, id, state_id);
@@ -25217,12 +27970,16 @@ 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_packages_build_infos_on_package_id ON packages_build_infos USING btree (package_id);
-
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);
+CREATE UNIQUE INDEX idx_packages_on_project_id_name_version_unique_when_generic ON packages_packages USING btree (project_id, name, version) WHERE ((package_type = 7) AND (status <> 4));
+
+CREATE UNIQUE INDEX idx_packages_on_project_id_name_version_unique_when_golang ON packages_packages USING btree (project_id, name, version) WHERE ((package_type = 8) AND (status <> 4));
+
+CREATE UNIQUE INDEX idx_packages_on_project_id_name_version_unique_when_helm ON packages_packages USING btree (project_id, name, version) WHERE ((package_type = 11) AND (status <> 4));
+
CREATE INDEX idx_packages_packages_on_project_id_name_version_package_type ON packages_packages USING btree (project_id, name, version, package_type);
CREATE INDEX idx_pkgs_debian_group_distribution_keys_on_distribution_id ON packages_debian_group_distribution_keys USING btree (distribution_id);
@@ -25239,6 +27996,12 @@ 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_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));
+
+CREATE INDEX idx_projects_api_created_at_id_for_vis10 ON projects USING btree (created_at, id) WHERE ((visibility_level = 10) AND (pending_delete = false) AND (hidden = false));
+
CREATE INDEX idx_projects_id_created_at_disable_overriding_approvers_false ON projects USING btree (id, created_at) WHERE ((disable_overriding_approvers_per_merge_request = false) OR (disable_overriding_approvers_per_merge_request IS NULL));
CREATE INDEX idx_projects_id_created_at_disable_overriding_approvers_true ON projects USING btree (id, created_at) WHERE (disable_overriding_approvers_per_merge_request = true);
@@ -25263,6 +28026,8 @@ 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_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);
@@ -25279,14 +28044,30 @@ CREATE UNIQUE INDEX idx_vulnerability_issue_links_on_vulnerability_id_and_link_t
CREATE INDEX index_abuse_reports_on_user_id ON abuse_reports USING btree (user_id);
+CREATE INDEX index_agent_activity_events_on_agent_id_and_recorded_at_and_id ON agent_activity_events USING btree (agent_id, recorded_at, id);
+
+CREATE INDEX index_agent_activity_events_on_agent_token_id ON agent_activity_events USING btree (agent_token_id) WHERE (agent_token_id IS NOT NULL);
+
+CREATE INDEX index_agent_activity_events_on_merge_request_id ON agent_activity_events USING btree (merge_request_id) WHERE (merge_request_id IS NOT NULL);
+
+CREATE INDEX index_agent_activity_events_on_project_id ON agent_activity_events USING btree (project_id) WHERE (project_id IS NOT NULL);
+
+CREATE INDEX index_agent_activity_events_on_user_id ON agent_activity_events USING btree (user_id) WHERE (user_id IS NOT NULL);
+
CREATE UNIQUE INDEX index_agent_group_authorizations_on_agent_id_and_group_id ON agent_group_authorizations USING btree (agent_id, group_id);
CREATE INDEX index_agent_group_authorizations_on_group_id ON agent_group_authorizations USING btree (group_id);
+CREATE UNIQUE INDEX index_agent_project_authorizations_on_agent_id_and_project_id ON agent_project_authorizations USING btree (agent_id, project_id);
+
+CREATE INDEX index_agent_project_authorizations_on_project_id ON agent_project_authorizations USING btree (project_id);
+
CREATE INDEX index_alert_assignees_on_alert_id ON alert_management_alert_assignees USING btree (alert_id);
CREATE UNIQUE INDEX index_alert_assignees_on_user_id_and_alert_id ON alert_management_alert_assignees USING btree (user_id, alert_id);
+CREATE INDEX index_alert_management_alert_metric_images_on_alert_id ON alert_management_alert_metric_images USING btree (alert_id);
+
CREATE INDEX index_alert_management_alerts_on_domain ON alert_management_alerts USING btree (domain);
CREATE INDEX index_alert_management_alerts_on_environment_id ON alert_management_alerts USING btree (environment_id) WHERE (environment_id IS NOT NULL);
@@ -25375,6 +28156,8 @@ CREATE INDEX index_approval_project_rules_on_rule_type ON approval_project_rules
CREATE INDEX index_approval_project_rules_protected_branches_pb_id ON approval_project_rules_protected_branches USING btree (protected_branch_id);
+CREATE INDEX index_approval_project_rules_report_type ON approval_project_rules USING btree (report_type);
+
CREATE UNIQUE INDEX index_approval_project_rules_users_1 ON approval_project_rules_users USING btree (approval_project_rule_id, user_id);
CREATE INDEX index_approval_project_rules_users_2 ON approval_project_rules_users USING btree (user_id);
@@ -25385,7 +28168,9 @@ CREATE UNIQUE INDEX index_approval_rule_name_for_code_owners_rule_type ON approv
CREATE UNIQUE INDEX index_approval_rule_name_for_sectional_code_owners_rule_type ON approval_merge_request_rules USING btree (merge_request_id, name, section) WHERE (rule_type = 2);
-CREATE INDEX index_approval_rules_code_owners_rule_type ON approval_merge_request_rules USING btree (merge_request_id, rule_type) WHERE (rule_type = 2);
+CREATE INDEX index_approval_rule_on_protected_environment_id ON protected_environment_approval_rules USING btree (protected_environment_id);
+
+CREATE INDEX index_approval_rules_code_owners_rule_type ON approval_merge_request_rules USING btree (merge_request_id) WHERE (rule_type = 2);
CREATE INDEX index_approvals_on_merge_request_id ON approvals USING btree (merge_request_id);
@@ -25403,6 +28188,8 @@ CREATE INDEX index_approvers_on_user_id ON approvers USING btree (user_id);
CREATE UNIQUE INDEX index_atlassian_identities_on_extern_uid ON atlassian_identities USING btree (extern_uid);
+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_authentication_events_on_provider ON authentication_events USING btree (provider);
CREATE INDEX index_authentication_events_on_provider_user_id_created_at ON authentication_events USING btree (provider, user_id, created_at) WHERE (result = 1);
@@ -25507,6 +28294,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_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);
CREATE INDEX index_bulk_import_entities_on_bulk_import_id_and_status ON bulk_import_entities USING btree (bulk_import_id, status);
@@ -25569,6 +28358,8 @@ CREATE INDEX index_ci_builds_on_project_id_for_successfull_pages_deploy ON ci_bu
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);
CREATE INDEX index_ci_builds_on_stage_id ON ci_builds USING btree (stage_id);
@@ -25609,6 +28400,8 @@ CREATE UNIQUE INDEX index_ci_group_variables_on_group_id_and_key_and_environment
CREATE UNIQUE INDEX index_ci_instance_variables_on_key ON ci_instance_variables USING btree (key);
+CREATE INDEX index_ci_job_artifact_states_on_job_artifact_id ON ci_job_artifact_states USING btree (job_artifact_id);
+
CREATE INDEX index_ci_job_artifacts_for_terraform_reports ON ci_job_artifacts USING btree (project_id, id) WHERE (file_type = 18);
CREATE INDEX index_ci_job_artifacts_id_for_terraform_reports ON ci_job_artifacts USING btree (id) WHERE (file_type = 18);
@@ -25619,6 +28412,10 @@ 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 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_project_id ON ci_job_artifacts USING btree (project_id);
@@ -25635,6 +28432,8 @@ CREATE UNIQUE INDEX index_ci_job_variables_on_key_and_job_id ON ci_job_variables
CREATE INDEX index_ci_minutes_additional_packs_on_namespace_id_purchase_xid ON ci_minutes_additional_packs USING btree (namespace_id, purchase_xid);
+CREATE UNIQUE INDEX index_ci_namespace_mirrors_on_namespace_id ON ci_namespace_mirrors USING btree (namespace_id);
+
CREATE UNIQUE INDEX index_ci_namespace_monthly_usages_on_namespace_id_and_date ON ci_namespace_monthly_usages USING btree (namespace_id, date);
CREATE INDEX index_ci_pending_builds_id_on_protected_partial ON ci_pending_builds USING btree (id) WHERE (protected = true);
@@ -25723,6 +28522,12 @@ CREATE INDEX index_ci_pipelines_on_user_id_and_created_at_and_source ON ci_pipel
CREATE INDEX index_ci_pipelines_on_user_id_and_id_and_cancelable_status ON ci_pipelines USING btree (user_id, id) WHERE ((status)::text = ANY (ARRAY[('running'::character varying)::text, ('waiting_for_resource'::character varying)::text, ('preparing'::character varying)::text, ('pending'::character varying)::text, ('created'::character varying)::text, ('scheduled'::character varying)::text]));
+CREATE INDEX index_ci_pipelines_on_user_id_and_id_desc_and_user_not_verified ON ci_pipelines USING btree (user_id, id DESC) WHERE (failure_reason = 3);
+
+CREATE INDEX index_ci_project_mirrors_on_namespace_id ON ci_project_mirrors USING btree (namespace_id);
+
+CREATE UNIQUE INDEX index_ci_project_mirrors_on_project_id ON ci_project_mirrors USING btree (project_id);
+
CREATE UNIQUE INDEX index_ci_project_monthly_usages_on_project_id_and_date ON ci_project_monthly_usages USING btree (project_id, date);
CREATE UNIQUE INDEX index_ci_refs_on_project_id_and_ref_path ON ci_refs USING btree (project_id, ref_path);
@@ -25739,14 +28544,18 @@ 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 INDEX index_ci_runner_projects_on_runner_id ON ci_runner_projects USING btree (runner_id);
+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);
+CREATE INDEX index_ci_runners_on_contacted_at_and_id_where_inactive ON ci_runners USING btree (contacted_at DESC, id DESC) WHERE (active = false);
+
CREATE INDEX index_ci_runners_on_contacted_at_desc_and_id_desc ON ci_runners USING btree (contacted_at DESC, id DESC);
CREATE INDEX index_ci_runners_on_created_at_and_id_desc ON ci_runners USING btree (created_at, id DESC);
+CREATE INDEX index_ci_runners_on_created_at_and_id_where_inactive ON ci_runners USING btree (created_at DESC, id DESC) WHERE (active = false);
+
CREATE INDEX index_ci_runners_on_created_at_desc_and_id_desc ON ci_runners USING btree (created_at DESC, id DESC);
CREATE INDEX index_ci_runners_on_description_trigram ON ci_runners USING gin (description gin_trgm_ops);
@@ -25759,12 +28568,18 @@ 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 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_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);
CREATE INDEX index_ci_sources_pipelines_on_project_id ON ci_sources_pipelines USING btree (project_id);
@@ -25809,7 +28624,7 @@ 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_cluster_agent_tokens_on_agent_id_and_last_used_at ON cluster_agent_tokens USING btree (agent_id, last_used_at DESC NULLS LAST);
+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);
@@ -25861,7 +28676,9 @@ 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_kubernetes_namespaces_on_cluster_id ON clusters_kubernetes_namespaces USING btree (cluster_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);
@@ -25885,6 +28702,10 @@ CREATE INDEX index_composer_cache_files_where_namespace_id_is_null ON packages_c
CREATE INDEX index_container_expiration_policies_on_next_run_at_and_enabled ON container_expiration_policies USING btree (next_run_at, enabled);
+CREATE INDEX index_container_repositories_on_greatest_done_at ON container_repositories USING btree (GREATEST(migration_pre_import_done_at, migration_import_done_at, migration_aborted_at)) WHERE (migration_state = ANY (ARRAY['import_done'::text, 'pre_import_done'::text, 'import_aborted'::text]));
+
+CREATE INDEX index_container_repositories_on_migration_state_import_done_at ON container_repositories USING btree (migration_state, migration_import_done_at);
+
CREATE INDEX index_container_repositories_on_project_id ON container_repositories USING btree (project_id);
CREATE INDEX index_container_repositories_on_project_id_and_id ON container_repositories USING btree (project_id, id);
@@ -25893,6 +28714,14 @@ CREATE UNIQUE INDEX index_container_repositories_on_project_id_and_name ON conta
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);
+
+CREATE UNIQUE INDEX index_coverage_fuzzing_corpuses_on_package_id ON coverage_fuzzing_corpuses USING btree (package_id);
+
+CREATE INDEX index_coverage_fuzzing_corpuses_on_project_id ON coverage_fuzzing_corpuses USING btree (project_id);
+
+CREATE INDEX index_coverage_fuzzing_corpuses_on_user_id ON coverage_fuzzing_corpuses USING btree (user_id);
+
CREATE INDEX index_created_at_on_codeowner_approval_merge_request_rules ON approval_merge_request_rules USING btree (created_at) WHERE ((rule_type = 2) AND (section <> 'codeowners'::text));
CREATE INDEX index_csv_issue_imports_on_project_id ON csv_issue_imports USING btree (project_id);
@@ -25937,6 +28766,8 @@ CREATE UNIQUE INDEX index_dast_site_profiles_on_project_id_and_name ON dast_site
CREATE UNIQUE INDEX index_dast_site_profiles_pipelines_on_ci_pipeline_id ON dast_site_profiles_pipelines USING btree (ci_pipeline_id);
+CREATE UNIQUE INDEX index_dast_site_token_on_project_id_and_url ON dast_site_tokens USING btree (project_id, url);
+
CREATE UNIQUE INDEX index_dast_site_token_on_token ON dast_site_tokens USING btree (token);
CREATE INDEX index_dast_site_tokens_on_project_id ON dast_site_tokens USING btree (project_id);
@@ -25949,17 +28780,19 @@ CREATE INDEX index_dast_sites_on_dast_site_validation_id ON dast_sites USING btr
CREATE UNIQUE INDEX index_dast_sites_on_project_id_and_url ON dast_sites USING btree (project_id, url);
-CREATE UNIQUE INDEX index_dep_ci_build_trace_section_names_on_project_id_and_name ON dep_ci_build_trace_section_names USING btree (project_id, name);
+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_dep_ci_build_trace_sections_on_project_id ON dep_ci_build_trace_sections USING btree (project_id);
+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_dep_ci_build_trace_sections_on_section_name_id ON dep_ci_build_trace_sections USING btree (section_name_id);
+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);
-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_status ON dependency_proxy_blobs USING btree (status);
CREATE INDEX index_dependency_proxy_group_settings_on_group_id ON dependency_proxy_group_settings USING btree (group_id);
-CREATE UNIQUE INDEX index_dependency_proxy_manifests_on_group_id_and_file_name ON dependency_proxy_manifests USING btree (group_id, file_name);
+CREATE INDEX index_dependency_proxy_manifests_on_group_id_status_read_at_id ON dependency_proxy_manifests USING btree (group_id, status, read_at, id);
+
+CREATE INDEX index_dependency_proxy_manifests_on_status ON dependency_proxy_manifests USING btree (status);
CREATE INDEX index_deploy_key_id_on_protected_branch_push_access_levels ON protected_branch_push_access_levels USING btree (deploy_key_id);
@@ -25973,10 +28806,16 @@ CREATE INDEX index_deploy_tokens_on_token_and_expires_at_and_id ON deploy_tokens
CREATE UNIQUE INDEX index_deploy_tokens_on_token_encrypted ON deploy_tokens USING btree (token_encrypted);
+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);
+
CREATE UNIQUE INDEX index_deployment_clusters_on_cluster_id_and_deployment_id ON deployment_clusters USING btree (cluster_id, deployment_id);
CREATE INDEX index_deployment_merge_requests_on_merge_request_id ON deployment_merge_requests USING btree (merge_request_id);
+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);
@@ -25987,6 +28826,8 @@ CREATE INDEX index_deployments_on_environment_id_and_id ON deployments USING btr
CREATE INDEX index_deployments_on_environment_id_and_iid_and_project_id ON deployments USING btree (environment_id, iid, project_id);
+CREATE INDEX index_deployments_on_environment_id_and_ref ON deployments USING btree (environment_id, ref);
+
CREATE INDEX index_deployments_on_environment_id_status_and_finished_at ON deployments USING btree (environment_id, status, finished_at);
CREATE INDEX index_deployments_on_environment_id_status_and_id ON deployments USING btree (environment_id, status, id);
@@ -26091,8 +28932,6 @@ CREATE UNIQUE INDEX index_epic_board_list_preferences_on_user_and_list ON boards
CREATE UNIQUE INDEX index_epic_board_recent_visits_on_user_group_and_board ON boards_epic_board_recent_visits USING btree (user_id, group_id, epic_board_id);
-CREATE INDEX index_epic_issues_on_epic_id ON epic_issues USING btree (epic_id);
-
CREATE INDEX index_epic_issues_on_epic_id_and_issue_id ON epic_issues USING btree (epic_id, issue_id);
CREATE UNIQUE INDEX index_epic_issues_on_issue_id ON epic_issues USING btree (issue_id);
@@ -26125,8 +28964,6 @@ CREATE INDEX index_epics_on_iid ON epics USING btree (iid);
CREATE INDEX index_epics_on_last_edited_by_id ON epics USING btree (last_edited_by_id);
-CREATE INDEX index_epics_on_lock_version ON epics USING btree (lock_version) WHERE (lock_version IS NULL);
-
CREATE INDEX index_epics_on_parent_id ON epics USING btree (parent_id);
CREATE INDEX index_epics_on_start_date ON epics USING btree (start_date);
@@ -26149,13 +28986,15 @@ CREATE UNIQUE INDEX index_escalation_rules_on_all_attributes ON incident_managem
CREATE INDEX index_escalation_rules_on_user ON incident_management_escalation_rules USING btree (user_id);
-CREATE INDEX index_et_errors_on_project_id_and_status_and_events_count ON error_tracking_errors USING btree (project_id, status, events_count);
+CREATE INDEX index_et_errors_on_project_id_and_status_and_id ON error_tracking_errors USING btree (project_id, status, id);
-CREATE INDEX index_et_errors_on_project_id_and_status_and_first_seen_at ON error_tracking_errors USING btree (project_id, status, first_seen_at);
+CREATE INDEX index_et_errors_on_project_id_and_status_events_count_id_desc ON error_tracking_errors USING btree (project_id, status, events_count DESC, id DESC);
-CREATE INDEX index_et_errors_on_project_id_and_status_and_id ON error_tracking_errors USING btree (project_id, status, id);
+CREATE INDEX index_et_errors_on_project_id_and_status_first_seen_at_id_desc ON error_tracking_errors USING btree (project_id, status, first_seen_at DESC, id DESC);
+
+CREATE INDEX index_et_errors_on_project_id_and_status_last_seen_at_id_desc ON error_tracking_errors USING btree (project_id, status, last_seen_at DESC, id DESC);
-CREATE INDEX index_et_errors_on_project_id_and_status_and_last_seen_at ON error_tracking_errors USING btree (project_id, status, last_seen_at);
+CREATE INDEX index_events_author_id_project_id_action_target_type_created_at ON events USING btree (author_id, project_id, action, target_type, created_at);
CREATE INDEX index_events_on_action ON events USING btree (action);
@@ -26163,7 +29002,9 @@ CREATE INDEX index_events_on_author_id_and_created_at ON events USING btree (aut
CREATE INDEX index_events_on_author_id_and_created_at_merge_requests ON events USING btree (author_id, created_at) WHERE ((target_type)::text = 'MergeRequest'::text);
-CREATE INDEX index_events_on_author_id_and_project_id ON events USING btree (author_id, project_id);
+CREATE INDEX index_events_on_author_id_and_id ON events USING btree (author_id, id);
+
+CREATE INDEX index_events_on_created_at_and_id ON events USING btree (created_at, id) WHERE (created_at > '2021-08-27 00:00:00+00'::timestamp with time zone);
CREATE INDEX index_events_on_group_id_partial ON events USING btree (group_id) WHERE (group_id IS NOT NULL);
@@ -26173,8 +29014,6 @@ CREATE INDEX index_events_on_project_id_and_id ON events USING btree (project_id
CREATE INDEX index_events_on_project_id_and_id_desc_on_merged_action ON events USING btree (project_id, id DESC) WHERE (action = 7);
-CREATE INDEX index_events_on_target_type_and_target_id ON events USING btree (target_type, target_id);
-
CREATE UNIQUE INDEX index_events_on_target_type_and_target_id_and_fingerprint ON events USING btree (target_type, target_id, fingerprint);
CREATE INDEX index_evidences_on_release_id ON evidences USING btree (release_id);
@@ -26207,8 +29046,6 @@ CREATE UNIQUE INDEX index_feature_gates_on_feature_key_and_key_and_value ON feat
CREATE UNIQUE INDEX index_features_on_key ON features USING btree (key);
-CREATE INDEX index_for_resource_group ON ci_builds USING btree (resource_group_id, id) WHERE (resource_group_id IS NOT NULL);
-
CREATE INDEX index_for_status_per_branch_per_project ON merge_trains USING btree (target_project_id, target_branch, status);
CREATE INDEX index_fork_network_members_on_fork_network_id ON fork_network_members USING btree (fork_network_id);
@@ -26245,8 +29082,6 @@ CREATE INDEX index_geo_event_log_on_repository_updated_event_id ON geo_event_log
CREATE INDEX index_geo_event_log_on_reset_checksum_event_id ON geo_event_log USING btree (reset_checksum_event_id) WHERE (reset_checksum_event_id IS NOT NULL);
-CREATE INDEX index_geo_event_log_on_upload_deleted_event_id ON geo_event_log USING btree (upload_deleted_event_id) WHERE (upload_deleted_event_id IS NOT NULL);
-
CREATE INDEX index_geo_hashed_storage_attachments_events_on_project_id ON geo_hashed_storage_attachments_events USING btree (project_id);
CREATE INDEX index_geo_hashed_storage_migrated_events_on_project_id ON geo_hashed_storage_migrated_events USING btree (project_id);
@@ -26283,7 +29118,9 @@ 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_geo_upload_deleted_events_on_upload_id ON geo_upload_deleted_events USING btree (upload_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);
CREATE INDEX index_gitlab_subscription_histories_on_gitlab_subscription_id ON gitlab_subscription_histories USING btree (gitlab_subscription_id);
@@ -26319,6 +29156,8 @@ CREATE INDEX index_grafana_integrations_on_enabled ON grafana_integrations USING
CREATE INDEX index_grafana_integrations_on_project_id ON grafana_integrations USING btree (project_id);
+CREATE INDEX index_group_crm_settings_on_group_id ON group_crm_settings USING btree (group_id);
+
CREATE UNIQUE INDEX index_group_custom_attributes_on_group_id_and_key ON group_custom_attributes USING btree (group_id, key);
CREATE INDEX index_group_custom_attributes_on_key_and_value ON group_custom_attributes USING btree (key, value);
@@ -26373,6 +29212,16 @@ 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_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);
+
+CREATE INDEX index_im_timeline_events_project_id ON incident_management_timeline_events USING btree (project_id);
+
+CREATE INDEX index_im_timeline_events_promoted_from_note_id ON incident_management_timeline_events USING btree (promoted_from_note_id);
+
+CREATE INDEX index_im_timeline_events_updated_by_user_id ON incident_management_timeline_events USING btree (updated_by_user_id);
+
CREATE UNIQUE INDEX index_import_export_uploads_on_group_id ON import_export_uploads USING btree (group_id) WHERE (group_id IS NOT NULL);
CREATE INDEX index_import_export_uploads_on_project_id ON import_export_uploads USING btree (project_id);
@@ -26389,6 +29238,8 @@ CREATE INDEX index_import_failures_on_project_id_not_null ON import_failures USI
CREATE INDEX index_imported_projects_on_import_type_creator_id_created_at ON projects USING btree (import_type, creator_id, created_at) WHERE (import_type IS NOT NULL);
+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_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);
@@ -26415,21 +29266,21 @@ CREATE INDEX index_insights_on_project_id ON insights USING btree (project_id);
CREATE INDEX index_integrations_on_inherit_from_id ON integrations USING btree (inherit_from_id);
-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 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 UNIQUE INDEX index_integrations_on_project_id_and_type_unique ON integrations USING btree (project_id, type);
+CREATE UNIQUE INDEX index_integrations_on_project_id_and_type_new_unique ON integrations USING btree (project_id, type_new);
CREATE INDEX index_integrations_on_template ON integrations USING btree (template);
-CREATE INDEX index_integrations_on_type ON integrations USING btree (type);
+CREATE INDEX index_integrations_on_type_new ON integrations USING btree (type_new);
-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_new_and_instance_partial ON integrations USING btree (type_new, instance) WHERE (instance = true);
-CREATE UNIQUE INDEX index_integrations_on_type_and_template_partial ON integrations USING btree (type, template) WHERE (template = true);
+CREATE INDEX index_integrations_on_type_new_and_template_partial ON integrations USING btree (type_new, template) WHERE (template = 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_id_when_active_and_has_project ON integrations USING btree (type_new, id) WHERE ((active = true) AND (project_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_unique_group_id_and_type_new ON integrations USING btree (group_id, type_new);
CREATE INDEX index_internal_ids_on_namespace_id ON internal_ids USING btree (namespace_id);
@@ -26451,8 +29302,16 @@ CREATE UNIQUE INDEX index_issuable_slas_on_issue_id ON issuable_slas USING btree
CREATE INDEX index_issue_assignees_on_user_id ON issue_assignees USING btree (user_id);
+CREATE UNIQUE INDEX index_issue_crm_contacts_on_issue_id_and_contact_id ON issue_customer_relations_contacts USING btree (issue_id, contact_id);
+
+CREATE INDEX index_issue_customer_relations_contacts_on_contact_id ON issue_customer_relations_contacts USING btree (contact_id);
+
CREATE UNIQUE INDEX index_issue_email_participants_on_issue_id_and_lower_email ON issue_email_participants USING btree (issue_id, lower(email));
+CREATE INDEX index_issue_emails_on_email_message_id ON issue_emails USING btree (email_message_id);
+
+CREATE INDEX index_issue_emails_on_issue_id ON issue_emails USING btree (issue_id);
+
CREATE INDEX index_issue_links_on_source_id ON issue_links USING btree (source_id);
CREATE UNIQUE INDEX index_issue_links_on_source_id_and_target_id ON issue_links USING btree (source_id, target_id);
@@ -26479,12 +29338,12 @@ CREATE INDEX index_issues_on_description_trigram ON issues USING gin (descriptio
CREATE INDEX index_issues_on_duplicated_to_id ON issues USING btree (duplicated_to_id) WHERE (duplicated_to_id IS NOT NULL);
+CREATE INDEX index_issues_on_id_and_weight ON issues USING btree (id, weight);
+
CREATE INDEX index_issues_on_incident_issue_type ON issues USING btree (issue_type) WHERE (issue_type = 1);
CREATE INDEX index_issues_on_last_edited_by_id ON issues USING btree (last_edited_by_id);
-CREATE INDEX index_issues_on_lock_version ON issues USING btree (lock_version) WHERE (lock_version IS NULL);
-
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);
@@ -26527,7 +29386,13 @@ 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_keys_on_expires_at_and_expiry_notification_undelivered ON keys USING btree (date(timezone('UTC'::text, expires_at)), expiry_notification_delivered_at) WHERE (expiry_notification_delivered_at IS NULL);
+CREATE INDEX index_job_artifact_states_failed_verification ON ci_job_artifact_states USING btree (verification_retry_at NULLS FIRST) WHERE (verification_state = 3);
+
+CREATE INDEX index_job_artifact_states_needs_verification ON ci_job_artifact_states USING btree (verification_state) WHERE ((verification_state = 0) OR (verification_state = 3));
+
+CREATE INDEX index_job_artifact_states_on_verification_state ON ci_job_artifact_states USING btree (verification_state);
+
+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_keys_on_expires_at_and_id ON keys USING btree (date(timezone('UTC'::text, expires_at)), id) WHERE (expiry_notification_delivered_at IS NULL);
@@ -26553,17 +29418,17 @@ CREATE INDEX index_label_priorities_on_priority ON label_priorities USING btree
CREATE UNIQUE INDEX index_label_priorities_on_project_id_and_label_id ON label_priorities USING btree (project_id, label_id);
-CREATE UNIQUE INDEX index_labels_on_group_id_and_project_id_and_title ON labels USING btree (group_id, project_id, title);
+CREATE INDEX index_labels_on_group_id ON labels USING btree (group_id);
-CREATE UNIQUE INDEX index_labels_on_group_id_and_title_unique ON labels USING btree (group_id, title) WHERE (project_id IS NULL);
+CREATE UNIQUE INDEX index_labels_on_group_id_and_title_varchar_unique ON labels USING btree (group_id, title varchar_pattern_ops) WHERE (project_id IS NULL);
CREATE INDEX index_labels_on_project_id ON labels USING btree (project_id);
-CREATE UNIQUE INDEX index_labels_on_project_id_and_title_unique ON labels USING btree (project_id, title) WHERE (group_id IS NULL);
+CREATE UNIQUE INDEX index_labels_on_project_id_and_title_varchar_unique ON labels USING btree (project_id, title varchar_pattern_ops) WHERE (group_id IS NULL);
CREATE INDEX index_labels_on_template ON labels USING btree (template) WHERE template;
-CREATE INDEX index_labels_on_title ON labels USING btree (title);
+CREATE INDEX index_labels_on_title_varchar ON labels USING btree (title varchar_pattern_ops);
CREATE INDEX index_labels_on_type_and_project_id ON labels USING btree (type, project_id);
@@ -26571,6 +29436,16 @@ CREATE UNIQUE INDEX index_lfs_file_locks_on_project_id_and_path ON lfs_file_lock
CREATE INDEX index_lfs_file_locks_on_user_id ON lfs_file_locks USING btree (user_id);
+CREATE INDEX index_lfs_object_states_failed_verification ON lfs_object_states USING btree (verification_retry_at NULLS FIRST) WHERE (verification_state = 3);
+
+CREATE INDEX index_lfs_object_states_needs_verification ON lfs_object_states USING btree (verification_state) WHERE ((verification_state = 0) OR (verification_state = 3));
+
+CREATE INDEX index_lfs_object_states_on_lfs_object_id ON lfs_object_states USING btree (lfs_object_id);
+
+CREATE INDEX index_lfs_object_states_on_verification_state ON lfs_object_states USING btree (verification_state);
+
+CREATE INDEX index_lfs_object_states_pending_verification ON lfs_object_states USING btree (verified_at NULLS FIRST) WHERE (verification_state = 0);
+
CREATE INDEX index_lfs_objects_on_file_store ON lfs_objects USING btree (file_store);
CREATE UNIQUE INDEX index_lfs_objects_on_oid ON lfs_objects USING btree (oid);
@@ -26597,6 +29472,12 @@ 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_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);
+
+CREATE INDEX index_member_tasks_on_project_id ON member_tasks USING btree (project_id);
+
CREATE INDEX index_members_on_access_level ON members USING btree (access_level);
CREATE INDEX index_members_on_expires_at ON members USING btree (expires_at);
@@ -26605,6 +29486,8 @@ 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_requested_at ON members USING btree (requested_at);
CREATE INDEX index_members_on_source_id_and_source_type ON members USING btree (source_id, source_type);
@@ -26627,8 +29510,6 @@ CREATE UNIQUE INDEX index_merge_request_cleanup_schedules_on_merge_request_id ON
CREATE INDEX index_merge_request_cleanup_schedules_on_status ON merge_request_cleanup_schedules USING btree (status);
-CREATE INDEX index_merge_request_context_commits_on_merge_request_id ON merge_request_context_commits USING btree (merge_request_id);
-
CREATE UNIQUE INDEX index_merge_request_diff_commit_users_on_name_and_email ON merge_request_diff_commit_users USING btree (name, email);
CREATE INDEX index_merge_request_diff_commits_on_sha ON merge_request_diff_commits USING btree (sha);
@@ -26677,6 +29558,10 @@ CREATE INDEX index_merge_requests_closing_issues_on_issue_id ON merge_requests_c
CREATE INDEX index_merge_requests_closing_issues_on_merge_request_id ON merge_requests_closing_issues USING btree (merge_request_id);
+CREATE INDEX index_merge_requests_compliance_violations_on_violating_user_id ON merge_requests_compliance_violations USING btree (violating_user_id);
+
+CREATE UNIQUE INDEX index_merge_requests_compliance_violations_unique_columns ON merge_requests_compliance_violations USING btree (merge_request_id, violating_user_id, reason);
+
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);
@@ -26689,8 +29574,6 @@ CREATE INDEX index_merge_requests_on_head_pipeline_id ON merge_requests USING bt
CREATE INDEX index_merge_requests_on_latest_merge_request_diff_id ON merge_requests USING btree (latest_merge_request_diff_id);
-CREATE INDEX index_merge_requests_on_lock_version ON merge_requests USING btree (lock_version) WHERE (lock_version IS NULL);
-
CREATE INDEX index_merge_requests_on_merge_user_id ON merge_requests USING btree (merge_user_id) WHERE (merge_user_id IS NOT NULL);
CREATE INDEX index_merge_requests_on_milestone_id ON merge_requests USING btree (milestone_id);
@@ -26721,8 +29604,6 @@ 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 ON merge_requests USING btree (title);
-
CREATE INDEX index_merge_requests_on_title_trigram ON merge_requests USING gin (title gin_trgm_ops);
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);
@@ -26785,6 +29666,8 @@ CREATE INDEX index_namespaces_id_parent_id_is_not_null ON namespaces USING btree
CREATE INDEX index_namespaces_id_parent_id_is_null ON namespaces USING btree (id) WHERE (parent_id IS NULL);
+CREATE UNIQUE INDEX index_namespaces_name_parent_id_type ON namespaces USING btree (name, parent_id, type);
+
CREATE INDEX index_namespaces_on_created_at ON namespaces USING btree (created_at);
CREATE INDEX index_namespaces_on_custom_project_templates_group_id_and_type ON namespaces USING btree (custom_project_templates_group_id, type) WHERE (custom_project_templates_group_id IS NOT NULL);
@@ -26795,8 +29678,6 @@ CREATE INDEX index_namespaces_on_ldap_sync_last_successful_update_at ON namespac
CREATE INDEX index_namespaces_on_ldap_sync_last_update_at ON namespaces USING btree (ldap_sync_last_update_at);
-CREATE UNIQUE INDEX index_namespaces_on_name_and_parent_id ON namespaces USING btree (name, parent_id);
-
CREATE INDEX index_namespaces_on_name_trigram ON namespaces USING gin (name gin_trgm_ops);
CREATE INDEX index_namespaces_on_owner_id ON namespaces USING btree (owner_id);
@@ -26819,7 +29700,13 @@ CREATE INDEX index_namespaces_on_shared_and_extra_runners_minutes_limit ON names
CREATE INDEX index_namespaces_on_traversal_ids ON namespaces USING gin (traversal_ids);
-CREATE INDEX index_namespaces_on_type_and_id_partial ON namespaces USING btree (type, id) WHERE (type IS NOT NULL);
+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_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));
+
+CREATE INDEX index_namespaces_sync_events_on_namespace_id ON namespaces_sync_events USING btree (namespace_id);
CREATE INDEX index_non_requested_project_members_on_source_id_and_type ON members USING btree (source_id, source_type) WHERE ((requested_at IS NULL) AND ((type)::text = 'ProjectMember'::text));
@@ -26837,8 +29724,6 @@ CREATE INDEX index_notes_on_discussion_id ON notes USING btree (discussion_id);
CREATE INDEX index_notes_on_line_code ON notes USING btree (line_code);
-CREATE INDEX index_notes_on_note_trigram ON notes USING gin (note gin_trgm_ops);
-
CREATE INDEX index_notes_on_noteable_id_and_noteable_type_and_system ON notes USING btree (noteable_id, noteable_type, system);
CREATE INDEX index_notes_on_project_id_and_id_and_system_false ON notes USING btree (project_id, id) WHERE (NOT system);
@@ -26871,12 +29756,24 @@ 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_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);
CREATE UNIQUE INDEX index_on_instance_statistics_recorded_at_and_identifier ON analytics_usage_trends_measurements USING btree (identifier, recorded_at);
+CREATE INDEX index_on_issues_closed_incidents_by_project_id_and_closed_at ON issues USING btree (project_id, closed_at) WHERE ((issue_type = 1) AND (state_id = 2));
+
CREATE INDEX index_on_label_links_all_columns ON label_links USING btree (target_id, label_id, target_type);
+CREATE INDEX index_on_merge_request_assignees_state ON merge_request_assignees USING btree (state) WHERE (state = 2);
+
+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_reviewers_state ON merge_request_reviewers USING btree (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_requests_for_latest_diffs ON merge_requests USING btree (target_project_id) INCLUDE (id, latest_merge_request_diff_id);
COMMENT ON INDEX index_on_merge_requests_for_latest_diffs IS 'Index used to efficiently obtain the oldest merge request for a commit SHA';
@@ -26893,11 +29790,9 @@ CREATE UNIQUE INDEX index_on_project_id_escalation_policy_name_unique ON inciden
CREATE INDEX index_on_projects_lower_path ON projects USING btree (lower((path)::text));
-CREATE INDEX index_on_routes_lower_path ON routes USING btree (lower((path)::text));
-
-CREATE INDEX index_on_snapshots_segment_id_end_time ON analytics_devops_adoption_snapshots USING btree (segment_id, end_time);
+CREATE INDEX index_on_projects_path ON projects USING btree (path);
-CREATE INDEX index_on_snapshots_segment_id_recorded_at ON analytics_devops_adoption_snapshots USING btree (segment_id, recorded_at);
+CREATE INDEX index_on_routes_lower_path ON routes USING btree (lower((path)::text));
CREATE INDEX index_on_users_lower_email ON users USING btree (lower((email)::text));
@@ -26917,8 +29812,6 @@ CREATE UNIQUE INDEX index_onboarding_progresses_on_namespace_id ON onboarding_pr
CREATE INDEX index_oncall_shifts_on_rotation_id_and_starts_at_and_ends_at ON incident_management_oncall_shifts USING btree (rotation_id, starts_at, ends_at);
-CREATE INDEX index_open_project_tracker_data_on_service_id ON open_project_tracker_data USING btree (service_id);
-
CREATE INDEX index_operations_feature_flags_issues_on_issue_id ON operations_feature_flags_issues USING btree (issue_id);
CREATE UNIQUE INDEX index_operations_feature_flags_on_project_id_and_iid ON operations_feature_flags USING btree (project_id, iid);
@@ -26941,6 +29834,8 @@ CREATE UNIQUE INDEX index_ops_strategies_user_lists_on_strategy_id_and_user_list
CREATE INDEX index_packages_build_infos_on_pipeline_id ON packages_build_infos USING btree (pipeline_id);
+CREATE INDEX index_packages_build_infos_package_id_pipeline_id ON packages_build_infos USING btree (package_id, pipeline_id);
+
CREATE UNIQUE INDEX index_packages_composer_cache_namespace_and_sha ON packages_composer_cache_files USING btree (namespace_id, file_sha256);
CREATE UNIQUE INDEX index_packages_composer_metadata_on_package_id_and_target_sha ON packages_composer_metadata USING btree (package_id, target_sha);
@@ -26973,18 +29868,14 @@ CREATE INDEX index_packages_events_on_package_id ON packages_events USING btree
CREATE INDEX index_packages_helm_file_metadata_on_channel ON packages_helm_file_metadata USING btree (channel);
+CREATE INDEX index_packages_helm_file_metadata_on_pf_id_and_channel ON packages_helm_file_metadata USING btree (package_file_id, channel);
+
CREATE INDEX index_packages_maven_metadata_on_package_id_and_path ON packages_maven_metadata USING btree (package_id, path);
CREATE INDEX index_packages_maven_metadata_on_path ON packages_maven_metadata USING btree (path);
CREATE INDEX index_packages_nuget_dl_metadata_on_dependency_link_id ON packages_nuget_dependency_link_metadata USING btree (dependency_link_id);
-CREATE UNIQUE INDEX index_packages_on_project_id_name_version_unique_when_generic ON packages_packages USING btree (project_id, name, version) WHERE (package_type = 7);
-
-CREATE UNIQUE INDEX index_packages_on_project_id_name_version_unique_when_golang ON packages_packages USING btree (project_id, name, version) WHERE (package_type = 8);
-
-CREATE UNIQUE INDEX index_packages_on_project_id_name_version_unique_when_helm ON packages_packages USING btree (project_id, name, version) WHERE (package_type = 11);
-
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);
@@ -26993,6 +29884,12 @@ CREATE INDEX index_packages_package_files_on_file_store ON packages_package_file
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);
+
+CREATE INDEX index_packages_package_files_on_package_id_status_and_id ON packages_package_files USING btree (package_id, status, id);
+
+CREATE INDEX index_packages_package_files_on_status ON packages_package_files USING btree (status);
+
CREATE INDEX index_packages_package_files_on_verification_state ON packages_package_files USING btree (verification_state);
CREATE INDEX index_packages_packages_on_creator_id ON packages_packages USING btree (creator_id);
@@ -27015,6 +29912,16 @@ CREATE INDEX index_packages_tags_on_package_id ON packages_tags USING btree (pac
CREATE INDEX index_packages_tags_on_package_id_and_updated_at ON packages_tags USING btree (package_id, updated_at DESC);
+CREATE INDEX index_pages_deployment_states_failed_verification ON pages_deployment_states USING btree (verification_retry_at NULLS FIRST) WHERE (verification_state = 3);
+
+CREATE INDEX index_pages_deployment_states_needs_verification ON pages_deployment_states USING btree (verification_state) WHERE ((verification_state = 0) OR (verification_state = 3));
+
+CREATE INDEX index_pages_deployment_states_on_pages_deployment_id ON pages_deployment_states USING btree (pages_deployment_id);
+
+CREATE INDEX index_pages_deployment_states_on_verification_state ON pages_deployment_states USING btree (verification_state);
+
+CREATE INDEX index_pages_deployment_states_pending_verification ON pages_deployment_states USING btree (verified_at NULLS FIRST) WHERE (verification_state = 0);
+
CREATE INDEX index_pages_deployments_on_ci_build_id ON pages_deployments USING btree (ci_build_id);
CREATE INDEX index_pages_deployments_on_file_store_and_id ON pages_deployments USING btree (file_store, id);
@@ -27053,8 +29960,6 @@ CREATE UNIQUE INDEX index_partial_am_alerts_on_project_id_and_fingerprint ON ale
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 UNIQUE INDEX index_partitioned_foreign_keys_unique_index ON partitioned_foreign_keys USING btree (to_table, from_table, from_column);
-
CREATE INDEX index_pat_on_user_id_and_expires_at ON personal_access_tokens USING btree (user_id, expires_at);
CREATE INDEX index_path_locks_on_path ON path_locks USING btree (path);
@@ -27081,6 +29986,8 @@ CREATE UNIQUE INDEX index_postgres_async_indexes_on_name ON postgres_async_index
CREATE INDEX index_postgres_reindex_actions_on_index_identifier ON postgres_reindex_actions USING btree (index_identifier);
+CREATE INDEX index_postgres_reindex_queued_actions_on_state ON postgres_reindex_queued_actions USING btree (state);
+
CREATE UNIQUE INDEX index_programming_languages_on_name ON programming_languages USING btree (name);
CREATE INDEX index_project_access_tokens_on_project_id ON project_access_tokens USING btree (project_id);
@@ -27091,6 +29998,8 @@ CREATE INDEX index_project_aliases_on_project_id ON project_aliases USING btree
CREATE UNIQUE INDEX index_project_auto_devops_on_project_id ON project_auto_devops USING btree (project_id);
+CREATE UNIQUE INDEX index_project_build_artifacts_size_refreshes_on_project_id ON project_build_artifacts_size_refreshes USING btree (project_id);
+
CREATE UNIQUE INDEX index_project_ci_cd_settings_on_project_id ON project_ci_cd_settings USING btree (project_id);
CREATE UNIQUE INDEX index_project_ci_feature_usages_unique_columns ON project_ci_feature_usages USING btree (project_id, feature, default_branch);
@@ -27191,12 +30100,6 @@ CREATE INDEX index_projects_aimed_for_deletion ON projects USING btree (marked_f
CREATE INDEX index_projects_api_created_at_id_desc ON projects USING btree (created_at, id DESC);
-CREATE INDEX index_projects_api_created_at_id_for_archived ON projects USING btree (created_at, id) WHERE ((archived = true) AND (pending_delete = false));
-
-CREATE INDEX index_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));
-
-CREATE INDEX index_projects_api_created_at_id_for_vis10 ON projects USING btree (created_at, id) WHERE ((visibility_level = 10) AND (pending_delete = false));
-
CREATE INDEX index_projects_api_last_activity_at_id_desc ON projects USING btree (last_activity_at, id DESC);
CREATE INDEX index_projects_api_name_id_desc ON projects USING btree (name, id DESC);
@@ -27215,6 +30118,8 @@ CREATE INDEX index_projects_api_vis20_path ON projects USING btree (path, id) WH
CREATE INDEX index_projects_api_vis20_updated_at ON projects USING btree (updated_at, id) WHERE (visibility_level = 20);
+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);
@@ -27277,6 +30182,8 @@ 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);
+CREATE INDEX index_projects_sync_events_on_project_id ON projects_sync_events USING btree (project_id);
+
CREATE UNIQUE INDEX index_prometheus_alert_event_scoped_payload_key ON prometheus_alert_events USING btree (prometheus_alert_id, payload_key);
CREATE INDEX index_prometheus_alert_events_on_project_id_and_status ON prometheus_alert_events USING btree (project_id, status);
@@ -27317,6 +30224,10 @@ CREATE INDEX index_protected_branch_unprotect_access_levels_on_user_id ON protec
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);
+
+CREATE INDEX index_protected_environment_approval_rules_on_user_id ON protected_environment_approval_rules USING btree (user_id);
+
CREATE INDEX index_protected_environment_deploy_access ON protected_environment_deploy_access_levels USING btree (protected_environment_id);
CREATE INDEX index_protected_environment_deploy_access_levels_on_group_id ON protected_environment_deploy_access_levels USING btree (group_id);
@@ -27351,13 +30262,21 @@ CREATE UNIQUE INDEX index_redirect_routes_on_path_unique_text_pattern_ops ON red
CREATE INDEX index_redirect_routes_on_source_type_and_source_id ON redirect_routes USING btree (source_type, source_id);
+CREATE INDEX index_related_epic_links_on_source_id ON related_epic_links USING btree (source_id);
+
+CREATE UNIQUE INDEX index_related_epic_links_on_source_id_and_target_id ON related_epic_links USING btree (source_id, target_id);
+
+CREATE INDEX index_related_epic_links_on_target_id ON related_epic_links USING btree (target_id);
+
CREATE UNIQUE INDEX index_release_links_on_release_id_and_name ON release_links USING btree (release_id, name);
CREATE UNIQUE INDEX index_release_links_on_release_id_and_url ON release_links USING btree (release_id, url);
-CREATE INDEX index_releases_on_author_id ON releases USING btree (author_id);
+CREATE INDEX index_releases_on_author_id_id_created_at ON releases USING btree (author_id, id, created_at);
+
+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_and_tag ON releases USING btree (project_id, tag);
+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);
@@ -27447,6 +30366,8 @@ CREATE INDEX index_reviews_on_project_id ON reviews USING btree (project_id);
CREATE INDEX index_route_on_name_trigram ON routes USING gin (name gin_trgm_ops);
+CREATE UNIQUE INDEX index_routes_on_namespace_id ON routes USING btree (namespace_id);
+
CREATE UNIQUE INDEX index_routes_on_path ON routes USING btree (path);
CREATE INDEX index_routes_on_path_text_pattern_ops ON routes USING btree (path varchar_pattern_ops);
@@ -27459,6 +30380,8 @@ CREATE UNIQUE INDEX index_saml_group_links_on_group_id_and_saml_group_name ON sa
CREATE INDEX index_saml_providers_on_group_id ON saml_providers USING btree (group_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_scim_identities_on_group_id ON scim_identities USING btree (group_id);
CREATE UNIQUE INDEX index_scim_identities_on_lower_extern_uid_and_group_id ON scim_identities USING btree (lower((extern_uid)::text), group_id);
@@ -27469,7 +30392,7 @@ CREATE UNIQUE INDEX index_scim_oauth_access_tokens_on_group_id_and_token_encrypt
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])) AND ((type)::text = 'Ci::Build'::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_findings_on_confidence ON security_findings USING btree (confidence);
@@ -27477,7 +30400,7 @@ CREATE INDEX index_security_findings_on_project_fingerprint ON security_findings
CREATE INDEX index_security_findings_on_scan_id_and_deduplicated ON security_findings USING btree (scan_id, deduplicated);
-CREATE UNIQUE INDEX index_security_findings_on_scan_id_and_position ON security_findings USING btree (scan_id, "position");
+CREATE INDEX index_security_findings_on_scan_id_and_id ON security_findings USING btree (scan_id, id);
CREATE INDEX index_security_findings_on_scanner_id ON security_findings USING btree (scanner_id);
@@ -27493,6 +30416,14 @@ CREATE INDEX index_security_scans_on_pipeline_id ON security_scans USING btree (
CREATE INDEX index_security_scans_on_project_id ON security_scans USING btree (project_id);
+CREATE UNIQUE INDEX index_security_training_providers_on_unique_name ON security_training_providers USING btree (name);
+
+CREATE INDEX index_security_trainings_on_project_id ON security_trainings USING btree (project_id);
+
+CREATE INDEX index_security_trainings_on_provider_id ON security_trainings USING btree (provider_id);
+
+CREATE UNIQUE INDEX index_security_trainings_on_unique_project_id ON security_trainings USING btree (project_id) WHERE (is_primary IS TRUE);
+
CREATE INDEX index_self_managed_prometheus_alert_events_on_environment_id ON self_managed_prometheus_alert_events USING btree (environment_id);
CREATE INDEX index_sent_notifications_on_noteable_type_noteable_id ON sent_notifications USING btree (noteable_id) WHERE ((noteable_type)::text = 'Issue'::text);
@@ -27555,6 +30486,8 @@ CREATE INDEX index_snippets_on_id_and_created_at ON snippets USING btree (id, cr
CREATE INDEX index_snippets_on_id_and_type ON snippets USING btree (id, type);
+CREATE INDEX index_snippets_on_project_id_and_title ON snippets USING btree (project_id, title);
+
CREATE INDEX index_snippets_on_project_id_and_visibility_level ON snippets USING btree (project_id, visibility_level);
CREATE INDEX index_snippets_on_title_trigram ON snippets USING gin (title gin_trgm_ops);
@@ -27571,8 +30504,6 @@ CREATE INDEX index_software_licenses_on_spdx_identifier ON software_licenses USI
CREATE UNIQUE INDEX index_software_licenses_on_unique_name ON software_licenses USING btree (name);
-CREATE UNIQUE INDEX index_sop_configs_on_project_id ON security_orchestration_policy_configurations USING btree (project_id);
-
CREATE INDEX index_sop_configurations_project_id_policy_project_id ON security_orchestration_policy_configurations USING btree (security_policy_management_project_id, project_id);
CREATE INDEX index_sop_schedules_on_sop_configuration_id ON security_orchestration_policy_rule_schedules USING btree (security_orchestration_policy_configuration_id);
@@ -27589,12 +30520,8 @@ 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_iterations_cadence_id_and_title ON sprints USING btree (iterations_cadence_id, title);
-
CREATE UNIQUE INDEX index_sprints_on_project_id_and_iid ON sprints USING btree (project_id, iid);
-CREATE UNIQUE INDEX index_sprints_on_project_id_and_title ON sprints USING btree (project_id, title) WHERE (project_id IS NOT NULL);
-
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);
@@ -27615,8 +30542,6 @@ CREATE UNIQUE INDEX index_subscriptions_on_subscribable_and_user_id_and_project_
CREATE INDEX index_successful_deployments_on_cluster_id_and_environment_id ON deployments USING btree (cluster_id, environment_id) WHERE (status = 2);
-CREATE INDEX index_suggestions_on_note_id ON suggestions USING btree (note_id);
-
CREATE UNIQUE INDEX index_suggestions_on_note_id_and_relative_order ON suggestions USING btree (note_id, relative_order);
CREATE UNIQUE INDEX index_system_note_metadata_on_description_version_id ON system_note_metadata USING btree (description_version_id) WHERE (description_version_id IS NOT NULL);
@@ -27625,8 +30550,6 @@ CREATE UNIQUE INDEX index_system_note_metadata_on_note_id ON system_note_metadat
CREATE INDEX index_taggings_on_tag_id ON taggings USING btree (tag_id);
-CREATE INDEX index_taggings_on_taggable_id_and_taggable_type ON taggings USING btree (taggable_id, taggable_type);
-
CREATE INDEX index_taggings_on_taggable_id_and_taggable_type_and_context ON taggings USING btree (taggable_id, taggable_type, context);
CREATE UNIQUE INDEX index_tags_on_name ON tags USING btree (name);
@@ -27681,7 +30604,9 @@ CREATE INDEX index_todos_on_group_id ON todos USING btree (group_id);
CREATE INDEX index_todos_on_note_id ON todos USING btree (note_id);
-CREATE INDEX index_todos_on_project_id ON todos USING btree (project_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);
@@ -27695,8 +30620,16 @@ CREATE UNIQUE INDEX index_token_with_ivs_on_hashed_plaintext_token ON token_with
CREATE UNIQUE INDEX index_token_with_ivs_on_hashed_token ON token_with_ivs USING btree (hashed_token);
+CREATE INDEX index_topics_non_private_projects_count ON topics USING btree (non_private_projects_count DESC, id);
+
+CREATE INDEX index_topics_on_lower_name ON topics USING btree (lower(name));
+
CREATE UNIQUE INDEX index_topics_on_name ON topics USING btree (name);
+CREATE INDEX index_topics_on_name_trigram ON topics USING gin (name gin_trgm_ops);
+
+CREATE INDEX index_topics_total_projects_count ON topics USING btree (total_projects_count DESC, id);
+
CREATE UNIQUE INDEX index_trending_projects_on_project_id ON trending_projects USING btree (project_id);
CREATE INDEX index_u2f_registrations_on_key_handle ON u2f_registrations USING btree (key_handle);
@@ -27705,6 +30638,8 @@ CREATE INDEX index_u2f_registrations_on_user_id ON u2f_registrations USING btree
CREATE UNIQUE INDEX index_uniq_im_issuable_escalation_statuses_on_issue_id ON incident_management_issuable_escalation_statuses USING btree (issue_id);
+CREATE UNIQUE INDEX index_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);
CREATE UNIQUE INDEX index_unique_project_authorizations_on_project_id_user_id ON project_authorizations USING btree (project_id, user_id);
@@ -27715,6 +30650,16 @@ CREATE UNIQUE INDEX index_unit_test_failures_unique_columns ON ci_unit_test_fail
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);
+
+CREATE INDEX index_upload_states_needs_verification ON upload_states USING btree (verification_state) WHERE ((verification_state = 0) OR (verification_state = 3));
+
+CREATE INDEX index_upload_states_on_upload_id ON upload_states USING btree (upload_id);
+
+CREATE INDEX index_upload_states_on_verification_state ON upload_states USING btree (verification_state);
+
+CREATE INDEX index_upload_states_pending_verification ON upload_states USING btree (verified_at NULLS FIRST) WHERE (verification_state = 0);
+
CREATE INDEX index_uploads_on_checksum ON uploads USING btree (checksum);
CREATE INDEX index_uploads_on_model_id_and_model_type ON uploads USING btree (model_id, model_type);
@@ -27735,11 +30680,17 @@ 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_partial_match ON user_credit_card_validations USING btree (expiration_date, last_digits, network, credit_card_validated_at);
+
CREATE INDEX index_user_custom_attributes_on_key_and_value ON user_custom_attributes USING btree (key, value);
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_provisioned_by_group_id ON user_details USING btree (provisioned_by_group_id);
+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';
CREATE UNIQUE INDEX index_user_details_on_user_id ON user_details USING btree (user_id);
@@ -27777,7 +30728,7 @@ 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);
-CREATE INDEX index_users_on_id_and_last_activity_on_for_non_internal_active ON users USING btree (id, last_activity_on) WHERE (((state)::text = 'active'::text) AND ((user_type IS NULL) OR (user_type = ANY (ARRAY[NULL::integer, 6, 4]))));
+CREATE INDEX index_users_on_id_and_last_activity_on_for_active_human_service ON users USING btree (id, last_activity_on) WHERE (((state)::text = 'active'::text) AND ((user_type IS NULL) OR (user_type = 4)));
CREATE INDEX index_users_on_incoming_email_token ON users USING btree (incoming_email_token);
@@ -27787,7 +30738,7 @@ CREATE INDEX index_users_on_name ON users USING btree (name);
CREATE INDEX index_users_on_name_trigram ON users USING gin (name gin_trgm_ops);
-CREATE INDEX index_users_on_public_email ON users USING btree (public_email) WHERE ((public_email)::text <> ''::text);
+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);
@@ -27821,8 +30772,12 @@ CREATE INDEX index_users_star_projects_on_project_id ON users_star_projects USIN
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_vuln_historical_statistics_on_project_id_and_date ON vulnerability_historical_statistics USING btree (project_id, date);
+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_vulnerabilities_on_author_id ON vulnerabilities USING btree (author_id);
CREATE INDEX index_vulnerabilities_on_confirmed_by_id ON vulnerabilities USING btree (confirmed_by_id);
@@ -27837,6 +30792,10 @@ 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);
@@ -27893,24 +30852,42 @@ CREATE INDEX index_vulnerability_occurrence_identifiers_on_identifier_id ON vuln
CREATE UNIQUE INDEX index_vulnerability_occurrence_identifiers_on_unique_keys ON vulnerability_occurrence_identifiers USING btree (occurrence_id, identifier_id);
+CREATE INDEX index_vulnerability_occurrence_pipelines_occurrence_id_and_id ON vulnerability_occurrence_pipelines USING btree (occurrence_id, id DESC);
+
CREATE INDEX index_vulnerability_occurrence_pipelines_on_pipeline_id ON vulnerability_occurrence_pipelines USING btree (pipeline_id);
CREATE INDEX index_vulnerability_occurrences_deduplication ON vulnerability_occurrences USING btree (project_id, report_type, project_fingerprint);
CREATE INDEX index_vulnerability_occurrences_for_issue_links_migration ON vulnerability_occurrences USING btree (project_id, report_type, encode(project_fingerprint, 'hex'::text));
+CREATE INDEX index_vulnerability_occurrences_on_location_image ON vulnerability_occurrences USING gin (((location -> 'image'::text))) WHERE (report_type = ANY (ARRAY[2, 7]));
+
+CREATE INDEX index_vulnerability_occurrences_on_location_k8s_agent_id ON vulnerability_occurrences USING gin ((((location -> 'kubernetes_resource'::text) -> 'agent_id'::text))) WHERE (report_type = 7);
+
+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);
CREATE INDEX index_vulnerability_occurrences_on_scanner_id ON vulnerability_occurrences USING btree (scanner_id);
-CREATE UNIQUE INDEX index_vulnerability_occurrences_on_unique_keys ON vulnerability_occurrences USING btree (project_id, primary_identifier_id, location_fingerprint, scanner_id);
-
CREATE UNIQUE INDEX index_vulnerability_occurrences_on_uuid ON vulnerability_occurrences USING btree (uuid);
CREATE INDEX index_vulnerability_occurrences_on_vulnerability_id ON vulnerability_occurrences USING btree (vulnerability_id);
+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_scanner_id ON vulnerability_reads USING btree (scanner_id);
+
+CREATE UNIQUE INDEX index_vulnerability_reads_on_uuid ON vulnerability_reads USING btree (uuid);
+
+CREATE UNIQUE INDEX index_vulnerability_reads_on_vulnerability_id ON vulnerability_reads USING btree (vulnerability_id);
+
CREATE UNIQUE INDEX index_vulnerability_remediations_on_project_id_and_checksum ON vulnerability_remediations USING btree (project_id, checksum);
CREATE UNIQUE INDEX index_vulnerability_scanners_on_project_id_and_external_id ON vulnerability_scanners USING btree (project_id, external_id);
@@ -28011,6 +30988,10 @@ 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 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 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);
@@ -28019,23 +31000,31 @@ CREATE UNIQUE INDEX taggings_idx ON taggings USING btree (tag_id, taggable_id, t
CREATE UNIQUE INDEX term_agreements_unique_index ON term_agreements USING btree (user_id, term_id);
-CREATE INDEX tmp_idx_deduplicate_vulnerability_occurrences ON vulnerability_occurrences USING btree (project_id, report_type, location_fingerprint, primary_identifier_id, 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_on_namespaces_delayed_project_removal ON namespaces USING btree (id) WHERE (delayed_project_removal = true);
+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_index_ci_builds_lock_version ON ci_builds USING btree (id) WHERE (lock_version IS NULL);
+CREATE INDEX tmp_index_ci_job_artifacts_on_id_where_trace_and_expire_at ON ci_job_artifacts USING btree (id) WHERE ((file_type = 3) AND (expire_at = ANY (ARRAY['2021-04-22 00:00:00+00'::timestamp with time zone, '2021-05-22 00:00:00+00'::timestamp with time zone, '2021-06-22 00:00:00+00'::timestamp with time zone, '2022-01-22 00:00:00+00'::timestamp with time zone, '2022-02-22 00:00:00+00'::timestamp with time zone, '2022-03-22 00:00:00+00'::timestamp with time zone, '2022-04-22 00:00:00+00'::timestamp with time zone])));
-CREATE INDEX tmp_index_ci_pipelines_lock_version ON ci_pipelines USING btree (id) WHERE (lock_version IS NULL);
+CREATE INDEX tmp_index_container_repositories_on_id_migration_state ON container_repositories USING btree (id, migration_state);
-CREATE INDEX tmp_index_ci_stages_lock_version ON ci_stages USING btree (id_convert_to_bigint) WHERE (lock_version IS NULL);
+CREATE INDEX tmp_index_for_namespace_id_migration_on_group_members ON members USING btree (id) WHERE ((member_namespace_id IS NULL) AND ((type)::text = 'GroupMember'::text));
+
+CREATE INDEX tmp_index_for_namespace_id_migration_on_routes ON routes USING btree (id) WHERE ((namespace_id IS NULL) AND ((source_type)::text = 'Namespace'::text));
+
+CREATE INDEX tmp_index_members_on_state ON members USING btree (state) WHERE (state = 2);
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 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_taggings_on_id_where_taggable_type_project ON taggings USING btree (id) WHERE ((taggable_type)::text = 'Project'::text);
+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_projects_on_id_and_runners_token_encrypted ON projects USING btree (id, runners_token_encrypted) WHERE (runners_token_encrypted IS NOT NULL);
CREATE UNIQUE INDEX uniq_pkgs_deb_grp_architectures_on_distribution_id_and_name ON packages_debian_group_architectures USING btree (distribution_id, name);
@@ -28117,15 +31106,49 @@ ALTER INDEX idx_audit_events_part_on_entity_id_desc_author_id_created_at ATTACH
ALTER INDEX audit_events_pkey ATTACH PARTITION gitlab_partitions_dynamic.audit_events_202307_pkey;
-ALTER INDEX incident_management_pending_alert_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202211_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 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 incident_management_pending_alert_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202212_pkey;
+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 index_incident_management_pending_alert_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_20221_rule_id_idx;
+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 index_incident_management_pending_alert_escalations_on_alert_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_2022_alert_id_idx;
+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 index_incident_management_pending_alert_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_2022_rule_id_idx1;
+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_202303_pkey;
+
+ALTER INDEX batched_background_migration_job_transition_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.batched_background_migration_job_transition_logs_202304_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 incident_management_pending_alert_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202301_pkey;
@@ -28141,6 +31164,10 @@ ALTER INDEX incident_management_pending_alert_escalations_pkey ATTACH PARTITION
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 index_incident_management_pending_alert_escalations_on_alert_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_2023_alert_id_idx;
@@ -28157,7 +31184,9 @@ ALTER INDEX index_incident_management_pending_alert_escalations_on_rule_id ATTAC
ALTER INDEX index_incident_management_pending_alert_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_2023_rule_id_idx6;
-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_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_2023_rule_id_idx7;
+
+ALTER INDEX index_incident_management_pending_alert_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_2023_rule_id_idx8;
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;
@@ -28171,33 +31200,9 @@ ALTER INDEX index_incident_management_pending_alert_escalations_on_alert_id ATTA
ALTER INDEX index_incident_management_pending_alert_escalations_on_alert_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202_alert_id_idx7;
-ALTER INDEX index_incident_management_pending_alert_escalations_on_schedule ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations_2_schedule_id_idx;
-
-ALTER INDEX index_incident_management_pending_alert_escalations_on_schedule ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations__schedule_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_idx8;
-ALTER INDEX index_incident_management_pending_alert_escalations_on_schedule ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations__schedule_id_idx2;
-
-ALTER INDEX index_incident_management_pending_alert_escalations_on_schedule ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations__schedule_id_idx3;
-
-ALTER INDEX index_incident_management_pending_alert_escalations_on_schedule ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations__schedule_id_idx4;
-
-ALTER INDEX index_incident_management_pending_alert_escalations_on_schedule ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations__schedule_id_idx5;
-
-ALTER INDEX index_incident_management_pending_alert_escalations_on_schedule ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations__schedule_id_idx6;
-
-ALTER INDEX index_incident_management_pending_alert_escalations_on_schedule ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations__schedule_id_idx7;
-
-ALTER INDEX index_incident_management_pending_alert_escalations_on_schedule ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_alert_escalations__schedule_id_idx8;
-
-ALTER INDEX incident_management_pending_issue_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202211_pkey;
-
-ALTER INDEX incident_management_pending_issue_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202212_pkey;
-
-ALTER INDEX index_incident_management_pending_issue_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_20221_rule_id_idx;
-
-ALTER INDEX index_incident_management_pending_issue_escalations_on_issue_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_2022_issue_id_idx;
-
-ALTER INDEX index_incident_management_pending_issue_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_2022_rule_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_idx9;
ALTER INDEX incident_management_pending_issue_escalations_pkey ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202301_pkey;
@@ -28213,6 +31218,10 @@ ALTER INDEX incident_management_pending_issue_escalations_pkey ATTACH PARTITION
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 index_incident_management_pending_issue_escalations_on_issue_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_2023_issue_id_idx;
@@ -28229,7 +31238,9 @@ ALTER INDEX index_incident_management_pending_issue_escalations_on_rule_id ATTAC
ALTER INDEX index_incident_management_pending_issue_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_2023_rule_id_idx6;
-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_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_2023_rule_id_idx7;
+
+ALTER INDEX index_incident_management_pending_issue_escalations_on_rule_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_2023_rule_id_idx8;
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;
@@ -28243,31 +31254,57 @@ ALTER INDEX index_incident_management_pending_issue_escalations_on_issue_id ATTA
ALTER INDEX index_incident_management_pending_issue_escalations_on_issue_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202_issue_id_idx7;
+ALTER INDEX index_incident_management_pending_issue_escalations_on_issue_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202_issue_id_idx8;
+
+ALTER INDEX index_incident_management_pending_issue_escalations_on_issue_id ATTACH PARTITION gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202_issue_id_idx9;
+
+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_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.index_1554dc6f11;
ALTER INDEX index_web_hook_logs_part_on_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.index_719c6187cb;
-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_created_at_and_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.index_962081978f;
-ALTER INDEX index_web_hook_logs_part_on_created_at_and_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.index_eecfac613f;
-
ALTER INDEX index_web_hook_logs_part_on_created_at_and_web_hook_id ATTACH PARTITION gitlab_partitions_dynamic.index_fdb8d5eeea;
-ALTER INDEX loose_foreign_keys_deleted_records_pkey ATTACH PARTITION gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_000000_pkey;
+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_202302_pkey;
+
+ALTER INDEX index_verification_codes_on_phone_and_visitor_id_code ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202302_visitor_id_code_phone_created_at_idx;
+
+ALTER INDEX verification_codes_pkey ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202303_pkey;
-ALTER INDEX loose_foreign_keys_deleted_records_pkey ATTACH PARTITION gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_202212_pkey;
+ALTER INDEX index_verification_codes_on_phone_and_visitor_id_code ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202303_visitor_id_code_phone_created_at_idx;
-ALTER INDEX loose_foreign_keys_deleted_records_pkey ATTACH PARTITION gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_202301_pkey;
+ALTER INDEX verification_codes_pkey ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202304_pkey;
-ALTER INDEX loose_foreign_keys_deleted_records_pkey ATTACH PARTITION gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_202302_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 loose_foreign_keys_deleted_records_pkey ATTACH PARTITION gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_202303_pkey;
+ALTER INDEX verification_codes_pkey ATTACH PARTITION gitlab_partitions_dynamic.verification_codes_202305_pkey;
-ALTER INDEX loose_foreign_keys_deleted_records_pkey ATTACH PARTITION gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_202304_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 web_hook_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_000000_pkey;
+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 web_hook_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.web_hook_logs_202212_pkey;
@@ -28309,6 +31346,18 @@ ALTER INDEX web_hook_logs_pkey ATTACH PARTITION gitlab_partitions_dynamic.web_ho
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 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;
@@ -28437,6 +31486,902 @@ ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PAR
ALTER INDEX analytics_cycle_analytics_merge_request_stage_events_pkey ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_31_pkey;
+ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_000925dbd7;
+
+ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_006f943df6;
+
+ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_02749b504c;
+
+ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_0287f5ba09;
+
+ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_03aa30a758;
+
+ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_055179c3ea;
+
+ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_061fe00461;
+
+ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_070cef72c3;
+
+ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_08e3cfc564;
+
+ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_09af45dd6f;
+
+ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_0c153e2eae;
+
+ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_0ca85f3d71;
+
+ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_0d837a5dda;
+
+ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_0f28a65451;
+
+ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_10588dbff0;
+
+ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_107e123e17;
+
+ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_1230a7a402;
+
+ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_142c4e7ea4;
+
+ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_14e4fa1d7d;
+
+ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_14f3645821;
+
+ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_16627b455e;
+
+ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_1a0388713a;
+
+ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_1a349ed064;
+
+ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_1af932a3c7;
+
+ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_1b0ea30bdb;
+
+ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_1f6c3faabe;
+
+ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_1f8af04ed1;
+
+ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_201c5ddbe9;
+
+ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_20353089e0;
+
+ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_206349925b;
+
+ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_21db459e34;
+
+ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_21e262390a;
+
+ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_2208bd7d7f;
+
+ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_223592b4a1;
+
+ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_22acc9ab11;
+
+ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_22ed8f01dd;
+
+ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_234d38a657;
+
+ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_23783dc748;
+
+ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_241e9a574c;
+
+ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_24ac321751;
+
+ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_25e2aaee9b;
+
+ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_2653e7eeb8;
+
+ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_2745f5a388;
+
+ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_27759556bc;
+
+ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_27d7ad78d8;
+
+ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_281840d2d1;
+
+ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_296f64df5c;
+
+ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_2ad4b4fdbc;
+
+ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_2b7c0a294e;
+
+ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_2c6422f668;
+
+ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_2dfcdbe81e;
+
+ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_2e1054b181;
+
+ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_2e6991d05b;
+
+ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_2f80c360c3;
+
+ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_2fc271c673;
+
+ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_2fcfd0dc70;
+
+ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_3005c75335;
+
+ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_3206c1e6af;
+
+ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_3249505125;
+
+ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_331eb67441;
+
+ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_3640194b77;
+
+ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_372160a706;
+
+ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_38a538234e;
+
+ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_39625b8a41;
+
+ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_399dc06649;
+
+ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_3a10b315c0;
+
+ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_3c2a3a6ac9;
+
+ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_3e6be332b7;
+
+ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_41a1c3a4c6;
+
+ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_435802dd01;
+
+ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_436fa9ad5f;
+
+ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_453a659cb6;
+
+ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_46b989b294;
+
+ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_47638677a3;
+
+ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_4810ac88f5;
+
+ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_491b4b749e;
+
+ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_4a243772d7;
+
+ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_4b1793a4c4;
+
+ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_4b22560035;
+
+ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_4c2645eef2;
+
+ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_4c9d14f978;
+
+ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_4d04210a95;
+
+ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_4d4f2f7de6;
+
+ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_4db5aa5872;
+
+ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_4dead6f314;
+
+ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_4e6ce1c371;
+
+ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_4f2eb7a06b;
+
+ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_4f6fc34e57;
+
+ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_50c09f6e04;
+
+ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_5111e3e7e7;
+
+ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_52ea79bf8e;
+
+ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_541cc045fc;
+
+ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_551676e972;
+
+ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_56281bfb73;
+
+ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_5660b1b38e;
+
+ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_59a8209ab6;
+
+ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_59ce40fcc4;
+
+ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_5a5f39d824;
+
+ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_5b613b5fcf;
+
+ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_5b944f308d;
+
+ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_5bc2f32084;
+
+ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_5c4053b63d;
+
+ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_5db09170d4;
+
+ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_5ee060202f;
+
+ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_5f24f6ead2;
+
+ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_5f96b344e2;
+
+ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_5fb1867c41;
+
+ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_5fe1d00845;
+
+ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_60e3480f23;
+
+ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_6137e27484;
+
+ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_620fe77c99;
+
+ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_625ed9e965;
+
+ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_64e3a1dfa1;
+
+ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_64eb4cf8bd;
+
+ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_6580ecb2db;
+
+ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_682eba05f6;
+
+ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_69bdcf213e;
+
+ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_6a39f6d5ac;
+
+ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_6add8e74cf;
+
+ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_6b1ce61c8f;
+
+ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_6cfb391b86;
+
+ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_6e6c2e6a1d;
+
+ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_6ea423bbd1;
+
+ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_6ec4c4afd4;
+
+ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_6f4e0abe54;
+
+ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_6fa47e1334;
+
+ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_70c657954b;
+
+ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_71c2b26944;
+
+ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_72027c157f;
+
+ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_739845f617;
+
+ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_74addd1240;
+
+ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_75dc81d1d7;
+
+ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_765b0cd8db;
+
+ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_77096a1dc6;
+
+ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_77c6293242;
+
+ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_7b7c85eceb;
+
+ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_7da2307d2e;
+
+ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_7ead2300ca;
+
+ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_7ecb5b68b4;
+
+ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_807671c4be;
+
+ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_807fa83fc0;
+
+ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_80c65daf20;
+
+ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_81b9cf594f;
+
+ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_82c675952c;
+
+ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_83c5049b3e;
+
+ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_83edf231b8;
+
+ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_844abd2888;
+
+ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_8464227c80;
+
+ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_8685d7c69c;
+
+ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_8688b40056;
+
+ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_87d40fb9f9;
+
+ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_88b40d6740;
+
+ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_89c79afe5c;
+
+ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_8a0fc3de4f;
+
+ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_8b9f9a19a4;
+
+ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_8fb48e72ce;
+
+ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_9201b952a0;
+
+ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_92c09e352b;
+
+ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_9490e0e0b7;
+
+ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_95a353f50b;
+
+ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_971af9481e;
+
+ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_9955b1dc59;
+
+ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_9b8e89ae41;
+
+ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_9ee83b068b;
+
+ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_a1a9dc36c1;
+
+ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_a2d9f185a5;
+
+ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_a3feed3097;
+
+ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_a6999c65c9;
+
+ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_a6c68d16b2;
+
+ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_a8276a450f;
+
+ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_a88f20fc98;
+
+ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_a9424aa392;
+
+ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_a99cee1904;
+
+ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_a9deff2159;
+
+ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_aabc184267;
+
+ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_ab22231a16;
+
+ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_abbdf80ab1;
+
+ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_adc159c3fe;
+
+ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_aed7f7b10c;
+
+ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_aee84adb5b;
+
+ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_b1dda405af;
+
+ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_b607012614;
+
+ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_b7f21460bb;
+
+ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_b83fe1306b;
+
+ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_bc189e47ab;
+
+ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_bca83177ef;
+
+ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_bedd7e160b;
+
+ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_bee2b94a80;
+
+ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_c08e669dfa;
+
+ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_c09bb66559;
+
+ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_c119f5b92e;
+
+ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_c17dae3605;
+
+ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_c1cdd90d0d;
+
+ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_c2b951bf20;
+
+ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_c42b2e7eae;
+
+ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_c435d904ce;
+
+ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_c473921734;
+
+ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_c546bb0736;
+
+ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_c59cde6209;
+
+ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_c66758baa7;
+
+ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_c6ea8a0e26;
+
+ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_c8c4219c0a;
+
+ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_c971e6c5ce;
+
+ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_c9b14a3d9f;
+
+ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_cbb61ea269;
+
+ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_cc0ba6343b;
+
+ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_cd2b2939a4;
+
+ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_cda41e106e;
+
+ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_cfa4237c83;
+
+ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_d01ea0126a;
+
+ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_d0d285c264;
+
+ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_d27b4c84e7;
+
+ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_d2fe918e83;
+
+ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_d35c969634;
+
+ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_d6047ee813;
+
+ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_d69c2485f4;
+
+ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_d8fa9793ad;
+
+ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_d9384b768d;
+
+ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_dc571ba649;
+
+ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_df62a8c50e;
+
+ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_e1a4f994d8;
+
+ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_e3d1fd5b19;
+
+ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_e3d6234929;
+
+ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_e54adf9acb;
+
+ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_e6405afea0;
+
+ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_e64588e276;
+
+ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_e716b8ac3f;
+
+ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_e73bc5ba6a;
+
+ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_e8f3a327b2;
+
+ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_ea0c2d3361;
+
+ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_eb558957f0;
+
+ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_ec25d494e6;
+
+ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_ed094a4f13;
+
+ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_ee4c549a2d;
+
+ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_ef6a48bd29;
+
+ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_ef7be2ae94;
+
+ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_f0cdd09a5e;
+
+ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_f112fae8ac;
+
+ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_f1c3d14cdc;
+
+ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_f256d3f6a1;
+
+ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_f2848acfc7;
+
+ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_f3d7d86e09;
+
+ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_f47327ec1f;
+
+ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_f6b0d458a3;
+
+ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_f705dc8541;
+
+ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_f76e8a5304;
+
+ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_f86acdc2ff;
+
+ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_f878aab8e3;
+
+ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_f902c261ce;
+
+ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_fbccc855cf;
+
+ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_fbf2d3310b;
+
+ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_fccbe45c32;
+
+ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_fee429223e;
+
+ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_ff00c038cc;
+
+ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_ff39be5400;
+
+ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_ff8741d8d7;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_00_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_00_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_00_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_01_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_01_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_01_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_02_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_02_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_02_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_03_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_03_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_03_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_04_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_04_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_04_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_05_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_05_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_05_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_06_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_06_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_06_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_07_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_07_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_07_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_08_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_08_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_08_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_09_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_09_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_09_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_10_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_10_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_10_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_11_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_11_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_11_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_12_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_12_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_12_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_13_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_13_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_13_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_14_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_14_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_14_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_15_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_15_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_15_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_16_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_16_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_16_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_17_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_17_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_17_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_18_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_18_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_18_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_19_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_19_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_19_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_20_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_20_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_20_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_21_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_21_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_21_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_22_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_22_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_22_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_23_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_23_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_23_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_24_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_24_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_24_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_25_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_25_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_25_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_26_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_26_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_26_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_27_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_27_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_27_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_28_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_28_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_28_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_29_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_29_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_29_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_30_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_30_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_30_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_31_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_31_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_31_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_32_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_32_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_32_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_33_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_33_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_33_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_34_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_34_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_34_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_35_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_35_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_35_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_36_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_36_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_36_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_37_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_37_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_37_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_38_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_38_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_38_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_39_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_39_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_39_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_40_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_40_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_40_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_41_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_41_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_41_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_42_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_42_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_42_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_43_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_43_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_43_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_44_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_44_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_44_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_45_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_45_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_45_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_46_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_46_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_46_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_47_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_47_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_47_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_48_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_48_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_48_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_49_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_49_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_49_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_50_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_50_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_50_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_51_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_51_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_51_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_52_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_52_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_52_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_53_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_53_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_53_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_54_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_54_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_54_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_55_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_55_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_55_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_56_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_56_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_56_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_57_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_57_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_57_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_58_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_58_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_58_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_59_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_59_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_59_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_60_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_60_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_60_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_61_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_61_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_61_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_62_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_62_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_62_search_vector_idx;
+
+ALTER INDEX index_issue_search_data_on_issue_id ATTACH PARTITION gitlab_partitions_static.issue_search_data_63_issue_id_idx;
+
+ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.issue_search_data_63_pkey;
+
+ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_63_search_vector_idx;
+
ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx10;
ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx11;
@@ -28693,31 +32638,23 @@ 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;
-CREATE TRIGGER trigger_07c94931164e BEFORE INSERT OR UPDATE ON push_event_payloads FOR EACH ROW EXECUTE FUNCTION trigger_07c94931164e();
-
-CREATE TRIGGER trigger_21e7a2602957 BEFORE INSERT OR UPDATE ON ci_build_needs FOR EACH ROW EXECUTE FUNCTION trigger_21e7a2602957();
-
-CREATE TRIGGER trigger_3f6129be01d2 BEFORE INSERT OR UPDATE ON ci_builds FOR EACH ROW EXECUTE FUNCTION trigger_3f6129be01d2();
-
-CREATE TRIGGER trigger_490d204c00b3 BEFORE INSERT OR UPDATE ON ci_stages FOR EACH ROW EXECUTE FUNCTION trigger_490d204c00b3();
+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 trigger_542d6c2ad72e BEFORE INSERT OR UPDATE ON ci_builds_metadata FOR EACH ROW EXECUTE FUNCTION trigger_542d6c2ad72e();
+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();
-CREATE TRIGGER trigger_69523443cc10 BEFORE INSERT OR UPDATE ON events FOR EACH ROW EXECUTE FUNCTION trigger_69523443cc10();
+CREATE TRIGGER ci_job_artifacts_loose_fk_trigger AFTER DELETE ON ci_job_artifacts REFERENCING OLD TABLE AS old_table FOR EACH STATEMENT EXECUTE FUNCTION insert_into_loose_foreign_keys_deleted_records();
-CREATE TRIGGER trigger_77f5e1d20482 BEFORE INSERT OR UPDATE ON deployments FOR EACH ROW EXECUTE FUNCTION trigger_77f5e1d20482();
+CREATE TRIGGER ci_pipelines_loose_fk_trigger AFTER DELETE ON ci_pipelines REFERENCING OLD TABLE AS old_table FOR EACH STATEMENT EXECUTE FUNCTION insert_into_loose_foreign_keys_deleted_records();
-CREATE TRIGGER trigger_8485e97c00e3 BEFORE INSERT OR UPDATE ON ci_sources_pipelines FOR EACH ROW EXECUTE FUNCTION trigger_8485e97c00e3();
+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 trigger_8487d4de3e7b BEFORE INSERT OR UPDATE ON ci_builds_metadata FOR EACH ROW EXECUTE FUNCTION trigger_8487d4de3e7b();
+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 trigger_91dc388a5fe6 BEFORE INSERT OR UPDATE ON dep_ci_build_trace_sections FOR EACH ROW EXECUTE FUNCTION trigger_91dc388a5fe6();
+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 trigger_aebe8b822ad3 BEFORE INSERT OR UPDATE ON taggings FOR EACH ROW EXECUTE FUNCTION trigger_aebe8b822ad3();
+CREATE TRIGGER projects_loose_fk_trigger AFTER DELETE ON projects REFERENCING OLD TABLE AS old_table FOR EACH STATEMENT EXECUTE FUNCTION insert_into_loose_foreign_keys_deleted_records();
-CREATE TRIGGER trigger_cf2f9e35f002 BEFORE INSERT OR UPDATE ON ci_build_trace_chunks FOR EACH ROW EXECUTE FUNCTION trigger_cf2f9e35f002();
-
-CREATE TRIGGER trigger_f1ca8ec18d78 BEFORE INSERT OR UPDATE ON geo_job_artifact_deleted_events FOR EACH ROW EXECUTE FUNCTION trigger_f1ca8ec18d78();
+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();
@@ -28733,7 +32670,52 @@ CREATE TRIGGER trigger_has_external_wiki_on_type_new_updated AFTER UPDATE OF typ
CREATE TRIGGER trigger_has_external_wiki_on_update AFTER UPDATE ON integrations FOR EACH ROW WHEN (((new.type_new = 'Integrations::ExternalWiki'::text) AND (old.active <> new.active) AND (new.project_id IS NOT NULL))) EXECUTE FUNCTION set_has_external_wiki();
-CREATE TRIGGER trigger_type_new_on_insert AFTER INSERT ON integrations FOR EACH ROW EXECUTE FUNCTION integrations_set_type_new();
+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_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_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_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();
+
+CREATE TRIGGER trigger_update_has_issues_on_vulnerability_issue_links_update AFTER INSERT ON vulnerability_issue_links FOR EACH ROW EXECUTE FUNCTION set_has_issues_on_vulnerability_reads();
+
+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 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 gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202211
+ ADD CONSTRAINT fk_rails_0470889ee5 FOREIGN KEY (rule_id) REFERENCES incident_management_escalation_rules(id) ON DELETE CASCADE;
+
+ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202212
+ ADD CONSTRAINT fk_rails_0470889ee5 FOREIGN KEY (rule_id) REFERENCES incident_management_escalation_rules(id) ON DELETE CASCADE;
+
+ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202211
+ ADD CONSTRAINT fk_rails_636678b3bd FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE;
+
+ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_issue_escalations_202212
+ ADD CONSTRAINT fk_rails_636678b3bd FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE;
+
+ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202211
+ ADD CONSTRAINT fk_rails_8d8de95da9 FOREIGN KEY (alert_id) REFERENCES alert_management_alerts(id) ON DELETE CASCADE;
+
+ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202212
+ ADD CONSTRAINT fk_rails_8d8de95da9 FOREIGN KEY (alert_id) REFERENCES alert_management_alerts(id) ON DELETE CASCADE;
+
+ALTER TABLE ONLY gitlab_partitions_dynamic.web_hook_logs_000000
+ ADD CONSTRAINT fk_rails_bb3355782d FOREIGN KEY (web_hook_id) REFERENCES web_hooks(id) ON DELETE CASCADE;
+
+ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202211
+ ADD CONSTRAINT fk_rails_f3d17bc8af FOREIGN KEY (rule_id) REFERENCES incident_management_escalation_rules(id) ON DELETE CASCADE;
+
+ALTER TABLE ONLY gitlab_partitions_dynamic.incident_management_pending_alert_escalations_202212
+ ADD CONSTRAINT fk_rails_f3d17bc8af FOREIGN KEY (rule_id) REFERENCES incident_management_escalation_rules(id) ON DELETE CASCADE;
ALTER TABLE ONLY chat_names
ADD CONSTRAINT fk_00797a2bf9 FOREIGN KEY (service_id) REFERENCES integrations(id) ON DELETE CASCADE;
@@ -28744,9 +32726,6 @@ ALTER TABLE ONLY deployments
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 clusters_applications_runners
- ADD CONSTRAINT fk_02de2ded36 FOREIGN KEY (runner_id) REFERENCES ci_runners(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;
@@ -28756,9 +32735,6 @@ ALTER TABLE ONLY service_desk_settings
ALTER TABLE ONLY design_management_designs_versions
ADD CONSTRAINT fk_03c671965c FOREIGN KEY (design_id) REFERENCES design_management_designs(id) ON DELETE CASCADE;
-ALTER TABLE ONLY terraform_state_versions
- ADD CONSTRAINT fk_04b91e4a9f FOREIGN KEY (ci_build_id) REFERENCES ci_builds(id) ON DELETE SET NULL;
-
ALTER TABLE ONLY issues
ADD CONSTRAINT fk_05f1e72feb FOREIGN KEY (author_id) REFERENCES users(id) ON DELETE SET NULL;
@@ -28771,6 +32747,9 @@ ALTER TABLE ONLY projects
ALTER TABLE ONLY dast_sites
ADD CONSTRAINT fk_0a57f2271b FOREIGN KEY (dast_site_validation_id) REFERENCES dast_site_validations(id) ON DELETE SET NULL;
+ALTER TABLE ONLY issue_customer_relations_contacts
+ ADD CONSTRAINT fk_0c0037f723 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY web_hooks
ADD CONSTRAINT fk_0c8ca6d9d1 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -28783,12 +32762,18 @@ ALTER TABLE ONLY lists
ALTER TABLE ONLY ci_unit_test_failures
ADD CONSTRAINT fk_0f09856e1f FOREIGN KEY (build_id) REFERENCES ci_builds(id) ON DELETE CASCADE;
+ALTER TABLE ONLY deployment_approvals
+ ADD CONSTRAINT fk_0f58311058 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY project_pages_metadata
ADD CONSTRAINT fk_0fd5b22688 FOREIGN KEY (pages_deployment_id) REFERENCES pages_deployments(id) ON DELETE SET NULL;
ALTER TABLE ONLY group_deletion_schedules
ADD CONSTRAINT fk_11e3ebfcdd FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
+ALTER TABLE ONLY member_tasks
+ ADD CONSTRAINT fk_12816d4bbb FOREIGN KEY (member_id) REFERENCES members(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY vulnerabilities
ADD CONSTRAINT fk_1302949740 FOREIGN KEY (last_edited_by_id) REFERENCES users(id) ON DELETE SET NULL;
@@ -28807,6 +32792,12 @@ ALTER TABLE ONLY internal_ids
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;
+
+ALTER TABLE ONLY incident_management_timeline_events
+ ADD CONSTRAINT fk_1800597ef9 FOREIGN KEY (author_id) REFERENCES users(id) ON DELETE SET NULL;
+
ALTER TABLE ONLY project_features
ADD CONSTRAINT fk_18513d9b92 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -28819,15 +32810,18 @@ ALTER TABLE ONLY analytics_devops_adoption_segments
ALTER TABLE ONLY user_details
ADD CONSTRAINT fk_190e4fcc88 FOREIGN KEY (provisioned_by_group_id) REFERENCES namespaces(id) ON DELETE SET NULL;
+ALTER TABLE ONLY agent_project_authorizations
+ ADD CONSTRAINT fk_1d30bb4987 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY vulnerabilities
ADD CONSTRAINT fk_1d37cddf91 FOREIGN KEY (epic_id) REFERENCES epics(id) ON DELETE SET NULL;
-ALTER TABLE ONLY ci_sources_pipelines
- ADD CONSTRAINT fk_1e53c97c0a FOREIGN KEY (project_id) REFERENCES projects(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 coverage_fuzzing_corpuses
+ ADD CONSTRAINT fk_204d40056a FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY geo_container_repository_updated_events
ADD CONSTRAINT fk_212c89c706 FOREIGN KEY (container_repository_id) REFERENCES container_repositories(id) ON DELETE CASCADE;
@@ -28840,35 +32834,38 @@ 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 ci_stages
- ADD CONSTRAINT fk_2360681d1d FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY import_failures
ADD CONSTRAINT fk_24b824da43 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
ALTER TABLE ONLY project_ci_cd_settings
ADD CONSTRAINT fk_24c15d2f2e FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ALTER TABLE ONLY agent_activity_events
+ ADD CONSTRAINT fk_256c631779 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE SET NULL;
+
ALTER TABLE ONLY epics
ADD CONSTRAINT fk_25b99c1be3 FOREIGN KEY (parent_id) REFERENCES epics(id) ON DELETE CASCADE;
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 dep_ci_build_trace_sections
- ADD CONSTRAINT fk_264e112c66 FOREIGN KEY (section_name_id) REFERENCES dep_ci_build_trace_section_names(id) ON DELETE CASCADE;
-
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 merge_requests_compliance_violations
+ ADD CONSTRAINT fk_290ec1ab02 FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE;
+
+ALTER TABLE ONLY coverage_fuzzing_corpuses
+ ADD CONSTRAINT fk_29f6f15f82 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY agent_group_authorizations
ADD CONSTRAINT fk_2c9f941965 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
-ALTER TABLE ONLY ci_freeze_periods
- ADD CONSTRAINT fk_2e02bbd1a6 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ALTER TABLE ONLY deployment_approvals
+ ADD CONSTRAINT fk_2d060dfc73 FOREIGN KEY (deployment_id) REFERENCES deployments(id) ON DELETE CASCADE;
ALTER TABLE ONLY notes
ADD CONSTRAINT fk_2e82291620 FOREIGN KEY (review_id) REFERENCES reviews(id) ON DELETE SET NULL;
@@ -28891,9 +32888,6 @@ 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 ci_group_variables
- ADD CONSTRAINT fk_33ae4d58d8 FOREIGN KEY (group_id) REFERENCES namespaces(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;
@@ -28912,12 +32906,18 @@ ALTER TABLE ONLY sprints
ALTER TABLE ONLY push_event_payloads
ADD CONSTRAINT fk_36c74129da FOREIGN KEY (event_id) REFERENCES events(id) ON DELETE CASCADE;
+ALTER TABLE ONLY incident_management_timeline_events
+ ADD CONSTRAINT fk_38a74279df FOREIGN KEY (updated_by_user_id) REFERENCES users(id) ON DELETE SET NULL;
+
ALTER TABLE ONLY bulk_import_exports
ADD CONSTRAINT fk_39c726d3b5 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
ALTER TABLE ONLY ci_builds
ADD CONSTRAINT fk_3a9eaa254d FOREIGN KEY (stage_id) REFERENCES ci_stages(id) ON DELETE CASCADE;
+ALTER TABLE ONLY agent_activity_events
+ ADD CONSTRAINT fk_3af186389b FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE SET NULL;
+
ALTER TABLE ONLY issues
ADD CONSTRAINT fk_3b8c72ea56 FOREIGN KEY (sprint_id) REFERENCES sprints(id) ON DELETE SET NULL;
@@ -28927,14 +32927,17 @@ 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 ci_pipeline_schedule_variables
ADD CONSTRAINT fk_41c35fda51 FOREIGN KEY (pipeline_schedule_id) REFERENCES ci_pipeline_schedules(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 ci_runner_projects
- ADD CONSTRAINT fk_4478a6f1e4 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;
ALTER TABLE ONLY todos
ADD CONSTRAINT fk_45054f9c45 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -28945,8 +32948,8 @@ 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 dep_ci_build_trace_sections
- ADD CONSTRAINT fk_4ebe41f502 FOREIGN KEY (build_id) REFERENCES ci_builds(id) ON DELETE CASCADE;
+ALTER TABLE ONLY vulnerability_reads
+ ADD CONSTRAINT fk_5001652292 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
ALTER TABLE ONLY alert_management_alerts
ADD CONSTRAINT fk_51ab4b6089 FOREIGN KEY (prometheus_alert_id) REFERENCES prometheus_alerts(id) ON DELETE CASCADE;
@@ -28954,9 +32957,6 @@ 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 dast_site_profiles_pipelines
- ADD CONSTRAINT fk_53849b0ad5 FOREIGN KEY (ci_pipeline_id) REFERENCES ci_pipelines(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;
@@ -28996,14 +32996,17 @@ ALTER TABLE ONLY dast_profile_schedules
ALTER TABLE ONLY events
ADD CONSTRAINT fk_61fbf6ca48 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+ALTER TABLE ONLY vulnerability_reads
+ ADD CONSTRAINT fk_62736f638f FOREIGN KEY (vulnerability_id) REFERENCES vulnerabilities(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY merge_requests
ADD CONSTRAINT fk_641731faff FOREIGN KEY (updated_by_id) REFERENCES users(id) ON DELETE SET NULL;
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 project_pages_metadata
- ADD CONSTRAINT fk_69366a119e FOREIGN KEY (artifacts_archive_id) REFERENCES ci_job_artifacts(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;
@@ -29011,6 +33014,9 @@ ALTER TABLE ONLY application_settings
ALTER TABLE ONLY merge_requests
ADD CONSTRAINT fk_6a5165a692 FOREIGN KEY (milestone_id) REFERENCES milestones(id) ON DELETE SET NULL;
+ALTER TABLE ONLY namespaces
+ ADD CONSTRAINT fk_6a77f66919 FOREIGN KEY (tmp_project_id) REFERENCES projects(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY geo_event_log
ADD CONSTRAINT fk_6ada82d42a FOREIGN KEY (container_repository_updated_event_id) REFERENCES geo_container_repository_updated_events(id) ON DELETE CASCADE;
@@ -29027,7 +33033,7 @@ ALTER TABLE ONLY protected_branch_push_access_levels
ADD CONSTRAINT fk_7111b68cdb FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
ALTER TABLE ONLY projects
- ADD CONSTRAINT fk_71625606ac FOREIGN KEY (project_namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+ ADD CONSTRAINT fk_71625606ac FOREIGN KEY (project_namespace_id) REFERENCES namespaces(id) ON DELETE SET NULL;
ALTER TABLE ONLY integrations
ADD CONSTRAINT fk_71cce407f9 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -29047,9 +33053,6 @@ ALTER TABLE ONLY vulnerabilities
ALTER TABLE ONLY oauth_openid_requests
ADD CONSTRAINT fk_77114b3b09 FOREIGN KEY (access_grant_id) REFERENCES oauth_access_grants(id) ON DELETE CASCADE;
-ALTER TABLE ONLY ci_resource_groups
- ADD CONSTRAINT fk_774722d144 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY users
ADD CONSTRAINT fk_789cd90b35 FOREIGN KEY (accepted_term_id) REFERENCES application_setting_terms(id) ON DELETE CASCADE;
@@ -29062,15 +33065,15 @@ ALTER TABLE ONLY analytics_devops_adoption_snapshots
ALTER TABLE ONLY lists
ADD CONSTRAINT fk_7a5553d60f FOREIGN KEY (label_id) REFERENCES labels(id) ON DELETE CASCADE;
-ALTER TABLE ONLY ci_unit_tests
- ADD CONSTRAINT fk_7a8fabf0a8 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY protected_branches
ADD CONSTRAINT fk_7a9c6d93e7 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
ALTER TABLE ONLY vulnerabilities
ADD CONSTRAINT fk_7ac31eacb9 FOREIGN KEY (updated_by_id) REFERENCES users(id) ON DELETE SET NULL;
+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 vulnerabilities
ADD CONSTRAINT fk_7c5bb22a22 FOREIGN KEY (due_date_sourcing_milestone_id) REFERENCES milestones(id) ON DELETE SET NULL;
@@ -29104,9 +33107,6 @@ ALTER TABLE ONLY merge_request_diffs
ALTER TABLE ONLY requirements
ADD CONSTRAINT fk_85044baef0 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE;
-ALTER TABLE ONLY ci_pipelines
- ADD CONSTRAINT fk_86635dbd80 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY geo_event_log
ADD CONSTRAINT fk_86c84214ec FOREIGN KEY (repository_renamed_event_id) REFERENCES geo_repository_renamed_events(id) ON DELETE CASCADE;
@@ -29140,9 +33140,6 @@ ALTER TABLE ONLY releases
ALTER TABLE ONLY protected_tags
ADD CONSTRAINT fk_8e4af87648 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-ALTER TABLE ONLY ci_pipeline_schedules
- ADD CONSTRAINT fk_8ead60fcc4 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY todos
ADD CONSTRAINT fk_91d1f47b13 FOREIGN KEY (note_id) REFERENCES notes(id) ON DELETE CASCADE;
@@ -29188,15 +33185,15 @@ ALTER TABLE ONLY issues
ALTER TABLE ONLY epics
ADD CONSTRAINT fk_9d480c64b2 FOREIGN KEY (start_date_sourcing_epic_id) REFERENCES epics(id) ON DELETE SET NULL;
+ALTER TABLE ONLY user_group_callouts
+ ADD CONSTRAINT fk_9dc8b9d4b2 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY protected_environments
ADD CONSTRAINT fk_9e112565b7 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
ALTER TABLE ONLY alert_management_alerts
ADD CONSTRAINT fk_9e49e5c2b7 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-ALTER TABLE ONLY ci_pipeline_schedules
- ADD CONSTRAINT fk_9ea99f58d2 FOREIGN KEY (owner_id) REFERENCES users(id) ON DELETE SET NULL;
-
ALTER TABLE ONLY protected_branch_push_access_levels
ADD CONSTRAINT fk_9ffc86a3d9 FOREIGN KEY (protected_branch_id) REFERENCES protected_branches(id) ON DELETE CASCADE;
@@ -29209,15 +33206,9 @@ 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 ci_pipelines
- ADD CONSTRAINT fk_a23be95014 FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY todos
ADD CONSTRAINT fk_a27c483435 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
-ALTER TABLE ONLY dast_site_profiles_builds
- ADD CONSTRAINT fk_a325505e99 FOREIGN KEY (ci_build_id) REFERENCES ci_builds(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY jira_connect_subscriptions
ADD CONSTRAINT fk_a3c10bcf7d FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
@@ -29227,12 +33218,12 @@ ALTER TABLE ONLY bulk_import_entities
ALTER TABLE ONLY users
ADD CONSTRAINT fk_a4b8fefe3e FOREIGN KEY (managing_group_id) REFERENCES namespaces(id) ON DELETE SET NULL;
+ALTER TABLE ONLY security_orchestration_policy_configurations
+ ADD CONSTRAINT fk_a50430b375 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY lfs_objects_projects
ADD CONSTRAINT fk_a56e02279c FOREIGN KEY (lfs_object_id) REFERENCES lfs_objects(id) ON DELETE RESTRICT NOT VALID;
-ALTER TABLE ONLY dast_profiles_pipelines
- ADD CONSTRAINT fk_a60cad829d FOREIGN KEY (ci_pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY merge_requests
ADD CONSTRAINT fk_a6963e8447 FOREIGN KEY (target_project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -29242,6 +33233,9 @@ 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;
@@ -29251,21 +33245,21 @@ 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 ci_sources_pipelines
- ADD CONSTRAINT fk_acd9737679 FOREIGN KEY (source_project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ALTER TABLE ONLY member_tasks
+ ADD CONSTRAINT fk_ab636303dd FOREIGN KEY (project_id) REFERENCES projects(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;
-ALTER TABLE ONLY ci_variables
- ADD CONSTRAINT fk_ada5eb64b3 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 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;
@@ -29278,6 +33272,9 @@ ALTER TABLE ONLY vulnerabilities
ALTER TABLE ONLY project_access_tokens
ADD CONSTRAINT fk_b27801bfbf FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ALTER TABLE ONLY vulnerability_reads
+ ADD CONSTRAINT fk_b28c28abf1 FOREIGN KEY (scanner_id) REFERENCES vulnerability_scanners(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY issues
ADD CONSTRAINT fk_b37be69be6 FOREIGN KEY (work_item_type_id) REFERENCES work_item_types(id);
@@ -29296,6 +33293,9 @@ ALTER TABLE ONLY external_status_checks_protected_branches
ALTER TABLE ONLY issue_assignees
ADD CONSTRAINT fk_b7d881734a FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE;
+ALTER TABLE ONLY agent_project_authorizations
+ ADD CONSTRAINT fk_b7fe9b4777 FOREIGN KEY (agent_id) REFERENCES cluster_agents(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;
@@ -29323,21 +33323,18 @@ ALTER TABLE ONLY ci_sources_pipelines
ALTER TABLE ONLY packages_maven_metadata
ADD CONSTRAINT fk_be88aed360 FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE CASCADE;
-ALTER TABLE ONLY ci_builds
- ADD CONSTRAINT fk_befce0568a FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY design_management_versions
ADD CONSTRAINT fk_c1440b4896 FOREIGN KEY (author_id) REFERENCES users(id) ON DELETE SET NULL;
ALTER TABLE ONLY packages_packages
ADD CONSTRAINT fk_c188f0dba4 FOREIGN KEY (creator_id) REFERENCES users(id) ON DELETE SET NULL;
-ALTER TABLE ONLY geo_event_log
- ADD CONSTRAINT fk_c1f241c70d FOREIGN KEY (upload_deleted_event_id) REFERENCES geo_upload_deleted_events(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;
+ALTER TABLE ONLY user_group_callouts
+ ADD CONSTRAINT fk_c366e12ec3 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY vulnerability_exports
ADD CONSTRAINT fk_c3d3cb5d0f FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
@@ -29350,6 +33347,12 @@ ALTER TABLE ONLY geo_event_log
ALTER TABLE ONLY issues
ADD CONSTRAINT fk_c63cbf6c25 FOREIGN KEY (closed_by_id) REFERENCES users(id) ON DELETE SET NULL;
+ALTER TABLE ONLY agent_activity_events
+ ADD CONSTRAINT fk_c815368376 FOREIGN KEY (agent_id) REFERENCES cluster_agents(id) ON DELETE CASCADE;
+
+ALTER TABLE ONLY agent_activity_events
+ ADD CONSTRAINT fk_c8b006d40f FOREIGN KEY (agent_token_id) REFERENCES cluster_agent_tokens(id) ON DELETE SET NULL;
+
ALTER TABLE ONLY issue_links
ADD CONSTRAINT fk_c900194ff2 FOREIGN KEY (source_id) REFERENCES issues(id) ON DELETE CASCADE;
@@ -29398,9 +33401,15 @@ ALTER TABLE ONLY ci_sources_pipelines
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;
+
ALTER TABLE ONLY lists
ADD CONSTRAINT fk_d6cf4279f7 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
+ALTER TABLE ONLY agent_activity_events
+ ADD CONSTRAINT fk_d6f785c9fc FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE SET NULL;
+
ALTER TABLE ONLY metrics_users_starred_dashboards
ADD CONSTRAINT fk_d76a2b9a8c FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -29446,11 +33455,8 @@ ALTER TABLE ONLY ci_builds_metadata
ALTER TABLE ONLY gitlab_subscriptions
ADD CONSTRAINT fk_e2595d00a1 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
-ALTER TABLE ONLY ci_triggers
- ADD CONSTRAINT fk_e3e63f966e FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-
-ALTER TABLE ONLY dast_scanner_profiles_builds
- ADD CONSTRAINT fk_e4c49200f8 FOREIGN KEY (ci_build_id) REFERENCES ci_builds(id) ON DELETE CASCADE;
+ALTER TABLE ONLY ci_builds
+ ADD CONSTRAINT fk_e4ef9c2f27 FOREIGN KEY (runner_id) REFERENCES ci_runners(id) ON DELETE SET NULL NOT VALID;
ALTER TABLE ONLY merge_requests
ADD CONSTRAINT fk_e719a85f8a FOREIGN KEY (author_id) REFERENCES users(id) ON DELETE SET NULL;
@@ -29473,12 +33479,6 @@ ALTER TABLE ONLY sprints
ALTER TABLE ONLY application_settings
ADD CONSTRAINT fk_e8a145f3a7 FOREIGN KEY (instance_administrators_group_id) REFERENCES namespaces(id) ON DELETE SET NULL;
-ALTER TABLE ONLY vulnerability_statistics
- ADD CONSTRAINT fk_e8b13c928f FOREIGN KEY (latest_pipeline_id) REFERENCES ci_pipelines(id) ON DELETE SET NULL;
-
-ALTER TABLE ONLY ci_triggers
- ADD CONSTRAINT fk_e8e10d1964 FOREIGN KEY (owner_id) REFERENCES users(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY integrations
ADD CONSTRAINT fk_e8fe908a34 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
@@ -29488,9 +33488,15 @@ ALTER TABLE ONLY pages_domains
ALTER TABLE ONLY application_settings
ADD CONSTRAINT fk_ec757bd087 FOREIGN KEY (file_template_project_id) REFERENCES projects(id) ON DELETE SET NULL;
+ALTER TABLE ONLY merge_requests_compliance_violations
+ ADD CONSTRAINT fk_ec881c1c6f FOREIGN KEY (violating_user_id) REFERENCES users(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY 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;
+
ALTER TABLE ONLY vulnerabilities
ADD CONSTRAINT fk_efb96ab1e2 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -29545,15 +33551,6 @@ 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 ci_daily_build_group_report_results
- ADD CONSTRAINT fk_fd1858fefd FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
-
-ALTER TABLE ONLY merge_requests
- ADD CONSTRAINT fk_fd82eae0b9 FOREIGN KEY (head_pipeline_id) REFERENCES ci_pipelines(id) ON DELETE SET NULL;
-
-ALTER TABLE ONLY ci_pending_builds
- ADD CONSTRAINT fk_fdc0137e4a FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY project_import_data
ADD CONSTRAINT fk_ffb9ee3a10 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -29608,15 +33605,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 ci_build_report_results
- ADD CONSTRAINT fk_rails_056d298d48 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-
-ALTER TABLE ONLY ci_daily_build_group_report_results
- ADD CONSTRAINT fk_rails_0667f7608c FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-
-ALTER TABLE ONLY ci_subscriptions_projects
- ADD CONSTRAINT fk_rails_0818751483 FOREIGN KEY (downstream_project_id) REFERENCES projects(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;
@@ -29635,6 +33623,9 @@ ALTER TABLE ONLY packages_debian_group_distributions
ALTER TABLE ONLY packages_conan_file_metadata
ADD CONSTRAINT fk_rails_0afabd9328 FOREIGN KEY (package_file_id) REFERENCES packages_package_files(id) ON DELETE CASCADE;
+ALTER TABLE ONLY related_epic_links
+ ADD CONSTRAINT fk_rails_0b72027748 FOREIGN KEY (target_id) REFERENCES epics(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY ci_build_pending_states
ADD CONSTRAINT fk_rails_0bbbfeaf9d FOREIGN KEY (build_id) REFERENCES ci_builds(id) ON DELETE CASCADE;
@@ -29701,6 +33692,9 @@ ALTER TABLE ONLY bulk_imports
ALTER TABLE ONLY diff_note_positions
ADD CONSTRAINT fk_rails_13c7212859 FOREIGN KEY (note_id) REFERENCES notes(id) ON DELETE CASCADE;
+ALTER TABLE ONLY analytics_cycle_analytics_aggregations
+ ADD CONSTRAINT fk_rails_13c8374c7a FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY users_security_dashboard_projects
ADD CONSTRAINT fk_rails_150cd5682c FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -29713,9 +33707,6 @@ ALTER TABLE ONLY project_deploy_tokens
ALTER TABLE ONLY analytics_cycle_analytics_project_stages
ADD CONSTRAINT fk_rails_1722574860 FOREIGN KEY (start_event_label_id) REFERENCES labels(id) ON DELETE CASCADE;
-ALTER TABLE ONLY packages_build_infos
- ADD CONSTRAINT fk_rails_17a9a0dffc FOREIGN KEY (pipeline_id) REFERENCES ci_pipelines(id) ON DELETE SET NULL;
-
ALTER TABLE ONLY security_orchestration_policy_rule_schedules
ADD CONSTRAINT fk_rails_17ade83f17 FOREIGN KEY (security_orchestration_policy_configuration_id) REFERENCES security_orchestration_policy_configurations(id) ON DELETE CASCADE;
@@ -29737,9 +33728,6 @@ ALTER TABLE ONLY bulk_import_failures
ALTER TABLE ONLY group_wiki_repositories
ADD CONSTRAINT fk_rails_19755e374b FOREIGN KEY (shard_id) REFERENCES shards(id) ON DELETE RESTRICT;
-ALTER TABLE ONLY open_project_tracker_data
- ADD CONSTRAINT fk_rails_1987546e48 FOREIGN KEY (service_id) REFERENCES integrations(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY gpg_signatures
ADD CONSTRAINT fk_rails_19d4f1c6f9 FOREIGN KEY (gpg_key_subkey_id) REFERENCES gpg_key_subkeys(id) ON DELETE SET NULL;
@@ -29788,9 +33776,6 @@ ALTER TABLE ONLY boards_epic_lists
ALTER TABLE ONLY approval_merge_request_rules_groups
ADD CONSTRAINT fk_rails_2020a7124a FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
-ALTER TABLE ONLY vulnerability_feedback
- ADD CONSTRAINT fk_rails_20976e6fd9 FOREIGN KEY (pipeline_id) REFERENCES ci_pipelines(id) ON DELETE SET NULL;
-
ALTER TABLE ONLY work_item_types
ADD CONSTRAINT fk_rails_20f694a960 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
@@ -29809,9 +33794,6 @@ 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 vulnerability_finding_evidence_responses
- ADD CONSTRAINT fk_rails_2390a09723 FOREIGN KEY (vulnerability_finding_evidence_id) REFERENCES vulnerability_finding_evidences(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;
@@ -29824,9 +33806,6 @@ ALTER TABLE ONLY incident_management_oncall_rotations
ALTER TABLE ONLY ci_unit_test_failures
ADD CONSTRAINT fk_rails_259da3e79c FOREIGN KEY (unit_test_id) REFERENCES ci_unit_tests(id) ON DELETE CASCADE;
-ALTER TABLE ONLY analytics_devops_adoption_snapshots
- ADD CONSTRAINT fk_rails_25da9a92c0 FOREIGN KEY (segment_id) REFERENCES analytics_devops_adoption_segments(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY cluster_agents
ADD CONSTRAINT fk_rails_25e9fc2d5d FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -29914,8 +33893,8 @@ ALTER TABLE ONLY container_repositories
ALTER TABLE ONLY clusters_applications_jupyter
ADD CONSTRAINT fk_rails_331f0aff78 FOREIGN KEY (oauth_application_id) REFERENCES oauth_applications(id) ON DELETE SET NULL;
-ALTER TABLE ONLY merge_request_metrics
- ADD CONSTRAINT fk_rails_33ae169d48 FOREIGN KEY (pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE;
+ALTER TABLE ONLY alert_management_alert_metric_images
+ ADD CONSTRAINT fk_rails_338e55b408 FOREIGN KEY (alert_id) REFERENCES alert_management_alerts(id) ON DELETE CASCADE;
ALTER TABLE ONLY suggestions
ADD CONSTRAINT fk_rails_33b03a535c FOREIGN KEY (note_id) REFERENCES notes(id) ON DELETE CASCADE;
@@ -29926,12 +33905,12 @@ ALTER TABLE ONLY requirements
ALTER TABLE ONLY metrics_dashboard_annotations
ADD CONSTRAINT fk_rails_345ab51043 FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE;
+ALTER TABLE ONLY group_features
+ ADD CONSTRAINT fk_rails_356514082b FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY wiki_page_slugs
ADD CONSTRAINT fk_rails_358b46be14 FOREIGN KEY (wiki_page_meta_id) REFERENCES wiki_page_meta(id) ON DELETE CASCADE;
-ALTER TABLE ONLY ci_job_token_project_scope_links
- ADD CONSTRAINT fk_rails_35f7f506ce FOREIGN KEY (added_by_id) REFERENCES users(id) ON DELETE SET NULL;
-
ALTER TABLE ONLY board_labels
ADD CONSTRAINT fk_rails_362b0600a3 FOREIGN KEY (label_id) REFERENCES labels(id) ON DELETE CASCADE;
@@ -29983,9 +33962,6 @@ ALTER TABLE ONLY snippet_user_mentions
ALTER TABLE ONLY clusters_applications_helm
ADD CONSTRAINT fk_rails_3e2b1c06bc FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE;
-ALTER TABLE ONLY packages_package_file_build_infos
- ADD CONSTRAINT fk_rails_3e3f630188 FOREIGN KEY (pipeline_id) REFERENCES ci_pipelines(id) ON DELETE SET NULL;
-
ALTER TABLE ONLY epic_user_mentions
ADD CONSTRAINT fk_rails_3eaf4d88cc FOREIGN KEY (epic_id) REFERENCES epics(id) ON DELETE CASCADE;
@@ -30001,18 +33977,15 @@ ALTER TABLE ONLY description_versions
ALTER TABLE ONLY clusters_kubernetes_namespaces
ADD CONSTRAINT fk_rails_40cc7ccbc3 FOREIGN KEY (cluster_project_id) REFERENCES cluster_projects(id) ON DELETE SET NULL;
+ALTER TABLE ONLY lfs_object_states
+ ADD CONSTRAINT fk_rails_4188448cd5 FOREIGN KEY (lfs_object_id) REFERENCES lfs_objects(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY geo_node_namespace_links
ADD CONSTRAINT fk_rails_41ff5fb854 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
ALTER TABLE ONLY epic_issues
ADD CONSTRAINT fk_rails_4209981af6 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE;
-ALTER TABLE ONLY ci_refs
- ADD CONSTRAINT fk_rails_4249db8cc3 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-
-ALTER TABLE ONLY security_orchestration_policy_configurations
- ADD CONSTRAINT fk_rails_42ed6c25ec FOREIGN KEY (security_policy_management_project_id) REFERENCES projects(id) ON DELETE RESTRICT;
-
ALTER TABLE ONLY ci_resources
ADD CONSTRAINT fk_rails_430336af2d FOREIGN KEY (resource_group_id) REFERENCES ci_resource_groups(id) ON DELETE CASCADE;
@@ -30058,18 +34031,9 @@ ALTER TABLE ONLY vulnerability_feedback
ALTER TABLE ONLY user_custom_attributes
ADD CONSTRAINT fk_rails_47b91868a8 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
-ALTER TABLE ONLY ci_pending_builds
- ADD CONSTRAINT fk_rails_480669c3b3 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY upcoming_reconciliations
ADD CONSTRAINT fk_rails_497b4938ac FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
-ALTER TABLE ONLY ci_pipeline_artifacts
- ADD CONSTRAINT fk_rails_4a70390ca6 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-
-ALTER TABLE ONLY ci_job_token_project_scope_links
- ADD CONSTRAINT fk_rails_4b2ee3290b FOREIGN KEY (source_project_id) REFERENCES projects(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY group_deletion_schedules
ADD CONSTRAINT fk_rails_4b8c694a6c FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
@@ -30094,6 +34058,9 @@ ALTER TABLE ONLY scim_identities
ALTER TABLE ONLY snippet_user_mentions
ADD CONSTRAINT fk_rails_4d3f96b2cb FOREIGN KEY (note_id) REFERENCES notes(id) ON DELETE CASCADE;
+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;
@@ -30103,9 +34070,6 @@ ALTER TABLE ONLY geo_repository_renamed_events
ALTER TABLE ONLY aws_roles
ADD CONSTRAINT fk_rails_4ed56f4720 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
-ALTER TABLE ONLY security_scans
- ADD CONSTRAINT fk_rails_4ef1e6b4c6 FOREIGN KEY (build_id) REFERENCES ci_builds(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY packages_debian_publications
ADD CONSTRAINT fk_rails_4fc8ebd03e FOREIGN KEY (distribution_id) REFERENCES packages_debian_project_distributions(id) ON DELETE CASCADE;
@@ -30118,9 +34082,6 @@ 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_project_monthly_usages
- ADD CONSTRAINT fk_rails_508bcd4aa6 FOREIGN KEY (project_id) REFERENCES projects(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;
@@ -30232,9 +34193,6 @@ ALTER TABLE ONLY evidences
ALTER TABLE ONLY jira_imports
ADD CONSTRAINT fk_rails_63cbe52ada FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-ALTER TABLE ONLY vulnerability_occurrence_pipelines
- ADD CONSTRAINT fk_rails_6421e35d7d FOREIGN KEY (pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY group_deploy_tokens
ADD CONSTRAINT fk_rails_6477b01f6b FOREIGN KEY (deploy_token_id) REFERENCES deploy_tokens(id) ON DELETE CASCADE;
@@ -30244,9 +34202,6 @@ ALTER TABLE ONLY reviews
ALTER TABLE ONLY operations_feature_flags
ADD CONSTRAINT fk_rails_648e241be7 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-ALTER TABLE ONLY ci_sources_projects
- ADD CONSTRAINT fk_rails_64b6855cbc FOREIGN KEY (source_project_id) REFERENCES projects(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY board_group_recent_visits
ADD CONSTRAINT fk_rails_64bfc19bc5 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
@@ -30283,15 +34238,9 @@ ALTER TABLE ONLY vulnerability_findings_remediations
ALTER TABLE ONLY resource_iteration_events
ADD CONSTRAINT fk_rails_6830c13ac1 FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE;
-ALTER TABLE ONLY vulnerability_finding_evidence_headers
- ADD CONSTRAINT fk_rails_683b8e000c FOREIGN KEY (vulnerability_finding_evidence_response_id) REFERENCES vulnerability_finding_evidence_responses(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY geo_hashed_storage_migrated_events
ADD CONSTRAINT fk_rails_687ed7d7c5 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-ALTER TABLE ONLY ci_job_token_project_scope_links
- ADD CONSTRAINT fk_rails_6904b38465 FOREIGN KEY (target_project_id) REFERENCES projects(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY plan_limits
ADD CONSTRAINT fk_rails_69f8b6184f FOREIGN KEY (plan_id) REFERENCES plans(id) ON DELETE CASCADE;
@@ -30307,9 +34256,6 @@ ALTER TABLE ONLY prometheus_alerts
ALTER TABLE ONLY term_agreements
ADD CONSTRAINT fk_rails_6ea6520e4a FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
-ALTER TABLE ONLY vulnerability_finding_evidence_assets
- ADD CONSTRAINT fk_rails_6edbbecba4 FOREIGN KEY (vulnerability_finding_evidence_id) REFERENCES vulnerability_finding_evidences(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY project_compliance_framework_settings
ADD CONSTRAINT fk_rails_6f5294f16c FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -30343,9 +34289,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 vulnerability_finding_evidence_requests
- ADD CONSTRAINT fk_rails_72c87c8eb6 FOREIGN KEY (vulnerability_finding_evidence_id) REFERENCES vulnerability_finding_evidences(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY slack_integrations
ADD CONSTRAINT fk_rails_73db19721a FOREIGN KEY (service_id) REFERENCES integrations(id) ON DELETE CASCADE;
@@ -30361,6 +34304,9 @@ ALTER TABLE ONLY dast_site_profiles
ALTER TABLE ONLY merge_request_context_commit_diff_files
ADD CONSTRAINT fk_rails_74a00a1787 FOREIGN KEY (merge_request_context_commit_id) REFERENCES merge_request_context_commits(id) ON DELETE CASCADE;
+ALTER TABLE ONLY group_crm_settings
+ ADD CONSTRAINT fk_rails_74fdf2f13d FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY clusters_applications_ingress
ADD CONSTRAINT fk_rails_753a7b41c1 FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE;
@@ -30391,18 +34337,12 @@ ALTER TABLE ONLY boards_epic_user_preferences
ALTER TABLE ONLY packages_debian_group_distribution_keys
ADD CONSTRAINT fk_rails_779438f163 FOREIGN KEY (distribution_id) REFERENCES packages_debian_group_distributions(id) ON DELETE CASCADE;
-ALTER TABLE ONLY ci_subscriptions_projects
- ADD CONSTRAINT fk_rails_7871f9a97b FOREIGN KEY (upstream_project_id) REFERENCES projects(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY terraform_states
ADD CONSTRAINT fk_rails_78f54ca485 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
ALTER TABLE ONLY analytics_cycle_analytics_project_stages
ADD CONSTRAINT fk_rails_796a7dbc9c FOREIGN KEY (project_value_stream_id) REFERENCES analytics_cycle_analytics_project_value_streams(id) ON DELETE CASCADE;
-ALTER TABLE ONLY vulnerability_finding_evidence_supporting_messages
- ADD CONSTRAINT fk_rails_79e77f6c5c FOREIGN KEY (vulnerability_finding_evidence_id) REFERENCES vulnerability_finding_evidences(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY software_license_policies
ADD CONSTRAINT fk_rails_7a7a2a92de FOREIGN KEY (software_license_id) REFERENCES software_licenses(id) ON DELETE CASCADE;
@@ -30424,6 +34364,9 @@ ALTER TABLE ONLY application_settings
ALTER TABLE ONLY clusters_kubernetes_namespaces
ADD CONSTRAINT fk_rails_7e7688ecaf FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE;
+ALTER TABLE ONLY ci_job_artifact_states
+ ADD CONSTRAINT fk_rails_80a9cba3b2 FOREIGN KEY (job_artifact_id) REFERENCES ci_job_artifacts(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY approval_merge_request_rules_users
ADD CONSTRAINT fk_rails_80e6801803 FOREIGN KEY (approval_merge_request_rule_id) REFERENCES approval_merge_request_rules(id) ON DELETE CASCADE;
@@ -30433,6 +34376,9 @@ ALTER TABLE ONLY required_code_owners_sections
ALTER TABLE ONLY dast_site_profiles
ADD CONSTRAINT fk_rails_83e309d69e FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ALTER TABLE ONLY security_trainings
+ ADD CONSTRAINT fk_rails_84c7951d72 FOREIGN KEY (provider_id) REFERENCES security_training_providers(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY zentao_tracker_data
ADD CONSTRAINT fk_rails_84efda7be0 FOREIGN KEY (integration_id) REFERENCES integrations(id) ON DELETE CASCADE;
@@ -30529,12 +34475,12 @@ ALTER TABLE ONLY project_error_tracking_settings
ALTER TABLE ONLY list_user_preferences
ADD CONSTRAINT fk_rails_916d72cafd FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
-ALTER TABLE ONLY vulnerability_finding_evidence_responses
- ADD CONSTRAINT fk_rails_929041a499 FOREIGN KEY (vulnerability_finding_evidence_supporting_message_id) REFERENCES vulnerability_finding_evidence_supporting_messages(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY merge_request_cleanup_schedules
ADD CONSTRAINT fk_rails_92dd0e705c FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE;
+ALTER TABLE ONLY project_build_artifacts_size_refreshes
+ ADD CONSTRAINT fk_rails_936db5fc44 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY board_labels
ADD CONSTRAINT fk_rails_9374a16edd FOREIGN KEY (board_id) REFERENCES boards(id) ON DELETE CASCADE;
@@ -30565,9 +34511,6 @@ ALTER TABLE ONLY group_repository_storage_moves
ALTER TABLE ONLY resource_label_events
ADD CONSTRAINT fk_rails_9851a00031 FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE;
-ALTER TABLE ONLY ci_job_artifacts
- ADD CONSTRAINT fk_rails_9862d392f9 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY board_project_recent_visits
ADD CONSTRAINT fk_rails_98f8843922 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -30598,6 +34541,9 @@ ALTER TABLE ONLY gpg_keys
ALTER TABLE ONLY analytics_language_trend_repository_languages
ADD CONSTRAINT fk_rails_9d851d566c FOREIGN KEY (programming_language_id) REFERENCES programming_languages(id) ON DELETE CASCADE;
+ALTER TABLE ONLY namespaces_sync_events
+ ADD CONSTRAINT fk_rails_9da32a0431 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY badges
ADD CONSTRAINT fk_rails_9df4a56538 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
@@ -30670,6 +34616,9 @@ ALTER TABLE ONLY resource_milestone_events
ALTER TABLE ONLY term_agreements
ADD CONSTRAINT fk_rails_a88721bcdf FOREIGN KEY (term_id) REFERENCES application_setting_terms(id);
+ALTER TABLE ONLY saved_replies
+ ADD CONSTRAINT fk_rails_a8bf5bf111 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY ci_pipeline_artifacts
ADD CONSTRAINT fk_rails_a9e811a466 FOREIGN KEY (pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE;
@@ -30679,9 +34628,6 @@ ALTER TABLE ONLY merge_request_user_mentions
ALTER TABLE ONLY x509_commit_signatures
ADD CONSTRAINT fk_rails_ab07452314 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-ALTER TABLE ONLY dep_ci_build_trace_sections
- ADD CONSTRAINT fk_rails_ab7c104e26 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY resource_iteration_events
ADD CONSTRAINT fk_rails_abf5d4affa FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE;
@@ -30745,6 +34691,9 @@ ALTER TABLE ONLY packages_debian_project_component_files
ALTER TABLE ONLY namespace_aggregation_schedules
ADD CONSTRAINT fk_rails_b565c8d16c FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
+ALTER TABLE batched_background_migration_job_transition_logs
+ ADD CONSTRAINT fk_rails_b7523a175b FOREIGN KEY (batched_background_migration_job_id) REFERENCES batched_background_migration_jobs(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY approval_project_rules_protected_branches
ADD CONSTRAINT fk_rails_b7567b031b FOREIGN KEY (protected_branch_id) REFERENCES protected_branches(id) ON DELETE CASCADE;
@@ -30769,12 +34718,12 @@ ALTER TABLE ONLY security_findings
ALTER TABLE ONLY packages_debian_project_component_files
ADD CONSTRAINT fk_rails_bbe9ebfbd9 FOREIGN KEY (component_id) REFERENCES packages_debian_project_components(id) ON DELETE RESTRICT;
+ALTER TABLE ONLY projects_sync_events
+ ADD CONSTRAINT fk_rails_bbf0eef59f FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY approval_merge_request_rules_users
ADD CONSTRAINT fk_rails_bc8972fa55 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
-ALTER TABLE ONLY external_pull_requests
- ADD CONSTRAINT fk_rails_bcae9b5c7b FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY elasticsearch_indexed_projects
ADD CONSTRAINT fk_rails_bd13bbdc3d FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -30802,6 +34751,9 @@ ALTER TABLE ONLY atlassian_identities
ALTER TABLE ONLY serverless_domain_cluster
ADD CONSTRAINT fk_rails_c09009dee1 FOREIGN KEY (pages_domain_id) REFERENCES pages_domains(id) ON DELETE CASCADE;
+ALTER TABLE ONLY packages_npm_metadata
+ ADD CONSTRAINT fk_rails_c0e5fce6f3 FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY labels
ADD CONSTRAINT fk_rails_c1ac5161d8 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
@@ -30820,12 +34772,12 @@ 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 pages_deployments
- ADD CONSTRAINT fk_rails_c3a90cf29b FOREIGN KEY (ci_build_id) REFERENCES ci_builds(id) ON DELETE SET NULL;
-
ALTER TABLE ONLY merge_request_user_mentions
ADD CONSTRAINT fk_rails_c440b9ea31 FOREIGN KEY (note_id) REFERENCES notes(id) ON DELETE CASCADE;
+ALTER TABLE ONLY related_epic_links
+ ADD CONSTRAINT fk_rails_c464534def FOREIGN KEY (source_id) REFERENCES epics(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY boards_epic_board_recent_visits
ADD CONSTRAINT fk_rails_c4dcba4a3e FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
@@ -30883,17 +34835,14 @@ ALTER TABLE ONLY operations_strategies_user_lists
ALTER TABLE ONLY issue_tracker_data
ADD CONSTRAINT fk_rails_ccc0840427 FOREIGN KEY (service_id) REFERENCES integrations(id) ON DELETE CASCADE;
-ALTER TABLE ONLY vulnerability_finding_evidence_headers
- ADD CONSTRAINT fk_rails_ce7f121a03 FOREIGN KEY (vulnerability_finding_evidence_request_id) REFERENCES vulnerability_finding_evidence_requests(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 vulnerability_finding_evidence_requests
- ADD CONSTRAINT fk_rails_cf0f278cb0 FOREIGN KEY (vulnerability_finding_evidence_supporting_message_id) REFERENCES vulnerability_finding_evidence_supporting_messages(id) ON DELETE CASCADE;
+ALTER TABLE ONLY upload_states
+ ADD CONSTRAINT fk_rails_d00f153613 FOREIGN KEY (upload_id) REFERENCES uploads(id) ON DELETE CASCADE;
ALTER TABLE ONLY epic_metrics
ADD CONSTRAINT fk_rails_d071904753 FOREIGN KEY (epic_id) REFERENCES epics(id) ON DELETE CASCADE;
@@ -30946,9 +34895,6 @@ ALTER TABLE ONLY issues_prometheus_alert_events
ALTER TABLE ONLY board_user_preferences
ADD CONSTRAINT fk_rails_dbebdaa8fe FOREIGN KEY (board_id) REFERENCES boards(id) ON DELETE CASCADE;
-ALTER TABLE ONLY ci_running_builds
- ADD CONSTRAINT fk_rails_dc1d0801e8 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY vulnerability_occurrence_pipelines
ADD CONSTRAINT fk_rails_dc3ae04693 FOREIGN KEY (occurrence_id) REFERENCES vulnerability_occurrences(id) ON DELETE CASCADE;
@@ -30976,9 +34922,6 @@ ALTER TABLE ONLY analytics_cycle_analytics_group_stages
ALTER TABLE ONLY bulk_import_export_uploads
ADD CONSTRAINT fk_rails_dfbfb45eca FOREIGN KEY (export_id) REFERENCES bulk_import_exports(id) ON DELETE CASCADE;
-ALTER TABLE ONLY ci_minutes_additional_packs
- ADD CONSTRAINT fk_rails_e0e0c4e4b1 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY label_priorities
ADD CONSTRAINT fk_rails_e161058b0f FOREIGN KEY (label_id) REFERENCES labels(id) ON DELETE CASCADE;
@@ -30988,6 +34931,9 @@ ALTER TABLE ONLY packages_packages
ALTER TABLE ONLY cluster_platforms_kubernetes
ADD CONSTRAINT fk_rails_e1e2cf841a FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE;
+ALTER TABLE ONLY issue_emails
+ ADD CONSTRAINT fk_rails_e2ee00a8f7 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY vulnerability_finding_evidences
ADD CONSTRAINT fk_rails_e3205a0c65 FOREIGN KEY (vulnerability_occurrence_id) REFERENCES vulnerability_occurrences(id) ON DELETE CASCADE;
@@ -31015,9 +34961,6 @@ ALTER TABLE ONLY approval_merge_request_rule_sources
ALTER TABLE ONLY prometheus_alerts
ADD CONSTRAINT fk_rails_e6351447ec FOREIGN KEY (prometheus_metric_id) REFERENCES prometheus_metrics(id) ON DELETE CASCADE;
-ALTER TABLE ONLY requirements_management_test_reports
- ADD CONSTRAINT fk_rails_e67d085910 FOREIGN KEY (build_id) REFERENCES ci_builds(id) ON DELETE SET NULL;
-
ALTER TABLE ONLY merge_request_metrics
ADD CONSTRAINT fk_rails_e6d7c24d1b FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE;
@@ -31045,9 +34988,6 @@ ALTER TABLE ONLY vulnerability_issue_links
ALTER TABLE ONLY merge_request_blocks
ADD CONSTRAINT fk_rails_e9387863bc FOREIGN KEY (blocking_merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE;
-ALTER TABLE ONLY vulnerability_finding_evidence_sources
- ADD CONSTRAINT fk_rails_e9761bed4c FOREIGN KEY (vulnerability_finding_evidence_id) REFERENCES vulnerability_finding_evidences(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY protected_branch_unprotect_access_levels
ADD CONSTRAINT fk_rails_e9eb8dc025 FOREIGN KEY (protected_branch_id) REFERENCES protected_branches(id) ON DELETE CASCADE;
@@ -31102,9 +35042,6 @@ ALTER TABLE ONLY snippet_repositories
ALTER TABLE ONLY elastic_reindexing_subtasks
ADD CONSTRAINT fk_rails_f2cc190164 FOREIGN KEY (elastic_reindexing_task_id) REFERENCES elastic_reindexing_tasks(id) ON DELETE CASCADE;
-ALTER TABLE ONLY ci_pipeline_chat_data
- ADD CONSTRAINT fk_rails_f300456b63 FOREIGN KEY (chat_name_id) REFERENCES chat_names(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY approval_project_rules_users
ADD CONSTRAINT fk_rails_f365da8250 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
@@ -31138,18 +35075,12 @@ ALTER TABLE ONLY internal_ids
ALTER TABLE ONLY issues_self_managed_prometheus_alert_events
ADD CONSTRAINT fk_rails_f7db2d72eb FOREIGN KEY (self_managed_prometheus_alert_event_id) REFERENCES self_managed_prometheus_alert_events(id) ON DELETE CASCADE;
+ALTER TABLE ONLY security_trainings
+ ADD CONSTRAINT fk_rails_f80240fae0 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY merge_requests_closing_issues
ADD CONSTRAINT fk_rails_f8540692be FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE;
-ALTER TABLE ONLY dep_ci_build_trace_section_names
- ADD CONSTRAINT fk_rails_f8cd72cd26 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
-
-ALTER TABLE ONLY merge_trains
- ADD CONSTRAINT fk_rails_f90820cb08 FOREIGN KEY (pipeline_id) REFERENCES ci_pipelines(id) ON DELETE SET NULL;
-
-ALTER TABLE ONLY ci_runner_namespaces
- ADD CONSTRAINT fk_rails_f9d9ed3308 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY banned_users
ADD CONSTRAINT fk_rails_fa5bb598e5 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
@@ -31171,9 +35102,6 @@ ALTER TABLE ONLY ci_job_variables
ALTER TABLE ONLY packages_nuget_metadata
ADD CONSTRAINT fk_rails_fc0c19f5b4 FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE CASCADE;
-ALTER TABLE incident_management_pending_alert_escalations
- ADD CONSTRAINT fk_rails_fcbfd9338b FOREIGN KEY (schedule_id) REFERENCES incident_management_oncall_schedules(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY customer_relations_contacts
ADD CONSTRAINT fk_rails_fd3f2e7572 FOREIGN KEY (organization_id) REFERENCES customer_relations_organizations(id) ON DELETE CASCADE;
@@ -31192,8 +35120,11 @@ ALTER TABLE ONLY project_tracing_settings
ALTER TABLE ONLY resource_label_events
ADD CONSTRAINT fk_rails_fe91ece594 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE SET NULL;
-ALTER TABLE ONLY ci_builds_metadata
- ADD CONSTRAINT fk_rails_ffcf702a02 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ALTER TABLE ONLY pages_deployment_states
+ ADD CONSTRAINT fk_rails_ff6ca551a4 FOREIGN KEY (pages_deployment_id) REFERENCES pages_deployments(id) ON DELETE CASCADE;
+
+ALTER TABLE ONLY security_orchestration_policy_configurations
+ ADD CONSTRAINT fk_security_policy_configurations_management_project_id FOREIGN KEY (security_policy_management_project_id) REFERENCES projects(id) ON DELETE CASCADE;
ALTER TABLE ONLY integrations
ADD CONSTRAINT fk_services_inherit_from_id FOREIGN KEY (inherit_from_id) REFERENCES integrations(id) ON DELETE CASCADE;
@@ -31213,6 +35144,12 @@ ALTER TABLE ONLY timelogs
ALTER TABLE ONLY u2f_registrations
ADD CONSTRAINT fk_u2f_registrations_user_id FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
+ALTER TABLE issue_search_data
+ ADD CONSTRAINT issue_search_data_issue_id_fkey FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE;
+
+ALTER TABLE issue_search_data
+ ADD CONSTRAINT issue_search_data_project_id_fkey FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+
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;
diff --git a/db/migrate/20210826171758_init_schema.rb b/db/migrate/20210826171758_init_schema.rb
deleted file mode 100644
index 971a3e0e2db..00000000000
--- a/db/migrate/20210826171758_init_schema.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class InitSchema < ActiveRecord::Migration[6.0]
- DOWNTIME = false
-
- def up
- execute(File.read("db/init_structure.sql"))
- end
-
- def down
- raise ActiveRecord::IrreversibleMigration, "The initial migration is not able to be reverted."
- end
-end
diff --git a/db/migrate/20210830085837_add_throttle_authenticated_git_lfs_columns.rb b/db/migrate/20210830085837_add_throttle_authenticated_git_lfs_columns.rb
deleted file mode 100644
index bc515bc061c..00000000000
--- a/db/migrate/20210830085837_add_throttle_authenticated_git_lfs_columns.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-class AddThrottleAuthenticatedGitLfsColumns < ActiveRecord::Migration[6.1]
- include Gitlab::Database::MigrationHelpers
-
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- add_column :application_settings, :throttle_authenticated_git_lfs_requests_per_period, :integer, default: 1000, null: false
- add_column :application_settings, :throttle_authenticated_git_lfs_period_in_seconds, :integer, default: 60, null: false
- add_column :application_settings, :throttle_authenticated_git_lfs_enabled, :boolean, default: false, null: false
- end
- end
-
- def down
- with_lock_retries do
- remove_column :application_settings, :throttle_authenticated_git_lfs_requests_per_period
- remove_column :application_settings, :throttle_authenticated_git_lfs_period_in_seconds
- remove_column :application_settings, :throttle_authenticated_git_lfs_enabled, :boolean
- end
- end
-end
diff --git a/db/migrate/20210830140524_add_state_to_member.rb b/db/migrate/20210830140524_add_state_to_member.rb
deleted file mode 100644
index 6009376badb..00000000000
--- a/db/migrate/20210830140524_add_state_to_member.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-class AddStateToMember < ActiveRecord::Migration[6.1]
- include Gitlab::Database::MigrationHelpers
-
- def up
- unless column_exists?(:members, :state)
- with_lock_retries do
- add_column :members, :state, :integer, limit: 2, default: 0
- end
- end
- end
-
- def down
- if column_exists?(:members, :state)
- with_lock_retries do
- remove_column :members, :state
- end
- end
- end
-end
diff --git a/db/migrate/20210830154358_add_yaml_limit_constraints.rb b/db/migrate/20210830154358_add_yaml_limit_constraints.rb
deleted file mode 100644
index 74236993fff..00000000000
--- a/db/migrate/20210830154358_add_yaml_limit_constraints.rb
+++ /dev/null
@@ -1,25 +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 AddYamlLimitConstraints < ActiveRecord::Migration[6.1]
- include Gitlab::Database::MigrationHelpers
-
- DOWNTIME = false
-
- SIZE_CONSTRAINT_NAME = 'app_settings_yaml_max_size_positive'
- DEPTH_CONSTRAINT_NAME = 'app_settings_yaml_max_depth_positive'
-
- disable_ddl_transaction!
-
- def up
- add_check_constraint :application_settings, 'max_yaml_size_bytes > 0', SIZE_CONSTRAINT_NAME
- add_check_constraint :application_settings, 'max_yaml_depth > 0', DEPTH_CONSTRAINT_NAME
- end
-
- def down
- remove_check_constraint :application_settings, SIZE_CONSTRAINT_NAME
- remove_check_constraint :application_settings, DEPTH_CONSTRAINT_NAME
- end
-end
diff --git a/db/migrate/20210831134840_add_package_file_id_channel_idx_to_packages_helm_file_metadata.rb b/db/migrate/20210831134840_add_package_file_id_channel_idx_to_packages_helm_file_metadata.rb
deleted file mode 100644
index a3366bd9ddb..00000000000
--- a/db/migrate/20210831134840_add_package_file_id_channel_idx_to_packages_helm_file_metadata.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddPackageFileIdChannelIdxToPackagesHelmFileMetadata < ActiveRecord::Migration[6.1]
- include Gitlab::Database::MigrationHelpers
-
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_packages_helm_file_metadata_on_pf_id_and_channel'
-
- def up
- add_concurrent_index :packages_helm_file_metadata, [:package_file_id, :channel], name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index :packages_helm_file_metadata, [:package_file_id, :channel], name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20210831135249_add_installable_helm_pkgs_idx_to_packages.rb b/db/migrate/20210831135249_add_installable_helm_pkgs_idx_to_packages.rb
deleted file mode 100644
index 5e65b5c0fe1..00000000000
--- a/db/migrate/20210831135249_add_installable_helm_pkgs_idx_to_packages.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddInstallableHelmPkgsIdxToPackages < ActiveRecord::Migration[6.1]
- include Gitlab::Database::MigrationHelpers
-
- disable_ddl_transaction!
-
- INDEX_NAME = 'idx_installable_helm_pkgs_on_project_id_id'
-
- def up
- add_concurrent_index :packages_packages, [:project_id, :id], name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index :packages_packages, [:project_id, :id], name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20210831203408_upsert_base_work_item_types.rb b/db/migrate/20210831203408_upsert_base_work_item_types.rb
deleted file mode 100644
index 9a556bd6c2c..00000000000
--- a/db/migrate/20210831203408_upsert_base_work_item_types.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-# frozen_string_literal: true
-
-class UpsertBaseWorkItemTypes < ActiveRecord::Migration[6.1]
- module WorkItem
- class Type < ActiveRecord::Base
- self.table_name = 'work_item_types'
-
- enum base_type: {
- issue: 0,
- incident: 1,
- test_case: 2,
- requirement: 3
- }
- end
- end
-
- def up
- # upsert default types
- WorkItem::Type.find_or_create_by(name: 'Issue', namespace_id: nil, base_type: :issue, icon_name: 'issue-type-issue')
- WorkItem::Type.find_or_create_by(name: 'Incident', namespace_id: nil, base_type: :incident, icon_name: 'issue-type-incident')
- WorkItem::Type.find_or_create_by(name: 'Test Case', namespace_id: nil, base_type: :test_case, icon_name: 'issue-type-test-case')
- WorkItem::Type.find_or_create_by(name: 'Requirement', namespace_id: nil, base_type: :requirement, icon_name: 'issue-type-requirements')
- end
-
- def down
- # We expect this table to be empty at the point of the up migration,
- # however there is a remote possibility that issues could already be
- # using one of these types, with a tight foreign constraint.
- # Therefore we will not attempt to remove any data.
- end
-end
diff --git a/db/migrate/20210901065504_add_index_on_name_and_id_to_public_groups.rb b/db/migrate/20210901065504_add_index_on_name_and_id_to_public_groups.rb
deleted file mode 100644
index e0c9d932b38..00000000000
--- a/db/migrate/20210901065504_add_index_on_name_and_id_to_public_groups.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexOnNameAndIdToPublicGroups < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_namespaces_public_groups_name_id'
- PUBLIC_VISIBILITY_LEVEL = 20
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :namespaces, [:name, :id],
- name: INDEX_NAME,
- where: "type = 'Group' AND visibility_level = #{PUBLIC_VISIBILITY_LEVEL}"
- end
-
- def down
- remove_concurrent_index_by_name :namespaces, INDEX_NAME
- end
-end
diff --git a/db/migrate/20210902171406_add_latest_column_into_the_security_scans_table.rb b/db/migrate/20210902171406_add_latest_column_into_the_security_scans_table.rb
deleted file mode 100644
index 3c022cbaf5e..00000000000
--- a/db/migrate/20210902171406_add_latest_column_into_the_security_scans_table.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddLatestColumnIntoTheSecurityScansTable < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def up
- add_column :security_scans, :latest, :boolean, default: true, null: false
- end
-
- def down
- remove_column :security_scans, :latest
- end
-end
diff --git a/db/migrate/20210902171808_set_default_job_token_scope_false.rb b/db/migrate/20210902171808_set_default_job_token_scope_false.rb
deleted file mode 100644
index 0680382094f..00000000000
--- a/db/migrate/20210902171808_set_default_job_token_scope_false.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class SetDefaultJobTokenScopeFalse < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- change_column_default :project_ci_cd_settings, :job_token_scope_enabled, from: true, to: false
- end
- end
-
- def down
- with_lock_retries do
- change_column_default :project_ci_cd_settings, :job_token_scope_enabled, from: false, to: true
- end
- end
-end
diff --git a/db/migrate/20210902184334_add_expire_access_tokens_to_doorkeeper_application.rb b/db/migrate/20210902184334_add_expire_access_tokens_to_doorkeeper_application.rb
deleted file mode 100644
index 4638637331d..00000000000
--- a/db/migrate/20210902184334_add_expire_access_tokens_to_doorkeeper_application.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddExpireAccessTokensToDoorkeeperApplication < Gitlab::Database::Migration[1.0]
- def change
- add_column :oauth_applications, :expire_access_tokens, :boolean, default: false, null: false
- end
-end
diff --git a/db/migrate/20210903054158_recreate_stage_issue_events_table_with_bigints.rb b/db/migrate/20210903054158_recreate_stage_issue_events_table_with_bigints.rb
deleted file mode 100644
index 6c5d23d8703..00000000000
--- a/db/migrate/20210903054158_recreate_stage_issue_events_table_with_bigints.rb
+++ /dev/null
@@ -1,45 +0,0 @@
-# frozen_string_literal: true
-
-class RecreateStageIssueEventsTableWithBigints < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::PartitioningMigrationHelpers::TableManagementHelpers
-
- def up
- drop_table :analytics_cycle_analytics_issue_stage_events # rubocop:disable Migration/DropTable
-
- execute <<~SQL
- CREATE TABLE analytics_cycle_analytics_issue_stage_events (
- stage_event_hash_id bigint NOT NULL,
- issue_id bigint NOT NULL,
- group_id bigint NOT NULL,
- project_id bigint NOT NULL,
- milestone_id bigint,
- author_id bigint,
- start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone,
- PRIMARY KEY (stage_event_hash_id, issue_id)
- ) PARTITION BY HASH (stage_event_hash_id)
- SQL
-
- create_hash_partitions :analytics_cycle_analytics_issue_stage_events, 32
- end
-
- def down
- drop_table :analytics_cycle_analytics_issue_stage_events
-
- execute <<~SQL
- CREATE TABLE analytics_cycle_analytics_issue_stage_events (
- stage_event_hash_id integer NOT NULL,
- issue_id integer NOT NULL,
- group_id integer NOT NULL,
- project_id integer NOT NULL,
- milestone_id integer,
- author_id integer,
- start_event_timestamp timestamp with time zone NOT NULL,
- end_event_timestamp timestamp with time zone,
- PRIMARY KEY (stage_event_hash_id, issue_id)
- ) PARTITION BY HASH (stage_event_hash_id)
- SQL
-
- create_hash_partitions :analytics_cycle_analytics_issue_stage_events, 32
- end
-end
diff --git a/db/migrate/20210906100021_delete_project_namespace_trigger.rb b/db/migrate/20210906100021_delete_project_namespace_trigger.rb
deleted file mode 100644
index ce68cf7d6d4..00000000000
--- a/db/migrate/20210906100021_delete_project_namespace_trigger.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-# frozen_string_literal: true
-
-class DeleteProjectNamespaceTrigger < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::SchemaHelpers
-
- TRIGGER_NAME = "trigger_delete_project_namespace_on_project_delete"
- FUNCTION_NAME = 'delete_associated_project_namespace'
-
- def up
- create_trigger_function(FUNCTION_NAME, replace: true) do
- <<~SQL
- DELETE FROM namespaces
- WHERE namespaces.id = OLD.project_namespace_id AND
- namespaces.type = 'Project';
- RETURN NULL;
- SQL
- end
-
- execute(<<~SQL.squish)
- CREATE TRIGGER #{TRIGGER_NAME}
- AFTER DELETE ON projects FOR EACH ROW
- WHEN (OLD.project_namespace_id IS NOT NULL)
- EXECUTE FUNCTION #{FUNCTION_NAME}();
- SQL
- end
-
- def down
- drop_trigger(:projects, TRIGGER_NAME)
- drop_function(FUNCTION_NAME)
- end
-end
diff --git a/db/migrate/20210907182337_add_group_id_fkey_for_user_group_callout.rb b/db/migrate/20210907182337_add_group_id_fkey_for_user_group_callout.rb
deleted file mode 100644
index 540344bd761..00000000000
--- a/db/migrate/20210907182337_add_group_id_fkey_for_user_group_callout.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddGroupIdFkeyForUserGroupCallout < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :user_group_callouts, :namespaces, column: :group_id, on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :user_group_callouts, column: :group_id
- end
- end
-end
diff --git a/db/migrate/20210907182359_add_user_id_fkey_for_user_group_callout.rb b/db/migrate/20210907182359_add_user_id_fkey_for_user_group_callout.rb
deleted file mode 100644
index 37b73335933..00000000000
--- a/db/migrate/20210907182359_add_user_id_fkey_for_user_group_callout.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddUserIdFkeyForUserGroupCallout < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :user_group_callouts, :users, column: :user_id, on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :user_group_callouts, column: :user_id
- end
- end
-end
diff --git a/db/migrate/20210908060951_add_dast_schedules_to_plan_limits.rb b/db/migrate/20210908060951_add_dast_schedules_to_plan_limits.rb
deleted file mode 100644
index 85c7522d006..00000000000
--- a/db/migrate/20210908060951_add_dast_schedules_to_plan_limits.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddDastSchedulesToPlanLimits < Gitlab::Database::Migration[1.0]
- def change
- add_column(:plan_limits, :dast_profile_schedules, :integer, default: 1, null: false)
- end
-end
diff --git a/db/migrate/20210908061132_insert_dast_profile_schedules_plan_limits.rb b/db/migrate/20210908061132_insert_dast_profile_schedules_plan_limits.rb
deleted file mode 100644
index b9980f65c98..00000000000
--- a/db/migrate/20210908061132_insert_dast_profile_schedules_plan_limits.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-class InsertDastProfileSchedulesPlanLimits < Gitlab::Database::Migration[1.0]
- def up
- create_or_update_plan_limit('dast_profile_schedules', 'default', 0)
- create_or_update_plan_limit('dast_profile_schedules', 'free', 1)
- create_or_update_plan_limit('dast_profile_schedules', 'bronze', 1)
- create_or_update_plan_limit('dast_profile_schedules', 'silver', 1)
- create_or_update_plan_limit('dast_profile_schedules', 'premium', 1)
- create_or_update_plan_limit('dast_profile_schedules', 'premium_trial', 1)
- create_or_update_plan_limit('dast_profile_schedules', 'gold', 20)
- create_or_update_plan_limit('dast_profile_schedules', 'ultimate', 20)
- create_or_update_plan_limit('dast_profile_schedules', 'ultimate_trial', 20)
- end
-
- def down
- create_or_update_plan_limit('dast_profile_schedules', 'default', 0)
- create_or_update_plan_limit('dast_profile_schedules', 'free', 0)
- create_or_update_plan_limit('dast_profile_schedules', 'bronze', 0)
- create_or_update_plan_limit('dast_profile_schedules', 'silver', 0)
- create_or_update_plan_limit('dast_profile_schedules', 'premium', 0)
- create_or_update_plan_limit('dast_profile_schedules', 'premium_trial', 0)
- create_or_update_plan_limit('dast_profile_schedules', 'gold', 0)
- create_or_update_plan_limit('dast_profile_schedules', 'ultimate', 0)
- create_or_update_plan_limit('dast_profile_schedules', 'ultimate_trial', 0)
- end
-end
diff --git a/db/migrate/20210908100810_add_jobs_per_stage_page_size_to_application_settings.rb b/db/migrate/20210908100810_add_jobs_per_stage_page_size_to_application_settings.rb
deleted file mode 100644
index 81a76ecb10a..00000000000
--- a/db/migrate/20210908100810_add_jobs_per_stage_page_size_to_application_settings.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddJobsPerStagePageSizeToApplicationSettings < Gitlab::Database::Migration[1.0]
- def change
- add_column :application_settings, :jobs_per_stage_page_size, :integer, default: 200, null: false
- end
-end
diff --git a/db/migrate/20210908140437_add_sidekiq_limits_to_application_settings.rb b/db/migrate/20210908140437_add_sidekiq_limits_to_application_settings.rb
deleted file mode 100644
index dd0796a1c86..00000000000
--- a/db/migrate/20210908140437_add_sidekiq_limits_to_application_settings.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-class AddSidekiqLimitsToApplicationSettings < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction! # needed for now to avoid subtransactions
-
- def up
- with_lock_retries do
- add_column :application_settings, :sidekiq_job_limiter_mode, :smallint, default: 1, null: false
- add_column :application_settings, :sidekiq_job_limiter_compression_threshold_bytes, :integer, default: 100_000, null: false
- add_column :application_settings, :sidekiq_job_limiter_limit_bytes, :integer, default: 0, null: false
- end
- end
-
- def down
- with_lock_retries do
- remove_column :application_settings, :sidekiq_job_limiter_mode
- remove_column :application_settings, :sidekiq_job_limiter_compression_threshold_bytes
- remove_column :application_settings, :sidekiq_job_limiter_limit_bytes
- end
- end
-end
diff --git a/db/migrate/20210908185736_add_status_to_dependency_proxy_manifests.rb b/db/migrate/20210908185736_add_status_to_dependency_proxy_manifests.rb
deleted file mode 100644
index b8e7c7af144..00000000000
--- a/db/migrate/20210908185736_add_status_to_dependency_proxy_manifests.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddStatusToDependencyProxyManifests < Gitlab::Database::Migration[1.0]
- def change
- add_column :dependency_proxy_manifests, :status, :smallint, default: 0, null: false
- end
-end
diff --git a/db/migrate/20210908185754_add_status_to_dependency_proxy_blobs.rb b/db/migrate/20210908185754_add_status_to_dependency_proxy_blobs.rb
deleted file mode 100644
index 4fbdcad33cd..00000000000
--- a/db/migrate/20210908185754_add_status_to_dependency_proxy_blobs.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddStatusToDependencyProxyBlobs < Gitlab::Database::Migration[1.0]
- def change
- add_column :dependency_proxy_blobs, :status, :smallint, default: 0, null: false
- end
-end
diff --git a/db/migrate/20210908195506_add_data_to_vulnerability_finding_evidence.rb b/db/migrate/20210908195506_add_data_to_vulnerability_finding_evidence.rb
deleted file mode 100644
index 447508d3d5b..00000000000
--- a/db/migrate/20210908195506_add_data_to_vulnerability_finding_evidence.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddDataToVulnerabilityFindingEvidence < Gitlab::Database::Migration[1.0]
- def change
- add_column :vulnerability_finding_evidences, :data, :jsonb, default: {}, null: false
- end
-end
diff --git a/db/migrate/20210909184349_add_index_package_id_id_on_package_files.rb b/db/migrate/20210909184349_add_index_package_id_id_on_package_files.rb
deleted file mode 100644
index 38d9c4b5dd9..00000000000
--- a/db/migrate/20210909184349_add_index_package_id_id_on_package_files.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexPackageIdIdOnPackageFiles < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_packages_package_files_on_package_id_id'
-
- def up
- disable_statement_timeout do
- execute "CREATE INDEX CONCURRENTLY #{INDEX_NAME} ON packages_package_files (package_id, id)" unless index_exists_by_name?(:package_package_files, INDEX_NAME)
- end
- end
-
- def down
- remove_concurrent_index_by_name :packages_package_files, INDEX_NAME
- end
-end
diff --git a/db/migrate/20210910014741_add_dependency_proxy_ttl_group_policy_worker_capacity_to_application_settings.rb b/db/migrate/20210910014741_add_dependency_proxy_ttl_group_policy_worker_capacity_to_application_settings.rb
deleted file mode 100644
index 52fab5a63ee..00000000000
--- a/db/migrate/20210910014741_add_dependency_proxy_ttl_group_policy_worker_capacity_to_application_settings.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class AddDependencyProxyTtlGroupPolicyWorkerCapacityToApplicationSettings < Gitlab::Database::Migration[1.0]
- def change
- add_column :application_settings,
- :dependency_proxy_ttl_group_policy_worker_capacity,
- :smallint,
- default: 2,
- null: false
- end
-end
diff --git a/db/migrate/20210910015047_add_app_settings_dep_proxy_ttl_worker_capacity_check_constraint.rb b/db/migrate/20210910015047_add_app_settings_dep_proxy_ttl_worker_capacity_check_constraint.rb
deleted file mode 100644
index 9b522f2874f..00000000000
--- a/db/migrate/20210910015047_add_app_settings_dep_proxy_ttl_worker_capacity_check_constraint.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddAppSettingsDepProxyTtlWorkerCapacityCheckConstraint < Gitlab::Database::Migration[1.0]
- CONSTRAINT_NAME = 'app_settings_dep_proxy_ttl_policies_worker_capacity_positive'
-
- disable_ddl_transaction!
-
- def up
- add_check_constraint :application_settings, 'dependency_proxy_ttl_group_policy_worker_capacity >= 0', CONSTRAINT_NAME
- end
-
- def down
- remove_check_constraint :application_settings, CONSTRAINT_NAME
- end
-end
diff --git a/db/migrate/20210910141043_change_ci_minutes_additional_pack_text_limit.rb b/db/migrate/20210910141043_change_ci_minutes_additional_pack_text_limit.rb
deleted file mode 100644
index ebb0de53d6a..00000000000
--- a/db/migrate/20210910141043_change_ci_minutes_additional_pack_text_limit.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class ChangeCiMinutesAdditionalPackTextLimit < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- remove_text_limit :ci_minutes_additional_packs, :purchase_xid
- add_text_limit :ci_minutes_additional_packs, :purchase_xid, 50
- end
-
- def down
- remove_text_limit :ci_minutes_additional_packs, :purchase_xid
- add_text_limit :ci_minutes_additional_packs, :purchase_xid, 32, validate: false
- end
-end
diff --git a/db/migrate/20210910192921_add_report_type_into_approval_project_rules.rb b/db/migrate/20210910192921_add_report_type_into_approval_project_rules.rb
deleted file mode 100644
index 4b147034657..00000000000
--- a/db/migrate/20210910192921_add_report_type_into_approval_project_rules.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class AddReportTypeIntoApprovalProjectRules < Gitlab::Database::Migration[1.0]
- def up
- add_column :approval_project_rules, :report_type, :integer, limit: 2
- end
-
- def down
- remove_column :approval_project_rules, :report_type
- end
-end
diff --git a/db/migrate/20210912034903_add_runner_features_to_ci_builds_metadata.rb b/db/migrate/20210912034903_add_runner_features_to_ci_builds_metadata.rb
deleted file mode 100644
index 83eddf2fb0d..00000000000
--- a/db/migrate/20210912034903_add_runner_features_to_ci_builds_metadata.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddRunnerFeaturesToCiBuildsMetadata < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def change
- add_column :ci_builds_metadata, :runner_features, :jsonb, default: {}, null: false
- end
-end
diff --git a/db/migrate/20210913010411_create_agent_project_authorizations.rb b/db/migrate/20210913010411_create_agent_project_authorizations.rb
deleted file mode 100644
index 02b6ac677e0..00000000000
--- a/db/migrate/20210913010411_create_agent_project_authorizations.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: true
-
-class CreateAgentProjectAuthorizations < Gitlab::Database::Migration[1.0]
- def change
- create_table :agent_project_authorizations do |t|
- t.bigint :project_id, null: false
- t.bigint :agent_id, null: false
- t.jsonb :config, null: false
-
- t.index :project_id
- t.index [:agent_id, :project_id], unique: true
- end
- end
-end
diff --git a/db/migrate/20210913010432_add_agent_project_authorizations_foreign_keys.rb b/db/migrate/20210913010432_add_agent_project_authorizations_foreign_keys.rb
deleted file mode 100644
index 545fc125950..00000000000
--- a/db/migrate/20210913010432_add_agent_project_authorizations_foreign_keys.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class AddAgentProjectAuthorizationsForeignKeys < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :agent_project_authorizations, :projects, column: :project_id
- add_concurrent_foreign_key :agent_project_authorizations, :cluster_agents, column: :agent_id
- end
-
- def down
- with_lock_retries do
- remove_foreign_key_if_exists :agent_project_authorizations, column: :project_id
- end
-
- with_lock_retries do
- remove_foreign_key_if_exists :agent_project_authorizations, column: :agent_id
- end
- end
-end
diff --git a/db/migrate/20210913122457_add_namespace_traversal_ids_to_ci_pending_builds.rb b/db/migrate/20210913122457_add_namespace_traversal_ids_to_ci_pending_builds.rb
deleted file mode 100644
index 9dd420604f4..00000000000
--- a/db/migrate/20210913122457_add_namespace_traversal_ids_to_ci_pending_builds.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddNamespaceTraversalIdsToCiPendingBuilds < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def change
- add_column :ci_pending_builds, :namespace_traversal_ids, :integer, array: true, default: []
- end
-end
diff --git a/db/migrate/20210913224558_update_dependency_proxy_manifests_uniqueness_constraint.rb b/db/migrate/20210913224558_update_dependency_proxy_manifests_uniqueness_constraint.rb
deleted file mode 100644
index 845697c28b5..00000000000
--- a/db/migrate/20210913224558_update_dependency_proxy_manifests_uniqueness_constraint.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class UpdateDependencyProxyManifestsUniquenessConstraint < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- NEW_INDEX_NAME = 'index_dep_prox_manifests_on_group_id_file_name_and_status'
- OLD_INDEX_NAME = 'index_dependency_proxy_manifests_on_group_id_and_file_name'
-
- def up
- add_concurrent_index :dependency_proxy_manifests, [:group_id, :file_name, :status], unique: true, name: NEW_INDEX_NAME
- remove_concurrent_index_by_name :dependency_proxy_manifests, OLD_INDEX_NAME
- end
-
- def down
- add_concurrent_index :dependency_proxy_manifests, [:group_id, :file_name], unique: true, name: OLD_INDEX_NAME
- remove_concurrent_index_by_name :dependency_proxy_manifests, NEW_INDEX_NAME
- end
-end
diff --git a/db/migrate/20210914145810_add_throttle_deprecated_api_columns.rb b/db/migrate/20210914145810_add_throttle_deprecated_api_columns.rb
deleted file mode 100644
index 6e57429bca8..00000000000
--- a/db/migrate/20210914145810_add_throttle_deprecated_api_columns.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddThrottleDeprecatedApiColumns < Gitlab::Database::Migration[1.0]
- def change
- add_column :application_settings, :throttle_unauthenticated_deprecated_api_requests_per_period, :integer, default: 3600, null: false
- add_column :application_settings, :throttle_unauthenticated_deprecated_api_period_in_seconds, :integer, default: 3600, null: false
- add_column :application_settings, :throttle_unauthenticated_deprecated_api_enabled, :boolean, default: false, null: false
-
- add_column :application_settings, :throttle_authenticated_deprecated_api_requests_per_period, :integer, default: 3600, null: false
- add_column :application_settings, :throttle_authenticated_deprecated_api_period_in_seconds, :integer, default: 1800, null: false
- add_column :application_settings, :throttle_authenticated_deprecated_api_enabled, :boolean, default: false, null: false
- end
-end
diff --git a/db/migrate/20210914172202_add_status_index_to_dependency_proxy_tables.rb b/db/migrate/20210914172202_add_status_index_to_dependency_proxy_tables.rb
deleted file mode 100644
index 9b593fbe540..00000000000
--- a/db/migrate/20210914172202_add_status_index_to_dependency_proxy_tables.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddStatusIndexToDependencyProxyTables < Gitlab::Database::Migration[1.0]
- MANIFEST_INDEX_NAME = 'index_dependency_proxy_manifests_on_status'
- BLOB_INDEX_NAME = 'index_dependency_proxy_blobs_on_status'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :dependency_proxy_manifests, :status, name: MANIFEST_INDEX_NAME
- add_concurrent_index :dependency_proxy_blobs, :status, name: BLOB_INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :dependency_proxy_manifests, MANIFEST_INDEX_NAME
- remove_concurrent_index_by_name :dependency_proxy_blobs, BLOB_INDEX_NAME
- end
-end
diff --git a/db/migrate/20210915000453_add_index_on_clusters_integration_prometheus_enabled.rb b/db/migrate/20210915000453_add_index_on_clusters_integration_prometheus_enabled.rb
deleted file mode 100644
index 35cd18c1da9..00000000000
--- a/db/migrate/20210915000453_add_index_on_clusters_integration_prometheus_enabled.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexOnClustersIntegrationPrometheusEnabled < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_clusters_integration_prometheus_enabled'
-
- def up
- add_concurrent_index(:clusters_integration_prometheus, [:enabled, :created_at, :cluster_id], name: INDEX_NAME)
- end
-
- def down
- remove_concurrent_index_by_name(:clusters_integration_prometheus, INDEX_NAME)
- end
-end
diff --git a/db/migrate/20210915001242_add_index_on_clusters_integration_elastic_stack_enabled.rb b/db/migrate/20210915001242_add_index_on_clusters_integration_elastic_stack_enabled.rb
deleted file mode 100644
index bdaa84f27fe..00000000000
--- a/db/migrate/20210915001242_add_index_on_clusters_integration_elastic_stack_enabled.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexOnClustersIntegrationElasticStackEnabled < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_clusters_integration_elasticstack_enabled'
-
- def up
- add_concurrent_index(:clusters_integration_elasticstack, [:enabled, :created_at, :cluster_id], name: INDEX_NAME)
- end
-
- def down
- remove_concurrent_index_by_name(:clusters_integration_elasticstack, INDEX_NAME)
- end
-end
diff --git a/db/migrate/20210915070423_add_avatar_and_description_to_topic.rb b/db/migrate/20210915070423_add_avatar_and_description_to_topic.rb
deleted file mode 100644
index 2ceeb53cd1e..00000000000
--- a/db/migrate/20210915070423_add_avatar_and_description_to_topic.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddAvatarAndDescriptionToTopic < Gitlab::Database::Migration[1.0]
- # rubocop:disable Migration/AddLimitToTextColumns
- def up
- add_column :topics, :avatar, :text
- add_column :topics, :description, :text
- end
- # rubocop:enable Migration/AddLimitToTextColumns
-
- def down
- remove_column :topics, :avatar
- remove_column :topics, :description
- end
-end
diff --git a/db/migrate/20210916132547_add_process_mode_to_resource_groups.rb b/db/migrate/20210916132547_add_process_mode_to_resource_groups.rb
deleted file mode 100644
index 6bac264fcf4..00000000000
--- a/db/migrate/20210916132547_add_process_mode_to_resource_groups.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddProcessModeToResourceGroups < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- PROCESS_MODE_UNORDERED = 0
-
- def up
- add_column :ci_resource_groups, :process_mode, :integer, default: PROCESS_MODE_UNORDERED, null: false, limit: 2
- end
-
- def down
- remove_column :ci_resource_groups, :process_mode
- end
-end
diff --git a/db/migrate/20210917134321_remove_temporary_index_for_project_topics_on_taggings.rb b/db/migrate/20210917134321_remove_temporary_index_for_project_topics_on_taggings.rb
deleted file mode 100644
index ac4821b8007..00000000000
--- a/db/migrate/20210917134321_remove_temporary_index_for_project_topics_on_taggings.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveTemporaryIndexForProjectTopicsOnTaggings < Gitlab::Database::Migration[1.0]
- MIGRATION = 'ExtractProjectTopicsIntoSeparateTable'
- INDEX_NAME = 'tmp_index_taggings_on_id_where_taggable_type_project'
- INDEX_CONDITION = "taggable_type = 'Project'"
-
- disable_ddl_transaction!
-
- def up
- # Ensure that no background jobs of 20210730104800_schedule_extract_project_topics_into_separate_table remain
- finalize_background_migration MIGRATION
- # this index was used in 20210730104800_schedule_extract_project_topics_into_separate_table
- remove_concurrent_index_by_name :taggings, INDEX_NAME
- end
-
- def down
- add_concurrent_index :taggings, :id, where: INDEX_CONDITION, name: INDEX_NAME # rubocop:disable Migration/PreventIndexCreation
- end
-end
diff --git a/db/migrate/20210917153645_remove_pipeline_fk_from_packages_build_infos.rb b/db/migrate/20210917153645_remove_pipeline_fk_from_packages_build_infos.rb
deleted file mode 100644
index 456788de521..00000000000
--- a/db/migrate/20210917153645_remove_pipeline_fk_from_packages_build_infos.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemovePipelineFkFromPackagesBuildInfos < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- remove_foreign_key_if_exists(:packages_build_infos, :ci_pipelines)
- end
- end
-
- def down
- add_concurrent_foreign_key(:packages_build_infos, :ci_pipelines, column: :pipeline_id, on_delete: :nullify)
- end
-end
diff --git a/db/migrate/20210917153905_remove_pipeline_fk_from_packages_package_file_build_infos.rb b/db/migrate/20210917153905_remove_pipeline_fk_from_packages_package_file_build_infos.rb
deleted file mode 100644
index 187ddc8a088..00000000000
--- a/db/migrate/20210917153905_remove_pipeline_fk_from_packages_package_file_build_infos.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemovePipelineFkFromPackagesPackageFileBuildInfos < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- remove_foreign_key_if_exists(:packages_package_file_build_infos, :ci_pipelines)
- end
- end
-
- def down
- add_concurrent_foreign_key(:packages_package_file_build_infos, :ci_pipelines, column: :pipeline_id, on_delete: :nullify)
- end
-end
diff --git a/db/migrate/20210917224419_add_registration_objective_to_user_detail.rb b/db/migrate/20210917224419_add_registration_objective_to_user_detail.rb
deleted file mode 100644
index ee7a474928e..00000000000
--- a/db/migrate/20210917224419_add_registration_objective_to_user_detail.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddRegistrationObjectiveToUserDetail < Gitlab::Database::Migration[1.0]
- def change
- add_column :user_details, :registration_objective, :smallint
- end
-end
diff --git a/db/migrate/20210920104446_add_text_limit_to_topics_description_and_avatar.rb b/db/migrate/20210920104446_add_text_limit_to_topics_description_and_avatar.rb
deleted file mode 100644
index 83ceaa58ff4..00000000000
--- a/db/migrate/20210920104446_add_text_limit_to_topics_description_and_avatar.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddTextLimitToTopicsDescriptionAndAvatar < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :topics, :description, 1024
- add_text_limit :topics, :avatar, 255
- end
-
- def down
- remove_text_limit :topics, :avatar
- remove_text_limit :topics, :description
- end
-end
diff --git a/db/migrate/20210921032008_add_suggest_pipeline_enabled_to_application_settings.rb b/db/migrate/20210921032008_add_suggest_pipeline_enabled_to_application_settings.rb
deleted file mode 100644
index 5ac12eccc7d..00000000000
--- a/db/migrate/20210921032008_add_suggest_pipeline_enabled_to_application_settings.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddSuggestPipelineEnabledToApplicationSettings < Gitlab::Database::Migration[1.0]
- def change
- add_column :application_settings, :suggest_pipeline_enabled, :boolean, default: true, null: false
- end
-end
diff --git a/db/migrate/20210921063924_index_labels_using_varchar_pattern_ops.rb b/db/migrate/20210921063924_index_labels_using_varchar_pattern_ops.rb
deleted file mode 100644
index 67975636488..00000000000
--- a/db/migrate/20210921063924_index_labels_using_varchar_pattern_ops.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-# frozen_string_literal: true
-
-class IndexLabelsUsingVarcharPatternOps < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- NEW_TITLE_INDEX_NAME = 'index_labels_on_title_varchar'
- NEW_PROJECT_ID_TITLE_INDEX_NAME = 'index_labels_on_project_id_and_title_varchar_unique'
- NEW_GROUP_ID_TITLE_INDEX_NAME = 'index_labels_on_group_id_and_title_varchar_unique'
- NEW_GROUP_ID_INDEX_NAME = 'index_labels_on_group_id'
-
- OLD_TITLE_INDEX_NAME = 'index_labels_on_title'
- OLD_PROJECT_ID_TITLE_INDEX_NAME = 'index_labels_on_project_id_and_title_unique'
- OLD_GROUP_ID_TITLE_INDEX_NAME = 'index_labels_on_group_id_and_title_unique'
- OLD_GROUP_ID_PROJECT_ID_TITLE_INDEX_NAME = 'index_labels_on_group_id_and_project_id_and_title'
-
- def up
- add_concurrent_index :labels, :title, order: { title: :varchar_pattern_ops }, name: NEW_TITLE_INDEX_NAME
- add_concurrent_index :labels, [:project_id, :title], where: "labels.group_id IS NULL", unique: true, order: { title: :varchar_pattern_ops }, name: NEW_PROJECT_ID_TITLE_INDEX_NAME
- add_concurrent_index :labels, [:group_id, :title], where: "labels.project_id IS NULL", unique: true, order: { title: :varchar_pattern_ops }, name: NEW_GROUP_ID_TITLE_INDEX_NAME
- add_concurrent_index :labels, :group_id, name: NEW_GROUP_ID_INDEX_NAME
-
- remove_concurrent_index_by_name :labels, OLD_TITLE_INDEX_NAME
- remove_concurrent_index_by_name :labels, OLD_PROJECT_ID_TITLE_INDEX_NAME
- remove_concurrent_index_by_name :labels, OLD_GROUP_ID_TITLE_INDEX_NAME
- remove_concurrent_index_by_name :labels, OLD_GROUP_ID_PROJECT_ID_TITLE_INDEX_NAME
- end
-
- def down
- add_concurrent_index :labels, :title, name: OLD_TITLE_INDEX_NAME
- add_concurrent_index :labels, [:project_id, :title], where: "labels.group_id IS NULL", unique: true, name: OLD_PROJECT_ID_TITLE_INDEX_NAME
- add_concurrent_index :labels, [:group_id, :title], where: "labels.project_id IS NULL", unique: true, name: OLD_GROUP_ID_TITLE_INDEX_NAME
- add_concurrent_index :labels, [:group_id, :project_id, :title], unique: true, name: OLD_GROUP_ID_PROJECT_ID_TITLE_INDEX_NAME
-
- remove_concurrent_index_by_name :labels, NEW_TITLE_INDEX_NAME
- remove_concurrent_index_by_name :labels, NEW_PROJECT_ID_TITLE_INDEX_NAME
- remove_concurrent_index_by_name :labels, NEW_GROUP_ID_TITLE_INDEX_NAME
- remove_concurrent_index_by_name :labels, NEW_GROUP_ID_INDEX_NAME
- end
-end
diff --git a/db/migrate/20210921191010_add_report_type_index_into_approval_project_rules.rb b/db/migrate/20210921191010_add_report_type_index_into_approval_project_rules.rb
deleted file mode 100644
index c03c463b9bb..00000000000
--- a/db/migrate/20210921191010_add_report_type_index_into_approval_project_rules.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddReportTypeIndexIntoApprovalProjectRules < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_approval_project_rules_report_type'
-
- def up
- add_concurrent_index :approval_project_rules, :report_type, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :approval_project_rules, name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20210922172056_add_unique_namespaces_index_on_name_parent_id_and_type.rb b/db/migrate/20210922172056_add_unique_namespaces_index_on_name_parent_id_and_type.rb
deleted file mode 100644
index 6cbbe582ff6..00000000000
--- a/db/migrate/20210922172056_add_unique_namespaces_index_on_name_parent_id_and_type.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddUniqueNamespacesIndexOnNameParentIdAndType < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_namespaces_name_parent_id_type'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :namespaces, [:name, :parent_id, :type], unique: true, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :namespaces, INDEX_NAME
- end
-end
diff --git a/db/migrate/20210922172156_drop_unique_namespaces_index_on_name_and_parent_id.rb b/db/migrate/20210922172156_drop_unique_namespaces_index_on_name_and_parent_id.rb
deleted file mode 100644
index 001f3a6964b..00000000000
--- a/db/migrate/20210922172156_drop_unique_namespaces_index_on_name_and_parent_id.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class DropUniqueNamespacesIndexOnNameAndParentId < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_namespaces_on_name_and_parent_id'
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :namespaces, INDEX_NAME
- end
-
- def down
- add_concurrent_index :namespaces, [:name, :parent_id], unique: true, name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20210922215740_create_issue_customer_relations_contacts.rb b/db/migrate/20210922215740_create_issue_customer_relations_contacts.rb
deleted file mode 100644
index 2d89d295608..00000000000
--- a/db/migrate/20210922215740_create_issue_customer_relations_contacts.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: true
-
-class CreateIssueCustomerRelationsContacts < Gitlab::Database::Migration[1.0]
- def change
- create_table :issue_customer_relations_contacts do |t|
- t.bigint :issue_id, null: false
- t.bigint :contact_id, null: false
- t.timestamps_with_timezone null: false
-
- t.index :contact_id
- t.index [:issue_id, :contact_id], unique: true, name: :index_issue_crm_contacts_on_issue_id_and_contact_id
- end
- end
-end
diff --git a/db/migrate/20210922220104_add_issue_customer_relations_contacts_foreign_keys.rb b/db/migrate/20210922220104_add_issue_customer_relations_contacts_foreign_keys.rb
deleted file mode 100644
index 7be465ca31a..00000000000
--- a/db/migrate/20210922220104_add_issue_customer_relations_contacts_foreign_keys.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class AddIssueCustomerRelationsContactsForeignKeys < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :issue_customer_relations_contacts, :issues, column: :issue_id
- add_concurrent_foreign_key :issue_customer_relations_contacts, :customer_relations_contacts, column: :contact_id
- end
-
- def down
- with_lock_retries do
- remove_foreign_key_if_exists :issue_customer_relations_contacts, column: :issue_id
- end
-
- with_lock_retries do
- remove_foreign_key_if_exists :issue_customer_relations_contacts, column: :contact_id
- end
- end
-end
diff --git a/db/migrate/20210923042323_add_meta_data_to_user_credit_card_validations.rb b/db/migrate/20210923042323_add_meta_data_to_user_credit_card_validations.rb
deleted file mode 100644
index 2958285e7a5..00000000000
--- a/db/migrate/20210923042323_add_meta_data_to_user_credit_card_validations.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddMetaDataToUserCreditCardValidations < Gitlab::Database::Migration[1.0]
- # rubocop:disable Migration/AddLimitToTextColumns
- def change
- change_table :user_credit_card_validations do |t|
- t.date :expiration_date
- t.integer :last_digits, limit: 2 # last 4 digits
- t.text :holder_name
- end
- end
- # rubocop:enable Migration/AddLimitToTextColumns
-end
diff --git a/db/migrate/20210923042324_limit_holder_name_on_user_credit_card_validations.rb b/db/migrate/20210923042324_limit_holder_name_on_user_credit_card_validations.rb
deleted file mode 100644
index 11d436093b7..00000000000
--- a/db/migrate/20210923042324_limit_holder_name_on_user_credit_card_validations.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-class LimitHolderNameOnUserCreditCardValidations < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :user_credit_card_validations, :holder_name, 26 # ISO IEC 7813
-
- add_check_constraint(:user_credit_card_validations, 'last_digits BETWEEN 0 AND 9999', constraint_name)
- end
-
- def down
- remove_text_limit :user_credit_card_validations, :holder_name
-
- remove_check_constraint(:user_credit_card_validations, constraint_name)
- end
-
- private
-
- def constraint_name
- check_constraint_name(:user_credit_card_validations, :last_digits, 'range')
- end
-end
diff --git a/db/migrate/20210923042325_index_meta_data_on_user_credit_card_validations.rb b/db/migrate/20210923042325_index_meta_data_on_user_credit_card_validations.rb
deleted file mode 100644
index cc4f4d35f09..00000000000
--- a/db/migrate/20210923042325_index_meta_data_on_user_credit_card_validations.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class IndexMetaDataOnUserCreditCardValidations < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_user_credit_card_validations_meta_data_full_match'
-
- def up
- add_concurrent_index :user_credit_card_validations,
- [:holder_name, :expiration_date, :last_digits, :credit_card_validated_at],
- name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index :user_credit_card_validations,
- [:holder_name, :expiration_date, :last_digits, :credit_card_validated_at],
- name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20210923151641_change_default_for_integrated_error_tracking.rb b/db/migrate/20210923151641_change_default_for_integrated_error_tracking.rb
deleted file mode 100644
index fc4cc1945f3..00000000000
--- a/db/migrate/20210923151641_change_default_for_integrated_error_tracking.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class ChangeDefaultForIntegratedErrorTracking < Gitlab::Database::Migration[1.0]
- def up
- change_column_default :project_error_tracking_settings, :integrated, from: false, to: true
- end
-
- def down
- change_column_default :project_error_tracking_settings, :integrated, from: true, to: false
- end
-end
diff --git a/db/migrate/20210928155022_improve_index_for_error_tracking.rb b/db/migrate/20210928155022_improve_index_for_error_tracking.rb
deleted file mode 100644
index ec8427670d7..00000000000
--- a/db/migrate/20210928155022_improve_index_for_error_tracking.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-# frozen_string_literal: true
-
-class ImproveIndexForErrorTracking < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :error_tracking_errors, %i(project_id status last_seen_at id),
- order: { last_seen_at: :desc, id: :desc },
- name: 'index_et_errors_on_project_id_and_status_last_seen_at_id_desc'
-
- add_concurrent_index :error_tracking_errors, %i(project_id status first_seen_at id),
- order: { first_seen_at: :desc, id: :desc },
- name: 'index_et_errors_on_project_id_and_status_first_seen_at_id_desc'
-
- add_concurrent_index :error_tracking_errors, %i(project_id status events_count id),
- order: { events_count: :desc, id: :desc },
- name: 'index_et_errors_on_project_id_and_status_events_count_id_desc'
-
- remove_concurrent_index :error_tracking_errors, [:project_id, :status, :last_seen_at], name: 'index_et_errors_on_project_id_and_status_and_last_seen_at'
- remove_concurrent_index :error_tracking_errors, [:project_id, :status, :first_seen_at], name: 'index_et_errors_on_project_id_and_status_and_first_seen_at'
- remove_concurrent_index :error_tracking_errors, [:project_id, :status, :events_count], name: 'index_et_errors_on_project_id_and_status_and_events_count'
- end
-
- def down
- add_concurrent_index :error_tracking_errors, [:project_id, :status, :last_seen_at], name: 'index_et_errors_on_project_id_and_status_and_last_seen_at'
- add_concurrent_index :error_tracking_errors, [:project_id, :status, :first_seen_at], name: 'index_et_errors_on_project_id_and_status_and_first_seen_at'
- add_concurrent_index :error_tracking_errors, [:project_id, :status, :events_count], name: 'index_et_errors_on_project_id_and_status_and_events_count'
-
- remove_concurrent_index :error_tracking_errors, [:project_id, :status, :last_seen_at, :id], name: 'index_et_errors_on_project_id_and_status_last_seen_at_id_desc'
- remove_concurrent_index :error_tracking_errors, [:project_id, :status, :first_seen_at, :id], name: 'index_et_errors_on_project_id_and_status_first_seen_at_id_desc'
- remove_concurrent_index :error_tracking_errors, [:project_id, :status, :events_count, :id], name: 'index_et_errors_on_project_id_and_status_events_count_id_desc'
- end
-end
diff --git a/db/migrate/20210928171122_add_group_id_status_id_index_to_dependency_proxy_tables.rb b/db/migrate/20210928171122_add_group_id_status_id_index_to_dependency_proxy_tables.rb
deleted file mode 100644
index ef437641f2c..00000000000
--- a/db/migrate/20210928171122_add_group_id_status_id_index_to_dependency_proxy_tables.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddGroupIdStatusIdIndexToDependencyProxyTables < Gitlab::Database::Migration[1.0]
- MANIFEST_INDEX_NAME = 'index_dependency_proxy_manifests_on_group_id_status_and_id'
- BLOB_INDEX_NAME = 'index_dependency_proxy_blobs_on_group_id_status_and_id'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :dependency_proxy_manifests, [:group_id, :status, :id], name: MANIFEST_INDEX_NAME
- add_concurrent_index :dependency_proxy_blobs, [:group_id, :status, :id], name: BLOB_INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :dependency_proxy_manifests, MANIFEST_INDEX_NAME
- remove_concurrent_index_by_name :dependency_proxy_blobs, BLOB_INDEX_NAME
- end
-end
diff --git a/db/migrate/20210929025600_add_phone_to_user_details.rb b/db/migrate/20210929025600_add_phone_to_user_details.rb
deleted file mode 100644
index 9bcfd4ab7e3..00000000000
--- a/db/migrate/20210929025600_add_phone_to_user_details.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddPhoneToUserDetails < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- # rubocop:disable Migration/AddLimitToTextColumns
- def up
- add_column :user_details, :phone, :text, comment: 'JiHu-specific column'
- end
- # rubocop:enable Migration/AddLimitToTextColumns
-
- def down
- remove_column :user_details, :phone
- end
-end
diff --git a/db/migrate/20210929030834_add_text_limit_to_user_details_phone.rb b/db/migrate/20210929030834_add_text_limit_to_user_details_phone.rb
deleted file mode 100644
index f250aad3253..00000000000
--- a/db/migrate/20210929030834_add_text_limit_to_user_details_phone.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddTextLimitToUserDetailsPhone < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :user_details, :phone, 32
- end
-
- def down
- remove_text_limit :user_details, :phone
- end
-end
diff --git a/db/migrate/20210929031049_add_unique_index_phone_on_user_details.rb b/db/migrate/20210929031049_add_unique_index_phone_on_user_details.rb
deleted file mode 100644
index e0cf7aa8a44..00000000000
--- a/db/migrate/20210929031049_add_unique_index_phone_on_user_details.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddUniqueIndexPhoneOnUserDetails < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_user_details_on_phone'
-
- def up
- add_concurrent_index :user_details, :phone, unique: true, where: 'phone IS NOT NULL', 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/migrate/20210929032555_create_verification_codes.rb b/db/migrate/20210929032555_create_verification_codes.rb
deleted file mode 100644
index ad743641b9c..00000000000
--- a/db/migrate/20210929032555_create_verification_codes.rb
+++ /dev/null
@@ -1,36 +0,0 @@
-# frozen_string_literal: true
-
-class CreateVerificationCodes < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::PartitioningMigrationHelpers::TableManagementHelpers
-
- def up
- constraint_visitor_id_code = check_constraint_name('verification_codes', 'visitor_id_code', 'max_length')
- constraint_code = check_constraint_name('verification_codes', 'code', 'max_length')
- constraint_phone = check_constraint_name('verification_codes', 'phone', 'max_length')
-
- execute(<<~SQL)
- CREATE TABLE verification_codes (
- created_at timestamp with time zone NOT NULL DEFAULT NOW(),
- visitor_id_code text,
- code text,
- phone text,
- PRIMARY KEY (created_at, visitor_id_code, code, phone),
- CONSTRAINT #{constraint_visitor_id_code} CHECK ((char_length(visitor_id_code) <= 64)),
- CONSTRAINT #{constraint_code} CHECK ((char_length(code) <= 8)),
- CONSTRAINT #{constraint_phone} CHECK ((char_length(phone) <= 32))
- ) PARTITION BY RANGE (created_at);
- COMMENT ON TABLE verification_codes IS 'JiHu-specific table';
-
- CREATE UNIQUE INDEX index_verification_codes_on_phone_and_visitor_id_code ON verification_codes (visitor_id_code, phone, created_at);
- COMMENT ON INDEX index_verification_codes_on_phone_and_visitor_id_code IS 'JiHu-specific index';
- SQL
-
- min_date = Date.today - 1.month
- max_date = Date.today + 1.month
- create_daterange_partitions('verification_codes', 'created_at', min_date, max_date)
- end
-
- def down
- drop_table :verification_codes
- end
-end
diff --git a/db/migrate/20210929115340_add_security_policy_configurations_management_project_id_foreign_key.rb b/db/migrate/20210929115340_add_security_policy_configurations_management_project_id_foreign_key.rb
deleted file mode 100644
index 1335c06cf1f..00000000000
--- a/db/migrate/20210929115340_add_security_policy_configurations_management_project_id_foreign_key.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddSecurityPolicyConfigurationsManagementProjectIdForeignKey < Gitlab::Database::Migration[1.0]
- CONSTRAINT_NAME = 'fk_security_policy_configurations_management_project_id'
- OLD_CONSTRAINT_NAME = 'fk_rails_42ed6c25ec'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key(:security_orchestration_policy_configurations, :projects, column: :security_policy_management_project_id, on_delete: :cascade, name: CONSTRAINT_NAME)
- remove_foreign_key_if_exists(:security_orchestration_policy_configurations, column: :security_policy_management_project_id, on_delete: :restrict, name: OLD_CONSTRAINT_NAME)
- end
-
- def down
- add_concurrent_foreign_key(:security_orchestration_policy_configurations, :projects, column: :security_policy_management_project_id, on_delete: :restrict, name: OLD_CONSTRAINT_NAME)
- remove_foreign_key_if_exists(:security_orchestration_policy_configurations, column: :security_policy_management_project_id, on_delete: :cascade, name: CONSTRAINT_NAME)
- end
-end
diff --git a/db/migrate/20210929121516_add_releases_author_id_id_created_at_index.rb b/db/migrate/20210929121516_add_releases_author_id_id_created_at_index.rb
deleted file mode 100644
index 60ca3040d70..00000000000
--- a/db/migrate/20210929121516_add_releases_author_id_id_created_at_index.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: true
-class AddReleasesAuthorIdIdCreatedAtIndex < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_releases_on_author_id_id_created_at'
-
- def up
- add_concurrent_index :releases, [:author_id, :id, :created_at], name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :releases, INDEX_NAME
- end
-end
diff --git a/db/migrate/20210929144453_add_warn_about_potentially_unwanted_characters_to_project_settings.rb b/db/migrate/20210929144453_add_warn_about_potentially_unwanted_characters_to_project_settings.rb
deleted file mode 100644
index 166afa13371..00000000000
--- a/db/migrate/20210929144453_add_warn_about_potentially_unwanted_characters_to_project_settings.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 AddWarnAboutPotentiallyUnwantedCharactersToProjectSettings < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def up
- add_column :project_settings, :warn_about_potentially_unwanted_characters, :boolean, null: false, default: true
- end
-
- def down
- remove_column :project_settings, :warn_about_potentially_unwanted_characters
- end
-end
diff --git a/db/migrate/20210930081208_fix_deprecated_api_throttle_defaults.rb b/db/migrate/20210930081208_fix_deprecated_api_throttle_defaults.rb
deleted file mode 100644
index be82b16ee8c..00000000000
--- a/db/migrate/20210930081208_fix_deprecated_api_throttle_defaults.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-# frozen_string_literal: true
-
-class FixDeprecatedApiThrottleDefaults < Gitlab::Database::Migration[1.0]
- def change
- change_column_default :application_settings, :throttle_unauthenticated_deprecated_api_requests_per_period, from: 3600, to: 1800
- change_column_default :application_settings, :throttle_authenticated_deprecated_api_period_in_seconds, from: 1800, to: 3600
- end
-end
diff --git a/db/migrate/20211001001222_add_source_version_to_bulk_imports.rb b/db/migrate/20211001001222_add_source_version_to_bulk_imports.rb
deleted file mode 100644
index d0eb4a32cac..00000000000
--- a/db/migrate/20211001001222_add_source_version_to_bulk_imports.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddSourceVersionToBulkImports < Gitlab::Database::Migration[1.0]
- def change
- add_column :bulk_imports, :source_version, :text # rubocop:disable Migration/AddLimitToTextColumns
- end
-end
diff --git a/db/migrate/20211004062942_create_coverage_fuzzing_corpuses.rb b/db/migrate/20211004062942_create_coverage_fuzzing_corpuses.rb
deleted file mode 100644
index c24883b626d..00000000000
--- a/db/migrate/20211004062942_create_coverage_fuzzing_corpuses.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class CreateCoverageFuzzingCorpuses < Gitlab::Database::Migration[1.0]
- def change
- create_table :coverage_fuzzing_corpuses do |t|
- t.bigint :project_id, null: false
- t.bigint :user_id
- t.bigint :package_id, null: false
-
- t.datetime_with_timezone :file_updated_at, null: false, default: -> { 'NOW()' }
- t.timestamps_with_timezone null: false
-
- t.index :project_id
- t.index :user_id
- t.index :package_id
- end
- end
-end
diff --git a/db/migrate/20211004075629_add_topics_name_gin_index.rb b/db/migrate/20211004075629_add_topics_name_gin_index.rb
deleted file mode 100644
index 94634a4cb2f..00000000000
--- a/db/migrate/20211004075629_add_topics_name_gin_index.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddTopicsNameGinIndex < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_topics_on_name_trigram'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :topics, :name, name: INDEX_NAME, using: :gin, opclass: { name: :gin_trgm_ops }
- end
-
- def down
- remove_concurrent_index_by_name :topics, INDEX_NAME
- end
-end
diff --git a/db/migrate/20211004081911_add_external_event_destination_limit_to_plan_limits.rb b/db/migrate/20211004081911_add_external_event_destination_limit_to_plan_limits.rb
deleted file mode 100644
index 3e44c388617..00000000000
--- a/db/migrate/20211004081911_add_external_event_destination_limit_to_plan_limits.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddExternalEventDestinationLimitToPlanLimits < Gitlab::Database::Migration[1.0]
- def change
- add_column(:plan_limits, :external_audit_event_destinations, :integer, default: 5, null: false)
- end
-end
diff --git a/db/migrate/20211004122540_create_member_tasks.rb b/db/migrate/20211004122540_create_member_tasks.rb
deleted file mode 100644
index e1141873bcb..00000000000
--- a/db/migrate/20211004122540_create_member_tasks.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class CreateMemberTasks < Gitlab::Database::Migration[1.0]
- def change
- create_table :member_tasks do |t|
- t.references :member, index: true, null: false
- t.references :project, index: true, null: false
- t.timestamps_with_timezone null: false
- t.integer :tasks, limit: 2, array: true, null: false, default: []
- t.index [:member_id, :project_id], unique: true
- end
- end
-end
diff --git a/db/migrate/20211005063519_add_foreign_key_to_corpuses_on_project.rb b/db/migrate/20211005063519_add_foreign_key_to_corpuses_on_project.rb
deleted file mode 100644
index ba1fb443343..00000000000
--- a/db/migrate/20211005063519_add_foreign_key_to_corpuses_on_project.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddForeignKeyToCorpusesOnProject < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :coverage_fuzzing_corpuses, :projects, column: :project_id, on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :coverage_fuzzing_corpuses, column: :project_id
- end
- end
-end
diff --git a/db/migrate/20211005063616_add_foreign_key_to_corpuses_on_user.rb b/db/migrate/20211005063616_add_foreign_key_to_corpuses_on_user.rb
deleted file mode 100644
index da08ab97acf..00000000000
--- a/db/migrate/20211005063616_add_foreign_key_to_corpuses_on_user.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddForeignKeyToCorpusesOnUser < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :coverage_fuzzing_corpuses, :users, column: :user_id, on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :coverage_fuzzing_corpuses, column: :user_id
- end
- end
-end
diff --git a/db/migrate/20211005063723_add_foreign_key_to_corpuses_on_package.rb b/db/migrate/20211005063723_add_foreign_key_to_corpuses_on_package.rb
deleted file mode 100644
index 74ba7b070d0..00000000000
--- a/db/migrate/20211005063723_add_foreign_key_to_corpuses_on_package.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddForeignKeyToCorpusesOnPackage < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :coverage_fuzzing_corpuses, :packages_packages, column: :package_id, on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :coverage_fuzzing_corpuses, column: :package_id
- end
- end
-end
diff --git a/db/migrate/20211005092428_drop_time_range_partitioned_loose_fk.rb b/db/migrate/20211005092428_drop_time_range_partitioned_loose_fk.rb
deleted file mode 100644
index 2aaf5e4cf87..00000000000
--- a/db/migrate/20211005092428_drop_time_range_partitioned_loose_fk.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-class DropTimeRangePartitionedLooseFk < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::PartitioningMigrationHelpers
-
- def up
- # the table is not in use
- drop_table :loose_foreign_keys_deleted_records # rubocop: disable Migration/DropTable
- end
-
- def down
- constraint_name = check_constraint_name('loose_foreign_keys_deleted_records', 'deleted_table_name', 'max_length')
- execute(<<~SQL)
- CREATE TABLE loose_foreign_keys_deleted_records (
- created_at timestamp with time zone NOT NULL DEFAULT NOW(),
- deleted_table_name text NOT NULL,
- deleted_table_primary_key_value bigint NOT NULL,
- PRIMARY KEY (created_at, deleted_table_name, deleted_table_primary_key_value),
- CONSTRAINT #{constraint_name} CHECK ((char_length(deleted_table_name) <= 63))
- ) PARTITION BY RANGE (created_at);
- SQL
-
- min_date = Date.today - 1.month
- max_date = Date.today + 3.months
- create_daterange_partitions('loose_foreign_keys_deleted_records', 'created_at', min_date, max_date)
- end
-end
diff --git a/db/migrate/20211005093558_add_range_partitioned_loose_fk_table.rb b/db/migrate/20211005093558_add_range_partitioned_loose_fk_table.rb
deleted file mode 100644
index 6f52b6ec63b..00000000000
--- a/db/migrate/20211005093558_add_range_partitioned_loose_fk_table.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-class AddRangePartitionedLooseFkTable < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::PartitioningMigrationHelpers::TableManagementHelpers
-
- def up
- constraint_name = check_constraint_name('loose_foreign_keys_deleted_records', 'fully_qualified_table_name', 'max_length')
- execute(<<~SQL)
- CREATE TABLE loose_foreign_keys_deleted_records (
- id BIGSERIAL NOT NULL,
- partition bigint NOT NULL,
- primary_key_value bigint NOT NULL,
- status smallint NOT NULL DEFAULT 1,
- created_at timestamp with time zone NOT NULL DEFAULT NOW(),
- fully_qualified_table_name text NOT NULL,
- PRIMARY KEY (partition, id),
- CONSTRAINT #{constraint_name} CHECK ((char_length(fully_qualified_table_name) <= 150))
- ) PARTITION BY LIST (partition);
-
- CREATE TABLE gitlab_partitions_static.loose_foreign_keys_deleted_records_1
- PARTITION OF loose_foreign_keys_deleted_records
- FOR VALUES IN (1);
- SQL
- end
-
- def down
- drop_table :loose_foreign_keys_deleted_records
- end
-end
diff --git a/db/migrate/20211005100112_recreate_loose_fk_insert_function.rb b/db/migrate/20211005100112_recreate_loose_fk_insert_function.rb
deleted file mode 100644
index b03ad069eba..00000000000
--- a/db/migrate/20211005100112_recreate_loose_fk_insert_function.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-# frozen_string_literal: true
-
-class RecreateLooseFkInsertFunction < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::MigrationHelpers::LooseForeignKeyHelpers
-
- def up
- execute(<<~SQL)
- CREATE OR REPLACE FUNCTION #{DELETED_RECORDS_INSERT_FUNCTION_NAME}()
- RETURNS TRIGGER AS
- $$
- BEGIN
- INSERT INTO loose_foreign_keys_deleted_records
- (partition, fully_qualified_table_name, primary_key_value)
- SELECT 1, TG_TABLE_SCHEMA || '.' || TG_TABLE_NAME, old_table.id FROM old_table
- ON CONFLICT DO NOTHING;
-
- RETURN NULL;
- END
- $$ LANGUAGE PLPGSQL
- SQL
- end
-
- def down
- # old function
- execute(<<~SQL)
- CREATE OR REPLACE FUNCTION #{DELETED_RECORDS_INSERT_FUNCTION_NAME}()
- RETURNS TRIGGER AS
- $$
- BEGIN
- INSERT INTO loose_foreign_keys_deleted_records
- (deleted_table_name, deleted_table_primary_key_value)
- SELECT TG_TABLE_NAME, old_table.id FROM old_table
- ON CONFLICT DO NOTHING;
-
- RETURN NULL;
- END
- $$ LANGUAGE PLPGSQL
- SQL
- end
-end
diff --git a/db/migrate/20211005112404_add_member_id_foreign_key_to_member_tasks.rb b/db/migrate/20211005112404_add_member_id_foreign_key_to_member_tasks.rb
deleted file mode 100644
index f3447918ad3..00000000000
--- a/db/migrate/20211005112404_add_member_id_foreign_key_to_member_tasks.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddMemberIdForeignKeyToMemberTasks < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :member_tasks, :members, column: :member_id, on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :member_tasks, column: :member_id
- end
- end
-end
diff --git a/db/migrate/20211005112645_add_project_id_foreign_key_to_member_tasks.rb b/db/migrate/20211005112645_add_project_id_foreign_key_to_member_tasks.rb
deleted file mode 100644
index ead6bb88e60..00000000000
--- a/db/migrate/20211005112645_add_project_id_foreign_key_to_member_tasks.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddProjectIdForeignKeyToMemberTasks < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :member_tasks, :projects, column: :project_id, on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :member_tasks, column: :project_id
- end
- end
-end
diff --git a/db/migrate/20211006060254_add_topics_total_projects_count_cache.rb b/db/migrate/20211006060254_add_topics_total_projects_count_cache.rb
deleted file mode 100644
index ebca4c70879..00000000000
--- a/db/migrate/20211006060254_add_topics_total_projects_count_cache.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class AddTopicsTotalProjectsCountCache < Gitlab::Database::Migration[1.0]
- def up
- add_column :topics, :total_projects_count, :bigint, null: false, default: 0
- end
-
- def down
- remove_column :topics, :total_projects_count
- end
-end
diff --git a/db/migrate/20211006103122_change_helm_channel_length.rb b/db/migrate/20211006103122_change_helm_channel_length.rb
deleted file mode 100644
index 6579ca4053b..00000000000
--- a/db/migrate/20211006103122_change_helm_channel_length.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: true
-
-class ChangeHelmChannelLength < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :packages_helm_file_metadata, :channel, 255, constraint_name: check_constraint_name(:packages_helm_file_metadata, :channel, 'max_length_v2')
- remove_text_limit :packages_helm_file_metadata, :channel, constraint_name: check_constraint_name(:packages_helm_file_metadata, :channel, 'max_length')
- end
-
- def down
- # no-op: Danger of failing if there are records with length(channel) > 63
- end
-end
diff --git a/db/migrate/20211006122010_add_topics_total_projects_count_index.rb b/db/migrate/20211006122010_add_topics_total_projects_count_index.rb
deleted file mode 100644
index bd969a9ff0a..00000000000
--- a/db/migrate/20211006122010_add_topics_total_projects_count_index.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddTopicsTotalProjectsCountIndex < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_topics_total_projects_count'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :topics, [:total_projects_count, :id], order: { total_projects_count: :desc }, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :topics, INDEX_NAME
- end
-end
diff --git a/db/migrate/20211007090229_create_issue_search_table.rb b/db/migrate/20211007090229_create_issue_search_table.rb
deleted file mode 100644
index 1fc15d20bd0..00000000000
--- a/db/migrate/20211007090229_create_issue_search_table.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-class CreateIssueSearchTable < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::PartitioningMigrationHelpers::TableManagementHelpers
-
- def up
- execute <<~SQL
- CREATE TABLE issue_search_data (
- project_id bigint NOT NULL REFERENCES projects(id) ON DELETE CASCADE,
- issue_id bigint NOT NULL REFERENCES issues(id) ON DELETE CASCADE,
- created_at timestamp with time zone DEFAULT NOW() NOT NULL,
- updated_at timestamp with time zone DEFAULT NOW() NOT NULL,
- search_vector tsvector,
- PRIMARY KEY (project_id, issue_id)
- ) PARTITION BY HASH (project_id)
- SQL
-
- # rubocop: disable Migration/AddIndex
- add_index :issue_search_data, :issue_id
- add_index :issue_search_data, :search_vector, using: :gin, name: 'index_issue_search_data_on_search_vector'
- # rubocop: enable Migration/AddIndex
-
- create_hash_partitions :issue_search_data, 64
- end
-
- def down
- drop_table :issue_search_data
- end
-end
diff --git a/db/migrate/20211007113136_add_status_column_to_security_scans_table.rb b/db/migrate/20211007113136_add_status_column_to_security_scans_table.rb
deleted file mode 100644
index d60171dead7..00000000000
--- a/db/migrate/20211007113136_add_status_column_to_security_scans_table.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddStatusColumnToSecurityScansTable < Gitlab::Database::Migration[1.0]
- def change
- add_column :security_scans, :status, :integer, limit: 1, default: 0, null: false
- end
-end
diff --git a/db/migrate/20211008043855_remove_notes_trigram_index.rb b/db/migrate/20211008043855_remove_notes_trigram_index.rb
deleted file mode 100644
index a20ef1852e2..00000000000
--- a/db/migrate/20211008043855_remove_notes_trigram_index.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveNotesTrigramIndex < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- NOTES_TRIGRAM_INDEX_NAME = 'index_notes_on_note_trigram'
-
- def up
- remove_concurrent_index_by_name(:notes, NOTES_TRIGRAM_INDEX_NAME)
- end
-
- def down
- add_concurrent_index :notes, :note, name: NOTES_TRIGRAM_INDEX_NAME, using: :gin, opclass: { content: :gin_trgm_ops }
- end
-end
diff --git a/db/migrate/20211008181451_add_shared_runners_duration_to_ci_namespace_monthly_usages.rb b/db/migrate/20211008181451_add_shared_runners_duration_to_ci_namespace_monthly_usages.rb
deleted file mode 100644
index 862d1a26867..00000000000
--- a/db/migrate/20211008181451_add_shared_runners_duration_to_ci_namespace_monthly_usages.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddSharedRunnersDurationToCiNamespaceMonthlyUsages < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def change
- add_column :ci_namespace_monthly_usages, :shared_runners_duration, :integer, default: 0, null: false
- end
-end
diff --git a/db/migrate/20211008182954_add_shared_runners_duration_to_ci_project_monthly_usages.rb b/db/migrate/20211008182954_add_shared_runners_duration_to_ci_project_monthly_usages.rb
deleted file mode 100644
index 76bb7356f0f..00000000000
--- a/db/migrate/20211008182954_add_shared_runners_duration_to_ci_project_monthly_usages.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddSharedRunnersDurationToCiProjectMonthlyUsages < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def change
- add_column :ci_project_monthly_usages, :shared_runners_duration, :integer, default: 0, null: false
- end
-end
diff --git a/db/migrate/20211008193137_add_health_status_column_on_clusters_integration_prometheus.rb b/db/migrate/20211008193137_add_health_status_column_on_clusters_integration_prometheus.rb
deleted file mode 100644
index a69d12d4e52..00000000000
--- a/db/migrate/20211008193137_add_health_status_column_on_clusters_integration_prometheus.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-# frozen_string_literal: true
-
-class AddHealthStatusColumnOnClustersIntegrationPrometheus < Gitlab::Database::Migration[1.0]
- def change
- # For now, health checks will only run on monitor demo projects
- add_column :clusters_integration_prometheus, :health_status, :smallint, limit: 2, default: 0, null: false
- end
-end
diff --git a/db/migrate/20211011004242_create_content_blocked_states.rb b/db/migrate/20211011004242_create_content_blocked_states.rb
deleted file mode 100644
index d70717f9786..00000000000
--- a/db/migrate/20211011004242_create_content_blocked_states.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class CreateContentBlockedStates < Gitlab::Database::Migration[1.0]
- def change
- create_table :content_blocked_states, comment: 'JiHu-specific table' do |t|
- t.timestamps_with_timezone null: false
- t.binary :commit_sha, null: false
- t.binary :blob_sha, null: false
- t.text :path, null: false, limit: 2048
- t.text :container_identifier, null: false, limit: 255
-
- t.index [:container_identifier, :commit_sha, :path], name: 'index_content_blocked_states_on_container_id_commit_sha_path', unique: true
- end
- end
-end
diff --git a/db/migrate/20211011140930_create_ci_namespace_mirrors.rb b/db/migrate/20211011140930_create_ci_namespace_mirrors.rb
deleted file mode 100644
index b9a708c5d7b..00000000000
--- a/db/migrate/20211011140930_create_ci_namespace_mirrors.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class CreateCiNamespaceMirrors < Gitlab::Database::Migration[1.0]
- TABLE_NAME = :ci_namespace_mirrors
- INDEX_NAME = "index_gin_#{TABLE_NAME}_on_traversal_ids"
-
- def change
- create_table TABLE_NAME do |t|
- t.integer :namespace_id, null: false, index: { unique: true }
- t.integer :traversal_ids, array: true, default: [], null: false
-
- t.index :traversal_ids, name: INDEX_NAME, using: :gin
- end
- end
-end
diff --git a/db/migrate/20211011140931_create_ci_project_mirrors.rb b/db/migrate/20211011140931_create_ci_project_mirrors.rb
deleted file mode 100644
index 2407b7e0b84..00000000000
--- a/db/migrate/20211011140931_create_ci_project_mirrors.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-# frozen_string_literal: true
-
-class CreateCiProjectMirrors < Gitlab::Database::Migration[1.0]
- TABLE_NAME = :ci_project_mirrors
-
- def change
- create_table TABLE_NAME do |t|
- t.integer :project_id, null: false, index: { unique: true }
- t.integer :namespace_id, null: false, index: true
- end
- end
-end
diff --git a/db/migrate/20211011140932_create_namespaces_sync_events.rb b/db/migrate/20211011140932_create_namespaces_sync_events.rb
deleted file mode 100644
index 06831423343..00000000000
--- a/db/migrate/20211011140932_create_namespaces_sync_events.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class CreateNamespacesSyncEvents < Gitlab::Database::Migration[1.0]
- def change
- create_table :namespaces_sync_events do |t|
- t.references :namespace, null: false, index: true, foreign_key: { on_delete: :cascade }
- end
- end
-end
diff --git a/db/migrate/20211011141239_create_projects_sync_events.rb b/db/migrate/20211011141239_create_projects_sync_events.rb
deleted file mode 100644
index 50fe988ac1b..00000000000
--- a/db/migrate/20211011141239_create_projects_sync_events.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class CreateProjectsSyncEvents < Gitlab::Database::Migration[1.0]
- def change
- create_table :projects_sync_events do |t|
- t.references :project, null: false, index: true, foreign_key: { on_delete: :cascade }
- end
- end
-end
diff --git a/db/migrate/20211011141242_create_namespaces_sync_trigger.rb b/db/migrate/20211011141242_create_namespaces_sync_trigger.rb
deleted file mode 100644
index 91f64709f28..00000000000
--- a/db/migrate/20211011141242_create_namespaces_sync_trigger.rb
+++ /dev/null
@@ -1,37 +0,0 @@
-# frozen_string_literal: true
-
-class CreateNamespacesSyncTrigger < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::SchemaHelpers
-
- enable_lock_retries!
-
- TABLE_NAME = 'namespaces'
- EVENT_TABLE_NAME = 'namespaces_sync_events'
- FUNCTION_NAME = 'insert_namespaces_sync_event'
- TRIGGER_ON_INSERT = 'trigger_namespaces_parent_id_on_insert'
- TRIGGER_ON_UPDATE = 'trigger_namespaces_parent_id_on_update'
-
- def up
- create_trigger_function(FUNCTION_NAME) do
- <<~SQL
- INSERT INTO #{EVENT_TABLE_NAME} (namespace_id)
- VALUES(COALESCE(NEW.id, OLD.id));
- RETURN NULL;
- SQL
- end
-
- create_trigger(TABLE_NAME, TRIGGER_ON_INSERT, FUNCTION_NAME, fires: 'AFTER INSERT')
-
- create_trigger(TABLE_NAME, TRIGGER_ON_UPDATE, FUNCTION_NAME, fires: 'AFTER UPDATE') do
- <<~SQL
- WHEN (OLD.parent_id IS DISTINCT FROM NEW.parent_id)
- SQL
- end
- end
-
- def down
- drop_trigger(TABLE_NAME, TRIGGER_ON_INSERT)
- drop_trigger(TABLE_NAME, TRIGGER_ON_UPDATE)
- drop_function(FUNCTION_NAME)
- end
-end
diff --git a/db/migrate/20211011141243_create_projects_sync_trigger.rb b/db/migrate/20211011141243_create_projects_sync_trigger.rb
deleted file mode 100644
index 03b31c35a3a..00000000000
--- a/db/migrate/20211011141243_create_projects_sync_trigger.rb
+++ /dev/null
@@ -1,37 +0,0 @@
-# frozen_string_literal: true
-
-class CreateProjectsSyncTrigger < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::SchemaHelpers
-
- enable_lock_retries!
-
- TABLE_NAME = 'projects'
- EVENT_TABLE_NAME = 'projects_sync_events'
- FUNCTION_NAME = 'insert_projects_sync_event'
- TRIGGER_ON_INSERT = 'trigger_projects_parent_id_on_insert'
- TRIGGER_ON_UPDATE = 'trigger_projects_parent_id_on_update'
-
- def up
- create_trigger_function(FUNCTION_NAME) do
- <<~SQL
- INSERT INTO #{EVENT_TABLE_NAME} (project_id)
- VALUES(COALESCE(NEW.id, OLD.id));
- RETURN NULL;
- SQL
- end
-
- create_trigger(TABLE_NAME, TRIGGER_ON_INSERT, FUNCTION_NAME, fires: 'AFTER INSERT')
-
- create_trigger(TABLE_NAME, TRIGGER_ON_UPDATE, FUNCTION_NAME, fires: 'AFTER UPDATE') do
- <<~SQL
- WHEN (OLD.namespace_id IS DISTINCT FROM NEW.namespace_id)
- SQL
- end
- end
-
- def down
- drop_trigger(TABLE_NAME, TRIGGER_ON_INSERT)
- drop_trigger(TABLE_NAME, TRIGGER_ON_UPDATE)
- drop_function(FUNCTION_NAME)
- end
-end
diff --git a/db/migrate/20211012015903_next_traversal_ids_sibling_function.rb b/db/migrate/20211012015903_next_traversal_ids_sibling_function.rb
deleted file mode 100644
index f32b8fc5a65..00000000000
--- a/db/migrate/20211012015903_next_traversal_ids_sibling_function.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-# frozen_string_literal: true
-
-class NextTraversalIdsSiblingFunction < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::SchemaHelpers
-
- FUNCTION_NAME = 'next_traversal_ids_sibling'
-
- def up
- # Given array [1,2,3,4,5], concatenate the first part of the array [1,2,3,4]
- # with the last element in the array (5) after being incremented ([6]).
- #
- # [1,2,3,4,5] => [1,2,3,4,6]
- execute(<<~SQL)
- CREATE OR REPLACE FUNCTION #{FUNCTION_NAME}(traversal_ids INT[]) RETURNS INT[]
- AS $$
- BEGIN
- return traversal_ids[1:array_length(traversal_ids, 1)-1] ||
- ARRAY[traversal_ids[array_length(traversal_ids, 1)]+1];
- END;
- $$
- LANGUAGE plpgsql
- IMMUTABLE
- RETURNS NULL ON NULL INPUT;
- SQL
- end
-
- def down
- execute("DROP FUNCTION #{FUNCTION_NAME}(traversal_ids INT[])")
- end
-end
diff --git a/db/migrate/20211012091822_add_text_limit_to_bulk_imports_source_version.rb b/db/migrate/20211012091822_add_text_limit_to_bulk_imports_source_version.rb
deleted file mode 100644
index 9b4fca9a98c..00000000000
--- a/db/migrate/20211012091822_add_text_limit_to_bulk_imports_source_version.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddTextLimitToBulkImportsSourceVersion < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :bulk_imports, :source_version, 63
- end
-
- def down
- remove_text_limit :bulk_imports, :source_version
- end
-end
diff --git a/db/migrate/20211012134316_clean_up_migrate_merge_request_diff_commit_users.rb b/db/migrate/20211012134316_clean_up_migrate_merge_request_diff_commit_users.rb
deleted file mode 100644
index 443dbe37c0b..00000000000
--- a/db/migrate/20211012134316_clean_up_migrate_merge_request_diff_commit_users.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-# frozen_string_literal: true
-
-class CleanUpMigrateMergeRequestDiffCommitUsers < Gitlab::Database::Migration[1.0]
- def up
- jobs = Gitlab::Database::BackgroundMigrationJob
- .for_migration_class('MigrateMergeRequestDiffCommitUsers')
- .pending
- .to_a
-
- return if jobs.empty?
-
- say("#{jobs.length} MigrateMergeRequestDiffCommitUsers are still pending")
-
- # Normally we don't process background migrations in a regular migration, as
- # this could take a while to complete and thus block a deployment.
- #
- # In this case the jobs have all been processed for GitLab.com at the time
- # of writing. In addition, it's been a few releases since this migration was
- # introduced. As a result, self-hosted instances should have their
- # migrations finished a long time ago.
- #
- # For these reasons we clean up any pending jobs (just in case) before
- # deploying the code. This also allows us to immediately start using the new
- # setup only, instead of having to support both the old and new approach for
- # at least one more release.
- jobs.each do |job|
- Gitlab::BackgroundMigration::MigrateMergeRequestDiffCommitUsers
- .new
- .perform(*job.arguments)
- end
- end
-
- def down
- end
-end
diff --git a/db/migrate/20211013014228_add_content_validation_endpoint_to_application_settings.rb b/db/migrate/20211013014228_add_content_validation_endpoint_to_application_settings.rb
deleted file mode 100644
index 9a79fdca192..00000000000
--- a/db/migrate/20211013014228_add_content_validation_endpoint_to_application_settings.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class AddContentValidationEndpointToApplicationSettings < Gitlab::Database::Migration[1.0]
- def up
- # rubocop:disable Migration/AddLimitToTextColumns
- add_column :application_settings, :content_validation_endpoint_url, :text, comment: 'JiHu-specific column'
- # rubocop:disable Migration/AddLimitToTextColumns
-
- add_column :application_settings, :encrypted_content_validation_api_key, :binary, comment: 'JiHu-specific column'
- add_column :application_settings, :encrypted_content_validation_api_key_iv, :binary, comment: 'JiHu-specific column'
- add_column :application_settings, :content_validation_endpoint_enabled, :boolean, null: false, default: false, comment: 'JiHu-specific column'
- end
-
- def down
- remove_column :application_settings, :content_validation_endpoint_url
- remove_column :application_settings, :encrypted_content_validation_api_key
- remove_column :application_settings, :encrypted_content_validation_api_key_iv
- remove_column :application_settings, :content_validation_endpoint_enabled
- end
-end
diff --git a/db/migrate/20211013080714_add_network_to_user_credit_card_validations.rb b/db/migrate/20211013080714_add_network_to_user_credit_card_validations.rb
deleted file mode 100644
index eee4cbad796..00000000000
--- a/db/migrate/20211013080714_add_network_to_user_credit_card_validations.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddNetworkToUserCreditCardValidations < Gitlab::Database::Migration[1.0]
- # rubocop:disable Migration/AddLimitToTextColumns
- def change
- add_column :user_credit_card_validations, :network, :text
- end
- # rubocop:enable Migration/AddLimitToTextColumns
-end
diff --git a/db/migrate/20211013080715_limit_network_on_user_credit_card_validations.rb b/db/migrate/20211013080715_limit_network_on_user_credit_card_validations.rb
deleted file mode 100644
index 38a019e718d..00000000000
--- a/db/migrate/20211013080715_limit_network_on_user_credit_card_validations.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class LimitNetworkOnUserCreditCardValidations < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :user_credit_card_validations, :network, 32
- end
-
- def down
- remove_text_limit :user_credit_card_validations, :network
- end
-end
diff --git a/db/migrate/20211013080716_index_include_network_on_user_credit_card_validations.rb b/db/migrate/20211013080716_index_include_network_on_user_credit_card_validations.rb
deleted file mode 100644
index 849dbab77db..00000000000
--- a/db/migrate/20211013080716_index_include_network_on_user_credit_card_validations.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class IndexIncludeNetworkOnUserCreditCardValidations < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_user_credit_card_validations_meta_data_partial_match'
-
- def up
- add_concurrent_index :user_credit_card_validations,
- [:expiration_date, :last_digits, :network, :credit_card_validated_at],
- name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :user_credit_card_validations, INDEX_NAME
- end
-end
diff --git a/db/migrate/20211013192749_add_states_into_approval_project_rules.rb b/db/migrate/20211013192749_add_states_into_approval_project_rules.rb
deleted file mode 100644
index 98fefbab12c..00000000000
--- a/db/migrate/20211013192749_add_states_into_approval_project_rules.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class AddStatesIntoApprovalProjectRules < Gitlab::Database::Migration[1.0]
- def up
- add_column :approval_project_rules, :vulnerability_states, :text, array: true, null: false, default: ['newly_detected']
- end
-
- def down
- remove_column :approval_project_rules, :vulnerability_states
- end
-end
diff --git a/db/migrate/20211015021114_add_merge_commit_template_to_project_settings.rb b/db/migrate/20211015021114_add_merge_commit_template_to_project_settings.rb
deleted file mode 100644
index adf2fdb2da7..00000000000
--- a/db/migrate/20211015021114_add_merge_commit_template_to_project_settings.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddMergeCommitTemplateToProjectSettings < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def change
- add_column :project_settings, :merge_commit_template, :text # rubocop:disable Migration/AddLimitToTextColumns
- end
-end
diff --git a/db/migrate/20211015024135_add_merge_commit_template_limit_to_project_settings.rb b/db/migrate/20211015024135_add_merge_commit_template_limit_to_project_settings.rb
deleted file mode 100644
index 972872b8d2a..00000000000
--- a/db/migrate/20211015024135_add_merge_commit_template_limit_to_project_settings.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddMergeCommitTemplateLimitToProjectSettings < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :project_settings, :merge_commit_template, 500
- end
-
- def down
- remove_text_limit :project_settings, :merge_commit_template
- end
-end
diff --git a/db/migrate/20211018101034_add_tmp_project_id_column_to_namespaces.rb b/db/migrate/20211018101034_add_tmp_project_id_column_to_namespaces.rb
deleted file mode 100644
index cc73cb5047b..00000000000
--- a/db/migrate/20211018101034_add_tmp_project_id_column_to_namespaces.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class AddTmpProjectIdColumnToNamespaces < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def change
- # this is a temporary column to be able to batch insert records into namespaces table and then be able to link these
- # to projects table.
- add_column :namespaces, :tmp_project_id, :integer # rubocop: disable Migration/AddColumnsToWideTables
- end
-end
diff --git a/db/migrate/20211018161447_fix_double_entries_in_postgres_index_view.rb b/db/migrate/20211018161447_fix_double_entries_in_postgres_index_view.rb
deleted file mode 100644
index 574f54bc60e..00000000000
--- a/db/migrate/20211018161447_fix_double_entries_in_postgres_index_view.rb
+++ /dev/null
@@ -1,59 +0,0 @@
-# frozen_string_literal: true
-
-class FixDoubleEntriesInPostgresIndexView < Gitlab::Database::Migration[1.0]
- def up
- execute(<<~SQL)
- DROP VIEW IF EXISTS postgres_indexes;
-
- CREATE VIEW postgres_indexes AS
- SELECT (pg_namespace.nspname::text || '.'::text) || i.relname::text AS identifier,
- pg_index.indexrelid,
- pg_namespace.nspname AS schema,
- i.relname AS name,
- pg_indexes.tablename,
- a.amname AS type,
- pg_index.indisunique AS "unique",
- pg_index.indisvalid AS valid_index,
- i.relispartition AS partitioned,
- pg_index.indisexclusion AS exclusion,
- pg_index.indexprs IS NOT NULL AS expression,
- pg_index.indpred IS NOT NULL AS partial,
- pg_indexes.indexdef AS definition,
- pg_relation_size(i.oid::regclass) AS ondisk_size_bytes
- FROM pg_index
- JOIN pg_class i ON i.oid = pg_index.indexrelid
- JOIN pg_namespace ON i.relnamespace = pg_namespace.oid
- JOIN pg_indexes ON i.relname = pg_indexes.indexname AND pg_namespace.nspname = pg_indexes.schemaname
- JOIN pg_am a ON i.relam = a.oid
- WHERE pg_namespace.nspname <> 'pg_catalog'::name AND (pg_namespace.nspname = ANY (ARRAY["current_schema"(), 'gitlab_partitions_dynamic'::name, 'gitlab_partitions_static'::name]));
- SQL
- end
-
- def down
- execute(<<~SQL)
- DROP VIEW IF EXISTS postgres_indexes;
-
- CREATE VIEW postgres_indexes AS
- SELECT (pg_namespace.nspname::text || '.'::text) || i.relname::text AS identifier,
- pg_index.indexrelid,
- pg_namespace.nspname AS schema,
- i.relname AS name,
- pg_indexes.tablename,
- a.amname AS type,
- pg_index.indisunique AS "unique",
- pg_index.indisvalid AS valid_index,
- i.relispartition AS partitioned,
- pg_index.indisexclusion AS exclusion,
- pg_index.indexprs IS NOT NULL AS expression,
- pg_index.indpred IS NOT NULL AS partial,
- pg_indexes.indexdef AS definition,
- pg_relation_size(i.oid::regclass) AS ondisk_size_bytes
- FROM pg_index
- JOIN pg_class i ON i.oid = pg_index.indexrelid
- JOIN pg_namespace ON i.relnamespace = pg_namespace.oid
- JOIN pg_indexes ON i.relname = pg_indexes.indexname
- JOIN pg_am a ON i.relam = a.oid
- WHERE pg_namespace.nspname <> 'pg_catalog'::name AND (pg_namespace.nspname = ANY (ARRAY["current_schema"(), 'gitlab_partitions_dynamic'::name, 'gitlab_partitions_static'::name]));
- SQL
- end
-end
diff --git a/db/migrate/20211019153615_add_state_to_merge_request_assignees.rb b/db/migrate/20211019153615_add_state_to_merge_request_assignees.rb
deleted file mode 100644
index 0eb8d0989a5..00000000000
--- a/db/migrate/20211019153615_add_state_to_merge_request_assignees.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-# frozen_string_literal: true
-class AddStateToMergeRequestAssignees < Gitlab::Database::Migration[1.0]
- REVIEW_DEFAULT_STATE = 0
-
- def change
- add_column :merge_request_assignees, :state, :smallint, default: REVIEW_DEFAULT_STATE, null: false
- end
-end
diff --git a/db/migrate/20211020030948_add_runtime_runner_features_to_ci_builds_metadata.rb b/db/migrate/20211020030948_add_runtime_runner_features_to_ci_builds_metadata.rb
deleted file mode 100644
index 970c018df46..00000000000
--- a/db/migrate/20211020030948_add_runtime_runner_features_to_ci_builds_metadata.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddRuntimeRunnerFeaturesToCiBuildsMetadata < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def change
- add_column :ci_builds_metadata, :runtime_runner_features, :jsonb, default: {}, null: false
- end
-end
diff --git a/db/migrate/20211020095357_add_group_traversal_id_index.rb b/db/migrate/20211020095357_add_group_traversal_id_index.rb
deleted file mode 100644
index e4739ff217e..00000000000
--- a/db/migrate/20211020095357_add_group_traversal_id_index.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddGroupTraversalIdIndex < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_namespaces_on_traversal_ids_for_groups'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :namespaces, :traversal_ids, using: :gin, where: "type='Group'", name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :namespaces, INDEX_NAME
- end
-end
diff --git a/db/migrate/20211021115409_add_color_to_epics.rb b/db/migrate/20211021115409_add_color_to_epics.rb
deleted file mode 100644
index 14b38209f30..00000000000
--- a/db/migrate/20211021115409_add_color_to_epics.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# frozen_string_literal: true
-
-class AddColorToEpics < Gitlab::Database::Migration[1.0]
- # rubocop:disable Migration/AddLimitToTextColumns
- # limit is added in 20211021124715_add_text_limit_to_epics_color
- def change
- add_column :epics, :color, :text, default: '#1068bf'
- end
- # rubocop:enable Migration/AddLimitToTextColumns
-end
diff --git a/db/migrate/20211021124715_add_text_limit_to_epics_color.rb b/db/migrate/20211021124715_add_text_limit_to_epics_color.rb
deleted file mode 100644
index 7844575c521..00000000000
--- a/db/migrate/20211021124715_add_text_limit_to_epics_color.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddTextLimitToEpicsColor < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :epics, :color, 7
- end
-
- def down
- remove_text_limit :epics, :color
- end
-end
diff --git a/db/migrate/20211021125908_add_sentry_settings_to_application_settings.rb b/db/migrate/20211021125908_add_sentry_settings_to_application_settings.rb
deleted file mode 100644
index d8b40893b47..00000000000
--- a/db/migrate/20211021125908_add_sentry_settings_to_application_settings.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-# frozen_string_literal: true
-
-class AddSentrySettingsToApplicationSettings < Gitlab::Database::Migration[1.0]
- # rubocop:disable Migration/AddLimitToTextColumns
- def change
- add_column :application_settings, :sentry_enabled, :boolean, default: false, null: false
- add_column :application_settings, :sentry_dsn, :text
- add_column :application_settings, :sentry_clientside_dsn, :text
- add_column :application_settings, :sentry_environment, :text
- end
- # rubocop:enable Migration/AddLimitToTextColumns
-end
diff --git a/db/migrate/20211021134458_add_limits_to_sentry_settings_on_application_settings.rb b/db/migrate/20211021134458_add_limits_to_sentry_settings_on_application_settings.rb
deleted file mode 100644
index 34d18741788..00000000000
--- a/db/migrate/20211021134458_add_limits_to_sentry_settings_on_application_settings.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddLimitsToSentrySettingsOnApplicationSettings < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :application_settings, :sentry_dsn, 255
- add_text_limit :application_settings, :sentry_clientside_dsn, 255
- add_text_limit :application_settings, :sentry_environment, 255
- end
-
- def down
- remove_text_limit :application_settings, :sentry_dsn
- remove_text_limit :application_settings, :sentry_clientside_dsn
- remove_text_limit :application_settings, :sentry_environment
- end
-end
diff --git a/db/migrate/20211025103744_add_state_id_to_vsa_issue_stage_events.rb b/db/migrate/20211025103744_add_state_id_to_vsa_issue_stage_events.rb
deleted file mode 100644
index 345cd1785ea..00000000000
--- a/db/migrate/20211025103744_add_state_id_to_vsa_issue_stage_events.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddStateIdToVsaIssueStageEvents < Gitlab::Database::Migration[1.0]
- def change
- add_column :analytics_cycle_analytics_issue_stage_events, :state_id, :smallint, default: 1, null: false
- end
-end
diff --git a/db/migrate/20211025103758_add_state_id_to_vsa_merge_request_stage_events.rb b/db/migrate/20211025103758_add_state_id_to_vsa_merge_request_stage_events.rb
deleted file mode 100644
index be28d56e19d..00000000000
--- a/db/migrate/20211025103758_add_state_id_to_vsa_merge_request_stage_events.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddStateIdToVsaMergeRequestStageEvents < Gitlab::Database::Migration[1.0]
- def change
- add_column :analytics_cycle_analytics_merge_request_stage_events, :state_id, :smallint, default: 1, null: false
- end
-end
diff --git a/db/migrate/20211026124336_add_archive_trace_events_to_integrations.rb b/db/migrate/20211026124336_add_archive_trace_events_to_integrations.rb
deleted file mode 100644
index 90e68f6a0ac..00000000000
--- a/db/migrate/20211026124336_add_archive_trace_events_to_integrations.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddArchiveTraceEventsToIntegrations < Gitlab::Database::Migration[1.0]
- def change
- add_column :integrations, :archive_trace_events, :boolean, null: false, default: false
- end
-end
diff --git a/db/migrate/20211026143238_remove_index_releases_on_author_id.rb b/db/migrate/20211026143238_remove_index_releases_on_author_id.rb
deleted file mode 100644
index 7cd086dbf7d..00000000000
--- a/db/migrate/20211026143238_remove_index_releases_on_author_id.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveIndexReleasesOnAuthorId < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_releases_on_author_id'
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :releases, INDEX_NAME
- end
-
- def down
- add_concurrent_index :releases, [:author_id], name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20211027203950_add_updated_index_for_dormant_users.rb b/db/migrate/20211027203950_add_updated_index_for_dormant_users.rb
deleted file mode 100644
index 8b004af06c0..00000000000
--- a/db/migrate/20211027203950_add_updated_index_for_dormant_users.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddUpdatedIndexForDormantUsers < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_users_on_id_and_last_activity_on_for_active_human_service'
-
- disable_ddl_transaction!
-
- def up
- index_condition = "state = 'active' AND (users.user_type IS NULL OR users.user_type = 4)"
-
- add_concurrent_index :users, [:id, :last_activity_on], where: index_condition, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :users, INDEX_NAME
- end
-end
diff --git a/db/migrate/20211028132247_create_packages_npm_metadata.rb b/db/migrate/20211028132247_create_packages_npm_metadata.rb
deleted file mode 100644
index cbe5429fca1..00000000000
--- a/db/migrate/20211028132247_create_packages_npm_metadata.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class CreatePackagesNpmMetadata < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- create_table :packages_npm_metadata, id: false do |t|
- t.references :package, primary_key: true, default: nil, index: false, foreign_key: { to_table: :packages_packages, on_delete: :cascade }, type: :bigint
- t.jsonb :package_json, default: {}, null: false
-
- t.check_constraint 'char_length(package_json::text) < 20000'
- end
- end
- end
-
- def down
- with_lock_retries do
- drop_table :packages_npm_metadata
- end
- end
-end
diff --git a/db/migrate/20211028212259_add_default_to_personal_access_tokens_prefix.rb b/db/migrate/20211028212259_add_default_to_personal_access_tokens_prefix.rb
deleted file mode 100644
index d9949863a92..00000000000
--- a/db/migrate/20211028212259_add_default_to_personal_access_tokens_prefix.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddDefaultToPersonalAccessTokensPrefix < Gitlab::Database::Migration[1.0]
- def change
- change_column_default(:application_settings, :personal_access_token_prefix, from: nil, to: 'glpat-')
- end
-end
diff --git a/db/migrate/20211101132310_add_reindexing_queue.rb b/db/migrate/20211101132310_add_reindexing_queue.rb
deleted file mode 100644
index d9d1f9dce89..00000000000
--- a/db/migrate/20211101132310_add_reindexing_queue.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class AddReindexingQueue < Gitlab::Database::Migration[1.0]
- def change
- create_table :postgres_reindex_queued_actions do |t|
- t.text :index_identifier, null: false, limit: 255
- t.integer :state, limit: 2, null: false, default: 0
- t.timestamps_with_timezone null: false
-
- t.index :state
- end
-
- change_column_default :postgres_reindex_queued_actions, :created_at, from: nil, to: -> { 'NOW()' }
- change_column_default :postgres_reindex_queued_actions, :updated_at, from: nil, to: -> { 'NOW()' }
- end
-end
diff --git a/db/migrate/20211101165656_create_upload_states.rb b/db/migrate/20211101165656_create_upload_states.rb
deleted file mode 100644
index 64873f4c9a2..00000000000
--- a/db/migrate/20211101165656_create_upload_states.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-# frozen_string_literal: true
-
-class CreateUploadStates < Gitlab::Database::Migration[1.0]
- VERIFICATION_STATE_INDEX_NAME = "index_upload_states_on_verification_state"
- PENDING_VERIFICATION_INDEX_NAME = "index_upload_states_pending_verification"
- FAILED_VERIFICATION_INDEX_NAME = "index_upload_states_failed_verification"
- NEEDS_VERIFICATION_INDEX_NAME = "index_upload_states_needs_verification"
-
- disable_ddl_transaction!
-
- def up
- create_table :upload_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 :upload, 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 :upload_states
- end
-end
diff --git a/db/migrate/20211103062728_add_with_highest_role_minimal_access_to_users_statistics.rb b/db/migrate/20211103062728_add_with_highest_role_minimal_access_to_users_statistics.rb
deleted file mode 100644
index 43cd7afbf06..00000000000
--- a/db/migrate/20211103062728_add_with_highest_role_minimal_access_to_users_statistics.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddWithHighestRoleMinimalAccessToUsersStatistics < Gitlab::Database::Migration[1.0]
- def change
- add_column :users_statistics, :with_highest_role_minimal_access, :integer, null: false, default: 0
- end
-end
diff --git a/db/migrate/20211104012209_add_text_limit_to_application_settings_content_validation_endpoint_url.rb b/db/migrate/20211104012209_add_text_limit_to_application_settings_content_validation_endpoint_url.rb
deleted file mode 100644
index 4062fd1be01..00000000000
--- a/db/migrate/20211104012209_add_text_limit_to_application_settings_content_validation_endpoint_url.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddTextLimitToApplicationSettingsContentValidationEndpointUrl < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :application_settings, :content_validation_endpoint_url, 255
- end
-
- def down
- remove_text_limit :application_settings, :content_validation_endpoint_url
- end
-end
diff --git a/db/migrate/20211105010101_add_archived_column_to_deployments.rb b/db/migrate/20211105010101_add_archived_column_to_deployments.rb
deleted file mode 100644
index f9ac81915b4..00000000000
--- a/db/migrate/20211105010101_add_archived_column_to_deployments.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddArchivedColumnToDeployments < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def change
- add_column :deployments, :archived, :boolean, default: false, null: false
- end
-end
diff --git a/db/migrate/20211105125756_add_read_at_to_dependency_proxy_manifests.rb b/db/migrate/20211105125756_add_read_at_to_dependency_proxy_manifests.rb
deleted file mode 100644
index a594674f470..00000000000
--- a/db/migrate/20211105125756_add_read_at_to_dependency_proxy_manifests.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddReadAtToDependencyProxyManifests < Gitlab::Database::Migration[1.0]
- def change
- add_column :dependency_proxy_manifests, :read_at, :datetime_with_timezone, null: false, default: -> { 'NOW()' }
- end
-end
diff --git a/db/migrate/20211105125813_add_read_at_to_dependency_proxy_blobs.rb b/db/migrate/20211105125813_add_read_at_to_dependency_proxy_blobs.rb
deleted file mode 100644
index 1808a541498..00000000000
--- a/db/migrate/20211105125813_add_read_at_to_dependency_proxy_blobs.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddReadAtToDependencyProxyBlobs < Gitlab::Database::Migration[1.0]
- def change
- add_column :dependency_proxy_blobs, :read_at, :datetime_with_timezone, null: false, default: -> { 'NOW()' }
- end
-end
diff --git a/db/migrate/20211105160316_create_dotenv_application_limits.rb b/db/migrate/20211105160316_create_dotenv_application_limits.rb
deleted file mode 100644
index 3ea94fd60fc..00000000000
--- a/db/migrate/20211105160316_create_dotenv_application_limits.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-# frozen_string_literal: true
-
-class CreateDotenvApplicationLimits < Gitlab::Database::Migration[1.0]
- def change
- add_column(:plan_limits, :dotenv_variables, :integer, default: 20, null: false)
- add_column(:plan_limits, :dotenv_size, :integer, default: 5.kilobytes, null: false)
- end
-end
diff --git a/db/migrate/20211105161404_insert_dotenv_application_limits.rb b/db/migrate/20211105161404_insert_dotenv_application_limits.rb
deleted file mode 100644
index 2749cf4a019..00000000000
--- a/db/migrate/20211105161404_insert_dotenv_application_limits.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-class InsertDotenvApplicationLimits < Gitlab::Database::Migration[1.0]
- def up
- create_or_update_plan_limit('dotenv_variables', 'default', 150)
- create_or_update_plan_limit('dotenv_variables', 'free', 50)
- create_or_update_plan_limit('dotenv_variables', 'opensource', 150)
- create_or_update_plan_limit('dotenv_variables', 'premium', 100)
- create_or_update_plan_limit('dotenv_variables', 'premium_trial', 100)
- create_or_update_plan_limit('dotenv_variables', 'ultimate', 150)
- create_or_update_plan_limit('dotenv_variables', 'ultimate_trial', 150)
-
- create_or_update_plan_limit('dotenv_size', 'default', 5.kilobytes)
- end
-
- def down
- create_or_update_plan_limit('dotenv_variables', 'default', 20)
- create_or_update_plan_limit('dotenv_variables', 'free', 20)
- create_or_update_plan_limit('dotenv_variables', 'opensource', 20)
- create_or_update_plan_limit('dotenv_variables', 'premium', 20)
- create_or_update_plan_limit('dotenv_variables', 'premium_trial', 20)
- create_or_update_plan_limit('dotenv_variables', 'ultimate', 20)
- create_or_update_plan_limit('dotenv_variables', 'ultimate_trial', 20)
-
- create_or_update_plan_limit('dotenv_size', 'default', 5.kilobytes)
- end
-end
diff --git a/db/migrate/20211108154510_create_pipeline_triggers_application_limits.rb b/db/migrate/20211108154510_create_pipeline_triggers_application_limits.rb
deleted file mode 100644
index 38671c75e0c..00000000000
--- a/db/migrate/20211108154510_create_pipeline_triggers_application_limits.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class CreatePipelineTriggersApplicationLimits < Gitlab::Database::Migration[1.0]
- def change
- add_column(:plan_limits, :pipeline_triggers, :integer, default: 25_000, null: false)
- end
-end
diff --git a/db/migrate/20211108154841_insert_pipeline_triggers_application_limits.rb b/db/migrate/20211108154841_insert_pipeline_triggers_application_limits.rb
deleted file mode 100644
index c1341fad729..00000000000
--- a/db/migrate/20211108154841_insert_pipeline_triggers_application_limits.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-class InsertPipelineTriggersApplicationLimits < Gitlab::Database::Migration[1.0]
- def up
- create_or_update_plan_limit('pipeline_triggers', 'default', 0)
- create_or_update_plan_limit('pipeline_triggers', 'free', 25_000)
- create_or_update_plan_limit('pipeline_triggers', 'opensource', 0)
- create_or_update_plan_limit('pipeline_triggers', 'premium', 0)
- create_or_update_plan_limit('pipeline_triggers', 'premium_trial', 0)
- create_or_update_plan_limit('pipeline_triggers', 'ultimate', 0)
- create_or_update_plan_limit('pipeline_triggers', 'ultimate_trial', 0)
- end
-
- def down
- create_or_update_plan_limit('pipeline_triggers', 'default', 0)
- create_or_update_plan_limit('pipeline_triggers', 'free', 0)
- create_or_update_plan_limit('pipeline_triggers', 'opensource', 0)
- create_or_update_plan_limit('pipeline_triggers', 'premium', 0)
- create_or_update_plan_limit('pipeline_triggers', 'premium_trial', 0)
- create_or_update_plan_limit('pipeline_triggers', 'ultimate', 0)
- create_or_update_plan_limit('pipeline_triggers', 'ultimate_trial', 0)
- end
-end
diff --git a/db/migrate/20211108203248_update_dependency_proxy_indexes_with_read_at.rb b/db/migrate/20211108203248_update_dependency_proxy_indexes_with_read_at.rb
deleted file mode 100644
index ac0f0ddca17..00000000000
--- a/db/migrate/20211108203248_update_dependency_proxy_indexes_with_read_at.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-class UpdateDependencyProxyIndexesWithReadAt < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- NEW_BLOB_INDEX = 'index_dependency_proxy_blobs_on_group_id_status_read_at_id'
- OLD_BLOB_INDEX = 'index_dependency_proxy_blobs_on_group_id_status_and_id'
-
- NEW_MANIFEST_INDEX = 'index_dependency_proxy_manifests_on_group_id_status_read_at_id'
- OLD_MANIFEST_INDEX = 'index_dependency_proxy_manifests_on_group_id_status_and_id'
-
- def up
- add_concurrent_index :dependency_proxy_blobs, [:group_id, :status, :read_at, :id], name: NEW_BLOB_INDEX
- add_concurrent_index :dependency_proxy_manifests, [:group_id, :status, :read_at, :id], name: NEW_MANIFEST_INDEX
-
- remove_concurrent_index_by_name :dependency_proxy_blobs, OLD_BLOB_INDEX
- remove_concurrent_index_by_name :dependency_proxy_manifests, OLD_MANIFEST_INDEX
- end
-
- def down
- add_concurrent_index :dependency_proxy_blobs, [:group_id, :status, :id], name: OLD_BLOB_INDEX
- add_concurrent_index :dependency_proxy_manifests, [:group_id, :status, :id], name: OLD_MANIFEST_INDEX
-
- remove_concurrent_index_by_name :dependency_proxy_blobs, NEW_BLOB_INDEX
- remove_concurrent_index_by_name :dependency_proxy_manifests, NEW_MANIFEST_INDEX
- end
-end
diff --git a/db/migrate/20211108204736_add_policy_idx_to_approval_project_rule.rb b/db/migrate/20211108204736_add_policy_idx_to_approval_project_rule.rb
deleted file mode 100644
index 90e5fa34817..00000000000
--- a/db/migrate/20211108204736_add_policy_idx_to_approval_project_rule.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddPolicyIdxToApprovalProjectRule < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def change
- add_column :approval_project_rules, :orchestration_policy_idx, :integer, limit: 2
- end
-end
diff --git a/db/migrate/20211108211434_remove_index_for_resource_group.rb b/db/migrate/20211108211434_remove_index_for_resource_group.rb
deleted file mode 100644
index 8b03f12d08b..00000000000
--- a/db/migrate/20211108211434_remove_index_for_resource_group.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveIndexForResourceGroup < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_for_resource_group'
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :ci_builds, INDEX_NAME
- end
-
- def down
- # rubocop:disable Migration/PreventIndexCreation
- add_concurrent_index :ci_builds, [:resource_group_id, :id], where: 'resource_group_id IS NOT NULL', name: INDEX_NAME
- # rubocop:enable Migration/PreventIndexCreation
- end
-end
diff --git a/db/migrate/20211109100050_add_consume_after_to_loose_fk_deleted_records.rb b/db/migrate/20211109100050_add_consume_after_to_loose_fk_deleted_records.rb
deleted file mode 100644
index 6b8e8c0d4f3..00000000000
--- a/db/migrate/20211109100050_add_consume_after_to_loose_fk_deleted_records.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddConsumeAfterToLooseFkDeletedRecords < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def up
- add_column :loose_foreign_keys_deleted_records, :consume_after, :datetime_with_timezone, default: -> { 'NOW()' }
- end
-
- def down
- remove_column :loose_foreign_keys_deleted_records, :consume_after
- end
-end
diff --git a/db/migrate/20211109101010_support_partition_query_in_loose_fk_table.rb b/db/migrate/20211109101010_support_partition_query_in_loose_fk_table.rb
deleted file mode 100644
index fccb1fc5cac..00000000000
--- a/db/migrate/20211109101010_support_partition_query_in_loose_fk_table.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class SupportPartitionQueryInLooseFkTable < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::PartitioningMigrationHelpers
-
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_loose_foreign_keys_deleted_records_for_partitioned_query'
-
- def up
- add_concurrent_partitioned_index :loose_foreign_keys_deleted_records,
- %I[partition fully_qualified_table_name consume_after id],
- where: 'status = 1',
- name: INDEX_NAME
- end
-
- def down
- remove_concurrent_partitioned_index_by_name :loose_foreign_keys_deleted_records, INDEX_NAME
- end
-end
diff --git a/db/migrate/20211110010101_add_index_on_unarchived_deployments.rb b/db/migrate/20211110010101_add_index_on_unarchived_deployments.rb
deleted file mode 100644
index 0bfafb94d0b..00000000000
--- a/db/migrate/20211110010101_add_index_on_unarchived_deployments.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexOnUnarchivedDeployments < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_deployments_on_archived_project_id_iid'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :deployments, %i[archived project_id iid], name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :deployments, INDEX_NAME
- end
-end
diff --git a/db/migrate/20211110014701_create_agent_activity_events.rb b/db/migrate/20211110014701_create_agent_activity_events.rb
deleted file mode 100644
index 11b9c6d03b3..00000000000
--- a/db/migrate/20211110014701_create_agent_activity_events.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class CreateAgentActivityEvents < Gitlab::Database::Migration[1.0]
- def change
- create_table :agent_activity_events do |t|
- t.bigint :agent_id, null: false
- t.bigint :user_id, index: { where: 'user_id IS NOT NULL' }
- t.bigint :project_id, index: { where: 'project_id IS NOT NULL' }
- t.bigint :merge_request_id, index: { where: 'merge_request_id IS NOT NULL' }
- t.bigint :agent_token_id, index: { where: 'agent_token_id IS NOT NULL' }
-
- t.datetime_with_timezone :recorded_at, null: false
- t.integer :kind, limit: 2, null: false
- t.integer :level, limit: 2, null: false
-
- t.binary :sha
- t.text :detail, limit: 255
-
- t.index [:agent_id, :recorded_at, :id]
- end
- end
-end
diff --git a/db/migrate/20211110015252_add_agent_activity_events_foreign_keys.rb b/db/migrate/20211110015252_add_agent_activity_events_foreign_keys.rb
deleted file mode 100644
index fcbafcccb06..00000000000
--- a/db/migrate/20211110015252_add_agent_activity_events_foreign_keys.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-# frozen_string_literal: true
-
-class AddAgentActivityEventsForeignKeys < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :agent_activity_events, :cluster_agents, column: :agent_id, on_delete: :cascade
- add_concurrent_foreign_key :agent_activity_events, :users, column: :user_id, on_delete: :nullify
- add_concurrent_foreign_key :agent_activity_events, :projects, column: :project_id, on_delete: :nullify
- add_concurrent_foreign_key :agent_activity_events, :merge_requests, column: :merge_request_id, on_delete: :nullify
- add_concurrent_foreign_key :agent_activity_events, :cluster_agent_tokens, column: :agent_token_id, on_delete: :nullify
- end
-
- def down
- with_lock_retries do
- remove_foreign_key_if_exists :agent_activity_events, column: :agent_id
- end
-
- with_lock_retries do
- remove_foreign_key_if_exists :agent_activity_events, column: :user_id
- end
-
- with_lock_retries do
- remove_foreign_key_if_exists :agent_activity_events, column: :project_id
- end
-
- with_lock_retries do
- remove_foreign_key_if_exists :agent_activity_events, column: :merge_request_id
- end
-
- with_lock_retries do
- remove_foreign_key_if_exists :agent_activity_events, column: :agent_token_id
- end
- end
-end
diff --git a/db/migrate/20211110092710_create_issue_emails.rb b/db/migrate/20211110092710_create_issue_emails.rb
deleted file mode 100644
index 5f6104fa2c3..00000000000
--- a/db/migrate/20211110092710_create_issue_emails.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 CreateIssueEmails < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def up
- create_table :issue_emails do |t|
- t.references :issue, index: true, null: false, unique: true, foreign_key: { on_delete: :cascade }
- t.text :email_message_id, null: false, limit: 1000
-
- t.index :email_message_id
- end
- end
-
- def down
- drop_table :issue_emails
- end
-end
diff --git a/db/migrate/20211110100050_add_has_shimo_to_project_settings.rb b/db/migrate/20211110100050_add_has_shimo_to_project_settings.rb
deleted file mode 100644
index 01507908e0f..00000000000
--- a/db/migrate/20211110100050_add_has_shimo_to_project_settings.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddHasShimoToProjectSettings < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def change
- add_column :project_settings, :has_shimo, :boolean, default: false, null: false
- end
-end
diff --git a/db/migrate/20211111112425_create_merge_requests_compliance_violations.rb b/db/migrate/20211111112425_create_merge_requests_compliance_violations.rb
deleted file mode 100644
index 064dc38f5b3..00000000000
--- a/db/migrate/20211111112425_create_merge_requests_compliance_violations.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class CreateMergeRequestsComplianceViolations < Gitlab::Database::Migration[1.0]
- def change
- create_table :merge_requests_compliance_violations do |t|
- t.bigint :violating_user_id, null: false
- t.bigint :merge_request_id, null: false
- t.integer :reason, limit: 2, null: false
- t.index :violating_user_id
- t.index [:merge_request_id, :violating_user_id, :reason], unique: true, name: 'index_merge_requests_compliance_violations_unique_columns'
- end
- end
-end
diff --git a/db/migrate/20211111112639_add_fk_compliance_violations_merge_request.rb b/db/migrate/20211111112639_add_fk_compliance_violations_merge_request.rb
deleted file mode 100644
index b280c35433b..00000000000
--- a/db/migrate/20211111112639_add_fk_compliance_violations_merge_request.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddFkComplianceViolationsMergeRequest < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :merge_requests_compliance_violations,
- :merge_requests,
- column: :merge_request_id,
- on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :merge_requests_compliance_violations, column: :merge_request_id
- end
- end
-end
diff --git a/db/migrate/20211111112713_add_fk_compliance_violations_violating_user.rb b/db/migrate/20211111112713_add_fk_compliance_violations_violating_user.rb
deleted file mode 100644
index af1cd6f07ed..00000000000
--- a/db/migrate/20211111112713_add_fk_compliance_violations_violating_user.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddFkComplianceViolationsViolatingUser < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :merge_requests_compliance_violations,
- :users,
- column: :violating_user_id,
- on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :merge_requests_compliance_violations, column: :violating_user_id
- end
- end
-end
diff --git a/db/migrate/20211111164025_add_squash_commit_template_to_project_settings.rb b/db/migrate/20211111164025_add_squash_commit_template_to_project_settings.rb
deleted file mode 100644
index 6120a6ed0b4..00000000000
--- a/db/migrate/20211111164025_add_squash_commit_template_to_project_settings.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddSquashCommitTemplateToProjectSettings < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def change
- add_column :project_settings, :squash_commit_template, :text # rubocop:disable Migration/AddLimitToTextColumns
- end
-end
diff --git a/db/migrate/20211111164047_add_squash_commit_template_limit_to_project_settings.rb b/db/migrate/20211111164047_add_squash_commit_template_limit_to_project_settings.rb
deleted file mode 100644
index 578d2271d60..00000000000
--- a/db/migrate/20211111164047_add_squash_commit_template_limit_to_project_settings.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddSquashCommitTemplateLimitToProjectSettings < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :project_settings, :squash_commit_template, 500
- end
-
- def down
- remove_text_limit :project_settings, :squash_commit_template
- end
-end
diff --git a/db/migrate/20211112073413_change_package_index_on_corpus.rb b/db/migrate/20211112073413_change_package_index_on_corpus.rb
deleted file mode 100644
index 6e8222f853c..00000000000
--- a/db/migrate/20211112073413_change_package_index_on_corpus.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class ChangePackageIndexOnCorpus < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_coverage_fuzzing_corpuses_on_package_id'
-
- disable_ddl_transaction!
-
- # Changing this index is safe.
- # The table does not have any data in it as it's behind a feature flag.
- def up
- remove_concurrent_index :coverage_fuzzing_corpuses, :package_id, name: INDEX_NAME
- add_concurrent_index :coverage_fuzzing_corpuses, :package_id, unique: true, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index :coverage_fuzzing_corpuses, :package_id, name: INDEX_NAME
- add_concurrent_index :coverage_fuzzing_corpuses, :package_id, name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20211112155416_populate_default_value_for_personal_access_tokens_prefix.rb b/db/migrate/20211112155416_populate_default_value_for_personal_access_tokens_prefix.rb
deleted file mode 100644
index 8dd23e1a72e..00000000000
--- a/db/migrate/20211112155416_populate_default_value_for_personal_access_tokens_prefix.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class PopulateDefaultValueForPersonalAccessTokensPrefix < Gitlab::Database::Migration[1.0]
- def up
- execute(
- <<-SQL
- UPDATE
- application_settings
- SET
- personal_access_token_prefix = default
- WHERE
- personal_access_token_prefix IS NULL
- SQL
- )
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/migrate/20211115132613_create_incident_management_timeline_events.rb b/db/migrate/20211115132613_create_incident_management_timeline_events.rb
deleted file mode 100644
index 217dcd27b4c..00000000000
--- a/db/migrate/20211115132613_create_incident_management_timeline_events.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-# frozen_string_literal: true
-
-class CreateIncidentManagementTimelineEvents < Gitlab::Database::Migration[1.0]
- def up
- create_table :incident_management_timeline_events do |t|
- t.timestamps_with_timezone null: false
- t.datetime_with_timezone :occurred_at, null: false
- t.bigint :project_id, null: false
- t.bigint :author_id
- t.bigint :issue_id, null: false
- t.bigint :updated_by_user_id
- t.bigint :promoted_from_note_id
- t.integer :cached_markdown_version
- t.boolean :editable, null: false, default: false
- t.text :note, limit: 10_000, null: false
- t.text :note_html, limit: 10_000, null: false
- t.text :action, limit: 128, null: false
-
- t.index :project_id, name: 'index_im_timeline_events_project_id'
- t.index :author_id, name: 'index_im_timeline_events_author_id'
- t.index :issue_id, name: 'index_im_timeline_events_issue_id'
- t.index :updated_by_user_id, name: 'index_im_timeline_events_updated_by_user_id'
- t.index :promoted_from_note_id, name: 'index_im_timeline_events_promoted_from_note_id'
- end
- end
-
- def down
- drop_table :incident_management_timeline_events
- end
-end
diff --git a/db/migrate/20211115142803_add_foreign_key_to_incident_management_timeline_events_on_project.rb b/db/migrate/20211115142803_add_foreign_key_to_incident_management_timeline_events_on_project.rb
deleted file mode 100644
index 893043cc1ab..00000000000
--- a/db/migrate/20211115142803_add_foreign_key_to_incident_management_timeline_events_on_project.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddForeignKeyToIncidentManagementTimelineEventsOnProject < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :incident_management_timeline_events, :projects, column: :project_id, on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :incident_management_timeline_events, column: :project_id
- end
- end
-end
diff --git a/db/migrate/20211115142847_add_foreign_key_to_incident_management_timeline_events_on_user.rb b/db/migrate/20211115142847_add_foreign_key_to_incident_management_timeline_events_on_user.rb
deleted file mode 100644
index 0f5886eb5ed..00000000000
--- a/db/migrate/20211115142847_add_foreign_key_to_incident_management_timeline_events_on_user.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddForeignKeyToIncidentManagementTimelineEventsOnUser < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :incident_management_timeline_events, :users, column: :author_id, on_delete: :nullify
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :incident_management_timeline_events, column: :author_id
- end
- end
-end
diff --git a/db/migrate/20211115142911_add_foreign_key_to_incident_management_timeline_events_on_issue.rb b/db/migrate/20211115142911_add_foreign_key_to_incident_management_timeline_events_on_issue.rb
deleted file mode 100644
index bdcf7f389d1..00000000000
--- a/db/migrate/20211115142911_add_foreign_key_to_incident_management_timeline_events_on_issue.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddForeignKeyToIncidentManagementTimelineEventsOnIssue < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :incident_management_timeline_events, :issues, column: :issue_id, on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :incident_management_timeline_events, column: :issue_id
- end
- end
-end
diff --git a/db/migrate/20211115145107_add_created_at_to_namespace_monthly_usages.rb b/db/migrate/20211115145107_add_created_at_to_namespace_monthly_usages.rb
deleted file mode 100644
index e0e2bec72ad..00000000000
--- a/db/migrate/20211115145107_add_created_at_to_namespace_monthly_usages.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddCreatedAtToNamespaceMonthlyUsages < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- add_column :ci_namespace_monthly_usages, :created_at, :datetime_with_timezone
- end
- end
-
- def down
- with_lock_retries do
- remove_column :ci_namespace_monthly_usages, :created_at
- end
- end
-end
diff --git a/db/migrate/20211115154103_add_created_at_to_project_monthly_usage.rb b/db/migrate/20211115154103_add_created_at_to_project_monthly_usage.rb
deleted file mode 100644
index eb0cd448da3..00000000000
--- a/db/migrate/20211115154103_add_created_at_to_project_monthly_usage.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddCreatedAtToProjectMonthlyUsage < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- add_column :ci_project_monthly_usages, :created_at, :datetime_with_timezone
- end
- end
-
- def down
- with_lock_retries do
- remove_column :ci_project_monthly_usages, :created_at
- end
- end
-end
diff --git a/db/migrate/20211116093739_add_foreign_key_to_incident_management_timeline_events_on_updated_by_user.rb b/db/migrate/20211116093739_add_foreign_key_to_incident_management_timeline_events_on_updated_by_user.rb
deleted file mode 100644
index a35020699fc..00000000000
--- a/db/migrate/20211116093739_add_foreign_key_to_incident_management_timeline_events_on_updated_by_user.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddForeignKeyToIncidentManagementTimelineEventsOnUpdatedByUser < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :incident_management_timeline_events, :users, column: :updated_by_user_id, on_delete: :nullify
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :incident_management_timeline_events, column: :updated_by_user_id
- end
- end
-end
diff --git a/db/migrate/20211117174209_create_vulnerability_reads.rb b/db/migrate/20211117174209_create_vulnerability_reads.rb
deleted file mode 100644
index b9e32bfd0fa..00000000000
--- a/db/migrate/20211117174209_create_vulnerability_reads.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# frozen_string_literal: true
-
-class CreateVulnerabilityReads < Gitlab::Database::Migration[1.0]
- def change
- create_table :vulnerability_reads do |t|
- t.bigint :vulnerability_id, null: false
- t.bigint :project_id, null: false
- t.bigint :scanner_id, null: false
- t.integer :report_type, limit: 2, null: false
- t.integer :severity, limit: 2, null: false
- t.integer :state, limit: 2, null: false
- t.boolean :has_issues, default: false, null: false
- t.boolean :resolved_on_default_branch, default: false, null: false
- t.uuid :uuid, null: false
- t.text :location_image, limit: 2048
-
- t.index :vulnerability_id, unique: true
- t.index :scanner_id
- t.index :uuid, unique: true
- t.index [:project_id, :state, :severity, :vulnerability_id], name: :index_vuln_reads_on_project_id_state_severity_and_vuln_id, order: { vulnerability_id: :desc }
- t.index :location_image, where: "report_type IN (2, 7)", name: :index_vulnerability_reads_on_location_image
- end
- end
-end
diff --git a/db/migrate/20211118100959_change_default_value_of_loose_fk_deleted_records_partition.rb b/db/migrate/20211118100959_change_default_value_of_loose_fk_deleted_records_partition.rb
deleted file mode 100644
index 185178d8025..00000000000
--- a/db/migrate/20211118100959_change_default_value_of_loose_fk_deleted_records_partition.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class ChangeDefaultValueOfLooseFkDeletedRecordsPartition < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def change
- change_column_default(:loose_foreign_keys_deleted_records, :partition, from: nil, to: 1)
- end
-end
diff --git a/db/migrate/20211118103439_remove_hardcoded_partition_from_loose_fk_trigger_function.rb b/db/migrate/20211118103439_remove_hardcoded_partition_from_loose_fk_trigger_function.rb
deleted file mode 100644
index 33159167b19..00000000000
--- a/db/migrate/20211118103439_remove_hardcoded_partition_from_loose_fk_trigger_function.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveHardcodedPartitionFromLooseFkTriggerFunction < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::MigrationHelpers::LooseForeignKeyHelpers
-
- enable_lock_retries!
-
- def up
- execute(<<~SQL)
- CREATE OR REPLACE FUNCTION #{DELETED_RECORDS_INSERT_FUNCTION_NAME}()
- RETURNS TRIGGER AS
- $$
- BEGIN
- INSERT INTO loose_foreign_keys_deleted_records
- (fully_qualified_table_name, primary_key_value)
- SELECT TG_TABLE_SCHEMA || '.' || TG_TABLE_NAME, old_table.id FROM old_table;
-
- RETURN NULL;
- END
- $$ LANGUAGE PLPGSQL
- SQL
- end
-
- def down
- execute(<<~SQL)
- CREATE OR REPLACE FUNCTION #{DELETED_RECORDS_INSERT_FUNCTION_NAME}()
- RETURNS TRIGGER AS
- $$
- BEGIN
- INSERT INTO loose_foreign_keys_deleted_records
- (partition, fully_qualified_table_name, primary_key_value)
- SELECT 1, TG_TABLE_SCHEMA || '.' || TG_TABLE_NAME, old_table.id FROM old_table
- ON CONFLICT DO NOTHING;
-
- RETURN NULL;
- END
- $$ LANGUAGE PLPGSQL
- SQL
- end
-end
diff --git a/db/migrate/20211118114228_add_max_ssh_key_lifetime_to_application_settings.rb b/db/migrate/20211118114228_add_max_ssh_key_lifetime_to_application_settings.rb
deleted file mode 100644
index 1b0d2104c91..00000000000
--- a/db/migrate/20211118114228_add_max_ssh_key_lifetime_to_application_settings.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddMaxSshKeyLifetimeToApplicationSettings < Gitlab::Database::Migration[1.0]
- def change
- add_column :application_settings, :max_ssh_key_lifetime, :integer
- end
-end
diff --git a/db/migrate/20211118124537_add_foreign_key_to_vulnerability_reads_on_vulnerability.rb b/db/migrate/20211118124537_add_foreign_key_to_vulnerability_reads_on_vulnerability.rb
deleted file mode 100644
index dd5b0bdc028..00000000000
--- a/db/migrate/20211118124537_add_foreign_key_to_vulnerability_reads_on_vulnerability.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddForeignKeyToVulnerabilityReadsOnVulnerability < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :vulnerability_reads, :vulnerabilities, column: :vulnerability_id, on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :vulnerability_reads, column: :vulnerability_id
- end
- end
-end
diff --git a/db/migrate/20211118124628_add_foreign_key_to_vulnerability_reads_on_project.rb b/db/migrate/20211118124628_add_foreign_key_to_vulnerability_reads_on_project.rb
deleted file mode 100644
index 14dde371e3d..00000000000
--- a/db/migrate/20211118124628_add_foreign_key_to_vulnerability_reads_on_project.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddForeignKeyToVulnerabilityReadsOnProject < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :vulnerability_reads, :projects, column: :project_id, on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :vulnerability_reads, column: :project_id
- end
- end
-end
diff --git a/db/migrate/20211118124650_add_foreign_key_to_vulnerability_reads_on_scanner.rb b/db/migrate/20211118124650_add_foreign_key_to_vulnerability_reads_on_scanner.rb
deleted file mode 100644
index 923e62a4beb..00000000000
--- a/db/migrate/20211118124650_add_foreign_key_to_vulnerability_reads_on_scanner.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddForeignKeyToVulnerabilityReadsOnScanner < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :vulnerability_reads, :vulnerability_scanners, column: :scanner_id, on_delete: :cascade
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :vulnerability_reads, column: :scanner_id
- end
- end
-end
diff --git a/db/migrate/20211119085015_add_orignal_filename_to_ci_job_artifact.rb b/db/migrate/20211119085015_add_orignal_filename_to_ci_job_artifact.rb
deleted file mode 100644
index f52bc346d16..00000000000
--- a/db/migrate/20211119085015_add_orignal_filename_to_ci_job_artifact.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class AddOrignalFilenameToCiJobArtifact < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- # rubocop:disable Migration/AddLimitToTextColumns
- # limit is added in 20211119085036_add_text_limit_to_job_artifact_original_filename.rb
- def up
- add_column :ci_job_artifacts, :original_filename, :text
- end
- # rubocop:enable Migration/AddLimitToTextColumns
-
- def down
- remove_column :ci_job_artifacts, :original_filename, :text
- end
-end
diff --git a/db/migrate/20211119111006_create_job_artifact_states.rb b/db/migrate/20211119111006_create_job_artifact_states.rb
deleted file mode 100644
index 44dffed58ee..00000000000
--- a/db/migrate/20211119111006_create_job_artifact_states.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-# frozen_string_literal: true
-
-class CreateJobArtifactStates < Gitlab::Database::Migration[1.0]
- VERIFICATION_STATE_INDEX_NAME = "index_job_artifact_states_on_verification_state"
- PENDING_VERIFICATION_INDEX_NAME = "index_job_artifact_states_pending_verification"
- FAILED_VERIFICATION_INDEX_NAME = "index_job_artifact_states_failed_verification"
- NEEDS_VERIFICATION_INDEX_NAME = "index_job_artifact_states_needs_verification"
-
- enable_lock_retries!
-
- def up
- create_table :ci_job_artifact_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 :job_artifact, primary_key: true, null: false, foreign_key: { on_delete: :cascade, to_table: :ci_job_artifacts }
- 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_job_artifact_states
- end
-end
diff --git a/db/migrate/20211119154221_create_pages_deployment_states.rb b/db/migrate/20211119154221_create_pages_deployment_states.rb
deleted file mode 100644
index 283f6c7d0d7..00000000000
--- a/db/migrate/20211119154221_create_pages_deployment_states.rb
+++ /dev/null
@@ -1,38 +0,0 @@
-# frozen_string_literal: true
-
-class CreatePagesDeploymentStates < Gitlab::Database::Migration[1.0]
- VERIFICATION_STATE_INDEX_NAME = "index_pages_deployment_states_on_verification_state"
- PENDING_VERIFICATION_INDEX_NAME = "index_pages_deployment_states_pending_verification"
- FAILED_VERIFICATION_INDEX_NAME = "index_pages_deployment_states_failed_verification"
- NEEDS_VERIFICATION_INDEX_NAME = "index_pages_deployment_states_needs_verification"
-
- disable_ddl_transaction!
-
- def up
- unless table_exists?(:pages_deployment_states)
- with_lock_retries do
- create_table :pages_deployment_states, id: false do |t|
- t.references :pages_deployment, primary_key: true, null: false, foreign_key: { on_delete: :cascade }
- t.integer :verification_state, default: 0, limit: 2, null: false
- t.column :verification_started_at, :datetime_with_timezone
- t.datetime_with_timezone :verification_retry_at
- t.datetime_with_timezone :verified_at
- t.integer :verification_retry_count, limit: 2
- t.binary :verification_checksum, using: 'verification_checksum::bytea'
- t.text :verification_failure
-
- 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
- end
-
- add_text_limit :pages_deployment_states, :verification_failure, 255
- end
-
- def down
- drop_table :pages_deployment_states
- end
-end
diff --git a/db/migrate/20211119170805_remove_test_report_requirement_issue_constraint.rb b/db/migrate/20211119170805_remove_test_report_requirement_issue_constraint.rb
deleted file mode 100644
index 9064242ee30..00000000000
--- a/db/migrate/20211119170805_remove_test_report_requirement_issue_constraint.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveTestReportRequirementIssueConstraint < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- TARGET_TABLE = :requirements_management_test_reports
- CONSTRAINT_NAME = 'requirements_test_reports_requirement_id_xor_issue_id'
-
- def up
- remove_check_constraint TARGET_TABLE, CONSTRAINT_NAME
- end
-
- def down
- add_check_constraint(TARGET_TABLE, 'num_nonnulls(requirement_id, issue_id) = 1', CONSTRAINT_NAME)
- end
-end
diff --git a/db/migrate/20211119194024_add_required_approval_count_to_protected_environments.rb b/db/migrate/20211119194024_add_required_approval_count_to_protected_environments.rb
deleted file mode 100644
index ca6b78efbc7..00000000000
--- a/db/migrate/20211119194024_add_required_approval_count_to_protected_environments.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddRequiredApprovalCountToProtectedEnvironments < Gitlab::Database::Migration[1.0]
- def change
- add_column :protected_environments, :required_approval_count, :integer, default: 0, null: false
- end
-end
diff --git a/db/migrate/20211119195201_create_deployment_approvals.rb b/db/migrate/20211119195201_create_deployment_approvals.rb
deleted file mode 100644
index a238da302f9..00000000000
--- a/db/migrate/20211119195201_create_deployment_approvals.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class CreateDeploymentApprovals < Gitlab::Database::Migration[1.0]
- def change
- create_table :deployment_approvals do |t|
- t.bigint :deployment_id, null: false
- t.bigint :user_id, null: false, index: true
- t.timestamps_with_timezone null: false
- t.integer :status, limit: 2, null: false
- t.index [:deployment_id, :user_id], unique: true
- end
- end
-end
diff --git a/db/migrate/20211122103051_add_line_code_to_draft_notes.rb b/db/migrate/20211122103051_add_line_code_to_draft_notes.rb
deleted file mode 100644
index c78b75f3a33..00000000000
--- a/db/migrate/20211122103051_add_line_code_to_draft_notes.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# frozen_string_literal: true
-
-class AddLineCodeToDraftNotes < Gitlab::Database::Migration[1.0]
- # rubocop:disable Migration/AddLimitToTextColumns
- # limit is added in db/migrate/20211124095704_add_draft_notes_line_code_text_limit.rb
- def change
- add_column :draft_notes, :line_code, :text
- end
- # rubocop:enable Migration/AddLimitToTextColumns
-end
diff --git a/db/migrate/20211122215001_add_policy_idx_to_approval_merge_request_rule.rb b/db/migrate/20211122215001_add_policy_idx_to_approval_merge_request_rule.rb
deleted file mode 100644
index b1c7bc4d5ce..00000000000
--- a/db/migrate/20211122215001_add_policy_idx_to_approval_merge_request_rule.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddPolicyIdxToApprovalMergeRequestRule < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def change
- add_column :approval_merge_request_rules, :orchestration_policy_idx, :integer, limit: 2
- end
-end
diff --git a/db/migrate/20211123135255_create_batched_background_migration_job_transition_logs.rb b/db/migrate/20211123135255_create_batched_background_migration_job_transition_logs.rb
deleted file mode 100644
index 280626c5d3b..00000000000
--- a/db/migrate/20211123135255_create_batched_background_migration_job_transition_logs.rb
+++ /dev/null
@@ -1,38 +0,0 @@
-# frozen_string_literal: true
-
-class CreateBatchedBackgroundMigrationJobTransitionLogs < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::PartitioningMigrationHelpers
-
- def up
- execute(<<~SQL)
- CREATE TABLE batched_background_migration_job_transition_logs (
- id bigserial 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)),
- PRIMARY KEY (id, created_at)
- ) PARTITION BY RANGE (created_at);
-
- CREATE INDEX i_batched_background_migration_job_transition_logs_on_job_id
- ON batched_background_migration_job_transition_logs USING btree (batched_background_migration_job_id);
-
- ALTER TABLE batched_background_migration_job_transition_logs ADD CONSTRAINT fk_rails_b7523a175b
- FOREIGN KEY (batched_background_migration_job_id) REFERENCES batched_background_migration_jobs(id) ON DELETE CASCADE;
- SQL
-
- min_date = Date.today
- max_date = Date.today + 6.months
-
- create_daterange_partitions('batched_background_migration_job_transition_logs', 'created_at', min_date, max_date)
- end
-
- def down
- drop_table :batched_background_migration_job_transition_logs
- end
-end
diff --git a/db/migrate/20211123181236_add_user_foreign_key_to_deployment_approvals.rb b/db/migrate/20211123181236_add_user_foreign_key_to_deployment_approvals.rb
deleted file mode 100644
index da20e9a8f8e..00000000000
--- a/db/migrate/20211123181236_add_user_foreign_key_to_deployment_approvals.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddUserForeignKeyToDeploymentApprovals < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :deployment_approvals, :users, column: :user_id
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :deployment_approvals, :users
- end
- end
-end
diff --git a/db/migrate/20211123182614_make_iteration_cadences_start_date_nullable.rb b/db/migrate/20211123182614_make_iteration_cadences_start_date_nullable.rb
deleted file mode 100644
index 10a0c6ca402..00000000000
--- a/db/migrate/20211123182614_make_iteration_cadences_start_date_nullable.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class MakeIterationCadencesStartDateNullable < Gitlab::Database::Migration[1.0]
- def change
- change_column_null :iterations_cadences, :start_date, true
- end
-end
diff --git a/db/migrate/20211124095704_add_draft_notes_line_code_text_limit.rb b/db/migrate/20211124095704_add_draft_notes_line_code_text_limit.rb
deleted file mode 100644
index b3567d6b873..00000000000
--- a/db/migrate/20211124095704_add_draft_notes_line_code_text_limit.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddDraftNotesLineCodeTextLimit < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :draft_notes, :line_code, 255
- end
-
- def down
- remove_text_limit :draft_notes, :line_code
- end
-end
diff --git a/db/migrate/20211124132319_add_encrypted_static_objects_external_storage_auth_token.rb b/db/migrate/20211124132319_add_encrypted_static_objects_external_storage_auth_token.rb
deleted file mode 100644
index 868bc4f14f2..00000000000
--- a/db/migrate/20211124132319_add_encrypted_static_objects_external_storage_auth_token.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: true
-
-class AddEncryptedStaticObjectsExternalStorageAuthToken < Gitlab::Database::Migration[1.0]
- def up
- # rubocop:disable Migration/AddLimitToTextColumns
- # limit is added in 20211126113029_add_text_limit_for_static_objects_external_storage_auth_token
- add_column :application_settings, :static_objects_external_storage_auth_token_encrypted, :text
- # rubocop:enable Migration/AddLimitToTextColumns
- end
-
- def down
- remove_column :application_settings, :static_objects_external_storage_auth_token_encrypted
- end
-end
diff --git a/db/migrate/20211126042235_add_sequence_column_to_sprints_table.rb b/db/migrate/20211126042235_add_sequence_column_to_sprints_table.rb
deleted file mode 100644
index cbe5dbf99fc..00000000000
--- a/db/migrate/20211126042235_add_sequence_column_to_sprints_table.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: true
-
-class AddSequenceColumnToSprintsTable < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def up
- add_column :sprints, :sequence, :integer
- execute "ALTER TABLE sprints ADD CONSTRAINT sequence_is_unique_per_iterations_cadence_id UNIQUE (iterations_cadence_id, sequence) DEFERRABLE INITIALLY DEFERRED"
- end
-
- def down
- remove_column :sprints, :sequence
- end
-end
diff --git a/db/migrate/20211126113029_add_text_limit_for_static_objects_external_storage_auth_token.rb b/db/migrate/20211126113029_add_text_limit_for_static_objects_external_storage_auth_token.rb
deleted file mode 100644
index 45c4686e674..00000000000
--- a/db/migrate/20211126113029_add_text_limit_for_static_objects_external_storage_auth_token.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-# frozen_string_literal: true
-class AddTextLimitForStaticObjectsExternalStorageAuthToken < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :application_settings, :static_objects_external_storage_auth_token_encrypted, 255
- end
-
- def down
- remove_text_limit :application_settings, :static_objects_external_storage_auth_token_encrypted
- end
-end
diff --git a/db/migrate/20211126115449_encrypt_static_objects_external_storage_auth_token.rb b/db/migrate/20211126115449_encrypt_static_objects_external_storage_auth_token.rb
deleted file mode 100644
index 92ba54d4c89..00000000000
--- a/db/migrate/20211126115449_encrypt_static_objects_external_storage_auth_token.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-# frozen_string_literal: true
-
-class EncryptStaticObjectsExternalStorageAuthToken < Gitlab::Database::Migration[1.0]
- class ApplicationSetting < ActiveRecord::Base
- self.table_name = 'application_settings'
-
- scope :encrypted_token_is_null, -> { where(static_objects_external_storage_auth_token_encrypted: nil) }
- scope :encrypted_token_is_not_null, -> { where.not(static_objects_external_storage_auth_token_encrypted: nil) }
- scope :plaintext_token_is_not_null, -> { where.not(static_objects_external_storage_auth_token: nil) }
- end
-
- def up
- ApplicationSetting.reset_column_information
-
- ApplicationSetting.encrypted_token_is_null.plaintext_token_is_not_null.find_each do |application_setting|
- next if application_setting.static_objects_external_storage_auth_token.empty?
-
- token_encrypted = Gitlab::CryptoHelper.aes256_gcm_encrypt(application_setting.static_objects_external_storage_auth_token)
- application_setting.update!(static_objects_external_storage_auth_token_encrypted: token_encrypted)
- end
- end
-
- def down
- ApplicationSetting.reset_column_information
-
- ApplicationSetting.encrypted_token_is_not_null.find_each do |application_setting|
- token = Gitlab::CryptoHelper.aes256_gcm_decrypt(application_setting.static_objects_external_storage_auth_token_encrypted)
- application_setting.update!(static_objects_external_storage_auth_token: token, static_objects_external_storage_auth_token_encrypted: nil)
- end
- end
-end
diff --git a/db/migrate/20211126142200_add_encrypted_static_object_token.rb b/db/migrate/20211126142200_add_encrypted_static_object_token.rb
deleted file mode 100644
index 839354244e7..00000000000
--- a/db/migrate/20211126142200_add_encrypted_static_object_token.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class AddEncryptedStaticObjectToken < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def up
- # rubocop:disable Migration/AddLimitToTextColumns
- # limit is added in 20211126142354_add_text_limit_to_encrypted_static_object_token
- add_column :users, :static_object_token_encrypted, :text # rubocop:disable Migration/AddColumnsToWideTables
- # rubocop:enable Migration/AddLimitToTextColumns
- end
-
- def down
- remove_column :users, :static_object_token_encrypted
- end
-end
diff --git a/db/migrate/20211126142354_add_text_limit_to_encrypted_static_object_token.rb b/db/migrate/20211126142354_add_text_limit_to_encrypted_static_object_token.rb
deleted file mode 100644
index a43e7d9a741..00000000000
--- a/db/migrate/20211126142354_add_text_limit_to_encrypted_static_object_token.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddTextLimitToEncryptedStaticObjectToken < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :users, :static_object_token_encrypted, 255
- end
-
- def down
- remove_text_limit :users, :static_object_token_encrypted
- end
-end
diff --git a/db/migrate/20211126204445_add_task_to_work_item_types.rb b/db/migrate/20211126204445_add_task_to_work_item_types.rb
deleted file mode 100644
index 875c2272c6d..00000000000
--- a/db/migrate/20211126204445_add_task_to_work_item_types.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-# frozen_string_literal: true
-
-class AddTaskToWorkItemTypes < Gitlab::Database::Migration[1.0]
- TASK_ENUM_VALUE = 4
-
- class WorkItemType < ActiveRecord::Base
- self.inheritance_column = :_type_disabled
- self.table_name = 'work_item_types'
-
- validates :name, uniqueness: { case_sensitive: false, scope: [:namespace_id] }
- 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
- task_work_item = WorkItemType.find_by(name: 'Task', namespace_id: nil)
-
- if task_work_item
- say('Task item record exist, skipping creation')
- else
- WorkItemType.create(name: 'Task', namespace_id: nil, base_type: TASK_ENUM_VALUE, icon_name: 'issue-type-task')
- 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/20211129151155_add_migrated_to_new_structure_column_to_vulnerability_occurrences.rb b/db/migrate/20211129151155_add_migrated_to_new_structure_column_to_vulnerability_occurrences.rb
deleted file mode 100644
index 8c3cf82d7c7..00000000000
--- a/db/migrate/20211129151155_add_migrated_to_new_structure_column_to_vulnerability_occurrences.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddMigratedToNewStructureColumnToVulnerabilityOccurrences < Gitlab::Database::Migration[1.0]
- def change
- add_column :vulnerability_occurrences, :migrated_to_new_structure, :boolean, default: false, null: false
- end
-end
diff --git a/db/migrate/20211129151832_add_index_on_vulnerability_occurrences_migrated_to_new_structure_column.rb b/db/migrate/20211129151832_add_index_on_vulnerability_occurrences_migrated_to_new_structure_column.rb
deleted file mode 100644
index 4cf8263f8f0..00000000000
--- a/db/migrate/20211129151832_add_index_on_vulnerability_occurrences_migrated_to_new_structure_column.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexOnVulnerabilityOccurrencesMigratedToNewStructureColumn < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_vulnerability_occurrences_on_migrated_to_new_structure'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :vulnerability_occurrences, [:migrated_to_new_structure, :id], name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :vulnerability_occurrences, INDEX_NAME
- end
-end
diff --git a/db/migrate/20211130151724_add_foreign_key_to_incident_management_timeline_events_on_note.rb b/db/migrate/20211130151724_add_foreign_key_to_incident_management_timeline_events_on_note.rb
deleted file mode 100644
index a09409900f7..00000000000
--- a/db/migrate/20211130151724_add_foreign_key_to_incident_management_timeline_events_on_note.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddForeignKeyToIncidentManagementTimelineEventsOnNote < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :incident_management_timeline_events, :notes, column: :promoted_from_note_id, on_delete: :nullify
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :incident_management_timeline_events, column: :promoted_from_note_id
- end
- end
-end
diff --git a/db/migrate/20211130205719_add_uniqueness_for_evidence_occurrence_id.rb b/db/migrate/20211130205719_add_uniqueness_for_evidence_occurrence_id.rb
deleted file mode 100644
index 1aca3e7e8e2..00000000000
--- a/db/migrate/20211130205719_add_uniqueness_for_evidence_occurrence_id.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddUniquenessForEvidenceOccurrenceId < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'finding_evidences_on_vulnerability_occurrence_id'
- UNIQUE_INDEX_NAME = 'finding_evidences_on_unique_vulnerability_occurrence_id'
-
- def up
- add_concurrent_index :vulnerability_finding_evidences, [:vulnerability_occurrence_id], unique: true, name: UNIQUE_INDEX_NAME
- remove_concurrent_index :vulnerability_finding_evidences, [:vulnerability_occurrence_id], name: INDEX_NAME
- end
-
- def down
- add_concurrent_index :vulnerability_finding_evidences, [:vulnerability_occurrence_id], name: INDEX_NAME
- remove_concurrent_index :vulnerability_finding_evidences, [:vulnerability_occurrence_id], name: UNIQUE_INDEX_NAME
- end
-end
diff --git a/db/migrate/20211201061733_add_future_subscriptions_to_application_settings.rb b/db/migrate/20211201061733_add_future_subscriptions_to_application_settings.rb
deleted file mode 100644
index 9cbbef42327..00000000000
--- a/db/migrate/20211201061733_add_future_subscriptions_to_application_settings.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddFutureSubscriptionsToApplicationSettings < Gitlab::Database::Migration[1.0]
- def change
- add_column :application_settings, :future_subscriptions, :jsonb, null: false, default: []
- end
-end
diff --git a/db/migrate/20211201143042_create_lfs_object_states.rb b/db/migrate/20211201143042_create_lfs_object_states.rb
deleted file mode 100644
index 91accbcd438..00000000000
--- a/db/migrate/20211201143042_create_lfs_object_states.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-# frozen_string_literal: true
-
-class CreateLfsObjectStates < Gitlab::Database::Migration[1.0]
- VERIFICATION_STATE_INDEX_NAME = "index_lfs_object_states_on_verification_state"
- PENDING_VERIFICATION_INDEX_NAME = "index_lfs_object_states_pending_verification"
- FAILED_VERIFICATION_INDEX_NAME = "index_lfs_object_states_failed_verification"
- NEEDS_VERIFICATION_INDEX_NAME = "index_lfs_object_states_needs_verification"
-
- disable_ddl_transaction!
-
- def up
- create_table :lfs_object_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 :lfs_object, 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 :lfs_object_states
- end
-end
diff --git a/db/migrate/20211202041233_add_deployment_foreign_key_to_deployment_approvals.rb b/db/migrate/20211202041233_add_deployment_foreign_key_to_deployment_approvals.rb
deleted file mode 100644
index 60bc892d792..00000000000
--- a/db/migrate/20211202041233_add_deployment_foreign_key_to_deployment_approvals.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddDeploymentForeignKeyToDeploymentApprovals < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :deployment_approvals, :deployments, column: :deployment_id
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :deployment_approvals, :deployments
- end
- end
-end
diff --git a/db/migrate/20211202094944_move_loose_fk_deleted_records_to_dynamic_schema.rb b/db/migrate/20211202094944_move_loose_fk_deleted_records_to_dynamic_schema.rb
deleted file mode 100644
index 84bc551d2b5..00000000000
--- a/db/migrate/20211202094944_move_loose_fk_deleted_records_to_dynamic_schema.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class MoveLooseFkDeletedRecordsToDynamicSchema < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def up
- if table_exists?('gitlab_partitions_static.loose_foreign_keys_deleted_records_1')
- execute 'ALTER TABLE gitlab_partitions_static.loose_foreign_keys_deleted_records_1 SET SCHEMA gitlab_partitions_dynamic'
- end
- end
-
- def down
- if table_exists?('gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_1')
- execute 'ALTER TABLE gitlab_partitions_dynamic.loose_foreign_keys_deleted_records_1 SET SCHEMA gitlab_partitions_static'
- end
- end
-end
diff --git a/db/migrate/20211202135508_add_index_on_packages_build_infos_package_id_pipeline_id.rb b/db/migrate/20211202135508_add_index_on_packages_build_infos_package_id_pipeline_id.rb
deleted file mode 100644
index 47a155d40fa..00000000000
--- a/db/migrate/20211202135508_add_index_on_packages_build_infos_package_id_pipeline_id.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexOnPackagesBuildInfosPackageIdPipelineId < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_packages_build_infos_package_id_pipeline_id'
- OLD_INDEX_NAME = 'idx_packages_build_infos_on_package_id'
-
- def up
- add_concurrent_index :packages_build_infos, [:package_id, :pipeline_id], name: INDEX_NAME
- remove_concurrent_index_by_name :packages_build_infos, OLD_INDEX_NAME
- end
-
- def down
- add_concurrent_index :packages_build_infos, :package_id, name: OLD_INDEX_NAME
- remove_concurrent_index :packages_build_infos, [:package_id, :pipeline_id], name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20211203160952_add_updated_state_by_user_id_to_merge_request_reviewers.rb b/db/migrate/20211203160952_add_updated_state_by_user_id_to_merge_request_reviewers.rb
deleted file mode 100644
index dafd2108b43..00000000000
--- a/db/migrate/20211203160952_add_updated_state_by_user_id_to_merge_request_reviewers.rb
+++ /dev/null
@@ -1,12 +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 AddUpdatedStateByUserIdToMergeRequestReviewers < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def change
- add_column :merge_request_reviewers, :updated_state_by_user_id, :bigint
- end
-end
diff --git a/db/migrate/20211203161149_add_index_to_merge_request_reviewers_updated_state_by_user_id.rb b/db/migrate/20211203161149_add_index_to_merge_request_reviewers_updated_state_by_user_id.rb
deleted file mode 100644
index 6f4ee079015..00000000000
--- a/db/migrate/20211203161149_add_index_to_merge_request_reviewers_updated_state_by_user_id.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexToMergeRequestReviewersUpdatedStateByUserId < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_on_merge_request_reviewers_updated_state_by_user_id'
-
- def up
- add_concurrent_index :merge_request_reviewers, :updated_state_by_user_id, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :merge_request_reviewers, INDEX_NAME
- end
-end
diff --git a/db/migrate/20211203161840_add_updated_state_by_user_id_to_merge_request_assignees.rb b/db/migrate/20211203161840_add_updated_state_by_user_id_to_merge_request_assignees.rb
deleted file mode 100644
index 1c9e7193630..00000000000
--- a/db/migrate/20211203161840_add_updated_state_by_user_id_to_merge_request_assignees.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddUpdatedStateByUserIdToMergeRequestAssignees < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def change
- add_column :merge_request_assignees, :updated_state_by_user_id, :bigint
- end
-end
diff --git a/db/migrate/20211203161942_add_index_to_merge_request_assignees_updated_state_by_user_id.rb b/db/migrate/20211203161942_add_index_to_merge_request_assignees_updated_state_by_user_id.rb
deleted file mode 100644
index d052ffdf4d6..00000000000
--- a/db/migrate/20211203161942_add_index_to_merge_request_assignees_updated_state_by_user_id.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexToMergeRequestAssigneesUpdatedStateByUserId < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_on_merge_request_assignees_updated_state_by_user_id'
-
- def up
- add_concurrent_index :merge_request_assignees, :updated_state_by_user_id, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :merge_request_assignees, INDEX_NAME
- end
-end
diff --git a/db/migrate/20211204010826_add_index_snippets_on_project_id_and_title.rb b/db/migrate/20211204010826_add_index_snippets_on_project_id_and_title.rb
deleted file mode 100644
index 35a3a98030a..00000000000
--- a/db/migrate/20211204010826_add_index_snippets_on_project_id_and_title.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexSnippetsOnProjectIdAndTitle < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_snippets_on_project_id_and_title'
-
- def up
- add_concurrent_index :snippets, [:project_id, :title], name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :snippets, name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20211207154413_add_ci_runners_index_on_created_at_where_active_is_false.rb b/db/migrate/20211207154413_add_ci_runners_index_on_created_at_where_active_is_false.rb
deleted file mode 100644
index da391da33ec..00000000000
--- a/db/migrate/20211207154413_add_ci_runners_index_on_created_at_where_active_is_false.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddCiRunnersIndexOnCreatedAtWhereActiveIsFalse < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_ci_runners_on_created_at_and_id_where_inactive'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :ci_runners, [:created_at, :id], where: 'active = FALSE', order: { created_at: :desc, id: :desc }, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :ci_runners, INDEX_NAME
- end
-end
diff --git a/db/migrate/20211207154414_add_ci_runners_index_on_contacted_at_where_active_is_false.rb b/db/migrate/20211207154414_add_ci_runners_index_on_contacted_at_where_active_is_false.rb
deleted file mode 100644
index e25d3c0dffa..00000000000
--- a/db/migrate/20211207154414_add_ci_runners_index_on_contacted_at_where_active_is_false.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddCiRunnersIndexOnContactedAtWhereActiveIsFalse < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_ci_runners_on_contacted_at_and_id_where_inactive'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :ci_runners, [:contacted_at, :id], where: 'active = FALSE', order: { contacted_at: :desc, id: :desc }, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :ci_runners, INDEX_NAME
- end
-end
diff --git a/db/migrate/20211207165508_add_protected_environments_required_approval_count_check_constraint.rb b/db/migrate/20211207165508_add_protected_environments_required_approval_count_check_constraint.rb
deleted file mode 100644
index fb1339cecfa..00000000000
--- a/db/migrate/20211207165508_add_protected_environments_required_approval_count_check_constraint.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddProtectedEnvironmentsRequiredApprovalCountCheckConstraint < Gitlab::Database::Migration[1.0]
- CONSTRAINT_NAME = 'protected_environments_required_approval_count_positive'
-
- disable_ddl_transaction!
-
- def up
- add_check_constraint :protected_environments, 'required_approval_count >= 0', CONSTRAINT_NAME
- end
-
- def down
- remove_check_constraint :protected_environments, CONSTRAINT_NAME
- end
-end
diff --git a/db/migrate/20211208111425_add_executor_type_column_to_ci_runners.rb b/db/migrate/20211208111425_add_executor_type_column_to_ci_runners.rb
deleted file mode 100644
index 1e1fdbdb122..00000000000
--- a/db/migrate/20211208111425_add_executor_type_column_to_ci_runners.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddExecutorTypeColumnToCiRunners < Gitlab::Database::Migration[1.0]
- def change
- add_column :ci_runners, :executor_type, :smallint, null: true
- end
-end
diff --git a/db/migrate/20211209230042_add_status_to_cluster_agent_tokens.rb b/db/migrate/20211209230042_add_status_to_cluster_agent_tokens.rb
deleted file mode 100644
index 596c82eb209..00000000000
--- a/db/migrate/20211209230042_add_status_to_cluster_agent_tokens.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddStatusToClusterAgentTokens < Gitlab::Database::Migration[1.0]
- def change
- add_column :cluster_agent_tokens, :status, :smallint, null: false, default: 0
- end
-end
diff --git a/db/migrate/20211210025754_alter_constraint_of_phone.rb b/db/migrate/20211210025754_alter_constraint_of_phone.rb
deleted file mode 100644
index 1644fbe9000..00000000000
--- a/db/migrate/20211210025754_alter_constraint_of_phone.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AlterConstraintOfPhone < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- constraint_phone = check_constraint_name('verification_codes', 'phone', 'max_length')
- remove_check_constraint(:verification_codes, constraint_phone)
- add_check_constraint(:verification_codes, 'char_length(phone) <= 50', constraint_phone)
- end
-
- def down
- constraint_phone = check_constraint_name('verification_codes', 'phone', 'max_length')
- remove_check_constraint(:verification_codes, constraint_phone)
- add_check_constraint(:verification_codes, 'char_length(phone) <= 32', constraint_phone)
- end
-end
diff --git a/db/migrate/20211210031721_change_user_details_phone_text_limit.rb b/db/migrate/20211210031721_change_user_details_phone_text_limit.rb
deleted file mode 100644
index 5432f6d3d24..00000000000
--- a/db/migrate/20211210031721_change_user_details_phone_text_limit.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class ChangeUserDetailsPhoneTextLimit < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- remove_text_limit :user_details, :phone
- add_text_limit :user_details, :phone, 50
- end
-
- def down
- remove_text_limit :user_details, :phone
- add_text_limit :user_details, :phone, 32
- end
-end
diff --git a/db/migrate/20211213130324_update_timelogs_spent_at_default.rb b/db/migrate/20211213130324_update_timelogs_spent_at_default.rb
deleted file mode 100644
index f90b19b5f68..00000000000
--- a/db/migrate/20211213130324_update_timelogs_spent_at_default.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class UpdateTimelogsSpentAtDefault < Gitlab::Database::Migration[1.0]
- def change
- change_column_default(:timelogs, :spent_at, from: nil, to: -> { 'NOW()' })
- end
-end
diff --git a/db/migrate/20211213142344_add_settings_user_email_lookup_limit.rb b/db/migrate/20211213142344_add_settings_user_email_lookup_limit.rb
deleted file mode 100644
index ac7027bf082..00000000000
--- a/db/migrate/20211213142344_add_settings_user_email_lookup_limit.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddSettingsUserEmailLookupLimit < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_column :application_settings, :user_email_lookup_limit, :integer, null: false, default: 60
- end
-
- def down
- remove_column :application_settings, :user_email_lookup_limit
- end
-end
diff --git a/db/migrate/20211213154259_add_status_to_packages_package_files.rb b/db/migrate/20211213154259_add_status_to_packages_package_files.rb
deleted file mode 100644
index 38ea069a30b..00000000000
--- a/db/migrate/20211213154259_add_status_to_packages_package_files.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddStatusToPackagesPackageFiles < Gitlab::Database::Migration[1.0]
- def change
- add_column :packages_package_files, :status, :smallint, default: 0, null: false
- end
-end
diff --git a/db/migrate/20211213154704_add_status_index_to_packages_package_files.rb b/db/migrate/20211213154704_add_status_index_to_packages_package_files.rb
deleted file mode 100644
index 7067e3efa6c..00000000000
--- a/db/migrate/20211213154704_add_status_index_to_packages_package_files.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddStatusIndexToPackagesPackageFiles < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_packages_package_files_on_package_id_status_and_id'
-
- def up
- add_concurrent_index :packages_package_files, [:package_id, :status, :id], name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :packages_package_files, name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20211214110307_remove_temp_index_from_vulnerability_occurrences.rb b/db/migrate/20211214110307_remove_temp_index_from_vulnerability_occurrences.rb
deleted file mode 100644
index 99f985d528c..00000000000
--- a/db/migrate/20211214110307_remove_temp_index_from_vulnerability_occurrences.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveTempIndexFromVulnerabilityOccurrences < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'vulnerability_occurrences_location_temp_index'
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :vulnerability_occurrences, name: INDEX_NAME
- end
-
- def down
- add_concurrent_index :vulnerability_occurrences, :id, where: 'location IS NULL', name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20211215182006_update_application_settings_protected_paths.rb b/db/migrate/20211215182006_update_application_settings_protected_paths.rb
deleted file mode 100644
index f1c1dde55e0..00000000000
--- a/db/migrate/20211215182006_update_application_settings_protected_paths.rb
+++ /dev/null
@@ -1,58 +0,0 @@
-# frozen_string_literal: true
-
-class UpdateApplicationSettingsProtectedPaths < Gitlab::Database::Migration[1.0]
- REMOVE_PROTECTED_PATHS = [
- '/oauth/authorize',
- '/oauth/token'
- ].freeze
-
- NEW_DEFAULT_PROTECTED_PATHS = [
- '/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'
- ].freeze
-
- OLD_DEFAULT_PROTECTED_PATHS = (NEW_DEFAULT_PROTECTED_PATHS + REMOVE_PROTECTED_PATHS).freeze
-
- class ApplicationSetting < ActiveRecord::Base
- self.table_name = 'application_settings'
- end
-
- def up
- change_column_default(:application_settings, :protected_paths, NEW_DEFAULT_PROTECTED_PATHS)
-
- ApplicationSetting.reset_column_information
-
- ApplicationSetting.where.not(protected_paths: nil).each do |application_setting|
- paths_to_remove = application_setting.protected_paths & REMOVE_PROTECTED_PATHS
-
- next if paths_to_remove.empty?
-
- updated_protected_paths = application_setting.protected_paths - paths_to_remove
- application_setting.update!(protected_paths: updated_protected_paths)
- end
- end
-
- def down
- change_column_default(:application_settings, :protected_paths, OLD_DEFAULT_PROTECTED_PATHS)
-
- ApplicationSetting.reset_column_information
-
- ApplicationSetting.where.not(protected_paths: nil).each do |application_setting|
- paths_to_add = REMOVE_PROTECTED_PATHS - application_setting.protected_paths
-
- next if paths_to_add.empty?
-
- updated_protected_paths = application_setting.protected_paths + paths_to_add
- application_setting.update!(protected_paths: updated_protected_paths)
- end
- end
-end
diff --git a/db/migrate/20211216133107_add_cluster_agent_id_to_vulnerability_reads.rb b/db/migrate/20211216133107_add_cluster_agent_id_to_vulnerability_reads.rb
deleted file mode 100644
index 0bbd5c25df4..00000000000
--- a/db/migrate/20211216133107_add_cluster_agent_id_to_vulnerability_reads.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# frozen_string_literal: true
-
-class AddClusterAgentIdToVulnerabilityReads < Gitlab::Database::Migration[1.0]
- # rubocop:disable Migration/AddLimitToTextColumns
- # limit is added in 20211216134134_add_text_limit_to_vulnerability_reads_cluster_agent_id.rb
- def change
- add_column :vulnerability_reads, :cluster_agent_id, :text
- end
- # rubocop:enable Migration/AddLimitToTextColumns
-end
diff --git a/db/migrate/20211216134134_add_text_limit_to_vulnerability_reads_cluster_agent_id.rb b/db/migrate/20211216134134_add_text_limit_to_vulnerability_reads_cluster_agent_id.rb
deleted file mode 100644
index f4776ff10a4..00000000000
--- a/db/migrate/20211216134134_add_text_limit_to_vulnerability_reads_cluster_agent_id.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddTextLimitToVulnerabilityReadsClusterAgentId < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :vulnerability_reads, :cluster_agent_id, 10
- end
-
- def down
- remove_text_limit :vulnerability_reads, :cluster_agent_id
- end
-end
diff --git a/db/migrate/20211216135651_add_index_to_cluster_agent_id.rb b/db/migrate/20211216135651_add_index_to_cluster_agent_id.rb
deleted file mode 100644
index 05928083823..00000000000
--- a/db/migrate/20211216135651_add_index_to_cluster_agent_id.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexToClusterAgentId < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = "index_vulnerability_reads_on_cluster_agent_id"
- CLUSTER_IMAGE_SCANNING_REPORT_TYPE = 7
-
- def up
- add_concurrent_index :vulnerability_reads, :cluster_agent_id, where: "report_type = #{CLUSTER_IMAGE_SCANNING_REPORT_TYPE}", name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :vulnerability_reads, INDEX_NAME
- end
-end
diff --git a/db/migrate/20211216220939_add_group_crm_settings.rb b/db/migrate/20211216220939_add_group_crm_settings.rb
deleted file mode 100644
index e931aa3709b..00000000000
--- a/db/migrate/20211216220939_add_group_crm_settings.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddGroupCrmSettings < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def change
- create_table :group_crm_settings, id: false do |t|
- t.references :group, primary_key: true, foreign_key: { to_table: :namespaces, on_delete: :cascade }
- t.timestamps_with_timezone
- t.boolean :enabled, null: false, default: false
- end
- end
-end
diff --git a/db/migrate/20211217050753_remove_artifacts_archive_id_foreign_key_from_project_pages_metadata.rb b/db/migrate/20211217050753_remove_artifacts_archive_id_foreign_key_from_project_pages_metadata.rb
deleted file mode 100644
index fa81fa512ae..00000000000
--- a/db/migrate/20211217050753_remove_artifacts_archive_id_foreign_key_from_project_pages_metadata.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveArtifactsArchiveIdForeignKeyFromProjectPagesMetadata < Gitlab::Database::Migration[1.0]
- CONSTRAINT_NAME = 'fk_69366a119e'
-
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- execute('lock table ci_job_artifacts, project_pages_metadata in access exclusive mode')
-
- remove_foreign_key :project_pages_metadata, to_table: :ci_job_artifacts, column: :artifacts_archive_id, on_delete: :nullify, name: CONSTRAINT_NAME
- end
- end
-
- def down
- add_concurrent_foreign_key :project_pages_metadata, :ci_job_artifacts, column: :artifacts_archive_id, on_delete: :nullify, name: CONSTRAINT_NAME
- end
-end
diff --git a/db/migrate/20211220174504_add_secure_scanning_actions_to_onboarding_progresses.rb b/db/migrate/20211220174504_add_secure_scanning_actions_to_onboarding_progresses.rb
deleted file mode 100644
index cf9f2511176..00000000000
--- a/db/migrate/20211220174504_add_secure_scanning_actions_to_onboarding_progresses.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddSecureScanningActionsToOnboardingProgresses < Gitlab::Database::Migration[1.0]
- def change
- change_table(:onboarding_progresses, bulk: true) do |t|
- t.column :secure_dependency_scanning_run_at, :datetime_with_timezone
- t.column :secure_container_scanning_run_at, :datetime_with_timezone
- t.column :secure_dast_run_at, :datetime_with_timezone
- t.column :secure_secret_detection_run_at, :datetime_with_timezone
- t.column :secure_coverage_fuzzing_run_at, :datetime_with_timezone
- t.column :secure_cluster_image_scanning_run_at, :datetime_with_timezone
- t.column :secure_api_fuzzing_run_at, :datetime_with_timezone
- end
- end
-end
diff --git a/db/migrate/20211223125921_add_temp_index_to_members_state.rb b/db/migrate/20211223125921_add_temp_index_to_members_state.rb
deleted file mode 100644
index 7dd2ec1a8aa..00000000000
--- a/db/migrate/20211223125921_add_temp_index_to_members_state.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class AddTempIndexToMembersState < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'tmp_index_members_on_state'
-
- def up
- # Temporary index to be removed in 14.9 https://gitlab.com/gitlab-org/gitlab/-/issues/349960
- add_concurrent_index :members, :state, name: INDEX_NAME, where: 'state = 2'
- end
-
- def down
- remove_concurrent_index_by_name :members, INDEX_NAME
- end
-end
diff --git a/db/migrate/20211224112937_add_packages_cleanup_package_file_worker_capacity_to_application_settings.rb b/db/migrate/20211224112937_add_packages_cleanup_package_file_worker_capacity_to_application_settings.rb
deleted file mode 100644
index cb58033361f..00000000000
--- a/db/migrate/20211224112937_add_packages_cleanup_package_file_worker_capacity_to_application_settings.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddPackagesCleanupPackageFileWorkerCapacityToApplicationSettings < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def change
- add_column :application_settings,
- :packages_cleanup_package_file_worker_capacity,
- :smallint,
- default: 2,
- null: false
- end
-end
diff --git a/db/migrate/20211224114539_add_packages_cleanup_package_file_worker_capacity_check_constraint_to_app_settings.rb b/db/migrate/20211224114539_add_packages_cleanup_package_file_worker_capacity_check_constraint_to_app_settings.rb
deleted file mode 100644
index 3a40540a1e1..00000000000
--- a/db/migrate/20211224114539_add_packages_cleanup_package_file_worker_capacity_check_constraint_to_app_settings.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddPackagesCleanupPackageFileWorkerCapacityCheckConstraintToAppSettings < Gitlab::Database::Migration[1.0]
- CONSTRAINT_NAME = 'app_settings_p_cleanup_package_file_worker_capacity_positive'
-
- disable_ddl_transaction!
-
- def up
- add_check_constraint :application_settings, 'packages_cleanup_package_file_worker_capacity >= 0', CONSTRAINT_NAME
- end
-
- def down
- remove_check_constraint :application_settings, CONSTRAINT_NAME
- end
-end
diff --git a/db/migrate/20220104174445_add_ci_runners_index_on_active_state.rb b/db/migrate/20220104174445_add_ci_runners_index_on_active_state.rb
deleted file mode 100644
index 2cef570966b..00000000000
--- a/db/migrate/20220104174445_add_ci_runners_index_on_active_state.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddCiRunnersIndexOnActiveState < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_ci_runners_on_active'
-
- def up
- add_concurrent_index :ci_runners, [:active, :id], name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :ci_runners, INDEX_NAME
- end
-end
diff --git a/db/migrate/20220105082217_add_verification_token_to_external_ae_destinations.rb b/db/migrate/20220105082217_add_verification_token_to_external_ae_destinations.rb
deleted file mode 100644
index 046a628b8ae..00000000000
--- a/db/migrate/20220105082217_add_verification_token_to_external_ae_destinations.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddVerificationTokenToExternalAeDestinations < Gitlab::Database::Migration[1.0]
- def up
- # rubocop:disable Migration/AddLimitToTextColumns
- add_column :audit_events_external_audit_event_destinations, :verification_token, :text
- # rubocop:enable Migration/AddLimitToTextColumns
- end
-
- def down
- remove_column :audit_events_external_audit_event_destinations, :verification_token
- end
-end
diff --git a/db/migrate/20220105121325_add_route_namespace_reference.rb b/db/migrate/20220105121325_add_route_namespace_reference.rb
deleted file mode 100644
index 77bd0530b8a..00000000000
--- a/db/migrate/20220105121325_add_route_namespace_reference.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddRouteNamespaceReference < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def up
- add_column :routes, :namespace_id, :bigint unless column_exists?(:routes, :namespace_id)
- end
-
- def down
- remove_column :routes, :namespace_id if column_exists?(:routes, :namespace_id)
- end
-end
diff --git a/db/migrate/20220105152547_add_foreign_key_to_updated_state_by_user_id_to_merge_request_assignees.rb b/db/migrate/20220105152547_add_foreign_key_to_updated_state_by_user_id_to_merge_request_assignees.rb
deleted file mode 100644
index 58411c1dc0f..00000000000
--- a/db/migrate/20220105152547_add_foreign_key_to_updated_state_by_user_id_to_merge_request_assignees.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddForeignKeyToUpdatedStateByUserIdToMergeRequestAssignees < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :merge_request_assignees, :users, column: :updated_state_by_user_id, on_delete: :nullify
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :merge_request_assignees, column: :updated_state_by_user_id
- end
- end
-end
diff --git a/db/migrate/20220105153149_add_foreign_key_to_updated_state_by_user_id_to_merge_request_reviewers.rb b/db/migrate/20220105153149_add_foreign_key_to_updated_state_by_user_id_to_merge_request_reviewers.rb
deleted file mode 100644
index 13e375a5b97..00000000000
--- a/db/migrate/20220105153149_add_foreign_key_to_updated_state_by_user_id_to_merge_request_reviewers.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddForeignKeyToUpdatedStateByUserIdToMergeRequestReviewers < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :merge_request_reviewers, :users, column: :updated_state_by_user_id, on_delete: :nullify
- end
-
- def down
- with_lock_retries do
- remove_foreign_key :merge_request_reviewers, column: :updated_state_by_user_id
- end
- end
-end
diff --git a/db/migrate/20220106111958_add_insert_or_update_vulnerability_reads_trigger.rb b/db/migrate/20220106111958_add_insert_or_update_vulnerability_reads_trigger.rb
deleted file mode 100644
index 0049f4e00a2..00000000000
--- a/db/migrate/20220106111958_add_insert_or_update_vulnerability_reads_trigger.rb
+++ /dev/null
@@ -1,58 +0,0 @@
-# frozen_string_literal: true
-
-class AddInsertOrUpdateVulnerabilityReadsTrigger < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::SchemaHelpers
-
- FUNCTION_NAME = 'insert_or_update_vulnerability_reads'
- TRIGGER_NAME = 'trigger_insert_or_update_vulnerability_reads_from_occurrences'
-
- 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;
- 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)
- 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')
- ON CONFLICT(vulnerability_id) DO NOTHING;
- RETURN NULL;
- END
- $$;
- SQL
-
- execute(<<~SQL)
- CREATE TRIGGER #{TRIGGER_NAME}
- AFTER INSERT OR UPDATE ON vulnerability_occurrences
- FOR EACH ROW
- EXECUTE PROCEDURE #{FUNCTION_NAME}();
- SQL
- end
-
- def down
- drop_trigger(:vulnerability_occurrences, TRIGGER_NAME)
- drop_function(FUNCTION_NAME)
- end
-end
diff --git a/db/migrate/20220106112043_add_update_vulnerability_reads_trigger.rb b/db/migrate/20220106112043_add_update_vulnerability_reads_trigger.rb
deleted file mode 100644
index 940ec638924..00000000000
--- a/db/migrate/20220106112043_add_update_vulnerability_reads_trigger.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-# frozen_string_literal: true
-
-class AddUpdateVulnerabilityReadsTrigger < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::SchemaHelpers
-
- TRIGGER_NAME = 'trigger_update_vulnerability_reads_on_vulnerability_update'
- FUNCTION_NAME = 'update_vulnerability_reads_from_vulnerability'
-
- def up
- create_trigger_function(FUNCTION_NAME, replace: true) do
- <<~SQL
- UPDATE
- vulnerability_reads
- SET
- severity = NEW.severity,
- state = NEW.state,
- resolved_on_default_branch = NEW.resolved_on_default_branch
- WHERE vulnerability_id = NEW.id;
- RETURN NULL;
- SQL
- end
-
- 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
-
- def down
- drop_trigger(:vulnerabilities, TRIGGER_NAME)
- drop_function(FUNCTION_NAME)
- end
-end
diff --git a/db/migrate/20220106112085_add_update_vulnerability_reads_location_trigger.rb b/db/migrate/20220106112085_add_update_vulnerability_reads_location_trigger.rb
deleted file mode 100644
index a863fe8b7b8..00000000000
--- a/db/migrate/20220106112085_add_update_vulnerability_reads_location_trigger.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-# frozen_string_literal: true
-
-class AddUpdateVulnerabilityReadsLocationTrigger < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::SchemaHelpers
-
- TRIGGER_NAME = 'trigger_update_location_on_vulnerability_occurrences_update'
- FUNCTION_NAME = 'update_location_from_vulnerability_occurrences'
-
- def up
- create_trigger_function(FUNCTION_NAME, replace: true) do
- <<~SQL
- UPDATE
- vulnerability_reads
- SET
- location_image = NEW.location->>'image',
- cluster_agent_id = NEW.location->'kubernetes_resource'->>'agent_id'
- WHERE
- vulnerability_id = NEW.vulnerability_id;
- RETURN NULL;
- SQL
- end
-
- execute(<<~SQL)
- CREATE TRIGGER #{TRIGGER_NAME}
- AFTER UPDATE ON vulnerability_occurrences
- FOR EACH ROW
- WHEN (
- NEW.report_type IN (2, 7) AND (
- OLD.location->>'image' IS DISTINCT FROM NEW.location->>'image' OR
- OLD.location->'kubernetes_resource'->>'agent_id' IS DISTINCT FROM NEW.location->'kubernetes_resource'->>'agent_id'
- )
- )
- EXECUTE PROCEDURE #{FUNCTION_NAME}();
- SQL
- end
-
- def down
- drop_trigger(:vulnerability_occurrences, TRIGGER_NAME)
- drop_function(FUNCTION_NAME)
- end
-end
diff --git a/db/migrate/20220106141756_remove_lock_version_indexes.rb b/db/migrate/20220106141756_remove_lock_version_indexes.rb
deleted file mode 100644
index 382f20dfc73..00000000000
--- a/db/migrate/20220106141756_remove_lock_version_indexes.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveLockVersionIndexes < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEXES = {
- issues: 'index_issues_on_lock_version',
- merge_requests: 'index_merge_requests_on_lock_version',
- epics: 'index_epics_on_lock_version'
- }
-
- def up
- INDEXES.each do |table, index_name|
- remove_concurrent_index_by_name table, index_name
- end
- end
-
- def down
- INDEXES.each do |table, index_name|
- add_concurrent_index table, :lock_version, where: "lock_version IS NULL", name: index_name
- end
- end
-end
diff --git a/db/migrate/20220106163326_add_has_issues_on_vulnerability_reads_trigger.rb b/db/migrate/20220106163326_add_has_issues_on_vulnerability_reads_trigger.rb
deleted file mode 100644
index b3023a1f915..00000000000
--- a/db/migrate/20220106163326_add_has_issues_on_vulnerability_reads_trigger.rb
+++ /dev/null
@@ -1,79 +0,0 @@
-# frozen_string_literal: true
-
-class AddHasIssuesOnVulnerabilityReadsTrigger < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::SchemaHelpers
-
- TRIGGER_ON_INSERT = 'trigger_update_has_issues_on_vulnerability_issue_links_update'
- INSERT_FUNCTION_NAME = 'set_has_issues_on_vulnerability_reads'
-
- TRIGGER_ON_DELETE = 'trigger_update_has_issues_on_vulnerability_issue_links_delete'
- DELETE_FUNCTION_NAME = 'unset_has_issues_on_vulnerability_reads'
-
- def up
- create_trigger_function(INSERT_FUNCTION_NAME, replace: true) do
- <<~SQL
- UPDATE
- vulnerability_reads
- SET
- has_issues = true
- WHERE
- vulnerability_id = NEW.vulnerability_id AND has_issues IS FALSE;
- RETURN NULL;
- SQL
- end
-
- execute(<<~SQL)
- CREATE OR REPLACE FUNCTION #{DELETE_FUNCTION_NAME}()
- RETURNS TRIGGER
- LANGUAGE plpgsql
- AS $$
- DECLARE
- has_issue_links integer;
- BEGIN
- PERFORM 1
- FROM
- vulnerability_reads
- WHERE
- vulnerability_id = OLD.vulnerability_id
- FOR UPDATE;
-
- SELECT 1 INTO has_issue_links FROM vulnerability_issue_links WHERE vulnerability_id = OLD.vulnerability_id LIMIT 1;
-
- IF (has_issue_links = 1) THEN
- RETURN NULL;
- END IF;
-
- UPDATE
- vulnerability_reads
- SET
- has_issues = false
- WHERE
- vulnerability_id = OLD.vulnerability_id;
-
- RETURN NULL;
- END
- $$;
- SQL
-
- execute(<<~SQL)
- CREATE TRIGGER #{TRIGGER_ON_INSERT}
- AFTER INSERT ON vulnerability_issue_links
- FOR EACH ROW
- EXECUTE FUNCTION #{INSERT_FUNCTION_NAME}();
- SQL
-
- execute(<<~SQL)
- CREATE TRIGGER #{TRIGGER_ON_DELETE}
- AFTER DELETE ON vulnerability_issue_links
- FOR EACH ROW
- EXECUTE FUNCTION #{DELETE_FUNCTION_NAME}();
- SQL
- end
-
- def down
- drop_trigger(:vulnerability_issue_links, TRIGGER_ON_INSERT)
- drop_function(INSERT_FUNCTION_NAME)
- drop_trigger(:vulnerability_issue_links, TRIGGER_ON_DELETE)
- drop_function(DELETE_FUNCTION_NAME)
- end
-end
diff --git a/db/migrate/20220106230629_add_registry_migration_application_settings.rb b/db/migrate/20220106230629_add_registry_migration_application_settings.rb
deleted file mode 100644
index 191443de6eb..00000000000
--- a/db/migrate/20220106230629_add_registry_migration_application_settings.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddRegistryMigrationApplicationSettings < Gitlab::Database::Migration[1.0]
- # rubocop:disable Migration/AddLimitToTextColumns
- # limit is added in 20220118141950_add_text_limit_to_container_registry_import_target_plan.rb
- def change
- add_column :application_settings, :container_registry_import_max_tags_count, :integer, default: 100, null: false
- add_column :application_settings, :container_registry_import_max_retries, :integer, default: 3, null: false
- add_column :application_settings, :container_registry_import_start_max_retries, :integer, default: 50, null: false
- add_column :application_settings, :container_registry_import_max_step_duration, :integer, default: 5.minutes, null: false
- add_column :application_settings, :container_registry_import_target_plan, :text, default: 'free', null: false
- add_column :application_settings, :container_registry_import_created_before, :datetime_with_timezone, default: '2022-01-23 00:00:00', null: false
- end
- # rubocop:enable Migration/AddLimitToTextColumns
-end
diff --git a/db/migrate/20220106230712_add_migration_columns_to_container_repositories.rb b/db/migrate/20220106230712_add_migration_columns_to_container_repositories.rb
deleted file mode 100644
index 76dccbe785f..00000000000
--- a/db/migrate/20220106230712_add_migration_columns_to_container_repositories.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class AddMigrationColumnsToContainerRepositories < Gitlab::Database::Migration[1.0]
- # rubocop:disable Migration/AddLimitToTextColumns
- # limit is added in 20220117225936_add_text_limits_to_container_repositories_migration_columns.rb
- def change
- add_column :container_repositories, :migration_pre_import_started_at, :datetime_with_timezone
- add_column :container_repositories, :migration_pre_import_done_at, :datetime_with_timezone
- add_column :container_repositories, :migration_import_started_at, :datetime_with_timezone
- add_column :container_repositories, :migration_import_done_at, :datetime_with_timezone
- add_column :container_repositories, :migration_aborted_at, :datetime_with_timezone
- add_column :container_repositories, :migration_skipped_at, :datetime_with_timezone
- add_column :container_repositories, :migration_retries_count, :integer, default: 0, null: false
- add_column :container_repositories, :migration_skipped_reason, :smallint
- add_column :container_repositories, :migration_state, :text, default: 'default', null: false
- add_column :container_repositories, :migration_aborted_in_state, :text
- end
- # rubocop:enable Migration/AddLimitToTextColumns
-end
diff --git a/db/migrate/20220107091629_add_route_namespace_index.rb b/db/migrate/20220107091629_add_route_namespace_index.rb
deleted file mode 100644
index bc1044a24da..00000000000
--- a/db/migrate/20220107091629_add_route_namespace_index.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class AddRouteNamespaceIndex < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
- INDEX_NAME = 'index_routes_on_namespace_id'
-
- def up
- add_concurrent_index :routes, :namespace_id, unique: true, name: INDEX_NAME
- add_concurrent_foreign_key :routes, :namespaces, column: :namespace_id, on_delete: :nullify, reverse_lock_order: true
- end
-
- def down
- with_lock_retries do
- remove_foreign_key_if_exists :routes, column: :namespace_id
- end
-
- remove_concurrent_index_by_name :routes, INDEX_NAME
- end
-end
diff --git a/db/migrate/20220107165036_remove_note_id_index.rb b/db/migrate/20220107165036_remove_note_id_index.rb
deleted file mode 100644
index 15b4a3caf78..00000000000
--- a/db/migrate/20220107165036_remove_note_id_index.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveNoteIdIndex < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- TABLE = :suggestions
- INDEX_NAME = 'index_suggestions_on_note_id'
-
- def up
- remove_concurrent_index_by_name TABLE, INDEX_NAME
- end
-
- def down
- add_concurrent_index TABLE, :note_id, name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20220109133006_remove_ci_pipelines_lock_version_index.rb b/db/migrate/20220109133006_remove_ci_pipelines_lock_version_index.rb
deleted file mode 100644
index abbd54ff19b..00000000000
--- a/db/migrate/20220109133006_remove_ci_pipelines_lock_version_index.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveCiPipelinesLockVersionIndex < Gitlab::Database::Migration[1.0]
- TABLE = :ci_pipelines
- INDEX_NAME = 'tmp_index_ci_pipelines_lock_version'
- COLUMN = :id
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index TABLE, COLUMN, where: "lock_version IS NULL", name: INDEX_NAME
- end
-
- def down
- add_concurrent_index TABLE, COLUMN, where: "lock_version IS NULL", name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20220110170953_create_ci_secure_files.rb b/db/migrate/20220110170953_create_ci_secure_files.rb
deleted file mode 100644
index 1498a2d0212..00000000000
--- a/db/migrate/20220110170953_create_ci_secure_files.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class CreateCiSecureFiles < Gitlab::Database::Migration[1.0]
- def up
- create_table :ci_secure_files do |t|
- t.bigint :project_id, index: true, null: false
- t.timestamps_with_timezone null: false
- t.integer :file_store, limit: 2, null: false, default: 1
- t.integer :permissions, null: false, default: 0, limit: 2
- t.text :name, null: false, limit: 255
- t.text :file, null: false, limit: 255
- t.binary :checksum, null: false
- end
- end
-
- def down
- drop_table :ci_secure_files, if_exists: true
- end
-end
diff --git a/db/migrate/20220111095006_add_maintainer_note_to_ci_runners.rb b/db/migrate/20220111095006_add_maintainer_note_to_ci_runners.rb
deleted file mode 100644
index 969774983c4..00000000000
--- a/db/migrate/20220111095006_add_maintainer_note_to_ci_runners.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-# frozen_string_literal: true
-
-class AddMaintainerNoteToCiRunners < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def change
- # rubocop:disable Migration/AddLimitToTextColumns
- # limit is added in 20220111095007_add_text_limit_to_ci_runners_maintainer_note.rb
- add_column :ci_runners, :maintainer_note, :text
- # rubocop:enable Migration/AddLimitToTextColumns
- end
-end
diff --git a/db/migrate/20220111095007_add_text_limit_to_ci_runners_maintainer_note.rb b/db/migrate/20220111095007_add_text_limit_to_ci_runners_maintainer_note.rb
deleted file mode 100644
index 0a0a4171306..00000000000
--- a/db/migrate/20220111095007_add_text_limit_to_ci_runners_maintainer_note.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddTextLimitToCiRunnersMaintainerNote < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :ci_runners, :maintainer_note, 255
- end
-
- def down
- remove_text_limit :ci_runners, :maintainer_note
- end
-end
diff --git a/db/migrate/20220111154950_add_token_expires_at_to_ci_runners.rb b/db/migrate/20220111154950_add_token_expires_at_to_ci_runners.rb
deleted file mode 100644
index b4d7c63d24b..00000000000
--- a/db/migrate/20220111154950_add_token_expires_at_to_ci_runners.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddTokenExpiresAtToCiRunners < Gitlab::Database::Migration[1.0]
- def change
- add_column :ci_runners, :token_expires_at, :datetime_with_timezone
- end
-end
diff --git a/db/migrate/20220111154951_add_index_to_ci_runners_token_expires_at.rb b/db/migrate/20220111154951_add_index_to_ci_runners_token_expires_at.rb
deleted file mode 100644
index 53623198f51..00000000000
--- a/db/migrate/20220111154951_add_index_to_ci_runners_token_expires_at.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexToCiRunnersTokenExpiresAt < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :ci_runners, [:token_expires_at, :id], order: { token_expires_at: :asc, id: :desc }, name: 'index_ci_runners_on_token_expires_at_and_id_desc'
- add_concurrent_index :ci_runners, [:token_expires_at, :id], order: { token_expires_at: :desc, id: :desc }, name: 'index_ci_runners_on_token_expires_at_desc_and_id_desc'
- end
-
- def down
- remove_concurrent_index_by_name :ci_runners, 'index_ci_runners_on_token_expires_at_desc_and_id_desc'
- remove_concurrent_index_by_name :ci_runners, 'index_ci_runners_on_token_expires_at_and_id_desc'
- end
-end
diff --git a/db/migrate/20220111200254_remove_index_from_merge_requests.rb b/db/migrate/20220111200254_remove_index_from_merge_requests.rb
deleted file mode 100644
index 0ac6019ad5e..00000000000
--- a/db/migrate/20220111200254_remove_index_from_merge_requests.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveIndexFromMergeRequests < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_merge_requests_on_title'
-
- def up
- remove_concurrent_index :merge_requests, :title, name: INDEX_NAME
- end
-
- def down
- add_concurrent_index :merge_requests, :title, name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20220112115413_add_requires_verification_to_user_details.rb b/db/migrate/20220112115413_add_requires_verification_to_user_details.rb
deleted file mode 100644
index 01fe4f1d5cf..00000000000
--- a/db/migrate/20220112115413_add_requires_verification_to_user_details.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddRequiresVerificationToUserDetails < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def change
- add_column :user_details, :requires_credit_card_verification, :boolean, null: false, default: false
- end
-end
diff --git a/db/migrate/20220112205111_create_security_training_providers.rb b/db/migrate/20220112205111_create_security_training_providers.rb
deleted file mode 100644
index afddec6a134..00000000000
--- a/db/migrate/20220112205111_create_security_training_providers.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: true
-
-class CreateSecurityTrainingProviders < Gitlab::Database::Migration[1.0]
- def change
- create_table :security_training_providers do |t|
- t.text :name, limit: 256, null: false
- t.text :description, limit: 512
- t.text :url, limit: 512, null: false
- t.text :logo_url, limit: 512
-
- t.timestamps_with_timezone null: false
- end
- end
-end
diff --git a/db/migrate/20220112232037_add_member_namespace_reference.rb b/db/migrate/20220112232037_add_member_namespace_reference.rb
deleted file mode 100644
index d67ea09a78c..00000000000
--- a/db/migrate/20220112232037_add_member_namespace_reference.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddMemberNamespaceReference < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def up
- add_column :members, :member_namespace_id, :bigint unless column_exists?(:members, :member_namespace_id)
- end
-
- def down
- remove_column :members, :member_namespace_id if column_exists?(:members, :member_namespace_id)
- end
-end
diff --git a/db/migrate/20220112232605_add_member_namespace_index.rb b/db/migrate/20220112232605_add_member_namespace_index.rb
deleted file mode 100644
index ba32df53ae7..00000000000
--- a/db/migrate/20220112232605_add_member_namespace_index.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class AddMemberNamespaceIndex < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
- INDEX_NAME = 'index_members_on_member_namespace_id'
-
- def up
- add_concurrent_index :members, :member_namespace_id, unique: false, name: INDEX_NAME
- add_concurrent_foreign_key :members, :namespaces, column: :member_namespace_id, on_delete: :nullify, reverse_lock_order: true
- end
-
- def down
- with_lock_retries do
- remove_foreign_key_if_exists :members, column: :member_namespace_id
- end
-
- remove_concurrent_index_by_name :members, INDEX_NAME
- end
-end
diff --git a/db/migrate/20220113125401_create_security_trainings.rb b/db/migrate/20220113125401_create_security_trainings.rb
deleted file mode 100644
index 6924c7bd189..00000000000
--- a/db/migrate/20220113125401_create_security_trainings.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class CreateSecurityTrainings < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def change
- create_table :security_trainings do |t|
- t.references :project, null: false, foreign_key: { on_delete: :cascade }
- t.references :provider, null: false, foreign_key: { to_table: :security_training_providers, on_delete: :cascade }
- t.boolean :is_primary, default: false, null: false
-
- t.timestamps_with_timezone null: false
-
- # Guarantee that there will be only one primary per project
- t.index :project_id, name: 'index_security_trainings_on_unique_project_id', unique: true, where: 'is_primary IS TRUE'
- end
- end
-end
diff --git a/db/migrate/20220113135449_add_package_files_limit_to_application_settings.rb b/db/migrate/20220113135449_add_package_files_limit_to_application_settings.rb
deleted file mode 100644
index 6d3deacdda3..00000000000
--- a/db/migrate/20220113135449_add_package_files_limit_to_application_settings.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddPackageFilesLimitToApplicationSettings < Gitlab::Database::Migration[1.0]
- def change
- add_column :application_settings, :max_package_files_for_package_destruction, :smallint, default: 100, null: false
- end
-end
diff --git a/db/migrate/20220113135924_add_application_settings_package_files_limit_constraints.rb b/db/migrate/20220113135924_add_application_settings_package_files_limit_constraints.rb
deleted file mode 100644
index 65fbccbd1ae..00000000000
--- a/db/migrate/20220113135924_add_application_settings_package_files_limit_constraints.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddApplicationSettingsPackageFilesLimitConstraints < Gitlab::Database::Migration[1.0]
- CONSTRAINT_NAME = 'app_settings_max_package_files_for_package_destruction_positive'
-
- disable_ddl_transaction!
-
- def up
- add_check_constraint :application_settings, 'max_package_files_for_package_destruction > 0', CONSTRAINT_NAME
- end
-
- def down
- remove_check_constraint :application_settings, CONSTRAINT_NAME
- end
-end
diff --git a/db/migrate/20220113164801_add_diffs_colors_to_user_preferences.rb b/db/migrate/20220113164801_add_diffs_colors_to_user_preferences.rb
deleted file mode 100644
index 00e8e574722..00000000000
--- a/db/migrate/20220113164801_add_diffs_colors_to_user_preferences.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddDiffsColorsToUserPreferences < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- # rubocop:disable Migration/AddLimitToTextColumns
- # limit is added in 20220113164901_add_text_limit_to_user_preferences_diffs_colors.rb
- def change
- add_column :user_preferences, :diffs_deletion_color, :text
- add_column :user_preferences, :diffs_addition_color, :text
- end
- # rubocop:enable Migration/AddLimitToTextColumns
-end
diff --git a/db/migrate/20220113164901_add_text_limit_to_user_preferences_diffs_colors.rb b/db/migrate/20220113164901_add_text_limit_to_user_preferences_diffs_colors.rb
deleted file mode 100644
index 9ae1c875194..00000000000
--- a/db/migrate/20220113164901_add_text_limit_to_user_preferences_diffs_colors.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddTextLimitToUserPreferencesDiffsColors < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :user_preferences, :diffs_deletion_color, 7
- add_text_limit :user_preferences, :diffs_addition_color, 7
- end
-
- def down
- remove_text_limit :user_preferences, :diffs_addition_color
- remove_text_limit :user_preferences, :diffs_deletion_color
- end
-end
diff --git a/db/migrate/20220114131950_add_status_only_index_to_packages_package_files.rb b/db/migrate/20220114131950_add_status_only_index_to_packages_package_files.rb
deleted file mode 100644
index 948edea1138..00000000000
--- a/db/migrate/20220114131950_add_status_only_index_to_packages_package_files.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddStatusOnlyIndexToPackagesPackageFiles < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_packages_package_files_on_status'
-
- def up
- add_concurrent_index :packages_package_files, :status, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :packages_package_files, name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20220117082611_add_text_limit_to_exad_verification_tokens.rb b/db/migrate/20220117082611_add_text_limit_to_exad_verification_tokens.rb
deleted file mode 100644
index 9978e87a1e3..00000000000
--- a/db/migrate/20220117082611_add_text_limit_to_exad_verification_tokens.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddTextLimitToExadVerificationTokens < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :audit_events_external_audit_event_destinations, :verification_token, 24
- end
-
- def down
- remove_text_limit :audit_events_external_audit_event_destinations, :verification_token
- end
-end
diff --git a/db/migrate/20220117225936_add_text_limits_to_container_repositories_migration_columns.rb b/db/migrate/20220117225936_add_text_limits_to_container_repositories_migration_columns.rb
deleted file mode 100644
index 91c0612716b..00000000000
--- a/db/migrate/20220117225936_add_text_limits_to_container_repositories_migration_columns.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddTextLimitsToContainerRepositoriesMigrationColumns < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :container_repositories, :migration_state, 255
- add_text_limit :container_repositories, :migration_aborted_in_state, 255
- end
-
- def down
- remove_text_limit :container_repositories, :migration_state
- remove_text_limit :container_repositories, :migration_aborted_in_state
- end
-end
diff --git a/db/migrate/20220118015633_add_url_text_to_issuable_metric_images.rb b/db/migrate/20220118015633_add_url_text_to_issuable_metric_images.rb
deleted file mode 100644
index 55d820c1256..00000000000
--- a/db/migrate/20220118015633_add_url_text_to_issuable_metric_images.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# frozen_string_literal: true
-
-class AddUrlTextToIssuableMetricImages < Gitlab::Database::Migration[1.0]
- # rubocop:disable Migration/AddLimitToTextColumns
- # limit is added in 20220118020026_add_url_text_limit_to_issuable_metric_images
- def change
- add_column :issuable_metric_images, :url_text, :text
- end
- # rubocop:enable Migration/AddLimitToTextColumns
-end
diff --git a/db/migrate/20220118020026_add_url_text_limit_to_issuable_metric_images.rb b/db/migrate/20220118020026_add_url_text_limit_to_issuable_metric_images.rb
deleted file mode 100644
index 2f0f27681cd..00000000000
--- a/db/migrate/20220118020026_add_url_text_limit_to_issuable_metric_images.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddUrlTextLimitToIssuableMetricImages < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :issuable_metric_images, :url_text, 128
- end
-
- def down
- remove_text_limit :issuable_metric_images, :url_text
- end
-end
diff --git a/db/migrate/20220118141950_add_text_limit_to_container_registry_import_target_plan.rb b/db/migrate/20220118141950_add_text_limit_to_container_registry_import_target_plan.rb
deleted file mode 100644
index c7247d03423..00000000000
--- a/db/migrate/20220118141950_add_text_limit_to_container_registry_import_target_plan.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddTextLimitToContainerRegistryImportTargetPlan < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :application_settings, :container_registry_import_target_plan, 255
- end
-
- def down
- remove_text_limit :application_settings, :container_registry_import_target_plan
- end
-end
diff --git a/db/migrate/20220118155846_add_runner_token_expiration_interval_settings_to_application_settings.rb b/db/migrate/20220118155846_add_runner_token_expiration_interval_settings_to_application_settings.rb
deleted file mode 100644
index 32ca8a5fb12..00000000000
--- a/db/migrate/20220118155846_add_runner_token_expiration_interval_settings_to_application_settings.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddRunnerTokenExpirationIntervalSettingsToApplicationSettings < Gitlab::Database::Migration[1.0]
- def change
- [:runner_token_expiration_interval, :group_runner_token_expiration_interval, :project_runner_token_expiration_interval].each do |field|
- add_column :application_settings, field, :integer
- end
- end
-end
diff --git a/db/migrate/20220118155847_add_runner_token_expiration_interval_settings_to_namespace_settings.rb b/db/migrate/20220118155847_add_runner_token_expiration_interval_settings_to_namespace_settings.rb
deleted file mode 100644
index 7b83cb2dd55..00000000000
--- a/db/migrate/20220118155847_add_runner_token_expiration_interval_settings_to_namespace_settings.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class AddRunnerTokenExpirationIntervalSettingsToNamespaceSettings < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def change
- [:runner_token_expiration_interval, :subgroup_runner_token_expiration_interval, :project_runner_token_expiration_interval].each do |field|
- add_column :namespace_settings, field, :integer
- end
- end
-end
diff --git a/db/migrate/20220118155848_add_runner_token_expiration_interval_settings_to_project_settings.rb b/db/migrate/20220118155848_add_runner_token_expiration_interval_settings_to_project_settings.rb
deleted file mode 100644
index ef959171828..00000000000
--- a/db/migrate/20220118155848_add_runner_token_expiration_interval_settings_to_project_settings.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddRunnerTokenExpirationIntervalSettingsToProjectSettings < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def change
- add_column :project_ci_cd_settings, :runner_token_expiration_interval, :integer
- end
-end
diff --git a/db/migrate/20220119094023_add_unique_index_to_aed_verification_token.rb b/db/migrate/20220119094023_add_unique_index_to_aed_verification_token.rb
deleted file mode 100644
index bd40fe2203e..00000000000
--- a/db/migrate/20220119094023_add_unique_index_to_aed_verification_token.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddUniqueIndexToAedVerificationToken < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_audit_events_external_audit_on_verification_token'
-
- def up
- add_concurrent_index :audit_events_external_audit_event_destinations, :verification_token, unique: true, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :audit_events_external_audit_event_destinations, INDEX_NAME
- end
-end
diff --git a/db/migrate/20220119141407_add_dependency_proxy_size_to_namespace_statistics.rb b/db/migrate/20220119141407_add_dependency_proxy_size_to_namespace_statistics.rb
deleted file mode 100644
index d8107ad8e21..00000000000
--- a/db/migrate/20220119141407_add_dependency_proxy_size_to_namespace_statistics.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddDependencyProxySizeToNamespaceStatistics < Gitlab::Database::Migration[1.0]
- def change
- add_column :namespace_statistics, :dependency_proxy_size, :bigint, default: 0, null: false
- end
-end
diff --git a/db/migrate/20220119144253_add_dependency_proxy_size_to_namespace_root_storage_statistics.rb b/db/migrate/20220119144253_add_dependency_proxy_size_to_namespace_root_storage_statistics.rb
deleted file mode 100644
index 8218f869ce6..00000000000
--- a/db/migrate/20220119144253_add_dependency_proxy_size_to_namespace_root_storage_statistics.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddDependencyProxySizeToNamespaceRootStorageStatistics < Gitlab::Database::Migration[1.0]
- def change
- add_column :namespace_root_storage_statistics, :dependency_proxy_size, :bigint, default: 0, null: false
- end
-end
diff --git a/db/migrate/20220119170426_remove_temporary_vulnerability_occurrences_deduplication_index.rb b/db/migrate/20220119170426_remove_temporary_vulnerability_occurrences_deduplication_index.rb
deleted file mode 100644
index 26859beb671..00000000000
--- a/db/migrate/20220119170426_remove_temporary_vulnerability_occurrences_deduplication_index.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveTemporaryVulnerabilityOccurrencesDeduplicationIndex < Gitlab::Database::Migration[1.0]
- MIGRATION = 'RecalculateVulnerabilitiesOccurrencesUuid'
- INDEX_NAME = 'tmp_idx_deduplicate_vulnerability_occurrences'
-
- disable_ddl_transaction!
-
- def up
- finalize_background_migration(MIGRATION)
-
- remove_concurrent_index_by_name(:vulnerability_occurrences, INDEX_NAME)
- end
-
- def down
- add_concurrent_index :vulnerability_occurrences,
- %i[project_id report_type location_fingerprint primary_identifier_id id],
- name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20220119220620_add_scan_method_to_dast_site_profile.rb b/db/migrate/20220119220620_add_scan_method_to_dast_site_profile.rb
deleted file mode 100644
index f7b7580d673..00000000000
--- a/db/migrate/20220119220620_add_scan_method_to_dast_site_profile.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class AddScanMethodToDastSiteProfile < Gitlab::Database::Migration[1.0]
- def up
- add_column :dast_site_profiles, :scan_method, :integer, limit: 2, default: 0, null: false
- end
-
- def down
- remove_column :dast_site_profiles, :scan_method
- end
-end
diff --git a/db/migrate/20220120033115_create_alert_management_alert_metric_images.rb b/db/migrate/20220120033115_create_alert_management_alert_metric_images.rb
deleted file mode 100644
index e98392190f4..00000000000
--- a/db/migrate/20220120033115_create_alert_management_alert_metric_images.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class CreateAlertManagementAlertMetricImages < Gitlab::Database::Migration[1.0]
- def up
- create_table :alert_management_alert_metric_images do |t|
- t.references :alert, null: false, index: true, foreign_key: { to_table: :alert_management_alerts, on_delete: :cascade }
- t.timestamps_with_timezone
- t.integer :file_store, limit: 2
- t.text :file, limit: 255, null: false
- t.text :url, limit: 255
- t.text :url_text, limit: 128
- end
- end
-
- def down
- drop_table :alert_management_alert_metric_images, if_exists: true
- end
-end
diff --git a/db/migrate/20220120085655_add_ci_runner_project_index_to_runner_id_and_project_id.rb b/db/migrate/20220120085655_add_ci_runner_project_index_to_runner_id_and_project_id.rb
deleted file mode 100644
index bcf32d2abd0..00000000000
--- a/db/migrate/20220120085655_add_ci_runner_project_index_to_runner_id_and_project_id.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class AddCiRunnerProjectIndexToRunnerIdAndProjectId < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- OLD_INDEX_NAME = 'index_ci_runner_projects_on_runner_id'
- NEW_INDEX_NAME = 'index_ci_runner_projects_on_runner_id_and_project_id'
- TABLE_NAME = :ci_runner_projects
-
- def up
- add_concurrent_index(TABLE_NAME, [:runner_id, :project_id], name: NEW_INDEX_NAME)
- remove_concurrent_index_by_name(TABLE_NAME, OLD_INDEX_NAME)
- end
-
- def down
- add_concurrent_index(TABLE_NAME, :runner_id, name: OLD_INDEX_NAME)
- remove_concurrent_index_by_name(TABLE_NAME, NEW_INDEX_NAME)
- end
-end
diff --git a/db/migrate/20220120160625_remove_temp_index_on_id_from_vulnerability_occurrences.rb b/db/migrate/20220120160625_remove_temp_index_on_id_from_vulnerability_occurrences.rb
deleted file mode 100644
index 747cabcd865..00000000000
--- a/db/migrate/20220120160625_remove_temp_index_on_id_from_vulnerability_occurrences.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveTempIndexOnIdFromVulnerabilityOccurrences < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'tmp_idx_vulnerability_occurrences_on_id_where_report_type_7_99'
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :vulnerability_occurrences, name: INDEX_NAME
- end
-
- def down
- add_concurrent_index :vulnerability_occurrences, :id, where: 'report_type IN (7, 99)', name: INDEX_NAME
- end
-end
diff --git a/db/migrate/20220120211831_temp_index_for_group_namespace_member_backfill.rb b/db/migrate/20220120211831_temp_index_for_group_namespace_member_backfill.rb
deleted file mode 100644
index 527d8783a0f..00000000000
--- a/db/migrate/20220120211831_temp_index_for_group_namespace_member_backfill.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class TempIndexForGroupNamespaceMemberBackfill < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'tmp_index_for_namespace_id_migration_on_group_members'
-
- disable_ddl_transaction!
-
- def up
- # Temporary index to be removed in 14.10
- # https://gitlab.com/gitlab-org/gitlab/-/issues/353538
- add_concurrent_index :members, :id, where: "members.member_namespace_id IS NULL and members.type = 'GroupMember'", name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :members, INDEX_NAME
- end
-end
diff --git a/db/migrate/20220124200927_add_index_to_issues.rb b/db/migrate/20220124200927_add_index_to_issues.rb
deleted file mode 100644
index 03cdc3ade2c..00000000000
--- a/db/migrate/20220124200927_add_index_to_issues.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexToIssues < Gitlab::Database::Migration[1.0]
- DOWNTIME = false
-
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_issues_on_id_and_weight'
-
- def up
- add_concurrent_index :issues, [:id, :weight], name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :issues, INDEX_NAME
- end
-end
diff --git a/db/migrate/20220125084127_add_cleanup_attempts_to_loose_foreign_keys_deleted_records.rb b/db/migrate/20220125084127_add_cleanup_attempts_to_loose_foreign_keys_deleted_records.rb
deleted file mode 100644
index e0c80ad79e5..00000000000
--- a/db/migrate/20220125084127_add_cleanup_attempts_to_loose_foreign_keys_deleted_records.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddCleanupAttemptsToLooseForeignKeysDeletedRecords < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def up
- add_column :loose_foreign_keys_deleted_records, :cleanup_attempts, :smallint, default: 0
- end
-
- def down
- remove_column :loose_foreign_keys_deleted_records, :cleanup_attempts
- end
-end
diff --git a/db/migrate/20220125122228_add_topics_non_private_projects_count.rb b/db/migrate/20220125122228_add_topics_non_private_projects_count.rb
deleted file mode 100644
index 8c7b750d5ff..00000000000
--- a/db/migrate/20220125122228_add_topics_non_private_projects_count.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class AddTopicsNonPrivateProjectsCount < Gitlab::Database::Migration[1.0]
- def up
- add_column :topics, :non_private_projects_count, :bigint, null: false, default: 0
- end
-
- def down
- remove_column :topics, :non_private_projects_count
- end
-end
diff --git a/db/migrate/20220125122725_add_topics_non_private_projects_count_index.rb b/db/migrate/20220125122725_add_topics_non_private_projects_count_index.rb
deleted file mode 100644
index 46b4d298a2e..00000000000
--- a/db/migrate/20220125122725_add_topics_non_private_projects_count_index.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddTopicsNonPrivateProjectsCountIndex < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_topics_non_private_projects_count'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :topics, [:non_private_projects_count, :id], order: { non_private_projects_count: :desc }, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :topics, INDEX_NAME
- end
-end
diff --git a/db/migrate/20220125230538_add_compound_index_on_project_id_and_id_for_vulnerabilities.rb b/db/migrate/20220125230538_add_compound_index_on_project_id_and_id_for_vulnerabilities.rb
deleted file mode 100644
index c745fa51328..00000000000
--- a/db/migrate/20220125230538_add_compound_index_on_project_id_and_id_for_vulnerabilities.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddCompoundIndexOnProjectIdAndIdForVulnerabilities < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_vulnerabilities_on_project_id_and_id'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :vulnerabilities, [:project_id, :id], name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index :vulnerabilities, [:project_id, :id], name: INDEX_NAME
- end
-end
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/20220128093756_add_ecdsa_sk_and_ed25519_sk_key_restrictions_to_application_settings.rb b/db/migrate/20220128093756_add_ecdsa_sk_and_ed25519_sk_key_restrictions_to_application_settings.rb
deleted file mode 100644
index 1acd9599da4..00000000000
--- a/db/migrate/20220128093756_add_ecdsa_sk_and_ed25519_sk_key_restrictions_to_application_settings.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# frozen_string_literal: true
-
-class AddEcdsaSkAndEd25519SkKeyRestrictionsToApplicationSettings < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def change
- add_column :application_settings, :ecdsa_sk_key_restriction, :integer, default: 0, null: false
- add_column :application_settings, :ed25519_sk_key_restriction, :integer, default: 0, null: false
- end
-end
diff --git a/db/migrate/20220128194722_add_index_on_migration_state_and_import_done_at_to_container_repositories.rb b/db/migrate/20220128194722_add_index_on_migration_state_and_import_done_at_to_container_repositories.rb
deleted file mode 100644
index 6c9fb20bbbd..00000000000
--- a/db/migrate/20220128194722_add_index_on_migration_state_and_import_done_at_to_container_repositories.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexOnMigrationStateAndImportDoneAtToContainerRepositories < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_container_repositories_on_migration_state_import_done_at'
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :container_repositories, [:migration_state, :migration_import_done_at], name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :container_repositories, INDEX_NAME
- end
-end
diff --git a/db/migrate/20220131135725_add_severity_level_to_merge_requests_compliance_violations.rb b/db/migrate/20220131135725_add_severity_level_to_merge_requests_compliance_violations.rb
deleted file mode 100644
index 50aa0121055..00000000000
--- a/db/migrate/20220131135725_add_severity_level_to_merge_requests_compliance_violations.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddSeverityLevelToMergeRequestsComplianceViolations < Gitlab::Database::Migration[1.0]
- def change
- add_column :merge_requests_compliance_violations, :severity_level, :integer, limit: 2, null: false, default: 0
- end
-end
diff --git a/db/migrate/20220131192643_add_show_diff_preview_in_email_to_project_settings.rb b/db/migrate/20220131192643_add_show_diff_preview_in_email_to_project_settings.rb
deleted file mode 100644
index 1811bf04ee4..00000000000
--- a/db/migrate/20220131192643_add_show_diff_preview_in_email_to_project_settings.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddShowDiffPreviewInEmailToProjectSettings < Gitlab::Database::Migration[1.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/20220201205300_remove_index_for_vulnerability_occurrences.rb b/db/migrate/20220201205300_remove_index_for_vulnerability_occurrences.rb
deleted file mode 100644
index 89591d14aae..00000000000
--- a/db/migrate/20220201205300_remove_index_for_vulnerability_occurrences.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveIndexForVulnerabilityOccurrences < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_vulnerability_occurrences_on_unique_keys'
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :vulnerability_occurrences, INDEX_NAME
- end
-
- def down
- # no-op
-
- # The index is UNIQUE so we cannot add it back again
- end
-end
diff --git a/db/migrate/20220202034409_add_tmp_index_on_id_and_migration_state_to_container_repositories.rb b/db/migrate/20220202034409_add_tmp_index_on_id_and_migration_state_to_container_repositories.rb
deleted file mode 100644
index b999c871a3e..00000000000
--- a/db/migrate/20220202034409_add_tmp_index_on_id_and_migration_state_to_container_repositories.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class AddTmpIndexOnIdAndMigrationStateToContainerRepositories < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'tmp_index_container_repositories_on_id_migration_state'
-
- disable_ddl_transaction!
-
- # Temporary index to be removed https://gitlab.com/gitlab-org/gitlab/-/issues/351783
- def up
- add_concurrent_index :container_repositories, [:id, :migration_state], name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :container_repositories, INDEX_NAME
- end
-end
diff --git a/db/migrate/20220202115350_add_migration_indexes_to_container_repositories.rb b/db/migrate/20220202115350_add_migration_indexes_to_container_repositories.rb
deleted file mode 100644
index 673d066e3c0..00000000000
--- a/db/migrate/20220202115350_add_migration_indexes_to_container_repositories.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-class AddMigrationIndexesToContainerRepositories < Gitlab::Database::Migration[1.0]
- PRE_IMPORTING_INDEX = 'idx_container_repos_on_pre_import_started_at_when_pre_importing'
- PRE_IMPORT_DONE_INDEX = 'idx_container_repos_on_pre_import_done_at_when_pre_import_done'
- IMPORTING_INDEX = 'idx_container_repos_on_import_started_at_when_importing'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :container_repositories, :migration_pre_import_started_at, name: PRE_IMPORTING_INDEX, where: "migration_state = 'pre_importing'"
- add_concurrent_index :container_repositories, :migration_pre_import_done_at, name: PRE_IMPORT_DONE_INDEX, where: "migration_state = 'pre_import_done'"
- add_concurrent_index :container_repositories, :migration_import_started_at, name: IMPORTING_INDEX, where: "migration_state = 'importing'"
- end
-
- def down
- remove_concurrent_index_by_name :container_repositories, IMPORTING_INDEX
- remove_concurrent_index_by_name :container_repositories, PRE_IMPORT_DONE_INDEX
- remove_concurrent_index_by_name :container_repositories, PRE_IMPORTING_INDEX
- end
-end
diff --git a/db/migrate/20220203074916_add_topics_lower_name_index.rb b/db/migrate/20220203074916_add_topics_lower_name_index.rb
deleted file mode 100644
index 721abf66c67..00000000000
--- a/db/migrate/20220203074916_add_topics_lower_name_index.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddTopicsLowerNameIndex < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_topics_on_lower_name'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :topics, 'lower(name)', name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :topics, INDEX_NAME
- end
-end
diff --git a/db/migrate/20220203091304_fix_unique_packages_index_excluding_pending_destruction_status.rb b/db/migrate/20220203091304_fix_unique_packages_index_excluding_pending_destruction_status.rb
deleted file mode 100644
index c30d8de23db..00000000000
--- a/db/migrate/20220203091304_fix_unique_packages_index_excluding_pending_destruction_status.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-class FixUniquePackagesIndexExcludingPendingDestructionStatus < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- GO_UNIQUE_INDEX_NAME = 'index_packages_on_project_id_name_version_unique_when_golang'
- GENERIC_UNIQUE_INDEX_NAME = 'index_packages_on_project_id_name_version_unique_when_generic'
- HELM_UNIQUE_INDEX_NAME = 'index_packages_on_project_id_name_version_unique_when_helm'
-
- NEW_GO_UNIQUE_INDEX_NAME = 'idx_packages_on_project_id_name_version_unique_when_golang'
- NEW_GENERIC_UNIQUE_INDEX_NAME = 'idx_packages_on_project_id_name_version_unique_when_generic'
- NEW_HELM_UNIQUE_INDEX_NAME = 'idx_packages_on_project_id_name_version_unique_when_helm'
-
- def up
- add_concurrent_index :packages_packages, [:project_id, :name, :version], unique: true, name: NEW_GO_UNIQUE_INDEX_NAME, where: 'package_type = 8 AND status != 4'
- add_concurrent_index :packages_packages, [:project_id, :name, :version], unique: true, name: NEW_GENERIC_UNIQUE_INDEX_NAME, where: 'package_type = 7 AND status != 4'
- add_concurrent_index :packages_packages, [:project_id, :name, :version], unique: true, name: NEW_HELM_UNIQUE_INDEX_NAME, where: 'package_type = 11 AND status != 4'
-
- remove_concurrent_index_by_name :packages_packages, GO_UNIQUE_INDEX_NAME
- remove_concurrent_index_by_name :packages_packages, GENERIC_UNIQUE_INDEX_NAME
- remove_concurrent_index_by_name :packages_packages, HELM_UNIQUE_INDEX_NAME
- end
-
- def down
- # no-op
- # We can't guarantee that the old index can be recreated since it targets a set larger that the new index.
- end
-end
diff --git a/db/migrate/20220203123333_add_batched_migration_max_batch.rb b/db/migrate/20220203123333_add_batched_migration_max_batch.rb
deleted file mode 100644
index d16c6dd4110..00000000000
--- a/db/migrate/20220203123333_add_batched_migration_max_batch.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddBatchedMigrationMaxBatch < Gitlab::Database::Migration[1.0]
- def change
- add_column :batched_background_migrations, :max_batch_size, :integer
- end
-end
diff --git a/db/migrate/20220203133652_add_legacy_open_source_license_available_to_project_settings.rb b/db/migrate/20220203133652_add_legacy_open_source_license_available_to_project_settings.rb
deleted file mode 100644
index 47f92fae496..00000000000
--- a/db/migrate/20220203133652_add_legacy_open_source_license_available_to_project_settings.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class AddLegacyOpenSourceLicenseAvailableToProjectSettings < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def change
- add_column :project_settings, :legacy_open_source_license_available, :boolean, default: true, null: false
- end
-end
diff --git a/db/migrate/20220203134942_add_hidden_to_projects.rb b/db/migrate/20220203134942_add_hidden_to_projects.rb
deleted file mode 100644
index 7046d641289..00000000000
--- a/db/migrate/20220203134942_add_hidden_to_projects.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class AddHiddenToProjects < Gitlab::Database::Migration[1.0]
- DOWNTIME = false
-
- enable_lock_retries!
-
- def change
- add_column :projects, :hidden, :boolean, default: false, null: false # rubocop: disable Migration/AddColumnsToWideTables
- end
-end
diff --git a/db/migrate/20220204093120_create_analytics_cycle_analytics_aggregations.rb b/db/migrate/20220204093120_create_analytics_cycle_analytics_aggregations.rb
deleted file mode 100644
index 0339e16a85b..00000000000
--- a/db/migrate/20220204093120_create_analytics_cycle_analytics_aggregations.rb
+++ /dev/null
@@ -1,43 +0,0 @@
-# frozen_string_literal: true
-class CreateAnalyticsCycleAnalyticsAggregations < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def up
- create_table :analytics_cycle_analytics_aggregations, id: false do |t|
- t.references :group, index: false, null: false, foreign_key: { to_table: :namespaces, on_delete: :cascade }
- t.integer :incremental_runtimes_in_seconds, array: true, default: [], null: false
- t.integer :incremental_processed_records, array: true, default: [], null: false
- t.integer :last_full_run_runtimes_in_seconds, array: true, default: [], null: false
- t.integer :last_full_run_processed_records, array: true, default: [], null: false
- t.integer :last_incremental_issues_id
- t.integer :last_incremental_merge_requests_id
- t.integer :last_full_run_issues_id
- t.integer :last_full_run_merge_requests_id
-
- t.datetime_with_timezone :last_incremental_run_at
- t.datetime_with_timezone :last_incremental_issues_updated_at
- t.datetime_with_timezone :last_incremental_merge_requests_updated_at
- t.datetime_with_timezone :last_full_run_at
- t.datetime_with_timezone :last_full_run_issues_updated_at
- t.datetime_with_timezone :last_full_run_mrs_updated_at
- t.datetime_with_timezone :last_consistency_check_updated_at
-
- t.boolean :enabled, default: true, null: false
-
- t.index :last_incremental_run_at, where: 'enabled IS TRUE', name: 'ca_aggregations_last_incremental_run_at', order: { last_incremental_run_at: 'ASC NULLS FIRST' }
- t.index :last_full_run_at, where: 'enabled IS TRUE', name: 'ca_aggregations_last_full_run_at', order: { last_full_run_at: 'ASC NULLS FIRST' }
- t.index :last_consistency_check_updated_at, where: 'enabled IS TRUE', name: 'ca_aggregations_last_consistency_check_updated_at', order: { last_consistency_check_updated_at: 'ASC NULLS FIRST' }
-
- t.check_constraint 'CARDINALITY(incremental_runtimes_in_seconds) <= 10'
- t.check_constraint 'CARDINALITY(incremental_processed_records) <= 10'
- t.check_constraint 'CARDINALITY(last_full_run_runtimes_in_seconds) <= 10'
- t.check_constraint 'CARDINALITY(last_full_run_processed_records) <= 10'
- end
-
- execute("ALTER TABLE analytics_cycle_analytics_aggregations ADD PRIMARY KEY (group_id)")
- end
-
- def down
- drop_table :analytics_cycle_analytics_aggregations
- end
-end
diff --git a/db/migrate/20220204154220_add_index_on_greatest_done_at_to_container_repositories.rb b/db/migrate/20220204154220_add_index_on_greatest_done_at_to_container_repositories.rb
deleted file mode 100644
index 455a8478cc4..00000000000
--- a/db/migrate/20220204154220_add_index_on_greatest_done_at_to_container_repositories.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexOnGreatestDoneAtToContainerRepositories < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_container_repositories_on_greatest_done_at'
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :container_repositories,
- 'GREATEST(migration_pre_import_done_at, migration_import_done_at, migration_aborted_at)',
- where: "migration_state IN ('import_done', 'pre_import_done', 'import_aborted')",
- name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :container_repositories, INDEX_NAME
- end
-end
diff --git a/db/migrate/20220204193000_add_integrations_encrypted_properties.rb b/db/migrate/20220204193000_add_integrations_encrypted_properties.rb
deleted file mode 100644
index 7df88b68657..00000000000
--- a/db/migrate/20220204193000_add_integrations_encrypted_properties.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-# frozen_string_literal: true
-
-class AddIntegrationsEncryptedProperties < Gitlab::Database::Migration[1.0]
- def change
- add_column :integrations, :encrypted_properties, :binary
- add_column :integrations, :encrypted_properties_iv, :binary
- end
-end
diff --git a/db/migrate/20220207083129_add_users_get_by_id_limit_to_application_setting.rb b/db/migrate/20220207083129_add_users_get_by_id_limit_to_application_setting.rb
deleted file mode 100644
index cdf2aced213..00000000000
--- a/db/migrate/20220207083129_add_users_get_by_id_limit_to_application_setting.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddUsersGetByIdLimitToApplicationSetting < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def up
- add_column :application_settings, :users_get_by_id_limit, :integer, null: false, default: 300
- add_column :application_settings, :users_get_by_id_limit_allowlist, :text, array: true, limit: 255, null: false, default: []
- end
-
- def down
- remove_column :application_settings, :users_get_by_id_limit
- remove_column :application_settings, :users_get_by_id_limit_allowlist
- end
-end
diff --git a/db/migrate/20220208170445_add_not_valid_foreign_key_to_ci_builds_runner_id.rb b/db/migrate/20220208170445_add_not_valid_foreign_key_to_ci_builds_runner_id.rb
deleted file mode 100644
index 9b2ba17e068..00000000000
--- a/db/migrate/20220208170445_add_not_valid_foreign_key_to_ci_builds_runner_id.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddNotValidForeignKeyToCiBuildsRunnerId < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :ci_builds, :ci_runners, column: :runner_id, on_delete: :nullify, validate: false
- end
-
- def down
- with_lock_retries do
- remove_foreign_key_if_exists :ci_builds, column: :runner_id
- end
- end
-end
diff --git a/db/migrate/20220208171826_update_default_scan_method_of_dast_site_profile.rb b/db/migrate/20220208171826_update_default_scan_method_of_dast_site_profile.rb
deleted file mode 100644
index b01dbe642e2..00000000000
--- a/db/migrate/20220208171826_update_default_scan_method_of_dast_site_profile.rb
+++ /dev/null
@@ -1,24 +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 UpdateDefaultScanMethodOfDastSiteProfile < Gitlab::Database::Migration[1.0]
- BATCH_SIZE = 500
-
- disable_ddl_transaction!
-
- def up
- each_batch_range('dast_site_profiles', scope: ->(table) { table.where(target_type: 1) }, of: BATCH_SIZE) do |min, max|
- execute <<~SQL
- UPDATE dast_site_profiles
- SET scan_method = 1
- WHERE id BETWEEN #{min} AND #{max}
- SQL
- end
- end
-
- def down
- # noop
- end
-end
diff --git a/db/migrate/20220211090920_cleanup_populate_topics_non_private_projects_count.rb b/db/migrate/20220211090920_cleanup_populate_topics_non_private_projects_count.rb
deleted file mode 100644
index 5ab8feb2195..00000000000
--- a/db/migrate/20220211090920_cleanup_populate_topics_non_private_projects_count.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class CleanupPopulateTopicsNonPrivateProjectsCount < Gitlab::Database::Migration[1.0]
- MIGRATION = 'PopulateTopicsNonPrivateProjectsCount'
-
- disable_ddl_transaction!
-
- def up
- finalize_background_migration(MIGRATION)
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/migrate/20220211125954_create_related_epic_links.rb b/db/migrate/20220211125954_create_related_epic_links.rb
deleted file mode 100644
index c06a68a9dd2..00000000000
--- a/db/migrate/20220211125954_create_related_epic_links.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class CreateRelatedEpicLinks < Gitlab::Database::Migration[1.0]
- def up
- create_table :related_epic_links do |t|
- t.references :source, index: true, foreign_key: { to_table: :epics, on_delete: :cascade }, null: false
- t.references :target, index: true, foreign_key: { to_table: :epics, on_delete: :cascade }, null: false
- t.timestamps_with_timezone null: false
- t.integer :link_type, null: false, default: 0, limit: 2
-
- t.index [:source_id, :target_id], unique: true
- end
- end
-
- def down
- drop_table :related_epic_links
- end
-end
diff --git a/db/migrate/20220211214605_update_integrations_trigger_type_new_on_insert_null_safe.rb b/db/migrate/20220211214605_update_integrations_trigger_type_new_on_insert_null_safe.rb
deleted file mode 100644
index 7a60ea48f40..00000000000
--- a/db/migrate/20220211214605_update_integrations_trigger_type_new_on_insert_null_safe.rb
+++ /dev/null
@@ -1,36 +0,0 @@
-# frozen_string_literal: true
-
-class UpdateIntegrationsTriggerTypeNewOnInsertNullSafe < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::SchemaHelpers
-
- FUNCTION_NAME = 'integrations_set_type_new'
-
- def up
- # Update `type_new` dynamically based on `type`, if `type_new` is null
- # and `type` dynamically based on `type_new`, if `type` is null.
- #
- # The old class names are in the format `AbcService`, and the new ones `Integrations::Abc`.
- 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
- end
-
- def down
- # Update `type_new` dynamically based on `type`.
- #
- # The old class names are in the format `AbcService`, and the new ones `Integrations::Abc`.
- create_trigger_function(FUNCTION_NAME, replace: true) do
- <<~SQL
- UPDATE integrations SET type_new = regexp_replace(NEW.type, '\\A(.+)Service\\Z', 'Integrations::\\1')
- WHERE integrations.id = NEW.id;
- RETURN NULL;
- SQL
- end
- 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/20220215164709_update_application_settings_container_registry_exp_pol_worker_capacity_default.rb b/db/migrate/20220215164709_update_application_settings_container_registry_exp_pol_worker_capacity_default.rb
deleted file mode 100644
index 4b743f84c4d..00000000000
--- a/db/migrate/20220215164709_update_application_settings_container_registry_exp_pol_worker_capacity_default.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-class UpdateApplicationSettingsContainerRegistryExpPolWorkerCapacityDefault < Gitlab::Database::Migration[1.0]
- class Settings < ActiveRecord::Base
- self.table_name = 'application_settings'
- end
-
- def up
- change_column_default(:application_settings, :container_registry_expiration_policies_worker_capacity, from: 0, to: 4)
-
- current_settings = Settings.first
-
- if current_settings&.container_registry_expiration_policies_worker_capacity == 0
- current_settings.update!(container_registry_expiration_policies_worker_capacity: 4)
- end
- end
-
- def down
- change_column_default(:application_settings, :container_registry_expiration_policies_worker_capacity, from: 4, to: 0)
- end
-end
diff --git a/db/migrate/20220216110023_create_saved_replies.rb b/db/migrate/20220216110023_create_saved_replies.rb
deleted file mode 100644
index e4b6c039dee..00000000000
--- a/db/migrate/20220216110023_create_saved_replies.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class CreateSavedReplies < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def up
- create_table :saved_replies do |t|
- t.references :user, index: false, null: false, foreign_key: { on_delete: :cascade }
- t.timestamps_with_timezone null: false
- t.text :name, null: false, limit: 255
- t.text :content, null: false, limit: 10000
-
- t.index [:user_id, :name], name: 'index_saved_replies_on_name_text_pattern_ops', unique: true, opclass: { name: :text_pattern_ops }
- end
- end
-
- def down
- drop_table :saved_replies, if_exists: true
- end
-end
diff --git a/db/migrate/20220217100008_add_container_registry_expiration_policies_caching_to_application_settings.rb b/db/migrate/20220217100008_add_container_registry_expiration_policies_caching_to_application_settings.rb
deleted file mode 100644
index bd5b13ffa1c..00000000000
--- a/db/migrate/20220217100008_add_container_registry_expiration_policies_caching_to_application_settings.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddContainerRegistryExpirationPoliciesCachingToApplicationSettings < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def up
- add_column :application_settings, :container_registry_expiration_policies_caching, :boolean, null: false, default: true
- end
-
- def down
- remove_column :application_settings, :container_registry_expiration_policies_caching
- end
-end
diff --git a/db/migrate/20220217113058_add_status_to_status_check_responses.rb b/db/migrate/20220217113058_add_status_to_status_check_responses.rb
deleted file mode 100644
index 2f118677883..00000000000
--- a/db/migrate/20220217113058_add_status_to_status_check_responses.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddStatusToStatusCheckResponses < Gitlab::Database::Migration[1.0]
- def change
- add_column :status_check_responses, :status, :integer, default: 0, null: false, limit: 2
- 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/20220222072536_add_target_access_levels_to_broadcast_messages.rb b/db/migrate/20220222072536_add_target_access_levels_to_broadcast_messages.rb
deleted file mode 100644
index fd353843878..00000000000
--- a/db/migrate/20220222072536_add_target_access_levels_to_broadcast_messages.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class AddTargetAccessLevelsToBroadcastMessages < Gitlab::Database::Migration[1.0]
- def up
- add_column :broadcast_messages, :target_access_levels, :integer, if_not_exists: true, array: true, null: false, default: []
- end
-
- def down
- remove_column :broadcast_messages, :target_access_levels, if_exists: true
- end
-end
diff --git a/db/migrate/20220301002101_add_security_orchestration_policy_configuration_namespace_reference.rb b/db/migrate/20220301002101_add_security_orchestration_policy_configuration_namespace_reference.rb
deleted file mode 100644
index 42828086310..00000000000
--- a/db/migrate/20220301002101_add_security_orchestration_policy_configuration_namespace_reference.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class AddSecurityOrchestrationPolicyConfigurationNamespaceReference < Gitlab::Database::Migration[1.0]
- def up
- add_column :security_orchestration_policy_configurations, :namespace_id, :bigint
- end
-
- def down
- remove_column :security_orchestration_policy_configurations, :namespace_id
- end
-end
diff --git a/db/migrate/20220301003502_add_security_orchestration_policy_configuration_namespace_index.rb b/db/migrate/20220301003502_add_security_orchestration_policy_configuration_namespace_index.rb
deleted file mode 100644
index de6b36faa65..00000000000
--- a/db/migrate/20220301003502_add_security_orchestration_policy_configuration_namespace_index.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-class AddSecurityOrchestrationPolicyConfigurationNamespaceIndex < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
- INDEX_NAME = 'partial_index_sop_configs_on_namespace_id'
-
- def up
- add_concurrent_index :security_orchestration_policy_configurations, :namespace_id, unique: true, name: INDEX_NAME, where: 'namespace_id IS NOT NULL'
- add_concurrent_foreign_key :security_orchestration_policy_configurations, :namespaces, column: :namespace_id, on_delete: :cascade, reverse_lock_order: true
-
- add_check_constraint :security_orchestration_policy_configurations,
- "((project_id IS NULL) != (namespace_id IS NULL))",
- :cop_configs_project_or_namespace_existence
- end
-
- def down
- exec_query 'DELETE FROM security_orchestration_policy_configurations WHERE namespace_id IS NOT NULL'
-
- remove_check_constraint :security_orchestration_policy_configurations, :cop_configs_project_or_namespace_existence
-
- with_lock_retries do
- remove_foreign_key_if_exists :security_orchestration_policy_configurations, column: :namespace_id
- end
-
- remove_concurrent_index_by_name :security_orchestration_policy_configurations, INDEX_NAME
- end
-end
diff --git a/db/migrate/20220301091503_add_not_null_constraint_to_security_policy_configurations.rb b/db/migrate/20220301091503_add_not_null_constraint_to_security_policy_configurations.rb
deleted file mode 100644
index 79ffcb2cbb3..00000000000
--- a/db/migrate/20220301091503_add_not_null_constraint_to_security_policy_configurations.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: true
-
-class AddNotNullConstraintToSecurityPolicyConfigurations < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- change_column_null :security_orchestration_policy_configurations, :project_id, true
- end
-
- def down
- exec_query 'DELETE FROM security_orchestration_policy_configurations WHERE project_id IS NULL'
- change_column_null :security_orchestration_policy_configurations, :project_id, false
- end
-end
diff --git a/db/migrate/20220301175104_change_security_orchestration_policy_configuration_project_index.rb b/db/migrate/20220301175104_change_security_orchestration_policy_configuration_project_index.rb
deleted file mode 100644
index 53706d46979..00000000000
--- a/db/migrate/20220301175104_change_security_orchestration_policy_configuration_project_index.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class ChangeSecurityOrchestrationPolicyConfigurationProjectIndex < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
- OLD_INDEX_NAME = 'index_sop_configs_on_project_id'
- NEW_INDEX_NAME = 'partial_index_sop_configs_on_project_id'
-
- def up
- add_concurrent_index :security_orchestration_policy_configurations, :project_id, unique: true, name: NEW_INDEX_NAME, where: 'project_id IS NOT NULL'
- remove_concurrent_index_by_name :security_orchestration_policy_configurations, OLD_INDEX_NAME
- end
-
- def down
- add_concurrent_index :security_orchestration_policy_configurations, :project_id, unique: true, name: OLD_INDEX_NAME
- remove_concurrent_index_by_name :security_orchestration_policy_configurations, NEW_INDEX_NAME
- end
-end
diff --git a/db/migrate/20220301175426_create_project_build_artifacts_size_refresh.rb b/db/migrate/20220301175426_create_project_build_artifacts_size_refresh.rb
deleted file mode 100644
index fd01437d045..00000000000
--- a/db/migrate/20220301175426_create_project_build_artifacts_size_refresh.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# frozen_string_literal: true
-
-class CreateProjectBuildArtifactsSizeRefresh < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- CREATED_STATE = 1
-
- def change
- create_table :project_build_artifacts_size_refreshes do |t|
- t.references :project, index: { unique: true }, foreign_key: { on_delete: :cascade }, null: false
- t.bigint :last_job_artifact_id, null: true
- t.integer :state, null: false, default: CREATED_STATE, limit: 1
- t.datetime_with_timezone :refresh_started_at, null: true
- t.timestamps_with_timezone null: false
-
- # We will use this index for 2 purposes:
- # - for finding rows with state = :waiting
- # - for finding rows with state = :running and updated_at < x.days.ago
- # which we can use to find jobs that were not able to complete and considered
- # stale so we can retry
- t.index [:state, :updated_at], name: 'idx_build_artifacts_size_refreshes_state_updated_at'
- end
- end
-end
diff --git a/db/migrate/20220302110724_add_group_features_table.rb b/db/migrate/20220302110724_add_group_features_table.rb
deleted file mode 100644
index 9d9204afec2..00000000000
--- a/db/migrate/20220302110724_add_group_features_table.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class AddGroupFeaturesTable < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def up
- create_table :group_features, id: false do |t|
- t.references :group, index: false, foreign_key: { to_table: :namespaces, on_delete: :cascade }, null: false
- t.timestamps_with_timezone null: false
- t.integer :wiki_access_level, default: Featurable::ENABLED, null: false, limit: 2
- end
-
- execute('ALTER TABLE group_features ADD PRIMARY KEY (group_id)')
- end
-
- def down
- drop_table :group_features
- end
-end
diff --git a/db/migrate/20220303190555_add_comment_to_deployment_approvals.rb b/db/migrate/20220303190555_add_comment_to_deployment_approvals.rb
deleted file mode 100644
index 56b873c009a..00000000000
--- a/db/migrate/20220303190555_add_comment_to_deployment_approvals.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# frozen_string_literal: true
-
-class AddCommentToDeploymentApprovals < Gitlab::Database::Migration[1.0]
- # rubocop:disable Migration/AddLimitToTextColumns
- # limit is added in 20220303191047_add_text_limit_to_deployment_approvals_comment
- def change
- add_column :deployment_approvals, :comment, :text
- end
- # rubocop:enable Migration/AddLimitToTextColumns
-end
diff --git a/db/migrate/20220303191047_add_text_limit_to_deployment_approvals_comment.rb b/db/migrate/20220303191047_add_text_limit_to_deployment_approvals_comment.rb
deleted file mode 100644
index 70c7f5f3a7b..00000000000
--- a/db/migrate/20220303191047_add_text_limit_to_deployment_approvals_comment.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddTextLimitToDeploymentApprovalsComment < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :deployment_approvals, :comment, 255
- end
-
- def down
- remove_text_limit :deployment_approvals, :comment
- end
-end
diff --git a/db/migrate/20220304052335_remove_not_null_contraint_on_title_from_sprints.rb b/db/migrate/20220304052335_remove_not_null_contraint_on_title_from_sprints.rb
deleted file mode 100644
index f429303ab83..00000000000
--- a/db/migrate/20220304052335_remove_not_null_contraint_on_title_from_sprints.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveNotNullContraintOnTitleFromSprints < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def up
- change_column_null :sprints, :title, true
- end
-
- def down
- execute <<~SQL
- UPDATE sprints SET title = id WHERE title IS NULL
- SQL
-
- change_column_null :sprints, :title, false
- end
-end
diff --git a/db/migrate/20220304061631_remove_unique_index_for_sprints_on_iterations_cadence_id_and_title.rb b/db/migrate/20220304061631_remove_unique_index_for_sprints_on_iterations_cadence_id_and_title.rb
deleted file mode 100644
index 8c223bbce01..00000000000
--- a/db/migrate/20220304061631_remove_unique_index_for_sprints_on_iterations_cadence_id_and_title.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveUniqueIndexForSprintsOnIterationsCadenceIdAndTitle < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_sprints_on_iterations_cadence_id_and_title'
-
- def up
- remove_concurrent_index_by_name :sprints, INDEX_NAME
- end
-
- def down
- add_concurrent_index :sprints, [:iterations_cadence_id, :title], name: INDEX_NAME, unique: true
- end
-end
diff --git a/db/migrate/20220304062107_remove_unique_index_for_sprints_on_project_id_and_title.rb b/db/migrate/20220304062107_remove_unique_index_for_sprints_on_project_id_and_title.rb
deleted file mode 100644
index 34a357bdc5c..00000000000
--- a/db/migrate/20220304062107_remove_unique_index_for_sprints_on_project_id_and_title.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveUniqueIndexForSprintsOnProjectIdAndTitle < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_sprints_on_project_id_and_title'
-
- def up
- remove_concurrent_index_by_name :sprints, INDEX_NAME
- end
-
- def down
- add_concurrent_index :sprints, [:project_id, :title], where: "project_id IS NOT NULL", name: INDEX_NAME, unique: true
- end
-end
diff --git a/db/migrate/20220304152729_add_default_to_required_python_on_packages_pypi_metadata.rb b/db/migrate/20220304152729_add_default_to_required_python_on_packages_pypi_metadata.rb
deleted file mode 100644
index 56297565cb4..00000000000
--- a/db/migrate/20220304152729_add_default_to_required_python_on_packages_pypi_metadata.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class AddDefaultToRequiredPythonOnPackagesPypiMetadata < Gitlab::Database::Migration[1.0]
- def up
- change_column_default(:packages_pypi_metadata, :required_python, '')
- end
-
- def down
- change_column_default(:packages_pypi_metadata, :required_python, nil)
- end
-end
diff --git a/db/migrate/20220307203458_rename_user_email_lookup_limit_setting_to_search_settings.rb b/db/migrate/20220307203458_rename_user_email_lookup_limit_setting_to_search_settings.rb
deleted file mode 100644
index 62fe55b22f2..00000000000
--- a/db/migrate/20220307203458_rename_user_email_lookup_limit_setting_to_search_settings.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class RenameUserEmailLookupLimitSettingToSearchSettings < Gitlab::Database::Migration[1.0]
- def up
- add_column :application_settings, :search_rate_limit, :integer, null: false, default: 30
- add_column :application_settings, :search_rate_limit_unauthenticated, :integer, null: false, default: 10
- end
-
- def down
- remove_column :application_settings, :search_rate_limit
- remove_column :application_settings, :search_rate_limit_unauthenticated
- end
-end
diff --git a/db/migrate/20220309100648_add_time_to_restore_service_dora_metric.rb b/db/migrate/20220309100648_add_time_to_restore_service_dora_metric.rb
deleted file mode 100644
index 5cb49a9899a..00000000000
--- a/db/migrate/20220309100648_add_time_to_restore_service_dora_metric.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-class AddTimeToRestoreServiceDoraMetric < Gitlab::Database::Migration[1.0]
- def change
- add_column :dora_daily_metrics, :time_to_restore_service_in_seconds, :integer
- end
-end
diff --git a/db/migrate/20220310011530_add_database_grafana_config_to_application_settings.rb b/db/migrate/20220310011530_add_database_grafana_config_to_application_settings.rb
deleted file mode 100644
index 7752fbba12f..00000000000
--- a/db/migrate/20220310011530_add_database_grafana_config_to_application_settings.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddDatabaseGrafanaConfigToApplicationSettings < Gitlab::Database::Migration[1.0]
- # rubocop:disable Migration/AddLimitToTextColumns
- # limit is added in 20220307002607_add_text_limit_to_db_reindexing_grafana_application_settings
- def change
- add_column :application_settings, :encrypted_database_grafana_api_key, :binary
- add_column :application_settings, :encrypted_database_grafana_api_key_iv, :binary
- add_column :application_settings, :database_grafana_api_url, :text
- add_column :application_settings, :database_grafana_tag, :text
- end
- # rubocop:enable Migration/AddLimitToTextColumns
-end
diff --git a/db/migrate/20220310011613_add_text_limit_to_database_grafana_application_settings.rb b/db/migrate/20220310011613_add_text_limit_to_database_grafana_application_settings.rb
deleted file mode 100644
index 72bcf493d6e..00000000000
--- a/db/migrate/20220310011613_add_text_limit_to_database_grafana_application_settings.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddTextLimitToDatabaseGrafanaApplicationSettings < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :application_settings, :database_grafana_api_url, 255
- add_text_limit :application_settings, :database_grafana_tag, 255
- end
-
- def down
- remove_text_limit :application_settings, :database_grafana_tag
- remove_text_limit :application_settings, :database_grafana_api_url
- end
-end
diff --git a/db/migrate/20220310101118_update_holder_name_limit.rb b/db/migrate/20220310101118_update_holder_name_limit.rb
deleted file mode 100644
index 55eb8f75d70..00000000000
--- a/db/migrate/20220310101118_update_holder_name_limit.rb
+++ /dev/null
@@ -1,28 +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 UpdateHolderNameLimit < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :user_credit_card_validations, :holder_name, 50, constraint_name: new_constraint_name
- remove_text_limit :user_credit_card_validations, :holder_name, constraint_name: old_constraint_name
- end
-
- def down
- add_text_limit :user_credit_card_validations, :holder_name, 26, validate: false, constraint_name: old_constraint_name
- remove_text_limit :user_credit_card_validations, :holder_name, constraint_name: new_constraint_name
- end
-
- private
-
- def old_constraint_name
- check_constraint_name(:user_credit_card_validations, :holder_name, 'max_length')
- end
-
- def new_constraint_name
- check_constraint_name(:user_credit_card_validations, :holder_name, 'max_length_50')
- 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/20220314184009_create_protected_environment_approval_rules.rb b/db/migrate/20220314184009_create_protected_environment_approval_rules.rb
deleted file mode 100644
index f0db2c004ed..00000000000
--- a/db/migrate/20220314184009_create_protected_environment_approval_rules.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-# frozen_string_literal: true
-
-class CreateProtectedEnvironmentApprovalRules < Gitlab::Database::Migration[1.0]
- def up
- create_table :protected_environment_approval_rules do |t|
- t.references :protected_environment,
- index: { name: :index_approval_rule_on_protected_environment_id },
- foreign_key: { to_table: :protected_environments, on_delete: :cascade },
- null: false
-
- t.bigint :user_id
- t.bigint :group_id
- t.timestamps_with_timezone null: false
- t.integer :access_level, limit: 2
- t.integer :required_approvals, null: false, limit: 2
-
- t.index :user_id
- t.index :group_id
-
- t.check_constraint "((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))"
- t.check_constraint "required_approvals > 0"
- end
- end
-
- def down
- drop_table :protected_environment_approval_rules
- end
-end
diff --git a/db/migrate/20220314184009_init_schema.rb b/db/migrate/20220314184009_init_schema.rb
new file mode 100644
index 00000000000..97027f8a9e4
--- /dev/null
+++ b/db/migrate/20220314184009_init_schema.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class InitSchema < Gitlab::Database::Migration[1.0]
+ DOWNTIME = false
+
+ def up
+ execute(File.read("db/init_structure.sql"))
+ end
+
+ def down
+ raise ActiveRecord::IrreversibleMigration, "The initial migration is not able to be reverted."
+ end
+end
diff --git a/db/migrate/20221229172604_add_runner_registration_enabled_to_project_settings.rb b/db/migrate/20221229172604_add_runner_registration_enabled_to_project_settings.rb
new file mode 100644
index 00000000000..0e403dac24f
--- /dev/null
+++ b/db/migrate/20221229172604_add_runner_registration_enabled_to_project_settings.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class AddRunnerRegistrationEnabledToProjectSettings < Gitlab::Database::Migration[2.1]
+ enable_lock_retries!
+
+ def change
+ add_column :project_settings, :runner_registration_enabled, :boolean, default: true
+ end
+end
diff --git a/db/migrate/20230127024835_add_database_apdex_settings_to_application_settings.rb b/db/migrate/20230127024835_add_database_apdex_settings_to_application_settings.rb
new file mode 100644
index 00000000000..70c4962d02d
--- /dev/null
+++ b/db/migrate/20230127024835_add_database_apdex_settings_to_application_settings.rb
@@ -0,0 +1,7 @@
+# frozen_string_literal: true
+
+class AddDatabaseApdexSettingsToApplicationSettings < Gitlab::Database::Migration[2.1]
+ def change
+ add_column :application_settings, :database_apdex_settings, :jsonb
+ end
+end
diff --git a/db/migrate/20230207002330_add_project_group_link_on_delete_cascade_fk.rb b/db/migrate/20230207002330_add_project_group_link_on_delete_cascade_fk.rb
new file mode 100644
index 00000000000..5d6f4961baf
--- /dev/null
+++ b/db/migrate/20230207002330_add_project_group_link_on_delete_cascade_fk.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class AddProjectGroupLinkOnDeleteCascadeFk < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_foreign_key(
+ :project_group_links,
+ :namespaces,
+ column: :group_id,
+ on_delete: :cascade,
+ validate: false
+ )
+ end
+
+ def down
+ with_lock_retries do
+ remove_foreign_key_if_exists :project_group_links, column: :group_id
+ end
+ end
+end
diff --git a/db/migrate/20230222161226_add_custom_jira_regex_to_jira_tracker_data.rb b/db/migrate/20230222161226_add_custom_jira_regex_to_jira_tracker_data.rb
new file mode 100644
index 00000000000..c9668c311a3
--- /dev/null
+++ b/db/migrate/20230222161226_add_custom_jira_regex_to_jira_tracker_data.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+class AddCustomJiraRegexToJiraTrackerData < Gitlab::Database::Migration[2.1]
+ # rubocop:disable Migration/AddLimitToTextColumns
+ # limit is added in 20230222161954_add_text_limit_to_custom_jira_regex_fields.rb
+ enable_lock_retries!
+ def change
+ add_column :jira_tracker_data, :jira_issue_prefix, :text
+ add_column :jira_tracker_data, :jira_issue_regex, :text
+ end
+ # rubocop:enable Migration/AddLimitToTextColumns
+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
new file mode 100644
index 00000000000..625655fda9d
--- /dev/null
+++ b/db/migrate/20230222161954_add_text_limit_to_custom_jira_regex_fields.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class AddTextLimitToCustomJiraRegexFields < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ add_text_limit :jira_tracker_data, :jira_issue_prefix, 255
+ add_text_limit :jira_tracker_data, :jira_issue_regex, 255
+ end
+
+ def down
+ remove_text_limit :jira_tracker_data, :jira_issue_regex
+ remove_text_limit :jira_tracker_data, :jira_issue_regex
+ end
+end
diff --git a/db/migrate/20230228183644_add_partitioning_info_to_postgres_foreign_keys.rb b/db/migrate/20230228183644_add_partitioning_info_to_postgres_foreign_keys.rb
new file mode 100644
index 00000000000..5fe2a497077
--- /dev/null
+++ b/db/migrate/20230228183644_add_partitioning_info_to_postgres_foreign_keys.rb
@@ -0,0 +1,90 @@
+# frozen_string_literal: true
+
+class AddPartitioningInfoToPostgresForeignKeys < Gitlab::Database::Migration[2.1]
+ def up
+ execute <<~SQL
+ DROP VIEW IF EXISTS postgres_foreign_keys;
+ CREATE VIEW postgres_foreign_keys AS
+ SELECT pg_constraint.oid AS oid,
+ pg_constraint.conname AS name,
+ constrained_namespace.nspname::text || '.'::text ||
+ constrained_table.relname::text AS constrained_table_identifier,
+ referenced_namespace.nspname::text || '.'::text ||
+ referenced_table.relname::text AS referenced_table_identifier,
+ constrained_table.relname::text AS constrained_table_name,
+ referenced_table.relname::text AS referenced_table_name,
+ constrained_cols.constrained_columns,
+ referenced_cols.referenced_columns,
+ pg_constraint.confdeltype AS on_delete_action,
+ pg_constraint.confupdtype as on_update_action,
+ pg_constraint.coninhcount > 0 as is_inherited,
+ pg_constraint.convalidated as is_valid,
+ partitioned_parent_oids.parent_oid as parent_oid
+ FROM pg_constraint
+ INNER JOIN pg_class constrained_table ON constrained_table.oid = pg_constraint.conrelid
+ INNER JOIN pg_class referenced_table ON referenced_table.oid = pg_constraint.confrelid
+ INNER JOIN pg_namespace constrained_namespace ON constrained_table.relnamespace = constrained_namespace.oid
+ INNER JOIN pg_namespace referenced_namespace ON referenced_table.relnamespace = referenced_namespace.oid
+ CROSS JOIN LATERAL (
+ SELECT array_agg(pg_attribute.attname ORDER BY conkey.idx) -- must order here so that attributes are in correct order in array
+ FROM unnest(pg_constraint.conkey) WITH ORDINALITY conkey(attnum, idx)
+ INNER JOIN pg_attribute
+ ON pg_attribute.attnum = conkey.attnum AND pg_attribute.attrelid = constrained_table.oid
+ ) constrained_cols(constrained_columns)
+ CROSS JOIN LATERAL (
+ SELECT array_agg(pg_attribute.attname ORDER BY confkey.idx)
+ FROM unnest(pg_constraint.confkey) WITH ORDINALITY confkey(attnum, idx)
+ INNER JOIN pg_attribute
+ ON pg_attribute.attnum = confkey.attnum AND pg_attribute.attrelid = referenced_table.oid
+ ) referenced_cols(referenced_columns)
+ LEFT JOIN LATERAL (
+ SELECT refobjid as parent_oid
+ FROM pg_depend
+ WHERE objid = pg_constraint.oid
+ AND pg_depend.deptype = 'P'
+ AND refobjid IN (SELECT oid FROM pg_constraint WHERE contype = 'f')
+ LIMIT 1
+ ) partitioned_parent_oids(parent_oid) ON true
+ WHERE contype = 'f';
+ SQL
+
+ Gitlab::Database::PostgresForeignKey.reset_column_information
+ end
+
+ def down
+ execute <<~SQL
+ DROP VIEW IF EXISTS postgres_foreign_keys;
+ CREATE VIEW postgres_foreign_keys AS
+ SELECT
+ pg_constraint.oid AS oid,
+ pg_constraint.conname AS name,
+ constrained_namespace.nspname::text || '.'::text || constrained_table.relname::text AS constrained_table_identifier,
+ referenced_namespace.nspname::text || '.'::text || referenced_table.relname::text AS referenced_table_identifier,
+ constrained_table.relname::text AS constrained_table_name,
+ referenced_table.relname::text AS referenced_table_name,
+ constrained_cols.constrained_columns,
+ referenced_cols.referenced_columns,
+ pg_constraint.confdeltype AS on_delete_action,
+ pg_constraint.confupdtype as on_update_action,
+ pg_constraint.coninhcount > 0 as is_inherited
+ FROM pg_constraint
+ INNER JOIN pg_class constrained_table ON constrained_table.oid = pg_constraint.conrelid
+ INNER JOIN pg_class referenced_table ON referenced_table.oid = pg_constraint.confrelid
+ INNER JOIN pg_namespace constrained_namespace ON constrained_table.relnamespace = constrained_namespace.oid
+ INNER JOIN pg_namespace referenced_namespace ON referenced_table.relnamespace = referenced_namespace.oid
+ CROSS JOIN LATERAL (
+ SELECT array_agg(pg_attribute.attname ORDER BY conkey.idx) -- must order here so that attributes are in correct order in array
+ FROM unnest(pg_constraint.conkey) WITH ORDINALITY conkey(attnum, idx)
+ INNER JOIN pg_attribute ON pg_attribute.attnum = conkey.attnum AND pg_attribute.attrelid = constrained_table.oid
+ ) constrained_cols(constrained_columns)
+ CROSS JOIN LATERAL (
+ SELECT array_agg(pg_attribute.attname ORDER BY confkey.idx)
+ FROM unnest(pg_constraint.confkey) WITH ORDINALITY confkey(attnum, idx)
+ INNER JOIN pg_attribute ON pg_attribute.attnum = confkey.attnum AND pg_attribute.attrelid = referenced_table.oid
+ ) referenced_cols(referenced_columns)
+ WHERE contype = 'f';
+ SQL
+
+ Gitlab::Database::PostgresForeignKey.reset_column_information
+ end
+end
diff --git a/db/migrate/20230303232426_add_role_approvers_to_scan_result_policies.rb b/db/migrate/20230303232426_add_role_approvers_to_scan_result_policies.rb
new file mode 100644
index 00000000000..7d3f4491818
--- /dev/null
+++ b/db/migrate/20230303232426_add_role_approvers_to_scan_result_policies.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class AddRoleApproversToScanResultPolicies < Gitlab::Database::Migration[2.1]
+ enable_lock_retries!
+
+ def change
+ add_column :scan_result_policies, :role_approvers, :integer, array: true, default: []
+ end
+end
diff --git a/db/migrate/20230307000000_create_design_management_repository.rb b/db/migrate/20230307000000_create_design_management_repository.rb
new file mode 100644
index 00000000000..da4dee9f320
--- /dev/null
+++ b/db/migrate/20230307000000_create_design_management_repository.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+class CreateDesignManagementRepository < Gitlab::Database::Migration[2.1]
+ def change
+ create_table :design_management_repositories do |t|
+ t.references :project, index: { unique: true }, null: false, foreign_key: { on_delete: :cascade }
+
+ t.timestamps_with_timezone null: false
+ end
+ end
+end
diff --git a/db/migrate/20230307132729_create_schema_inconsistencies.rb b/db/migrate/20230307132729_create_schema_inconsistencies.rb
new file mode 100644
index 00000000000..4891cc6ab7b
--- /dev/null
+++ b/db/migrate/20230307132729_create_schema_inconsistencies.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class CreateSchemaInconsistencies < Gitlab::Database::Migration[2.1]
+ enable_lock_retries!
+
+ def change
+ create_table :schema_inconsistencies do |t|
+ t.references :issue, index: true, null: false, foreign_key: { on_delete: :cascade }
+ t.timestamps_with_timezone null: false
+ t.text :object_name, null: false, limit: 63
+ t.text :table_name, null: false, limit: 63
+ t.text :valitador_name, null: false, limit: 63
+ end
+ end
+end
diff --git a/db/migrate/20230307212637_remove_create_learn_gitlab_worker_job_instances.rb b/db/migrate/20230307212637_remove_create_learn_gitlab_worker_job_instances.rb
new file mode 100644
index 00000000000..b2e4cc8ceb2
--- /dev/null
+++ b/db/migrate/20230307212637_remove_create_learn_gitlab_worker_job_instances.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+class RemoveCreateLearnGitlabWorkerJobInstances < Gitlab::Database::Migration[2.1]
+ def up
+ # No-op to fix https://gitlab.com/gitlab-com/gl-infra/production/-/issues/8612
+ end
+
+ def down
+ # No-op to fix https://gitlab.com/gitlab-com/gl-infra/production/-/issues/8612
+ end
+end
diff --git a/db/migrate/20230308154243_add_package_id_to_ml_candidates.rb b/db/migrate/20230308154243_add_package_id_to_ml_candidates.rb
new file mode 100644
index 00000000000..ed13ddc894c
--- /dev/null
+++ b/db/migrate/20230308154243_add_package_id_to_ml_candidates.rb
@@ -0,0 +1,7 @@
+# frozen_string_literal: true
+
+class AddPackageIdToMlCandidates < Gitlab::Database::Migration[2.1]
+ def change
+ add_column :ml_candidates, :package_id, :bigint, null: true
+ end
+end
diff --git a/db/migrate/20230308154244_add_package_id_foreign_key_to_ml_candidates.rb b/db/migrate/20230308154244_add_package_id_foreign_key_to_ml_candidates.rb
new file mode 100644
index 00000000000..7f12673e410
--- /dev/null
+++ b/db/migrate/20230308154244_add_package_id_foreign_key_to_ml_candidates.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class AddPackageIdForeignKeyToMlCandidates < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_foreign_key :ml_candidates, :packages_packages, column: :package_id, on_delete: :nullify
+ end
+
+ def down
+ with_lock_retries do
+ remove_foreign_key_if_exists :ml_candidates, column: :package_id
+ end
+ end
+end
diff --git a/db/migrate/20230308154245_add_index_on_package_id_for_ml_candidates.rb b/db/migrate/20230308154245_add_index_on_package_id_for_ml_candidates.rb
new file mode 100644
index 00000000000..cb3c9cd5a33
--- /dev/null
+++ b/db/migrate/20230308154245_add_index_on_package_id_for_ml_candidates.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class AddIndexOnPackageIdForMlCandidates < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ INDEX_NAME = 'index_ml_candidates_on_package_id'
+
+ def up
+ add_concurrent_index :ml_candidates, :package_id, name: INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_index_by_name :ml_candidates, name: INDEX_NAME
+ end
+end
diff --git a/db/migrate/20230313012226_create_search_indices.rb b/db/migrate/20230313012226_create_search_indices.rb
new file mode 100644
index 00000000000..e1ef29be5af
--- /dev/null
+++ b/db/migrate/20230313012226_create_search_indices.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class CreateSearchIndices < Gitlab::Database::Migration[2.1]
+ enable_lock_retries!
+
+ def change
+ create_table :search_indices do |t|
+ t.timestamps_with_timezone null: false
+ t.integer :bucket_number # We allow null bucket numbers to support custom index assignments
+ t.text :path, null: false, limit: 255
+ t.text :type, null: false, limit: 255
+ end
+
+ add_index :search_indices, [:id, :type], unique: true
+ add_index :search_indices, [:type, :path], unique: true
+ add_index :search_indices, [:type, :bucket_number], unique: true
+ end
+end
diff --git a/db/migrate/20230313012609_create_search_namespace_index_assignments.rb b/db/migrate/20230313012609_create_search_namespace_index_assignments.rb
new file mode 100644
index 00000000000..ea3760ead74
--- /dev/null
+++ b/db/migrate/20230313012609_create_search_namespace_index_assignments.rb
@@ -0,0 +1,26 @@
+# frozen_string_literal: true
+
+class CreateSearchNamespaceIndexAssignments < Gitlab::Database::Migration[2.1]
+ enable_lock_retries!
+
+ def change
+ create_table :search_namespace_index_assignments do |t|
+ t.references :namespace, foreign_key: true, null: true, on_delete: :nullify
+ t.bigint :search_index_id, index: true, null: false
+ t.bigint :namespace_id_non_nullable, null: false
+ t.timestamps_with_timezone null: false
+ t.integer :namespace_id_hashed, null: false
+ t.text :index_type, null: false, limit: 255
+ end
+
+ add_index :search_namespace_index_assignments,
+ [:namespace_id, :index_type],
+ unique: true,
+ name: 'index_search_namespace_index_assignments_uniqueness_index_type'
+
+ add_index :search_namespace_index_assignments,
+ [:namespace_id, :search_index_id],
+ unique: true,
+ name: 'index_search_namespace_index_assignments_uniqueness_on_index_id'
+ end
+end
diff --git a/db/migrate/20230313014038_add_search_index_foreign_key_to_search_namespace_index_assignments.rb b/db/migrate/20230313014038_add_search_index_foreign_key_to_search_namespace_index_assignments.rb
new file mode 100644
index 00000000000..c49833b01e1
--- /dev/null
+++ b/db/migrate/20230313014038_add_search_index_foreign_key_to_search_namespace_index_assignments.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddSearchIndexForeignKeyToSearchNamespaceIndexAssignments < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ FK_NAME = 'fk_search_index_id_and_type'
+
+ def up
+ add_concurrent_foreign_key :search_namespace_index_assignments, :search_indices,
+ name: FK_NAME, column: [:search_index_id, :index_type], target_column: [:id, :type], on_delete: :cascade
+ end
+
+ def down
+ with_lock_retries do
+ remove_foreign_key :search_namespace_index_assignments, name: FK_NAME
+ end
+ end
+end
diff --git a/db/migrate/20230313031351_create_resource_link_events.rb b/db/migrate/20230313031351_create_resource_link_events.rb
new file mode 100644
index 00000000000..03f00c9416b
--- /dev/null
+++ b/db/migrate/20230313031351_create_resource_link_events.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class CreateResourceLinkEvents < Gitlab::Database::Migration[2.1]
+ def change
+ create_table :resource_link_events do |t|
+ t.integer :action, limit: 2, null: false
+ t.bigint :user_id, null: false
+ t.references :issue, index: true, null: false, foreign_key: { on_delete: :cascade }
+ t.references :child_work_item, index: true, null: false, foreign_key: { to_table: :issues, on_delete: :cascade }
+ t.datetime_with_timezone :created_at, null: false
+
+ t.index :user_id
+ end
+ end
+end
diff --git a/db/migrate/20230313181536_create_packages_npm_metadata_caches.rb b/db/migrate/20230313181536_create_packages_npm_metadata_caches.rb
new file mode 100644
index 00000000000..fde33342f04
--- /dev/null
+++ b/db/migrate/20230313181536_create_packages_npm_metadata_caches.rb
@@ -0,0 +1,26 @@
+# frozen_string_literal: true
+
+class CreatePackagesNpmMetadataCaches < Gitlab::Database::Migration[2.1]
+ enable_lock_retries!
+
+ INDEX_NAME = 'index_npm_metadata_caches_on_package_name_project_id_unique'
+
+ def up
+ create_table :packages_npm_metadata_caches do |t|
+ t.timestamps_with_timezone
+
+ t.datetime_with_timezone :last_downloaded_at
+ t.bigint :project_id, index: true
+ t.integer :file_store, default: 1
+ t.integer :size, null: false
+ t.text :file, null: false, limit: 255
+ t.text :package_name, null: false # rubocop:disable Migration/AddLimitToTextColumns
+
+ t.index %i[package_name project_id], name: INDEX_NAME, unique: true, where: 'project_id IS NOT NULL'
+ end
+ end
+
+ def down
+ drop_table :packages_npm_metadata_caches
+ end
+end
diff --git a/db/migrate/20230315053635_add_screenshot_to_abuse_reports.rb b/db/migrate/20230315053635_add_screenshot_to_abuse_reports.rb
new file mode 100644
index 00000000000..421878967c4
--- /dev/null
+++ b/db/migrate/20230315053635_add_screenshot_to_abuse_reports.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+class AddScreenshotToAbuseReports < Gitlab::Database::Migration[2.1]
+ # rubocop:disable Migration/AddLimitToTextColumns
+ # limit is added in 20230327074932_add_text_limit_to_abuse_reports_screenshot
+ def change
+ add_column :abuse_reports, :screenshot, :text
+ end
+ # rubocop:enable Migration/AddLimitToTextColumns
+end
diff --git a/db/migrate/20230316093433_insert_daily_invites_trial_plan_limits.rb b/db/migrate/20230316093433_insert_daily_invites_trial_plan_limits.rb
new file mode 100644
index 00000000000..f6254cad192
--- /dev/null
+++ b/db/migrate/20230316093433_insert_daily_invites_trial_plan_limits.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class InsertDailyInvitesTrialPlanLimits < Gitlab::Database::Migration[2.1]
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ return unless Gitlab.com?
+
+ create_or_update_plan_limit('daily_invites', 'premium_trial', 50)
+ create_or_update_plan_limit('daily_invites', 'ultimate_trial', 50)
+ end
+
+ def down
+ return unless Gitlab.com?
+
+ create_or_update_plan_limit('daily_invites', 'premium_trial', 0)
+ create_or_update_plan_limit('daily_invites', 'ultimate_trial', 0)
+ end
+end
diff --git a/db/migrate/20230316095948_create_service_desk_custom_email_credentials.rb b/db/migrate/20230316095948_create_service_desk_custom_email_credentials.rb
new file mode 100644
index 00000000000..c0537a1985d
--- /dev/null
+++ b/db/migrate/20230316095948_create_service_desk_custom_email_credentials.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: true
+
+class CreateServiceDeskCustomEmailCredentials < Gitlab::Database::Migration[2.1]
+ enable_lock_retries!
+
+ def change
+ create_table(:service_desk_custom_email_credentials, id: false) do |t|
+ t.references :project,
+ primary_key: true,
+ default: nil,
+ index: false,
+ foreign_key: { to_table: :projects, on_delete: :cascade }
+ t.timestamps_with_timezone
+ t.integer :smtp_port
+ t.text :smtp_address, limit: 255
+ t.binary :encrypted_smtp_username
+ t.binary :encrypted_smtp_username_iv
+ t.binary :encrypted_smtp_password
+ t.binary :encrypted_smtp_password_iv
+ end
+ end
+end
diff --git a/db/migrate/20230317162059_add_current_user_todos_work_item_widget.rb b/db/migrate/20230317162059_add_current_user_todos_work_item_widget.rb
new file mode 100644
index 00000000000..4ed1fd6869c
--- /dev/null
+++ b/db/migrate/20230317162059_add_current_user_todos_work_item_widget.rb
@@ -0,0 +1,57 @@
+# frozen_string_literal: true
+
+class AddCurrentUserTodosWorkItemWidget < Gitlab::Database::Migration[2.1]
+ class WorkItemType < MigrationRecord
+ self.table_name = 'work_item_types'
+ end
+
+ class WidgetDefinition < MigrationRecord
+ self.table_name = 'work_item_widget_definitions'
+ end
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+ disable_ddl_transaction!
+
+ WIDGET_NAME = 'Current user todos'
+ WIDGET_ENUM_VALUE = 15
+ WORK_ITEM_TYPES = [
+ 'Issue',
+ 'Incident',
+ 'Test Case',
+ 'Requirement',
+ 'Task',
+ 'Objective',
+ 'Key Result'
+ ].freeze
+
+ def up
+ widgets = []
+
+ WORK_ITEM_TYPES.each do |type_name|
+ type = WorkItemType.find_by_name_and_namespace_id(type_name, nil)
+
+ unless type
+ Gitlab::AppLogger.warn("type #{type_name} is missing, not adding widget")
+
+ next
+ end
+
+ widgets << {
+ work_item_type_id: type.id,
+ name: WIDGET_NAME,
+ widget_type: WIDGET_ENUM_VALUE
+ }
+ end
+
+ return if widgets.empty?
+
+ WidgetDefinition.upsert_all(
+ widgets,
+ unique_by: :index_work_item_widget_definitions_on_default_witype_and_name
+ )
+ end
+
+ def down
+ WidgetDefinition.where(name: WIDGET_NAME).delete_all
+ end
+end
diff --git a/db/migrate/20230321085011_add_column_to_users_statistisc.rb b/db/migrate/20230321085011_add_column_to_users_statistisc.rb
new file mode 100644
index 00000000000..8eef2ff5765
--- /dev/null
+++ b/db/migrate/20230321085011_add_column_to_users_statistisc.rb
@@ -0,0 +1,7 @@
+# frozen_string_literal: true
+
+class AddColumnToUsersStatistisc < Gitlab::Database::Migration[2.1]
+ def change
+ add_column :users_statistics, :with_highest_role_guest_with_custom_role, :integer, default: 0, null: false
+ end
+end
diff --git a/db/migrate/20230321113956_add_indexes_to_merge_request_compliance_violations.rb b/db/migrate/20230321113956_add_indexes_to_merge_request_compliance_violations.rb
new file mode 100644
index 00000000000..66a24dc73c4
--- /dev/null
+++ b/db/migrate/20230321113956_add_indexes_to_merge_request_compliance_violations.rb
@@ -0,0 +1,29 @@
+# frozen_string_literal: true
+
+class AddIndexesToMergeRequestComplianceViolations < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ INDEX_SEVERITY_LEVEL_DESC = 'i_compliance_violations_on_project_id_severity_and_id'
+ INDEX_REASON_ASC = 'i_compliance_violations_on_project_id_reason_and_id'
+ INDEX_TITLE_ASC = 'i_compliance_violations_on_project_id_title_and_id'
+ INDEX_MERGED_AT_ASC = 'i_compliance_violations_on_project_id_merged_at_and_id'
+
+ def up
+ add_concurrent_index :merge_requests_compliance_violations, [:target_project_id, :severity_level, :id],
+ order: { severity_level: :desc, id: :desc }, using: :btree, name: INDEX_SEVERITY_LEVEL_DESC
+ add_concurrent_index :merge_requests_compliance_violations, [:target_project_id, :reason, :id],
+ order: { reason: :asc, id: :asc }, using: :btree, name: INDEX_REASON_ASC
+ add_concurrent_index :merge_requests_compliance_violations, [:target_project_id, :title, :id],
+ order: { title: :asc, id: :asc }, using: :btree, name: INDEX_TITLE_ASC
+ add_concurrent_index :merge_requests_compliance_violations, [:target_project_id, :merged_at, :id],
+ order: { merged_at: :asc, id: :asc }, using: :btree, name: INDEX_MERGED_AT_ASC
+ end
+
+ def down
+ remove_concurrent_index_by_name :merge_requests_compliance_violations, INDEX_TITLE_ASC
+ remove_concurrent_index_by_name :merge_requests_compliance_violations, INDEX_TITLE_ASC
+ remove_concurrent_index_by_name :merge_requests_compliance_violations, INDEX_SEVERITY_LEVEL_DESC
+ remove_concurrent_index_by_name :merge_requests_compliance_violations, INDEX_REASON_ASC
+ remove_concurrent_index_by_name :merge_requests_compliance_violations, INDEX_MERGED_AT_ASC
+ end
+end
diff --git a/db/migrate/20230321153304_rename_ml_candidates_iid_to_eid.rb b/db/migrate/20230321153304_rename_ml_candidates_iid_to_eid.rb
new file mode 100644
index 00000000000..2e884e92aa7
--- /dev/null
+++ b/db/migrate/20230321153304_rename_ml_candidates_iid_to_eid.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class RenameMlCandidatesIidToEid < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ rename_column_concurrently :ml_candidates, :iid, :eid
+ end
+
+ def down
+ undo_rename_column_concurrently :ml_candidates, :iid, :eid
+ end
+end
diff --git a/db/migrate/20230321161218_add_project_access_token_limit_to_plan_limits.rb b/db/migrate/20230321161218_add_project_access_token_limit_to_plan_limits.rb
new file mode 100644
index 00000000000..5f9400b9498
--- /dev/null
+++ b/db/migrate/20230321161218_add_project_access_token_limit_to_plan_limits.rb
@@ -0,0 +1,7 @@
+# frozen_string_literal: true
+
+class AddProjectAccessTokenLimitToPlanLimits < Gitlab::Database::Migration[2.1]
+ def change
+ add_column(:plan_limits, :project_access_token_limit, :integer, default: 0, null: false)
+ end
+end
diff --git a/db/migrate/20230321161441_insert_project_access_token_limit.rb b/db/migrate/20230321161441_insert_project_access_token_limit.rb
new file mode 100644
index 00000000000..a449e6f8e7c
--- /dev/null
+++ b/db/migrate/20230321161441_insert_project_access_token_limit.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class InsertProjectAccessTokenLimit < Gitlab::Database::Migration[2.1]
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ create_or_update_plan_limit('project_access_token_limit', 'premium_trial', 1)
+ create_or_update_plan_limit('project_access_token_limit', 'ultimate_trial', 1)
+ end
+
+ def down
+ create_or_update_plan_limit('project_access_token_limit', 'premium_trial', 0)
+ create_or_update_plan_limit('project_access_token_limit', 'ultimate_trial', 0)
+ end
+end
diff --git a/db/migrate/20230321162810_add_project_id_to_ml_candidates.rb b/db/migrate/20230321162810_add_project_id_to_ml_candidates.rb
new file mode 100644
index 00000000000..a8121f197d9
--- /dev/null
+++ b/db/migrate/20230321162810_add_project_id_to_ml_candidates.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class AddProjectIdToMlCandidates < Gitlab::Database::Migration[2.1]
+ enable_lock_retries!
+
+ def change
+ add_column :ml_candidates, :project_id, :bigint, null: true
+ end
+end
diff --git a/db/migrate/20230321162902_add_index_on_project_id_on_ml_candidates.rb b/db/migrate/20230321162902_add_index_on_project_id_on_ml_candidates.rb
new file mode 100644
index 00000000000..e6c08468c0c
--- /dev/null
+++ b/db/migrate/20230321162902_add_index_on_project_id_on_ml_candidates.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class AddIndexOnProjectIdOnMlCandidates < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ INDEX_NAME = 'index_ml_candidates_on_project_id'
+
+ def up
+ add_concurrent_index :ml_candidates, :project_id, name: INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_index_by_name :ml_candidates, INDEX_NAME
+ end
+end
diff --git a/db/migrate/20230321163051_add_project_id_foreign_key_to_ml_candidates.rb b/db/migrate/20230321163051_add_project_id_foreign_key_to_ml_candidates.rb
new file mode 100644
index 00000000000..3e43a160306
--- /dev/null
+++ b/db/migrate/20230321163051_add_project_id_foreign_key_to_ml_candidates.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class AddProjectIdForeignKeyToMlCandidates < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_foreign_key :ml_candidates, :projects, column: :project_id, on_delete: :cascade
+ end
+
+ def down
+ with_lock_retries do
+ remove_foreign_key_if_exists :ml_candidates, column: :project_id
+ end
+ end
+end
diff --git a/db/migrate/20230321170734_add_internal_id_to_ml_candidates.rb b/db/migrate/20230321170734_add_internal_id_to_ml_candidates.rb
new file mode 100644
index 00000000000..f6ced91c0a8
--- /dev/null
+++ b/db/migrate/20230321170734_add_internal_id_to_ml_candidates.rb
@@ -0,0 +1,7 @@
+# frozen_string_literal: true
+
+class AddInternalIdToMlCandidates < Gitlab::Database::Migration[2.1]
+ def change
+ add_column :ml_candidates, :internal_id, :bigint, null: true
+ end
+end
diff --git a/db/migrate/20230321170803_add_index_on_project_id_on_internal_id_to_ml_candidates.rb b/db/migrate/20230321170803_add_index_on_project_id_on_internal_id_to_ml_candidates.rb
new file mode 100644
index 00000000000..4c295972106
--- /dev/null
+++ b/db/migrate/20230321170803_add_index_on_project_id_on_internal_id_to_ml_candidates.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class AddIndexOnProjectIdOnInternalIdToMlCandidates < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ INDEX_NAME = 'index_ml_candidates_on_project_id_on_internal_id'
+
+ def up
+ add_concurrent_index :ml_candidates, [:project_id, :internal_id], name: INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_index_by_name :ml_candidates, INDEX_NAME
+ end
+end
diff --git a/db/migrate/20230322145403_add_project_id_foreign_key_to_packages_npm_metadata_caches.rb b/db/migrate/20230322145403_add_project_id_foreign_key_to_packages_npm_metadata_caches.rb
new file mode 100644
index 00000000000..7c542279bd0
--- /dev/null
+++ b/db/migrate/20230322145403_add_project_id_foreign_key_to_packages_npm_metadata_caches.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class AddProjectIdForeignKeyToPackagesNpmMetadataCaches < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ SOURCE_TABLE = :packages_npm_metadata_caches
+ TARGET_TABLE = :projects
+ COLUMN = :project_id
+
+ def up
+ add_concurrent_foreign_key SOURCE_TABLE, TARGET_TABLE, column: COLUMN, on_delete: :nullify
+ end
+
+ def down
+ with_lock_retries do
+ remove_foreign_key SOURCE_TABLE, column: COLUMN
+ end
+ end
+end
diff --git a/db/migrate/20230322151605_rerun_remove_invalid_deploy_access_level.rb b/db/migrate/20230322151605_rerun_remove_invalid_deploy_access_level.rb
new file mode 100644
index 00000000000..e140ecc58c7
--- /dev/null
+++ b/db/migrate/20230322151605_rerun_remove_invalid_deploy_access_level.rb
@@ -0,0 +1,26 @@
+# frozen_string_literal: true
+
+class RerunRemoveInvalidDeployAccessLevel < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ # clean up any rows with invalid access_level entries
+ def up
+ update_column_in_batches(:protected_environment_deploy_access_levels, :access_level, nil) do |table, query|
+ query.where(
+ table.grouping(table[:user_id].not_eq(nil).or(table[:group_id].not_eq(nil)))
+ .and(table[:access_level].not_eq(nil)))
+ end
+
+ update_column_in_batches(:protected_environment_deploy_access_levels, :group_id, nil) do |table, query|
+ query.where(table[:user_id].not_eq(nil).and(table[:group_id].not_eq(nil)))
+ end
+ end
+
+ def down
+ # no-op
+
+ # we are setting access_level to NULL if group_id or user_id are present
+ end
+end
diff --git a/db/migrate/20230322162512_add_valid_deploy_access_level_constraint.rb b/db/migrate/20230322162512_add_valid_deploy_access_level_constraint.rb
new file mode 100644
index 00000000000..4cf82375563
--- /dev/null
+++ b/db/migrate/20230322162512_add_valid_deploy_access_level_constraint.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class AddValidDeployAccessLevelConstraint < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ CONSTRAINT_NAME = 'check_deploy_access_levels_user_group_access_level_any_not_null'
+ CONSTRAINT = '(num_nonnulls(user_id, group_id, access_level) = 1)'
+
+ def up
+ add_check_constraint :protected_environment_deploy_access_levels, CONSTRAINT, CONSTRAINT_NAME
+ end
+
+ def down
+ remove_check_constraint :protected_environment_deploy_access_levels, CONSTRAINT_NAME
+ end
+end
diff --git a/db/migrate/20230323021618_add_silent_mode_enabled_to_application_settings.rb b/db/migrate/20230323021618_add_silent_mode_enabled_to_application_settings.rb
new file mode 100644
index 00000000000..e3592e0bd13
--- /dev/null
+++ b/db/migrate/20230323021618_add_silent_mode_enabled_to_application_settings.rb
@@ -0,0 +1,7 @@
+# frozen_string_literal: true
+
+class AddSilentModeEnabledToApplicationSettings < Gitlab::Database::Migration[2.1]
+ def change
+ add_column :application_settings, :silent_mode_enabled, :boolean, default: false, null: false, if_not_exists: true
+ end
+end
diff --git a/db/migrate/20230323101138_add_award_emoji_work_item_widget.rb b/db/migrate/20230323101138_add_award_emoji_work_item_widget.rb
new file mode 100644
index 00000000000..6a6b50c81a5
--- /dev/null
+++ b/db/migrate/20230323101138_add_award_emoji_work_item_widget.rb
@@ -0,0 +1,57 @@
+# frozen_string_literal: true
+
+class AddAwardEmojiWorkItemWidget < Gitlab::Database::Migration[2.1]
+ class WorkItemType < MigrationRecord
+ self.table_name = 'work_item_types'
+ end
+
+ class WidgetDefinition < MigrationRecord
+ self.table_name = 'work_item_widget_definitions'
+ end
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+ disable_ddl_transaction!
+
+ WIDGET_NAME = 'Award emoji'
+ WIDGET_ENUM_VALUE = 16
+ WORK_ITEM_TYPES = [
+ 'Issue',
+ 'Incident',
+ 'Test Case',
+ 'Requirement',
+ 'Task',
+ 'Objective',
+ 'Key Result'
+ ].freeze
+
+ def up
+ widgets = []
+
+ WORK_ITEM_TYPES.each do |type_name|
+ type = WorkItemType.find_by_name_and_namespace_id(type_name, nil)
+
+ unless type
+ Gitlab::AppLogger.warn("type #{type_name} is missing, not adding widget")
+
+ next
+ end
+
+ widgets << {
+ work_item_type_id: type.id,
+ name: WIDGET_NAME,
+ widget_type: WIDGET_ENUM_VALUE
+ }
+ end
+
+ return if widgets.empty?
+
+ WidgetDefinition.upsert_all(
+ widgets,
+ unique_by: :index_work_item_widget_definitions_on_default_witype_and_name
+ )
+ end
+
+ def down
+ WidgetDefinition.where(name: WIDGET_NAME).delete_all
+ end
+end
diff --git a/db/migrate/20230323120601_create_dora_performance_scores.rb b/db/migrate/20230323120601_create_dora_performance_scores.rb
new file mode 100644
index 00000000000..2c4304fedb6
--- /dev/null
+++ b/db/migrate/20230323120601_create_dora_performance_scores.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class CreateDoraPerformanceScores < Gitlab::Database::Migration[2.1]
+ def change
+ create_table :dora_performance_scores do |t|
+ t.references :project, null: false, foreign_key: { on_delete: :cascade }, index: false
+ t.date :date, null: false
+ t.integer :deployment_frequency, limit: 2
+ t.integer :lead_time_for_changes, limit: 2
+ t.integer :time_to_restore_service, limit: 2
+ t.integer :change_failure_rate, limit: 2
+
+ t.index [:project_id, :date], unique: true
+ end
+ end
+end
diff --git a/db/migrate/20230323140745_add_root_directory_to_pages_deployment.rb b/db/migrate/20230323140745_add_root_directory_to_pages_deployment.rb
new file mode 100644
index 00000000000..781ba3e89d4
--- /dev/null
+++ b/db/migrate/20230323140745_add_root_directory_to_pages_deployment.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+class AddRootDirectoryToPagesDeployment < Gitlab::Database::Migration[2.1]
+ # rubocop:disable Migration/AddLimitToTextColumns
+ # limit is added in 20230323140746_add_text_limit_to_pages_deployment_root_directory
+ def change
+ add_column :pages_deployments, :root_directory, :text, default: "public"
+ end
+ # rubocop:enable Migration/AddLimitToTextColumns
+end
diff --git a/db/migrate/20230323140746_add_text_limit_to_pages_deployment_root_directory.rb b/db/migrate/20230323140746_add_text_limit_to_pages_deployment_root_directory.rb
new file mode 100644
index 00000000000..12209422fbb
--- /dev/null
+++ b/db/migrate/20230323140746_add_text_limit_to_pages_deployment_root_directory.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class AddTextLimitToPagesDeploymentRootDirectory < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ add_text_limit :pages_deployments, :root_directory, 255
+ end
+
+ def down
+ remove_text_limit :pages_deployments, :root_directory
+ end
+end
diff --git a/db/migrate/20230323153042_track_push_rules_deletions.rb b/db/migrate/20230323153042_track_push_rules_deletions.rb
new file mode 100644
index 00000000000..2aa7fad8de1
--- /dev/null
+++ b/db/migrate/20230323153042_track_push_rules_deletions.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class TrackPushRulesDeletions < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::LooseForeignKeyHelpers
+
+ enable_lock_retries!
+
+ def up
+ track_record_deletions(:push_rules)
+ end
+
+ def down
+ untrack_record_deletions(:push_rules)
+ end
+end
diff --git a/db/migrate/20230323153328_track_tags_deletions.rb b/db/migrate/20230323153328_track_tags_deletions.rb
new file mode 100644
index 00000000000..085d14a56fa
--- /dev/null
+++ b/db/migrate/20230323153328_track_tags_deletions.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class TrackTagsDeletions < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::LooseForeignKeyHelpers
+
+ enable_lock_retries!
+
+ def up
+ track_record_deletions(:tags)
+ end
+
+ def down
+ untrack_record_deletions(:tags)
+ end
+end
diff --git a/db/migrate/20230323191750_add_shard_settings_to_search_indices.rb b/db/migrate/20230323191750_add_shard_settings_to_search_indices.rb
new file mode 100644
index 00000000000..b032e3b8a61
--- /dev/null
+++ b/db/migrate/20230323191750_add_shard_settings_to_search_indices.rb
@@ -0,0 +1,8 @@
+# frozen_string_literal: true
+
+class AddShardSettingsToSearchIndices < Gitlab::Database::Migration[2.1]
+ def change
+ add_column :search_indices, :number_of_shards, :integer, default: 2, null: false
+ add_column :search_indices, :number_of_replicas, :integer, default: 1, null: false
+ end
+end
diff --git a/db/migrate/20230327074932_add_text_limit_to_abuse_reports_screenshot.rb b/db/migrate/20230327074932_add_text_limit_to_abuse_reports_screenshot.rb
new file mode 100644
index 00000000000..3bb9722188f
--- /dev/null
+++ b/db/migrate/20230327074932_add_text_limit_to_abuse_reports_screenshot.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class AddTextLimitToAbuseReportsScreenshot < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ add_text_limit :abuse_reports, :screenshot, 255
+ end
+
+ def down
+ remove_text_limit :abuse_reports, :screenshot
+ end
+end
diff --git a/db/migrate/20230327123333_backfill_product_analytics_data_collector_host.rb b/db/migrate/20230327123333_backfill_product_analytics_data_collector_host.rb
new file mode 100644
index 00000000000..04041d78c3e
--- /dev/null
+++ b/db/migrate/20230327123333_backfill_product_analytics_data_collector_host.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+class BackfillProductAnalyticsDataCollectorHost < Gitlab::Database::Migration[2.1]
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ # fills product_analytics_data_collector_host by replacing jitsu_host subdomain with collector
+ regex = "'://(.+?\\.)'"
+ replace_with = "'://collector.'"
+ execute <<~SQL
+ UPDATE application_settings
+ SET product_analytics_data_collector_host = regexp_replace(jitsu_host, #{regex}, #{replace_with}, 'g')
+ WHERE jitsu_host IS NOT NULL AND product_analytics_data_collector_host IS NULL
+ SQL
+ end
+
+ def down
+ # noop
+ end
+end
diff --git a/db/migrate/20230328020316_delete_unused_index_on_merge_requests_on_state_id_and_merge_status.rb b/db/migrate/20230328020316_delete_unused_index_on_merge_requests_on_state_id_and_merge_status.rb
new file mode 100644
index 00000000000..eac1d4e30c1
--- /dev/null
+++ b/db/migrate/20230328020316_delete_unused_index_on_merge_requests_on_state_id_and_merge_status.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class DeleteUnusedIndexOnMergeRequestsOnStateIdAndMergeStatus < Gitlab::Database::Migration[2.1]
+ # TODO: Index to be destroyed synchronously in https://gitlab.com/gitlab-org/gitlab/-/issues/402491
+
+ def up
+ prepare_async_index_removal :merge_requests, [:state_id, :merge_status],
+ where: "((state_id = 1) AND ((merge_status)::text = 'can_be_merged'::text))",
+ name: 'idx_merge_requests_on_state_id_and_merge_status'
+ end
+
+ def down
+ unprepare_async_index :merge_requests, [:state_id, :merge_status],
+ where: "((state_id = 1) AND ((merge_status)::text = 'can_be_merged'::text))",
+ name: 'idx_merge_requests_on_state_id_and_merge_status'
+ end
+end
diff --git a/db/migrate/20230328023535_initialize_conversion_of_award_emoji_awardable_id_to_bigint.rb b/db/migrate/20230328023535_initialize_conversion_of_award_emoji_awardable_id_to_bigint.rb
new file mode 100644
index 00000000000..00bccb5cde2
--- /dev/null
+++ b/db/migrate/20230328023535_initialize_conversion_of_award_emoji_awardable_id_to_bigint.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class InitializeConversionOfAwardEmojiAwardableIdToBigint < Gitlab::Database::Migration[2.1]
+ TABLE = :award_emoji
+ COLUMNS = %i[awardable_id]
+
+ enable_lock_retries!
+
+ def up
+ initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS)
+ end
+
+ def down
+ revert_initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS)
+ end
+end
diff --git a/db/migrate/20230328031720_initialize_conversion_of_events_target_id_to_bigint.rb b/db/migrate/20230328031720_initialize_conversion_of_events_target_id_to_bigint.rb
new file mode 100644
index 00000000000..b30b681f42d
--- /dev/null
+++ b/db/migrate/20230328031720_initialize_conversion_of_events_target_id_to_bigint.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class InitializeConversionOfEventsTargetIdToBigint < Gitlab::Database::Migration[2.1]
+ TABLE = :events
+ COLUMNS = %i[target_id]
+
+ enable_lock_retries!
+
+ def up
+ initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS)
+ end
+
+ def down
+ revert_initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS)
+ end
+end
diff --git a/db/migrate/20230329032129_add_lock_version_to_terraform_state.rb b/db/migrate/20230329032129_add_lock_version_to_terraform_state.rb
new file mode 100644
index 00000000000..78f0122c609
--- /dev/null
+++ b/db/migrate/20230329032129_add_lock_version_to_terraform_state.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class AddLockVersionToTerraformState < Gitlab::Database::Migration[2.1]
+ enable_lock_retries!
+
+ def change
+ add_column :terraform_states, :activerecord_lock_version, :integer, null: false, default: 0
+ end
+end
diff --git a/db/migrate/20230329085754_add_foreign_key_to_resource_link_events_on_user.rb b/db/migrate/20230329085754_add_foreign_key_to_resource_link_events_on_user.rb
new file mode 100644
index 00000000000..6a167f232ae
--- /dev/null
+++ b/db/migrate/20230329085754_add_foreign_key_to_resource_link_events_on_user.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class AddForeignKeyToResourceLinkEventsOnUser < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_foreign_key :resource_link_events, :users, column: :user_id, on_delete: :nullify, validate: true
+ end
+
+ def down
+ with_lock_retries do
+ remove_foreign_key_if_exists :resource_link_events, column: :user_id
+ end
+ end
+end
diff --git a/db/migrate/20230329152410_add_achievements_enabled_to_user_preferences.rb b/db/migrate/20230329152410_add_achievements_enabled_to_user_preferences.rb
new file mode 100644
index 00000000000..bd11a4a6128
--- /dev/null
+++ b/db/migrate/20230329152410_add_achievements_enabled_to_user_preferences.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class AddAchievementsEnabledToUserPreferences < Gitlab::Database::Migration[2.1]
+ enable_lock_retries!
+
+ def change
+ add_column :user_preferences, :achievements_enabled, :boolean, default: true, null: false
+ end
+end
diff --git a/db/migrate/20230329194244_add_index_packages_debian_file_metadata_when_unknown.rb b/db/migrate/20230329194244_add_index_packages_debian_file_metadata_when_unknown.rb
new file mode 100644
index 00000000000..9b87f1319f3
--- /dev/null
+++ b/db/migrate/20230329194244_add_index_packages_debian_file_metadata_when_unknown.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class AddIndexPackagesDebianFileMetadataWhenUnknown < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ INDEX_NAME = 'i_pkgs_deb_file_meta_on_updated_at_package_file_id_when_unknown'
+ UNKNOWN = 1
+
+ def up
+ add_concurrent_index :packages_debian_file_metadata, [:updated_at, :package_file_id],
+ where: "file_type = #{UNKNOWN}", name: INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_index_by_name :packages_debian_file_metadata, name: INDEX_NAME
+ end
+end
diff --git a/db/migrate/20230330101438_create_fk_ml_candidate_params_on_candidate_id.rb b/db/migrate/20230330101438_create_fk_ml_candidate_params_on_candidate_id.rb
new file mode 100644
index 00000000000..8273ffc27e2
--- /dev/null
+++ b/db/migrate/20230330101438_create_fk_ml_candidate_params_on_candidate_id.rb
@@ -0,0 +1,29 @@
+# frozen_string_literal: true
+
+class CreateFkMlCandidateParamsOnCandidateId < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ NEW_CONSTRAINT_NAME = 'fk_ml_candidate_params_on_candidate_id'
+
+ def up
+ add_concurrent_foreign_key(
+ :ml_candidate_params,
+ :ml_candidates,
+ column: :candidate_id,
+ on_delete: :cascade,
+ validate: false,
+ name: NEW_CONSTRAINT_NAME
+ )
+ end
+
+ def down
+ with_lock_retries do
+ remove_foreign_key_if_exists(
+ :ml_candidate_params,
+ column: :candidate_id,
+ on_delete: :cascade,
+ name: NEW_CONSTRAINT_NAME
+ )
+ end
+ end
+end
diff --git a/db/migrate/20230330101439_validate_fk_ml_candidate_params_on_candidate_id.rb b/db/migrate/20230330101439_validate_fk_ml_candidate_params_on_candidate_id.rb
new file mode 100644
index 00000000000..912380ac3b7
--- /dev/null
+++ b/db/migrate/20230330101439_validate_fk_ml_candidate_params_on_candidate_id.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class ValidateFkMlCandidateParamsOnCandidateId < Gitlab::Database::Migration[2.1]
+ NEW_CONSTRAINT_NAME = 'fk_ml_candidate_params_on_candidate_id'
+
+ def up
+ validate_foreign_key(:ml_candidate_params, :candidate_id, name: NEW_CONSTRAINT_NAME)
+ end
+
+ def down
+ # no-op
+ end
+end
diff --git a/db/migrate/20230330101440_remove_old_fk_ml_candidate_params_on_candidate_id.rb b/db/migrate/20230330101440_remove_old_fk_ml_candidate_params_on_candidate_id.rb
new file mode 100644
index 00000000000..8e143cd3ed2
--- /dev/null
+++ b/db/migrate/20230330101440_remove_old_fk_ml_candidate_params_on_candidate_id.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class RemoveOldFkMlCandidateParamsOnCandidateId < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ OLD_CONSTRAINT_NAME = 'fk_rails_d4a51d1185'
+
+ def up
+ remove_foreign_key_if_exists(:ml_candidate_params, column: :candidate_id, name: OLD_CONSTRAINT_NAME)
+ end
+
+ def down
+ add_concurrent_foreign_key(
+ :ml_candidate_params,
+ :ml_candidates,
+ column: :candidate_id,
+ validate: false,
+ name: OLD_CONSTRAINT_NAME
+ )
+ end
+end
diff --git a/db/migrate/20230330101441_create_fk_ml_candidate_metrics_on_candidate_id.rb b/db/migrate/20230330101441_create_fk_ml_candidate_metrics_on_candidate_id.rb
new file mode 100644
index 00000000000..0ef0075127d
--- /dev/null
+++ b/db/migrate/20230330101441_create_fk_ml_candidate_metrics_on_candidate_id.rb
@@ -0,0 +1,29 @@
+# frozen_string_literal: true
+
+class CreateFkMlCandidateMetricsOnCandidateId < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ NEW_CONSTRAINT_NAME = 'fk_ml_candidate_metrics_on_candidate_id'
+
+ def up
+ add_concurrent_foreign_key(
+ :ml_candidate_metrics,
+ :ml_candidates,
+ column: :candidate_id,
+ on_delete: :cascade,
+ validate: false,
+ name: NEW_CONSTRAINT_NAME
+ )
+ end
+
+ def down
+ with_lock_retries do
+ remove_foreign_key_if_exists(
+ :ml_candidate_metrics,
+ column: :candidate_id,
+ on_delete: :cascade,
+ name: NEW_CONSTRAINT_NAME
+ )
+ end
+ end
+end
diff --git a/db/migrate/20230330101442_validate_fk_ml_candidate_metrics_on_candidate_id.rb b/db/migrate/20230330101442_validate_fk_ml_candidate_metrics_on_candidate_id.rb
new file mode 100644
index 00000000000..5180c6582cf
--- /dev/null
+++ b/db/migrate/20230330101442_validate_fk_ml_candidate_metrics_on_candidate_id.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class ValidateFkMlCandidateMetricsOnCandidateId < Gitlab::Database::Migration[2.1]
+ NEW_CONSTRAINT_NAME = 'fk_ml_candidate_metrics_on_candidate_id'
+
+ def up
+ validate_foreign_key(:ml_candidate_metrics, :candidate_id, name: NEW_CONSTRAINT_NAME)
+ end
+
+ def down
+ # no-op
+ end
+end
diff --git a/db/migrate/20230330101443_remove_old_fk_ml_candidate_metrics_on_candidate_id.rb b/db/migrate/20230330101443_remove_old_fk_ml_candidate_metrics_on_candidate_id.rb
new file mode 100644
index 00000000000..2e9153cb9d9
--- /dev/null
+++ b/db/migrate/20230330101443_remove_old_fk_ml_candidate_metrics_on_candidate_id.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class RemoveOldFkMlCandidateMetricsOnCandidateId < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ OLD_CONSTRAINT_NAME = 'fk_rails_efb613a25a'
+
+ def up
+ remove_foreign_key_if_exists(:ml_candidate_metrics, column: :candidate_id, name: OLD_CONSTRAINT_NAME)
+ end
+
+ def down
+ add_concurrent_foreign_key(
+ :ml_candidate_metrics,
+ :ml_candidates,
+ column: :candidate_id,
+ validate: false,
+ name: OLD_CONSTRAINT_NAME
+ )
+ end
+end
diff --git a/db/migrate/20230330215636_remove_unused_project_jira_indexes.rb b/db/migrate/20230330215636_remove_unused_project_jira_indexes.rb
new file mode 100644
index 00000000000..ce10b70f81c
--- /dev/null
+++ b/db/migrate/20230330215636_remove_unused_project_jira_indexes.rb
@@ -0,0 +1,34 @@
+# frozen_string_literal: true
+
+class RemoveUnusedProjectJiraIndexes < Gitlab::Database::Migration[2.1]
+ TITLE_INDEX = {
+ name: 'index_merge_requests_on_target_project_id_and_iid_jira_title',
+ where: "((title)::text ~ '[A-Z][A-Z_0-9]+-\d+'::text)"
+ }.freeze
+
+ DESCRIPTION_INDEX = {
+ name: 'index_merge_requests_on_target_project_id_iid_jira_description',
+ where: "(description ~ '[A-Z][A-Z_0-9]+-\d+'::text)"
+ }.freeze
+
+ # TODO: Indexes to be destroyed synchronously in https://gitlab.com/gitlab-org/gitlab/-/issues/403327
+ def up
+ prepare_async_index_removal :merge_requests, [:target_project_id, :iid],
+ where: TITLE_INDEX[:where],
+ name: TITLE_INDEX[:name]
+
+ prepare_async_index_removal :merge_requests, [:target_project_id, :iid],
+ where: DESCRIPTION_INDEX[:where],
+ name: DESCRIPTION_INDEX[:name]
+ end
+
+ def down
+ unprepare_async_index :merge_requests, [:target_project_id, :iid],
+ where: TITLE_INDEX[:where],
+ name: TITLE_INDEX[:name]
+
+ unprepare_async_index :merge_requests, [:target_project_id, :iid],
+ where: DESCRIPTION_INDEX[:where],
+ name: DESCRIPTION_INDEX[:name]
+ end
+end
diff --git a/db/migrate/20230331142006_add_open_ai_api_key_application_setting.rb b/db/migrate/20230331142006_add_open_ai_api_key_application_setting.rb
new file mode 100644
index 00000000000..735cb414c99
--- /dev/null
+++ b/db/migrate/20230331142006_add_open_ai_api_key_application_setting.rb
@@ -0,0 +1,8 @@
+# frozen_string_literal: true
+
+class AddOpenAiApiKeyApplicationSetting < Gitlab::Database::Migration[2.1]
+ def change
+ add_column :application_settings, :encrypted_openai_api_key, :binary
+ add_column :application_settings, :encrypted_openai_api_key_iv, :binary
+ end
+end
diff --git a/db/migrate/20230403023440_add_database_max_running_batched_background_migrations_to_application_settings.rb b/db/migrate/20230403023440_add_database_max_running_batched_background_migrations_to_application_settings.rb
new file mode 100644
index 00000000000..136855403f9
--- /dev/null
+++ b/db/migrate/20230403023440_add_database_max_running_batched_background_migrations_to_application_settings.rb
@@ -0,0 +1,8 @@
+# frozen_string_literal: true
+
+class AddDatabaseMaxRunningBatchedBackgroundMigrationsToApplicationSettings < Gitlab::Database::Migration[2.1]
+ def change
+ add_column :application_settings, :database_max_running_batched_background_migrations,
+ :integer, null: false, default: 2
+ end
+end
diff --git a/db/migrate/20230403023441_set_max_running_batched_background_migrations_for_gitlab_com.rb b/db/migrate/20230403023441_set_max_running_batched_background_migrations_for_gitlab_com.rb
new file mode 100644
index 00000000000..6e8d423e679
--- /dev/null
+++ b/db/migrate/20230403023441_set_max_running_batched_background_migrations_for_gitlab_com.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class SetMaxRunningBatchedBackgroundMigrationsForGitlabCom < Gitlab::Database::Migration[2.1]
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ return unless Gitlab.com? && !Gitlab.jh?
+
+ execute 'UPDATE application_settings SET database_max_running_batched_background_migrations = 4'
+ end
+
+ def down
+ return unless Gitlab.com? && !Gitlab.jh?
+
+ execute 'UPDATE application_settings SET database_max_running_batched_background_migrations = 2'
+ end
+end
diff --git a/db/migrate/20230403113620_add_pinned_nav_items_to_user_preference.rb b/db/migrate/20230403113620_add_pinned_nav_items_to_user_preference.rb
new file mode 100644
index 00000000000..8f7509db318
--- /dev/null
+++ b/db/migrate/20230403113620_add_pinned_nav_items_to_user_preference.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class AddPinnedNavItemsToUserPreference < Gitlab::Database::Migration[2.1]
+ enable_lock_retries!
+
+ def change
+ add_column :user_preferences, :pinned_nav_items, :jsonb, null: false, default: {}
+ end
+end
diff --git a/db/migrate/20230403145705_add_purl_sync_to_settings.rb b/db/migrate/20230403145705_add_purl_sync_to_settings.rb
new file mode 100644
index 00000000000..3bc9ce07235
--- /dev/null
+++ b/db/migrate/20230403145705_add_purl_sync_to_settings.rb
@@ -0,0 +1,7 @@
+# frozen_string_literal: true
+
+class AddPurlSyncToSettings < Gitlab::Database::Migration[2.1]
+ def change
+ add_column :application_settings, :package_metadata_purl_types, :smallint, array: true, default: []
+ end
+end
diff --git a/db/migrate/20230403164454_add_fork_storage_size_columns_to_root_storage_statistics.rb b/db/migrate/20230403164454_add_fork_storage_size_columns_to_root_storage_statistics.rb
new file mode 100644
index 00000000000..3428fba669f
--- /dev/null
+++ b/db/migrate/20230403164454_add_fork_storage_size_columns_to_root_storage_statistics.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+class AddForkStorageSizeColumnsToRootStorageStatistics < Gitlab::Database::Migration[2.1]
+ enable_lock_retries!
+
+ def change
+ add_column :namespace_root_storage_statistics, :public_forks_storage_size, :bigint, default: 0, null: false
+ add_column :namespace_root_storage_statistics, :internal_forks_storage_size, :bigint, default: 0, null: false
+ add_column :namespace_root_storage_statistics, :private_forks_storage_size, :bigint, default: 0, null: false
+ end
+end
diff --git a/db/migrate/20230405102815_add_unique_namespace_index_to_storage_limit_exclusions.rb b/db/migrate/20230405102815_add_unique_namespace_index_to_storage_limit_exclusions.rb
new file mode 100644
index 00000000000..d732fb35ce9
--- /dev/null
+++ b/db/migrate/20230405102815_add_unique_namespace_index_to_storage_limit_exclusions.rb
@@ -0,0 +1,25 @@
+# frozen_string_literal: true
+
+class AddUniqueNamespaceIndexToStorageLimitExclusions < Gitlab::Database::Migration[2.1]
+ TABLE_NAME = 'namespaces_storage_limit_exclusions'
+ OLD_INDEX_NAME = 'index_namespaces_storage_limit_exclusions_on_namespace_id'
+ NEW_INDEX_NAME = 'unique_idx_namespaces_storage_limit_exclusions_on_namespace_id'
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index TABLE_NAME, :namespace_id,
+ unique: true,
+ name: NEW_INDEX_NAME
+
+ remove_concurrent_index_by_name TABLE_NAME, OLD_INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index TABLE_NAME, :namespace_id,
+ unique: false,
+ name: OLD_INDEX_NAME
+
+ remove_concurrent_index_by_name TABLE_NAME, NEW_INDEX_NAME
+ end
+end
diff --git a/db/migrate/20230406040908_add_system_note_metadata_id__to_resource_link_events.rb b/db/migrate/20230406040908_add_system_note_metadata_id__to_resource_link_events.rb
new file mode 100644
index 00000000000..042e588a5f5
--- /dev/null
+++ b/db/migrate/20230406040908_add_system_note_metadata_id__to_resource_link_events.rb
@@ -0,0 +1,7 @@
+# frozen_string_literal: true
+
+class AddSystemNoteMetadataIdToResourceLinkEvents < Gitlab::Database::Migration[2.1]
+ def change
+ add_column :resource_link_events, :system_note_metadata_id, :bigint
+ end
+end
diff --git a/db/migrate/20230406042906_add_unique_index_to_resource_link_events_on_system_note_metadata_id.rb b/db/migrate/20230406042906_add_unique_index_to_resource_link_events_on_system_note_metadata_id.rb
new file mode 100644
index 00000000000..97d2e89c80b
--- /dev/null
+++ b/db/migrate/20230406042906_add_unique_index_to_resource_link_events_on_system_note_metadata_id.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class AddUniqueIndexToResourceLinkEventsOnSystemNoteMetadataId < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ INDEX_NAME = 'unique_index_on_system_note_metadata_id'
+
+ def up
+ add_concurrent_index :resource_link_events, :system_note_metadata_id, unique: true, name: INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_index_by_name :resource_link_events, name: INDEX_NAME
+ end
+end
diff --git a/db/migrate/20230406043900_add_system_note_metadata_foreign_key_to_resource_link_events.rb b/db/migrate/20230406043900_add_system_note_metadata_foreign_key_to_resource_link_events.rb
new file mode 100644
index 00000000000..431e7ac0e7e
--- /dev/null
+++ b/db/migrate/20230406043900_add_system_note_metadata_foreign_key_to_resource_link_events.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class AddSystemNoteMetadataForeignKeyToResourceLinkEvents < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_foreign_key :resource_link_events, :system_note_metadata,
+ column: :system_note_metadata_id, on_delete: :cascade, validate: false
+ end
+
+ def down
+ with_lock_retries do
+ remove_foreign_key_if_exists :resource_link_events, column: :system_note_metadata_id
+ end
+ end
+end
diff --git a/db/migrate/20230406060452_create_instance_external_audit_event_destinations.rb b/db/migrate/20230406060452_create_instance_external_audit_event_destinations.rb
new file mode 100644
index 00000000000..4347d13ceb4
--- /dev/null
+++ b/db/migrate/20230406060452_create_instance_external_audit_event_destinations.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+class CreateInstanceExternalAuditEventDestinations < Gitlab::Database::Migration[2.1]
+ enable_lock_retries!
+
+ def change
+ create_table :audit_events_instance_external_audit_event_destinations do |t|
+ t.timestamps_with_timezone null: false
+ t.text :destination_url, null: false, limit: 255 # rubocop:disable Migration/AddLimitToTextColumns
+ t.binary :encrypted_verification_token, null: false
+ t.binary :encrypted_verification_token_iv, null: false
+ end
+ end
+end
diff --git a/db/migrate/20230406073847_validate_foreign_key_for_resource_link_events_on_system_note_metadata_id.rb b/db/migrate/20230406073847_validate_foreign_key_for_resource_link_events_on_system_note_metadata_id.rb
new file mode 100644
index 00000000000..f06657ccabc
--- /dev/null
+++ b/db/migrate/20230406073847_validate_foreign_key_for_resource_link_events_on_system_note_metadata_id.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+class ValidateForeignKeyForResourceLinkEventsOnSystemNoteMetadataId < Gitlab::Database::Migration[2.1]
+ def up
+ validate_foreign_key :resource_link_events, :system_note_metadata_id
+ end
+
+ def down
+ # No-op
+ end
+end
diff --git a/db/migrate/20230406095544_add_pa_configurator_base_to_app_settings.rb b/db/migrate/20230406095544_add_pa_configurator_base_to_app_settings.rb
new file mode 100644
index 00000000000..b6b33cdf17b
--- /dev/null
+++ b/db/migrate/20230406095544_add_pa_configurator_base_to_app_settings.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class AddPaConfiguratorBaseToAppSettings < Gitlab::Database::Migration[2.1]
+ def up
+ add_column :application_settings, :encrypted_product_analytics_configurator_connection_string, :binary
+ add_column :application_settings, :encrypted_product_analytics_configurator_connection_string_iv, :binary
+ end
+
+ def down
+ remove_column :application_settings, :encrypted_product_analytics_configurator_connection_string
+ remove_column :application_settings, :encrypted_product_analytics_configurator_connection_string_iv
+ end
+end
diff --git a/db/migrate/20230406134436_add_identity_toggle_to_user_preferences.rb b/db/migrate/20230406134436_add_identity_toggle_to_user_preferences.rb
new file mode 100644
index 00000000000..0b7fcceb3ee
--- /dev/null
+++ b/db/migrate/20230406134436_add_identity_toggle_to_user_preferences.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class AddIdentityToggleToUserPreferences < Gitlab::Database::Migration[2.1]
+ enable_lock_retries!
+
+ def change
+ add_column :user_preferences, :pass_user_identities_to_ci_jwt, :boolean, default: false, null: false
+ end
+end
diff --git a/db/migrate/20230406150254_create_agent_user_access_project_authorizations_table.rb b/db/migrate/20230406150254_create_agent_user_access_project_authorizations_table.rb
new file mode 100644
index 00000000000..1adc3bb001a
--- /dev/null
+++ b/db/migrate/20230406150254_create_agent_user_access_project_authorizations_table.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class CreateAgentUserAccessProjectAuthorizationsTable < Gitlab::Database::Migration[2.1]
+ INDEX_NAME_1 = 'index_agent_user_access_on_project_id'
+ INDEX_NAME_2 = 'index_agent_user_access_on_agent_id_and_project_id'
+
+ def change
+ create_table :agent_user_access_project_authorizations do |t|
+ t.bigint :project_id, null: false
+ t.bigint :agent_id, null: false
+ t.jsonb :config, null: false
+
+ t.index [:project_id], name: INDEX_NAME_1
+ t.index [:agent_id, :project_id], unique: true, name: INDEX_NAME_2
+ end
+ end
+end
diff --git a/db/migrate/20230406150354_create_agent_user_access_group_authorizations_table.rb b/db/migrate/20230406150354_create_agent_user_access_group_authorizations_table.rb
new file mode 100644
index 00000000000..1d4df7d7330
--- /dev/null
+++ b/db/migrate/20230406150354_create_agent_user_access_group_authorizations_table.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class CreateAgentUserAccessGroupAuthorizationsTable < Gitlab::Database::Migration[2.1]
+ INDEX_NAME_1 = 'index_agent_user_access_on_group_id'
+ INDEX_NAME_2 = 'index_agent_user_access_on_agent_id_and_group_id'
+
+ def change
+ create_table :agent_user_access_group_authorizations do |t|
+ t.bigint :group_id, null: false
+ t.bigint :agent_id, null: false
+ t.jsonb :config, null: false
+
+ t.index [:group_id], name: INDEX_NAME_1
+ t.index [:agent_id, :group_id], unique: true, name: INDEX_NAME_2
+ end
+ end
+end
diff --git a/db/migrate/20230406150454_add_fks_to_agent_user_access_authorizations.rb b/db/migrate/20230406150454_add_fks_to_agent_user_access_authorizations.rb
new file mode 100644
index 00000000000..62f00620108
--- /dev/null
+++ b/db/migrate/20230406150454_add_fks_to_agent_user_access_authorizations.rb
@@ -0,0 +1,34 @@
+# frozen_string_literal: true
+
+class AddFksToAgentUserAccessAuthorizations < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_foreign_key :agent_user_access_project_authorizations, :projects,
+ column: :project_id, on_delete: :cascade
+ add_concurrent_foreign_key :agent_user_access_project_authorizations, :cluster_agents,
+ column: :agent_id, on_delete: :cascade
+ add_concurrent_foreign_key :agent_user_access_group_authorizations, :namespaces,
+ column: :group_id, on_delete: :cascade
+ add_concurrent_foreign_key :agent_user_access_group_authorizations, :cluster_agents,
+ column: :agent_id, on_delete: :cascade
+ end
+
+ def down
+ with_lock_retries do
+ remove_foreign_key_if_exists :agent_user_access_project_authorizations, column: :project_id
+ end
+
+ with_lock_retries do
+ remove_foreign_key_if_exists :agent_user_access_project_authorizations, column: :agent_id
+ end
+
+ with_lock_retries do
+ remove_foreign_key_if_exists :agent_user_access_group_authorizations, column: :group_id
+ end
+
+ with_lock_retries do
+ remove_foreign_key_if_exists :agent_user_access_group_authorizations, column: :agent_id
+ end
+ end
+end
diff --git a/db/migrate/20230407164616_add_code_suggestions_to_namespace_settings.rb b/db/migrate/20230407164616_add_code_suggestions_to_namespace_settings.rb
new file mode 100644
index 00000000000..ce500fec2f0
--- /dev/null
+++ b/db/migrate/20230407164616_add_code_suggestions_to_namespace_settings.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class AddCodeSuggestionsToNamespaceSettings < Gitlab::Database::Migration[2.1]
+ enable_lock_retries!
+
+ def change
+ add_column :namespace_settings, :code_suggestions, :boolean, default: false, null: false
+ end
+end
diff --git a/db/migrate/20230410092450_add_product_analytics_instrumentation_key_to_project_settings.rb b/db/migrate/20230410092450_add_product_analytics_instrumentation_key_to_project_settings.rb
new file mode 100644
index 00000000000..eaaddef083c
--- /dev/null
+++ b/db/migrate/20230410092450_add_product_analytics_instrumentation_key_to_project_settings.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class AddProductAnalyticsInstrumentationKeyToProjectSettings < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ # rubocop:disable Migration/AddLimitToTextColumns
+ # limit is added in 20230413153140_add_text_limit_to_project_settings_instrumentation_key.rb
+ def up
+ with_lock_retries do
+ add_column :project_settings, :product_analytics_instrumentation_key, :text unless
+ column_exists?(:project_settings, :product_analytics_instrumentation_key)
+ end
+ end
+
+ def down
+ with_lock_retries do
+ remove_column :project_settings, :product_analytics_instrumentation_key
+ end
+ end
+ # rubocop:enable Migration/AddLimitToTextColumns
+end
diff --git a/db/migrate/20230411171001_create_abuse_trust_scores.rb b/db/migrate/20230411171001_create_abuse_trust_scores.rb
new file mode 100644
index 00000000000..2c95a2ab01e
--- /dev/null
+++ b/db/migrate/20230411171001_create_abuse_trust_scores.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class CreateAbuseTrustScores < Gitlab::Database::Migration[2.1]
+ def change
+ create_table :abuse_trust_scores do |t|
+ t.belongs_to :user, foreign_key: { to_table: :users, on_delete: :cascade }, index: false
+
+ t.float :score, null: false
+ t.timestamps_with_timezone null: false
+ t.integer :source, limit: 2, null: false
+ t.text :correlation_id_value, limit: 32
+
+ t.index [:user_id, :source, :created_at]
+ end
+ end
+end
diff --git a/db/migrate/20230412073614_create_issue_assignment_events.rb b/db/migrate/20230412073614_create_issue_assignment_events.rb
new file mode 100644
index 00000000000..1b57c59eb2b
--- /dev/null
+++ b/db/migrate/20230412073614_create_issue_assignment_events.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+class CreateIssueAssignmentEvents < Gitlab::Database::Migration[2.1]
+ def change
+ create_table :issue_assignment_events do |t|
+ t.references :user, null: true, index: true, foreign_key: { on_delete: :nullify }
+ t.bigint :issue_id, null: false
+ t.datetime_with_timezone :created_at, null: false, default: -> { 'NOW()' }
+ t.integer :action, limit: 2, null: false, default: 1
+
+ t.index %i[issue_id action created_at id], name: 'index_on_issue_assignment_events_issue_id_action_created_at_id'
+ end
+ end
+end
diff --git a/db/migrate/20230412080242_add_concurrent_fk_to_issue_assignment_events.rb b/db/migrate/20230412080242_add_concurrent_fk_to_issue_assignment_events.rb
new file mode 100644
index 00000000000..3bff98c6e69
--- /dev/null
+++ b/db/migrate/20230412080242_add_concurrent_fk_to_issue_assignment_events.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class AddConcurrentFkToIssueAssignmentEvents < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_foreign_key :issue_assignment_events,
+ :issues,
+ column: :issue_id,
+ on_delete: :cascade
+ end
+
+ def down
+ remove_foreign_key_if_exists :resource_assignment_events, column: :issue_id
+ end
+end
diff --git a/db/migrate/20230412151659_add_ci_job_artifacts_file_final_path.rb b/db/migrate/20230412151659_add_ci_job_artifacts_file_final_path.rb
new file mode 100644
index 00000000000..18bf8640a45
--- /dev/null
+++ b/db/migrate/20230412151659_add_ci_job_artifacts_file_final_path.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+class AddCiJobArtifactsFileFinalPath < Gitlab::Database::Migration[2.1]
+ enable_lock_retries!
+
+ # rubocop:disable Migration/AddLimitToTextColumns
+ # limit is added in db/post_migrate/20230412152538_add_text_limit_to_ci_job_artifacts_file_final_path.rb
+ def change
+ add_column :ci_job_artifacts, :file_final_path, :text, null: true
+ end
+ # rubocop:enable Migration/AddLimitToTextColumns
+end
diff --git a/db/migrate/20230413080906_create_merge_request_assignment_events.rb b/db/migrate/20230413080906_create_merge_request_assignment_events.rb
new file mode 100644
index 00000000000..b976dc8935a
--- /dev/null
+++ b/db/migrate/20230413080906_create_merge_request_assignment_events.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class CreateMergeRequestAssignmentEvents < Gitlab::Database::Migration[2.1]
+ def change
+ create_table :merge_request_assignment_events do |t|
+ t.references :user, null: true, index: true, foreign_key: { on_delete: :nullify }
+ t.bigint :merge_request_id, null: false
+ t.datetime_with_timezone :created_at, null: false, default: -> { 'NOW()' }
+ t.integer :action, limit: 2, null: false, default: 1
+
+ t.index %i[merge_request_id action created_at id],
+ name: 'index_on_mr_assignment_events_mr_id_action_created_at_id'
+ end
+ end
+end
diff --git a/db/migrate/20230413080918_add_concurrent_fk_to_merge_request_assignment_events.rb b/db/migrate/20230413080918_add_concurrent_fk_to_merge_request_assignment_events.rb
new file mode 100644
index 00000000000..5b7d08a3547
--- /dev/null
+++ b/db/migrate/20230413080918_add_concurrent_fk_to_merge_request_assignment_events.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class AddConcurrentFkToMergeRequestAssignmentEvents < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_foreign_key :merge_request_assignment_events,
+ :merge_requests,
+ column: :merge_request_id,
+ on_delete: :cascade
+ end
+
+ def down
+ remove_foreign_key_if_exists :merge_request_assignment_events, column: :merge_request_id
+ end
+end
diff --git a/db/migrate/20230413153140_add_text_limit_to_project_settings_instrumentation_key.rb b/db/migrate/20230413153140_add_text_limit_to_project_settings_instrumentation_key.rb
new file mode 100644
index 00000000000..7ec0a800066
--- /dev/null
+++ b/db/migrate/20230413153140_add_text_limit_to_project_settings_instrumentation_key.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class AddTextLimitToProjectSettingsInstrumentationKey < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ add_text_limit :project_settings, :product_analytics_instrumentation_key, 255
+ end
+
+ def down
+ remove_text_limit :project_settings, :product_analytics_instrumentation_key
+ end
+end
diff --git a/db/post_migrate/20210826193907_add_unique_index_dast_site_token_project_id_and_url.rb b/db/post_migrate/20210826193907_add_unique_index_dast_site_token_project_id_and_url.rb
deleted file mode 100644
index 1e65d5647e4..00000000000
--- a/db/post_migrate/20210826193907_add_unique_index_dast_site_token_project_id_and_url.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class AddUniqueIndexDastSiteTokenProjectIdAndUrl < ActiveRecord::Migration[6.1]
- include Gitlab::Database::MigrationHelpers
-
- DOWNTIME = false
-
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_dast_site_token_on_project_id_and_url'
-
- def up
- add_concurrent_index :dast_site_tokens, [:project_id, :url], name: INDEX_NAME, unique: true
- end
-
- def down
- remove_concurrent_index_by_name :dast_site_tokens, name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20210830104800_reschedule_extract_project_topics_into_separate_table.rb b/db/post_migrate/20210830104800_reschedule_extract_project_topics_into_separate_table.rb
deleted file mode 100644
index d6b2db7790f..00000000000
--- a/db/post_migrate/20210830104800_reschedule_extract_project_topics_into_separate_table.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class RescheduleExtractProjectTopicsIntoSeparateTable < ActiveRecord::Migration[6.0]
- include Gitlab::Database::MigrationHelpers
-
- MIGRATION = 'ExtractProjectTopicsIntoSeparateTable'
- DELAY_INTERVAL = 4.minutes
-
- disable_ddl_transaction!
-
- def up
- requeue_background_migration_jobs_by_range_at_intervals(MIGRATION, DELAY_INTERVAL)
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20210831123008_drop_temporary_trigger_for_ci_sources_pipelines.rb b/db/post_migrate/20210831123008_drop_temporary_trigger_for_ci_sources_pipelines.rb
deleted file mode 100644
index a3fe0e6bd7a..00000000000
--- a/db/post_migrate/20210831123008_drop_temporary_trigger_for_ci_sources_pipelines.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-class DropTemporaryTriggerForCiSourcesPipelines < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- TABLE = 'ci_sources_pipelines'
- TEMPORARY_COLUMN = 'source_job_id_convert_to_bigint'
- MAIN_COLUMN = 'source_job_id'
- TRIGGER = 'trigger_8485e97c00e3'
-
- # rubocop:disable Migration/WithLockRetriesDisallowedMethod
- def up
- check_trigger_permissions!(TABLE)
-
- with_lock_retries do
- remove_rename_triggers(TABLE, TRIGGER)
- end
- end
-
- def down
- check_trigger_permissions!(TABLE)
-
- with_lock_retries do
- install_rename_triggers(TABLE, MAIN_COLUMN, TEMPORARY_COLUMN, trigger_name: TRIGGER)
- end
- end
- # rubocop:enable Migration/WithLockRetriesDisallowedMethod
-end
diff --git a/db/post_migrate/20210901044202_push_event_payloads_bigint_conversion_remove_triggers.rb b/db/post_migrate/20210901044202_push_event_payloads_bigint_conversion_remove_triggers.rb
deleted file mode 100644
index e11f0d46563..00000000000
--- a/db/post_migrate/20210901044202_push_event_payloads_bigint_conversion_remove_triggers.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-class PushEventPayloadsBigintConversionRemoveTriggers < ActiveRecord::Migration[6.1]
- include Gitlab::Database::MigrationHelpers
-
- disable_ddl_transaction!
-
- TABLE_NAME = :push_event_payloads
- TRIGGER_NAME = 'trigger_07c94931164e'
-
- # rubocop:disable Migration/WithLockRetriesDisallowedMethod
- def up
- check_trigger_permissions!(TABLE_NAME)
-
- with_lock_retries do
- remove_rename_triggers(TABLE_NAME, TRIGGER_NAME)
- end
- end
-
- def down
- check_trigger_permissions!(TABLE_NAME)
-
- with_lock_retries do
- install_rename_triggers(TABLE_NAME, :event_id, :event_id_convert_to_bigint, trigger_name: TRIGGER_NAME)
- end
- end
- # rubocop:enable Migration/WithLockRetriesDisallowedMethod
-end
diff --git a/db/post_migrate/20210901044237_events_bigint_conversion_remove_triggers.rb b/db/post_migrate/20210901044237_events_bigint_conversion_remove_triggers.rb
deleted file mode 100644
index bfe3af2efa8..00000000000
--- a/db/post_migrate/20210901044237_events_bigint_conversion_remove_triggers.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# frozen_string_literal: true
-
-class EventsBigintConversionRemoveTriggers < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- TABLE_NAME = :events
- TRIGGER_NAME = :trigger_69523443cc10
-
- # rubocop:disable Migration/WithLockRetriesDisallowedMethod
- def up
- check_trigger_permissions!(TABLE_NAME)
-
- with_lock_retries do
- remove_rename_triggers(TABLE_NAME, TRIGGER_NAME)
- end
- end
-
- def down
- check_trigger_permissions!(TABLE_NAME)
-
- with_lock_retries do
- install_rename_triggers(TABLE_NAME, :id, :id_convert_to_bigint, trigger_name: TRIGGER_NAME)
- end
- end
- # rubocop:enable Migration/WithLockRetriesDisallowedMethod
-end
diff --git a/db/post_migrate/20210901153324_slice_merge_request_diff_commit_migrations.rb b/db/post_migrate/20210901153324_slice_merge_request_diff_commit_migrations.rb
deleted file mode 100644
index 8ee7feae1a6..00000000000
--- a/db/post_migrate/20210901153324_slice_merge_request_diff_commit_migrations.rb
+++ /dev/null
@@ -1,59 +0,0 @@
-# frozen_string_literal: true
-
-class SliceMergeRequestDiffCommitMigrations < ActiveRecord::Migration[6.1]
- include Gitlab::Database::MigrationHelpers
-
- disable_ddl_transaction!
-
- BATCH_SIZE = 5_000
- MIGRATION_CLASS = 'MigrateMergeRequestDiffCommitUsers'
- STEAL_MIGRATION_CLASS = 'StealMigrateMergeRequestDiffCommitUsers'
-
- def up
- old_jobs = Gitlab::Database::BackgroundMigrationJob
- .for_migration_class(MIGRATION_CLASS)
- .pending
- .to_a
-
- return if old_jobs.empty?
-
- transaction do
- # This ensures we stop processing the old ranges, as the background
- # migrations skip already processed jobs.
- Gitlab::Database::BackgroundMigrationJob
- .for_migration_class(MIGRATION_CLASS)
- .pending
- .update_all(status: :succeeded)
-
- rows = []
-
- old_jobs.each do |job|
- min, max = job.arguments
-
- while min < max
- rows << {
- class_name: MIGRATION_CLASS,
- arguments: [min, min + BATCH_SIZE],
- created_at: Time.now.utc,
- updated_at: Time.now.utc
- }
-
- min += BATCH_SIZE
- end
- end
-
- Gitlab::Database::BackgroundMigrationJob.insert_all!(rows)
- end
-
- job = Gitlab::Database::BackgroundMigrationJob
- .for_migration_class(MIGRATION_CLASS)
- .pending
- .first
-
- migrate_in(1.hour, STEAL_MIGRATION_CLASS, job.arguments)
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20210901184511_prepare_async_indexes_for_ci_builds.rb b/db/post_migrate/20210901184511_prepare_async_indexes_for_ci_builds.rb
deleted file mode 100644
index 47795c5d646..00000000000
--- a/db/post_migrate/20210901184511_prepare_async_indexes_for_ci_builds.rb
+++ /dev/null
@@ -1,80 +0,0 @@
-# frozen_string_literal: true
-
-class PrepareAsyncIndexesForCiBuilds < Gitlab::Database::Migration[1.0]
- def up
- prepare_async_index :ci_builds, :stage_id_convert_to_bigint, name: :index_ci_builds_on_converted_stage_id
-
- prepare_async_index :ci_builds, [:commit_id, :artifacts_expire_at, :id_convert_to_bigint],
- where: "type::text = 'Ci::Build'::text
- AND (retried = false OR retried IS NULL)
- AND (name::text = ANY (ARRAY['sast'::character varying::text,
- 'secret_detection'::character varying::text,
- 'dependency_scanning'::character varying::text,
- 'container_scanning'::character varying::text,
- 'dast'::character varying::text]))",
- name: :index_ci_builds_on_commit_id_expire_at_and_converted_id
-
- prepare_async_index :ci_builds, [:project_id, :id_convert_to_bigint],
- name: :index_ci_builds_on_project_and_converted_id
-
- prepare_async_index :ci_builds, [:runner_id, :id_convert_to_bigint],
- order: { id_convert_to_bigint: :desc },
- name: :index_ci_builds_on_runner_id_and_converted_id_desc
-
- prepare_async_index :ci_builds, [:resource_group_id, :id_convert_to_bigint],
- where: 'resource_group_id IS NOT NULL',
- name: :index_ci_builds_on_resource_group_and_converted_id
-
- prepare_async_index :ci_builds, [:name, :id_convert_to_bigint],
- 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])
- ) AND type::text = 'Ci::Build'::text",
- name: :index_security_ci_builds_on_name_and_converted_id_parser
-
- prepare_async_index_from_sql(:ci_builds, :index_ci_builds_runner_id_and_converted_id_pending_covering, <<~SQL.squish)
- CREATE INDEX CONCURRENTLY index_ci_builds_runner_id_and_converted_id_pending_covering
- ON ci_builds (runner_id, id_convert_to_bigint) INCLUDE (project_id)
- WHERE status::text = 'pending'::text AND type::text = 'Ci::Build'::text
- SQL
- end
-
- def down
- unprepare_async_index_by_name :ci_builds, :index_ci_builds_runner_id_and_converted_id_pending_covering
-
- unprepare_async_index_by_name :ci_builds, :index_security_ci_builds_on_name_and_converted_id_parser
-
- unprepare_async_index_by_name :ci_builds, :index_ci_builds_on_resource_group_and_converted_id
-
- unprepare_async_index_by_name :ci_builds, :index_ci_builds_on_runner_id_and_converted_id_desc
-
- unprepare_async_index_by_name :ci_builds, :index_ci_builds_on_project_and_converted_id
-
- unprepare_async_index_by_name :ci_builds, :index_ci_builds_on_commit_id_expire_at_and_converted_id
-
- unprepare_async_index_by_name :ci_builds, :index_ci_builds_on_converted_stage_id
- end
-
- private
-
- def prepare_async_index_from_sql(table_name, index_name, definition)
- return unless async_index_creation_available?
-
- return if index_name_exists?(table_name, index_name)
-
- async_index = Gitlab::Database::AsyncIndexes::PostgresAsyncIndex.find_or_create_by!(name: index_name) do |rec|
- rec.table_name = table_name
- rec.definition = definition
- end
-
- Gitlab::AppLogger.info(
- message: 'Prepared index for async creation',
- table_name: async_index.table_name,
- index_name: async_index.name)
- end
-end
diff --git a/db/post_migrate/20210902144144_drop_temporary_columns_and_triggers_for_ci_build_needs.rb b/db/post_migrate/20210902144144_drop_temporary_columns_and_triggers_for_ci_build_needs.rb
deleted file mode 100644
index f04c5cd6561..00000000000
--- a/db/post_migrate/20210902144144_drop_temporary_columns_and_triggers_for_ci_build_needs.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# frozen_string_literal: true
-
-class DropTemporaryColumnsAndTriggersForCiBuildNeeds < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- TABLE = 'ci_build_needs'
- TEMPORARY_COLUMN = 'build_id_convert_to_bigint'
- MAIN_COLUMN = 'build_id'
-
- # rubocop:disable Migration/WithLockRetriesDisallowedMethod
- def up
- with_lock_retries do
- cleanup_conversion_of_integer_to_bigint(TABLE, MAIN_COLUMN)
- end
- end
-
- def down
- check_trigger_permissions!(TABLE)
-
- with_lock_retries do
- add_column(TABLE, TEMPORARY_COLUMN, :int, default: 0, null: false)
- install_rename_triggers(TABLE, MAIN_COLUMN, TEMPORARY_COLUMN)
- end
- end
- # rubocop:enable Migration/WithLockRetriesDisallowedMethod
-end
diff --git a/db/post_migrate/20210906100316_drop_temporary_columns_and_triggers_for_ci_build_trace_chunks.rb b/db/post_migrate/20210906100316_drop_temporary_columns_and_triggers_for_ci_build_trace_chunks.rb
deleted file mode 100644
index 44bec402cae..00000000000
--- a/db/post_migrate/20210906100316_drop_temporary_columns_and_triggers_for_ci_build_trace_chunks.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class DropTemporaryColumnsAndTriggersForCiBuildTraceChunks < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- TABLE = 'ci_build_trace_chunks'
- COLUMN = 'build_id'
-
- # rubocop:disable Migration/WithLockRetriesDisallowedMethod
- def up
- with_lock_retries do
- cleanup_conversion_of_integer_to_bigint(TABLE, COLUMN)
- end
- end
- # rubocop:enable Migration/WithLockRetriesDisallowedMethod
-
- def down
- restore_conversion_of_integer_to_bigint(TABLE, COLUMN)
- end
-end
diff --git a/db/post_migrate/20210906130643_drop_temporary_columns_and_triggers_for_taggings.rb b/db/post_migrate/20210906130643_drop_temporary_columns_and_triggers_for_taggings.rb
deleted file mode 100644
index cb5714055bb..00000000000
--- a/db/post_migrate/20210906130643_drop_temporary_columns_and_triggers_for_taggings.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class DropTemporaryColumnsAndTriggersForTaggings < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- TABLE = 'taggings'
- COLUMNS = %w(id taggable_id)
-
- # rubocop:disable Migration/WithLockRetriesDisallowedMethod
- def up
- cleanup_conversion_of_integer_to_bigint(TABLE, COLUMNS)
- end
- # rubocop:enable Migration/WithLockRetriesDisallowedMethod
-
- def down
- restore_conversion_of_integer_to_bigint(TABLE, COLUMNS)
- end
-end
diff --git a/db/post_migrate/20210907013944_cleanup_bigint_conversion_for_ci_builds_metadata.rb b/db/post_migrate/20210907013944_cleanup_bigint_conversion_for_ci_builds_metadata.rb
deleted file mode 100644
index 54dce0a7da8..00000000000
--- a/db/post_migrate/20210907013944_cleanup_bigint_conversion_for_ci_builds_metadata.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class CleanupBigintConversionForCiBuildsMetadata < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- TABLE = :ci_builds_metadata
-
- def up
- cleanup_conversion_of_integer_to_bigint(TABLE, :id)
- cleanup_conversion_of_integer_to_bigint(TABLE, :build_id)
- end
-
- def down
- restore_conversion_of_integer_to_bigint(TABLE, :build_id)
- restore_conversion_of_integer_to_bigint(TABLE, :id)
- end
-end
diff --git a/db/post_migrate/20210907021940_cleanup_bigint_conversion_for_ci_stages.rb b/db/post_migrate/20210907021940_cleanup_bigint_conversion_for_ci_stages.rb
deleted file mode 100644
index 096b5b3bf42..00000000000
--- a/db/post_migrate/20210907021940_cleanup_bigint_conversion_for_ci_stages.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class CleanupBigintConversionForCiStages < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- TABLE = :ci_stages
-
- # rubocop:disable Migration/WithLockRetriesDisallowedMethod
- def up
- with_lock_retries do
- cleanup_conversion_of_integer_to_bigint(TABLE, :id)
- end
- end
- # rubocop:enable Migration/WithLockRetriesDisallowedMethod
-
- def down
- restore_conversion_of_integer_to_bigint(TABLE, :id)
- end
-end
diff --git a/db/post_migrate/20210907033745_cleanup_bigint_conversion_for_deployments.rb b/db/post_migrate/20210907033745_cleanup_bigint_conversion_for_deployments.rb
deleted file mode 100644
index 2d71c11cfa8..00000000000
--- a/db/post_migrate/20210907033745_cleanup_bigint_conversion_for_deployments.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class CleanupBigintConversionForDeployments < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- TABLE = :deployments
-
- # rubocop:disable Migration/WithLockRetriesDisallowedMethod
- def up
- with_lock_retries do
- cleanup_conversion_of_integer_to_bigint(TABLE, :deployable_id)
- end
- end
- # rubocop:enable Migration/WithLockRetriesDisallowedMethod
-
- def down
- restore_conversion_of_integer_to_bigint(TABLE, :deployable_id)
- end
-end
diff --git a/db/post_migrate/20210907041000_cleanup_bigint_conversion_for_geo_job_artifact_deleted_events.rb b/db/post_migrate/20210907041000_cleanup_bigint_conversion_for_geo_job_artifact_deleted_events.rb
deleted file mode 100644
index 26f00454029..00000000000
--- a/db/post_migrate/20210907041000_cleanup_bigint_conversion_for_geo_job_artifact_deleted_events.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class CleanupBigintConversionForGeoJobArtifactDeletedEvents < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- TABLE = :geo_job_artifact_deleted_events
-
- # rubocop:disable Migration/WithLockRetriesDisallowedMethod
- def up
- with_lock_retries do
- cleanup_conversion_of_integer_to_bigint(TABLE, :job_artifact_id)
- end
- end
- # rubocop:enable Migration/WithLockRetriesDisallowedMethod
-
- def down
- restore_conversion_of_integer_to_bigint(TABLE, :job_artifact_id)
- end
-end
diff --git a/db/post_migrate/20210907211557_finalize_ci_builds_bigint_conversion.rb b/db/post_migrate/20210907211557_finalize_ci_builds_bigint_conversion.rb
deleted file mode 100644
index f164cdbf379..00000000000
--- a/db/post_migrate/20210907211557_finalize_ci_builds_bigint_conversion.rb
+++ /dev/null
@@ -1,223 +0,0 @@
-# frozen_string_literal: true
-
-class FinalizeCiBuildsBigintConversion < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- TABLE_NAME = 'ci_builds'
- PK_INDEX_NAME = 'index_ci_builds_on_converted_id'
-
- SECONDARY_INDEXES = [
- {
- original_name: :index_ci_builds_on_commit_id_artifacts_expired_at_and_id,
- temporary_name: :index_ci_builds_on_commit_id_expire_at_and_converted_id,
- columns: [:commit_id, :artifacts_expire_at, :id_convert_to_bigint],
- options: {
- where: "type::text = 'Ci::Build'::text
- AND (retried = false OR retried IS NULL)
- AND (name::text = ANY (ARRAY['sast'::character varying::text,
- 'secret_detection'::character varying::text,
- 'dependency_scanning'::character varying::text,
- 'container_scanning'::character varying::text,
- 'dast'::character varying::text]))"
- }
- },
- {
- original_name: :index_ci_builds_on_project_id_and_id,
- temporary_name: :index_ci_builds_on_project_and_converted_id,
- columns: [:project_id, :id_convert_to_bigint],
- options: {}
- },
- {
- original_name: :index_ci_builds_on_runner_id_and_id_desc,
- temporary_name: :index_ci_builds_on_runner_id_and_converted_id_desc,
- columns: [:runner_id, :id_convert_to_bigint],
- options: { order: { id_convert_to_bigint: :desc } }
- },
- {
- original_name: :index_for_resource_group,
- temporary_name: :index_ci_builds_on_resource_group_and_converted_id,
- columns: [:resource_group_id, :id_convert_to_bigint],
- options: { where: 'resource_group_id IS NOT NULL' }
- },
- {
- original_name: :index_security_ci_builds_on_name_and_id_parser_features,
- temporary_name: :index_security_ci_builds_on_name_and_converted_id_parser,
- columns: [:name, :id_convert_to_bigint],
- options: {
- 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])
- ) AND type::text = 'Ci::Build'::text"
- }
- }
- ].freeze
-
- MANUAL_INDEX_NAMES = {
- original_name: :index_ci_builds_runner_id_pending_covering,
- temporary_name: :index_ci_builds_runner_id_and_converted_id_pending_covering
- }.freeze
-
- REFERENCING_FOREIGN_KEYS = [
- [:ci_build_needs, :build_id, :cascade, 'fk_rails_'],
- [:ci_build_pending_states, :build_id, :cascade, 'fk_rails_'],
- [:ci_build_report_results, :build_id, :cascade, 'fk_rails_'],
- [:ci_build_trace_chunks, :build_id, :cascade, 'fk_rails_'],
- [:ci_build_trace_metadata, :build_id, :cascade, 'fk_rails_'],
- [:ci_builds_runner_session, :build_id, :cascade, 'fk_rails_'],
- [:ci_builds_metadata, :build_id, :cascade, 'fk_'],
- [:ci_job_artifacts, :job_id, :cascade, 'fk_rails_'],
- [:ci_job_variables, :job_id, :cascade, 'fk_rails_'],
- [:ci_pending_builds, :build_id, :cascade, 'fk_rails_'],
- [:ci_resources, :build_id, :nullify, 'fk_'],
- [:ci_running_builds, :build_id, :cascade, 'fk_rails_'],
- [:ci_sources_pipelines, :source_job_id, :cascade, 'fk_'],
- [:ci_unit_test_failures, :build_id, :cascade, 'fk_'],
- [:dast_scanner_profiles_builds, :ci_build_id, :cascade, 'fk_'],
- [:dast_site_profiles_builds, :ci_build_id, :cascade, 'fk_'],
- [:pages_deployments, :ci_build_id, :nullify, 'fk_rails_'],
- [:requirements_management_test_reports, :build_id, :nullify, 'fk_rails_'],
- [:security_scans, :build_id, :cascade, 'fk_rails_'],
- [:terraform_state_versions, :ci_build_id, :nullify, 'fk_']
- ].freeze
-
- def up
- ensure_batched_background_migration_is_finished(
- job_class_name: 'CopyColumnUsingBackgroundMigrationJob',
- table_name: TABLE_NAME,
- column_name: 'id',
- job_arguments: [%w[id stage_id], %w[id_convert_to_bigint stage_id_convert_to_bigint]]
- )
-
- # Remove this upfront since this table is being dropped, and doesn't need to be migrated
- if foreign_key_exists?(:dep_ci_build_trace_sections, TABLE_NAME, column: :build_id)
- remove_foreign_key(:dep_ci_build_trace_sections, TABLE_NAME, column: :build_id)
- end
-
- # Remove this unexpected FK if it exists - https://gitlab.com/gitlab-com/gl-infra/production/-/issues/5531#note_676576081
- if foreign_key_exists?(:ci_resources, TABLE_NAME, column: :build_id, name: 'fk_rails_e169a8e3d5')
- remove_foreign_key(:ci_resources, TABLE_NAME, column: :build_id, name: 'fk_rails_e169a8e3d5')
- end
-
- # Remove this unexpected FK if it exists - https://gitlab.com/gitlab-org/gitlab/-/issues/341822
- if foreign_key_exists?(:ci_sources_pipelines, TABLE_NAME, column: :source_job_id, name: 'fk_3f0c88d7dc')
- remove_foreign_key(:ci_sources_pipelines, TABLE_NAME, column: :source_job_id, name: 'fk_3f0c88d7dc')
- end
-
- swap_columns
- end
-
- def down
- swap_columns
- end
-
- private
-
- def swap_columns
- # Copy existing indexes from the original column to the new column
- create_indexes
- # Copy existing FKs from the original column to the new column
- create_referencing_foreign_keys
-
- # Remove existing FKs from the referencing tables, so we don't have to lock on them when we drop the existing PK
- replace_referencing_foreign_keys
-
- with_lock_retries(raise_on_exhaustion: true) do
- quoted_table_name = quote_table_name(TABLE_NAME)
-
- # Swap the original and new column names
- temporary_name = 'id_tmp'
- execute "ALTER TABLE #{quoted_table_name} RENAME COLUMN #{quote_column_name(:id)} TO #{quote_column_name(temporary_name)}"
- execute "ALTER TABLE #{quoted_table_name} RENAME COLUMN #{quote_column_name(:id_convert_to_bigint)} TO #{quote_column_name(:id)}"
- execute "ALTER TABLE #{quoted_table_name} RENAME COLUMN #{quote_column_name(temporary_name)} TO #{quote_column_name(:id_convert_to_bigint)}"
-
- # Reset the function so PG drops the plan cache for the incorrect integer type
- function_name = Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME, connection: connection)
- .name([:id, :stage_id], [:id_convert_to_bigint, :stage_id_convert_to_bigint])
- execute "ALTER FUNCTION #{quote_table_name(function_name)} RESET ALL"
-
- # Swap defaults of the two columns, and change ownership of the sequence to the new id
- execute "ALTER SEQUENCE ci_builds_id_seq OWNED BY #{TABLE_NAME}.id"
- change_column_default TABLE_NAME, :id, -> { "nextval('ci_builds_id_seq'::regclass)" }
- change_column_default TABLE_NAME, :id_convert_to_bigint, 0
-
- # Swap the PK constraint from the original column to the new column
- # We deliberately don't CASCADE here because the old FKs should be removed already
- execute "ALTER TABLE #{quoted_table_name} DROP CONSTRAINT ci_builds_pkey"
- rename_index TABLE_NAME, PK_INDEX_NAME, 'ci_builds_pkey'
- execute "ALTER TABLE #{quoted_table_name} ADD CONSTRAINT ci_builds_pkey PRIMARY KEY USING INDEX ci_builds_pkey"
-
- # Remove old column indexes and change new column indexes to have the original names
- rename_secondary_indexes # rubocop:disable Migration/WithLockRetriesDisallowedMethod
- end
- end
-
- def create_indexes
- add_concurrent_index TABLE_NAME, :id_convert_to_bigint, unique: true, name: PK_INDEX_NAME
-
- SECONDARY_INDEXES.each do |index_definition|
- options = index_definition[:options]
- options[:name] = index_definition[:temporary_name]
-
- add_concurrent_index(TABLE_NAME, index_definition[:columns], options)
- end
-
- unless index_name_exists?(TABLE_NAME, MANUAL_INDEX_NAMES[:temporary_name])
- execute(<<~SQL)
- CREATE INDEX CONCURRENTLY #{MANUAL_INDEX_NAMES[:temporary_name]}
- ON ci_builds (runner_id, id_convert_to_bigint) INCLUDE (project_id)
- WHERE status::text = 'pending'::text AND type::text = 'Ci::Build'::text
- SQL
- end
- end
-
- def rename_secondary_indexes
- (SECONDARY_INDEXES + [MANUAL_INDEX_NAMES]).each do |index_definition|
- remove_index(TABLE_NAME, name: index_definition[:original_name]) # rubocop:disable Migration/RemoveIndex
- rename_index(TABLE_NAME, index_definition[:temporary_name], index_definition[:original_name])
- end
- end
-
- def create_referencing_foreign_keys
- REFERENCING_FOREIGN_KEYS.each do |(from_table, column, on_delete, prefix)|
- # Don't attempt to create the FK if one already exists from the table to the new column
- # The check in `add_concurrent_foreign_key` already checks for this, but it looks for the foreign key
- # with the new name only (containing the `_tmp` suffix).
- #
- # Since we might partially rename FKs and re-run the migration, we also have to check and see if a FK exists
- # on those columns that might not match the `_tmp` name.
- next if foreign_key_exists?(from_table, TABLE_NAME, column: column, primary_key: :id_convert_to_bigint)
-
- temporary_name = "#{concurrent_foreign_key_name(from_table, column, prefix: prefix)}_tmp"
-
- add_concurrent_foreign_key(
- from_table,
- TABLE_NAME,
- column: column,
- target_column: :id_convert_to_bigint,
- name: temporary_name,
- on_delete: on_delete)
- end
- end
-
- def replace_referencing_foreign_keys
- REFERENCING_FOREIGN_KEYS.each do |(from_table, column, _, prefix)|
- existing_name = concurrent_foreign_key_name(from_table, column, prefix: prefix)
-
- # Don't attempt to replace the FK unless it exists and points at the original column.
- # This could happen if the migration is re-run due to failing midway.
- next unless foreign_key_exists?(from_table, TABLE_NAME, column: column, primary_key: :id, name: existing_name)
-
- with_lock_retries do
- temporary_name = "#{existing_name}_tmp"
-
- remove_foreign_key(from_table, TABLE_NAME, column: column, primary_key: :id, name: existing_name)
- rename_constraint(from_table, temporary_name, existing_name)
- end
- end
- end
-end
diff --git a/db/post_migrate/20210908132335_disable_job_token_scope_when_unused.rb b/db/post_migrate/20210908132335_disable_job_token_scope_when_unused.rb
deleted file mode 100644
index 3a758394d7f..00000000000
--- a/db/post_migrate/20210908132335_disable_job_token_scope_when_unused.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class DisableJobTokenScopeWhenUnused < Gitlab::Database::Migration[1.0]
- def up
- # no-op: Must have run before %"15.X" as it is not compatible with decomposed CI database
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20210909104800_reschedule_extract_project_topics_into_separate_table_2.rb b/db/post_migrate/20210909104800_reschedule_extract_project_topics_into_separate_table_2.rb
deleted file mode 100644
index ad31a40f324..00000000000
--- a/db/post_migrate/20210909104800_reschedule_extract_project_topics_into_separate_table_2.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class RescheduleExtractProjectTopicsIntoSeparateTable2 < Gitlab::Database::Migration[1.0]
- MIGRATION = 'ExtractProjectTopicsIntoSeparateTable'
- DELAY_INTERVAL = 4.minutes
-
- disable_ddl_transaction!
-
- def up
- requeue_background_migration_jobs_by_range_at_intervals(MIGRATION, DELAY_INTERVAL)
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20210909152027_remove_container_registry_enabled.rb b/db/post_migrate/20210909152027_remove_container_registry_enabled.rb
deleted file mode 100644
index d97faaf58d2..00000000000
--- a/db/post_migrate/20210909152027_remove_container_registry_enabled.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveContainerRegistryEnabled < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- remove_column :projects, :container_registry_enabled
- end
- end
-
- def down
- with_lock_retries do
- add_column :projects, :container_registry_enabled, :boolean # rubocop:disable Migration/AddColumnsToWideTables
- end
- end
-end
diff --git a/db/post_migrate/20210910194952_update_report_type_for_existing_approval_project_rules.rb b/db/post_migrate/20210910194952_update_report_type_for_existing_approval_project_rules.rb
deleted file mode 100644
index 537c235edab..00000000000
--- a/db/post_migrate/20210910194952_update_report_type_for_existing_approval_project_rules.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-# frozen_string_literal: true
-
-class UpdateReportTypeForExistingApprovalProjectRules < Gitlab::Database::Migration[1.0]
- def up
- # 1. We only want to consider when rule_type is set to :report_approver (i.e., 2):
- # enum rule_type: {
- # regular: 0,
- # code_owner: 1, # currently unused
- # report_approver: 2,
- # any_approver: 3
- # }
- # 2. Also we want to change only the folowing names and respective values:
- # DEFAULT_NAME_FOR_LICENSE_REPORT = 'License-Check'
- # DEFAULT_NAME_FOR_VULNERABILITY_REPORT = 'Vulnerability-Check'
- # DEFAULT_NAME_FOR_COVERAGE = 'Coverage-Check'
- # enum report_type: {
- # vulnerability: 1,
- # license_scanning: 2,
- # code_coverage: 3
- # }
-
- execute <<~SQL
- UPDATE approval_project_rules
- SET report_type = converted_values.report_type
- FROM
- ( values
- (1, 'Vulnerability-Check'),
- (2, 'License-Check'),
- (3, 'Coverage-Check')
- ) AS converted_values(report_type, name)
- WHERE approval_project_rules.name = converted_values.name
- AND approval_project_rules.rule_type = 2;
- SQL
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20210914094840_add_gin_index_on_pending_builds_namespace_traversal_ids.rb b/db/post_migrate/20210914094840_add_gin_index_on_pending_builds_namespace_traversal_ids.rb
deleted file mode 100644
index 3584c7136e3..00000000000
--- a/db/post_migrate/20210914094840_add_gin_index_on_pending_builds_namespace_traversal_ids.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddGinIndexOnPendingBuildsNamespaceTraversalIds < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_gin_ci_pending_builds_on_namespace_traversal_ids'
-
- def up
- add_concurrent_index :ci_pending_builds, :namespace_traversal_ids, name: INDEX_NAME, using: :gin
- end
-
- def down
- remove_concurrent_index_by_name :ci_pending_builds, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20210914095310_cleanup_orphan_project_access_tokens.rb b/db/post_migrate/20210914095310_cleanup_orphan_project_access_tokens.rb
deleted file mode 100644
index 4756bc3dca5..00000000000
--- a/db/post_migrate/20210914095310_cleanup_orphan_project_access_tokens.rb
+++ /dev/null
@@ -1,54 +0,0 @@
-# frozen_string_literal: true
-
-class CleanupOrphanProjectAccessTokens < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- TMP_INDEX_NAME = 'idx_users_on_user_type_project_bots_batched'
-
- def up
- users_table = define_batchable_model('users')
-
- add_concurrent_index(:users, :id, name: TMP_INDEX_NAME, where: 'user_type = 6')
-
- accumulated_orphans = []
- users_table.where(user_type: 6).each_batch(of: 500) do |relation|
- orphan_ids = relation.where("not exists(select 1 from members where members.user_id = users.id)").pluck(:id)
-
- orphan_ids.each_slice(10) do |ids|
- users_table.where(id: ids).update_all(state: 'deactivated')
- end
-
- accumulated_orphans += orphan_ids
- end
-
- schedule_deletion(accumulated_orphans)
- ensure
- remove_concurrent_index_by_name(:users, TMP_INDEX_NAME)
- end
-
- def down
- remove_concurrent_index_by_name(:users, TMP_INDEX_NAME) if index_exists_by_name?(:users, TMP_INDEX_NAME)
- end
-
- private
-
- def schedule_deletion(orphan_ids)
- return unless deletion_worker
-
- orphan_ids.each_slice(100) do |ids|
- job_arguments = ids.map do |orphan_id|
- [orphan_id, orphan_id, { skip_authorization: true }]
- end
-
- deletion_worker.bulk_perform_async(job_arguments)
- end
- rescue StandardError
- # Ignore any errors or interface changes since this part of migration is optional
- end
-
- def deletion_worker
- @deletion_worker = "DeleteUserWorker".safe_constantize unless defined?(@deletion_worker)
-
- @deletion_worker
- end
-end
diff --git a/db/post_migrate/20210915022415_cleanup_bigint_conversion_for_ci_builds.rb b/db/post_migrate/20210915022415_cleanup_bigint_conversion_for_ci_builds.rb
deleted file mode 100644
index d72866691ff..00000000000
--- a/db/post_migrate/20210915022415_cleanup_bigint_conversion_for_ci_builds.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class CleanupBigintConversionForCiBuilds < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- TABLE = :ci_builds
- COLUMNS = [:id, :stage_id]
-
- def up
- cleanup_conversion_of_integer_to_bigint(TABLE, COLUMNS)
- end
-
- def down
- restore_conversion_of_integer_to_bigint(TABLE, COLUMNS)
- end
-end
diff --git a/db/post_migrate/20210915202900_prepare_index_resource_group_status_commit_id_for_ci_builds.rb b/db/post_migrate/20210915202900_prepare_index_resource_group_status_commit_id_for_ci_builds.rb
deleted file mode 100644
index 42d21806405..00000000000
--- a/db/post_migrate/20210915202900_prepare_index_resource_group_status_commit_id_for_ci_builds.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class PrepareIndexResourceGroupStatusCommitIdForCiBuilds < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_ci_builds_on_resource_group_and_status_and_commit_id'
-
- def up
- prepare_async_index :ci_builds, [:resource_group_id, :status, :commit_id],
- where: 'resource_group_id IS NOT NULL',
- name: INDEX_NAME
- end
-
- def down
- unprepare_async_index_by_name :ci_builds, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20210918201050_remove_old_pending_jobs_for_recalculate_vulnerabilities_occurrences_uuid.rb b/db/post_migrate/20210918201050_remove_old_pending_jobs_for_recalculate_vulnerabilities_occurrences_uuid.rb
deleted file mode 100644
index 224d97243c5..00000000000
--- a/db/post_migrate/20210918201050_remove_old_pending_jobs_for_recalculate_vulnerabilities_occurrences_uuid.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveOldPendingJobsForRecalculateVulnerabilitiesOccurrencesUuid < Gitlab::Database::Migration[1.0]
- MIGRATION_NAME = 'RecalculateVulnerabilitiesOccurrencesUuid'
- NEW_MIGRATION_START_DATE = DateTime.new(2021, 8, 18, 0, 0, 0)
-
- def up
- Gitlab::Database::BackgroundMigrationJob
- .for_migration_class(MIGRATION_NAME)
- .where('created_at < ?', NEW_MIGRATION_START_DATE)
- .where(status: :pending)
- .delete_all
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20210918202855_reschedule_pending_jobs_for_recalculate_vulnerabilities_occurrences_uuid.rb b/db/post_migrate/20210918202855_reschedule_pending_jobs_for_recalculate_vulnerabilities_occurrences_uuid.rb
deleted file mode 100644
index c03c379dcc0..00000000000
--- a/db/post_migrate/20210918202855_reschedule_pending_jobs_for_recalculate_vulnerabilities_occurrences_uuid.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-# frozen_string_literal: true
-
-class ReschedulePendingJobsForRecalculateVulnerabilitiesOccurrencesUuid < Gitlab::Database::Migration[1.0]
- def up
- # no-op
- # no replacement because we will reschedule this for the whole table
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20210920232025_remove_ci_builds_foreign_key_from_terraform_state_versions.rb b/db/post_migrate/20210920232025_remove_ci_builds_foreign_key_from_terraform_state_versions.rb
deleted file mode 100644
index 7435a2c889b..00000000000
--- a/db/post_migrate/20210920232025_remove_ci_builds_foreign_key_from_terraform_state_versions.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveCiBuildsForeignKeyFromTerraformStateVersions < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- remove_foreign_key_if_exists(:terraform_state_versions, :ci_builds)
- end
- end
-
- def down
- add_concurrent_foreign_key(:terraform_state_versions, :ci_builds, column: :ci_build_id, on_delete: :nullify)
- end
-end
diff --git a/db/post_migrate/20210921062820_add_image_location_index_to_vulnerability_occurrences.rb b/db/post_migrate/20210921062820_add_image_location_index_to_vulnerability_occurrences.rb
deleted file mode 100644
index 7a6543395ff..00000000000
--- a/db/post_migrate/20210921062820_add_image_location_index_to_vulnerability_occurrences.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddImageLocationIndexToVulnerabilityOccurrences < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_vulnerability_occurrences_on_location_image'
-
- def up
- add_concurrent_index :vulnerability_occurrences, "(location -> 'image')",
- using: 'GIN',
- where: 'report_type IN (2, 7)',
- name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :vulnerability_occurrences, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20210922021816_drop_int4_columns_for_ci_job_artifacts.rb b/db/post_migrate/20210922021816_drop_int4_columns_for_ci_job_artifacts.rb
deleted file mode 100644
index e45d6ed34aa..00000000000
--- a/db/post_migrate/20210922021816_drop_int4_columns_for_ci_job_artifacts.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# frozen_string_literal: true
-
-class DropInt4ColumnsForCiJobArtifacts < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def change
- remove_column :ci_job_artifacts, :id_convert_to_bigint, :integer, null: false, default: 0
- remove_column :ci_job_artifacts, :job_id_convert_to_bigint, :integer, null: false, default: 0
- end
-end
diff --git a/db/post_migrate/20210922025631_drop_int4_column_for_ci_sources_pipelines.rb b/db/post_migrate/20210922025631_drop_int4_column_for_ci_sources_pipelines.rb
deleted file mode 100644
index b25f1d88736..00000000000
--- a/db/post_migrate/20210922025631_drop_int4_column_for_ci_sources_pipelines.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class DropInt4ColumnForCiSourcesPipelines < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def change
- remove_column :ci_sources_pipelines, :source_job_id_convert_to_bigint, :integer
- end
-end
diff --git a/db/post_migrate/20210922082019_drop_int4_column_for_events.rb b/db/post_migrate/20210922082019_drop_int4_column_for_events.rb
deleted file mode 100644
index a34d54e11e3..00000000000
--- a/db/post_migrate/20210922082019_drop_int4_column_for_events.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class DropInt4ColumnForEvents < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def change
- remove_column :events, :id_convert_to_bigint, :integer, null: false, default: 0
- end
-end
diff --git a/db/post_migrate/20210922084115_concurrent_index_resource_group_status_commit_id_for_ci_builds.rb b/db/post_migrate/20210922084115_concurrent_index_resource_group_status_commit_id_for_ci_builds.rb
deleted file mode 100644
index 922a9b64b55..00000000000
--- a/db/post_migrate/20210922084115_concurrent_index_resource_group_status_commit_id_for_ci_builds.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class ConcurrentIndexResourceGroupStatusCommitIdForCiBuilds < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_ci_builds_on_resource_group_and_status_and_commit_id'
-
- disable_ddl_transaction!
-
- # Indexes were pre-created on gitlab.com to avoid slowing down deployments
- # See: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/70279
-
- # rubocop: disable Migration/PreventIndexCreation
- def up
- add_concurrent_index :ci_builds, [:resource_group_id, :status, :commit_id],
- where: 'resource_group_id IS NOT NULL',
- name: INDEX_NAME
- end
- # rubocop: enable Migration/PreventIndexCreation
-
- def down
- remove_concurrent_index_by_name :ci_builds, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20210922091402_drop_int4_column_for_push_event_payloads.rb b/db/post_migrate/20210922091402_drop_int4_column_for_push_event_payloads.rb
deleted file mode 100644
index 5e30ddacc98..00000000000
--- a/db/post_migrate/20210922091402_drop_int4_column_for_push_event_payloads.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class DropInt4ColumnForPushEventPayloads < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def change
- remove_column :push_event_payloads, :event_id_convert_to_bigint, :integer, null: false, default: 0
- end
-end
diff --git a/db/post_migrate/20210923133143_remove_redundant_taggings_index.rb b/db/post_migrate/20210923133143_remove_redundant_taggings_index.rb
deleted file mode 100644
index a33885cc87b..00000000000
--- a/db/post_migrate/20210923133143_remove_redundant_taggings_index.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveRedundantTaggingsIndex < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = :index_taggings_on_taggable_id_and_taggable_type
-
- def up
- remove_concurrent_index_by_name :taggings, INDEX_NAME
- end
-
- def down
- add_concurrent_index :taggings, [:taggable_id, :taggable_type], name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20210923135909_remove_delayed_project_removal_from_namespaces.rb b/db/post_migrate/20210923135909_remove_delayed_project_removal_from_namespaces.rb
deleted file mode 100644
index 531410a91d9..00000000000
--- a/db/post_migrate/20210923135909_remove_delayed_project_removal_from_namespaces.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveDelayedProjectRemovalFromNamespaces < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- remove_column :namespaces, :delayed_project_removal
- end
- end
-
- def down
- with_lock_retries do
- add_column :namespaces, :delayed_project_removal, :boolean, default: false, null: false, if_not_exists: true # rubocop:disable Migration/AddColumnsToWideTables
- end
-
- add_concurrent_index :namespaces, :id, name: 'tmp_idx_on_namespaces_delayed_project_removal', where: 'delayed_project_removal = TRUE'
- end
-end
diff --git a/db/post_migrate/20210923192648_remove_foreign_keys_from_open_project_data_table.rb b/db/post_migrate/20210923192648_remove_foreign_keys_from_open_project_data_table.rb
deleted file mode 100644
index 1da5aad0fab..00000000000
--- a/db/post_migrate/20210923192648_remove_foreign_keys_from_open_project_data_table.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveForeignKeysFromOpenProjectDataTable < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- remove_foreign_key :open_project_tracker_data, column: :service_id
- end
- end
-
- def down
- with_lock_retries do
- add_foreign_key :open_project_tracker_data, :integrations, column: :service_id, on_delete: :cascade
- end
- end
-end
diff --git a/db/post_migrate/20210923192649_remove_open_project_data_table.rb b/db/post_migrate/20210923192649_remove_open_project_data_table.rb
deleted file mode 100644
index 252d7e07261..00000000000
--- a/db/post_migrate/20210923192649_remove_open_project_data_table.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveOpenProjectDataTable < Gitlab::Database::Migration[1.0]
- def up
- drop_table :open_project_tracker_data
- end
-
- def down
- create_table :open_project_tracker_data do |t|
- t.integer :service_id, index: { name: 'index_open_project_tracker_data_on_service_id' }, null: false
- t.timestamps_with_timezone
- t.string :encrypted_url, limit: 255
- t.string :encrypted_url_iv, limit: 255
- t.string :encrypted_api_url, limit: 255
- t.string :encrypted_api_url_iv, limit: 255
- t.string :encrypted_token, limit: 255
- t.string :encrypted_token_iv, limit: 255
- t.string :closed_status_id, limit: 5
- t.string :project_identifier_code, limit: 100
- end
- end
-end
diff --git a/db/post_migrate/20210927153807_update_issues_relative_position_indexes.rb b/db/post_migrate/20210927153807_update_issues_relative_position_indexes.rb
deleted file mode 100644
index c7b0c7c6d14..00000000000
--- a/db/post_migrate/20210927153807_update_issues_relative_position_indexes.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# frozen_string_literal: true
-
-class UpdateIssuesRelativePositionIndexes < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- RELATIVE_POSITION_INDEX_NAME = 'idx_issues_on_project_id_and_rel_asc_and_id'
- RELATIVE_POSITION_STATE_INDEX_NAME = 'idx_issues_on_project_id_and_rel_position_and_state_id_and_id'
-
- NEW_RELATIVE_POSITION_STATE_INDEX_NAME = 'idx_issues_on_project_id_and_rel_position_and_id_and_state_id'
-
- def up
- add_concurrent_index :issues, [:project_id, :relative_position, :id, :state_id], name: NEW_RELATIVE_POSITION_STATE_INDEX_NAME
-
- remove_concurrent_index_by_name :issues, RELATIVE_POSITION_INDEX_NAME
- remove_concurrent_index_by_name :issues, RELATIVE_POSITION_STATE_INDEX_NAME
- end
-
- def down
- add_concurrent_index :issues, [:project_id, :relative_position, :state_id, :id], order: { id: :desc }, name: RELATIVE_POSITION_STATE_INDEX_NAME
- add_concurrent_index :issues, [:project_id, :relative_position, :id], name: RELATIVE_POSITION_INDEX_NAME
-
- remove_concurrent_index_by_name :issues, NEW_RELATIVE_POSITION_STATE_INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20210930211936_backfill_user_namespace.rb b/db/post_migrate/20210930211936_backfill_user_namespace.rb
deleted file mode 100644
index 6d71b09ad63..00000000000
--- a/db/post_migrate/20210930211936_backfill_user_namespace.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# frozen_string_literal: true
-
-class BackfillUserNamespace < Gitlab::Database::Migration[1.0]
- MIGRATION = 'BackfillUserNamespace'
- INTERVAL = 2.minutes
- BATCH_SIZE = 1_000
- SUB_BATCH_SIZE = 200
- DOWNTIME = false
-
- disable_ddl_transaction!
-
- def up
- queue_batched_background_migration(
- MIGRATION,
- :namespaces,
- :id,
- job_interval: INTERVAL,
- batch_size: 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/20211004110500_add_temporary_index_to_issue_metrics.rb b/db/post_migrate/20211004110500_add_temporary_index_to_issue_metrics.rb
deleted file mode 100644
index 2c2c3ac00af..00000000000
--- a/db/post_migrate/20211004110500_add_temporary_index_to_issue_metrics.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddTemporaryIndexToIssueMetrics < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_issue_metrics_first_mentioned_in_commit'
-
- def up
- condition = Gitlab::BackgroundMigration::FixFirstMentionedInCommitAt::TmpIssueMetrics
- .first_mentioned_in_commit_at_condition
- add_concurrent_index :issue_metrics, :issue_id, where: condition, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :issue_metrics, name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20211004110927_schedule_fix_first_mentioned_in_commit_at_job.rb b/db/post_migrate/20211004110927_schedule_fix_first_mentioned_in_commit_at_job.rb
deleted file mode 100644
index ffdb7f80f0e..00000000000
--- a/db/post_migrate/20211004110927_schedule_fix_first_mentioned_in_commit_at_job.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleFixFirstMentionedInCommitAtJob < Gitlab::Database::Migration[1.0]
- MIGRATION = 'FixFirstMentionedInCommitAt'
- BATCH_SIZE = 10_000
- INTERVAL = 2.minutes.to_i
-
- disable_ddl_transaction!
-
- def up
- scope = Gitlab::BackgroundMigration::FixFirstMentionedInCommitAt::TmpIssueMetrics
- .from_2020
-
- queue_background_migration_jobs_by_range_at_intervals(
- scope,
- MIGRATION,
- INTERVAL,
- batch_size: BATCH_SIZE,
- track_jobs: true,
- primary_column_name: :issue_id
- )
- end
-
- def down
- # noop
- end
-end
diff --git a/db/post_migrate/20211004151202_remove_bio_html_from_user_details.rb b/db/post_migrate/20211004151202_remove_bio_html_from_user_details.rb
deleted file mode 100644
index d82589efc90..00000000000
--- a/db/post_migrate/20211004151202_remove_bio_html_from_user_details.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveBioHtmlFromUserDetails < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def change
- remove_column :user_details, :bio_html, :text, null: true
- remove_column :user_details, :cached_markdown_version, :integer, null: true
- end
-end
diff --git a/db/post_migrate/20211005010101_rereschedule_delete_orphaned_deployments.rb b/db/post_migrate/20211005010101_rereschedule_delete_orphaned_deployments.rb
deleted file mode 100644
index f49a0fe2f56..00000000000
--- a/db/post_migrate/20211005010101_rereschedule_delete_orphaned_deployments.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-class RerescheduleDeleteOrphanedDeployments < Gitlab::Database::Migration[1.0]
- MIGRATION = 'DeleteOrphanedDeployments'
- DELAY_INTERVAL = 2.minutes
-
- disable_ddl_transaction!
-
- # This is the third time to schedule `DeleteOrphanedDeployments` migration.
- # The first time failed by an inappropriate batch size and the second time failed by a retry bug.
- # Since there is no issue in this migration itself, we can simply requeue the
- # migration jobs **without** no-op-ing the previous migration.
- # See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/69051#note_669230405 for more information.
- def up
- delete_queued_jobs(MIGRATION)
-
- requeue_background_migration_jobs_by_range_at_intervals(MIGRATION, DELAY_INTERVAL)
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20211005083015_recreate_index_security_ci_builds_on_name_and_id_parser_features.rb b/db/post_migrate/20211005083015_recreate_index_security_ci_builds_on_name_and_id_parser_features.rb
deleted file mode 100644
index 9887752618d..00000000000
--- a/db/post_migrate/20211005083015_recreate_index_security_ci_builds_on_name_and_id_parser_features.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-class RecreateIndexSecurityCiBuildsOnNameAndIdParserFeatures < Gitlab::Database::Migration[1.0]
- TABLE = "ci_builds"
- OLD_INDEX_NAME = "index_security_ci_builds_on_name_and_id_parser_features"
- NEW_INDEX_NAME = "index_security_ci_builds_on_name_and_id_parser_features_broken"
- COLUMNS = %i[name id]
- CONSTRAINTS = "(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])
- ) AND type::text = 'Ci::Build'::text"
-
- enable_lock_retries!
-
- def up
- rename_index(TABLE, OLD_INDEX_NAME, NEW_INDEX_NAME)
- prepare_async_index TABLE, COLUMNS, name: OLD_INDEX_NAME, where: CONSTRAINTS
- end
-
- def down
- unprepare_async_index TABLE, COLUMNS, name: OLD_INDEX_NAME
- rename_index(TABLE, NEW_INDEX_NAME, OLD_INDEX_NAME)
- end
-end
diff --git a/db/post_migrate/20211005194425_schedule_requirements_migration.rb b/db/post_migrate/20211005194425_schedule_requirements_migration.rb
deleted file mode 100644
index 56211989b8e..00000000000
--- a/db/post_migrate/20211005194425_schedule_requirements_migration.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleRequirementsMigration < Gitlab::Database::Migration[1.0]
- DOWNTIME = false
-
- # 2021-10-05 requirements count: ~12500
- #
- # Using 30 as batch size and 120 seconds default interval will produce:
- # ~420 jobs - taking ~14 hours to perform
- BATCH_SIZE = 30
-
- MIGRATION = 'MigrateRequirementsToWorkItems'
-
- disable_ddl_transaction!
-
- class Requirement < ActiveRecord::Base
- 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/20211006060436_schedule_populate_topics_total_projects_count_cache.rb b/db/post_migrate/20211006060436_schedule_populate_topics_total_projects_count_cache.rb
deleted file mode 100644
index b14a9ab88b9..00000000000
--- a/db/post_migrate/20211006060436_schedule_populate_topics_total_projects_count_cache.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-class SchedulePopulateTopicsTotalProjectsCountCache < Gitlab::Database::Migration[1.0]
- MIGRATION = 'PopulateTopicsTotalProjectsCountCache'
- BATCH_SIZE = 10_000
- DELAY_INTERVAL = 2.minutes
-
- disable_ddl_transaction!
-
- def up
- queue_background_migration_jobs_by_range_at_intervals(
- define_batchable_model('topics'),
- MIGRATION,
- DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- track_jobs: true
- )
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20211006145004_finalize_indexes_for_ci_job_artifacts_expire_at_unlocked.rb b/db/post_migrate/20211006145004_finalize_indexes_for_ci_job_artifacts_expire_at_unlocked.rb
deleted file mode 100644
index b046ab6ab03..00000000000
--- a/db/post_migrate/20211006145004_finalize_indexes_for_ci_job_artifacts_expire_at_unlocked.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class FinalizeIndexesForCiJobArtifactsExpireAtUnlocked < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- TABLE_NAME = 'ci_job_artifacts'
- INDEX_NAME = 'ci_job_artifacts_expire_at_unlocked_idx'
-
- def up
- add_concurrent_index TABLE_NAME, [:expire_at], where: 'locked = 0', name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20211006174114_add_namespace_index_on_type_sync.rb b/db/post_migrate/20211006174114_add_namespace_index_on_type_sync.rb
deleted file mode 100644
index 0185e4cbc5e..00000000000
--- a/db/post_migrate/20211006174114_add_namespace_index_on_type_sync.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class AddNamespaceIndexOnTypeSync < Gitlab::Database::Migration[1.0]
- FULL_INDEX_NAME = 'index_namespaces_on_type_and_id'
- PARTIAL_INDEX_NAME = 'index_namespaces_on_type_and_id_partial'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :namespaces, [:type, :id], name: FULL_INDEX_NAME
-
- remove_concurrent_index_by_name :namespaces, name: PARTIAL_INDEX_NAME
- end
-
- def down
- add_concurrent_index(:namespaces, [:type, :id], where: 'type IS NOT NULL', name: PARTIAL_INDEX_NAME)
-
- remove_concurrent_index_by_name :namespaces, name: FULL_INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20211007093340_remove_analytics_snapshots_segment_id_column.rb b/db/post_migrate/20211007093340_remove_analytics_snapshots_segment_id_column.rb
deleted file mode 100644
index df0b8ef2a94..00000000000
--- a/db/post_migrate/20211007093340_remove_analytics_snapshots_segment_id_column.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveAnalyticsSnapshotsSegmentIdColumn < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- remove_column :analytics_devops_adoption_snapshots, :segment_id
- end
-
- def down
- add_column :analytics_devops_adoption_snapshots, :segment_id, :bigint, after: :id
- add_concurrent_foreign_key :analytics_devops_adoption_snapshots, :analytics_devops_adoption_segments,
- column: :segment_id, name: 'fk_rails_25da9a92c0', on_delete: :cascade
- add_concurrent_index :analytics_devops_adoption_snapshots, [:segment_id, :end_time], name: :index_on_snapshots_segment_id_end_time
- add_concurrent_index :analytics_devops_adoption_snapshots, [:segment_id, :recorded_at], name: :index_on_snapshots_segment_id_recorded_at
- end
-end
diff --git a/db/post_migrate/20211007155221_schedule_populate_status_column_of_security_scans.rb b/db/post_migrate/20211007155221_schedule_populate_status_column_of_security_scans.rb
deleted file mode 100644
index 04af23446fd..00000000000
--- a/db/post_migrate/20211007155221_schedule_populate_status_column_of_security_scans.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class SchedulePopulateStatusColumnOfSecurityScans < Gitlab::Database::Migration[1.0]
- def up
- # no-op
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20211011104843_add_new_loose_fk_index.rb b/db/post_migrate/20211011104843_add_new_loose_fk_index.rb
deleted file mode 100644
index 710d0917d7f..00000000000
--- a/db/post_migrate/20211011104843_add_new_loose_fk_index.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class AddNewLooseFkIndex < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::PartitioningMigrationHelpers
-
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_loose_foreign_keys_deleted_records_for_loading_records'
-
- def up
- add_concurrent_partitioned_index :loose_foreign_keys_deleted_records,
- %I[fully_qualified_table_name id primary_key_value partition],
- where: 'status = 1',
- name: INDEX_NAME
- end
-
- def down
- remove_concurrent_partitioned_index_by_name :loose_foreign_keys_deleted_records, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20211011152701_cleanup_delete_orphaned_deployments_background_migration.rb b/db/post_migrate/20211011152701_cleanup_delete_orphaned_deployments_background_migration.rb
deleted file mode 100644
index 82a0b1ac9c8..00000000000
--- a/db/post_migrate/20211011152701_cleanup_delete_orphaned_deployments_background_migration.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class CleanupDeleteOrphanedDeploymentsBackgroundMigration < Gitlab::Database::Migration[1.0]
- MIGRATION = 'DeleteOrphanedDeployments'
-
- disable_ddl_transaction!
-
- def up
- finalize_background_migration(MIGRATION)
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20211012051221_add_index_btree_namespaces_traversal_ids.rb b/db/post_migrate/20211012051221_add_index_btree_namespaces_traversal_ids.rb
deleted file mode 100644
index 882351ab974..00000000000
--- a/db/post_migrate/20211012051221_add_index_btree_namespaces_traversal_ids.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexBtreeNamespacesTraversalIds < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_btree_namespaces_traversal_ids'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :namespaces, :traversal_ids, using: :btree, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index :namespaces, :traversal_ids, name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20211012143815_remove_merge_request_diff_commit_columns.rb b/db/post_migrate/20211012143815_remove_merge_request_diff_commit_columns.rb
deleted file mode 100644
index 80ed834903c..00000000000
--- a/db/post_migrate/20211012143815_remove_merge_request_diff_commit_columns.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveMergeRequestDiffCommitColumns < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- COLUMNS = %i[author_name author_email committer_name committer_email].freeze
-
- def change
- COLUMNS.each do |column|
- remove_column(:merge_request_diff_commits, column, :text)
- end
- end
-end
diff --git a/db/post_migrate/20211012155931_remove_schedule_and_status_from_pending_alert_escalations.rb b/db/post_migrate/20211012155931_remove_schedule_and_status_from_pending_alert_escalations.rb
deleted file mode 100644
index e895ab6b9a0..00000000000
--- a/db/post_migrate/20211012155931_remove_schedule_and_status_from_pending_alert_escalations.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveScheduleAndStatusFromPendingAlertEscalations < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::PartitioningMigrationHelpers
-
- disable_ddl_transaction!
-
- ESCALATIONS_TABLE = :incident_management_pending_alert_escalations
- SCHEDULES_TABLE = :incident_management_oncall_schedules
- INDEX_NAME = 'index_incident_management_pending_alert_escalations_on_schedule'
- CONSTRAINT_NAME = 'fk_rails_fcbfd9338b'
-
- def up
- with_lock_retries do
- remove_column ESCALATIONS_TABLE, :schedule_id
- remove_column ESCALATIONS_TABLE, :status
- end
- end
-
- def down
- with_lock_retries do
- add_column ESCALATIONS_TABLE, :schedule_id, :bigint unless column_exists?(ESCALATIONS_TABLE, :schedule_id)
- add_column ESCALATIONS_TABLE, :status, :smallint unless column_exists?(ESCALATIONS_TABLE, :status)
- end
-
- add_concurrent_partitioned_index ESCALATIONS_TABLE, :schedule_id, name: INDEX_NAME
- add_concurrent_partitioned_foreign_key ESCALATIONS_TABLE, SCHEDULES_TABLE, column: :schedule_id, name: CONSTRAINT_NAME
- end
-end
diff --git a/db/post_migrate/20211013125341_create_index_security_ci_builds_on_name_and_id_parser_features.rb b/db/post_migrate/20211013125341_create_index_security_ci_builds_on_name_and_id_parser_features.rb
deleted file mode 100644
index 2efbfad6c56..00000000000
--- a/db/post_migrate/20211013125341_create_index_security_ci_builds_on_name_and_id_parser_features.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# frozen_string_literal: true
-
-class CreateIndexSecurityCiBuildsOnNameAndIdParserFeatures < Gitlab::Database::Migration[1.0]
- TABLE = "ci_builds"
- COLUMNS = %i[name id]
- INDEX_NAME = "index_security_ci_builds_on_name_and_id_parser_features"
- CONSTRAINTS = "(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])
- ) AND type::text = 'Ci::Build'::text"
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index(TABLE, COLUMNS, name: INDEX_NAME, where: CONSTRAINTS)
- end
-
- def down
- remove_concurrent_index(TABLE, COLUMNS, name: INDEX_NAME, where: CONSTRAINTS)
- end
-end
diff --git a/db/post_migrate/20211018101552_add_index_to_tmp_project_id_column_on_namespaces_table.rb b/db/post_migrate/20211018101552_add_index_to_tmp_project_id_column_on_namespaces_table.rb
deleted file mode 100644
index b50b7fa21a5..00000000000
--- a/db/post_migrate/20211018101552_add_index_to_tmp_project_id_column_on_namespaces_table.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexToTmpProjectIdColumnOnNamespacesTable < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'tmp_index_on_tmp_project_id_on_namespaces'
-
- def up
- add_concurrent_index :namespaces, :tmp_project_id, name: INDEX_NAME, unique: true
- end
-
- def down
- remove_concurrent_index_by_name :namespaces, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20211018101852_add_fk_to_tmp_project_id_column_on_namespaces_table.rb b/db/post_migrate/20211018101852_add_fk_to_tmp_project_id_column_on_namespaces_table.rb
deleted file mode 100644
index f2772389d02..00000000000
--- a/db/post_migrate/20211018101852_add_fk_to_tmp_project_id_column_on_namespaces_table.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddFkToTmpProjectIdColumnOnNamespacesTable < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_concurrent_foreign_key :namespaces, :projects, column: :tmp_project_id
- end
-
- def down
- remove_foreign_key :namespaces, column: :tmp_project_id
- end
-end
diff --git a/db/post_migrate/20211018102252_add_index_to_group_id_column_on_webhooks_table.rb b/db/post_migrate/20211018102252_add_index_to_group_id_column_on_webhooks_table.rb
deleted file mode 100644
index d5fac373ca4..00000000000
--- a/db/post_migrate/20211018102252_add_index_to_group_id_column_on_webhooks_table.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexToGroupIdColumnOnWebhooksTable < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_on_group_id_on_webhooks'
-
- def up
- add_concurrent_index :web_hooks, :group_id, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :web_hooks, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20211018123316_remove_not_null_constraint_and_default_for_public_email.rb b/db/post_migrate/20211018123316_remove_not_null_constraint_and_default_for_public_email.rb
deleted file mode 100644
index 72a5970b6d7..00000000000
--- a/db/post_migrate/20211018123316_remove_not_null_constraint_and_default_for_public_email.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveNotNullConstraintAndDefaultForPublicEmail < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def up
- change_column_null :users, :public_email, true
- change_column_default :users, :public_email, from: '', to: nil
- end
-
- def down
- # There may now be nulls in the table, so we cannot re-add the constraint here.
- change_column_default :users, :public_email, from: nil, to: ''
- end
-end
diff --git a/db/post_migrate/20211018152654_schedule_remove_duplicate_vulnerabilities_findings3.rb b/db/post_migrate/20211018152654_schedule_remove_duplicate_vulnerabilities_findings3.rb
deleted file mode 100644
index ecad4466c53..00000000000
--- a/db/post_migrate/20211018152654_schedule_remove_duplicate_vulnerabilities_findings3.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleRemoveDuplicateVulnerabilitiesFindings3 < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- MIGRATION = 'RemoveDuplicateVulnerabilitiesFindings'
- DELAY_INTERVAL = 2.minutes.to_i
- BATCH_SIZE = 5_000
-
- def up
- queue_background_migration_jobs_by_range_at_intervals(
- define_batchable_model('vulnerability_occurrences'),
- MIGRATION,
- DELAY_INTERVAL,
- batch_size: BATCH_SIZE
- )
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20211021131217_add_deployments_environment_id_and_ref_index.rb b/db/post_migrate/20211021131217_add_deployments_environment_id_and_ref_index.rb
deleted file mode 100644
index 8014c006f35..00000000000
--- a/db/post_migrate/20211021131217_add_deployments_environment_id_and_ref_index.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddDeploymentsEnvironmentIdAndRefIndex < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_deployments_on_environment_id_and_ref'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :deployments, [:environment_id, :ref], name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :deployments, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20211021140426_remove_geo_upload_deprecated_fields.rb b/db/post_migrate/20211021140426_remove_geo_upload_deprecated_fields.rb
deleted file mode 100644
index 7d0033c0ab9..00000000000
--- a/db/post_migrate/20211021140426_remove_geo_upload_deprecated_fields.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveGeoUploadDeprecatedFields < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- remove_column :geo_event_log, :upload_deleted_event_id, :bigint
- end
- end
-
- def down
- with_lock_retries do
- add_column(:geo_event_log, :upload_deleted_event_id, :bigint) unless column_exists?(:geo_event_log, :upload_deleted_event_id)
- end
-
- add_concurrent_foreign_key :geo_event_log, :geo_upload_deleted_events,
- column: :upload_deleted_event_id,
- name: 'fk_c1f241c70d',
- on_delete: :cascade
-
- add_concurrent_index :geo_event_log,
- :upload_deleted_event_id,
- name: 'index_geo_event_log_on_upload_deleted_event_id',
- where: "(upload_deleted_event_id IS NOT NULL)"
- end
-end
diff --git a/db/post_migrate/20211021141930_drop_geo_upload_deleted_events_table.rb b/db/post_migrate/20211021141930_drop_geo_upload_deleted_events_table.rb
deleted file mode 100644
index b6987e68fb1..00000000000
--- a/db/post_migrate/20211021141930_drop_geo_upload_deleted_events_table.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class DropGeoUploadDeletedEventsTable < Gitlab::Database::Migration[1.0]
- def up
- drop_table :geo_upload_deleted_events
- end
-
- def down
- create_table :geo_upload_deleted_events, id: :bigserial do |t|
- t.integer :upload_id, null: false, index: true
- t.string :file_path, null: false
- t.integer :model_id, null: false
- t.string :model_type, null: false
- t.string :uploader, null: false
- end
- end
-end
diff --git a/db/post_migrate/20211022112202_add_cluster_id_location_index_to_vulnerability_occurrences.rb b/db/post_migrate/20211022112202_add_cluster_id_location_index_to_vulnerability_occurrences.rb
deleted file mode 100644
index 9c40e81f527..00000000000
--- a/db/post_migrate/20211022112202_add_cluster_id_location_index_to_vulnerability_occurrences.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddClusterIdLocationIndexToVulnerabilityOccurrences < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_vulnerability_occurrences_on_location_cluster_id'
-
- def up
- add_concurrent_index :vulnerability_occurrences, "(location -> 'cluster_id')",
- using: 'GIN',
- where: 'report_type = 7',
- name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :vulnerability_occurrences, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20211022113000_drop_index_security_ci_builds_on_name_and_id_parser_features_broken.rb b/db/post_migrate/20211022113000_drop_index_security_ci_builds_on_name_and_id_parser_features_broken.rb
deleted file mode 100644
index 9ee1b10a072..00000000000
--- a/db/post_migrate/20211022113000_drop_index_security_ci_builds_on_name_and_id_parser_features_broken.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# frozen_string_literal: true
-
-class DropIndexSecurityCiBuildsOnNameAndIdParserFeaturesBroken < Gitlab::Database::Migration[1.0]
- TABLE = "ci_builds"
- COLUMNS = %i[name id]
- INDEX_NAME = "index_security_ci_builds_on_name_and_id_parser_features_broken"
- CONSTRAINTS = "(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])
- ) AND type::text = 'Ci::Build'::text"
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index(TABLE, COLUMNS, name: INDEX_NAME, where: CONSTRAINTS)
- end
-
- def down
- add_concurrent_index(TABLE, COLUMNS, name: INDEX_NAME, where: CONSTRAINTS)
- end
-end
diff --git a/db/post_migrate/20211022160154_remove_outdated_fields_from_geo_node_status.rb b/db/post_migrate/20211022160154_remove_outdated_fields_from_geo_node_status.rb
deleted file mode 100644
index 5b117f9e4b8..00000000000
--- a/db/post_migrate/20211022160154_remove_outdated_fields_from_geo_node_status.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveOutdatedFieldsFromGeoNodeStatus < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def change
- remove_column :geo_node_statuses, :attachments_count, :integer
- remove_column :geo_node_statuses, :attachments_synced_count, :integer
- remove_column :geo_node_statuses, :attachments_failed_count, :integer
- remove_column :geo_node_statuses, :attachments_synced_missing_on_primary_count, :integer
- end
-end
diff --git a/db/post_migrate/20211022214523_schedule_recalculate_vulnerability_finding_signatures_for_findings.rb b/db/post_migrate/20211022214523_schedule_recalculate_vulnerability_finding_signatures_for_findings.rb
deleted file mode 100644
index 105d5ec98f4..00000000000
--- a/db/post_migrate/20211022214523_schedule_recalculate_vulnerability_finding_signatures_for_findings.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleRecalculateVulnerabilityFindingSignaturesForFindings < Gitlab::Database::Migration[1.0]
- MIGRATION = 'RecalculateVulnerabilityFindingSignaturesForFindings'
- BATCH_SIZE = 1_000
- DELAY_INTERVAL = 2.minutes
-
- disable_ddl_transaction!
-
- def up
- # no-op based on https://docs.gitlab.com/ee/development/background_migrations.html#rescheduling-background-migrations
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20211023102243_schedule_delete_invalid_epic_issues.rb b/db/post_migrate/20211023102243_schedule_delete_invalid_epic_issues.rb
deleted file mode 100644
index e08ad8d89d1..00000000000
--- a/db/post_migrate/20211023102243_schedule_delete_invalid_epic_issues.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleDeleteInvalidEpicIssues < Gitlab::Database::Migration[1.0]
- # This is a now a no-op
- # See https://gitlab.com/gitlab-org/gitlab/-/issues/348477
-
- def up
- # no-op
- end
-
- def down
- # also no-op
- end
-end
diff --git a/db/post_migrate/20211026070408_backfill_issue_search_data.rb b/db/post_migrate/20211026070408_backfill_issue_search_data.rb
deleted file mode 100644
index a2cf7b36a59..00000000000
--- a/db/post_migrate/20211026070408_backfill_issue_search_data.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class BackfillIssueSearchData < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- MIGRATION = 'BackfillIssueSearchData'
-
- def up
- queue_batched_background_migration(
- MIGRATION,
- :issues,
- :id,
- batch_size: 100_000,
- sub_batch_size: 1_000,
- job_interval: 5.minutes
- )
- end
-
- def down
- delete_batched_background_migration(MIGRATION, :issues, :id, [])
- end
-end
diff --git a/db/post_migrate/20211027043206_track_ci_pipeline_deletions.rb b/db/post_migrate/20211027043206_track_ci_pipeline_deletions.rb
deleted file mode 100644
index 3836159c2cd..00000000000
--- a/db/post_migrate/20211027043206_track_ci_pipeline_deletions.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class TrackCiPipelineDeletions < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::MigrationHelpers::LooseForeignKeyHelpers
-
- enable_lock_retries!
-
- def up
- track_record_deletions(:ci_pipelines)
- end
-
- def down
- untrack_record_deletions(:ci_pipelines)
- end
-end
diff --git a/db/post_migrate/20211027043229_track_ci_build_deletions.rb b/db/post_migrate/20211027043229_track_ci_build_deletions.rb
deleted file mode 100644
index b76d5f3261c..00000000000
--- a/db/post_migrate/20211027043229_track_ci_build_deletions.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class TrackCiBuildDeletions < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::MigrationHelpers::LooseForeignKeyHelpers
-
- enable_lock_retries!
-
- def up
- track_record_deletions(:ci_builds)
- end
-
- def down
- untrack_record_deletions(:ci_builds)
- end
-end
diff --git a/db/post_migrate/20211027064021_track_deletions_in_ci_runners.rb b/db/post_migrate/20211027064021_track_deletions_in_ci_runners.rb
deleted file mode 100644
index 14cf305fb2e..00000000000
--- a/db/post_migrate/20211027064021_track_deletions_in_ci_runners.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class TrackDeletionsInCiRunners < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::MigrationHelpers::LooseForeignKeyHelpers
-
- enable_lock_retries!
-
- def up
- track_record_deletions(:ci_runners)
- end
-
- def down
- untrack_record_deletions(:ci_runners)
- end
-end
diff --git a/db/post_migrate/20211027064156_track_deletions_in_chat_names.rb b/db/post_migrate/20211027064156_track_deletions_in_chat_names.rb
deleted file mode 100644
index 1c8f9d5196a..00000000000
--- a/db/post_migrate/20211027064156_track_deletions_in_chat_names.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class TrackDeletionsInChatNames < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::MigrationHelpers::LooseForeignKeyHelpers
-
- enable_lock_retries!
-
- def up
- track_record_deletions(:chat_names)
- end
-
- def down
- untrack_record_deletions(:chat_names)
- end
-end
diff --git a/db/post_migrate/20211027112901_drop_index_keys_on_expires_at_and_before_expiry_notification_undelivered.rb b/db/post_migrate/20211027112901_drop_index_keys_on_expires_at_and_before_expiry_notification_undelivered.rb
deleted file mode 100644
index 3447c4da81a..00000000000
--- a/db/post_migrate/20211027112901_drop_index_keys_on_expires_at_and_before_expiry_notification_undelivered.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class DropIndexKeysOnExpiresAtAndBeforeExpiryNotificationUndelivered < Gitlab::Database::Migration[1.0]
- DOWNTIME = false
- INDEX_NAME = 'index_keys_on_expires_at_and_expiry_notification_undelivered'
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name(:keys, INDEX_NAME)
- end
-
- def down
- add_concurrent_index :keys,
- "date(timezone('UTC', expires_at)), expiry_notification_delivered_at",
- where: 'expiry_notification_delivered_at IS NULL', name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20211027204011_remove_index_for_dormant_users.rb b/db/post_migrate/20211027204011_remove_index_for_dormant_users.rb
deleted file mode 100644
index 5e556fe1f32..00000000000
--- a/db/post_migrate/20211027204011_remove_index_for_dormant_users.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveIndexForDormantUsers < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_users_on_id_and_last_activity_on_for_non_internal_active'
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :users, INDEX_NAME
- end
-
- def down
- index_condition = "state = 'active' AND (users.user_type IS NULL OR users.user_type IN (NULL, 6, 4))"
-
- add_concurrent_index :users, [:id, :last_activity_on], where: index_condition, name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20211028085926_add_occurrence_id_id_desc_index_to_vulnerability_occurrence_pipelines.rb b/db/post_migrate/20211028085926_add_occurrence_id_id_desc_index_to_vulnerability_occurrence_pipelines.rb
deleted file mode 100644
index 1f03e39aa81..00000000000
--- a/db/post_migrate/20211028085926_add_occurrence_id_id_desc_index_to_vulnerability_occurrence_pipelines.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-class AddOccurrenceIdIdDescIndexToVulnerabilityOccurrencePipelines < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = "index_vulnerability_occurrence_pipelines_occurrence_id_and_id"
-
- def up
- add_concurrent_index(
- :vulnerability_occurrence_pipelines,
- [:occurrence_id, :id],
- order: { id: :desc },
- name: INDEX_NAME
- )
- end
-
- def down
- remove_concurrent_index_by_name(
- :vulnerability_occurrence_pipelines,
- INDEX_NAME
- )
- end
-end
diff --git a/db/post_migrate/20211028100303_tmp_index_for_delete_issue_merge_request_taggings_records.rb b/db/post_migrate/20211028100303_tmp_index_for_delete_issue_merge_request_taggings_records.rb
deleted file mode 100644
index 98984239ca4..00000000000
--- a/db/post_migrate/20211028100303_tmp_index_for_delete_issue_merge_request_taggings_records.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class TmpIndexForDeleteIssueMergeRequestTaggingsRecords < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'tmp_index_taggings_on_id_where_taggable_type_issue_mr'
- INDEX_CONDITION = "taggable_type IN ('Issue', 'MergeRequest')"
-
- def up
- add_concurrent_index :taggings, :id, where: INDEX_CONDITION, name: INDEX_NAME # rubocop:disable Migration/PreventIndexCreation
- end
-
- def down
- remove_concurrent_index_by_name :taggings, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20211028100843_delete_issue_merge_request_taggings_records.rb b/db/post_migrate/20211028100843_delete_issue_merge_request_taggings_records.rb
deleted file mode 100644
index a53f5a4fc25..00000000000
--- a/db/post_migrate/20211028100843_delete_issue_merge_request_taggings_records.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-class DeleteIssueMergeRequestTaggingsRecords < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'tmp_index_taggings_on_id_where_taggable_type_issue_mr'
-
- BATCH_SIZE = 3_000
- TAGGABLE_TYPES = %w(Issue MergeRequest)
-
- class Tagging < ActiveRecord::Base
- self.table_name = "taggings"
- end
-
- def up
- sleep 2 while Tagging.where(taggable_type: TAGGABLE_TYPES).limit(BATCH_SIZE).delete_all > 0
-
- remove_concurrent_index_by_name :taggings, INDEX_NAME
- end
-
- def down
- end
-end
diff --git a/db/post_migrate/20211028123412_add_async_index_on_events_using_btree_created_at_id.rb b/db/post_migrate/20211028123412_add_async_index_on_events_using_btree_created_at_id.rb
deleted file mode 100644
index 03e461dfcd0..00000000000
--- a/db/post_migrate/20211028123412_add_async_index_on_events_using_btree_created_at_id.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class AddAsyncIndexOnEventsUsingBtreeCreatedAtId < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_events_on_created_at_and_id'
- TABLE = :events
- COLUMNS = %i[created_at id]
- CONSTRAINTS = "created_at > '2021-08-27'"
-
- def up
- prepare_async_index TABLE, COLUMNS, name: INDEX_NAME, where: CONSTRAINTS
- end
-
- def down
- unprepare_async_index TABLE, COLUMNS, name: INDEX_NAME, where: CONSTRAINTS
- end
-end
diff --git a/db/post_migrate/20211028155449_schedule_fix_merge_request_diff_commit_users_migration.rb b/db/post_migrate/20211028155449_schedule_fix_merge_request_diff_commit_users_migration.rb
deleted file mode 100644
index 659cb7b76b2..00000000000
--- a/db/post_migrate/20211028155449_schedule_fix_merge_request_diff_commit_users_migration.rb
+++ /dev/null
@@ -1,55 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleFixMergeRequestDiffCommitUsersMigration < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- MIGRATION_CLASS = 'FixMergeRequestDiffCommitUsers'
-
- class Project < ApplicationRecord
- include EachBatch
-
- self.table_name = 'projects'
- end
-
- def up
- # This is the day on which we merged
- # https://gitlab.com/gitlab-org/gitlab/-/merge_requests/63669. Since the
- # deploy of this MR we may have imported projects using the old format, but
- # after their merge_request_diff_id range had been migrated by Sidekiq. As a
- # result, there may be rows without a committer_id or commit_author_id
- # field.
- date = '2021-07-07 00:00:00'
-
- transaction do
- Project.each_batch(of: 10_000) do |batch|
- time = Time.now.utc
- rows = batch
- .where('created_at >= ?', date)
- .where(import_type: 'gitlab_project')
- .pluck(:id)
- .map do |id|
- Gitlab::Database::BackgroundMigrationJob.new(
- class_name: MIGRATION_CLASS,
- arguments: [id],
- created_at: time,
- updated_at: time
- )
- end
-
- Gitlab::Database::BackgroundMigrationJob
- .bulk_insert!(rows, validate: false)
- end
- end
-
- job = Gitlab::Database::BackgroundMigrationJob
- .for_migration_class(MIGRATION_CLASS)
- .pending
- .first
-
- migrate_in(2.minutes, MIGRATION_CLASS, job.arguments) if job
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20211029102822_add_open_source_plan.rb b/db/post_migrate/20211029102822_add_open_source_plan.rb
deleted file mode 100644
index bb65637ffca..00000000000
--- a/db/post_migrate/20211029102822_add_open_source_plan.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-# frozen_string_literal: true
-
-class AddOpenSourcePlan < Gitlab::Database::Migration[1.0]
- class Plan < ActiveRecord::Base
- self.inheritance_column = :_type_disabled
-
- has_one :limits, class_name: 'PlanLimits'
-
- def actual_limits
- self.limits || self.build_limits
- end
- end
-
- class PlanLimits < ActiveRecord::Base
- self.inheritance_column = :_type_disabled
-
- belongs_to :plan
- end
-
- def create_plan_limits(plan_limit_name, plan)
- plan_limit = Plan.find_or_initialize_by(name: plan_limit_name).actual_limits.dup
- plan_limit.plan = plan
- plan_limit.save!
- end
-
- def up
- return unless Gitlab.com?
-
- opensource = Plan.create!(name: 'opensource', title: 'Open Source Program')
-
- create_plan_limits('ultimate', opensource)
- end
-
- def down
- return unless Gitlab.com?
-
- Plan.where(name: 'opensource').delete_all
- end
-end
diff --git a/db/post_migrate/20211031152417_add_indexes_to_issue_stage_events.rb b/db/post_migrate/20211031152417_add_indexes_to_issue_stage_events.rb
deleted file mode 100644
index 73b70ad1e27..00000000000
--- a/db/post_migrate/20211031152417_add_indexes_to_issue_stage_events.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexesToIssueStageEvents < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::PartitioningMigrationHelpers
-
- disable_ddl_transaction!
-
- GROUP_INDEX_NAME = 'index_issue_stage_events_group_duration'
- GROUP_IN_PROGRESS_INDEX_NAME = 'index_issue_stage_events_group_in_progress_duration'
- PROJECT_INDEX_NAME = 'index_issue_stage_events_project_duration'
- PROJECT_IN_PROGRESS_INDEX_NAME = 'index_issue_stage_events_project_in_progress_duration'
-
- def up
- add_concurrent_partitioned_index :analytics_cycle_analytics_issue_stage_events,
- 'stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp',
- where: 'end_event_timestamp IS NOT NULL',
- name: GROUP_INDEX_NAME
-
- add_concurrent_partitioned_index :analytics_cycle_analytics_issue_stage_events,
- 'stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp',
- where: 'end_event_timestamp IS NOT NULL',
- name: PROJECT_INDEX_NAME
-
- add_concurrent_partitioned_index :analytics_cycle_analytics_issue_stage_events,
- 'stage_event_hash_id, group_id, start_event_timestamp, issue_id',
- where: 'end_event_timestamp IS NULL AND state_id = 1',
- name: GROUP_IN_PROGRESS_INDEX_NAME
-
- add_concurrent_partitioned_index :analytics_cycle_analytics_issue_stage_events,
- 'stage_event_hash_id, project_id, start_event_timestamp, issue_id',
- where: 'end_event_timestamp IS NULL AND state_id = 1',
- name: PROJECT_IN_PROGRESS_INDEX_NAME
- end
-
- def down
- remove_concurrent_partitioned_index_by_name :analytics_cycle_analytics_issue_stage_events, GROUP_INDEX_NAME
- remove_concurrent_partitioned_index_by_name :analytics_cycle_analytics_issue_stage_events, PROJECT_INDEX_NAME
- remove_concurrent_partitioned_index_by_name :analytics_cycle_analytics_issue_stage_events, GROUP_IN_PROGRESS_INDEX_NAME
- remove_concurrent_partitioned_index_by_name :analytics_cycle_analytics_issue_stage_events, PROJECT_IN_PROGRESS_INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20211031154919_add_indexes_to_merge_request_stage_events.rb b/db/post_migrate/20211031154919_add_indexes_to_merge_request_stage_events.rb
deleted file mode 100644
index 9cc9d73c968..00000000000
--- a/db/post_migrate/20211031154919_add_indexes_to_merge_request_stage_events.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexesToMergeRequestStageEvents < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::PartitioningMigrationHelpers
-
- disable_ddl_transaction!
-
- GROUP_INDEX_NAME = 'index_merge_request_stage_events_group_duration'
- GROUP_IN_PROGRESS_INDEX_NAME = 'index_merge_request_stage_events_group_in_progress_duration'
- PROJECT_INDEX_NAME = 'index_merge_request_stage_events_project_duration'
- PROJECT_IN_PROGRESS_INDEX_NAME = 'index_merge_request_stage_events_project_in_progress_duration'
-
- def up
- add_concurrent_partitioned_index :analytics_cycle_analytics_merge_request_stage_events,
- 'stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp',
- where: 'end_event_timestamp IS NOT NULL',
- name: GROUP_INDEX_NAME
-
- add_concurrent_partitioned_index :analytics_cycle_analytics_merge_request_stage_events,
- 'stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp',
- where: 'end_event_timestamp IS NOT NULL',
- name: PROJECT_INDEX_NAME
-
- add_concurrent_partitioned_index :analytics_cycle_analytics_merge_request_stage_events,
- 'stage_event_hash_id, group_id, start_event_timestamp, merge_request_id',
- where: 'end_event_timestamp IS NULL AND state_id = 1',
- name: GROUP_IN_PROGRESS_INDEX_NAME
-
- add_concurrent_partitioned_index :analytics_cycle_analytics_merge_request_stage_events,
- 'stage_event_hash_id, project_id, start_event_timestamp, merge_request_id',
- where: 'end_event_timestamp IS NULL AND state_id = 1',
- name: PROJECT_IN_PROGRESS_INDEX_NAME
- end
-
- def down
- remove_concurrent_partitioned_index_by_name :analytics_cycle_analytics_merge_request_stage_events, GROUP_INDEX_NAME
- remove_concurrent_partitioned_index_by_name :analytics_cycle_analytics_merge_request_stage_events, PROJECT_INDEX_NAME
- remove_concurrent_partitioned_index_by_name :analytics_cycle_analytics_merge_request_stage_events, GROUP_IN_PROGRESS_INDEX_NAME
- remove_concurrent_partitioned_index_by_name :analytics_cycle_analytics_merge_request_stage_events, PROJECT_IN_PROGRESS_INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20211101222614_consume_remaining_user_namespace_jobs.rb b/db/post_migrate/20211101222614_consume_remaining_user_namespace_jobs.rb
deleted file mode 100644
index ded9e717bb1..00000000000
--- a/db/post_migrate/20211101222614_consume_remaining_user_namespace_jobs.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# frozen_string_literal: true
-
-class ConsumeRemainingUserNamespaceJobs < Gitlab::Database::Migration[1.0]
- MIGRATION = 'BackfillUserNamespace'
- BATCH_SIZE = 200
- DEFAULT_VALUE = 'User'
-
- disable_ddl_transaction!
-
- def up
- Gitlab::BackgroundMigration.steal(MIGRATION)
-
- # Do a manual update in case we lost BG jobs. The expected record count should be 0 or very low.
- define_batchable_model('namespaces').where(type: nil).each_batch(of: BATCH_SIZE) do |batch|
- min, max = batch.pluck('MIN(id), MAX(id)').flatten
-
- Gitlab::BackgroundMigration::BackfillUserNamespace.new.perform(min, max, :namespaces, :id, BATCH_SIZE, 0)
- end
-
- change_column_null :namespaces, :type, false
- end
-
- def down
- change_column_null :namespaces, :type, true
- end
-end
diff --git a/db/post_migrate/20211102103127_add_temp_index_to_vulnerability_occurrences.rb b/db/post_migrate/20211102103127_add_temp_index_to_vulnerability_occurrences.rb
deleted file mode 100644
index 4aee79950dc..00000000000
--- a/db/post_migrate/20211102103127_add_temp_index_to_vulnerability_occurrences.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddTempIndexToVulnerabilityOccurrences < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'vulnerability_occurrences_location_temp_index'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :vulnerability_occurrences, :id, where: 'location IS NULL', name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :vulnerability_occurrences, name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20211102114802_update_vulnerability_occurrences_location.rb b/db/post_migrate/20211102114802_update_vulnerability_occurrences_location.rb
deleted file mode 100644
index 44e2630af06..00000000000
--- a/db/post_migrate/20211102114802_update_vulnerability_occurrences_location.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# frozen_string_literal: true
-
-class UpdateVulnerabilityOccurrencesLocation < Gitlab::Database::Migration[1.0]
- BATCH_SIZE = 20_000
- DELAY_INTERVAL = 3.minutes
- MIGRATION_NAME = 'UpdateVulnerabilityOccurrencesLocation'
-
- disable_ddl_transaction!
-
- def up
- return unless Gitlab.ee?
-
- relation = Gitlab::BackgroundMigration::UpdateVulnerabilityOccurrencesLocation::Occurrence.where(location: nil)
- queue_background_migration_jobs_by_range_at_intervals(relation,
- MIGRATION_NAME,
- DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- track_jobs: true)
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20211103141403_remove_propagate_service_template_worker.rb b/db/post_migrate/20211103141403_remove_propagate_service_template_worker.rb
deleted file mode 100644
index d949641dbce..00000000000
--- a/db/post_migrate/20211103141403_remove_propagate_service_template_worker.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class RemovePropagateServiceTemplateWorker < Gitlab::Database::Migration[1.0]
- def up
- Sidekiq::Queue.new('propagate_service_template').clear
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20211103162025_add_index_on_events_using_btree_created_at_id.rb b/db/post_migrate/20211103162025_add_index_on_events_using_btree_created_at_id.rb
deleted file mode 100644
index 33d5833db1a..00000000000
--- a/db/post_migrate/20211103162025_add_index_on_events_using_btree_created_at_id.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexOnEventsUsingBtreeCreatedAtId < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_events_on_created_at_and_id'
- TABLE = :events
- COLUMNS = %i[created_at id]
- CONSTRAINTS = "created_at > '2021-08-27 00:00:00+00'"
- disable_ddl_transaction!
-
- def up
- add_concurrent_index TABLE, COLUMNS, name: INDEX_NAME, where: CONSTRAINTS
- end
-
- def down
- remove_concurrent_index TABLE, COLUMNS, name: INDEX_NAME, where: CONSTRAINTS
- end
-end
diff --git a/db/post_migrate/20211103184303_drop_runner_features_from_ci_builds_metadata.rb b/db/post_migrate/20211103184303_drop_runner_features_from_ci_builds_metadata.rb
deleted file mode 100644
index 00580b2f933..00000000000
--- a/db/post_migrate/20211103184303_drop_runner_features_from_ci_builds_metadata.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class DropRunnerFeaturesFromCiBuildsMetadata < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def up
- remove_column :ci_builds_metadata, :runner_features
- end
-
- def down
- add_column :ci_builds_metadata, :runner_features, :jsonb, default: {}, null: false
- end
-end
diff --git a/db/post_migrate/20211104044453_remove_redundant_events_index.rb b/db/post_migrate/20211104044453_remove_redundant_events_index.rb
deleted file mode 100644
index 54e71e1b54b..00000000000
--- a/db/post_migrate/20211104044453_remove_redundant_events_index.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveRedundantEventsIndex < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :events, :index_events_on_target_type_and_target_id
- end
-
- def down
- add_concurrent_index :events, [:target_type, :target_id], name: :index_events_on_target_type_and_target_id
- end
-end
diff --git a/db/post_migrate/20211104165220_remove_vulnerability_finding_links.rb b/db/post_migrate/20211104165220_remove_vulnerability_finding_links.rb
deleted file mode 100644
index 1625d24ef92..00000000000
--- a/db/post_migrate/20211104165220_remove_vulnerability_finding_links.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveVulnerabilityFindingLinks < Gitlab::Database::Migration[1.0]
- # This migration has been moved to a TRUNCATE in db/post_migrate/20220201193033_add_unique_index_to_vulnerability_finding_links_with_truncate.rb
- # Previously, this was causing an bug where there was a conflict between the table cleanup and the index creation.
-
- def up
- # no op
- end
-
- def down
- # no op
- end
-end
diff --git a/db/post_migrate/20211105135157_drop_ci_build_trace_sections.rb b/db/post_migrate/20211105135157_drop_ci_build_trace_sections.rb
deleted file mode 100644
index 1595068952d..00000000000
--- a/db/post_migrate/20211105135157_drop_ci_build_trace_sections.rb
+++ /dev/null
@@ -1,99 +0,0 @@
-# frozen_string_literal: true
-
-class DropCiBuildTraceSections < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::SchemaHelpers
-
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- remove_foreign_key_if_exists(:dep_ci_build_trace_sections, column: :project_id)
- end
-
- with_lock_retries do
- remove_foreign_key_if_exists(:dep_ci_build_trace_section_names, column: :project_id)
- end
-
- if table_exists?(:dep_ci_build_trace_sections)
- with_lock_retries do
- drop_table :dep_ci_build_trace_sections
- end
- end
-
- if table_exists?(:dep_ci_build_trace_section_names)
- with_lock_retries do
- drop_table :dep_ci_build_trace_section_names
- end
- end
-
- drop_function('trigger_91dc388a5fe6')
- end
-
- def down
- execute(<<~SQL)
- CREATE OR REPLACE FUNCTION trigger_91dc388a5fe6() RETURNS trigger
- LANGUAGE plpgsql
- AS $$
- BEGIN
- NEW."build_id_convert_to_bigint" := NEW."build_id";
- RETURN NEW;
- END;
- $$;
- SQL
-
- execute_in_transaction(<<~SQL, !table_exists?(:dep_ci_build_trace_section_names))
- CREATE TABLE dep_ci_build_trace_section_names (
- id integer NOT NULL,
- project_id integer NOT NULL,
- name character varying NOT NULL
- );
-
- CREATE SEQUENCE dep_ci_build_trace_section_names_id_seq
- AS integer
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
-
- ALTER SEQUENCE dep_ci_build_trace_section_names_id_seq OWNED BY dep_ci_build_trace_section_names.id;
-
- ALTER TABLE ONLY dep_ci_build_trace_section_names ALTER COLUMN id SET DEFAULT nextval('dep_ci_build_trace_section_names_id_seq'::regclass);
- ALTER TABLE ONLY dep_ci_build_trace_section_names ADD CONSTRAINT dep_ci_build_trace_section_names_pkey PRIMARY KEY (id);
- SQL
-
- execute_in_transaction(<<~SQL, !table_exists?(:dep_ci_build_trace_sections))
- CREATE TABLE dep_ci_build_trace_sections (
- project_id integer NOT NULL,
- date_start timestamp without time zone NOT NULL,
- date_end timestamp without time zone NOT NULL,
- byte_start bigint NOT NULL,
- byte_end bigint NOT NULL,
- build_id integer NOT NULL,
- section_name_id integer NOT NULL,
- build_id_convert_to_bigint bigint DEFAULT 0 NOT NULL
- );
-
- ALTER TABLE ONLY dep_ci_build_trace_sections ADD CONSTRAINT ci_build_trace_sections_pkey PRIMARY KEY (build_id, section_name_id);
- CREATE TRIGGER trigger_91dc388a5fe6 BEFORE INSERT OR UPDATE ON dep_ci_build_trace_sections FOR EACH ROW EXECUTE FUNCTION trigger_91dc388a5fe6();
- SQL
-
- add_concurrent_index :dep_ci_build_trace_section_names, [:project_id, :name], unique: true, name: 'index_dep_ci_build_trace_section_names_on_project_id_and_name'
- add_concurrent_index :dep_ci_build_trace_sections, :project_id, name: 'index_dep_ci_build_trace_sections_on_project_id'
- add_concurrent_index :dep_ci_build_trace_sections, :section_name_id, name: 'index_dep_ci_build_trace_sections_on_section_name_id'
-
- add_concurrent_foreign_key :dep_ci_build_trace_sections, :dep_ci_build_trace_section_names, column: :section_name_id, on_delete: :cascade, name: 'fk_264e112c66'
- add_concurrent_foreign_key :dep_ci_build_trace_sections, :projects, column: :project_id, on_delete: :cascade, name: 'fk_ab7c104e26'
- add_concurrent_foreign_key :dep_ci_build_trace_section_names, :projects, column: :project_id, on_delete: :cascade, name: 'fk_f8cd72cd26'
- end
-
- private
-
- def execute_in_transaction(sql, condition)
- return unless condition
-
- transaction do
- execute(sql)
- end
- end
-end
diff --git a/db/post_migrate/20211109112454_drop_old_loose_fk_deleted_records_index.rb b/db/post_migrate/20211109112454_drop_old_loose_fk_deleted_records_index.rb
deleted file mode 100644
index ef5a70713d0..00000000000
--- a/db/post_migrate/20211109112454_drop_old_loose_fk_deleted_records_index.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class DropOldLooseFkDeletedRecordsIndex < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::PartitioningMigrationHelpers
-
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_loose_foreign_keys_deleted_records_for_loading_records'
-
- def up
- remove_concurrent_partitioned_index_by_name :loose_foreign_keys_deleted_records, INDEX_NAME
- end
-
- def down
- add_concurrent_partitioned_index :loose_foreign_keys_deleted_records,
- %I[fully_qualified_table_name id primary_key_value partition],
- where: 'status = 1',
- name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20211110143306_add_not_null_constraint_to_security_findings_uuid.rb b/db/post_migrate/20211110143306_add_not_null_constraint_to_security_findings_uuid.rb
deleted file mode 100644
index bdb8f5cd120..00000000000
--- a/db/post_migrate/20211110143306_add_not_null_constraint_to_security_findings_uuid.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class AddNotNullConstraintToSecurityFindingsUuid < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_not_null_constraint(
- :security_findings,
- :uuid,
- validate: false
- )
- end
-
- def down
- remove_not_null_constraint(
- :security_findings,
- :uuid
- )
- end
-end
diff --git a/db/post_migrate/20211110151320_add_temporary_index_on_security_findings_uuid.rb b/db/post_migrate/20211110151320_add_temporary_index_on_security_findings_uuid.rb
deleted file mode 100644
index 7bc4af0ec4d..00000000000
--- a/db/post_migrate/20211110151320_add_temporary_index_on_security_findings_uuid.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-class AddTemporaryIndexOnSecurityFindingsUuid < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = "tmp_index_uuid_is_null"
-
- def up
- add_concurrent_index(
- :security_findings,
- :id,
- where: "uuid IS NULL",
- name: INDEX_NAME
- )
- end
-
- def down
- remove_concurrent_index_by_name(
- :security_findings,
- INDEX_NAME
- )
- end
-end
diff --git a/db/post_migrate/20211110151350_schedule_drop_invalid_security_findings.rb b/db/post_migrate/20211110151350_schedule_drop_invalid_security_findings.rb
deleted file mode 100644
index 98e7b2a8a15..00000000000
--- a/db/post_migrate/20211110151350_schedule_drop_invalid_security_findings.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleDropInvalidSecurityFindings < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- MIGRATION = "DropInvalidSecurityFindings"
- DELAY_INTERVAL = 2.minutes.to_i
- BATCH_SIZE = 100_000
- SUB_BATCH_SIZE = 10_000
-
- def up
- queue_background_migration_jobs_by_range_at_intervals(
- define_batchable_model('security_findings').where(uuid: nil),
- MIGRATION,
- DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- other_job_arguments: [SUB_BATCH_SIZE],
- track_jobs: true
- )
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20211112113300_remove_ci_pipeline_chat_data_fk_on_chat_names.rb b/db/post_migrate/20211112113300_remove_ci_pipeline_chat_data_fk_on_chat_names.rb
deleted file mode 100644
index 19adc6c7084..00000000000
--- a/db/post_migrate/20211112113300_remove_ci_pipeline_chat_data_fk_on_chat_names.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveCiPipelineChatDataFkOnChatNames < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- remove_foreign_key_if_exists(:ci_pipeline_chat_data, :chat_names, name: "fk_rails_f300456b63")
- end
- end
-
- def down
- # Remove orphaned rows
- execute <<~SQL
- DELETE FROM ci_pipeline_chat_data
- WHERE
- NOT EXISTS (SELECT 1 FROM chat_names WHERE chat_names.id=ci_pipeline_chat_data.chat_name_id)
- SQL
-
- add_concurrent_foreign_key(:ci_pipeline_chat_data, :chat_names, name: "fk_rails_f300456b63", column: :chat_name_id, target_column: :id, on_delete: "cascade")
- end
-end
diff --git a/db/post_migrate/20211115151704_add_index_on_projects_import_type_id.rb b/db/post_migrate/20211115151704_add_index_on_projects_import_type_id.rb
deleted file mode 100644
index b54edc1cf73..00000000000
--- a/db/post_migrate/20211115151704_add_index_on_projects_import_type_id.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexOnProjectsImportTypeId < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_imported_projects_on_import_type_id'
-
- def up
- add_concurrent_index(:projects, [:import_type, :id], where: 'import_type IS NOT NULL', name: INDEX_NAME)
- end
-
- def down
- remove_concurrent_index_by_name(:projects, INDEX_NAME)
- end
-end
diff --git a/db/post_migrate/20211116091751_change_namespace_type_default_to_user.rb b/db/post_migrate/20211116091751_change_namespace_type_default_to_user.rb
deleted file mode 100644
index 468b26e9eb1..00000000000
--- a/db/post_migrate/20211116091751_change_namespace_type_default_to_user.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class ChangeNamespaceTypeDefaultToUser < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- change_column_default :namespaces, :type, 'User'
- end
- end
-
- def down
- with_lock_retries do
- change_column_default :namespaces, :type, nil
- end
- end
-end
diff --git a/db/post_migrate/20211116111644_schedule_remove_occurrence_pipelines_and_duplicate_vulnerabilities_findings.rb b/db/post_migrate/20211116111644_schedule_remove_occurrence_pipelines_and_duplicate_vulnerabilities_findings.rb
deleted file mode 100644
index 0424d32a81e..00000000000
--- a/db/post_migrate/20211116111644_schedule_remove_occurrence_pipelines_and_duplicate_vulnerabilities_findings.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleRemoveOccurrencePipelinesAndDuplicateVulnerabilitiesFindings < Gitlab::Database::Migration[1.0]
- MIGRATION = 'RemoveOccurrencePipelinesAndDuplicateVulnerabilitiesFindings'
- DELAY_INTERVAL = 2.minutes.to_i
- BATCH_SIZE = 10_000
-
- disable_ddl_transaction!
-
- def up
- queue_background_migration_jobs_by_range_at_intervals(
- define_batchable_model('vulnerability_occurrences'),
- MIGRATION,
- DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- track_jobs: true
- )
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20211117084814_migrate_remaining_u2f_registrations.rb b/db/post_migrate/20211117084814_migrate_remaining_u2f_registrations.rb
deleted file mode 100644
index ae9dba32a4a..00000000000
--- a/db/post_migrate/20211117084814_migrate_remaining_u2f_registrations.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# frozen_string_literal: true
-
-class MigrateRemainingU2fRegistrations < Gitlab::Database::Migration[1.0]
- BATCH_SIZE = 100
-
- disable_ddl_transaction!
-
- def up
- # We expect only a few number of records satisfying these conditions.
- # on gitlab.com database, this number is 70 as on 17th Nov, 2021.
- define_batchable_model('u2f_registrations')
- .joins("LEFT JOIN webauthn_registrations ON webauthn_registrations.u2f_registration_id = u2f_registrations.id")
- .where(webauthn_registrations: { u2f_registration_id: nil })
- .each_batch(of: BATCH_SIZE) do |batch, index|
- batch.each do |record|
- Gitlab::BackgroundMigration::MigrateU2fWebauthn.new.perform(record.id, record.id)
- rescue StandardError => e
- Gitlab::ErrorTracking.track_exception(e, u2f_registration_id: record.id)
- end
- end
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20211118130836_drop_pages_deployments_builds_fk.rb b/db/post_migrate/20211118130836_drop_pages_deployments_builds_fk.rb
deleted file mode 100644
index 5eb532f2a00..00000000000
--- a/db/post_migrate/20211118130836_drop_pages_deployments_builds_fk.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class DropPagesDeploymentsBuildsFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- FK_NAME = 'fk_rails_c3a90cf29b'
-
- def up
- remove_foreign_key_if_exists(:pages_deployments, :ci_builds, name: FK_NAME)
- end
-
- def down
- add_concurrent_foreign_key(
- :pages_deployments,
- :ci_builds,
- name: FK_NAME,
- column: :ci_build_id,
- target_column: :id,
- on_delete: :nullify
- )
- end
-end
diff --git a/db/post_migrate/20211118194239_drop_invalid_remediations.rb b/db/post_migrate/20211118194239_drop_invalid_remediations.rb
deleted file mode 100644
index 93edde87936..00000000000
--- a/db/post_migrate/20211118194239_drop_invalid_remediations.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# frozen_string_literal: true
-
-class DropInvalidRemediations < Gitlab::Database::Migration[1.0]
- BATCH_SIZE = 3_000
- DELAY_INTERVAL = 3.minutes
- MIGRATION_NAME = 'DropInvalidRemediations'
- DAY_PRIOR_TO_BUG_INTRODUCTION = DateTime.new(2021, 8, 1, 0, 0, 0)
-
- disable_ddl_transaction!
-
- def up
- return unless Gitlab.ee?
-
- relation = Gitlab::BackgroundMigration::DropInvalidRemediations::FindingRemediation.where("created_at > ?", DAY_PRIOR_TO_BUG_INTRODUCTION)
- queue_background_migration_jobs_by_range_at_intervals(relation,
- MIGRATION_NAME,
- DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- track_jobs: true)
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20211119085036_add_text_limit_to_job_artifact_original_filename.rb b/db/post_migrate/20211119085036_add_text_limit_to_job_artifact_original_filename.rb
deleted file mode 100644
index 3eccbb1b3a4..00000000000
--- a/db/post_migrate/20211119085036_add_text_limit_to_job_artifact_original_filename.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class AddTextLimitToJobArtifactOriginalFilename < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_text_limit :ci_job_artifacts, :original_filename, 512
- end
-
- def down
- remove_text_limit :ci_job_artifacts, :original_filename
- end
-end
diff --git a/db/post_migrate/20211122033501_improve_index_on_events_for_calendar.rb b/db/post_migrate/20211122033501_improve_index_on_events_for_calendar.rb
deleted file mode 100644
index 517e0f08d6a..00000000000
--- a/db/post_migrate/20211122033501_improve_index_on_events_for_calendar.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class ImproveIndexOnEventsForCalendar < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_events_author_id_project_id_action_target_type_created_at'
-
- def up
- prepare_async_index :events, [:author_id, :project_id, :action, :target_type, :created_at], name: INDEX_NAME
- end
-
- def down
- unprepare_async_index :events, [:author_id, :project_id, :action, :target_type, :created_at], name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20211122193948_cleanup_background_migration_of_requirements_to_work_items.rb b/db/post_migrate/20211122193948_cleanup_background_migration_of_requirements_to_work_items.rb
deleted file mode 100644
index df4867d6ae7..00000000000
--- a/db/post_migrate/20211122193948_cleanup_background_migration_of_requirements_to_work_items.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class CleanupBackgroundMigrationOfRequirementsToWorkItems < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- MIGRATION = 'MigrateRequirementsToWorkItems'
-
- disable_ddl_transaction!
-
- def up
- finalize_background_migration(MIGRATION)
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20211123161906_cleanup_after_drop_invalid_security_findings.rb b/db/post_migrate/20211123161906_cleanup_after_drop_invalid_security_findings.rb
deleted file mode 100644
index 599342e83e3..00000000000
--- a/db/post_migrate/20211123161906_cleanup_after_drop_invalid_security_findings.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# frozen_string_literal: true
-
-class CleanupAfterDropInvalidSecurityFindings < Gitlab::Database::Migration[1.0]
- MIGRATION = "DropInvalidSecurityFindings"
- INDEX_NAME = "tmp_index_uuid_is_null"
-
- disable_ddl_transaction!
-
- def up
- # Make sure all jobs scheduled by
- # db/post_migrate/20211110151350_schedule_drop_invalid_security_findings.rb
- # are finished
- finalize_background_migration(MIGRATION)
- # Created by db/post_migrate/20211110151320_add_temporary_index_on_security_findings_uuid.rb
- remove_concurrent_index_by_name :security_findings, INDEX_NAME
- end
-
- def down
- add_concurrent_index(
- :security_findings,
- :id,
- where: "uuid IS NULL",
- name: INDEX_NAME
- )
- end
-end
diff --git a/db/post_migrate/20211124132705_change_index_users_on_public_email.rb b/db/post_migrate/20211124132705_change_index_users_on_public_email.rb
deleted file mode 100644
index 6e74a325033..00000000000
--- a/db/post_migrate/20211124132705_change_index_users_on_public_email.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class ChangeIndexUsersOnPublicEmail < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_users_on_public_email'
- INDEX_EXCLUDING_NULL_NAME = 'index_users_on_public_email_excluding_null_and_empty'
-
- disable_ddl_transaction!
-
- def up
- index_condition = "public_email != '' AND public_email IS NOT NULL"
-
- add_concurrent_index :users, [:public_email], where: index_condition, name: INDEX_EXCLUDING_NULL_NAME
- remove_concurrent_index_by_name :users, INDEX_NAME
- end
-
- def down
- index_condition = "public_email != ''"
-
- add_concurrent_index :users, [:public_email], where: index_condition, name: INDEX_NAME
- remove_concurrent_index_by_name :users, INDEX_EXCLUDING_NULL_NAME
- end
-end
diff --git a/db/post_migrate/20211125120444_add_index_todos_project_id_user_id.rb b/db/post_migrate/20211125120444_add_index_todos_project_id_user_id.rb
deleted file mode 100644
index 5cc78fc75c4..00000000000
--- a/db/post_migrate/20211125120444_add_index_todos_project_id_user_id.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexTodosProjectIdUserId < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_todos_on_project_id_and_user_id_and_id'
-
- def up
- add_concurrent_index :todos, [:project_id, :user_id, :id], name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :todos, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20211130165043_backfill_sequence_column_for_sprints_table.rb b/db/post_migrate/20211130165043_backfill_sequence_column_for_sprints_table.rb
deleted file mode 100644
index 420bfb8bcbc..00000000000
--- a/db/post_migrate/20211130165043_backfill_sequence_column_for_sprints_table.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# frozen_string_literal: true
-
-class BackfillSequenceColumnForSprintsTable < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def up
- execute(
- <<-SQL
- UPDATE sprints
- SET sequence=t.row_number
- FROM (
- SELECT id, row_number() OVER (PARTITION BY iterations_cadence_id ORDER BY start_date)
- FROM sprints as s1
- WHERE s1.iterations_cadence_id IS NOT NULL
- ) as t
- WHERE t.id=sprints.id AND (sprints.sequence IS NULL OR sprints.sequence <> t.row_number)
- SQL
- )
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20211130201100_track_deletions_in_namespaces.rb b/db/post_migrate/20211130201100_track_deletions_in_namespaces.rb
deleted file mode 100644
index e688e0b467d..00000000000
--- a/db/post_migrate/20211130201100_track_deletions_in_namespaces.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class TrackDeletionsInNamespaces < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::MigrationHelpers::LooseForeignKeyHelpers
-
- enable_lock_retries!
-
- def up
- track_record_deletions(:namespaces)
- end
-
- def down
- untrack_record_deletions(:namespaces)
- end
-end
diff --git a/db/post_migrate/20211130201101_track_deletions_in_projects.rb b/db/post_migrate/20211130201101_track_deletions_in_projects.rb
deleted file mode 100644
index dfe7ab4c037..00000000000
--- a/db/post_migrate/20211130201101_track_deletions_in_projects.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class TrackDeletionsInProjects < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::MigrationHelpers::LooseForeignKeyHelpers
-
- enable_lock_retries!
-
- def up
- track_record_deletions(:projects)
- end
-
- def down
- untrack_record_deletions(:projects)
- end
-end
diff --git a/db/post_migrate/20211201101541_drop_clusters_applications_runners_ci_runners_fk.rb b/db/post_migrate/20211201101541_drop_clusters_applications_runners_ci_runners_fk.rb
deleted file mode 100644
index 9a02f64e350..00000000000
--- a/db/post_migrate/20211201101541_drop_clusters_applications_runners_ci_runners_fk.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class DropClustersApplicationsRunnersCiRunnersFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- remove_foreign_key_if_exists(:clusters_applications_runners, :ci_runners, name: 'fk_02de2ded36')
- end
- end
-
- def down
- add_concurrent_foreign_key(:clusters_applications_runners, :ci_runners, name: 'fk_02de2ded36', column: :runner_id, target_column: :id, on_delete: 'set null')
- end
-end
diff --git a/db/post_migrate/20211202145237_add_todos_project_and_id_index.rb b/db/post_migrate/20211202145237_add_todos_project_and_id_index.rb
deleted file mode 100644
index 69f7822c057..00000000000
--- a/db/post_migrate/20211202145237_add_todos_project_and_id_index.rb
+++ /dev/null
@@ -1,32 +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 AddTodosProjectAndIdIndex < Gitlab::Database::Migration[1.0]
- # When using the methods "add_concurrent_index" or "remove_concurrent_index"
- # you must disable the use of transactions
- # as these methods can not run in an existing transaction.
- # When using "add_concurrent_index" or "remove_concurrent_index" methods make sure
- # that either of them is the _only_ method called in the migration,
- # any other changes should go in a separate migration.
- # This ensures that upon failure _only_ the index creation or removing fails
- # and can be retried or reverted easily.
- #
- # To disable transactions uncomment the following line and remove these
- # comments:
- disable_ddl_transaction!
-
- NEW_INDEX_NAME = 'index_todos_on_project_id_and_id'
- OLD_INDEX_NAME = 'index_todos_on_project_id'
-
- def up
- add_concurrent_index :todos, [:project_id, :id], name: NEW_INDEX_NAME
- remove_concurrent_index_by_name :todos, OLD_INDEX_NAME
- end
-
- def down
- add_concurrent_index :todos, :project_id, name: OLD_INDEX_NAME
- remove_concurrent_index_by_name :todos, NEW_INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20211203091642_add_index_to_projects_on_marked_for_deletion_at.rb b/db/post_migrate/20211203091642_add_index_to_projects_on_marked_for_deletion_at.rb
deleted file mode 100644
index 56b0df1f393..00000000000
--- a/db/post_migrate/20211203091642_add_index_to_projects_on_marked_for_deletion_at.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexToProjectsOnMarkedForDeletionAt < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_projects_not_aimed_for_deletion'
-
- def up
- add_concurrent_index :projects, :id, where: 'marked_for_deletion_at IS NULL', name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index :projects, :id, name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20211206073851_create_calendar_events_index_synchronously.rb b/db/post_migrate/20211206073851_create_calendar_events_index_synchronously.rb
deleted file mode 100644
index 020dceac004..00000000000
--- a/db/post_migrate/20211206073851_create_calendar_events_index_synchronously.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class CreateCalendarEventsIndexSynchronously < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_events_author_id_project_id_action_target_type_created_at'
-
- def up
- add_concurrent_index :events, [:author_id, :project_id, :action, :target_type, :created_at], name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :events, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20211206074547_remove_old_calendar_events_index.rb b/db/post_migrate/20211206074547_remove_old_calendar_events_index.rb
deleted file mode 100644
index 51460a9dc95..00000000000
--- a/db/post_migrate/20211206074547_remove_old_calendar_events_index.rb
+++ /dev/null
@@ -1,18 +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 RemoveOldCalendarEventsIndex < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- OLD_INDEX_NAME = 'index_events_on_author_id_and_project_id'
-
- def up
- remove_concurrent_index_by_name :events, OLD_INDEX_NAME
- end
-
- def down
- add_concurrent_index :events, [:author_id, :project_id], name: OLD_INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20211206161271_add_indexes_for_primary_email_cleanup_migration.rb b/db/post_migrate/20211206161271_add_indexes_for_primary_email_cleanup_migration.rb
deleted file mode 100644
index 0e370dfc5f8..00000000000
--- a/db/post_migrate/20211206161271_add_indexes_for_primary_email_cleanup_migration.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexesForPrimaryEmailCleanupMigration < Gitlab::Database::Migration[1.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/20211207081708_add_index_ci_job_artifacts_project_id_file_type.rb b/db/post_migrate/20211207081708_add_index_ci_job_artifacts_project_id_file_type.rb
deleted file mode 100644
index 959bf61a6cc..00000000000
--- a/db/post_migrate/20211207081708_add_index_ci_job_artifacts_project_id_file_type.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexCiJobArtifactsProjectIdFileType < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_ci_job_artifacts_on_id_project_id_and_file_type'
-
- def up
- add_concurrent_index :ci_job_artifacts, [:project_id, :file_type, :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/20211207090503_cleanup_first_mentioned_in_commit_jobs.rb b/db/post_migrate/20211207090503_cleanup_first_mentioned_in_commit_jobs.rb
deleted file mode 100644
index 3788a680fb6..00000000000
--- a/db/post_migrate/20211207090503_cleanup_first_mentioned_in_commit_jobs.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class CleanupFirstMentionedInCommitJobs < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- MIGRATION = 'FixFirstMentionedInCommitAt'
- INDEX_NAME = 'index_issue_metrics_first_mentioned_in_commit'
-
- def up
- finalize_background_migration(MIGRATION)
-
- remove_concurrent_index_by_name :issue_metrics, name: INDEX_NAME
- end
-
- def down
- # Handles reported schema inconsistencies (column with or without timezone)
- # We did the same in db/post_migrate/20211004110500_add_temporary_index_to_issue_metrics.rb
- condition = Gitlab::BackgroundMigration::FixFirstMentionedInCommitAt::TmpIssueMetrics
- .first_mentioned_in_commit_at_condition
- add_concurrent_index :issue_metrics, :issue_id, where: condition, name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20211207125331_remove_jobs_for_recalculate_vulnerabilities_occurrences_uuid.rb b/db/post_migrate/20211207125331_remove_jobs_for_recalculate_vulnerabilities_occurrences_uuid.rb
deleted file mode 100644
index cc37f2dc65d..00000000000
--- a/db/post_migrate/20211207125331_remove_jobs_for_recalculate_vulnerabilities_occurrences_uuid.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveJobsForRecalculateVulnerabilitiesOccurrencesUuid < Gitlab::Database::Migration[1.0]
- MIGRATION_NAME = 'RecalculateVulnerabilitiesOccurrencesUuid'
-
- def up
- delete_job_tracking(
- MIGRATION_NAME,
- status: %w[pending succeeded]
- )
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20211207135331_schedule_recalculate_uuid_on_vulnerabilities_occurrences4.rb b/db/post_migrate/20211207135331_schedule_recalculate_uuid_on_vulnerabilities_occurrences4.rb
deleted file mode 100644
index 13abf8b5540..00000000000
--- a/db/post_migrate/20211207135331_schedule_recalculate_uuid_on_vulnerabilities_occurrences4.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleRecalculateUuidOnVulnerabilitiesOccurrences4 < Gitlab::Database::Migration[1.0]
- MIGRATION = 'RecalculateVulnerabilitiesOccurrencesUuid'
- DELAY_INTERVAL = 2.minutes.to_i
- BATCH_SIZE = 2_500
-
- disable_ddl_transaction!
-
- def up
- # Make sure the migration removing Findings with attributes for which UUID would be identical
- # has finished
- # https://gitlab.com/gitlab-org/gitlab/-/merge_requests/74008
- Gitlab::BackgroundMigration.steal('RemoveOccurrencePipelinesAndDuplicateVulnerabilitiesFindings')
-
- queue_background_migration_jobs_by_range_at_intervals(
- define_batchable_model('vulnerability_occurrences'),
- MIGRATION,
- DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- track_jobs: true
- )
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20211207173510_remove_extra_finding_evidence_tables_foreign_keys.rb b/db/post_migrate/20211207173510_remove_extra_finding_evidence_tables_foreign_keys.rb
deleted file mode 100644
index eaf07abe29d..00000000000
--- a/db/post_migrate/20211207173510_remove_extra_finding_evidence_tables_foreign_keys.rb
+++ /dev/null
@@ -1,57 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveExtraFindingEvidenceTablesForeignKeys < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- remove_foreign_key :vulnerability_finding_evidence_assets, :vulnerability_finding_evidences
- remove_foreign_key :vulnerability_finding_evidence_headers, :vulnerability_finding_evidence_requests
- remove_foreign_key :vulnerability_finding_evidence_headers, :vulnerability_finding_evidence_responses
- remove_foreign_key :vulnerability_finding_evidence_requests, :vulnerability_finding_evidences
- remove_foreign_key :vulnerability_finding_evidence_requests, :vulnerability_finding_evidence_supporting_messages
- remove_foreign_key :vulnerability_finding_evidence_responses, :vulnerability_finding_evidences
- remove_foreign_key :vulnerability_finding_evidence_responses, :vulnerability_finding_evidence_supporting_messages
- remove_foreign_key :vulnerability_finding_evidence_sources, :vulnerability_finding_evidences
- remove_foreign_key :vulnerability_finding_evidence_supporting_messages, :vulnerability_finding_evidences
- end
- end
-
- def down
- with_lock_retries do
- add_foreign_key :vulnerability_finding_evidence_assets, :vulnerability_finding_evidences, on_delete: :cascade
- end
-
- with_lock_retries do
- add_foreign_key :vulnerability_finding_evidence_headers, :vulnerability_finding_evidence_requests, on_delete: :cascade
- end
-
- with_lock_retries do
- add_foreign_key :vulnerability_finding_evidence_headers, :vulnerability_finding_evidence_responses, on_delete: :cascade
- end
-
- with_lock_retries do
- add_foreign_key :vulnerability_finding_evidence_requests, :vulnerability_finding_evidences, on_delete: :cascade
- end
-
- with_lock_retries do
- add_foreign_key :vulnerability_finding_evidence_requests, :vulnerability_finding_evidence_supporting_messages, on_delete: :cascade
- end
-
- with_lock_retries do
- add_foreign_key :vulnerability_finding_evidence_responses, :vulnerability_finding_evidences, on_delete: :cascade
- end
-
- with_lock_retries do
- add_foreign_key :vulnerability_finding_evidence_responses, :vulnerability_finding_evidence_supporting_messages, on_delete: :cascade
- end
-
- with_lock_retries do
- add_foreign_key :vulnerability_finding_evidence_sources, :vulnerability_finding_evidences, on_delete: :cascade
- end
-
- with_lock_retries do
- add_foreign_key :vulnerability_finding_evidence_supporting_messages, :vulnerability_finding_evidences, on_delete: :cascade
- end
- end
-end
diff --git a/db/post_migrate/20211207173511_remove_extra_finding_evidence_tables.rb b/db/post_migrate/20211207173511_remove_extra_finding_evidence_tables.rb
deleted file mode 100644
index 9a246a8c707..00000000000
--- a/db/post_migrate/20211207173511_remove_extra_finding_evidence_tables.rb
+++ /dev/null
@@ -1,71 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveExtraFindingEvidenceTables < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- drop_table :vulnerability_finding_evidence_assets, if_exists: true
- drop_table :vulnerability_finding_evidence_headers, if_exists: true
- drop_table :vulnerability_finding_evidence_requests, if_exists: true
- drop_table :vulnerability_finding_evidence_responses, if_exists: true
- drop_table :vulnerability_finding_evidence_sources, if_exists: true
- drop_table :vulnerability_finding_evidence_supporting_messages, if_exists: true
- end
- end
-
- def down
- create_table :vulnerability_finding_evidence_assets, if_not_exists: true do |t|
- t.timestamps_with_timezone null: false
-
- t.references :vulnerability_finding_evidence, index: { name: 'finding_evidence_assets_on_finding_evidence_id' }, null: false
- t.text :type, limit: 2048
- t.text :name, limit: 2048
- t.text :url, limit: 2048
- end
-
- create_table :vulnerability_finding_evidence_sources, if_not_exists: true do |t|
- t.timestamps_with_timezone null: false
-
- t.references :vulnerability_finding_evidence, index: { name: 'finding_evidence_sources_on_finding_evidence_id' }, null: false
- t.text :name, limit: 2048
- t.text :url, limit: 2048
- end
-
- create_table :vulnerability_finding_evidence_supporting_messages, if_not_exists: true do |t|
- t.timestamps_with_timezone null: false
-
- t.references :vulnerability_finding_evidence, index: { name: 'finding_evidence_supporting_messages_on_finding_evidence_id' }, null: false
- t.text :name, limit: 2048
- end
-
- create_table :vulnerability_finding_evidence_requests, if_not_exists: true do |t|
- t.timestamps_with_timezone null: false
-
- t.references :vulnerability_finding_evidence, index: { name: 'finding_evidence_requests_on_finding_evidence_id' }, null: true
- t.text :method, limit: 32
- t.text :url, limit: 2048
- t.text :body, limit: 2048
- t.references :vulnerability_finding_evidence_supporting_message, index: { name: 'finding_evidence_requests_on_supporting_evidence_id' }, null: true
- end
-
- create_table :vulnerability_finding_evidence_responses, if_not_exists: true do |t|
- t.timestamps_with_timezone null: false
-
- t.references :vulnerability_finding_evidence, index: { name: 'finding_evidence_responses_on_finding_evidences_id' }, null: true
- t.integer :status_code
- t.text :reason_phrase, limit: 2048
- t.text :body, limit: 2048
- t.references :vulnerability_finding_evidence_supporting_message, index: { name: 'finding_evidence_responses_on_supporting_evidence_id' }, null: true
- end
-
- create_table :vulnerability_finding_evidence_headers, if_not_exists: true do |t|
- t.timestamps_with_timezone null: false
-
- t.references :vulnerability_finding_evidence_request, index: { name: 'finding_evidence_header_on_finding_evidence_request_id' }, null: true
- t.references :vulnerability_finding_evidence_response, index: { name: 'finding_evidence_header_on_finding_evidence_response_id' }, null: true
- t.text :name, null: false, limit: 255
- t.text :value, null: false, limit: 8192
- end
- end
-end
diff --git a/db/post_migrate/20211208122200_schedule_backfill_ci_namespace_mirrors.rb b/db/post_migrate/20211208122200_schedule_backfill_ci_namespace_mirrors.rb
deleted file mode 100644
index e42b74748d7..00000000000
--- a/db/post_migrate/20211208122200_schedule_backfill_ci_namespace_mirrors.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleBackfillCiNamespaceMirrors < Gitlab::Database::Migration[1.0]
- def up
- # no-op
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20211208122201_schedule_backfill_ci_project_mirrors.rb b/db/post_migrate/20211208122201_schedule_backfill_ci_project_mirrors.rb
deleted file mode 100644
index 2a58eda040e..00000000000
--- a/db/post_migrate/20211208122201_schedule_backfill_ci_project_mirrors.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleBackfillCiProjectMirrors < Gitlab::Database::Migration[1.0]
- def up
- # no-op
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20211208171402_reschedule_recalculate_vulnerability_finding_signatures_for_findings.rb b/db/post_migrate/20211208171402_reschedule_recalculate_vulnerability_finding_signatures_for_findings.rb
deleted file mode 100644
index 8eee082809b..00000000000
--- a/db/post_migrate/20211208171402_reschedule_recalculate_vulnerability_finding_signatures_for_findings.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-class RescheduleRecalculateVulnerabilityFindingSignaturesForFindings < Gitlab::Database::Migration[1.0]
- MIGRATION = 'RecalculateVulnerabilityFindingSignaturesForFindings'
- BATCH_SIZE = 1_000
- DELAY_INTERVAL = 2.minutes
-
- disable_ddl_transaction!
-
- # Due to production incident previous migration was orphaned and must be rescheduled,
- # See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/72919#note_741188600
- def up
- return unless Gitlab.ee?
-
- delete_queued_jobs(MIGRATION)
-
- requeue_background_migration_jobs_by_range_at_intervals(
- MIGRATION,
- DELAY_INTERVAL,
- batch_size: BATCH_SIZE
- )
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20211209093636_track_ci_job_artifacts_deletes.rb b/db/post_migrate/20211209093636_track_ci_job_artifacts_deletes.rb
deleted file mode 100644
index 8c95c76d1fe..00000000000
--- a/db/post_migrate/20211209093636_track_ci_job_artifacts_deletes.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class TrackCiJobArtifactsDeletes < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::MigrationHelpers::LooseForeignKeyHelpers
-
- enable_lock_retries!
-
- def up
- track_record_deletions(:ci_job_artifacts)
- end
-
- def down
- untrack_record_deletions(:ci_job_artifacts)
- end
-end
diff --git a/db/post_migrate/20211209093828_track_users_deletes.rb b/db/post_migrate/20211209093828_track_users_deletes.rb
deleted file mode 100644
index e25a8a36cb2..00000000000
--- a/db/post_migrate/20211209093828_track_users_deletes.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class TrackUsersDeletes < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::MigrationHelpers::LooseForeignKeyHelpers
-
- enable_lock_retries!
-
- def up
- track_record_deletions(:users)
- end
-
- def down
- untrack_record_deletions(:users)
- end
-end
diff --git a/db/post_migrate/20211209093923_track_external_pull_requests_deletes.rb b/db/post_migrate/20211209093923_track_external_pull_requests_deletes.rb
deleted file mode 100644
index cd8a6baf407..00000000000
--- a/db/post_migrate/20211209093923_track_external_pull_requests_deletes.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class TrackExternalPullRequestsDeletes < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::MigrationHelpers::LooseForeignKeyHelpers
-
- enable_lock_retries!
-
- def up
- track_record_deletions(:external_pull_requests)
- end
-
- def down
- untrack_record_deletions(:external_pull_requests)
- end
-end
diff --git a/db/post_migrate/20211209094222_track_merge_requests_deletes.rb b/db/post_migrate/20211209094222_track_merge_requests_deletes.rb
deleted file mode 100644
index 51007082e9e..00000000000
--- a/db/post_migrate/20211209094222_track_merge_requests_deletes.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class TrackMergeRequestsDeletes < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::MigrationHelpers::LooseForeignKeyHelpers
-
- enable_lock_retries!
-
- def up
- track_record_deletions(:merge_requests)
- end
-
- def down
- untrack_record_deletions(:merge_requests)
- end
-end
diff --git a/db/post_migrate/20211209103048_backfill_project_namespaces_for_group.rb b/db/post_migrate/20211209103048_backfill_project_namespaces_for_group.rb
deleted file mode 100644
index 44dffc798d3..00000000000
--- a/db/post_migrate/20211209103048_backfill_project_namespaces_for_group.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-# frozen_string_literal: true
-
-class BackfillProjectNamespacesForGroup < Gitlab::Database::Migration[1.0]
- MIGRATION = 'ProjectNamespaces::BackfillProjectNamespaces'
- DELAY_INTERVAL = 2.minutes
- GROUP_ID = 9970 # picking gitlab-org group.
-
- disable_ddl_transaction!
-
- def up
- return unless Gitlab.com? || Gitlab.staging?
-
- projects_table = ::Gitlab::BackgroundMigration::ProjectNamespaces::Models::Project.arel_table
- hierarchy_cte_sql = Arel.sql(::Gitlab::BackgroundMigration::ProjectNamespaces::BackfillProjectNamespaces.hierarchy_cte(GROUP_ID))
- group_projects = ::Gitlab::BackgroundMigration::ProjectNamespaces::Models::Project.where(projects_table[:namespace_id].in(hierarchy_cte_sql))
-
- min_id = group_projects.minimum(:id)
- max_id = group_projects.maximum(:id)
-
- return if min_id.blank? || max_id.blank?
-
- queue_batched_background_migration(
- MIGRATION,
- :projects,
- :id,
- GROUP_ID,
- 'up',
- job_interval: DELAY_INTERVAL,
- batch_min_value: min_id,
- batch_max_value: max_id,
- sub_batch_size: 25,
- batch_class_name: 'BackfillProjectNamespacePerGroupBatchingStrategy'
- )
- end
-
- def down
- return unless Gitlab.com? || Gitlab.staging?
-
- delete_batched_background_migration(MIGRATION, :projects, :id, [GROUP_ID, 'up'])
- end
-end
diff --git a/db/post_migrate/20211209203820_add_tmp_index_on_report_type.rb b/db/post_migrate/20211209203820_add_tmp_index_on_report_type.rb
deleted file mode 100644
index 07a2c079511..00000000000
--- a/db/post_migrate/20211209203820_add_tmp_index_on_report_type.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-class AddTmpIndexOnReportType < Gitlab::Database::Migration[1.0]
- # Temporary index to perform migration fixing invalid vulnerability_occurrences.raw_metadata rows
- # Will be removed with https://gitlab.com/gitlab-org/gitlab/-/issues/349605
- INDEX_NAME = 'tmp_idx_vulnerability_occurrences_on_id_where_report_type_7_99'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :vulnerability_occurrences, :id, where: 'report_type IN (7, 99)', name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :vulnerability_occurrences, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20211209203821_convert_stringified_raw_metadata_hash_to_json.rb b/db/post_migrate/20211209203821_convert_stringified_raw_metadata_hash_to_json.rb
deleted file mode 100644
index 757cbf60d4d..00000000000
--- a/db/post_migrate/20211209203821_convert_stringified_raw_metadata_hash_to_json.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# frozen_string_literal: true
-class ConvertStringifiedRawMetadataHashToJson < Gitlab::Database::Migration[1.0]
- MIGRATION_CLASS = Gitlab::BackgroundMigration::FixVulnerabilityOccurrencesWithHashesAsRawMetadata
- MODEL_CLASS = MIGRATION_CLASS::Finding
- DELAY_INTERVAL = 2.minutes
- BATCH_SIZE = 500
-
- disable_ddl_transaction!
-
- def up
- queue_background_migration_jobs_by_range_at_intervals(
- MODEL_CLASS.by_api_report_types,
- MIGRATION_CLASS,
- DELAY_INTERVAL,
- batch_size: BATCH_SIZE
- )
- end
-
- def down
- # no-op
-
- # up fixes invalid data by updating columns in-place.
- # It is a backwards-compatible change, and reversing it in a downgrade would not be desirable.
- end
-end
diff --git a/db/post_migrate/20211210140000_add_temporary_static_object_token_index.rb b/db/post_migrate/20211210140000_add_temporary_static_object_token_index.rb
deleted file mode 100644
index 54997dc4cc4..00000000000
--- a/db/post_migrate/20211210140000_add_temporary_static_object_token_index.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddTemporaryStaticObjectTokenIndex < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_users_with_static_object_token'
-
- def up
- add_concurrent_index :users, :id, where: "static_object_token IS NOT NULL AND static_object_token_encrypted IS NULL", name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index :users, :id, name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20211210140629_encrypt_static_object_token.rb b/db/post_migrate/20211210140629_encrypt_static_object_token.rb
deleted file mode 100644
index fe4db9fc14c..00000000000
--- a/db/post_migrate/20211210140629_encrypt_static_object_token.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class EncryptStaticObjectToken < Gitlab::Database::Migration[1.0]
- BATCH_SIZE = 10_000
- MIGRATION = 'EncryptStaticObjectToken'
-
- disable_ddl_transaction!
-
- def up
- queue_background_migration_jobs_by_range_at_intervals(
- define_batchable_model('users').where.not(static_object_token: nil).where(static_object_token_encrypted: nil),
- MIGRATION,
- 2.minutes,
- batch_size: BATCH_SIZE,
- track_jobs: true
- )
- end
-
- def down
- # no ops
- end
-end
diff --git a/db/post_migrate/20211210173137_remove_vulnerability_finding_links_again.rb b/db/post_migrate/20211210173137_remove_vulnerability_finding_links_again.rb
deleted file mode 100644
index ffe8bf0d794..00000000000
--- a/db/post_migrate/20211210173137_remove_vulnerability_finding_links_again.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveVulnerabilityFindingLinksAgain < Gitlab::Database::Migration[1.0]
- # This migration has been moved to a TRUNCATE in db/post_migrate/20220201193033_add_unique_index_to_vulnerability_finding_links_with_truncate.rb
- # Previously, this was causing an bug where there was a conflict between the table cleanup and the index creation.
-
- def up
- # no op
- end
-
- def down
- # no op
- end
-end
diff --git a/db/post_migrate/20211213064821_add_agent_id_location_index_to_vulnerability_occurrences.rb b/db/post_migrate/20211213064821_add_agent_id_location_index_to_vulnerability_occurrences.rb
deleted file mode 100644
index 92b5a1b085c..00000000000
--- a/db/post_migrate/20211213064821_add_agent_id_location_index_to_vulnerability_occurrences.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddAgentIdLocationIndexToVulnerabilityOccurrences < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_vulnerability_occurrences_on_location_agent_id'
-
- def up
- add_concurrent_index :vulnerability_occurrences, "(location -> 'agent_id')",
- using: 'GIN',
- where: 'report_type = 7',
- name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :vulnerability_occurrences, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20211213102111_drop_ci_pipelines_mr_metrics_fk.rb b/db/post_migrate/20211213102111_drop_ci_pipelines_mr_metrics_fk.rb
deleted file mode 100644
index 49f498c911d..00000000000
--- a/db/post_migrate/20211213102111_drop_ci_pipelines_mr_metrics_fk.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class DropCiPipelinesMrMetricsFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- remove_foreign_key_if_exists(:merge_request_metrics, :ci_pipelines, name: "fk_rails_33ae169d48")
- end
- end
-
- def down
- add_concurrent_foreign_key(:merge_request_metrics, :ci_pipelines, name: "fk_rails_33ae169d48", column: :pipeline_id, target_column: :id, on_delete: "cascade")
- end
-end
diff --git a/db/post_migrate/20211214012507_backfill_incident_issue_escalation_statuses.rb b/db/post_migrate/20211214012507_backfill_incident_issue_escalation_statuses.rb
deleted file mode 100644
index f8239b6e0cd..00000000000
--- a/db/post_migrate/20211214012507_backfill_incident_issue_escalation_statuses.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class BackfillIncidentIssueEscalationStatuses < Gitlab::Database::Migration[1.0]
- # Removed in favor of creating records for existing incidents
- # as-needed. See db/migrate/20220321234317_remove_all_issuable_escalation_statuses.rb.
- def change
- # no-op
- end
-end
diff --git a/db/post_migrate/20211215090620_schedule_update_timelogs_null_spent_at.rb b/db/post_migrate/20211215090620_schedule_update_timelogs_null_spent_at.rb
deleted file mode 100644
index 5876d3f8a9a..00000000000
--- a/db/post_migrate/20211215090620_schedule_update_timelogs_null_spent_at.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleUpdateTimelogsNullSpentAt < Gitlab::Database::Migration[1.0]
- DOWNTIME = false
- BATCH_SIZE = 5_000
- DELAY_INTERVAL = 2.minutes
- MIGRATION = 'UpdateTimelogsNullSpentAt'
-
- disable_ddl_transaction!
-
- def up
- queue_background_migration_jobs_by_range_at_intervals(
- define_batchable_model('timelogs').where(spent_at: nil),
- MIGRATION,
- DELAY_INTERVAL,
- batch_size: BATCH_SIZE
- )
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20211217120000_modify_kubernetes_resource_location_index_to_vulnerability_occurrences.rb b/db/post_migrate/20211217120000_modify_kubernetes_resource_location_index_to_vulnerability_occurrences.rb
deleted file mode 100644
index 310a49a667e..00000000000
--- a/db/post_migrate/20211217120000_modify_kubernetes_resource_location_index_to_vulnerability_occurrences.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-# frozen_string_literal: true
-
-class ModifyKubernetesResourceLocationIndexToVulnerabilityOccurrences < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- OLD_CLUSTER_ID_INDEX_NAME = 'index_vulnerability_occurrences_on_location_cluster_id'
- OLD_AGENT_ID_INDEX_NAME = 'index_vulnerability_occurrences_on_location_agent_id'
-
- NEW_CLUSTER_ID_INDEX_NAME = 'index_vulnerability_occurrences_on_location_k8s_cluster_id'
- NEW_AGENT_ID_INDEX_NAME = 'index_vulnerability_occurrences_on_location_k8s_agent_id'
-
- def up
- add_concurrent_index :vulnerability_occurrences, "(location -> 'kubernetes_resource' -> 'cluster_id')",
- using: 'GIN',
- where: 'report_type = 7',
- name: NEW_CLUSTER_ID_INDEX_NAME
-
- add_concurrent_index :vulnerability_occurrences, "(location -> 'kubernetes_resource' -> 'agent_id')",
- using: 'GIN',
- where: 'report_type = 7',
- name: NEW_AGENT_ID_INDEX_NAME
-
- remove_concurrent_index_by_name :vulnerability_occurrences, OLD_CLUSTER_ID_INDEX_NAME
- remove_concurrent_index_by_name :vulnerability_occurrences, OLD_AGENT_ID_INDEX_NAME
- end
-
- def down
- add_concurrent_index :vulnerability_occurrences, "(location -> 'cluster_id')",
- using: 'GIN',
- where: 'report_type = 7',
- name: OLD_CLUSTER_ID_INDEX_NAME
-
- add_concurrent_index :vulnerability_occurrences, "(location -> 'agent_id')",
- using: 'GIN',
- where: 'report_type = 7',
- name: OLD_AGENT_ID_INDEX_NAME
-
- remove_concurrent_index_by_name :vulnerability_occurrences, NEW_CLUSTER_ID_INDEX_NAME
- remove_concurrent_index_by_name :vulnerability_occurrences, NEW_AGENT_ID_INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20211217145923_add_index_to_events_on_author_id_and_action_and_id.rb b/db/post_migrate/20211217145923_add_index_to_events_on_author_id_and_action_and_id.rb
deleted file mode 100644
index a05d68279c3..00000000000
--- a/db/post_migrate/20211217145923_add_index_to_events_on_author_id_and_action_and_id.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexToEventsOnAuthorIdAndActionAndId < Gitlab::Database::Migration[1.0]
- # no-op
- # see: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/77436
-
- def up
- # no-op
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20211217174331_mark_recalculate_finding_signatures_as_completed.rb b/db/post_migrate/20211217174331_mark_recalculate_finding_signatures_as_completed.rb
deleted file mode 100644
index 316209ae1f4..00000000000
--- a/db/post_migrate/20211217174331_mark_recalculate_finding_signatures_as_completed.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class MarkRecalculateFindingSignaturesAsCompleted < Gitlab::Database::Migration[1.0]
- MIGRATION = 'RecalculateVulnerabilitiesOccurrencesUuid'
-
- def up
- # Only run migration for Gitlab.com
- return unless ::Gitlab.com?
-
- # In previous migration marking jobs as successful was missed
- Gitlab::Database::BackgroundMigrationJob
- .for_migration_class(MIGRATION)
- .pending
- .update_all(status: :succeeded)
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20211220064757_drop_temporary_indexes_for_primary_email_migration.rb b/db/post_migrate/20211220064757_drop_temporary_indexes_for_primary_email_migration.rb
deleted file mode 100644
index 1d61aec401e..00000000000
--- a/db/post_migrate/20211220064757_drop_temporary_indexes_for_primary_email_migration.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-class DropTemporaryIndexesForPrimaryEmailMigration < Gitlab::Database::Migration[1.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/20211220120402_add_index_on_ci_pipelines_user_id_id_failure_reason.rb b/db/post_migrate/20211220120402_add_index_on_ci_pipelines_user_id_id_failure_reason.rb
deleted file mode 100644
index c98d3d05f2f..00000000000
--- a/db/post_migrate/20211220120402_add_index_on_ci_pipelines_user_id_id_failure_reason.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexOnCiPipelinesUserIdIdFailureReason < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_ci_pipelines_on_user_id_and_id_desc_and_user_not_verified'
-
- def up
- add_concurrent_index :ci_pipelines, [:user_id, :id], order: { id: :desc }, where: 'failure_reason = 3', name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :ci_pipelines, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20211220123956_update_invalid_member_states.rb b/db/post_migrate/20211220123956_update_invalid_member_states.rb
deleted file mode 100644
index 5da100f0ec2..00000000000
--- a/db/post_migrate/20211220123956_update_invalid_member_states.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-class UpdateInvalidMemberStates < Gitlab::Database::Migration[1.0]
- class Member < ActiveRecord::Base
- include EachBatch
-
- self.table_name = 'members'
-
- scope :in_invalid_state, -> { where(state: 2) }
- end
-
- def up
- Member.in_invalid_state.each_batch do |relation|
- relation.update_all(state: 0)
- end
- end
-
- def down
- # no-op as we don't need to revert any changed records
- end
-end
diff --git a/db/post_migrate/20211229023654_add_async_index_ci_job_artifacts_project_id_file_type.rb b/db/post_migrate/20211229023654_add_async_index_ci_job_artifacts_project_id_file_type.rb
deleted file mode 100644
index 5338cab3871..00000000000
--- a/db/post_migrate/20211229023654_add_async_index_ci_job_artifacts_project_id_file_type.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddAsyncIndexCiJobArtifactsProjectIdFileType < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_ci_job_artifacts_on_id_project_id_and_file_type'
-
- def up
- prepare_async_index :ci_job_artifacts, [:project_id, :file_type, :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/20211230112517_remove_index_events_on_author_id_and_action_and_id.rb b/db/post_migrate/20211230112517_remove_index_events_on_author_id_and_action_and_id.rb
deleted file mode 100644
index 2215a49e286..00000000000
--- a/db/post_migrate/20211230112517_remove_index_events_on_author_id_and_action_and_id.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveIndexEventsOnAuthorIdAndActionAndId < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_events_on_author_id_and_action_and_id'
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :events, name: INDEX_NAME
- end
-
- def down
- # no-op
- # The index had been added in the same milestone.
- # Adding back the index takes a long time and should not be needed.
- end
-end
diff --git a/db/post_migrate/20211230113031_add_index_to_events_on_author_id_and_id.rb b/db/post_migrate/20211230113031_add_index_to_events_on_author_id_and_id.rb
deleted file mode 100644
index e4cdc9add39..00000000000
--- a/db/post_migrate/20211230113031_add_index_to_events_on_author_id_and_id.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexToEventsOnAuthorIdAndId < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_events_on_author_id_and_id'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :events, [: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/20220104060049_remove_foreign_key_ci_group_variables_group_id.rb b/db/post_migrate/20220104060049_remove_foreign_key_ci_group_variables_group_id.rb
deleted file mode 100644
index 9be81e00b50..00000000000
--- a/db/post_migrate/20220104060049_remove_foreign_key_ci_group_variables_group_id.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveForeignKeyCiGroupVariablesGroupId < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- CONSTRAINT_NAME = 'fk_33ae4d58d8'
-
- def up
- with_lock_retries do
- remove_foreign_key_if_exists(:ci_group_variables, :namespaces, name: CONSTRAINT_NAME)
- end
- end
-
- def down
- add_concurrent_foreign_key :ci_group_variables, :namespaces, column: :group_id, on_delete: :cascade, name: CONSTRAINT_NAME
- end
-end
diff --git a/db/post_migrate/20220105020514_remove_ci_minutes_additional_packs_namespace_id_foreign_key_constraint.rb b/db/post_migrate/20220105020514_remove_ci_minutes_additional_packs_namespace_id_foreign_key_constraint.rb
deleted file mode 100644
index b072d5616f5..00000000000
--- a/db/post_migrate/20220105020514_remove_ci_minutes_additional_packs_namespace_id_foreign_key_constraint.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveCiMinutesAdditionalPacksNamespaceIdForeignKeyConstraint < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- CONSTRAINT_NAME = 'fk_rails_e0e0c4e4b1'
-
- def up
- with_lock_retries do
- remove_foreign_key_if_exists(:ci_minutes_additional_packs, :namespaces, name: CONSTRAINT_NAME)
- end
- end
-
- def down
- add_concurrent_foreign_key :ci_minutes_additional_packs, :namespaces, column: :namespace_id, on_delete: :cascade, name: CONSTRAINT_NAME
- end
-end
diff --git a/db/post_migrate/20220106185033_remove_finding_evidence_summary.rb b/db/post_migrate/20220106185033_remove_finding_evidence_summary.rb
deleted file mode 100644
index d28e8bb81f6..00000000000
--- a/db/post_migrate/20220106185033_remove_finding_evidence_summary.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveFindingEvidenceSummary < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- remove_column :vulnerability_finding_evidences, :summary, :text
- end
-
- def down
- add_column :vulnerability_finding_evidences, :summary, :text
-
- add_text_limit :vulnerability_finding_evidences, :summary, 8_000_000
- end
-end
diff --git a/db/post_migrate/20220106231518_remove_foreign_key_ci_daily_build_group_report_results_group_id.rb b/db/post_migrate/20220106231518_remove_foreign_key_ci_daily_build_group_report_results_group_id.rb
deleted file mode 100644
index ece20f8095d..00000000000
--- a/db/post_migrate/20220106231518_remove_foreign_key_ci_daily_build_group_report_results_group_id.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveForeignKeyCiDailyBuildGroupReportResultsGroupId < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- CONSTRAINT_NAME = 'fk_fd1858fefd'
-
- def up
- with_lock_retries do
- remove_foreign_key_if_exists(:ci_daily_build_group_report_results, :namespaces, name: CONSTRAINT_NAME)
- end
- end
-
- def down
- add_concurrent_foreign_key :ci_daily_build_group_report_results, :namespaces, column: :group_id, on_delete: :cascade, name: CONSTRAINT_NAME
- end
-end
diff --git a/db/post_migrate/20220106233459_remove_foreign_key_ci_pending_builds_namespace_id.rb b/db/post_migrate/20220106233459_remove_foreign_key_ci_pending_builds_namespace_id.rb
deleted file mode 100644
index 1304f19708e..00000000000
--- a/db/post_migrate/20220106233459_remove_foreign_key_ci_pending_builds_namespace_id.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveForeignKeyCiPendingBuildsNamespaceId < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- CONSTRAINT_NAME = 'fk_fdc0137e4a'
-
- def up
- with_lock_retries do
- remove_foreign_key_if_exists(:ci_pending_builds, :namespaces, name: CONSTRAINT_NAME)
- end
- end
-
- def down
- add_concurrent_foreign_key :ci_pending_builds, :namespaces, column: :namespace_id, on_delete: :cascade, name: CONSTRAINT_NAME
- end
-end
diff --git a/db/post_migrate/20220106235626_remove_foreign_key_ci_runner_namespaces_namespace_id.rb b/db/post_migrate/20220106235626_remove_foreign_key_ci_runner_namespaces_namespace_id.rb
deleted file mode 100644
index 61ca066401e..00000000000
--- a/db/post_migrate/20220106235626_remove_foreign_key_ci_runner_namespaces_namespace_id.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveForeignKeyCiRunnerNamespacesNamespaceId < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- CONSTRAINT_NAME = 'fk_rails_f9d9ed3308'
-
- def up
- with_lock_retries do
- remove_foreign_key_if_exists(:ci_runner_namespaces, :namespaces, name: CONSTRAINT_NAME)
- end
- end
-
- def down
- add_concurrent_foreign_key :ci_runner_namespaces, :namespaces, column: :namespace_id, on_delete: :cascade, name: CONSTRAINT_NAME
- end
-end
diff --git a/db/post_migrate/20220107064845_populate_vulnerability_reads.rb b/db/post_migrate/20220107064845_populate_vulnerability_reads.rb
deleted file mode 100644
index 58826c5f929..00000000000
--- a/db/post_migrate/20220107064845_populate_vulnerability_reads.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# frozen_string_literal: true
-
-class PopulateVulnerabilityReads < Gitlab::Database::Migration[1.0]
- BATCH_SIZE = 10_000
- DELAY_INTERVAL = 2.minutes
- MIGRATION_NAME = 'PopulateVulnerabilityReads'
- SUB_BATCH_SIZE = 1_000
-
- disable_ddl_transaction!
-
- def up
- queue_background_migration_jobs_by_range_at_intervals(
- define_batchable_model('vulnerabilities'),
- MIGRATION_NAME,
- DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- track_jobs: true,
- other_job_arguments: [SUB_BATCH_SIZE]
- )
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220109134455_add_idx_vulnerability_occurrences_dedup_again.rb b/db/post_migrate/20220109134455_add_idx_vulnerability_occurrences_dedup_again.rb
deleted file mode 100644
index 06be8edd707..00000000000
--- a/db/post_migrate/20220109134455_add_idx_vulnerability_occurrences_dedup_again.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddIdxVulnerabilityOccurrencesDedupAgain < Gitlab::Database::Migration[1.0]
- TABLE = :vulnerability_occurrences
- INDEX_NAME = 'index_vulnerability_occurrences_deduplication'
- COLUMNS = %i[project_id report_type project_fingerprint]
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index TABLE, COLUMNS, name: INDEX_NAME
- end
-
- def down
- # nothing to do here
- end
-end
diff --git a/db/post_migrate/20220110171049_schedule_populate_test_reports_issue_id.rb b/db/post_migrate/20220110171049_schedule_populate_test_reports_issue_id.rb
deleted file mode 100644
index dae93e1636d..00000000000
--- a/db/post_migrate/20220110171049_schedule_populate_test_reports_issue_id.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-class SchedulePopulateTestReportsIssueId < Gitlab::Database::Migration[1.0]
- MIGRATION = 'PopulateTestReportsIssueId'
- DELAY_INTERVAL = 2.minutes.to_i
- BATCH_SIZE = 30
-
- disable_ddl_transaction!
-
- def up
- queue_background_migration_jobs_by_range_at_intervals(
- define_batchable_model('requirements_management_test_reports').where(issue_id: nil),
- MIGRATION,
- DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- track_jobs: true
- )
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220110224913_remove_dast_scanner_profiles_builds_ci_build_id_fk.rb b/db/post_migrate/20220110224913_remove_dast_scanner_profiles_builds_ci_build_id_fk.rb
deleted file mode 100644
index d91cd3b43ef..00000000000
--- a/db/post_migrate/20220110224913_remove_dast_scanner_profiles_builds_ci_build_id_fk.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveDastScannerProfilesBuildsCiBuildIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- CONSTRAINT_NAME = 'fk_e4c49200f8'
-
- def up
- with_lock_retries do
- execute('LOCK ci_builds, dast_scanner_profiles_builds IN ACCESS EXCLUSIVE MODE')
- remove_foreign_key_if_exists(:dast_scanner_profiles_builds, :ci_builds, name: CONSTRAINT_NAME)
- end
- end
-
- def down
- add_concurrent_foreign_key(:dast_scanner_profiles_builds, :ci_builds, column: :ci_build_id, on_delete: :cascade, name: CONSTRAINT_NAME)
- end
-end
diff --git a/db/post_migrate/20220110231420_remove_requirements_management_test_reports_build_id_fk.rb b/db/post_migrate/20220110231420_remove_requirements_management_test_reports_build_id_fk.rb
deleted file mode 100644
index dd8c6de4aaf..00000000000
--- a/db/post_migrate/20220110231420_remove_requirements_management_test_reports_build_id_fk.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveRequirementsManagementTestReportsBuildIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- CONSTRAINT_NAME = 'fk_rails_e67d085910'
-
- def up
- with_lock_retries do
- execute('LOCK ci_builds, requirements_management_test_reports IN ACCESS EXCLUSIVE MODE')
- remove_foreign_key_if_exists(:requirements_management_test_reports, :ci_builds, name: CONSTRAINT_NAME)
- end
- end
-
- def down
- add_concurrent_foreign_key(:requirements_management_test_reports, :ci_builds, column: :build_id, on_delete: :nullify, name: CONSTRAINT_NAME)
- end
-end
diff --git a/db/post_migrate/20220110233155_remove_dast_site_profiles_builds_ci_build_id_fk.rb b/db/post_migrate/20220110233155_remove_dast_site_profiles_builds_ci_build_id_fk.rb
deleted file mode 100644
index 00d8a39216b..00000000000
--- a/db/post_migrate/20220110233155_remove_dast_site_profiles_builds_ci_build_id_fk.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveDastSiteProfilesBuildsCiBuildIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- CONSTRAINT_NAME = 'fk_a325505e99'
-
- def up
- with_lock_retries do
- execute('LOCK ci_builds, dast_site_profiles_builds IN ACCESS EXCLUSIVE MODE')
- remove_foreign_key_if_exists(:dast_site_profiles_builds, :ci_builds, name: CONSTRAINT_NAME)
- end
- end
-
- def down
- add_concurrent_foreign_key(:dast_site_profiles_builds, :ci_builds, column: :ci_build_id, on_delete: :cascade, name: CONSTRAINT_NAME)
- end
-end
diff --git a/db/post_migrate/20220111002756_remove_security_scans_build_id_fk.rb b/db/post_migrate/20220111002756_remove_security_scans_build_id_fk.rb
deleted file mode 100644
index 20782664f63..00000000000
--- a/db/post_migrate/20220111002756_remove_security_scans_build_id_fk.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveSecurityScansBuildIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- CONSTRAINT_NAME = 'fk_rails_4ef1e6b4c6'
-
- def up
- with_lock_retries do
- execute('LOCK ci_builds, security_scans IN ACCESS EXCLUSIVE MODE')
- remove_foreign_key_if_exists(:security_scans, :ci_builds, name: CONSTRAINT_NAME)
- end
- end
-
- def down
- add_concurrent_foreign_key(:security_scans, :ci_builds, column: :build_id, on_delete: :cascade, name: CONSTRAINT_NAME)
- end
-end
diff --git a/db/post_migrate/20220111023852_index_cluster_agent_tokens_on_status.rb b/db/post_migrate/20220111023852_index_cluster_agent_tokens_on_status.rb
deleted file mode 100644
index 6de0f9424e8..00000000000
--- a/db/post_migrate/20220111023852_index_cluster_agent_tokens_on_status.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class IndexClusterAgentTokensOnStatus < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_cluster_agent_tokens_on_agent_id_status_last_used_at'
-
- def up
- add_concurrent_index :cluster_agent_tokens, 'agent_id, status, last_used_at DESC NULLS LAST', name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :cluster_agent_tokens, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220111093534_remove_index_on_auto_stop_in.rb b/db/post_migrate/20220111093534_remove_index_on_auto_stop_in.rb
deleted file mode 100644
index bcb78b28376..00000000000
--- a/db/post_migrate/20220111093534_remove_index_on_auto_stop_in.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveIndexOnAutoStopIn < Gitlab::Database::Migration[1.0]
- TABLE = :environments
- INDEX_NAME = 'index_environments_on_auto_stop_at'
- COLUMN = :auto_stop_at
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index TABLE, COLUMN, where: 'auto_stop_at IS NOT NULL', name: INDEX_NAME
- end
-
- def down
- add_concurrent_index TABLE, COLUMN, where: 'auto_stop_at IS NOT NULL', name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220111101421_remove_index_on_merge_request_id.rb b/db/post_migrate/20220111101421_remove_index_on_merge_request_id.rb
deleted file mode 100644
index 38cc259312d..00000000000
--- a/db/post_migrate/20220111101421_remove_index_on_merge_request_id.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveIndexOnMergeRequestId < Gitlab::Database::Migration[1.0]
- TABLE = :merge_request_context_commits
- INDEX_NAME = 'index_merge_request_context_commits_on_merge_request_id'
- COLUMN = :merge_request_id
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index TABLE, COLUMN, name: INDEX_NAME
- end
-
- def down
- add_concurrent_index TABLE, COLUMN, name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220111102314_truncate_ci_mirror_tables.rb b/db/post_migrate/20220111102314_truncate_ci_mirror_tables.rb
deleted file mode 100644
index 795ec24f3bd..00000000000
--- a/db/post_migrate/20220111102314_truncate_ci_mirror_tables.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: true
-
-class TruncateCiMirrorTables < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- execute('TRUNCATE TABLE ci_namespace_mirrors')
- execute('TRUNCATE TABLE ci_project_mirrors')
- end
-
- def down
- # noop
- end
-end
diff --git a/db/post_migrate/20220111221516_remove_projects_ci_pending_builds_fk.rb b/db/post_migrate/20220111221516_remove_projects_ci_pending_builds_fk.rb
deleted file mode 100644
index bc17c125ba7..00000000000
--- a/db/post_migrate/20220111221516_remove_projects_ci_pending_builds_fk.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveProjectsCiPendingBuildsFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- remove_foreign_key_if_exists(:ci_pending_builds, :projects, name: "fk_rails_480669c3b3")
- end
- end
-
- def down
- add_concurrent_foreign_key(:ci_pending_builds, :projects, name: "fk_rails_480669c3b3", column: :project_id, target_column: :id, on_delete: "cascade")
- end
-end
diff --git a/db/post_migrate/20220112015940_remove_projects_ci_running_builds_fk.rb b/db/post_migrate/20220112015940_remove_projects_ci_running_builds_fk.rb
deleted file mode 100644
index 79d864e2c2a..00000000000
--- a/db/post_migrate/20220112015940_remove_projects_ci_running_builds_fk.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveProjectsCiRunningBuildsFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- execute('LOCK projects, ci_running_builds IN ACCESS EXCLUSIVE MODE')
-
- remove_foreign_key_if_exists(:ci_running_builds, :projects, name: "fk_rails_dc1d0801e8")
- end
- end
-
- def down
- add_concurrent_foreign_key(:ci_running_builds, :projects, name: "fk_rails_dc1d0801e8", column: :project_id, target_column: :id, on_delete: "cascade")
- end
-end
diff --git a/db/post_migrate/20220112090556_remove_cascade_delete_from_project_namespace_foreign_key.rb b/db/post_migrate/20220112090556_remove_cascade_delete_from_project_namespace_foreign_key.rb
deleted file mode 100644
index d786c9d846a..00000000000
--- a/db/post_migrate/20220112090556_remove_cascade_delete_from_project_namespace_foreign_key.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveCascadeDeleteFromProjectNamespaceForeignKey < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- TARGET_COLUMN = :project_namespace_id
-
- def up
- with_lock_retries do
- remove_foreign_key_if_exists(:projects, column: TARGET_COLUMN)
- end
-
- add_concurrent_foreign_key(:projects, :namespaces, column: TARGET_COLUMN, on_delete: :nullify)
- end
-
- def down
- with_lock_retries do
- remove_foreign_key_if_exists(:projects, column: TARGET_COLUMN)
- end
-
- add_concurrent_foreign_key(:projects, :namespaces, column: TARGET_COLUMN, on_delete: :cascade)
- end
-end
diff --git a/db/post_migrate/20220112230642_remove_projects_ci_unit_tests_project_id_fk.rb b/db/post_migrate/20220112230642_remove_projects_ci_unit_tests_project_id_fk.rb
deleted file mode 100644
index 9ad90a3a7a0..00000000000
--- a/db/post_migrate/20220112230642_remove_projects_ci_unit_tests_project_id_fk.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveProjectsCiUnitTestsProjectIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- remove_foreign_key_if_exists(:ci_unit_tests, :projects, name: "fk_7a8fabf0a8")
- end
- end
-
- def down
- add_concurrent_foreign_key(:ci_unit_tests, :projects, name: "fk_7a8fabf0a8", column: :project_id, target_column: :id, on_delete: "cascade")
- end
-end
diff --git a/db/post_migrate/20220112232723_remove_projects_ci_daily_build_group_report_results_project_id_fk.rb b/db/post_migrate/20220112232723_remove_projects_ci_daily_build_group_report_results_project_id_fk.rb
deleted file mode 100644
index ad7cf2a20c9..00000000000
--- a/db/post_migrate/20220112232723_remove_projects_ci_daily_build_group_report_results_project_id_fk.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveProjectsCiDailyBuildGroupReportResultsProjectIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- execute('LOCK projects, ci_daily_build_group_report_results IN ACCESS EXCLUSIVE MODE')
- remove_foreign_key_if_exists(:ci_daily_build_group_report_results, :projects, name: "fk_rails_0667f7608c")
- end
- end
-
- def down
- add_concurrent_foreign_key(:ci_daily_build_group_report_results, :projects, name: "fk_rails_0667f7608c", column: :project_id, target_column: :id, on_delete: "cascade")
- end
-end
diff --git a/db/post_migrate/20220113013319_remove_projects_ci_freeze_periods_project_id_fk.rb b/db/post_migrate/20220113013319_remove_projects_ci_freeze_periods_project_id_fk.rb
deleted file mode 100644
index 13cfacdc223..00000000000
--- a/db/post_migrate/20220113013319_remove_projects_ci_freeze_periods_project_id_fk.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveProjectsCiFreezePeriodsProjectIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- remove_foreign_key_if_exists(:ci_freeze_periods, :projects, name: "fk_2e02bbd1a6")
- end
- end
-
- def down
- add_concurrent_foreign_key(:ci_freeze_periods, :projects, name: "fk_2e02bbd1a6", column: :project_id, target_column: :id, on_delete: "cascade")
- end
-end
diff --git a/db/post_migrate/20220113014438_remove_projects_ci_resource_groups_project_id_fk.rb b/db/post_migrate/20220113014438_remove_projects_ci_resource_groups_project_id_fk.rb
deleted file mode 100644
index e86dd015493..00000000000
--- a/db/post_migrate/20220113014438_remove_projects_ci_resource_groups_project_id_fk.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveProjectsCiResourceGroupsProjectIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- remove_foreign_key_if_exists(:ci_resource_groups, :projects, name: "fk_774722d144")
- end
- end
-
- def down
- add_concurrent_foreign_key(:ci_resource_groups, :projects, name: "fk_774722d144", column: :project_id, target_column: :id, on_delete: "cascade")
- end
-end
diff --git a/db/post_migrate/20220113015830_remove_projects_ci_build_report_results_project_id_fk.rb b/db/post_migrate/20220113015830_remove_projects_ci_build_report_results_project_id_fk.rb
deleted file mode 100644
index 3d2753bf9bf..00000000000
--- a/db/post_migrate/20220113015830_remove_projects_ci_build_report_results_project_id_fk.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveProjectsCiBuildReportResultsProjectIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- remove_foreign_key_if_exists(:ci_build_report_results, :projects, name: "fk_rails_056d298d48")
- end
- end
-
- def down
- add_concurrent_foreign_key(:ci_build_report_results, :projects, name: "fk_rails_056d298d48", column: :project_id, target_column: :id, on_delete: "cascade")
- end
-end
diff --git a/db/post_migrate/20220113035519_remove_users_ci_job_token_project_scope_links_added_by_id_fk.rb b/db/post_migrate/20220113035519_remove_users_ci_job_token_project_scope_links_added_by_id_fk.rb
deleted file mode 100644
index 966286a6730..00000000000
--- a/db/post_migrate/20220113035519_remove_users_ci_job_token_project_scope_links_added_by_id_fk.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveUsersCiJobTokenProjectScopeLinksAddedByIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- remove_foreign_key_if_exists(:ci_job_token_project_scope_links, :users, name: "fk_rails_35f7f506ce")
- end
- end
-
- def down
- add_concurrent_foreign_key(:ci_job_token_project_scope_links, :users, name: "fk_rails_35f7f506ce", column: :added_by_id, target_column: :id, on_delete: :nullify)
- end
-end
diff --git a/db/post_migrate/20220113040447_remove_users_ci_pipeline_schedules_owner_id_fk.rb b/db/post_migrate/20220113040447_remove_users_ci_pipeline_schedules_owner_id_fk.rb
deleted file mode 100644
index 2e5d4cfd22e..00000000000
--- a/db/post_migrate/20220113040447_remove_users_ci_pipeline_schedules_owner_id_fk.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveUsersCiPipelineSchedulesOwnerIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- remove_foreign_key_if_exists(:ci_pipeline_schedules, :users, name: "fk_9ea99f58d2")
- end
- end
-
- def down
- add_concurrent_foreign_key(:ci_pipeline_schedules, :users, name: "fk_9ea99f58d2", column: :owner_id, target_column: :id, on_delete: :nullify)
- end
-end
diff --git a/db/post_migrate/20220113111440_schedule_fix_incorrect_max_seats_used.rb b/db/post_migrate/20220113111440_schedule_fix_incorrect_max_seats_used.rb
deleted file mode 100644
index f39b026bd77..00000000000
--- a/db/post_migrate/20220113111440_schedule_fix_incorrect_max_seats_used.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleFixIncorrectMaxSeatsUsed < Gitlab::Database::Migration[1.0]
- DOWNTIME = false
- TMP_IDX_NAME = 'tmp_gitlab_subscriptions_max_seats_used_migration'
-
- disable_ddl_transaction!
-
- def up
- 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: TMP_IDX_NAME
-
- return unless Gitlab.com?
-
- migrate_in(1.hour, 'FixIncorrectMaxSeatsUsed')
- end
-
- def down
- remove_concurrent_index_by_name :gitlab_subscriptions, TMP_IDX_NAME
- end
-end
diff --git a/db/post_migrate/20220114105525_add_index_on_projects_path.rb b/db/post_migrate/20220114105525_add_index_on_projects_path.rb
deleted file mode 100644
index cef38f91b21..00000000000
--- a/db/post_migrate/20220114105525_add_index_on_projects_path.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexOnProjectsPath < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- TABLE = :projects
- INDEX_NAME = 'index_on_projects_path'
- COLUMN = :path
-
- def up
- add_concurrent_index TABLE, COLUMN, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index TABLE, COLUMN, name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220116175851_add_author_index_to_design_management_versions.rb b/db/post_migrate/20220116175851_add_author_index_to_design_management_versions.rb
deleted file mode 100644
index 1ea89609926..00000000000
--- a/db/post_migrate/20220116175851_add_author_index_to_design_management_versions.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class AddAuthorIndexToDesignManagementVersions < Gitlab::Database::Migration[1.0]
- TABLE = :design_management_versions
- INDEX_NAME = 'index_design_management_versions_on_author_id'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index TABLE, :author_id, where: 'author_id IS NOT NULL', name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index TABLE, :author_id, name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220117034056_remove_index_cluster_agent_tokens_on_agent_id_and_last_used_at.rb b/db/post_migrate/20220117034056_remove_index_cluster_agent_tokens_on_agent_id_and_last_used_at.rb
deleted file mode 100644
index 5e306be016a..00000000000
--- a/db/post_migrate/20220117034056_remove_index_cluster_agent_tokens_on_agent_id_and_last_used_at.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveIndexClusterAgentTokensOnAgentIdAndLastUsedAt < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX = 'index_cluster_agent_tokens_on_agent_id_and_last_used_at'
-
- def up
- remove_concurrent_index_by_name :cluster_agent_tokens, name: INDEX
- end
-
- def down
- add_concurrent_index :cluster_agent_tokens, 'agent_id, last_used_at DESC NULLS LAST', name: INDEX
- end
-end
diff --git a/db/post_migrate/20220118204039_self_managed_reschedule_recalculate_vulnerability_finding_signatures_for_findings.rb b/db/post_migrate/20220118204039_self_managed_reschedule_recalculate_vulnerability_finding_signatures_for_findings.rb
deleted file mode 100644
index 18f68150e45..00000000000
--- a/db/post_migrate/20220118204039_self_managed_reschedule_recalculate_vulnerability_finding_signatures_for_findings.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-class SelfManagedRescheduleRecalculateVulnerabilityFindingSignaturesForFindings < Gitlab::Database::Migration[1.0]
- MIGRATION = 'RecalculateVulnerabilityFindingSignaturesForFindings'
- BATCH_SIZE = 1_000
- DELAY_INTERVAL = 2.minutes
-
- disable_ddl_transaction!
-
- def up
- # Only run migration for self-managed
- return if ::Gitlab.com?
-
- # Vulnerability Finding Signatures is an EE only feature
- return unless Gitlab.ee?
-
- delete_queued_jobs(MIGRATION)
-
- requeue_background_migration_jobs_by_range_at_intervals(
- MIGRATION,
- DELAY_INTERVAL,
- batch_size: BATCH_SIZE
- )
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220119094503_populate_audit_event_streaming_verification_token.rb b/db/post_migrate/20220119094503_populate_audit_event_streaming_verification_token.rb
deleted file mode 100644
index 482f873739a..00000000000
--- a/db/post_migrate/20220119094503_populate_audit_event_streaming_verification_token.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class PopulateAuditEventStreamingVerificationToken < Gitlab::Database::Migration[1.0]
- class ExternalAuditEventDestination < ActiveRecord::Base
- self.table_name = 'audit_events_external_audit_event_destinations'
-
- def regenerate_verification_token
- update!(verification_token: SecureRandom.base58(24))
- end
- end
-
- def up
- ExternalAuditEventDestination.all.each { |destination| destination.regenerate_verification_token }
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220119141736_remove_projects_ci_pipeline_artifacts_project_id_fk.rb b/db/post_migrate/20220119141736_remove_projects_ci_pipeline_artifacts_project_id_fk.rb
deleted file mode 100644
index 59a003c8f8d..00000000000
--- a/db/post_migrate/20220119141736_remove_projects_ci_pipeline_artifacts_project_id_fk.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveProjectsCiPipelineArtifactsProjectIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- execute('LOCK projects, ci_pipeline_artifacts IN ACCESS EXCLUSIVE MODE')
-
- remove_foreign_key_if_exists(:ci_pipeline_artifacts, :projects, name: "fk_rails_4a70390ca6")
- end
- end
-
- def down
- add_concurrent_foreign_key(:ci_pipeline_artifacts, :projects, name: "fk_rails_4a70390ca6", column: :project_id, target_column: :id, on_delete: :cascade)
- end
-end
diff --git a/db/post_migrate/20220119143130_remove_projects_ci_sources_pipelines_source_project_id_fk.rb b/db/post_migrate/20220119143130_remove_projects_ci_sources_pipelines_source_project_id_fk.rb
deleted file mode 100644
index 7fe9f1c856b..00000000000
--- a/db/post_migrate/20220119143130_remove_projects_ci_sources_pipelines_source_project_id_fk.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveProjectsCiSourcesPipelinesSourceProjectIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- execute('LOCK projects, ci_sources_pipelines IN ACCESS EXCLUSIVE MODE')
-
- remove_foreign_key_if_exists(:ci_sources_pipelines, :projects, name: "fk_acd9737679")
- end
- end
-
- def down
- add_concurrent_foreign_key(:ci_sources_pipelines, :projects, name: "fk_acd9737679", column: :source_project_id, target_column: :id, on_delete: :cascade)
- end
-end
diff --git a/db/post_migrate/20220119144458_remove_users_ci_triggers_owner_id_fk.rb b/db/post_migrate/20220119144458_remove_users_ci_triggers_owner_id_fk.rb
deleted file mode 100644
index 9acf53a6ea2..00000000000
--- a/db/post_migrate/20220119144458_remove_users_ci_triggers_owner_id_fk.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveUsersCiTriggersOwnerIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- execute('LOCK users, ci_triggers IN ACCESS EXCLUSIVE MODE')
-
- remove_foreign_key_if_exists(:ci_triggers, :users, name: "fk_e8e10d1964")
- end
- end
-
- def down
- add_concurrent_foreign_key(:ci_triggers, :users, name: "fk_e8e10d1964", column: :owner_id, target_column: :id, on_delete: :cascade)
- end
-end
diff --git a/db/post_migrate/20220119151221_remove_merge_requests_ci_pipelines_merge_request_id_fk.rb b/db/post_migrate/20220119151221_remove_merge_requests_ci_pipelines_merge_request_id_fk.rb
deleted file mode 100644
index c7ced0ae3b7..00000000000
--- a/db/post_migrate/20220119151221_remove_merge_requests_ci_pipelines_merge_request_id_fk.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveMergeRequestsCiPipelinesMergeRequestIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- return unless foreign_key_exists?(:ci_pipelines, :merge_requests, name: "fk_a23be95014")
-
- with_lock_retries do
- execute('LOCK merge_requests, ci_pipelines IN ACCESS EXCLUSIVE MODE') if transaction_open?
-
- remove_foreign_key_if_exists(:ci_pipelines, :merge_requests, name: "fk_a23be95014")
- end
- end
-
- def down
- add_concurrent_foreign_key(:ci_pipelines, :merge_requests, name: "fk_a23be95014", column: :merge_request_id, target_column: :id, on_delete: :cascade)
- end
-end
diff --git a/db/post_migrate/20220119153706_remove_ci_pipelines_merge_trains_pipeline_id_fk.rb b/db/post_migrate/20220119153706_remove_ci_pipelines_merge_trains_pipeline_id_fk.rb
deleted file mode 100644
index 92d68ff4fbb..00000000000
--- a/db/post_migrate/20220119153706_remove_ci_pipelines_merge_trains_pipeline_id_fk.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveCiPipelinesMergeTrainsPipelineIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- execute('LOCK ci_pipelines, merge_trains IN ACCESS EXCLUSIVE MODE')
-
- remove_foreign_key_if_exists(:merge_trains, :ci_pipelines, name: "fk_rails_f90820cb08")
- end
- end
-
- def down
- add_concurrent_foreign_key(:merge_trains, :ci_pipelines, name: "fk_rails_f90820cb08", column: :pipeline_id, target_column: :id, on_delete: :nullify)
- end
-end
diff --git a/db/post_migrate/20220119154442_remove_ci_pipelines_merge_requests_head_pipeline_id_fk.rb b/db/post_migrate/20220119154442_remove_ci_pipelines_merge_requests_head_pipeline_id_fk.rb
deleted file mode 100644
index 6a978ce2ab1..00000000000
--- a/db/post_migrate/20220119154442_remove_ci_pipelines_merge_requests_head_pipeline_id_fk.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveCiPipelinesMergeRequestsHeadPipelineIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- execute('LOCK ci_pipelines, merge_requests IN ACCESS EXCLUSIVE MODE')
-
- remove_foreign_key_if_exists(:merge_requests, :ci_pipelines, name: "fk_fd82eae0b9")
- end
- end
-
- def down
- add_concurrent_foreign_key(:merge_requests, :ci_pipelines, name: "fk_fd82eae0b9", column: :head_pipeline_id, target_column: :id, on_delete: :nullify)
- end
-end
diff --git a/db/post_migrate/20220119193130_remove_ci_pipelines_dast_profiles_pipelines_ci_pipeline_id_fk.rb b/db/post_migrate/20220119193130_remove_ci_pipelines_dast_profiles_pipelines_ci_pipeline_id_fk.rb
deleted file mode 100644
index f4eedd0fa70..00000000000
--- a/db/post_migrate/20220119193130_remove_ci_pipelines_dast_profiles_pipelines_ci_pipeline_id_fk.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveCiPipelinesDastProfilesPipelinesCiPipelineIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- execute('LOCK ci_pipelines, dast_profiles_pipelines IN ACCESS EXCLUSIVE MODE')
-
- remove_foreign_key_if_exists(:dast_profiles_pipelines, :ci_pipelines, name: "fk_a60cad829d")
- end
- end
-
- def down
- add_concurrent_foreign_key(:dast_profiles_pipelines, :ci_pipelines, name: "fk_a60cad829d", column: :ci_pipeline_id, target_column: :id, on_delete: :cascade)
- end
-end
diff --git a/db/post_migrate/20220119201340_remove_ci_pipelines_vulnerability_statistics_latest_pipeline_id_fk.rb b/db/post_migrate/20220119201340_remove_ci_pipelines_vulnerability_statistics_latest_pipeline_id_fk.rb
deleted file mode 100644
index bd80767cf6a..00000000000
--- a/db/post_migrate/20220119201340_remove_ci_pipelines_vulnerability_statistics_latest_pipeline_id_fk.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveCiPipelinesVulnerabilityStatisticsLatestPipelineIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- execute('LOCK ci_pipelines, vulnerability_statistics IN ACCESS EXCLUSIVE MODE')
-
- remove_foreign_key_if_exists(:vulnerability_statistics, :ci_pipelines, name: "fk_e8b13c928f")
- end
- end
-
- def down
- add_concurrent_foreign_key(:vulnerability_statistics, :ci_pipelines, name: "fk_e8b13c928f", column: :latest_pipeline_id, target_column: :id, on_delete: :nullify)
- end
-end
diff --git a/db/post_migrate/20220119203119_remove_ci_pipelines_vulnerability_occurrence_pipelines_pipeline_id_fk.rb b/db/post_migrate/20220119203119_remove_ci_pipelines_vulnerability_occurrence_pipelines_pipeline_id_fk.rb
deleted file mode 100644
index b6397486dd0..00000000000
--- a/db/post_migrate/20220119203119_remove_ci_pipelines_vulnerability_occurrence_pipelines_pipeline_id_fk.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveCiPipelinesVulnerabilityOccurrencePipelinesPipelineIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- with_lock_retries do
- execute('LOCK ci_pipelines, vulnerability_occurrence_pipelines IN ACCESS EXCLUSIVE MODE')
-
- remove_foreign_key_if_exists(:vulnerability_occurrence_pipelines, :ci_pipelines, name: "fk_rails_6421e35d7d")
- end
- end
-
- def down
- add_concurrent_foreign_key(:vulnerability_occurrence_pipelines, :ci_pipelines, name: "fk_rails_6421e35d7d", column: :pipeline_id, target_column: :id, on_delete: :cascade)
- end
-end
diff --git a/db/post_migrate/20220120094340_drop_position_from_security_findings.rb b/db/post_migrate/20220120094340_drop_position_from_security_findings.rb
deleted file mode 100644
index 56af346ad1b..00000000000
--- a/db/post_migrate/20220120094340_drop_position_from_security_findings.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class DropPositionFromSecurityFindings < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def change
- remove_column :security_findings, :position, :integer
- end
-end
diff --git a/db/post_migrate/20220120123700_add_tmp_index_routes_id_for_namespaces.rb b/db/post_migrate/20220120123700_add_tmp_index_routes_id_for_namespaces.rb
deleted file mode 100644
index 2b8cecd0e57..00000000000
--- a/db/post_migrate/20220120123700_add_tmp_index_routes_id_for_namespaces.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class AddTmpIndexRoutesIdForNamespaces < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'tmp_index_for_namespace_id_migration_on_routes'
-
- disable_ddl_transaction!
-
- def up
- # Temporary index to be removed in 14.9
- # https://gitlab.com/gitlab-org/gitlab/-/issues/352353
- add_concurrent_index :routes, :id, where: "routes.namespace_id is null and routes.source_type = 'Namespace'", name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :routes, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220120123800_backfill_namespace_id_for_namespace_routes.rb b/db/post_migrate/20220120123800_backfill_namespace_id_for_namespace_routes.rb
deleted file mode 100644
index 68279456ddd..00000000000
--- a/db/post_migrate/20220120123800_backfill_namespace_id_for_namespace_routes.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-class BackfillNamespaceIdForNamespaceRoutes < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- MIGRATION = 'BackfillNamespaceIdForNamespaceRoute'
- INTERVAL = 2.minutes
- BATCH_SIZE = 1_000
- MAX_BATCH_SIZE = 10_000
- SUB_BATCH_SIZE = 200
-
- def up
- queue_batched_background_migration(
- MIGRATION,
- :routes,
- :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, :routes, :id, [])
- end
-end
diff --git a/db/post_migrate/20220120211832_backfill_member_namespace_id_for_group_members.rb b/db/post_migrate/20220120211832_backfill_member_namespace_id_for_group_members.rb
deleted file mode 100644
index 279084e0fc5..00000000000
--- a/db/post_migrate/20220120211832_backfill_member_namespace_id_for_group_members.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-class BackfillMemberNamespaceIdForGroupMembers < Gitlab::Database::Migration[1.0]
- MIGRATION = 'BackfillMemberNamespaceForGroupMembers'
- INTERVAL = 2.minutes
- BATCH_SIZE = 1_000
- MAX_BATCH_SIZE = 2_000
- SUB_BATCH_SIZE = 100
-
- 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/20220121214752_remove_projects_ci_stages_project_id_fk.rb b/db/post_migrate/20220121214752_remove_projects_ci_stages_project_id_fk.rb
deleted file mode 100644
index 93f0b30571a..00000000000
--- a/db/post_migrate/20220121214752_remove_projects_ci_stages_project_id_fk.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveProjectsCiStagesProjectIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- return if Gitlab.com? # unsafe migration, skip on GitLab.com due to https://gitlab.com/groups/gitlab-org/-/epics/7249#note_819625526
- return unless foreign_key_exists?(:ci_stages, :projects, name: "fk_2360681d1d")
-
- with_lock_retries do
- execute('LOCK projects, ci_stages IN ACCESS EXCLUSIVE MODE') if transaction_open?
-
- remove_foreign_key_if_exists(:ci_stages, :projects, name: "fk_2360681d1d")
- end
- end
-
- def down
- add_concurrent_foreign_key(:ci_stages, :projects, name: "fk_2360681d1d", column: :project_id, target_column: :id, on_delete: :cascade)
- end
-end
diff --git a/db/post_migrate/20220121214753_re_remove_projects_ci_stages_project_id_fk.rb b/db/post_migrate/20220121214753_re_remove_projects_ci_stages_project_id_fk.rb
deleted file mode 100644
index 45dec15a5a7..00000000000
--- a/db/post_migrate/20220121214753_re_remove_projects_ci_stages_project_id_fk.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class ReRemoveProjectsCiStagesProjectIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- return unless foreign_key_exists?(:ci_stages, :projects, name: "fk_2360681d1d")
-
- with_lock_retries do
- execute('LOCK projects, ci_stages IN ACCESS EXCLUSIVE MODE') if transaction_open?
-
- remove_foreign_key_if_exists(:ci_stages, :projects, name: "fk_2360681d1d")
- end
- end
-
- def down
- # no-op, since the FK will be added via rollback by prior-migration
- end
-end
diff --git a/db/post_migrate/20220121221651_remove_projects_ci_variables_project_id_fk.rb b/db/post_migrate/20220121221651_remove_projects_ci_variables_project_id_fk.rb
deleted file mode 100644
index f647d4376ac..00000000000
--- a/db/post_migrate/20220121221651_remove_projects_ci_variables_project_id_fk.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveProjectsCiVariablesProjectIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- return unless foreign_key_exists?(:ci_variables, :projects, name: "fk_ada5eb64b3")
-
- with_lock_retries do
- execute('LOCK projects, ci_variables IN ACCESS EXCLUSIVE MODE') if transaction_open?
-
- remove_foreign_key_if_exists(:ci_variables, :projects, name: "fk_ada5eb64b3")
- end
- end
-
- def down
- add_concurrent_foreign_key(:ci_variables, :projects, name: "fk_ada5eb64b3", column: :project_id, target_column: :id, on_delete: :cascade)
- end
-end
diff --git a/db/post_migrate/20220124130028_dedup_runner_projects.rb b/db/post_migrate/20220124130028_dedup_runner_projects.rb
deleted file mode 100644
index 1a4c895f1c4..00000000000
--- a/db/post_migrate/20220124130028_dedup_runner_projects.rb
+++ /dev/null
@@ -1,71 +0,0 @@
-# frozen_string_literal: true
-
-class DedupRunnerProjects < Gitlab::Database::Migration[1.0]
- TABLE_NAME = :ci_runner_projects
- TMP_INDEX_NAME = 'tmp_unique_ci_runner_projects_by_runner_id_and_project_id'
- OLD_INDEX_NAME = 'index_ci_runner_projects_on_runner_id_and_project_id'
- INDEX_NAME = 'index_unique_ci_runner_projects_on_runner_id_and_project_id'
- BATCH_SIZE = 5000
-
- disable_ddl_transaction!
-
- module Ci
- class RunnerProject < ActiveRecord::Base
- include EachBatch
-
- self.table_name = 'ci_runner_projects'
- end
- end
-
- def up
- last_runner_project_record_id = Ci::RunnerProject.maximum(:id) || 0
-
- # This index will disallow further duplicates while we're deduplicating the data.
- add_concurrent_index(TABLE_NAME, [:runner_id, :project_id], where: "id > #{Integer(last_runner_project_record_id)}", unique: true, name: TMP_INDEX_NAME)
-
- Ci::RunnerProject.each_batch(of: BATCH_SIZE) do |relation|
- duplicated_runner_projects = Ci::RunnerProject
- .select('COUNT(*)', :runner_id, :project_id)
- .where('(runner_id, project_id) IN (?)', relation.select(:runner_id, :project_id))
- .group(:runner_id, :project_id)
- .having('COUNT(*) > 1')
-
- duplicated_runner_projects.each do |runner_project|
- deduplicate_item(runner_project)
- end
- end
-
- add_concurrent_index(TABLE_NAME, [:runner_id, :project_id], unique: true, name: INDEX_NAME)
- remove_concurrent_index_by_name(TABLE_NAME, TMP_INDEX_NAME)
- remove_concurrent_index_by_name(TABLE_NAME, OLD_INDEX_NAME)
- end
-
- def down
- add_concurrent_index(TABLE_NAME, [:runner_id, :project_id], name: OLD_INDEX_NAME)
- remove_concurrent_index_by_name(TABLE_NAME, TMP_INDEX_NAME)
- remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME)
- end
-
- private
-
- def deduplicate_item(runner_project)
- runner_projects_records = Ci::RunnerProject
- .where(project_id: runner_project.project_id, runner_id: runner_project.runner_id)
- .order(updated_at: :asc)
- .to_a
-
- attributes = {}
- runner_projects_records.each do |runner_projects_record|
- params = runner_projects_record.attributes.except('id')
- attributes.merge!(params.compact)
- end
-
- ApplicationRecord.transaction do
- record_to_keep = runner_projects_records.pop
- records_to_delete = runner_projects_records
-
- Ci::RunnerProject.where(id: records_to_delete.map(&:id)).delete_all
- record_to_keep.update!(attributes)
- end
- end
-end
diff --git a/db/post_migrate/20220124145019_remove_projects_external_pull_requests_project_id_fk.rb b/db/post_migrate/20220124145019_remove_projects_external_pull_requests_project_id_fk.rb
deleted file mode 100644
index b16234fc812..00000000000
--- a/db/post_migrate/20220124145019_remove_projects_external_pull_requests_project_id_fk.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveProjectsExternalPullRequestsProjectIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- return unless foreign_key_exists?(:external_pull_requests, :projects, name: "fk_rails_bcae9b5c7b")
-
- with_lock_retries do
- execute('LOCK projects, external_pull_requests IN ACCESS EXCLUSIVE MODE') if transaction_open?
-
- remove_foreign_key_if_exists(:external_pull_requests, :projects, name: "fk_rails_bcae9b5c7b")
- end
- end
-
- def down
- add_concurrent_foreign_key(:external_pull_requests, :projects, name: "fk_rails_bcae9b5c7b", column: :project_id, target_column: :id, on_delete: :cascade)
- end
-end
diff --git a/db/post_migrate/20220124151456_remove_projects_ci_triggers_project_id_fk.rb b/db/post_migrate/20220124151456_remove_projects_ci_triggers_project_id_fk.rb
deleted file mode 100644
index 684d363eb96..00000000000
--- a/db/post_migrate/20220124151456_remove_projects_ci_triggers_project_id_fk.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveProjectsCiTriggersProjectIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- return unless foreign_key_exists?(:ci_triggers, :projects, name: "fk_e3e63f966e")
-
- with_lock_retries do
- execute('LOCK projects, ci_triggers IN ACCESS EXCLUSIVE MODE') if transaction_open?
-
- remove_foreign_key_if_exists(:ci_triggers, :projects, name: "fk_e3e63f966e")
- end
- end
-
- def down
- add_concurrent_foreign_key(:ci_triggers, :projects, name: "fk_e3e63f966e", column: :project_id, target_column: :id, on_delete: :cascade)
- end
-end
diff --git a/db/post_migrate/20220124151949_remove_projects_ci_runner_projects_project_id_fk.rb b/db/post_migrate/20220124151949_remove_projects_ci_runner_projects_project_id_fk.rb
deleted file mode 100644
index de8feb96a06..00000000000
--- a/db/post_migrate/20220124151949_remove_projects_ci_runner_projects_project_id_fk.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveProjectsCiRunnerProjectsProjectIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- return unless foreign_key_exists?(:ci_runner_projects, :projects, name: "fk_4478a6f1e4")
-
- with_lock_retries do
- execute('LOCK projects, ci_runner_projects IN ACCESS EXCLUSIVE MODE') if transaction_open?
-
- remove_foreign_key_if_exists(:ci_runner_projects, :projects, name: "fk_4478a6f1e4")
- end
- end
-
- def down
- add_concurrent_foreign_key(:ci_runner_projects, :projects, name: "fk_4478a6f1e4", column: :project_id, target_column: :id, on_delete: :cascade)
- end
-end
diff --git a/db/post_migrate/20220124152824_remove_projects_ci_subscriptions_projects_downstream_project_id_fk.rb b/db/post_migrate/20220124152824_remove_projects_ci_subscriptions_projects_downstream_project_id_fk.rb
deleted file mode 100644
index 8596b1f14ba..00000000000
--- a/db/post_migrate/20220124152824_remove_projects_ci_subscriptions_projects_downstream_project_id_fk.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveProjectsCiSubscriptionsProjectsDownstreamProjectIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- return unless foreign_key_exists?(:ci_subscriptions_projects, :projects, name: "fk_rails_0818751483")
-
- with_lock_retries do
- execute('LOCK projects, ci_subscriptions_projects IN ACCESS EXCLUSIVE MODE') if transaction_open?
-
- remove_foreign_key_if_exists(:ci_subscriptions_projects, :projects, name: "fk_rails_0818751483")
- end
- end
-
- def down
- add_concurrent_foreign_key(:ci_subscriptions_projects, :projects, name: "fk_rails_0818751483", column: :downstream_project_id, target_column: :id, on_delete: :cascade)
- end
-end
diff --git a/db/post_migrate/20220124153233_remove_projects_ci_job_artifacts_project_id_fk.rb b/db/post_migrate/20220124153233_remove_projects_ci_job_artifacts_project_id_fk.rb
deleted file mode 100644
index 1948a78916d..00000000000
--- a/db/post_migrate/20220124153233_remove_projects_ci_job_artifacts_project_id_fk.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveProjectsCiJobArtifactsProjectIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- return if Gitlab.com? # unsafe migration, skip on GitLab.com due to https://gitlab.com/groups/gitlab-org/-/epics/7249#note_819625526
- return unless foreign_key_exists?(:ci_job_artifacts, :projects, name: "fk_rails_9862d392f9")
-
- with_lock_retries do
- execute('LOCK projects, ci_job_artifacts IN ACCESS EXCLUSIVE MODE') if transaction_open?
-
- remove_foreign_key_if_exists(:ci_job_artifacts, :projects, name: "fk_rails_9862d392f9")
- end
- end
-
- def down
- add_concurrent_foreign_key(:ci_job_artifacts, :projects, name: "fk_rails_9862d392f9", column: :project_id, target_column: :id, on_delete: :cascade)
- end
-end
diff --git a/db/post_migrate/20220124153234_re_remove_projects_ci_job_artifacts_project_id_fk.rb b/db/post_migrate/20220124153234_re_remove_projects_ci_job_artifacts_project_id_fk.rb
deleted file mode 100644
index bb59134b927..00000000000
--- a/db/post_migrate/20220124153234_re_remove_projects_ci_job_artifacts_project_id_fk.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class ReRemoveProjectsCiJobArtifactsProjectIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- return unless foreign_key_exists?(:ci_job_artifacts, :projects, name: "fk_rails_9862d392f9")
-
- with_lock_retries do
- execute('LOCK projects, ci_job_artifacts IN ACCESS EXCLUSIVE MODE') if transaction_open?
-
- remove_foreign_key_if_exists(:ci_job_artifacts, :projects, name: "fk_rails_9862d392f9")
- end
- end
-
- def down
- # no-op, since the FK will be added via rollback by prior-migration
- end
-end
diff --git a/db/post_migrate/20220124180704_remove_projects_ci_builds_metadata_project_id_fk.rb b/db/post_migrate/20220124180704_remove_projects_ci_builds_metadata_project_id_fk.rb
deleted file mode 100644
index fc9dc2cc6dc..00000000000
--- a/db/post_migrate/20220124180704_remove_projects_ci_builds_metadata_project_id_fk.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveProjectsCiBuildsMetadataProjectIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- return if Gitlab.com? # unsafe migration, skip on GitLab.com due to https://gitlab.com/groups/gitlab-org/-/epics/7249#note_819625526
- return unless foreign_key_exists?(:ci_builds_metadata, :projects, name: "fk_rails_ffcf702a02")
-
- with_lock_retries do
- execute('LOCK projects, ci_builds_metadata IN ACCESS EXCLUSIVE MODE') if transaction_open?
-
- remove_foreign_key_if_exists(:ci_builds_metadata, :projects, name: "fk_rails_ffcf702a02")
- end
- end
-
- def down
- add_concurrent_foreign_key(:ci_builds_metadata, :projects, name: "fk_rails_ffcf702a02", column: :project_id, target_column: :id, on_delete: :cascade)
- end
-end
diff --git a/db/post_migrate/20220124180705_re_remove_projects_ci_builds_metadata_project_id_fk.rb b/db/post_migrate/20220124180705_re_remove_projects_ci_builds_metadata_project_id_fk.rb
deleted file mode 100644
index 6483b8e0643..00000000000
--- a/db/post_migrate/20220124180705_re_remove_projects_ci_builds_metadata_project_id_fk.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class ReRemoveProjectsCiBuildsMetadataProjectIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- return unless foreign_key_exists?(:ci_builds_metadata, :projects, name: "fk_rails_ffcf702a02")
-
- with_lock_retries do
- execute('LOCK projects, ci_builds_metadata IN ACCESS EXCLUSIVE MODE') if transaction_open?
-
- remove_foreign_key_if_exists(:ci_builds_metadata, :projects, name: "fk_rails_ffcf702a02")
- end
- end
-
- def down
- # no-op, since the FK will be added via rollback by prior-migration
- end
-end
diff --git a/db/post_migrate/20220124184338_remove_projects_ci_subscriptions_projects_upstream_project_id_fk.rb b/db/post_migrate/20220124184338_remove_projects_ci_subscriptions_projects_upstream_project_id_fk.rb
deleted file mode 100644
index 50448f4a884..00000000000
--- a/db/post_migrate/20220124184338_remove_projects_ci_subscriptions_projects_upstream_project_id_fk.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveProjectsCiSubscriptionsProjectsUpstreamProjectIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- return unless foreign_key_exists?(:ci_subscriptions_projects, :projects, name: "fk_rails_7871f9a97b")
-
- with_lock_retries do
- execute('LOCK projects, ci_subscriptions_projects IN ACCESS EXCLUSIVE MODE') if transaction_open?
-
- remove_foreign_key_if_exists(:ci_subscriptions_projects, :projects, name: "fk_rails_7871f9a97b")
- end
- end
-
- def down
- add_concurrent_foreign_key(:ci_subscriptions_projects, :projects, name: "fk_rails_7871f9a97b", column: :upstream_project_id, target_column: :id, on_delete: :cascade)
- end
-end
diff --git a/db/post_migrate/20220124204046_remove_projects_ci_sources_pipelines_project_id_fk.rb b/db/post_migrate/20220124204046_remove_projects_ci_sources_pipelines_project_id_fk.rb
deleted file mode 100644
index e15d337045e..00000000000
--- a/db/post_migrate/20220124204046_remove_projects_ci_sources_pipelines_project_id_fk.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveProjectsCiSourcesPipelinesProjectIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- return unless foreign_key_exists?(:ci_sources_pipelines, :projects, name: "fk_1e53c97c0a")
-
- with_lock_retries do
- execute('LOCK projects, ci_sources_pipelines IN ACCESS EXCLUSIVE MODE') if transaction_open?
-
- remove_foreign_key_if_exists(:ci_sources_pipelines, :projects, name: "fk_1e53c97c0a")
- end
- end
-
- def down
- add_concurrent_foreign_key(:ci_sources_pipelines, :projects, name: "fk_1e53c97c0a", column: :project_id, target_column: :id, on_delete: :cascade)
- end
-end
diff --git a/db/post_migrate/20220124214131_remove_projects_ci_refs_project_id_fk.rb b/db/post_migrate/20220124214131_remove_projects_ci_refs_project_id_fk.rb
deleted file mode 100644
index f90d477673a..00000000000
--- a/db/post_migrate/20220124214131_remove_projects_ci_refs_project_id_fk.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveProjectsCiRefsProjectIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- return unless foreign_key_exists?(:ci_refs, :projects, name: "fk_rails_4249db8cc3")
-
- with_lock_retries do
- execute('LOCK projects, ci_refs IN ACCESS EXCLUSIVE MODE') if transaction_open?
-
- remove_foreign_key_if_exists(:ci_refs, :projects, name: "fk_rails_4249db8cc3")
- end
- end
-
- def down
- add_concurrent_foreign_key(:ci_refs, :projects, name: "fk_rails_4249db8cc3", column: :project_id, target_column: :id, on_delete: :cascade)
- end
-end
diff --git a/db/post_migrate/20220124215857_remove_projects_ci_job_token_project_scope_links_source_project_id_fk.rb b/db/post_migrate/20220124215857_remove_projects_ci_job_token_project_scope_links_source_project_id_fk.rb
deleted file mode 100644
index 8bfe9586a50..00000000000
--- a/db/post_migrate/20220124215857_remove_projects_ci_job_token_project_scope_links_source_project_id_fk.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveProjectsCiJobTokenProjectScopeLinksSourceProjectIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- return unless foreign_key_exists?(:ci_job_token_project_scope_links, :projects, name: "fk_rails_4b2ee3290b")
-
- with_lock_retries do
- execute('LOCK projects, ci_job_token_project_scope_links IN ACCESS EXCLUSIVE MODE') if transaction_open?
-
- remove_foreign_key_if_exists(:ci_job_token_project_scope_links, :projects, name: "fk_rails_4b2ee3290b")
- end
- end
-
- def down
- add_concurrent_foreign_key(:ci_job_token_project_scope_links, :projects, name: "fk_rails_4b2ee3290b", column: :source_project_id, target_column: :id, on_delete: :cascade)
- end
-end
diff --git a/db/post_migrate/20220124221521_remove_projects_ci_project_monthly_usages_project_id_fk.rb b/db/post_migrate/20220124221521_remove_projects_ci_project_monthly_usages_project_id_fk.rb
deleted file mode 100644
index cff78342d21..00000000000
--- a/db/post_migrate/20220124221521_remove_projects_ci_project_monthly_usages_project_id_fk.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveProjectsCiProjectMonthlyUsagesProjectIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- return unless foreign_key_exists?(:ci_project_monthly_usages, :projects, name: "fk_rails_508bcd4aa6")
-
- with_lock_retries do
- execute('LOCK projects, ci_project_monthly_usages IN ACCESS EXCLUSIVE MODE') if transaction_open?
-
- remove_foreign_key_if_exists(:ci_project_monthly_usages, :projects, name: "fk_rails_508bcd4aa6")
- end
- end
-
- def down
- add_concurrent_foreign_key(:ci_project_monthly_usages, :projects, name: "fk_rails_508bcd4aa6", column: :project_id, target_column: :id, on_delete: :cascade)
- end
-end
diff --git a/db/post_migrate/20220125083520_remove_ci_pipelines_dast_site_profiles_pipelines_ci_pipeline_id_fk.rb b/db/post_migrate/20220125083520_remove_ci_pipelines_dast_site_profiles_pipelines_ci_pipeline_id_fk.rb
deleted file mode 100644
index b111b95fccf..00000000000
--- a/db/post_migrate/20220125083520_remove_ci_pipelines_dast_site_profiles_pipelines_ci_pipeline_id_fk.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveCiPipelinesDastSiteProfilesPipelinesCiPipelineIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- return unless foreign_key_exists?(:dast_site_profiles_pipelines, :ci_pipelines, name: "fk_53849b0ad5")
-
- with_lock_retries do
- execute('LOCK ci_pipelines, dast_site_profiles_pipelines IN ACCESS EXCLUSIVE MODE') if transaction_open?
-
- remove_foreign_key_if_exists(:dast_site_profiles_pipelines, :ci_pipelines, name: "fk_53849b0ad5")
- end
- end
-
- def down
- add_concurrent_foreign_key(:dast_site_profiles_pipelines, :ci_pipelines, name: "fk_53849b0ad5", column: :ci_pipeline_id, target_column: :id, on_delete: :cascade)
- end
-end
diff --git a/db/post_migrate/20220125084348_remove_ci_pipelines_vulnerability_feedback_pipeline_id_fk.rb b/db/post_migrate/20220125084348_remove_ci_pipelines_vulnerability_feedback_pipeline_id_fk.rb
deleted file mode 100644
index 1b932d084bb..00000000000
--- a/db/post_migrate/20220125084348_remove_ci_pipelines_vulnerability_feedback_pipeline_id_fk.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveCiPipelinesVulnerabilityFeedbackPipelineIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- return unless foreign_key_exists?(:vulnerability_feedback, :ci_pipelines, name: "fk_rails_20976e6fd9")
-
- with_lock_retries do
- execute('LOCK ci_pipelines, vulnerability_feedback IN ACCESS EXCLUSIVE MODE') if transaction_open?
-
- remove_foreign_key_if_exists(:vulnerability_feedback, :ci_pipelines, name: "fk_rails_20976e6fd9")
- end
- end
-
- def down
- add_concurrent_foreign_key(:vulnerability_feedback, :ci_pipelines, name: "fk_rails_20976e6fd9", column: :pipeline_id, target_column: :id, on_delete: :nullify)
- end
-end
diff --git a/db/post_migrate/20220125122640_schedule_populate_topics_non_private_projects_count.rb b/db/post_migrate/20220125122640_schedule_populate_topics_non_private_projects_count.rb
deleted file mode 100644
index dee86a70553..00000000000
--- a/db/post_migrate/20220125122640_schedule_populate_topics_non_private_projects_count.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-class SchedulePopulateTopicsNonPrivateProjectsCount < Gitlab::Database::Migration[1.0]
- MIGRATION = 'PopulateTopicsNonPrivateProjectsCount'
- BATCH_SIZE = 10_000
- DELAY_INTERVAL = 2.minutes
-
- disable_ddl_transaction!
-
- def up
- queue_background_migration_jobs_by_range_at_intervals(
- define_batchable_model('topics'),
- MIGRATION,
- DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- track_jobs: true
- )
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220126201752_remove_projects_ci_job_token_project_scope_links_target_project_id_fk.rb b/db/post_migrate/20220126201752_remove_projects_ci_job_token_project_scope_links_target_project_id_fk.rb
deleted file mode 100644
index a33e02f2408..00000000000
--- a/db/post_migrate/20220126201752_remove_projects_ci_job_token_project_scope_links_target_project_id_fk.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveProjectsCiJobTokenProjectScopeLinksTargetProjectIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- return unless foreign_key_exists?(:ci_job_token_project_scope_links, :projects, name: "fk_rails_6904b38465")
-
- with_lock_retries do
- execute('LOCK projects, ci_job_token_project_scope_links IN ACCESS EXCLUSIVE MODE') if transaction_open?
-
- remove_foreign_key_if_exists(:ci_job_token_project_scope_links, :projects, name: "fk_rails_6904b38465")
- end
- end
-
- def down
- add_concurrent_foreign_key(:ci_job_token_project_scope_links, :projects, name: "fk_rails_6904b38465", column: :target_project_id, target_column: :id, on_delete: :cascade)
- end
-end
diff --git a/db/post_migrate/20220126202654_remove_projects_ci_sources_projects_source_project_id_fk.rb b/db/post_migrate/20220126202654_remove_projects_ci_sources_projects_source_project_id_fk.rb
deleted file mode 100644
index a69cd43b921..00000000000
--- a/db/post_migrate/20220126202654_remove_projects_ci_sources_projects_source_project_id_fk.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveProjectsCiSourcesProjectsSourceProjectIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- return unless foreign_key_exists?(:ci_sources_projects, :projects, name: "fk_rails_64b6855cbc")
-
- with_lock_retries do
- execute('LOCK projects, ci_sources_projects IN ACCESS EXCLUSIVE MODE') if transaction_open?
-
- remove_foreign_key_if_exists(:ci_sources_projects, :projects, name: "fk_rails_64b6855cbc")
- end
- end
-
- def down
- add_concurrent_foreign_key(:ci_sources_projects, :projects, name: "fk_rails_64b6855cbc", column: :source_project_id, target_column: :id, on_delete: :cascade)
- end
-end
diff --git a/db/post_migrate/20220126203421_remove_projects_ci_pipeline_schedules_project_id_fk.rb b/db/post_migrate/20220126203421_remove_projects_ci_pipeline_schedules_project_id_fk.rb
deleted file mode 100644
index 870127ab168..00000000000
--- a/db/post_migrate/20220126203421_remove_projects_ci_pipeline_schedules_project_id_fk.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveProjectsCiPipelineSchedulesProjectIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- return unless foreign_key_exists?(:ci_pipeline_schedules, :projects, name: "fk_8ead60fcc4")
-
- with_lock_retries do
- execute('LOCK projects, ci_pipeline_schedules IN ACCESS EXCLUSIVE MODE') if transaction_open?
-
- remove_foreign_key_if_exists(:ci_pipeline_schedules, :projects, name: "fk_8ead60fcc4")
- end
- end
-
- def down
- add_concurrent_foreign_key(:ci_pipeline_schedules, :projects, name: "fk_8ead60fcc4", column: :project_id, target_column: :id, on_delete: :cascade)
- end
-end
diff --git a/db/post_migrate/20220126210021_remove_projects_ci_builds_project_id_fk.rb b/db/post_migrate/20220126210021_remove_projects_ci_builds_project_id_fk.rb
deleted file mode 100644
index 8caa6db7507..00000000000
--- a/db/post_migrate/20220126210021_remove_projects_ci_builds_project_id_fk.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveProjectsCiBuildsProjectIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- return if Gitlab.com? # unsafe migration, skip on GitLab.com due to https://gitlab.com/groups/gitlab-org/-/epics/7249#note_819625526
- return unless foreign_key_exists?(:ci_builds, :projects, name: "fk_befce0568a")
-
- with_lock_retries do
- execute('LOCK projects, ci_builds IN ACCESS EXCLUSIVE MODE') if transaction_open?
-
- remove_foreign_key_if_exists(:ci_builds, :projects, name: "fk_befce0568a")
- end
- end
-
- def down
- add_concurrent_foreign_key(:ci_builds, :projects, name: "fk_befce0568a", column: :project_id, target_column: :id, on_delete: :cascade)
- end
-end
diff --git a/db/post_migrate/20220126210022_re_remove_projects_ci_builds_project_id_fk.rb b/db/post_migrate/20220126210022_re_remove_projects_ci_builds_project_id_fk.rb
deleted file mode 100644
index 2a026388bbf..00000000000
--- a/db/post_migrate/20220126210022_re_remove_projects_ci_builds_project_id_fk.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class ReRemoveProjectsCiBuildsProjectIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- return unless foreign_key_exists?(:ci_builds, :projects, name: "fk_befce0568a")
-
- with_lock_retries do
- execute('LOCK projects, ci_builds IN ACCESS EXCLUSIVE MODE') if transaction_open?
-
- remove_foreign_key_if_exists(:ci_builds, :projects, name: "fk_befce0568a")
- end
- end
-
- def down
- # no-op, since the FK will be added via rollback by prior-migration
- end
-end
diff --git a/db/post_migrate/20220126210657_remove_projects_ci_pipelines_project_id_fk.rb b/db/post_migrate/20220126210657_remove_projects_ci_pipelines_project_id_fk.rb
deleted file mode 100644
index 6867cf720f3..00000000000
--- a/db/post_migrate/20220126210657_remove_projects_ci_pipelines_project_id_fk.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveProjectsCiPipelinesProjectIdFk < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- return unless foreign_key_exists?(:ci_pipelines, :projects, name: "fk_86635dbd80")
-
- with_lock_retries do
- execute('LOCK projects, ci_pipelines IN ACCESS EXCLUSIVE MODE') if transaction_open?
-
- remove_foreign_key_if_exists(:ci_pipelines, :projects, name: "fk_86635dbd80")
- end
- end
-
- def down
- add_concurrent_foreign_key(:ci_pipelines, :projects, name: "fk_86635dbd80", column: :project_id, target_column: :id, on_delete: :cascade)
- end
-end
diff --git a/db/post_migrate/20220127112243_add_index_to_merge_request_assignees_state.rb b/db/post_migrate/20220127112243_add_index_to_merge_request_assignees_state.rb
deleted file mode 100644
index e6bb43af760..00000000000
--- a/db/post_migrate/20220127112243_add_index_to_merge_request_assignees_state.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexToMergeRequestAssigneesState < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_on_merge_request_assignees_state'
-
- def up
- add_concurrent_index :merge_request_assignees, :state, where: 'state = 2', name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :merge_request_assignees, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220127112412_add_index_to_merge_request_reviewers_state.rb b/db/post_migrate/20220127112412_add_index_to_merge_request_reviewers_state.rb
deleted file mode 100644
index 13f4e05c15b..00000000000
--- a/db/post_migrate/20220127112412_add_index_to_merge_request_reviewers_state.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexToMergeRequestReviewersState < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_on_merge_request_reviewers_state'
-
- def up
- add_concurrent_index :merge_request_reviewers, :state, where: 'state = 2', name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :merge_request_reviewers, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220127132200_cleanup_backfill_ci_namespace_mirrors.rb b/db/post_migrate/20220127132200_cleanup_backfill_ci_namespace_mirrors.rb
deleted file mode 100644
index a6775251d42..00000000000
--- a/db/post_migrate/20220127132200_cleanup_backfill_ci_namespace_mirrors.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class CleanupBackfillCiNamespaceMirrors < Gitlab::Database::Migration[1.0]
- def up
- # no-op
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220127132201_cleanup_backfill_ci_project_mirrors.rb b/db/post_migrate/20220127132201_cleanup_backfill_ci_project_mirrors.rb
deleted file mode 100644
index c0cdb74c595..00000000000
--- a/db/post_migrate/20220127132201_cleanup_backfill_ci_project_mirrors.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class CleanupBackfillCiProjectMirrors < Gitlab::Database::Migration[1.0]
- def up
- # no-op
- end
-
- def down
- # no-op
- 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/20220128155251_remove_dangling_running_builds.rb b/db/post_migrate/20220128155251_remove_dangling_running_builds.rb
deleted file mode 100644
index f86a21ced00..00000000000
--- a/db/post_migrate/20220128155251_remove_dangling_running_builds.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveDanglingRunningBuilds < Gitlab::Database::Migration[1.0]
- BATCH_SIZE = 100
-
- disable_ddl_transaction!
-
- def up
- each_batch_range('ci_running_builds', of: BATCH_SIZE) do |min, max|
- execute <<~SQL
- DELETE FROM ci_running_builds
- USING ci_builds
- WHERE ci_builds.id = ci_running_builds.build_id
- AND ci_builds.status = 'failed'
- AND ci_builds.type = 'Ci::Build'
- AND ci_running_builds.id BETWEEN #{min} AND #{max}
- SQL
- end
- end
-
- def down
- # no-op
- # This migration deletes data and it can not be reversed
- end
-end
diff --git a/db/post_migrate/20220128155814_fix_approval_rules_code_owners_rule_type_index.rb b/db/post_migrate/20220128155814_fix_approval_rules_code_owners_rule_type_index.rb
deleted file mode 100644
index eccfab25126..00000000000
--- a/db/post_migrate/20220128155814_fix_approval_rules_code_owners_rule_type_index.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-class FixApprovalRulesCodeOwnersRuleTypeIndex < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_approval_rules_code_owners_rule_type'
- OLD_INDEX_NAME = 'index_approval_rules_code_owners_rule_type_old'
- TABLE = :approval_merge_request_rules
- COLUMN = :merge_request_id
- WHERE_CONDITION = 'rule_type = 2'
-
- disable_ddl_transaction!
-
- def up
- rename_index TABLE, INDEX_NAME, OLD_INDEX_NAME if index_exists_by_name?(TABLE, INDEX_NAME) && !index_exists_by_name?(TABLE, OLD_INDEX_NAME)
-
- add_concurrent_index TABLE, COLUMN, where: WHERE_CONDITION, name: INDEX_NAME
-
- remove_concurrent_index_by_name TABLE, OLD_INDEX_NAME
- end
-
- def down
- # No-op
- end
-end
diff --git a/db/post_migrate/20220131000000_index_job_artifacts_on_trace_type_and_expire_at.rb b/db/post_migrate/20220131000000_index_job_artifacts_on_trace_type_and_expire_at.rb
deleted file mode 100644
index f47c04dd2ef..00000000000
--- a/db/post_migrate/20220131000000_index_job_artifacts_on_trace_type_and_expire_at.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class IndexJobArtifactsOnTraceTypeAndExpireAt < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'tmp_index_ci_job_artifacts_on_id_where_trace_and_expire_at'
- TIMESTAMPS = "'2021-04-22 00:00:00', '2021-05-22 00:00:00', '2021-06-22 00:00:00', '2022-01-22 00:00:00', '2022-02-22 00:00:00', '2022-03-22 00:00:00', '2022-04-22 00:00:00'"
-
- def up
- add_concurrent_index :ci_job_artifacts, :id, where: "file_type = 3 AND expire_at IN (#{TIMESTAMPS})", name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :ci_job_artifacts, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220131000001_schedule_trace_expiry_removal.rb b/db/post_migrate/20220131000001_schedule_trace_expiry_removal.rb
deleted file mode 100644
index 8e282a9b8c2..00000000000
--- a/db/post_migrate/20220131000001_schedule_trace_expiry_removal.rb
+++ /dev/null
@@ -1,55 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleTraceExpiryRemoval < Gitlab::Database::Migration[1.0]
- MIGRATION = 'RemoveAllTraceExpirationDates'
- BATCH_SIZE = 100_000
- DELAY_INTERVAL = 4.minutes
-
- disable_ddl_transaction!
-
- # Stubbed class to connect to the CI database
- # connects_to has to be called in abstract classes.
- class MultiDbAdaptableClass < ActiveRecord::Base
- self.abstract_class = true
-
- if Gitlab::Database.has_config?(:ci)
- connects_to database: { writing: :ci, reading: :ci }
- end
- end
-
- # Stubbed class to access the ci_job_artifacts table
- class JobArtifact < MultiDbAdaptableClass
- include EachBatch
-
- self.table_name = 'ci_job_artifacts'
-
- TARGET_TIMESTAMPS = [
- Date.new(2021, 04, 22).midnight.utc,
- Date.new(2021, 05, 22).midnight.utc,
- Date.new(2021, 06, 22).midnight.utc,
- Date.new(2022, 01, 22).midnight.utc,
- Date.new(2022, 02, 22).midnight.utc,
- Date.new(2022, 03, 22).midnight.utc,
- Date.new(2022, 04, 22).midnight.utc
- ].freeze
-
- scope :in_targeted_timestamps, -> { where(expire_at: TARGET_TIMESTAMPS) }
- scope :traces, -> { where(file_type: 3) }
- end
-
- def up
- return unless Gitlab.com?
-
- queue_background_migration_jobs_by_range_at_intervals(
- JobArtifact.traces.in_targeted_timestamps,
- MIGRATION,
- DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- track_jobs: true
- )
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220201034731_remove_index_clusters_kubernetes_namespaces_on_cluster_id.rb b/db/post_migrate/20220201034731_remove_index_clusters_kubernetes_namespaces_on_cluster_id.rb
deleted file mode 100644
index 0e2ef3b3324..00000000000
--- a/db/post_migrate/20220201034731_remove_index_clusters_kubernetes_namespaces_on_cluster_id.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveIndexClustersKubernetesNamespacesOnClusterId < Gitlab::Database::Migration[1.0]
- INDEX = 'index_clusters_kubernetes_namespaces_on_cluster_id'
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :clusters_kubernetes_namespaces, INDEX
- end
-
- def down
- add_concurrent_index :clusters_kubernetes_namespaces, :cluster_id, name: INDEX
- end
-end
diff --git a/db/post_migrate/20220201141705_cleanup_background_migration_populate_test_reports_issue_id.rb b/db/post_migrate/20220201141705_cleanup_background_migration_populate_test_reports_issue_id.rb
deleted file mode 100644
index 252b4a01d04..00000000000
--- a/db/post_migrate/20220201141705_cleanup_background_migration_populate_test_reports_issue_id.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class CleanupBackgroundMigrationPopulateTestReportsIssueId < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- MIGRATION = 'PopulateTestReportsIssueId'
-
- def up
- finalize_background_migration(MIGRATION)
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220201173212_add_user_details_provisioning_index.rb b/db/post_migrate/20220201173212_add_user_details_provisioning_index.rb
deleted file mode 100644
index a864ec7e395..00000000000
--- a/db/post_migrate/20220201173212_add_user_details_provisioning_index.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class AddUserDetailsProvisioningIndex < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'idx_user_details_on_provisioned_by_group_id_user_id'
- OLD_INDEX_NAME = 'index_user_details_on_provisioned_by_group_id'
-
- def up
- add_concurrent_index :user_details, [:provisioned_by_group_id, :user_id], name: INDEX_NAME
- remove_concurrent_index_by_name :user_details, OLD_INDEX_NAME
- end
-
- def down
- add_concurrent_index :user_details, :provisioned_by_group_id, name: OLD_INDEX_NAME
- remove_concurrent_index_by_name :user_details, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220201193033_add_unique_index_to_vulnerability_finding_links_with_truncate.rb b/db/post_migrate/20220201193033_add_unique_index_to_vulnerability_finding_links_with_truncate.rb
deleted file mode 100644
index cc9dabdf624..00000000000
--- a/db/post_migrate/20220201193033_add_unique_index_to_vulnerability_finding_links_with_truncate.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class AddUniqueIndexToVulnerabilityFindingLinksWithTruncate < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- NAME_URL_INDEX_NAME = 'finding_link_name_url_idx'
- URL_INDEX_NAME = 'finding_link_url_idx'
-
- def up
- execute('TRUNCATE TABLE vulnerability_finding_links')
-
- add_concurrent_index :vulnerability_finding_links, [:vulnerability_occurrence_id, :name, :url], unique: true, name: NAME_URL_INDEX_NAME
- add_concurrent_index :vulnerability_finding_links, [:vulnerability_occurrence_id, :url], unique: true, where: 'name is null', name: URL_INDEX_NAME
- end
-
- def down
- remove_concurrent_index :vulnerability_finding_links, [:vulnerability_occurrence_id, :name, :url], name: NAME_URL_INDEX_NAME
- remove_concurrent_index :vulnerability_finding_links, [:vulnerability_occurrence_id, :url], name: URL_INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220202105733_delete_service_template_records.rb b/db/post_migrate/20220202105733_delete_service_template_records.rb
deleted file mode 100644
index e1697f23588..00000000000
--- a/db/post_migrate/20220202105733_delete_service_template_records.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class DeleteServiceTemplateRecords < Gitlab::Database::Migration[1.0]
- class Integration < ActiveRecord::Base
- # Disable single-table inheritance
- self.inheritance_column = :_type_disabled
- end
-
- def up
- Integration.where(template: true).delete_all
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220204053655_remove_index_epic_issues_on_epic_id.rb b/db/post_migrate/20220204053655_remove_index_epic_issues_on_epic_id.rb
deleted file mode 100644
index 7815829d36a..00000000000
--- a/db/post_migrate/20220204053655_remove_index_epic_issues_on_epic_id.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveIndexEpicIssuesOnEpicId < Gitlab::Database::Migration[1.0]
- INDEX = 'index_epic_issues_on_epic_id'
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :epic_issues, name: INDEX
- end
-
- def down
- add_concurrent_index :epic_issues, :epic_id, name: INDEX
- end
-end
diff --git a/db/post_migrate/20220204095121_backfill_namespace_statistics_with_dependency_proxy_size.rb b/db/post_migrate/20220204095121_backfill_namespace_statistics_with_dependency_proxy_size.rb
deleted file mode 100644
index 49c9efc497c..00000000000
--- a/db/post_migrate/20220204095121_backfill_namespace_statistics_with_dependency_proxy_size.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# frozen_string_literal: true
-
-class BackfillNamespaceStatisticsWithDependencyProxySize < Gitlab::Database::Migration[1.0]
- DELAY_INTERVAL = 2.minutes.to_i
- BATCH_SIZE = 500
- MIGRATION = 'PopulateNamespaceStatistics'
-
- disable_ddl_transaction!
-
- def up
- groups = exec_query <<~SQL
- SELECT dependency_proxy_manifests.group_id FROM dependency_proxy_manifests
- UNION
- SELECT dependency_proxy_blobs.group_id from dependency_proxy_blobs
- SQL
-
- groups.rows.flatten.in_groups_of(BATCH_SIZE, false).each_with_index do |group_ids, index|
- migrate_in(index * DELAY_INTERVAL, MIGRATION, [group_ids, [:dependency_proxy_size]])
- end
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220204110725_backfill_cycle_analytics_aggregations.rb b/db/post_migrate/20220204110725_backfill_cycle_analytics_aggregations.rb
deleted file mode 100644
index 933ad747c5c..00000000000
--- a/db/post_migrate/20220204110725_backfill_cycle_analytics_aggregations.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-# frozen_string_literal: true
-
-class BackfillCycleAnalyticsAggregations < Gitlab::Database::Migration[1.0]
- BATCH_SIZE = 50
-
- def up
- model = define_batchable_model('analytics_cycle_analytics_group_value_streams')
-
- model.each_batch(of: BATCH_SIZE) do |relation|
- execute <<~SQL
- WITH records_to_be_inserted AS #{Gitlab::Database::AsWithMaterialized.materialized_if_supported} (
- SELECT root_ancestor.id AS group_id
- FROM (#{relation.select(:group_id).to_sql}) as value_streams,
- LATERAL (
- WITH RECURSIVE "base_and_ancestors" AS (
- (SELECT "namespaces"."id", "namespaces"."parent_id" FROM "namespaces" WHERE "namespaces"."id" = value_streams.group_id)
- UNION
- (SELECT "namespaces"."id", "namespaces"."parent_id" FROM "namespaces", "base_and_ancestors" WHERE "namespaces"."id" = "base_and_ancestors"."parent_id")
- )
- SELECT "namespaces"."id" FROM "base_and_ancestors" as "namespaces" WHERE parent_id IS NULL LIMIT 1
- ) as root_ancestor
- )
- INSERT INTO "analytics_cycle_analytics_aggregations"
- SELECT * FROM "records_to_be_inserted"
- ON CONFLICT DO NOTHING
- SQL
- end
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220204194347_encrypt_integration_properties.rb b/db/post_migrate/20220204194347_encrypt_integration_properties.rb
deleted file mode 100644
index 82dd3a05e1d..00000000000
--- a/db/post_migrate/20220204194347_encrypt_integration_properties.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-class EncryptIntegrationProperties < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
- MIGRATION = 'EncryptIntegrationProperties'
- BATCH_SIZE = 1_000
- INTERVAL = 2.minutes.to_i
-
- def up
- queue_background_migration_jobs_by_range_at_intervals(
- define_batchable_model('integrations').all,
- MIGRATION,
- INTERVAL,
- track_jobs: true,
- batch_size: BATCH_SIZE
- )
- end
-
- def down
- # this migration is not reversible
- end
-end
diff --git a/db/post_migrate/20220207080758_update_api_indexes_for_projects.rb b/db/post_migrate/20220207080758_update_api_indexes_for_projects.rb
deleted file mode 100644
index 3275912b0ab..00000000000
--- a/db/post_migrate/20220207080758_update_api_indexes_for_projects.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-# frozen_string_literal: true
-
-class UpdateApiIndexesForProjects < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- ARCHIVED_INDEX_NAME = 'idx_projects_api_created_at_id_for_archived'
- OLD_ARCHIVED_INDEX_NAME = 'index_projects_api_created_at_id_for_archived'
- PUBLIC_AND_ARCHIVED_INDEX_NAME = 'idx_projects_api_created_at_id_for_archived_vis20'
- OLD_PUBLIC_AND_ARCHIVED_INDEX_NAME = 'index_projects_api_created_at_id_for_archived_vis20'
- INTERNAL_PROJECTS_INDEX_NAME = 'idx_projects_api_created_at_id_for_vis10'
- OLD_INTERNAL_PROJECTS_INDEX_NAME = 'index_projects_api_created_at_id_for_vis10'
-
- def up
- add_concurrent_index :projects, [:created_at, :id],
- where: "archived = true AND pending_delete = false AND hidden = false",
- name: ARCHIVED_INDEX_NAME
-
- add_concurrent_index :projects, [:created_at, :id],
- where: "archived = true AND visibility_level = 20 AND pending_delete = false AND hidden = false",
- name: PUBLIC_AND_ARCHIVED_INDEX_NAME
-
- add_concurrent_index :projects, [:created_at, :id],
- where: "visibility_level = 10 AND pending_delete = false AND hidden = false",
- name: INTERNAL_PROJECTS_INDEX_NAME
-
- remove_concurrent_index_by_name :projects, OLD_ARCHIVED_INDEX_NAME
- remove_concurrent_index_by_name :projects, OLD_PUBLIC_AND_ARCHIVED_INDEX_NAME
- remove_concurrent_index_by_name :projects, OLD_INTERNAL_PROJECTS_INDEX_NAME
- end
-
- def down
- add_concurrent_index :projects, [:created_at, :id],
- where: "archived = true AND pending_delete = false",
- name: OLD_ARCHIVED_INDEX_NAME
-
- add_concurrent_index :projects, [:created_at, :id],
- where: "archived = true AND visibility_level = 20 AND pending_delete = false",
- name: OLD_PUBLIC_AND_ARCHIVED_INDEX_NAME
-
- add_concurrent_index :projects, [:created_at, :id],
- where: "visibility_level = 10 AND pending_delete = false",
- name: OLD_INTERNAL_PROJECTS_INDEX_NAME
-
- remove_concurrent_index_by_name :projects, ARCHIVED_INDEX_NAME
- remove_concurrent_index_by_name :projects, PUBLIC_AND_ARCHIVED_INDEX_NAME
- remove_concurrent_index_by_name :projects, INTERNAL_PROJECTS_INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220208080921_schedule_migrate_personal_namespace_project_maintainer_to_owner.rb b/db/post_migrate/20220208080921_schedule_migrate_personal_namespace_project_maintainer_to_owner.rb
deleted file mode 100644
index 633570aeaa0..00000000000
--- a/db/post_migrate/20220208080921_schedule_migrate_personal_namespace_project_maintainer_to_owner.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleMigratePersonalNamespaceProjectMaintainerToOwner < Gitlab::Database::Migration[1.0]
- MIGRATION = 'MigratePersonalNamespaceProjectMaintainerToOwner'
- INTERVAL = 2.minutes
- BATCH_SIZE = 1_000
- SUB_BATCH_SIZE = 200
-
- disable_ddl_transaction!
-
- def up
- queue_batched_background_migration(
- MIGRATION,
- :members,
- :id,
- job_interval: INTERVAL,
- batch_size: BATCH_SIZE,
- sub_batch_size: SUB_BATCH_SIZE
- )
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220208115439_start_backfill_ci_queuing_tables.rb b/db/post_migrate/20220208115439_start_backfill_ci_queuing_tables.rb
deleted file mode 100644
index 82e36174290..00000000000
--- a/db/post_migrate/20220208115439_start_backfill_ci_queuing_tables.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# frozen_string_literal: true
-
-class StartBackfillCiQueuingTables < Gitlab::Database::Migration[1.0]
- MIGRATION = 'BackfillCiQueuingTables'
- BATCH_SIZE = 500
- DELAY_INTERVAL = 2.minutes
-
- disable_ddl_transaction!
-
- def up
- return if Gitlab.com?
-
- queue_background_migration_jobs_by_range_at_intervals(
- Gitlab::BackgroundMigration::BackfillCiQueuingTables::Ci::Build.pending,
- MIGRATION,
- DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- track_jobs: true)
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220209111007_add_partial_index_for_batching_active_cluster_image_scanning_vulnerabilities.rb b/db/post_migrate/20220209111007_add_partial_index_for_batching_active_cluster_image_scanning_vulnerabilities.rb
deleted file mode 100644
index d38509ed8c2..00000000000
--- a/db/post_migrate/20220209111007_add_partial_index_for_batching_active_cluster_image_scanning_vulnerabilities.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class AddPartialIndexForBatchingActiveClusterImageScanningVulnerabilities < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_vulnerabilities_on_project_id_and_id_active_cis'
- INDEX_FILTER_CONDITION = 'report_type = 7 AND state = ANY(ARRAY[1, 4])'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :vulnerabilities, [:project_id, :id], where: INDEX_FILTER_CONDITION, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index :vulnerabilities, [:project_id, :id], name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220212120735_schedule_fix_incorrect_max_seats_used2.rb b/db/post_migrate/20220212120735_schedule_fix_incorrect_max_seats_used2.rb
deleted file mode 100644
index c8a6bd0a15d..00000000000
--- a/db/post_migrate/20220212120735_schedule_fix_incorrect_max_seats_used2.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleFixIncorrectMaxSeatsUsed2 < Gitlab::Database::Migration[1.0]
- MIGRATION = 'FixIncorrectMaxSeatsUsed'
- TMP_IDX_NAME = 'tmp_gitlab_subscriptions_max_seats_used_migration_2'
-
- disable_ddl_transaction!
-
- def up
- 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: TMP_IDX_NAME
-
- return unless Gitlab.com?
-
- migrate_in(1.hour, MIGRATION, ['batch_2_for_start_date_before_02_aug_2021'])
- end
-
- def down
- remove_concurrent_index_by_name :gitlab_subscriptions, TMP_IDX_NAME
- 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/20220213104531_create_indexes_on_integration_type_new.rb b/db/post_migrate/20220213104531_create_indexes_on_integration_type_new.rb
deleted file mode 100644
index 3a9f48dec44..00000000000
--- a/db/post_migrate/20220213104531_create_indexes_on_integration_type_new.rb
+++ /dev/null
@@ -1,60 +0,0 @@
-# frozen_string_literal: true
-
-# Reproduce the indices on integrations.type on integrations.type_new
-class CreateIndexesOnIntegrationTypeNew < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- TABLE_NAME = :integrations
- COLUMN = :type_new
-
- 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'
- },
- {
- name: "index_integrations_on_#{COLUMN}_and_template_partial",
- columns: [COLUMN, :template],
- where: 'template = true'
- },
- {
- # column names are limited to 63 characters, so this one is re-worded for clarity
- name: "index_integrations_on_#{COLUMN}_id_when_active_and_has_project",
- 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]
- }
- ]
- end
-
- def up
- indices.each do |index|
- add_concurrent_index TABLE_NAME, index[:columns], index.except(:columns)
- end
- end
-
- def down
- indices.each do |index|
- remove_concurrent_index_by_name TABLE_NAME, index[:name]
- end
- end
-end
diff --git a/db/post_migrate/20220215190020_rerun_convert_stringified_raw_metadata_hash_to_json.rb b/db/post_migrate/20220215190020_rerun_convert_stringified_raw_metadata_hash_to_json.rb
deleted file mode 100644
index 1f36132c578..00000000000
--- a/db/post_migrate/20220215190020_rerun_convert_stringified_raw_metadata_hash_to_json.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-class RerunConvertStringifiedRawMetadataHashToJson < Gitlab::Database::Migration[1.0]
- MIGRATION_CLASS = Gitlab::BackgroundMigration::FixVulnerabilityOccurrencesWithHashesAsRawMetadata
- MODEL_CLASS = MIGRATION_CLASS::Finding
- DELAY_INTERVAL = 2.minutes
- BATCH_SIZE = 500
-
- disable_ddl_transaction!
-
- def up
- queue_background_migration_jobs_by_range_at_intervals(
- MODEL_CLASS.by_api_report_types,
- MIGRATION_CLASS.name.demodulize,
- DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- track_jobs: true
- )
- end
-
- def down
- # no-op
-
- # up fixes invalid data by updating columns in-place.
- # It is a backwards-compatible change, and reversing it in a downgrade would not be desirable.
- end
-end
diff --git a/db/post_migrate/20220216201949_remove_package_files_limit_from_application_settings.rb b/db/post_migrate/20220216201949_remove_package_files_limit_from_application_settings.rb
deleted file mode 100644
index 589b75dd918..00000000000
--- a/db/post_migrate/20220216201949_remove_package_files_limit_from_application_settings.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-
-class RemovePackageFilesLimitFromApplicationSettings < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- return unless column_exists?(:application_settings, :max_package_files_for_package_destruction)
-
- remove_column :application_settings, :max_package_files_for_package_destruction, :smallint
- end
-
- def down
- add_column :application_settings, :max_package_files_for_package_destruction, :smallint, default: 100, null: false
- add_check_constraint :application_settings,
- 'max_package_files_for_package_destruction > 0',
- 'app_settings_max_package_files_for_package_destruction_positive'
- end
-end
diff --git a/db/post_migrate/20220217135229_validate_not_null_constraint_on_security_findings_uuid.rb b/db/post_migrate/20220217135229_validate_not_null_constraint_on_security_findings_uuid.rb
deleted file mode 100644
index 9cc04cef757..00000000000
--- a/db/post_migrate/20220217135229_validate_not_null_constraint_on_security_findings_uuid.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class ValidateNotNullConstraintOnSecurityFindingsUuid < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- validate_not_null_constraint(:security_findings, :uuid)
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220221214928_remove_show_diff_preview_in_email_column.rb b/db/post_migrate/20220221214928_remove_show_diff_preview_in_email_column.rb
deleted file mode 100644
index 41cd3446c7a..00000000000
--- a/db/post_migrate/20220221214928_remove_show_diff_preview_in_email_column.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveShowDiffPreviewInEmailColumn < Gitlab::Database::Migration[1.0]
- enable_lock_retries!
-
- def up
- remove_column :project_settings, :show_diff_preview_in_email, :boolean
- end
-
- def down
- add_column :project_settings, :show_diff_preview_in_email, :boolean, default: true, null: false
- end
-end
diff --git a/db/post_migrate/20220222191845_remove_not_null_constraint_for_security_scan_succeeded.rb b/db/post_migrate/20220222191845_remove_not_null_constraint_for_security_scan_succeeded.rb
deleted file mode 100644
index 4d4a20b83b3..00000000000
--- a/db/post_migrate/20220222191845_remove_not_null_constraint_for_security_scan_succeeded.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveNotNullConstraintForSecurityScanSucceeded < Gitlab::Database::Migration[1.0]
- def up
- change_column_null :analytics_devops_adoption_snapshots, :security_scan_succeeded, 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/post_migrate/20220222192524_create_not_null_constraint_releases_tag.rb b/db/post_migrate/20220222192524_create_not_null_constraint_releases_tag.rb
deleted file mode 100644
index 2bb5ba18743..00000000000
--- a/db/post_migrate/20220222192524_create_not_null_constraint_releases_tag.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class CreateNotNullConstraintReleasesTag < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- add_not_null_constraint :releases, :tag, constraint_name: 'releases_not_null_tag', validate: false
- end
-
- def down
- remove_not_null_constraint :releases, :tag, constraint_name: 'releases_not_null_tag'
- end
-end
diff --git a/db/post_migrate/20220222192525_remove_null_releases.rb b/db/post_migrate/20220222192525_remove_null_releases.rb
deleted file mode 100644
index 4efd5393122..00000000000
--- a/db/post_migrate/20220222192525_remove_null_releases.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveNullReleases < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- class Release < ActiveRecord::Base
- include EachBatch
-
- self.table_name = 'releases'
- end
-
- def up
- Release.all.each_batch(of: 25000) do |rel|
- rel.where(tag: nil).delete_all
- end
- end
-
- def down
- # no-op
- #
- # releases with the same tag within a project have been removed
- # and therefore the duplicate release data is no longer available
- end
-end
diff --git a/db/post_migrate/20220223112304_schedule_nullify_orphan_runner_id_on_ci_builds.rb b/db/post_migrate/20220223112304_schedule_nullify_orphan_runner_id_on_ci_builds.rb
deleted file mode 100644
index 10b6ab8204d..00000000000
--- a/db/post_migrate/20220223112304_schedule_nullify_orphan_runner_id_on_ci_builds.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleNullifyOrphanRunnerIdOnCiBuilds < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- MIGRATION = 'NullifyOrphanRunnerIdOnCiBuilds'
- INTERVAL = 2.minutes
- BATCH_SIZE = 50_000
- MAX_BATCH_SIZE = 150_000
- SUB_BATCH_SIZE = 500
-
- def up
- queue_batched_background_migration(
- MIGRATION,
- :ci_builds,
- :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_builds, :id, [])
- end
-end
diff --git a/db/post_migrate/20220223124428_schedule_merge_topics_with_same_name.rb b/db/post_migrate/20220223124428_schedule_merge_topics_with_same_name.rb
deleted file mode 100644
index 7e79c89203a..00000000000
--- a/db/post_migrate/20220223124428_schedule_merge_topics_with_same_name.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleMergeTopicsWithSameName < Gitlab::Database::Migration[1.0]
- MIGRATION = 'MergeTopicsWithSameName'
- BATCH_SIZE = 100
-
- disable_ddl_transaction!
-
- class Topic < ActiveRecord::Base
- self.table_name = 'topics'
- end
-
- def up
- Topic.select('LOWER(name) as name').group('LOWER(name)').having('COUNT(*) > 1').order('LOWER(name)')
- .in_groups_of(BATCH_SIZE, false).each_with_index do |group, i|
- migrate_in((i + 1) * 2.minutes, MIGRATION, [group.map(&:name)])
- end
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220224000000_async_build_trace_expire_at_index.rb b/db/post_migrate/20220224000000_async_build_trace_expire_at_index.rb
deleted file mode 100644
index b22f3e7996f..00000000000
--- a/db/post_migrate/20220224000000_async_build_trace_expire_at_index.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# frozen_string_literal: true
-
-class AsyncBuildTraceExpireAtIndex < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'tmp_index_ci_job_artifacts_on_id_where_trace_and_expire_at'
- TIMESTAMPS = "'2021-04-22 00:00:00', '2021-05-22 00:00:00', '2021-06-22 00:00:00', '2022-01-22 00:00:00', '2022-02-22 00:00:00', '2022-03-22 00:00:00', '2022-04-22 00:00:00'"
-
- def up
- prepare_async_index :ci_job_artifacts, :id, where: "file_type = 3 AND expire_at IN (#{TIMESTAMPS})", name: INDEX_NAME
- end
-
- def down
- unprepare_async_index :ci_builds, :id, name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220224204415_recreate_index_security_ci_builds_on_name_and_id_parser_with_new_features.rb b/db/post_migrate/20220224204415_recreate_index_security_ci_builds_on_name_and_id_parser_with_new_features.rb
deleted file mode 100644
index feb0f2c83ab..00000000000
--- a/db/post_migrate/20220224204415_recreate_index_security_ci_builds_on_name_and_id_parser_with_new_features.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-# frozen_string_literal: true
-
-class RecreateIndexSecurityCiBuildsOnNameAndIdParserWithNewFeatures < Gitlab::Database::Migration[1.0]
- TABLE = "ci_builds"
- OLD_INDEX_NAME = "index_security_ci_builds_on_name_and_id_parser_features"
- NEW_INDEX_NAME = "index_security_ci_builds_on_name_and_id_parser_features_old"
- COLUMNS = %i[name id]
- CONSTRAINTS = "(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"
-
- enable_lock_retries!
-
- def up
- rename_index(TABLE, OLD_INDEX_NAME, NEW_INDEX_NAME)
- prepare_async_index TABLE, COLUMNS, name: OLD_INDEX_NAME, where: CONSTRAINTS
- end
-
- def down
- unprepare_async_index TABLE, COLUMNS, name: OLD_INDEX_NAME
- rename_index(TABLE, NEW_INDEX_NAME, OLD_INDEX_NAME)
- end
-end
diff --git a/db/post_migrate/20220225133705_cleanup_backfill_ci_queuing_tables.rb b/db/post_migrate/20220225133705_cleanup_backfill_ci_queuing_tables.rb
deleted file mode 100644
index 4fcf8a28727..00000000000
--- a/db/post_migrate/20220225133705_cleanup_backfill_ci_queuing_tables.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class CleanupBackfillCiQueuingTables < Gitlab::Database::Migration[1.0]
- MIGRATION = 'BackfillCiQueuingTables'
-
- disable_ddl_transaction!
-
- def up
- finalize_background_migration(MIGRATION)
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220301093434_backfill_all_project_namespaces.rb b/db/post_migrate/20220301093434_backfill_all_project_namespaces.rb
deleted file mode 100644
index 607161004cf..00000000000
--- a/db/post_migrate/20220301093434_backfill_all_project_namespaces.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-class BackfillAllProjectNamespaces < Gitlab::Database::Migration[1.0]
- MIGRATION = 'ProjectNamespaces::BackfillProjectNamespaces'
- DELAY_INTERVAL = 2.minutes
- BATCH_SIZE = 1_000
- MAX_BATCH_SIZE = 5_000
- SUB_BATCH_SIZE = 10
-
- disable_ddl_transaction!
-
- def up
- queue_batched_background_migration(
- MIGRATION,
- :projects,
- :id,
- nil,
- 'up',
- 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, :projects, :id, [nil, 'up'])
- end
-end
diff --git a/db/post_migrate/20220302114046_backfill_group_features.rb b/db/post_migrate/20220302114046_backfill_group_features.rb
deleted file mode 100644
index 5e0ff9095a3..00000000000
--- a/db/post_migrate/20220302114046_backfill_group_features.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-class BackfillGroupFeatures < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- MIGRATION = 'BackfillGroupFeatures'
- INTERVAL = 2.minutes
- BATCH_SIZE = 10_000
- SUB_BATCH_SIZE = 1_000
-
- def up
- queue_batched_background_migration(
- MIGRATION,
- :namespaces,
- :id,
- BATCH_SIZE,
- job_interval: INTERVAL,
- batch_size: BATCH_SIZE,
- max_batch_size: BATCH_SIZE,
- sub_batch_size: SUB_BATCH_SIZE
- )
- end
-
- def down
- delete_batched_background_migration(MIGRATION, :namespaces, :id, [BATCH_SIZE])
- end
-end
diff --git a/db/post_migrate/20220302203410_create_index_security_ci_builds_on_name_and_id_parser_with_new_features.rb b/db/post_migrate/20220302203410_create_index_security_ci_builds_on_name_and_id_parser_with_new_features.rb
deleted file mode 100644
index 5be6bb00269..00000000000
--- a/db/post_migrate/20220302203410_create_index_security_ci_builds_on_name_and_id_parser_with_new_features.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-class CreateIndexSecurityCiBuildsOnNameAndIdParserWithNewFeatures < Gitlab::Database::Migration[1.0]
- TABLE = "ci_builds"
- COLUMNS = %i[name id]
- INDEX_NAME = "index_security_ci_builds_on_name_and_id_parser_features"
- CONSTRAINTS = "(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"
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index(TABLE, COLUMNS, name: INDEX_NAME, where: CONSTRAINTS)
- end
-
- def down
- remove_concurrent_index(TABLE, COLUMNS, name: INDEX_NAME, where: CONSTRAINTS)
- end
-end
diff --git a/db/post_migrate/20220304165107_drop_partitioned_foreign_keys.rb b/db/post_migrate/20220304165107_drop_partitioned_foreign_keys.rb
deleted file mode 100644
index 43f89b05fa4..00000000000
--- a/db/post_migrate/20220304165107_drop_partitioned_foreign_keys.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class DropPartitionedForeignKeys < Gitlab::Database::Migration[1.0]
- def up
- drop_table :partitioned_foreign_keys
- end
-
- def down
- create_table :partitioned_foreign_keys do |t|
- t.boolean :cascade_delete, null: false, default: true
- t.text :from_table, null: false, limit: 63
- t.text :from_column, null: false, limit: 63
- t.text :to_table, null: false, limit: 63
- t.text :to_column, null: false, limit: 63
-
- t.index [:to_table, :from_table, :from_column], unique: true, name: :index_partitioned_foreign_keys_unique_index
- end
- end
-end
diff --git a/db/post_migrate/20220304201847_add_unique_index_on_security_training_providers.rb b/db/post_migrate/20220304201847_add_unique_index_on_security_training_providers.rb
deleted file mode 100644
index e78b8fd48ca..00000000000
--- a/db/post_migrate/20220304201847_add_unique_index_on_security_training_providers.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddUniqueIndexOnSecurityTrainingProviders < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_security_training_providers_on_unique_name'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :security_training_providers, :name, unique: true, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :security_training_providers, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220305223212_add_security_training_providers.rb b/db/post_migrate/20220305223212_add_security_training_providers.rb
deleted file mode 100644
index fbddee0ae99..00000000000
--- a/db/post_migrate/20220305223212_add_security_training_providers.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-# frozen_string_literal: true
-
-class AddSecurityTrainingProviders < Gitlab::Database::Migration[1.0]
- KONTRA_DATA = {
- name: 'Kontra',
- description: "Kontra Application Security provides interactive developer security education that
- enables engineers to quickly learn security best practices
- and fix issues in their code by analysing real-world software security vulnerabilities.",
- url: "https://application.security/api/webhook/gitlab/exercises/search"
- }
-
- SCW_DATA = {
- name: 'Secure Code Warrior',
- description: "Resolve vulnerabilities faster and confidently with highly relevant and bite-sized secure coding learning.",
- url: "https://integration-api.securecodewarrior.com/api/v1/trial"
- }
-
- module Security
- class TrainingProvider < ActiveRecord::Base
- self.table_name = 'security_training_providers'
- end
- end
-
- def up
- current_time = Time.current
- timestamps = { created_at: current_time, updated_at: current_time }
-
- Security::TrainingProvider.reset_column_information
-
- # upsert providers
- Security::TrainingProvider.upsert_all([KONTRA_DATA.merge(timestamps), SCW_DATA.merge(timestamps)])
- end
-
- def down
- Security::TrainingProvider.reset_column_information
-
- Security::TrainingProvider.find_by(name: KONTRA_DATA[:name])&.destroy
- Security::TrainingProvider.find_by(name: SCW_DATA[:name])&.destroy
- end
-end
diff --git a/db/post_migrate/20220307192534_create_index_for_remove_duplicate_project_tag_releases.rb b/db/post_migrate/20220307192534_create_index_for_remove_duplicate_project_tag_releases.rb
deleted file mode 100644
index 3e580c013c3..00000000000
--- a/db/post_migrate/20220307192534_create_index_for_remove_duplicate_project_tag_releases.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class CreateIndexForRemoveDuplicateProjectTagReleases < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_releases_on_id_project_id_tag'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :releases,
- %i[project_id tag id],
- name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :releases, name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220307192610_remove_duplicate_project_tag_releases.rb b/db/post_migrate/20220307192610_remove_duplicate_project_tag_releases.rb
deleted file mode 100644
index d8b99380825..00000000000
--- a/db/post_migrate/20220307192610_remove_duplicate_project_tag_releases.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveDuplicateProjectTagReleases < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- class Release < ActiveRecord::Base
- include EachBatch
-
- self.table_name = 'releases'
- end
-
- def up
- Release.each_batch(of: 5000) do |relation|
- relation
- .where('exists (select 1 from releases r2 where r2.project_id = releases.project_id and r2.tag = releases.tag and r2.id > releases.id)')
- .delete_all
- end
- end
-
- def down
- # no-op
- #
- # releases with the same tag within a project have been removed
- # and therefore the duplicate release data is no longer available
- end
-end
diff --git a/db/post_migrate/20220307192645_remove_index_for_remove_duplicate_project_tag_releases.rb b/db/post_migrate/20220307192645_remove_index_for_remove_duplicate_project_tag_releases.rb
deleted file mode 100644
index 8efb24daff9..00000000000
--- a/db/post_migrate/20220307192645_remove_index_for_remove_duplicate_project_tag_releases.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveIndexForRemoveDuplicateProjectTagReleases < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_releases_on_id_project_id_tag'
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name :releases, name: INDEX_NAME
- end
-
- def down
- add_concurrent_index :releases,
- %i[project_id tag id],
- name: INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220307192725_create_unique_index_release_tag_project.rb b/db/post_migrate/20220307192725_create_unique_index_release_tag_project.rb
deleted file mode 100644
index 8540f19f079..00000000000
--- a/db/post_migrate/20220307192725_create_unique_index_release_tag_project.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-class CreateUniqueIndexReleaseTagProject < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_releases_on_project_tag_unique'
- OLD_INDEX_NAME = 'index_releases_on_project_id_and_tag'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :releases,
- %i[project_id tag],
- unique: true,
- name: INDEX_NAME
- remove_concurrent_index_by_name :releases, name: OLD_INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :releases, name: INDEX_NAME
- add_concurrent_index :releases,
- %i[project_id tag],
- name: OLD_INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220307203459_rename_user_email_lookup_limit_setting_to_search_settings_cleanup.rb b/db/post_migrate/20220307203459_rename_user_email_lookup_limit_setting_to_search_settings_cleanup.rb
deleted file mode 100644
index 2d01374780d..00000000000
--- a/db/post_migrate/20220307203459_rename_user_email_lookup_limit_setting_to_search_settings_cleanup.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RenameUserEmailLookupLimitSettingToSearchSettingsCleanup < Gitlab::Database::Migration[1.0]
- class ApplicationSetting < ActiveRecord::Base
- self.table_name = :application_settings
- end
-
- def up
- ApplicationSetting.update_all 'search_rate_limit=user_email_lookup_limit'
- end
-
- def down
- ApplicationSetting.update_all 'user_email_lookup_limit=search_rate_limit'
- end
-end
diff --git a/db/post_migrate/20220308000205_drop_old_index_security_ci_builds_on_name_and_id_parser_features.rb b/db/post_migrate/20220308000205_drop_old_index_security_ci_builds_on_name_and_id_parser_features.rb
deleted file mode 100644
index 4b895c291d8..00000000000
--- a/db/post_migrate/20220308000205_drop_old_index_security_ci_builds_on_name_and_id_parser_features.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# frozen_string_literal: true
-
-class DropOldIndexSecurityCiBuildsOnNameAndIdParserFeatures < Gitlab::Database::Migration[1.0]
- TABLE = "ci_builds"
- COLUMNS = %i[name id]
- INDEX_NAME = "index_security_ci_builds_on_name_and_id_parser_features_old"
- CONSTRAINTS = "(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])
- ) AND type::text = 'Ci::Build'::text"
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index(TABLE, COLUMNS, name: INDEX_NAME, where: CONSTRAINTS)
- end
-
- def down
- add_concurrent_index(TABLE, COLUMNS, name: INDEX_NAME, where: CONSTRAINTS)
- end
-end
diff --git a/db/post_migrate/20220308115219_schedule_reset_duplicate_ci_runners_token_encrypted_values_on_projects.rb b/db/post_migrate/20220308115219_schedule_reset_duplicate_ci_runners_token_encrypted_values_on_projects.rb
deleted file mode 100644
index 27e7af9a550..00000000000
--- a/db/post_migrate/20220308115219_schedule_reset_duplicate_ci_runners_token_encrypted_values_on_projects.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleResetDuplicateCiRunnersTokenEncryptedValuesOnProjects < Gitlab::Database::Migration[1.0]
- MIGRATION = 'ResetDuplicateCiRunnersTokenEncryptedValuesOnProjects'
- TOKEN_COLUMN_NAME = :runners_token_encrypted
- TEMP_INDEX_NAME = "tmp_index_projects_on_id_and_#{TOKEN_COLUMN_NAME}"
- BATCH_SIZE = 10_000
- DELAY_INTERVAL = 2.minutes
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :projects, [:id, TOKEN_COLUMN_NAME], where: "#{TOKEN_COLUMN_NAME} IS NOT NULL", unique: false, name: TEMP_INDEX_NAME
-
- queue_background_migration_jobs_by_range_at_intervals(
- Gitlab::BackgroundMigration::ResetDuplicateCiRunnersTokenEncryptedValuesOnProjects::Project.base_query,
- MIGRATION,
- DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- track_jobs: true
- )
- end
-
- def down
- remove_concurrent_index_by_name(:projects, name: TEMP_INDEX_NAME)
- end
-end
diff --git a/db/post_migrate/20220308115502_schedule_reset_duplicate_ci_runners_token_values_on_projects.rb b/db/post_migrate/20220308115502_schedule_reset_duplicate_ci_runners_token_values_on_projects.rb
deleted file mode 100644
index f076b0a740e..00000000000
--- a/db/post_migrate/20220308115502_schedule_reset_duplicate_ci_runners_token_values_on_projects.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-class ScheduleResetDuplicateCiRunnersTokenValuesOnProjects < Gitlab::Database::Migration[1.0]
- MIGRATION = 'ResetDuplicateCiRunnersTokenValuesOnProjects'
- TOKEN_COLUMN_NAME = :runners_token
- TEMP_INDEX_NAME = "tmp_index_projects_on_id_and_#{TOKEN_COLUMN_NAME}"
- BATCH_SIZE = 10_000
- DELAY_INTERVAL = 2.minutes
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :projects, [:id, TOKEN_COLUMN_NAME], where: "#{TOKEN_COLUMN_NAME} IS NOT NULL", unique: false, name: TEMP_INDEX_NAME
-
- queue_background_migration_jobs_by_range_at_intervals(
- Gitlab::BackgroundMigration::ResetDuplicateCiRunnersTokenValuesOnProjects::Project.base_query,
- MIGRATION,
- DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- track_jobs: true
- )
- end
-
- def down
- remove_concurrent_index_by_name(:projects, name: TEMP_INDEX_NAME)
- end
-end
diff --git a/db/post_migrate/20220309084838_remove_external_pull_request_tracking.rb b/db/post_migrate/20220309084838_remove_external_pull_request_tracking.rb
deleted file mode 100644
index 6159f9d6822..00000000000
--- a/db/post_migrate/20220309084838_remove_external_pull_request_tracking.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveExternalPullRequestTracking < Gitlab::Database::Migration[1.0]
- include Gitlab::Database::MigrationHelpers::LooseForeignKeyHelpers
-
- enable_lock_retries!
-
- def up
- untrack_record_deletions(:external_pull_requests)
- end
-
- def down
- track_record_deletions(:external_pull_requests)
- end
-end
diff --git a/db/post_migrate/20220309084954_remove_leftover_external_pull_request_deletions.rb b/db/post_migrate/20220309084954_remove_leftover_external_pull_request_deletions.rb
deleted file mode 100644
index ea9fd6b28c2..00000000000
--- a/db/post_migrate/20220309084954_remove_leftover_external_pull_request_deletions.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveLeftoverExternalPullRequestDeletions < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- # Delete all pending record deletions in the public.external_pull_requests until
- # there are no more rows left.
- loop do
- result = execute <<~SQL
- DELETE FROM "loose_foreign_keys_deleted_records"
- WHERE
- ("loose_foreign_keys_deleted_records"."partition", "loose_foreign_keys_deleted_records"."id") IN (
- SELECT "loose_foreign_keys_deleted_records"."partition", "loose_foreign_keys_deleted_records"."id"
- FROM "loose_foreign_keys_deleted_records"
- WHERE
- "loose_foreign_keys_deleted_records"."fully_qualified_table_name" = 'public.external_pull_requests' AND
- "loose_foreign_keys_deleted_records"."status" = 1
- LIMIT 100
- )
- SQL
-
- break if result.cmd_tuples == 0
- end
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220309154855_add_index_on_issues_closed_incidents.rb b/db/post_migrate/20220309154855_add_index_on_issues_closed_incidents.rb
deleted file mode 100644
index e9a2c1c85f2..00000000000
--- a/db/post_migrate/20220309154855_add_index_on_issues_closed_incidents.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexOnIssuesClosedIncidents < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- INDEX_NAME = 'index_on_issues_closed_incidents_by_project_id_and_closed_at'
-
- def up
- add_concurrent_index :issues, [:project_id, :closed_at], where: "issue_type = 1 AND state_id = 2", name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :issues, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220310095341_add_async_index_ci_job_artifacts_project_id_created_at.rb b/db/post_migrate/20220310095341_add_async_index_ci_job_artifacts_project_id_created_at.rb
deleted file mode 100644
index 919e834a783..00000000000
--- a/db/post_migrate/20220310095341_add_async_index_ci_job_artifacts_project_id_created_at.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 AddAsyncIndexCiJobArtifactsProjectIdCreatedAt < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_ci_job_artifacts_on_id_project_id_and_created_at'
-
- def up
- prepare_async_index :ci_job_artifacts, [:project_id, :created_at, :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/20220310134207_add_index_project_id_and_released_at_and_id_on_releases.rb b/db/post_migrate/20220310134207_add_index_project_id_and_released_at_and_id_on_releases.rb
deleted file mode 100644
index da928f3ec8f..00000000000
--- a/db/post_migrate/20220310134207_add_index_project_id_and_released_at_and_id_on_releases.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexProjectIdAndReleasedAtAndIdOnReleases < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_releases_on_project_id_and_released_at_and_id'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :releases, [:project_id, :released_at, :id],
- name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :releases, INDEX_NAME
- end
-end
diff --git a/db/post_migrate/20220310141349_remove_dependency_list_usage_data_from_redis.rb b/db/post_migrate/20220310141349_remove_dependency_list_usage_data_from_redis.rb
deleted file mode 100644
index 3c1e6714529..00000000000
--- a/db/post_migrate/20220310141349_remove_dependency_list_usage_data_from_redis.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-class RemoveDependencyListUsageDataFromRedis < Gitlab::Database::Migration[1.0]
- disable_ddl_transaction!
-
- def up
- Gitlab::Redis::SharedState.with { |r| r.del("DEPENDENCY_LIST_USAGE_COUNTER") }
- end
-
- def down
- # no-op
- end
-end
diff --git a/db/post_migrate/20220311010352_create_scan_id_and_id_index_on_security_findings.rb b/db/post_migrate/20220311010352_create_scan_id_and_id_index_on_security_findings.rb
deleted file mode 100644
index 1b72c4b0a78..00000000000
--- a/db/post_migrate/20220311010352_create_scan_id_and_id_index_on_security_findings.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class CreateScanIdAndIdIndexOnSecurityFindings < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_security_findings_on_scan_id_and_id'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :security_findings, [:scan_id, :id], name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :security_findings, 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/20220314162342_add_index_ci_job_artifacts_project_id_created_at.rb b/db/post_migrate/20220314162342_add_index_ci_job_artifacts_project_id_created_at.rb
deleted file mode 100644
index 7241fd54cb3..00000000000
--- a/db/post_migrate/20220314162342_add_index_ci_job_artifacts_project_id_created_at.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class AddIndexCiJobArtifactsProjectIdCreatedAt < Gitlab::Database::Migration[1.0]
- INDEX_NAME = 'index_ci_job_artifacts_on_id_project_id_and_created_at'
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :ci_job_artifacts, [:project_id, :created_at, :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/20221228103133_queue_backfill_admin_mode_scope_for_personal_access_tokens.rb b/db/post_migrate/20221228103133_queue_backfill_admin_mode_scope_for_personal_access_tokens.rb
index c111d5090e1..577d55f4df6 100644
--- a/db/post_migrate/20221228103133_queue_backfill_admin_mode_scope_for_personal_access_tokens.rb
+++ b/db/post_migrate/20221228103133_queue_backfill_admin_mode_scope_for_personal_access_tokens.rb
@@ -1,21 +1,11 @@
# frozen_string_literal: true
class QueueBackfillAdminModeScopeForPersonalAccessTokens < Gitlab::Database::Migration[2.1]
- MIGRATION = 'BackfillAdminModeScopeForPersonalAccessTokens'
- DELAY_INTERVAL = 2.minutes
-
restrict_gitlab_migration gitlab_schema: :gitlab_main
- def up
- queue_batched_background_migration(
- MIGRATION,
- :personal_access_tokens,
- :id,
- job_interval: DELAY_INTERVAL
- )
- end
+ # no-op as the original migration is rescheduled
+ # in migrations version 20230406093640
+ def up; end
- def down
- delete_batched_background_migration(MIGRATION, :personal_access_tokens, :id, [])
- end
+ def down; end
end
diff --git a/db/post_migrate/20230131194959_remove_invalid_deploy_access_level.rb b/db/post_migrate/20230131194959_remove_invalid_deploy_access_level.rb
index 57364e2200b..13e49ca087d 100644
--- a/db/post_migrate/20230131194959_remove_invalid_deploy_access_level.rb
+++ b/db/post_migrate/20230131194959_remove_invalid_deploy_access_level.rb
@@ -3,20 +3,11 @@
class RemoveInvalidDeployAccessLevel < Gitlab::Database::Migration[2.1]
disable_ddl_transaction!
- restrict_gitlab_migration gitlab_schema: :gitlab_main
-
- # clean up any rows with invalid access_level entries
def up
- update_column_in_batches(:protected_environment_deploy_access_levels, :access_level, nil) do |table, query|
- query.where(
- table.grouping(table[:user_id].not_eq(nil).or(table[:group_id].not_eq(nil)))
- .and(table[:access_level].not_eq(nil)))
- end
+ # no-op, moved to 20230322151605_rerun_remove_invalid_deploy_access_level.rb
end
def down
# no-op
-
- # we are setting access_level to NULL if group_id or user_id are present
end
end
diff --git a/db/post_migrate/20230208125736_schedule_migration_for_links.rb b/db/post_migrate/20230208125736_schedule_migration_for_links.rb
index c1bd1bbbe51..78b83bbb502 100644
--- a/db/post_migrate/20230208125736_schedule_migration_for_links.rb
+++ b/db/post_migrate/20230208125736_schedule_migration_for_links.rb
@@ -9,17 +9,10 @@ class ScheduleMigrationForLinks < Gitlab::Database::Migration[2.1]
BATCH_SIZE = 10000
def up
- queue_batched_background_migration(
- MIGRATION,
- :vulnerability_occurrences,
- :id,
- job_interval: DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- sub_batch_size: SUB_BATCH_SIZE
- )
+ # no-op as it is rescheduled via db/post_migrate/20230314144640_reschedule_migration_for_links.rb
end
def down
- delete_batched_background_migration(MIGRATION, :vulnerability_occurrences, :id, [])
+ # no-op as it is rescheduled via db/post_migrate/20230314144640_reschedule_migration_for_links.rb
end
end
diff --git a/db/post_migrate/20230209222452_schedule_remove_project_group_link_with_missing_groups.rb b/db/post_migrate/20230209222452_schedule_remove_project_group_link_with_missing_groups.rb
new file mode 100644
index 00000000000..b7dd81267d7
--- /dev/null
+++ b/db/post_migrate/20230209222452_schedule_remove_project_group_link_with_missing_groups.rb
@@ -0,0 +1,27 @@
+# frozen_string_literal: true
+
+class ScheduleRemoveProjectGroupLinkWithMissingGroups < Gitlab::Database::Migration[2.1]
+ MIGRATION = 'RemoveProjectGroupLinkWithMissingGroups'
+ 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,
+ :project_group_links,
+ :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, :project_group_links, :id, [])
+ end
+end
diff --git a/db/post_migrate/20230221093535_add_sync_tmp_partial_index_on_vulnerability_report_types.rb b/db/post_migrate/20230221093535_add_sync_tmp_partial_index_on_vulnerability_report_types.rb
new file mode 100644
index 00000000000..0200aa681e3
--- /dev/null
+++ b/db/post_migrate/20230221093535_add_sync_tmp_partial_index_on_vulnerability_report_types.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class AddSyncTmpPartialIndexOnVulnerabilityReportTypes < Gitlab::Database::Migration[2.1]
+ INDEX_NAME = 'tmp_idx_vulnerability_occurrences_on_id_where_report_type_7_99'
+
+ disable_ddl_transaction!
+
+ def up
+ # Temporary index to be removed in 15.11 https://gitlab.com/gitlab-org/gitlab/-/issues/393052
+ add_concurrent_index :vulnerability_occurrences, :id, where: 'report_type IN (7, 99)', name: INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_index_by_name :vulnerability_occurrences, INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20230221093536_schedule_migrate_shared_vulnerability_identifiers.rb b/db/post_migrate/20230221093536_schedule_migrate_shared_vulnerability_identifiers.rb
new file mode 100644
index 00000000000..79943da148a
--- /dev/null
+++ b/db/post_migrate/20230221093536_schedule_migrate_shared_vulnerability_identifiers.rb
@@ -0,0 +1,26 @@
+# frozen_string_literal: true
+
+class ScheduleMigrateSharedVulnerabilityIdentifiers < Gitlab::Database::Migration[2.1]
+ MIGRATION = "MigrateSharedVulnerabilityIdentifiers"
+ TABLE_NAME = :vulnerability_occurrences
+ BATCH_COLUMN = :id
+ DELAY_INTERVAL = 2.minutes
+
+ BATCH_SIZE = 1_000
+ SUB_BATCH_SIZE = 100
+
+ 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,
+ 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/20230224144233_migrate_evidences_from_raw_metadata.rb b/db/post_migrate/20230224144233_migrate_evidences_from_raw_metadata.rb
index 5d72a46f3c4..7c2a43443df 100644
--- a/db/post_migrate/20230224144233_migrate_evidences_from_raw_metadata.rb
+++ b/db/post_migrate/20230224144233_migrate_evidences_from_raw_metadata.rb
@@ -9,17 +9,10 @@ class MigrateEvidencesFromRawMetadata < Gitlab::Database::Migration[2.1]
BATCH_SIZE = 10000
def up
- queue_batched_background_migration(
- MIGRATION,
- :vulnerability_occurrences,
- :id,
- job_interval: DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- sub_batch_size: SUB_BATCH_SIZE
- )
+ # no-op as it has been rescheduled via db/post_migrate/20230330103104_reschedule_migrate_evidences.rb
end
def down
- delete_batched_background_migration(MIGRATION, :vulnerability_occurrences, :id, [])
+ # no-op as it has been rescheduled via db/post_migrate/20230330103104_reschedule_migrate_evidences.rb
end
end
diff --git a/db/post_migrate/20230301020246_ensure_mr_user_mentions_note_id_bigint_backfill_is_finished_for_gitlab_dot_com.rb b/db/post_migrate/20230301020246_ensure_mr_user_mentions_note_id_bigint_backfill_is_finished_for_gitlab_dot_com.rb
new file mode 100644
index 00000000000..90941af4eb2
--- /dev/null
+++ b/db/post_migrate/20230301020246_ensure_mr_user_mentions_note_id_bigint_backfill_is_finished_for_gitlab_dot_com.rb
@@ -0,0 +1,29 @@
+# frozen_string_literal: true
+
+class EnsureMrUserMentionsNoteIdBigintBackfillIsFinishedForGitlabDotCom < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+ disable_ddl_transaction!
+
+ def up
+ return unless should_run?
+
+ ensure_batched_background_migration_is_finished(
+ job_class_name: 'CopyColumnUsingBackgroundMigrationJob',
+ table_name: 'merge_request_user_mentions',
+ column_name: 'id',
+ job_arguments: [['note_id'], ['note_id_convert_to_bigint']]
+ )
+ end
+
+ def down
+ # no-op
+ end
+
+ private
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/post_migrate/20230301020356_swap_merge_request_user_mentions_note_id_to_bigint.rb b/db/post_migrate/20230301020356_swap_merge_request_user_mentions_note_id_to_bigint.rb
new file mode 100644
index 00000000000..11468a5844e
--- /dev/null
+++ b/db/post_migrate/20230301020356_swap_merge_request_user_mentions_note_id_to_bigint.rb
@@ -0,0 +1,83 @@
+# frozen_string_literal: true
+
+class SwapMergeRequestUserMentionsNoteIdToBigint < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ disable_ddl_transaction!
+
+ TABLE_NAME = 'merge_request_user_mentions'
+
+ def up
+ return unless should_run?
+
+ swap
+ end
+
+ def down
+ return unless should_run?
+
+ swap
+
+ add_concurrent_index TABLE_NAME, :note_id_convert_to_bigint, unique: true,
+ name: 'index_merge_request_user_mentions_note_id_convert_to_bigint',
+ where: 'note_id_convert_to_bigint IS NOT NULL'
+
+ add_concurrent_foreign_key TABLE_NAME, :notes, column: :note_id_convert_to_bigint,
+ name: 'fk_merge_request_user_mentions_note_id_convert_to_bigint',
+ on_delete: :cascade,
+ validate: false
+ end
+
+ def swap
+ # This will replace the existing index_merge_request_user_mentions_on_note_id
+ add_concurrent_index TABLE_NAME, :note_id_convert_to_bigint, unique: true,
+ name: 'index_merge_request_user_mentions_note_id_convert_to_bigint',
+ where: 'note_id_convert_to_bigint IS NOT NULL'
+
+ # This will replace the existing merge_request_user_mentions_on_mr_id_and_note_id_index
+ add_concurrent_index TABLE_NAME, [:merge_request_id, :note_id_convert_to_bigint], unique: true,
+ name: 'mr_user_mentions_on_mr_id_and_note_id_convert_to_bigint_index'
+
+ # This will replace the existing merge_request_user_mentions_on_mr_id_index
+ add_concurrent_index TABLE_NAME, :merge_request_id, unique: true,
+ name: 'merge_request_user_mentions_on_mr_id_index_convert_to_bigint',
+ where: 'note_id_convert_to_bigint IS NULL'
+
+ # This will replace the existing fk_rails_c440b9ea31
+ add_concurrent_foreign_key TABLE_NAME, :notes, column: :note_id_convert_to_bigint,
+ name: 'fk_merge_request_user_mentions_note_id_convert_to_bigint',
+ on_delete: :cascade
+
+ with_lock_retries(raise_on_exhaustion: true) do
+ execute "LOCK TABLE notes, #{TABLE_NAME} IN ACCESS EXCLUSIVE MODE"
+
+ execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN note_id TO note_id_tmp"
+ execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN note_id_convert_to_bigint TO note_id"
+ execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN note_id_tmp TO note_id_convert_to_bigint"
+
+ function_name = Gitlab::Database::UnidirectionalCopyTrigger
+ .on_table(TABLE_NAME, connection: connection)
+ .name(:note_id, :note_id_convert_to_bigint)
+ execute "ALTER FUNCTION #{quote_table_name(function_name)} RESET ALL"
+
+ execute 'DROP INDEX IF EXISTS index_merge_request_user_mentions_on_note_id'
+ rename_index TABLE_NAME, 'index_merge_request_user_mentions_note_id_convert_to_bigint',
+ 'index_merge_request_user_mentions_on_note_id'
+
+ execute 'DROP INDEX IF EXISTS merge_request_user_mentions_on_mr_id_and_note_id_index'
+ rename_index TABLE_NAME, 'mr_user_mentions_on_mr_id_and_note_id_convert_to_bigint_index',
+ 'merge_request_user_mentions_on_mr_id_and_note_id_index'
+
+ execute 'DROP INDEX IF EXISTS merge_request_user_mentions_on_mr_id_index'
+ rename_index TABLE_NAME, 'merge_request_user_mentions_on_mr_id_index_convert_to_bigint',
+ 'merge_request_user_mentions_on_mr_id_index'
+
+ execute "ALTER TABLE #{TABLE_NAME} DROP CONSTRAINT IF EXISTS fk_rails_c440b9ea31"
+ rename_constraint(TABLE_NAME, 'fk_merge_request_user_mentions_note_id_convert_to_bigint', 'fk_rails_c440b9ea31')
+ end
+ end
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/post_migrate/20230306195007_queue_backfill_project_wiki_repositories.rb b/db/post_migrate/20230306195007_queue_backfill_project_wiki_repositories.rb
index fd2dc0d16da..8da5536541b 100644
--- a/db/post_migrate/20230306195007_queue_backfill_project_wiki_repositories.rb
+++ b/db/post_migrate/20230306195007_queue_backfill_project_wiki_repositories.rb
@@ -1,25 +1,13 @@
# frozen_string_literal: true
class QueueBackfillProjectWikiRepositories < Gitlab::Database::Migration[2.1]
- MIGRATION = "BackfillProjectWikiRepositories"
- 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,
- :projects,
- :id,
- job_interval: DELAY_INTERVAL,
- batch_size: BATCH_SIZE,
- sub_batch_size: SUB_BATCH_SIZE
- )
+ # no-op
end
def down
- delete_batched_background_migration(MIGRATION, :projects, :id, [])
+ # no-op
end
end
diff --git a/db/post_migrate/20230309085547_prepare_ci_builds_constraints_for_list_partitioning.rb b/db/post_migrate/20230309085547_prepare_ci_builds_constraints_for_list_partitioning.rb
new file mode 100644
index 00000000000..966bff7d544
--- /dev/null
+++ b/db/post_migrate/20230309085547_prepare_ci_builds_constraints_for_list_partitioning.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class PrepareCiBuildsConstraintsForListPartitioning < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ add_check_constraint(:ci_builds, 'partition_id = 100', 'partitioning_constraint', validate: false)
+ prepare_async_check_constraint_validation(:ci_builds, name: 'partitioning_constraint')
+ end
+
+ def down
+ unprepare_async_check_constraint_validation(:ci_builds, name: 'partitioning_constraint')
+ remove_check_constraint(:ci_builds, 'partitioning_constraint')
+ end
+end
diff --git a/db/post_migrate/20230313031629_ensure_commit_user_mentions_note_id_bigint_backfill_is_finished_for_gitlab_dot_com.rb b/db/post_migrate/20230313031629_ensure_commit_user_mentions_note_id_bigint_backfill_is_finished_for_gitlab_dot_com.rb
new file mode 100644
index 00000000000..d651ca463af
--- /dev/null
+++ b/db/post_migrate/20230313031629_ensure_commit_user_mentions_note_id_bigint_backfill_is_finished_for_gitlab_dot_com.rb
@@ -0,0 +1,29 @@
+# frozen_string_literal: true
+
+class EnsureCommitUserMentionsNoteIdBigintBackfillIsFinishedForGitlabDotCom < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+ disable_ddl_transaction!
+
+ def up
+ return unless should_run?
+
+ ensure_batched_background_migration_is_finished(
+ job_class_name: 'CopyColumnUsingBackgroundMigrationJob',
+ table_name: 'commit_user_mentions',
+ column_name: 'id',
+ job_arguments: [['note_id'], ['note_id_convert_to_bigint']]
+ )
+ end
+
+ def down
+ # no-op
+ end
+
+ private
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/post_migrate/20230313142631_backfill_ml_candidates_package_id.rb b/db/post_migrate/20230313142631_backfill_ml_candidates_package_id.rb
new file mode 100644
index 00000000000..09f7cf5a0ba
--- /dev/null
+++ b/db/post_migrate/20230313142631_backfill_ml_candidates_package_id.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+
+class BackfillMlCandidatesPackageId < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ sql = <<-SQL
+ UPDATE ml_candidates
+ SET package_id = candidate_id_to_package_id.package_id
+ FROM (SELECT id as package_id, TRIM(LEADING 'ml_candidates_' FROM name) as candidate_id
+ FROM packages_packages
+ WHERE name LIKE 'ml_candidate_%'
+ and version = '-') AS candidate_id_to_package_id
+ WHERE cast(ml_candidates.id as text) = candidate_id_to_package_id.candidate_id
+ SQL
+
+ execute(sql)
+ end
+
+ def down; end
+end
diff --git a/db/post_migrate/20230314144640_reschedule_migration_for_links.rb b/db/post_migrate/20230314144640_reschedule_migration_for_links.rb
new file mode 100644
index 00000000000..311420f4f37
--- /dev/null
+++ b/db/post_migrate/20230314144640_reschedule_migration_for_links.rb
@@ -0,0 +1,32 @@
+# frozen_string_literal: true
+
+# rubocop: disable BackgroundMigration/MissingDictionaryFile
+
+class RescheduleMigrationForLinks < Gitlab::Database::Migration[2.1]
+ MIGRATION = 'MigrateLinksForVulnerabilityFindings'
+ DELAY_INTERVAL = 2.minutes
+ SUB_BATCH_SIZE = 500
+ BATCH_SIZE = 10000
+
+ disable_ddl_transaction!
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ delete_batched_background_migration(MIGRATION, :vulnerability_occurrences, :id, [])
+
+ queue_batched_background_migration(
+ MIGRATION,
+ :vulnerability_occurrences,
+ :id,
+ job_interval: DELAY_INTERVAL,
+ batch_size: BATCH_SIZE,
+ sub_batch_size: SUB_BATCH_SIZE
+ )
+ end
+
+ def down
+ delete_batched_background_migration(MIGRATION, :vulnerability_occurrences, :id, [])
+ end
+end
+# rubocop: enable BackgroundMigration/MissingDictionaryFile
diff --git a/db/post_migrate/20230314210657_set_email_confirmation_setting_from_soft_email_confirmation_ff.rb b/db/post_migrate/20230314210657_set_email_confirmation_setting_from_soft_email_confirmation_ff.rb
new file mode 100644
index 00000000000..d01821ab838
--- /dev/null
+++ b/db/post_migrate/20230314210657_set_email_confirmation_setting_from_soft_email_confirmation_ff.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+
+class SetEmailConfirmationSettingFromSoftEmailConfirmationFf < Gitlab::Database::Migration[2.1]
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ class ApplicationSetting < MigrationRecord
+ self.table_name = 'application_settings'
+ end
+
+ class FeatureGates < MigrationRecord
+ self.table_name = 'feature_gates'
+ end
+
+ def up
+ return unless FeatureGates.find_by(feature_key: 'soft_email_confirmation')&.value == 'true'
+
+ ApplicationSetting.update_all(email_confirmation_setting: 1)
+ end
+
+ def down
+ ApplicationSetting.update_all(email_confirmation_setting: 0)
+ end
+end
diff --git a/db/post_migrate/20230315084704_finalize_issues_iid_scoping_to_namespace.rb b/db/post_migrate/20230315084704_finalize_issues_iid_scoping_to_namespace.rb
new file mode 100644
index 00000000000..f9d4013d5f3
--- /dev/null
+++ b/db/post_migrate/20230315084704_finalize_issues_iid_scoping_to_namespace.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+class FinalizeIssuesIidScopingToNamespace < Gitlab::Database::Migration[2.1]
+ MIGRATION = 'IssuesInternalIdScopeUpdater'
+
+ disable_ddl_transaction!
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ ensure_batched_background_migration_is_finished(
+ job_class_name: MIGRATION,
+ table_name: :internal_ids,
+ column_name: :id,
+ job_arguments: [],
+ finalize: true)
+ end
+
+ def down; end
+end
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
new file mode 100644
index 00000000000..d4a6d86d9cb
--- /dev/null
+++ b/db/post_migrate/20230315161408_finalize_set_notifications_bigint_conversion_backfill.rb
@@ -0,0 +1,34 @@
+# 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
+
+ disable_ddl_transaction!
+
+ TABLE_NAME = :sent_notifications
+
+ def up
+ return unless should_run?
+
+ ensure_batched_background_migration_is_finished(
+ job_class_name: 'CopyColumnUsingBackgroundMigrationJob',
+ table_name: TABLE_NAME,
+ column_name: 'id',
+ job_arguments: [['id'], ['id_convert_to_bigint']]
+ )
+ end
+
+ def down
+ # No op
+ end
+
+ private
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/post_migrate/20230316014651_remove_index_on_events_action.rb b/db/post_migrate/20230316014651_remove_index_on_events_action.rb
new file mode 100644
index 00000000000..61a3077c330
--- /dev/null
+++ b/db/post_migrate/20230316014651_remove_index_on_events_action.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class RemoveIndexOnEventsAction < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ remove_concurrent_index :events, :action, name: 'index_events_on_action'
+ end
+
+ def down
+ add_concurrent_index :events, :action, name: 'index_events_on_action'
+ end
+end
diff --git a/db/post_migrate/20230316114426_swap_ci_runner_machine_builds_primary_key.rb b/db/post_migrate/20230316114426_swap_ci_runner_machine_builds_primary_key.rb
new file mode 100644
index 00000000000..ea23edf8eb5
--- /dev/null
+++ b/db/post_migrate/20230316114426_swap_ci_runner_machine_builds_primary_key.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+class SwapCiRunnerMachineBuildsPrimaryKey < Gitlab::Database::Migration[2.1]
+ def up
+ # no-op. See https://gitlab.com/gitlab-com/gl-infra/production/-/issues/8588 for details
+ end
+
+ def down
+ # no-op. See https://gitlab.com/gitlab-com/gl-infra/production/-/issues/8588 for details
+ end
+end
diff --git a/db/post_migrate/20230316164917_remove_packages_events_package_id_fk.rb b/db/post_migrate/20230316164917_remove_packages_events_package_id_fk.rb
new file mode 100644
index 00000000000..1b030741564
--- /dev/null
+++ b/db/post_migrate/20230316164917_remove_packages_events_package_id_fk.rb
@@ -0,0 +1,31 @@
+# frozen_string_literal: true
+
+class RemovePackagesEventsPackageIdFk < Gitlab::Database::Migration[2.1]
+ FK_NAME = 'fk_rails_c6c20d0094'
+ SOURCE_TABLE = :packages_events
+ TARGET_TABLE = :packages_packages
+ COLUMN = :package_id
+
+ disable_ddl_transaction!
+
+ def up
+ with_lock_retries do
+ remove_foreign_key_if_exists(
+ SOURCE_TABLE,
+ TARGET_TABLE,
+ name: FK_NAME,
+ reverse_lock_order: true
+ )
+ end
+ end
+
+ def down
+ add_concurrent_foreign_key(
+ SOURCE_TABLE,
+ TARGET_TABLE,
+ name: FK_NAME,
+ column: COLUMN,
+ on_delete: :nullify
+ )
+ end
+end
diff --git a/db/post_migrate/20230316185746_drop_packages_events_table.rb b/db/post_migrate/20230316185746_drop_packages_events_table.rb
new file mode 100644
index 00000000000..bb51fc7ae9c
--- /dev/null
+++ b/db/post_migrate/20230316185746_drop_packages_events_table.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+
+class DropPackagesEventsTable < Gitlab::Database::Migration[2.1]
+ def up
+ drop_table :packages_events, if_exists: true
+ end
+
+ def down
+ return if table_exists?(:packages_events)
+
+ create_table :packages_events do |t| # rubocop:disable Migration/SchemaAdditionMethodsNoPost
+ t.integer :event_type, limit: 2, null: false
+ t.integer :event_scope, limit: 2, null: false
+ t.integer :originator_type, limit: 2, null: false
+ t.bigint :originator
+ t.datetime_with_timezone :created_at, null: false
+ t.references :package,
+ index: true,
+ foreign_key: { to_table: :packages_packages, on_delete: :nullify },
+ type: :bigint
+ end
+ end
+end
diff --git a/db/post_migrate/20230317075852_add_tmp_unique_packages_index_when_debian.rb b/db/post_migrate/20230317075852_add_tmp_unique_packages_index_when_debian.rb
new file mode 100644
index 00000000000..9ea8d358366
--- /dev/null
+++ b/db/post_migrate/20230317075852_add_tmp_unique_packages_index_when_debian.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+
+class AddTmpUniquePackagesIndexWhenDebian < Gitlab::Database::Migration[2.1]
+ TABLE_NAME = :packages_packages
+ PACKAGE_TYPE_DEBIAN = 9
+ PACKAGE_STATUS_PENDING_DESTRUCTION = 4
+ TMP_DEBIAN_UNIQUE_INDEX_NAME = 'tmp_unique_packages_project_id_and_name_and_version_when_debian'
+
+ disable_ddl_transaction!
+
+ def up
+ # This index will disallow further duplicates while we're deduplicating the data.
+ add_concurrent_index TABLE_NAME, [:project_id, :name, :version],
+ where: "package_type = #{PACKAGE_TYPE_DEBIAN} AND status != #{PACKAGE_STATUS_PENDING_DESTRUCTION} AND
+ created_at > TIMESTAMP WITH TIME ZONE '#{Time.now.utc}'",
+ unique: true,
+ name: TMP_DEBIAN_UNIQUE_INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_index_by_name TABLE_NAME, TMP_DEBIAN_UNIQUE_INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20230317080000_ensure_unique_debian_packages.rb b/db/post_migrate/20230317080000_ensure_unique_debian_packages.rb
new file mode 100644
index 00000000000..250e0cb2369
--- /dev/null
+++ b/db/post_migrate/20230317080000_ensure_unique_debian_packages.rb
@@ -0,0 +1,48 @@
+# frozen_string_literal: true
+
+class EnsureUniqueDebianPackages < Gitlab::Database::Migration[2.1]
+ BATCH_SIZE = 1_000
+
+ disable_ddl_transaction!
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ class Package < MigrationRecord
+ include EachBatch
+
+ self.table_name = 'packages_packages'
+
+ enum package_type: { debian: 9 }
+
+ enum status: { pending_destruction: 4 }
+ end
+
+ def up
+ Package.distinct_each_batch(column: :project_id) do |package_projects|
+ project_ids = package_projects.pluck(:project_id)
+ duplicates = Package.debian
+ .not_pending_destruction
+ .where(project_id: project_ids)
+ .select('project_id, name, version, MAX(id) as last_id')
+ .group(:project_id, :name, :version)
+ .having('count(id) > 1')
+ loop do
+ duplicates.limit(BATCH_SIZE).each do |duplicate|
+ Package.debian
+ .not_pending_destruction
+ .where(
+ project_id: duplicate.project_id,
+ name: duplicate.name,
+ version: duplicate.version,
+ id: ..duplicate.last_id - 1
+ ).update_all status: :pending_destruction
+ end
+ break unless duplicates.exists?
+ end
+ end
+ end
+
+ def down
+ # nothing to do
+ end
+end
diff --git a/db/post_migrate/20230317080137_add_unique_packages_index_when_debian.rb b/db/post_migrate/20230317080137_add_unique_packages_index_when_debian.rb
new file mode 100644
index 00000000000..b079e860c0f
--- /dev/null
+++ b/db/post_migrate/20230317080137_add_unique_packages_index_when_debian.rb
@@ -0,0 +1,29 @@
+# frozen_string_literal: true
+
+class AddUniquePackagesIndexWhenDebian < Gitlab::Database::Migration[2.1]
+ TABLE_NAME = :packages_packages
+ PACKAGE_TYPE_DEBIAN = 9
+ PACKAGE_STATUS_PENDING_DESTRUCTION = 4
+ TMP_DEBIAN_UNIQUE_INDEX_NAME = 'tmp_unique_packages_project_id_and_name_and_version_when_debian'
+ DEBIAN_UNIQUE_INDEX_NAME = 'unique_packages_project_id_and_name_and_version_when_debian'
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index TABLE_NAME, [:project_id, :name, :version],
+ where: "package_type = #{PACKAGE_TYPE_DEBIAN} AND status != #{PACKAGE_STATUS_PENDING_DESTRUCTION}",
+ unique: true,
+ name: DEBIAN_UNIQUE_INDEX_NAME
+ remove_concurrent_index_by_name TABLE_NAME, TMP_DEBIAN_UNIQUE_INDEX_NAME
+ end
+
+ def down
+ # This index will disallow further duplicates while we're deduplicating the data.
+ add_concurrent_index TABLE_NAME, [:project_id, :name, :version],
+ where: "package_type = #{PACKAGE_TYPE_DEBIAN} AND status != #{PACKAGE_STATUS_PENDING_DESTRUCTION} AND
+ created_at > TIMESTAMP WITH TIME ZONE '#{Time.now.utc}'",
+ unique: true,
+ name: TMP_DEBIAN_UNIQUE_INDEX_NAME
+ remove_concurrent_index_by_name TABLE_NAME, DEBIAN_UNIQUE_INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20230317151841_remove_from_to_state_constraint.rb b/db/post_migrate/20230317151841_remove_from_to_state_constraint.rb
new file mode 100644
index 00000000000..21913d394d1
--- /dev/null
+++ b/db/post_migrate/20230317151841_remove_from_to_state_constraint.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class RemoveFromToStateConstraint < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ constraint_name = check_constraint_name(
+ 'vulnerability_state_transitions',
+ 'fully_qualified_table_name',
+ 'state_not_equal')
+ remove_check_constraint(:vulnerability_state_transitions, constraint_name)
+ end
+
+ def down
+ constraint_name = check_constraint_name(
+ 'vulnerability_state_transitions',
+ 'fully_qualified_table_name',
+ 'state_not_equal')
+ add_check_constraint(:vulnerability_state_transitions, '(from_state != to_state)', constraint_name)
+ end
+end
diff --git a/db/post_migrate/20230317195228_prepare_async_sent_notifications_index.rb b/db/post_migrate/20230317195228_prepare_async_sent_notifications_index.rb
new file mode 100644
index 00000000000..ea035b3ee58
--- /dev/null
+++ b/db/post_migrate/20230317195228_prepare_async_sent_notifications_index.rb
@@ -0,0 +1,27 @@
+# frozen_string_literal: true
+
+class PrepareAsyncSentNotificationsIndex < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ TABLE_NAME = :sent_notifications
+ COLUMN_NAME = :id_convert_to_bigint
+ INDEX_NAME = :index_sent_notifications_on_id_convert_to_bigint
+
+ def up
+ return unless should_run?
+
+ prepare_async_index TABLE_NAME, COLUMN_NAME, name: INDEX_NAME, unique: true
+ end
+
+ def down
+ return unless should_run?
+
+ unprepare_async_index TABLE_NAME, COLUMN_NAME, name: INDEX_NAME
+ end
+
+ private
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/post_migrate/20230319105436_remove_member_role_download_code.rb b/db/post_migrate/20230319105436_remove_member_role_download_code.rb
new file mode 100644
index 00000000000..34921b8d806
--- /dev/null
+++ b/db/post_migrate/20230319105436_remove_member_role_download_code.rb
@@ -0,0 +1,7 @@
+# frozen_string_literal: true
+
+class RemoveMemberRoleDownloadCode < Gitlab::Database::Migration[2.1]
+ def change
+ remove_column :member_roles, :download_code, :boolean, default: false
+ end
+end
diff --git a/db/post_migrate/20230320110802_add_index_to_vulnerability_findings_on_uuid.rb b/db/post_migrate/20230320110802_add_index_to_vulnerability_findings_on_uuid.rb
new file mode 100644
index 00000000000..6795a7ecbe7
--- /dev/null
+++ b/db/post_migrate/20230320110802_add_index_to_vulnerability_findings_on_uuid.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class AddIndexToVulnerabilityFindingsOnUuid < Gitlab::Database::Migration[2.1]
+ INDEX_NAME = 'index_vuln_findings_on_uuid_including_vuln_id'
+
+ disable_ddl_transaction!
+
+ # TODO: Index to be created synchronously in https://gitlab.com/gitlab-org/gitlab/-/issues/397740
+
+ def up
+ prepare_async_index_from_sql <<-SQL
+ CREATE UNIQUE INDEX CONCURRENTLY #{INDEX_NAME} ON vulnerability_occurrences (uuid) include (vulnerability_id);
+ SQL
+ end
+
+ def down
+ unprepare_async_index_by_name(:vulnerability_occurrences, INDEX_NAME)
+ end
+end
diff --git a/db/post_migrate/20230320155635_add_index_to_namespace_details.rb b/db/post_migrate/20230320155635_add_index_to_namespace_details.rb
new file mode 100644
index 00000000000..de00c57836b
--- /dev/null
+++ b/db/post_migrate/20230320155635_add_index_to_namespace_details.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class AddIndexToNamespaceDetails < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ INDEX_NAME = 'index_fuc_over_limit_notified_at'
+ TABLE_NAME = 'namespace_details'
+ COLUMN_NAME = 'free_user_cap_over_limit_notified_at'
+
+ def up
+ add_concurrent_index TABLE_NAME, COLUMN_NAME, name: INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_index_by_name TABLE_NAME, name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20230321003252_swap_commit_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb b/db/post_migrate/20230321003252_swap_commit_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb
new file mode 100644
index 00000000000..6b75ca44cc2
--- /dev/null
+++ b/db/post_migrate/20230321003252_swap_commit_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb
@@ -0,0 +1,68 @@
+# frozen_string_literal: true
+
+class SwapCommitUserMentionsNoteIdToBigintForGitlabDotCom < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ disable_ddl_transaction!
+
+ TABLE_NAME = 'commit_user_mentions'
+
+ def up
+ return unless should_run?
+
+ swap
+ end
+
+ def down
+ return unless should_run?
+
+ swap
+ end
+
+ def swap
+ # This will replace the existing commit_user_mentions_on_commit_id_and_note_id_unique_index
+ add_concurrent_index TABLE_NAME, [:commit_id, :note_id_convert_to_bigint], unique: true,
+ name: 'commit_user_mentions_on_commit_id_and_note_id_convert_to_bigint'
+
+ # This will replace the existing index_commit_user_mentions_on_note_id
+ add_concurrent_index TABLE_NAME, :note_id_convert_to_bigint, unique: true,
+ name: 'index_commit_user_mentions_on_note_id_convert_to_bigint'
+
+ # This will replace the existing fk_rails_a6760813e0
+ add_concurrent_foreign_key TABLE_NAME, :notes, column: :note_id_convert_to_bigint,
+ name: 'fk_commit_user_mentions_note_id_convert_to_bigint',
+ on_delete: :cascade
+
+ with_lock_retries(raise_on_exhaustion: true) do
+ execute "LOCK TABLE notes, #{TABLE_NAME} IN ACCESS EXCLUSIVE MODE"
+
+ execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN note_id TO note_id_tmp"
+ execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN note_id_convert_to_bigint TO note_id"
+ execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN note_id_tmp TO note_id_convert_to_bigint"
+
+ function_name = Gitlab::Database::UnidirectionalCopyTrigger
+ .on_table(TABLE_NAME, connection: connection)
+ .name(:note_id, :note_id_convert_to_bigint)
+ execute "ALTER FUNCTION #{quote_table_name(function_name)} RESET ALL"
+
+ # Swap defaults
+ change_column_default TABLE_NAME, :note_id, nil
+ change_column_default TABLE_NAME, :note_id_convert_to_bigint, 0
+
+ execute 'DROP INDEX IF EXISTS commit_user_mentions_on_commit_id_and_note_id_unique_index'
+ rename_index TABLE_NAME, 'commit_user_mentions_on_commit_id_and_note_id_convert_to_bigint',
+ 'commit_user_mentions_on_commit_id_and_note_id_unique_index'
+
+ execute 'DROP INDEX IF EXISTS index_commit_user_mentions_on_note_id'
+ rename_index TABLE_NAME, 'index_commit_user_mentions_on_note_id_convert_to_bigint',
+ 'index_commit_user_mentions_on_note_id'
+
+ execute "ALTER TABLE #{TABLE_NAME} DROP CONSTRAINT IF EXISTS fk_rails_a6760813e0"
+ rename_constraint(TABLE_NAME, 'fk_commit_user_mentions_note_id_convert_to_bigint', 'fk_rails_a6760813e0')
+ end
+ end
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/post_migrate/20230321011529_ensure_vum_bigint_backfill_is_finished_for_gl_dot_com.rb b/db/post_migrate/20230321011529_ensure_vum_bigint_backfill_is_finished_for_gl_dot_com.rb
new file mode 100644
index 00000000000..be4eb05634a
--- /dev/null
+++ b/db/post_migrate/20230321011529_ensure_vum_bigint_backfill_is_finished_for_gl_dot_com.rb
@@ -0,0 +1,29 @@
+# frozen_string_literal: true
+
+class EnsureVumBigintBackfillIsFinishedForGlDotCom < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+ disable_ddl_transaction!
+
+ def up
+ return unless should_run?
+
+ ensure_batched_background_migration_is_finished(
+ job_class_name: 'CopyColumnUsingBackgroundMigrationJob',
+ table_name: 'vulnerability_user_mentions',
+ column_name: 'id',
+ job_arguments: [['note_id'], ['note_id_convert_to_bigint']]
+ )
+ end
+
+ def down
+ # no-op
+ end
+
+ private
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/post_migrate/20230321011903_swap_vulnerability_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb b/db/post_migrate/20230321011903_swap_vulnerability_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb
new file mode 100644
index 00000000000..6c5c001fe0f
--- /dev/null
+++ b/db/post_migrate/20230321011903_swap_vulnerability_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb
@@ -0,0 +1,74 @@
+# frozen_string_literal: true
+
+class SwapVulnerabilityUserMentionsNoteIdToBigintForGitlabDotCom < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ disable_ddl_transaction!
+
+ TABLE_NAME = 'vulnerability_user_mentions'
+
+ def up
+ return unless should_run?
+
+ swap
+ end
+
+ def down
+ return unless should_run?
+
+ swap
+ end
+
+ def swap
+ # This will replace the existing index_vulnerability_user_mentions_on_note_id
+ add_concurrent_index TABLE_NAME, :note_id_convert_to_bigint, unique: true,
+ name: 'index_vulnerability_user_mentions_on_note_id_convert_to_bigint',
+ where: 'note_id_convert_to_bigint IS NOT NULL'
+
+ # This will replace the existing index_vulns_user_mentions_on_vulnerability_id
+ add_concurrent_index TABLE_NAME, :vulnerability_id, unique: true,
+ name: 'tmp_index_vulns_user_mentions_on_vulnerability_id',
+ where: 'note_id_convert_to_bigint IS NULL'
+
+ # This will replace the existing index_vulns_user_mentions_on_vulnerability_id_and_note_id
+ add_concurrent_index TABLE_NAME, [:vulnerability_id, :note_id_convert_to_bigint], unique: true,
+ name: 'tmp_index_vulns_user_mentions_on_vulnerability_id_and_note_id'
+
+ # This will replace the existing fk_rails_a18600f210
+ add_concurrent_foreign_key TABLE_NAME, :notes, column: :note_id_convert_to_bigint,
+ name: 'fk_vulnerability_user_mentions_note_id_convert_to_bigint',
+ on_delete: :cascade
+
+ with_lock_retries(raise_on_exhaustion: true) do
+ execute "LOCK TABLE notes, #{TABLE_NAME} IN ACCESS EXCLUSIVE MODE"
+
+ execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN note_id TO note_id_tmp"
+ execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN note_id_convert_to_bigint TO note_id"
+ execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN note_id_tmp TO note_id_convert_to_bigint"
+
+ function_name = Gitlab::Database::UnidirectionalCopyTrigger
+ .on_table(TABLE_NAME, connection: connection)
+ .name(:note_id, :note_id_convert_to_bigint)
+ execute "ALTER FUNCTION #{quote_table_name(function_name)} RESET ALL"
+
+ execute 'DROP INDEX IF EXISTS index_vulnerability_user_mentions_on_note_id'
+ rename_index TABLE_NAME, 'index_vulnerability_user_mentions_on_note_id_convert_to_bigint',
+ 'index_vulnerability_user_mentions_on_note_id'
+
+ execute 'DROP INDEX IF EXISTS index_vulns_user_mentions_on_vulnerability_id'
+ rename_index TABLE_NAME, 'tmp_index_vulns_user_mentions_on_vulnerability_id',
+ 'index_vulns_user_mentions_on_vulnerability_id'
+
+ execute 'DROP INDEX IF EXISTS index_vulns_user_mentions_on_vulnerability_id_and_note_id'
+ rename_index TABLE_NAME, 'tmp_index_vulns_user_mentions_on_vulnerability_id_and_note_id',
+ 'index_vulns_user_mentions_on_vulnerability_id_and_note_id'
+
+ execute "ALTER TABLE #{TABLE_NAME} DROP CONSTRAINT IF EXISTS fk_rails_a18600f210"
+ rename_constraint(TABLE_NAME, 'fk_vulnerability_user_mentions_note_id_convert_to_bigint', 'fk_rails_a18600f210')
+ end
+ end
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/post_migrate/20230321024333_ensure_design_user_mentions_note_id_bigint_backfill_is_finished_for_gitlab_dot_com.rb b/db/post_migrate/20230321024333_ensure_design_user_mentions_note_id_bigint_backfill_is_finished_for_gitlab_dot_com.rb
new file mode 100644
index 00000000000..175bc317406
--- /dev/null
+++ b/db/post_migrate/20230321024333_ensure_design_user_mentions_note_id_bigint_backfill_is_finished_for_gitlab_dot_com.rb
@@ -0,0 +1,29 @@
+# frozen_string_literal: true
+
+class EnsureDesignUserMentionsNoteIdBigintBackfillIsFinishedForGitlabDotCom < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+ disable_ddl_transaction!
+
+ def up
+ return unless should_run?
+
+ ensure_batched_background_migration_is_finished(
+ job_class_name: 'CopyColumnUsingBackgroundMigrationJob',
+ table_name: 'design_user_mentions',
+ column_name: 'id',
+ job_arguments: [['note_id'], ['note_id_convert_to_bigint']]
+ )
+ end
+
+ def down
+ # no-op
+ end
+
+ private
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/post_migrate/20230321024903_swap_design_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb b/db/post_migrate/20230321024903_swap_design_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb
new file mode 100644
index 00000000000..ead6adc2e80
--- /dev/null
+++ b/db/post_migrate/20230321024903_swap_design_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb
@@ -0,0 +1,68 @@
+# frozen_string_literal: true
+
+class SwapDesignUserMentionsNoteIdToBigintForGitlabDotCom < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ disable_ddl_transaction!
+
+ TABLE_NAME = 'design_user_mentions'
+
+ def up
+ return unless should_run?
+
+ swap
+ end
+
+ def down
+ return unless should_run?
+
+ swap
+ end
+
+ def swap
+ # This will replace the existing design_user_mentions_on_design_id_and_note_id_unique_index
+ add_concurrent_index TABLE_NAME, [:design_id, :note_id_convert_to_bigint], unique: true,
+ name: 'design_um_on_design_id_and_note_id_convert_to_bigint_unique'
+
+ # This will replace the existing index_design_user_mentions_on_note_id
+ add_concurrent_index TABLE_NAME, :note_id_convert_to_bigint, unique: true,
+ name: 'index_design_user_mentions_on_note_id_convert_to_bigint'
+
+ # This will replace the existing fk_rails_8de8c6d632
+ add_concurrent_foreign_key TABLE_NAME, :notes, column: :note_id_convert_to_bigint,
+ name: 'fk_design_user_mentions_note_id_convert_to_bigint',
+ on_delete: :cascade
+
+ with_lock_retries(raise_on_exhaustion: true) do
+ execute "LOCK TABLE notes, #{TABLE_NAME} IN ACCESS EXCLUSIVE MODE"
+
+ execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN note_id TO note_id_tmp"
+ execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN note_id_convert_to_bigint TO note_id"
+ execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN note_id_tmp TO note_id_convert_to_bigint"
+
+ function_name = Gitlab::Database::UnidirectionalCopyTrigger
+ .on_table(TABLE_NAME, connection: connection)
+ .name(:note_id, :note_id_convert_to_bigint)
+ execute "ALTER FUNCTION #{quote_table_name(function_name)} RESET ALL"
+
+ # Swap defaults
+ change_column_default TABLE_NAME, :note_id, nil
+ change_column_default TABLE_NAME, :note_id_convert_to_bigint, 0
+
+ execute 'DROP INDEX IF EXISTS design_user_mentions_on_design_id_and_note_id_unique_index'
+ rename_index TABLE_NAME, 'design_um_on_design_id_and_note_id_convert_to_bigint_unique',
+ 'design_user_mentions_on_design_id_and_note_id_unique_index'
+
+ execute 'DROP INDEX IF EXISTS index_design_user_mentions_on_note_id'
+ rename_index TABLE_NAME, 'index_design_user_mentions_on_note_id_convert_to_bigint',
+ 'index_design_user_mentions_on_note_id'
+
+ execute "ALTER TABLE #{TABLE_NAME} DROP CONSTRAINT IF EXISTS fk_rails_8de8c6d632"
+ rename_constraint(TABLE_NAME, 'fk_design_user_mentions_note_id_convert_to_bigint', 'fk_rails_8de8c6d632')
+ end
+ end
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/post_migrate/20230321095759_remove_namespaces_broadcast_messages_namespace_id_fk.rb b/db/post_migrate/20230321095759_remove_namespaces_broadcast_messages_namespace_id_fk.rb
new file mode 100644
index 00000000000..b22fb1d547d
--- /dev/null
+++ b/db/post_migrate/20230321095759_remove_namespaces_broadcast_messages_namespace_id_fk.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+class RemoveNamespacesBroadcastMessagesNamespaceIdFk < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ return unless foreign_key_exists?(:broadcast_messages, :namespaces, name: "fk_7bf2ec43da")
+
+ with_lock_retries do
+ remove_foreign_key_if_exists(:broadcast_messages, :namespaces,
+ name: "fk_7bf2ec43da", reverse_lock_order: true)
+ end
+ end
+
+ def down
+ add_concurrent_foreign_key(:broadcast_messages, :namespaces,
+ name: "fk_7bf2ec43da", column: :namespace_id,
+ target_column: :id, on_delete: :cascade)
+ end
+end
diff --git a/db/post_migrate/20230321124837_remove_ci_builds_partition_id_default.rb b/db/post_migrate/20230321124837_remove_ci_builds_partition_id_default.rb
new file mode 100644
index 00000000000..a3a80fc6110
--- /dev/null
+++ b/db/post_migrate/20230321124837_remove_ci_builds_partition_id_default.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class RemoveCiBuildsPartitionIdDefault < Gitlab::Database::Migration[2.1]
+ enable_lock_retries!
+
+ def up
+ # no-op. See https://gitlab.com/gitlab-com/gl-infra/production/-/issues/8588 for details.
+ end
+
+ def down
+ # no-op. See https://gitlab.com/gitlab-com/gl-infra/production/-/issues/8588 for details.
+ end
+end
diff --git a/db/post_migrate/20230321153035_add_package_id_created_at_desc_index_to_package_files.rb b/db/post_migrate/20230321153035_add_package_id_created_at_desc_index_to_package_files.rb
new file mode 100644
index 00000000000..cb8fae70295
--- /dev/null
+++ b/db/post_migrate/20230321153035_add_package_id_created_at_desc_index_to_package_files.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class AddPackageIdCreatedAtDescIndexToPackageFiles < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ INDEX_NAME = 'index_packages_package_files_on_package_id_and_created_at_desc'
+
+ def up
+ add_concurrent_index :packages_package_files, 'package_id, created_at DESC', name: INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_index_by_name :packages_package_files, name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20230321153337_cleanup_ml_candidates_iid_rename.rb b/db/post_migrate/20230321153337_cleanup_ml_candidates_iid_rename.rb
new file mode 100644
index 00000000000..9db01b45ded
--- /dev/null
+++ b/db/post_migrate/20230321153337_cleanup_ml_candidates_iid_rename.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class CleanupMlCandidatesIidRename < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ cleanup_concurrent_column_rename :ml_candidates, :iid, :eid
+ end
+
+ def down
+ undo_cleanup_concurrent_column_rename :ml_candidates, :iid, :eid
+ end
+end
diff --git a/db/post_migrate/20230321163547_cleanup_conversion_big_int_ci_build_needs.rb b/db/post_migrate/20230321163547_cleanup_conversion_big_int_ci_build_needs.rb
new file mode 100644
index 00000000000..4812cb2deca
--- /dev/null
+++ b/db/post_migrate/20230321163547_cleanup_conversion_big_int_ci_build_needs.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class CleanupConversionBigIntCiBuildNeeds < Gitlab::Database::Migration[2.1]
+ enable_lock_retries!
+
+ TABLE = :ci_build_needs
+
+ def up
+ cleanup_conversion_of_integer_to_bigint(TABLE, :id)
+ end
+
+ def down
+ restore_conversion_of_integer_to_bigint(TABLE, :id)
+ end
+end
diff --git a/db/post_migrate/20230321163947_backfill_ml_candidates_project_id.rb b/db/post_migrate/20230321163947_backfill_ml_candidates_project_id.rb
new file mode 100644
index 00000000000..cfcc8a4978d
--- /dev/null
+++ b/db/post_migrate/20230321163947_backfill_ml_candidates_project_id.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+
+class BackfillMlCandidatesProjectId < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ sql = <<-SQL
+ UPDATE ml_candidates
+ SET project_id = temp.project_id
+ FROM (
+ SELECT ml_candidates.id AS id, ml_experiments.project_id AS project_id
+ FROM ml_candidates INNER JOIN ml_experiments ON ml_candidates.experiment_id = ml_experiments.id
+ ) AS temp
+ WHERE ml_candidates.id = temp.id
+ SQL
+
+ execute(sql)
+ end
+
+ def down; end
+end
diff --git a/db/post_migrate/20230321170823_backfill_ml_candidates_internal_id.rb b/db/post_migrate/20230321170823_backfill_ml_candidates_internal_id.rb
new file mode 100644
index 00000000000..b66f846bddb
--- /dev/null
+++ b/db/post_migrate/20230321170823_backfill_ml_candidates_internal_id.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class BackfillMlCandidatesInternalId < Gitlab::Database::Migration[2.1]
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ sql = <<-SQL
+ UPDATE ml_candidates
+ SET internal_id = temp.internal_id_num
+ FROM (
+ SELECT id, ROW_NUMBER() OVER (PARTITION BY project_id ORDER BY internal_id, id ASC) AS internal_id_num
+ FROM ml_candidates
+ ) AS temp
+ WHERE ml_candidates.id = temp.id
+ SQL
+
+ execute(sql)
+ end
+
+ def down; end
+end
diff --git a/db/post_migrate/20230322011220_ensure_snippet_user_mentions_bigint_backfill_is_finished_for_gitlab_dot_com.rb b/db/post_migrate/20230322011220_ensure_snippet_user_mentions_bigint_backfill_is_finished_for_gitlab_dot_com.rb
new file mode 100644
index 00000000000..c4a936777d6
--- /dev/null
+++ b/db/post_migrate/20230322011220_ensure_snippet_user_mentions_bigint_backfill_is_finished_for_gitlab_dot_com.rb
@@ -0,0 +1,29 @@
+# frozen_string_literal: true
+
+class EnsureSnippetUserMentionsBigintBackfillIsFinishedForGitlabDotCom < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+ disable_ddl_transaction!
+
+ def up
+ return unless should_run?
+
+ ensure_batched_background_migration_is_finished(
+ job_class_name: 'CopyColumnUsingBackgroundMigrationJob',
+ table_name: 'snippet_user_mentions',
+ column_name: 'id',
+ job_arguments: [['note_id'], ['note_id_convert_to_bigint']]
+ )
+ end
+
+ def down
+ # no-op
+ end
+
+ private
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/post_migrate/20230322012209_swap_snippet_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb b/db/post_migrate/20230322012209_swap_snippet_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb
new file mode 100644
index 00000000000..3a79adb7488
--- /dev/null
+++ b/db/post_migrate/20230322012209_swap_snippet_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb
@@ -0,0 +1,74 @@
+# frozen_string_literal: true
+
+class SwapSnippetUserMentionsNoteIdToBigintForGitlabDotCom < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ disable_ddl_transaction!
+
+ TABLE_NAME = 'snippet_user_mentions'
+
+ def up
+ return unless should_run?
+
+ swap
+ end
+
+ def down
+ return unless should_run?
+
+ swap
+ end
+
+ def swap
+ # This will replace the existing index_snippet_user_mentions_on_note_id
+ add_concurrent_index TABLE_NAME, :note_id_convert_to_bigint, unique: true,
+ name: 'index_snippet_user_mentions_on_note_id_convert_to_bigint',
+ where: 'note_id_convert_to_bigint IS NOT NULL'
+
+ # This will replace the existing snippet_user_mentions_on_snippet_id_and_note_id_index
+ add_concurrent_index TABLE_NAME, [:snippet_id, :note_id_convert_to_bigint], unique: true,
+ name: 'tmp_snippet_user_mentions_on_snippet_id_and_note_id_index'
+
+ # This will replace the existing snippet_user_mentions_on_snippet_id_index
+ add_concurrent_index TABLE_NAME, :snippet_id, unique: true,
+ name: 'tmp_snippet_user_mentions_on_snippet_id_index',
+ where: 'note_id_convert_to_bigint IS NULL'
+
+ # This will replace the existing fk_rails_4d3f96b2cb
+ add_concurrent_foreign_key TABLE_NAME, :notes, column: :note_id_convert_to_bigint,
+ name: 'fk_snippet_user_mentions_note_id_convert_to_bigint',
+ on_delete: :cascade
+
+ with_lock_retries(raise_on_exhaustion: true) do
+ execute "LOCK TABLE notes, #{TABLE_NAME} IN ACCESS EXCLUSIVE MODE"
+
+ execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN note_id TO note_id_tmp"
+ execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN note_id_convert_to_bigint TO note_id"
+ execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN note_id_tmp TO note_id_convert_to_bigint"
+
+ function_name = Gitlab::Database::UnidirectionalCopyTrigger
+ .on_table(TABLE_NAME, connection: connection)
+ .name(:note_id, :note_id_convert_to_bigint)
+ execute "ALTER FUNCTION #{quote_table_name(function_name)} RESET ALL"
+
+ execute 'DROP INDEX IF EXISTS index_snippet_user_mentions_on_note_id'
+ rename_index TABLE_NAME, 'index_snippet_user_mentions_on_note_id_convert_to_bigint',
+ 'index_snippet_user_mentions_on_note_id'
+
+ execute 'DROP INDEX IF EXISTS snippet_user_mentions_on_snippet_id_and_note_id_index'
+ rename_index TABLE_NAME, 'tmp_snippet_user_mentions_on_snippet_id_and_note_id_index',
+ 'snippet_user_mentions_on_snippet_id_and_note_id_index'
+
+ execute 'DROP INDEX IF EXISTS snippet_user_mentions_on_snippet_id_index'
+ rename_index TABLE_NAME, 'tmp_snippet_user_mentions_on_snippet_id_index',
+ 'snippet_user_mentions_on_snippet_id_index'
+
+ execute "ALTER TABLE #{TABLE_NAME} DROP CONSTRAINT IF EXISTS fk_rails_4d3f96b2cb"
+ rename_constraint(TABLE_NAME, 'fk_snippet_user_mentions_note_id_convert_to_bigint', 'fk_rails_4d3f96b2cb')
+ end
+ end
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/post_migrate/20230322023442_ensure_note_diff_files_bigint_backfill_is_finished_for_gitlab_dot_com.rb b/db/post_migrate/20230322023442_ensure_note_diff_files_bigint_backfill_is_finished_for_gitlab_dot_com.rb
new file mode 100644
index 00000000000..40b4967b306
--- /dev/null
+++ b/db/post_migrate/20230322023442_ensure_note_diff_files_bigint_backfill_is_finished_for_gitlab_dot_com.rb
@@ -0,0 +1,29 @@
+# frozen_string_literal: true
+
+class EnsureNoteDiffFilesBigintBackfillIsFinishedForGitlabDotCom < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+ disable_ddl_transaction!
+
+ def up
+ return unless should_run?
+
+ ensure_batched_background_migration_is_finished(
+ job_class_name: 'CopyColumnUsingBackgroundMigrationJob',
+ table_name: 'note_diff_files',
+ column_name: 'id',
+ job_arguments: [['diff_note_id'], ['diff_note_id_convert_to_bigint']]
+ )
+ end
+
+ def down
+ # no-op
+ end
+
+ private
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/post_migrate/20230322085041_remove_user_namespace_records_from_vsa_aggregation.rb b/db/post_migrate/20230322085041_remove_user_namespace_records_from_vsa_aggregation.rb
new file mode 100644
index 00000000000..6fc23c742b9
--- /dev/null
+++ b/db/post_migrate/20230322085041_remove_user_namespace_records_from_vsa_aggregation.rb
@@ -0,0 +1,26 @@
+# frozen_string_literal: true
+
+class RemoveUserNamespaceRecordsFromVsaAggregation < Gitlab::Database::Migration[2.1]
+ BATCH_SIZE = 100
+
+ disable_ddl_transaction!
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ aggregations_model = define_batchable_model('analytics_cycle_analytics_aggregations')
+ namespaces_model = define_batchable_model('namespaces')
+
+ aggregations_model.each_batch(of: BATCH_SIZE) do |relation|
+ inner_query = namespaces_model
+ .where(type: 'Group')
+ .where(aggregations_model.arel_table[:group_id].eq(namespaces_model.arel_table[:id]))
+
+ relation.where('NOT EXISTS (?)', inner_query).delete_all
+ end
+ end
+
+ def down
+ # noop
+ end
+end
diff --git a/db/post_migrate/20230322085852_validate_partitioning_constraint_on_ci_builds.rb b/db/post_migrate/20230322085852_validate_partitioning_constraint_on_ci_builds.rb
new file mode 100644
index 00000000000..01612c82be5
--- /dev/null
+++ b/db/post_migrate/20230322085852_validate_partitioning_constraint_on_ci_builds.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+class ValidatePartitioningConstraintOnCiBuilds < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ validate_check_constraint :ci_builds, :partitioning_constraint
+ end
+
+ # No-op
+ def down; end
+end
diff --git a/db/post_migrate/20230322151635_cleanup_bigint_conversion_for_merge_request_metrics.rb b/db/post_migrate/20230322151635_cleanup_bigint_conversion_for_merge_request_metrics.rb
new file mode 100644
index 00000000000..d3ff224dbd7
--- /dev/null
+++ b/db/post_migrate/20230322151635_cleanup_bigint_conversion_for_merge_request_metrics.rb
@@ -0,0 +1,29 @@
+# frozen_string_literal: true
+
+class CleanupBigintConversionForMergeRequestMetrics < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ disable_ddl_transaction!
+
+ TABLE = :merge_request_metrics
+
+ def up
+ return unless should_run?
+
+ # rubocop:disable Migration/WithLockRetriesDisallowedMethod
+ with_lock_retries do
+ cleanup_conversion_of_integer_to_bigint(TABLE, :id)
+ end
+ # rubocop:enable Migration/WithLockRetriesDisallowedMethod
+ end
+
+ def down
+ return unless should_run?
+
+ restore_conversion_of_integer_to_bigint(TABLE, :id)
+ end
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/post_migrate/20230322203927_change_user_type_default.rb b/db/post_migrate/20230322203927_change_user_type_default.rb
new file mode 100644
index 00000000000..792e9717c9f
--- /dev/null
+++ b/db/post_migrate/20230322203927_change_user_type_default.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class ChangeUserTypeDefault < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ change_column_default :users, :user_type, 0
+ end
+
+ def down
+ change_column_default :users, :user_type, nil
+ end
+end
diff --git a/db/post_migrate/20230323005730_add_unique_index_diff_note_id_convert_to_bigint_for_gitlab_com.rb b/db/post_migrate/20230323005730_add_unique_index_diff_note_id_convert_to_bigint_for_gitlab_com.rb
new file mode 100644
index 00000000000..2550b5b07e9
--- /dev/null
+++ b/db/post_migrate/20230323005730_add_unique_index_diff_note_id_convert_to_bigint_for_gitlab_com.rb
@@ -0,0 +1,30 @@
+# frozen_string_literal: true
+
+class AddUniqueIndexDiffNoteIdConvertToBigintForGitlabCom < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ disable_ddl_transaction!
+
+ TABLE_NAME = :note_diff_files
+ INDEX_NAME = :index_note_diff_files_on_diff_note_id_convert_to_bigint
+
+ def up
+ return unless should_run?
+
+ # This will replace the existing index_note_diff_files_on_diff_note_id
+ add_concurrent_index TABLE_NAME, :diff_note_id_convert_to_bigint, unique: true,
+ name: INDEX_NAME
+ end
+
+ def down
+ return unless should_run?
+
+ remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME)
+ end
+
+ private
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/post_migrate/20230323010111_add_fk_on_diff_note_id_convert_to_bigint_for_gitlab_com.rb b/db/post_migrate/20230323010111_add_fk_on_diff_note_id_convert_to_bigint_for_gitlab_com.rb
new file mode 100644
index 00000000000..d2c833fd8d6
--- /dev/null
+++ b/db/post_migrate/20230323010111_add_fk_on_diff_note_id_convert_to_bigint_for_gitlab_com.rb
@@ -0,0 +1,43 @@
+# frozen_string_literal: true
+
+class AddFkOnDiffNoteIdConvertToBigintForGitlabCom < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ disable_ddl_transaction!
+
+ SOURCE_TABLE_NAME = :note_diff_files
+ TARGET_TABLE_NAME = :notes
+ FK_NAME = :fk_note_diff_files_diff_note_id_convert_to_bigint
+
+ def up
+ return unless should_run?
+
+ # This will replace the existing fk_rails_3d66047aeb
+ # when we swap the integer and bigint columns
+ add_concurrent_foreign_key SOURCE_TABLE_NAME, TARGET_TABLE_NAME,
+ column: :diff_note_id_convert_to_bigint,
+ name: FK_NAME,
+ on_delete: :cascade,
+ reverse_lock_order: true,
+ validate: false
+ end
+
+ def down
+ return unless should_run?
+
+ with_lock_retries do
+ remove_foreign_key_if_exists(
+ SOURCE_TABLE_NAME,
+ TARGET_TABLE_NAME,
+ name: FK_NAME,
+ reverse_lock_order: true
+ )
+ end
+ end
+
+ private
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/post_migrate/20230323013251_async_validate_fk_note_diff_files_diff_note_id_convert_to_bigint_for_gitlab_com.rb b/db/post_migrate/20230323013251_async_validate_fk_note_diff_files_diff_note_id_convert_to_bigint_for_gitlab_com.rb
new file mode 100644
index 00000000000..1e65fae223a
--- /dev/null
+++ b/db/post_migrate/20230323013251_async_validate_fk_note_diff_files_diff_note_id_convert_to_bigint_for_gitlab_com.rb
@@ -0,0 +1,27 @@
+# frozen_string_literal: true
+
+class AsyncValidateFkNoteDiffFilesDiffNoteIdConvertToBigintForGitlabCom < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ TABLE_NAME = :note_diff_files
+ COLUMN = :diff_note_id_convert_to_bigint
+ FK_NAME = :fk_note_diff_files_diff_note_id_convert_to_bigint
+
+ def up
+ return unless should_run?
+
+ prepare_async_foreign_key_validation TABLE_NAME, COLUMN, name: FK_NAME
+ end
+
+ def down
+ return unless should_run?
+
+ unprepare_async_foreign_key_validation TABLE_NAME, COLUMN, name: FK_NAME
+ end
+
+ private
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/post_migrate/20230323131521_remove_machine_id_from_builds_metadata.rb b/db/post_migrate/20230323131521_remove_machine_id_from_builds_metadata.rb
new file mode 100644
index 00000000000..f034bc21847
--- /dev/null
+++ b/db/post_migrate/20230323131521_remove_machine_id_from_builds_metadata.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: true
+
+class RemoveMachineIdFromBuildsMetadata < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::PartitioningMigrationHelpers
+
+ disable_ddl_transaction!
+
+ INDEX_NAME = 'p_ci_builds_metadata_on_runner_machine_id_idx'
+
+ def up
+ with_lock_retries do
+ remove_column :p_ci_builds_metadata, :runner_machine_id, if_exists: true
+ end
+ end
+
+ def down
+ add_column :p_ci_builds_metadata, :runner_machine_id, :bigint, if_not_exists: true # rubocop: disable Migration/SchemaAdditionMethodsNoPost
+
+ add_concurrent_partitioned_index :p_ci_builds_metadata, :runner_machine_id, name: INDEX_NAME,
+ where: 'runner_machine_id IS NOT NULL'
+ end
+end
diff --git a/db/post_migrate/20230323153433_fix_application_setting_push_rule_id_fk.rb b/db/post_migrate/20230323153433_fix_application_setting_push_rule_id_fk.rb
new file mode 100644
index 00000000000..235959bfa0c
--- /dev/null
+++ b/db/post_migrate/20230323153433_fix_application_setting_push_rule_id_fk.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+class FixApplicationSettingPushRuleIdFk < Gitlab::Database::Migration[2.1]
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ # This migration fixes missing `track_record_deletions(:push_rules)`
+ # where the `application_settings.push_rule_id` would not be reset
+ # after removing push rule.
+
+ def up
+ execute <<~SQL
+ UPDATE application_settings SET push_rule_id=NULL
+ WHERE push_rule_id IS NOT NULL AND NOT EXISTS (
+ SELECT * FROM push_rules WHERE push_rules.id = application_settings.push_rule_id
+ )
+ SQL
+ end
+
+ def down; end
+end
diff --git a/db/post_migrate/20230327125705_add_index_to_vulnerability_finding_signatures_on_signature_sha.rb b/db/post_migrate/20230327125705_add_index_to_vulnerability_finding_signatures_on_signature_sha.rb
new file mode 100644
index 00000000000..1b2f156ce3c
--- /dev/null
+++ b/db/post_migrate/20230327125705_add_index_to_vulnerability_finding_signatures_on_signature_sha.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class AddIndexToVulnerabilityFindingSignaturesOnSignatureSha < Gitlab::Database::Migration[2.1]
+ INDEX_NAME = 'index_vulnerability_finding_signatures_on_signature_sha'
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index :vulnerability_finding_signatures, :signature_sha, name: INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_index_by_name :vulnerability_finding_signatures, name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20230327144152_remove_ci_builds_partition_id_default_v2.rb b/db/post_migrate/20230327144152_remove_ci_builds_partition_id_default_v2.rb
new file mode 100644
index 00000000000..188f597805f
--- /dev/null
+++ b/db/post_migrate/20230327144152_remove_ci_builds_partition_id_default_v2.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class RemoveCiBuildsPartitionIdDefaultV2 < Gitlab::Database::Migration[2.1]
+ enable_lock_retries!
+
+ def up
+ change_column_default :ci_builds, :partition_id, from: 100, to: nil
+ end
+
+ def down
+ change_column_default :ci_builds, :partition_id, from: nil, to: 100
+ end
+end
diff --git a/db/post_migrate/20230328023554_backfill_award_emoji_awardable_id_for_bigint_conversion.rb b/db/post_migrate/20230328023554_backfill_award_emoji_awardable_id_for_bigint_conversion.rb
new file mode 100644
index 00000000000..c083b0a8e4c
--- /dev/null
+++ b/db/post_migrate/20230328023554_backfill_award_emoji_awardable_id_for_bigint_conversion.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class BackfillAwardEmojiAwardableIdForBigintConversion < Gitlab::Database::Migration[2.1]
+ TABLE = :award_emoji
+ COLUMNS = %i[awardable_id]
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS)
+ end
+
+ def down
+ revert_backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS)
+ end
+end
diff --git a/db/post_migrate/20230328031838_backfill_events_target_id_for_bigint_conversion.rb b/db/post_migrate/20230328031838_backfill_events_target_id_for_bigint_conversion.rb
new file mode 100644
index 00000000000..711eb1d2e67
--- /dev/null
+++ b/db/post_migrate/20230328031838_backfill_events_target_id_for_bigint_conversion.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class BackfillEventsTargetIdForBigintConversion < Gitlab::Database::Migration[2.1]
+ TABLE = :events
+ COLUMNS = %i[target_id]
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS, batch_size: 100_000, sub_batch_size: 500)
+ end
+
+ def down
+ revert_backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS)
+ end
+end
diff --git a/db/post_migrate/20230328100534_truncate_error_tracking_tables.rb b/db/post_migrate/20230328100534_truncate_error_tracking_tables.rb
new file mode 100644
index 00000000000..3b263303795
--- /dev/null
+++ b/db/post_migrate/20230328100534_truncate_error_tracking_tables.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+class TruncateErrorTrackingTables < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ # Only truncate tables on Gitlab.com environments.
+ # TRUNCATE is a DDL statement (it drops the table and re-creates it), so we want to run the
+ # migration in DDL mode, but we also don't want to execute it against all schemas because
+ # it's considered a write operation. So, we'll manually check and skip the migration if
+ # it's on not `:gitlab_main`.
+ return unless Gitlab.com? && Gitlab::Database.gitlab_schemas_for_connection(connection).include?(:gitlab_main)
+
+ execute('TRUNCATE table error_tracking_errors CASCADE')
+ end
+
+ def down
+ # noop
+ end
+end
diff --git a/db/post_migrate/20230328151756_prepare_async_index_for_security_scans_on_pipeline_id_and_scan_type.rb b/db/post_migrate/20230328151756_prepare_async_index_for_security_scans_on_pipeline_id_and_scan_type.rb
new file mode 100644
index 00000000000..d8d3360221c
--- /dev/null
+++ b/db/post_migrate/20230328151756_prepare_async_index_for_security_scans_on_pipeline_id_and_scan_type.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class PrepareAsyncIndexForSecurityScansOnPipelineIdAndScanType < Gitlab::Database::Migration[2.1]
+ INDEX_NAME = 'index_security_scans_on_pipeline_id_and_scan_type'
+
+ disable_ddl_transaction!
+
+ # TODO: Index to be created synchronously in https://gitlab.com/gitlab-org/gitlab/-/issues/402978
+ def up
+ prepare_async_index :security_scans, [:pipeline_id, :scan_type], name: INDEX_NAME
+ end
+
+ def down
+ unprepare_async_index :security_scans, [:pipeline_id, :scan_type], name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20230328184031_swap_sent_notifications_id_columns.rb b/db/post_migrate/20230328184031_swap_sent_notifications_id_columns.rb
new file mode 100644
index 00000000000..a2a0751c38a
--- /dev/null
+++ b/db/post_migrate/20230328184031_swap_sent_notifications_id_columns.rb
@@ -0,0 +1,59 @@
+# 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
+
+ disable_ddl_transaction!
+
+ TABLE_NAME = :sent_notifications
+ COLUMN_NAME = :id_convert_to_bigint
+ INDEX_NAME = :index_sent_notifications_on_id_convert_to_bigint
+
+ def up
+ return unless should_run?
+
+ swap
+ end
+
+ def down
+ return unless should_run?
+
+ swap
+ end
+
+ def swap
+ add_concurrent_index TABLE_NAME, COLUMN_NAME, unique: true, name: INDEX_NAME
+
+ with_lock_retries(raise_on_exhaustion: true) do
+ execute "LOCK TABLE #{TABLE_NAME} IN ACCESS EXCLUSIVE MODE"
+
+ # Swap Columns
+ temp_name = quote_column_name(:id_tmp)
+ id_name = quote_column_name(:id)
+ id_convert_to_bigint_name = quote_column_name(COLUMN_NAME)
+ execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN #{id_name} TO #{temp_name}"
+ execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN #{id_convert_to_bigint_name} TO #{id_name}"
+ execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN #{temp_name} TO #{id_convert_to_bigint_name}"
+
+ # Reset trigger
+ function_name = Gitlab::Database::UnidirectionalCopyTrigger.on_table(TABLE_NAME, connection: connection)
+ .name(:id, :id_convert_to_bigint)
+ execute "ALTER FUNCTION #{quote_table_name(function_name)} RESET ALL"
+
+ execute "ALTER SEQUENCE #{TABLE_NAME}_id_seq OWNED BY #{TABLE_NAME}.id"
+ change_column_default TABLE_NAME, :id, -> { "nextval('#{TABLE_NAME}_id_seq'::regclass)" }
+ change_column_default TABLE_NAME, :id_convert_to_bigint, 0
+
+ execute "ALTER TABLE #{TABLE_NAME} DROP CONSTRAINT #{TABLE_NAME}_pkey CASCADE"
+ rename_index TABLE_NAME, INDEX_NAME, "#{TABLE_NAME}_pkey"
+ execute "ALTER TABLE #{TABLE_NAME} ADD CONSTRAINT #{TABLE_NAME}_pkey PRIMARY KEY USING INDEX #{TABLE_NAME}_pkey"
+ end
+ end
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/post_migrate/20230329091107_truncate_p_ci_runner_machine_builds.rb b/db/post_migrate/20230329091107_truncate_p_ci_runner_machine_builds.rb
new file mode 100644
index 00000000000..b9efdd8234d
--- /dev/null
+++ b/db/post_migrate/20230329091107_truncate_p_ci_runner_machine_builds.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+class TruncatePCiRunnerMachineBuilds < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ return unless Gitlab::Database.gitlab_schemas_for_connection(connection).include?(:gitlab_ci)
+
+ execute('TRUNCATE TABLE p_ci_runner_machine_builds')
+ end
+
+ # no-op
+ def down; end
+end
diff --git a/db/post_migrate/20230329091300_swap_ci_runner_machine_builds_primary_key_v2.rb b/db/post_migrate/20230329091300_swap_ci_runner_machine_builds_primary_key_v2.rb
new file mode 100644
index 00000000000..ad40ed118b1
--- /dev/null
+++ b/db/post_migrate/20230329091300_swap_ci_runner_machine_builds_primary_key_v2.rb
@@ -0,0 +1,46 @@
+# frozen_string_literal: true
+
+class SwapCiRunnerMachineBuildsPrimaryKeyV2 < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::PartitioningMigrationHelpers
+
+ disable_ddl_transaction!
+
+ TABLE_NAME = :p_ci_runner_machine_builds
+ BUILDS_TABLE = :ci_builds
+
+ def up
+ reorder_primary_key_columns([:build_id, :partition_id])
+ end
+
+ def down
+ reorder_primary_key_columns([:partition_id, :build_id])
+ end
+
+ private
+
+ def reorder_primary_key_columns(columns)
+ with_lock_retries(raise_on_exhaustion: true) do
+ connection.execute(<<~SQL)
+ LOCK TABLE #{BUILDS_TABLE}, #{TABLE_NAME} IN ACCESS EXCLUSIVE MODE;
+ SQL
+
+ partitions = Gitlab::Database::PostgresPartitionedTable.each_partition(TABLE_NAME).to_a
+ partitions.each { |partition| drop_table partition.identifier }
+
+ execute <<~SQL
+ ALTER TABLE #{TABLE_NAME}
+ DROP CONSTRAINT p_ci_runner_machine_builds_pkey CASCADE;
+
+ ALTER TABLE #{TABLE_NAME}
+ ADD PRIMARY KEY (#{columns.join(', ')});
+ SQL
+
+ partitions.each do |partition|
+ connection.execute(<<~SQL)
+ CREATE TABLE IF NOT EXISTS #{partition.identifier}
+ PARTITION OF #{partition.parent_identifier} #{partition.condition};
+ SQL
+ end
+ end
+ end
+end
diff --git a/db/post_migrate/20230329100222_drop_software_licenses_temp_index.rb b/db/post_migrate/20230329100222_drop_software_licenses_temp_index.rb
new file mode 100644
index 00000000000..3013de7c31b
--- /dev/null
+++ b/db/post_migrate/20230329100222_drop_software_licenses_temp_index.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class DropSoftwareLicensesTempIndex < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ TABLE_NAME = :software_licenses
+ INDEX_NAME = 'tmp_index_for_software_licenses_spdx_identifier_cleanup'
+
+ def up
+ remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME)
+ end
+
+ def down
+ add_concurrent_index TABLE_NAME, :spdx_identifier, where: 'spdx_identifier IS NULL', name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20230330080731_remove_tmp_index_vuln_occurrences_on_report_type.rb b/db/post_migrate/20230330080731_remove_tmp_index_vuln_occurrences_on_report_type.rb
new file mode 100644
index 00000000000..27e5b370efc
--- /dev/null
+++ b/db/post_migrate/20230330080731_remove_tmp_index_vuln_occurrences_on_report_type.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class RemoveTmpIndexVulnOccurrencesOnReportType < Gitlab::Database::Migration[2.1]
+ def up
+ # no-op
+ # This migration was reverted as it removed a temporary index necessary for a background migration.
+ # The migration file is re-added to ensure that all environments have the same list of migrations.
+ end
+
+ def down
+ # no-op
+ end
+end
diff --git a/db/post_migrate/20230330103104_reschedule_migrate_evidences.rb b/db/post_migrate/20230330103104_reschedule_migrate_evidences.rb
new file mode 100644
index 00000000000..1b59b9a4344
--- /dev/null
+++ b/db/post_migrate/20230330103104_reschedule_migrate_evidences.rb
@@ -0,0 +1,30 @@
+# frozen_string_literal: true
+
+# rubocop:disable BackgroundMigration/MissingDictionaryFile
+
+class RescheduleMigrateEvidences < Gitlab::Database::Migration[2.1]
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ MIGRATION = 'MigrateEvidencesForVulnerabilityFindings'
+ DELAY_INTERVAL = 2.minutes
+ SUB_BATCH_SIZE = 500
+ BATCH_SIZE = 10000
+
+ def up
+ delete_batched_background_migration(MIGRATION, :vulnerability_occurrences, :id, [])
+
+ queue_batched_background_migration(
+ MIGRATION,
+ :vulnerability_occurrences,
+ :id,
+ job_interval: DELAY_INTERVAL,
+ batch_size: BATCH_SIZE,
+ sub_batch_size: SUB_BATCH_SIZE
+ )
+ end
+
+ def down
+ delete_batched_background_migration(MIGRATION, :vulnerability_occurrences, :id, [])
+ end
+end
+# rubocop:enable BackgroundMigration/MissingDictionaryFile
diff --git a/db/post_migrate/20230403023828_swap_note_diff_files_note_id_to_bigint_for_gitlab_dot_com.rb b/db/post_migrate/20230403023828_swap_note_diff_files_note_id_to_bigint_for_gitlab_dot_com.rb
new file mode 100644
index 00000000000..6a453722de9
--- /dev/null
+++ b/db/post_migrate/20230403023828_swap_note_diff_files_note_id_to_bigint_for_gitlab_dot_com.rb
@@ -0,0 +1,68 @@
+# frozen_string_literal: true
+
+class SwapNoteDiffFilesNoteIdToBigintForGitlabDotCom < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ disable_ddl_transaction!
+
+ TABLE_NAME = 'note_diff_files'
+
+ def up
+ return unless should_run?
+
+ swap
+ end
+
+ def down
+ return unless should_run?
+
+ swap
+
+ add_concurrent_index TABLE_NAME, :diff_note_id_convert_to_bigint, unique: true,
+ name: 'index_note_diff_files_on_diff_note_id_convert_to_bigint'
+
+ add_concurrent_foreign_key TABLE_NAME, :notes, column: :diff_note_id_convert_to_bigint,
+ name: 'fk_note_diff_files_diff_note_id_convert_to_bigint',
+ on_delete: :cascade,
+ validate: false
+ end
+
+ def swap
+ # This will replace the existing index_note_diff_files_on_diff_note_id
+ add_concurrent_index TABLE_NAME, :diff_note_id_convert_to_bigint, unique: true,
+ name: 'index_note_diff_files_on_diff_note_id_convert_to_bigint'
+
+ # This will replace the existing fk_rails_3d66047aeb
+ add_concurrent_foreign_key TABLE_NAME, :notes, column: :diff_note_id_convert_to_bigint,
+ name: 'fk_note_diff_files_diff_note_id_convert_to_bigint',
+ on_delete: :cascade
+
+ with_lock_retries(raise_on_exhaustion: true) do
+ execute "LOCK TABLE notes, #{TABLE_NAME} IN ACCESS EXCLUSIVE MODE"
+
+ execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN diff_note_id TO diff_note_id_tmp"
+ execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN diff_note_id_convert_to_bigint TO diff_note_id"
+ execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN diff_note_id_tmp TO diff_note_id_convert_to_bigint"
+
+ function_name = Gitlab::Database::UnidirectionalCopyTrigger
+ .on_table(TABLE_NAME, connection: connection)
+ .name(:diff_note_id, :diff_note_id_convert_to_bigint)
+ execute "ALTER FUNCTION #{quote_table_name(function_name)} RESET ALL"
+
+ # Swap defaults
+ change_column_default TABLE_NAME, :diff_note_id, nil
+ change_column_default TABLE_NAME, :diff_note_id_convert_to_bigint, 0
+
+ execute 'DROP INDEX IF EXISTS index_note_diff_files_on_diff_note_id'
+ rename_index TABLE_NAME, 'index_note_diff_files_on_diff_note_id_convert_to_bigint',
+ 'index_note_diff_files_on_diff_note_id'
+
+ execute "ALTER TABLE #{TABLE_NAME} DROP CONSTRAINT IF EXISTS fk_rails_3d66047aeb"
+ rename_constraint(TABLE_NAME, 'fk_note_diff_files_diff_note_id_convert_to_bigint', 'fk_rails_3d66047aeb')
+ end
+ end
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/post_migrate/20230403041642_ensure_issue_user_mentions_bigint_backfill_is_finished_for_gitlab_dot_com.rb b/db/post_migrate/20230403041642_ensure_issue_user_mentions_bigint_backfill_is_finished_for_gitlab_dot_com.rb
new file mode 100644
index 00000000000..b6f121994b2
--- /dev/null
+++ b/db/post_migrate/20230403041642_ensure_issue_user_mentions_bigint_backfill_is_finished_for_gitlab_dot_com.rb
@@ -0,0 +1,29 @@
+# frozen_string_literal: true
+
+class EnsureIssueUserMentionsBigintBackfillIsFinishedForGitlabDotCom < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+ disable_ddl_transaction!
+
+ def up
+ return unless should_run?
+
+ ensure_batched_background_migration_is_finished(
+ job_class_name: 'CopyColumnUsingBackgroundMigrationJob',
+ table_name: 'issue_user_mentions',
+ column_name: 'id',
+ job_arguments: [['note_id'], ['note_id_convert_to_bigint']]
+ )
+ end
+
+ def down
+ # no-op
+ end
+
+ private
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/post_migrate/20230403041917_swap_issue_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb b/db/post_migrate/20230403041917_swap_issue_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb
new file mode 100644
index 00000000000..fb941e1cb51
--- /dev/null
+++ b/db/post_migrate/20230403041917_swap_issue_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb
@@ -0,0 +1,8 @@
+# frozen_string_literal: true
+
+class SwapIssueUserMentionsNoteIdToBigintForGitlabDotCom < Gitlab::Database::Migration[2.1]
+ # No-op, moved to db/post_migrate/20230413041917_swap_issue_user_mentions_note_id_to_bigint_for_gitlab_dot_com_2.rb
+ def up; end
+
+ def down; end
+end
diff --git a/db/post_migrate/20230403085957_add_tmp_partial_index_on_vulnerability_report_types2.rb b/db/post_migrate/20230403085957_add_tmp_partial_index_on_vulnerability_report_types2.rb
new file mode 100644
index 00000000000..e37d197ad6d
--- /dev/null
+++ b/db/post_migrate/20230403085957_add_tmp_partial_index_on_vulnerability_report_types2.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class AddTmpPartialIndexOnVulnerabilityReportTypes2 < Gitlab::Database::Migration[2.1]
+ INDEX_NAME = 'tmp_idx_vulnerability_occurrences_on_id_where_report_type_7_99'
+ CLAUSE = 'report_type IN (7, 99)'
+
+ def up
+ return if index_exists?(:vulnerability_occurrences, :id, name: INDEX_NAME)
+
+ # Temporary index to be removed in 16.1 https://gitlab.com/gitlab-org/gitlab/-/issues/404408
+ prepare_async_index :vulnerability_occurrences, :id, where: CLAUSE, name: INDEX_NAME
+ end
+
+ def down
+ unprepare_async_index :vulnerability_occurrences, :id, name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20230403085958_add_sync_tmp_partial_index_on_vulnerability_report_types2.rb b/db/post_migrate/20230403085958_add_sync_tmp_partial_index_on_vulnerability_report_types2.rb
new file mode 100644
index 00000000000..a2905fa2635
--- /dev/null
+++ b/db/post_migrate/20230403085958_add_sync_tmp_partial_index_on_vulnerability_report_types2.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class AddSyncTmpPartialIndexOnVulnerabilityReportTypes2 < Gitlab::Database::Migration[2.1]
+ INDEX_NAME = 'tmp_idx_vulnerability_occurrences_on_id_where_report_type_7_99'
+
+ disable_ddl_transaction!
+
+ def up
+ # Temporary index to be removed in 16.1 https://gitlab.com/gitlab-org/gitlab/-/issues/404408
+ add_concurrent_index :vulnerability_occurrences, :id, where: 'report_type IN (7, 99)', name: INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_index_by_name :vulnerability_occurrences, INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20230403190527_add_index_to_security_scans_on_scan_type.rb b/db/post_migrate/20230403190527_add_index_to_security_scans_on_scan_type.rb
new file mode 100644
index 00000000000..b8a377e833c
--- /dev/null
+++ b/db/post_migrate/20230403190527_add_index_to_security_scans_on_scan_type.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexToSecurityScansOnScanType < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ TABLE_NAME = :security_scans
+ INDEX_NAME = 'index_for_security_scans_scan_type'
+ SUCCEEDED = 1
+
+ def up
+ add_concurrent_index TABLE_NAME, [:scan_type, :project_id, :pipeline_id], where: "status = #{SUCCEEDED}",
+ name: INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20230403221928_resync_scan_result_policies_for_namespaces.rb b/db/post_migrate/20230403221928_resync_scan_result_policies_for_namespaces.rb
new file mode 100644
index 00000000000..34ab8ea3873
--- /dev/null
+++ b/db/post_migrate/20230403221928_resync_scan_result_policies_for_namespaces.rb
@@ -0,0 +1,77 @@
+# frozen_string_literal: true
+
+class ResyncScanResultPoliciesForNamespaces < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ BATCH_SIZE = 50
+
+ class Group < MigrationRecord
+ self.inheritance_column = :_type_disabled
+ self.table_name = 'namespaces'
+
+ def self.as_ids
+ select(Arel.sql('namespaces.traversal_ids[array_length(namespaces.traversal_ids, 1)]').as('id'))
+ end
+
+ def self_and_descendant_ids
+ self.class.where("traversal_ids @> ('{?}')", id).as_ids
+ end
+ end
+
+ class Project < MigrationRecord
+ self.table_name = 'projects'
+ end
+
+ class OrchestrationPolicyConfiguration < MigrationRecord
+ include EachBatch
+ self.table_name = 'security_orchestration_policy_configurations'
+ end
+
+ def up
+ return unless Gitlab.ee?
+ return unless process_scan_result_policy_worker
+
+ OrchestrationPolicyConfiguration
+ .where.not(namespace_id: nil)
+ .each_batch(column: :namespace_id, of: BATCH_SIZE) do |policy_configurations|
+ policy_configurations.each do |policy_configuration|
+ for_each_project(policy_configuration) do |project|
+ process_scan_result_policy_worker.perform_async(project.id, policy_configuration.id)
+ end
+ end
+ end
+ end
+
+ def down
+ # no-op
+ end
+
+ private
+
+ def for_each_project(policy_configuration)
+ scope = Project.order(:id)
+ array_scope = Group.find(policy_configuration.namespace_id).self_and_descendant_ids
+ array_mapping_scope = ->(id_expression) do
+ Project.where(Project.arel_table[:namespace_id].eq(id_expression)).select(:id)
+ end
+
+ query_builder = Gitlab::Pagination::Keyset::InOperatorOptimization::QueryBuilder.new(
+ scope: scope,
+ array_scope: array_scope,
+ array_mapping_scope: array_mapping_scope
+ )
+
+ query_builder.execute.limit(BATCH_SIZE).each do |project|
+ yield(project) if block_given?
+ end
+ end
+
+ def process_scan_result_policy_worker
+ unless defined?(@process_scan_result_policy_worker)
+ @process_scan_result_policy_worker = 'Security::ProcessScanResultPolicyWorker'.safe_constantize
+ end
+
+ @process_scan_result_policy_worker
+ end
+end
diff --git a/db/post_migrate/20230403231455_add_unique_index_issue_user_mentions_note_id_convert_to_bigint_for_gitlab_com.rb b/db/post_migrate/20230403231455_add_unique_index_issue_user_mentions_note_id_convert_to_bigint_for_gitlab_com.rb
new file mode 100644
index 00000000000..d02a21f472e
--- /dev/null
+++ b/db/post_migrate/20230403231455_add_unique_index_issue_user_mentions_note_id_convert_to_bigint_for_gitlab_com.rb
@@ -0,0 +1,31 @@
+# frozen_string_literal: true
+
+class AddUniqueIndexIssueUserMentionsNoteIdConvertToBigintForGitlabCom < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ disable_ddl_transaction!
+
+ TABLE_NAME = :issue_user_mentions
+ INDEX_NAME = :index_issue_user_mentions_on_note_id_convert_to_bigint
+
+ def up
+ return unless should_run?
+
+ # This will replace the existing index_issue_user_mentions_on_note_id
+ add_concurrent_index TABLE_NAME, :note_id_convert_to_bigint, unique: true,
+ name: INDEX_NAME,
+ where: 'note_id_convert_to_bigint IS NOT NULL'
+ end
+
+ def down
+ return unless should_run?
+
+ remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME)
+ end
+
+ private
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/post_migrate/20230403231841_add_fk_on_issue_user_mentions_note_id_convert_to_bigint_for_gitlab_com.rb b/db/post_migrate/20230403231841_add_fk_on_issue_user_mentions_note_id_convert_to_bigint_for_gitlab_com.rb
new file mode 100644
index 00000000000..e2b5c6fcbe3
--- /dev/null
+++ b/db/post_migrate/20230403231841_add_fk_on_issue_user_mentions_note_id_convert_to_bigint_for_gitlab_com.rb
@@ -0,0 +1,43 @@
+# frozen_string_literal: true
+
+class AddFkOnIssueUserMentionsNoteIdConvertToBigintForGitlabCom < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ disable_ddl_transaction!
+
+ SOURCE_TABLE_NAME = :issue_user_mentions
+ TARGET_TABLE_NAME = :notes
+ FK_NAME = :fk_issue_user_mentions_note_id_convert_to_bigint
+
+ def up
+ return unless should_run?
+
+ # This will replace the existing fk_rails_3861d9fefa
+ # when we swap the integer and bigint columns
+ add_concurrent_foreign_key SOURCE_TABLE_NAME, TARGET_TABLE_NAME,
+ column: :note_id_convert_to_bigint,
+ name: FK_NAME,
+ on_delete: :cascade,
+ reverse_lock_order: true,
+ validate: false
+ end
+
+ def down
+ return unless should_run?
+
+ with_lock_retries do
+ remove_foreign_key_if_exists(
+ SOURCE_TABLE_NAME,
+ TARGET_TABLE_NAME,
+ name: FK_NAME,
+ reverse_lock_order: true
+ )
+ end
+ end
+
+ private
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/post_migrate/20230403232121_async_validate_fk_issue_user_mentions_note_id_convert_to_bigint_for_gitlab_com.rb b/db/post_migrate/20230403232121_async_validate_fk_issue_user_mentions_note_id_convert_to_bigint_for_gitlab_com.rb
new file mode 100644
index 00000000000..dd01689213c
--- /dev/null
+++ b/db/post_migrate/20230403232121_async_validate_fk_issue_user_mentions_note_id_convert_to_bigint_for_gitlab_com.rb
@@ -0,0 +1,27 @@
+# frozen_string_literal: true
+
+class AsyncValidateFkIssueUserMentionsNoteIdConvertToBigintForGitlabCom < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ TABLE_NAME = :issue_user_mentions
+ COLUMN = :note_id_convert_to_bigint
+ FK_NAME = :fk_issue_user_mentions_note_id_convert_to_bigint
+
+ def up
+ return unless should_run?
+
+ prepare_async_foreign_key_validation TABLE_NAME, COLUMN, name: FK_NAME
+ end
+
+ def down
+ return unless should_run?
+
+ unprepare_async_foreign_key_validation TABLE_NAME, COLUMN, name: FK_NAME
+ end
+
+ private
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/post_migrate/20230404023648_ensure_suggestions_note_id_bigint_backfill_is_finished_for_gitlab_dot_com.rb b/db/post_migrate/20230404023648_ensure_suggestions_note_id_bigint_backfill_is_finished_for_gitlab_dot_com.rb
new file mode 100644
index 00000000000..adf33df6fc2
--- /dev/null
+++ b/db/post_migrate/20230404023648_ensure_suggestions_note_id_bigint_backfill_is_finished_for_gitlab_dot_com.rb
@@ -0,0 +1,29 @@
+# frozen_string_literal: true
+
+class EnsureSuggestionsNoteIdBigintBackfillIsFinishedForGitlabDotCom < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+ disable_ddl_transaction!
+
+ def up
+ return unless should_run?
+
+ ensure_batched_background_migration_is_finished(
+ job_class_name: 'CopyColumnUsingBackgroundMigrationJob',
+ table_name: 'suggestions',
+ column_name: 'id',
+ job_arguments: [['note_id'], ['note_id_convert_to_bigint']]
+ )
+ end
+
+ def down
+ # no-op
+ end
+
+ private
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/post_migrate/20230404023915_swap_suggestions_note_id_to_bigint_for_gitlab_dot_com.rb b/db/post_migrate/20230404023915_swap_suggestions_note_id_to_bigint_for_gitlab_dot_com.rb
new file mode 100644
index 00000000000..fb5c379c015
--- /dev/null
+++ b/db/post_migrate/20230404023915_swap_suggestions_note_id_to_bigint_for_gitlab_dot_com.rb
@@ -0,0 +1,60 @@
+# frozen_string_literal: true
+
+class SwapSuggestionsNoteIdToBigintForGitlabDotCom < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ disable_ddl_transaction!
+
+ TABLE_NAME = 'suggestions'
+
+ def up
+ return unless should_run?
+
+ swap
+ end
+
+ def down
+ return unless should_run?
+
+ swap
+ end
+
+ def swap
+ # This will replace the existing index_suggestions_on_note_id_and_relative_order
+ add_concurrent_index TABLE_NAME, [:note_id_convert_to_bigint, :relative_order], unique: true,
+ name: 'index_suggestions_on_note_id_convert_to_bigint_relative_order'
+
+ # This will replace the existing fk_rails_33b03a535c
+ add_concurrent_foreign_key TABLE_NAME, :notes, column: :note_id_convert_to_bigint,
+ name: 'fk_suggestions_note_id_convert_to_bigint',
+ on_delete: :cascade
+
+ with_lock_retries(raise_on_exhaustion: true) do
+ execute "LOCK TABLE notes, #{TABLE_NAME} IN ACCESS EXCLUSIVE MODE"
+
+ execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN note_id TO note_id_tmp"
+ execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN note_id_convert_to_bigint TO note_id"
+ execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN note_id_tmp TO note_id_convert_to_bigint"
+
+ function_name = Gitlab::Database::UnidirectionalCopyTrigger
+ .on_table(TABLE_NAME, connection: connection)
+ .name(:note_id, :note_id_convert_to_bigint)
+ execute "ALTER FUNCTION #{quote_table_name(function_name)} RESET ALL"
+
+ # Swap defaults
+ change_column_default TABLE_NAME, :note_id, nil
+ change_column_default TABLE_NAME, :note_id_convert_to_bigint, 0
+
+ execute 'DROP INDEX IF EXISTS index_suggestions_on_note_id_and_relative_order'
+ rename_index TABLE_NAME, 'index_suggestions_on_note_id_convert_to_bigint_relative_order',
+ 'index_suggestions_on_note_id_and_relative_order'
+
+ execute "ALTER TABLE #{TABLE_NAME} DROP CONSTRAINT IF EXISTS fk_rails_33b03a535c"
+ rename_constraint(TABLE_NAME, 'fk_suggestions_note_id_convert_to_bigint', 'fk_rails_33b03a535c')
+ end
+ end
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/post_migrate/20230404030757_ensure_epic_user_mentions_bigint_backfill_is_finished_for_gitlab_dot_com.rb b/db/post_migrate/20230404030757_ensure_epic_user_mentions_bigint_backfill_is_finished_for_gitlab_dot_com.rb
new file mode 100644
index 00000000000..9b90d144042
--- /dev/null
+++ b/db/post_migrate/20230404030757_ensure_epic_user_mentions_bigint_backfill_is_finished_for_gitlab_dot_com.rb
@@ -0,0 +1,29 @@
+# frozen_string_literal: true
+
+class EnsureEpicUserMentionsBigintBackfillIsFinishedForGitlabDotCom < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+ disable_ddl_transaction!
+
+ def up
+ return unless should_run?
+
+ ensure_batched_background_migration_is_finished(
+ job_class_name: 'CopyColumnUsingBackgroundMigrationJob',
+ table_name: 'epic_user_mentions',
+ column_name: 'id',
+ job_arguments: [['note_id'], ['note_id_convert_to_bigint']]
+ )
+ end
+
+ def down
+ # no-op
+ end
+
+ private
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/post_migrate/20230404031041_swap_epic_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb b/db/post_migrate/20230404031041_swap_epic_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb
new file mode 100644
index 00000000000..3d0478c15dd
--- /dev/null
+++ b/db/post_migrate/20230404031041_swap_epic_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb
@@ -0,0 +1,74 @@
+# frozen_string_literal: true
+
+class SwapEpicUserMentionsNoteIdToBigintForGitlabDotCom < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ disable_ddl_transaction!
+
+ TABLE_NAME = 'epic_user_mentions'
+
+ def up
+ return unless should_run?
+
+ swap
+ end
+
+ def down
+ return unless should_run?
+
+ swap
+ end
+
+ def swap
+ # This will replace the existing epic_user_mentions_on_epic_id_and_note_id_index
+ add_concurrent_index TABLE_NAME, [:epic_id, :note_id_convert_to_bigint], unique: true,
+ name: 'epic_user_mentions_on_epic_id_and_note_id_convert_to_bigint'
+
+ # This will replace the existing epic_user_mentions_on_epic_id_index
+ add_concurrent_index TABLE_NAME, :epic_id, unique: true,
+ name: 'tmp_epic_user_mentions_on_epic_id_index',
+ where: 'note_id_convert_to_bigint IS NULL'
+
+ # This will replace the existing index_epic_user_mentions_on_note_id
+ add_concurrent_index TABLE_NAME, :note_id_convert_to_bigint, unique: true,
+ name: 'index_epic_user_mentions_on_note_id_convert_to_bigint',
+ where: 'note_id_convert_to_bigint IS NOT NULL'
+
+ # This will replace the existing fk_rails_1c65976a49
+ add_concurrent_foreign_key TABLE_NAME, :notes, column: :note_id_convert_to_bigint,
+ name: 'fk_epic_user_mentions_note_id_convert_to_bigint',
+ on_delete: :cascade
+
+ with_lock_retries(raise_on_exhaustion: true) do
+ execute "LOCK TABLE notes, #{TABLE_NAME} IN ACCESS EXCLUSIVE MODE"
+
+ execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN note_id TO note_id_tmp"
+ execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN note_id_convert_to_bigint TO note_id"
+ execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN note_id_tmp TO note_id_convert_to_bigint"
+
+ function_name = Gitlab::Database::UnidirectionalCopyTrigger
+ .on_table(TABLE_NAME, connection: connection)
+ .name(:note_id, :note_id_convert_to_bigint)
+ execute "ALTER FUNCTION #{quote_table_name(function_name)} RESET ALL"
+
+ execute 'DROP INDEX IF EXISTS epic_user_mentions_on_epic_id_and_note_id_index'
+ rename_index TABLE_NAME, 'epic_user_mentions_on_epic_id_and_note_id_convert_to_bigint',
+ 'epic_user_mentions_on_epic_id_and_note_id_index'
+
+ execute 'DROP INDEX IF EXISTS epic_user_mentions_on_epic_id_index'
+ rename_index TABLE_NAME, 'tmp_epic_user_mentions_on_epic_id_index',
+ 'epic_user_mentions_on_epic_id_index'
+
+ execute 'DROP INDEX IF EXISTS index_epic_user_mentions_on_note_id'
+ rename_index TABLE_NAME, 'index_epic_user_mentions_on_note_id_convert_to_bigint',
+ 'index_epic_user_mentions_on_note_id'
+
+ execute "ALTER TABLE #{TABLE_NAME} DROP CONSTRAINT IF EXISTS fk_rails_1c65976a49"
+ rename_constraint(TABLE_NAME, 'fk_epic_user_mentions_note_id_convert_to_bigint', 'fk_rails_1c65976a49')
+ end
+ end
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/post_migrate/20230404044338_drop_async_index_ci_job_artifacts_on_expire_at_for_removal.rb b/db/post_migrate/20230404044338_drop_async_index_ci_job_artifacts_on_expire_at_for_removal.rb
new file mode 100644
index 00000000000..7c3cb65c884
--- /dev/null
+++ b/db/post_migrate/20230404044338_drop_async_index_ci_job_artifacts_on_expire_at_for_removal.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+class DropAsyncIndexCiJobArtifactsOnExpireAtForRemoval < Gitlab::Database::Migration[2.1]
+ INDEX_NAME = 'index_ci_job_artifacts_on_expire_at_for_removal'
+
+ # TODO: Index to be destroyed synchronously in https://gitlab.com/gitlab-org/gitlab/-/issues/393913
+ def up
+ prepare_async_index_removal :ci_job_artifacts, :expire_at, name: INDEX_NAME
+ end
+
+ def down
+ unprepare_async_index :ci_job_artifacts, :expire_at, name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20230404050414_remove_unused_merge_request_jira_indexes.rb b/db/post_migrate/20230404050414_remove_unused_merge_request_jira_indexes.rb
new file mode 100644
index 00000000000..619fd326d7a
--- /dev/null
+++ b/db/post_migrate/20230404050414_remove_unused_merge_request_jira_indexes.rb
@@ -0,0 +1,29 @@
+# frozen_string_literal: true
+
+class RemoveUnusedMergeRequestJiraIndexes < Gitlab::Database::Migration[2.1]
+ TITLE_INDEX = {
+ name: 'index_merge_requests_on_target_project_id_and_iid_jira_title',
+ where: "((title)::text ~ '[A-Z][A-Z_0-9]+-\d+'::text)"
+ }.freeze
+
+ DESCRIPTION_INDEX = {
+ name: 'index_merge_requests_on_target_project_id_iid_jira_description',
+ where: "(description ~ '[A-Z][A-Z_0-9]+-\d+'::text)"
+ }.freeze
+
+ disable_ddl_transaction!
+
+ def up
+ remove_concurrent_index_by_name :merge_requests, name: TITLE_INDEX[:name]
+ remove_concurrent_index_by_name :merge_requests, name: DESCRIPTION_INDEX[:name]
+ end
+
+ def down
+ add_concurrent_index :merge_requests, [:target_project_id, :iid],
+ where: TITLE_INDEX[:where],
+ name: TITLE_INDEX[:name]
+ add_concurrent_index :merge_requests, [:target_project_id, :iid],
+ where: DESCRIPTION_INDEX[:where],
+ name: DESCRIPTION_INDEX[:name]
+ end
+end
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
new file mode 100644
index 00000000000..efa0792c457
--- /dev/null
+++ b/db/post_migrate/20230404061832_drop_sync_index_ci_job_artifacts_on_expire_at_for_removal.rb
@@ -0,0 +1,19 @@
+# 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'
+
+ 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, [:expire_at], where: CONDITIONS, name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20230404132544_prepare_async_index_for_override_uuids_logic.rb b/db/post_migrate/20230404132544_prepare_async_index_for_override_uuids_logic.rb
new file mode 100644
index 00000000000..59c2bdf9470
--- /dev/null
+++ b/db/post_migrate/20230404132544_prepare_async_index_for_override_uuids_logic.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class PrepareAsyncIndexForOverrideUuidsLogic < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ INDEX_NAME = 'index_vulnerability_occurrences_for_override_uuids_logic'
+
+ def up
+ prepare_async_index :vulnerability_occurrences, [:project_id, :report_type, :location_fingerprint], name: INDEX_NAME
+ end
+
+ def down
+ unprepare_async_index_by_name :vulnerability_occurrences, INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20230404194907_remove_mr_mentions_temp_index.rb b/db/post_migrate/20230404194907_remove_mr_mentions_temp_index.rb
new file mode 100644
index 00000000000..49a2b22df0a
--- /dev/null
+++ b/db/post_migrate/20230404194907_remove_mr_mentions_temp_index.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+class RemoveMrMentionsTempIndex < Gitlab::Database::Migration[2.1]
+ INDEX_NAME = 'merge_request_mentions_temp_index'
+
+ # TODO: Index to be destroyed synchronously in https://gitlab.com/gitlab-org/gitlab/-/issues/402497
+ def up
+ prepare_async_index_removal :merge_requests, :id, name: INDEX_NAME
+ end
+
+ def down
+ unprepare_async_index :merge_requests, :id, name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20230404194908_remove_mr_state_id_temp_index.rb b/db/post_migrate/20230404194908_remove_mr_state_id_temp_index.rb
new file mode 100644
index 00000000000..4b469666167
--- /dev/null
+++ b/db/post_migrate/20230404194908_remove_mr_state_id_temp_index.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+class RemoveMrStateIdTempIndex < Gitlab::Database::Migration[2.1]
+ INDEX_NAME = 'merge_requests_state_id_temp_index'
+
+ # TODO: Index to be destroyed synchronously in https://gitlab.com/gitlab-org/gitlab/-/issues/402497
+ def up
+ prepare_async_index_removal :merge_requests, :state_id, name: INDEX_NAME
+ end
+
+ def down
+ unprepare_async_index :merge_requests, :state_id, name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20230405072302_remove_p_ci_builds_metadata_partition_id_default.rb b/db/post_migrate/20230405072302_remove_p_ci_builds_metadata_partition_id_default.rb
new file mode 100644
index 00000000000..303210d85c7
--- /dev/null
+++ b/db/post_migrate/20230405072302_remove_p_ci_builds_metadata_partition_id_default.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class RemovePCiBuildsMetadataPartitionIdDefault < Gitlab::Database::Migration[2.1]
+ enable_lock_retries!
+
+ def up
+ change_column_default :p_ci_builds_metadata, :partition_id, from: 100, to: nil
+ end
+
+ def down
+ change_column_default :p_ci_builds_metadata, :partition_id, from: nil, to: 100
+ end
+end
diff --git a/db/post_migrate/20230405094230_create_index_for_override_uuids_logic_on_vulnerability_occurrences.rb b/db/post_migrate/20230405094230_create_index_for_override_uuids_logic_on_vulnerability_occurrences.rb
new file mode 100644
index 00000000000..fd6620d77fe
--- /dev/null
+++ b/db/post_migrate/20230405094230_create_index_for_override_uuids_logic_on_vulnerability_occurrences.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class CreateIndexForOverrideUuidsLogicOnVulnerabilityOccurrences < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ INDEX_NAME = 'index_vulnerability_occurrences_for_override_uuids_logic'
+
+ def up
+ add_concurrent_index :vulnerability_occurrences,
+ [:project_id, :report_type, :location_fingerprint],
+ name: INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_index_by_name :vulnerability_occurrences, INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20230405132104_remove_saml_provider_and_identities_non_root_group.rb b/db/post_migrate/20230405132104_remove_saml_provider_and_identities_non_root_group.rb
new file mode 100644
index 00000000000..55a017464c2
--- /dev/null
+++ b/db/post_migrate/20230405132104_remove_saml_provider_and_identities_non_root_group.rb
@@ -0,0 +1,34 @@
+# frozen_string_literal: true
+
+class RemoveSamlProviderAndIdentitiesNonRootGroup < Gitlab::Database::Migration[2.1]
+ BATCH_SIZE = 500
+
+ disable_ddl_transaction!
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ each_batch_range('saml_providers', scope: ->(table) { table.all }, of: BATCH_SIZE) do |min, max|
+ execute <<~SQL
+ DELETE FROM identities
+ WHERE identities.saml_provider_id
+ IN
+ (
+ SELECT saml_providers.id FROM saml_providers
+ INNER JOIN namespaces ON namespaces.id=saml_providers.group_id
+ AND namespaces.type='Group' AND namespaces.parent_id IS NOT NULL
+ AND saml_providers.id BETWEEN #{min} AND #{max}
+ );
+
+ DELETE FROM saml_providers
+ USING namespaces
+ WHERE namespaces.id=saml_providers.group_id
+ AND namespaces.type='Group' AND namespaces.parent_id IS NOT NULL
+ AND saml_providers.id BETWEEN #{min} AND #{max};
+ SQL
+ end
+ end
+
+ def down
+ # noop
+ end
+end
diff --git a/db/post_migrate/20230405132855_remove_scim_token_and_scim_identity_non_root_group.rb b/db/post_migrate/20230405132855_remove_scim_token_and_scim_identity_non_root_group.rb
new file mode 100644
index 00000000000..aa149acc5be
--- /dev/null
+++ b/db/post_migrate/20230405132855_remove_scim_token_and_scim_identity_non_root_group.rb
@@ -0,0 +1,34 @@
+# frozen_string_literal: true
+
+class RemoveScimTokenAndScimIdentityNonRootGroup < Gitlab::Database::Migration[2.1]
+ BATCH_SIZE = 500
+
+ disable_ddl_transaction!
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ each_batch_range('scim_oauth_access_tokens', scope: ->(table) { table.all }, of: BATCH_SIZE) do |min, max|
+ execute <<~SQL
+ DELETE FROM scim_identities
+ WHERE scim_identities.group_id
+ IN
+ (
+ SELECT namespaces.id FROM scim_oauth_access_tokens
+ INNER JOIN namespaces ON namespaces.id=scim_oauth_access_tokens.group_id
+ WHERE namespaces.type='Group' AND namespaces.parent_id IS NOT NULL
+ AND scim_oauth_access_tokens.id BETWEEN #{min} AND #{max}
+ );
+
+ DELETE FROM scim_oauth_access_tokens
+ USING namespaces
+ WHERE namespaces.id=scim_oauth_access_tokens.group_id
+ AND namespaces.type='Group' AND namespaces.parent_id IS NOT NULL
+ AND scim_oauth_access_tokens.id BETWEEN #{min} AND #{max};
+ SQL
+ end
+ end
+
+ def down
+ # noop
+ end
+end
diff --git a/db/post_migrate/20230405200858_requeue_backfill_project_wiki_repositories.rb b/db/post_migrate/20230405200858_requeue_backfill_project_wiki_repositories.rb
new file mode 100644
index 00000000000..363a3099064
--- /dev/null
+++ b/db/post_migrate/20230405200858_requeue_backfill_project_wiki_repositories.rb
@@ -0,0 +1,29 @@
+# frozen_string_literal: true
+
+# rubocop:disable BackgroundMigration/MissingDictionaryFile
+class RequeueBackfillProjectWikiRepositories < Gitlab::Database::Migration[2.1]
+ MIGRATION = "BackfillProjectWikiRepositories"
+ 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, :projects, :id, [])
+
+ queue_batched_background_migration(
+ MIGRATION,
+ :projects,
+ :id,
+ job_interval: DELAY_INTERVAL,
+ batch_size: BATCH_SIZE,
+ sub_batch_size: SUB_BATCH_SIZE
+ )
+ end
+
+ def down
+ delete_batched_background_migration(MIGRATION, :projects, :id, [])
+ end
+end
+# rubocop:enable BackgroundMigration/MissingDictionaryFile
diff --git a/db/post_migrate/20230406041555_allow_null_file_md5_to_debian_project_component_files.rb b/db/post_migrate/20230406041555_allow_null_file_md5_to_debian_project_component_files.rb
new file mode 100644
index 00000000000..d03f68e22ab
--- /dev/null
+++ b/db/post_migrate/20230406041555_allow_null_file_md5_to_debian_project_component_files.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+class AllowNullFileMd5ToDebianProjectComponentFiles < Gitlab::Database::Migration[2.1]
+ def up
+ change_column_null :packages_debian_project_component_files, :file_md5, 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/post_migrate/20230406041629_allow_null_file_md5_to_debian_group_component_files.rb b/db/post_migrate/20230406041629_allow_null_file_md5_to_debian_group_component_files.rb
new file mode 100644
index 00000000000..15e8414f0bd
--- /dev/null
+++ b/db/post_migrate/20230406041629_allow_null_file_md5_to_debian_group_component_files.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+class AllowNullFileMd5ToDebianGroupComponentFiles < Gitlab::Database::Migration[2.1]
+ def up
+ change_column_null :packages_debian_group_component_files, :file_md5, 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/post_migrate/20230406093640_requeue_backfill_admin_mode_scope_for_personal_access_tokens.rb b/db/post_migrate/20230406093640_requeue_backfill_admin_mode_scope_for_personal_access_tokens.rb
new file mode 100644
index 00000000000..17ba9edef22
--- /dev/null
+++ b/db/post_migrate/20230406093640_requeue_backfill_admin_mode_scope_for_personal_access_tokens.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+
+class RequeueBackfillAdminModeScopeForPersonalAccessTokens < Gitlab::Database::Migration[2.1]
+ MIGRATION = 'BackfillAdminModeScopeForPersonalAccessTokens'
+ DELAY_INTERVAL = 2.minutes
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ delete_batched_background_migration(MIGRATION, :personal_access_tokens, :id, [])
+
+ queue_batched_background_migration(
+ MIGRATION,
+ :personal_access_tokens,
+ :id,
+ job_interval: DELAY_INTERVAL
+ )
+ end
+
+ def down
+ delete_batched_background_migration(MIGRATION, :personal_access_tokens, :id, [])
+ end
+end
diff --git a/db/post_migrate/20230410111251_async_validate_fk_projects_creator_id.rb b/db/post_migrate/20230410111251_async_validate_fk_projects_creator_id.rb
new file mode 100644
index 00000000000..b1ac2469c78
--- /dev/null
+++ b/db/post_migrate/20230410111251_async_validate_fk_projects_creator_id.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class AsyncValidateFkProjectsCreatorId < Gitlab::Database::Migration[2.1]
+ TABLE_NAME = :projects
+ COLUMN_NAME = :creator_id
+ FK_NAME = :fk_03ec10b0d3
+
+ def up
+ prepare_async_foreign_key_validation TABLE_NAME, COLUMN_NAME, name: FK_NAME
+ end
+
+ def down
+ unprepare_async_foreign_key_validation TABLE_NAME, COLUMN_NAME, name: FK_NAME
+ end
+end
diff --git a/db/post_migrate/20230411153310_cleanup_bigint_conversion_for_sent_notifications.rb b/db/post_migrate/20230411153310_cleanup_bigint_conversion_for_sent_notifications.rb
new file mode 100644
index 00000000000..e5f690a0a5a
--- /dev/null
+++ b/db/post_migrate/20230411153310_cleanup_bigint_conversion_for_sent_notifications.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class CleanupBigintConversionForSentNotifications < Gitlab::Database::Migration[2.1]
+ enable_lock_retries!
+
+ TABLE = :sent_notifications
+ COLUMNS = [:id]
+
+ def up
+ cleanup_conversion_of_integer_to_bigint(TABLE, COLUMNS)
+ end
+
+ def down
+ restore_conversion_of_integer_to_bigint(TABLE, COLUMNS)
+ end
+end
diff --git a/db/post_migrate/20230412013251_ensure_system_note_metadata_bigint_backfill_is_finished_for_gitlab_dot_com.rb b/db/post_migrate/20230412013251_ensure_system_note_metadata_bigint_backfill_is_finished_for_gitlab_dot_com.rb
new file mode 100644
index 00000000000..a4ae604d66d
--- /dev/null
+++ b/db/post_migrate/20230412013251_ensure_system_note_metadata_bigint_backfill_is_finished_for_gitlab_dot_com.rb
@@ -0,0 +1,29 @@
+# frozen_string_literal: true
+
+class EnsureSystemNoteMetadataBigintBackfillIsFinishedForGitlabDotCom < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+ disable_ddl_transaction!
+
+ def up
+ return unless should_run?
+
+ ensure_batched_background_migration_is_finished(
+ job_class_name: 'CopyColumnUsingBackgroundMigrationJob',
+ table_name: 'system_note_metadata',
+ column_name: 'id',
+ job_arguments: [['note_id'], ['note_id_convert_to_bigint']]
+ )
+ end
+
+ def down
+ # no-op
+ end
+
+ private
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/post_migrate/20230412152538_add_text_limit_to_ci_job_artifacts_file_final_path.rb b/db/post_migrate/20230412152538_add_text_limit_to_ci_job_artifacts_file_final_path.rb
new file mode 100644
index 00000000000..1ee83486cc5
--- /dev/null
+++ b/db/post_migrate/20230412152538_add_text_limit_to_ci_job_artifacts_file_final_path.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class AddTextLimitToCiJobArtifactsFileFinalPath < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ add_text_limit :ci_job_artifacts, :file_final_path, 1024, constraint_name: constraint_name, validate: false
+ prepare_async_check_constraint_validation(:ci_job_artifacts, name: constraint_name)
+ end
+
+ def down
+ unprepare_async_check_constraint_validation(:ci_job_artifacts, name: constraint_name)
+ remove_text_limit :ci_job_artifacts, :file_final_path
+ end
+
+ private
+
+ def constraint_name
+ text_limit_name(:ci_job_artifacts, :file_final_path)
+ end
+end
diff --git a/db/post_migrate/20230412201517_remove_clusters_applications_cert_managers_fk.rb b/db/post_migrate/20230412201517_remove_clusters_applications_cert_managers_fk.rb
new file mode 100644
index 00000000000..e565583b308
--- /dev/null
+++ b/db/post_migrate/20230412201517_remove_clusters_applications_cert_managers_fk.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class RemoveClustersApplicationsCertManagersFk < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ with_lock_retries do
+ remove_foreign_key_if_exists(:clusters_applications_cert_managers, column: :cluster_id)
+ end
+ end
+
+ def down
+ add_concurrent_foreign_key :clusters_applications_cert_managers, :clusters,
+ column: :cluster_id, on_delete: :cascade, name: 'fk_rails_9e4f2cb4b2'
+ end
+end
diff --git a/db/post_migrate/20230412201528_remove_clusters_applications_cilium_fk.rb b/db/post_migrate/20230412201528_remove_clusters_applications_cilium_fk.rb
new file mode 100644
index 00000000000..e1ebff390b7
--- /dev/null
+++ b/db/post_migrate/20230412201528_remove_clusters_applications_cilium_fk.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class RemoveClustersApplicationsCiliumFk < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ with_lock_retries do
+ remove_foreign_key_if_exists(:clusters_applications_cilium, column: :cluster_id)
+ end
+ end
+
+ def down
+ add_concurrent_foreign_key :clusters_applications_cilium, :clusters,
+ column: :cluster_id, on_delete: :cascade, name: 'fk_rails_59dc12eea6'
+ end
+end
diff --git a/db/post_migrate/20230412201539_remove_clusters_applications_crossplane_fk.rb b/db/post_migrate/20230412201539_remove_clusters_applications_crossplane_fk.rb
new file mode 100644
index 00000000000..46687466be7
--- /dev/null
+++ b/db/post_migrate/20230412201539_remove_clusters_applications_crossplane_fk.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class RemoveClustersApplicationsCrossplaneFk < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ with_lock_retries do
+ remove_foreign_key_if_exists(:clusters_applications_crossplane, column: :cluster_id)
+ end
+ end
+
+ def down
+ add_concurrent_foreign_key :clusters_applications_crossplane, :clusters,
+ column: :cluster_id, on_delete: :cascade, name: 'fk_rails_87186702df'
+ end
+end
diff --git a/db/post_migrate/20230412201549_remove_clusters_applications_helm_fk.rb b/db/post_migrate/20230412201549_remove_clusters_applications_helm_fk.rb
new file mode 100644
index 00000000000..6e2ccd53646
--- /dev/null
+++ b/db/post_migrate/20230412201549_remove_clusters_applications_helm_fk.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class RemoveClustersApplicationsHelmFk < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ with_lock_retries do
+ remove_foreign_key_if_exists(:clusters_applications_helm, column: :cluster_id)
+ end
+ end
+
+ def down
+ add_concurrent_foreign_key :clusters_applications_helm, :clusters,
+ column: :cluster_id, on_delete: :cascade, name: 'fk_rails_3e2b1c06bc'
+ end
+end
diff --git a/db/post_migrate/20230412201600_remove_clusters_applications_ingress_fk.rb b/db/post_migrate/20230412201600_remove_clusters_applications_ingress_fk.rb
new file mode 100644
index 00000000000..d911b105a24
--- /dev/null
+++ b/db/post_migrate/20230412201600_remove_clusters_applications_ingress_fk.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class RemoveClustersApplicationsIngressFk < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ with_lock_retries do
+ remove_foreign_key_if_exists(:clusters_applications_ingress, column: :cluster_id)
+ end
+ end
+
+ def down
+ add_concurrent_foreign_key :clusters_applications_ingress, :clusters,
+ column: :cluster_id, on_delete: :cascade, name: 'fk_rails_753a7b41c1'
+ end
+end
diff --git a/db/post_migrate/20230412201611_remove_clusters_applications_jupyter_fk.rb b/db/post_migrate/20230412201611_remove_clusters_applications_jupyter_fk.rb
new file mode 100644
index 00000000000..063a2e4c622
--- /dev/null
+++ b/db/post_migrate/20230412201611_remove_clusters_applications_jupyter_fk.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class RemoveClustersApplicationsJupyterFk < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ with_lock_retries do
+ remove_foreign_key_if_exists(:clusters_applications_jupyter, column: :cluster_id)
+ end
+ end
+
+ def down
+ add_concurrent_foreign_key :clusters_applications_jupyter, :clusters,
+ column: :cluster_id, on_delete: :cascade, name: 'fk_rails_17df21c98c'
+ end
+end
diff --git a/db/post_migrate/20230412201621_remove_clusters_applications_knative_fk.rb b/db/post_migrate/20230412201621_remove_clusters_applications_knative_fk.rb
new file mode 100644
index 00000000000..8f97e886b85
--- /dev/null
+++ b/db/post_migrate/20230412201621_remove_clusters_applications_knative_fk.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class RemoveClustersApplicationsKnativeFk < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ with_lock_retries do
+ remove_foreign_key_if_exists(:clusters_applications_knative, column: :cluster_id)
+ end
+ end
+
+ def down
+ add_concurrent_foreign_key :clusters_applications_knative, :clusters,
+ column: :cluster_id, on_delete: :cascade, name: 'fk_rails_54fc91e0a0'
+ end
+end
diff --git a/db/post_migrate/20230412201632_remove_clusters_applications_prometheus_fk.rb b/db/post_migrate/20230412201632_remove_clusters_applications_prometheus_fk.rb
new file mode 100644
index 00000000000..735019bfe5a
--- /dev/null
+++ b/db/post_migrate/20230412201632_remove_clusters_applications_prometheus_fk.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class RemoveClustersApplicationsPrometheusFk < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ with_lock_retries do
+ remove_foreign_key_if_exists(:clusters_applications_prometheus, column: :cluster_id)
+ end
+ end
+
+ def down
+ add_concurrent_foreign_key :clusters_applications_prometheus, :clusters,
+ column: :cluster_id, on_delete: :cascade, name: 'fk_557e773639'
+ end
+end
diff --git a/db/post_migrate/20230412201642_remove_clusters_applications_runners_fk.rb b/db/post_migrate/20230412201642_remove_clusters_applications_runners_fk.rb
new file mode 100644
index 00000000000..4921d0c8744
--- /dev/null
+++ b/db/post_migrate/20230412201642_remove_clusters_applications_runners_fk.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class RemoveClustersApplicationsRunnersFk < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ with_lock_retries do
+ remove_foreign_key_if_exists(:clusters_applications_runners, column: :cluster_id)
+ end
+ end
+
+ def down
+ add_concurrent_foreign_key :clusters_applications_runners, :clusters,
+ column: :cluster_id, on_delete: :cascade, name: 'fk_rails_22388594e9'
+ end
+end
diff --git a/db/post_migrate/20230412203234_remove_clusters_applications_jupyter_oauth_fk.rb b/db/post_migrate/20230412203234_remove_clusters_applications_jupyter_oauth_fk.rb
new file mode 100644
index 00000000000..63474ebec36
--- /dev/null
+++ b/db/post_migrate/20230412203234_remove_clusters_applications_jupyter_oauth_fk.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class RemoveClustersApplicationsJupyterOauthFk < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ with_lock_retries do
+ remove_foreign_key_if_exists(:clusters_applications_jupyter, column: :oauth_application_id)
+ end
+ end
+
+ def down
+ add_concurrent_foreign_key :clusters_applications_jupyter, :oauth_applications,
+ column: :oauth_application_id, on_delete: :nullify, name: 'fk_rails_331f0aff78'
+ end
+end
diff --git a/db/post_migrate/20230412204143_remove_serverless_domain_cluster_pages_fk.rb b/db/post_migrate/20230412204143_remove_serverless_domain_cluster_pages_fk.rb
new file mode 100644
index 00000000000..8f66714d03b
--- /dev/null
+++ b/db/post_migrate/20230412204143_remove_serverless_domain_cluster_pages_fk.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class RemoveServerlessDomainClusterPagesFk < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ with_lock_retries do
+ remove_foreign_key_if_exists(:serverless_domain_cluster, column: :pages_domain_id)
+ end
+ end
+
+ def down
+ add_concurrent_foreign_key :serverless_domain_cluster, :pages_domains,
+ column: :pages_domain_id, on_delete: :cascade, name: 'fk_rails_c09009dee1'
+ end
+end
diff --git a/db/post_migrate/20230412204201_remove_serverless_domain_cluster_knative_fk.rb b/db/post_migrate/20230412204201_remove_serverless_domain_cluster_knative_fk.rb
new file mode 100644
index 00000000000..1ac60de59d0
--- /dev/null
+++ b/db/post_migrate/20230412204201_remove_serverless_domain_cluster_knative_fk.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class RemoveServerlessDomainClusterKnativeFk < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ with_lock_retries do
+ remove_foreign_key_if_exists(:serverless_domain_cluster, column: :clusters_applications_knative_id)
+ end
+ end
+
+ def down
+ add_concurrent_foreign_key :serverless_domain_cluster, :clusters_applications_knative,
+ column: :clusters_applications_knative_id, on_delete: :cascade, name: 'fk_rails_e59e868733'
+ end
+end
diff --git a/db/post_migrate/20230412204224_remove_serverless_domain_cluster_creator_fk.rb b/db/post_migrate/20230412204224_remove_serverless_domain_cluster_creator_fk.rb
new file mode 100644
index 00000000000..8d0b62c9f6e
--- /dev/null
+++ b/db/post_migrate/20230412204224_remove_serverless_domain_cluster_creator_fk.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class RemoveServerlessDomainClusterCreatorFk < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ with_lock_retries do
+ remove_foreign_key_if_exists(:serverless_domain_cluster, column: :creator_id)
+ end
+ end
+
+ def down
+ add_concurrent_foreign_key :serverless_domain_cluster, :users,
+ column: :creator_id, on_delete: :nullify, name: 'fk_rails_fbdba67eb1'
+ end
+end
diff --git a/db/post_migrate/20230412214119_finalize_encrypt_ci_trigger_token.rb b/db/post_migrate/20230412214119_finalize_encrypt_ci_trigger_token.rb
new file mode 100644
index 00000000000..e3e6dc43e0d
--- /dev/null
+++ b/db/post_migrate/20230412214119_finalize_encrypt_ci_trigger_token.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+
+class FinalizeEncryptCiTriggerToken < Gitlab::Database::Migration[2.1]
+ MIGRATION = 'EncryptCiTriggerToken'
+
+ disable_ddl_transaction!
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_ci
+
+ def up
+ ensure_batched_background_migration_is_finished(
+ job_class_name: MIGRATION,
+ table_name: :ci_triggers,
+ column_name: :id,
+ job_arguments: [],
+ finalize: true
+ )
+ end
+
+ def down
+ # no-op
+ end
+end
diff --git a/db/post_migrate/20230413012807_remove_index_sync_index_on_merge_requests_on_state_id_and_merge_status.rb b/db/post_migrate/20230413012807_remove_index_sync_index_on_merge_requests_on_state_id_and_merge_status.rb
new file mode 100644
index 00000000000..664657015a7
--- /dev/null
+++ b/db/post_migrate/20230413012807_remove_index_sync_index_on_merge_requests_on_state_id_and_merge_status.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class RemoveIndexSyncIndexOnMergeRequestsOnStateIdAndMergeStatus < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ remove_concurrent_index_by_name :merge_requests, name: 'idx_merge_requests_on_state_id_and_merge_status'
+ end
+
+ def down
+ add_concurrent_index :merge_requests, [:state_id, :merge_status],
+ where: "((state_id = 1) AND ((merge_status)::text = 'can_be_merged'::text))",
+ name: 'idx_merge_requests_on_state_id_and_merge_status'
+ end
+end
diff --git a/db/post_migrate/20230413041917_swap_issue_user_mentions_note_id_to_bigint_for_gitlab_dot_com_2.rb b/db/post_migrate/20230413041917_swap_issue_user_mentions_note_id_to_bigint_for_gitlab_dot_com_2.rb
new file mode 100644
index 00000000000..cb29b47a64d
--- /dev/null
+++ b/db/post_migrate/20230413041917_swap_issue_user_mentions_note_id_to_bigint_for_gitlab_dot_com_2.rb
@@ -0,0 +1,93 @@
+# frozen_string_literal: true
+
+class SwapIssueUserMentionsNoteIdToBigintForGitlabDotCom2 < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ disable_ddl_transaction!
+
+ TABLE_NAME = 'issue_user_mentions'
+
+ def up
+ return unless should_run?
+ return if columns_alredy_swapped?
+
+ swap
+ end
+
+ def down
+ return unless should_run?
+ return unless columns_alredy_swapped?
+
+ swap
+
+ add_concurrent_index TABLE_NAME, :note_id_convert_to_bigint, unique: true,
+ name: 'index_issue_user_mentions_on_note_id_convert_to_bigint',
+ where: 'note_id_convert_to_bigint IS NOT NULL'
+
+ add_concurrent_foreign_key TABLE_NAME, :notes, column: :note_id_convert_to_bigint,
+ name: 'fk_issue_user_mentions_note_id_convert_to_bigint',
+ on_delete: :cascade,
+ validate: false
+ end
+
+ def swap
+ # This will replace the existing index_issue_user_mentions_on_note_id
+ add_concurrent_index TABLE_NAME, :note_id_convert_to_bigint, unique: true,
+ name: 'index_issue_user_mentions_on_note_id_convert_to_bigint',
+ where: 'note_id_convert_to_bigint IS NOT NULL'
+
+ # This will replace the existing issue_user_mentions_on_issue_id_and_note_id_index
+ add_concurrent_index TABLE_NAME, [:issue_id, :note_id_convert_to_bigint], unique: true,
+ name: 'tmp_issue_user_mentions_on_issue_id_and_note_id_index'
+
+ # This will replace the existing issue_user_mentions_on_issue_id_index
+ add_concurrent_index TABLE_NAME, :issue_id, unique: true,
+ name: 'tmp_issue_user_mentions_on_issue_id_index',
+ where: 'note_id_convert_to_bigint IS NULL'
+
+ # This will replace the existing fk_rails_3861d9fefa
+ add_concurrent_foreign_key TABLE_NAME, :notes, column: :note_id_convert_to_bigint,
+ name: 'fk_issue_user_mentions_note_id_convert_to_bigint',
+ on_delete: :cascade
+
+ with_lock_retries(raise_on_exhaustion: true) do
+ execute "LOCK TABLE notes, #{TABLE_NAME} IN ACCESS EXCLUSIVE MODE"
+
+ execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN note_id TO note_id_tmp"
+ execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN note_id_convert_to_bigint TO note_id"
+ execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN note_id_tmp TO note_id_convert_to_bigint"
+
+ function_name = Gitlab::Database::UnidirectionalCopyTrigger
+ .on_table(TABLE_NAME, connection: connection)
+ .name(:note_id, :note_id_convert_to_bigint)
+ execute "ALTER FUNCTION #{quote_table_name(function_name)} RESET ALL"
+
+ execute 'DROP INDEX IF EXISTS index_issue_user_mentions_on_note_id'
+ rename_index TABLE_NAME, 'index_issue_user_mentions_on_note_id_convert_to_bigint',
+ 'index_issue_user_mentions_on_note_id'
+
+ execute 'DROP INDEX IF EXISTS issue_user_mentions_on_issue_id_and_note_id_index'
+ rename_index TABLE_NAME, 'tmp_issue_user_mentions_on_issue_id_and_note_id_index',
+ 'issue_user_mentions_on_issue_id_and_note_id_index'
+
+ execute 'DROP INDEX IF EXISTS issue_user_mentions_on_issue_id_index'
+ rename_index TABLE_NAME, 'tmp_issue_user_mentions_on_issue_id_index',
+ 'issue_user_mentions_on_issue_id_index'
+
+ execute "ALTER TABLE #{TABLE_NAME} DROP CONSTRAINT IF EXISTS fk_rails_3861d9fefa"
+ rename_constraint(TABLE_NAME, 'fk_issue_user_mentions_note_id_convert_to_bigint', 'fk_rails_3861d9fefa')
+ end
+ end
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+
+ def columns_alredy_swapped?
+ table_columns = columns(TABLE_NAME)
+ note_id = table_columns.find { |c| c.name == 'note_id' }
+ note_id_convert_to_bigint = table_columns.find { |c| c.name == 'note_id_convert_to_bigint' }
+
+ note_id_convert_to_bigint.sql_type == 'integer' && note_id.sql_type == 'bigint'
+ end
+end
diff --git a/db/post_migrate/20230413041918_add_unique_index_system_note_metadata_note_id_convert_to_bigint_for_gitlab_com.rb b/db/post_migrate/20230413041918_add_unique_index_system_note_metadata_note_id_convert_to_bigint_for_gitlab_com.rb
new file mode 100644
index 00000000000..b8ee6285a33
--- /dev/null
+++ b/db/post_migrate/20230413041918_add_unique_index_system_note_metadata_note_id_convert_to_bigint_for_gitlab_com.rb
@@ -0,0 +1,30 @@
+# frozen_string_literal: true
+
+class AddUniqueIndexSystemNoteMetadataNoteIdConvertToBigintForGitlabCom < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ disable_ddl_transaction!
+
+ TABLE_NAME = :system_note_metadata
+ INDEX_NAME = :index_system_note_metadata_on_note_id_convert_to_bigint
+
+ def up
+ return unless should_run?
+
+ # This will replace the existing index_system_note_metadata_on_note_id
+ add_concurrent_index TABLE_NAME, :note_id_convert_to_bigint, unique: true,
+ name: 'index_system_note_metadata_on_note_id_convert_to_bigint'
+ end
+
+ def down
+ return unless should_run?
+
+ remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME)
+ end
+
+ private
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/post_migrate/20230413041919_add_fk_on_system_note_metadata_note_id_convert_to_bigint_for_gitlab_com.rb b/db/post_migrate/20230413041919_add_fk_on_system_note_metadata_note_id_convert_to_bigint_for_gitlab_com.rb
new file mode 100644
index 00000000000..59ea8ca3c7f
--- /dev/null
+++ b/db/post_migrate/20230413041919_add_fk_on_system_note_metadata_note_id_convert_to_bigint_for_gitlab_com.rb
@@ -0,0 +1,43 @@
+# frozen_string_literal: true
+
+class AddFkOnSystemNoteMetadataNoteIdConvertToBigintForGitlabCom < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ disable_ddl_transaction!
+
+ SOURCE_TABLE_NAME = :system_note_metadata
+ TARGET_TABLE_NAME = :notes
+ FK_NAME = :fk_system_note_metadata_note_id_convert_to_bigint
+
+ def up
+ return unless should_run?
+
+ # This will replace the existing fk_d83a918cb1
+ # when we swap the integer and bigint columns
+ add_concurrent_foreign_key SOURCE_TABLE_NAME, TARGET_TABLE_NAME,
+ column: :note_id_convert_to_bigint,
+ name: FK_NAME,
+ on_delete: :cascade,
+ reverse_lock_order: true,
+ validate: false
+ end
+
+ def down
+ return unless should_run?
+
+ with_lock_retries do
+ remove_foreign_key_if_exists(
+ SOURCE_TABLE_NAME,
+ TARGET_TABLE_NAME,
+ name: FK_NAME,
+ reverse_lock_order: true
+ )
+ end
+ end
+
+ private
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/post_migrate/20230413041920_async_validate_fk_system_note_metadata_note_id_convert_to_bigint_for_gitlab_com.rb b/db/post_migrate/20230413041920_async_validate_fk_system_note_metadata_note_id_convert_to_bigint_for_gitlab_com.rb
new file mode 100644
index 00000000000..bba0f09dd78
--- /dev/null
+++ b/db/post_migrate/20230413041920_async_validate_fk_system_note_metadata_note_id_convert_to_bigint_for_gitlab_com.rb
@@ -0,0 +1,27 @@
+# frozen_string_literal: true
+
+class AsyncValidateFkSystemNoteMetadataNoteIdConvertToBigintForGitlabCom < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ TABLE_NAME = :system_note_metadata
+ COLUMN = :note_id_convert_to_bigint
+ FK_NAME = :fk_system_note_metadata_note_id_convert_to_bigint
+
+ def up
+ return unless should_run?
+
+ prepare_async_foreign_key_validation TABLE_NAME, COLUMN, name: FK_NAME
+ end
+
+ def down
+ return unless should_run?
+
+ unprepare_async_foreign_key_validation TABLE_NAME, COLUMN, name: FK_NAME
+ end
+
+ private
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/post_migrate/20230414075119_add_namespaces_by_top_level_namespace_index.rb b/db/post_migrate/20230414075119_add_namespaces_by_top_level_namespace_index.rb
new file mode 100644
index 00000000000..2cc433de605
--- /dev/null
+++ b/db/post_migrate/20230414075119_add_namespaces_by_top_level_namespace_index.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class AddNamespacesByTopLevelNamespaceIndex < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ INDEX_NAME = 'index_on_namespaces_namespaces_by_top_level_namespace'
+
+ def up
+ prepare_async_index :namespaces, '((traversal_ids[1]), type, id)', name: INDEX_NAME
+ end
+
+ def down
+ unprepare_async_index_by_name :ci_builds, INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20230418154454_change_code_suggestions_default_in_namespace_settings.rb b/db/post_migrate/20230418154454_change_code_suggestions_default_in_namespace_settings.rb
new file mode 100644
index 00000000000..77e81a7c01b
--- /dev/null
+++ b/db/post_migrate/20230418154454_change_code_suggestions_default_in_namespace_settings.rb
@@ -0,0 +1,7 @@
+# frozen_string_literal: true
+
+class ChangeCodeSuggestionsDefaultInNamespaceSettings < Gitlab::Database::Migration[2.1]
+ def change
+ change_column_default :namespace_settings, :code_suggestions, from: false, to: true
+ end
+end
diff --git a/db/post_migrate/20230418164957_queue_update_code_suggestions_for_namespace_settings.rb b/db/post_migrate/20230418164957_queue_update_code_suggestions_for_namespace_settings.rb
new file mode 100644
index 00000000000..205219e4e2b
--- /dev/null
+++ b/db/post_migrate/20230418164957_queue_update_code_suggestions_for_namespace_settings.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+class QueueUpdateCodeSuggestionsForNamespaceSettings < Gitlab::Database::Migration[2.1]
+ def up
+ # no-op due to not running anywhere yet and business decision to revert the decision
+ # see: https://gitlab.com/gitlab-org/gitlab/-/issues/408104
+ end
+
+ def down
+ # no-op
+ end
+end
diff --git a/db/post_migrate/20230419164438_change_code_suggestions_default_false_in_namespace_settings.rb b/db/post_migrate/20230419164438_change_code_suggestions_default_false_in_namespace_settings.rb
new file mode 100644
index 00000000000..51042995af0
--- /dev/null
+++ b/db/post_migrate/20230419164438_change_code_suggestions_default_false_in_namespace_settings.rb
@@ -0,0 +1,7 @@
+# frozen_string_literal: true
+
+class ChangeCodeSuggestionsDefaultFalseInNamespaceSettings < Gitlab::Database::Migration[2.1]
+ def change
+ change_column_default :namespace_settings, :code_suggestions, from: true, to: false
+ end
+end
diff --git a/db/schema_migrations/20210826171758 b/db/schema_migrations/20210826171758
deleted file mode 100644
index a0bb0f5cfc6..00000000000
--- a/db/schema_migrations/20210826171758
+++ /dev/null
@@ -1 +0,0 @@
-96a8a87cc075b7a2bf3919d0c891fdfedb2a9b7bab6460b82bfb43a3f8abe3cf \ No newline at end of file
diff --git a/db/schema_migrations/20210826193907 b/db/schema_migrations/20210826193907
deleted file mode 100644
index 417333d7212..00000000000
--- a/db/schema_migrations/20210826193907
+++ /dev/null
@@ -1 +0,0 @@
-b7916e025131f11da97ab89a01b32d1dbacf94bb96dc84877ba18404c8b0b2ba \ No newline at end of file
diff --git a/db/schema_migrations/20210830085837 b/db/schema_migrations/20210830085837
deleted file mode 100644
index 590ff1fe13b..00000000000
--- a/db/schema_migrations/20210830085837
+++ /dev/null
@@ -1 +0,0 @@
-cf1a51194961500cb63d848afb1d5ebbf2ef77f54d60957e92c9dd6a667913ea \ No newline at end of file
diff --git a/db/schema_migrations/20210830104800 b/db/schema_migrations/20210830104800
deleted file mode 100644
index ca1aa9180e2..00000000000
--- a/db/schema_migrations/20210830104800
+++ /dev/null
@@ -1 +0,0 @@
-84a68304f95ae04b85625c214b28a251014582fb142390ff3df8ea6d6f0947e1 \ No newline at end of file
diff --git a/db/schema_migrations/20210830140524 b/db/schema_migrations/20210830140524
deleted file mode 100644
index ed07d932278..00000000000
--- a/db/schema_migrations/20210830140524
+++ /dev/null
@@ -1 +0,0 @@
-54f7c66eed745b62d0b53a407a96721f90392ab7f800db9c8a2607f22974ef3c \ No newline at end of file
diff --git a/db/schema_migrations/20210830154358 b/db/schema_migrations/20210830154358
deleted file mode 100644
index 7486c54c4c5..00000000000
--- a/db/schema_migrations/20210830154358
+++ /dev/null
@@ -1 +0,0 @@
-04a44d0e261b26cc7f39b81a4c59ea8e4903d6d7bf73c2004b426204db4491bc \ No newline at end of file
diff --git a/db/schema_migrations/20210831123008 b/db/schema_migrations/20210831123008
deleted file mode 100644
index 35a14b2b10b..00000000000
--- a/db/schema_migrations/20210831123008
+++ /dev/null
@@ -1 +0,0 @@
-36572ad3a4a8a7511512ff45e2a68252950ce852af1b5a28c6b4e4491f97be07 \ No newline at end of file
diff --git a/db/schema_migrations/20210831134840 b/db/schema_migrations/20210831134840
deleted file mode 100644
index d05a375f8fd..00000000000
--- a/db/schema_migrations/20210831134840
+++ /dev/null
@@ -1 +0,0 @@
-6cad93bd4c086a60164c3cb5c42737194c4b7b20c1ea9f4c6d998b7c3a8918b5 \ No newline at end of file
diff --git a/db/schema_migrations/20210831135249 b/db/schema_migrations/20210831135249
deleted file mode 100644
index a08cfa6d8d9..00000000000
--- a/db/schema_migrations/20210831135249
+++ /dev/null
@@ -1 +0,0 @@
-78b14e92c91e7ccb11b7b37e89e8e55749cf109b0fa5ce06e4e396a2ac743f1c \ No newline at end of file
diff --git a/db/schema_migrations/20210831203408 b/db/schema_migrations/20210831203408
deleted file mode 100644
index 6ab3f810e57..00000000000
--- a/db/schema_migrations/20210831203408
+++ /dev/null
@@ -1 +0,0 @@
-50a06a2a57ed26c25af53d3d7f6f5ef73efde8a23a36c5f825af56b4d0c4c3f6 \ No newline at end of file
diff --git a/db/schema_migrations/20210901044202 b/db/schema_migrations/20210901044202
deleted file mode 100644
index 8601b0d20a2..00000000000
--- a/db/schema_migrations/20210901044202
+++ /dev/null
@@ -1 +0,0 @@
-1f070444e77eb56ba612f60ed4a0d90b8a44c4af419a09c873f3bf663c78af72 \ No newline at end of file
diff --git a/db/schema_migrations/20210901044237 b/db/schema_migrations/20210901044237
deleted file mode 100644
index 25418c94441..00000000000
--- a/db/schema_migrations/20210901044237
+++ /dev/null
@@ -1 +0,0 @@
-0d8caaa078914ed2bd43b383ee2efe50093947d65862c2f4dd8dc960cad0a43e \ No newline at end of file
diff --git a/db/schema_migrations/20210901065504 b/db/schema_migrations/20210901065504
deleted file mode 100644
index f62e6ce1272..00000000000
--- a/db/schema_migrations/20210901065504
+++ /dev/null
@@ -1 +0,0 @@
-9724a5fc1703418f9b1ea1d5375fc3b01834b30e5ff16c60537db5cb00bc210a \ No newline at end of file
diff --git a/db/schema_migrations/20210901153324 b/db/schema_migrations/20210901153324
deleted file mode 100644
index a08982bad39..00000000000
--- a/db/schema_migrations/20210901153324
+++ /dev/null
@@ -1 +0,0 @@
-34287b86616026b94374856991c793ad869c52badddc09be923984002c6214bd \ No newline at end of file
diff --git a/db/schema_migrations/20210901184511 b/db/schema_migrations/20210901184511
deleted file mode 100644
index 45a3b3b8c18..00000000000
--- a/db/schema_migrations/20210901184511
+++ /dev/null
@@ -1 +0,0 @@
-40780a28f881d4e80bdb6b023f22804c4da735223323c8cf03cfcdcaf5337fe6 \ No newline at end of file
diff --git a/db/schema_migrations/20210902144144 b/db/schema_migrations/20210902144144
deleted file mode 100644
index 330569f1beb..00000000000
--- a/db/schema_migrations/20210902144144
+++ /dev/null
@@ -1 +0,0 @@
-c99df310082dd6f5faff3cfd90dfca88af26d840889910ebac0e73ba483a09b2 \ No newline at end of file
diff --git a/db/schema_migrations/20210902171406 b/db/schema_migrations/20210902171406
deleted file mode 100644
index 89635e256ea..00000000000
--- a/db/schema_migrations/20210902171406
+++ /dev/null
@@ -1 +0,0 @@
-d7be9a34d626e507add67f407a6fa0b45f16b244e8ebeeb071debc538fa25b49 \ No newline at end of file
diff --git a/db/schema_migrations/20210902171808 b/db/schema_migrations/20210902171808
deleted file mode 100644
index 1398c2db4b6..00000000000
--- a/db/schema_migrations/20210902171808
+++ /dev/null
@@ -1 +0,0 @@
-09b482e4716a2b0808ad83770222baed8e863a8f94f85f77ed2d557eaa348df4 \ No newline at end of file
diff --git a/db/schema_migrations/20210902184334 b/db/schema_migrations/20210902184334
deleted file mode 100644
index f35699b357e..00000000000
--- a/db/schema_migrations/20210902184334
+++ /dev/null
@@ -1 +0,0 @@
-508b8d4608d28b2a12cf429262c3dd336e130013a41e51ff6c95027ece1540e5 \ No newline at end of file
diff --git a/db/schema_migrations/20210903054158 b/db/schema_migrations/20210903054158
deleted file mode 100644
index 8810481ab85..00000000000
--- a/db/schema_migrations/20210903054158
+++ /dev/null
@@ -1 +0,0 @@
-113d6bb813a89646d48c8ba6a86fc8e73f741d5c345f603bfe33939fb90f9428 \ No newline at end of file
diff --git a/db/schema_migrations/20210906100021 b/db/schema_migrations/20210906100021
deleted file mode 100644
index 9ae19276eab..00000000000
--- a/db/schema_migrations/20210906100021
+++ /dev/null
@@ -1 +0,0 @@
-74f6800c968f80e18aa000df42fd23086404fdd7a863237e453541b7eeb4eb7f \ No newline at end of file
diff --git a/db/schema_migrations/20210906100316 b/db/schema_migrations/20210906100316
deleted file mode 100644
index 4ce17059b07..00000000000
--- a/db/schema_migrations/20210906100316
+++ /dev/null
@@ -1 +0,0 @@
-b7329d4ff7ee651b56cb86c7091e0d933c4f43a77125323fb6c283eedcb737c2 \ No newline at end of file
diff --git a/db/schema_migrations/20210906130643 b/db/schema_migrations/20210906130643
deleted file mode 100644
index 150e594026d..00000000000
--- a/db/schema_migrations/20210906130643
+++ /dev/null
@@ -1 +0,0 @@
-c707c0879e439de95f24f8fe2084388276a46c5e0ee30e4134a43e22ca19b4ec \ No newline at end of file
diff --git a/db/schema_migrations/20210907013944 b/db/schema_migrations/20210907013944
deleted file mode 100644
index 97cf6ef7b2f..00000000000
--- a/db/schema_migrations/20210907013944
+++ /dev/null
@@ -1 +0,0 @@
-1a449d347248cacae48d10340c5682abe6de57d2991712f4e0a39c921892e0c5 \ No newline at end of file
diff --git a/db/schema_migrations/20210907021940 b/db/schema_migrations/20210907021940
deleted file mode 100644
index c6392fca8de..00000000000
--- a/db/schema_migrations/20210907021940
+++ /dev/null
@@ -1 +0,0 @@
-53d1dee0bbe106eeaad3eda6e8012475cf4b59d30f78020c8d2ecf3499ff7e0f \ No newline at end of file
diff --git a/db/schema_migrations/20210907033745 b/db/schema_migrations/20210907033745
deleted file mode 100644
index 23d1c138824..00000000000
--- a/db/schema_migrations/20210907033745
+++ /dev/null
@@ -1 +0,0 @@
-d02cc8e136f1d761a34c7c585a3fe2b8c3bc3bca67e0e45f950248a5fad36a24 \ No newline at end of file
diff --git a/db/schema_migrations/20210907041000 b/db/schema_migrations/20210907041000
deleted file mode 100644
index 9b7b3d4b14c..00000000000
--- a/db/schema_migrations/20210907041000
+++ /dev/null
@@ -1 +0,0 @@
-23d4d2d037cd70c5b810824a837b45f016a3be5d112938123c1da08416f667cd \ No newline at end of file
diff --git a/db/schema_migrations/20210907182337 b/db/schema_migrations/20210907182337
deleted file mode 100644
index cc3d32067c2..00000000000
--- a/db/schema_migrations/20210907182337
+++ /dev/null
@@ -1 +0,0 @@
-ad564a1fda815473b09f1eda469e67cdd8f532b9b481f7e8ae3ddb8f2df6ee40 \ No newline at end of file
diff --git a/db/schema_migrations/20210907182359 b/db/schema_migrations/20210907182359
deleted file mode 100644
index 41e72e9dfec..00000000000
--- a/db/schema_migrations/20210907182359
+++ /dev/null
@@ -1 +0,0 @@
-da57784c8c7f8bcb3c8c61089b5a695efdb31b209cb1616af68240380c734669 \ No newline at end of file
diff --git a/db/schema_migrations/20210907211557 b/db/schema_migrations/20210907211557
deleted file mode 100644
index e89552729ba..00000000000
--- a/db/schema_migrations/20210907211557
+++ /dev/null
@@ -1 +0,0 @@
-387dcbda7c3b32050298d8a679361a17916a66d0ab686211f0d1a0dc708c4a74 \ No newline at end of file
diff --git a/db/schema_migrations/20210908060951 b/db/schema_migrations/20210908060951
deleted file mode 100644
index cd4ed794cc5..00000000000
--- a/db/schema_migrations/20210908060951
+++ /dev/null
@@ -1 +0,0 @@
-716fad7f9005a40d0c6a3acb8e348c7e9459a6a619fc0bf085f231f328f19fd1 \ No newline at end of file
diff --git a/db/schema_migrations/20210908061132 b/db/schema_migrations/20210908061132
deleted file mode 100644
index a5b7e482228..00000000000
--- a/db/schema_migrations/20210908061132
+++ /dev/null
@@ -1 +0,0 @@
-f9e14410f22c94d0500102bb0fd0a3a6bd27343b74810b852ceb1349a04be72d \ No newline at end of file
diff --git a/db/schema_migrations/20210908100810 b/db/schema_migrations/20210908100810
deleted file mode 100644
index a8c9023a1cc..00000000000
--- a/db/schema_migrations/20210908100810
+++ /dev/null
@@ -1 +0,0 @@
-06e45cf159cf1182b34e83f893bcff65e4722dded2bf4cbcf61fafd652158823 \ No newline at end of file
diff --git a/db/schema_migrations/20210908132335 b/db/schema_migrations/20210908132335
deleted file mode 100644
index 864d6ccc942..00000000000
--- a/db/schema_migrations/20210908132335
+++ /dev/null
@@ -1 +0,0 @@
-399e35197111c257786a2bdf5dac990a26f48d2cc8493de642dcfa47ddececd2 \ No newline at end of file
diff --git a/db/schema_migrations/20210908140437 b/db/schema_migrations/20210908140437
deleted file mode 100644
index fec99dfe6fd..00000000000
--- a/db/schema_migrations/20210908140437
+++ /dev/null
@@ -1 +0,0 @@
-a8dc6d1fecf7b26182dd89f4dae088fb315774ff4720c282f608bd0c45c75a41 \ No newline at end of file
diff --git a/db/schema_migrations/20210908185736 b/db/schema_migrations/20210908185736
deleted file mode 100644
index 826ec2b44e8..00000000000
--- a/db/schema_migrations/20210908185736
+++ /dev/null
@@ -1 +0,0 @@
-4e9a585d33caed70c3e003e4f0127158ab9c98c790f8131012f052c2bd9cd1f0 \ No newline at end of file
diff --git a/db/schema_migrations/20210908185754 b/db/schema_migrations/20210908185754
deleted file mode 100644
index 53b9efc22d4..00000000000
--- a/db/schema_migrations/20210908185754
+++ /dev/null
@@ -1 +0,0 @@
-fc70f26e1d691773728e8e2251b23fe39247fc233996c2161143c660a92fe141 \ No newline at end of file
diff --git a/db/schema_migrations/20210908195506 b/db/schema_migrations/20210908195506
deleted file mode 100644
index 8680c7639d0..00000000000
--- a/db/schema_migrations/20210908195506
+++ /dev/null
@@ -1 +0,0 @@
-1ad794ac96f6297203046562c2ec422fbb4d1818a65266bb92179096040f7d82 \ No newline at end of file
diff --git a/db/schema_migrations/20210909104800 b/db/schema_migrations/20210909104800
deleted file mode 100644
index 70ad28d72b8..00000000000
--- a/db/schema_migrations/20210909104800
+++ /dev/null
@@ -1 +0,0 @@
-834825de758314db01a3daa2d2b943c11751553705c4dd078f2087b9ec6ff7f7 \ No newline at end of file
diff --git a/db/schema_migrations/20210909152027 b/db/schema_migrations/20210909152027
deleted file mode 100644
index 39db0c43aa6..00000000000
--- a/db/schema_migrations/20210909152027
+++ /dev/null
@@ -1 +0,0 @@
-abed3f9a6c188890d3dcd21f73a09347f8ccec0f6cc448220fadba5cbda17281 \ No newline at end of file
diff --git a/db/schema_migrations/20210909184349 b/db/schema_migrations/20210909184349
deleted file mode 100644
index 5997ddc46cf..00000000000
--- a/db/schema_migrations/20210909184349
+++ /dev/null
@@ -1 +0,0 @@
-6be3a6f8f748d8f02e2d42cd1a5103ec8bd5c17097d9e440b152685fc8d6ff83 \ No newline at end of file
diff --git a/db/schema_migrations/20210910014741 b/db/schema_migrations/20210910014741
deleted file mode 100644
index b0f32fcabf3..00000000000
--- a/db/schema_migrations/20210910014741
+++ /dev/null
@@ -1 +0,0 @@
-e6342d440d398980470f4dd018c5df56d0b5d4df11caa7ba5dd2e92578dbf678 \ No newline at end of file
diff --git a/db/schema_migrations/20210910015047 b/db/schema_migrations/20210910015047
deleted file mode 100644
index 3f76060a9bb..00000000000
--- a/db/schema_migrations/20210910015047
+++ /dev/null
@@ -1 +0,0 @@
-d0b2ee97781a5d3c671b855fb6be844431a73584be47ba35d83c7e8cfec69bcb \ No newline at end of file
diff --git a/db/schema_migrations/20210910141043 b/db/schema_migrations/20210910141043
deleted file mode 100644
index ccb687b8bda..00000000000
--- a/db/schema_migrations/20210910141043
+++ /dev/null
@@ -1 +0,0 @@
-3885d2fca4166e71610cd957f1c5a703118cbb5ba47a8d494eb4e017fe499a7d \ No newline at end of file
diff --git a/db/schema_migrations/20210910192921 b/db/schema_migrations/20210910192921
deleted file mode 100644
index d593bca14ac..00000000000
--- a/db/schema_migrations/20210910192921
+++ /dev/null
@@ -1 +0,0 @@
-48b5f8e614117ac5f1e7af4ab85a8835c3b3b34103154565dd7ef6f541dd3c37 \ No newline at end of file
diff --git a/db/schema_migrations/20210910194952 b/db/schema_migrations/20210910194952
deleted file mode 100644
index 2af73174c34..00000000000
--- a/db/schema_migrations/20210910194952
+++ /dev/null
@@ -1 +0,0 @@
-b805a0d3143f968343694ec864b38ba4991931131e8a5082dcd719420328a3ef \ No newline at end of file
diff --git a/db/schema_migrations/20210912034903 b/db/schema_migrations/20210912034903
deleted file mode 100644
index 8003a5b110c..00000000000
--- a/db/schema_migrations/20210912034903
+++ /dev/null
@@ -1 +0,0 @@
-76bfbf3f12fed895c3cfb891080b5a452d1204c83ce96736048f857b33458ad1 \ No newline at end of file
diff --git a/db/schema_migrations/20210913010411 b/db/schema_migrations/20210913010411
deleted file mode 100644
index 8ae59414604..00000000000
--- a/db/schema_migrations/20210913010411
+++ /dev/null
@@ -1 +0,0 @@
-71d51d1ac74f5c559bf41b23e5677af7228ba824da835afbe0f2299695912c19 \ No newline at end of file
diff --git a/db/schema_migrations/20210913010432 b/db/schema_migrations/20210913010432
deleted file mode 100644
index db2f53a8d06..00000000000
--- a/db/schema_migrations/20210913010432
+++ /dev/null
@@ -1 +0,0 @@
-172e77890657dd82c6ce770c286894731f6ef7fbcffb4b4fc97e0a41d132b8e8 \ No newline at end of file
diff --git a/db/schema_migrations/20210913122457 b/db/schema_migrations/20210913122457
deleted file mode 100644
index e8f322c64c8..00000000000
--- a/db/schema_migrations/20210913122457
+++ /dev/null
@@ -1 +0,0 @@
-031fb794e4fa3d54098596defd9de6fb1e507e01bd8f02462c0079e7e59c3416 \ No newline at end of file
diff --git a/db/schema_migrations/20210913224558 b/db/schema_migrations/20210913224558
deleted file mode 100644
index f2fb4eaeb71..00000000000
--- a/db/schema_migrations/20210913224558
+++ /dev/null
@@ -1 +0,0 @@
-377af41414793d7e52ffbb1fd60f2f19c58cd63bb0e85192983b5bfe98515ae8 \ No newline at end of file
diff --git a/db/schema_migrations/20210914094840 b/db/schema_migrations/20210914094840
deleted file mode 100644
index 51d46c05ae6..00000000000
--- a/db/schema_migrations/20210914094840
+++ /dev/null
@@ -1 +0,0 @@
-994de4d18202a420a7184cabe787f6e3f872900147df0cd848731483e6d87566 \ No newline at end of file
diff --git a/db/schema_migrations/20210914095310 b/db/schema_migrations/20210914095310
deleted file mode 100644
index fee7e0b9719..00000000000
--- a/db/schema_migrations/20210914095310
+++ /dev/null
@@ -1 +0,0 @@
-6fcf3ff9867df68f5e9603ae0311b29bec33aa5c5b826786b094ab0960ebcd90 \ No newline at end of file
diff --git a/db/schema_migrations/20210914145810 b/db/schema_migrations/20210914145810
deleted file mode 100644
index 1c2cdc8cbf2..00000000000
--- a/db/schema_migrations/20210914145810
+++ /dev/null
@@ -1 +0,0 @@
-a30acb6d2a3772be29dfefc7d8cda2f2df94002556fa5de85483b7fca245be86 \ No newline at end of file
diff --git a/db/schema_migrations/20210914172202 b/db/schema_migrations/20210914172202
deleted file mode 100644
index 2f7531b98aa..00000000000
--- a/db/schema_migrations/20210914172202
+++ /dev/null
@@ -1 +0,0 @@
-2ab67d4cc17d0fdf01b5861a46d6ec51d1e76e7e88209b0964a884edd22cc63d \ No newline at end of file
diff --git a/db/schema_migrations/20210915000453 b/db/schema_migrations/20210915000453
deleted file mode 100644
index 611af2b1310..00000000000
--- a/db/schema_migrations/20210915000453
+++ /dev/null
@@ -1 +0,0 @@
-ffb4e066420e1492550255e5866df6dc9f83d3d6cec9033284c4c3194d53b827 \ No newline at end of file
diff --git a/db/schema_migrations/20210915001242 b/db/schema_migrations/20210915001242
deleted file mode 100644
index 7aa9b5c5787..00000000000
--- a/db/schema_migrations/20210915001242
+++ /dev/null
@@ -1 +0,0 @@
-fc8f86f794d77902fd86acaec6046b65821ff685f841d28158dc05fb55773c16 \ No newline at end of file
diff --git a/db/schema_migrations/20210915022415 b/db/schema_migrations/20210915022415
deleted file mode 100644
index ab3ca284269..00000000000
--- a/db/schema_migrations/20210915022415
+++ /dev/null
@@ -1 +0,0 @@
-ecb73d9a0be0cf04a8b405f1225d1a5de2fcdbb4c277fd5549f72a7a21596cdc \ No newline at end of file
diff --git a/db/schema_migrations/20210915070423 b/db/schema_migrations/20210915070423
deleted file mode 100644
index 772226db1dd..00000000000
--- a/db/schema_migrations/20210915070423
+++ /dev/null
@@ -1 +0,0 @@
-f11b237fab6b4133c73f1d6105d85c8db1548b6d0753b2fd96f613c90a4fa3c1 \ No newline at end of file
diff --git a/db/schema_migrations/20210915202900 b/db/schema_migrations/20210915202900
deleted file mode 100644
index bbe7f918f7a..00000000000
--- a/db/schema_migrations/20210915202900
+++ /dev/null
@@ -1 +0,0 @@
-cc8f1bea8c722dfa06fc23a3dbaaacd7f1b7c5f7b529ebfab34b7c7c38e5db79 \ No newline at end of file
diff --git a/db/schema_migrations/20210916132547 b/db/schema_migrations/20210916132547
deleted file mode 100644
index 69932a531d9..00000000000
--- a/db/schema_migrations/20210916132547
+++ /dev/null
@@ -1 +0,0 @@
-d0953fdbaa6cf656e298ea482b3e3f931254276cb2285cffafba3d94b0626d3f \ No newline at end of file
diff --git a/db/schema_migrations/20210917134321 b/db/schema_migrations/20210917134321
deleted file mode 100644
index 3c5c397ecbf..00000000000
--- a/db/schema_migrations/20210917134321
+++ /dev/null
@@ -1 +0,0 @@
-a0ba9fb9e2f7f738926a2273f9ff644c43acb999f4d27adf192e5006582a2a0e \ No newline at end of file
diff --git a/db/schema_migrations/20210917153645 b/db/schema_migrations/20210917153645
deleted file mode 100644
index 483c6153a24..00000000000
--- a/db/schema_migrations/20210917153645
+++ /dev/null
@@ -1 +0,0 @@
-fb4c7ce2ed33b3843fbaaf34ea6dbb6db52776039db62b0ab0bb880744f615d1 \ No newline at end of file
diff --git a/db/schema_migrations/20210917153905 b/db/schema_migrations/20210917153905
deleted file mode 100644
index a4e424dfad3..00000000000
--- a/db/schema_migrations/20210917153905
+++ /dev/null
@@ -1 +0,0 @@
-3f0ac2bbfdfe6a2c05043e02ec383bdc7787f86741d6b2df7da2cc6a7aef9ce3 \ No newline at end of file
diff --git a/db/schema_migrations/20210917224419 b/db/schema_migrations/20210917224419
deleted file mode 100644
index a8b059e7b8d..00000000000
--- a/db/schema_migrations/20210917224419
+++ /dev/null
@@ -1 +0,0 @@
-9204c844b22ad0d3a938ed908377c8baacdda038725a5cf105e4b11841c1ae21 \ No newline at end of file
diff --git a/db/schema_migrations/20210918201050 b/db/schema_migrations/20210918201050
deleted file mode 100644
index 9c8f28bd813..00000000000
--- a/db/schema_migrations/20210918201050
+++ /dev/null
@@ -1 +0,0 @@
-596fd274ca1d0b2ce8698e048fea6080c9b777c48febb35a4917a6027826908e \ No newline at end of file
diff --git a/db/schema_migrations/20210918202855 b/db/schema_migrations/20210918202855
deleted file mode 100644
index f9d48eb269f..00000000000
--- a/db/schema_migrations/20210918202855
+++ /dev/null
@@ -1 +0,0 @@
-a735ae13c13f5492a5c16d3e60884b60c44d1d57f6aaacaea13f3b1bf00a8d78 \ No newline at end of file
diff --git a/db/schema_migrations/20210920104446 b/db/schema_migrations/20210920104446
deleted file mode 100644
index 4687dca7d3c..00000000000
--- a/db/schema_migrations/20210920104446
+++ /dev/null
@@ -1 +0,0 @@
-e7e9b13874081a7df42d07ccc9a54fb81973210d1c175cd995300f6339d57495 \ No newline at end of file
diff --git a/db/schema_migrations/20210920232025 b/db/schema_migrations/20210920232025
deleted file mode 100644
index 1c5b248981f..00000000000
--- a/db/schema_migrations/20210920232025
+++ /dev/null
@@ -1 +0,0 @@
-12dfb473067fc836cd435474405c3ca978d159a13e975f7663fe22c078731fd1 \ No newline at end of file
diff --git a/db/schema_migrations/20210921032008 b/db/schema_migrations/20210921032008
deleted file mode 100644
index 058a4366e4a..00000000000
--- a/db/schema_migrations/20210921032008
+++ /dev/null
@@ -1 +0,0 @@
-262127539fc16715a56e2cf7426f0f8d24922e26847a01a0a15552d71cd148f8 \ No newline at end of file
diff --git a/db/schema_migrations/20210921062820 b/db/schema_migrations/20210921062820
deleted file mode 100644
index 0f83c4cb322..00000000000
--- a/db/schema_migrations/20210921062820
+++ /dev/null
@@ -1 +0,0 @@
-ae98a673b649faf8644990de328470579e121544d4fc417562cc64a7687550ca \ No newline at end of file
diff --git a/db/schema_migrations/20210921063924 b/db/schema_migrations/20210921063924
deleted file mode 100644
index ed849aa174c..00000000000
--- a/db/schema_migrations/20210921063924
+++ /dev/null
@@ -1 +0,0 @@
-4430d4e0d688c85768201ab09056d60151fdc949b4b5f4ebc5397a99b9ec5f83 \ No newline at end of file
diff --git a/db/schema_migrations/20210921191010 b/db/schema_migrations/20210921191010
deleted file mode 100644
index c01a8f41437..00000000000
--- a/db/schema_migrations/20210921191010
+++ /dev/null
@@ -1 +0,0 @@
-8fa4dbfc075036ca379f153e97b7afd2b7600d129f7fb5294dcf4574be9dd7d1 \ No newline at end of file
diff --git a/db/schema_migrations/20210922021816 b/db/schema_migrations/20210922021816
deleted file mode 100644
index 8286647353d..00000000000
--- a/db/schema_migrations/20210922021816
+++ /dev/null
@@ -1 +0,0 @@
-1d18e061cb5bcdaa7d3fcea93e58d65a6f2c8b557fe53ba461b6cfa570f565be \ No newline at end of file
diff --git a/db/schema_migrations/20210922025631 b/db/schema_migrations/20210922025631
deleted file mode 100644
index 217c1d9da25..00000000000
--- a/db/schema_migrations/20210922025631
+++ /dev/null
@@ -1 +0,0 @@
-43b02083323765888f019386138e8fbaa3182d74bd5e8790d6fae6ea6f0a2104 \ No newline at end of file
diff --git a/db/schema_migrations/20210922082019 b/db/schema_migrations/20210922082019
deleted file mode 100644
index c987f19e595..00000000000
--- a/db/schema_migrations/20210922082019
+++ /dev/null
@@ -1 +0,0 @@
-011b714ee5d4389a5a172ae687eea3a814915fb39a5e5eae38b6ee423a903eaf \ No newline at end of file
diff --git a/db/schema_migrations/20210922084115 b/db/schema_migrations/20210922084115
deleted file mode 100644
index 7870576c40e..00000000000
--- a/db/schema_migrations/20210922084115
+++ /dev/null
@@ -1 +0,0 @@
-6401de932d87b684c8a00254231312f8633c66a8ea96670b2761442c771d3d7f \ No newline at end of file
diff --git a/db/schema_migrations/20210922091402 b/db/schema_migrations/20210922091402
deleted file mode 100644
index cb8e307e928..00000000000
--- a/db/schema_migrations/20210922091402
+++ /dev/null
@@ -1 +0,0 @@
-4f3a1dbf39f1955122f94616952bfe04836c43e97268035b2daec3bc16e55e66 \ No newline at end of file
diff --git a/db/schema_migrations/20210922172056 b/db/schema_migrations/20210922172056
deleted file mode 100644
index 834280df2a8..00000000000
--- a/db/schema_migrations/20210922172056
+++ /dev/null
@@ -1 +0,0 @@
-c50ccd9986188356776c2d19c5544a6da6e31b5bb1b16ed259455604cb6fd862 \ No newline at end of file
diff --git a/db/schema_migrations/20210922172156 b/db/schema_migrations/20210922172156
deleted file mode 100644
index 06852710217..00000000000
--- a/db/schema_migrations/20210922172156
+++ /dev/null
@@ -1 +0,0 @@
-083b18b8e687ae8ff9d93ee77c6d4fc2916a2f1b77acf44132f216236b0ff06c \ No newline at end of file
diff --git a/db/schema_migrations/20210922215740 b/db/schema_migrations/20210922215740
deleted file mode 100644
index b7fdf9b4dfe..00000000000
--- a/db/schema_migrations/20210922215740
+++ /dev/null
@@ -1 +0,0 @@
-7b343a5e1fd2600585d8fe4ef7585f91fb4c72da329b6f9474384f7217381d12 \ No newline at end of file
diff --git a/db/schema_migrations/20210922220104 b/db/schema_migrations/20210922220104
deleted file mode 100644
index 0cacca67f8f..00000000000
--- a/db/schema_migrations/20210922220104
+++ /dev/null
@@ -1 +0,0 @@
-ced8a8373bdbf07b2be23701f243f3a9f338776eeaec0a6c4e5cc0e68572a16e \ No newline at end of file
diff --git a/db/schema_migrations/20210923042323 b/db/schema_migrations/20210923042323
deleted file mode 100644
index 944cb833939..00000000000
--- a/db/schema_migrations/20210923042323
+++ /dev/null
@@ -1 +0,0 @@
-7b08303dae62fe9b9b5081221a6aa4bd6b687e0206e78e4b8a6f5964bc42b344 \ No newline at end of file
diff --git a/db/schema_migrations/20210923042324 b/db/schema_migrations/20210923042324
deleted file mode 100644
index 445a6db0351..00000000000
--- a/db/schema_migrations/20210923042324
+++ /dev/null
@@ -1 +0,0 @@
-52785c2791be5c17517335496e7cabd99fba1a82e82d8c783703bd68f8b40163 \ No newline at end of file
diff --git a/db/schema_migrations/20210923042325 b/db/schema_migrations/20210923042325
deleted file mode 100644
index a89582ef187..00000000000
--- a/db/schema_migrations/20210923042325
+++ /dev/null
@@ -1 +0,0 @@
-f253f2bd5643f8cf72f020e5ba5237506833dee84aa98828166d8ad1570f925f \ No newline at end of file
diff --git a/db/schema_migrations/20210923133143 b/db/schema_migrations/20210923133143
deleted file mode 100644
index c0e7bb485fb..00000000000
--- a/db/schema_migrations/20210923133143
+++ /dev/null
@@ -1 +0,0 @@
-d2736a06009d6232d832a03d6842a81b1de2ce79b901331a0e09ac40fc51a463 \ No newline at end of file
diff --git a/db/schema_migrations/20210923135909 b/db/schema_migrations/20210923135909
deleted file mode 100644
index b7b1ecc6bf2..00000000000
--- a/db/schema_migrations/20210923135909
+++ /dev/null
@@ -1 +0,0 @@
-2afb8292fcdf9a56c11d9404275ffecfde4b2a474e733e3e19f4db62c628aa6c \ No newline at end of file
diff --git a/db/schema_migrations/20210923151641 b/db/schema_migrations/20210923151641
deleted file mode 100644
index bd38d8c6a28..00000000000
--- a/db/schema_migrations/20210923151641
+++ /dev/null
@@ -1 +0,0 @@
-30c135ab62a57208160dd0949d6615f42af39117e25769d70a9658de5417b7e4 \ No newline at end of file
diff --git a/db/schema_migrations/20210923192648 b/db/schema_migrations/20210923192648
deleted file mode 100644
index 5514ec65903..00000000000
--- a/db/schema_migrations/20210923192648
+++ /dev/null
@@ -1 +0,0 @@
-d9cb520f198893019b24c970ba409471e3d98581eb62f746320fc6e81a16af08 \ No newline at end of file
diff --git a/db/schema_migrations/20210923192649 b/db/schema_migrations/20210923192649
deleted file mode 100644
index e91955f09fe..00000000000
--- a/db/schema_migrations/20210923192649
+++ /dev/null
@@ -1 +0,0 @@
-12fb550e936ede5a8e83ab06f2fc535201e7a276295a2103564412ded32958f8 \ No newline at end of file
diff --git a/db/schema_migrations/20210927153807 b/db/schema_migrations/20210927153807
deleted file mode 100644
index c6a675e380b..00000000000
--- a/db/schema_migrations/20210927153807
+++ /dev/null
@@ -1 +0,0 @@
-8e54f43a955023e422bf40476f468fbdf04f06e806b08fddf35208c65607fec3 \ No newline at end of file
diff --git a/db/schema_migrations/20210928155022 b/db/schema_migrations/20210928155022
deleted file mode 100644
index d953746413a..00000000000
--- a/db/schema_migrations/20210928155022
+++ /dev/null
@@ -1 +0,0 @@
-41ea0971cd62ba43bf98c1901169e7bb8fcebe68025d947f26b0ccf6806c976e \ No newline at end of file
diff --git a/db/schema_migrations/20210928171122 b/db/schema_migrations/20210928171122
deleted file mode 100644
index ccddd09345b..00000000000
--- a/db/schema_migrations/20210928171122
+++ /dev/null
@@ -1 +0,0 @@
-f257ff9896e2d90ced39c2c010df1d4b74badae046651a190585c9c47342d119 \ No newline at end of file
diff --git a/db/schema_migrations/20210929025600 b/db/schema_migrations/20210929025600
deleted file mode 100644
index fb00216afac..00000000000
--- a/db/schema_migrations/20210929025600
+++ /dev/null
@@ -1 +0,0 @@
-c757a7e17433b8ddf15ae6304286fe3da69f820966455e7fbed7282286f5eb67 \ No newline at end of file
diff --git a/db/schema_migrations/20210929030834 b/db/schema_migrations/20210929030834
deleted file mode 100644
index a3dc19d0440..00000000000
--- a/db/schema_migrations/20210929030834
+++ /dev/null
@@ -1 +0,0 @@
-b5302b3a2384bd7d0e639f00941efb490c3121a9332f1e73be620ab0f6f3e771 \ No newline at end of file
diff --git a/db/schema_migrations/20210929031049 b/db/schema_migrations/20210929031049
deleted file mode 100644
index 19ba54b465a..00000000000
--- a/db/schema_migrations/20210929031049
+++ /dev/null
@@ -1 +0,0 @@
-d3f588e4edded61f36acbf25fba39be17a2ac16f37e9114f2c5c257c47dc1308 \ No newline at end of file
diff --git a/db/schema_migrations/20210929032555 b/db/schema_migrations/20210929032555
deleted file mode 100644
index 779e6a63fe2..00000000000
--- a/db/schema_migrations/20210929032555
+++ /dev/null
@@ -1 +0,0 @@
-08593002910759482c58f9b31f251d589ab32b540d9614a2c677df11d32f7f26 \ No newline at end of file
diff --git a/db/schema_migrations/20210929115340 b/db/schema_migrations/20210929115340
deleted file mode 100644
index 2f6bf226e09..00000000000
--- a/db/schema_migrations/20210929115340
+++ /dev/null
@@ -1 +0,0 @@
-0de2844fdec43eca860648bdb1a5b184bcc0f79b51086b16d8ef398f32cfd5de \ No newline at end of file
diff --git a/db/schema_migrations/20210929121516 b/db/schema_migrations/20210929121516
deleted file mode 100644
index c42d39c9c34..00000000000
--- a/db/schema_migrations/20210929121516
+++ /dev/null
@@ -1 +0,0 @@
-432dc1f1e0280a79e4a6af56c2f2cb40c99edbc09e254b82b7f48c7c9217372b \ No newline at end of file
diff --git a/db/schema_migrations/20210929144453 b/db/schema_migrations/20210929144453
deleted file mode 100644
index 753ea50c272..00000000000
--- a/db/schema_migrations/20210929144453
+++ /dev/null
@@ -1 +0,0 @@
-0f808c27d19e6a38d4aa31f2dd820fe226681af84e05c4af47213409b2043e5a \ No newline at end of file
diff --git a/db/schema_migrations/20210930081208 b/db/schema_migrations/20210930081208
deleted file mode 100644
index a0c1d701717..00000000000
--- a/db/schema_migrations/20210930081208
+++ /dev/null
@@ -1 +0,0 @@
-4b2c1b8e80f481d2dbbcfcb61c0a3d3081cbe4081fdd710040a028d72bd5d0e4 \ No newline at end of file
diff --git a/db/schema_migrations/20210930211936 b/db/schema_migrations/20210930211936
deleted file mode 100644
index 4538ddf180d..00000000000
--- a/db/schema_migrations/20210930211936
+++ /dev/null
@@ -1 +0,0 @@
-3aaf2a4fa834331768e2acc10f67b8d456e70aca9784787e40b55dade7b6f64c \ No newline at end of file
diff --git a/db/schema_migrations/20211001001222 b/db/schema_migrations/20211001001222
deleted file mode 100644
index 2b0ebb346a9..00000000000
--- a/db/schema_migrations/20211001001222
+++ /dev/null
@@ -1 +0,0 @@
-23be5444bb11f731e98edc9b6aad814d02fd0f3f6be9abdea9060898cc2b95f1 \ No newline at end of file
diff --git a/db/schema_migrations/20211004062942 b/db/schema_migrations/20211004062942
deleted file mode 100644
index 6ad1af289f7..00000000000
--- a/db/schema_migrations/20211004062942
+++ /dev/null
@@ -1 +0,0 @@
-95dcfdc6c03705b0db5e96d669051edf335b5d6501243f70588f9b73478116a6 \ No newline at end of file
diff --git a/db/schema_migrations/20211004075629 b/db/schema_migrations/20211004075629
deleted file mode 100644
index d55f7370798..00000000000
--- a/db/schema_migrations/20211004075629
+++ /dev/null
@@ -1 +0,0 @@
-e035616201329b7610e8c3a647bc01c52ce722790ea7bb88d4a38bc0feb4737e \ No newline at end of file
diff --git a/db/schema_migrations/20211004081911 b/db/schema_migrations/20211004081911
deleted file mode 100644
index c849cb776d8..00000000000
--- a/db/schema_migrations/20211004081911
+++ /dev/null
@@ -1 +0,0 @@
-cc53e8c85fdb00c0772987516e0c23f5349cc6dc1e21b4124eb50efdaa6a4fcd \ No newline at end of file
diff --git a/db/schema_migrations/20211004110500 b/db/schema_migrations/20211004110500
deleted file mode 100644
index e22ed05de83..00000000000
--- a/db/schema_migrations/20211004110500
+++ /dev/null
@@ -1 +0,0 @@
-1b0b562aefb724afe24b8640a22013cea6fddd0e594d6723f6819f69804ba9f7 \ No newline at end of file
diff --git a/db/schema_migrations/20211004110927 b/db/schema_migrations/20211004110927
deleted file mode 100644
index aa70a4aa0d8..00000000000
--- a/db/schema_migrations/20211004110927
+++ /dev/null
@@ -1 +0,0 @@
-50c937f979c83f6937364d92bf65ed42ef963f2d241eadcee6355c1b256c3ec9 \ No newline at end of file
diff --git a/db/schema_migrations/20211004122540 b/db/schema_migrations/20211004122540
deleted file mode 100644
index 1c7fc785b29..00000000000
--- a/db/schema_migrations/20211004122540
+++ /dev/null
@@ -1 +0,0 @@
-72358f01061f5296e21647d5da9bbb6a33e94055c9c9aded6088cfb9126564b2 \ No newline at end of file
diff --git a/db/schema_migrations/20211004151202 b/db/schema_migrations/20211004151202
deleted file mode 100644
index f21ef531938..00000000000
--- a/db/schema_migrations/20211004151202
+++ /dev/null
@@ -1 +0,0 @@
-88f8e8391a480450a3d76d98f089e1e2287048007d0ecdcbd0799c9cc021481f \ No newline at end of file
diff --git a/db/schema_migrations/20211005010101 b/db/schema_migrations/20211005010101
deleted file mode 100644
index 9789f36adea..00000000000
--- a/db/schema_migrations/20211005010101
+++ /dev/null
@@ -1 +0,0 @@
-40e15593d9ee0fb5a59d1576c6da5a1eece265730f7ae15c5c81c2c5343b362c \ No newline at end of file
diff --git a/db/schema_migrations/20211005063519 b/db/schema_migrations/20211005063519
deleted file mode 100644
index d3450d4282a..00000000000
--- a/db/schema_migrations/20211005063519
+++ /dev/null
@@ -1 +0,0 @@
-e45163c2d0d691fb5deab86d024c4edb8e3cd350271418e1ff132c31e2ca90a3 \ No newline at end of file
diff --git a/db/schema_migrations/20211005063616 b/db/schema_migrations/20211005063616
deleted file mode 100644
index 030dfc12a68..00000000000
--- a/db/schema_migrations/20211005063616
+++ /dev/null
@@ -1 +0,0 @@
-20d35e9baae343bccbb67a25eacd7fdb4b32fd4cedd95e6f8f7a2933470350fb \ No newline at end of file
diff --git a/db/schema_migrations/20211005063723 b/db/schema_migrations/20211005063723
deleted file mode 100644
index b4d8c7a3f6e..00000000000
--- a/db/schema_migrations/20211005063723
+++ /dev/null
@@ -1 +0,0 @@
-4659ab6d971b03d9b44dda72fe1b571c5050fd6892cb4f16f2ca1ced0905c1ce \ No newline at end of file
diff --git a/db/schema_migrations/20211005083015 b/db/schema_migrations/20211005083015
deleted file mode 100644
index 0e5a20b824f..00000000000
--- a/db/schema_migrations/20211005083015
+++ /dev/null
@@ -1 +0,0 @@
-37016ec5e5ab1bd8d2bd8020f98277b3ad9f450b833ce3ebde70aebce5130a26 \ No newline at end of file
diff --git a/db/schema_migrations/20211005092428 b/db/schema_migrations/20211005092428
deleted file mode 100644
index 0ac1a5f6ee6..00000000000
--- a/db/schema_migrations/20211005092428
+++ /dev/null
@@ -1 +0,0 @@
-43abb71ecc1f1b4e699af1258934884a06e4e4eb1445ec3cc7a2c6668f42f14a \ No newline at end of file
diff --git a/db/schema_migrations/20211005093558 b/db/schema_migrations/20211005093558
deleted file mode 100644
index 943f905b497..00000000000
--- a/db/schema_migrations/20211005093558
+++ /dev/null
@@ -1 +0,0 @@
-16638e14f1920b2e615dcb14965b7ef2a16ead099e7f8b1cdad6dd75d6d45107 \ No newline at end of file
diff --git a/db/schema_migrations/20211005100112 b/db/schema_migrations/20211005100112
deleted file mode 100644
index 1f7a92ca316..00000000000
--- a/db/schema_migrations/20211005100112
+++ /dev/null
@@ -1 +0,0 @@
-196cd1cf84babb12e92830bf2b7a0315499fdb976f825d4913a506e744b4fd53 \ No newline at end of file
diff --git a/db/schema_migrations/20211005112404 b/db/schema_migrations/20211005112404
deleted file mode 100644
index 80ce0534de8..00000000000
--- a/db/schema_migrations/20211005112404
+++ /dev/null
@@ -1 +0,0 @@
-f4fe6c4a2860dd35f767d98d5025326142cab7fc9c12b5efb1541e2604791691 \ No newline at end of file
diff --git a/db/schema_migrations/20211005112645 b/db/schema_migrations/20211005112645
deleted file mode 100644
index e17b00586e5..00000000000
--- a/db/schema_migrations/20211005112645
+++ /dev/null
@@ -1 +0,0 @@
-59e5de7766dc55e820ec714fbb61b5db61a73959f1e877e66caf668f93d0d633 \ No newline at end of file
diff --git a/db/schema_migrations/20211005194425 b/db/schema_migrations/20211005194425
deleted file mode 100644
index cd3710a6492..00000000000
--- a/db/schema_migrations/20211005194425
+++ /dev/null
@@ -1 +0,0 @@
-6647e94d315c76629f9726e26bafd124fb2fed361568d65315e7c7557f8d9ecf \ No newline at end of file
diff --git a/db/schema_migrations/20211006060254 b/db/schema_migrations/20211006060254
deleted file mode 100644
index 2891170a092..00000000000
--- a/db/schema_migrations/20211006060254
+++ /dev/null
@@ -1 +0,0 @@
-0d6ec7c1d96f32c645ddc051d8e3b3bd0ad759c52c8938888287b1c6b57d27a3 \ No newline at end of file
diff --git a/db/schema_migrations/20211006060436 b/db/schema_migrations/20211006060436
deleted file mode 100644
index e2374c092c7..00000000000
--- a/db/schema_migrations/20211006060436
+++ /dev/null
@@ -1 +0,0 @@
-918852db691546e4e93a933789968115ac98b5757d480ed1e09118508e6024d5 \ No newline at end of file
diff --git a/db/schema_migrations/20211006103122 b/db/schema_migrations/20211006103122
deleted file mode 100644
index 4d2347702de..00000000000
--- a/db/schema_migrations/20211006103122
+++ /dev/null
@@ -1 +0,0 @@
-1e29e4712d81aacf1178996c2dd9e82593be5a2311273800d91640d8eccd38ed \ No newline at end of file
diff --git a/db/schema_migrations/20211006122010 b/db/schema_migrations/20211006122010
deleted file mode 100644
index 6758ab4978a..00000000000
--- a/db/schema_migrations/20211006122010
+++ /dev/null
@@ -1 +0,0 @@
-19efbbf7aab5837e33ff72d87e101a76da7eeb1d60c05ffc0ceddad1d0cbc69c \ No newline at end of file
diff --git a/db/schema_migrations/20211006145004 b/db/schema_migrations/20211006145004
deleted file mode 100644
index 6a99396d34a..00000000000
--- a/db/schema_migrations/20211006145004
+++ /dev/null
@@ -1 +0,0 @@
-9fca672eaa0b82a37c211de35a4961b81fb163d290004907be7bf641327c65b1 \ No newline at end of file
diff --git a/db/schema_migrations/20211006174114 b/db/schema_migrations/20211006174114
deleted file mode 100644
index 1d015b78676..00000000000
--- a/db/schema_migrations/20211006174114
+++ /dev/null
@@ -1 +0,0 @@
-15d1bc08a87241b4217278ce8214f41d1d3c0cc4c26a3e659f395a602d139758 \ No newline at end of file
diff --git a/db/schema_migrations/20211007090229 b/db/schema_migrations/20211007090229
deleted file mode 100644
index 9302c958709..00000000000
--- a/db/schema_migrations/20211007090229
+++ /dev/null
@@ -1 +0,0 @@
-9d87052305a552ce380e81a33c690496c44e332eb86869ea6882f5cd4856ab93 \ No newline at end of file
diff --git a/db/schema_migrations/20211007093340 b/db/schema_migrations/20211007093340
deleted file mode 100644
index 9b11d742548..00000000000
--- a/db/schema_migrations/20211007093340
+++ /dev/null
@@ -1 +0,0 @@
-fbb3092caba901ddd5a740bb67a91d1c8a4c458651afaf02704399844acbd2b8 \ No newline at end of file
diff --git a/db/schema_migrations/20211007113136 b/db/schema_migrations/20211007113136
deleted file mode 100644
index dc245a3723b..00000000000
--- a/db/schema_migrations/20211007113136
+++ /dev/null
@@ -1 +0,0 @@
-7abcc243cd02a4eba77ea39cbb1b1f2de74d85e55055def9ae02c4fdeaba3d9a \ No newline at end of file
diff --git a/db/schema_migrations/20211007155221 b/db/schema_migrations/20211007155221
deleted file mode 100644
index 662668fe983..00000000000
--- a/db/schema_migrations/20211007155221
+++ /dev/null
@@ -1 +0,0 @@
-115427979cd7ecfc14bf4f663a9afd5abc6d481d08fafc13ca7e6a8cac9ba20c \ No newline at end of file
diff --git a/db/schema_migrations/20211008043855 b/db/schema_migrations/20211008043855
deleted file mode 100644
index 0abc8393efa..00000000000
--- a/db/schema_migrations/20211008043855
+++ /dev/null
@@ -1 +0,0 @@
-166ae24ae4856488c81a71c650dca038c8cd7cb2221545e84431e118da097688 \ No newline at end of file
diff --git a/db/schema_migrations/20211008181451 b/db/schema_migrations/20211008181451
deleted file mode 100644
index 1687056609f..00000000000
--- a/db/schema_migrations/20211008181451
+++ /dev/null
@@ -1 +0,0 @@
-b4104ebb3d99100ed5b6831174af563ea7cda46428007e30219198b910313b05 \ No newline at end of file
diff --git a/db/schema_migrations/20211008182954 b/db/schema_migrations/20211008182954
deleted file mode 100644
index e530f090840..00000000000
--- a/db/schema_migrations/20211008182954
+++ /dev/null
@@ -1 +0,0 @@
-d16b96a960e03e50135802885f5b8c44168d2413f3db1f53ac15389a33dddc61 \ No newline at end of file
diff --git a/db/schema_migrations/20211008193137 b/db/schema_migrations/20211008193137
deleted file mode 100644
index 57d2f8cfbc8..00000000000
--- a/db/schema_migrations/20211008193137
+++ /dev/null
@@ -1 +0,0 @@
-97efc3bb2039b66dac98135d93baefc780a62571bd80aa39d7458f37ce92905b \ No newline at end of file
diff --git a/db/schema_migrations/20211011004242 b/db/schema_migrations/20211011004242
deleted file mode 100644
index f25581cae75..00000000000
--- a/db/schema_migrations/20211011004242
+++ /dev/null
@@ -1 +0,0 @@
-88bb0ca64281134fd97be474a1bb2be3ee60e59f10b9e144776a3282bba5a4c5 \ No newline at end of file
diff --git a/db/schema_migrations/20211011104843 b/db/schema_migrations/20211011104843
deleted file mode 100644
index 78789b94ece..00000000000
--- a/db/schema_migrations/20211011104843
+++ /dev/null
@@ -1 +0,0 @@
-e2812344b16cd51c544235bae8a365713ab7e34652c2c05511a7fe9d84c05fb1 \ No newline at end of file
diff --git a/db/schema_migrations/20211011140930 b/db/schema_migrations/20211011140930
deleted file mode 100644
index 6347ee5d51d..00000000000
--- a/db/schema_migrations/20211011140930
+++ /dev/null
@@ -1 +0,0 @@
-cdae819e8de3b5ad721014376bfd9af97a45e953e2d345daf62784f986a5eb31 \ No newline at end of file
diff --git a/db/schema_migrations/20211011140931 b/db/schema_migrations/20211011140931
deleted file mode 100644
index c959d97074e..00000000000
--- a/db/schema_migrations/20211011140931
+++ /dev/null
@@ -1 +0,0 @@
-7e51eb4443fd74da9bef4d9c1c3cc40376c311abbc05ca7871f725fada79b48a \ No newline at end of file
diff --git a/db/schema_migrations/20211011140932 b/db/schema_migrations/20211011140932
deleted file mode 100644
index af0e000b9f3..00000000000
--- a/db/schema_migrations/20211011140932
+++ /dev/null
@@ -1 +0,0 @@
-0209db1e7be48bcbf0e52b451d37da0ef2ecadd567cdfa47907fc5032c258a27 \ No newline at end of file
diff --git a/db/schema_migrations/20211011141239 b/db/schema_migrations/20211011141239
deleted file mode 100644
index f215f234a7e..00000000000
--- a/db/schema_migrations/20211011141239
+++ /dev/null
@@ -1 +0,0 @@
-bc0ae055b331801fbe020c12a66e4e6ae790780121bfd66fd161093c94c7a84a \ No newline at end of file
diff --git a/db/schema_migrations/20211011141242 b/db/schema_migrations/20211011141242
deleted file mode 100644
index 01d082a4bc8..00000000000
--- a/db/schema_migrations/20211011141242
+++ /dev/null
@@ -1 +0,0 @@
-9fd4977cdb57df827fe1a01f55a305d832ee4240d40af9396e093e3b4dbd1e33 \ No newline at end of file
diff --git a/db/schema_migrations/20211011141243 b/db/schema_migrations/20211011141243
deleted file mode 100644
index cb2df22b8d7..00000000000
--- a/db/schema_migrations/20211011141243
+++ /dev/null
@@ -1 +0,0 @@
-b3ce6aa41c70cdcf8637a94c3d4d4e97730899221530f5507c4581aaf2fc3a6c \ No newline at end of file
diff --git a/db/schema_migrations/20211011152701 b/db/schema_migrations/20211011152701
deleted file mode 100644
index fcd6f8ad953..00000000000
--- a/db/schema_migrations/20211011152701
+++ /dev/null
@@ -1 +0,0 @@
-5701681a1006584149c88da520f780b186ca32ba1facb8b952252c6d426b6c0d \ No newline at end of file
diff --git a/db/schema_migrations/20211012015903 b/db/schema_migrations/20211012015903
deleted file mode 100644
index bfa36780370..00000000000
--- a/db/schema_migrations/20211012015903
+++ /dev/null
@@ -1 +0,0 @@
-4c3a55f7891dab4ee1ae019d97cf9d40e7bba81d87a544d6aa23a7f57e6d0f70 \ No newline at end of file
diff --git a/db/schema_migrations/20211012051221 b/db/schema_migrations/20211012051221
deleted file mode 100644
index 0dc5e9331e1..00000000000
--- a/db/schema_migrations/20211012051221
+++ /dev/null
@@ -1 +0,0 @@
-52b2a6d78fa649078167e842061ab7c04e3c41c0fc4a092a0a6123dad202fb0e \ No newline at end of file
diff --git a/db/schema_migrations/20211012091822 b/db/schema_migrations/20211012091822
deleted file mode 100644
index 09c198571af..00000000000
--- a/db/schema_migrations/20211012091822
+++ /dev/null
@@ -1 +0,0 @@
-3482e5c12f1603cb67d24aee14f003345ef2a5c350c7dccafdea6554db04c4cc \ No newline at end of file
diff --git a/db/schema_migrations/20211012134316 b/db/schema_migrations/20211012134316
deleted file mode 100644
index 72e01841ddf..00000000000
--- a/db/schema_migrations/20211012134316
+++ /dev/null
@@ -1 +0,0 @@
-0f2578f0266154ad2790cc808233c71566b3a3ea87c40909feba9ccc5872927c \ No newline at end of file
diff --git a/db/schema_migrations/20211012143815 b/db/schema_migrations/20211012143815
deleted file mode 100644
index 6e6a5493e99..00000000000
--- a/db/schema_migrations/20211012143815
+++ /dev/null
@@ -1 +0,0 @@
-2685a534728ab1a50acb49a7a5ac7d9285fdc36ec3610b93a4219e6687c22b06 \ No newline at end of file
diff --git a/db/schema_migrations/20211012155931 b/db/schema_migrations/20211012155931
deleted file mode 100644
index 1974e553fb7..00000000000
--- a/db/schema_migrations/20211012155931
+++ /dev/null
@@ -1 +0,0 @@
-0a9317419b856ba2abf3cad07c43ccfc79abfcd5efd02c464ee76f4debe362c8 \ No newline at end of file
diff --git a/db/schema_migrations/20211013014228 b/db/schema_migrations/20211013014228
deleted file mode 100644
index 5a833b7ee14..00000000000
--- a/db/schema_migrations/20211013014228
+++ /dev/null
@@ -1 +0,0 @@
-5316cfddc074ae5a320ba763dd9481b46ba47d30eefa28d6bb5caa9368027598 \ No newline at end of file
diff --git a/db/schema_migrations/20211013080714 b/db/schema_migrations/20211013080714
deleted file mode 100644
index 3579bdf3c78..00000000000
--- a/db/schema_migrations/20211013080714
+++ /dev/null
@@ -1 +0,0 @@
-5c5adaf0f6f053c7e737051fbccf61d1fc36e20360a82d5fca142883d3e3bfdd \ No newline at end of file
diff --git a/db/schema_migrations/20211013080715 b/db/schema_migrations/20211013080715
deleted file mode 100644
index ff2d473c946..00000000000
--- a/db/schema_migrations/20211013080715
+++ /dev/null
@@ -1 +0,0 @@
-06d6458f7b85b3e729c3c8a8ae29c29f7c5504ea330ae3a3bcf1e0074ed66cf6 \ No newline at end of file
diff --git a/db/schema_migrations/20211013080716 b/db/schema_migrations/20211013080716
deleted file mode 100644
index d2131eb811a..00000000000
--- a/db/schema_migrations/20211013080716
+++ /dev/null
@@ -1 +0,0 @@
-a5928cef69626ad5e972e8cb7a570ca83201cdfe7ec4f2401f2aa14c34b9cfb8 \ No newline at end of file
diff --git a/db/schema_migrations/20211013125341 b/db/schema_migrations/20211013125341
deleted file mode 100644
index 6177dfa56bc..00000000000
--- a/db/schema_migrations/20211013125341
+++ /dev/null
@@ -1 +0,0 @@
-933c37a1a44869588b6586d34dec6bc8d731c81b6e5889ce588d535c011b9340 \ No newline at end of file
diff --git a/db/schema_migrations/20211013192749 b/db/schema_migrations/20211013192749
deleted file mode 100644
index 54f05dc3fd6..00000000000
--- a/db/schema_migrations/20211013192749
+++ /dev/null
@@ -1 +0,0 @@
-eeda27c42a80d23851bb58b00cee79feeffbe9ae1fef76b3034f92c8610a8aaf \ No newline at end of file
diff --git a/db/schema_migrations/20211015021114 b/db/schema_migrations/20211015021114
deleted file mode 100644
index 1acbe9eded3..00000000000
--- a/db/schema_migrations/20211015021114
+++ /dev/null
@@ -1 +0,0 @@
-687fa7d06a8d74b561d2b392e706fb209dbb1c0c8a483ad066820d29f7df059b \ No newline at end of file
diff --git a/db/schema_migrations/20211015024135 b/db/schema_migrations/20211015024135
deleted file mode 100644
index 9f40fe5b71c..00000000000
--- a/db/schema_migrations/20211015024135
+++ /dev/null
@@ -1 +0,0 @@
-d3cafd6eb712ba3f11aa0e2bddc15bf312230e52d53ba8b7ae6c8d3cfd4aabcc \ No newline at end of file
diff --git a/db/schema_migrations/20211018101034 b/db/schema_migrations/20211018101034
deleted file mode 100644
index 57b1cc1e3c2..00000000000
--- a/db/schema_migrations/20211018101034
+++ /dev/null
@@ -1 +0,0 @@
-1cadc3a932d5b62cfeafcd4090eddc37b44997dbbd0b34da1c7c87a5774bb683 \ No newline at end of file
diff --git a/db/schema_migrations/20211018101552 b/db/schema_migrations/20211018101552
deleted file mode 100644
index 3814122d9a3..00000000000
--- a/db/schema_migrations/20211018101552
+++ /dev/null
@@ -1 +0,0 @@
-9a62f0ec43ab295619d82494090c38539cb16408c8971bdde86bb8d02546f558 \ No newline at end of file
diff --git a/db/schema_migrations/20211018101852 b/db/schema_migrations/20211018101852
deleted file mode 100644
index 5288e753211..00000000000
--- a/db/schema_migrations/20211018101852
+++ /dev/null
@@ -1 +0,0 @@
-30e9632877d3ad33528be0f56962c0ab57f5eee3889183d9638cbaea903a3d82 \ No newline at end of file
diff --git a/db/schema_migrations/20211018102252 b/db/schema_migrations/20211018102252
deleted file mode 100644
index 7d8b2c19da1..00000000000
--- a/db/schema_migrations/20211018102252
+++ /dev/null
@@ -1 +0,0 @@
-14bb815cbdad2db56dafb7eaaff893de96116a1a9e8d6c5ed95f4bef9b9717fc \ No newline at end of file
diff --git a/db/schema_migrations/20211018123316 b/db/schema_migrations/20211018123316
deleted file mode 100644
index 37bf0b261f1..00000000000
--- a/db/schema_migrations/20211018123316
+++ /dev/null
@@ -1 +0,0 @@
-fcee17f25ad3a8b6fb56c23b72978f4a6952200264d285b9e3df4b5e7733e8f6 \ No newline at end of file
diff --git a/db/schema_migrations/20211018152654 b/db/schema_migrations/20211018152654
deleted file mode 100644
index 86e9980ad10..00000000000
--- a/db/schema_migrations/20211018152654
+++ /dev/null
@@ -1 +0,0 @@
-fd7b6eb9439c00334f613e3e4977e44054930c1343e5df32bbe82c64acd6ca7b \ No newline at end of file
diff --git a/db/schema_migrations/20211018161447 b/db/schema_migrations/20211018161447
deleted file mode 100644
index e10f5b06d9a..00000000000
--- a/db/schema_migrations/20211018161447
+++ /dev/null
@@ -1 +0,0 @@
-168b383c4a85de35ade8a26e442ca49a40342ba05fb23fab4f0444814d976f65 \ No newline at end of file
diff --git a/db/schema_migrations/20211019153615 b/db/schema_migrations/20211019153615
deleted file mode 100644
index 7c1c7d7775f..00000000000
--- a/db/schema_migrations/20211019153615
+++ /dev/null
@@ -1 +0,0 @@
-713efc9673bc6cda8eff4e433c3c85f0cc4b8b8ca7b5cc4308e57a6d0b0040a0 \ No newline at end of file
diff --git a/db/schema_migrations/20211020030948 b/db/schema_migrations/20211020030948
deleted file mode 100644
index 1964b852444..00000000000
--- a/db/schema_migrations/20211020030948
+++ /dev/null
@@ -1 +0,0 @@
-97e8b2ce324594581ec0af65840a0dde8271b1b2712e22059f5c26b30d7d5cac \ No newline at end of file
diff --git a/db/schema_migrations/20211020095357 b/db/schema_migrations/20211020095357
deleted file mode 100644
index 7fcb8fa6866..00000000000
--- a/db/schema_migrations/20211020095357
+++ /dev/null
@@ -1 +0,0 @@
-a62ac8920223469c6e4c5a7f67ce9eec972189c98a8c542b377afe4ab28ee25a \ No newline at end of file
diff --git a/db/schema_migrations/20211021115409 b/db/schema_migrations/20211021115409
deleted file mode 100644
index bcbed298377..00000000000
--- a/db/schema_migrations/20211021115409
+++ /dev/null
@@ -1 +0,0 @@
-93960203e6703716f9c513dca340e17041a33792f9233dc4b7e35d1e19614191 \ No newline at end of file
diff --git a/db/schema_migrations/20211021124715 b/db/schema_migrations/20211021124715
deleted file mode 100644
index 2d03c608bac..00000000000
--- a/db/schema_migrations/20211021124715
+++ /dev/null
@@ -1 +0,0 @@
-406af18458c7f5ee8a4fa3860ed5fb87c358363926fed2830be8e8a55578822b \ No newline at end of file
diff --git a/db/schema_migrations/20211021125908 b/db/schema_migrations/20211021125908
deleted file mode 100644
index 9cb92e1eabe..00000000000
--- a/db/schema_migrations/20211021125908
+++ /dev/null
@@ -1 +0,0 @@
-d6fbe3efc3e45b750d82e277e30b7b0048b960d9f9f5b4f7c6a7a1ed869e76b5 \ No newline at end of file
diff --git a/db/schema_migrations/20211021131217 b/db/schema_migrations/20211021131217
deleted file mode 100644
index 70b45512900..00000000000
--- a/db/schema_migrations/20211021131217
+++ /dev/null
@@ -1 +0,0 @@
-87834e00821eb1ed8489c1d772dc3ac743bcf84669e78c04c7988f6f761970b8 \ No newline at end of file
diff --git a/db/schema_migrations/20211021134458 b/db/schema_migrations/20211021134458
deleted file mode 100644
index dc168e12229..00000000000
--- a/db/schema_migrations/20211021134458
+++ /dev/null
@@ -1 +0,0 @@
-1baa8db0d42a8d99e48b61930f5c42d1af5f86555488419b6551e1dbf417d3ad \ No newline at end of file
diff --git a/db/schema_migrations/20211021140426 b/db/schema_migrations/20211021140426
deleted file mode 100644
index c32db84a138..00000000000
--- a/db/schema_migrations/20211021140426
+++ /dev/null
@@ -1 +0,0 @@
-bc7974917509bfbda47375299009295bc5a55970b92443dd5d7134075b161279 \ No newline at end of file
diff --git a/db/schema_migrations/20211021141930 b/db/schema_migrations/20211021141930
deleted file mode 100644
index 294e1c80aea..00000000000
--- a/db/schema_migrations/20211021141930
+++ /dev/null
@@ -1 +0,0 @@
-483e4cbe2a0be2afbda511f2298e3715abaca29afafeeae26449fc862f49a08f \ No newline at end of file
diff --git a/db/schema_migrations/20211022112202 b/db/schema_migrations/20211022112202
deleted file mode 100644
index 6ef610f80bc..00000000000
--- a/db/schema_migrations/20211022112202
+++ /dev/null
@@ -1 +0,0 @@
-b5fbbfe186b3eeeb88bfd901ac426fc52355b71b67c5f5b42373008c19c35bee \ No newline at end of file
diff --git a/db/schema_migrations/20211022113000 b/db/schema_migrations/20211022113000
deleted file mode 100644
index 85044f34206..00000000000
--- a/db/schema_migrations/20211022113000
+++ /dev/null
@@ -1 +0,0 @@
-ded528d0485951403f1c5af804f40b1c0a7c71a0dc67f24fadbc357a45fb1a19 \ No newline at end of file
diff --git a/db/schema_migrations/20211022160154 b/db/schema_migrations/20211022160154
deleted file mode 100644
index 2a76379bc66..00000000000
--- a/db/schema_migrations/20211022160154
+++ /dev/null
@@ -1 +0,0 @@
-c474870a626c909da772a1c9f459f369d50658ce8f585a35e7cc3c7ef64af657 \ No newline at end of file
diff --git a/db/schema_migrations/20211022214523 b/db/schema_migrations/20211022214523
deleted file mode 100644
index b47f13696b0..00000000000
--- a/db/schema_migrations/20211022214523
+++ /dev/null
@@ -1 +0,0 @@
-b372da05f40fa67680b6a28ddf9bed3dc4b95795c144bf4367e4826b5cd64d6b \ No newline at end of file
diff --git a/db/schema_migrations/20211023102243 b/db/schema_migrations/20211023102243
deleted file mode 100644
index ec507da6b47..00000000000
--- a/db/schema_migrations/20211023102243
+++ /dev/null
@@ -1 +0,0 @@
-f5039be0bd028dab4f2623fe9997a95d50bd9020ffd8b92074418024cda39b6a \ No newline at end of file
diff --git a/db/schema_migrations/20211025103744 b/db/schema_migrations/20211025103744
deleted file mode 100644
index 29c49c81606..00000000000
--- a/db/schema_migrations/20211025103744
+++ /dev/null
@@ -1 +0,0 @@
-56f86f2a20509f2052d0eab918a6d2bbb679d785cf5349916ba695aa92f0609f \ No newline at end of file
diff --git a/db/schema_migrations/20211025103758 b/db/schema_migrations/20211025103758
deleted file mode 100644
index 902973a42d9..00000000000
--- a/db/schema_migrations/20211025103758
+++ /dev/null
@@ -1 +0,0 @@
-1722382c5141157497f48b209c0fa60c5959fa16c53d09fb6e8e6b2cb6e6ab9b \ No newline at end of file
diff --git a/db/schema_migrations/20211026070408 b/db/schema_migrations/20211026070408
deleted file mode 100644
index e48db972388..00000000000
--- a/db/schema_migrations/20211026070408
+++ /dev/null
@@ -1 +0,0 @@
-630899d5a7f833ce0533ae553de89e70bd03fad9b438fd367e3a568261b08b00 \ No newline at end of file
diff --git a/db/schema_migrations/20211026124336 b/db/schema_migrations/20211026124336
deleted file mode 100644
index dc6663e81a8..00000000000
--- a/db/schema_migrations/20211026124336
+++ /dev/null
@@ -1 +0,0 @@
-a6807d2c17c4efdc759f39101856d7a082ae4d531ca3ced525de10e3de808b9d \ No newline at end of file
diff --git a/db/schema_migrations/20211026143238 b/db/schema_migrations/20211026143238
deleted file mode 100644
index 9f0e7f76cd9..00000000000
--- a/db/schema_migrations/20211026143238
+++ /dev/null
@@ -1 +0,0 @@
-6b1377dd7e9b78a35c2f5635d2d11f5fe254aa772576510b41fcf1e03ad56c87 \ No newline at end of file
diff --git a/db/schema_migrations/20211027043206 b/db/schema_migrations/20211027043206
deleted file mode 100644
index 7387484a118..00000000000
--- a/db/schema_migrations/20211027043206
+++ /dev/null
@@ -1 +0,0 @@
-543feeedace6596d63207738829dcd62249a9f048a08928fbe4131ec69058322 \ No newline at end of file
diff --git a/db/schema_migrations/20211027043229 b/db/schema_migrations/20211027043229
deleted file mode 100644
index 75c99cb5491..00000000000
--- a/db/schema_migrations/20211027043229
+++ /dev/null
@@ -1 +0,0 @@
-2bceb12bdb90052cc8c1aedbd52c11cb8125471e1b59de3d75ef476fc64851c9 \ No newline at end of file
diff --git a/db/schema_migrations/20211027064021 b/db/schema_migrations/20211027064021
deleted file mode 100644
index 3bd57b30583..00000000000
--- a/db/schema_migrations/20211027064021
+++ /dev/null
@@ -1 +0,0 @@
-f1b218eaddb9bcc5e4d854a6b43fc5e122b38dc989225327a1c4a899f41e5ac6 \ No newline at end of file
diff --git a/db/schema_migrations/20211027064156 b/db/schema_migrations/20211027064156
deleted file mode 100644
index 880b7a00694..00000000000
--- a/db/schema_migrations/20211027064156
+++ /dev/null
@@ -1 +0,0 @@
-3d7b72684102836d7a7efcab7590b3d14bc63eb3e1bfbc7a95fb5eb5c6a906af \ No newline at end of file
diff --git a/db/schema_migrations/20211027112901 b/db/schema_migrations/20211027112901
deleted file mode 100644
index 0e4cb808f00..00000000000
--- a/db/schema_migrations/20211027112901
+++ /dev/null
@@ -1 +0,0 @@
-83c1d699e5de98007ef815b5f9dfbc9a644c6289bf86832af1d5b8a6d3d83659 \ No newline at end of file
diff --git a/db/schema_migrations/20211027203950 b/db/schema_migrations/20211027203950
deleted file mode 100644
index 4e4265a34c9..00000000000
--- a/db/schema_migrations/20211027203950
+++ /dev/null
@@ -1 +0,0 @@
-38643fbd719e7d65e5e79eeb279a5732cee5c28774a300859a2bace13d882ee2 \ No newline at end of file
diff --git a/db/schema_migrations/20211027204011 b/db/schema_migrations/20211027204011
deleted file mode 100644
index 7c1e07a87c0..00000000000
--- a/db/schema_migrations/20211027204011
+++ /dev/null
@@ -1 +0,0 @@
-8542de6f3bf260b4e7596ed497ff8ed4204c81519d8f19e64ac86cd5532e7a61 \ No newline at end of file
diff --git a/db/schema_migrations/20211028085926 b/db/schema_migrations/20211028085926
deleted file mode 100644
index c1e8d928fa0..00000000000
--- a/db/schema_migrations/20211028085926
+++ /dev/null
@@ -1 +0,0 @@
-ed6939c1e89f78290c312bf005cb33bd1a5ee778e8d9be3ae2eb04cc25416b92 \ No newline at end of file
diff --git a/db/schema_migrations/20211028100303 b/db/schema_migrations/20211028100303
deleted file mode 100644
index 472b2ce78ef..00000000000
--- a/db/schema_migrations/20211028100303
+++ /dev/null
@@ -1 +0,0 @@
-bb28267d020cbc26614e4635c803af0168ab5606f3aadc40e1c0e0bc6d988254 \ No newline at end of file
diff --git a/db/schema_migrations/20211028100843 b/db/schema_migrations/20211028100843
deleted file mode 100644
index 4be06f29039..00000000000
--- a/db/schema_migrations/20211028100843
+++ /dev/null
@@ -1 +0,0 @@
-27578f62b5cde4fdbfe79eb717404a5cef62b8c17170525428dbf81e6b394ce9 \ No newline at end of file
diff --git a/db/schema_migrations/20211028123412 b/db/schema_migrations/20211028123412
deleted file mode 100644
index d32c7c95d8f..00000000000
--- a/db/schema_migrations/20211028123412
+++ /dev/null
@@ -1 +0,0 @@
-d7655fb2a01e389f59990b395ed7ef683b21a3371b7e68d3eb29def85eea1888 \ No newline at end of file
diff --git a/db/schema_migrations/20211028132247 b/db/schema_migrations/20211028132247
deleted file mode 100644
index ab8fa3b55eb..00000000000
--- a/db/schema_migrations/20211028132247
+++ /dev/null
@@ -1 +0,0 @@
-50a5c8af2cde1ae79d627f70d3b266488f76f76b481aefca8516db5360cfa843 \ No newline at end of file
diff --git a/db/schema_migrations/20211028155449 b/db/schema_migrations/20211028155449
deleted file mode 100644
index 00b1c4e14dd..00000000000
--- a/db/schema_migrations/20211028155449
+++ /dev/null
@@ -1 +0,0 @@
-385c540b1f80c31a5ba009ae3507d2b855a737389bcb75c07a8872f26f8a9b44 \ No newline at end of file
diff --git a/db/schema_migrations/20211028212259 b/db/schema_migrations/20211028212259
deleted file mode 100644
index 777c5546592..00000000000
--- a/db/schema_migrations/20211028212259
+++ /dev/null
@@ -1 +0,0 @@
-56af9791c8625d99e9a53690135086afccdbe8f58a5c236d6805b0883fb971b0 \ No newline at end of file
diff --git a/db/schema_migrations/20211029102822 b/db/schema_migrations/20211029102822
deleted file mode 100644
index 72198f302b3..00000000000
--- a/db/schema_migrations/20211029102822
+++ /dev/null
@@ -1 +0,0 @@
-e1f9d87287048010e9816fd5b4a9a2d30b64d2ad150226852f6679b950031914 \ No newline at end of file
diff --git a/db/schema_migrations/20211031152417 b/db/schema_migrations/20211031152417
deleted file mode 100644
index 429c7dc0d8c..00000000000
--- a/db/schema_migrations/20211031152417
+++ /dev/null
@@ -1 +0,0 @@
-f46a0dd662a80d38a4e8d3e6c4db05e61563a959b75d30a4c3724ae6afc2647f \ No newline at end of file
diff --git a/db/schema_migrations/20211031154919 b/db/schema_migrations/20211031154919
deleted file mode 100644
index 29cf7cc1580..00000000000
--- a/db/schema_migrations/20211031154919
+++ /dev/null
@@ -1 +0,0 @@
-08399bfbf62533c00dfe3ca3434f6be292ec768f053d3b1fde41d2d68de32fe7 \ No newline at end of file
diff --git a/db/schema_migrations/20211101132310 b/db/schema_migrations/20211101132310
deleted file mode 100644
index 08a95d2747e..00000000000
--- a/db/schema_migrations/20211101132310
+++ /dev/null
@@ -1 +0,0 @@
-3e02605ce307d0ce37c3830e6909e7cfe5632408a757adf59209a70da92c0bc6 \ No newline at end of file
diff --git a/db/schema_migrations/20211101165656 b/db/schema_migrations/20211101165656
deleted file mode 100644
index 6886ce7b564..00000000000
--- a/db/schema_migrations/20211101165656
+++ /dev/null
@@ -1 +0,0 @@
-853e68aa974f49b7ab9f60acc0191da47598db115748e96752145c3cea89a986 \ No newline at end of file
diff --git a/db/schema_migrations/20211101222614 b/db/schema_migrations/20211101222614
deleted file mode 100644
index 619ca607a75..00000000000
--- a/db/schema_migrations/20211101222614
+++ /dev/null
@@ -1 +0,0 @@
-a579b14aff1d186d89173e383442f2ffbd69b1baed3f9a4c758fbb001b445139 \ No newline at end of file
diff --git a/db/schema_migrations/20211102103127 b/db/schema_migrations/20211102103127
deleted file mode 100644
index 2ce33ad085a..00000000000
--- a/db/schema_migrations/20211102103127
+++ /dev/null
@@ -1 +0,0 @@
-450028c90cb92f5ce3f8239eb56364b83ed025839aaf305b7ceb4fda077681b1 \ No newline at end of file
diff --git a/db/schema_migrations/20211102114802 b/db/schema_migrations/20211102114802
deleted file mode 100644
index 35d3a25f3cb..00000000000
--- a/db/schema_migrations/20211102114802
+++ /dev/null
@@ -1 +0,0 @@
-a3f9fcac354cccfdfc42b8f5baab651cb65ca60e4474ce937ab25b552bfe483c \ No newline at end of file
diff --git a/db/schema_migrations/20211103062728 b/db/schema_migrations/20211103062728
deleted file mode 100644
index 45bb2fcda65..00000000000
--- a/db/schema_migrations/20211103062728
+++ /dev/null
@@ -1 +0,0 @@
-a22322122144f28306b3b38dbe50b3465ad623c389f8bfe6fa97a0f71b1c7c21 \ No newline at end of file
diff --git a/db/schema_migrations/20211103141403 b/db/schema_migrations/20211103141403
deleted file mode 100644
index 357a24ae4bb..00000000000
--- a/db/schema_migrations/20211103141403
+++ /dev/null
@@ -1 +0,0 @@
-d16d62b2984586540a99aa5fc67de6459a4cd473089ddbae8d45e8783863d78d \ No newline at end of file
diff --git a/db/schema_migrations/20211103162025 b/db/schema_migrations/20211103162025
deleted file mode 100644
index e6cb01358d4..00000000000
--- a/db/schema_migrations/20211103162025
+++ /dev/null
@@ -1 +0,0 @@
-2ed9198926eb0579fccd4a8b1866f10ba4f42683d676e0664db3fadefe0bed39 \ No newline at end of file
diff --git a/db/schema_migrations/20211103184303 b/db/schema_migrations/20211103184303
deleted file mode 100644
index f488474ce82..00000000000
--- a/db/schema_migrations/20211103184303
+++ /dev/null
@@ -1 +0,0 @@
-fdec8e2d58c5b857a997d7fa3536969df8c05b8c455811cbec984834e031f2cb \ No newline at end of file
diff --git a/db/schema_migrations/20211104012209 b/db/schema_migrations/20211104012209
deleted file mode 100644
index 8a81fbdf9b8..00000000000
--- a/db/schema_migrations/20211104012209
+++ /dev/null
@@ -1 +0,0 @@
-e7cf08543f911b5f95f08d4aa6063e05b026e463e71a65b6b8200191de1b02a1 \ No newline at end of file
diff --git a/db/schema_migrations/20211104044453 b/db/schema_migrations/20211104044453
deleted file mode 100644
index 7d39c0e48e8..00000000000
--- a/db/schema_migrations/20211104044453
+++ /dev/null
@@ -1 +0,0 @@
-fc5a60c27ca89b122d798abe8f55a0951fece712c885555df0d2f37b565d6f94 \ No newline at end of file
diff --git a/db/schema_migrations/20211104165220 b/db/schema_migrations/20211104165220
deleted file mode 100644
index abfa37a45a4..00000000000
--- a/db/schema_migrations/20211104165220
+++ /dev/null
@@ -1 +0,0 @@
-52625ff0a6117724cc1d7c6417ef95fe8dbcbb394486bb4734e28d3b41d23fd2 \ No newline at end of file
diff --git a/db/schema_migrations/20211105010101 b/db/schema_migrations/20211105010101
deleted file mode 100644
index a7f79387e9f..00000000000
--- a/db/schema_migrations/20211105010101
+++ /dev/null
@@ -1 +0,0 @@
-26c534cdae8630e3f28ad2b61a1049aaab5c5b7a1b761f0961831b621e148ed3 \ No newline at end of file
diff --git a/db/schema_migrations/20211105125756 b/db/schema_migrations/20211105125756
deleted file mode 100644
index 842187d9ae2..00000000000
--- a/db/schema_migrations/20211105125756
+++ /dev/null
@@ -1 +0,0 @@
-13cf3d164d541df48b6d14d7cc1953113476ba8ea5975d7d0c5f84098e2e0e61 \ No newline at end of file
diff --git a/db/schema_migrations/20211105125813 b/db/schema_migrations/20211105125813
deleted file mode 100644
index 449c3d95d6a..00000000000
--- a/db/schema_migrations/20211105125813
+++ /dev/null
@@ -1 +0,0 @@
-a48f62bed7e4c4a0e69acd3b340065317aff71602e696970276a4e443f1dcabf \ No newline at end of file
diff --git a/db/schema_migrations/20211105135157 b/db/schema_migrations/20211105135157
deleted file mode 100644
index 694509bfafd..00000000000
--- a/db/schema_migrations/20211105135157
+++ /dev/null
@@ -1 +0,0 @@
-20f10ae28d439de1d07357ab7e977dae88feaaedb16770820350a9bf8242817f \ No newline at end of file
diff --git a/db/schema_migrations/20211105160316 b/db/schema_migrations/20211105160316
deleted file mode 100644
index 493dfb4afbd..00000000000
--- a/db/schema_migrations/20211105160316
+++ /dev/null
@@ -1 +0,0 @@
-afb9552a4104b10b25d65a9fec478c5c28a31ec31402400554db4288033bacb6 \ No newline at end of file
diff --git a/db/schema_migrations/20211105161404 b/db/schema_migrations/20211105161404
deleted file mode 100644
index 98b4bcdacfb..00000000000
--- a/db/schema_migrations/20211105161404
+++ /dev/null
@@ -1 +0,0 @@
-911cc21de320d0d5716ce80ebca56433b793c2072cb62da783605c99bb9aada9 \ No newline at end of file
diff --git a/db/schema_migrations/20211108154510 b/db/schema_migrations/20211108154510
deleted file mode 100644
index c978d671d29..00000000000
--- a/db/schema_migrations/20211108154510
+++ /dev/null
@@ -1 +0,0 @@
-024c123bf06b796341a22e54f4c34b967d84aeb9b2006acf5cfef96a6161c13d \ No newline at end of file
diff --git a/db/schema_migrations/20211108154841 b/db/schema_migrations/20211108154841
deleted file mode 100644
index c602a1b6c24..00000000000
--- a/db/schema_migrations/20211108154841
+++ /dev/null
@@ -1 +0,0 @@
-03842b87c4118f0e2aba1597ff08a6830b1dd5442a455e4bc9774b93b36a09b5 \ No newline at end of file
diff --git a/db/schema_migrations/20211108203248 b/db/schema_migrations/20211108203248
deleted file mode 100644
index 4f8c570b627..00000000000
--- a/db/schema_migrations/20211108203248
+++ /dev/null
@@ -1 +0,0 @@
-a2556a3d8b21e59caa6cbf7f83d621fef391904d0c13c77c0e5da713a580b4c9 \ No newline at end of file
diff --git a/db/schema_migrations/20211108204736 b/db/schema_migrations/20211108204736
deleted file mode 100644
index 6d37b1b1184..00000000000
--- a/db/schema_migrations/20211108204736
+++ /dev/null
@@ -1 +0,0 @@
-9e01b1817e4c578f5be7d7378dc12a8535c2bbbff5ecbc77f5a7cfdb148927f5 \ No newline at end of file
diff --git a/db/schema_migrations/20211108211434 b/db/schema_migrations/20211108211434
deleted file mode 100644
index 17a90668900..00000000000
--- a/db/schema_migrations/20211108211434
+++ /dev/null
@@ -1 +0,0 @@
-06cbecc52e62a48664ae486181047d8ca4d71a7991ba36bdca4bfa44257627f3 \ No newline at end of file
diff --git a/db/schema_migrations/20211109100050 b/db/schema_migrations/20211109100050
deleted file mode 100644
index 94f9612277f..00000000000
--- a/db/schema_migrations/20211109100050
+++ /dev/null
@@ -1 +0,0 @@
-86aa6ad1759a00c2cc5cb6dc2e381aead2910a24f0e37933a5e72af56d08101a \ No newline at end of file
diff --git a/db/schema_migrations/20211109101010 b/db/schema_migrations/20211109101010
deleted file mode 100644
index ea24f5e7e37..00000000000
--- a/db/schema_migrations/20211109101010
+++ /dev/null
@@ -1 +0,0 @@
-30eb98b8fdb24bc5de357b0ec14a6b92d520db025c82bd7b9448f71542c7d7e3 \ No newline at end of file
diff --git a/db/schema_migrations/20211109112454 b/db/schema_migrations/20211109112454
deleted file mode 100644
index 6fdb1e344b9..00000000000
--- a/db/schema_migrations/20211109112454
+++ /dev/null
@@ -1 +0,0 @@
-1bc48cdae55eea5a5963edd3a138d7d6859afa6caafe0b793c553fdfabe9f488 \ No newline at end of file
diff --git a/db/schema_migrations/20211110010101 b/db/schema_migrations/20211110010101
deleted file mode 100644
index bedcfdb2b3b..00000000000
--- a/db/schema_migrations/20211110010101
+++ /dev/null
@@ -1 +0,0 @@
-63495b9f9ca2d4fa121b75eea36f2923942a6e11f27bef2c51414e00ccd48973 \ No newline at end of file
diff --git a/db/schema_migrations/20211110014701 b/db/schema_migrations/20211110014701
deleted file mode 100644
index fe3721eb055..00000000000
--- a/db/schema_migrations/20211110014701
+++ /dev/null
@@ -1 +0,0 @@
-1c5f65a25c9cf81a50bd9ffa2e74e2621cff04e58a2f90b19c66741ebb459d3e \ No newline at end of file
diff --git a/db/schema_migrations/20211110015252 b/db/schema_migrations/20211110015252
deleted file mode 100644
index 06a6a5b0ad7..00000000000
--- a/db/schema_migrations/20211110015252
+++ /dev/null
@@ -1 +0,0 @@
-4038c269ce9c47ca9327fb1b81bb588e9065f0821f291d17c7965d7f8fe1f275 \ No newline at end of file
diff --git a/db/schema_migrations/20211110092710 b/db/schema_migrations/20211110092710
deleted file mode 100644
index 691194456d4..00000000000
--- a/db/schema_migrations/20211110092710
+++ /dev/null
@@ -1 +0,0 @@
-f6312d56d2ac77537383c8671d73ad202fed9bb8eddba4bdb24d19dbe821cdf3 \ No newline at end of file
diff --git a/db/schema_migrations/20211110100050 b/db/schema_migrations/20211110100050
deleted file mode 100644
index eed0afbac1c..00000000000
--- a/db/schema_migrations/20211110100050
+++ /dev/null
@@ -1 +0,0 @@
-54b83ba1f8e8aa8a23f230664bcd6cc068a2df2d669e395713f0805d0f054f9c \ No newline at end of file
diff --git a/db/schema_migrations/20211110143306 b/db/schema_migrations/20211110143306
deleted file mode 100644
index e1618c07f75..00000000000
--- a/db/schema_migrations/20211110143306
+++ /dev/null
@@ -1 +0,0 @@
-7724e5a2c52be99b1b40c449f25abdc23f279f5b0bdaebcfd897c39d295fda41 \ No newline at end of file
diff --git a/db/schema_migrations/20211110151320 b/db/schema_migrations/20211110151320
deleted file mode 100644
index 91f780811c3..00000000000
--- a/db/schema_migrations/20211110151320
+++ /dev/null
@@ -1 +0,0 @@
-dab6123f19fb44a1566a8de9c760dedec5548dd64e472a180e7748cd7c93eea9 \ No newline at end of file
diff --git a/db/schema_migrations/20211110151350 b/db/schema_migrations/20211110151350
deleted file mode 100644
index 98d590c26e9..00000000000
--- a/db/schema_migrations/20211110151350
+++ /dev/null
@@ -1 +0,0 @@
-f5e69502e582c5f30ba686f8b668d8f0ce5cf8078b0833d2eda67f5ed97ac074 \ No newline at end of file
diff --git a/db/schema_migrations/20211111112425 b/db/schema_migrations/20211111112425
deleted file mode 100644
index 5201a7d3156..00000000000
--- a/db/schema_migrations/20211111112425
+++ /dev/null
@@ -1 +0,0 @@
-0ab93a0bfd52d6c13203a0b183b2fcb9d6770334e5b1bd00a28fb623b65c428d \ No newline at end of file
diff --git a/db/schema_migrations/20211111112639 b/db/schema_migrations/20211111112639
deleted file mode 100644
index e05cba2db8a..00000000000
--- a/db/schema_migrations/20211111112639
+++ /dev/null
@@ -1 +0,0 @@
-870100261e3704522d390885b8ff13ebbcb093aa508d79b90f9738f6a0fffd10 \ No newline at end of file
diff --git a/db/schema_migrations/20211111112713 b/db/schema_migrations/20211111112713
deleted file mode 100644
index 368378c28b8..00000000000
--- a/db/schema_migrations/20211111112713
+++ /dev/null
@@ -1 +0,0 @@
-0cc2f19a8e31d9418ffd4fa1307f5210f0f2d781b957d417f06e19aca0b53985 \ No newline at end of file
diff --git a/db/schema_migrations/20211111164025 b/db/schema_migrations/20211111164025
deleted file mode 100644
index 409cc160b9e..00000000000
--- a/db/schema_migrations/20211111164025
+++ /dev/null
@@ -1 +0,0 @@
-d78fe687517e14ff67dc76eff63391e33b73d29446d2a0445595175c7cd6806a \ No newline at end of file
diff --git a/db/schema_migrations/20211111164047 b/db/schema_migrations/20211111164047
deleted file mode 100644
index 30e0875cf73..00000000000
--- a/db/schema_migrations/20211111164047
+++ /dev/null
@@ -1 +0,0 @@
-c8ed7f8c0f818156dba9c25be848da97d4eb6dbf0aa9c48f87e940f3ca0967d9 \ No newline at end of file
diff --git a/db/schema_migrations/20211112073413 b/db/schema_migrations/20211112073413
deleted file mode 100644
index 11551bb5819..00000000000
--- a/db/schema_migrations/20211112073413
+++ /dev/null
@@ -1 +0,0 @@
-8960c0a2b7e621e466fde3bde6a252119008579c058046a16d57a6f6bff42008 \ No newline at end of file
diff --git a/db/schema_migrations/20211112113300 b/db/schema_migrations/20211112113300
deleted file mode 100644
index 8074c437751..00000000000
--- a/db/schema_migrations/20211112113300
+++ /dev/null
@@ -1 +0,0 @@
-be11c0b1c7b9c99c28d44c164742815da57bfc4a32afd54df9135e3ce6edeff9 \ No newline at end of file
diff --git a/db/schema_migrations/20211112155416 b/db/schema_migrations/20211112155416
deleted file mode 100644
index 91037c578a7..00000000000
--- a/db/schema_migrations/20211112155416
+++ /dev/null
@@ -1 +0,0 @@
-0c5627518093f6261679940402cbd756a91bf4617a37eecdbbc82dc57856dcec \ No newline at end of file
diff --git a/db/schema_migrations/20211115132613 b/db/schema_migrations/20211115132613
deleted file mode 100644
index be6f19bdc70..00000000000
--- a/db/schema_migrations/20211115132613
+++ /dev/null
@@ -1 +0,0 @@
-a9cc7d1fc3317958ecda959b62b42f93b2609c4e784566f9696fef51c5ebdf3b \ No newline at end of file
diff --git a/db/schema_migrations/20211115142803 b/db/schema_migrations/20211115142803
deleted file mode 100644
index 0e9022f7c0e..00000000000
--- a/db/schema_migrations/20211115142803
+++ /dev/null
@@ -1 +0,0 @@
-52fd12693481ae7e08eb084ef679434592538d99117c1906f30ca6a36b12a212 \ No newline at end of file
diff --git a/db/schema_migrations/20211115142847 b/db/schema_migrations/20211115142847
deleted file mode 100644
index 049efcf8bcf..00000000000
--- a/db/schema_migrations/20211115142847
+++ /dev/null
@@ -1 +0,0 @@
-cded37f94d578a503e5b389e6483ec68666983f71395c13b4f0011db04e807c3 \ No newline at end of file
diff --git a/db/schema_migrations/20211115142911 b/db/schema_migrations/20211115142911
deleted file mode 100644
index 43bae5192c5..00000000000
--- a/db/schema_migrations/20211115142911
+++ /dev/null
@@ -1 +0,0 @@
-63141e62fc21cf0a4b47355ecd3814c1f0cc829b7f4851d833f95369206c8919 \ No newline at end of file
diff --git a/db/schema_migrations/20211115145107 b/db/schema_migrations/20211115145107
deleted file mode 100644
index 25270a5c587..00000000000
--- a/db/schema_migrations/20211115145107
+++ /dev/null
@@ -1 +0,0 @@
-2b6bc8067402744b79eee06022cf3c91ba7ffd519df83aae4067600a6bbf43ad \ No newline at end of file
diff --git a/db/schema_migrations/20211115151704 b/db/schema_migrations/20211115151704
deleted file mode 100644
index 03093ade126..00000000000
--- a/db/schema_migrations/20211115151704
+++ /dev/null
@@ -1 +0,0 @@
-3db18116febc760bcfeab597e0508d5b2835d0135068d79073770d343aa4b09c \ No newline at end of file
diff --git a/db/schema_migrations/20211115154103 b/db/schema_migrations/20211115154103
deleted file mode 100644
index 2b721bc7b39..00000000000
--- a/db/schema_migrations/20211115154103
+++ /dev/null
@@ -1 +0,0 @@
-ad65e6deb885397dc91f33dc117a50e9a1b6d60f4caed8c5b77d474ec0340995 \ No newline at end of file
diff --git a/db/schema_migrations/20211116091751 b/db/schema_migrations/20211116091751
deleted file mode 100644
index 8b13b53e437..00000000000
--- a/db/schema_migrations/20211116091751
+++ /dev/null
@@ -1 +0,0 @@
-d71889bba2150265e9482be0b5ee89f43168d4a35b47469a36873d65f00df878 \ No newline at end of file
diff --git a/db/schema_migrations/20211116093739 b/db/schema_migrations/20211116093739
deleted file mode 100644
index b0ded3f2a0f..00000000000
--- a/db/schema_migrations/20211116093739
+++ /dev/null
@@ -1 +0,0 @@
-39d1988fe409944877df24e9859b171eab13c4a4703c8e85a2bff33318fb61fc \ No newline at end of file
diff --git a/db/schema_migrations/20211116111644 b/db/schema_migrations/20211116111644
deleted file mode 100644
index c2bc9dbee0d..00000000000
--- a/db/schema_migrations/20211116111644
+++ /dev/null
@@ -1 +0,0 @@
-664c7fa75d3283b6e984fcca4ffcefab6dba24a78e4cc24ac86f791ab4495def \ No newline at end of file
diff --git a/db/schema_migrations/20211117084814 b/db/schema_migrations/20211117084814
deleted file mode 100644
index d24eb0a0c04..00000000000
--- a/db/schema_migrations/20211117084814
+++ /dev/null
@@ -1 +0,0 @@
-d6b0ca9d1e88e9e531ee0da5c82723309d746b6d83ea5dfb8326d3cc718a31b6 \ No newline at end of file
diff --git a/db/schema_migrations/20211117174209 b/db/schema_migrations/20211117174209
deleted file mode 100644
index f5e8cd180c2..00000000000
--- a/db/schema_migrations/20211117174209
+++ /dev/null
@@ -1 +0,0 @@
-c7c29b136fbe00271807fcd3133baf7a6e9ded40989fc274e941fc99f2c19e4d \ No newline at end of file
diff --git a/db/schema_migrations/20211118100959 b/db/schema_migrations/20211118100959
deleted file mode 100644
index e3c42353b8d..00000000000
--- a/db/schema_migrations/20211118100959
+++ /dev/null
@@ -1 +0,0 @@
-8b1bb9758150151518f16307d3f145431000b7edf946fd44e54cf7301087b002 \ No newline at end of file
diff --git a/db/schema_migrations/20211118103439 b/db/schema_migrations/20211118103439
deleted file mode 100644
index 5b5891c3b16..00000000000
--- a/db/schema_migrations/20211118103439
+++ /dev/null
@@ -1 +0,0 @@
-721f1ada9fe5a3d7e5da3750a43d5021a85a26e8adc4d649e7f0fff8cdf68344 \ No newline at end of file
diff --git a/db/schema_migrations/20211118114228 b/db/schema_migrations/20211118114228
deleted file mode 100644
index 82c7984750d..00000000000
--- a/db/schema_migrations/20211118114228
+++ /dev/null
@@ -1 +0,0 @@
-7686fd3e33b25b811aba459aba514cde8e88102277edb3be7e12378cb7e8de85 \ No newline at end of file
diff --git a/db/schema_migrations/20211118124537 b/db/schema_migrations/20211118124537
deleted file mode 100644
index 537c3aa88fa..00000000000
--- a/db/schema_migrations/20211118124537
+++ /dev/null
@@ -1 +0,0 @@
-d9a0886d95cd54add9e63475a2f1ca0601304bb64ffe6e6d9e62cb8997d5fe40 \ No newline at end of file
diff --git a/db/schema_migrations/20211118124628 b/db/schema_migrations/20211118124628
deleted file mode 100644
index e6364327ca4..00000000000
--- a/db/schema_migrations/20211118124628
+++ /dev/null
@@ -1 +0,0 @@
-f25ee0df287f1c44740be143831537bf262d09d7068ceca1c516ee964bc3aa24 \ No newline at end of file
diff --git a/db/schema_migrations/20211118124650 b/db/schema_migrations/20211118124650
deleted file mode 100644
index 739cfeb80b3..00000000000
--- a/db/schema_migrations/20211118124650
+++ /dev/null
@@ -1 +0,0 @@
-e032fd334d175d803b943c6328048705e81bd70af6ac226a032281304840f1cd \ No newline at end of file
diff --git a/db/schema_migrations/20211118130836 b/db/schema_migrations/20211118130836
deleted file mode 100644
index df16d8c5c5e..00000000000
--- a/db/schema_migrations/20211118130836
+++ /dev/null
@@ -1 +0,0 @@
-2630b21c7134ac539a18798f2f2b99f468e171b79e30a184f7e8cdaccd11d465 \ No newline at end of file
diff --git a/db/schema_migrations/20211118194239 b/db/schema_migrations/20211118194239
deleted file mode 100644
index ce3c1eb83d1..00000000000
--- a/db/schema_migrations/20211118194239
+++ /dev/null
@@ -1 +0,0 @@
-04a4b10085bae2006ac78600b3cc410d130f9ac6944103c7bd85f71e060d4a67 \ No newline at end of file
diff --git a/db/schema_migrations/20211119085015 b/db/schema_migrations/20211119085015
deleted file mode 100644
index 874bd158e7c..00000000000
--- a/db/schema_migrations/20211119085015
+++ /dev/null
@@ -1 +0,0 @@
-88b289d724f98f75e0340cde4c6e2bc3cb55df2a979934fb2bc544d22e4c032d \ No newline at end of file
diff --git a/db/schema_migrations/20211119085036 b/db/schema_migrations/20211119085036
deleted file mode 100644
index f9d1eeffbcb..00000000000
--- a/db/schema_migrations/20211119085036
+++ /dev/null
@@ -1 +0,0 @@
-2b2c28e0370ae1bb84bee5ff769c9b313902d1f1afc50fa54e23a1627b1121f3 \ No newline at end of file
diff --git a/db/schema_migrations/20211119111006 b/db/schema_migrations/20211119111006
deleted file mode 100644
index ebb8e460452..00000000000
--- a/db/schema_migrations/20211119111006
+++ /dev/null
@@ -1 +0,0 @@
-d618c28360f7716807e9727566019e269963d85164cf2f306ec9692d3b037802 \ No newline at end of file
diff --git a/db/schema_migrations/20211119154221 b/db/schema_migrations/20211119154221
deleted file mode 100644
index c8b6005b48b..00000000000
--- a/db/schema_migrations/20211119154221
+++ /dev/null
@@ -1 +0,0 @@
-020e17ffd6851fb861a17c1b120ca7cdfa300434d4a9ec923a4edcaa7f951b31 \ No newline at end of file
diff --git a/db/schema_migrations/20211119170805 b/db/schema_migrations/20211119170805
deleted file mode 100644
index fffb02d4285..00000000000
--- a/db/schema_migrations/20211119170805
+++ /dev/null
@@ -1 +0,0 @@
-adb95bc78104382fb1d3af2c2775b4b5bd23394b4260c3a97667b4bd7917e0da \ No newline at end of file
diff --git a/db/schema_migrations/20211119194024 b/db/schema_migrations/20211119194024
deleted file mode 100644
index 0d90b09e732..00000000000
--- a/db/schema_migrations/20211119194024
+++ /dev/null
@@ -1 +0,0 @@
-ac2e376ad32f0e2fd45d8695f13a0b46c2d5964b881f79e3a30a51ac85d4359b \ No newline at end of file
diff --git a/db/schema_migrations/20211119195201 b/db/schema_migrations/20211119195201
deleted file mode 100644
index dd7f7b83d8d..00000000000
--- a/db/schema_migrations/20211119195201
+++ /dev/null
@@ -1 +0,0 @@
-caaf92f12bf0ed144d99f629c9e5d64fd45832a90bbd743e40febcdc4802cd59 \ No newline at end of file
diff --git a/db/schema_migrations/20211122033501 b/db/schema_migrations/20211122033501
deleted file mode 100644
index 08673370b57..00000000000
--- a/db/schema_migrations/20211122033501
+++ /dev/null
@@ -1 +0,0 @@
-e010b4c12ae8203d9ea8a4c2035be5e7165aba0030f4d5fd0b0f978f84748707 \ No newline at end of file
diff --git a/db/schema_migrations/20211122103051 b/db/schema_migrations/20211122103051
deleted file mode 100644
index eacca224329..00000000000
--- a/db/schema_migrations/20211122103051
+++ /dev/null
@@ -1 +0,0 @@
-674a44e70291d6ed04318a5f6b639d216f2c26c43d15cb00e59b06cc6f6cc401 \ No newline at end of file
diff --git a/db/schema_migrations/20211122193948 b/db/schema_migrations/20211122193948
deleted file mode 100644
index 94dbab4cd73..00000000000
--- a/db/schema_migrations/20211122193948
+++ /dev/null
@@ -1 +0,0 @@
-12203afb7b66a12946d971dd601d2ce91e1408fcdf36d9d8b2fadcf09d7c1e56 \ No newline at end of file
diff --git a/db/schema_migrations/20211122215001 b/db/schema_migrations/20211122215001
deleted file mode 100644
index be0fd652eb7..00000000000
--- a/db/schema_migrations/20211122215001
+++ /dev/null
@@ -1 +0,0 @@
-fc29e10717357f7dd57940042d69a6c43a0d17fdf3c951917a76eae8c1d93ba3 \ No newline at end of file
diff --git a/db/schema_migrations/20211123135255 b/db/schema_migrations/20211123135255
deleted file mode 100644
index e151abb0e33..00000000000
--- a/db/schema_migrations/20211123135255
+++ /dev/null
@@ -1 +0,0 @@
-cf6b9bb5711b6a097e399e79fdabe01a237581d99de7fed3c2b69c65ffd23a06 \ No newline at end of file
diff --git a/db/schema_migrations/20211123161906 b/db/schema_migrations/20211123161906
deleted file mode 100644
index 1370811b3af..00000000000
--- a/db/schema_migrations/20211123161906
+++ /dev/null
@@ -1 +0,0 @@
-46767d804bde08ad4a076f20436652f980eb935a79b2ad30b4735b956be69a7a \ No newline at end of file
diff --git a/db/schema_migrations/20211123181236 b/db/schema_migrations/20211123181236
deleted file mode 100644
index 25f00af5d72..00000000000
--- a/db/schema_migrations/20211123181236
+++ /dev/null
@@ -1 +0,0 @@
-ac21109099642d5934c16b3f0130736a587c4f20143552545c2b524062ff71e0 \ No newline at end of file
diff --git a/db/schema_migrations/20211123182614 b/db/schema_migrations/20211123182614
deleted file mode 100644
index 8b67ec7cd26..00000000000
--- a/db/schema_migrations/20211123182614
+++ /dev/null
@@ -1 +0,0 @@
-9a3ba69a1df02059b240393cc381c4a5ba9db0f116818aa9f3d4f1009f055b09 \ No newline at end of file
diff --git a/db/schema_migrations/20211124095704 b/db/schema_migrations/20211124095704
deleted file mode 100644
index db18301ecd9..00000000000
--- a/db/schema_migrations/20211124095704
+++ /dev/null
@@ -1 +0,0 @@
-1f5ed9e7af3f56d0e11d1a2bb78a7430ce05af49c8102d1c75c8ff84ae4e1c6d \ No newline at end of file
diff --git a/db/schema_migrations/20211124132319 b/db/schema_migrations/20211124132319
deleted file mode 100644
index 1809d13a553..00000000000
--- a/db/schema_migrations/20211124132319
+++ /dev/null
@@ -1 +0,0 @@
-cdb85c8633687338a11ebce0603f82f5cab00e7c58f923d30b68a877b94e2db2 \ No newline at end of file
diff --git a/db/schema_migrations/20211124132705 b/db/schema_migrations/20211124132705
deleted file mode 100644
index 12e3f08365b..00000000000
--- a/db/schema_migrations/20211124132705
+++ /dev/null
@@ -1 +0,0 @@
-4eacad00017890c71f3354d80061fae7af40499256475cdf035bdf41b916e5f3 \ No newline at end of file
diff --git a/db/schema_migrations/20211125120444 b/db/schema_migrations/20211125120444
deleted file mode 100644
index 8dca57e74ef..00000000000
--- a/db/schema_migrations/20211125120444
+++ /dev/null
@@ -1 +0,0 @@
-19062282d022e5d93cd525cff44c67f1fbc5557f1201e523a57725dc0b6ecd70 \ No newline at end of file
diff --git a/db/schema_migrations/20211126042235 b/db/schema_migrations/20211126042235
deleted file mode 100644
index 8c34dd173a9..00000000000
--- a/db/schema_migrations/20211126042235
+++ /dev/null
@@ -1 +0,0 @@
-c6992d23fc43c26861accf7c516603802c95367460ad688d1a420a60a33833f1 \ No newline at end of file
diff --git a/db/schema_migrations/20211126113029 b/db/schema_migrations/20211126113029
deleted file mode 100644
index aaf1a421982..00000000000
--- a/db/schema_migrations/20211126113029
+++ /dev/null
@@ -1 +0,0 @@
-96abde258e6527a2b09bb60e1cc0cb90802c8a7e43a2132e9956536390a8aab8 \ No newline at end of file
diff --git a/db/schema_migrations/20211126115449 b/db/schema_migrations/20211126115449
deleted file mode 100644
index 693dfb46149..00000000000
--- a/db/schema_migrations/20211126115449
+++ /dev/null
@@ -1 +0,0 @@
-2e6e432ecf7b2c885905fd4df6b57fa99b324f56cb0850d9fc792b4a9b363423 \ No newline at end of file
diff --git a/db/schema_migrations/20211126142200 b/db/schema_migrations/20211126142200
deleted file mode 100644
index 136addef509..00000000000
--- a/db/schema_migrations/20211126142200
+++ /dev/null
@@ -1 +0,0 @@
-a00ce6a11c7671b6d2efe47e3859afaec72c437fdf5383b990ee09cf14081c9b \ No newline at end of file
diff --git a/db/schema_migrations/20211126142354 b/db/schema_migrations/20211126142354
deleted file mode 100644
index fc84b266263..00000000000
--- a/db/schema_migrations/20211126142354
+++ /dev/null
@@ -1 +0,0 @@
-31d5fa3caff916a485f26b6834e37037455068cdcf502802196bf1d663716f49 \ No newline at end of file
diff --git a/db/schema_migrations/20211126204445 b/db/schema_migrations/20211126204445
deleted file mode 100644
index b130d90b8ec..00000000000
--- a/db/schema_migrations/20211126204445
+++ /dev/null
@@ -1 +0,0 @@
-e31592bbeb6ba6175f19cfceaafb37672633028dd021052542909999b46eac38 \ No newline at end of file
diff --git a/db/schema_migrations/20211129151155 b/db/schema_migrations/20211129151155
deleted file mode 100644
index 4aa3e56bae6..00000000000
--- a/db/schema_migrations/20211129151155
+++ /dev/null
@@ -1 +0,0 @@
-c1ba97f01fca6330628090010abb54220c0d057514386c6bb867c1b6f13f252c \ No newline at end of file
diff --git a/db/schema_migrations/20211129151832 b/db/schema_migrations/20211129151832
deleted file mode 100644
index fdfc464d136..00000000000
--- a/db/schema_migrations/20211129151832
+++ /dev/null
@@ -1 +0,0 @@
-c6d257f635049f88cd6efba903c9384a0a1af23b3c8fe6fa7f0842dcdf9f7e39 \ No newline at end of file
diff --git a/db/schema_migrations/20211130151724 b/db/schema_migrations/20211130151724
deleted file mode 100644
index 090d49ca482..00000000000
--- a/db/schema_migrations/20211130151724
+++ /dev/null
@@ -1 +0,0 @@
-f9bd521c92558ba9ad3cfa3fd6ff1a647847c0fc767e1e4f45b43422542d5cc7 \ No newline at end of file
diff --git a/db/schema_migrations/20211130165043 b/db/schema_migrations/20211130165043
deleted file mode 100644
index 3d4f7b52a69..00000000000
--- a/db/schema_migrations/20211130165043
+++ /dev/null
@@ -1 +0,0 @@
-2eece823b66fec7f5a9a5c24b93d354a47939a7cdd915349a433b7bbec6abc22 \ No newline at end of file
diff --git a/db/schema_migrations/20211130201100 b/db/schema_migrations/20211130201100
deleted file mode 100644
index 80c2d68671b..00000000000
--- a/db/schema_migrations/20211130201100
+++ /dev/null
@@ -1 +0,0 @@
-cc0146769929c9fbb0b7b6788826d2e188c8664a14e1015563ba4f9e65397c4e \ No newline at end of file
diff --git a/db/schema_migrations/20211130201101 b/db/schema_migrations/20211130201101
deleted file mode 100644
index ef1178c10c5..00000000000
--- a/db/schema_migrations/20211130201101
+++ /dev/null
@@ -1 +0,0 @@
-b0215ac45031593ca98de4f8858d21f1c29af03742a422bffd83598e39a6871c \ No newline at end of file
diff --git a/db/schema_migrations/20211130205719 b/db/schema_migrations/20211130205719
deleted file mode 100644
index aae23faabc9..00000000000
--- a/db/schema_migrations/20211130205719
+++ /dev/null
@@ -1 +0,0 @@
-567a80916756adcca93bdbe82d69a923e539aac74146e714b58a1b023134d2c9 \ No newline at end of file
diff --git a/db/schema_migrations/20211201061733 b/db/schema_migrations/20211201061733
deleted file mode 100644
index 722e7dd828c..00000000000
--- a/db/schema_migrations/20211201061733
+++ /dev/null
@@ -1 +0,0 @@
-c5282e48f31c0896a3ce21fe238eb602dc006b0bfe62aa4f12ee39bbd620c76c \ No newline at end of file
diff --git a/db/schema_migrations/20211201101541 b/db/schema_migrations/20211201101541
deleted file mode 100644
index 52f43ddcd2f..00000000000
--- a/db/schema_migrations/20211201101541
+++ /dev/null
@@ -1 +0,0 @@
-277cfcd1002e32c6cd664d6c0b6a7cbdf2ed7e5242e46dbddc4f99b0e8422361 \ No newline at end of file
diff --git a/db/schema_migrations/20211201143042 b/db/schema_migrations/20211201143042
deleted file mode 100644
index a5f0c8be842..00000000000
--- a/db/schema_migrations/20211201143042
+++ /dev/null
@@ -1 +0,0 @@
-0d27ca1250d10b8915fa4523707044f9a8c2372110537f5639a1811aeb0858b8 \ No newline at end of file
diff --git a/db/schema_migrations/20211202041233 b/db/schema_migrations/20211202041233
deleted file mode 100644
index fb19264fbd5..00000000000
--- a/db/schema_migrations/20211202041233
+++ /dev/null
@@ -1 +0,0 @@
-61c949b42338b248a0950cfafc82d58816c3fec44a2bf41c4ecb4cf09340a424 \ No newline at end of file
diff --git a/db/schema_migrations/20211202094944 b/db/schema_migrations/20211202094944
deleted file mode 100644
index b917cca67fa..00000000000
--- a/db/schema_migrations/20211202094944
+++ /dev/null
@@ -1 +0,0 @@
-2bca61880005c9303b2ff71747cde64d3418b6ef8ad2a9f114d584f4149e386b \ No newline at end of file
diff --git a/db/schema_migrations/20211202135508 b/db/schema_migrations/20211202135508
deleted file mode 100644
index 6ca4701268d..00000000000
--- a/db/schema_migrations/20211202135508
+++ /dev/null
@@ -1 +0,0 @@
-b565abbbb43f04ba4a6b77154ecb24b30328ac6d964f4be9fc5f9d05144606f0 \ No newline at end of file
diff --git a/db/schema_migrations/20211202145237 b/db/schema_migrations/20211202145237
deleted file mode 100644
index f5b91a189c8..00000000000
--- a/db/schema_migrations/20211202145237
+++ /dev/null
@@ -1 +0,0 @@
-d109142aa838faedcd307f6cd235c969ca265813493eef50d63cbc2fe5d203b3 \ No newline at end of file
diff --git a/db/schema_migrations/20211203091642 b/db/schema_migrations/20211203091642
deleted file mode 100644
index ef53b1d2ed9..00000000000
--- a/db/schema_migrations/20211203091642
+++ /dev/null
@@ -1 +0,0 @@
-9954fb041a3f284f53cc9c5c68b1a9dff36513a1851e663c221eccd40736fb16 \ No newline at end of file
diff --git a/db/schema_migrations/20211203160952 b/db/schema_migrations/20211203160952
deleted file mode 100644
index 10d033ef200..00000000000
--- a/db/schema_migrations/20211203160952
+++ /dev/null
@@ -1 +0,0 @@
-f25c65dfcb5b7b4a663cc4c792ffd985f6afd3156036485a5a43a791ee799e7b \ No newline at end of file
diff --git a/db/schema_migrations/20211203161149 b/db/schema_migrations/20211203161149
deleted file mode 100644
index 3f58490a89c..00000000000
--- a/db/schema_migrations/20211203161149
+++ /dev/null
@@ -1 +0,0 @@
-01482a299a7dac9d3f786f0dbe4650c686911bf788467146d3e9a91eafd0fc32 \ No newline at end of file
diff --git a/db/schema_migrations/20211203161840 b/db/schema_migrations/20211203161840
deleted file mode 100644
index 347bd0f7691..00000000000
--- a/db/schema_migrations/20211203161840
+++ /dev/null
@@ -1 +0,0 @@
-1b895e979ba2f1696559179c46c000e349da2d1ab94c968dd95103f188425103 \ No newline at end of file
diff --git a/db/schema_migrations/20211203161942 b/db/schema_migrations/20211203161942
deleted file mode 100644
index f43c3733392..00000000000
--- a/db/schema_migrations/20211203161942
+++ /dev/null
@@ -1 +0,0 @@
-62432b2679cafa381671c9555f503867c254a7b3734e10cf634b34998d5fb5a3 \ No newline at end of file
diff --git a/db/schema_migrations/20211204010826 b/db/schema_migrations/20211204010826
deleted file mode 100644
index 11311e66ad0..00000000000
--- a/db/schema_migrations/20211204010826
+++ /dev/null
@@ -1 +0,0 @@
-6a3591e70ddd6573ad68360c1a8774ef61e7812ce831c75066baec5754e2bd76 \ No newline at end of file
diff --git a/db/schema_migrations/20211206073851 b/db/schema_migrations/20211206073851
deleted file mode 100644
index bfd8140b109..00000000000
--- a/db/schema_migrations/20211206073851
+++ /dev/null
@@ -1 +0,0 @@
-403592fda1d82ed3c3fb8d5315593b67954a4ecbc368d9bcd5eedc75bb3c9821 \ No newline at end of file
diff --git a/db/schema_migrations/20211206074547 b/db/schema_migrations/20211206074547
deleted file mode 100644
index dd84a987827..00000000000
--- a/db/schema_migrations/20211206074547
+++ /dev/null
@@ -1 +0,0 @@
-ba1c0d20e21ef51278109d0eaeb23f1c541eb5eb9aeb9a92583ee6de83c68918 \ No newline at end of file
diff --git a/db/schema_migrations/20211206161271 b/db/schema_migrations/20211206161271
deleted file mode 100644
index 8a2561eec24..00000000000
--- a/db/schema_migrations/20211206161271
+++ /dev/null
@@ -1 +0,0 @@
-fa4a39c3bea70d31e8144f8830ef0353f22a7a663a891d9043e79f362058fbde \ No newline at end of file
diff --git a/db/schema_migrations/20211207081708 b/db/schema_migrations/20211207081708
deleted file mode 100644
index b2fbb704451..00000000000
--- a/db/schema_migrations/20211207081708
+++ /dev/null
@@ -1 +0,0 @@
-e26065e63eca51e4138b6e9f07e9ec1ee45838afa82c5832849e360375beeae2 \ No newline at end of file
diff --git a/db/schema_migrations/20211207090503 b/db/schema_migrations/20211207090503
deleted file mode 100644
index 13daa5c81e6..00000000000
--- a/db/schema_migrations/20211207090503
+++ /dev/null
@@ -1 +0,0 @@
-c30656c3f079e789f386b5b607710a7d4df6d2eb20bd457bab3a2e8d9eeb051b \ No newline at end of file
diff --git a/db/schema_migrations/20211207125331 b/db/schema_migrations/20211207125331
deleted file mode 100644
index 833d5d0a383..00000000000
--- a/db/schema_migrations/20211207125331
+++ /dev/null
@@ -1 +0,0 @@
-5ead867b7609248f702771078849c48c0558f5fe9a3021fbb32e4f9174af653a \ No newline at end of file
diff --git a/db/schema_migrations/20211207135331 b/db/schema_migrations/20211207135331
deleted file mode 100644
index b4085490cc8..00000000000
--- a/db/schema_migrations/20211207135331
+++ /dev/null
@@ -1 +0,0 @@
-3d9dcab49ee409da8c1ab398101041092e566b06a7bb2764db49a9201a0e5f0c \ No newline at end of file
diff --git a/db/schema_migrations/20211207154413 b/db/schema_migrations/20211207154413
deleted file mode 100644
index 26bc9a47632..00000000000
--- a/db/schema_migrations/20211207154413
+++ /dev/null
@@ -1 +0,0 @@
-98098b41864158fc4de3b8fe42603b2c0c5c2fbc664397c431712311bdaa3621 \ No newline at end of file
diff --git a/db/schema_migrations/20211207154414 b/db/schema_migrations/20211207154414
deleted file mode 100644
index c7e1f8de4d1..00000000000
--- a/db/schema_migrations/20211207154414
+++ /dev/null
@@ -1 +0,0 @@
-278907a15d04b455aa852eb9d17000c6b353be6ef78a8dcc2e71a9772a6e43ea \ No newline at end of file
diff --git a/db/schema_migrations/20211207165508 b/db/schema_migrations/20211207165508
deleted file mode 100644
index df0c91bad7d..00000000000
--- a/db/schema_migrations/20211207165508
+++ /dev/null
@@ -1 +0,0 @@
-d1ed3ddf51c0bcebbac2a8dee05aa168daa35129110a463ac296ff2e640b0dbd \ No newline at end of file
diff --git a/db/schema_migrations/20211207173510 b/db/schema_migrations/20211207173510
deleted file mode 100644
index 09474e1c643..00000000000
--- a/db/schema_migrations/20211207173510
+++ /dev/null
@@ -1 +0,0 @@
-0a4ac9de84b8351f39e549904d9e661648b496e6e3183c4ff5eb22b70d5ba7e9 \ No newline at end of file
diff --git a/db/schema_migrations/20211207173511 b/db/schema_migrations/20211207173511
deleted file mode 100644
index 93b44c20390..00000000000
--- a/db/schema_migrations/20211207173511
+++ /dev/null
@@ -1 +0,0 @@
-8f41f45c5ef23eafae2e67951497b5752f4b30ecf73ae3c08f61febfa4fb17be \ No newline at end of file
diff --git a/db/schema_migrations/20211208111425 b/db/schema_migrations/20211208111425
deleted file mode 100644
index 0b1aa9199b6..00000000000
--- a/db/schema_migrations/20211208111425
+++ /dev/null
@@ -1 +0,0 @@
-1e3f29ed1a820588da9fe135fbdd0feaa960038b99397dbd7921d4804dce1e1f \ No newline at end of file
diff --git a/db/schema_migrations/20211208122200 b/db/schema_migrations/20211208122200
deleted file mode 100644
index 1e4910d3a3c..00000000000
--- a/db/schema_migrations/20211208122200
+++ /dev/null
@@ -1 +0,0 @@
-8dec4379f34773e979cf6b33ba608185827c37b1a95c74d6472b7562c16d6110 \ No newline at end of file
diff --git a/db/schema_migrations/20211208122201 b/db/schema_migrations/20211208122201
deleted file mode 100644
index fb770a6d5fd..00000000000
--- a/db/schema_migrations/20211208122201
+++ /dev/null
@@ -1 +0,0 @@
-f58ccb07fa67ede2a50fa5ff6bddbe4bb89a622e84786fc4bfb404c11b9dbab4 \ No newline at end of file
diff --git a/db/schema_migrations/20211208171402 b/db/schema_migrations/20211208171402
deleted file mode 100644
index a563797dea5..00000000000
--- a/db/schema_migrations/20211208171402
+++ /dev/null
@@ -1 +0,0 @@
-09a9e7fc042aab19bf768a79401f33b6e7408acff303fc0ee68360dfd7605101 \ No newline at end of file
diff --git a/db/schema_migrations/20211209093636 b/db/schema_migrations/20211209093636
deleted file mode 100644
index 2d2601ff51c..00000000000
--- a/db/schema_migrations/20211209093636
+++ /dev/null
@@ -1 +0,0 @@
-e544953376948489daf4840d4a6228b18dc6e18d071a1025dab24c3559640489 \ No newline at end of file
diff --git a/db/schema_migrations/20211209093828 b/db/schema_migrations/20211209093828
deleted file mode 100644
index 7f6b5a0c442..00000000000
--- a/db/schema_migrations/20211209093828
+++ /dev/null
@@ -1 +0,0 @@
-583ee4809560fec645e6f0942b332f9ab2630d06b0a422b360c5bb546d0aad93 \ No newline at end of file
diff --git a/db/schema_migrations/20211209093923 b/db/schema_migrations/20211209093923
deleted file mode 100644
index 654d4b3967e..00000000000
--- a/db/schema_migrations/20211209093923
+++ /dev/null
@@ -1 +0,0 @@
-8ec578ddc956b2648bcdd8a2ce1728723e2b0eef1a0a4845f4cb0deb19c417ec \ No newline at end of file
diff --git a/db/schema_migrations/20211209094222 b/db/schema_migrations/20211209094222
deleted file mode 100644
index 29156e38fe9..00000000000
--- a/db/schema_migrations/20211209094222
+++ /dev/null
@@ -1 +0,0 @@
-1b461efe52d55ba9dca05e64efaae411c3de01612cbc55f9525e522e9b181b3d \ No newline at end of file
diff --git a/db/schema_migrations/20211209103048 b/db/schema_migrations/20211209103048
deleted file mode 100644
index 133d5fc1ed4..00000000000
--- a/db/schema_migrations/20211209103048
+++ /dev/null
@@ -1 +0,0 @@
-d2d270a335b3a2441a20673bf19d47553f607533d4503e3a01bc3d6d108bcdb3 \ No newline at end of file
diff --git a/db/schema_migrations/20211209203820 b/db/schema_migrations/20211209203820
deleted file mode 100644
index cdff024b597..00000000000
--- a/db/schema_migrations/20211209203820
+++ /dev/null
@@ -1 +0,0 @@
-c501bc857cef21a8657508e9a286feb3c6f5db873247707e051a8702b1e80e79 \ No newline at end of file
diff --git a/db/schema_migrations/20211209203821 b/db/schema_migrations/20211209203821
deleted file mode 100644
index 890d3db0b3a..00000000000
--- a/db/schema_migrations/20211209203821
+++ /dev/null
@@ -1 +0,0 @@
-4e8e0917bcfcadf288425e82eeb3747d775bb301017a9b320b694cd43ed0d60a \ No newline at end of file
diff --git a/db/schema_migrations/20211209230042 b/db/schema_migrations/20211209230042
deleted file mode 100644
index 818734c1330..00000000000
--- a/db/schema_migrations/20211209230042
+++ /dev/null
@@ -1 +0,0 @@
-907fafc18fa515fff8f716f6464263ccc8a9b6e5ead36f30b05089100fd71b6b \ No newline at end of file
diff --git a/db/schema_migrations/20211210025754 b/db/schema_migrations/20211210025754
deleted file mode 100644
index f2fd6e506b8..00000000000
--- a/db/schema_migrations/20211210025754
+++ /dev/null
@@ -1 +0,0 @@
-d39b46bfd4bdf81cd4969190d08dce2260b4f476564a2e6c3e05d69b87c1c6df \ No newline at end of file
diff --git a/db/schema_migrations/20211210031721 b/db/schema_migrations/20211210031721
deleted file mode 100644
index 57bbcccd347..00000000000
--- a/db/schema_migrations/20211210031721
+++ /dev/null
@@ -1 +0,0 @@
-6d62200480e46b356fe07eeb2c99b0fb441dadd00faf30079722c617facab7cc \ No newline at end of file
diff --git a/db/schema_migrations/20211210140000 b/db/schema_migrations/20211210140000
deleted file mode 100644
index b64d8251d69..00000000000
--- a/db/schema_migrations/20211210140000
+++ /dev/null
@@ -1 +0,0 @@
-f02c1b7412d2bb6d8a20639704ad55cdbcc14bfccf0509b659c3ef9614bcfa2b \ No newline at end of file
diff --git a/db/schema_migrations/20211210140629 b/db/schema_migrations/20211210140629
deleted file mode 100644
index ad631461d87..00000000000
--- a/db/schema_migrations/20211210140629
+++ /dev/null
@@ -1 +0,0 @@
-7940b0f692b62bcabbe98440082e2245fd28caba2c9e052e85e82acea0a98d23 \ No newline at end of file
diff --git a/db/schema_migrations/20211210173137 b/db/schema_migrations/20211210173137
deleted file mode 100644
index 3dfcb177167..00000000000
--- a/db/schema_migrations/20211210173137
+++ /dev/null
@@ -1 +0,0 @@
-9bbd4c3e396e0de130418e705a370ce629ca507c82fa2ff5bbf085cdf01c2ff3 \ No newline at end of file
diff --git a/db/schema_migrations/20211213064821 b/db/schema_migrations/20211213064821
deleted file mode 100644
index 119805a99b7..00000000000
--- a/db/schema_migrations/20211213064821
+++ /dev/null
@@ -1 +0,0 @@
-9d7e85ac7c9ee2b9505c479b878cb07888cf089c04d34bdeb834fbb0c5111931 \ No newline at end of file
diff --git a/db/schema_migrations/20211213102111 b/db/schema_migrations/20211213102111
deleted file mode 100644
index 214d061f265..00000000000
--- a/db/schema_migrations/20211213102111
+++ /dev/null
@@ -1 +0,0 @@
-3d011cc67fc6ac661788f2d0e3766e51d624a4248ac9dbd861a4db810d396091 \ No newline at end of file
diff --git a/db/schema_migrations/20211213130324 b/db/schema_migrations/20211213130324
deleted file mode 100644
index 529fe91ab5f..00000000000
--- a/db/schema_migrations/20211213130324
+++ /dev/null
@@ -1 +0,0 @@
-2267855b2f12747b1f31f392677fac4d4f82ee234d7c54fd209b8bad417c8c75 \ No newline at end of file
diff --git a/db/schema_migrations/20211213142344 b/db/schema_migrations/20211213142344
deleted file mode 100644
index 2bcbb15c218..00000000000
--- a/db/schema_migrations/20211213142344
+++ /dev/null
@@ -1 +0,0 @@
-837539e12be12830d388bc6142622412b40ac061c397504eac03033a08f01e72 \ No newline at end of file
diff --git a/db/schema_migrations/20211213154259 b/db/schema_migrations/20211213154259
deleted file mode 100644
index 0555d0c6600..00000000000
--- a/db/schema_migrations/20211213154259
+++ /dev/null
@@ -1 +0,0 @@
-fccb1d6c7ac4e31cecaf7bc2e23f13f6c8147a3820cbd996a545a5b01cc03865 \ No newline at end of file
diff --git a/db/schema_migrations/20211213154704 b/db/schema_migrations/20211213154704
deleted file mode 100644
index 0d9ba6457ba..00000000000
--- a/db/schema_migrations/20211213154704
+++ /dev/null
@@ -1 +0,0 @@
-deec24bae35829454a09d4e97478c0b57d5f80e3271f96b2554b1ab10dc84d7f \ No newline at end of file
diff --git a/db/schema_migrations/20211214012507 b/db/schema_migrations/20211214012507
deleted file mode 100644
index 7bac6c6d8c5..00000000000
--- a/db/schema_migrations/20211214012507
+++ /dev/null
@@ -1 +0,0 @@
-a7aa1ffccce785d365720309e3773f167075a9d06805eea941e6cd47bc918471 \ No newline at end of file
diff --git a/db/schema_migrations/20211214110307 b/db/schema_migrations/20211214110307
deleted file mode 100644
index 6e3101bbe59..00000000000
--- a/db/schema_migrations/20211214110307
+++ /dev/null
@@ -1 +0,0 @@
-a1a6e3c5b4a8f959c55edbb084b37ba555b3977e450a549925de47605638f66e \ No newline at end of file
diff --git a/db/schema_migrations/20211215090620 b/db/schema_migrations/20211215090620
deleted file mode 100644
index 9393ffee22e..00000000000
--- a/db/schema_migrations/20211215090620
+++ /dev/null
@@ -1 +0,0 @@
-43ae6290e11e3944b23ce2865b5c466a29c9ba3cfd2e0b58bd834568414b5bf2 \ No newline at end of file
diff --git a/db/schema_migrations/20211215182006 b/db/schema_migrations/20211215182006
deleted file mode 100644
index 480a1e2369b..00000000000
--- a/db/schema_migrations/20211215182006
+++ /dev/null
@@ -1 +0,0 @@
-ead2a1b13438514bb97bea3f1656f9bac352a8c733d9f808b2405685bce91e00 \ No newline at end of file
diff --git a/db/schema_migrations/20211216133107 b/db/schema_migrations/20211216133107
deleted file mode 100644
index c841207fffc..00000000000
--- a/db/schema_migrations/20211216133107
+++ /dev/null
@@ -1 +0,0 @@
-a0c3a9746250aa67ffa8d05486fb6997c8d839b8bce7e870c0415c25600c5434 \ No newline at end of file
diff --git a/db/schema_migrations/20211216134134 b/db/schema_migrations/20211216134134
deleted file mode 100644
index 09c3a59cc98..00000000000
--- a/db/schema_migrations/20211216134134
+++ /dev/null
@@ -1 +0,0 @@
-c53a1e4405187620929b8fc6877786cb713d13218f7385d1b9b3daaf6072fa05 \ No newline at end of file
diff --git a/db/schema_migrations/20211216135651 b/db/schema_migrations/20211216135651
deleted file mode 100644
index a94bdb329f1..00000000000
--- a/db/schema_migrations/20211216135651
+++ /dev/null
@@ -1 +0,0 @@
-9b733363587957b4044bc6806dfbb9632ec7f5f6ffc8c82280e025012b8acb5a \ No newline at end of file
diff --git a/db/schema_migrations/20211216220939 b/db/schema_migrations/20211216220939
deleted file mode 100644
index 3fe48da6ca2..00000000000
--- a/db/schema_migrations/20211216220939
+++ /dev/null
@@ -1 +0,0 @@
-649cf0eb794904457b230c1240d2bea8a6e80b00dbf6b2d25b95c66247460aa4 \ No newline at end of file
diff --git a/db/schema_migrations/20211217050753 b/db/schema_migrations/20211217050753
deleted file mode 100644
index bfc571acab1..00000000000
--- a/db/schema_migrations/20211217050753
+++ /dev/null
@@ -1 +0,0 @@
-fe5cbf928d45d506132078678cf70264f01190cfe581628a5038d77f68a52961 \ No newline at end of file
diff --git a/db/schema_migrations/20211217120000 b/db/schema_migrations/20211217120000
deleted file mode 100644
index d4efb66b985..00000000000
--- a/db/schema_migrations/20211217120000
+++ /dev/null
@@ -1 +0,0 @@
-d4360d6057602ec1f5e6e9d11c93cfbb16d878e9ecd4d5bfb1bed1c01e14c7a3 \ No newline at end of file
diff --git a/db/schema_migrations/20211217145923 b/db/schema_migrations/20211217145923
deleted file mode 100644
index 8a94da00fc8..00000000000
--- a/db/schema_migrations/20211217145923
+++ /dev/null
@@ -1 +0,0 @@
-2e35347592530f2a73e1cd75871438e29d277a206f621989e2c897fc587b6f5d \ No newline at end of file
diff --git a/db/schema_migrations/20211217174331 b/db/schema_migrations/20211217174331
deleted file mode 100644
index 32657e28f96..00000000000
--- a/db/schema_migrations/20211217174331
+++ /dev/null
@@ -1 +0,0 @@
-649360f4069aac4784f4d039015f8dda3f4bae28e8132f841e25b48f034a392e \ No newline at end of file
diff --git a/db/schema_migrations/20211220064757 b/db/schema_migrations/20211220064757
deleted file mode 100644
index 675596f1ce6..00000000000
--- a/db/schema_migrations/20211220064757
+++ /dev/null
@@ -1 +0,0 @@
-34bfe07fff59a415540ca2c5c96b33dc9030c15b2ffbb30cb7deedeb939ae132 \ No newline at end of file
diff --git a/db/schema_migrations/20211220120402 b/db/schema_migrations/20211220120402
deleted file mode 100644
index c2bb4f8da7e..00000000000
--- a/db/schema_migrations/20211220120402
+++ /dev/null
@@ -1 +0,0 @@
-157128732c321577b7fa7a1b3d252ff70a2a62b34cd1e6edea59da4e632a1755 \ No newline at end of file
diff --git a/db/schema_migrations/20211220123956 b/db/schema_migrations/20211220123956
deleted file mode 100644
index 291fdc306b5..00000000000
--- a/db/schema_migrations/20211220123956
+++ /dev/null
@@ -1 +0,0 @@
-088d17a1f55522c48e69ec78717b39b8c7538474a9263621bba1fa0280a27ad7 \ No newline at end of file
diff --git a/db/schema_migrations/20211220174504 b/db/schema_migrations/20211220174504
deleted file mode 100644
index ed8f5f35efc..00000000000
--- a/db/schema_migrations/20211220174504
+++ /dev/null
@@ -1 +0,0 @@
-80c1ad5815ef68ab1a7d63566d478683b3f9a5169ed15ecd6f44f7f542d40dc8 \ No newline at end of file
diff --git a/db/schema_migrations/20211223125921 b/db/schema_migrations/20211223125921
deleted file mode 100644
index b4e3a1583df..00000000000
--- a/db/schema_migrations/20211223125921
+++ /dev/null
@@ -1 +0,0 @@
-e08c1634376ed78b78c4a54d874bed66c1ce40c7c509b67cfda00d1a8657f127 \ No newline at end of file
diff --git a/db/schema_migrations/20211224112937 b/db/schema_migrations/20211224112937
deleted file mode 100644
index 98296f9a270..00000000000
--- a/db/schema_migrations/20211224112937
+++ /dev/null
@@ -1 +0,0 @@
-3709c5c229e45ff0f594d6291d0b2b9a167b3bf4f5b29158b9abdac333a638b8 \ No newline at end of file
diff --git a/db/schema_migrations/20211224114539 b/db/schema_migrations/20211224114539
deleted file mode 100644
index 2d7494e4291..00000000000
--- a/db/schema_migrations/20211224114539
+++ /dev/null
@@ -1 +0,0 @@
-f4ac776ec4213d6fcd07ccfa913f51e1386ff212bf47d27817b24b501a78443b \ No newline at end of file
diff --git a/db/schema_migrations/20211229023654 b/db/schema_migrations/20211229023654
deleted file mode 100644
index f34b188c5d3..00000000000
--- a/db/schema_migrations/20211229023654
+++ /dev/null
@@ -1 +0,0 @@
-8019915a00f62c137ee48c860c888e9d43f7253a5ea1a684ba2abe8bbe8016df \ No newline at end of file
diff --git a/db/schema_migrations/20211230112517 b/db/schema_migrations/20211230112517
deleted file mode 100644
index bd22204d82d..00000000000
--- a/db/schema_migrations/20211230112517
+++ /dev/null
@@ -1 +0,0 @@
-32c4b0ad5b52b8990b4c0ab6e832d503be6fc802a30aa2de20c7d3ced7f04c36 \ No newline at end of file
diff --git a/db/schema_migrations/20211230113031 b/db/schema_migrations/20211230113031
deleted file mode 100644
index 2f5b81768c8..00000000000
--- a/db/schema_migrations/20211230113031
+++ /dev/null
@@ -1 +0,0 @@
-54201f4273226ed92ff0ed991fdba09c1108fccb764e6b9903e9f01e6acced1a \ No newline at end of file
diff --git a/db/schema_migrations/20220104060049 b/db/schema_migrations/20220104060049
deleted file mode 100644
index 83c36018d73..00000000000
--- a/db/schema_migrations/20220104060049
+++ /dev/null
@@ -1 +0,0 @@
-fa87b087b576d320f94028444a082b920870a2554209808849f9f3f42ead83c4 \ No newline at end of file
diff --git a/db/schema_migrations/20220104174445 b/db/schema_migrations/20220104174445
deleted file mode 100644
index fffb27113e2..00000000000
--- a/db/schema_migrations/20220104174445
+++ /dev/null
@@ -1 +0,0 @@
-5e5e41ee4c8dc9c3fe791470862d15b8d213fcc931ef8b80937bdb5f5db20aed \ No newline at end of file
diff --git a/db/schema_migrations/20220105020514 b/db/schema_migrations/20220105020514
deleted file mode 100644
index 4ad9266c7c0..00000000000
--- a/db/schema_migrations/20220105020514
+++ /dev/null
@@ -1 +0,0 @@
-301c2f09f48aa3e34c2f679628a9542b4babc589e3d20e9ccf84a9209f5841ee \ No newline at end of file
diff --git a/db/schema_migrations/20220105082217 b/db/schema_migrations/20220105082217
deleted file mode 100644
index a6232406be6..00000000000
--- a/db/schema_migrations/20220105082217
+++ /dev/null
@@ -1 +0,0 @@
-448481ec9f7dd58d267e3660a49161c0e14baca35e640c59b27f2ebc4367b62a \ No newline at end of file
diff --git a/db/schema_migrations/20220105121325 b/db/schema_migrations/20220105121325
deleted file mode 100644
index 384616aba7f..00000000000
--- a/db/schema_migrations/20220105121325
+++ /dev/null
@@ -1 +0,0 @@
-27ca3977a7569e98271eeb2bd224be1cfe5452ab3778665325b89bf966e07942 \ No newline at end of file
diff --git a/db/schema_migrations/20220105152547 b/db/schema_migrations/20220105152547
deleted file mode 100644
index d8c425da736..00000000000
--- a/db/schema_migrations/20220105152547
+++ /dev/null
@@ -1 +0,0 @@
-0f1ea41fae57710e0e05c9b71a14800394c4c57e37a39e92be49c50120d7d2ee \ No newline at end of file
diff --git a/db/schema_migrations/20220105153149 b/db/schema_migrations/20220105153149
deleted file mode 100644
index 11b71946bc8..00000000000
--- a/db/schema_migrations/20220105153149
+++ /dev/null
@@ -1 +0,0 @@
-8194c695a809f2eb29e5033f089c1d20874f61731a4289026f2d550854e7097d \ No newline at end of file
diff --git a/db/schema_migrations/20220106111958 b/db/schema_migrations/20220106111958
deleted file mode 100644
index 954db532950..00000000000
--- a/db/schema_migrations/20220106111958
+++ /dev/null
@@ -1 +0,0 @@
-c1af9546bdfa0f32c3c2faf362062cd300800514e5b1efd1fa8a1770753d00e5 \ No newline at end of file
diff --git a/db/schema_migrations/20220106112043 b/db/schema_migrations/20220106112043
deleted file mode 100644
index 34c8c5152da..00000000000
--- a/db/schema_migrations/20220106112043
+++ /dev/null
@@ -1 +0,0 @@
-8b51ae2b13066a56d2131efb7ea746335513031e751fb231e43121552d6f2b1d \ No newline at end of file
diff --git a/db/schema_migrations/20220106112085 b/db/schema_migrations/20220106112085
deleted file mode 100644
index 171f893a0ab..00000000000
--- a/db/schema_migrations/20220106112085
+++ /dev/null
@@ -1 +0,0 @@
-f385631d0317630661d487011a228501a6cbc71de25ca457d75e6a815c598045 \ No newline at end of file
diff --git a/db/schema_migrations/20220106141756 b/db/schema_migrations/20220106141756
deleted file mode 100644
index 7718a41500b..00000000000
--- a/db/schema_migrations/20220106141756
+++ /dev/null
@@ -1 +0,0 @@
-cedca81a6dc1562cf0ed5f17217c52420a1cb9a74acece8d67eb1bcb948a7181 \ No newline at end of file
diff --git a/db/schema_migrations/20220106163326 b/db/schema_migrations/20220106163326
deleted file mode 100644
index dbfb9079dc1..00000000000
--- a/db/schema_migrations/20220106163326
+++ /dev/null
@@ -1 +0,0 @@
-4726d84ff42e64b1c47c5ba454ff5be05f434a86bb2af4bbe27dd00e5e3da5cb \ No newline at end of file
diff --git a/db/schema_migrations/20220106185033 b/db/schema_migrations/20220106185033
deleted file mode 100644
index be45c8bab6f..00000000000
--- a/db/schema_migrations/20220106185033
+++ /dev/null
@@ -1 +0,0 @@
-5304bc3dada6794c8f6e1082861e12fdfb059effdcd5a17e11af5300e67708bd \ No newline at end of file
diff --git a/db/schema_migrations/20220106230629 b/db/schema_migrations/20220106230629
deleted file mode 100644
index e8751a6616c..00000000000
--- a/db/schema_migrations/20220106230629
+++ /dev/null
@@ -1 +0,0 @@
-675d8f7bf77ddb860e707c25811d4eaaac1173c9fe62ce96c2708f0bbd0f4d48 \ No newline at end of file
diff --git a/db/schema_migrations/20220106230712 b/db/schema_migrations/20220106230712
deleted file mode 100644
index 589b65d423c..00000000000
--- a/db/schema_migrations/20220106230712
+++ /dev/null
@@ -1 +0,0 @@
-672b51ca014d208f971efe698edb8a8b32f541bf9d21a7f555c53f749ee936a4 \ No newline at end of file
diff --git a/db/schema_migrations/20220106231518 b/db/schema_migrations/20220106231518
deleted file mode 100644
index f7deaaa68b6..00000000000
--- a/db/schema_migrations/20220106231518
+++ /dev/null
@@ -1 +0,0 @@
-aafb52337688e8b57712872f6f7e8e67da132406b244df5e11a736b01e23354f \ No newline at end of file
diff --git a/db/schema_migrations/20220106233459 b/db/schema_migrations/20220106233459
deleted file mode 100644
index 2911e79d843..00000000000
--- a/db/schema_migrations/20220106233459
+++ /dev/null
@@ -1 +0,0 @@
-fc44084057c5fd30f0e7918b4f856a60409f08ad1eb5c3fbc2d8ad5bad7f1ffd \ No newline at end of file
diff --git a/db/schema_migrations/20220106235626 b/db/schema_migrations/20220106235626
deleted file mode 100644
index d8d8e3b20d7..00000000000
--- a/db/schema_migrations/20220106235626
+++ /dev/null
@@ -1 +0,0 @@
-34f966723cae63e831f7fc9d965cda90f1fd7bca522fc58e78a0de4b959a47a2 \ No newline at end of file
diff --git a/db/schema_migrations/20220107064845 b/db/schema_migrations/20220107064845
deleted file mode 100644
index bd63da88355..00000000000
--- a/db/schema_migrations/20220107064845
+++ /dev/null
@@ -1 +0,0 @@
-c7c645787aadc95c77df6420f437f78aed4e7e862ea2b66e7824766b1d9f3cb5 \ No newline at end of file
diff --git a/db/schema_migrations/20220107091629 b/db/schema_migrations/20220107091629
deleted file mode 100644
index a14f97d77eb..00000000000
--- a/db/schema_migrations/20220107091629
+++ /dev/null
@@ -1 +0,0 @@
-ef1a7c5f7b10640a0ddc669528dcdb02fd2525d716562f928578e8902a07a832 \ No newline at end of file
diff --git a/db/schema_migrations/20220107165036 b/db/schema_migrations/20220107165036
deleted file mode 100644
index bab28284d04..00000000000
--- a/db/schema_migrations/20220107165036
+++ /dev/null
@@ -1 +0,0 @@
-72639ba84675a6687864ef4cb6f02d0429124d7deb9ce9f3c8e255591e2f0a8d \ No newline at end of file
diff --git a/db/schema_migrations/20220109133006 b/db/schema_migrations/20220109133006
deleted file mode 100644
index e74845e2254..00000000000
--- a/db/schema_migrations/20220109133006
+++ /dev/null
@@ -1 +0,0 @@
-192fc0b934c7d52e431a0ce7524a51beb24fa004a940e6b0675e36b0da143891 \ No newline at end of file
diff --git a/db/schema_migrations/20220109134455 b/db/schema_migrations/20220109134455
deleted file mode 100644
index 7a4762e240e..00000000000
--- a/db/schema_migrations/20220109134455
+++ /dev/null
@@ -1 +0,0 @@
-fee092680e22e579ea51f776d11bbfd6a49b936e4ab776760a153ce613e7a0cd \ No newline at end of file
diff --git a/db/schema_migrations/20220110170953 b/db/schema_migrations/20220110170953
deleted file mode 100644
index d4c2aa5fcf2..00000000000
--- a/db/schema_migrations/20220110170953
+++ /dev/null
@@ -1 +0,0 @@
-da1c6f2db7cee1e4cb8b477d1892fa7206a95157a84864ad3d6022ab6cffbd1f \ No newline at end of file
diff --git a/db/schema_migrations/20220110171049 b/db/schema_migrations/20220110171049
deleted file mode 100644
index ab39a1afb25..00000000000
--- a/db/schema_migrations/20220110171049
+++ /dev/null
@@ -1 +0,0 @@
-55ad00b1cf70f5d1a3f033efccf64c2c273ad03f65823a2281869849571ab35b \ No newline at end of file
diff --git a/db/schema_migrations/20220110224913 b/db/schema_migrations/20220110224913
deleted file mode 100644
index 653324d1060..00000000000
--- a/db/schema_migrations/20220110224913
+++ /dev/null
@@ -1 +0,0 @@
-d8b206e26f6dd7e9d5f2b2d8cc5ce2e2bbe2d8d33317948f8cf110fe41872a5d \ No newline at end of file
diff --git a/db/schema_migrations/20220110231420 b/db/schema_migrations/20220110231420
deleted file mode 100644
index b46bcdfd802..00000000000
--- a/db/schema_migrations/20220110231420
+++ /dev/null
@@ -1 +0,0 @@
-768f97a38c0b741f7de99082ce7c8efb1578ac6600c3af4b30019bc987968bc9 \ No newline at end of file
diff --git a/db/schema_migrations/20220110233155 b/db/schema_migrations/20220110233155
deleted file mode 100644
index 9301c7a2a7a..00000000000
--- a/db/schema_migrations/20220110233155
+++ /dev/null
@@ -1 +0,0 @@
-e7d9d79ffb8989ab39fe719217f22736244df70c2b1461ef5a1a3f1e74e43870 \ No newline at end of file
diff --git a/db/schema_migrations/20220111002756 b/db/schema_migrations/20220111002756
deleted file mode 100644
index ca619e3eaf4..00000000000
--- a/db/schema_migrations/20220111002756
+++ /dev/null
@@ -1 +0,0 @@
-34759cbf09171f6057b87af791f5e9f3045ac5e06558147436ba32e276f40a19 \ No newline at end of file
diff --git a/db/schema_migrations/20220111023852 b/db/schema_migrations/20220111023852
deleted file mode 100644
index 15ab0470662..00000000000
--- a/db/schema_migrations/20220111023852
+++ /dev/null
@@ -1 +0,0 @@
-fdb6e193748f9933aa3ae60fab41960e06d4edf271048fc5f6c9c465d30a8334 \ No newline at end of file
diff --git a/db/schema_migrations/20220111093534 b/db/schema_migrations/20220111093534
deleted file mode 100644
index 5999dbdf49a..00000000000
--- a/db/schema_migrations/20220111093534
+++ /dev/null
@@ -1 +0,0 @@
-ff0127967c3ee6e4f4af528b84024a6a838f8dbeb19cf78d7d913d4fc8e155e7 \ No newline at end of file
diff --git a/db/schema_migrations/20220111095006 b/db/schema_migrations/20220111095006
deleted file mode 100644
index b5fed6279f1..00000000000
--- a/db/schema_migrations/20220111095006
+++ /dev/null
@@ -1 +0,0 @@
-0bc00cc8a5fa7cafa665ec113a4d0d1384c5acde37dfdf53ab1f5a2e1d6acb02 \ No newline at end of file
diff --git a/db/schema_migrations/20220111095007 b/db/schema_migrations/20220111095007
deleted file mode 100644
index 77c70f8bccf..00000000000
--- a/db/schema_migrations/20220111095007
+++ /dev/null
@@ -1 +0,0 @@
-65259b0e71c1883b81c61354325cfeeade0013b55af8901bf707f2a94ee3a46a \ No newline at end of file
diff --git a/db/schema_migrations/20220111101421 b/db/schema_migrations/20220111101421
deleted file mode 100644
index 16d47665734..00000000000
--- a/db/schema_migrations/20220111101421
+++ /dev/null
@@ -1 +0,0 @@
-abbba4ccacebb825c3f9cb5b0463d457fd4a7b4396a2184a995e496aebaf4521 \ No newline at end of file
diff --git a/db/schema_migrations/20220111102314 b/db/schema_migrations/20220111102314
deleted file mode 100644
index 95c172c3587..00000000000
--- a/db/schema_migrations/20220111102314
+++ /dev/null
@@ -1 +0,0 @@
-69c20daf6a23346288e516df3e70120819d76dcb5fe2b1b51af416349311820b \ No newline at end of file
diff --git a/db/schema_migrations/20220111154950 b/db/schema_migrations/20220111154950
deleted file mode 100644
index 6070beb76e9..00000000000
--- a/db/schema_migrations/20220111154950
+++ /dev/null
@@ -1 +0,0 @@
-4719c533acaac3234ac0e131c70be49d0f98642e29e7d2e31519cc6c372056bc \ No newline at end of file
diff --git a/db/schema_migrations/20220111154951 b/db/schema_migrations/20220111154951
deleted file mode 100644
index 9d18e4c4d44..00000000000
--- a/db/schema_migrations/20220111154951
+++ /dev/null
@@ -1 +0,0 @@
-48d6eaa68912f702be2bd38609bea4fa807eab7131f7c5e2261416820df9836a \ No newline at end of file
diff --git a/db/schema_migrations/20220111200254 b/db/schema_migrations/20220111200254
deleted file mode 100644
index 36ce3ad56f0..00000000000
--- a/db/schema_migrations/20220111200254
+++ /dev/null
@@ -1 +0,0 @@
-72c7e04b1a34154c894f93da800c15c717c3340d34729577538d539881d2e8ca \ No newline at end of file
diff --git a/db/schema_migrations/20220111221516 b/db/schema_migrations/20220111221516
deleted file mode 100644
index b0c747f8e8a..00000000000
--- a/db/schema_migrations/20220111221516
+++ /dev/null
@@ -1 +0,0 @@
-0cb120b0036b3f472edb57fcb8a52877d399edf8ff1f416ce76497d6aa8265d7 \ No newline at end of file
diff --git a/db/schema_migrations/20220112015940 b/db/schema_migrations/20220112015940
deleted file mode 100644
index 0d012793ba0..00000000000
--- a/db/schema_migrations/20220112015940
+++ /dev/null
@@ -1 +0,0 @@
-e4417c3367115d6adba023e18657d8aecd476b8d1c4227c73e06f97d05af07ad \ No newline at end of file
diff --git a/db/schema_migrations/20220112090556 b/db/schema_migrations/20220112090556
deleted file mode 100644
index 12ffaeffe00..00000000000
--- a/db/schema_migrations/20220112090556
+++ /dev/null
@@ -1 +0,0 @@
-e78e11a47017c67130fe88fa538578553b7015c18cf222b5e7fb7f503254dc6d \ No newline at end of file
diff --git a/db/schema_migrations/20220112115413 b/db/schema_migrations/20220112115413
deleted file mode 100644
index 9c8c653f69b..00000000000
--- a/db/schema_migrations/20220112115413
+++ /dev/null
@@ -1 +0,0 @@
-1199adba4c13e9234eabadefeb55ed3cfb19e9d5a87c07b90d438e4f48a973f7 \ No newline at end of file
diff --git a/db/schema_migrations/20220112205111 b/db/schema_migrations/20220112205111
deleted file mode 100644
index a2d2d42271e..00000000000
--- a/db/schema_migrations/20220112205111
+++ /dev/null
@@ -1 +0,0 @@
-65d9a1d63e90dfc336d0c69503c0899259fda773bc68a330782c206ac0fc48fd \ No newline at end of file
diff --git a/db/schema_migrations/20220112230642 b/db/schema_migrations/20220112230642
deleted file mode 100644
index c2d8e1d0a6e..00000000000
--- a/db/schema_migrations/20220112230642
+++ /dev/null
@@ -1 +0,0 @@
-c528730414c1dcda5d312f03d4e37a0dbb51ebb0b0b87ada786cf686c358daa7 \ No newline at end of file
diff --git a/db/schema_migrations/20220112232037 b/db/schema_migrations/20220112232037
deleted file mode 100644
index 83267de0489..00000000000
--- a/db/schema_migrations/20220112232037
+++ /dev/null
@@ -1 +0,0 @@
-775ac42ad194bd0175a6925e1c2e83c11d57a8d4430ad08a70e3d5275ca2e709 \ No newline at end of file
diff --git a/db/schema_migrations/20220112232605 b/db/schema_migrations/20220112232605
deleted file mode 100644
index fb5809b543e..00000000000
--- a/db/schema_migrations/20220112232605
+++ /dev/null
@@ -1 +0,0 @@
-4813b55e933564851f2fec9a2fa5900409eff226fec34ae0be1895307f603904 \ No newline at end of file
diff --git a/db/schema_migrations/20220112232723 b/db/schema_migrations/20220112232723
deleted file mode 100644
index 2dc2a592980..00000000000
--- a/db/schema_migrations/20220112232723
+++ /dev/null
@@ -1 +0,0 @@
-cbea97a0d067939ba9d713489448cb6e0cc45b2bbd2c717ecf521493cc39d568 \ No newline at end of file
diff --git a/db/schema_migrations/20220113013319 b/db/schema_migrations/20220113013319
deleted file mode 100644
index 0dc31b95004..00000000000
--- a/db/schema_migrations/20220113013319
+++ /dev/null
@@ -1 +0,0 @@
-ccfbbbe52b27833453f867c4d7093187d21dbbfebe054b366ff010c54de50974 \ No newline at end of file
diff --git a/db/schema_migrations/20220113014438 b/db/schema_migrations/20220113014438
deleted file mode 100644
index 936c801bafe..00000000000
--- a/db/schema_migrations/20220113014438
+++ /dev/null
@@ -1 +0,0 @@
-08d8a5a605058598a2f033bbd461518c502fb3da8627240c5d66f887b43f3ac3 \ No newline at end of file
diff --git a/db/schema_migrations/20220113015830 b/db/schema_migrations/20220113015830
deleted file mode 100644
index a4897410077..00000000000
--- a/db/schema_migrations/20220113015830
+++ /dev/null
@@ -1 +0,0 @@
-774a5ff616663d6d0e002bd04d33747982de10b02cbb9ad7d8abfe0b26a2b441 \ No newline at end of file
diff --git a/db/schema_migrations/20220113035519 b/db/schema_migrations/20220113035519
deleted file mode 100644
index eb908ae8982..00000000000
--- a/db/schema_migrations/20220113035519
+++ /dev/null
@@ -1 +0,0 @@
-4a90811aace678528b75171868fb178ab885d5aac885048e8eacecaf8b0ee374 \ No newline at end of file
diff --git a/db/schema_migrations/20220113040447 b/db/schema_migrations/20220113040447
deleted file mode 100644
index 465b51678f7..00000000000
--- a/db/schema_migrations/20220113040447
+++ /dev/null
@@ -1 +0,0 @@
-983e5522b2798ca0d17ca3fd848f527b12afdbdd1482a2d420c4c6ce4fa2c9c4 \ No newline at end of file
diff --git a/db/schema_migrations/20220113111440 b/db/schema_migrations/20220113111440
deleted file mode 100644
index e6188a9616f..00000000000
--- a/db/schema_migrations/20220113111440
+++ /dev/null
@@ -1 +0,0 @@
-faf899c1aa99e596eb386935ee6ff17a51b7942ee4f6d4cbd1ad2283dd0d40c0 \ No newline at end of file
diff --git a/db/schema_migrations/20220113125401 b/db/schema_migrations/20220113125401
deleted file mode 100644
index 7241e2e29c7..00000000000
--- a/db/schema_migrations/20220113125401
+++ /dev/null
@@ -1 +0,0 @@
-afe57b6b1b8b10e0e26d7f499b25adc5aef9f7c52af644d6a260f0ed3aab16d5 \ No newline at end of file
diff --git a/db/schema_migrations/20220113135449 b/db/schema_migrations/20220113135449
deleted file mode 100644
index 57e6ede94b5..00000000000
--- a/db/schema_migrations/20220113135449
+++ /dev/null
@@ -1 +0,0 @@
-46796379175ce9343907234d3ae14a417442c7c5ebbfcf6987db1d759eca2c3a \ No newline at end of file
diff --git a/db/schema_migrations/20220113135924 b/db/schema_migrations/20220113135924
deleted file mode 100644
index 41328a43c37..00000000000
--- a/db/schema_migrations/20220113135924
+++ /dev/null
@@ -1 +0,0 @@
-2a230758c13111c9e3738794008c31a3608dda2f0d071fbde0ad3cd782d29162 \ No newline at end of file
diff --git a/db/schema_migrations/20220113164801 b/db/schema_migrations/20220113164801
deleted file mode 100644
index 8354489ac31..00000000000
--- a/db/schema_migrations/20220113164801
+++ /dev/null
@@ -1 +0,0 @@
-71526ea198c64d23a35f06804f30068591e937df22d74c262fdec9ecf04bf7d4 \ No newline at end of file
diff --git a/db/schema_migrations/20220113164901 b/db/schema_migrations/20220113164901
deleted file mode 100644
index 977ec8bb51b..00000000000
--- a/db/schema_migrations/20220113164901
+++ /dev/null
@@ -1 +0,0 @@
-b157cec5eab77665ae57f02647c39dc0fb167d78e1894b395c46f59d791ab3e0 \ No newline at end of file
diff --git a/db/schema_migrations/20220114105525 b/db/schema_migrations/20220114105525
deleted file mode 100644
index 728820cbaf0..00000000000
--- a/db/schema_migrations/20220114105525
+++ /dev/null
@@ -1 +0,0 @@
-c9c7e8ff40fd3863095bb927f1aea27fecd5ca77dfc284a7673310e3501476c8 \ No newline at end of file
diff --git a/db/schema_migrations/20220114131950 b/db/schema_migrations/20220114131950
deleted file mode 100644
index ca1e1033d9b..00000000000
--- a/db/schema_migrations/20220114131950
+++ /dev/null
@@ -1 +0,0 @@
-f427f4c0d75308f7c97685e10e27a735dcf284714acd49659f62a6f7752234ef \ No newline at end of file
diff --git a/db/schema_migrations/20220116175851 b/db/schema_migrations/20220116175851
deleted file mode 100644
index 47c21071440..00000000000
--- a/db/schema_migrations/20220116175851
+++ /dev/null
@@ -1 +0,0 @@
-3fa0d827ab8051d270a13ae5facb1560a87f9f4fef81368b9fbb5d6291948721 \ No newline at end of file
diff --git a/db/schema_migrations/20220117034056 b/db/schema_migrations/20220117034056
deleted file mode 100644
index acf76bfb9d6..00000000000
--- a/db/schema_migrations/20220117034056
+++ /dev/null
@@ -1 +0,0 @@
-afc54500374602edcdc4fce5acf3673b84882da1afbb5598a6684a5ef480a2d7 \ No newline at end of file
diff --git a/db/schema_migrations/20220117082611 b/db/schema_migrations/20220117082611
deleted file mode 100644
index 9dead593ffb..00000000000
--- a/db/schema_migrations/20220117082611
+++ /dev/null
@@ -1 +0,0 @@
-28df9a8b5bf73bc33275cfe47f260788fa3263680a97128e086fd1698ccac1d8 \ No newline at end of file
diff --git a/db/schema_migrations/20220117225936 b/db/schema_migrations/20220117225936
deleted file mode 100644
index 7ced75915e4..00000000000
--- a/db/schema_migrations/20220117225936
+++ /dev/null
@@ -1 +0,0 @@
-484eaf2ce1df1e2915b7ea8a5c9f4e044957c25d1ccf5841f24c75791d1a1a13 \ No newline at end of file
diff --git a/db/schema_migrations/20220118015633 b/db/schema_migrations/20220118015633
deleted file mode 100644
index 8ba4a376bcd..00000000000
--- a/db/schema_migrations/20220118015633
+++ /dev/null
@@ -1 +0,0 @@
-6a73f49306de7c799a39afa3ac1f761840860833a96f1a91cf992c9a3ebfef9b \ No newline at end of file
diff --git a/db/schema_migrations/20220118020026 b/db/schema_migrations/20220118020026
deleted file mode 100644
index fe9dcccbc0c..00000000000
--- a/db/schema_migrations/20220118020026
+++ /dev/null
@@ -1 +0,0 @@
-77374c81456f235d3afeb45cdda14552e1ef8047de5aaa3f5bb0a82e4aebe849 \ No newline at end of file
diff --git a/db/schema_migrations/20220118141950 b/db/schema_migrations/20220118141950
deleted file mode 100644
index 7c6549a1e60..00000000000
--- a/db/schema_migrations/20220118141950
+++ /dev/null
@@ -1 +0,0 @@
-a4131f86bc415f0c1897e3b975494806ffc5a834dca2b39c998c6a406e695e15 \ No newline at end of file
diff --git a/db/schema_migrations/20220118155846 b/db/schema_migrations/20220118155846
deleted file mode 100644
index b5247cb3743..00000000000
--- a/db/schema_migrations/20220118155846
+++ /dev/null
@@ -1 +0,0 @@
-88935eee0781ee1faaf52e3bc89dc5c490c2095d6ccf83e4fd4186641507c173 \ No newline at end of file
diff --git a/db/schema_migrations/20220118155847 b/db/schema_migrations/20220118155847
deleted file mode 100644
index caa0dfc5901..00000000000
--- a/db/schema_migrations/20220118155847
+++ /dev/null
@@ -1 +0,0 @@
-aa73b04aa355111564cdc7adb036a2030a28fbb3b524c3b3dbb8248e27b845d7 \ No newline at end of file
diff --git a/db/schema_migrations/20220118155848 b/db/schema_migrations/20220118155848
deleted file mode 100644
index bf3205b5dda..00000000000
--- a/db/schema_migrations/20220118155848
+++ /dev/null
@@ -1 +0,0 @@
-4d5adffe1a3e835d6d23f6bd9634993c778fef23d134552d54b003af2a3ff4da \ No newline at end of file
diff --git a/db/schema_migrations/20220118204039 b/db/schema_migrations/20220118204039
deleted file mode 100644
index 209204054ff..00000000000
--- a/db/schema_migrations/20220118204039
+++ /dev/null
@@ -1 +0,0 @@
-9b33f6e0c13acbf1adfc1b70f75418ceabc000a748c9216328ef36f1b8716ded \ No newline at end of file
diff --git a/db/schema_migrations/20220119094023 b/db/schema_migrations/20220119094023
deleted file mode 100644
index c2bf5ce88d6..00000000000
--- a/db/schema_migrations/20220119094023
+++ /dev/null
@@ -1 +0,0 @@
-4eddd356d87ce8fc8168dabe678211239e8d4051804d51d3bdce8cc137fa5a0d \ No newline at end of file
diff --git a/db/schema_migrations/20220119094503 b/db/schema_migrations/20220119094503
deleted file mode 100644
index 840a4d82593..00000000000
--- a/db/schema_migrations/20220119094503
+++ /dev/null
@@ -1 +0,0 @@
-1048b3a9744f212297c0a3aba176556e92e85f199ac861eb3ee4183eff002860 \ No newline at end of file
diff --git a/db/schema_migrations/20220119141407 b/db/schema_migrations/20220119141407
deleted file mode 100644
index 0ff56c63dd6..00000000000
--- a/db/schema_migrations/20220119141407
+++ /dev/null
@@ -1 +0,0 @@
-18b3ef459c3633ebd4b418b4436d3d50b0dc697fa7c4ef4d2e1f62b01d656bce \ No newline at end of file
diff --git a/db/schema_migrations/20220119141736 b/db/schema_migrations/20220119141736
deleted file mode 100644
index 431ed37ea5c..00000000000
--- a/db/schema_migrations/20220119141736
+++ /dev/null
@@ -1 +0,0 @@
-faa30b386af9adf3e9f54a0e8e2880310490e4dc1378eae68b346872d0bb8bfd \ No newline at end of file
diff --git a/db/schema_migrations/20220119143130 b/db/schema_migrations/20220119143130
deleted file mode 100644
index 8c9092fd187..00000000000
--- a/db/schema_migrations/20220119143130
+++ /dev/null
@@ -1 +0,0 @@
-a375f82fe0c1ef87aa6abb2142387b852b135be6e2158fd8456b23dc9bcf2a0e \ No newline at end of file
diff --git a/db/schema_migrations/20220119144253 b/db/schema_migrations/20220119144253
deleted file mode 100644
index ee59402bbcc..00000000000
--- a/db/schema_migrations/20220119144253
+++ /dev/null
@@ -1 +0,0 @@
-723db0d234a4dadfdad68a92c249ec0b42e519297f48bcb843e89c1ad97032c7 \ No newline at end of file
diff --git a/db/schema_migrations/20220119144458 b/db/schema_migrations/20220119144458
deleted file mode 100644
index c5eb43a3730..00000000000
--- a/db/schema_migrations/20220119144458
+++ /dev/null
@@ -1 +0,0 @@
-85227d2aa0e984f12362484b23554a4feb1304d055d54da40e20812f2d8c5b9e \ No newline at end of file
diff --git a/db/schema_migrations/20220119151221 b/db/schema_migrations/20220119151221
deleted file mode 100644
index 377170d9cb1..00000000000
--- a/db/schema_migrations/20220119151221
+++ /dev/null
@@ -1 +0,0 @@
-7865f26c43c79681f37ceb6e4fecf6153282856907ddfd8211d6d1d57d1fb7f3 \ No newline at end of file
diff --git a/db/schema_migrations/20220119153706 b/db/schema_migrations/20220119153706
deleted file mode 100644
index 446fee12b44..00000000000
--- a/db/schema_migrations/20220119153706
+++ /dev/null
@@ -1 +0,0 @@
-f87eec3c61cfc9dc860fe77af1fbe98c1ea2a9b0dc1b2dbdaaee4276b518af73 \ No newline at end of file
diff --git a/db/schema_migrations/20220119154442 b/db/schema_migrations/20220119154442
deleted file mode 100644
index 78880a0164c..00000000000
--- a/db/schema_migrations/20220119154442
+++ /dev/null
@@ -1 +0,0 @@
-7cb06f695c7e8e733ea50f0b2e8fbb115d5ac0d7e7f000228bd5ced58ab362c9 \ No newline at end of file
diff --git a/db/schema_migrations/20220119170426 b/db/schema_migrations/20220119170426
deleted file mode 100644
index 51274ac5979..00000000000
--- a/db/schema_migrations/20220119170426
+++ /dev/null
@@ -1 +0,0 @@
-a488fecd8e6e99b8d32ac27f72c6a3575b0ed29baaf242133e5d1abbd5b64314 \ No newline at end of file
diff --git a/db/schema_migrations/20220119193130 b/db/schema_migrations/20220119193130
deleted file mode 100644
index 5305ff9465e..00000000000
--- a/db/schema_migrations/20220119193130
+++ /dev/null
@@ -1 +0,0 @@
-c991eda1b3a972a7da9bdbd5e1f9957394c52246b78d793b4b35fdec9daf6acd \ No newline at end of file
diff --git a/db/schema_migrations/20220119201340 b/db/schema_migrations/20220119201340
deleted file mode 100644
index 0dc36b2dfba..00000000000
--- a/db/schema_migrations/20220119201340
+++ /dev/null
@@ -1 +0,0 @@
-62b35cc5bd0abc5b7bcf4347346de832bbbed723fee7860ec649185d4d5fb53c \ No newline at end of file
diff --git a/db/schema_migrations/20220119203119 b/db/schema_migrations/20220119203119
deleted file mode 100644
index 43bdb5b0391..00000000000
--- a/db/schema_migrations/20220119203119
+++ /dev/null
@@ -1 +0,0 @@
-c0f29fd7f960ffd92a65a00e8dce123b91a604f4d89b7cf0bc419fa80495e2e5 \ No newline at end of file
diff --git a/db/schema_migrations/20220119220620 b/db/schema_migrations/20220119220620
deleted file mode 100644
index a6a9abb2acc..00000000000
--- a/db/schema_migrations/20220119220620
+++ /dev/null
@@ -1 +0,0 @@
-535f476a358dcb3f3472f1e0ec1afef738f995197b5d1f4fcd61e58a9c9e8e75 \ No newline at end of file
diff --git a/db/schema_migrations/20220120033115 b/db/schema_migrations/20220120033115
deleted file mode 100644
index ef71ca650cd..00000000000
--- a/db/schema_migrations/20220120033115
+++ /dev/null
@@ -1 +0,0 @@
-41b67585574f6309d8e32fe695e65fc43f15f6738db713c1a11e04558a5ec515 \ No newline at end of file
diff --git a/db/schema_migrations/20220120085655 b/db/schema_migrations/20220120085655
deleted file mode 100644
index 534108786ec..00000000000
--- a/db/schema_migrations/20220120085655
+++ /dev/null
@@ -1 +0,0 @@
-966c42749e9d200f2b7295fdbb86e596c33510f0abbf431d40b09629e5e4a6aa \ No newline at end of file
diff --git a/db/schema_migrations/20220120094340 b/db/schema_migrations/20220120094340
deleted file mode 100644
index 423adf5cc94..00000000000
--- a/db/schema_migrations/20220120094340
+++ /dev/null
@@ -1 +0,0 @@
-69d8283501ba6a4946a60e3812fe2cf3031fc4a915d6e7c6fac3bf272423f2f2 \ No newline at end of file
diff --git a/db/schema_migrations/20220120123700 b/db/schema_migrations/20220120123700
deleted file mode 100644
index 263901fff19..00000000000
--- a/db/schema_migrations/20220120123700
+++ /dev/null
@@ -1 +0,0 @@
-9e274eae18520821dd890a11c8c6192da82a6051dce9ec2934b1365e57a10fdb \ No newline at end of file
diff --git a/db/schema_migrations/20220120123800 b/db/schema_migrations/20220120123800
deleted file mode 100644
index 6d271f75c08..00000000000
--- a/db/schema_migrations/20220120123800
+++ /dev/null
@@ -1 +0,0 @@
-9d2f0b0d2cb1a5844bdca5bcb4b82fa5cc6b465fa19177f9f6ca16574128fdc8 \ No newline at end of file
diff --git a/db/schema_migrations/20220120160625 b/db/schema_migrations/20220120160625
deleted file mode 100644
index 287e364d331..00000000000
--- a/db/schema_migrations/20220120160625
+++ /dev/null
@@ -1 +0,0 @@
-92485ceb25d5733efe9a35a5bd64c9f33253bb10f815590518c6fc8d1c9e5f39 \ No newline at end of file
diff --git a/db/schema_migrations/20220120211831 b/db/schema_migrations/20220120211831
deleted file mode 100644
index 7601916df62..00000000000
--- a/db/schema_migrations/20220120211831
+++ /dev/null
@@ -1 +0,0 @@
-68b45f97a2165c934f097ca976fb27ffcb533c57facee95344e3985b5cfd8347 \ No newline at end of file
diff --git a/db/schema_migrations/20220120211832 b/db/schema_migrations/20220120211832
deleted file mode 100644
index ed7679d4573..00000000000
--- a/db/schema_migrations/20220120211832
+++ /dev/null
@@ -1 +0,0 @@
-dd3a4209a72b470a14a3acc5d06db1f5fec67cb4f19b20b2e4d7d94b302fe122 \ No newline at end of file
diff --git a/db/schema_migrations/20220121214752 b/db/schema_migrations/20220121214752
deleted file mode 100644
index 84c03a6ed90..00000000000
--- a/db/schema_migrations/20220121214752
+++ /dev/null
@@ -1 +0,0 @@
-c56983a489b56eb6b4a5cd5ae6947a322fd58b8e96bcdee1e38634d99727c432 \ No newline at end of file
diff --git a/db/schema_migrations/20220121214753 b/db/schema_migrations/20220121214753
deleted file mode 100644
index 5142044be97..00000000000
--- a/db/schema_migrations/20220121214753
+++ /dev/null
@@ -1 +0,0 @@
-b7b9f5e516664e7eb3f7a5307d1871bb4f58a31f4807e0298fbf9414bad567fa \ No newline at end of file
diff --git a/db/schema_migrations/20220121221651 b/db/schema_migrations/20220121221651
deleted file mode 100644
index 562751c6084..00000000000
--- a/db/schema_migrations/20220121221651
+++ /dev/null
@@ -1 +0,0 @@
-a1681c1c619db7f4e7e5a760cee7d06a931aa1f02dccfce46be81d75a03ce8ac \ No newline at end of file
diff --git a/db/schema_migrations/20220124130028 b/db/schema_migrations/20220124130028
deleted file mode 100644
index 5ee8e463a55..00000000000
--- a/db/schema_migrations/20220124130028
+++ /dev/null
@@ -1 +0,0 @@
-7f2b3e70e33273d75f68bd1fa33103f24a4e4cfc3f2e5777dfd258b5a2e7bf4e \ No newline at end of file
diff --git a/db/schema_migrations/20220124145019 b/db/schema_migrations/20220124145019
deleted file mode 100644
index 8de01024798..00000000000
--- a/db/schema_migrations/20220124145019
+++ /dev/null
@@ -1 +0,0 @@
-3b1f7a7b6481a960ac25523e5e1b5abc6c1436332d64d4319d9e4112b0fa765e \ No newline at end of file
diff --git a/db/schema_migrations/20220124151456 b/db/schema_migrations/20220124151456
deleted file mode 100644
index 10a7b978e2f..00000000000
--- a/db/schema_migrations/20220124151456
+++ /dev/null
@@ -1 +0,0 @@
-5ec73b28adb027a4462ec9b268ef9c505e281f1afedce3c592d431cd90808dac \ No newline at end of file
diff --git a/db/schema_migrations/20220124151949 b/db/schema_migrations/20220124151949
deleted file mode 100644
index 2d6305b9789..00000000000
--- a/db/schema_migrations/20220124151949
+++ /dev/null
@@ -1 +0,0 @@
-4eb33deb4c2d5ff587f8af57b8296e46911f24a6ed0b2f7ff1f36243f1a9013d \ No newline at end of file
diff --git a/db/schema_migrations/20220124152824 b/db/schema_migrations/20220124152824
deleted file mode 100644
index 5a0db5859f0..00000000000
--- a/db/schema_migrations/20220124152824
+++ /dev/null
@@ -1 +0,0 @@
-acf680cbf06d6eb2c0da44d416ff947e0460593cad74499acda91eb4bec63894 \ No newline at end of file
diff --git a/db/schema_migrations/20220124153233 b/db/schema_migrations/20220124153233
deleted file mode 100644
index bfb0d6f3c38..00000000000
--- a/db/schema_migrations/20220124153233
+++ /dev/null
@@ -1 +0,0 @@
-f62f3d4cc6f4704e7b4e7d0b6b8e46ed3de4407f0db4282e2ce845aa6c0b3f3f \ No newline at end of file
diff --git a/db/schema_migrations/20220124153234 b/db/schema_migrations/20220124153234
deleted file mode 100644
index dfca9995395..00000000000
--- a/db/schema_migrations/20220124153234
+++ /dev/null
@@ -1 +0,0 @@
-0e8559121504f1a34394b5f613ef2c5554261f6aeaeaaf5a15d018803c4e5452 \ No newline at end of file
diff --git a/db/schema_migrations/20220124180704 b/db/schema_migrations/20220124180704
deleted file mode 100644
index ef59507a2e8..00000000000
--- a/db/schema_migrations/20220124180704
+++ /dev/null
@@ -1 +0,0 @@
-5b5f47f1d7038518fef71dd8c0758b234bb890be9aab57b78918f7b2dc39bdc4 \ No newline at end of file
diff --git a/db/schema_migrations/20220124180705 b/db/schema_migrations/20220124180705
deleted file mode 100644
index c1600192af1..00000000000
--- a/db/schema_migrations/20220124180705
+++ /dev/null
@@ -1 +0,0 @@
-6c147287ba8436bd0231dc22195c95a71d19987d23741c1291a117407f493184 \ No newline at end of file
diff --git a/db/schema_migrations/20220124184338 b/db/schema_migrations/20220124184338
deleted file mode 100644
index 860b47090c2..00000000000
--- a/db/schema_migrations/20220124184338
+++ /dev/null
@@ -1 +0,0 @@
-ae696157794bcbe3ebd0dc41d7b3fe4dc61982ad4a96fa503fd7857e0d3dab16 \ No newline at end of file
diff --git a/db/schema_migrations/20220124200927 b/db/schema_migrations/20220124200927
deleted file mode 100644
index ff29cc59538..00000000000
--- a/db/schema_migrations/20220124200927
+++ /dev/null
@@ -1 +0,0 @@
-688232dde01ea4e8574dca73459094264bde405d799ecaf1a5867adb72576b98 \ No newline at end of file
diff --git a/db/schema_migrations/20220124204046 b/db/schema_migrations/20220124204046
deleted file mode 100644
index f8de3adc215..00000000000
--- a/db/schema_migrations/20220124204046
+++ /dev/null
@@ -1 +0,0 @@
-90115936ede32bbf9a299582409cb0686e8072c204c4f91364dfb13195155929 \ No newline at end of file
diff --git a/db/schema_migrations/20220124214131 b/db/schema_migrations/20220124214131
deleted file mode 100644
index 7454bd8b3d1..00000000000
--- a/db/schema_migrations/20220124214131
+++ /dev/null
@@ -1 +0,0 @@
-af60c6df0fb178a4820ea8cb40b402178da7fb4b6ebeabb8739dc45b96225f89 \ No newline at end of file
diff --git a/db/schema_migrations/20220124215857 b/db/schema_migrations/20220124215857
deleted file mode 100644
index 495e428d2c4..00000000000
--- a/db/schema_migrations/20220124215857
+++ /dev/null
@@ -1 +0,0 @@
-785c2404175faef7d3d6f81ae8652ca0ced0f4b01def8d6364a4450f0db49ecf \ No newline at end of file
diff --git a/db/schema_migrations/20220124221521 b/db/schema_migrations/20220124221521
deleted file mode 100644
index 8400dcbc1e2..00000000000
--- a/db/schema_migrations/20220124221521
+++ /dev/null
@@ -1 +0,0 @@
-4b1dad4fc34717c9b89a770e4e0682b0cee7d421da68223011bb9fde9460d1f8 \ No newline at end of file
diff --git a/db/schema_migrations/20220125083520 b/db/schema_migrations/20220125083520
deleted file mode 100644
index c3fbb6beda5..00000000000
--- a/db/schema_migrations/20220125083520
+++ /dev/null
@@ -1 +0,0 @@
-2c3f7c587b2a20de1d8581584f7392fd81643af4eb7e25ffc8e08514b6ad83ab \ No newline at end of file
diff --git a/db/schema_migrations/20220125084127 b/db/schema_migrations/20220125084127
deleted file mode 100644
index f9ba7a4628b..00000000000
--- a/db/schema_migrations/20220125084127
+++ /dev/null
@@ -1 +0,0 @@
-c50a21430e52fc6ccbe7ab4aba99ae3a48d1c69858f7886da115f54e19fc27ea \ No newline at end of file
diff --git a/db/schema_migrations/20220125084348 b/db/schema_migrations/20220125084348
deleted file mode 100644
index 9d4cbd7c5ed..00000000000
--- a/db/schema_migrations/20220125084348
+++ /dev/null
@@ -1 +0,0 @@
-75eb050fc789eb5775a5d3a88c2573dca5c38e16b63cd342bf46dca55d1adaef \ No newline at end of file
diff --git a/db/schema_migrations/20220125122228 b/db/schema_migrations/20220125122228
deleted file mode 100644
index 2add72978c6..00000000000
--- a/db/schema_migrations/20220125122228
+++ /dev/null
@@ -1 +0,0 @@
-26600e01d8b31a4308d0e23564e4d4c52488ec87ad7990a410b7cc0c031f12e7 \ No newline at end of file
diff --git a/db/schema_migrations/20220125122640 b/db/schema_migrations/20220125122640
deleted file mode 100644
index fdb85bb480a..00000000000
--- a/db/schema_migrations/20220125122640
+++ /dev/null
@@ -1 +0,0 @@
-51c7ab860b952281bd7f65d68e7a539a8eee57cac3bbdaf439ff5593f5b065ed \ No newline at end of file
diff --git a/db/schema_migrations/20220125122725 b/db/schema_migrations/20220125122725
deleted file mode 100644
index 7a6ef38bfbc..00000000000
--- a/db/schema_migrations/20220125122725
+++ /dev/null
@@ -1 +0,0 @@
-7740d1e71571576a709ae5bfd46f60ea3fb4be3f48cddec2cca53f148096cdd7 \ No newline at end of file
diff --git a/db/schema_migrations/20220125230538 b/db/schema_migrations/20220125230538
deleted file mode 100644
index 45bd8bfb04c..00000000000
--- a/db/schema_migrations/20220125230538
+++ /dev/null
@@ -1 +0,0 @@
-6f3a3712288c3316042426d60f087817eb57a3246b750831aa72f95f30269a5d \ No newline at end of file
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/20220126201752 b/db/schema_migrations/20220126201752
deleted file mode 100644
index e5a1970ec9e..00000000000
--- a/db/schema_migrations/20220126201752
+++ /dev/null
@@ -1 +0,0 @@
-7731772dfac065a60c1626707913ddf6ff632bb69dd5ed6534e8d29e4e03c573 \ No newline at end of file
diff --git a/db/schema_migrations/20220126202654 b/db/schema_migrations/20220126202654
deleted file mode 100644
index 341e2c6b8bf..00000000000
--- a/db/schema_migrations/20220126202654
+++ /dev/null
@@ -1 +0,0 @@
-6067e4e22e49548496454b48171f8168f7d5bf626fedab4351e2a37a3f85731b \ No newline at end of file
diff --git a/db/schema_migrations/20220126203421 b/db/schema_migrations/20220126203421
deleted file mode 100644
index 32469cd40ee..00000000000
--- a/db/schema_migrations/20220126203421
+++ /dev/null
@@ -1 +0,0 @@
-07f837ddde21e36d1ca6a471dd96350d3020bd30204fca0e093983810c94e54d \ No newline at end of file
diff --git a/db/schema_migrations/20220126210021 b/db/schema_migrations/20220126210021
deleted file mode 100644
index edb9d9c779d..00000000000
--- a/db/schema_migrations/20220126210021
+++ /dev/null
@@ -1 +0,0 @@
-fd7940bb6f077c91d7f9928f574443ba4bf33bb90cb702c0a2ecad14398ab1cc \ No newline at end of file
diff --git a/db/schema_migrations/20220126210022 b/db/schema_migrations/20220126210022
deleted file mode 100644
index 32cb73ee3ee..00000000000
--- a/db/schema_migrations/20220126210022
+++ /dev/null
@@ -1 +0,0 @@
-80a75bf72b40ee791bebd9ae97a793ce41fbd352841d83421525b6ad78e1c5e8 \ No newline at end of file
diff --git a/db/schema_migrations/20220126210657 b/db/schema_migrations/20220126210657
deleted file mode 100644
index a3301b46756..00000000000
--- a/db/schema_migrations/20220126210657
+++ /dev/null
@@ -1 +0,0 @@
-853209f3babe2856481591790d9bb67145c4c0c919ed4d8365bb8d498e4f6b8e \ No newline at end of file
diff --git a/db/schema_migrations/20220127112243 b/db/schema_migrations/20220127112243
deleted file mode 100644
index 2c591bdde58..00000000000
--- a/db/schema_migrations/20220127112243
+++ /dev/null
@@ -1 +0,0 @@
-7707b9bcdcd7ec28af31b90355905eb8971c12a90c4334b0ae214e45fac9645a \ No newline at end of file
diff --git a/db/schema_migrations/20220127112412 b/db/schema_migrations/20220127112412
deleted file mode 100644
index af58ff48473..00000000000
--- a/db/schema_migrations/20220127112412
+++ /dev/null
@@ -1 +0,0 @@
-350409be3f491b61a1d757dbd839b48d088339883e8e019d00ad90e6adc350e6 \ No newline at end of file
diff --git a/db/schema_migrations/20220127132200 b/db/schema_migrations/20220127132200
deleted file mode 100644
index 8dc7ac4ddbd..00000000000
--- a/db/schema_migrations/20220127132200
+++ /dev/null
@@ -1 +0,0 @@
-394f1fa34ccf9188f25102ac963829ebee07dddaf02f1d5958ec14d701fb6fe8 \ No newline at end of file
diff --git a/db/schema_migrations/20220127132201 b/db/schema_migrations/20220127132201
deleted file mode 100644
index f2c9cbbe38f..00000000000
--- a/db/schema_migrations/20220127132201
+++ /dev/null
@@ -1 +0,0 @@
-f8ce7c183352ce08585eda83eb1e22c800b1b2044b93bc11858a74a8bd9a99d4 \ No newline at end of file
diff --git a/db/schema_migrations/20220128093756 b/db/schema_migrations/20220128093756
deleted file mode 100644
index fd24b6cd4cd..00000000000
--- a/db/schema_migrations/20220128093756
+++ /dev/null
@@ -1 +0,0 @@
-787b1be4b69ef0eeb049ee6a3d7126dc75094b79fba18f469fffe78b16fce6a3 \ 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/20220128155251 b/db/schema_migrations/20220128155251
deleted file mode 100644
index 11fa6807ed5..00000000000
--- a/db/schema_migrations/20220128155251
+++ /dev/null
@@ -1 +0,0 @@
-0d121aeecdd6ace1516c2e9b84fefd47d963c4cbe22a0448728241d83da3742e \ No newline at end of file
diff --git a/db/schema_migrations/20220128155814 b/db/schema_migrations/20220128155814
deleted file mode 100644
index 209b0874a84..00000000000
--- a/db/schema_migrations/20220128155814
+++ /dev/null
@@ -1 +0,0 @@
-77cc8fc86f2c6a5ed017dde40dd4db796821a35e6ce4d8dcbe24b2cdaccbb5d9 \ No newline at end of file
diff --git a/db/schema_migrations/20220128194722 b/db/schema_migrations/20220128194722
deleted file mode 100644
index 9c06f452c1e..00000000000
--- a/db/schema_migrations/20220128194722
+++ /dev/null
@@ -1 +0,0 @@
-087338f0b438d2aa33bc22bd3973d818c5d1f40948525d95181751722158605b \ No newline at end of file
diff --git a/db/schema_migrations/20220131000000 b/db/schema_migrations/20220131000000
deleted file mode 100644
index f80ceb97f1c..00000000000
--- a/db/schema_migrations/20220131000000
+++ /dev/null
@@ -1 +0,0 @@
-08326048e15f368f09bc10ebf5bee3e77e8b43813f66c19d24731497ca6a8485 \ No newline at end of file
diff --git a/db/schema_migrations/20220131000001 b/db/schema_migrations/20220131000001
deleted file mode 100644
index 72dce62bbce..00000000000
--- a/db/schema_migrations/20220131000001
+++ /dev/null
@@ -1 +0,0 @@
-59fe701bcaa102b7e0c1496198fa4aeea6b2e59132c951d1c9d54562c5e3900e \ No newline at end of file
diff --git a/db/schema_migrations/20220131135725 b/db/schema_migrations/20220131135725
deleted file mode 100644
index d63b24d5d6c..00000000000
--- a/db/schema_migrations/20220131135725
+++ /dev/null
@@ -1 +0,0 @@
-a0e9bb92512b9ddb3fd718e086b0fd116ec307be6acc5789a872b1d3004fdebd \ No newline at end of file
diff --git a/db/schema_migrations/20220131192643 b/db/schema_migrations/20220131192643
deleted file mode 100644
index e947bf0cfbe..00000000000
--- a/db/schema_migrations/20220131192643
+++ /dev/null
@@ -1 +0,0 @@
-3b9068f109685dcfa8a0a1fda886cca3909d29cbc280cf70ed9f3d927def12ac \ No newline at end of file
diff --git a/db/schema_migrations/20220201034731 b/db/schema_migrations/20220201034731
deleted file mode 100644
index 59e4fd59720..00000000000
--- a/db/schema_migrations/20220201034731
+++ /dev/null
@@ -1 +0,0 @@
-873ff811d4f70c012785297ee8c07eb496994af69d5ae4b266e8f675c88daca4 \ No newline at end of file
diff --git a/db/schema_migrations/20220201141705 b/db/schema_migrations/20220201141705
deleted file mode 100644
index 92835993156..00000000000
--- a/db/schema_migrations/20220201141705
+++ /dev/null
@@ -1 +0,0 @@
-9eb0c4609fbec79370215d05a9a1faf4208b9dcc2bfeb861feeb7c9f354489ab \ No newline at end of file
diff --git a/db/schema_migrations/20220201173212 b/db/schema_migrations/20220201173212
deleted file mode 100644
index b07c8e371a5..00000000000
--- a/db/schema_migrations/20220201173212
+++ /dev/null
@@ -1 +0,0 @@
-7a48d49d576d183198df370593642419da5707d8b018a23f541c448e2aa7ad65 \ No newline at end of file
diff --git a/db/schema_migrations/20220201193033 b/db/schema_migrations/20220201193033
deleted file mode 100644
index e40840c66fa..00000000000
--- a/db/schema_migrations/20220201193033
+++ /dev/null
@@ -1 +0,0 @@
-92bbe74c6c3627dd26f709acd2a20f442212eab933f719be815701a3bc429539 \ No newline at end of file
diff --git a/db/schema_migrations/20220201205300 b/db/schema_migrations/20220201205300
deleted file mode 100644
index 86f6dd234fd..00000000000
--- a/db/schema_migrations/20220201205300
+++ /dev/null
@@ -1 +0,0 @@
-79a636f33f70327206356abd1793b73a5ef5e920a41662e35cbff5597b03a365 \ No newline at end of file
diff --git a/db/schema_migrations/20220202034409 b/db/schema_migrations/20220202034409
deleted file mode 100644
index 4eb359f45e6..00000000000
--- a/db/schema_migrations/20220202034409
+++ /dev/null
@@ -1 +0,0 @@
-0efe482aa626cf80912feaa1176837253b094fc434f273bee35b5fe3e8ce4243 \ No newline at end of file
diff --git a/db/schema_migrations/20220202105733 b/db/schema_migrations/20220202105733
deleted file mode 100644
index 473b03d6210..00000000000
--- a/db/schema_migrations/20220202105733
+++ /dev/null
@@ -1 +0,0 @@
-6f2919091a6998f2f18f8dbff3c968e68dc218ab0e51341164d1fc5b8abf72ae \ No newline at end of file
diff --git a/db/schema_migrations/20220202115350 b/db/schema_migrations/20220202115350
deleted file mode 100644
index 9b8148ca2d1..00000000000
--- a/db/schema_migrations/20220202115350
+++ /dev/null
@@ -1 +0,0 @@
-3bcc97592e8e329e39917deffae6619e69215930a688bebad2949f69155b53f9 \ No newline at end of file
diff --git a/db/schema_migrations/20220203074916 b/db/schema_migrations/20220203074916
deleted file mode 100644
index fffd0dcc003..00000000000
--- a/db/schema_migrations/20220203074916
+++ /dev/null
@@ -1 +0,0 @@
-5bb52cc70aada72e0e569006fd05de0c0d7629559d78bfd361009c91482f02cf \ No newline at end of file
diff --git a/db/schema_migrations/20220203091304 b/db/schema_migrations/20220203091304
deleted file mode 100644
index 847620db3d2..00000000000
--- a/db/schema_migrations/20220203091304
+++ /dev/null
@@ -1 +0,0 @@
-dac90da1a8c5af69610dd103c8db9cd70a395ad5f9addafb554a853d6acd2a6e \ No newline at end of file
diff --git a/db/schema_migrations/20220203123333 b/db/schema_migrations/20220203123333
deleted file mode 100644
index 9cc146c4ed7..00000000000
--- a/db/schema_migrations/20220203123333
+++ /dev/null
@@ -1 +0,0 @@
-87cccb30bb6f27a1acb0dd0cb905040e2a0291cefc5f26bb9a08c8be18034ca3 \ No newline at end of file
diff --git a/db/schema_migrations/20220203133652 b/db/schema_migrations/20220203133652
deleted file mode 100644
index 7deda2292b4..00000000000
--- a/db/schema_migrations/20220203133652
+++ /dev/null
@@ -1 +0,0 @@
-5642cf604a1aaf8bef6098a9918b582e0e336d79ca3b2a005cf90bb8eab0ca13 \ No newline at end of file
diff --git a/db/schema_migrations/20220203134942 b/db/schema_migrations/20220203134942
deleted file mode 100644
index 7dea7f1f0e7..00000000000
--- a/db/schema_migrations/20220203134942
+++ /dev/null
@@ -1 +0,0 @@
-02f7a38c7bc19b1a266ac1f1d6631f1922fc135518baeb19ee90bebd7c31c6b9 \ No newline at end of file
diff --git a/db/schema_migrations/20220204053655 b/db/schema_migrations/20220204053655
deleted file mode 100644
index e096dae0c07..00000000000
--- a/db/schema_migrations/20220204053655
+++ /dev/null
@@ -1 +0,0 @@
-d6b7fa6e5be83aa67bb479604bf6ddb9d8caae82fc8ea1ab7f34d5c534174ecf \ No newline at end of file
diff --git a/db/schema_migrations/20220204093120 b/db/schema_migrations/20220204093120
deleted file mode 100644
index debd48e3c5f..00000000000
--- a/db/schema_migrations/20220204093120
+++ /dev/null
@@ -1 +0,0 @@
-e147a8281f98ee397d7d9b652ce21b943e4e87c11fca906b72db839e0e2fa360 \ No newline at end of file
diff --git a/db/schema_migrations/20220204095121 b/db/schema_migrations/20220204095121
deleted file mode 100644
index bf12ca08f5a..00000000000
--- a/db/schema_migrations/20220204095121
+++ /dev/null
@@ -1 +0,0 @@
-bce595c1c6587e785bc49d6e5a7181b5cc0164f2201375ad82d4bd19c217cd35 \ No newline at end of file
diff --git a/db/schema_migrations/20220204110725 b/db/schema_migrations/20220204110725
deleted file mode 100644
index 804dc8c6d54..00000000000
--- a/db/schema_migrations/20220204110725
+++ /dev/null
@@ -1 +0,0 @@
-c87ca83f592c6688c31182fcd4cf6fe282c00a3c92ebe245b66455f57b50fc32 \ No newline at end of file
diff --git a/db/schema_migrations/20220204154220 b/db/schema_migrations/20220204154220
deleted file mode 100644
index 42da4e82258..00000000000
--- a/db/schema_migrations/20220204154220
+++ /dev/null
@@ -1 +0,0 @@
-efecc3c6468d8a5036352f5b62e8d70de835d1beb4e45ba6d3906906d0317848 \ No newline at end of file
diff --git a/db/schema_migrations/20220204193000 b/db/schema_migrations/20220204193000
deleted file mode 100644
index f0d16b9671c..00000000000
--- a/db/schema_migrations/20220204193000
+++ /dev/null
@@ -1 +0,0 @@
-9d98618a1e9fd0474c45ac54420fc64a1d90ad77f36be594337e5b117fccdadb \ No newline at end of file
diff --git a/db/schema_migrations/20220204194347 b/db/schema_migrations/20220204194347
deleted file mode 100644
index d506497e036..00000000000
--- a/db/schema_migrations/20220204194347
+++ /dev/null
@@ -1 +0,0 @@
-1593e935601ae1f2ab788109687bb40bad026f3f425339a39c8d13d3e4c7e306 \ No newline at end of file
diff --git a/db/schema_migrations/20220207080758 b/db/schema_migrations/20220207080758
deleted file mode 100644
index d4adf5ad455..00000000000
--- a/db/schema_migrations/20220207080758
+++ /dev/null
@@ -1 +0,0 @@
-f63be8bd42cc1856c92f9073fdb39c58c45806b483d38b91db007a8661c49a97 \ No newline at end of file
diff --git a/db/schema_migrations/20220207083129 b/db/schema_migrations/20220207083129
deleted file mode 100644
index 25dca4578f4..00000000000
--- a/db/schema_migrations/20220207083129
+++ /dev/null
@@ -1 +0,0 @@
-01cc0139097235991fa2caf8b780ccd1c3ce580647197418424ade83ce9be77e \ No newline at end of file
diff --git a/db/schema_migrations/20220208080921 b/db/schema_migrations/20220208080921
deleted file mode 100644
index ecf35389390..00000000000
--- a/db/schema_migrations/20220208080921
+++ /dev/null
@@ -1 +0,0 @@
-84346c2f608792f259ab91dbc2c8aac8397a2997f890f8e077aad809276bb7cd \ No newline at end of file
diff --git a/db/schema_migrations/20220208115439 b/db/schema_migrations/20220208115439
deleted file mode 100644
index 72230321625..00000000000
--- a/db/schema_migrations/20220208115439
+++ /dev/null
@@ -1 +0,0 @@
-dbe6760198b8fa068c30871a439298e56802867044a178baa6b8b009f8da13e6 \ No newline at end of file
diff --git a/db/schema_migrations/20220208170445 b/db/schema_migrations/20220208170445
deleted file mode 100644
index 3a486a586a8..00000000000
--- a/db/schema_migrations/20220208170445
+++ /dev/null
@@ -1 +0,0 @@
-e00dd618ca393596f3ff05b44b1a9a36183729a864a5cf4b8f1a262dfcdb932b \ No newline at end of file
diff --git a/db/schema_migrations/20220208171826 b/db/schema_migrations/20220208171826
deleted file mode 100644
index 75ae0dcef61..00000000000
--- a/db/schema_migrations/20220208171826
+++ /dev/null
@@ -1 +0,0 @@
-e48473172d7561fb7474e16e291e555843c0ec4543300b007f86cd4a5923db85 \ No newline at end of file
diff --git a/db/schema_migrations/20220209111007 b/db/schema_migrations/20220209111007
deleted file mode 100644
index f10e05b8918..00000000000
--- a/db/schema_migrations/20220209111007
+++ /dev/null
@@ -1 +0,0 @@
-9462258bcbe45ab80f7ef5a02f8b8d5c0ed6ac69bf04b8934ae3dee2261ba458 \ No newline at end of file
diff --git a/db/schema_migrations/20220211090920 b/db/schema_migrations/20220211090920
deleted file mode 100644
index 1f08b66e508..00000000000
--- a/db/schema_migrations/20220211090920
+++ /dev/null
@@ -1 +0,0 @@
-644d38e401ac8179777cb9d3c5fefca2fb55e0c409197bb2d222f7e96e5dd42f \ No newline at end of file
diff --git a/db/schema_migrations/20220211125954 b/db/schema_migrations/20220211125954
deleted file mode 100644
index 5f0bb009254..00000000000
--- a/db/schema_migrations/20220211125954
+++ /dev/null
@@ -1 +0,0 @@
-73feefe409b9c0f4ea373d0c3f13690df0086fbc4fc212595e959ad65fcc27b1 \ No newline at end of file
diff --git a/db/schema_migrations/20220211214605 b/db/schema_migrations/20220211214605
deleted file mode 100644
index 89dbee18ee7..00000000000
--- a/db/schema_migrations/20220211214605
+++ /dev/null
@@ -1 +0,0 @@
-add5ee0b8e090ba740ce738f66ea4f741485a0c84728fecfa5b0488564d55536 \ No newline at end of file
diff --git a/db/schema_migrations/20220212120735 b/db/schema_migrations/20220212120735
deleted file mode 100644
index 1ec5f9af681..00000000000
--- a/db/schema_migrations/20220212120735
+++ /dev/null
@@ -1 +0,0 @@
-c075ee9d6efeae4b7a9b6e310f0c3d0bdd0ac6a58dc214427d4de9ae579db50d \ 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/20220213104531 b/db/schema_migrations/20220213104531
deleted file mode 100644
index 72656d85fb0..00000000000
--- a/db/schema_migrations/20220213104531
+++ /dev/null
@@ -1 +0,0 @@
-9ce8aa469b9469d25fbba52147e24c95f6242c2ab1e114df8baaf5a45268d2fd \ No newline at end of file
diff --git a/db/schema_migrations/20220215164709 b/db/schema_migrations/20220215164709
deleted file mode 100644
index 60179eaeddd..00000000000
--- a/db/schema_migrations/20220215164709
+++ /dev/null
@@ -1 +0,0 @@
-af6d142b77bc2787a520f8cbc63c287823a7a65a2edb3eb488e4f0f4efde9fa8 \ No newline at end of file
diff --git a/db/schema_migrations/20220215190020 b/db/schema_migrations/20220215190020
deleted file mode 100644
index 1d5be90ca1f..00000000000
--- a/db/schema_migrations/20220215190020
+++ /dev/null
@@ -1 +0,0 @@
-aa92afc5f74f051132aeb73889d7360bbd6258b27c0aedb4fea6a44ccce597b3 \ No newline at end of file
diff --git a/db/schema_migrations/20220216110023 b/db/schema_migrations/20220216110023
deleted file mode 100644
index 30acd6fdaf2..00000000000
--- a/db/schema_migrations/20220216110023
+++ /dev/null
@@ -1 +0,0 @@
-5931c4981c89d65c5aaca05dc8375c2c21bb595e28354d6623986d906ece165d \ No newline at end of file
diff --git a/db/schema_migrations/20220216201949 b/db/schema_migrations/20220216201949
deleted file mode 100644
index 466da69ad0e..00000000000
--- a/db/schema_migrations/20220216201949
+++ /dev/null
@@ -1 +0,0 @@
-481bc7b167ddf46bd11322e4458e48de10483bf34d0e393f7e76a3572c28e09f \ No newline at end of file
diff --git a/db/schema_migrations/20220217100008 b/db/schema_migrations/20220217100008
deleted file mode 100644
index 6347388a5ce..00000000000
--- a/db/schema_migrations/20220217100008
+++ /dev/null
@@ -1 +0,0 @@
-f52d88262879c40d9ac60a74853b7070036f244fd5f7957c59bbfceb343811d1 \ No newline at end of file
diff --git a/db/schema_migrations/20220217113058 b/db/schema_migrations/20220217113058
deleted file mode 100644
index ef801a0e269..00000000000
--- a/db/schema_migrations/20220217113058
+++ /dev/null
@@ -1 +0,0 @@
-d2d236e9ee5fa6e9c1ee97431543e871b78e469b812444bd9386dfecf849947b \ No newline at end of file
diff --git a/db/schema_migrations/20220217135229 b/db/schema_migrations/20220217135229
deleted file mode 100644
index fb80b77347f..00000000000
--- a/db/schema_migrations/20220217135229
+++ /dev/null
@@ -1 +0,0 @@
-3223f741799216ee6afb4daafbcebfa09bd722d461dd4d64fcbda7d8700ae235 \ 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/20220221214928 b/db/schema_migrations/20220221214928
deleted file mode 100644
index 5c32b3fbd96..00000000000
--- a/db/schema_migrations/20220221214928
+++ /dev/null
@@ -1 +0,0 @@
-8c9936d1c0f728c2b40dca536f9edb40f4af94a274ccf1dbec984f218710f695 \ No newline at end of file
diff --git a/db/schema_migrations/20220222072536 b/db/schema_migrations/20220222072536
deleted file mode 100644
index 6a4b4f76dda..00000000000
--- a/db/schema_migrations/20220222072536
+++ /dev/null
@@ -1 +0,0 @@
-d7ddc369818f0a2403abefea2ac1da5abd1ca41199d3948166f10dfdf9d2fa9d \ No newline at end of file
diff --git a/db/schema_migrations/20220222191845 b/db/schema_migrations/20220222191845
deleted file mode 100644
index 88c15bc87c0..00000000000
--- a/db/schema_migrations/20220222191845
+++ /dev/null
@@ -1 +0,0 @@
-c528d64cafc072554cd1ef1006a1c359a3135896abae2d5ca20fbbc99ff14f8c \ No newline at end of file
diff --git a/db/schema_migrations/20220222192524 b/db/schema_migrations/20220222192524
deleted file mode 100644
index c49e45f0d61..00000000000
--- a/db/schema_migrations/20220222192524
+++ /dev/null
@@ -1 +0,0 @@
-b876119bb369a9831736cddf5326b72a74003ec2e17fe863654cb69497fcf236 \ No newline at end of file
diff --git a/db/schema_migrations/20220222192525 b/db/schema_migrations/20220222192525
deleted file mode 100644
index 6eeec13bbb5..00000000000
--- a/db/schema_migrations/20220222192525
+++ /dev/null
@@ -1 +0,0 @@
-f512ea4c4a2625c647c3d05765152fee963b56962b674f839180fd77c194ccb0 \ No newline at end of file
diff --git a/db/schema_migrations/20220223112304 b/db/schema_migrations/20220223112304
deleted file mode 100644
index bfcbf9c1225..00000000000
--- a/db/schema_migrations/20220223112304
+++ /dev/null
@@ -1 +0,0 @@
-57dc23bb2a9faddefe20c1e30a8879ebb1f6f32f17e3cc381acc1d06ad3b598a \ No newline at end of file
diff --git a/db/schema_migrations/20220223124428 b/db/schema_migrations/20220223124428
deleted file mode 100644
index b163accc957..00000000000
--- a/db/schema_migrations/20220223124428
+++ /dev/null
@@ -1 +0,0 @@
-8fb72b15bfaa1b58f87cb3f1836df1e8bfa1a5ddec4e480a2cb6a3c9fafe3bda \ No newline at end of file
diff --git a/db/schema_migrations/20220224000000 b/db/schema_migrations/20220224000000
deleted file mode 100644
index e6e9aefbabb..00000000000
--- a/db/schema_migrations/20220224000000
+++ /dev/null
@@ -1 +0,0 @@
-74b4d572118b7f5da0a80722601a4757ce47ccbdae1af1e84b2304343477d634 \ No newline at end of file
diff --git a/db/schema_migrations/20220224204415 b/db/schema_migrations/20220224204415
deleted file mode 100644
index e0faa994b54..00000000000
--- a/db/schema_migrations/20220224204415
+++ /dev/null
@@ -1 +0,0 @@
-1d7105559c8d2da1d86c5625c592edc792d7cd729b8c86c7a2b950c3dd98e975 \ No newline at end of file
diff --git a/db/schema_migrations/20220225133705 b/db/schema_migrations/20220225133705
deleted file mode 100644
index 97f27e748e0..00000000000
--- a/db/schema_migrations/20220225133705
+++ /dev/null
@@ -1 +0,0 @@
-aa9ab05f6991f06c465fbc4878e0cbc648dc09b1b7912dbbf3dd68887a9cdd1d \ No newline at end of file
diff --git a/db/schema_migrations/20220301002101 b/db/schema_migrations/20220301002101
deleted file mode 100644
index ab8f76b3bbb..00000000000
--- a/db/schema_migrations/20220301002101
+++ /dev/null
@@ -1 +0,0 @@
-a19f7f5026fd91cf6f3fcadccd19808920e64005c207b57b46955a0352a68366 \ No newline at end of file
diff --git a/db/schema_migrations/20220301003502 b/db/schema_migrations/20220301003502
deleted file mode 100644
index 5a2a9ee8334..00000000000
--- a/db/schema_migrations/20220301003502
+++ /dev/null
@@ -1 +0,0 @@
-bbca8df8e60c8d027f672dfdee2b0edef35f4fdc3152ae98450df67633f3998f \ No newline at end of file
diff --git a/db/schema_migrations/20220301091503 b/db/schema_migrations/20220301091503
deleted file mode 100644
index 49184ad4262..00000000000
--- a/db/schema_migrations/20220301091503
+++ /dev/null
@@ -1 +0,0 @@
-4a05ddbc3d2a52a719c6fda8d834611be6f663fbce97b42655a00583d0e2042a \ No newline at end of file
diff --git a/db/schema_migrations/20220301093434 b/db/schema_migrations/20220301093434
deleted file mode 100644
index 78886cc9df4..00000000000
--- a/db/schema_migrations/20220301093434
+++ /dev/null
@@ -1 +0,0 @@
-ffdd031395c025ea63ea1adcd63636822e62388a8860c93235f3748918fc30ca \ No newline at end of file
diff --git a/db/schema_migrations/20220301175104 b/db/schema_migrations/20220301175104
deleted file mode 100644
index 2553c957576..00000000000
--- a/db/schema_migrations/20220301175104
+++ /dev/null
@@ -1 +0,0 @@
-52e172b1ca6e21a6864e82597a7aae6e1c4776507a475a88807ec140b8648966 \ No newline at end of file
diff --git a/db/schema_migrations/20220301175426 b/db/schema_migrations/20220301175426
deleted file mode 100644
index 6a11d9b04b8..00000000000
--- a/db/schema_migrations/20220301175426
+++ /dev/null
@@ -1 +0,0 @@
-d0a8daf9fb9892fc92b03f13de4d7e470e5c54f03b09f887cdd45bc5eb9a7e37 \ No newline at end of file
diff --git a/db/schema_migrations/20220302110724 b/db/schema_migrations/20220302110724
deleted file mode 100644
index 700a39b85c5..00000000000
--- a/db/schema_migrations/20220302110724
+++ /dev/null
@@ -1 +0,0 @@
-4f565a313c37d12f24afe26a9e344d4273c54d0f080b3108d56ed98bf7299ecc \ No newline at end of file
diff --git a/db/schema_migrations/20220302114046 b/db/schema_migrations/20220302114046
deleted file mode 100644
index 40488b47eb2..00000000000
--- a/db/schema_migrations/20220302114046
+++ /dev/null
@@ -1 +0,0 @@
-4e2de14559b47a9bf3fa8910fdb84ff62cb18442620f4147e40e8026bf4bcf1b \ No newline at end of file
diff --git a/db/schema_migrations/20220302203410 b/db/schema_migrations/20220302203410
deleted file mode 100644
index 70326d38a97..00000000000
--- a/db/schema_migrations/20220302203410
+++ /dev/null
@@ -1 +0,0 @@
-873aac965684e58cfdb6098b20891cbb73614aff833f235d76bfd379498f6fda \ No newline at end of file
diff --git a/db/schema_migrations/20220303190555 b/db/schema_migrations/20220303190555
deleted file mode 100644
index 08db64ca2a4..00000000000
--- a/db/schema_migrations/20220303190555
+++ /dev/null
@@ -1 +0,0 @@
-f8fa8b83da24bf98c97447a2940c8ca801532c80395b6a65c11f83515f811652 \ No newline at end of file
diff --git a/db/schema_migrations/20220303191047 b/db/schema_migrations/20220303191047
deleted file mode 100644
index 6e933c08f6b..00000000000
--- a/db/schema_migrations/20220303191047
+++ /dev/null
@@ -1 +0,0 @@
-19566152e16a92263dd5dcfd66299e3b9d8b82acd4edb4bba21f6b9b06fc8070 \ No newline at end of file
diff --git a/db/schema_migrations/20220304052335 b/db/schema_migrations/20220304052335
deleted file mode 100644
index 5716ea07f7d..00000000000
--- a/db/schema_migrations/20220304052335
+++ /dev/null
@@ -1 +0,0 @@
-ba2bae8d9561eeab907ecf30664a593bdf93ab1041453f93794bf0be4464e92c \ No newline at end of file
diff --git a/db/schema_migrations/20220304061631 b/db/schema_migrations/20220304061631
deleted file mode 100644
index d7b38b30f9f..00000000000
--- a/db/schema_migrations/20220304061631
+++ /dev/null
@@ -1 +0,0 @@
-7394be90999876473cfe39c38e72f21c7bb36a5038300d6fe1354f15f3d77e21 \ No newline at end of file
diff --git a/db/schema_migrations/20220304062107 b/db/schema_migrations/20220304062107
deleted file mode 100644
index 9ea552c6a9e..00000000000
--- a/db/schema_migrations/20220304062107
+++ /dev/null
@@ -1 +0,0 @@
-a9aace14f847412c2af03cc6de61616a0f48d32d0fd24b25f6b1f85513c87139 \ No newline at end of file
diff --git a/db/schema_migrations/20220304152729 b/db/schema_migrations/20220304152729
deleted file mode 100644
index 021d4e5ad27..00000000000
--- a/db/schema_migrations/20220304152729
+++ /dev/null
@@ -1 +0,0 @@
-483f8299688a6e24fa77867b7dab8a2dad0c2b7ebe43c56c81c02ab1e0dc4674 \ No newline at end of file
diff --git a/db/schema_migrations/20220304165107 b/db/schema_migrations/20220304165107
deleted file mode 100644
index 6db7aee6b0f..00000000000
--- a/db/schema_migrations/20220304165107
+++ /dev/null
@@ -1 +0,0 @@
-b7090327d2638bbee6646e5ca5a8f8597d97631f10f997698b8a1c1b6329c106 \ No newline at end of file
diff --git a/db/schema_migrations/20220304201847 b/db/schema_migrations/20220304201847
deleted file mode 100644
index 1dafb1b821e..00000000000
--- a/db/schema_migrations/20220304201847
+++ /dev/null
@@ -1 +0,0 @@
-d60a313ac68b0edfe1ae219690aacbe74c038b90bc4239f67d14f9ced36d67f6 \ No newline at end of file
diff --git a/db/schema_migrations/20220305223212 b/db/schema_migrations/20220305223212
deleted file mode 100644
index b8adc88a760..00000000000
--- a/db/schema_migrations/20220305223212
+++ /dev/null
@@ -1 +0,0 @@
-8a0e80b6df1d942e5ec23641c935103cddd96c044e2a960b88bb38284cf4d070 \ No newline at end of file
diff --git a/db/schema_migrations/20220307192534 b/db/schema_migrations/20220307192534
deleted file mode 100644
index cf6687d88ea..00000000000
--- a/db/schema_migrations/20220307192534
+++ /dev/null
@@ -1 +0,0 @@
-b8adcc6d7dc76fd18037de9b2b204e7db8803564df19cbd59f928901c8d97b9c \ No newline at end of file
diff --git a/db/schema_migrations/20220307192610 b/db/schema_migrations/20220307192610
deleted file mode 100644
index 17575dc7174..00000000000
--- a/db/schema_migrations/20220307192610
+++ /dev/null
@@ -1 +0,0 @@
-3dd34a92230e36fe1e9761ce39e4edb2a3289c972ce56347e87d8e36818e46d1 \ No newline at end of file
diff --git a/db/schema_migrations/20220307192645 b/db/schema_migrations/20220307192645
deleted file mode 100644
index 913bbbf5c96..00000000000
--- a/db/schema_migrations/20220307192645
+++ /dev/null
@@ -1 +0,0 @@
-c31db54f15cff7b21272cc2e9e962419ba4422582c227c5af4131fe56c1fc9f8 \ No newline at end of file
diff --git a/db/schema_migrations/20220307192725 b/db/schema_migrations/20220307192725
deleted file mode 100644
index 1611c196a57..00000000000
--- a/db/schema_migrations/20220307192725
+++ /dev/null
@@ -1 +0,0 @@
-d1761614c3ac0e8bd33eff58134091ec6c1834ecde3e47290a80da45ab207923 \ No newline at end of file
diff --git a/db/schema_migrations/20220307203458 b/db/schema_migrations/20220307203458
deleted file mode 100644
index 3063be46503..00000000000
--- a/db/schema_migrations/20220307203458
+++ /dev/null
@@ -1 +0,0 @@
-d4bf5f7c695c9833a07722d724b7a6363f0ebcb7f6d8a15bcf8148bdae5e1b32 \ No newline at end of file
diff --git a/db/schema_migrations/20220307203459 b/db/schema_migrations/20220307203459
deleted file mode 100644
index 2220fd3cb61..00000000000
--- a/db/schema_migrations/20220307203459
+++ /dev/null
@@ -1 +0,0 @@
-74f6687c0793a2596467338d8b4904bef712e6ff3ad3561e3ab2546eed5cd24d \ No newline at end of file
diff --git a/db/schema_migrations/20220308000205 b/db/schema_migrations/20220308000205
deleted file mode 100644
index 27caf959eb9..00000000000
--- a/db/schema_migrations/20220308000205
+++ /dev/null
@@ -1 +0,0 @@
-c30b1b36ec83df1b4fdf0c3c28656b158beab4f2188875898182c2dfbd073c80 \ No newline at end of file
diff --git a/db/schema_migrations/20220308115219 b/db/schema_migrations/20220308115219
deleted file mode 100644
index 6e55d2fdabe..00000000000
--- a/db/schema_migrations/20220308115219
+++ /dev/null
@@ -1 +0,0 @@
-e18ed9e6b2a98c77190ff2ce33f4d2b1984710b438e851d6a526ec8bb1f33c80 \ No newline at end of file
diff --git a/db/schema_migrations/20220308115502 b/db/schema_migrations/20220308115502
deleted file mode 100644
index c379b67485c..00000000000
--- a/db/schema_migrations/20220308115502
+++ /dev/null
@@ -1 +0,0 @@
-0aacf46a4a5b430a718336108f52c1c0bed4283846f36c2ab1de80100dcae0b4 \ No newline at end of file
diff --git a/db/schema_migrations/20220309084838 b/db/schema_migrations/20220309084838
deleted file mode 100644
index ba0ae90a3cf..00000000000
--- a/db/schema_migrations/20220309084838
+++ /dev/null
@@ -1 +0,0 @@
-d9d17f94f54840eace48f210e3886423a8dc04109f2ebca8d8edb7d53e0b5688 \ No newline at end of file
diff --git a/db/schema_migrations/20220309084954 b/db/schema_migrations/20220309084954
deleted file mode 100644
index 944a1385fe7..00000000000
--- a/db/schema_migrations/20220309084954
+++ /dev/null
@@ -1 +0,0 @@
-6d9c5454372317955c4e16b5a02dece575221f15af60c33df45fffbca169c08c \ No newline at end of file
diff --git a/db/schema_migrations/20220309100648 b/db/schema_migrations/20220309100648
deleted file mode 100644
index a0697655d9a..00000000000
--- a/db/schema_migrations/20220309100648
+++ /dev/null
@@ -1 +0,0 @@
-3385dc0dc2a3d306e01a719b7a21197ea8468976d37abab932beade4780bb4ff \ No newline at end of file
diff --git a/db/schema_migrations/20220309154855 b/db/schema_migrations/20220309154855
deleted file mode 100644
index 01500ce5863..00000000000
--- a/db/schema_migrations/20220309154855
+++ /dev/null
@@ -1 +0,0 @@
-9e62675366f9c2f0fc159a9748409dbcaea240c813ab19ea26d24c966e5fd6c8 \ No newline at end of file
diff --git a/db/schema_migrations/20220310011530 b/db/schema_migrations/20220310011530
deleted file mode 100644
index 73fa8390231..00000000000
--- a/db/schema_migrations/20220310011530
+++ /dev/null
@@ -1 +0,0 @@
-a4245a3543796b48f16786e9c178f70d236b3ae4636661f021ad4e8f0c678f2c \ No newline at end of file
diff --git a/db/schema_migrations/20220310011613 b/db/schema_migrations/20220310011613
deleted file mode 100644
index fc62a04f551..00000000000
--- a/db/schema_migrations/20220310011613
+++ /dev/null
@@ -1 +0,0 @@
-ef816d9391d67a34121d11e6b6cc37de92768bd21bc301fa10c6652b1a0b66b6 \ No newline at end of file
diff --git a/db/schema_migrations/20220310095341 b/db/schema_migrations/20220310095341
deleted file mode 100644
index d52763cce63..00000000000
--- a/db/schema_migrations/20220310095341
+++ /dev/null
@@ -1 +0,0 @@
-56d906eac31954988bd0659eabbc9f1bad1a47dd616fb99e4b90b56b2bf4c6a0 \ No newline at end of file
diff --git a/db/schema_migrations/20220310101118 b/db/schema_migrations/20220310101118
deleted file mode 100644
index c87f727c8b9..00000000000
--- a/db/schema_migrations/20220310101118
+++ /dev/null
@@ -1 +0,0 @@
-e4d6111f19f05b42b51e8d066e221205460514cef88ecf15ca99aa59788c4153 \ No newline at end of file
diff --git a/db/schema_migrations/20220310134207 b/db/schema_migrations/20220310134207
deleted file mode 100644
index 3ba08608acc..00000000000
--- a/db/schema_migrations/20220310134207
+++ /dev/null
@@ -1 +0,0 @@
-951abe39e4735f0f71ac6ad1701ffa8688dfd82a59b0383d6c55cef8f6de8e7f \ No newline at end of file
diff --git a/db/schema_migrations/20220310141349 b/db/schema_migrations/20220310141349
deleted file mode 100644
index d52b2d997a4..00000000000
--- a/db/schema_migrations/20220310141349
+++ /dev/null
@@ -1 +0,0 @@
-39785d4140c7345ddbe62417576381654ce22d505ee5c92a84425f0a3f8e4935 \ No newline at end of file
diff --git a/db/schema_migrations/20220311010352 b/db/schema_migrations/20220311010352
deleted file mode 100644
index f9f4cf28605..00000000000
--- a/db/schema_migrations/20220311010352
+++ /dev/null
@@ -1 +0,0 @@
-1d1682cb14041f14f691fcf880e6446ae464645a5ccbd36687620c3279f53e25 \ 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/20220314162342 b/db/schema_migrations/20220314162342
deleted file mode 100644
index 8ee5a80c256..00000000000
--- a/db/schema_migrations/20220314162342
+++ /dev/null
@@ -1 +0,0 @@
-7992448797888fd69d1e5cd4f2602e5a2b49a57052c50b19522f37d711c9f2f2 \ No newline at end of file
diff --git a/db/schema_migrations/20221229172604 b/db/schema_migrations/20221229172604
new file mode 100644
index 00000000000..2cbbc50ea10
--- /dev/null
+++ b/db/schema_migrations/20221229172604
@@ -0,0 +1 @@
+8af1f290454aad1e131626a8dab575dfef11ae73581e57b7d7cb1b431fd06737 \ No newline at end of file
diff --git a/db/schema_migrations/20230127024835 b/db/schema_migrations/20230127024835
new file mode 100644
index 00000000000..93b1460fd31
--- /dev/null
+++ b/db/schema_migrations/20230127024835
@@ -0,0 +1 @@
+7599c99edcb87dad69c8721de9179f32f99236fad928a07734f3c66f174b8546 \ No newline at end of file
diff --git a/db/schema_migrations/20230207002330 b/db/schema_migrations/20230207002330
new file mode 100644
index 00000000000..db78201d180
--- /dev/null
+++ b/db/schema_migrations/20230207002330
@@ -0,0 +1 @@
+a1603460eec138b911b3535e66d7a064ff4f2cb6216aabfcf5f39e013db05445 \ No newline at end of file
diff --git a/db/schema_migrations/20230209222452 b/db/schema_migrations/20230209222452
new file mode 100644
index 00000000000..74d791246e7
--- /dev/null
+++ b/db/schema_migrations/20230209222452
@@ -0,0 +1 @@
+2d08ac0d8375a495212a55be1655cc70405bc722b152e3fa80c4609b3fb4c29c \ No newline at end of file
diff --git a/db/schema_migrations/20230221093535 b/db/schema_migrations/20230221093535
new file mode 100644
index 00000000000..8d0ee370552
--- /dev/null
+++ b/db/schema_migrations/20230221093535
@@ -0,0 +1 @@
+bc81ea0af8e135285170ac9d8c4adfda7e35b548f8c3b9c065788b21e8f63e85 \ No newline at end of file
diff --git a/db/schema_migrations/20230221093536 b/db/schema_migrations/20230221093536
new file mode 100644
index 00000000000..92420dc9466
--- /dev/null
+++ b/db/schema_migrations/20230221093536
@@ -0,0 +1 @@
+5fb6adb018288e955f7227a2793f133893d54e4205803350b060457fdc2f20aa \ No newline at end of file
diff --git a/db/schema_migrations/20230222161226 b/db/schema_migrations/20230222161226
new file mode 100644
index 00000000000..229d4defec3
--- /dev/null
+++ b/db/schema_migrations/20230222161226
@@ -0,0 +1 @@
+d51c92a4b2bb6e5d0bb3f8665f1bc6608cd2a89deb517c1f1dde3d8f0d003f79 \ No newline at end of file
diff --git a/db/schema_migrations/20230222161954 b/db/schema_migrations/20230222161954
new file mode 100644
index 00000000000..1a1d84830cc
--- /dev/null
+++ b/db/schema_migrations/20230222161954
@@ -0,0 +1 @@
+3466379b2b26b1c77cc80b29ecdd601b9d77c94f724e210d0663cdb0ab37798e \ No newline at end of file
diff --git a/db/schema_migrations/20230228183644 b/db/schema_migrations/20230228183644
new file mode 100644
index 00000000000..5c6b755de76
--- /dev/null
+++ b/db/schema_migrations/20230228183644
@@ -0,0 +1 @@
+19a23286a0efab51ecad88ce224f1a9991796acce47c845530fdf1e65af9b3ad \ No newline at end of file
diff --git a/db/schema_migrations/20230301020246 b/db/schema_migrations/20230301020246
new file mode 100644
index 00000000000..678aa0c10ee
--- /dev/null
+++ b/db/schema_migrations/20230301020246
@@ -0,0 +1 @@
+750ba0f9e60a72a8f8b2901d55d3fc763fe24ac2e8b6422b833d529230ec3a7f \ No newline at end of file
diff --git a/db/schema_migrations/20230301020356 b/db/schema_migrations/20230301020356
new file mode 100644
index 00000000000..d9feebb01c6
--- /dev/null
+++ b/db/schema_migrations/20230301020356
@@ -0,0 +1 @@
+8a2a061050e8c2209e70498c6d1ebc68f557643565bbf93852ab6599ff819aa7 \ No newline at end of file
diff --git a/db/schema_migrations/20230303232426 b/db/schema_migrations/20230303232426
new file mode 100644
index 00000000000..30472765a0a
--- /dev/null
+++ b/db/schema_migrations/20230303232426
@@ -0,0 +1 @@
+75efa2b134ee1e5af77d483483b6065c5bc6c840ed0eede237035b028d065234 \ No newline at end of file
diff --git a/db/schema_migrations/20230307000000 b/db/schema_migrations/20230307000000
new file mode 100644
index 00000000000..273a5553777
--- /dev/null
+++ b/db/schema_migrations/20230307000000
@@ -0,0 +1 @@
+192e21a20619e8940d1b5db69eeac1a7c1bfe32d821b671096be4eef4b4214f1 \ No newline at end of file
diff --git a/db/schema_migrations/20230307132729 b/db/schema_migrations/20230307132729
new file mode 100644
index 00000000000..fa72b900120
--- /dev/null
+++ b/db/schema_migrations/20230307132729
@@ -0,0 +1 @@
+868959621d514ba49747cbfc2181fed3598e388c471043b5329e3c7562039b15 \ No newline at end of file
diff --git a/db/schema_migrations/20230307212637 b/db/schema_migrations/20230307212637
new file mode 100644
index 00000000000..40ccae95b4b
--- /dev/null
+++ b/db/schema_migrations/20230307212637
@@ -0,0 +1 @@
+7fb5c19271b7216bff37791edc542b8b7cc4826f1812f596d205248eb6a637df \ No newline at end of file
diff --git a/db/schema_migrations/20230308154243 b/db/schema_migrations/20230308154243
new file mode 100644
index 00000000000..f1b8c267def
--- /dev/null
+++ b/db/schema_migrations/20230308154243
@@ -0,0 +1 @@
+28cc38e11e11d6f1c27cfb7ee83ef90b391c0b3035b601df7fef4057fbc75b24 \ No newline at end of file
diff --git a/db/schema_migrations/20230308154244 b/db/schema_migrations/20230308154244
new file mode 100644
index 00000000000..53e4fcc6042
--- /dev/null
+++ b/db/schema_migrations/20230308154244
@@ -0,0 +1 @@
+2270ab1d9be7bf6b8d0f936e4460fbae51ac988bb01af1e05fce5f2bb4ef7905 \ No newline at end of file
diff --git a/db/schema_migrations/20230308154245 b/db/schema_migrations/20230308154245
new file mode 100644
index 00000000000..d0b03b98aef
--- /dev/null
+++ b/db/schema_migrations/20230308154245
@@ -0,0 +1 @@
+86cace53be2253af85100880ff38ae8685c4c21e96b85eddc4f1111417d5115a \ No newline at end of file
diff --git a/db/schema_migrations/20230309085547 b/db/schema_migrations/20230309085547
new file mode 100644
index 00000000000..5795b411016
--- /dev/null
+++ b/db/schema_migrations/20230309085547
@@ -0,0 +1 @@
+48fadefd7b9ba4383a2e69715e21f5f19d10cc524174a463299b49ae736e6d2f \ No newline at end of file
diff --git a/db/schema_migrations/20230313012226 b/db/schema_migrations/20230313012226
new file mode 100644
index 00000000000..e7d7a6a1b7b
--- /dev/null
+++ b/db/schema_migrations/20230313012226
@@ -0,0 +1 @@
+7c9f554950c0b2b2adc6d31d6cc42335dfd00965c61b2b24489e0099ad227a5c \ No newline at end of file
diff --git a/db/schema_migrations/20230313012609 b/db/schema_migrations/20230313012609
new file mode 100644
index 00000000000..f7b0e375a3c
--- /dev/null
+++ b/db/schema_migrations/20230313012609
@@ -0,0 +1 @@
+c3098250c8ade855d84fec852dac81bab891e6e844404814ddff99711136d9eb \ No newline at end of file
diff --git a/db/schema_migrations/20230313014038 b/db/schema_migrations/20230313014038
new file mode 100644
index 00000000000..81f6366c52b
--- /dev/null
+++ b/db/schema_migrations/20230313014038
@@ -0,0 +1 @@
+6dde6a29aefd3811f9c5bd144b24f33046e1762e13f18ad069d6d53a2448df49 \ No newline at end of file
diff --git a/db/schema_migrations/20230313031351 b/db/schema_migrations/20230313031351
new file mode 100644
index 00000000000..37a57006cae
--- /dev/null
+++ b/db/schema_migrations/20230313031351
@@ -0,0 +1 @@
+44dc97ac36a6edcd0c0dba76f6b60204b72c005da7bd793af4ac7832d949bd0b \ No newline at end of file
diff --git a/db/schema_migrations/20230313031629 b/db/schema_migrations/20230313031629
new file mode 100644
index 00000000000..c7a27b58cff
--- /dev/null
+++ b/db/schema_migrations/20230313031629
@@ -0,0 +1 @@
+86ffe1f3b8048cf01b96f66683fa68f889051c8633c6b803ffdb03aa0a8d2864 \ No newline at end of file
diff --git a/db/schema_migrations/20230313142631 b/db/schema_migrations/20230313142631
new file mode 100644
index 00000000000..cb035d87009
--- /dev/null
+++ b/db/schema_migrations/20230313142631
@@ -0,0 +1 @@
+94cdd10692a9e7668e5d2cc71c02a5038d9e0de1c5fcb794681c9b9f5abedf2d \ No newline at end of file
diff --git a/db/schema_migrations/20230313181536 b/db/schema_migrations/20230313181536
new file mode 100644
index 00000000000..4131e34c725
--- /dev/null
+++ b/db/schema_migrations/20230313181536
@@ -0,0 +1 @@
+d8a040d40d19bb75c8e5fc8bb867ea6354ceda22c9dfe5724a4231a4b005e373 \ No newline at end of file
diff --git a/db/schema_migrations/20230314144640 b/db/schema_migrations/20230314144640
new file mode 100644
index 00000000000..66dececa044
--- /dev/null
+++ b/db/schema_migrations/20230314144640
@@ -0,0 +1 @@
+143b8fca03dd42fcf7ee9af733901e16df2bbc3ce29e76e8e442536a17186fdf \ No newline at end of file
diff --git a/db/schema_migrations/20230314210657 b/db/schema_migrations/20230314210657
new file mode 100644
index 00000000000..04be3b6f1eb
--- /dev/null
+++ b/db/schema_migrations/20230314210657
@@ -0,0 +1 @@
+6cbf7f5127f7b174156098b870a22b8426bca34589565cb6d79db3018c74f732 \ No newline at end of file
diff --git a/db/schema_migrations/20230315053635 b/db/schema_migrations/20230315053635
new file mode 100644
index 00000000000..751f52c2ccd
--- /dev/null
+++ b/db/schema_migrations/20230315053635
@@ -0,0 +1 @@
+aedea3dd398210eb2d98a3ecefe3b02b518bce53d63d75160796eb0414574087 \ No newline at end of file
diff --git a/db/schema_migrations/20230315084704 b/db/schema_migrations/20230315084704
new file mode 100644
index 00000000000..a41414de7b1
--- /dev/null
+++ b/db/schema_migrations/20230315084704
@@ -0,0 +1 @@
+b0091fc76ead45dab7a0cd4d2b0a65858703cb18a98cca7715b88bceac8c2ed0 \ No newline at end of file
diff --git a/db/schema_migrations/20230315161408 b/db/schema_migrations/20230315161408
new file mode 100644
index 00000000000..8f8e116de10
--- /dev/null
+++ b/db/schema_migrations/20230315161408
@@ -0,0 +1 @@
+edd3d506ad848f854fa9614df3b88619704c1cd834f5c2b7bb7bde20d76888bc \ No newline at end of file
diff --git a/db/schema_migrations/20230316014651 b/db/schema_migrations/20230316014651
new file mode 100644
index 00000000000..70d7cbcef00
--- /dev/null
+++ b/db/schema_migrations/20230316014651
@@ -0,0 +1 @@
+f139b8097744ab3fabdf343bfb5e6a7a8426227b54238c4926b0446dd621ef64 \ No newline at end of file
diff --git a/db/schema_migrations/20230316093433 b/db/schema_migrations/20230316093433
new file mode 100644
index 00000000000..eaf1434bb2b
--- /dev/null
+++ b/db/schema_migrations/20230316093433
@@ -0,0 +1 @@
+5e3c28caac0cc43d28c7f279ad001234ec6f81e2522c087fc303a6e3355b5a33 \ No newline at end of file
diff --git a/db/schema_migrations/20230316095948 b/db/schema_migrations/20230316095948
new file mode 100644
index 00000000000..c2c829f1d20
--- /dev/null
+++ b/db/schema_migrations/20230316095948
@@ -0,0 +1 @@
+4db14f0a961e98597fd2f4fc75e05309bfbda3b8cf83c1296c937be24207595e \ No newline at end of file
diff --git a/db/schema_migrations/20230316114426 b/db/schema_migrations/20230316114426
new file mode 100644
index 00000000000..1fde829db4a
--- /dev/null
+++ b/db/schema_migrations/20230316114426
@@ -0,0 +1 @@
+65380616067b8dc968e5d200092ebbb58e6c8bc8967ac9ed84282c450aefe016 \ No newline at end of file
diff --git a/db/schema_migrations/20230316164917 b/db/schema_migrations/20230316164917
new file mode 100644
index 00000000000..935639439d8
--- /dev/null
+++ b/db/schema_migrations/20230316164917
@@ -0,0 +1 @@
+d9a660e9415a0ab3f128609d72b2da19982d1ef6a8441dd2f627427890d0d3be \ No newline at end of file
diff --git a/db/schema_migrations/20230316185746 b/db/schema_migrations/20230316185746
new file mode 100644
index 00000000000..1b23d93736b
--- /dev/null
+++ b/db/schema_migrations/20230316185746
@@ -0,0 +1 @@
+6aa9022f0e945d66fd62a49e1d392a8fb5e55bd96804b1eb50bfff135a7954b6 \ No newline at end of file
diff --git a/db/schema_migrations/20230317075852 b/db/schema_migrations/20230317075852
new file mode 100644
index 00000000000..7506d9c5414
--- /dev/null
+++ b/db/schema_migrations/20230317075852
@@ -0,0 +1 @@
+5b9e269f3354b1f054a3e3d8f9a011ea2c1a19c72a4cecdfb8a3e6e80ab83ab3 \ No newline at end of file
diff --git a/db/schema_migrations/20230317080000 b/db/schema_migrations/20230317080000
new file mode 100644
index 00000000000..33b3252a977
--- /dev/null
+++ b/db/schema_migrations/20230317080000
@@ -0,0 +1 @@
+a33f941480ce270532dca961cf72ce31c5c2d732b1c1ab361c95bac6e278a443 \ No newline at end of file
diff --git a/db/schema_migrations/20230317080137 b/db/schema_migrations/20230317080137
new file mode 100644
index 00000000000..90914f8a533
--- /dev/null
+++ b/db/schema_migrations/20230317080137
@@ -0,0 +1 @@
+238730785306bb43677be1e86ae3cca210d651eb5397a7fbf90a12a7ec252614 \ No newline at end of file
diff --git a/db/schema_migrations/20230317151841 b/db/schema_migrations/20230317151841
new file mode 100644
index 00000000000..69085045c8a
--- /dev/null
+++ b/db/schema_migrations/20230317151841
@@ -0,0 +1 @@
+95bcf074127993a57bc6aaf04b64717a2c49d7886838ab0e7194807475fcdee1 \ No newline at end of file
diff --git a/db/schema_migrations/20230317162059 b/db/schema_migrations/20230317162059
new file mode 100644
index 00000000000..9adcabb9aeb
--- /dev/null
+++ b/db/schema_migrations/20230317162059
@@ -0,0 +1 @@
+86f8982c21b25cfc1914304b0083075226e0f8182b66a766a4f354b1b5fc8f7d \ No newline at end of file
diff --git a/db/schema_migrations/20230317195228 b/db/schema_migrations/20230317195228
new file mode 100644
index 00000000000..ba9f36ae31d
--- /dev/null
+++ b/db/schema_migrations/20230317195228
@@ -0,0 +1 @@
+cc3bc6913ae957318f1a41b00cf6b8c3b6b445b6a16c460e8744e94618416bf6 \ No newline at end of file
diff --git a/db/schema_migrations/20230319105436 b/db/schema_migrations/20230319105436
new file mode 100644
index 00000000000..47338a038b1
--- /dev/null
+++ b/db/schema_migrations/20230319105436
@@ -0,0 +1 @@
+198cf0597e4a513c6c47b9cd576765d40f564838d5c54e33216fd7a5d25220ae \ No newline at end of file
diff --git a/db/schema_migrations/20230320110802 b/db/schema_migrations/20230320110802
new file mode 100644
index 00000000000..f9185745e24
--- /dev/null
+++ b/db/schema_migrations/20230320110802
@@ -0,0 +1 @@
+b45db7a4404bbab731138f5db6031241945969a210f1c3b6fce323938ec8980d \ No newline at end of file
diff --git a/db/schema_migrations/20230320155635 b/db/schema_migrations/20230320155635
new file mode 100644
index 00000000000..91ade579ffb
--- /dev/null
+++ b/db/schema_migrations/20230320155635
@@ -0,0 +1 @@
+58d91bbad9896429a0b8d383a1d5ef47a7b017c65af7834c01091fbccb7f5221 \ No newline at end of file
diff --git a/db/schema_migrations/20230321003252 b/db/schema_migrations/20230321003252
new file mode 100644
index 00000000000..85515872922
--- /dev/null
+++ b/db/schema_migrations/20230321003252
@@ -0,0 +1 @@
+82c5c661c3fad14a0466e5669b59dca92084b8c77500d8ae3b97b34029277c94 \ No newline at end of file
diff --git a/db/schema_migrations/20230321011529 b/db/schema_migrations/20230321011529
new file mode 100644
index 00000000000..2491b3b23db
--- /dev/null
+++ b/db/schema_migrations/20230321011529
@@ -0,0 +1 @@
+726d3232acecf6408a7f25876ac9104d5a003fbaeeb8ab666d473b8cf379cc75 \ No newline at end of file
diff --git a/db/schema_migrations/20230321011903 b/db/schema_migrations/20230321011903
new file mode 100644
index 00000000000..a02b643406c
--- /dev/null
+++ b/db/schema_migrations/20230321011903
@@ -0,0 +1 @@
+ddb687f5e1b2593dc1c68c2c22ff12a276861c67faf4f775431e17b17380688d \ No newline at end of file
diff --git a/db/schema_migrations/20230321024333 b/db/schema_migrations/20230321024333
new file mode 100644
index 00000000000..52cd037f28e
--- /dev/null
+++ b/db/schema_migrations/20230321024333
@@ -0,0 +1 @@
+16d266b15451c20c4512b3ee2673af997301b7a92b4eacb4db74e025231c9f43 \ No newline at end of file
diff --git a/db/schema_migrations/20230321024903 b/db/schema_migrations/20230321024903
new file mode 100644
index 00000000000..fd2651c7afa
--- /dev/null
+++ b/db/schema_migrations/20230321024903
@@ -0,0 +1 @@
+b07b58c96f5f61e63619edc645384c15341feb217a521cdf8d90f37bc261addb \ No newline at end of file
diff --git a/db/schema_migrations/20230321085011 b/db/schema_migrations/20230321085011
new file mode 100644
index 00000000000..c35be85e583
--- /dev/null
+++ b/db/schema_migrations/20230321085011
@@ -0,0 +1 @@
+fc277fb3f02c01f57355cf6381a9883e6f67c339303242ea34c5a1b567b227d0 \ No newline at end of file
diff --git a/db/schema_migrations/20230321095759 b/db/schema_migrations/20230321095759
new file mode 100644
index 00000000000..0f51a5001b8
--- /dev/null
+++ b/db/schema_migrations/20230321095759
@@ -0,0 +1 @@
+f2b7e2856672f294a7686a61d3b953b8341b21b31a60a2f62419e878c3244d64 \ No newline at end of file
diff --git a/db/schema_migrations/20230321113956 b/db/schema_migrations/20230321113956
new file mode 100644
index 00000000000..a3e81a95610
--- /dev/null
+++ b/db/schema_migrations/20230321113956
@@ -0,0 +1 @@
+5f7d370de2adf12d836c6408dc3166b8a2691fc84e353fab8933a276568af62e \ No newline at end of file
diff --git a/db/schema_migrations/20230321124837 b/db/schema_migrations/20230321124837
new file mode 100644
index 00000000000..934f467c5e0
--- /dev/null
+++ b/db/schema_migrations/20230321124837
@@ -0,0 +1 @@
+17c78ffb8298207d36866e51974fb09432d9ccbbf5f3b401c4335392849f75c3 \ No newline at end of file
diff --git a/db/schema_migrations/20230321153035 b/db/schema_migrations/20230321153035
new file mode 100644
index 00000000000..5c4894a9113
--- /dev/null
+++ b/db/schema_migrations/20230321153035
@@ -0,0 +1 @@
+5aa29a59aad33fe1ee81c44402c7fb2bb149fcb46c0d0afd5494b4788ea8840c \ No newline at end of file
diff --git a/db/schema_migrations/20230321153304 b/db/schema_migrations/20230321153304
new file mode 100644
index 00000000000..64cb0f2e2dc
--- /dev/null
+++ b/db/schema_migrations/20230321153304
@@ -0,0 +1 @@
+367ed961312905ce5a2f543d997c5210904648354698292ec735cee874995f9b \ No newline at end of file
diff --git a/db/schema_migrations/20230321153337 b/db/schema_migrations/20230321153337
new file mode 100644
index 00000000000..0e388c06534
--- /dev/null
+++ b/db/schema_migrations/20230321153337
@@ -0,0 +1 @@
+642ee9d1d663316b50205d3925d91e05c2cb674ea929cc8316442257b61f2fb4 \ No newline at end of file
diff --git a/db/schema_migrations/20230321161218 b/db/schema_migrations/20230321161218
new file mode 100644
index 00000000000..57365b47898
--- /dev/null
+++ b/db/schema_migrations/20230321161218
@@ -0,0 +1 @@
+efbe3f66fecfb275f8b4276cedc2210a141f4c63cc10242daafb445b352a4b70 \ No newline at end of file
diff --git a/db/schema_migrations/20230321161441 b/db/schema_migrations/20230321161441
new file mode 100644
index 00000000000..fe0b5fbeee4
--- /dev/null
+++ b/db/schema_migrations/20230321161441
@@ -0,0 +1 @@
+7e3a9281e624341301d937d2422f0ff2d71367bfb42bf45ddcde7216e84ecb93 \ No newline at end of file
diff --git a/db/schema_migrations/20230321162810 b/db/schema_migrations/20230321162810
new file mode 100644
index 00000000000..ef81f6f1549
--- /dev/null
+++ b/db/schema_migrations/20230321162810
@@ -0,0 +1 @@
+f393893085e2a7faf43668589ce707dc27c61f8ea0dc8a3632503a39de673134 \ No newline at end of file
diff --git a/db/schema_migrations/20230321162902 b/db/schema_migrations/20230321162902
new file mode 100644
index 00000000000..54e447494d3
--- /dev/null
+++ b/db/schema_migrations/20230321162902
@@ -0,0 +1 @@
+2d00140af48ff5137f2c8df0b03fdebbc08abd0d448b967fdc1fb8781ab0841f \ No newline at end of file
diff --git a/db/schema_migrations/20230321163051 b/db/schema_migrations/20230321163051
new file mode 100644
index 00000000000..a4d26398090
--- /dev/null
+++ b/db/schema_migrations/20230321163051
@@ -0,0 +1 @@
+e172b6f87e3f06e3c2a7f64b0d7d9eae797802a4dd77b86a989ab4eb6ec5e626 \ No newline at end of file
diff --git a/db/schema_migrations/20230321163547 b/db/schema_migrations/20230321163547
new file mode 100644
index 00000000000..81260ee6b14
--- /dev/null
+++ b/db/schema_migrations/20230321163547
@@ -0,0 +1 @@
+c2e2ac63f992c409f575de544f86e046ebdcfd19ff55bf75616205266034caed \ No newline at end of file
diff --git a/db/schema_migrations/20230321163947 b/db/schema_migrations/20230321163947
new file mode 100644
index 00000000000..7fe48192693
--- /dev/null
+++ b/db/schema_migrations/20230321163947
@@ -0,0 +1 @@
+f70305536912db6a726b2e371970a322f9b8f2a3efb5570860e57b4196c85d3d \ No newline at end of file
diff --git a/db/schema_migrations/20230321170734 b/db/schema_migrations/20230321170734
new file mode 100644
index 00000000000..b6653465894
--- /dev/null
+++ b/db/schema_migrations/20230321170734
@@ -0,0 +1 @@
+e60dc9b8f28fdbbc84ed808edc98fb8d640ec5a53b21363a59f375a0a3fe5bfd \ No newline at end of file
diff --git a/db/schema_migrations/20230321170803 b/db/schema_migrations/20230321170803
new file mode 100644
index 00000000000..85d557d7681
--- /dev/null
+++ b/db/schema_migrations/20230321170803
@@ -0,0 +1 @@
+c08a4f0873dfbc3ce2d6c1cc9224b2427ec41de482da85768f7cf08409ec8a54 \ No newline at end of file
diff --git a/db/schema_migrations/20230321170823 b/db/schema_migrations/20230321170823
new file mode 100644
index 00000000000..86dfe823473
--- /dev/null
+++ b/db/schema_migrations/20230321170823
@@ -0,0 +1 @@
+5517993d733b91c924c06ac616902108d7d709045296e3c2e44de5e8ed78e10f \ No newline at end of file
diff --git a/db/schema_migrations/20230322011220 b/db/schema_migrations/20230322011220
new file mode 100644
index 00000000000..8e8b8325f30
--- /dev/null
+++ b/db/schema_migrations/20230322011220
@@ -0,0 +1 @@
+5e70b9a4dd74523e8cc44b22d2ebb5dcc326fcfb52bacdd63090b5abe8b36732 \ No newline at end of file
diff --git a/db/schema_migrations/20230322012209 b/db/schema_migrations/20230322012209
new file mode 100644
index 00000000000..e3686af447d
--- /dev/null
+++ b/db/schema_migrations/20230322012209
@@ -0,0 +1 @@
+b00bad4559b3f7a959771b08f03b2d6cd4eadb2862dc8840065885cd87d09a77 \ No newline at end of file
diff --git a/db/schema_migrations/20230322023442 b/db/schema_migrations/20230322023442
new file mode 100644
index 00000000000..59de5395302
--- /dev/null
+++ b/db/schema_migrations/20230322023442
@@ -0,0 +1 @@
+41d619c9e22fb91b3cf4f04482b48a66d027dda0c705423c4a9a84de991ea42d \ No newline at end of file
diff --git a/db/schema_migrations/20230322085041 b/db/schema_migrations/20230322085041
new file mode 100644
index 00000000000..6ffba798585
--- /dev/null
+++ b/db/schema_migrations/20230322085041
@@ -0,0 +1 @@
+17a8493fb1da422753efbd3bfb0d02574470eb6bf06f8302a9b360d02aa5e55d \ No newline at end of file
diff --git a/db/schema_migrations/20230322085852 b/db/schema_migrations/20230322085852
new file mode 100644
index 00000000000..bb4f7d6c082
--- /dev/null
+++ b/db/schema_migrations/20230322085852
@@ -0,0 +1 @@
+3d729e32b57bee6013f05361f37ea9e33453bea2b21085d4d56b3c2fe4d5f071 \ No newline at end of file
diff --git a/db/schema_migrations/20230322145403 b/db/schema_migrations/20230322145403
new file mode 100644
index 00000000000..d2db5495d7b
--- /dev/null
+++ b/db/schema_migrations/20230322145403
@@ -0,0 +1 @@
+7ec944ccdd85380bba7d17fbd9dbf37bea918d0ac7fbe03142f4a4c6561a77a9 \ No newline at end of file
diff --git a/db/schema_migrations/20230322151605 b/db/schema_migrations/20230322151605
new file mode 100644
index 00000000000..cb47c2629a8
--- /dev/null
+++ b/db/schema_migrations/20230322151605
@@ -0,0 +1 @@
+5300b4b70078fe3dadbdf42e7884dee84794c0de5b32c26b6ec46622b2a433c4 \ No newline at end of file
diff --git a/db/schema_migrations/20230322151635 b/db/schema_migrations/20230322151635
new file mode 100644
index 00000000000..1f9bb48020a
--- /dev/null
+++ b/db/schema_migrations/20230322151635
@@ -0,0 +1 @@
+d0b729d78f4ca8269fef71e11ddd600e3cbd53ceb302200ae13e0362a0278101 \ No newline at end of file
diff --git a/db/schema_migrations/20230322162512 b/db/schema_migrations/20230322162512
new file mode 100644
index 00000000000..a6e64bb2a6e
--- /dev/null
+++ b/db/schema_migrations/20230322162512
@@ -0,0 +1 @@
+3443d7c52cc4db5fc8f10e22406a39b8724f968bb936b0792895e13a3b3db710 \ No newline at end of file
diff --git a/db/schema_migrations/20230322203927 b/db/schema_migrations/20230322203927
new file mode 100644
index 00000000000..5484ff427e4
--- /dev/null
+++ b/db/schema_migrations/20230322203927
@@ -0,0 +1 @@
+b91efba4aad15d32dc227620239a330246748c73d6afed946c3fd1baaa125932 \ No newline at end of file
diff --git a/db/schema_migrations/20230323005730 b/db/schema_migrations/20230323005730
new file mode 100644
index 00000000000..52e64f71e51
--- /dev/null
+++ b/db/schema_migrations/20230323005730
@@ -0,0 +1 @@
+38395557e91452474bbebcbaa7e728ce83277757d38e72cec41392e3437d40ba \ No newline at end of file
diff --git a/db/schema_migrations/20230323010111 b/db/schema_migrations/20230323010111
new file mode 100644
index 00000000000..896d7f5488b
--- /dev/null
+++ b/db/schema_migrations/20230323010111
@@ -0,0 +1 @@
+89f6e9276f2b5518315e70c9d91371ca6ae291e7dace64934f49c9793ce8d51f \ No newline at end of file
diff --git a/db/schema_migrations/20230323013251 b/db/schema_migrations/20230323013251
new file mode 100644
index 00000000000..67c69c00346
--- /dev/null
+++ b/db/schema_migrations/20230323013251
@@ -0,0 +1 @@
+504a374319d8da45286d609e7ef1a06b154436e0ed7c44ccbce4ad98ef9f6c00 \ No newline at end of file
diff --git a/db/schema_migrations/20230323021618 b/db/schema_migrations/20230323021618
new file mode 100644
index 00000000000..49e2c251987
--- /dev/null
+++ b/db/schema_migrations/20230323021618
@@ -0,0 +1 @@
+4eed46d4a2ae17425076dbb60b5669317d8edb7252246dddf914411f0a267897 \ No newline at end of file
diff --git a/db/schema_migrations/20230323101138 b/db/schema_migrations/20230323101138
new file mode 100644
index 00000000000..2c464eda729
--- /dev/null
+++ b/db/schema_migrations/20230323101138
@@ -0,0 +1 @@
+3d03a0af6421f0b2a0f26b7a7d385dcabb12565cb0b3f6d23454d8588395a59a \ No newline at end of file
diff --git a/db/schema_migrations/20230323120601 b/db/schema_migrations/20230323120601
new file mode 100644
index 00000000000..1b4d275a1d0
--- /dev/null
+++ b/db/schema_migrations/20230323120601
@@ -0,0 +1 @@
+6ff846d6485dfccfef23e48fcbdf1f2ad8672371e6865bb436e39c7578ec357b \ No newline at end of file
diff --git a/db/schema_migrations/20230323131521 b/db/schema_migrations/20230323131521
new file mode 100644
index 00000000000..3b449099282
--- /dev/null
+++ b/db/schema_migrations/20230323131521
@@ -0,0 +1 @@
+93b27125fa1bb07cb32509fed9e7a4e6842655e683fe35cddce8f1b6e6728130 \ No newline at end of file
diff --git a/db/schema_migrations/20230323140745 b/db/schema_migrations/20230323140745
new file mode 100644
index 00000000000..ba80e2d22c4
--- /dev/null
+++ b/db/schema_migrations/20230323140745
@@ -0,0 +1 @@
+14e93b01f5d959b995aca2b27de0bf2926eacbc5fe3ca010a038101100a99551 \ No newline at end of file
diff --git a/db/schema_migrations/20230323140746 b/db/schema_migrations/20230323140746
new file mode 100644
index 00000000000..dead7210281
--- /dev/null
+++ b/db/schema_migrations/20230323140746
@@ -0,0 +1 @@
+e8348ca24375ba452cf96abf6a48a9aa06197d4298043e9514e4becd30dfb2a1 \ No newline at end of file
diff --git a/db/schema_migrations/20230323153042 b/db/schema_migrations/20230323153042
new file mode 100644
index 00000000000..4ac316d2f16
--- /dev/null
+++ b/db/schema_migrations/20230323153042
@@ -0,0 +1 @@
+df9cd2f72ada861f94a7957513982c50276fbe8bf29f82f29bbc306cf9075d9b \ No newline at end of file
diff --git a/db/schema_migrations/20230323153328 b/db/schema_migrations/20230323153328
new file mode 100644
index 00000000000..48b96e73f74
--- /dev/null
+++ b/db/schema_migrations/20230323153328
@@ -0,0 +1 @@
+5c572b7d9ee5f457c5bdd49fea89143eefd40680c571942b68e370857cf3af0e \ No newline at end of file
diff --git a/db/schema_migrations/20230323153433 b/db/schema_migrations/20230323153433
new file mode 100644
index 00000000000..f125d87f08c
--- /dev/null
+++ b/db/schema_migrations/20230323153433
@@ -0,0 +1 @@
+9a513d1ac05a263b7057fbdcc3640d9269263dcb620ee7eea79888a0afec136c \ No newline at end of file
diff --git a/db/schema_migrations/20230323191750 b/db/schema_migrations/20230323191750
new file mode 100644
index 00000000000..7aace5fdc8e
--- /dev/null
+++ b/db/schema_migrations/20230323191750
@@ -0,0 +1 @@
+b8285d96d0e769f6ec6cf0b7a7e9a88dff978029b252b915ca9caff5a364912d \ No newline at end of file
diff --git a/db/schema_migrations/20230327074932 b/db/schema_migrations/20230327074932
new file mode 100644
index 00000000000..7093e3aa4bf
--- /dev/null
+++ b/db/schema_migrations/20230327074932
@@ -0,0 +1 @@
+48f6ba4288122f400a0a2ef53a679cf6b4e9dc3052ec64e959066f6e30b3cd3a \ No newline at end of file
diff --git a/db/schema_migrations/20230327123333 b/db/schema_migrations/20230327123333
new file mode 100644
index 00000000000..2789700b74d
--- /dev/null
+++ b/db/schema_migrations/20230327123333
@@ -0,0 +1 @@
+3009fe920b44aed313dd4371ab06861a74333e515349f07e361a655339fc17d2 \ No newline at end of file
diff --git a/db/schema_migrations/20230327125705 b/db/schema_migrations/20230327125705
new file mode 100644
index 00000000000..5b193987b11
--- /dev/null
+++ b/db/schema_migrations/20230327125705
@@ -0,0 +1 @@
+dd965c40fa107f487bda00d71dfdf40aabd013dd2cb05a4d9621cb1aa87d8060 \ No newline at end of file
diff --git a/db/schema_migrations/20230327144152 b/db/schema_migrations/20230327144152
new file mode 100644
index 00000000000..ab770780c35
--- /dev/null
+++ b/db/schema_migrations/20230327144152
@@ -0,0 +1 @@
+4ac5ad2dca9500804976e6555d68958ae11c4ee7a7e694f44f2745cee7de041f \ No newline at end of file
diff --git a/db/schema_migrations/20230328020316 b/db/schema_migrations/20230328020316
new file mode 100644
index 00000000000..01eda556b86
--- /dev/null
+++ b/db/schema_migrations/20230328020316
@@ -0,0 +1 @@
+8b5c31f035ede013e589d310fb477a9776b3e3f9554170638bb3b7a299721545 \ No newline at end of file
diff --git a/db/schema_migrations/20230328023535 b/db/schema_migrations/20230328023535
new file mode 100644
index 00000000000..87c5946deef
--- /dev/null
+++ b/db/schema_migrations/20230328023535
@@ -0,0 +1 @@
+fde72911a0871ab14bdb167840a470bd62fd81120fec580d26a13b0c8b6f0b33 \ No newline at end of file
diff --git a/db/schema_migrations/20230328023554 b/db/schema_migrations/20230328023554
new file mode 100644
index 00000000000..11706b84656
--- /dev/null
+++ b/db/schema_migrations/20230328023554
@@ -0,0 +1 @@
+c75b19d2a3434ddecbfc6079d61e70e31d180842d8ad3615ee9ccacc24cd0039 \ No newline at end of file
diff --git a/db/schema_migrations/20230328031720 b/db/schema_migrations/20230328031720
new file mode 100644
index 00000000000..59bc07f91d7
--- /dev/null
+++ b/db/schema_migrations/20230328031720
@@ -0,0 +1 @@
+279d189e3bae27bee234672b3529c65ab3b1ef0e8eb55c5a79ffc7e38b749a7e \ No newline at end of file
diff --git a/db/schema_migrations/20230328031838 b/db/schema_migrations/20230328031838
new file mode 100644
index 00000000000..1bf0d7de92a
--- /dev/null
+++ b/db/schema_migrations/20230328031838
@@ -0,0 +1 @@
+0f12d260dace3738f4fb7b7f31fc430ba19ca36649810fad0b086cfec3b77054 \ No newline at end of file
diff --git a/db/schema_migrations/20230328100534 b/db/schema_migrations/20230328100534
new file mode 100644
index 00000000000..7bdf4ba65ab
--- /dev/null
+++ b/db/schema_migrations/20230328100534
@@ -0,0 +1 @@
+f74849f237902c24b996b27c552a95b8a3c080f98c03fcefdf8a7c76638396dc \ No newline at end of file
diff --git a/db/schema_migrations/20230328151756 b/db/schema_migrations/20230328151756
new file mode 100644
index 00000000000..306a6a4b4ea
--- /dev/null
+++ b/db/schema_migrations/20230328151756
@@ -0,0 +1 @@
+3678d61d47421ba81190688ade76916cf7d40c3611ad84f41a3b979092269e73 \ No newline at end of file
diff --git a/db/schema_migrations/20230328184031 b/db/schema_migrations/20230328184031
new file mode 100644
index 00000000000..2a099b60ba1
--- /dev/null
+++ b/db/schema_migrations/20230328184031
@@ -0,0 +1 @@
+04dcd7983b02b2c97d64be9c55a1bdf921c39e5c5026ce086e8cc06932fd8344 \ No newline at end of file
diff --git a/db/schema_migrations/20230329032129 b/db/schema_migrations/20230329032129
new file mode 100644
index 00000000000..3aec19e9d99
--- /dev/null
+++ b/db/schema_migrations/20230329032129
@@ -0,0 +1 @@
+89a256c209e4c402d3162c7c967b7515870e80801e637a372fb9ee670d8e535e \ No newline at end of file
diff --git a/db/schema_migrations/20230329085754 b/db/schema_migrations/20230329085754
new file mode 100644
index 00000000000..fd2687b225f
--- /dev/null
+++ b/db/schema_migrations/20230329085754
@@ -0,0 +1 @@
+52c5c662dc46313dece9ed9228af5ea2734f0fc4872ba0f6a762e77437b9564e \ No newline at end of file
diff --git a/db/schema_migrations/20230329091107 b/db/schema_migrations/20230329091107
new file mode 100644
index 00000000000..658d90e662f
--- /dev/null
+++ b/db/schema_migrations/20230329091107
@@ -0,0 +1 @@
+4ca98e9c93245a8fc1f4124d00d47d73d12b961affde1d53b7262ffc93582d83 \ No newline at end of file
diff --git a/db/schema_migrations/20230329091300 b/db/schema_migrations/20230329091300
new file mode 100644
index 00000000000..4a4be644126
--- /dev/null
+++ b/db/schema_migrations/20230329091300
@@ -0,0 +1 @@
+a85e3139d843295e666867129575818f61983a8b16eaa73f9b470e394d9c5476 \ No newline at end of file
diff --git a/db/schema_migrations/20230329100222 b/db/schema_migrations/20230329100222
new file mode 100644
index 00000000000..5ca5919dadd
--- /dev/null
+++ b/db/schema_migrations/20230329100222
@@ -0,0 +1 @@
+70c83ed052082e1f37bd46c5abcb0b1b101ea08b719a68d8f39cb7545da97e61 \ No newline at end of file
diff --git a/db/schema_migrations/20230329152410 b/db/schema_migrations/20230329152410
new file mode 100644
index 00000000000..4f322c1db97
--- /dev/null
+++ b/db/schema_migrations/20230329152410
@@ -0,0 +1 @@
+e9197bef3594074f543df534372f25a19b07be76f661b699496d9f12f9930fe1 \ No newline at end of file
diff --git a/db/schema_migrations/20230329194244 b/db/schema_migrations/20230329194244
new file mode 100644
index 00000000000..58b50705305
--- /dev/null
+++ b/db/schema_migrations/20230329194244
@@ -0,0 +1 @@
+9e9f4b2ed1a56fb3dd780cd22f82eab741639bb972c524984741d4f8cd799e5c \ No newline at end of file
diff --git a/db/schema_migrations/20230330080731 b/db/schema_migrations/20230330080731
new file mode 100644
index 00000000000..18a8e9dba88
--- /dev/null
+++ b/db/schema_migrations/20230330080731
@@ -0,0 +1 @@
+5bc014685295ca8af21450de34e39fb54e6cef2fc53943cce84ea24370a9955f \ No newline at end of file
diff --git a/db/schema_migrations/20230330101438 b/db/schema_migrations/20230330101438
new file mode 100644
index 00000000000..0e479e7b28f
--- /dev/null
+++ b/db/schema_migrations/20230330101438
@@ -0,0 +1 @@
+ff2658630f5877b94536653994d211344210e10c0d3ef19d6052ca606bf8ea56 \ No newline at end of file
diff --git a/db/schema_migrations/20230330101439 b/db/schema_migrations/20230330101439
new file mode 100644
index 00000000000..64ccb9de3ee
--- /dev/null
+++ b/db/schema_migrations/20230330101439
@@ -0,0 +1 @@
+b388e3de152fda4ec4590fad5ffd503df85e474e807232e2afdacd51a4eebef9 \ No newline at end of file
diff --git a/db/schema_migrations/20230330101440 b/db/schema_migrations/20230330101440
new file mode 100644
index 00000000000..470fc0189d2
--- /dev/null
+++ b/db/schema_migrations/20230330101440
@@ -0,0 +1 @@
+f20a1df2650018debf7b84f90c0459e4fac7120c90aa23f184bbb5a96ab6e62c \ No newline at end of file
diff --git a/db/schema_migrations/20230330101441 b/db/schema_migrations/20230330101441
new file mode 100644
index 00000000000..fb69231b91a
--- /dev/null
+++ b/db/schema_migrations/20230330101441
@@ -0,0 +1 @@
+29c035a58df131daff23434a57999f04fbafde5a661e35bdc8556238c5822b5c \ No newline at end of file
diff --git a/db/schema_migrations/20230330101442 b/db/schema_migrations/20230330101442
new file mode 100644
index 00000000000..ba0def5c784
--- /dev/null
+++ b/db/schema_migrations/20230330101442
@@ -0,0 +1 @@
+f2037e8c082b2355c7b004bc2f006f99f738c48e277b0013872c77d1347a0d14 \ No newline at end of file
diff --git a/db/schema_migrations/20230330101443 b/db/schema_migrations/20230330101443
new file mode 100644
index 00000000000..4c0c0bc4b0a
--- /dev/null
+++ b/db/schema_migrations/20230330101443
@@ -0,0 +1 @@
+75bbf5ead4cec9bd425d056c9bbdc0e090721caa74c143533a30afedf90047ca \ No newline at end of file
diff --git a/db/schema_migrations/20230330103104 b/db/schema_migrations/20230330103104
new file mode 100644
index 00000000000..804fb366310
--- /dev/null
+++ b/db/schema_migrations/20230330103104
@@ -0,0 +1 @@
+e52fa4a4736346c3c03e9386be1f25cf8a2cf006c63432181afcf27473dce90a \ No newline at end of file
diff --git a/db/schema_migrations/20230330215636 b/db/schema_migrations/20230330215636
new file mode 100644
index 00000000000..21d09d15906
--- /dev/null
+++ b/db/schema_migrations/20230330215636
@@ -0,0 +1 @@
+46f78841bf6d0ff3b852eeb2f6690ec9fa20a460566a8c23f8530f0e4ec60ed8 \ No newline at end of file
diff --git a/db/schema_migrations/20230331142006 b/db/schema_migrations/20230331142006
new file mode 100644
index 00000000000..be84e6af217
--- /dev/null
+++ b/db/schema_migrations/20230331142006
@@ -0,0 +1 @@
+73b3a7fa20bb22756e9e16f489c0743920c3342c6fc5a70cffafad84016873ab \ No newline at end of file
diff --git a/db/schema_migrations/20230403023440 b/db/schema_migrations/20230403023440
new file mode 100644
index 00000000000..2705965c70c
--- /dev/null
+++ b/db/schema_migrations/20230403023440
@@ -0,0 +1 @@
+0cd1bcb2a2a02c09e7fd9271f815522adc1c20a1b39953349cfe2fff4541ed66 \ No newline at end of file
diff --git a/db/schema_migrations/20230403023441 b/db/schema_migrations/20230403023441
new file mode 100644
index 00000000000..6e259200d0e
--- /dev/null
+++ b/db/schema_migrations/20230403023441
@@ -0,0 +1 @@
+e9684618df40260a7bae8b3dc217f3dd662e1cbc5db8b8a6d0334716e034c77b \ No newline at end of file
diff --git a/db/schema_migrations/20230403023828 b/db/schema_migrations/20230403023828
new file mode 100644
index 00000000000..60cc18c8eec
--- /dev/null
+++ b/db/schema_migrations/20230403023828
@@ -0,0 +1 @@
+1056fb290b3f5acf11dca0848258494d42c075dc7dc18ca89873d6237fc7104b \ No newline at end of file
diff --git a/db/schema_migrations/20230403041642 b/db/schema_migrations/20230403041642
new file mode 100644
index 00000000000..2e066ad05d8
--- /dev/null
+++ b/db/schema_migrations/20230403041642
@@ -0,0 +1 @@
+695a7fb24cc41bf991f54df7250b7c72c4e22c6eefc6327b58bb658dcc072740 \ No newline at end of file
diff --git a/db/schema_migrations/20230403041917 b/db/schema_migrations/20230403041917
new file mode 100644
index 00000000000..bc3e2d3b2e2
--- /dev/null
+++ b/db/schema_migrations/20230403041917
@@ -0,0 +1 @@
+3387abc29b2c499b8c1fafa8543f504d02cbca189b38f26a3776786416fa5820 \ No newline at end of file
diff --git a/db/schema_migrations/20230403085957 b/db/schema_migrations/20230403085957
new file mode 100644
index 00000000000..6789a0a83a5
--- /dev/null
+++ b/db/schema_migrations/20230403085957
@@ -0,0 +1 @@
+731cdc55c22cfcfc6f23e59a7c051385a66259bb10f4b7dd22da21ee228357d2 \ No newline at end of file
diff --git a/db/schema_migrations/20230403085958 b/db/schema_migrations/20230403085958
new file mode 100644
index 00000000000..882be7fa1cd
--- /dev/null
+++ b/db/schema_migrations/20230403085958
@@ -0,0 +1 @@
+54e1499b13e6bbfb7c08e491caacae93ee21c1e939e41ffcf7ab83c6f50463ce \ No newline at end of file
diff --git a/db/schema_migrations/20230403113620 b/db/schema_migrations/20230403113620
new file mode 100644
index 00000000000..bbecdc62886
--- /dev/null
+++ b/db/schema_migrations/20230403113620
@@ -0,0 +1 @@
+52b7d165f3fcbfd16af2c2054693af4ce7d97ca51ac1c8900d357bec4401cd14 \ No newline at end of file
diff --git a/db/schema_migrations/20230403145705 b/db/schema_migrations/20230403145705
new file mode 100644
index 00000000000..80e6357e3e4
--- /dev/null
+++ b/db/schema_migrations/20230403145705
@@ -0,0 +1 @@
+856d50399914b6df0c07d328723197a57806c0883157cbfe67f0c578708a1bde \ No newline at end of file
diff --git a/db/schema_migrations/20230403164454 b/db/schema_migrations/20230403164454
new file mode 100644
index 00000000000..0283a3b1612
--- /dev/null
+++ b/db/schema_migrations/20230403164454
@@ -0,0 +1 @@
+ff04f9ef9bb479b85223e361b96c921e25b436a86a0041627b595c3635848a5b \ No newline at end of file
diff --git a/db/schema_migrations/20230403190527 b/db/schema_migrations/20230403190527
new file mode 100644
index 00000000000..290c9c39333
--- /dev/null
+++ b/db/schema_migrations/20230403190527
@@ -0,0 +1 @@
+0715accd97005c76bcb1e975bf00fd5fd4f34375a5d5a4131d107f13b1cd6be0 \ No newline at end of file
diff --git a/db/schema_migrations/20230403221928 b/db/schema_migrations/20230403221928
new file mode 100644
index 00000000000..42fd52b4415
--- /dev/null
+++ b/db/schema_migrations/20230403221928
@@ -0,0 +1 @@
+458b23ebbf780535b3eec467bad2edbf3bcca3804569d892572c6e6fac2f2019 \ No newline at end of file
diff --git a/db/schema_migrations/20230403231455 b/db/schema_migrations/20230403231455
new file mode 100644
index 00000000000..5d9c1f5a620
--- /dev/null
+++ b/db/schema_migrations/20230403231455
@@ -0,0 +1 @@
+39167c767e9cbf437f7c58ee42dbc1524a3963b7eb5a9c8421f6c218611d1291 \ No newline at end of file
diff --git a/db/schema_migrations/20230403231841 b/db/schema_migrations/20230403231841
new file mode 100644
index 00000000000..f02d68ba424
--- /dev/null
+++ b/db/schema_migrations/20230403231841
@@ -0,0 +1 @@
+86bcc78ab4b5681cd31f6ca1ae43cb3c3ec5d17392a1eaceee9520cfa684d36d \ No newline at end of file
diff --git a/db/schema_migrations/20230403232121 b/db/schema_migrations/20230403232121
new file mode 100644
index 00000000000..519a8dc0bb2
--- /dev/null
+++ b/db/schema_migrations/20230403232121
@@ -0,0 +1 @@
+59297e1b83298ee3d02a70384355cd572229e5b5ab20ebea6dd9ffff0b9e243b \ No newline at end of file
diff --git a/db/schema_migrations/20230404023648 b/db/schema_migrations/20230404023648
new file mode 100644
index 00000000000..c9ac5581cf3
--- /dev/null
+++ b/db/schema_migrations/20230404023648
@@ -0,0 +1 @@
+ef9f641608397a12e6b5384667194a8b3e5b929c76c365105f47fd00c5c7f219 \ No newline at end of file
diff --git a/db/schema_migrations/20230404023915 b/db/schema_migrations/20230404023915
new file mode 100644
index 00000000000..99d7f3ec63c
--- /dev/null
+++ b/db/schema_migrations/20230404023915
@@ -0,0 +1 @@
+20bfe6e7faf02d4b20babf0f80d51bfd3618f3fd1faf512af948f1976d8c5838 \ No newline at end of file
diff --git a/db/schema_migrations/20230404030757 b/db/schema_migrations/20230404030757
new file mode 100644
index 00000000000..989df2048b0
--- /dev/null
+++ b/db/schema_migrations/20230404030757
@@ -0,0 +1 @@
+3968fc8d21184f48f85209546fe515d0b4a407ad0837ef052ccbbbe15d0f9163 \ No newline at end of file
diff --git a/db/schema_migrations/20230404031041 b/db/schema_migrations/20230404031041
new file mode 100644
index 00000000000..24b24fb6dc9
--- /dev/null
+++ b/db/schema_migrations/20230404031041
@@ -0,0 +1 @@
+a3e306b8ebe149c319788311f4f81386c9362d081babca8bcd7c850ae1cbc183 \ No newline at end of file
diff --git a/db/schema_migrations/20230404044338 b/db/schema_migrations/20230404044338
new file mode 100644
index 00000000000..caa04406a17
--- /dev/null
+++ b/db/schema_migrations/20230404044338
@@ -0,0 +1 @@
+42d91918d6669bb02501657aeac062114ce6ce907baf690ab346e788c57a3324 \ No newline at end of file
diff --git a/db/schema_migrations/20230404050414 b/db/schema_migrations/20230404050414
new file mode 100644
index 00000000000..eed37e4fbed
--- /dev/null
+++ b/db/schema_migrations/20230404050414
@@ -0,0 +1 @@
+919044fa4eca645e32496135af44cd01b5299413cea4dcd243a37ec144806e2f \ No newline at end of file
diff --git a/db/schema_migrations/20230404061832 b/db/schema_migrations/20230404061832
new file mode 100644
index 00000000000..14cdca25567
--- /dev/null
+++ b/db/schema_migrations/20230404061832
@@ -0,0 +1 @@
+51e141580bfb02dbe9ab215bd9283c01598353cb3f59fbe52ab0ab26a7974b49 \ No newline at end of file
diff --git a/db/schema_migrations/20230404132544 b/db/schema_migrations/20230404132544
new file mode 100644
index 00000000000..ed8abfc31ec
--- /dev/null
+++ b/db/schema_migrations/20230404132544
@@ -0,0 +1 @@
+c2547b24345eb71c4b23d03a2b90150e0cb0fc89adaa92696fe72e038b71a6dd \ No newline at end of file
diff --git a/db/schema_migrations/20230404194907 b/db/schema_migrations/20230404194907
new file mode 100644
index 00000000000..76b16536f8d
--- /dev/null
+++ b/db/schema_migrations/20230404194907
@@ -0,0 +1 @@
+7dccec7b92a1ea97acad03086c8d7c05ee06d1afdb88ffe34d6e83b1ffe61ad3 \ No newline at end of file
diff --git a/db/schema_migrations/20230404194908 b/db/schema_migrations/20230404194908
new file mode 100644
index 00000000000..c9324dbc016
--- /dev/null
+++ b/db/schema_migrations/20230404194908
@@ -0,0 +1 @@
+de2093c0fe297431a5a8275f482bcbf75d2672421b08942da0dcdaf6a26e1d8f \ No newline at end of file
diff --git a/db/schema_migrations/20230405072302 b/db/schema_migrations/20230405072302
new file mode 100644
index 00000000000..cfa7bf7f175
--- /dev/null
+++ b/db/schema_migrations/20230405072302
@@ -0,0 +1 @@
+d93a103c002a536d11f75256f20e2b8708ec760286f65d89ab5abe446fe629d4 \ No newline at end of file
diff --git a/db/schema_migrations/20230405094230 b/db/schema_migrations/20230405094230
new file mode 100644
index 00000000000..2af4c0d876f
--- /dev/null
+++ b/db/schema_migrations/20230405094230
@@ -0,0 +1 @@
+6b9ded39763a59b0047e256b9283084b4f05dbca46de85e7c8bb6c7d44d96d23 \ No newline at end of file
diff --git a/db/schema_migrations/20230405102815 b/db/schema_migrations/20230405102815
new file mode 100644
index 00000000000..a5c8f90fe6b
--- /dev/null
+++ b/db/schema_migrations/20230405102815
@@ -0,0 +1 @@
+60ae9405a4d4f4c41abc0b6b29c557701ae10957622297d093c70fade32e2863 \ No newline at end of file
diff --git a/db/schema_migrations/20230405132104 b/db/schema_migrations/20230405132104
new file mode 100644
index 00000000000..e8d9bd7ded7
--- /dev/null
+++ b/db/schema_migrations/20230405132104
@@ -0,0 +1 @@
+eae464c7583b909d975c379d196b7ae5301580f7195907a476ca1a146d8cb6b1 \ No newline at end of file
diff --git a/db/schema_migrations/20230405132855 b/db/schema_migrations/20230405132855
new file mode 100644
index 00000000000..209578a8ed4
--- /dev/null
+++ b/db/schema_migrations/20230405132855
@@ -0,0 +1 @@
+a7928284883d79b1204bb39a2a2d34b173771ce6dc484cefdb1c7ec3e9e9477a \ No newline at end of file
diff --git a/db/schema_migrations/20230405200858 b/db/schema_migrations/20230405200858
new file mode 100644
index 00000000000..185155ed4d8
--- /dev/null
+++ b/db/schema_migrations/20230405200858
@@ -0,0 +1 @@
+640e7ea2a9b2e90eff427680e5a6e2a2def9b7832a48b7b877f3aa75d8810fd3 \ No newline at end of file
diff --git a/db/schema_migrations/20230406040908 b/db/schema_migrations/20230406040908
new file mode 100644
index 00000000000..e5ca15fe7e6
--- /dev/null
+++ b/db/schema_migrations/20230406040908
@@ -0,0 +1 @@
+33c9561c8f21f756095ff7396b78bf78bd7f41e18e508c89b759d367d5e920ba \ No newline at end of file
diff --git a/db/schema_migrations/20230406041555 b/db/schema_migrations/20230406041555
new file mode 100644
index 00000000000..cede3b1d25e
--- /dev/null
+++ b/db/schema_migrations/20230406041555
@@ -0,0 +1 @@
+75a2776017e8d2c015021ca056c09d2b5f7776f6443c59d1bd164519575c05ba \ No newline at end of file
diff --git a/db/schema_migrations/20230406041629 b/db/schema_migrations/20230406041629
new file mode 100644
index 00000000000..0d77ae52a24
--- /dev/null
+++ b/db/schema_migrations/20230406041629
@@ -0,0 +1 @@
+e1726eb5b20b230f4b37ef56e0f3dd512bdcea3e67a9ba5a1725363bb17b79e6 \ No newline at end of file
diff --git a/db/schema_migrations/20230406042906 b/db/schema_migrations/20230406042906
new file mode 100644
index 00000000000..a32d144741b
--- /dev/null
+++ b/db/schema_migrations/20230406042906
@@ -0,0 +1 @@
+b6608c1bd719c6fcfe701b11737ebfa7a8db8da795a0037d08bb7adc0c9b40e2 \ No newline at end of file
diff --git a/db/schema_migrations/20230406043900 b/db/schema_migrations/20230406043900
new file mode 100644
index 00000000000..e41be929522
--- /dev/null
+++ b/db/schema_migrations/20230406043900
@@ -0,0 +1 @@
+83c9ff25c312bd1c11e9be4fc8da12f89ec72174a0b303513899ee2fcd18e4d3 \ No newline at end of file
diff --git a/db/schema_migrations/20230406060452 b/db/schema_migrations/20230406060452
new file mode 100644
index 00000000000..ee6e212a27b
--- /dev/null
+++ b/db/schema_migrations/20230406060452
@@ -0,0 +1 @@
+95bad3e986fc44b20460c3e88b5195be1aa461e4a1e7d8427e9f731bca090f5c \ No newline at end of file
diff --git a/db/schema_migrations/20230406073847 b/db/schema_migrations/20230406073847
new file mode 100644
index 00000000000..8c854a9350c
--- /dev/null
+++ b/db/schema_migrations/20230406073847
@@ -0,0 +1 @@
+58b22a8ed1ea4f21b8a3b42ffdf4853c111d8c462ffbd97d5f7080e2c0587473 \ No newline at end of file
diff --git a/db/schema_migrations/20230406093640 b/db/schema_migrations/20230406093640
new file mode 100644
index 00000000000..3bc9003b2fa
--- /dev/null
+++ b/db/schema_migrations/20230406093640
@@ -0,0 +1 @@
+a49416e1b59ffb29bf2015c96e6bdf92428036862102fbbfa63284cc1da53c82 \ No newline at end of file
diff --git a/db/schema_migrations/20230406095544 b/db/schema_migrations/20230406095544
new file mode 100644
index 00000000000..56e891d65db
--- /dev/null
+++ b/db/schema_migrations/20230406095544
@@ -0,0 +1 @@
+3774f65f475364f3748502b035bdb3d18db0588a0f3ed45ca19cc5492ce754df \ No newline at end of file
diff --git a/db/schema_migrations/20230406134436 b/db/schema_migrations/20230406134436
new file mode 100644
index 00000000000..17d51bba6ce
--- /dev/null
+++ b/db/schema_migrations/20230406134436
@@ -0,0 +1 @@
+3b7a512959c9d109ee4b454693ebfafed624869c82fa64d92b3f780165e91feb \ No newline at end of file
diff --git a/db/schema_migrations/20230406150254 b/db/schema_migrations/20230406150254
new file mode 100644
index 00000000000..3e3463a76f9
--- /dev/null
+++ b/db/schema_migrations/20230406150254
@@ -0,0 +1 @@
+2b8aea677f295a0ab8f5ca9fbe7162156a06de89bd30ab5b252eb4460bcc7a2e \ No newline at end of file
diff --git a/db/schema_migrations/20230406150354 b/db/schema_migrations/20230406150354
new file mode 100644
index 00000000000..484af1e53ad
--- /dev/null
+++ b/db/schema_migrations/20230406150354
@@ -0,0 +1 @@
+2f1ef88ab1731b20821a86a74006ed0856d3c7baa5e197f72410aedb15cb2894 \ No newline at end of file
diff --git a/db/schema_migrations/20230406150454 b/db/schema_migrations/20230406150454
new file mode 100644
index 00000000000..f7237bd5ef2
--- /dev/null
+++ b/db/schema_migrations/20230406150454
@@ -0,0 +1 @@
+9966f807ce21016777a87d437355241cd8e5cacf2ccd143258ef0446e6f26e93 \ No newline at end of file
diff --git a/db/schema_migrations/20230407164616 b/db/schema_migrations/20230407164616
new file mode 100644
index 00000000000..94a275ef9c2
--- /dev/null
+++ b/db/schema_migrations/20230407164616
@@ -0,0 +1 @@
+ffc795945693f4856bd10224788ceb8305227ec296223c450af75a26a11f4811 \ No newline at end of file
diff --git a/db/schema_migrations/20230410092450 b/db/schema_migrations/20230410092450
new file mode 100644
index 00000000000..1b7b88026f5
--- /dev/null
+++ b/db/schema_migrations/20230410092450
@@ -0,0 +1 @@
+3a2c45579f8f566a2224afcab84b9f403e49379603e164f141a4dc89b5f4b512 \ No newline at end of file
diff --git a/db/schema_migrations/20230410111251 b/db/schema_migrations/20230410111251
new file mode 100644
index 00000000000..37a559a91e7
--- /dev/null
+++ b/db/schema_migrations/20230410111251
@@ -0,0 +1 @@
+4955274e8f504af6e06432bd195e64eb6c520118a50f7da19af2fcf5872459cf \ No newline at end of file
diff --git a/db/schema_migrations/20230411153310 b/db/schema_migrations/20230411153310
new file mode 100644
index 00000000000..14f317ccf08
--- /dev/null
+++ b/db/schema_migrations/20230411153310
@@ -0,0 +1 @@
+f4472433ac5b74296409a04790d64ed56551358c98428ebb2e5f15d2f3e2db31 \ No newline at end of file
diff --git a/db/schema_migrations/20230411171001 b/db/schema_migrations/20230411171001
new file mode 100644
index 00000000000..59b8c273f19
--- /dev/null
+++ b/db/schema_migrations/20230411171001
@@ -0,0 +1 @@
+7182fb09394b77f01346e68b104a5a8814f48fd63e763207f1b983faae10d805 \ No newline at end of file
diff --git a/db/schema_migrations/20230412013251 b/db/schema_migrations/20230412013251
new file mode 100644
index 00000000000..82f226a482d
--- /dev/null
+++ b/db/schema_migrations/20230412013251
@@ -0,0 +1 @@
+d81ed136179bbc28a6b8048de34674ced7c0ffa891a0045b108f891979bbc46c \ No newline at end of file
diff --git a/db/schema_migrations/20230412073614 b/db/schema_migrations/20230412073614
new file mode 100644
index 00000000000..bb6ac60b051
--- /dev/null
+++ b/db/schema_migrations/20230412073614
@@ -0,0 +1 @@
+984ebbfc7a8f6ba62715da2fe5ff46ab4030eb17baff69e82f56d1596c6f2e31 \ No newline at end of file
diff --git a/db/schema_migrations/20230412080242 b/db/schema_migrations/20230412080242
new file mode 100644
index 00000000000..a19a1b31b40
--- /dev/null
+++ b/db/schema_migrations/20230412080242
@@ -0,0 +1 @@
+fabf026dac1c69b291895dcc047bb03baf31376f72d289d798d537da1b4ac53a \ No newline at end of file
diff --git a/db/schema_migrations/20230412151659 b/db/schema_migrations/20230412151659
new file mode 100644
index 00000000000..96c304452d8
--- /dev/null
+++ b/db/schema_migrations/20230412151659
@@ -0,0 +1 @@
+dccf257ed6a503983fe54f8e06d37e4a64906e1dc9f7e970fdfab77f13eebedb \ No newline at end of file
diff --git a/db/schema_migrations/20230412152538 b/db/schema_migrations/20230412152538
new file mode 100644
index 00000000000..74f27a94bb5
--- /dev/null
+++ b/db/schema_migrations/20230412152538
@@ -0,0 +1 @@
+82f54822df6794347ba83f4c1a78540b7eb47c2deb059de143cd9a5b77f47f1f \ No newline at end of file
diff --git a/db/schema_migrations/20230412201517 b/db/schema_migrations/20230412201517
new file mode 100644
index 00000000000..8ecf8e9b941
--- /dev/null
+++ b/db/schema_migrations/20230412201517
@@ -0,0 +1 @@
+4719d78fb3b9b2ec197edfbc4e0f7d4e79b1ecb4e71e1c01a2f7c966e2d0aef1 \ No newline at end of file
diff --git a/db/schema_migrations/20230412201528 b/db/schema_migrations/20230412201528
new file mode 100644
index 00000000000..23631545870
--- /dev/null
+++ b/db/schema_migrations/20230412201528
@@ -0,0 +1 @@
+f98482c919a5a5ffc6284b4fe81d39d4ae46afc2c0bacb7e726425ee6f187bd7 \ No newline at end of file
diff --git a/db/schema_migrations/20230412201539 b/db/schema_migrations/20230412201539
new file mode 100644
index 00000000000..d1f9056904c
--- /dev/null
+++ b/db/schema_migrations/20230412201539
@@ -0,0 +1 @@
+8c05ce2cfd9d56e89035a74b4f86c4a96e00e804a4ab6710e9f8b5f878f49356 \ No newline at end of file
diff --git a/db/schema_migrations/20230412201549 b/db/schema_migrations/20230412201549
new file mode 100644
index 00000000000..84b0b0ebca5
--- /dev/null
+++ b/db/schema_migrations/20230412201549
@@ -0,0 +1 @@
+099cdc51e234b92894828e9f736ce557ae5102bf7b7b56014c31d4cf8ee97f37 \ No newline at end of file
diff --git a/db/schema_migrations/20230412201600 b/db/schema_migrations/20230412201600
new file mode 100644
index 00000000000..990a49c26a4
--- /dev/null
+++ b/db/schema_migrations/20230412201600
@@ -0,0 +1 @@
+271b199deb4ce20c30fa5fb0b07d5dea8819f79a8bf9dac0eba3121ae980d614 \ No newline at end of file
diff --git a/db/schema_migrations/20230412201611 b/db/schema_migrations/20230412201611
new file mode 100644
index 00000000000..1fd41d259be
--- /dev/null
+++ b/db/schema_migrations/20230412201611
@@ -0,0 +1 @@
+2ed349b5aee1df4644e16df2fecc247108585ea7c49989ed2c0812be48d5be1c \ No newline at end of file
diff --git a/db/schema_migrations/20230412201621 b/db/schema_migrations/20230412201621
new file mode 100644
index 00000000000..accd8b36021
--- /dev/null
+++ b/db/schema_migrations/20230412201621
@@ -0,0 +1 @@
+857a60f6916c045790dca8621c69601dbfb07f7524b8cdb6df6ac8a34ee1782b \ No newline at end of file
diff --git a/db/schema_migrations/20230412201632 b/db/schema_migrations/20230412201632
new file mode 100644
index 00000000000..1d72fb6b1aa
--- /dev/null
+++ b/db/schema_migrations/20230412201632
@@ -0,0 +1 @@
+2c20678f0e73f75706eb3e3b3115b38f3c313ccb77f2fdb7bd5ebc971c8093ef \ No newline at end of file
diff --git a/db/schema_migrations/20230412201642 b/db/schema_migrations/20230412201642
new file mode 100644
index 00000000000..743d67ab0e3
--- /dev/null
+++ b/db/schema_migrations/20230412201642
@@ -0,0 +1 @@
+c4b1137f6d3a111c230ad7f6d0d29c64d919daa6a8628e945152d12c15c421fb \ No newline at end of file
diff --git a/db/schema_migrations/20230412203234 b/db/schema_migrations/20230412203234
new file mode 100644
index 00000000000..8ab84c8424f
--- /dev/null
+++ b/db/schema_migrations/20230412203234
@@ -0,0 +1 @@
+4e5758e3112cad9b5a243b0123c365869b3d7a0de4800d0e0672ae82f71b8053 \ No newline at end of file
diff --git a/db/schema_migrations/20230412204143 b/db/schema_migrations/20230412204143
new file mode 100644
index 00000000000..b59f406ebbe
--- /dev/null
+++ b/db/schema_migrations/20230412204143
@@ -0,0 +1 @@
+12acd41d0550fcf363d3db4a093b64465d59004cbb07bfa0da073f0d7c4acf52 \ No newline at end of file
diff --git a/db/schema_migrations/20230412204201 b/db/schema_migrations/20230412204201
new file mode 100644
index 00000000000..12f879042ac
--- /dev/null
+++ b/db/schema_migrations/20230412204201
@@ -0,0 +1 @@
+f9466af9e29ae09542c1bd64cae923ed34f079d405a35704e55d01456eb6a519 \ No newline at end of file
diff --git a/db/schema_migrations/20230412204224 b/db/schema_migrations/20230412204224
new file mode 100644
index 00000000000..026b02e1cbd
--- /dev/null
+++ b/db/schema_migrations/20230412204224
@@ -0,0 +1 @@
+e2e596b67adcca6ccf0b714aafdadaffded1d11c1fc043aa13d9499552c37433 \ No newline at end of file
diff --git a/db/schema_migrations/20230412214119 b/db/schema_migrations/20230412214119
new file mode 100644
index 00000000000..80a8f21a960
--- /dev/null
+++ b/db/schema_migrations/20230412214119
@@ -0,0 +1 @@
+aac6aa036a97fa8331983085d8afad2dd870c80a687f6c0ed09476e438e15e76 \ No newline at end of file
diff --git a/db/schema_migrations/20230413012807 b/db/schema_migrations/20230413012807
new file mode 100644
index 00000000000..bfb25c1bc63
--- /dev/null
+++ b/db/schema_migrations/20230413012807
@@ -0,0 +1 @@
+7bf75dca15fcf1a73a9d201968ab85eb18983d1921a5bf7d0661083137de40c9 \ No newline at end of file
diff --git a/db/schema_migrations/20230413041917 b/db/schema_migrations/20230413041917
new file mode 100644
index 00000000000..f4c1f05a565
--- /dev/null
+++ b/db/schema_migrations/20230413041917
@@ -0,0 +1 @@
+c359118e94c992bd19d8f0bd10f702bc117c944663a1f84f3d678bada242c09d \ No newline at end of file
diff --git a/db/schema_migrations/20230413041918 b/db/schema_migrations/20230413041918
new file mode 100644
index 00000000000..373b9cfa66a
--- /dev/null
+++ b/db/schema_migrations/20230413041918
@@ -0,0 +1 @@
+86b631d6511154139835d508b4f694c604b0d6c12d553d107e4c206f034b8453 \ No newline at end of file
diff --git a/db/schema_migrations/20230413041919 b/db/schema_migrations/20230413041919
new file mode 100644
index 00000000000..6376268aaab
--- /dev/null
+++ b/db/schema_migrations/20230413041919
@@ -0,0 +1 @@
+8e05119e15d3a547db7844697ae5cbfc4760a4f329320acc8519a3ba9271ff29 \ No newline at end of file
diff --git a/db/schema_migrations/20230413041920 b/db/schema_migrations/20230413041920
new file mode 100644
index 00000000000..c2f9dd23919
--- /dev/null
+++ b/db/schema_migrations/20230413041920
@@ -0,0 +1 @@
+aebd6315b218f36b524d856dee5ce82d838693f689124b181fa6242dda1f80fc \ No newline at end of file
diff --git a/db/schema_migrations/20230413080906 b/db/schema_migrations/20230413080906
new file mode 100644
index 00000000000..20037d0f314
--- /dev/null
+++ b/db/schema_migrations/20230413080906
@@ -0,0 +1 @@
+44c6a5d0a7e3083dd5bf0afcfeff9cbd1061a3bb444504d11c44c38adeb75123 \ No newline at end of file
diff --git a/db/schema_migrations/20230413080918 b/db/schema_migrations/20230413080918
new file mode 100644
index 00000000000..866d0a817bc
--- /dev/null
+++ b/db/schema_migrations/20230413080918
@@ -0,0 +1 @@
+38e2f3cf25cc09d9f396de1fa0d299bde55daeb59c98d886df02db1d337a452f \ No newline at end of file
diff --git a/db/schema_migrations/20230413153140 b/db/schema_migrations/20230413153140
new file mode 100644
index 00000000000..97af4a6962f
--- /dev/null
+++ b/db/schema_migrations/20230413153140
@@ -0,0 +1 @@
+e78e74c9c068235ede55859b56bea671d9da5c3e74ac315e1b9391b6eef2649b \ No newline at end of file
diff --git a/db/schema_migrations/20230414075119 b/db/schema_migrations/20230414075119
new file mode 100644
index 00000000000..9c062a74af0
--- /dev/null
+++ b/db/schema_migrations/20230414075119
@@ -0,0 +1 @@
+be2246a2d36d87793007f1a0cf3eddface8de605eee40a93ba3985d26e6b924b \ No newline at end of file
diff --git a/db/schema_migrations/20230418154454 b/db/schema_migrations/20230418154454
new file mode 100644
index 00000000000..5607349f86f
--- /dev/null
+++ b/db/schema_migrations/20230418154454
@@ -0,0 +1 @@
+bd0a4ebd07f8d3f5741840bb60073f54a37ee23498266c65725f15d576b3f748 \ No newline at end of file
diff --git a/db/schema_migrations/20230418164957 b/db/schema_migrations/20230418164957
new file mode 100644
index 00000000000..e7fa549aba4
--- /dev/null
+++ b/db/schema_migrations/20230418164957
@@ -0,0 +1 @@
+80eb5db3db246ff6b2b857252cee05049cc0f7c09d0487175cfa90eeaf93f20c \ No newline at end of file
diff --git a/db/schema_migrations/20230419164438 b/db/schema_migrations/20230419164438
new file mode 100644
index 00000000000..56881cd904a
--- /dev/null
+++ b/db/schema_migrations/20230419164438
@@ -0,0 +1 @@
+859bc13b517efd3020d6192486e94fd9430387872fb01df77e43551c2a691fe6 \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index d0edfc515f9..1a7b84d8e0f 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -273,15 +273,6 @@ BEGIN
END;
$$;
-CREATE FUNCTION trigger_3207b8d0d6f3() RETURNS trigger
- LANGUAGE plpgsql
- AS $$
-BEGIN
- NEW."id_convert_to_bigint" := NEW."id";
- RETURN NEW;
-END;
-$$;
-
CREATE FUNCTION trigger_3dc62927cae8() RETURNS trigger
LANGUAGE plpgsql
AS $$
@@ -318,11 +309,11 @@ BEGIN
END;
$$;
-CREATE FUNCTION trigger_7f4fcd5aa322() RETURNS trigger
+CREATE FUNCTION trigger_909cf0a06094() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
- NEW."id_convert_to_bigint" := NEW."id";
+ NEW."awardable_id_convert_to_bigint" := NEW."awardable_id";
RETURN NEW;
END;
$$;
@@ -363,11 +354,11 @@ BEGIN
END;
$$;
-CREATE FUNCTION trigger_c7107f30d69d() RETURNS trigger
+CREATE FUNCTION trigger_cd1aeb22b34a() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
- NEW."id_convert_to_bigint" := NEW."id";
+ NEW."target_id_convert_to_bigint" := NEW."target_id";
RETURN NEW;
END;
$$;
@@ -10754,7 +10745,9 @@ CREATE TABLE abuse_reports (
links_to_spam text[] DEFAULT '{}'::text[] NOT NULL,
status smallint DEFAULT 1 NOT NULL,
resolved_at timestamp with time zone,
+ screenshot text,
CONSTRAINT abuse_reports_links_to_spam_length_check CHECK ((cardinality(links_to_spam) <= 20)),
+ CONSTRAINT check_4b0a5120e0 CHECK ((char_length(screenshot) <= 255)),
CONSTRAINT check_ab1260fa6c CHECK ((char_length(reported_from_url) <= 512))
);
@@ -10767,6 +10760,26 @@ CREATE SEQUENCE abuse_reports_id_seq
ALTER SEQUENCE abuse_reports_id_seq OWNED BY abuse_reports.id;
+CREATE TABLE abuse_trust_scores (
+ id bigint NOT NULL,
+ user_id bigint,
+ score double precision NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ source smallint NOT NULL,
+ correlation_id_value text,
+ CONSTRAINT check_77ca9551db CHECK ((char_length(correlation_id_value) <= 32))
+);
+
+CREATE SEQUENCE abuse_trust_scores_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE abuse_trust_scores_id_seq OWNED BY abuse_trust_scores.id;
+
CREATE TABLE achievements (
id bigint NOT NULL,
namespace_id bigint NOT NULL,
@@ -10845,6 +10858,38 @@ CREATE SEQUENCE agent_project_authorizations_id_seq
ALTER SEQUENCE agent_project_authorizations_id_seq OWNED BY agent_project_authorizations.id;
+CREATE TABLE agent_user_access_group_authorizations (
+ id bigint NOT NULL,
+ group_id bigint NOT NULL,
+ agent_id bigint NOT NULL,
+ config jsonb NOT NULL
+);
+
+CREATE SEQUENCE agent_user_access_group_authorizations_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE agent_user_access_group_authorizations_id_seq OWNED BY agent_user_access_group_authorizations.id;
+
+CREATE TABLE agent_user_access_project_authorizations (
+ id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ agent_id bigint NOT NULL,
+ config jsonb NOT NULL
+);
+
+CREATE SEQUENCE agent_user_access_project_authorizations_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE agent_user_access_project_authorizations_id_seq OWNED BY agent_user_access_project_authorizations.id;
+
CREATE TABLE alert_management_alert_assignees (
id bigint NOT NULL,
user_id bigint NOT NULL,
@@ -11751,6 +11796,14 @@ CREATE TABLE application_settings (
lock_memberships_to_saml boolean DEFAULT false NOT NULL,
gitlab_dedicated_instance boolean DEFAULT false NOT NULL,
update_runner_versions_enabled boolean DEFAULT true NOT NULL,
+ database_apdex_settings jsonb,
+ encrypted_openai_api_key bytea,
+ encrypted_openai_api_key_iv bytea,
+ database_max_running_batched_background_migrations integer DEFAULT 2 NOT NULL,
+ encrypted_product_analytics_configurator_connection_string bytea,
+ encrypted_product_analytics_configurator_connection_string_iv bytea,
+ silent_mode_enabled boolean DEFAULT false NOT NULL,
+ package_metadata_purl_types smallint[] DEFAULT '{}'::smallint[],
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)),
@@ -12124,6 +12177,25 @@ CREATE SEQUENCE audit_events_id_seq
ALTER SEQUENCE audit_events_id_seq OWNED BY audit_events.id;
+CREATE TABLE audit_events_instance_external_audit_event_destinations (
+ id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ destination_url text NOT NULL,
+ encrypted_verification_token bytea NOT NULL,
+ encrypted_verification_token_iv bytea NOT NULL,
+ CONSTRAINT check_4dc67167ce CHECK ((char_length(destination_url) <= 255))
+);
+
+CREATE SEQUENCE audit_events_instance_external_audit_event_destinations_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE audit_events_instance_external_audit_event_destinations_id_seq OWNED BY audit_events_instance_external_audit_event_destinations.id;
+
CREATE TABLE audit_events_streaming_event_type_filters (
id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
@@ -12213,7 +12285,8 @@ CREATE TABLE award_emoji (
awardable_id integer,
awardable_type character varying,
created_at timestamp without time zone,
- updated_at timestamp without time zone
+ updated_at timestamp without time zone,
+ awardable_id_convert_to_bigint bigint
);
CREATE SEQUENCE award_emoji_id_seq
@@ -12897,7 +12970,6 @@ CREATE SEQUENCE chat_teams_id_seq
ALTER SEQUENCE chat_teams_id_seq OWNED BY chat_teams.id;
CREATE TABLE ci_build_needs (
- id_convert_to_bigint integer DEFAULT 0 NOT NULL,
name text NOT NULL,
artifacts boolean DEFAULT true NOT NULL,
optional boolean DEFAULT false NOT NULL,
@@ -13018,8 +13090,9 @@ CREATE TABLE ci_builds (
scheduling_type smallint,
id bigint NOT NULL,
stage_id bigint,
- partition_id bigint DEFAULT 100 NOT NULL,
- CONSTRAINT check_1e2fbd1b39 CHECK ((lock_version IS NOT NULL))
+ partition_id bigint NOT NULL,
+ CONSTRAINT check_1e2fbd1b39 CHECK ((lock_version IS NOT NULL)),
+ CONSTRAINT partitioning_constraint CHECK ((partition_id = 100))
);
CREATE SEQUENCE ci_builds_id_seq
@@ -13046,9 +13119,8 @@ CREATE TABLE p_ci_builds_metadata (
id bigint NOT NULL,
runtime_runner_features jsonb DEFAULT '{}'::jsonb NOT NULL,
id_tokens jsonb DEFAULT '{}'::jsonb NOT NULL,
- partition_id bigint DEFAULT 100 NOT NULL,
- debug_trace_enabled boolean DEFAULT false NOT NULL,
- runner_machine_id bigint
+ partition_id bigint NOT NULL,
+ debug_trace_enabled boolean DEFAULT false NOT NULL
)
PARTITION BY LIST (partition_id);
@@ -13076,9 +13148,8 @@ CREATE TABLE ci_builds_metadata (
id bigint DEFAULT nextval('ci_builds_metadata_id_seq'::regclass) NOT NULL,
runtime_runner_features jsonb DEFAULT '{}'::jsonb NOT NULL,
id_tokens jsonb DEFAULT '{}'::jsonb NOT NULL,
- partition_id bigint DEFAULT 100 NOT NULL,
- debug_trace_enabled boolean DEFAULT false NOT NULL,
- runner_machine_id bigint
+ partition_id bigint NOT NULL,
+ debug_trace_enabled boolean DEFAULT false NOT NULL
);
ALTER TABLE ONLY p_ci_builds_metadata ATTACH PARTITION ci_builds_metadata FOR VALUES IN ('100');
@@ -13246,6 +13317,7 @@ CREATE TABLE ci_job_artifacts (
locked smallint DEFAULT 2,
partition_id bigint DEFAULT 100 NOT NULL,
accessibility smallint DEFAULT 0 NOT NULL,
+ file_final_path text,
CONSTRAINT check_27f0f6dbab CHECK ((file_store IS NOT NULL))
);
@@ -14470,12 +14542,12 @@ ALTER SEQUENCE clusters_kubernetes_namespaces_id_seq OWNED BY clusters_kubernete
CREATE TABLE commit_user_mentions (
id bigint NOT NULL,
- note_id integer NOT NULL,
+ note_id_convert_to_bigint integer DEFAULT 0 NOT NULL,
mentioned_users_ids integer[],
mentioned_projects_ids integer[],
mentioned_groups_ids integer[],
commit_id character varying NOT NULL,
- note_id_convert_to_bigint bigint DEFAULT 0 NOT NULL
+ note_id bigint NOT NULL
);
CREATE SEQUENCE commit_user_mentions_id_seq
@@ -15347,6 +15419,22 @@ CREATE SEQUENCE design_management_designs_versions_id_seq
ALTER SEQUENCE design_management_designs_versions_id_seq OWNED BY design_management_designs_versions.id;
+CREATE TABLE design_management_repositories (
+ id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL
+);
+
+CREATE SEQUENCE design_management_repositories_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE design_management_repositories_id_seq OWNED BY design_management_repositories.id;
+
CREATE TABLE design_management_versions (
id bigint NOT NULL,
sha bytea NOT NULL,
@@ -15367,11 +15455,11 @@ ALTER SEQUENCE design_management_versions_id_seq OWNED BY design_management_vers
CREATE TABLE design_user_mentions (
id bigint NOT NULL,
design_id integer NOT NULL,
- note_id integer NOT NULL,
+ note_id_convert_to_bigint integer DEFAULT 0 NOT NULL,
mentioned_users_ids integer[],
mentioned_projects_ids integer[],
mentioned_groups_ids integer[],
- note_id_convert_to_bigint bigint DEFAULT 0 NOT NULL
+ note_id bigint NOT NULL
);
CREATE SEQUENCE design_user_mentions_id_seq
@@ -15485,6 +15573,25 @@ CREATE SEQUENCE dora_daily_metrics_id_seq
ALTER SEQUENCE dora_daily_metrics_id_seq OWNED BY dora_daily_metrics.id;
+CREATE TABLE dora_performance_scores (
+ id bigint NOT NULL,
+ project_id bigint NOT NULL,
+ date date NOT NULL,
+ deployment_frequency smallint,
+ lead_time_for_changes smallint,
+ time_to_restore_service smallint,
+ change_failure_rate smallint
+);
+
+CREATE SEQUENCE dora_performance_scores_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE dora_performance_scores_id_seq OWNED BY dora_performance_scores.id;
+
CREATE TABLE draft_notes (
id bigint NOT NULL,
merge_request_id integer NOT NULL,
@@ -15698,11 +15805,11 @@ ALTER SEQUENCE epic_metrics_id_seq OWNED BY epic_metrics.id;
CREATE TABLE epic_user_mentions (
id bigint NOT NULL,
epic_id integer NOT NULL,
- note_id integer,
+ note_id_convert_to_bigint integer,
mentioned_users_ids integer[],
mentioned_projects_ids integer[],
mentioned_groups_ids integer[],
- note_id_convert_to_bigint bigint
+ note_id bigint
);
CREATE SEQUENCE epic_user_mentions_id_seq
@@ -15848,6 +15955,7 @@ CREATE TABLE events (
group_id bigint,
fingerprint bytea,
id bigint NOT NULL,
+ target_id_convert_to_bigint bigint,
CONSTRAINT check_97e06e05ad CHECK ((octet_length(fingerprint) <= 128))
);
@@ -17210,6 +17318,23 @@ CREATE TABLE issue_assignees (
issue_id integer NOT NULL
);
+CREATE TABLE issue_assignment_events (
+ id bigint NOT NULL,
+ user_id bigint,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ action smallint DEFAULT 1 NOT NULL
+);
+
+CREATE SEQUENCE issue_assignment_events_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE issue_assignment_events_id_seq OWNED BY issue_assignment_events.id;
+
CREATE TABLE issue_customer_relations_contacts (
id bigint NOT NULL,
issue_id bigint NOT NULL,
@@ -17324,11 +17449,11 @@ ALTER SEQUENCE issue_tracker_data_id_seq OWNED BY issue_tracker_data.id;
CREATE TABLE issue_user_mentions (
id bigint NOT NULL,
issue_id integer NOT NULL,
- note_id integer,
+ note_id_convert_to_bigint integer,
mentioned_users_ids integer[],
mentioned_projects_ids integer[],
mentioned_groups_ids integer[],
- note_id_convert_to_bigint bigint
+ note_id bigint
);
CREATE SEQUENCE issue_user_mentions_id_seq
@@ -17520,9 +17645,13 @@ CREATE TABLE jira_tracker_data (
vulnerabilities_enabled boolean DEFAULT false NOT NULL,
jira_issue_transition_automatic boolean DEFAULT false NOT NULL,
integration_id integer,
+ jira_issue_prefix text,
+ jira_issue_regex text,
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))
+ CONSTRAINT check_214cf6a48b CHECK ((char_length(project_key) <= 255)),
+ CONSTRAINT check_4cc5bbc801 CHECK ((char_length(jira_issue_prefix) <= 255)),
+ CONSTRAINT check_9863a0a5fd CHECK ((char_length(jira_issue_regex) <= 255))
);
CREATE SEQUENCE jira_tracker_data_id_seq
@@ -17793,7 +17922,6 @@ CREATE TABLE member_roles (
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
base_access_level integer NOT NULL,
- download_code boolean DEFAULT false,
read_code boolean DEFAULT false
);
@@ -17874,6 +18002,23 @@ CREATE SEQUENCE merge_request_assignees_id_seq
ALTER SEQUENCE merge_request_assignees_id_seq OWNED BY merge_request_assignees.id;
+CREATE TABLE merge_request_assignment_events (
+ id bigint NOT NULL,
+ user_id bigint,
+ merge_request_id bigint NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL,
+ action smallint DEFAULT 1 NOT NULL
+);
+
+CREATE SEQUENCE merge_request_assignment_events_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE merge_request_assignment_events_id_seq OWNED BY merge_request_assignment_events.id;
+
CREATE TABLE merge_request_blocks (
id bigint NOT NULL,
blocking_merge_request_id integer NOT NULL,
@@ -18048,7 +18193,6 @@ CREATE SEQUENCE merge_request_diffs_id_seq
ALTER SEQUENCE merge_request_diffs_id_seq OWNED BY merge_request_diffs.id;
CREATE TABLE merge_request_metrics (
- id_convert_to_bigint integer DEFAULT 0 NOT NULL,
merge_request_id integer NOT NULL,
latest_build_started_at timestamp without time zone,
latest_build_finished_at timestamp without time zone,
@@ -18121,11 +18265,11 @@ ALTER SEQUENCE merge_request_reviewers_id_seq OWNED BY merge_request_reviewers.i
CREATE TABLE merge_request_user_mentions (
id bigint NOT NULL,
merge_request_id integer NOT NULL,
- note_id integer,
+ note_id_convert_to_bigint integer,
mentioned_users_ids integer[],
mentioned_projects_ids integer[],
mentioned_groups_ids integer[],
- note_id_convert_to_bigint bigint
+ note_id bigint
);
CREATE SEQUENCE merge_request_user_mentions_id_seq
@@ -18390,14 +18534,18 @@ 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,
name text,
- CONSTRAINT check_25e6c65051 CHECK ((char_length(name) <= 255))
+ package_id bigint,
+ eid uuid,
+ project_id bigint,
+ internal_id bigint,
+ CONSTRAINT check_25e6c65051 CHECK ((char_length(name) <= 255)),
+ CONSTRAINT check_cd160587d4 CHECK ((eid IS NOT NULL))
);
CREATE SEQUENCE ml_candidates_id_seq
@@ -18576,7 +18724,10 @@ CREATE TABLE namespace_root_storage_statistics (
dependency_proxy_size bigint DEFAULT 0 NOT NULL,
notification_level smallint DEFAULT 100 NOT NULL,
container_registry_size bigint DEFAULT 0 NOT NULL,
- registry_size_estimated boolean DEFAULT false NOT NULL
+ registry_size_estimated boolean DEFAULT false NOT NULL,
+ public_forks_storage_size bigint DEFAULT 0 NOT NULL,
+ internal_forks_storage_size bigint DEFAULT 0 NOT NULL,
+ private_forks_storage_size bigint DEFAULT 0 NOT NULL
);
CREATE TABLE namespace_settings (
@@ -18612,6 +18763,7 @@ CREATE TABLE namespace_settings (
allow_runner_registration_token boolean DEFAULT true NOT NULL,
unique_project_download_limit_alertlist integer[] DEFAULT '{}'::integer[] NOT NULL,
emails_enabled boolean DEFAULT true NOT NULL,
+ code_suggestions 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))
@@ -18730,7 +18882,7 @@ ALTER SEQUENCE namespaces_sync_events_id_seq OWNED BY namespaces_sync_events.id;
CREATE TABLE note_diff_files (
id integer NOT NULL,
- diff_note_id integer NOT NULL,
+ diff_note_id_convert_to_bigint integer DEFAULT 0 NOT NULL,
diff text NOT NULL,
new_file boolean NOT NULL,
renamed_file boolean NOT NULL,
@@ -18739,7 +18891,7 @@ CREATE TABLE note_diff_files (
b_mode character varying NOT NULL,
new_path text NOT NULL,
old_path text NOT NULL,
- diff_note_id_convert_to_bigint bigint DEFAULT 0 NOT NULL
+ diff_note_id bigint NOT NULL
);
CREATE SEQUENCE note_diff_files_id_seq
@@ -19225,7 +19377,7 @@ CREATE TABLE packages_debian_group_component_files (
compression_type smallint,
file_store smallint DEFAULT 1 NOT NULL,
file text NOT NULL,
- file_md5 bytea NOT NULL,
+ file_md5 bytea,
file_sha256 bytea NOT NULL,
CONSTRAINT check_839e1685bc CHECK ((char_length(file) <= 255))
);
@@ -19350,7 +19502,7 @@ CREATE TABLE packages_debian_project_component_files (
compression_type smallint,
file_store smallint DEFAULT 1 NOT NULL,
file text NOT NULL,
- file_md5 bytea NOT NULL,
+ file_md5 bytea,
file_sha256 bytea NOT NULL,
CONSTRAINT check_e5af03fa2d CHECK ((char_length(file) <= 255))
);
@@ -19492,25 +19644,6 @@ CREATE SEQUENCE packages_dependency_links_id_seq
ALTER SEQUENCE packages_dependency_links_id_seq OWNED BY packages_dependency_links.id;
-CREATE TABLE packages_events (
- id bigint NOT NULL,
- event_type smallint NOT NULL,
- event_scope smallint NOT NULL,
- originator_type smallint NOT NULL,
- originator bigint,
- created_at timestamp with time zone NOT NULL,
- package_id bigint
-);
-
-CREATE SEQUENCE packages_events_id_seq
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
-
-ALTER SEQUENCE packages_events_id_seq OWNED BY packages_events.id;
-
CREATE TABLE packages_helm_file_metadata (
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
@@ -19546,6 +19679,28 @@ CREATE TABLE packages_npm_metadata (
CONSTRAINT chk_rails_e5cbc301ae CHECK ((char_length((package_json)::text) < 20000))
);
+CREATE TABLE packages_npm_metadata_caches (
+ id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ last_downloaded_at timestamp with time zone,
+ project_id bigint,
+ file_store integer DEFAULT 1,
+ size integer NOT NULL,
+ file text NOT NULL,
+ package_name text NOT NULL,
+ CONSTRAINT check_57aa07a4b2 CHECK ((char_length(file) <= 255))
+);
+
+CREATE SEQUENCE packages_npm_metadata_caches_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE packages_npm_metadata_caches_id_seq OWNED BY packages_npm_metadata_caches.id;
+
CREATE TABLE packages_nuget_dependency_link_metadata (
dependency_link_id bigint NOT NULL,
target_framework text NOT NULL,
@@ -19782,7 +19937,9 @@ CREATE TABLE pages_deployments (
file_count integer NOT NULL,
file_sha256 bytea NOT NULL,
size bigint,
+ root_directory text DEFAULT 'public'::text,
CONSTRAINT check_5f9132a958 CHECK ((size IS NOT NULL)),
+ CONSTRAINT check_7e938c810a CHECK ((char_length(root_directory) <= 255)),
CONSTRAINT check_f0fe8032dd CHECK ((char_length(file) <= 255))
);
@@ -19974,7 +20131,8 @@ CREATE TABLE plan_limits (
enforcement_limit integer DEFAULT 0 NOT NULL,
notification_limit integer DEFAULT 0 NOT NULL,
dashboard_limit_enabled_at timestamp with time zone,
- web_hook_calls integer DEFAULT 0 NOT NULL
+ web_hook_calls integer DEFAULT 0 NOT NULL,
+ project_access_token_limit integer DEFAULT 0 NOT NULL
);
CREATE SEQUENCE plan_limits_id_seq
@@ -20187,8 +20345,10 @@ CREATE VIEW postgres_foreign_keys AS
referenced_cols.referenced_columns,
pg_constraint.confdeltype AS on_delete_action,
pg_constraint.confupdtype AS on_update_action,
- (pg_constraint.coninhcount > 0) AS is_inherited
- FROM ((((((pg_constraint
+ (pg_constraint.coninhcount > 0) AS is_inherited,
+ pg_constraint.convalidated AS is_valid,
+ partitioned_parent_oids.parent_oid
+ FROM (((((((pg_constraint
JOIN pg_class constrained_table ON ((constrained_table.oid = pg_constraint.conrelid)))
JOIN pg_class referenced_table ON ((referenced_table.oid = pg_constraint.confrelid)))
JOIN pg_namespace constrained_namespace ON ((constrained_table.relnamespace = constrained_namespace.oid)))
@@ -20199,6 +20359,12 @@ CREATE VIEW postgres_foreign_keys AS
CROSS JOIN LATERAL ( SELECT array_agg(pg_attribute.attname ORDER BY confkey.idx) AS array_agg
FROM (unnest(pg_constraint.confkey) WITH ORDINALITY confkey(attnum, idx)
JOIN pg_attribute ON (((pg_attribute.attnum = confkey.attnum) AND (pg_attribute.attrelid = referenced_table.oid))))) referenced_cols(referenced_columns))
+ LEFT JOIN LATERAL ( SELECT pg_depend.refobjid AS parent_oid
+ FROM pg_depend
+ WHERE ((pg_depend.objid = pg_constraint.oid) AND (pg_depend.deptype = 'P'::"char") AND (pg_depend.refobjid IN ( SELECT pg_constraint_1.oid
+ FROM pg_constraint pg_constraint_1
+ WHERE (pg_constraint_1.contype = 'f'::"char"))))
+ LIMIT 1) partitioned_parent_oids(parent_oid) ON (true))
WHERE (pg_constraint.contype = 'f'::"char");
CREATE VIEW postgres_index_bloat_estimates AS
@@ -20961,11 +21127,14 @@ CREATE TABLE project_settings (
emails_enabled boolean DEFAULT true NOT NULL,
pages_unique_domain_enabled boolean DEFAULT false NOT NULL,
pages_unique_domain text,
+ runner_registration_enabled boolean DEFAULT true,
+ product_analytics_instrumentation_key text,
CONSTRAINT check_1a30456322 CHECK ((char_length(pages_unique_domain) <= 63)),
CONSTRAINT check_2981f15877 CHECK ((char_length(jitsu_key) <= 100)),
CONSTRAINT check_3a03e7557a CHECK ((char_length(previous_default_branch) <= 4096)),
CONSTRAINT check_3ca5cbffe6 CHECK ((char_length(issue_branch_template) <= 255)),
CONSTRAINT check_67292e4b99 CHECK ((char_length(mirror_branch_regex) <= 255)),
+ CONSTRAINT check_acb7fad2f9 CHECK ((char_length(product_analytics_instrumentation_key) <= 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))
@@ -21330,7 +21499,8 @@ CREATE TABLE protected_environment_deploy_access_levels (
protected_environment_id integer NOT NULL,
user_id integer,
group_id integer,
- group_inheritance_type smallint DEFAULT 0 NOT NULL
+ group_inheritance_type smallint DEFAULT 0 NOT NULL,
+ CONSTRAINT check_deploy_access_levels_user_group_access_level_any_not_null CHECK ((num_nonnulls(user_id, group_id, access_level) = 1))
);
CREATE SEQUENCE protected_environment_deploy_access_levels_id_seq
@@ -21686,6 +21856,25 @@ CREATE SEQUENCE resource_label_events_id_seq
ALTER SEQUENCE resource_label_events_id_seq OWNED BY resource_label_events.id;
+CREATE TABLE resource_link_events (
+ id bigint NOT NULL,
+ action smallint NOT NULL,
+ user_id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ child_work_item_id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ system_note_metadata_id bigint
+);
+
+CREATE SEQUENCE resource_link_events_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE resource_link_events_id_seq OWNED BY resource_link_events.id;
+
CREATE TABLE resource_milestone_events (
id bigint NOT NULL,
user_id bigint,
@@ -21947,7 +22136,8 @@ CREATE TABLE scan_result_policies (
updated_at timestamp with time zone NOT NULL,
orchestration_policy_idx smallint NOT NULL,
license_states text[] DEFAULT '{}'::text[],
- match_on_inclusion boolean
+ match_on_inclusion boolean,
+ role_approvers integer[] DEFAULT '{}'::integer[]
);
CREATE SEQUENCE scan_result_policies_id_seq
@@ -21959,6 +22149,28 @@ CREATE SEQUENCE scan_result_policies_id_seq
ALTER SEQUENCE scan_result_policies_id_seq OWNED BY scan_result_policies.id;
+CREATE TABLE schema_inconsistencies (
+ id bigint NOT NULL,
+ issue_id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ object_name text NOT NULL,
+ table_name text NOT NULL,
+ valitador_name text NOT NULL,
+ CONSTRAINT check_120b6c86d0 CHECK ((char_length(valitador_name) <= 63)),
+ CONSTRAINT check_a0411f31fd CHECK ((char_length(object_name) <= 63)),
+ CONSTRAINT check_d96408dfd2 CHECK ((char_length(table_name) <= 63))
+);
+
+CREATE SEQUENCE schema_inconsistencies_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE schema_inconsistencies_id_seq OWNED BY schema_inconsistencies.id;
+
CREATE TABLE schema_migrations (
version character varying NOT NULL,
finished_at timestamp with time zone DEFAULT now()
@@ -22000,6 +22212,49 @@ 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 search_indices (
+ id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ bucket_number integer,
+ path text NOT NULL,
+ type text NOT NULL,
+ number_of_shards integer DEFAULT 2 NOT NULL,
+ number_of_replicas integer DEFAULT 1 NOT NULL,
+ CONSTRAINT check_75c11e6d37 CHECK ((char_length(type) <= 255)),
+ CONSTRAINT check_ab47e7ff85 CHECK ((char_length(path) <= 255))
+);
+
+CREATE SEQUENCE search_indices_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE search_indices_id_seq OWNED BY search_indices.id;
+
+CREATE TABLE search_namespace_index_assignments (
+ id bigint NOT NULL,
+ namespace_id bigint,
+ search_index_id bigint NOT NULL,
+ namespace_id_non_nullable bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ namespace_id_hashed integer NOT NULL,
+ index_type text NOT NULL,
+ CONSTRAINT check_64cf4e670a CHECK ((char_length(index_type) <= 255))
+);
+
+CREATE SEQUENCE search_namespace_index_assignments_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+ALTER SEQUENCE search_namespace_index_assignments_id_seq OWNED BY search_namespace_index_assignments.id;
+
CREATE SEQUENCE security_findings_id_seq
START WITH 1
INCREMENT BY 1
@@ -22141,7 +22396,6 @@ CREATE SEQUENCE self_managed_prometheus_alert_events_id_seq
ALTER SEQUENCE self_managed_prometheus_alert_events_id_seq OWNED BY self_managed_prometheus_alert_events.id;
CREATE TABLE sent_notifications (
- id integer NOT NULL,
project_id integer,
noteable_id integer,
noteable_type character varying,
@@ -22152,7 +22406,7 @@ CREATE TABLE sent_notifications (
note_type character varying,
"position" text,
in_reply_to_discussion_id character varying,
- id_convert_to_bigint bigint DEFAULT 0 NOT NULL
+ id bigint NOT NULL
);
CREATE SEQUENCE sent_notifications_id_seq
@@ -22191,6 +22445,19 @@ CREATE TABLE serverless_domain_cluster (
certificate text
);
+CREATE TABLE service_desk_custom_email_credentials (
+ project_id bigint NOT NULL,
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ smtp_port integer,
+ smtp_address text,
+ encrypted_smtp_username bytea,
+ encrypted_smtp_username_iv bytea,
+ encrypted_smtp_password bytea,
+ encrypted_smtp_password_iv bytea,
+ CONSTRAINT check_6dd11e956a CHECK ((char_length(smtp_address) <= 255))
+);
+
CREATE TABLE service_desk_custom_email_verifications (
project_id bigint NOT NULL,
triggerer_id bigint,
@@ -22351,11 +22618,11 @@ CREATE TABLE snippet_statistics (
CREATE TABLE snippet_user_mentions (
id bigint NOT NULL,
snippet_id integer NOT NULL,
- note_id integer,
+ note_id_convert_to_bigint integer,
mentioned_users_ids integer[],
mentioned_projects_ids integer[],
mentioned_groups_ids integer[],
- note_id_convert_to_bigint bigint
+ note_id bigint
);
CREATE SEQUENCE snippet_user_mentions_id_seq
@@ -22584,7 +22851,7 @@ ALTER SEQUENCE subscriptions_id_seq OWNED BY subscriptions.id;
CREATE TABLE suggestions (
id bigint NOT NULL,
- note_id integer NOT NULL,
+ note_id_convert_to_bigint integer DEFAULT 0 NOT NULL,
relative_order smallint NOT NULL,
applied boolean DEFAULT false NOT NULL,
commit_id character varying,
@@ -22593,7 +22860,7 @@ CREATE TABLE suggestions (
lines_above integer DEFAULT 0 NOT NULL,
lines_below integer DEFAULT 0 NOT NULL,
outdated boolean DEFAULT false NOT NULL,
- note_id_convert_to_bigint bigint DEFAULT 0 NOT NULL
+ note_id bigint NOT NULL
);
CREATE SEQUENCE suggestions_id_seq
@@ -22721,7 +22988,8 @@ CREATE TABLE terraform_states (
uuid character varying(32) NOT NULL,
name character varying(255) NOT NULL,
versioning_enabled boolean DEFAULT true NOT NULL,
- deleted_at timestamp with time zone
+ deleted_at timestamp with time zone,
+ activerecord_lock_version integer DEFAULT 0 NOT NULL
);
CREATE SEQUENCE terraform_states_id_seq
@@ -23216,6 +23484,9 @@ CREATE TABLE user_preferences (
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,
+ pass_user_identities_to_ci_jwt 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))
);
@@ -23359,7 +23630,7 @@ CREATE TABLE users (
last_name character varying(255),
static_object_token character varying(255),
role smallint,
- user_type smallint,
+ user_type smallint DEFAULT 0,
static_object_token_encrypted text,
otp_secret_expires_at timestamp with time zone,
onboarding_in_progress boolean DEFAULT false NOT NULL,
@@ -23426,7 +23697,8 @@ CREATE TABLE users_statistics (
with_highest_role_owner integer DEFAULT 0 NOT NULL,
bots integer DEFAULT 0 NOT NULL,
blocked integer DEFAULT 0 NOT NULL,
- with_highest_role_minimal_access integer DEFAULT 0 NOT NULL
+ with_highest_role_minimal_access integer DEFAULT 0 NOT NULL,
+ with_highest_role_guest_with_custom_role integer DEFAULT 0 NOT NULL
);
CREATE SEQUENCE users_statistics_id_seq
@@ -23928,7 +24200,6 @@ CREATE TABLE vulnerability_state_transitions (
comment text,
dismissal_reason smallint,
state_changed_at_pipeline_id bigint,
- CONSTRAINT check_d1ca8ec043 CHECK ((from_state <> to_state)),
CONSTRAINT check_fe2eb6a0f3 CHECK ((char_length(comment) <= 50000))
);
@@ -23969,11 +24240,11 @@ ALTER SEQUENCE vulnerability_statistics_id_seq OWNED BY vulnerability_statistics
CREATE TABLE vulnerability_user_mentions (
id bigint NOT NULL,
vulnerability_id bigint NOT NULL,
- note_id integer,
+ note_id_convert_to_bigint integer,
mentioned_users_ids integer[],
mentioned_projects_ids integer[],
mentioned_groups_ids integer[],
- note_id_convert_to_bigint bigint
+ note_id bigint
);
CREATE SEQUENCE vulnerability_user_mentions_id_seq
@@ -24344,6 +24615,8 @@ ALTER SEQUENCE zoom_meetings_id_seq OWNED BY zoom_meetings.id;
ALTER TABLE ONLY abuse_reports ALTER COLUMN id SET DEFAULT nextval('abuse_reports_id_seq'::regclass);
+ALTER TABLE ONLY abuse_trust_scores ALTER COLUMN id SET DEFAULT nextval('abuse_trust_scores_id_seq'::regclass);
+
ALTER TABLE ONLY achievements ALTER COLUMN id SET DEFAULT nextval('achievements_id_seq'::regclass);
ALTER TABLE ONLY agent_activity_events ALTER COLUMN id SET DEFAULT nextval('agent_activity_events_id_seq'::regclass);
@@ -24352,6 +24625,10 @@ ALTER TABLE ONLY agent_group_authorizations ALTER COLUMN id SET DEFAULT nextval(
ALTER TABLE ONLY agent_project_authorizations ALTER COLUMN id SET DEFAULT nextval('agent_project_authorizations_id_seq'::regclass);
+ALTER TABLE ONLY agent_user_access_group_authorizations ALTER COLUMN id SET DEFAULT nextval('agent_user_access_group_authorizations_id_seq'::regclass);
+
+ALTER TABLE ONLY agent_user_access_project_authorizations ALTER COLUMN id SET DEFAULT nextval('agent_user_access_project_authorizations_id_seq'::regclass);
+
ALTER TABLE ONLY alert_management_alert_assignees ALTER COLUMN id SET DEFAULT nextval('alert_management_alert_assignees_id_seq'::regclass);
ALTER TABLE ONLY alert_management_alert_metric_images ALTER COLUMN id SET DEFAULT nextval('alert_management_alert_metric_images_id_seq'::regclass);
@@ -24416,6 +24693,8 @@ ALTER TABLE ONLY audit_events ALTER COLUMN id SET DEFAULT nextval('audit_events_
ALTER TABLE ONLY audit_events_external_audit_event_destinations ALTER COLUMN id SET DEFAULT nextval('audit_events_external_audit_event_destinations_id_seq'::regclass);
+ALTER TABLE ONLY audit_events_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_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);
@@ -24686,6 +24965,8 @@ ALTER TABLE ONLY design_management_designs ALTER COLUMN id SET DEFAULT nextval('
ALTER TABLE ONLY design_management_designs_versions ALTER COLUMN id SET DEFAULT nextval('design_management_designs_versions_id_seq'::regclass);
+ALTER TABLE ONLY design_management_repositories ALTER COLUMN id SET DEFAULT nextval('design_management_repositories_id_seq'::regclass);
+
ALTER TABLE ONLY design_management_versions ALTER COLUMN id SET DEFAULT nextval('design_management_versions_id_seq'::regclass);
ALTER TABLE ONLY design_user_mentions ALTER COLUMN id SET DEFAULT nextval('design_user_mentions_id_seq'::regclass);
@@ -24700,6 +24981,8 @@ ALTER TABLE ONLY dora_configurations ALTER COLUMN id SET DEFAULT nextval('dora_c
ALTER TABLE ONLY dora_daily_metrics ALTER COLUMN id SET DEFAULT nextval('dora_daily_metrics_id_seq'::regclass);
+ALTER TABLE ONLY dora_performance_scores ALTER COLUMN id SET DEFAULT nextval('dora_performance_scores_id_seq'::regclass);
+
ALTER TABLE ONLY draft_notes ALTER COLUMN id SET DEFAULT nextval('draft_notes_id_seq'::regclass);
ALTER TABLE ONLY elastic_index_settings ALTER COLUMN id SET DEFAULT nextval('elastic_index_settings_id_seq'::regclass);
@@ -24860,6 +25143,8 @@ ALTER TABLE ONLY issuable_severities ALTER COLUMN id SET DEFAULT nextval('issuab
ALTER TABLE ONLY issuable_slas ALTER COLUMN id SET DEFAULT nextval('issuable_slas_id_seq'::regclass);
+ALTER TABLE ONLY issue_assignment_events ALTER COLUMN id SET DEFAULT nextval('issue_assignment_events_id_seq'::regclass);
+
ALTER TABLE ONLY issue_customer_relations_contacts ALTER COLUMN id SET DEFAULT nextval('issue_customer_relations_contacts_id_seq'::regclass);
ALTER TABLE ONLY issue_email_participants ALTER COLUMN id SET DEFAULT nextval('issue_email_participants_id_seq'::regclass);
@@ -24920,6 +25205,8 @@ ALTER TABLE ONLY members ALTER COLUMN id SET DEFAULT nextval('members_id_seq'::r
ALTER TABLE ONLY merge_request_assignees ALTER COLUMN id SET DEFAULT nextval('merge_request_assignees_id_seq'::regclass);
+ALTER TABLE ONLY merge_request_assignment_events ALTER COLUMN id SET DEFAULT nextval('merge_request_assignment_events_id_seq'::regclass);
+
ALTER TABLE ONLY merge_request_blocks ALTER COLUMN id SET DEFAULT nextval('merge_request_blocks_id_seq'::regclass);
ALTER TABLE ONLY merge_request_cleanup_schedules ALTER COLUMN merge_request_id SET DEFAULT nextval('merge_request_cleanup_schedules_merge_request_id_seq'::regclass);
@@ -25048,10 +25335,10 @@ ALTER TABLE ONLY packages_dependencies ALTER COLUMN id SET DEFAULT nextval('pack
ALTER TABLE ONLY packages_dependency_links ALTER COLUMN id SET DEFAULT nextval('packages_dependency_links_id_seq'::regclass);
-ALTER TABLE ONLY packages_events ALTER COLUMN id SET DEFAULT nextval('packages_events_id_seq'::regclass);
-
ALTER TABLE ONLY packages_maven_metadata ALTER COLUMN id SET DEFAULT nextval('packages_maven_metadata_id_seq'::regclass);
+ALTER TABLE ONLY packages_npm_metadata_caches ALTER COLUMN id SET DEFAULT nextval('packages_npm_metadata_caches_id_seq'::regclass);
+
ALTER TABLE ONLY packages_package_file_build_infos ALTER COLUMN id SET DEFAULT nextval('packages_package_file_build_infos_id_seq'::regclass);
ALTER TABLE ONLY packages_package_files ALTER COLUMN id SET DEFAULT nextval('packages_package_files_id_seq'::regclass);
@@ -25202,6 +25489,8 @@ ALTER TABLE ONLY resource_iteration_events ALTER COLUMN id SET DEFAULT nextval('
ALTER TABLE ONLY resource_label_events ALTER COLUMN id SET DEFAULT nextval('resource_label_events_id_seq'::regclass);
+ALTER TABLE ONLY resource_link_events ALTER COLUMN id SET DEFAULT nextval('resource_link_events_id_seq'::regclass);
+
ALTER TABLE ONLY resource_milestone_events ALTER COLUMN id SET DEFAULT nextval('resource_milestone_events_id_seq'::regclass);
ALTER TABLE ONLY resource_state_events ALTER COLUMN id SET DEFAULT nextval('resource_state_events_id_seq'::regclass);
@@ -25230,10 +25519,16 @@ ALTER TABLE ONLY sbom_vulnerable_component_versions ALTER COLUMN id SET DEFAULT
ALTER TABLE ONLY scan_result_policies ALTER COLUMN id SET DEFAULT nextval('scan_result_policies_id_seq'::regclass);
+ALTER TABLE ONLY schema_inconsistencies ALTER COLUMN id SET DEFAULT nextval('schema_inconsistencies_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);
+ALTER TABLE ONLY search_indices ALTER COLUMN id SET DEFAULT nextval('search_indices_id_seq'::regclass);
+
+ALTER TABLE ONLY search_namespace_index_assignments ALTER COLUMN id SET DEFAULT nextval('search_namespace_index_assignments_id_seq'::regclass);
+
ALTER TABLE ONLY security_findings ALTER COLUMN id SET DEFAULT nextval('security_findings_id_seq'::regclass);
ALTER TABLE ONLY security_orchestration_policy_configurations ALTER COLUMN id SET DEFAULT nextval('security_orchestration_policy_configurations_id_seq'::regclass);
@@ -26025,6 +26320,9 @@ ALTER TABLE ONLY gitlab_partitions_static.product_analytics_events_experimental_
ALTER TABLE ONLY abuse_reports
ADD CONSTRAINT abuse_reports_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY abuse_trust_scores
+ ADD CONSTRAINT abuse_trust_scores_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY achievements
ADD CONSTRAINT achievements_pkey PRIMARY KEY (id);
@@ -26037,6 +26335,12 @@ ALTER TABLE ONLY agent_group_authorizations
ALTER TABLE ONLY agent_project_authorizations
ADD CONSTRAINT agent_project_authorizations_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY agent_user_access_group_authorizations
+ ADD CONSTRAINT agent_user_access_group_authorizations_pkey PRIMARY KEY (id);
+
+ALTER TABLE ONLY agent_user_access_project_authorizations
+ ADD CONSTRAINT agent_user_access_project_authorizations_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY alert_management_alert_assignees
ADD CONSTRAINT alert_management_alert_assignees_pkey PRIMARY KEY (id);
@@ -26142,6 +26446,9 @@ 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_instance_external_audit_event_destinations
+ ADD CONSTRAINT audit_events_instance_external_audit_event_destinations_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY audit_events
ADD CONSTRAINT audit_events_pkey PRIMARY KEY (id, created_at);
@@ -26262,6 +26569,9 @@ ALTER TABLE ONLY chat_teams
ALTER TABLE vulnerability_scanners
ADD CONSTRAINT check_37608c9db5 CHECK ((char_length(vendor) <= 255)) NOT VALID;
+ALTER TABLE ci_job_artifacts
+ ADD CONSTRAINT check_9f04410cf4 CHECK ((char_length(file_final_path) <= 1024)) NOT VALID;
+
ALTER TABLE sprints
ADD CONSTRAINT check_ccd8a1eae0 CHECK ((start_date IS NOT NULL)) NOT VALID;
@@ -26640,6 +26950,9 @@ ALTER TABLE ONLY design_management_designs
ALTER TABLE ONLY design_management_designs_versions
ADD CONSTRAINT design_management_designs_versions_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY design_management_repositories
+ ADD CONSTRAINT design_management_repositories_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY design_management_versions
ADD CONSTRAINT design_management_versions_pkey PRIMARY KEY (id);
@@ -26661,6 +26974,9 @@ ALTER TABLE ONLY dora_configurations
ALTER TABLE ONLY dora_daily_metrics
ADD CONSTRAINT dora_daily_metrics_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY dora_performance_scores
+ ADD CONSTRAINT dora_performance_scores_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY draft_notes
ADD CONSTRAINT draft_notes_pkey PRIMARY KEY (id);
@@ -26928,6 +27244,9 @@ ALTER TABLE ONLY issuable_slas
ALTER TABLE ONLY issue_assignees
ADD CONSTRAINT issue_assignees_pkey PRIMARY KEY (issue_id, user_id);
+ALTER TABLE ONLY issue_assignment_events
+ ADD CONSTRAINT issue_assignment_events_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY issue_customer_relations_contacts
ADD CONSTRAINT issue_customer_relations_contacts_pkey PRIMARY KEY (id);
@@ -27027,6 +27346,9 @@ ALTER TABLE ONLY members
ALTER TABLE ONLY merge_request_assignees
ADD CONSTRAINT merge_request_assignees_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY merge_request_assignment_events
+ ADD CONSTRAINT merge_request_assignment_events_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY merge_request_blocks
ADD CONSTRAINT merge_request_blocks_pkey PRIMARY KEY (id);
@@ -27202,7 +27524,7 @@ ALTER TABLE ONLY operations_user_lists
ADD CONSTRAINT operations_user_lists_pkey PRIMARY KEY (id);
ALTER TABLE ONLY p_ci_runner_machine_builds
- ADD CONSTRAINT p_ci_runner_machine_builds_pkey PRIMARY KEY (partition_id, build_id);
+ ADD CONSTRAINT p_ci_runner_machine_builds_pkey PRIMARY KEY (build_id, partition_id);
ALTER TABLE ONLY packages_build_infos
ADD CONSTRAINT packages_build_infos_pkey PRIMARY KEY (id);
@@ -27264,15 +27586,15 @@ ALTER TABLE ONLY packages_dependencies
ALTER TABLE ONLY packages_dependency_links
ADD CONSTRAINT packages_dependency_links_pkey PRIMARY KEY (id);
-ALTER TABLE ONLY packages_events
- ADD CONSTRAINT packages_events_pkey PRIMARY KEY (id);
-
ALTER TABLE ONLY packages_helm_file_metadata
ADD CONSTRAINT packages_helm_file_metadata_pkey PRIMARY KEY (package_file_id);
ALTER TABLE ONLY packages_maven_metadata
ADD CONSTRAINT packages_maven_metadata_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY packages_npm_metadata_caches
+ ADD CONSTRAINT packages_npm_metadata_caches_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY packages_npm_metadata
ADD CONSTRAINT packages_npm_metadata_pkey PRIMARY KEY (package_id);
@@ -27552,6 +27874,9 @@ ALTER TABLE ONLY resource_iteration_events
ALTER TABLE ONLY resource_label_events
ADD CONSTRAINT resource_label_events_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY resource_link_events
+ ADD CONSTRAINT resource_link_events_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY resource_milestone_events
ADD CONSTRAINT resource_milestone_events_pkey PRIMARY KEY (id);
@@ -27594,6 +27919,9 @@ ALTER TABLE ONLY sbom_vulnerable_component_versions
ALTER TABLE ONLY scan_result_policies
ADD CONSTRAINT scan_result_policies_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY schema_inconsistencies
+ ADD CONSTRAINT schema_inconsistencies_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY schema_migrations
ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version);
@@ -27603,6 +27931,12 @@ ALTER TABLE ONLY scim_identities
ALTER TABLE ONLY scim_oauth_access_tokens
ADD CONSTRAINT scim_oauth_access_tokens_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY search_indices
+ ADD CONSTRAINT search_indices_pkey PRIMARY KEY (id);
+
+ALTER TABLE ONLY search_namespace_index_assignments
+ ADD CONSTRAINT search_namespace_index_assignments_pkey PRIMARY KEY (id);
+
ALTER TABLE ONLY security_findings
ADD CONSTRAINT security_findings_pkey PRIMARY KEY (id, partition_number);
@@ -27636,6 +27970,9 @@ ALTER TABLE ONLY sprints
ALTER TABLE ONLY serverless_domain_cluster
ADD CONSTRAINT serverless_domain_cluster_pkey PRIMARY KEY (uuid);
+ALTER TABLE ONLY service_desk_custom_email_credentials
+ ADD CONSTRAINT service_desk_custom_email_credentials_pkey PRIMARY KEY (project_id);
+
ALTER TABLE ONLY service_desk_custom_email_verifications
ADD CONSTRAINT service_desk_custom_email_verifications_pkey PRIMARY KEY (project_id);
@@ -28927,12 +29264,22 @@ CREATE UNIQUE INDEX i_bulk_import_trackers_id_batch_number ON bulk_import_batch_
CREATE INDEX i_compliance_frameworks_on_id_and_created_at ON compliance_management_frameworks USING btree (id, created_at, pipeline_configuration_full_path);
+CREATE INDEX i_compliance_violations_on_project_id_merged_at_and_id ON merge_requests_compliance_violations USING btree (target_project_id, merged_at, id);
+
+CREATE INDEX i_compliance_violations_on_project_id_reason_and_id ON merge_requests_compliance_violations USING btree (target_project_id, reason, id);
+
+CREATE INDEX i_compliance_violations_on_project_id_severity_and_id ON merge_requests_compliance_violations USING btree (target_project_id, severity_level DESC, id DESC);
+
+CREATE INDEX i_compliance_violations_on_project_id_title_and_id ON merge_requests_compliance_violations USING btree (target_project_id, title, id);
+
CREATE INDEX i_dast_pre_scan_verification_steps_on_pre_scan_verification_id ON dast_pre_scan_verification_steps USING btree (dast_pre_scan_verification_id);
CREATE INDEX i_dast_profiles_tags_on_scanner_profiles_id ON dast_profiles_tags USING btree (dast_profile_id);
CREATE INDEX i_dast_scanner_profiles_tags_on_scanner_profiles_id ON dast_scanner_profiles_tags USING btree (dast_scanner_profile_id);
+CREATE INDEX i_pkgs_deb_file_meta_on_updated_at_package_file_id_when_unknown ON packages_debian_file_metadata USING btree (updated_at, package_file_id) WHERE (file_type = 1);
+
CREATE UNIQUE INDEX i_pm_licenses_on_spdx_identifier ON pm_licenses USING btree (spdx_identifier);
CREATE UNIQUE INDEX i_pm_package_version_licenses_join_ids ON pm_package_version_licenses USING btree (pm_package_version_id, pm_license_id);
@@ -29029,8 +29376,6 @@ CREATE INDEX idx_merge_requests_on_merged_state ON merge_requests USING btree (i
CREATE INDEX idx_merge_requests_on_source_project_and_branch_state_opened ON merge_requests USING btree (source_project_id, source_branch) WHERE (state_id = 1);
-CREATE INDEX idx_merge_requests_on_state_id_and_merge_status ON merge_requests USING btree (state_id, merge_status) WHERE ((state_id = 1) AND ((merge_status)::text = 'can_be_merged'::text));
-
CREATE INDEX idx_merge_requests_on_target_project_id_and_iid_opened ON merge_requests USING btree (target_project_id, iid) WHERE (state_id = 1);
CREATE INDEX idx_merge_requests_on_target_project_id_and_locked_state ON merge_requests USING btree (target_project_id) WHERE (state_id = 4);
@@ -29159,6 +29504,8 @@ CREATE INDEX index_abuse_reports_on_status_reporter_id_and_id ON abuse_reports U
CREATE INDEX index_abuse_reports_on_user_id ON abuse_reports USING btree (user_id);
+CREATE INDEX index_abuse_trust_scores_on_user_id_and_source_and_created_at ON abuse_trust_scores USING btree (user_id, source, created_at);
+
CREATE UNIQUE INDEX "index_achievements_on_namespace_id_LOWER_name" ON achievements USING btree (namespace_id, lower(name));
CREATE INDEX index_agent_activity_events_on_agent_id_and_recorded_at_and_id ON agent_activity_events USING btree (agent_id, recorded_at, id);
@@ -29179,6 +29526,14 @@ CREATE UNIQUE INDEX index_agent_project_authorizations_on_agent_id_and_project_i
CREATE INDEX index_agent_project_authorizations_on_project_id ON agent_project_authorizations USING btree (project_id);
+CREATE UNIQUE INDEX index_agent_user_access_on_agent_id_and_group_id ON agent_user_access_group_authorizations USING btree (agent_id, group_id);
+
+CREATE UNIQUE INDEX index_agent_user_access_on_agent_id_and_project_id ON agent_user_access_project_authorizations USING btree (agent_id, project_id);
+
+CREATE INDEX index_agent_user_access_on_group_id ON agent_user_access_group_authorizations USING btree (group_id);
+
+CREATE INDEX index_agent_user_access_on_project_id ON agent_user_access_project_authorizations USING btree (project_id);
+
CREATE INDEX index_alert_assignees_on_alert_id ON alert_management_alert_assignees USING btree (alert_id);
CREATE UNIQUE INDEX index_alert_assignees_on_user_id_and_alert_id ON alert_management_alert_assignees USING btree (user_id, alert_id);
@@ -29325,10 +29680,6 @@ CREATE UNIQUE INDEX index_aws_roles_on_role_external_id ON aws_roles USING btree
CREATE UNIQUE INDEX index_aws_roles_on_user_id ON aws_roles USING btree (user_id);
-CREATE INDEX p_ci_builds_metadata_on_runner_machine_id_idx ON ONLY p_ci_builds_metadata USING btree (runner_machine_id) WHERE (runner_machine_id IS NOT NULL);
-
-CREATE INDEX index_b6331cde35 ON ci_builds_metadata USING btree (runner_machine_id) WHERE (runner_machine_id IS NOT NULL);
-
CREATE INDEX index_background_migration_jobs_for_partitioning_migrations ON background_migration_jobs USING btree (((arguments ->> 2))) WHERE (class_name = 'Gitlab::Database::PartitioningMigrationHelpers::BackfillPartitionedTable'::text);
CREATE INDEX index_background_migration_jobs_on_class_name_and_arguments ON background_migration_jobs USING btree (class_name, arguments);
@@ -29557,8 +29908,6 @@ CREATE INDEX index_ci_job_artifacts_id_for_terraform_reports ON ci_job_artifacts
CREATE INDEX index_ci_job_artifacts_on_expire_at_and_job_id ON ci_job_artifacts USING btree (expire_at, job_id);
-CREATE INDEX index_ci_job_artifacts_on_expire_at_for_removal ON ci_job_artifacts USING btree (expire_at) WHERE ((locked = 0) AND (expire_at IS NOT NULL));
-
CREATE INDEX index_ci_job_artifacts_on_file_store ON ci_job_artifacts USING btree (file_store);
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]));
@@ -30115,6 +30464,8 @@ CREATE INDEX index_design_management_designs_versions_on_event ON design_managem
CREATE INDEX index_design_management_designs_versions_on_version_id ON design_management_designs_versions USING btree (version_id);
+CREATE UNIQUE INDEX index_design_management_repositories_on_project_id ON design_management_repositories USING btree (project_id);
+
CREATE INDEX index_design_management_versions_on_author_id ON design_management_versions USING btree (author_id) WHERE (author_id IS NOT NULL);
CREATE INDEX index_design_management_versions_on_issue_id ON design_management_versions USING btree (issue_id);
@@ -30131,6 +30482,8 @@ CREATE UNIQUE INDEX index_dora_configurations_on_project_id ON dora_configuratio
CREATE UNIQUE INDEX index_dora_daily_metrics_on_environment_id_and_date ON dora_daily_metrics USING btree (environment_id, date);
+CREATE UNIQUE INDEX index_dora_performance_scores_on_project_id_and_date ON dora_performance_scores USING btree (project_id, date);
+
CREATE INDEX index_draft_notes_on_author_id ON draft_notes USING btree (author_id);
CREATE INDEX index_draft_notes_on_discussion_id ON draft_notes USING btree (discussion_id);
@@ -30253,8 +30606,6 @@ CREATE INDEX index_events_for_group_activity ON events USING btree (group_id, ta
CREATE INDEX index_events_for_project_activity ON events USING btree (project_id, target_type, action, id);
-CREATE INDEX index_events_on_action ON events USING btree (action);
-
CREATE INDEX index_events_on_author_id_and_created_at ON events USING btree (author_id, created_at);
CREATE INDEX index_events_on_author_id_and_created_at_merge_requests ON events USING btree (author_id, created_at) WHERE ((target_type)::text = 'MergeRequest'::text);
@@ -30291,6 +30642,8 @@ CREATE UNIQUE INDEX index_feature_gates_on_feature_key_and_key_and_value ON feat
CREATE UNIQUE INDEX index_features_on_key ON features USING btree (key);
+CREATE INDEX index_for_security_scans_scan_type ON security_scans USING btree (scan_type, project_id, pipeline_id) WHERE (status = 1);
+
CREATE INDEX index_for_status_per_branch_per_project ON merge_trains USING btree (target_project_id, target_branch, status);
CREATE INDEX index_fork_network_members_on_fork_network_id ON fork_network_members USING btree (fork_network_id);
@@ -30301,6 +30654,8 @@ CREATE UNIQUE INDEX index_fork_network_members_on_project_id ON fork_network_mem
CREATE UNIQUE INDEX index_fork_networks_on_root_project_id ON fork_networks USING btree (root_project_id);
+CREATE INDEX index_fuc_over_limit_notified_at ON namespace_details USING btree (free_user_cap_over_limit_notified_at);
+
CREATE INDEX index_geo_event_log_on_cache_invalidation_event_id ON geo_event_log USING btree (cache_invalidation_event_id) WHERE (cache_invalidation_event_id IS NOT NULL);
CREATE INDEX index_geo_event_log_on_geo_event_id ON geo_event_log USING btree (geo_event_id) WHERE (geo_event_id IS NOT NULL);
@@ -30569,6 +30924,8 @@ CREATE UNIQUE INDEX index_issuable_slas_on_issue_id ON issuable_slas USING btree
CREATE INDEX index_issue_assignees_on_user_id_and_issue_id ON issue_assignees USING btree (user_id, issue_id);
+CREATE INDEX index_issue_assignment_events_on_user_id ON issue_assignment_events USING btree (user_id);
+
CREATE UNIQUE INDEX index_issue_crm_contacts_on_issue_id_and_contact_id ON issue_customer_relations_contacts USING btree (issue_id, contact_id);
CREATE INDEX index_issue_customer_relations_contacts_on_contact_id ON issue_customer_relations_contacts USING btree (contact_id);
@@ -30801,6 +31158,8 @@ CREATE UNIQUE INDEX index_merge_request_assignees_on_merge_request_id_and_user_i
CREATE INDEX index_merge_request_assignees_on_user_id ON merge_request_assignees USING btree (user_id);
+CREATE INDEX index_merge_request_assignment_events_on_user_id ON merge_request_assignment_events USING btree (user_id);
+
CREATE INDEX index_merge_request_blocks_on_blocked_merge_request_id ON merge_request_blocks USING btree (blocked_merge_request_id);
CREATE UNIQUE INDEX index_merge_request_cleanup_schedules_on_merge_request_id ON merge_request_cleanup_schedules USING btree (merge_request_id);
@@ -30851,8 +31210,6 @@ CREATE UNIQUE INDEX index_merge_request_reviewers_on_merge_request_id_and_user_i
CREATE INDEX index_merge_request_reviewers_on_user_id ON merge_request_reviewers USING btree (user_id);
-CREATE UNIQUE INDEX index_merge_request_user_mentions_note_id_convert_to_bigint ON merge_request_user_mentions USING btree (note_id_convert_to_bigint) WHERE (note_id_convert_to_bigint IS NOT NULL);
-
CREATE UNIQUE INDEX index_merge_request_user_mentions_on_note_id ON merge_request_user_mentions USING btree (note_id) WHERE (note_id IS NOT NULL);
CREATE INDEX index_merge_requests_closing_issues_on_issue_id ON merge_requests_closing_issues USING btree (issue_id);
@@ -30899,8 +31256,6 @@ CREATE UNIQUE INDEX index_merge_requests_on_target_project_id_and_iid ON merge_r
CREATE INDEX index_merge_requests_on_target_project_id_and_iid_and_state_id ON merge_requests USING btree (target_project_id, iid, state_id);
-CREATE INDEX index_merge_requests_on_target_project_id_and_iid_jira_title ON merge_requests USING btree (target_project_id, iid) WHERE ((title)::text ~ '[A-Z][A-Z_0-9]+-\d+'::text);
-
CREATE INDEX index_merge_requests_on_target_project_id_and_source_branch ON merge_requests USING btree (target_project_id, source_branch);
CREATE INDEX index_merge_requests_on_target_project_id_and_squash_commit_sha ON merge_requests USING btree (target_project_id, squash_commit_sha);
@@ -30909,8 +31264,6 @@ CREATE INDEX index_merge_requests_on_target_project_id_and_target_branch ON merg
CREATE INDEX index_merge_requests_on_target_project_id_and_updated_at_and_id ON merge_requests USING btree (target_project_id, updated_at, id);
-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) 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);
@@ -30961,7 +31314,13 @@ CREATE INDEX index_ml_candidate_params_on_candidate_id ON ml_candidate_params US
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 UNIQUE INDEX index_ml_candidates_on_experiment_id_and_eid ON ml_candidates USING btree (experiment_id, eid);
+
+CREATE INDEX index_ml_candidates_on_package_id ON ml_candidates USING btree (package_id);
+
+CREATE INDEX index_ml_candidates_on_project_id ON ml_candidates USING btree (project_id);
+
+CREATE INDEX index_ml_candidates_on_project_id_on_internal_id ON ml_candidates USING btree (project_id, internal_id);
CREATE INDEX index_ml_candidates_on_user_id ON ml_candidates USING btree (user_id);
@@ -31049,8 +31408,6 @@ CREATE INDEX index_namespaces_on_updated_at ON namespaces USING btree (updated_a
CREATE INDEX index_namespaces_public_groups_name_id ON namespaces USING btree (name, id) WHERE (((type)::text = 'Group'::text) AND (visibility_level = 20));
-CREATE INDEX index_namespaces_storage_limit_exclusions_on_namespace_id ON namespaces_storage_limit_exclusions USING btree (namespace_id);
-
CREATE INDEX index_namespaces_sync_events_on_namespace_id ON namespaces_sync_events USING btree (namespace_id);
CREATE INDEX index_next_over_limit_check_at_asc_order ON namespace_details USING btree (next_over_limit_check_at NULLS FIRST);
@@ -31087,6 +31444,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_npm_metadata_caches_on_package_name_project_id_unique ON packages_npm_metadata_caches USING btree (package_name, project_id) WHERE (project_id IS NOT NULL);
+
CREATE INDEX index_ns_root_stor_stats_on_registry_size_estimated ON namespace_root_storage_statistics USING btree (registry_size_estimated);
CREATE UNIQUE INDEX index_ns_user_callouts_feature ON user_namespace_callouts USING btree (user_id, feature_name, namespace_id);
@@ -31123,6 +31482,8 @@ CREATE INDEX index_on_identities_lower_extern_uid_and_provider ON identities USI
CREATE UNIQUE INDEX index_on_instance_statistics_recorded_at_and_identifier ON analytics_usage_trends_measurements USING btree (identifier, recorded_at);
+CREATE INDEX index_on_issue_assignment_events_issue_id_action_created_at_id ON issue_assignment_events USING btree (issue_id, action, created_at, id);
+
CREATE INDEX index_on_issues_closed_incidents_by_project_id_and_closed_at ON issues USING btree (project_id, closed_at) WHERE ((issue_type = 1) AND (state_id = 2));
CREATE INDEX index_on_issues_health_status_asc_order ON issues USING btree (project_id, health_status, id DESC, state_id, issue_type);
@@ -31137,6 +31498,8 @@ CREATE INDEX index_on_merge_requests_for_latest_diffs ON merge_requests USING bt
COMMENT ON INDEX index_on_merge_requests_for_latest_diffs IS 'Index used to efficiently obtain the oldest merge request for a commit SHA';
+CREATE INDEX index_on_mr_assignment_events_mr_id_action_created_at_id ON merge_request_assignment_events USING btree (merge_request_id, action, created_at, id);
+
CREATE INDEX index_on_namespaces_lower_name ON namespaces USING btree (lower((name)::text));
CREATE INDEX index_on_namespaces_lower_path ON namespaces USING btree (lower((path)::text));
@@ -31229,8 +31592,6 @@ CREATE UNIQUE INDEX index_packages_dependencies_on_name_and_version_pattern ON p
CREATE INDEX index_packages_dependency_links_on_dependency_id ON packages_dependency_links USING btree (dependency_id);
-CREATE INDEX index_packages_events_on_package_id ON packages_events USING btree (package_id);
-
CREATE INDEX index_packages_helm_file_metadata_on_channel ON packages_helm_file_metadata USING btree (channel);
CREATE INDEX index_packages_helm_file_metadata_on_pf_id_and_channel ON packages_helm_file_metadata USING btree (package_file_id, channel);
@@ -31239,6 +31600,8 @@ CREATE INDEX index_packages_maven_metadata_on_package_id_and_path ON packages_ma
CREATE INDEX index_packages_maven_metadata_on_path ON packages_maven_metadata USING btree (path);
+CREATE INDEX index_packages_npm_metadata_caches_on_project_id ON packages_npm_metadata_caches USING btree (project_id);
+
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));
@@ -31253,6 +31616,8 @@ CREATE INDEX index_packages_package_files_on_file_store ON packages_package_file
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_created_at_desc ON packages_package_files USING btree (package_id, created_at DESC);
+
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);
@@ -31747,6 +32112,12 @@ CREATE INDEX index_resource_label_events_on_merge_request_id_label_id_action ON
CREATE INDEX index_resource_label_events_on_user_id ON resource_label_events USING btree (user_id);
+CREATE INDEX index_resource_link_events_on_child_work_item_id ON resource_link_events USING btree (child_work_item_id);
+
+CREATE INDEX index_resource_link_events_on_issue_id ON resource_link_events USING btree (issue_id);
+
+CREATE INDEX index_resource_link_events_on_user_id ON resource_link_events USING btree (user_id);
+
CREATE INDEX index_resource_milestone_events_created_at ON resource_milestone_events USING btree (created_at);
CREATE INDEX index_resource_milestone_events_on_issue_id ON resource_milestone_events USING btree (issue_id);
@@ -31823,6 +32194,8 @@ CREATE UNIQUE INDEX index_sbom_sources_on_source_type_and_source ON sbom_sources
CREATE INDEX index_scan_result_policies_on_policy_configuration_id ON scan_result_policies USING btree (security_orchestration_policy_configuration_id);
+CREATE INDEX index_schema_inconsistencies_on_issue_id ON schema_inconsistencies USING btree (issue_id);
+
CREATE INDEX index_scim_identities_on_group_id ON scim_identities USING btree (group_id);
CREATE UNIQUE INDEX index_scim_identities_on_lower_extern_uid_and_group_id ON scim_identities USING btree (lower((extern_uid)::text), group_id);
@@ -31831,6 +32204,20 @@ CREATE UNIQUE INDEX index_scim_identities_on_user_id_and_group_id ON scim_identi
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 UNIQUE INDEX index_search_indices_on_id_and_type ON search_indices USING btree (id, type);
+
+CREATE UNIQUE INDEX index_search_indices_on_type_and_bucket_number ON search_indices USING btree (type, bucket_number);
+
+CREATE UNIQUE INDEX index_search_indices_on_type_and_path ON search_indices USING btree (type, path);
+
+CREATE INDEX index_search_namespace_index_assignments_on_namespace_id ON search_namespace_index_assignments USING btree (namespace_id);
+
+CREATE INDEX index_search_namespace_index_assignments_on_search_index_id ON search_namespace_index_assignments USING btree (search_index_id);
+
+CREATE UNIQUE INDEX index_search_namespace_index_assignments_uniqueness_index_type ON search_namespace_index_assignments USING btree (namespace_id, index_type);
+
+CREATE UNIQUE INDEX index_search_namespace_index_assignments_uniqueness_on_index_id ON search_namespace_index_assignments USING btree (namespace_id, search_index_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_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));
@@ -31995,6 +32382,8 @@ CREATE UNIQUE INDEX index_system_note_metadata_on_description_version_id ON syst
CREATE UNIQUE INDEX index_system_note_metadata_on_note_id ON system_note_metadata USING btree (note_id);
+CREATE UNIQUE INDEX index_system_note_metadata_on_note_id_convert_to_bigint ON system_note_metadata USING btree (note_id_convert_to_bigint);
+
CREATE INDEX index_taggings_on_tag_id ON taggings USING btree (tag_id);
CREATE INDEX index_taggings_on_taggable_id_and_taggable_type_and_context ON taggings USING btree (taggable_id, taggable_type, context);
@@ -32329,6 +32718,8 @@ CREATE INDEX index_vulnerability_feedback_on_pipeline_id ON vulnerability_feedba
CREATE INDEX index_vulnerability_finding_signatures_on_finding_id ON vulnerability_finding_signatures USING btree (finding_id);
+CREATE INDEX index_vulnerability_finding_signatures_on_signature_sha ON vulnerability_finding_signatures USING btree (signature_sha);
+
CREATE INDEX index_vulnerability_findings_remediations_on_remediation_id ON vulnerability_findings_remediations USING btree (vulnerability_remediation_id);
CREATE UNIQUE INDEX index_vulnerability_findings_remediations_on_unique_keys ON vulnerability_findings_remediations USING btree (vulnerability_occurrence_id, vulnerability_remediation_id);
@@ -32357,6 +32748,8 @@ CREATE INDEX index_vulnerability_occurrences_deduplication ON vulnerability_occu
CREATE INDEX index_vulnerability_occurrences_for_issue_links_migration ON vulnerability_occurrences USING btree (project_id, report_type, encode(project_fingerprint, 'hex'::text));
+CREATE INDEX index_vulnerability_occurrences_for_override_uuids_logic ON vulnerability_occurrences USING btree (project_id, report_type, location_fingerprint);
+
CREATE INDEX index_vulnerability_occurrences_on_location_image ON vulnerability_occurrences USING gin (((location -> 'image'::text))) WHERE (report_type = ANY (ARRAY[2, 7]));
CREATE INDEX index_vulnerability_occurrences_on_location_k8s_agent_id ON vulnerability_occurrences USING gin ((((location -> 'kubernetes_resource'::text) -> 'agent_id'::text))) WHERE (report_type = 7);
@@ -32589,6 +32982,8 @@ CREATE INDEX tmp_idx_for_vulnerability_feedback_migration ON vulnerability_feedb
CREATE INDEX tmp_idx_package_files_on_non_zero_size ON packages_package_files USING btree (package_id, size) WHERE (size IS NOT NULL);
+CREATE INDEX tmp_idx_vulnerability_occurrences_on_id_where_report_type_7_99 ON vulnerability_occurrences USING btree (id) WHERE (report_type = ANY (ARRAY[7, 99]));
+
CREATE INDEX tmp_index_ci_job_artifacts_on_expire_at_where_locked_unknown ON ci_job_artifacts USING btree (expire_at, job_id) WHERE ((locked = 2) AND (expire_at IS NOT NULL));
CREATE INDEX tmp_index_ci_job_artifacts_on_id_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));
@@ -32603,8 +32998,6 @@ CREATE INDEX tmp_index_for_null_member_namespace_id ON members USING btree (memb
CREATE INDEX tmp_index_for_project_namespace_id_migration_on_routes ON routes USING btree (id) WHERE ((namespace_id IS NULL) AND ((source_type)::text = 'Project'::text));
-CREATE INDEX tmp_index_for_software_licenses_spdx_identifier_cleanup ON software_licenses USING btree (spdx_identifier) WHERE (spdx_identifier IS NULL);
-
CREATE INDEX tmp_index_members_on_state ON members USING btree (state) WHERE (state = 2);
CREATE INDEX tmp_index_migrated_container_registries ON container_repositories USING btree (project_id) WHERE ((migration_state = 'import_done'::text) OR (created_at >= '2022-01-23 00:00:00'::timestamp without time zone));
@@ -32635,12 +33028,18 @@ CREATE UNIQUE INDEX uniq_pkgs_debian_project_distributions_project_id_and_suite
CREATE UNIQUE INDEX unique_ci_builds_token_encrypted_and_partition_id ON ci_builds USING btree (token_encrypted, partition_id) WHERE (token_encrypted IS NOT NULL);
+CREATE UNIQUE INDEX unique_idx_namespaces_storage_limit_exclusions_on_namespace_id ON namespaces_storage_limit_exclusions USING btree (namespace_id);
+
CREATE UNIQUE INDEX unique_index_ci_build_pending_states_on_partition_id_build_id ON ci_build_pending_states USING btree (partition_id, build_id);
CREATE UNIQUE INDEX unique_index_for_project_pages_unique_domain ON project_settings USING btree (pages_unique_domain) WHERE (pages_unique_domain IS NOT NULL);
+CREATE UNIQUE INDEX unique_index_on_system_note_metadata_id ON resource_link_events USING btree (system_note_metadata_id);
+
CREATE UNIQUE INDEX unique_merge_request_metrics_by_merge_request_id ON merge_request_metrics USING btree (merge_request_id);
+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));
+
CREATE UNIQUE INDEX unique_postgres_async_fk_validations_name_and_table_name ON postgres_async_foreign_key_validations USING btree (name, table_name);
CREATE UNIQUE INDEX unique_projects_on_name_namespace_id ON projects USING btree (name, namespace_id);
@@ -33939,8 +34338,6 @@ ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_p
ALTER INDEX p_ci_builds_metadata_pkey ATTACH PARTITION ci_builds_metadata_pkey;
-ALTER INDEX p_ci_builds_metadata_on_runner_machine_id_idx ATTACH PARTITION index_b6331cde35;
-
ALTER INDEX p_ci_builds_metadata_build_id_idx ATTACH PARTITION index_ci_builds_metadata_on_build_id_and_has_exposed_artifacts;
ALTER INDEX p_ci_builds_metadata_build_id_id_idx ATTACH PARTITION index_ci_builds_metadata_on_build_id_and_id_and_interruptible;
@@ -33969,6 +34366,10 @@ CREATE TRIGGER nullify_merge_request_metrics_build_data_on_update BEFORE UPDATE
CREATE TRIGGER projects_loose_fk_trigger AFTER DELETE ON projects REFERENCING OLD TABLE AS old_table FOR EACH STATEMENT EXECUTE FUNCTION insert_into_loose_foreign_keys_deleted_records();
+CREATE TRIGGER push_rules_loose_fk_trigger AFTER DELETE ON push_rules REFERENCING OLD TABLE AS old_table FOR EACH STATEMENT EXECUTE FUNCTION insert_into_loose_foreign_keys_deleted_records();
+
+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_080e73845bfd BEFORE INSERT OR UPDATE ON notes FOR EACH ROW EXECUTE FUNCTION trigger_080e73845bfd();
CREATE TRIGGER trigger_0e214b8a14f2 BEFORE INSERT OR UPDATE ON vulnerability_user_mentions FOR EACH ROW EXECUTE FUNCTION trigger_0e214b8a14f2();
@@ -33977,8 +34378,6 @@ CREATE TRIGGER trigger_17c3a95ee58a BEFORE INSERT OR UPDATE ON commit_user_menti
CREATE TRIGGER trigger_1a857e8db6cd BEFORE INSERT OR UPDATE ON vulnerability_occurrences FOR EACH ROW EXECUTE FUNCTION trigger_1a857e8db6cd();
-CREATE TRIGGER trigger_3207b8d0d6f3 BEFORE INSERT OR UPDATE ON ci_build_needs FOR EACH ROW EXECUTE FUNCTION trigger_3207b8d0d6f3();
-
CREATE TRIGGER trigger_3dc62927cae8 BEFORE INSERT OR UPDATE ON design_user_mentions FOR EACH ROW EXECUTE FUNCTION trigger_3dc62927cae8();
CREATE TRIGGER trigger_428d92773fe7 BEFORE INSERT OR UPDATE ON timelogs FOR EACH ROW EXECUTE FUNCTION trigger_428d92773fe7();
@@ -33987,7 +34386,7 @@ CREATE TRIGGER trigger_482bac5ec48a BEFORE INSERT OR UPDATE ON system_note_metad
CREATE TRIGGER trigger_775287b6d67a BEFORE INSERT OR UPDATE ON note_diff_files FOR EACH ROW EXECUTE FUNCTION trigger_775287b6d67a();
-CREATE TRIGGER trigger_7f4fcd5aa322 BEFORE INSERT OR UPDATE ON sent_notifications FOR EACH ROW EXECUTE FUNCTION trigger_7f4fcd5aa322();
+CREATE TRIGGER trigger_909cf0a06094 BEFORE INSERT OR UPDATE ON award_emoji FOR EACH ROW EXECUTE FUNCTION trigger_909cf0a06094();
CREATE TRIGGER trigger_bfc6e47be8cc BEFORE INSERT OR UPDATE ON snippet_user_mentions FOR EACH ROW EXECUTE FUNCTION trigger_bfc6e47be8cc();
@@ -33997,7 +34396,7 @@ CREATE TRIGGER trigger_c2051020aa8b BEFORE INSERT OR UPDATE ON issue_user_mentio
CREATE TRIGGER trigger_c5a5f48f12b0 BEFORE INSERT OR UPDATE ON epic_user_mentions FOR EACH ROW EXECUTE FUNCTION trigger_c5a5f48f12b0();
-CREATE TRIGGER trigger_c7107f30d69d BEFORE INSERT OR UPDATE ON merge_request_metrics FOR EACH ROW EXECUTE FUNCTION trigger_c7107f30d69d();
+CREATE TRIGGER trigger_cd1aeb22b34a BEFORE INSERT OR UPDATE ON events FOR EACH ROW EXECUTE FUNCTION trigger_cd1aeb22b34a();
CREATE TRIGGER trigger_dca935e3a712 BEFORE INSERT OR UPDATE ON todos FOR EACH ROW EXECUTE FUNCTION trigger_dca935e3a712();
@@ -34056,6 +34455,9 @@ 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 agent_user_access_project_authorizations
+ ADD CONSTRAINT fk_0250c0ad51 FOREIGN KEY (agent_id) REFERENCES cluster_agents(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY incident_management_escalation_rules
ADD CONSTRAINT fk_0314ee86eb FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
@@ -34080,6 +34482,9 @@ ALTER TABLE ONLY merge_requests
ALTER TABLE ONLY user_interacted_projects
ADD CONSTRAINT fk_0894651f08 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
+ALTER TABLE ONLY merge_request_assignment_events
+ ADD CONSTRAINT fk_08f7602bfd FOREIGN KEY (merge_request_id) REFERENCES merge_requests(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;
@@ -34200,12 +34605,21 @@ 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 project_group_links
+ ADD CONSTRAINT fk_28a1244b01 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE NOT VALID;
+
ALTER TABLE ONLY merge_requests_compliance_violations
ADD CONSTRAINT fk_290ec1ab02 FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE;
ALTER TABLE ONLY coverage_fuzzing_corpuses
ADD CONSTRAINT fk_29f6f15f82 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
+ALTER TABLE ONLY resource_link_events
+ ADD CONSTRAINT fk_2a039c40f4 FOREIGN KEY (system_note_metadata_id) REFERENCES system_note_metadata(id) ON DELETE CASCADE;
+
+ALTER TABLE ONLY ml_candidates
+ ADD CONSTRAINT fk_2a0421d824 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY agent_group_authorizations
ADD CONSTRAINT fk_2c9f941965 FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
@@ -34344,8 +34758,8 @@ 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 agent_user_access_group_authorizations
+ ADD CONSTRAINT fk_53fd98ccbf FOREIGN KEY (group_id) REFERENCES namespaces(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;
@@ -34464,6 +34878,9 @@ ALTER TABLE ONLY vulnerabilities
ALTER TABLE ONLY oauth_openid_requests
ADD CONSTRAINT fk_77114b3b09 FOREIGN KEY (access_grant_id) REFERENCES oauth_access_grants(id) ON DELETE CASCADE;
+ALTER TABLE ONLY agent_user_access_project_authorizations
+ ADD CONSTRAINT fk_78034b05d8 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY users
ADD CONSTRAINT fk_789cd90b35 FOREIGN KEY (accepted_term_id) REFERENCES application_setting_terms(id) ON DELETE CASCADE;
@@ -34485,9 +34902,6 @@ 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;
@@ -34584,6 +34998,9 @@ ALTER TABLE ONLY boards_epic_list_user_preferences
ALTER TABLE ONLY issues
ADD CONSTRAINT fk_96b1dd429c FOREIGN KEY (milestone_id) REFERENCES milestones(id) ON DELETE SET NULL;
+ALTER TABLE ONLY agent_user_access_group_authorizations
+ ADD CONSTRAINT fk_97ce8e8284 FOREIGN KEY (agent_id) REFERENCES cluster_agents(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY vulnerability_occurrences
ADD CONSTRAINT fk_97ffe77653 FOREIGN KEY (vulnerability_id) REFERENCES vulnerabilities(id) ON DELETE SET NULL;
@@ -34626,6 +35043,9 @@ ALTER TABLE ONLY deployment_merge_requests
ALTER TABLE ONLY issues
ADD CONSTRAINT fk_a194299be1 FOREIGN KEY (moved_to_id) REFERENCES issues(id) ON DELETE SET NULL;
+ALTER TABLE ONLY ml_candidates
+ ADD CONSTRAINT fk_a1d5f1bc45 FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE SET NULL;
+
ALTER TABLE ONLY ci_builds
ADD CONSTRAINT fk_a2141b1522 FOREIGN KEY (auto_canceled_by_id) REFERENCES ci_pipelines(id) ON DELETE SET NULL;
@@ -34671,6 +35091,9 @@ ALTER TABLE ONLY merge_requests
ALTER TABLE ONLY ml_experiments
ADD CONSTRAINT fk_ad89c59858 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ALTER TABLE ONLY packages_npm_metadata_caches
+ ADD CONSTRAINT fk_ada23b1d30 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE SET NULL;
+
ALTER TABLE ONLY merge_request_metrics
ADD CONSTRAINT fk_ae440388cc FOREIGN KEY (latest_closed_by_id) REFERENCES users(id) ON DELETE SET NULL;
@@ -34740,6 +35163,9 @@ ALTER TABLE ONLY namespace_bans
ALTER TABLE ONLY gitlab_subscriptions
ADD CONSTRAINT fk_bd0c4019c3 FOREIGN KEY (hosted_plan_id) REFERENCES plans(id) ON DELETE CASCADE;
+ALTER TABLE ONLY resource_link_events
+ ADD CONSTRAINT fk_bd4ae15ce4 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE SET NULL;
+
ALTER TABLE ONLY metrics_users_starred_dashboards
ADD CONSTRAINT fk_bd6ae32fac FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
@@ -34818,6 +35244,9 @@ ALTER TABLE ONLY todos
ALTER TABLE ONLY dast_site_profiles_pipelines
ADD CONSTRAINT fk_cf05cf8fe1 FOREIGN KEY (dast_site_profile_id) REFERENCES dast_site_profiles(id) ON DELETE CASCADE;
+ALTER TABLE ONLY issue_assignment_events
+ ADD CONSTRAINT fk_cfd2073177 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY geo_event_log
ADD CONSTRAINT fk_cff7185ad2 FOREIGN KEY (reset_checksum_event_id) REFERENCES geo_reset_checksum_events(id) ON DELETE CASCADE;
@@ -35016,8 +35445,11 @@ 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 merge_request_user_mentions
- ADD CONSTRAINT fk_merge_request_user_mentions_note_id_convert_to_bigint FOREIGN KEY (note_id_convert_to_bigint) REFERENCES notes(id) ON DELETE CASCADE NOT VALID;
+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;
+
+ALTER TABLE ONLY ml_candidate_params
+ ADD CONSTRAINT fk_ml_candidate_params_on_candidate_id FOREIGN KEY (candidate_id) REFERENCES ml_candidates(id) ON DELETE CASCADE;
ALTER TABLE ONLY path_locks
ADD CONSTRAINT fk_path_locks_user_id FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
@@ -35064,6 +35496,12 @@ 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 search_namespace_index_assignments
+ ADD CONSTRAINT fk_rails_06f9b905d3 FOREIGN KEY (namespace_id) REFERENCES namespaces(id);
+
+ALTER TABLE ONLY issue_assignment_events
+ ADD CONSTRAINT fk_rails_07683f8e80 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE SET NULL;
+
ALTER TABLE ONLY work_item_hierarchy_restrictions
ADD CONSTRAINT fk_rails_08cd7fef58 FOREIGN KEY (child_type_id) REFERENCES work_item_types(id) ON DELETE CASCADE;
@@ -35091,6 +35529,9 @@ ALTER TABLE ONLY audit_events_external_audit_event_destinations
ALTER TABLE ONLY operations_user_lists
ADD CONSTRAINT fk_rails_0c716e079b FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ALTER TABLE ONLY resource_link_events
+ ADD CONSTRAINT fk_rails_0cea73eba5 FOREIGN KEY (child_work_item_id) REFERENCES issues(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY geo_node_statuses
ADD CONSTRAINT fk_rails_0ecc699c2a FOREIGN KEY (geo_node_id) REFERENCES geo_nodes(id) ON DELETE CASCADE;
@@ -35178,9 +35619,6 @@ ALTER TABLE ONLY security_orchestration_policy_rule_schedules
ALTER TABLE ONLY incident_management_escalation_rules
ADD CONSTRAINT fk_rails_17dbea07a6 FOREIGN KEY (policy_id) REFERENCES incident_management_escalation_policies(id) ON DELETE CASCADE;
-ALTER TABLE ONLY clusters_applications_jupyter
- ADD CONSTRAINT fk_rails_17df21c98c FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY cluster_providers_aws
ADD CONSTRAINT fk_rails_18983d9ea4 FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE;
@@ -35256,9 +35694,6 @@ ALTER TABLE ONLY user_statuses
ALTER TABLE ONLY users_ops_dashboard_projects
ADD CONSTRAINT fk_rails_220a0562db FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
-ALTER TABLE ONLY clusters_applications_runners
- ADD CONSTRAINT fk_rails_22388594e9 FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY service_desk_settings
ADD CONSTRAINT fk_rails_223a296a85 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -35307,6 +35742,9 @@ ALTER TABLE ONLY dast_site_validations
ALTER TABLE ONLY vulnerability_findings_remediations
ADD CONSTRAINT fk_rails_28a8d0cf93 FOREIGN KEY (vulnerability_occurrence_id) REFERENCES vulnerability_occurrences(id) ON DELETE CASCADE;
+ALTER TABLE ONLY design_management_repositories
+ ADD CONSTRAINT fk_rails_2938d8dd8d FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY incident_management_issuable_escalation_statuses
ADD CONSTRAINT fk_rails_29abffe3b9 FOREIGN KEY (policy_id) REFERENCES incident_management_escalation_policies(id) ON DELETE SET NULL;
@@ -35370,9 +35808,6 @@ ALTER TABLE ONLY zoom_meetings
ALTER TABLE ONLY container_repositories
ADD CONSTRAINT fk_rails_32f7bf5aad FOREIGN KEY (project_id) REFERENCES projects(id);
-ALTER TABLE ONLY clusters_applications_jupyter
- ADD CONSTRAINT fk_rails_331f0aff78 FOREIGN KEY (oauth_application_id) REFERENCES oauth_applications(id) ON DELETE SET NULL;
-
ALTER TABLE ONLY alert_management_alert_metric_images
ADD CONSTRAINT fk_rails_338e55b408 FOREIGN KEY (alert_id) REFERENCES alert_management_alerts(id) ON DELETE CASCADE;
@@ -35442,9 +35877,6 @@ ALTER TABLE ONLY note_diff_files
ALTER TABLE ONLY snippet_user_mentions
ADD CONSTRAINT fk_rails_3e00189191 FOREIGN KEY (snippet_id) REFERENCES snippets(id) ON DELETE CASCADE;
-ALTER TABLE ONLY clusters_applications_helm
- ADD CONSTRAINT fk_rails_3e2b1c06bc FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY epic_user_mentions
ADD CONSTRAINT fk_rails_3eaf4d88cc FOREIGN KEY (epic_id) REFERENCES epics(id) ON DELETE CASCADE;
@@ -35481,6 +35913,9 @@ 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 merge_request_assignment_events
+ ADD CONSTRAINT fk_rails_4378a2e8d7 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE SET NULL;
+
ALTER TABLE ONLY lfs_file_locks
ADD CONSTRAINT fk_rails_43df7a0412 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -35496,6 +35931,9 @@ ALTER TABLE ONLY packages_dependency_links
ALTER TABLE ONLY project_auto_devops
ADD CONSTRAINT fk_rails_45436b12b2 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ALTER TABLE ONLY dora_performance_scores
+ ADD CONSTRAINT fk_rails_455f9acc65 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY merge_requests_closing_issues
ADD CONSTRAINT fk_rails_458eda8667 FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE;
@@ -35592,9 +36030,6 @@ ALTER TABLE ONLY analytics_cycle_analytics_group_value_streams
ALTER TABLE ONLY geo_node_namespace_links
ADD CONSTRAINT fk_rails_546bf08d3e FOREIGN KEY (geo_node_id) REFERENCES geo_nodes(id) ON DELETE CASCADE;
-ALTER TABLE ONLY clusters_applications_knative
- ADD CONSTRAINT fk_rails_54fc91e0a0 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;
@@ -35613,9 +36048,6 @@ ALTER TABLE ONLY incident_management_timeline_event_tag_links
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;
-ALTER TABLE ONLY clusters_applications_cilium
- ADD CONSTRAINT fk_rails_59dc12eea6 FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY analytics_cycle_analytics_group_stages
ADD CONSTRAINT fk_rails_5a22f40223 FOREIGN KEY (start_event_label_id) REFERENCES labels(id) ON DELETE CASCADE;
@@ -35829,9 +36261,6 @@ ALTER TABLE ONLY group_crm_settings
ALTER TABLE ONLY pm_package_version_licenses
ADD CONSTRAINT fk_rails_7520ea026d FOREIGN KEY (pm_license_id) REFERENCES pm_licenses(id) ON DELETE CASCADE;
-ALTER TABLE ONLY clusters_applications_ingress
- ADD CONSTRAINT fk_rails_753a7b41c1 FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE;
-
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;
@@ -35925,9 +36354,6 @@ ALTER TABLE ONLY analytics_language_trend_repository_languages
ALTER TABLE ONLY merge_request_diff_details
ADD CONSTRAINT fk_rails_86f4d24ecd FOREIGN KEY (merge_request_diff_id) REFERENCES merge_request_diffs(id) ON DELETE CASCADE;
-ALTER TABLE ONLY clusters_applications_crossplane
- ADD CONSTRAINT fk_rails_87186702df FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY packages_package_file_build_infos
ADD CONSTRAINT fk_rails_871ca3ae21 FOREIGN KEY (package_file_id) REFERENCES packages_package_files(id) ON DELETE CASCADE;
@@ -35937,6 +36363,9 @@ ALTER TABLE ONLY boards_epic_boards
ALTER TABLE ONLY ci_runner_namespaces
ADD CONSTRAINT fk_rails_8767676b7a FOREIGN KEY (runner_id) REFERENCES ci_runners(id) ON DELETE CASCADE;
+ALTER TABLE ONLY service_desk_custom_email_credentials
+ ADD CONSTRAINT fk_rails_878b562d12 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY software_license_policies
ADD CONSTRAINT fk_rails_87b2247ce5 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -36093,9 +36522,6 @@ ALTER TABLE ONLY badges
ALTER TABLE ONLY vulnerability_finding_signatures
ADD CONSTRAINT fk_rails_9e0baf9dcd FOREIGN KEY (finding_id) REFERENCES vulnerability_occurrences(id) ON DELETE CASCADE;
-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;
@@ -36264,6 +36690,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 abuse_trust_scores
+ ADD CONSTRAINT fk_rails_b903079eb4 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY dora_configurations
ADD CONSTRAINT fk_rails_b9b8d90ddb FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -36318,9 +36747,6 @@ ALTER TABLE ONLY design_management_designs
ALTER TABLE ONLY atlassian_identities
ADD CONSTRAINT fk_rails_c02928bc18 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
-ALTER TABLE ONLY serverless_domain_cluster
- ADD CONSTRAINT fk_rails_c09009dee1 FOREIGN KEY (pages_domain_id) REFERENCES pages_domains(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY slack_integrations_scopes
ADD CONSTRAINT fk_rails_c0e018a6fe FOREIGN KEY (slack_api_scope_id) REFERENCES slack_api_scopes(id) ON DELETE CASCADE;
@@ -36363,9 +36789,6 @@ ALTER TABLE ONLY boards_epic_board_recent_visits
ALTER TABLE ONLY ci_job_artifacts
ADD CONSTRAINT fk_rails_c5137cb2c1_p FOREIGN KEY (partition_id, job_id) REFERENCES ci_builds(partition_id, id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY packages_events
- ADD CONSTRAINT fk_rails_c6c20d0094 FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE SET NULL;
-
ALTER TABLE ONLY project_settings
ADD CONSTRAINT fk_rails_c6df6e6328 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -36459,9 +36882,6 @@ 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;
@@ -36474,6 +36894,9 @@ ALTER TABLE ONLY merge_request_reviewers
ALTER TABLE ONLY ci_running_builds
ADD CONSTRAINT fk_rails_da45cfa165_p FOREIGN KEY (partition_id, build_id) REFERENCES ci_builds(partition_id, id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY resource_link_events
+ ADD CONSTRAINT fk_rails_da5dd8a56f FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY jira_imports
ADD CONSTRAINT fk_rails_da617096ce FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE SET NULL;
@@ -36498,6 +36921,9 @@ ALTER TABLE ONLY packages_debian_group_component_files
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 schema_inconsistencies
+ ADD CONSTRAINT fk_rails_dd7d763602 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY user_callouts
ADD CONSTRAINT fk_rails_ddfdd80f3d FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
@@ -36552,9 +36978,6 @@ ALTER TABLE ONLY vulnerability_occurrence_identifiers
ALTER TABLE ONLY vulnerability_flags
ADD CONSTRAINT fk_rails_e59393b48b FOREIGN KEY (vulnerability_occurrence_id) REFERENCES vulnerability_occurrences(id) ON DELETE CASCADE;
-ALTER TABLE ONLY serverless_domain_cluster
- ADD CONSTRAINT fk_rails_e59e868733 FOREIGN KEY (clusters_applications_knative_id) REFERENCES clusters_applications_knative(id) ON DELETE CASCADE;
-
ALTER TABLE ONLY incident_management_escalation_policies
ADD CONSTRAINT fk_rails_e5b513daa7 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -36636,9 +37059,6 @@ ALTER TABLE ONLY project_relation_exports
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;
@@ -36717,9 +37137,6 @@ ALTER TABLE ONLY operations_feature_flags_issues
ALTER TABLE ONLY board_project_recent_visits
ADD CONSTRAINT fk_rails_fb6fc419cb FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
-ALTER TABLE ONLY serverless_domain_cluster
- ADD CONSTRAINT fk_rails_fbdba67eb1 FOREIGN KEY (creator_id) REFERENCES users(id) ON DELETE SET NULL;
-
ALTER TABLE ONLY ci_job_variables
ADD CONSTRAINT fk_rails_fbf3b34792_p FOREIGN KEY (partition_id, job_id) REFERENCES ci_builds(partition_id, id) ON UPDATE CASCADE ON DELETE CASCADE;
@@ -36741,6 +37158,9 @@ ALTER TABLE ONLY resource_label_events
ALTER TABLE ONLY pages_deployment_states
ADD CONSTRAINT fk_rails_ff6ca551a4 FOREIGN KEY (pages_deployment_id) REFERENCES pages_deployments(id) ON DELETE CASCADE;
+ALTER TABLE ONLY search_namespace_index_assignments
+ ADD CONSTRAINT fk_search_index_id_and_type FOREIGN KEY (search_index_id, index_type) REFERENCES search_indices(id, type) ON DELETE CASCADE;
+
ALTER TABLE ONLY security_orchestration_policy_configurations
ADD CONSTRAINT fk_security_policy_configurations_management_project_id FOREIGN KEY (security_policy_management_project_id) REFERENCES projects(id) ON DELETE CASCADE;
@@ -36750,6 +37170,9 @@ ALTER TABLE ONLY integrations
ALTER TABLE ONLY merge_requests
ADD CONSTRAINT fk_source_project FOREIGN KEY (source_project_id) REFERENCES projects(id) ON DELETE SET NULL;
+ALTER TABLE ONLY system_note_metadata
+ ADD CONSTRAINT fk_system_note_metadata_note_id_convert_to_bigint FOREIGN KEY (note_id_convert_to_bigint) REFERENCES notes(id) ON DELETE CASCADE NOT VALID;
+
ALTER TABLE ONLY timelogs
ADD CONSTRAINT fk_timelogs_issues_issue_id FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE;